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>
69 lines
1.9 KiB
JavaScript
69 lines
1.9 KiB
JavaScript
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
/** @typedef {import("../../declarations/WebpackOptions").HashDigest} Encoding */
|
|
/** @typedef {string | typeof Hash} HashFunction */
|
|
|
|
class Hash {
|
|
/* istanbul ignore next */
|
|
/**
|
|
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
* @abstract
|
|
* @overload
|
|
* @param {string | Buffer} data data
|
|
* @returns {Hash} updated hash
|
|
*/
|
|
/**
|
|
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
* @abstract
|
|
* @overload
|
|
* @param {string} data data
|
|
* @param {Encoding} inputEncoding data encoding
|
|
* @returns {Hash} updated hash
|
|
*/
|
|
/**
|
|
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
* @abstract
|
|
* @param {string | Buffer} data data
|
|
* @param {Encoding=} inputEncoding data encoding
|
|
* @returns {Hash} updated hash
|
|
*/
|
|
update(data, inputEncoding) {
|
|
const AbstractMethodError = require("../AbstractMethodError");
|
|
|
|
throw new AbstractMethodError();
|
|
}
|
|
|
|
/* istanbul ignore next */
|
|
/**
|
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
* @abstract
|
|
* @overload
|
|
* @returns {Buffer} digest
|
|
*/
|
|
/**
|
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
* @abstract
|
|
* @overload
|
|
* @param {Encoding} encoding encoding of the return value
|
|
* @returns {string} digest
|
|
*/
|
|
/**
|
|
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
* @abstract
|
|
* @param {Encoding=} encoding encoding of the return value
|
|
* @returns {string | Buffer} digest
|
|
*/
|
|
digest(encoding) {
|
|
const AbstractMethodError = require("../AbstractMethodError");
|
|
|
|
throw new AbstractMethodError();
|
|
}
|
|
}
|
|
|
|
module.exports = Hash;
|