@mui/x-license-pro
Version:
MUI X License verification
36 lines (28 loc) • 973 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LicenseInfo = void 0;
var _utils = require("@mui/utils");
// Store the license information in a global, so it can be shared
// when module duplication occurs. The duplication of the modules can happen
// if using multiple version of MUI X at the same time of the bundler
// decide to duplicate to improve the size of the chunks.
// eslint-disable-next-line no-underscore-dangle
_utils.ponyfillGlobal.__MUI_LICENSE_INFO__ = _utils.ponyfillGlobal.__MUI_LICENSE_INFO__ || {
key: undefined
};
class LicenseInfo {
static getLicenseInfo() {
// eslint-disable-next-line no-underscore-dangle
return _utils.ponyfillGlobal.__MUI_LICENSE_INFO__;
}
static getLicenseKey() {
return LicenseInfo.getLicenseInfo().key;
}
static setLicenseKey(key) {
const licenseInfo = LicenseInfo.getLicenseInfo();
licenseInfo.key = key;
}
}
exports.LicenseInfo = LicenseInfo;