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

35
node_modules/reakit/ts/Popover/Popover.d.ts generated vendored Normal file
View File

@@ -0,0 +1,35 @@
/// <reference types="react" />
import { DialogOptions, DialogHTMLProps } from "../Dialog/Dialog";
import { PopoverStateReturn } from "./PopoverState";
export declare type PopoverOptions = DialogOptions & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles">;
export declare type PopoverHTMLProps = DialogHTMLProps;
export declare type PopoverProps = PopoverOptions & PopoverHTMLProps;
export declare const usePopover: {
(options?: PopoverOptions | 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("..").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "baseId"> & {
hideOnEsc?: boolean | undefined;
hideOnClickOutside?: boolean | undefined;
preventBodyScroll?: boolean | undefined;
unstable_initialFocusRef?: import("react").RefObject<HTMLElement> | undefined;
unstable_finalFocusRef?: import("react").RefObject<HTMLElement> | undefined;
unstable_orphan?: boolean | undefined;
unstable_autoFocusOnShow?: boolean | undefined;
unstable_autoFocusOnHide?: boolean | undefined;
} & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "baseId"> & {
hideOnEsc?: boolean | undefined;
hideOnClickOutside?: boolean | undefined;
preventBodyScroll?: boolean | undefined;
unstable_initialFocusRef?: import("react").RefObject<HTMLElement> | undefined;
unstable_finalFocusRef?: import("react").RefObject<HTMLElement> | undefined;
unstable_orphan?: boolean | undefined;
unstable_autoFocusOnShow?: boolean | undefined;
unstable_autoFocusOnHide?: boolean | undefined;
} & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: PopoverOptions, htmlProps: import("..").RoleHTMLProps) => PopoverOptions;
};
export declare const Popover: import("reakit-system/ts/createComponent").Component<"div", PopoverOptions>;

26
node_modules/reakit/ts/Popover/PopoverArrow.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import * as React from "react";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { PopoverStateReturn } from "./PopoverState";
export declare type PopoverArrowOptions = RoleOptions & Pick<Partial<PopoverStateReturn>, "unstable_arrowRef" | "unstable_arrowStyles"> & Pick<PopoverStateReturn, "placement"> & {
/** Arrow's size */
size?: number | string;
};
export declare type PopoverArrowHTMLProps = RoleHTMLProps;
export declare type PopoverArrowProps = PopoverArrowOptions & PopoverArrowHTMLProps;
export declare const usePopoverArrow: {
(options?: PopoverArrowOptions | undefined, htmlProps?: RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RoleHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & Pick<Partial<PopoverStateReturn>, "unstable_arrowRef" | "unstable_arrowStyles"> & Pick<PopoverStateReturn, "placement"> & {
/** Arrow's size */
size?: string | number | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: RoleOptions & Pick<Partial<PopoverStateReturn>, "unstable_arrowRef" | "unstable_arrowStyles"> & Pick<PopoverStateReturn, "placement"> & {
/** Arrow's size */
size?: string | number | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: PopoverArrowOptions, htmlProps: RoleHTMLProps) => PopoverArrowOptions;
};
export declare const PopoverArrow: import("reakit-system/ts/createComponent").Component<"div", PopoverArrowOptions>;

16
node_modules/reakit/ts/Popover/PopoverBackdrop.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/// <reference types="react" />
import { DialogBackdropOptions, DialogBackdropHTMLProps } from "../Dialog/DialogBackdrop";
export declare type PopoverBackdropOptions = DialogBackdropOptions;
export declare type PopoverBackdropHTMLProps = DialogBackdropHTMLProps;
export declare type PopoverBackdropProps = PopoverBackdropOptions & PopoverBackdropHTMLProps;
export declare const usePopoverBackdrop: {
(options?: DialogBackdropOptions | 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("..").DialogStateReturn>, "modal"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").DialogStateReturn>, "modal"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: DialogBackdropOptions, htmlProps: import("..").RoleHTMLProps) => DialogBackdropOptions;
};
export declare const PopoverBackdrop: import("reakit-system/ts/createComponent").Component<"div", DialogBackdropOptions>;

33
node_modules/reakit/ts/Popover/PopoverDisclosure.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
/// <reference types="react" />
import { DialogDisclosureOptions, DialogDisclosureHTMLProps } from "../Dialog/DialogDisclosure";
import { PopoverStateReturn } from "./PopoverState";
export declare type PopoverDisclosureOptions = DialogDisclosureOptions & Pick<Partial<PopoverStateReturn>, "unstable_referenceRef">;
export declare type PopoverDisclosureHTMLProps = DialogDisclosureHTMLProps;
export declare type PopoverDisclosureProps = PopoverDisclosureOptions & PopoverDisclosureHTMLProps;
export declare const usePopoverDisclosure: {
(options?: PopoverDisclosureOptions | undefined, htmlProps?: import("..").ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<PopoverStateReturn>, "unstable_referenceRef"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").ButtonHTMLAttributes<any>, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<PopoverStateReturn>, "unstable_referenceRef"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").ButtonHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: PopoverDisclosureOptions, htmlProps: import("..").ButtonHTMLProps) => PopoverDisclosureOptions;
};
export declare const PopoverDisclosure: import("reakit-system/ts/createComponent").Component<"button", PopoverDisclosureOptions>;

75
node_modules/reakit/ts/Popover/PopoverState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,75 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { DialogState, DialogActions, DialogInitialState, DialogStateReturn } from "../Dialog/DialogState";
declare type Placement = "auto-start" | "auto" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start";
export declare type PopoverState = DialogState & {
/**
* The reference element.
*/
unstable_referenceRef: React.RefObject<HTMLElement | null>;
/**
* The popover element.
* @private
*/
unstable_popoverRef: React.RefObject<HTMLElement | null>;
/**
* The arrow element.
* @private
*/
unstable_arrowRef: React.RefObject<HTMLElement | null>;
/**
* Popover styles.
* @private
*/
unstable_popoverStyles: React.CSSProperties;
/**
* Arrow styles.
* @private
*/
unstable_arrowStyles: React.CSSProperties;
/**
* `placement` passed to the hook.
* @private
*/
unstable_originalPlacement: Placement;
/**
* @private
*/
unstable_update: () => boolean;
/**
* Actual `placement`.
*/
placement: Placement;
};
export declare type PopoverActions = DialogActions & {
/**
* Change the `placement` state.
*/
place: React.Dispatch<React.SetStateAction<Placement>>;
};
export declare type PopoverInitialState = DialogInitialState & Partial<Pick<PopoverState, "placement">> & {
/**
* Whether or not the popover should have `position` set to `fixed`.
*/
unstable_fixed?: boolean;
/**
* Flip the popover's placement when it starts to overlap its reference
* element.
*/
unstable_flip?: boolean;
/**
* Offset between the reference and the popover: [main axis, alt axis]. Should not be combined with `gutter`.
*/
unstable_offset?: [number | string, number | string];
/**
* Offset between the reference and the popover on the main axis. Should not be combined with `unstable_offset`.
*/
gutter?: number;
/**
* Prevents popover from being positioned outside the boundary.
*/
unstable_preventOverflow?: boolean;
};
export declare type PopoverStateReturn = DialogStateReturn & PopoverState & PopoverActions;
export declare function usePopoverState(initialState?: SealedInitialState<PopoverInitialState>): PopoverStateReturn;
export {};

4
node_modules/reakit/ts/Popover/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export declare const POPOVER_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const POPOVER_ARROW_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place", "size"];
export declare const POPOVER_BACKDROP_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const POPOVER_DISCLOSURE_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];

5
node_modules/reakit/ts/Popover/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export * from "./Popover";
export * from "./PopoverArrow";
export * from "./PopoverBackdrop";
export * from "./PopoverDisclosure";
export * from "./PopoverState";