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,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: any) => boolean;
export = check;

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
"use strict";function r(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:n=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("esModule"!==t&&"exportsOnly"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.esModule){const t=0;if("boolean"!=typeof e.esModule)return r.errors=[{params:{type:"boolean"}}],!1;var s=0===t}else s=!0;if(s)if(void 0!==e.exportsOnly){const t=0;if("boolean"!=typeof e.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1;s=0===t}else s=!0}}return r.errors=null,!0}function e(t,{instancePath:o="",parentData:a,parentDataProperty:n,rootData:s=t}={}){let p=null,l=0;return r(t,{instancePath:o,parentData:a,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),l=p.length),e.errors=p,0===l}module.exports=e,module.exports.default=e;

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/CssGeneratorOptions"
}

View File

@@ -0,0 +1,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: any) => boolean;
export = check;

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
"use strict";module.exports=r,module.exports.default=r;const e={type:"object",additionalProperties:!1,properties:{esModule:{$ref:"#/definitions/CssGeneratorEsModule"},exportType:{$ref:"#/definitions/CssParserExportType"},exportsConvention:{$ref:"#/definitions/CssGeneratorExportsConvention"},exportsOnly:{$ref:"#/definitions/CssGeneratorExportsOnly"},localIdentHashDigest:{$ref:"#/definitions/HashDigest"},localIdentHashDigestLength:{$ref:"#/definitions/HashDigestLength"},localIdentHashFunction:{$ref:"#/definitions/HashFunction"},localIdentHashSalt:{$ref:"#/definitions/HashSalt"},localIdentName:{$ref:"#/definitions/CssGeneratorLocalIdentName"}}},t=Object.prototype.hasOwnProperty;function n(r,{instancePath:s="",parentData:o,parentDataProperty:a,rootData:i=r}={}){let l=null,p=0;if(0===p){if(!r||"object"!=typeof r||Array.isArray(r))return n.errors=[{params:{type:"object"}}],!1;{const s=p;for(const s in r)if(!t.call(e.properties,s))return n.errors=[{params:{additionalProperty:s}}],!1;if(s===p){if(void 0!==r.esModule){const e=p;if("boolean"!=typeof r.esModule)return n.errors=[{params:{type:"boolean"}}],!1;var f=e===p}else f=!0;if(f){if(void 0!==r.exportType){let e=r.exportType;const t=p;if("link"!==e&&"text"!==e&&"css-style-sheet"!==e&&"style"!==e)return n.errors=[{params:{}}],!1;f=t===p}else f=!0;if(f){if(void 0!==r.exportsConvention){let e=r.exportsConvention;const t=p,s=p;let o=!1;const a=p;if("as-is"!==e&&"camel-case"!==e&&"camel-case-only"!==e&&"dashes"!==e&&"dashes-only"!==e){const e={params:{}};null===l?l=[e]:l.push(e),p++}var c=a===p;if(o=o||c,!o){const t=p;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),p++}c=t===p,o=o||c}if(!o){const e={params:{}};return null===l?l=[e]:l.push(e),p++,n.errors=l,!1}p=s,null!==l&&(s?l.length=s:l=null),f=t===p}else f=!0;if(f){if(void 0!==r.exportsOnly){const e=p;if("boolean"!=typeof r.exportsOnly)return n.errors=[{params:{type:"boolean"}}],!1;f=e===p}else f=!0;if(f){if(void 0!==r.localIdentHashDigest){const e=p;if("string"!=typeof r.localIdentHashDigest)return n.errors=[{params:{type:"string"}}],!1;f=e===p}else f=!0;if(f){if(void 0!==r.localIdentHashDigestLength){let e=r.localIdentHashDigestLength;const t=p;if(p==p){if("number"!=typeof e)return n.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return n.errors=[{params:{comparison:">=",limit:1}}],!1}f=t===p}else f=!0;if(f){if(void 0!==r.localIdentHashFunction){let e=r.localIdentHashFunction;const t=p,s=p;let o=!1;const a=p;if(p===a)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),p++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),p++}var u=a===p;if(o=o||u,!o){const t=p;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),p++}u=t===p,o=o||u}if(!o){const e={params:{}};return null===l?l=[e]:l.push(e),p++,n.errors=l,!1}p=s,null!==l&&(s?l.length=s:l=null),f=t===p}else f=!0;if(f){if(void 0!==r.localIdentHashSalt){let e=r.localIdentHashSalt;const t=p;if(p==p){if("string"!=typeof e)return n.errors=[{params:{type:"string"}}],!1;if(e.length<1)return n.errors=[{params:{}}],!1}f=t===p}else f=!0;if(f)if(void 0!==r.localIdentName){let e=r.localIdentName;const t=p,s=p;let o=!1;const a=p;if("string"!=typeof e){const e={params:{type:"string"}};null===l?l=[e]:l.push(e),p++}var d=a===p;if(o=o||d,!o){const t=p;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),p++}d=t===p,o=o||d}if(!o){const e={params:{}};return null===l?l=[e]:l.push(e),p++,n.errors=l,!1}p=s,null!==l&&(s?l.length=s:l=null),f=t===p}else f=!0}}}}}}}}}}return n.errors=l,0===p}function r(e,{instancePath:t="",parentData:s,parentDataProperty:o,rootData:a=e}={}){let i=null,l=0;return n(e,{instancePath:t,parentData:s,parentDataProperty:o,rootData:a})||(i=null===i?n.errors:i.concat(n.errors),l=i.length),r.errors=i,0===l}

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/CssModuleGeneratorOptions"
}

View File

@@ -0,0 +1,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: any) => boolean;
export = check;

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
"use strict";module.exports=t,module.exports.default=t;const e={type:"object",additionalProperties:!1,properties:{animation:{$ref:"#/definitions/CssParserAnimation"},container:{$ref:"#/definitions/CssParserContainer"},customIdents:{$ref:"#/definitions/CssParserCustomIdents"},dashedIdents:{$ref:"#/definitions/CssParserDashedIdents"},exportType:{$ref:"#/definitions/CssParserExportType"},function:{$ref:"#/definitions/CssParserFunction"},grid:{$ref:"#/definitions/CssParserGrid"},import:{$ref:"#/definitions/CssParserImport"},namedExports:{$ref:"#/definitions/CssParserNamedExports"},url:{$ref:"#/definitions/CssParserUrl"}}},r=Object.prototype.hasOwnProperty;function o(t,{instancePath:s="",parentData:n,parentDataProperty:a,rootData:i=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return o.errors=[{params:{type:"object"}}],!1;{const s=0;for(const s in t)if(!r.call(e.properties,s))return o.errors=[{params:{additionalProperty:s}}],!1;if(0===s){if(void 0!==t.animation){const e=0;if("boolean"!=typeof t.animation)return o.errors=[{params:{type:"boolean"}}],!1;var f=0===e}else f=!0;if(f){if(void 0!==t.container){const e=0;if("boolean"!=typeof t.container)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.customIdents){const e=0;if("boolean"!=typeof t.customIdents)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.dashedIdents){const e=0;if("boolean"!=typeof t.dashedIdents)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.exportType){let e=t.exportType;const r=0;if("link"!==e&&"text"!==e&&"css-style-sheet"!==e&&"style"!==e)return o.errors=[{params:{}}],!1;f=0===r}else f=!0;if(f){if(void 0!==t.function){const e=0;if("boolean"!=typeof t.function)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.grid){const e=0;if("boolean"!=typeof t.grid)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.import){const e=0;if("boolean"!=typeof t.import)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f){if(void 0!==t.namedExports){const e=0;if("boolean"!=typeof t.namedExports)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0;if(f)if(void 0!==t.url){const e=0;if("boolean"!=typeof t.url)return o.errors=[{params:{type:"boolean"}}],!1;f=0===e}else f=!0}}}}}}}}}}return o.errors=null,!0}function t(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:a=e}={}){let i=null,f=0;return o(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:a})||(i=null===i?o.errors:i.concat(o.errors),f=i.length),t.errors=i,0===f}

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/CssModuleParserOptions"
}

View File

@@ -0,0 +1,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: any) => boolean;
export = check;

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
"use strict";function r(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:n=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("exportType"!==t&&"import"!==t&&"namedExports"!==t&&"url"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.exportType){let t=e.exportType;const o=0;if("link"!==t&&"text"!==t&&"css-style-sheet"!==t&&"style"!==t)return r.errors=[{params:{}}],!1;var s=0===o}else s=!0;if(s){if(void 0!==e.import){const t=0;if("boolean"!=typeof e.import)return r.errors=[{params:{type:"boolean"}}],!1;s=0===t}else s=!0;if(s){if(void 0!==e.namedExports){const t=0;if("boolean"!=typeof e.namedExports)return r.errors=[{params:{type:"boolean"}}],!1;s=0===t}else s=!0;if(s)if(void 0!==e.url){const t=0;if("boolean"!=typeof e.url)return r.errors=[{params:{type:"boolean"}}],!1;s=0===t}else s=!0}}}}return r.errors=null,!0}function e(t,{instancePath:o="",parentData:a,parentDataProperty:n,rootData:s=t}={}){let p=null,i=0;return r(t,{instancePath:o,parentData:a,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),i=p.length),e.errors=p,0===i}module.exports=e,module.exports.default=e;

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/CssParserOptions"
}