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>
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
/**
|
|
* @param {ASTNode} node
|
|
* @param {Context} context
|
|
* @returns {boolean}
|
|
*/
|
|
export function isES5Component(node: ASTNode, context: Context): boolean;
|
|
/**
|
|
* @param {ASTNode} node
|
|
* @param {Context} context
|
|
* @returns {boolean}
|
|
*/
|
|
export function isES6Component(node: ASTNode, context: Context): boolean;
|
|
/**
|
|
* Get the parent ES5 component node from the current scope
|
|
* @param {Context} context
|
|
* @param {ASTNode} node
|
|
* @returns {ASTNode|null}
|
|
*/
|
|
export function getParentES5Component(context: Context, node: ASTNode): ASTNode | null;
|
|
/**
|
|
* Get the parent ES6 component node from the current scope
|
|
* @param {Context} context
|
|
* @param {ASTNode} node
|
|
* @returns {ASTNode | null}
|
|
*/
|
|
export function getParentES6Component(context: Context, node: ASTNode): ASTNode | null;
|
|
/**
|
|
* Check if the node is explicitly declared as a descendant of a React Component
|
|
* @param {any} node
|
|
* @param {Context} context
|
|
* @returns {boolean}
|
|
*/
|
|
export function isExplicitComponent(node: any, context: Context): boolean;
|
|
/**
|
|
* Checks if a component extends React.PureComponent
|
|
* @param {ASTNode} node
|
|
* @param {Context} context
|
|
* @returns {boolean}
|
|
*/
|
|
export function isPureComponent(node: ASTNode, context: Context): boolean;
|
|
/**
|
|
* @param {ASTNode} node
|
|
* @returns {boolean}
|
|
*/
|
|
export function isStateMemberExpression(node: ASTNode): boolean;
|
|
//# sourceMappingURL=componentUtil.d.ts.map
|