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,57 @@
# Disallow use of deprecated functions (`no-deprecated-functions`)
💼 This rule is enabled in the ✅ `recommended`
[config](https://github.com/jest-community/eslint-plugin-jest/blob/main/README.md#shareable-configurations).
🔧 This rule is automatically fixable by the
[`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
<!-- end auto-generated rule header -->
Over the years Jest has accrued some debt in the form of functions that have
either been renamed for clarity, or replaced with more powerful APIs.
While typically these deprecated functions are kept in the codebase for a number
of majors, eventually they are removed completely.
This rule requires knowing which version of Jest you're using - see
[this section of the readme](../../README.md#jest-version-setting) for details
on how that is obtained automatically and how you can explicitly provide a
version if needed.
## Rule details
This rule warns about calls to deprecated functions, and provides details on
what to replace them with, based on the version of Jest that is installed.
This rule can also autofix a number of these deprecations for you.
### `jest.resetModuleRegistry`
This function was renamed to `resetModules` in Jest 15 and removed in Jest 27.
### `jest.addMatchers`
This function was replaced with `expect.extend` in Jest 17 and removed in
Jest 27.
### `require.requireActual` & `require.requireMock`
These functions were replaced in Jest 21 and removed in Jest 26.
Originally, the `requireActual` & `requireMock` the `requireActual`&
`requireMock` functions were placed onto the `require` function.
These functions were later moved onto the `jest` object in order to be easier
for type checkers to handle, and their use via `require` deprecated. Finally,
the release of Jest 26 saw them removed from the `require` function altogether.
### `jest.runTimersToTime`
This function was renamed to `advanceTimersByTime` in Jest 22 and removed in
Jest 27.
### `jest.genMockFromModule`
This function was renamed to `createMockFromModule` in Jest 26, and is scheduled
for removal in Jest 30.