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

View File

@@ -0,0 +1 @@
export declare function addItemAtIndex<T extends any[]>(array: T, item: T[number], index: number): any[];

View File

@@ -0,0 +1,5 @@
import { Item } from "./types";
/**
* Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
*/
export declare function fillGroups(groups: Item[][], currentId?: string | null, shift?: boolean): Item[][];

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findDOMIndex(items: Item[], item: Item): number;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findEnabledItemById(items: Item[], id?: string | null): Item | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findFirstEnabledItem(items: Item[], excludeId?: string): Item | undefined;

View File

@@ -0,0 +1 @@
export declare function flatten<T>(grid: T[][]): T[];

View File

@@ -0,0 +1,2 @@
import { CompositeState } from "../CompositeState";
export declare function getCurrentId(options: Pick<CompositeState, "currentId" | "items">, passedId?: CompositeState["currentId"]): string | null | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function getItemsInGroup(items: Item[], groupId?: string): Item[];

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function getMaxLength(rows: Item[][]): number;

View File

@@ -0,0 +1,2 @@
import { Orientation } from "./types";
export declare function getOppositeOrientation(orientation?: Orientation): "horizontal" | "vertical" | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function groupItems(items: Item[]): Item[][];

View File

@@ -0,0 +1 @@
export declare function isElementPreceding(element1: Element, element2: Element): boolean;

View File

@@ -0,0 +1,7 @@
import { Item } from "./types";
export declare function placeItemsAfter(items: Item[], id: string, shouldInsertNullItem?: boolean): (Item | {
id: null;
ref: {
current: null;
};
})[];

View File

@@ -0,0 +1 @@
export declare function reverse<T>(array: T[]): T[];

View File

@@ -0,0 +1 @@
export declare function setTextFieldValue(element: HTMLElement, value: string): void;

View File

@@ -0,0 +1,6 @@
import * as React from "react";
declare type Item = {
ref: React.RefObject<HTMLElement | null>;
};
export declare function sortBasedOnDOMPosition<T extends Item>(items: T[]): T[];
export {};

12
node_modules/reakit/ts/Composite/__utils/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/// <reference types="react" />
export declare type Group = {
id: string;
ref: React.RefObject<HTMLElement>;
};
export declare type Item = {
id: string | null;
ref: React.RefObject<HTMLElement>;
groupId?: Group["id"];
disabled?: boolean;
};
export declare type Orientation = "horizontal" | "vertical";

View File

@@ -0,0 +1,4 @@
import { Item } from "./types";
declare type SetItems = (items: Item[]) => void;
export declare function useSortBasedOnDOMPosition(items: Item[], setItems: SetItems): void;
export {};

View File

@@ -0,0 +1,7 @@
declare type UserFocusElement = HTMLElement & {
userFocus?: boolean;
};
export declare function userFocus(element: UserFocusElement): void;
export declare function hasUserFocus(element: UserFocusElement): boolean;
export declare function setUserFocus(element: UserFocusElement, value: boolean): void;
export {};

View File

@@ -0,0 +1,5 @@
import { Item } from "./types";
/**
* Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
*/
export declare function verticalizeItems(items: Item[]): Item[];