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

37
node_modules/reakit/ts/Tab/Tab.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import * as React from "react";
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
import { TabStateReturn } from "./TabState";
export declare type TabOptions = CompositeItemOptions & Pick<Partial<TabStateReturn>, "manual"> & Pick<TabStateReturn, "panels" | "selectedId" | "select">;
export declare type TabHTMLProps = CompositeItemHTMLProps;
export declare type TabProps = TabOptions & TabHTMLProps;
export declare const useTab: {
(options?: TabOptions | 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"> & Pick<Partial<TabStateReturn>, "manual"> & Pick<TabStateReturn, "select" | "selectedId" | "panels"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => 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"> & Pick<Partial<TabStateReturn>, "manual"> & Pick<TabStateReturn, "select" | "selectedId" | "panels"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: TabOptions, htmlProps: import("..").TabbableHTMLProps) => TabOptions;
};
export declare const Tab: import("reakit-system/ts/createComponent").Component<"button", TabOptions>;

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

@@ -0,0 +1,27 @@
/// <reference types="react" />
import { CompositeOptions, CompositeHTMLProps } from "../Composite/Composite";
import { TabStateReturn } from "./TabState";
export declare type TabListOptions = CompositeOptions & Pick<Partial<TabStateReturn>, "orientation">;
export declare type TabListHTMLProps = CompositeHTMLProps;
export declare type TabListProps = TabListOptions & TabListHTMLProps;
export declare const useTabList: {
(options?: TabListOptions | 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<TabStateReturn>, "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<TabStateReturn>, "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: TabListOptions, htmlProps: import("..").TabbableHTMLProps) => TabListOptions;
};
export declare const TabList: import("reakit-system/ts/createComponent").Component<"div", TabListOptions>;

37
node_modules/reakit/ts/Tab/TabPanel.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import * as React from "react";
import { DisclosureContentOptions, DisclosureContentHTMLProps } from "../Disclosure/DisclosureContent";
import { unstable_IdOptions, unstable_IdHTMLProps } from "../Id/Id";
import { TabStateReturn } from "./TabState";
export declare type TabPanelOptions = DisclosureContentOptions & unstable_IdOptions & Pick<TabStateReturn, "selectedId" | "registerPanel" | "unregisterPanel" | "panels" | "items"> & {
/**
* Tab's id
*/
tabId?: string;
};
export declare type TabPanelHTMLProps = DisclosureContentHTMLProps & unstable_IdHTMLProps;
export declare type TabPanelProps = TabPanelOptions & TabPanelHTMLProps;
export declare const useTabPanel: {
(options?: TabPanelOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<TabStateReturn, "items" | "selectedId" | "panels" | "registerPanel" | "unregisterPanel"> & {
/**
* Tab's id
*/
tabId?: string | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<TabStateReturn, "items" | "selectedId" | "panels" | "registerPanel" | "unregisterPanel"> & {
/**
* Tab's id
*/
tabId?: string | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: TabPanelOptions, htmlProps: import("..").RoleHTMLProps) => TabPanelOptions;
};
export declare const TabPanel: import("reakit-system/ts/createComponent").Component<"div", TabPanelOptions>;

37
node_modules/reakit/ts/Tab/TabState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { CompositeState, CompositeActions, CompositeInitialState } from "../Composite/CompositeState";
export declare type TabState = CompositeState & {
/**
* The current selected tab's `id`.
*/
selectedId?: TabState["currentId"];
/**
* Lists all the panels.
*/
panels: TabState["items"];
/**
* Whether the tab selection should be manual.
*/
manual: boolean;
};
export declare type TabActions = CompositeActions & {
/**
* Moves into and selects a tab by its `id`.
*/
select: TabActions["move"];
/**
* Sets `selectedId`.
*/
setSelectedId: TabActions["setCurrentId"];
/**
* Registers a tab panel.
*/
registerPanel: TabActions["registerItem"];
/**
* Unregisters a tab panel.
*/
unregisterPanel: TabActions["unregisterItem"];
};
export declare type TabInitialState = CompositeInitialState & Partial<Pick<TabState, "selectedId" | "manual">>;
export declare type TabStateReturn = TabState & TabActions;
export declare function useTabState(initialState?: SealedInitialState<TabInitialState>): TabStateReturn;

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

@@ -0,0 +1,3 @@
export declare const TAB_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "selectedId", "panels", "manual", "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", "select", "setSelectedId", "registerPanel", "unregisterPanel"];
export declare const TAB_LIST_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "selectedId", "panels", "manual", "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", "select", "setSelectedId", "registerPanel", "unregisterPanel"];
export declare const TAB_PANEL_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "selectedId", "panels", "manual", "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", "select", "setSelectedId", "registerPanel", "unregisterPanel", "tabId"];

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

@@ -0,0 +1,4 @@
export * from "./Tab";
export * from "./TabList";
export * from "./TabPanel";
export * from "./TabState";