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

3
node_modules/constant-case/dist.es2015/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { Options } from "no-case";
export { Options };
export declare function constantCase(input: string, options?: Options): string;

8
node_modules/constant-case/dist.es2015/index.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { __assign } from "tslib";
import { noCase } from "no-case";
import { upperCase } from "upper-case";
export function constantCase(input, options) {
if (options === void 0) { options = {}; }
return noCase(input, __assign({ delimiter: "_", transform: upperCase }, options));
}
//# sourceMappingURL=index.js.map

1
node_modules/constant-case/dist.es2015/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,OAAqB;IAArB,wBAAA,EAAA,YAAqB;IAC/D,OAAO,MAAM,CAAC,KAAK,aACjB,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,SAAS,IACjB,OAAO,EACV,CAAC;AACL,CAAC","sourcesContent":["import { noCase, Options } from \"no-case\";\nimport { upperCase } from \"upper-case\";\n\nexport { Options };\n\nexport function constantCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \"_\",\n transform: upperCase,\n ...options,\n });\n}\n"]}

View File

@@ -0,0 +1 @@
export {};

24
node_modules/constant-case/dist.es2015/index.spec.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import { constantCase } from ".";
var TEST_CASES = [
["", ""],
["test", "TEST"],
["test string", "TEST_STRING"],
["Test String", "TEST_STRING"],
["dot.case", "DOT_CASE"],
["path/case", "PATH_CASE"],
["TestV2", "TEST_V2"],
["version 1.2.10", "VERSION_1_2_10"],
["version 1.21.0", "VERSION_1_21_0"],
];
describe("constant case", function () {
var _loop_1 = function (input, result) {
it(input + " -> " + result, function () {
expect(constantCase(input)).toEqual(result);
});
};
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1];
_loop_1(input, result);
}
});
//# sourceMappingURL=index.spec.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,IAAM,UAAU,GAAuB;IACrC,CAAC,EAAE,EAAE,EAAE,CAAC;IACR,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,UAAU,EAAE,UAAU,CAAC;IACxB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,QAAQ,CAAC,eAAe,EAAE;4BACZ,KAAK,EAAE,MAAM;QACvB,EAAE,CAAI,KAAK,YAAO,MAAQ,EAAE;YAC1B,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;;IAHL,KAA8B,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAA7B,IAAA,qBAAe,EAAd,KAAK,QAAA,EAAE,MAAM,QAAA;gBAAb,KAAK,EAAE,MAAM;KAIxB;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { constantCase } from \".\";\n\nconst TEST_CASES: [string, string][] = [\n [\"\", \"\"],\n [\"test\", \"TEST\"],\n [\"test string\", \"TEST_STRING\"],\n [\"Test String\", \"TEST_STRING\"],\n [\"dot.case\", \"DOT_CASE\"],\n [\"path/case\", \"PATH_CASE\"],\n [\"TestV2\", \"TEST_V2\"],\n [\"version 1.2.10\", \"VERSION_1_2_10\"],\n [\"version 1.21.0\", \"VERSION_1_21_0\"],\n];\n\ndescribe(\"constant case\", () => {\n for (const [input, result] of TEST_CASES) {\n it(`${input} -> ${result}`, () => {\n expect(constantCase(input)).toEqual(result);\n });\n }\n});\n"]}