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>
32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.PageUtils = void 0;
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
const drag_files_1 = require("./drag-files");
|
|
const is_current_url_1 = require("./is-current-url");
|
|
const press_keys_1 = require("./press-keys");
|
|
const set_browser_viewport_1 = require("./set-browser-viewport");
|
|
class PageUtils {
|
|
browser;
|
|
page;
|
|
context;
|
|
constructor({ page }) {
|
|
this.page = page;
|
|
this.context = page.context();
|
|
this.browser = this.context.browser();
|
|
}
|
|
/** @borrows dragFiles as this.dragFiles */
|
|
dragFiles = drag_files_1.dragFiles.bind(this);
|
|
/** @borrows isCurrentURL as this.isCurrentURL */
|
|
isCurrentURL = is_current_url_1.isCurrentURL.bind(this);
|
|
/** @borrows pressKeys as this.pressKeys */
|
|
pressKeys = press_keys_1.pressKeys.bind(this);
|
|
/** @borrows setBrowserViewport as this.setBrowserViewport */
|
|
setBrowserViewport = set_browser_viewport_1.setBrowserViewport.bind(this);
|
|
/** @borrows setClipboardData as this.setClipboardData */
|
|
setClipboardData = press_keys_1.setClipboardData.bind(this);
|
|
}
|
|
exports.PageUtils = PageUtils;
|
|
//# sourceMappingURL=index.js.map
|