Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
38 lines
1.4 KiB
JavaScript
38 lines
1.4 KiB
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
var _rollupPluginBabelHelpers = require('../_rollupPluginBabelHelpers-8f9a8751.js');
|
|
var createComponent = require('reakit-system/createComponent');
|
|
var createHook = require('reakit-system/createHook');
|
|
require('reakit-utils/shallowEqual');
|
|
require('../Role/Role.js');
|
|
var Group_Group = require('../Group/Group.js');
|
|
var __keys = require('../__keys-4b3c7cdc.js');
|
|
var getInputId = require('../getInputId-cbd3bbcc.js');
|
|
var getLabelId = require('../getLabelId-eba7e47b.js');
|
|
require('./utils/getIn.js');
|
|
var shouldShowError = require('../shouldShowError-880a39c9.js');
|
|
|
|
var unstable_useFormGroup = createHook.createHook({
|
|
name: "FormGroup",
|
|
compose: Group_Group.useGroup,
|
|
keys: __keys.FORM_GROUP_KEYS,
|
|
useProps: function useProps(options, htmlProps) {
|
|
return _rollupPluginBabelHelpers._objectSpread2({
|
|
id: getInputId.getInputId(options.name, options.baseId),
|
|
tabIndex: -1,
|
|
"aria-describedby": shouldShowError.getMessageId(options.name, options.baseId),
|
|
"aria-labelledby": getLabelId.getLabelId(options.name, options.baseId),
|
|
"aria-invalid": shouldShowError.shouldShowError(options, options.name)
|
|
}, htmlProps);
|
|
}
|
|
});
|
|
var unstable_FormGroup = createComponent.createComponent({
|
|
as: "fieldset",
|
|
useHook: unstable_useFormGroup
|
|
});
|
|
|
|
exports.unstable_FormGroup = unstable_FormGroup;
|
|
exports.unstable_useFormGroup = unstable_useFormGroup;
|