From 6a41e53c471233139a2b084a6d4f2a702bb57bc7 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 20 Jun 2024 15:35:21 +0200 Subject: [PATCH 01/11] added docs section about the new uncovered product error mark --- docs/data/introduction/licensing/licensing.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 842c3d0cc03c2..a32792f6d7ed8 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -290,7 +290,18 @@ This happens if you try to use `DataGridPremium` with a license key for the Pro To solve the issue, you can [upgrade your plan](https://mui.com/r/x-get-license/?scope=premium) from Pro to Premium. Or if you didn\'t intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`. -### 5. Invalid license key +### 5. Product not covered by the license key + +This error indicates that the product you are trying to use is not covered by the license key. +This happens if you try to use `ChartsPro` or `TreeViewPro` with a license that does not cover these products. + +To solve the issue, you can [purchase a license](https://mui.com/r/x-get-license/) that covers the product you are trying to use. +Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. + +You might be eligible for a discount if you already have a license for another product and want to upgrade to a plan that covers the product you are trying to use. +Please contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount%20to%20Premium) for additional information. + +### 6. Invalid license key This error indicates that your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo. @@ -298,7 +309,7 @@ It could be because the license key is missing a character or has a typo. To solve the issue, you need to double-check that `setLicenseKey()` is called with the right argument. Please check the [license key installation](/x/introduction/licensing/#license-key). -### 6. Invalid license key (TypeError: extracting license expiry timestamp) +### 7. Invalid license key (TypeError: extracting license expiry timestamp) The following JavaScript exception indicates that you may be trying to validate the new license's key format on an older version of the npm package. From 11007c4e55b52c42f76554489b18af93718e20c4 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 20 Jun 2024 15:49:50 +0200 Subject: [PATCH 02/11] updated link to email --- docs/data/introduction/licensing/licensing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index a32792f6d7ed8..9acee59878a92 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -299,7 +299,7 @@ To solve the issue, you can [purchase a license](https://mui.com/r/x-get-license Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. You might be eligible for a discount if you already have a license for another product and want to upgrade to a plan that covers the product you are trying to use. -Please contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount%20to%20Premium) for additional information. +Please contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. ### 6. Invalid license key From f4b4175c4e3d84e4bf5fd718f22c3d7dfa4009ed Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 20 Jun 2024 16:25:27 +0200 Subject: [PATCH 03/11] adjusted the licesning error --- packages/x-license/src/utils/licenseErrorMessageUtils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/x-license/src/utils/licenseErrorMessageUtils.ts b/packages/x-license/src/utils/licenseErrorMessageUtils.ts index 1c29bfb5f9e41..d99560fd7cbff 100644 --- a/packages/x-license/src/utils/licenseErrorMessageUtils.ts +++ b/packages/x-license/src/utils/licenseErrorMessageUtils.ts @@ -36,7 +36,9 @@ export function showProductNotCoveredError() { showError([ 'MUI X: Product not covered by plan.', '', - 'The component you are trying to use is not included in the Pro Plan your purchased. You are using a license that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.', + 'The component you are trying to use is not included in the Pro Plan your 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.', ]); From ae532c27a174fe1c3731746b0edb854157cea194 Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:52:54 +0200 Subject: [PATCH 04/11] Update licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 9acee59878a92..d1e50897acbe0 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -292,7 +292,7 @@ Or if you didn\'t intend to use Premium features, you can replace the import of ### 5. Product not covered by the license key -This error indicates that the product you are trying to use is not covered by the license key. +This error indicates that the component you are trying to use is not covered by your current license. This happens if you try to use `ChartsPro` or `TreeViewPro` with a license that does not cover these products. To solve the issue, you can [purchase a license](https://mui.com/r/x-get-license/) that covers the product you are trying to use. From af6a0efb915dfa054ba3391a804699ecbdd23225 Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:53:04 +0200 Subject: [PATCH 05/11] Update licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index d1e50897acbe0..902ca6ae394f9 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -290,7 +290,7 @@ This happens if you try to use `DataGridPremium` with a license key for the Pro To solve the issue, you can [upgrade your plan](https://mui.com/r/x-get-license/?scope=premium) from Pro to Premium. Or if you didn\'t intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`. -### 5. Product not covered by the license key +### 5. Component not included in your license This error indicates that the component you are trying to use is not covered by your current license. This happens if you try to use `ChartsPro` or `TreeViewPro` with a license that does not cover these products. From f1fe7af014d2af122c606ba45d4d4dbfd1d84467 Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:53:43 +0200 Subject: [PATCH 06/11] Update licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 902ca6ae394f9..90e03a239423c 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -295,7 +295,10 @@ Or if you didn\'t intend to use Premium features, you can replace the import of This error indicates that the component you are trying to use is not covered by your current license. This happens if you try to use `ChartsPro` or `TreeViewPro` with a license that does not cover these products. -To solve the issue, you can [purchase a license](https://mui.com/r/x-get-license/) that covers the product you are trying to use. +To solve the issue, please consider an earlier [renewal](https://mui.com/r/x-get-license/). + +You might be eligible for a discount if you have an active Pro license. +Contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. You might be eligible for a discount if you already have a license for another product and want to upgrade to a plan that covers the product you are trying to use. From 0d665e0b6aab03eb2d5ba4be8a535dc3def6054a Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:53:52 +0200 Subject: [PATCH 07/11] Update licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 90e03a239423c..816eb581f4121 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -301,7 +301,6 @@ You might be eligible for a discount if you have an active Pro license. Contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. -You might be eligible for a discount if you already have a license for another product and want to upgrade to a plan that covers the product you are trying to use. Please contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. ### 6. Invalid license key From eb3d536547389330a2f6a04f1fd9ab8a730fc9a1 Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:53:59 +0200 Subject: [PATCH 08/11] Update licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 816eb581f4121..8db9ea5f5b877 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -301,7 +301,6 @@ You might be eligible for a discount if you have an active Pro license. Contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. -Please contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. ### 6. Invalid license key From 381db7bcb1f5989b2fbcd7188147955fb45fd6a8 Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 21 Jun 2024 10:10:16 +0200 Subject: [PATCH 09/11] adjusted error message and license status wording --- docs/data/introduction/licensing/licensing.md | 1 - packages/x-license/src/Watermark/Watermark.tsx | 2 +- .../src/useLicenseVerifier/useLicenseVerifier.test.tsx | 4 ++-- .../x-license/src/useLicenseVerifier/useLicenseVerifier.ts | 6 +++--- packages/x-license/src/utils/licenseErrorMessageUtils.ts | 4 ++-- packages/x-license/src/utils/licenseStatus.ts | 2 +- packages/x-license/src/verifyLicense/verifyLicense.test.ts | 4 ++-- packages/x-license/src/verifyLicense/verifyLicense.ts | 2 +- scripts/x-license.exports.json | 2 +- 9 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 8db9ea5f5b877..3099d7a1944cb 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -301,7 +301,6 @@ You might be eligible for a discount if you have an active Pro license. Contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. - ### 6. Invalid license key This error indicates that your MUI X license key format isn't valid. diff --git a/packages/x-license/src/Watermark/Watermark.tsx b/packages/x-license/src/Watermark/Watermark.tsx index da41daf373fd7..fd0de438e75b3 100644 --- a/packages/x-license/src/Watermark/Watermark.tsx +++ b/packages/x-license/src/Watermark/Watermark.tsx @@ -13,7 +13,7 @@ function getLicenseErrorMessage(licenseStatus: LicenseStatus) { return 'MUI X Invalid license key'; case LICENSE_STATUS.OutOfScope: return 'MUI X License key plan mismatch'; - case LICENSE_STATUS.ProductNotCovered: + case LICENSE_STATUS.ComponentNotIncluded: return 'MUI X Product not covered by plan'; case LICENSE_STATUS.NotFound: return 'MUI X Missing license key'; diff --git a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx index bbb04d1804a75..25a4aaa6f27c1 100644 --- a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx +++ b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.test.tsx @@ -126,11 +126,11 @@ describe('useLicenseVerifier', function test() { expect(() => { render(); - }).to.toErrorDev(['MUI X: Product not covered by plan.']); + }).to.toErrorDev(['MUI X: Component not included in your license.']); expect(() => { render(); - }).to.toErrorDev(['MUI X: Product not covered by plan.']); + }).to.toErrorDev(['MUI X: Component not included in your license.']); }); it('should not throw if the license is covering charts and tree-view', () => { diff --git a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts index a79cc012b3898..4ed29e87521d6 100644 --- a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts +++ b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts @@ -8,7 +8,7 @@ import { showMissingLicenseKeyError, showLicenseKeyPlanMismatchError, showExpiredPackageVersionError, - showProductNotCoveredError, + showComponentNotIncludedError, } from '../utils/licenseErrorMessageUtils'; import { LICENSE_STATUS, LicenseStatus } from '../utils/licenseStatus'; import { extractAcceptedScopes, extractProductScope } from '../utils/licenseScope'; @@ -65,8 +65,8 @@ export function useLicenseVerifier( // Skip } else if (licenseStatus.status === LICENSE_STATUS.Invalid) { showInvalidLicenseKeyError(); - } else if (licenseStatus.status === LICENSE_STATUS.ProductNotCovered) { - showProductNotCoveredError(); + } else if (licenseStatus.status === LICENSE_STATUS.ComponentNotIncluded) { + showComponentNotIncludedError(); } else if (licenseStatus.status === LICENSE_STATUS.OutOfScope) { showLicenseKeyPlanMismatchError(); } else if (licenseStatus.status === LICENSE_STATUS.NotFound) { diff --git a/packages/x-license/src/utils/licenseErrorMessageUtils.ts b/packages/x-license/src/utils/licenseErrorMessageUtils.ts index d99560fd7cbff..37f6c067c262a 100644 --- a/packages/x-license/src/utils/licenseErrorMessageUtils.ts +++ b/packages/x-license/src/utils/licenseErrorMessageUtils.ts @@ -32,9 +32,9 @@ export function showLicenseKeyPlanMismatchError() { ]); } -export function showProductNotCoveredError() { +export function showComponentNotIncludedError() { showError([ - 'MUI X: Product not covered by plan.', + 'MUI X: Component not included in your license.', '', 'The component you are trying to use is not included in the Pro Plan your purchased.', '', diff --git a/packages/x-license/src/utils/licenseStatus.ts b/packages/x-license/src/utils/licenseStatus.ts index ac6828c109e24..987777dcea432 100644 --- a/packages/x-license/src/utils/licenseStatus.ts +++ b/packages/x-license/src/utils/licenseStatus.ts @@ -7,7 +7,7 @@ export enum LICENSE_STATUS { ExpiredVersion = 'ExpiredVersion', Valid = 'Valid', OutOfScope = 'OutOfScope', - ProductNotCovered = 'ProductNotCovered', + ComponentNotIncluded = 'ComponentNotIncluded', } export type LicenseStatus = keyof typeof LICENSE_STATUS; diff --git a/packages/x-license/src/verifyLicense/verifyLicense.test.ts b/packages/x-license/src/verifyLicense/verifyLicense.test.ts index 1b2c2fe24eb3d..d9d2dcdc1b37d 100644 --- a/packages/x-license/src/verifyLicense/verifyLicense.test.ts +++ b/packages/x-license/src/verifyLicense/verifyLicense.test.ts @@ -292,7 +292,7 @@ describe('License: verifyLicense', () => { acceptedScopes: ['pro', 'premium'], productScope: 'charts', }).status, - ).to.equal(LICENSE_STATUS.ProductNotCovered); + ).to.equal(LICENSE_STATUS.ComponentNotIncluded); }); it('PlanVersion "initial" should not accept tree-view', () => { @@ -304,7 +304,7 @@ describe('License: verifyLicense', () => { acceptedScopes: ['pro', 'premium'], productScope: 'tree-view', }).status, - ).to.equal(LICENSE_STATUS.ProductNotCovered); + ).to.equal(LICENSE_STATUS.ComponentNotIncluded); }); it('PlanVersion "Q3-2024" should accept charts', () => { diff --git a/packages/x-license/src/verifyLicense/verifyLicense.ts b/packages/x-license/src/verifyLicense/verifyLicense.ts index 7d696490599dc..445d549fc517b 100644 --- a/packages/x-license/src/verifyLicense/verifyLicense.ts +++ b/packages/x-license/src/verifyLicense/verifyLicense.ts @@ -181,7 +181,7 @@ export function verifyLicense({ if (license.planVersion === 'initial') { // 'charts-pro' or 'tree-view-pro' can only be used with a newer license if (productScope === 'charts' || productScope === 'tree-view') { - return { status: LICENSE_STATUS.ProductNotCovered }; + return { status: LICENSE_STATUS.ComponentNotIncluded }; } } diff --git a/scripts/x-license.exports.json b/scripts/x-license.exports.json index ba6c1bb8c50fe..bc754bcb32c0d 100644 --- a/scripts/x-license.exports.json +++ b/scripts/x-license.exports.json @@ -9,13 +9,13 @@ { "name": "LicensingModel", "kind": "TypeAlias" }, { "name": "MuiCommercialPackageName", "kind": "TypeAlias" }, { "name": "MuiLicenseInfo", "kind": "Interface" }, + { "name": "showComponentNotIncludedError", "kind": "Function" }, { "name": "showExpiredAnnualGraceLicenseKeyError", "kind": "Function" }, { "name": "showExpiredAnnualLicenseKeyError", "kind": "Function" }, { "name": "showExpiredPackageVersionError", "kind": "Function" }, { "name": "showInvalidLicenseKeyError", "kind": "Function" }, { "name": "showLicenseKeyPlanMismatchError", "kind": "Function" }, { "name": "showMissingLicenseKeyError", "kind": "Function" }, - { "name": "showProductNotCoveredError", "kind": "Function" }, { "name": "Unstable_LicenseInfoProvider", "kind": "Function" }, { "name": "Unstable_LicenseInfoProviderProps", "kind": "Interface" }, { "name": "useLicenseVerifier", "kind": "Function" }, From fafb0c742944509d3d9049ba00ab0fcfb0fcaa2e Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:15:08 +0200 Subject: [PATCH 10/11] Update docs/data/introduction/licensing/licensing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Rodolfo Freitas Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> --- docs/data/introduction/licensing/licensing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/data/introduction/licensing/licensing.md b/docs/data/introduction/licensing/licensing.md index 3099d7a1944cb..d5740d8df4974 100644 --- a/docs/data/introduction/licensing/licensing.md +++ b/docs/data/introduction/licensing/licensing.md @@ -299,6 +299,7 @@ To solve the issue, please consider an earlier [renewal](https://mui.com/r/x-get You might be eligible for a discount if you have an active Pro license. Contact [sales@mui.com](mailto:sales@mui.com?subject=My%20upgrade%20discount) for additional information. + Or if you didn't intend to use the Pro features, you can replace the import of `@mui/x-charts-pro` or `@mui/x-tree-view-pro` with `@mui/x-charts` or `@mui/x-tree-view` respectively. ### 6. Invalid license key From fba2ffc06debd43723edece4e38c742daf08ba9a Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 21 Jun 2024 14:33:25 +0200 Subject: [PATCH 11/11] changed naming to be more specific --- packages/x-license/src/Watermark/Watermark.tsx | 2 +- .../x-license/src/useLicenseVerifier/useLicenseVerifier.ts | 6 +++--- packages/x-license/src/utils/licenseErrorMessageUtils.ts | 6 +++--- packages/x-license/src/utils/licenseStatus.ts | 2 +- packages/x-license/src/verifyLicense/verifyLicense.test.ts | 4 ++-- packages/x-license/src/verifyLicense/verifyLicense.ts | 2 +- scripts/x-license.exports.json | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/x-license/src/Watermark/Watermark.tsx b/packages/x-license/src/Watermark/Watermark.tsx index fd0de438e75b3..b970d5a12fc49 100644 --- a/packages/x-license/src/Watermark/Watermark.tsx +++ b/packages/x-license/src/Watermark/Watermark.tsx @@ -13,7 +13,7 @@ function getLicenseErrorMessage(licenseStatus: LicenseStatus) { return 'MUI X Invalid license key'; case LICENSE_STATUS.OutOfScope: return 'MUI X License key plan mismatch'; - case LICENSE_STATUS.ComponentNotIncluded: + case LICENSE_STATUS.NotAvailableInInitialProPlan: return 'MUI X Product not covered by plan'; case LICENSE_STATUS.NotFound: return 'MUI X Missing license key'; diff --git a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts index 4ed29e87521d6..d85e4477ef618 100644 --- a/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts +++ b/packages/x-license/src/useLicenseVerifier/useLicenseVerifier.ts @@ -8,7 +8,7 @@ import { showMissingLicenseKeyError, showLicenseKeyPlanMismatchError, showExpiredPackageVersionError, - showComponentNotIncludedError, + showNotAvailableInInitialProPlanError, } from '../utils/licenseErrorMessageUtils'; import { LICENSE_STATUS, LicenseStatus } from '../utils/licenseStatus'; import { extractAcceptedScopes, extractProductScope } from '../utils/licenseScope'; @@ -65,8 +65,8 @@ export function useLicenseVerifier( // Skip } else if (licenseStatus.status === LICENSE_STATUS.Invalid) { showInvalidLicenseKeyError(); - } else if (licenseStatus.status === LICENSE_STATUS.ComponentNotIncluded) { - showComponentNotIncludedError(); + } else if (licenseStatus.status === LICENSE_STATUS.NotAvailableInInitialProPlan) { + showNotAvailableInInitialProPlanError(); } else if (licenseStatus.status === LICENSE_STATUS.OutOfScope) { showLicenseKeyPlanMismatchError(); } else if (licenseStatus.status === LICENSE_STATUS.NotFound) { diff --git a/packages/x-license/src/utils/licenseErrorMessageUtils.ts b/packages/x-license/src/utils/licenseErrorMessageUtils.ts index 37f6c067c262a..fb13e231cb1f5 100644 --- a/packages/x-license/src/utils/licenseErrorMessageUtils.ts +++ b/packages/x-license/src/utils/licenseErrorMessageUtils.ts @@ -32,13 +32,13 @@ export function showLicenseKeyPlanMismatchError() { ]); } -export function showComponentNotIncludedError() { +export function showNotAvailableInInitialProPlanError() { showError([ 'MUI X: Component not included in your license.', '', - 'The component you are trying to use is not included in the Pro Plan your purchased.', + '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.', + '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.', ]); diff --git a/packages/x-license/src/utils/licenseStatus.ts b/packages/x-license/src/utils/licenseStatus.ts index 987777dcea432..3fa5ae19856a9 100644 --- a/packages/x-license/src/utils/licenseStatus.ts +++ b/packages/x-license/src/utils/licenseStatus.ts @@ -7,7 +7,7 @@ export enum LICENSE_STATUS { ExpiredVersion = 'ExpiredVersion', Valid = 'Valid', OutOfScope = 'OutOfScope', - ComponentNotIncluded = 'ComponentNotIncluded', + NotAvailableInInitialProPlan = 'NotAvailableInInitialProPlan', } export type LicenseStatus = keyof typeof LICENSE_STATUS; diff --git a/packages/x-license/src/verifyLicense/verifyLicense.test.ts b/packages/x-license/src/verifyLicense/verifyLicense.test.ts index d9d2dcdc1b37d..3e040c782a170 100644 --- a/packages/x-license/src/verifyLicense/verifyLicense.test.ts +++ b/packages/x-license/src/verifyLicense/verifyLicense.test.ts @@ -292,7 +292,7 @@ describe('License: verifyLicense', () => { acceptedScopes: ['pro', 'premium'], productScope: 'charts', }).status, - ).to.equal(LICENSE_STATUS.ComponentNotIncluded); + ).to.equal(LICENSE_STATUS.NotAvailableInInitialProPlan); }); it('PlanVersion "initial" should not accept tree-view', () => { @@ -304,7 +304,7 @@ describe('License: verifyLicense', () => { acceptedScopes: ['pro', 'premium'], productScope: 'tree-view', }).status, - ).to.equal(LICENSE_STATUS.ComponentNotIncluded); + ).to.equal(LICENSE_STATUS.NotAvailableInInitialProPlan); }); it('PlanVersion "Q3-2024" should accept charts', () => { diff --git a/packages/x-license/src/verifyLicense/verifyLicense.ts b/packages/x-license/src/verifyLicense/verifyLicense.ts index 445d549fc517b..ed9b936357cba 100644 --- a/packages/x-license/src/verifyLicense/verifyLicense.ts +++ b/packages/x-license/src/verifyLicense/verifyLicense.ts @@ -181,7 +181,7 @@ export function verifyLicense({ if (license.planVersion === 'initial') { // 'charts-pro' or 'tree-view-pro' can only be used with a newer license if (productScope === 'charts' || productScope === 'tree-view') { - return { status: LICENSE_STATUS.ComponentNotIncluded }; + return { status: LICENSE_STATUS.NotAvailableInInitialProPlan }; } } diff --git a/scripts/x-license.exports.json b/scripts/x-license.exports.json index bc754bcb32c0d..257e49906393c 100644 --- a/scripts/x-license.exports.json +++ b/scripts/x-license.exports.json @@ -9,13 +9,13 @@ { "name": "LicensingModel", "kind": "TypeAlias" }, { "name": "MuiCommercialPackageName", "kind": "TypeAlias" }, { "name": "MuiLicenseInfo", "kind": "Interface" }, - { "name": "showComponentNotIncludedError", "kind": "Function" }, { "name": "showExpiredAnnualGraceLicenseKeyError", "kind": "Function" }, { "name": "showExpiredAnnualLicenseKeyError", "kind": "Function" }, { "name": "showExpiredPackageVersionError", "kind": "Function" }, { "name": "showInvalidLicenseKeyError", "kind": "Function" }, { "name": "showLicenseKeyPlanMismatchError", "kind": "Function" }, { "name": "showMissingLicenseKeyError", "kind": "Function" }, + { "name": "showNotAvailableInInitialProPlanError", "kind": "Function" }, { "name": "Unstable_LicenseInfoProvider", "kind": "Function" }, { "name": "Unstable_LicenseInfoProviderProps", "kind": "Interface" }, { "name": "useLicenseVerifier", "kind": "Function" },