Skip to content

Commit

Permalink
fix: remove imports from trial panel (DevExpress#27286)
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev authored Apr 29, 2024
1 parent 8eb547e commit 5a33544
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import errors from '@js/core/errors';

import { base } from '../../../ui/overlay/z_index';
import {
parseLicenseKey,
setLicenseCheckSkipCondition,
Expand Down Expand Up @@ -233,6 +234,10 @@ describe('license check', () => {
expect(errors.log).toHaveBeenCalledTimes(1);
});

test('Base z-index should match the corresponding setting in DevExtreme', () => {
expect(trialPanel.BASE_Z_INDEX).toEqual(base());
});

test('No messages should be logged if setLicenseCheckSkipCondition() used', () => {
setLicenseCheckSkipCondition();
validateLicense('', '1.0');
Expand Down
16 changes: 13 additions & 3 deletions packages/devextreme/js/__internal/core/license/trial_panel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/* eslint-disable max-classes-per-file */
import { base } from '../../../ui/overlay/z_index';
import type { CustomTrialPanelStyles, StylesMap } from './types';
/* eslint no-restricted-imports: ["error", { "patterns": ["*"] }] */
export const BASE_Z_INDEX = 1500;

export interface StylesMap {
[key: string]: string;
}

export interface CustomTrialPanelStyles {
containerStyles?: StylesMap;
textStyles?: StylesMap;
linkStyles?: StylesMap;
}

const DATA_PERMANENT_ATTRIBUTE = 'data-permanent';
const componentNames = {
Expand All @@ -21,7 +31,7 @@ const containerStyles = {
height: 'auto',
lineHeight: 'auto',
display: 'block',
'z-index': `${base()}`,
'z-index': `${BASE_Z_INDEX}`,
position: 'relative',
top: '0px',
left: '0px',
Expand Down
10 changes: 0 additions & 10 deletions packages/devextreme/js/__internal/core/license/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ export interface LicenseCheckParams {
internal?: true;
error: LicenseVerifyResult | undefined;
}

export interface StylesMap {
[key: string]: string;
}

export interface CustomTrialPanelStyles {
containerStyles?: StylesMap;
textStyles?: StylesMap;
linkStyles?: StylesMap;
}

0 comments on commit 5a33544

Please sign in to comment.