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>
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports["default"] = _default;
|
|
/**
|
|
* Given a CSS statement, return the string before the block.
|
|
* For rules, this is the selector list (and surrounding whitespace).
|
|
* For at-rules, this is the name and params (and surrounding whitespace).
|
|
*
|
|
* If there is no block, return empty string.
|
|
*
|
|
* @param {Rule|AtRule} statement - postcss rule or at-rule node
|
|
* @param {object} options
|
|
* @param {boolean} [options.noRawBefore] - Leave out the `before` string
|
|
* @return {string}
|
|
*/
|
|
function _default(statement) {
|
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
noRawBefore = _ref.noRawBefore;
|
|
var result = "";
|
|
if (statement.type !== "rule" && statement.type !== "atrule") {
|
|
return result;
|
|
}
|
|
if (!noRawBefore) {
|
|
result += statement.raws.before;
|
|
}
|
|
if (statement.type === "rule") {
|
|
result += statement.selector;
|
|
} else {
|
|
result += "@".concat(statement.name).concat(statement.raws.afterName).concat(statement.params);
|
|
}
|
|
var between = statement.raws.between;
|
|
if (between !== undefined) {
|
|
result += between;
|
|
}
|
|
return result;
|
|
} |