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

76
node_modules/reakit/ts/Radio/Radio.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
import * as React from "react";
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
import { RadioStateReturn } from "./RadioState";
export declare type RadioOptions = CompositeItemOptions & Pick<Partial<RadioStateReturn>, "state" | "setState"> & {
/**
* Same as the `value` attribute.
*/
value: string | number;
/**
* Same as the `checked` attribute.
*/
checked?: boolean;
/**
* @private
*/
unstable_checkOnFocus?: boolean;
};
export declare type RadioHTMLProps = CompositeItemHTMLProps & React.InputHTMLAttributes<any>;
export declare type RadioProps = RadioOptions & RadioHTMLProps;
export declare const useRadio: {
(options?: RadioOptions | undefined, htmlProps?: import("..").unstable_ComboboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").unstable_ComboboxHTMLProps;
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<RadioStateReturn>, "state" | "setState"> & {
/**
* Same as the `value` attribute.
*/
value: string | number;
/**
* Same as the `checked` attribute.
*/
checked?: boolean | undefined;
/**
* @private
*/
unstable_checkOnFocus?: boolean | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any>, 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<RadioStateReturn>, "state" | "setState"> & {
/**
* Same as the `value` attribute.
*/
value: string | number;
/**
* Same as the `checked` attribute.
*/
checked?: boolean | undefined;
/**
* @private
*/
unstable_checkOnFocus?: boolean | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: RadioOptions, htmlProps: import("..").unstable_ComboboxHTMLProps) => RadioOptions;
};
export declare const Radio: import("reakit-system/ts/createComponent").Component<"input", RadioOptions>;

26
node_modules/reakit/ts/Radio/RadioGroup.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import * as React from "react";
import { CompositeOptions, CompositeHTMLProps } from "../Composite/Composite";
export declare type RadioGroupOptions = CompositeOptions;
export declare type RadioGroupHTMLProps = CompositeHTMLProps & React.FieldsetHTMLAttributes<any>;
export declare type RadioGroupProps = RadioGroupOptions & RadioGroupHTMLProps;
export declare const useRadioGroup: {
(options?: CompositeOptions | undefined, htmlProps?: RadioGroupHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RadioGroupHTMLProps;
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"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.FieldsetHTMLAttributes<any>, 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"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.FieldsetHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: CompositeOptions, htmlProps: RadioGroupHTMLProps) => CompositeOptions;
};
export declare const RadioGroup: import("reakit-system/ts/createComponent").Component<"div", CompositeOptions>;

18
node_modules/reakit/ts/Radio/RadioState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { CompositeState, CompositeActions, CompositeInitialState } from "../Composite";
export declare type RadioState = CompositeState & {
/**
* The `value` attribute of the current checked radio.
*/
state: string | number | undefined;
};
export declare type RadioActions = CompositeActions & {
/**
* Sets `state`.
*/
setState: React.Dispatch<React.SetStateAction<string | number | undefined>>;
};
export declare type RadioInitialState = CompositeInitialState & Partial<Pick<RadioState, "state">>;
export declare type RadioStateReturn = RadioState & RadioActions;
export declare function useRadioState(initialState?: SealedInitialState<RadioInitialState>): RadioStateReturn;

2
node_modules/reakit/ts/Radio/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare const RADIO_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "state", "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", "setState", "value", "checked", "unstable_checkOnFocus"];
export declare const RADIO_GROUP_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "state", "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", "setState"];

3
node_modules/reakit/ts/Radio/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from "./Radio";
export * from "./RadioGroup";
export * from "./RadioState";