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>
46 lines
1.5 KiB
JavaScript
46 lines
1.5 KiB
JavaScript
import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';
|
|
import { createComponent } from 'reakit-system/createComponent';
|
|
import { createHook } from 'reakit-system/createHook';
|
|
import 'reakit-utils/shallowEqual';
|
|
import 'react';
|
|
import { useForkRef } from 'reakit-utils/useForkRef';
|
|
import 'reakit-utils/isButton';
|
|
import 'reakit-warning';
|
|
import 'reakit-utils/useLiveRef';
|
|
import 'reakit-utils/isSelfTarget';
|
|
import 'reakit-utils/useIsomorphicEffect';
|
|
import 'reakit-utils/hasFocusWithin';
|
|
import 'reakit-utils/isPortalEvent';
|
|
import 'reakit-utils/dom';
|
|
import 'reakit-utils/tabbable';
|
|
import '../Role/Role.js';
|
|
import '../Tabbable/Tabbable.js';
|
|
import '../Clickable/Clickable.js';
|
|
import '../Button/Button.js';
|
|
import '../__keys-e6a5cfbe.js';
|
|
import '../__keys-ed7b48af.js';
|
|
import { c as POPOVER_DISCLOSURE_KEYS } from '../__keys-26bb1730.js';
|
|
import '../Disclosure/Disclosure.js';
|
|
import { useDialogDisclosure } from '../Dialog/DialogDisclosure.js';
|
|
|
|
var usePopoverDisclosure = createHook({
|
|
name: "PopoverDisclosure",
|
|
compose: useDialogDisclosure,
|
|
keys: POPOVER_DISCLOSURE_KEYS,
|
|
useProps: function useProps(options, _ref) {
|
|
var htmlRef = _ref.ref,
|
|
htmlProps = _objectWithoutPropertiesLoose(_ref, ["ref"]);
|
|
|
|
return _objectSpread2({
|
|
ref: useForkRef(options.unstable_referenceRef, htmlRef)
|
|
}, htmlProps);
|
|
}
|
|
});
|
|
var PopoverDisclosure = createComponent({
|
|
as: "button",
|
|
memo: true,
|
|
useHook: usePopoverDisclosure
|
|
});
|
|
|
|
export { PopoverDisclosure, usePopoverDisclosure };
|