fix: prevent asset conflicts between React and Grid.js versions

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>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

27
node_modules/reakit/ts/Toolbar/Toolbar.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/// <reference types="react" />
import { CompositeOptions, CompositeHTMLProps } from "../Composite/Composite";
import { ToolbarStateReturn } from "./ToolbarState";
export declare type ToolbarOptions = CompositeOptions & Pick<Partial<ToolbarStateReturn>, "orientation">;
export declare type ToolbarHTMLProps = CompositeHTMLProps;
export declare type ToolbarProps = ToolbarOptions & ToolbarHTMLProps;
export declare const useToolbar: {
(options?: ToolbarOptions | undefined, htmlProps?: import("..").TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").TabbableHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<import("..").unstable_GridStateReturn>, "orientation"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<import("..").unstable_GridStateReturn>, "orientation"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: ToolbarOptions, htmlProps: import("..").TabbableHTMLProps) => ToolbarOptions;
};
export declare const Toolbar: import("reakit-system/ts/createComponent").Component<"div", ToolbarOptions>;

36
node_modules/reakit/ts/Toolbar/ToolbarItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,36 @@
/// <reference types="react" />
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
export declare type ToolbarItemOptions = CompositeItemOptions;
export declare type ToolbarItemHTMLProps = CompositeItemHTMLProps;
export declare type ToolbarItemProps = ToolbarItemOptions & ToolbarItemHTMLProps;
export declare const useToolbarItem: {
(options?: CompositeItemOptions | undefined, htmlProps?: import("..").TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").TabbableHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: CompositeItemOptions, htmlProps: import("..").TabbableHTMLProps) => CompositeItemOptions;
};
export declare const ToolbarItem: import("reakit-system/ts/createComponent").Component<"button", CompositeItemOptions>;

20
node_modules/reakit/ts/Toolbar/ToolbarSeparator.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/// <reference types="react" />
import { SeparatorOptions, SeparatorHTMLProps } from "../Separator/Separator";
export declare type ToolbarSeparatorOptions = SeparatorOptions;
export declare type ToolbarSeparatorHTMLProps = SeparatorHTMLProps;
export declare type ToolbarSeparatorProps = ToolbarSeparatorOptions & ToolbarSeparatorHTMLProps;
export declare const useToolbarSeparator: {
(options?: SeparatorOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
orientation?: "horizontal" | "vertical" | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & {
orientation?: "horizontal" | "vertical" | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: SeparatorOptions, htmlProps: import("..").RoleHTMLProps) => SeparatorOptions;
};
export declare const ToolbarSeparator: import("reakit-system/ts/createComponent").Component<"hr", SeparatorOptions>;

7
node_modules/reakit/ts/Toolbar/ToolbarState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { CompositeState, CompositeActions, CompositeInitialState } from "../Composite/CompositeState";
export declare type ToolbarState = CompositeState;
export declare type ToolbarActions = CompositeActions;
export declare type ToolbarInitialState = CompositeInitialState;
export declare type ToolbarStateReturn = ToolbarState & ToolbarActions;
export declare function useToolbarState(initialState?: SealedInitialState<ToolbarInitialState>): ToolbarStateReturn;

3
node_modules/reakit/ts/Toolbar/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare const TOOLBAR_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"];
export declare const TOOLBAR_ITEM_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"];
export declare const TOOLBAR_SEPARATOR_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"];

4
node_modules/reakit/ts/Toolbar/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from "./Toolbar";
export * from "./ToolbarItem";
export * from "./ToolbarSeparator";
export * from "./ToolbarState";