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>
34 lines
1.2 KiB
JavaScript
34 lines
1.2 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');
|
|
var Role_Role = require('../Role/Role.js');
|
|
var __keys = require('../__keys-4b3c7cdc.js');
|
|
var getInputId = require('../getInputId-cbd3bbcc.js');
|
|
var getLabelId = require('../getLabelId-eba7e47b.js');
|
|
|
|
var unstable_useFormLabel = createHook.createHook({
|
|
name: "FormLabel",
|
|
compose: Role_Role.useRole,
|
|
keys: __keys.FORM_LABEL_KEYS,
|
|
useProps: function useProps(options, htmlProps) {
|
|
return _rollupPluginBabelHelpers._objectSpread2({
|
|
children: options.label,
|
|
id: getLabelId.getLabelId(options.name, options.baseId),
|
|
htmlFor: getInputId.getInputId(options.name, options.baseId)
|
|
}, htmlProps);
|
|
}
|
|
});
|
|
var unstable_FormLabel = createComponent.createComponent({
|
|
as: "label",
|
|
memo: true,
|
|
useHook: unstable_useFormLabel
|
|
});
|
|
|
|
exports.unstable_FormLabel = unstable_FormLabel;
|
|
exports.unstable_useFormLabel = unstable_useFormLabel;
|