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,43 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _index = _interopRequireDefault(require("../../../_lib/buildFormatLongFn/index.js"));
var dateFormats = {
full: 'EEEE d MMMM y',
long: 'd MMMM y',
medium: 'd MMM y',
short: 'dd.MM.y'
};
var timeFormats = {
full: 'HH:mm:ss zzzz',
long: 'HH:mm:ss z',
medium: 'HH:mm:ss',
short: 'HH:mm'
};
var dateTimeFormats = {
full: '{{date}} {{time}}',
long: '{{date}} {{time}}',
medium: '{{date}} {{time}}',
short: '{{date}} {{time}}'
};
var formatLong = {
date: (0, _index.default)({
formats: dateFormats,
defaultWidth: 'full'
}),
time: (0, _index.default)({
formats: timeFormats,
defaultWidth: 'full'
}),
dateTime: (0, _index.default)({
formats: dateTimeFormats,
defaultWidth: 'full'
})
};
var _default = formatLong;
exports.default = _default;
module.exports = exports.default;

4
node_modules/date-fns/locale/it-CH/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
import { itCH } from 'date-fns/locale'
export default itCH

35
node_modules/date-fns/locale/it-CH/index.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _index = _interopRequireDefault(require("../it/_lib/formatDistance/index.js"));
var _index2 = _interopRequireDefault(require("../it/_lib/formatRelative/index.js"));
var _index3 = _interopRequireDefault(require("../it/_lib/localize/index.js"));
var _index4 = _interopRequireDefault(require("../it/_lib/match/index.js"));
var _index5 = _interopRequireDefault(require("./_lib/formatLong/index.js"));
/**
* @type {Locale}
* @category Locales
* @summary Italian locale (Switzerland).
* @language Italian
* @iso-639-2 ita
* @author Mike Peyer [@maic66]{@link https://github.com/maic66}
*/
var locale = {
code: 'it-CH',
formatDistance: _index.default,
formatLong: _index5.default,
formatRelative: _index2.default,
localize: _index3.default,
match: _index4.default,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4
}
};
var _default = locale;
exports.default = _default;
module.exports = exports.default;

35
node_modules/date-fns/locale/it-CH/index.js.flow generated vendored Normal file
View File

@@ -0,0 +1,35 @@
// @flow
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
export type Locale = {
code?: string,
formatDistance?: (...args: Array<any>) => any,
formatRelative?: (...args: Array<any>) => any,
localize?: {
ordinalNumber: (...args: Array<any>) => any,
era: (...args: Array<any>) => any,
quarter: (...args: Array<any>) => any,
month: (...args: Array<any>) => any,
day: (...args: Array<any>) => any,
dayPeriod: (...args: Array<any>) => any,
},
formatLong?: {
date: (...args: Array<any>) => any,
time: (...args: Array<any>) => any,
dateTime: (...args: Array<any>) => any,
},
match?: {
ordinalNumber: (...args: Array<any>) => any,
era: (...args: Array<any>) => any,
quarter: (...args: Array<any>) => any,
month: (...args: Array<any>) => any,
day: (...args: Array<any>) => any,
dayPeriod: (...args: Array<any>) => any,
},
options?: {
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
},
}
declare module.exports: Locale

5
node_modules/date-fns/locale/it-CH/package.json generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"sideEffects": false,
"module": "../../esm/locale/it-CH/index.js",
"typings": "../../typings.d.ts"
}