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

21
node_modules/find-file-up/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2016, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

86
node_modules/find-file-up/README.md generated vendored Normal file
View File

@@ -0,0 +1,86 @@
# find-file-up [![NPM version](https://img.shields.io/npm/v/find-file-up.svg?style=flat)](https://www.npmjs.com/package/find-file-up) [![NPM downloads](https://img.shields.io/npm/dm/find-file-up.svg?style=flat)](https://npmjs.org/package/find-file-up) [![Build Status](https://img.shields.io/travis/jonschlinkert/find-file-up.svg?style=flat)](https://travis-ci.org/jonschlinkert/find-file-up)
Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save find-file-up
```
## Usage
```js
var findFile = require('find-file-up');
```
**async**
```js
// find `foo.txt` starting at the given directory
findFile('foo.txt', '.', function(err, fp) {
//=> /Users/jonschlinkert/dev/find-file-up/fixtures/foo.txt
});
// search user home
findFile('foo.txt', '~/', function(err, fp) {
//=> /Users/jonschlinkert/foo.txt
});
```
**sync**
```js
var file = findFile.sync('foo.txt', 'a/b/c/');
```
## About
### Related projects
* [find-pkg](https://www.npmjs.com/package/find-pkg): Find the first directory with a package.json, recursing up, starting with the given directory. Similar… [more](https://github.com/jonschlinkert/find-pkg) | [homepage](https://github.com/jonschlinkert/find-pkg "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.")
* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/cowboy/node-findup-sync) | [homepage](https://github.com/cowboy/node-findup-sync "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.")
* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.")
* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.")
* [load-module-pkg](https://www.npmjs.com/package/load-module-pkg): Load the package.json for any project currently installed in node_modules. | [homepage](https://github.com/jonschlinkert/load-module-pkg "Load the package.json for any project currently installed in node_modules.")
* [load-pkg](https://www.npmjs.com/package/load-pkg): Loads the package.json from the root of the user's current project. | [homepage](https://github.com/jonschlinkert/load-pkg "Loads the package.json from the root of the user's current project.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/find-file-up/blob/master/LICENSE).
***
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 18, 2016._

102
node_modules/find-file-up/index.js generated vendored Normal file
View File

@@ -0,0 +1,102 @@
/*!
* find-pkg <https://github.com/jonschlinkert/find-pkg>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
/**
* Module dependencies
*/
var fs = require('fs');
var path = require('path');
var resolve = require('resolve-dir');
var existsSync = require('fs-exists-sync');
/**
* Find a file, starting with the given directory
*/
module.exports = function(filename, cwd, limit, cb) {
if (typeof cwd === 'function') {
cb = cwd;
cwd = null;
}
if (typeof limit === 'function') {
cb = limit;
limit = Infinity;
}
var dir = cwd ? resolve(cwd) : '.';
var n = 0;
var drive = path.resolve(path.sep);
(function find(dir, next) {
var fp = path.resolve(dir, filename);
exists(fp, function(exists) {
n++;
if (exists) {
next(null, fp);
return;
}
if (n >= limit || dir === path.sep || dir === '.' || dir === drive) {
next();
return;
}
find(path.dirname(dir), next);
});
}(dir, cb));
};
module.exports.sync = function(filename, cwd, limit) {
var dir = cwd ? resolve(cwd) : '.';
var fp = path.join(dir, filename);
var n = 0;
var drive = path.resolve(path.sep);
if (existsSync(fp)) {
return path.resolve(fp);
}
if (limit === 0) return null;
while ((dir = path.dirname(dir))) {
n++;
var filepath = path.resolve(dir, filename);
if (existsSync(filepath)) {
return filepath;
}
if (n >= limit || dir === '.' || dir === path.sep || dir === drive) {
return;
}
}
};
/**
* Returns true if a file exists. `fs.exists` and `fs.existsSync` are deprecated.
* See: https://nodejs.org/api/fs.html#fs_fs_exists_path_callback
*/
function exists(filepath, cb) {
(fs.access || fs.stat)(filepath, function(err) {
if (err && err.code === 'ENOENT') {
cb(false);
return;
}
if (err) {
cb(err);
return;
}
cb(true);
});
}

64
node_modules/find-file-up/package.json generated vendored Normal file
View File

@@ -0,0 +1,64 @@
{
"name": "find-file-up",
"description": "Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.",
"version": "0.1.3",
"homepage": "https://github.com/jonschlinkert/find-file-up",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/find-file-up",
"bugs": {
"url": "https://github.com/jonschlinkert/find-file-up/issues"
},
"license": "MIT",
"files": [
"index.js",
"LICENSE",
"README.md"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"fs-exists-sync": "^0.1.0",
"resolve-dir": "^0.1.0"
},
"devDependencies": {
"delete": "^0.3.2",
"gulp-format-md": "^0.1.9",
"mocha": "^2.5.3"
},
"keywords": [
"file",
"find",
"up"
],
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"find-pkg",
"findup-sync",
"global-modules",
"global-prefix",
"load-module-pkg",
"load-pkg"
]
},
"reflinks": [
"verb"
],
"lint": {
"reflinks": true
}
}
}