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

31
node_modules/@tannin/evaluate/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,31 @@
## 1.2.0 (2020-03-07)
New Features
- Add TypeScript definitions
## 1.1.2 (2019-11-27)
Internal
- Update project inter-dependencies
## 1.1.1 (2019-03-07)
Internal
- Add `repository.directory` to `package.json`
## 1.1.0 (2019-01-19)
Improvements
- Improve performance by upwards of 4.5x in some common scenarios ([benchmarked optimization](http://jsbench.github.io/#d4e1fe19291d325ae4fdc4e8cc609d1b))
Documentation
- Correct documentation unpkg links
Internal
- Use Lerna for managing mono-repo

7
node_modules/@tannin/evaluate/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,7 @@
[The MIT License (MIT)](https://opensource.org/licenses/MIT)
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.

34
node_modules/@tannin/evaluate/README.md generated vendored Normal file
View File

@@ -0,0 +1,34 @@
`@tannin/evaluate`
==================
Evaluates the result of an expression given as postfix terms.
## Installation
Using [npm](https://www.npmjs.com/) as a package manager:
```
npm install @tannin/evaluate
```
Otherwise, download a pre-built copy from unpkg:
[https://unpkg.com/@tannin/evaluate/dist/evaluate.min.js](https://unpkg.com/@tannin/evaluate/dist/evaluate.min.js)
## Usage
```js
import evaluate from '@tannin/evaluate';
// 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
evaluate( terms, {} );
// ⇒ 6.333333333333334
```
## License
Copyright 2019-2020 Andrew Duthie
Released under the [MIT License](https://opensource.org/licenses/MIT).

114
node_modules/@tannin/evaluate/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,114 @@
'use strict';
/**
* Operator callback functions.
*
* @type {Object}
*/
var OPERATORS = {
'!': function( a ) {
return ! a;
},
'*': function( a, b ) {
return a * b;
},
'/': function( a, b ) {
return a / b;
},
'%': function( a, b ) {
return a % b;
},
'+': function( a, b ) {
return a + b;
},
'-': function( a, b ) {
return a - b;
},
'<': function( a, b ) {
return a < b;
},
'<=': function( a, b ) {
return a <= b;
},
'>': function( a, b ) {
return a > b;
},
'>=': function( a, b ) {
return a >= b;
},
'==': function( a, b ) {
return a === b;
},
'!=': function( a, b ) {
return a !== b;
},
'&&': function( a, b ) {
return a && b;
},
'||': function( a, b ) {
return a || b;
},
'?:': function( a, b, c ) {
if ( a ) {
throw b;
}
return c;
},
};
/**
* Given an array of postfix terms and operand variables, returns the result of
* the postfix evaluation.
*
* @example
*
* ```js
* import evaluate from '@tannin/evaluate';
*
* // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
* const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
*
* evaluate( terms, {} );
* // ⇒ 6.333333333333334
* ```
*
* @param {string[]} postfix Postfix terms.
* @param {Object} variables Operand variables.
*
* @return {*} Result of evaluation.
*/
function evaluate( postfix, variables ) {
var stack = [],
i, j, args, getOperatorResult, term, value;
for ( i = 0; i < postfix.length; i++ ) {
term = postfix[ i ];
getOperatorResult = OPERATORS[ term ];
if ( getOperatorResult ) {
// Pop from stack by number of function arguments.
j = getOperatorResult.length;
args = Array( j );
while ( j-- ) {
args[ j ] = stack.pop();
}
try {
value = getOperatorResult.apply( null, args );
} catch ( earlyReturn ) {
return earlyReturn;
}
} else if ( variables.hasOwnProperty( term ) ) {
value = variables[ term ];
} else {
value = +term;
}
stack.push( value );
}
return stack[ 0 ];
}
module.exports = evaluate;

117
node_modules/@tannin/evaluate/dist/evaluate.js generated vendored Normal file
View File

@@ -0,0 +1,117 @@
var evaluate = (function () {
'use strict';
/**
* Operator callback functions.
*
* @type {Object}
*/
var OPERATORS = {
'!': function( a ) {
return ! a;
},
'*': function( a, b ) {
return a * b;
},
'/': function( a, b ) {
return a / b;
},
'%': function( a, b ) {
return a % b;
},
'+': function( a, b ) {
return a + b;
},
'-': function( a, b ) {
return a - b;
},
'<': function( a, b ) {
return a < b;
},
'<=': function( a, b ) {
return a <= b;
},
'>': function( a, b ) {
return a > b;
},
'>=': function( a, b ) {
return a >= b;
},
'==': function( a, b ) {
return a === b;
},
'!=': function( a, b ) {
return a !== b;
},
'&&': function( a, b ) {
return a && b;
},
'||': function( a, b ) {
return a || b;
},
'?:': function( a, b, c ) {
if ( a ) {
throw b;
}
return c;
},
};
/**
* Given an array of postfix terms and operand variables, returns the result of
* the postfix evaluation.
*
* @example
*
* ```js
* import evaluate from '@tannin/evaluate';
*
* // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
* const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
*
* evaluate( terms, {} );
* // ⇒ 6.333333333333334
* ```
*
* @param {string[]} postfix Postfix terms.
* @param {Object} variables Operand variables.
*
* @return {*} Result of evaluation.
*/
function evaluate( postfix, variables ) {
var stack = [],
i, j, args, getOperatorResult, term, value;
for ( i = 0; i < postfix.length; i++ ) {
term = postfix[ i ];
getOperatorResult = OPERATORS[ term ];
if ( getOperatorResult ) {
// Pop from stack by number of function arguments.
j = getOperatorResult.length;
args = Array( j );
while ( j-- ) {
args[ j ] = stack.pop();
}
try {
value = getOperatorResult.apply( null, args );
} catch ( earlyReturn ) {
return earlyReturn;
}
} else if ( variables.hasOwnProperty( term ) ) {
value = variables[ term ];
} else {
value = +term;
}
stack.push( value );
}
return stack[ 0 ];
}
return evaluate;
}());

1
node_modules/@tannin/evaluate/dist/evaluate.min.js generated vendored Normal file
View File

@@ -0,0 +1 @@
var evaluate=function(){"use strict";var a={"!":function(n){return!n},"*":function(n,r){return n*r},"/":function(n,r){return n/r},"%":function(n,r){return n%r},"+":function(n,r){return n+r},"-":function(n,r){return n-r},"<":function(n,r){return n<r},"<=":function(n,r){return n<=r},">":function(n,r){return r<n},">=":function(n,r){return r<=n},"==":function(n,r){return n===r},"!=":function(n,r){return n!==r},"&&":function(n,r){return n&&r},"||":function(n,r){return n||r},"?:":function(n,r,t){if(n)throw r;return t}};return function(n,r){var t,u,e,o,f,c,i=[];for(t=0;t<n.length;t++){if(f=n[t],o=a[f]){for(u=o.length,e=Array(u);u--;)e[u]=i.pop();try{c=o.apply(null,e)}catch(n){return n}}else c=r.hasOwnProperty(f)?r[f]:+f;i.push(c)}return i[0]}}();

22
node_modules/@tannin/evaluate/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
/**
* Given an array of postfix terms and operand variables, returns the result of
* the postfix evaluation.
*
* @example
*
* ```js
* import evaluate from '@tannin/evaluate';
*
* // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
* const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
*
* evaluate( terms, {} );
* // ⇒ 6.333333333333334
* ```
*
* @param {string[]} postfix Postfix terms.
* @param {Object} variables Operand variables.
*
* @return {*} Result of evaluation.
*/
export default function evaluate(postfix: string[], variables: any): any;

110
node_modules/@tannin/evaluate/index.js generated vendored Normal file
View File

@@ -0,0 +1,110 @@
/**
* Operator callback functions.
*
* @type {Object}
*/
var OPERATORS = {
'!': function( a ) {
return ! a;
},
'*': function( a, b ) {
return a * b;
},
'/': function( a, b ) {
return a / b;
},
'%': function( a, b ) {
return a % b;
},
'+': function( a, b ) {
return a + b;
},
'-': function( a, b ) {
return a - b;
},
'<': function( a, b ) {
return a < b;
},
'<=': function( a, b ) {
return a <= b;
},
'>': function( a, b ) {
return a > b;
},
'>=': function( a, b ) {
return a >= b;
},
'==': function( a, b ) {
return a === b;
},
'!=': function( a, b ) {
return a !== b;
},
'&&': function( a, b ) {
return a && b;
},
'||': function( a, b ) {
return a || b;
},
'?:': function( a, b, c ) {
if ( a ) {
throw b;
}
return c;
},
};
/**
* Given an array of postfix terms and operand variables, returns the result of
* the postfix evaluation.
*
* @example
*
* ```js
* import evaluate from '@tannin/evaluate';
*
* // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
* const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
*
* evaluate( terms, {} );
* // ⇒ 6.333333333333334
* ```
*
* @param {string[]} postfix Postfix terms.
* @param {Object} variables Operand variables.
*
* @return {*} Result of evaluation.
*/
export default function evaluate( postfix, variables ) {
var stack = [],
i, j, args, getOperatorResult, term, value;
for ( i = 0; i < postfix.length; i++ ) {
term = postfix[ i ];
getOperatorResult = OPERATORS[ term ];
if ( getOperatorResult ) {
// Pop from stack by number of function arguments.
j = getOperatorResult.length;
args = Array( j );
while ( j-- ) {
args[ j ] = stack.pop();
}
try {
value = getOperatorResult.apply( null, args );
} catch ( earlyReturn ) {
return earlyReturn;
}
} else if ( variables.hasOwnProperty( term ) ) {
value = variables[ term ];
} else {
value = +term;
}
stack.push( value );
}
return stack[ 0 ];
}

34
node_modules/@tannin/evaluate/package.json generated vendored Normal file
View File

@@ -0,0 +1,34 @@
{
"name": "@tannin/evaluate",
"version": "1.2.0",
"description": "Evaluates the result of an expression given as postfix terms",
"main": "build/index.js",
"module": "index.js",
"types": "index.d.ts",
"keywords": [],
"author": {
"name": "Andrew Duthie",
"email": "andrew@andrewduthie.com",
"url": "https://andrewduthie.com"
},
"homepage": "https://github.com/aduth/tannin",
"repository": {
"type": "git",
"url": "https://github.com/aduth/tannin.git",
"directory": "packages/evaluate"
},
"bugs": {
"url": "https://github.com/aduth/tannin/issues"
},
"license": "MIT",
"files": [
"index.js",
"index.d.ts",
"build",
"dist"
],
"publishConfig": {
"access": "public"
},
"gitHead": "cd1c7447843df7751c4abd1b92aee03fe56bfba4"
}