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>
25 lines
784 B
JavaScript
25 lines
784 B
JavaScript
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _options = require("../options");
|
|
|
|
var _toFill = _interopRequireDefault(require("./toFill"));
|
|
|
|
var _toMatchElement = _interopRequireDefault(require("./toMatchElement"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
/* eslint-disable no-restricted-syntax, no-await-in-loop */
|
|
async function toFillForm(instance, selector, values, options) {
|
|
options = (0, _options.defaultOptions)(options);
|
|
const form = await (0, _toMatchElement.default)(instance, selector, options);
|
|
|
|
for (const name of Object.keys(values)) {
|
|
await (0, _toFill.default)(form, `[name="${name}"]`, values[name], options);
|
|
}
|
|
}
|
|
|
|
var _default = toFillForm;
|
|
exports.default = _default; |