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

54
node_modules/highlight-words-core/README.md generated vendored Normal file
View File

@@ -0,0 +1,54 @@
Utility functions shared by [`react-highlight-words`](https://github.com/bvaughn/react-highlight-words) and [`react-native-highlight-words`](https://github.com/clauderic/react-native-highlight-words).
---
### 🎉 [Become a sponsor](https://github.com/sponsors/bvaughn/) or ☕ [Buy me a coffee](http://givebrian.coffee/)
---
## API
The primary API for this package is a function exported as `findAll`. This method searches a string of text for a set of search terms and returns an array of "chunks" that describe the matches found.
Each "chunk" is an object consisting of a pair of indices (`chunk.start` and `chunk.end`) and a boolean specfifying whether the chunk is a match (`chunk.highlight`). For example:
```js
import { findAll } from "highlight-words-core";
const textToHighlight = "This is some text to highlight.";
const searchWords = ["This", "i"];
const chunks = findAll({
searchWords,
textToHighlight
});
const highlightedText = chunks
.map(chunk => {
const { end, highlight, start } = chunk;
const text = textToHighlight.substr(start, end - start);
if (highlight) {
return `<mark>${text}</mark>`;
} else {
return text;
}
})
.join("");
```
[Run this example on Code Sandbox.](https://codesandbox.io/s/ykwrzrl6wx)
### `findAll`
The `findAll` function accepts several parameters, although only the `searchWords` array and `textToHighlight` string are required.
| Parameter | Required? | Type | Description |
| --- | :---: | --- | --- |
| autoEscape | | `boolean` | Escape special regular expression characters |
| caseSensitive | | `boolean` | Search should be case sensitive |
| findChunks | | `Function` | Custom find function (advanced) |
| sanitize | | `Function` | Custom sanitize function (advanced) |
| searchWords | ✅ | `Array<string>` | Array of words to search for |
| textToHighlight | ✅ | `string` | Text to search and highlight |
## License
MIT License - fork, modify and use however you want.