@mui/x-license 9.0.0 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +438 -6891
- package/Watermark/Watermark.js +9 -2
- package/Watermark/Watermark.mjs +10 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -4
- package/useLicenseVerifier/useLicenseVerifier.js +1 -1
- package/useLicenseVerifier/useLicenseVerifier.mjs +1 -1
- package/utils/licenseErrorMessageUtils.d.mts +5 -1
- package/utils/licenseErrorMessageUtils.d.ts +5 -1
- package/utils/licenseErrorMessageUtils.js +5 -2
- package/utils/licenseErrorMessageUtils.mjs +5 -2
- package/verifyLicense/verifyLicense.js +8 -2
- package/verifyLicense/verifyLicense.mjs +8 -2
package/Watermark/Watermark.js
CHANGED
|
@@ -39,7 +39,7 @@ function Watermark(props) {
|
|
|
39
39
|
if (licenseStatus.status === _licenseStatus.LICENSE_STATUS.Valid) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
43
43
|
style: {
|
|
44
44
|
position: 'absolute',
|
|
45
45
|
pointerEvents: 'none',
|
|
@@ -52,7 +52,14 @@ function Watermark(props) {
|
|
|
52
52
|
letterSpacing: 5,
|
|
53
53
|
fontSize: 24
|
|
54
54
|
},
|
|
55
|
-
children: getLicenseErrorMessage(licenseStatus.status)
|
|
55
|
+
children: [getLicenseErrorMessage(licenseStatus.status), process.env.NODE_ENV !== 'production' && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
|
+
style: {
|
|
57
|
+
fontSize: 12,
|
|
58
|
+
letterSpacing: 1,
|
|
59
|
+
marginTop: 8
|
|
60
|
+
},
|
|
61
|
+
children: "Open the browser console for details on how to resolve this."
|
|
62
|
+
})]
|
|
56
63
|
});
|
|
57
64
|
}
|
|
58
65
|
const MemoizedWatermark = exports.Watermark = (0, _fastMemo.fastMemo)(Watermark);
|
package/Watermark/Watermark.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
|
2
2
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
3
3
|
import { useLicenseVerifier } from "../useLicenseVerifier/index.mjs";
|
|
4
4
|
import { LICENSE_STATUS } from "../utils/licenseStatus.mjs";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
function getLicenseErrorMessage(licenseStatus) {
|
|
7
7
|
switch (licenseStatus) {
|
|
8
8
|
case LICENSE_STATUS.ExpiredAnnualGrace:
|
|
@@ -32,7 +32,7 @@ function Watermark(props) {
|
|
|
32
32
|
if (licenseStatus.status === LICENSE_STATUS.Valid) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
36
36
|
style: {
|
|
37
37
|
position: 'absolute',
|
|
38
38
|
pointerEvents: 'none',
|
|
@@ -45,7 +45,14 @@ function Watermark(props) {
|
|
|
45
45
|
letterSpacing: 5,
|
|
46
46
|
fontSize: 24
|
|
47
47
|
},
|
|
48
|
-
children: getLicenseErrorMessage(licenseStatus.status)
|
|
48
|
+
children: [getLicenseErrorMessage(licenseStatus.status), process.env.NODE_ENV !== 'production' && /*#__PURE__*/_jsx("div", {
|
|
49
|
+
style: {
|
|
50
|
+
fontSize: 12,
|
|
51
|
+
letterSpacing: 1,
|
|
52
|
+
marginTop: 8
|
|
53
|
+
},
|
|
54
|
+
children: "Open the browser console for details on how to resolve this."
|
|
55
|
+
})]
|
|
49
56
|
});
|
|
50
57
|
}
|
|
51
58
|
const MemoizedWatermark = fastMemo(Watermark);
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-license",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "MUI X License verification.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"directory": "packages/x-license"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/runtime": "^7.
|
|
24
|
+
"@babel/runtime": "^7.29.2",
|
|
25
25
|
"@mui/utils": "9.0.0",
|
|
26
|
-
"@mui/x-
|
|
27
|
-
"@mui/x-
|
|
26
|
+
"@mui/x-internals": "^9.0.4",
|
|
27
|
+
"@mui/x-telemetry": "^9.0.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
@@ -88,7 +88,7 @@ function useLicenseVerifier(packageInfo) {
|
|
|
88
88
|
packageName: fullPackageName
|
|
89
89
|
});
|
|
90
90
|
} else if (licenseStatus.status === _licenseStatus.LICENSE_STATUS.NotValidForPackage) {
|
|
91
|
-
(0, _licenseErrorMessageUtils.showLicenseKeyVersionMismatchError)();
|
|
91
|
+
(0, _licenseErrorMessageUtils.showLicenseKeyVersionMismatchError)(licenseStatus.meta);
|
|
92
92
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
93
93
|
throw new Error('missing status handler');
|
|
94
94
|
}
|
|
@@ -79,7 +79,7 @@ export function useLicenseVerifier(packageInfo) {
|
|
|
79
79
|
packageName: fullPackageName
|
|
80
80
|
});
|
|
81
81
|
} else if (licenseStatus.status === LICENSE_STATUS.NotValidForPackage) {
|
|
82
|
-
showLicenseKeyVersionMismatchError();
|
|
82
|
+
showLicenseKeyVersionMismatchError(licenseStatus.meta);
|
|
83
83
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
84
84
|
throw new Error('missing status handler');
|
|
85
85
|
}
|
|
@@ -5,7 +5,11 @@ export declare function showLicenseKeyPlanMismatchError({
|
|
|
5
5
|
packageName: string;
|
|
6
6
|
}): void;
|
|
7
7
|
export declare function showNotAvailableInInitialProPlanError(): void;
|
|
8
|
-
export declare function showLicenseKeyVersionMismatchError(
|
|
8
|
+
export declare function showLicenseKeyVersionMismatchError({
|
|
9
|
+
packageMajorVersion
|
|
10
|
+
}: {
|
|
11
|
+
packageMajorVersion: number;
|
|
12
|
+
}): void;
|
|
9
13
|
export declare function showMissingLicenseKeyError({
|
|
10
14
|
plan,
|
|
11
15
|
packageName
|
|
@@ -5,7 +5,11 @@ export declare function showLicenseKeyPlanMismatchError({
|
|
|
5
5
|
packageName: string;
|
|
6
6
|
}): void;
|
|
7
7
|
export declare function showNotAvailableInInitialProPlanError(): void;
|
|
8
|
-
export declare function showLicenseKeyVersionMismatchError(
|
|
8
|
+
export declare function showLicenseKeyVersionMismatchError({
|
|
9
|
+
packageMajorVersion
|
|
10
|
+
}: {
|
|
11
|
+
packageMajorVersion: number;
|
|
12
|
+
}): void;
|
|
9
13
|
export declare function showMissingLicenseKeyError({
|
|
10
14
|
plan,
|
|
11
15
|
packageName
|
|
@@ -40,8 +40,11 @@ function showLicenseKeyPlanMismatchError({
|
|
|
40
40
|
function showNotAvailableInInitialProPlanError() {
|
|
41
41
|
showError(['MUI X: Component not included in your license.', '', 'The component you are trying to use is not included in the Pro Plan you purchased.', '', 'Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.', '', 'To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key.']);
|
|
42
42
|
}
|
|
43
|
-
function showLicenseKeyVersionMismatchError(
|
|
44
|
-
|
|
43
|
+
function showLicenseKeyVersionMismatchError({
|
|
44
|
+
packageMajorVersion
|
|
45
|
+
}) {
|
|
46
|
+
const previousMajorVersion = packageMajorVersion - 1;
|
|
47
|
+
showError(['MUI X: License key version mismatch.', '', `The license key you are using was issued for an older major version of MUI X (e.g. a v${previousMajorVersion} license with v${packageMajorVersion} packages installed).`, 'Each major version uses a different license key format, so the key needs to be regenerated — your existing license is not lost.', '', 'To resolve this, you can either:', `- Generate a new key compatible with v${packageMajorVersion} from your account at https://mui.com/r/x-license-account/ (free for existing customers, the new key inherits your current expiration date).`, `- Or downgrade the MUI X packages to v${previousMajorVersion} to match your current license key.`, `${packageMajorVersion === 9 ? 'More details at https://mui.com/r/x-license-key-v9-upgrade/.' : ''}`]);
|
|
45
48
|
}
|
|
46
49
|
function showMissingLicenseKeyError({
|
|
47
50
|
plan,
|
|
@@ -26,8 +26,11 @@ export function showLicenseKeyPlanMismatchError({
|
|
|
26
26
|
export function showNotAvailableInInitialProPlanError() {
|
|
27
27
|
showError(['MUI X: Component not included in your license.', '', 'The component you are trying to use is not included in the Pro Plan you purchased.', '', 'Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.', '', 'To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key.']);
|
|
28
28
|
}
|
|
29
|
-
export function showLicenseKeyVersionMismatchError(
|
|
30
|
-
|
|
29
|
+
export function showLicenseKeyVersionMismatchError({
|
|
30
|
+
packageMajorVersion
|
|
31
|
+
}) {
|
|
32
|
+
const previousMajorVersion = packageMajorVersion - 1;
|
|
33
|
+
showError(['MUI X: License key version mismatch.', '', `The license key you are using was issued for an older major version of MUI X (e.g. a v${previousMajorVersion} license with v${packageMajorVersion} packages installed).`, 'Each major version uses a different license key format, so the key needs to be regenerated — your existing license is not lost.', '', 'To resolve this, you can either:', `- Generate a new key compatible with v${packageMajorVersion} from your account at https://mui.com/r/x-license-account/ (free for existing customers, the new key inherits your current expiration date).`, `- Or downgrade the MUI X packages to v${previousMajorVersion} to match your current license key.`, `${packageMajorVersion === 9 ? 'More details at https://mui.com/r/x-license-key-v9-upgrade/.' : ''}`]);
|
|
31
34
|
}
|
|
32
35
|
export function showMissingLicenseKeyError({
|
|
33
36
|
plan,
|
|
@@ -225,7 +225,10 @@ function verifyLicense({
|
|
|
225
225
|
// are not valid for v9 packages.
|
|
226
226
|
if (packageMajorVersion != null && packageMajorVersion >= 9 && license.licenseModel === 'perpetual' && (0, _licensePlan.isPlanVersionOlderOrEqual)(license.planVersion, MAX_V8_PLAN_VERSION)) {
|
|
227
227
|
return {
|
|
228
|
-
status: _licenseStatus.LICENSE_STATUS.NotValidForPackage
|
|
228
|
+
status: _licenseStatus.LICENSE_STATUS.NotValidForPackage,
|
|
229
|
+
meta: {
|
|
230
|
+
packageMajorVersion
|
|
231
|
+
}
|
|
229
232
|
};
|
|
230
233
|
}
|
|
231
234
|
return {
|
|
@@ -277,7 +280,10 @@ function verifyLicense({
|
|
|
277
280
|
// Perpetual licenses are exempt as they are already gated by the expiry date check.
|
|
278
281
|
if (packageMajorVersion != null && packageMajorVersion >= 9 && license.licenseModel !== 'perpetual' && (0, _licensePlan.isPlanVersionOlderOrEqual)(license.planVersion, MAX_V8_PLAN_VERSION)) {
|
|
279
282
|
return {
|
|
280
|
-
status: _licenseStatus.LICENSE_STATUS.NotValidForPackage
|
|
283
|
+
status: _licenseStatus.LICENSE_STATUS.NotValidForPackage,
|
|
284
|
+
meta: {
|
|
285
|
+
packageMajorVersion
|
|
286
|
+
}
|
|
281
287
|
};
|
|
282
288
|
}
|
|
283
289
|
return {
|
|
@@ -214,7 +214,10 @@ export function verifyLicense({
|
|
|
214
214
|
// are not valid for v9 packages.
|
|
215
215
|
if (packageMajorVersion != null && packageMajorVersion >= 9 && license.licenseModel === 'perpetual' && isPlanVersionOlderOrEqual(license.planVersion, MAX_V8_PLAN_VERSION)) {
|
|
216
216
|
return {
|
|
217
|
-
status: LICENSE_STATUS.NotValidForPackage
|
|
217
|
+
status: LICENSE_STATUS.NotValidForPackage,
|
|
218
|
+
meta: {
|
|
219
|
+
packageMajorVersion
|
|
220
|
+
}
|
|
218
221
|
};
|
|
219
222
|
}
|
|
220
223
|
return {
|
|
@@ -266,7 +269,10 @@ export function verifyLicense({
|
|
|
266
269
|
// Perpetual licenses are exempt as they are already gated by the expiry date check.
|
|
267
270
|
if (packageMajorVersion != null && packageMajorVersion >= 9 && license.licenseModel !== 'perpetual' && isPlanVersionOlderOrEqual(license.planVersion, MAX_V8_PLAN_VERSION)) {
|
|
268
271
|
return {
|
|
269
|
-
status: LICENSE_STATUS.NotValidForPackage
|
|
272
|
+
status: LICENSE_STATUS.NotValidForPackage,
|
|
273
|
+
meta: {
|
|
274
|
+
packageMajorVersion
|
|
275
|
+
}
|
|
270
276
|
};
|
|
271
277
|
}
|
|
272
278
|
return {
|