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>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
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;
|