diff --git a/packages/devextreme-angular/src/core/component.ts b/packages/devextreme-angular/src/core/component.ts index db5cc5d9c6a1..60e345e9ca65 100644 --- a/packages/devextreme-angular/src/core/component.ts +++ b/packages/devextreme-angular/src/core/component.ts @@ -38,6 +38,7 @@ import { config({ buyNowLink: 'https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeAngular.aspx', + licensingDocLink: 'https://go.devexpress.com/Licensing_Documentation_DevExtremeAngular.aspx', }); let serverStateKey; diff --git a/packages/devextreme-angular/tests/src/core/component.spec.ts b/packages/devextreme-angular/tests/src/core/component.spec.ts index e7b1afd83f27..a7642cd2f2c0 100644 --- a/packages/devextreme-angular/tests/src/core/component.spec.ts +++ b/packages/devextreme-angular/tests/src/core/component.spec.ts @@ -147,6 +147,10 @@ describe('DevExtreme Angular widget', () => { expect(config().buyNowLink).toBe('https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeAngular.aspx'); }); + it('correctly sets the help link', () => { + expect(config().licensingDocLink).toBe('https://go.devexpress.com/Licensing_Documentation_DevExtremeAngular.aspx'); + }); + it('should be disposed', () => { let testSpy = spyOn(TestContainerComponent.prototype, 'testMethod'); diff --git a/packages/devextreme-react/src/core/__tests__/component.test.tsx b/packages/devextreme-react/src/core/__tests__/component.test.tsx index 345f3c869d48..37bdfeaeb91e 100644 --- a/packages/devextreme-react/src/core/__tests__/component.test.tsx +++ b/packages/devextreme-react/src/core/__tests__/component.test.tsx @@ -125,6 +125,10 @@ describe('rendering', () => { it('correctly sets the buy now link', () => { expect(config().buyNowLink).toBe('https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeReact.aspx'); }); + + it('correctly sets the help link', () => { + expect(config().licensingDocLink).toBe('https://go.devexpress.com/Licensing_Documentation_DevExtremeReact.aspx'); + }); }); describe('nested full components', () => { diff --git a/packages/devextreme-react/src/core/component-base.tsx b/packages/devextreme-react/src/core/component-base.tsx index 57124929375a..743dd160c541 100644 --- a/packages/devextreme-react/src/core/component-base.tsx +++ b/packages/devextreme-react/src/core/component-base.tsx @@ -39,6 +39,7 @@ const DX_REMOVE_EVENT = 'dxremove'; config({ buyNowLink: 'https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeReact.aspx', + licensingDocLink: 'https://go.devexpress.com/Licensing_Documentation_DevExtremeReact.aspx', }); type ComponentBaseProps = ComponentProps & { diff --git a/packages/devextreme-vue/src/core/__tests__/component.test.ts b/packages/devextreme-vue/src/core/__tests__/component.test.ts index 76b7c6f64bc9..cc447019284c 100644 --- a/packages/devextreme-vue/src/core/__tests__/component.test.ts +++ b/packages/devextreme-vue/src/core/__tests__/component.test.ts @@ -183,6 +183,10 @@ describe('component rendering', () => { expect(config().buyNowLink).toBe('https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeVue.aspx'); }); + it('correctly sets the help link', () => { + expect(config().licensingDocLink).toBe('https://go.devexpress.com/Licensing_Documentation_DevExtremeVue.aspx'); + }); + describe('options', () => { it('watch prop changing to undefined', (done) => { const wrapper = mount(TestComponent, { diff --git a/packages/devextreme-vue/src/core/component.ts b/packages/devextreme-vue/src/core/component.ts index ba4ca96fdfbb..de579a29874a 100644 --- a/packages/devextreme-vue/src/core/component.ts +++ b/packages/devextreme-vue/src/core/component.ts @@ -47,6 +47,7 @@ const includeAttrs = ['id', 'class', 'style']; config({ buyNowLink: 'https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeVue.aspx', + licensingDocLink: 'https://go.devexpress.com/Licensing_Documentation_DevExtremeVue.aspx', }); function getAttrs(attrs, dxClasses: string[]) { diff --git a/packages/devextreme/js/__internal/core/license/license_validation.ts b/packages/devextreme/js/__internal/core/license/license_validation.ts index 755d9826c80e..7a164035619e 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.ts @@ -31,6 +31,7 @@ const RTM_MIN_PATCH_VERSION = 3; const KEY_SPLITTER = '.'; const BUY_NOW_LINK = 'https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeJQuery.aspx'; +const LICENSING_DOC_LINK = 'https://go.devexpress.com/Licensing_Documentation_DevExtremeJQuery.aspx'; const GENERAL_ERROR: Token = { kind: TokenKind.corrupted, error: 'general' }; const VERIFICATION_ERROR: Token = { kind: TokenKind.corrupted, error: 'verification' }; @@ -177,7 +178,9 @@ export function validateLicense(licenseKey: string, versionStr: string = fullVer } if (error && !internal) { - showTrialPanel(config().buyNowLink ?? BUY_NOW_LINK, fullVersion); + const buyNowLink = config().buyNowLink ?? BUY_NOW_LINK; + const licensingDocLink = config().licensingDocLink ?? LICENSING_DOC_LINK; + showTrialPanel(buyNowLink, licensingDocLink, fullVersion); } const preview = isPreview(version.patch); diff --git a/packages/devextreme/js/__internal/core/license/trial_panel.client.ts b/packages/devextreme/js/__internal/core/license/trial_panel.client.ts index 5bf9446dc882..8b65b6c615f5 100644 --- a/packages/devextreme/js/__internal/core/license/trial_panel.client.ts +++ b/packages/devextreme/js/__internal/core/license/trial_panel.client.ts @@ -29,6 +29,7 @@ const componentNames = { }; const attributeNames = { buyNow: 'buy-now', + licensingDoc: 'licensing-doc', version: 'version', }; const commonStyles = { @@ -186,7 +187,9 @@ class DxLicense extends SafeHTMLElement { contentContainer.style.cssText = this._contentStyles; contentContainer.append( this._createSpan('For evaluation purposes only. Redistribution prohibited. Please '), - this._createLink('purchase a license', this.getAttribute(attributeNames.buyNow) as string), + this._createLink('register', this.getAttribute(attributeNames.licensingDoc) as string), + this._createSpan(' an existing license or '), + this._createLink('purchase a new license', this.getAttribute(attributeNames.buyNow) as string), this._createSpan(` to continue use of DevExpress product libraries (v${this.getAttribute(attributeNames.version)}).`), ); return contentContainer; @@ -254,6 +257,11 @@ class DxLicenseTrigger extends SafeHTMLElement { this.getAttribute(attributeNames.buyNow) as string, ); + license.setAttribute( + attributeNames.licensingDoc, + this.getAttribute(attributeNames.licensingDoc) as string, + ); + license.setAttribute(DATA_PERMANENT_ATTRIBUTE, 'true'); document.body.prepend(license); @@ -277,6 +285,7 @@ export function registerCustomComponents(customStyles?: CustomTrialPanelStyles): export function renderTrialPanel( buyNowUrl: string, + licensingDocUrl: string, version: string, customStyles?: CustomTrialPanelStyles, ): void { @@ -285,6 +294,7 @@ export function renderTrialPanel( const trialPanelTrigger = document.createElement(componentNames.trigger); trialPanelTrigger.setAttribute(attributeNames.buyNow, buyNowUrl); + trialPanelTrigger.setAttribute(attributeNames.licensingDoc, licensingDocUrl); trialPanelTrigger.setAttribute(attributeNames.version, version); document.body.appendChild(trialPanelTrigger); diff --git a/packages/devextreme/js/__internal/core/license/trial_panel.ts b/packages/devextreme/js/__internal/core/license/trial_panel.ts index de01bfa4de55..87c9767f9730 100644 --- a/packages/devextreme/js/__internal/core/license/trial_panel.ts +++ b/packages/devextreme/js/__internal/core/license/trial_panel.ts @@ -7,11 +7,12 @@ import { export function showTrialPanel( buyNowUrl: string, + licensingDocUrl: string, version: string, customStyles?: CustomTrialPanelStyles, ): void { if (isClient()) { - renderTrialPanel(buyNowUrl, version, customStyles); + renderTrialPanel(buyNowUrl, licensingDocUrl, version, customStyles); } } diff --git a/packages/devextreme/js/common.d.ts b/packages/devextreme/js/common.d.ts index a844b32746f7..cbacea24eb7c 100644 --- a/packages/devextreme/js/common.d.ts +++ b/packages/devextreme/js/common.d.ts @@ -388,6 +388,7 @@ export type GlobalConfig = { */ licenseKey?: string; buyNowLink?: string; + licensingDocLink?: string; }; /** diff --git a/packages/devextreme/testing/tests/Memory Leaks/elementsOnDispose_bundled.tests.js b/packages/devextreme/testing/tests/Memory Leaks/elementsOnDispose_bundled.tests.js index 0cb835efe805..474aeea356a3 100644 --- a/packages/devextreme/testing/tests/Memory Leaks/elementsOnDispose_bundled.tests.js +++ b/packages/devextreme/testing/tests/Memory Leaks/elementsOnDispose_bundled.tests.js @@ -38,7 +38,7 @@ $.each(DevExpress.ui, function(componentName) { if(newDomElements.length === originalDomElements.length) { assert.ok(true, 'After a component is disposed, additional DOM elements must be removed'); } else { - if(newDomElements.length - originalDomElements.length <= 9) { + if(newDomElements.length - originalDomElements.length <= 11) { // viz widgets create extra style node that can not be deleted ignorePatterns = { 'style': /behavior:\surl\(#default#VML\)/gi, @@ -47,8 +47,8 @@ $.each(DevExpress.ui, function(componentName) { 'svg': /13.4 12.7 8.7 8 13.4 3.4 12.6 2.6 8 7.3 3.4 2.6 2.6 3.4 7.3 8 2.6 12.6 3.4 13.4 8 8.7 12.7 13.4 13.4 12.7/, 'polygon': /$/, 'div': /For evaluation purposes only. Redistribution prohibited.|to continue use of DevExpress product libraries|points="13.4 12.7 8.7 8 13.4 3.4 12.6 2.6 8 7.3 3.4 2.6 2.6 3.4 7.3 8 2.6 12.6 3.4 13.4 8 8.7 12.7 13.4 13.4 12.7/, - 'span': /For evaluation purposes only. Redistribution prohibited.|to continue use of DevExpress product libraries/, - 'a': /purchase a license/, + 'span': /For evaluation purposes only. Redistribution prohibited.|an existing license|to continue use of DevExpress product libraries/, + 'a': /purchase a new license|register/, }; } errorMessage = memoryLeaksHelper.compareDomElements(originalDomElements, newDomElements, ignorePatterns); diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 4753a5d8ac7f..5cf12b526877 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -1560,6 +1560,7 @@ declare module DevExpress.common { */ licenseKey?: string; buyNowLink?: string; + licensingDocLink?: string; }; /** * [descr:GroupItem]