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>
41 lines
1.6 KiB
JavaScript
41 lines
1.6 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 { useBox } from '../Box/Box.js';
|
|
import { useWarning } from 'reakit-warning';
|
|
import { useCreateElement } from 'reakit-system/useCreateElement';
|
|
import { d as COMBOBOX_LIST_KEYS } from '../__keys-0f89298f.js';
|
|
import { g as getMenuId } from '../getMenuId-34730bd3.js';
|
|
|
|
var unstable_useComboboxList = createHook({
|
|
name: "ComboboxList",
|
|
compose: useBox,
|
|
keys: COMBOBOX_LIST_KEYS,
|
|
useOptions: function useOptions(_ref) {
|
|
var _ref$menuRole = _ref.menuRole,
|
|
menuRole = _ref$menuRole === void 0 ? "listbox" : _ref$menuRole,
|
|
options = _objectWithoutPropertiesLoose(_ref, ["menuRole"]);
|
|
|
|
return _objectSpread2({
|
|
menuRole: menuRole
|
|
}, options);
|
|
},
|
|
useProps: function useProps(options, htmlProps) {
|
|
return _objectSpread2({
|
|
role: options.menuRole,
|
|
id: getMenuId(options.baseId)
|
|
}, htmlProps);
|
|
}
|
|
});
|
|
var unstable_ComboboxList = createComponent({
|
|
as: "div",
|
|
useHook: unstable_useComboboxList,
|
|
useCreateElement: function useCreateElement$1(type, props, children) {
|
|
process.env.NODE_ENV !== "production" ? useWarning(!props["aria-label"] && !props["aria-labelledby"], "You should provide either `aria-label` or `aria-labelledby` props.", "See https://reakit.io/docs/combobox") : void 0;
|
|
return useCreateElement(type, props, children);
|
|
}
|
|
});
|
|
|
|
export { unstable_ComboboxList, unstable_useComboboxList };
|