diff --git a/.github/workflows/qunit_tests.yml b/.github/workflows/qunit_tests.yml index b019e242b351..d913917650b1 100644 --- a/.github/workflows/qunit_tests.yml +++ b/.github/workflows/qunit_tests.yml @@ -111,7 +111,7 @@ jobs: shell: bash env: DEVEXTREME_TEST_CI: "true" - run: pnpm exec nx build:systemjs + run: pnpm exec nx build:dev - name: Zip artifacts working-directory: ./packages/devextreme diff --git a/packages/devextreme/docker-ci.sh b/packages/devextreme/docker-ci.sh index 28f51484ee3c..4944b701684c 100755 --- a/packages/devextreme/docker-ci.sh +++ b/packages/devextreme/docker-ci.sh @@ -40,7 +40,8 @@ function run_test { function run_test_impl { local port=`node -e "console.log(require('./ports.json').qunit)"` - local url="http://0.0.0.0:$port/run?notimers=true" + # Use 127.0.0.1, not 0.0.0.0 — Chrome cannot fetch modules from 0.0.0.0. + local url="http://127.0.0.1:$port/run?notimers=true" local runner_pid local runner_result=0 diff --git a/packages/devextreme/js/__internal/common/core/animation/frame.ts b/packages/devextreme/js/__internal/common/core/animation/frame.ts index e3c7f7023bb2..2ab76ff12122 100644 --- a/packages/devextreme/js/__internal/common/core/animation/frame.ts +++ b/packages/devextreme/js/__internal/common/core/animation/frame.ts @@ -17,11 +17,13 @@ const window: ExtendedWindow = (hasWindow() ? getWindow() : {}) as ExtendedWindo const FRAME_ANIMATION_STEP_TIME = 1000 / 60; +// eslint-disable-next-line func-names -- description seam for tests let request = function (callback: FrameRequestCallback): number { /* eslint-disable no-restricted-globals */ return setTimeout(callback, FRAME_ANIMATION_STEP_TIME); }; +// eslint-disable-next-line func-names -- description seam for tests let cancel = function (requestID: number): void { clearTimeout(requestID); }; @@ -45,15 +47,37 @@ const setAnimationFrameMethods = callOnce(() => { } }); -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -export function requestAnimationFrame(...args): number { +/* eslint-disable-next-line + @typescript-eslint/explicit-module-boundary-types, import/no-mutable-exports + -- description seam for tests */ +export let requestAnimationFrame = function (...args): number { setAnimationFrameMethods(); // @ts-ignore return request.apply(window, args); -} +}; -export function cancelAnimationFrame(requestID: number): void { +/* eslint-disable-next-line + import/no-mutable-exports + -- description seam for tests */ +export let cancelAnimationFrame = function (requestID: number): void { setAnimationFrameMethods(); cancel.apply(window, [requestID]); +}; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_requestAnimationFrame( + value: typeof requestAnimationFrame, +): void { + requestAnimationFrame = value; +} +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_cancelAnimationFrame( + value: typeof cancelAnimationFrame, +): void { + cancelAnimationFrame = value; } +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/common/core/animation/translator.ts b/packages/devextreme/js/__internal/common/core/animation/translator.ts index 001375a94dc6..306152f9b687 100644 --- a/packages/devextreme/js/__internal/common/core/animation/translator.ts +++ b/packages/devextreme/js/__internal/common/core/animation/translator.ts @@ -124,7 +124,8 @@ export const move = function ( } }; -export const resetPosition = function ( +/* eslint-disable import/no-mutable-exports -- description seam for tests */ +export let resetPosition = function ( $element: dxElementWrapper | Element | undefined, finishTransition?: boolean, ): void { @@ -170,3 +171,11 @@ export const parseTranslate = function (translateString: string): TranslateVecto z: parseFloat(result[2]), }; }; + +/// #DEBUG +/* eslint-disable @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_resetPosition(value: typeof resetPosition): void { + resetPosition = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/core/localization/ldml/date.parser.ts b/packages/devextreme/js/__internal/core/localization/ldml/date.parser.ts index 941d4ee6970e..43752f07fbba 100644 --- a/packages/devextreme/js/__internal/core/localization/ldml/date.parser.ts +++ b/packages/devextreme/js/__internal/core/localization/ldml/date.parser.ts @@ -235,7 +235,8 @@ export const isPossibleForParsingFormat = (patterns: string[]): boolean => { }); }; -export const getRegExpInfo = ( +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let getRegExpInfo = ( format: string, dateParts: LdlmDateLocalization, ): { @@ -381,3 +382,11 @@ export const getParser = (format: string, dateParts: LdlmDateLocalization) => { return null; }; }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_getRegExpInfo(value: typeof getRegExpInfo): void { + getRegExpInfo = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts b/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts index 2a671b7f1434..19ee409b83f5 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/views/m_grid_view.ts @@ -11,6 +11,7 @@ import { Deferred, when } from '@js/core/utils/deferred'; import { each } from '@js/core/utils/iterator'; import { getBoundingRect } from '@js/core/utils/position'; import { getHeight, getWidth } from '@js/core/utils/size'; +import { setHeight } from '@js/core/utils/style'; import { isDefined, isNumeric, isString } from '@js/core/utils/type'; import { getWindow, hasWindow } from '@js/core/utils/window'; import * as accessibility from '@js/ui/shared/accessibility'; @@ -828,7 +829,7 @@ export class ResizingController extends modules.ViewController { // IE11 if (maxHeightHappened && !isMaxHeightApplied) { - $(groupElement).css('height', maxHeight); + setHeight($(groupElement), maxHeight); } if (!dataController.isLoaded()) { diff --git a/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts b/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts index b5b668f7b4de..144746a8bfa7 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/views/m_rows_view.ts @@ -534,7 +534,7 @@ export class RowsView extends ColumnsView { $cell = that._createCell({ column: columns[i], rowType: 'freeSpace', columnIndex: i, columns, }); - isNumeric(height) && $cell.css('height', height); + isNumeric(height) && setHeight($cell, height); $row.append($cell); } @@ -1033,7 +1033,7 @@ export class RowsView extends ColumnsView { if (showFreeSpaceRow) { deferRender(() => { - freeSpaceRowElements.css('height', resultHeight); + setHeight(freeSpaceRowElements, resultHeight); isFreeSpaceRowVisible = true; freeSpaceRowElements.show(); }); @@ -1042,7 +1042,7 @@ export class RowsView extends ColumnsView { }); } } else { - freeSpaceRowElements.css('height', 0); + setHeight(freeSpaceRowElements, 0); freeSpaceRowElements.show(); this._updateLastRowBorder(true); } diff --git a/packages/devextreme/js/__internal/viz/axes/base_axis.ts b/packages/devextreme/js/__internal/viz/axes/base_axis.ts index 66b8919a6f1d..8811d932f81b 100644 --- a/packages/devextreme/js/__internal/viz/axes/base_axis.ts +++ b/packages/devextreme/js/__internal/viz/axes/base_axis.ts @@ -313,7 +313,8 @@ function getConstantLineSharpDirection(coord, axisCanvas) { return Math.max(axisCanvas.start, axisCanvas.end) !== coord ? 1 : -1; } -export const Axis = function (renderSettings) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Axis = function (renderSettings) { const that = this; that._renderer = renderSettings.renderer; @@ -2839,3 +2840,9 @@ Axis.prototype = { shift: _noop, /// #ENDDEBUG }; + +/// #DEBUG +export function DEBUG_set_Axis(value: typeof Axis): void { + Axis = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/axes/tick_generator.ts b/packages/devextreme/js/__internal/viz/axes/tick_generator.ts index 09d459922448..7cba1e2fee6f 100644 --- a/packages/devextreme/js/__internal/viz/axes/tick_generator.ts +++ b/packages/devextreme/js/__internal/viz/axes/tick_generator.ts @@ -806,7 +806,8 @@ function dateGenerator(options) { ); } -export const tickGenerator = function (options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let tickGenerator = function (options) { let result; if (options.rangeIsEmpty) { @@ -823,3 +824,11 @@ export const tickGenerator = function (options) { return result; }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_tickGenerator(value: typeof tickGenerator): void { + tickGenerator = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/chart_components/crosshair.ts b/packages/devextreme/js/__internal/viz/chart_components/crosshair.ts index 61174b64b40d..f6bac1473ba0 100644 --- a/packages/devextreme/js/__internal/viz/chart_components/crosshair.ts +++ b/packages/devextreme/js/__internal/viz/chart_components/crosshair.ts @@ -69,13 +69,14 @@ function getLabelCheckerPosition(x, y, isHorizontal, canvas) { }; } -export function Crosshair(renderer, options, params, group) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Crosshair = function (renderer, options, params, group) { const that = this; that._renderer = renderer; that._crosshairGroup = group; that._options = {}; that.update(options, params); -} +}; Crosshair.prototype = { constructor: Crosshair, @@ -323,3 +324,11 @@ Crosshair.prototype = { } }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_Crosshair(value: typeof Crosshair): void { + Crosshair = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/chart_components/layout_manager.ts b/packages/devextreme/js/__internal/viz/chart_components/layout_manager.ts index f74d419697b7..69500d196043 100644 --- a/packages/devextreme/js/__internal/viz/chart_components/layout_manager.ts +++ b/packages/devextreme/js/__internal/viz/chart_components/layout_manager.ts @@ -122,8 +122,9 @@ function getInnerRadius({ type, innerRadius }) { return type === 'pie' ? 0 : _isNumber(innerRadius) ? Number(innerRadius) : DEFAULT_INNER_RADIUS; } -function LayoutManager() { -} +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +let LayoutManager = function () { +}; function getAverageLabelWidth(centerX, radius, canvas, sizeLabels) { return (centerX - radius - RADIAL_LABEL_INDENT - canvas.left) / sizeLabels.outerLabelsCount; @@ -278,3 +279,9 @@ LayoutManager.prototype = { }; export { LayoutManager }; + +/// #DEBUG +export function DEBUG_set_LayoutManager(value: typeof LayoutManager): void { + LayoutManager = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/chart_components/scroll_bar.ts b/packages/devextreme/js/__internal/viz/chart_components/scroll_bar.ts index 449be66e01ea..4d744fc09aaf 100644 --- a/packages/devextreme/js/__internal/viz/chart_components/scroll_bar.ts +++ b/packages/devextreme/js/__internal/viz/chart_components/scroll_bar.ts @@ -23,7 +23,8 @@ const _min = Math.min; const _max = Math.max; const MIN_SCROLL_BAR_SIZE = 10; -export const ScrollBar = function (renderer, group) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let ScrollBar = function (renderer, group) { this._translator = new Translator2D({}, {}, {}); this._scroll = renderer.rect().append(group); this._addEvents(); @@ -283,3 +284,9 @@ ScrollBar.prototype = { }); }, }; + +/// #DEBUG +export function DEBUG_set_ScrollBar(value: typeof ScrollBar): void { + ScrollBar = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/components/chart_theme_manager.ts b/packages/devextreme/js/__internal/viz/components/chart_theme_manager.ts index 214be1c8e5fe..2c2434452d85 100644 --- a/packages/devextreme/js/__internal/viz/components/chart_theme_manager.ts +++ b/packages/devextreme/js/__internal/viz/components/chart_theme_manager.ts @@ -26,7 +26,8 @@ import { import { BaseThemeManager } from '@ts/viz/core/base_theme_manager'; import { extractColor, normalizeEnum as _normalizeEnum } from '@ts/viz/core/utils'; -export const ThemeManager = BaseThemeManager.inherit((function () { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let ThemeManager = BaseThemeManager.inherit((function () { const ctor = function (params) { const that = this; @@ -245,3 +246,11 @@ export const ThemeManager = BaseThemeManager.inherit((function () { }, }; })()); + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_ThemeManager(value: typeof ThemeManager): void { + ThemeManager = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/components/data_validator.ts b/packages/devextreme/js/__internal/viz/components/data_validator.ts index ce855b2f2e60..df90aae1b489 100644 --- a/packages/devextreme/js/__internal/viz/components/data_validator.ts +++ b/packages/devextreme/js/__internal/viz/components/data_validator.ts @@ -505,7 +505,8 @@ function verifyData(source, incidentOccurred) { return data; } -export function validateData(data, groupsData, incidentOccurred, options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let validateData = function (data, groupsData, incidentOccurred, options) { data = verifyData(data, incidentOccurred); groupsData.argumentType = groupsData.argumentAxisType = null; @@ -524,4 +525,10 @@ export function validateData(data, groupsData, incidentOccurred, options) { const dataByArgumentFields = sortData(data, groupsData, options, getUniqueArgumentFields(groupsData)); return dataByArgumentFields; +}; + +/// #DEBUG +export function DEBUG_set_validateData(value: typeof validateData): void { + validateData = value; } +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/core/base_theme_manager.ts b/packages/devextreme/js/__internal/viz/core/base_theme_manager.ts index f6b3c66ed460..c380f0b72eef 100644 --- a/packages/devextreme/js/__internal/viz/core/base_theme_manager.ts +++ b/packages/devextreme/js/__internal/viz/core/base_theme_manager.ts @@ -32,7 +32,8 @@ function getThemePart(theme, path) { return _theme; } -export const BaseThemeManager = Class.inherit({ // TODO: test hack +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let BaseThemeManager = Class.inherit({ // TODO: test hack ctor(options) { this._themeSection = options.themeSection; this._fontFields = options.fontFields || []; @@ -115,3 +116,9 @@ export const BaseThemeManager = Class.inherit({ // TODO: test hack _extend(font, this._font, _extend({}, font)); }, }); + +/// #DEBUG +export function DEBUG_set_BaseThemeManager(value: typeof BaseThemeManager): void { + BaseThemeManager = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/core/plaque.ts b/packages/devextreme/js/__internal/viz/core/plaque.ts index 33f3c017989e..bb4c67808f04 100644 --- a/packages/devextreme/js/__internal/viz/core/plaque.ts +++ b/packages/devextreme/js/__internal/viz/core/plaque.ts @@ -223,7 +223,8 @@ function getCloudPoints({ width, height }, x, y, anchorX, anchorY, { arrowWidth, return buildPath('M', points, 'Z'); } -export class Plaque { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Plaque = class { widget; options; @@ -480,4 +481,10 @@ export class Plaque { const { width, height } = this._size || {}; return Math.abs(x - this.x) <= width / 2 && Math.abs(y - this.y) <= height / 2; } +}; + +/// #DEBUG +export function DEBUG_set_Plaque(value: typeof Plaque): void { + Plaque = value; } +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/core/renderers/animation.ts b/packages/devextreme/js/__internal/viz/core/renderers/animation.ts index eadbcee48f76..ece2b3283446 100644 --- a/packages/devextreme/js/__internal/viz/core/renderers/animation.ts +++ b/packages/devextreme/js/__internal/viz/core/renderers/animation.ts @@ -144,13 +144,14 @@ Animation.prototype = { }, }; -export function AnimationController(element) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let AnimationController = function (element) { const that = this; that._animationCount = 0; that._timerId = null; that._animations = {}; that.element = element; -} +}; AnimationController.prototype = { _loop() { @@ -239,3 +240,11 @@ AnimationController.prototype = { !hasUnstoppableInAnimations && this.stop(); }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_AnimationController(value: typeof AnimationController): void { + AnimationController = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/core/renderers/renderer.ts b/packages/devextreme/js/__internal/viz/core/renderers/renderer.ts index 1f911e926157..9dd0b3b6d9ed 100644 --- a/packages/devextreme/js/__internal/viz/core/renderers/renderer.ts +++ b/packages/devextreme/js/__internal/viz/core/renderers/renderer.ts @@ -1843,7 +1843,7 @@ function unlinkItem(target) { updateIndexes(items, i); } -export function Renderer(options) { +export let Renderer = function (options) { const that = this; that.root = that._createElement('svg', { xmlns: 'http://www.w3.org/2000/svg', @@ -1868,7 +1868,7 @@ export function Renderer(options) { that.root.append({ element: options.container }); that._locker = 0; that._backed = false; -} +}; Renderer.prototype = { constructor: Renderer, @@ -2362,10 +2362,15 @@ const DEBUG_set_ArcSvgElement = function (value) { const DEBUG_set_TextSvgElement = function (value) { TextSvgElement = value; }; + +const DEBUG_set_Renderer = function (value) { + Renderer = value; +}; /// #ENDDEBUG /// #DEBUG exports.DEBUG_set_ArcSvgElement = DEBUG_set_ArcSvgElement; +exports.DEBUG_set_Renderer = DEBUG_set_Renderer; exports.DEBUG_set_PathSvgElement = DEBUG_set_PathSvgElement; exports.DEBUG_set_RectSvgElement = DEBUG_set_RectSvgElement; exports.DEBUG_set_SvgElement = DEBUG_set_SvgElement; diff --git a/packages/devextreme/js/__internal/viz/core/series_family.ts b/packages/devextreme/js/__internal/viz/core/series_family.ts index 25ca9ce1c54c..727ac86c658b 100644 --- a/packages/devextreme/js/__internal/viz/core/series_family.ts +++ b/packages/devextreme/js/__internal/viz/core/series_family.ts @@ -458,7 +458,8 @@ function adjustBubbleSeriesDimensions() { }); } -export function SeriesFamily(options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let SeriesFamily = function (options) { /// #DEBUG debug.assert(options.type, 'type was not passed or empty'); /// #ENDDEBUG @@ -519,7 +520,7 @@ export function SeriesFamily(options) { that.adjustSeriesDimensions = adjustBubbleSeriesDimensions; break; } -} +}; SeriesFamily.prototype = { constructor: SeriesFamily, @@ -543,3 +544,9 @@ SeriesFamily.prototype = { this.series = _map(series, (singleSeries) => (singleSeries.type === type ? singleSeries : null)); }, }; + +/// #DEBUG +export function DEBUG_set_SeriesFamily(value: typeof SeriesFamily): void { + SeriesFamily = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/core/utils.ts b/packages/devextreme/js/__internal/viz/core/utils.ts index fde5ddc1087e..4c65756fbeb6 100644 --- a/packages/devextreme/js/__internal/viz/core/utils.ts +++ b/packages/devextreme/js/__internal/viz/core/utils.ts @@ -91,7 +91,8 @@ export const degreesToRadians = function (value) { // Calculates sin and cos for in degrees // Expects number, no validation -export const getCosAndSin = function (angle) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let getCosAndSin = function (angle) { const angleInRadians = degreesToRadians(angle); return { cos: _cos(angleInRadians), sin: _sin(angleInRadians) }; }; @@ -276,7 +277,8 @@ export const enumParser = function (values) { }; }; -export const patchFontOptions = function (options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let patchFontOptions = function (options) { const fontOptions = {}; each(options || {}, (key, value) => { if (/^(cursor)$/i.test(key)) { @@ -422,7 +424,8 @@ export function normalizePanesHeight(panes) { } } -export function updatePanesCanvases(panes, canvas, rotated) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let updatePanesCanvases = function (panes, canvas, rotated) { let distributedSpace = 0; const padding = PANE_PADDING; const paneSpace = rotated ? canvas.width - canvas.left - canvas.right : canvas.height - canvas.top - canvas.bottom; @@ -441,7 +444,7 @@ export function updatePanesCanvases(panes, canvas, rotated) { distributedSpace = distributedSpace + calcLength + padding; setCanvasValues(pane.canvas); }); -} +}; export const unique = function (array) { const values = {}; @@ -671,7 +674,8 @@ export function pointInCanvas(canvas, x, y) { return x >= canvas.left && x <= canvas.right && y >= canvas.top && y <= canvas.bottom; } -export const getNextDefsSvgId = () => `DevExpress_${numDefsSvgElements++}`; +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let getNextDefsSvgId = () => `DevExpress_${numDefsSvgElements++}`; export function extractColor(color, isBase?) { if (isString(color) || !color) { @@ -681,3 +685,21 @@ export function extractColor(color, isBase?) { } return color.fillId || color.base; } + +/// #DEBUG +export function DEBUG_set_getCosAndSin(value: typeof getCosAndSin): void { + getCosAndSin = value; +} + +export function DEBUG_set_patchFontOptions(value: typeof patchFontOptions): void { + patchFontOptions = value; +} + +export function DEBUG_set_updatePanesCanvases(value: typeof updatePanesCanvases): void { + updatePanesCanvases = value; +} + +export function DEBUG_set_getNextDefsSvgId(value: typeof getNextDefsSvgId): void { + getNextDefsSvgId = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/palette.ts b/packages/devextreme/js/__internal/viz/palette.ts index 6f857efb3b05..8d00c26d2486 100644 --- a/packages/devextreme/js/__internal/viz/palette.ts +++ b/packages/devextreme/js/__internal/viz/palette.ts @@ -194,10 +194,11 @@ export function registerPalette(name, palette) { } } -export function getAccentColor(palette, themeDefault) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let getAccentColor = function (palette, themeDefault) { palette = getPalette(palette, { themeDefault }); return palette.accentColor || palette[0]; -} +}; function RingBuf(buf) { let ind = 0; @@ -430,7 +431,8 @@ function getColorMixer(palette, parameters) { }; } -export function createPalette(palette, parameters, themeDefaultPalette?) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let createPalette = function (palette, parameters, themeDefaultPalette?) { const paletteObj = { dispose() { this._extensionStrategy = null; @@ -469,7 +471,7 @@ export function createPalette(palette, parameters, themeDefaultPalette?) { paletteObj.reset(); return paletteObj; -} +}; function getAlteredPalette(originalPalette, step) { const palette = []; @@ -495,7 +497,8 @@ function getLightness(color) { return color.r * 0.3 + color.g * 0.59 + color.b * 0.11; } -export function getDiscretePalette(source, size, themeDefaultPalette) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let getDiscretePalette = function (source, size, themeDefaultPalette) { const palette = size > 0 ? createDiscreteColors(getPalette(source, { type: 'gradientSet', themeDefault: themeDefaultPalette }), size) : []; return { @@ -503,7 +506,7 @@ export function getDiscretePalette(source, size, themeDefaultPalette) { return palette[index] || null; }, }; -} +}; function createDiscreteColors(source, count) { const colorCount = count - 1; @@ -550,3 +553,15 @@ export function getGradientPalette(source, themeDefaultPalette) { /// #DEBUG export const _DEBUG_palettes = palettes; /// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_getAccentColor(value: typeof getAccentColor): void { + getAccentColor = value; +} +export function DEBUG_set_createPalette(value: typeof createPalette): void { + createPalette = value; +} +export function DEBUG_set_getDiscretePalette(value: typeof getDiscretePalette): void { + getDiscretePalette = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/range_selector/range_view.ts b/packages/devextreme/js/__internal/viz/range_selector/range_view.ts index 3d5424ba3beb..ed73becd129f 100644 --- a/packages/devextreme/js/__internal/viz/range_selector/range_view.ts +++ b/packages/devextreme/js/__internal/viz/range_selector/range_view.ts @@ -36,11 +36,12 @@ function merge(a, b) { return a !== undefined ? a : b; } -export function RangeView(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let RangeView = function (params) { this._params = params; this._clipRect = params.renderer.clipRect(); params.root.attr({ 'clip-path': this._clipRect.id }); -} +}; RangeView.prototype = { constructor: RangeView, @@ -84,3 +85,11 @@ RangeView.prototype = { } }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_RangeView(value: typeof RangeView): void { + RangeView = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/range_selector/series_data_source.ts b/packages/devextreme/js/__internal/viz/range_selector/series_data_source.ts index 46a17f76d824..8eaa6ddb6d7d 100644 --- a/packages/devextreme/js/__internal/viz/range_selector/series_data_source.ts +++ b/packages/devextreme/js/__internal/viz/range_selector/series_data_source.ts @@ -57,7 +57,8 @@ const processSeriesFamilies = function (series, minBubbleSize, maxBubbleSize, ba return families; }; -export const SeriesDataSource = function (options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let SeriesDataSource = function (options) { const that = this; const themeManager = that._themeManager = createThemeManager(options.chart); @@ -278,3 +279,11 @@ SeriesDataSource.prototype = { return this._themeManager; }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_SeriesDataSource(value: typeof SeriesDataSource): void { + SeriesDataSource = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/range_selector/sliders_controller.ts b/packages/devextreme/js/__internal/viz/range_selector/sliders_controller.ts index f2c26e68e6b8..ae3898626ea9 100644 --- a/packages/devextreme/js/__internal/viz/range_selector/sliders_controller.ts +++ b/packages/devextreme/js/__internal/viz/range_selector/sliders_controller.ts @@ -75,7 +75,8 @@ function restoreSetSelectedRange(controller) { delete controller.setSelectedRange; } -export function SlidersController(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let SlidersController = function (params) { const that = this; const sliderParams = { renderer: params.renderer, root: params.root, trackersGroup: params.trackersGroup, translator: params.translator, @@ -89,7 +90,7 @@ export function SlidersController(params) { // It seems that there is no special reasons to suppress first event - it was accidentally suppressed. // Let it stay so for now. that._processSelectionChanged = dummyProcessSelectionChanged; -} +}; SlidersController.prototype = { constructor: SlidersController, @@ -519,3 +520,11 @@ SlidersController.prototype = { this._sliders[index].toForeground(); }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_SlidersController(value: typeof SlidersController): void { + SlidersController = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/range_selector/tracker.ts b/packages/devextreme/js/__internal/viz/range_selector/tracker.ts index fcc50b508ad1..ee91d4d4b430 100644 --- a/packages/devextreme/js/__internal/viz/range_selector/tracker.ts +++ b/packages/devextreme/js/__internal/viz/range_selector/tracker.ts @@ -222,7 +222,8 @@ function initializeSliderEvents(controller, sliders, state, getRootOffsetLeft) { return docEvents; } -export function Tracker(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Tracker = function (params) { const state = this._state = {}; const targets = params.controller.getTrackerTargets(); if (msPointerEnabled) { @@ -242,7 +243,7 @@ export function Tracker(params) { function getRootOffsetLeft() { return params.renderer.getRootOffset().left; } -} +}; Tracker.prototype = { constructor: Tracker, @@ -260,3 +261,11 @@ Tracker.prototype = { state.manualRangeSelectionEnabled = behavior.manualRangeSelectionEnabled; }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_Tracker(value: typeof Tracker): void { + Tracker = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/series/base_series.ts b/packages/devextreme/js/__internal/viz/series/base_series.ts index 3c7a86040693..864025498e3d 100644 --- a/packages/devextreme/js/__internal/viz/series/base_series.ts +++ b/packages/devextreme/js/__internal/viz/series/base_series.ts @@ -179,7 +179,8 @@ function mergePointOptions(base, extra) { return options; } -export function Series(settings, options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Series = function (settings, options) { const that = this; that.fullState = 0; that._extGroups = settings; @@ -191,7 +192,7 @@ export function Series(settings, options) { that._legendCallback = _noop; that.updateOptions(options, settings); -} +}; function getData(pointData) { return pointData.data; @@ -1382,3 +1383,11 @@ Series.prototype = { }; // @ts-expect-error export const mixins = seriesNS.mixins; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_Series(value: typeof Series): void { + Series = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/series/points/base_point.ts b/packages/devextreme/js/__internal/viz/series/points/base_point.ts index ccb51c7e0c34..acc91bc39396 100644 --- a/packages/devextreme/js/__internal/viz/series/points/base_point.ts +++ b/packages/devextreme/js/__internal/viz/series/points/base_point.ts @@ -89,7 +89,8 @@ function isNoneMode(mode) { return _normalizeEnum(mode) === 'none'; } -export function Point(series, dataItem, options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Point = function (series, dataItem, options) { this.fullState = NORMAL_STATE; this.series = series; this.update(dataItem, options); @@ -104,7 +105,7 @@ export function Point(series, dataItem, options) { dashStyle: null, filter: null, }; -} +}; // @ts-expect-error mixins.symbolPoint = symbolPoint; // @ts-expect-error @@ -547,3 +548,9 @@ Point.prototype = { }; }, }; + +/// #DEBUG +export function DEBUG_set_Point(value: typeof Point): void { + Point = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/series/points/label.ts b/packages/devextreme/js/__internal/viz/series/points/label.ts index 1792537c2d71..327f2763845d 100644 --- a/packages/devextreme/js/__internal/viz/series/points/label.ts +++ b/packages/devextreme/js/__internal/viz/series/points/label.ts @@ -290,13 +290,14 @@ function formatText(data, options) { return options.customizeText ? options.customizeText.call(data, data) : options.displayFormat ? processDisplayFormat(options.displayFormat, data) : data.valueText; } -export function Label(renderSettings) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Label = function (renderSettings) { this._renderer = renderSettings.renderer; this._container = renderSettings.labelsGroup; this._point = renderSettings.point; this._strategy = renderSettings.strategy; this._rowCount = 1; -} +}; Label.prototype = { constructor: Label, @@ -551,5 +552,12 @@ Label.prototype = { }; /// #DEBUG -Label._DEBUG_formatText = formatText; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +(Label as any)._DEBUG_formatText = formatText; +/// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_Label(value: typeof Label): void { + Label = value; +} /// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/translators/range.ts b/packages/devextreme/js/__internal/viz/translators/range.ts index be556c949927..d4ed7f96c59d 100644 --- a/packages/devextreme/js/__internal/viz/translators/range.ts +++ b/packages/devextreme/js/__internal/viz/translators/range.ts @@ -43,7 +43,8 @@ function compareAndReplace(thisValue, otherValue, setValue, compare) { } } -export const Range = function (range?) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Range = function (range?) { range && extend(this, range); }; @@ -156,3 +157,9 @@ _Range.prototype = { } }, }; + +/// #DEBUG +export function DEBUG_set_Range(value: typeof Range): void { + Range = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/translators/translator1d.ts b/packages/devextreme/js/__internal/viz/translators/translator1d.ts index f0caa9bd9a9e..3f9d1d7479be 100644 --- a/packages/devextreme/js/__internal/viz/translators/translator1d.ts +++ b/packages/devextreme/js/__internal/viz/translators/translator1d.ts @@ -9,9 +9,10 @@ const _Number = Number; -export function Translator1D() { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Translator1D = function () { this.setDomain(arguments[0], arguments[1]).setCodomain(arguments[2], arguments[3]).setInverted(false); -} +}; Translator1D.prototype = { constructor: Translator1D, @@ -87,3 +88,9 @@ Translator1D.prototype = { return result; }, }; + +/// #DEBUG +export function DEBUG_set_Translator1D(value: typeof Translator1D): void { + Translator1D = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/translators/translator2d.ts b/packages/devextreme/js/__internal/viz/translators/translator2d.ts index a14d04727579..c354e9a42896 100644 --- a/packages/devextreme/js/__internal/viz/translators/translator2d.ts +++ b/packages/devextreme/js/__internal/viz/translators/translator2d.ts @@ -164,7 +164,8 @@ function getCheckingMethodsAboutBreaks(inverted) { }; } -const _Translator2d = function (businessRange, canvas, options) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +let _Translator2d = function (businessRange, canvas, options) { this.update(businessRange, canvas, options); }; @@ -722,3 +723,9 @@ _Translator2d.prototype = { }; export { _Translator2d as Translator2D }; + +/// #DEBUG +export function DEBUG_set_Translator2D(value: typeof _Translator2d): void { + _Translator2d = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/control_bar/control_bar.ts b/packages/devextreme/js/__internal/viz/vector_map/control_bar/control_bar.ts index dff2890bb1ef..5c13173ec984 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/control_bar/control_bar.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/control_bar/control_bar.ts @@ -73,7 +73,8 @@ COMMAND_TO_TYPE_MAP[COMMAND_MOVE_UP] = COMMAND_TO_TYPE_MAP[COMMAND_MOVE_RIGHT] = COMMAND_TO_TYPE_MAP[COMMAND_ZOOM_IN] = COMMAND_TO_TYPE_MAP[COMMAND_ZOOM_OUT] = ZoomCommand; COMMAND_TO_TYPE_MAP[COMMAND_ZOOM_DRAG] = ZoomDragCommand; -export function ControlBar(parameters) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let ControlBar = function (parameters) { const that = this; that._params = parameters; that._createElements(parameters.renderer, parameters.container, parameters.dataKey); @@ -81,7 +82,7 @@ export function ControlBar(parameters) { that._subscribeToProjection(parameters.projection); that._subscribeToTracker(parameters.tracker); that._createCallbacks(parameters.projection); -} +}; ControlBar.prototype = { constructor: ControlBar, @@ -472,3 +473,9 @@ exports._TESTS_restoreCommandToTypeMap = function () { COMMAND_TO_TYPE_MAP = COMMAND_TO_TYPE_MAP__ORIGINAL; }; /// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_ControlBar(value: typeof ControlBar): void { + ControlBar = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/data_exchanger.ts b/packages/devextreme/js/__internal/viz/vector_map/data_exchanger.ts index 3f0cf7a4f8a6..7078a0d1096f 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/data_exchanger.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/data_exchanger.ts @@ -6,9 +6,10 @@ import Callbacks from '@js/core/utils/callbacks'; -export function DataExchanger() { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let DataExchanger = function () { this._store = {}; -} +}; DataExchanger.prototype = { constructor: DataExchanger, @@ -43,3 +44,11 @@ DataExchanger.prototype = { return this; }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_DataExchanger(value: typeof DataExchanger): void { + DataExchanger = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/gesture_handler.ts b/packages/devextreme/js/__internal/viz/vector_map/gesture_handler.ts index 0fffd4195425..5e81a443e38a 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/gesture_handler.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/gesture_handler.ts @@ -8,13 +8,14 @@ const _ln = Math.log; const _LN2 = Math.LN2; -export function GestureHandler(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let GestureHandler = function (params) { const that = this; that._projection = params.projection; that._renderer = params.renderer; that._x = that._y = 0; that._subscribeToTracker(params.tracker); -} +}; GestureHandler.prototype = { constructor: GestureHandler, @@ -106,3 +107,9 @@ GestureHandler.prototype = { } }, }; + +/// #DEBUG +export function DEBUG_set_GestureHandler(value: typeof GestureHandler): void { + GestureHandler = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/layout.ts b/packages/devextreme/js/__internal/viz/vector_map/layout.ts index 8de01f8433b4..f440424f6c94 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/layout.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/layout.ts @@ -207,7 +207,8 @@ function applyLayout(canvas, items) { } } -export function LayoutControl(widget) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let LayoutControl = function (widget) { const that = this; that._items = []; that._suspended = 0; @@ -215,7 +216,7 @@ export function LayoutControl(widget) { that._updateLayout = function () { that._update(); }; -} +}; LayoutControl.prototype = { constructor: LayoutControl, @@ -266,3 +267,9 @@ LayoutControl.prototype = { } }, }; + +/// #DEBUG +export function DEBUG_set_LayoutControl(value: typeof LayoutControl): void { + LayoutControl = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/legend.ts b/packages/devextreme/js/__internal/viz/vector_map/legend.ts index eb5d39c0c227..a0cc3472d8da 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/legend.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/legend.ts @@ -119,11 +119,11 @@ Legend.prototype = _extend(clone(_BaseLegend.prototype), { }, }); -export function LegendsControl(parameters) { +export let LegendsControl = function (parameters) { this._params = parameters; this._items = []; parameters.container.virtualLink('legend-base'); -} +}; LegendsControl.prototype = { constructor: LegendsControl, @@ -170,3 +170,9 @@ exports._TESTS_restoreLegendType = function () { Legend = originalLegend; }; /// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_LegendsControl(value: typeof LegendsControl): void { + LegendsControl = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/map_layer.ts b/packages/devextreme/js/__internal/viz/vector_map/map_layer.ts index fadc174a8208..cb2bbc518577 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/map_layer.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/map_layer.ts @@ -1596,7 +1596,8 @@ function projectLineLabel(coordinates) { return resultData || [[], []]; } -export function MapLayerCollection(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let MapLayerCollection = function (params) { const that = this; const renderer = params.renderer; that._params = params; @@ -1609,7 +1610,7 @@ export function MapLayerCollection(params) { that._container = renderer.g().attr({ class: 'dxm-layers', 'clip-path': that._clip.id }).append(renderer.root).enableLinks(); that._subscribeToTracker(params.tracker, renderer, params.eventTrigger); that._dataReady = params.dataReady; -} +}; MapLayerCollection.prototype = { constructor: MapLayerCollection, @@ -1745,3 +1746,9 @@ export const _TESTS_stub_groupBySize = function (stub) { export const _TESTS_groupBySize = groupBySize; export const _TESTS_findGroupingIndex = findGroupingIndex; /// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_MapLayerCollection(value: typeof MapLayerCollection): void { + MapLayerCollection = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/projection.main.ts b/packages/devextreme/js/__internal/viz/vector_map/projection.main.ts index 3a960f5aaac9..953b23ccb8ee 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/projection.main.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/projection.main.ts @@ -65,7 +65,8 @@ function getEngine(engine) { return (engine instanceof Engine && engine) || projection.get(engine) || projection(engine) || projection.get(DEFAULT_ENGINE_NAME); } -export const Projection = function (parameters) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let Projection = function (parameters) { const that = this; that._initEvents(); that._params = parameters; @@ -553,3 +554,9 @@ function createProjectUnprojectMethods(project, unproject, p1, p2, delta) { /// #DEBUG export { Engine as _TESTS_Engine }; /// #ENDDEBUG + +/// #DEBUG +export function DEBUG_set_Projection(value: typeof Projection): void { + Projection = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/tooltip_viewer.ts b/packages/devextreme/js/__internal/viz/vector_map/tooltip_viewer.ts index 5e51270096a5..74be4028610a 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/tooltip_viewer.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/tooltip_viewer.ts @@ -9,9 +9,10 @@ const TOOLTIP_OFFSET = 12; // TODO: Somehow it should be merged with the core.Tooltip -export function TooltipViewer(params) { +// eslint-disable-next-line import/no-mutable-exports -- description seam for tests +export let TooltipViewer = function (params) { this._subscribeToTracker(params.tracker, params.tooltip, params.layerCollection); -} +}; TooltipViewer.prototype = { constructor: TooltipViewer, @@ -45,3 +46,11 @@ TooltipViewer.prototype = { }); }, }; + +/// #DEBUG +/* eslint-disable-next-line @typescript-eslint/naming-convention + -- description seam setter for tests stubs */ +export function DEBUG_set_TooltipViewer(value: typeof TooltipViewer): void { + TooltipViewer = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/__internal/viz/vector_map/tracker.ts b/packages/devextreme/js/__internal/viz/vector_map/tracker.ts index 55be5e250222..afbf4e5e91ad 100644 --- a/packages/devextreme/js/__internal/viz/vector_map/tracker.ts +++ b/packages/devextreme/js/__internal/viz/vector_map/tracker.ts @@ -57,7 +57,7 @@ let Focus; setupEvents(); -export function Tracker(parameters) { +export let Tracker = function (parameters) { const that = this; that._root = parameters.root; that._createEventHandlers(parameters.dataKey); @@ -67,7 +67,7 @@ export function Tracker(parameters) { that._fire(name, arg); }); that._attachHandlers(); -} +}; Tracker.prototype = { constructor: Tracker, @@ -580,3 +580,9 @@ function adjustWheelDelta(delta, lock) { } return sign * _delta; } + +/// #DEBUG +export function DEBUG_set_Tracker(value: typeof Tracker): void { + Tracker = value; +} +/// #ENDDEBUG diff --git a/packages/devextreme/js/common/core/events/visibility_change.js b/packages/devextreme/js/common/core/events/visibility_change.js index 54357eeb9208..3fc155a6fcc6 100644 --- a/packages/devextreme/js/common/core/events/visibility_change.js +++ b/packages/devextreme/js/common/core/events/visibility_change.js @@ -1,7 +1,24 @@ import VisibilityChangeModule from '../../../__internal/events/visibility_change'; -export const triggerShownEvent = VisibilityChangeModule.triggerShownEvent; -export const triggerHidingEvent = VisibilityChangeModule.triggerHidingEvent; -export const triggerResizeEvent = VisibilityChangeModule.triggerResizeEvent; +// eslint-disable-next-line import/no-mutable-exports -- test seam for QUnit stubs +export let triggerShownEvent = VisibilityChangeModule.triggerShownEvent; +// eslint-disable-next-line import/no-mutable-exports -- test seam for QUnit stubs +export let triggerHidingEvent = VisibilityChangeModule.triggerHidingEvent; +// eslint-disable-next-line import/no-mutable-exports -- test seam for QUnit stubs +export let triggerResizeEvent = VisibilityChangeModule.triggerResizeEvent; + +/// #DEBUG +export function DEBUG_set_triggerShownEvent(value) { + triggerShownEvent = value; +} + +export function DEBUG_set_triggerHidingEvent(value) { + triggerHidingEvent = value; +} + +export function DEBUG_set_triggerResizeEvent(value) { + triggerResizeEvent = value; +} +/// #ENDDEBUG export default VisibilityChangeModule; diff --git a/packages/devextreme/js/exporter.js b/packages/devextreme/js/exporter.js index cfcf606cc8ee..0cdb267d06a1 100644 --- a/packages/devextreme/js/exporter.js +++ b/packages/devextreme/js/exporter.js @@ -1,13 +1,16 @@ import * as clientExporter from './__internal/exporter/exporter'; -// Re-exported through local bindings on purpose: `export { … } from './…'` compiles to -// getter-only, non-configurable properties, while tests stub these members -// (see testing/tests/DevExpress.viz.core/export.tests.js). -const _export = clientExporter.export; +let _export = clientExporter.export; export const fileSaver = clientExporter.fileSaver; export const image = clientExporter.image; export const pdf = clientExporter.pdf; export const svg = clientExporter.svg; +/// #DEBUG +export function DEBUG_set_export(value) { + _export = value; +} +/// #ENDDEBUG + export { _export as export }; diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 4fa54817a82c..8cb57946551c 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -130,11 +130,6 @@ "minimist": "1.2.8", "qunit": "2.25.0", "sinon": "18.0.1", - "systemjs": "0.19.41", - "systemjs-plugin-babel": "0.0.25", - "systemjs-plugin-css": "0.1.37", - "systemjs-plugin-json": "0.3.0", - "systemjs-plugin-text": "0.0.11", "terser-webpack-plugin": "5.3.17", "ts-jest": "29.4.12", "tsc-alias": "1.8.16", diff --git a/packages/devextreme/project.json b/packages/devextreme/project.json index 19efa18de2d0..a5174d282eb1 100644 --- a/packages/devextreme/project.json +++ b/packages/devextreme/project.json @@ -152,6 +152,20 @@ "{projectRoot}/artifacts/npm/devextreme-internal/bundles/dx.custom.config.js" ] }, + "copy:qunit:dx-custom": { + "executor": "devextreme-nx-infra-plugin:copy-files", + "options": { + "files": [ + { + "from": "./build/bundle-templates/dx.custom.js", + "to": "./artifacts/transpiled-esm-npm/bundles/dx.custom.js" + } + ] + }, + "dependsOn": ["build:devextreme-bundler-config"], + "inputs": ["{projectRoot}/build/bundle-templates/dx.custom.js"], + "outputs": ["{projectRoot}/artifacts/transpiled-esm-npm/bundles/dx.custom.js"] + }, "build:devextreme-bundler-config:watch": { "executor": "devextreme-nx-infra-plugin:concatenate-files", "cache": false, @@ -280,31 +294,6 @@ "{projectRoot}/artifacts/transpiled-renovation-npm" ] }, - "build:cjs:watch": { - "executor": "devextreme-nx-infra-plugin:babel-transform", - "cache": false, - "options": { - "babelConfigPath": "./build/transpile-config.js", - "configKey": "cjs", - "sourcePattern": "./js/**/*.{js,jsx}", - "excludePatterns": [ - "./js/**/*.d.ts", - "./js/__internal/**/*" - ], - "outDir": "./artifacts/transpiled", - "watch": true, - "copyAssets": [ - { "from": "./js/localization/messages", "to": "./localization/messages" }, - { "from": "./js/viz/vector_map.utils/_settings.json", "to": "./viz/vector_map.utils/_settings.json" } - ] - }, - "configurations": { - "production": { - "outDir": "./artifacts/transpiled-renovation-npm", - "removeDebug": true - } - } - }, "build:npm:esm": { "executor": "devextreme-nx-infra-plugin:babel-transform", "options": { @@ -322,6 +311,11 @@ { "from": "./js/viz/vector_map.utils/_settings.json", "to": "./viz/vector_map.utils/_settings.json" } ] }, + "configurations": { + "qunit": { + "removeDebug": false + } + }, "inputs": [ "jsSourcesProduction", "jsAssetsProduction" @@ -378,44 +372,95 @@ "{projectRoot}/artifacts/transpiled-renovation-npm/__internal" ] }, - "build:cjs:internal:watch": { + "build:npm:esm:internal": { "executor": "devextreme-nx-infra-plugin:babel-transform", - "cache": false, "options": { "babelConfigPath": "./build/transpile-config.js", - "configKey": "tsCjs", + "configKey": "esm", "sourcePattern": "./artifacts/dist_ts/__internal/**/*.{js,jsx}", - "outDir": "./artifacts/transpiled/__internal", + "outDir": "./artifacts/transpiled-esm-npm/esm/__internal", + "removeDebug": true, "renameExtensions": { ".jsx": ".js" - }, - "watch": true + } }, "configurations": { - "production": { - "outDir": "./artifacts/transpiled-renovation-npm/__internal", - "removeDebug": true + "qunit": { + "removeDebug": false + } + }, + "inputs": [ + "internalTsArtifacts" + ], + "outputs": [ + "{projectRoot}/artifacts/transpiled-esm-npm/esm/__internal" + ] + }, + "build:npm:esm:watch": { + "executor": "devextreme-nx-infra-plugin:babel-transform", + "cache": false, + "options": { + "babelConfigPath": "./build/transpile-config.js", + "configKey": "esm", + "sourcePattern": "./js/**/*.{js,jsx}", + "excludePatterns": [ + "./js/**/*.d.ts", + "./js/__internal/**/*" + ], + "outDir": "./artifacts/transpiled-esm-npm/esm", + "removeDebug": true, + "watch": true, + "copyAssets": [ + { "from": "./js/localization/messages", "to": "./localization/messages" }, + { "from": "./js/viz/vector_map.utils/_settings.json", "to": "./viz/vector_map.utils/_settings.json" } + ] + }, + "configurations": { + "qunit": { + "removeDebug": false } } }, - "build:npm:esm:internal": { + "build:npm:esm:internal:watch": { "executor": "devextreme-nx-infra-plugin:babel-transform", + "cache": false, "options": { "babelConfigPath": "./build/transpile-config.js", "configKey": "esm", "sourcePattern": "./artifacts/dist_ts/__internal/**/*.{js,jsx}", "outDir": "./artifacts/transpiled-esm-npm/esm/__internal", "removeDebug": true, + "watch": true, "renameExtensions": { ".jsx": ".js" } }, - "inputs": [ - "internalTsArtifacts" + "configurations": { + "qunit": { + "removeDebug": false + } + } + }, + "build:qunit-esm": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "parallel": true, + "commands": [ + "pnpm nx run devextreme:build:npm:esm -c qunit", + "pnpm nx run devextreme:build:npm:esm:internal -c qunit" + ] + }, + "dependsOn": [ + "build:ts:internal" ], "outputs": [ - "{projectRoot}/artifacts/transpiled-esm-npm/esm/__internal" - ] + "{projectRoot}/artifacts/transpiled-esm-npm/esm" + ], + "cache": true, + "metadata": { + "description": "ESM artifacts for QUnit native import-map loader (?loader=esm)." + } }, "build:npm:cjs:internal": { "executor": "devextreme-nx-infra-plugin:babel-transform", @@ -530,14 +575,12 @@ "pnpm nx build:devextreme-bundler-config devextreme", "pnpm nx build:devextreme-bundler-config devextreme -c prod", "pnpm nx build:ts:internal devextreme", - "pnpm nx run-many --targets=build:cjs,build:cjs:internal,build:cjs:bundles --projects=devextreme --parallel", - "pnpm nx run-many --targets=build:cjs,build:cjs:internal,build:cjs:bundles --projects=devextreme --parallel -c production", - "pnpm nx run-many --targets=build:npm:cjs,build:npm:cjs:internal --projects=devextreme --parallel", + "pnpm nx run-many --targets=build:npm:esm,build:npm:esm:internal --projects=devextreme --parallel -c qunit", + "pnpm nx copy:qunit:dx-custom devextreme", "pnpm nx clean:dist-ts devextreme" ], "outputs": [ - "{projectRoot}/artifacts/transpiled", - "{projectRoot}/artifacts/transpiled-renovation-npm", + "{projectRoot}/artifacts/transpiled-esm-npm", "{projectRoot}/build/bundle-templates/dx.custom.js", "{projectRoot}/artifacts/npm/devextreme/bundles/dx.custom.config.js" ] @@ -570,10 +613,8 @@ "options": { "commands": [ "pnpm nx build:ts:internal:watch devextreme", - "pnpm nx build:cjs:watch devextreme", - "pnpm nx build:cjs:watch devextreme -c production", - "pnpm nx build:cjs:internal:watch devextreme", - "pnpm nx build:cjs:internal:watch devextreme -c production" + "pnpm nx build:npm:esm:watch devextreme -c qunit", + "pnpm nx build:npm:esm:internal:watch devextreme -c qunit" ], "cwd": "{projectRoot}", "parallel": true @@ -712,34 +753,6 @@ "{projectRoot}/artifacts/js/dx.{all,web,viz,ai-integration,custom}.debug.js" ] }, - "bundle:watch": { - "executor": "devextreme-nx-infra-plugin:bundle", - "options": { - "watch": true, - "entries": [ - "bundles/dx.all.js", - "bundles/dx.web.js", - "bundles/dx.viz.js", - "bundles/dx.ai-integration.js", - "bundles/dx.custom.js" - ], - "sourceDir": "./artifacts/transpiled-renovation-npm", - "outDir": "./artifacts/js", - "mode": "debug", - "webpackConfigPath": "./webpack.config.js", - "applyLicenseHeaders": { - "prependAfterLicense": "\"use strict\";\n\n", - "separator": "", - "includePatterns": ["dx.*.debug.js"] - } - }, - "configurations": { - "production": { - "sourceMap": false - } - }, - "cache": false - }, "bundle:prod": { "executor": "nx:run-commands", "options": { @@ -1729,7 +1742,7 @@ "pnpm nx clean:artifacts devextreme", "pnpm nx build:localization devextreme", "pnpm nx build:transpile devextreme -c ci", - "pnpm nx run-many --targets=bundle:debug,build:vectormap,copy:vendor --projects=devextreme --parallel" + "pnpm nx run-many --targets=build:vectormap,copy:vendor --projects=devextreme --parallel" ], "parallel": false }, @@ -1755,58 +1768,9 @@ ], "cache": true, "metadata": { - "description": "Dev/CI test build. Skips prod bundles, aspnet, declarations, npm, and license checks." + "description": "Dev/CI QUnit build (native ESM import-map). Skips all CJS transpile/bundle steps, npm CJS dual-mode, prod bundles, aspnet, declarations, npm packing, and license checks." } }, - "build:systemjs": { - "executor": "nx:run-commands", - "options": { - "cwd": "{projectRoot}", - "parallel": true, - "commands": [ - "node testing/systemjs-builder.js --transpile=modules", - "node testing/systemjs-builder.js --transpile=testing", - "node testing/systemjs-builder.js --transpile=css", - "node testing/systemjs-builder.js --transpile=js-vendors" - ] - }, - "dependsOn": [ - "build:dev" - ], - "inputs": [ - "internalPackageEnv", - { - "env": "DEVEXTREME_TEST_CI" - }, - { - "dependentTasksOutputFiles": "packages/devextreme/artifacts/transpiled/**/*" - }, - { - "dependentTasksOutputFiles": "packages/devextreme/artifacts/css/dx.light.css" - }, - { - "dependentTasksOutputFiles": "packages/devextreme/artifacts/css/dx.material.blue.light.css" - }, - { - "dependentTasksOutputFiles": "packages/devextreme/artifacts/css/dx.fluent.blue.light.css" - }, - { - "dependentTasksOutputFiles": "packages/devextreme/artifacts/css/dx-gantt.css" - }, - "{projectRoot}/testing/content/**/*", - "{projectRoot}/testing/helpers/**/*", - "{projectRoot}/testing/tests/**/*", - "{projectRoot}/testing/systemjs-builder.js", - "{workspaceRoot}/pnpm-lock.yaml" - ], - "outputs": [ - "{projectRoot}/artifacts/transpiled-systemjs", - "{projectRoot}/artifacts/transpiled-testing", - "{projectRoot}/artifacts/css-systemjs", - "{projectRoot}/artifacts/js-systemjs" - ], - "cache": true - }, "dev": { "executor": "nx:run-commands", "cache": false, @@ -1827,7 +1791,6 @@ "commands": [ "pnpm nx build:transpile:watch devextreme", "pnpm nx build:devextreme-bundler-config:watch devextreme", - "pnpm nx bundle:watch devextreme", "pnpm nx test-env devextreme" ] } diff --git a/packages/devextreme/testing/helpers/ajaxMock.js b/packages/devextreme/testing/helpers/ajaxMock.js index c29c8181937e..462ef5951119 100644 --- a/packages/devextreme/testing/helpers/ajaxMock.js +++ b/packages/devextreme/testing/helpers/ajaxMock.js @@ -1,7 +1,8 @@ -const ajax = require('core/utils/ajax'); -const extend = require('core/utils/extend').extend; -const typeUtils = require('core/utils/type'); -const $ = require('jquery'); +import $ from 'jquery'; +import ajax from 'core/utils/ajax'; +import { extend } from 'core/utils/extend'; +import { isDefined } from 'core/utils/type'; + const originSendRequest = ajax.sendRequest; let urlMap = {}; const timers = []; @@ -20,7 +21,7 @@ const findUrlOptions = function(requestUrl) { } }; -exports.setup = function(options) { +export function setup(options) { urlMap[options.url] = options; ajax.sendRequest = function(request) { @@ -29,7 +30,7 @@ exports.setup = function(options) { const mockOptions = findUrlOptions(request.url); const jQueryTextStatus = mockOptions.jQueryTextStatus; - response.status = typeUtils.isDefined(mockOptions.status) ? mockOptions.status : 200; + response.status = isDefined(mockOptions.status) ? mockOptions.status : 200; response.statusText = mockOptions.statusText || '200 OK'; response.responseText = mockOptions.responseText; @@ -48,12 +49,14 @@ exports.setup = function(options) { return deferred.promise(); }; -}; +} -exports.clear = function() { +export function clear() { ajax.sendRequest = originSendRequest; urlMap = {}; timers.forEach(function(timerId) { clearTimeout(timerId); }); -}; +} + +export default { setup, clear }; diff --git a/packages/devextreme/testing/helpers/chartMocks.js b/packages/devextreme/testing/helpers/chartMocks.js index 5e7a2ba7c4d5..6d5945d1c21c 100644 --- a/packages/devextreme/testing/helpers/chartMocks.js +++ b/packages/devextreme/testing/helpers/chartMocks.js @@ -16,6 +16,7 @@ import { } from './vizMocks.js'; import { Range } from 'viz/translators/range'; + const LoadingIndicatorOrig = loadingIndicatorModule.LoadingIndicator; const firstCategory = 'First'; @@ -281,16 +282,28 @@ function createAxis(translatorData, orthogonalTranslatorData, allOptions, isHori return axis; } +// Modules that dropped their generated facade expose a DEBUG_set_* seam; the +// rest are still plain mutable objects. +function setItem(itemKey, moduleName, value) { + const setter = moduleName['DEBUG_set_' + itemKey]; + + if(typeof setter === 'function') { + setter(value); + } else { + moduleName[itemKey] = value; + } +} + function mockItem(itemKey, moduleName, mock) { if(sourceItemsToMocking[itemKey]) { throw 'Item ' + itemKey + ' already mocked'; } sourceItemsToMocking[itemKey] = moduleName[itemKey]; - moduleName[itemKey] = mock; + setItem(itemKey, moduleName, mock); } function restoreItem(itemKey, moduleName) { - moduleName[itemKey] = sourceItemsToMocking[itemKey]; + setItem(itemKey, moduleName, sourceItemsToMocking[itemKey]); sourceItemsToMocking[itemKey] = null; } @@ -394,9 +407,9 @@ export const resetMockFactory = function resetMockFactory() { }; export const setupSeriesFamily = function() { - seriesFamilyModule.SeriesFamily = function(options) { + seriesFamilyModule.DEBUG_set_SeriesFamily(function(options) { return new MockSeriesFamily(options); - }; + }); }; // Translator diff --git a/packages/devextreme/testing/helpers/data.errorHandlingHelper.js b/packages/devextreme/testing/helpers/data.errorHandlingHelper.js index 55a4040abade..9715aceb7ebc 100644 --- a/packages/devextreme/testing/helpers/data.errorHandlingHelper.js +++ b/packages/devextreme/testing/helpers/data.errorHandlingHelper.js @@ -1,16 +1,7 @@ -(function(root, factory) { - root.DevExpress = root.DevExpress || {}; - root.DevExpress.data = root.DevExpress.data || {}; - root.DevExpress.data.testing = root.DevExpress.data.testing || {}; - - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.DevExpress.data.testing.ErrorHandlingHelper = module.exports = factory(require('jquery'), require('common/data/errors')); - }); - } else { - root.DevExpress.data.testing.ErrorHandlingHelper = factory(window.jQuery, DevExpress.data); - } -}(window, function($, errorsModule) { +import $ from 'jquery'; +import * as errorsModule from 'common/data/errors'; + +const __moduleExports = (function($, errorsModule) { return class ErrorHandlingHelper { constructor() { @@ -76,4 +67,11 @@ }); } }; -})); +})($, errorsModule); + +window.DevExpress = window.DevExpress || {}; +window.DevExpress.data = window.DevExpress.data || {}; +window.DevExpress.data.testing = window.DevExpress.data.testing || {}; +window.DevExpress.data.testing.ErrorHandlingHelper = __moduleExports; + +export default __moduleExports; diff --git a/packages/devextreme/testing/helpers/dataGridMocks.js b/packages/devextreme/testing/helpers/dataGridMocks.js index 966f4ccb369a..418f18963e79 100644 --- a/packages/devextreme/testing/helpers/dataGridMocks.js +++ b/packages/devextreme/testing/helpers/dataGridMocks.js @@ -1,32 +1,46 @@ -let gridBaseMock; +import $ from 'jquery'; +import gridCoreModule from '__internal/grids/data_grid/m_core'; +import columnResizingReorderingModule from '__internal/grids/data_grid/module_not_extended/columns_resizing_reordering'; +import domUtilsModule from '__internal/core/utils/m_dom'; +import commonUtilsModule from '__internal/core/utils/m_common'; +import typeUtilsModule from '__internal/core/utils/m_type'; +import ArrayStoreModule from 'common/data/array_store'; +import gridBaseMockModule from './gridBaseMocks.js'; -/* global jQuery */ -if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - gridBaseMock = require('./gridBaseMocks.js'); +const gridBaseMock = gridBaseMockModule.default ?? gridBaseMockModule; +const gridCore = gridCoreModule.default ?? gridCoreModule; +const columnResizingReordering = columnResizingReorderingModule.default ?? columnResizingReorderingModule; +const domUtils = domUtilsModule.default ?? domUtilsModule; +const commonUtils = commonUtilsModule.default ?? commonUtilsModule; +const typeUtils = typeUtilsModule.default ?? typeUtilsModule; +const ArrayStore = ArrayStoreModule.default ?? ArrayStoreModule; - window.dataGridMocks = module.exports = gridBaseMock( - require('jquery'), - require('__internal/grids/data_grid/m_core').default, - require('__internal/grids/data_grid/module_not_extended/columns_resizing_reordering').default, - require('__internal/core/utils/m_dom'), - require('__internal/core/utils/m_common'), - require('__internal/core/utils/m_type'), - require('common/data/array_store'), - 'DataGrid' - ); - }); -} else { - gridBaseMock = DevExpress.require('./gridBaseMocks.js'); +const dataGridMocks = gridBaseMock( + $, + gridCore, + columnResizingReordering, + domUtils, + commonUtils, + typeUtils, + ArrayStore, + 'DataGrid' +); - jQuery.extend(window, gridBaseMock( - jQuery, - DevExpress.require('__internal/grids/data_grid/m_core'), - DevExpress.require('__internal/grids/data_grid/module_not_extended/columns_resizing_reordering'), - DevExpress.require('__internal/core/utils/m_dom'), - DevExpress.require('__internal/core/utils/m_common'), - DevExpress.require('__internal/core/utils/m_type'), - DevExpress.require('common/data/array_store'), - 'DataGrid' - )); -} +window.dataGridMocks = dataGridMocks; + +export const setupDataGridModules = dataGridMocks.setupDataGridModules; +export const MockDataController = dataGridMocks.MockDataController; +export const MockEditingController = dataGridMocks.MockEditingController; +export const MockSelectionController = dataGridMocks.MockSelectionController; +export const MockColumnsController = dataGridMocks.MockColumnsController; +export const MockTablePositionViewController = dataGridMocks.MockTablePositionViewController; +export const MockGridDataSource = dataGridMocks.MockGridDataSource; +export const getCells = dataGridMocks.getCells; +export const MockColumnsSeparatorView = dataGridMocks.MockColumnsSeparatorView; +export const MockTrackerView = dataGridMocks.MockTrackerView; +export const MockDraggingPanel = dataGridMocks.MockDraggingPanel; +export const TestDraggingHeader = dataGridMocks.TestDraggingHeader; +export const generateItems = dataGridMocks.generateItems; +export const generateNestedData = dataGridMocks.generateNestedData; + +export default dataGridMocks; diff --git a/packages/devextreme/testing/helpers/esm-shims/fluent_blue_light.css.js b/packages/devextreme/testing/helpers/esm-shims/fluent_blue_light.css.js new file mode 100644 index 000000000000..28ba858f51a8 --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/fluent_blue_light.css.js @@ -0,0 +1,5 @@ +import { injectStylesheet } from './injectStylesheet.js'; + +await injectStylesheet('/packages/devextreme/artifacts/css/dx.fluent.blue.light.css', { + themeName: 'fluent.blue.light', +}); diff --git a/packages/devextreme/testing/helpers/esm-shims/gantt.css.js b/packages/devextreme/testing/helpers/esm-shims/gantt.css.js new file mode 100644 index 000000000000..e247d21d5527 --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/gantt.css.js @@ -0,0 +1,3 @@ +import { injectStylesheet } from './injectStylesheet.js'; + +await injectStylesheet('/packages/devextreme/artifacts/css/dx-gantt.css'); diff --git a/packages/devextreme/testing/helpers/esm-shims/injectStylesheet.js b/packages/devextreme/testing/helpers/esm-shims/injectStylesheet.js new file mode 100644 index 000000000000..55eacd3c7014 --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/injectStylesheet.js @@ -0,0 +1,57 @@ +/** + * Injects a stylesheet once for ESM import-map QUnit mode + * (`*.css!` suite imports resolve here). + * + * Only appends ``. + * Do not add dx-theme-* classes on body — that belongs to themes.attachCssClasses + * on `.dx-viewport` and would change typography/layout. + * + * Returns a Promise so importers can `await` load — otherwise tests that + * assert computed styles race the async fetch. + * + * @param {string} href + * @param {{ themeName?: string }} [options] + * themeName — optional `data-theme` (fluent.blue.light / generic.light / …) + */ +export function injectStylesheet(href, options = {}) { + const existing = document.querySelector(`link[data-dx-esm-css="${href}"]`); + if(existing) { + return waitForStylesheet(existing, href); + } + + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = href; + link.setAttribute('data-dx-esm-css', href); + if(options.themeName) { + link.setAttribute('data-theme', options.themeName); + } + document.head.appendChild(link); + return waitForStylesheet(link, href); +} + +function waitForStylesheet(link, href) { + if(link.sheet || link.dataset.dxEsmCssLoaded === '1') { + return Promise.resolve(); + } + + return new Promise((resolve, reject) => { + const onLoad = () => { + link.dataset.dxEsmCssLoaded = '1'; + resolve(); + }; + const onError = () => { + reject(new Error(`Failed to load stylesheet: ${href}`)); + }; + + link.addEventListener('load', onLoad, { once: true }); + link.addEventListener('error', onError, { once: true }); + + // Cached stylesheets may already be applied before listeners attach + if(link.sheet) { + link.removeEventListener('load', onLoad); + link.removeEventListener('error', onError); + onLoad(); + } + }); +} diff --git a/packages/devextreme/testing/helpers/esm-shims/jquery.js b/packages/devextreme/testing/helpers/esm-shims/jquery.js new file mode 100644 index 000000000000..a6a3df9f758a --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/jquery.js @@ -0,0 +1,17 @@ +/** + * ESM jquery shim for QUnit import-map loader. + * jQuery is loaded via classic script tag before modules run; + * run-suite calls `jQuery.noConflict()` which clears `window.$`. + * Re-attach `$` so suites that use the global alias (without importing + * jquery) keep working. + */ +const $ = window.jQuery; + +if(!$ || typeof $.fn === 'undefined') { + throw new Error('ESM jquery shim: window.jQuery is not available'); +} + +window.$ = $; + +export default $; +export { $ }; diff --git a/packages/devextreme/testing/helpers/esm-shims/jspdf_autotable.js b/packages/devextreme/testing/helpers/esm-shims/jspdf_autotable.js new file mode 100644 index 000000000000..cbd2e5ff587b --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/jspdf_autotable.js @@ -0,0 +1,37 @@ +/** + * jspdf-autotable side-effect import under native ESM. + * The vendor build attaches itself through a CJS require call, which is + * unavailable in the browser — call applyPlugin explicitly instead. + * + * Note: the `.mjs` build exports `autoTable` only as default + * (`export { …, autoTable as default }`), not as a named export. + */ +import { jsPDF } from 'jspdf'; +/* eslint-disable import/named -- vendor ESM re-exports include default + named applyPlugin */ +import autoTable, { + Cell, + CellHookData, + Column, + Row, + Table, + __createTable, + __drawTable, + applyPlugin, +} from '../../../node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.mjs'; +/* eslint-enable import/named */ + +const JsPdfCtor = typeof jsPDF === 'function' ? jsPDF : jsPDF.jsPDF; +applyPlugin(JsPdfCtor); + +export { + Cell, + CellHookData, + Column, + Row, + Table, + __createTable, + __drawTable, + applyPlugin, + autoTable, +}; +export default autoTable; diff --git a/packages/devextreme/testing/helpers/esm-shims/knockout.js b/packages/devextreme/testing/helpers/esm-shims/knockout.js new file mode 100644 index 000000000000..b1f45f77edec --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/knockout.js @@ -0,0 +1,12 @@ +/** + * ESM knockout shim for QUnit import-map loader. + * Knockout is loaded via classic script tag before modules run. + */ +const ko = window.ko; + +if(!ko) { + throw new Error('ESM knockout shim: window.ko is not available'); +} + +export default ko; +export { ko }; diff --git a/packages/devextreme/testing/helpers/esm-shims/material_blue_light.css.js b/packages/devextreme/testing/helpers/esm-shims/material_blue_light.css.js new file mode 100644 index 000000000000..0c9ff647951b --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/material_blue_light.css.js @@ -0,0 +1,5 @@ +import { injectStylesheet } from './injectStylesheet.js'; + +await injectStylesheet('/packages/devextreme/artifacts/css/dx.material.blue.light.css', { + themeName: 'material.blue.light', +}); diff --git a/packages/devextreme/testing/helpers/esm-shims/themes.js b/packages/devextreme/testing/helpers/esm-shims/themes.js new file mode 100644 index 000000000000..3aa9ec10dfa9 --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/themes.js @@ -0,0 +1,48 @@ +/** + * Mutable facade for ui/themes — QUnit stubs replace api.isMaterial / isFluent / + * isMaterialBased / isGeneric / current on the default export object. + * + * Named exports always forward to the current api.* implementation so + * library `import { isMaterial }` keeps working after stubs. + * + * api is stored on globalThis so import-map and static-redirect URLs + * (cache-buster differences) still share one stubbable object. + */ +import * as original from '../../../artifacts/transpiled-esm-npm/esm/__internal/ui/themes.js?dx-original=1'; + +const GLOBAL_KEY = '__dxMutableUiThemes'; + +const api = globalThis[GLOBAL_KEY] ?? (globalThis[GLOBAL_KEY] = { + ...original, + // Keep composition live so stubbing isMaterial / isFluent affects isMaterialBased. + isMaterialBased(themeName) { + return api.isMaterial(themeName) || api.isFluent(themeName); + }, +}); + +function wrapExport(name) { + return function(...args) { + return api[name](...args); + }; +} + +export const setDefaultTimeout = wrapExport('setDefaultTimeout'); +export const init = wrapExport('init'); +export const initialized = wrapExport('initialized'); +export const resetTheme = wrapExport('resetTheme'); +export const ready = wrapExport('ready'); +export const waitWebFont = wrapExport('waitWebFont'); +export const isWebFontLoaded = wrapExport('isWebFontLoaded'); +export const isCompact = wrapExport('isCompact'); +export const isDark = wrapExport('isDark'); +export const isGeneric = wrapExport('isGeneric'); +export const isMaterial = wrapExport('isMaterial'); +export const isFluent = wrapExport('isFluent'); +export const isMaterialBased = wrapExport('isMaterialBased'); +export const detachCssClasses = wrapExport('detachCssClasses'); +export const attachCssClasses = wrapExport('attachCssClasses'); +export const current = wrapExport('current'); +export const waitForThemeLoad = wrapExport('waitForThemeLoad'); +export const isPendingThemeLoaded = wrapExport('isPendingThemeLoaded'); + +export default api; diff --git a/packages/devextreme/testing/helpers/esm-shims/tslib.js b/packages/devextreme/testing/helpers/esm-shims/tslib.js new file mode 100644 index 000000000000..377dace0c5bc --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/tslib.js @@ -0,0 +1,41 @@ +/** + * Minimal tslib fallback for QUnit when the package is not hoisted. + * Covers helpers used by rrule's ESM build. + */ +export function __assign(target) { + for(let i = 1; i < arguments.length; i++) { + const source = arguments[i]; + for(const key in source) { + if(Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; +} + +export function __extends(derived, base) { + Object.setPrototypeOf(derived, base); + function PrototypeBridge() { + this.constructor = derived; + } + PrototypeBridge.prototype = base === null ? Object.create(base) : base.prototype; + // eslint-disable-next-line new-cap, no-new + derived.prototype = new PrototypeBridge(); +} + +export function __spreadArray(to, from, pack) { + if(pack || arguments.length === 2) { + let packed; + for(let i = 0, length = from.length; i < length; i++) { + if(packed || !(i in from)) { + if(!packed) { + packed = Array.prototype.slice.call(from, 0, i); + } + packed[i] = from[i]; + } + } + return to.concat(packed || Array.prototype.slice.call(from)); + } + return to.concat(from); +} diff --git a/packages/devextreme/testing/helpers/esm-shims/zod-to-json-schema.js b/packages/devextreme/testing/helpers/esm-shims/zod-to-json-schema.js new file mode 100644 index 000000000000..c1ce5b58b1a2 --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/zod-to-json-schema.js @@ -0,0 +1,8 @@ +/** + * Minimal zod-to-json-schema stub for QUnit ESM / import-map loader. + */ +export function zodToJsonSchema() { + return { type: 'object' }; +} + +export default zodToJsonSchema; diff --git a/packages/devextreme/testing/helpers/esm-shims/zod.js b/packages/devextreme/testing/helpers/esm-shims/zod.js new file mode 100644 index 000000000000..489d0bbcf5ba --- /dev/null +++ b/packages/devextreme/testing/helpers/esm-shims/zod.js @@ -0,0 +1,35 @@ +/** + * Minimal zod stub for QUnit ESM / import-map loader. + */ +const z = { + object() { return z; }, + string() { return z; }, + boolean() { return z; }, + number() { return z; }, + date() { return z; }, + null() { return z; }, + enum() { return z; }, + union() { return z; }, + array() { return z; }, + tuple() { return z; }, + literal() { return z; }, + record() { return z; }, + lazy() { return z; }, + optional() { return z; }, + nullable() { return z; }, + // eslint-disable-next-line spellcheck/spell-checker + nullish() { return z; }, + strict() { return z; }, + int() { return z; }, + // eslint-disable-next-line spellcheck/spell-checker + nonnegative() { return z; }, + positive() { return z; }, + min() { return z; }, + max() { return z; }, + transform() { return z; }, + describe() { return z; }, + safeParse() { return { success: true, data: {} }; }, +}; + +export { z }; +export default z; diff --git a/packages/devextreme/testing/helpers/executeAsyncMock.js b/packages/devextreme/testing/helpers/executeAsyncMock.js index cd52380fd3a7..5da48be090e1 100644 --- a/packages/devextreme/testing/helpers/executeAsyncMock.js +++ b/packages/devextreme/testing/helpers/executeAsyncMock.js @@ -1,28 +1,20 @@ -(function(root, factory) { - root.DevExpress = root.DevExpress || {}; - root.DevExpress.testing = root.DevExpress.testing || {}; +import commonUtils from '__internal/core/utils/m_common'; - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.DevExpress.testing.executeAsyncMock = module.exports = factory(require('__internal/core/utils/m_common').default); - }); - } else { - root.DevExpress.testing.executeAsyncMock = factory(DevExpress.utils.common); - } -}(window, function(commonUtils) { - const originalExecuteAsync = commonUtils.executeAsync; - - return { - setup: function() { - commonUtils.executeAsync = function(action, context) { - return originalExecuteAsync.apply(this, [action, context, function(callback) { return callback.apply(this, arguments); }]); - }; - }, - teardown: function() { - commonUtils.executeAsync = originalExecuteAsync; - } - }; +const originalExecuteAsync = commonUtils.executeAsync; -})); +const executeAsyncMock = { + setup: function() { + commonUtils.executeAsync = function(action, context) { + return originalExecuteAsync.apply(this, [action, context, function(callback) { return callback.apply(this, arguments); }]); + }; + }, + teardown: function() { + commonUtils.executeAsync = originalExecuteAsync; + } +}; +window.DevExpress = window.DevExpress || {}; +window.DevExpress.testing = window.DevExpress.testing || {}; +window.DevExpress.testing.executeAsyncMock = executeAsyncMock; +export default executeAsyncMock; diff --git a/packages/devextreme/testing/helpers/exportMocks.js b/packages/devextreme/testing/helpers/exportMocks.js index 9e7f6998f16b..d6eab28c27fc 100644 --- a/packages/devextreme/testing/helpers/exportMocks.js +++ b/packages/devextreme/testing/helpers/exportMocks.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; exports.MockDataProvider = function(data, columns) { data = data || [ diff --git a/packages/devextreme/testing/helpers/includeThemesLinks.js b/packages/devextreme/testing/helpers/includeThemesLinks.js index a6e01e6d0104..6d8b3d53ee93 100644 --- a/packages/devextreme/testing/helpers/includeThemesLinks.js +++ b/packages/devextreme/testing/helpers/includeThemesLinks.js @@ -1,9 +1,12 @@ -const themesList = ['generic.light', 'material.blue.light']; +const themesList = [ + { name: 'generic.light', href: '/packages/devextreme/artifacts/css/dx.light.css' }, + { name: 'material.blue.light', href: '/packages/devextreme/artifacts/css/dx.material.blue.light.css' }, +]; -themesList.forEach(theme => { +themesList.forEach(({ name, href }) => { const link = document.createElement('link'); link.setAttribute('rel', 'dx-theme'); - link.setAttribute('data-theme', theme); - link.setAttribute('href', SystemJS.normalizeSync(theme.replace(/\./g, '_') + '.css')); + link.setAttribute('data-theme', name); + link.setAttribute('href', href); document.head.appendChild(link); }); diff --git a/packages/devextreme/testing/helpers/keyboardMock.js b/packages/devextreme/testing/helpers/keyboardMock.js index ade1eefd1974..1107d8978d43 100644 --- a/packages/devextreme/testing/helpers/keyboardMock.js +++ b/packages/devextreme/testing/helpers/keyboardMock.js @@ -1,16 +1,8 @@ -let focused; - -(function(root, factory) { - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - focused = require('__internal/core/utils/m_selectors').focused; - root.keyboardMock = module.exports = factory(require('jquery'), require('inferno')); - }); - } else { - focused = DevExpress.require('__internal/core/utils/m_selectors').focused; - root.keyboardMock = factory(root.jQuery); - } -}(window, function($, inferno) { +import $ from 'jquery'; +import * as inferno from 'inferno'; +import { focused } from '__internal/core/utils/m_selectors'; + +const keyboardMock = (function($, inferno) { let $element; let caret; @@ -427,4 +419,6 @@ let focused; } }; }; -})); +})($, inferno); + +export default keyboardMock; diff --git a/packages/devextreme/testing/helpers/memoryLeaksHelper.js b/packages/devextreme/testing/helpers/memoryLeaksHelper.js index 6a4efcca90a9..bab8140b8826 100644 --- a/packages/devextreme/testing/helpers/memoryLeaksHelper.js +++ b/packages/devextreme/testing/helpers/memoryLeaksHelper.js @@ -1,17 +1,6 @@ -(function(root, factory) { - /* global jQuery */ - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.memoryLeaksHelper = module.exports = factory( - require('jquery') - ); - }); - } else { - jQuery.extend(window, factory( - jQuery - )); - } -}(window, function($) { +import $ from 'jquery'; + +const __moduleExports = (function($) { const exports = {}; @@ -142,4 +131,8 @@ }; return exports; -})); +})($); + +window.memoryLeaksHelper = __moduleExports; + +export default __moduleExports; diff --git a/packages/devextreme/testing/helpers/mockModule.js b/packages/devextreme/testing/helpers/mockModule.js deleted file mode 100644 index 5864029817d4..000000000000 --- a/packages/devextreme/testing/helpers/mockModule.js +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-disable no-undef */ - -const $ = require('jquery'); - -exports.mock = (module, value) => { - const normalizedName = System.normalizeSync(module); - System.delete(normalizedName); - value.__esModule = true; - $.extend({ default: value }); - System.set(normalizedName, System.newModule($.extend({ default: value }, value))); - return value; -}; diff --git a/packages/devextreme/testing/helpers/moduleSeam.js b/packages/devextreme/testing/helpers/moduleSeam.js new file mode 100644 index 000000000000..0f02d142dab4 --- /dev/null +++ b/packages/devextreme/testing/helpers/moduleSeam.js @@ -0,0 +1,18 @@ +/* global sinon */ + +export function installSeam(module, name, replacement, setterName = `DEBUG_set_${name}`) { + const original = module[name]; + + replacement.restore = () => module[setterName](original); + module[setterName](replacement); + + return replacement; +} + +export function spySeam(module, name, setterName) { + return installSeam(module, name, sinon.spy(module[name]), setterName); +} + +export function stubSeam(module, name, setterName) { + return installSeam(module, name, sinon.stub(), setterName); +} diff --git a/packages/devextreme/testing/helpers/nativePointerMock.js b/packages/devextreme/testing/helpers/nativePointerMock.js index fab9e3227981..c50749f0d0f5 100644 --- a/packages/devextreme/testing/helpers/nativePointerMock.js +++ b/packages/devextreme/testing/helpers/nativePointerMock.js @@ -1,13 +1,6 @@ -(function(root, factory) { - /* global jQuery */ - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.nativePointerMock = module.exports = factory(require('jquery')); - }); - } else { - root.nativePointerMock = factory(jQuery); - } -}(window, function($) { +import $ from 'jquery'; + +const __moduleExports = (function($) { const UA = (function() { const ua = window.navigator.userAgent; let matches; @@ -980,4 +973,8 @@ return result; -})); +})($); + +window.nativePointerMock = __moduleExports; + +export default __moduleExports; diff --git a/packages/devextreme/testing/helpers/noDiagram.js b/packages/devextreme/testing/helpers/noDiagram.js index 1d0e288bbae3..189f31a52683 100644 --- a/packages/devextreme/testing/helpers/noDiagram.js +++ b/packages/devextreme/testing/helpers/noDiagram.js @@ -1,4 +1,4 @@ if(window.DevExpress) { window.DevExpress.diagram = undefined; } -module.exports = null; +export default null; diff --git a/packages/devextreme/testing/helpers/noGantt.js b/packages/devextreme/testing/helpers/noGantt.js index ed0a8a552761..abc0e1f6294f 100644 --- a/packages/devextreme/testing/helpers/noGantt.js +++ b/packages/devextreme/testing/helpers/noGantt.js @@ -1,4 +1,4 @@ if(window.DevExpress) { window.DevExpress.Gantt = undefined; } -module.exports = null; +export default null; diff --git a/packages/devextreme/testing/helpers/noJQuery.js b/packages/devextreme/testing/helpers/noJQuery.js index 25af527694e7..7646bbd17d04 100644 --- a/packages/devextreme/testing/helpers/noJQuery.js +++ b/packages/devextreme/testing/helpers/noJQuery.js @@ -1 +1 @@ -window.jQuery = module.exports = null; +export default null; diff --git a/packages/devextreme/testing/helpers/pointerMock.js b/packages/devextreme/testing/helpers/pointerMock.js index 439c852ea5b6..6b89ba1b2301 100644 --- a/packages/devextreme/testing/helpers/pointerMock.js +++ b/packages/devextreme/testing/helpers/pointerMock.js @@ -1,17 +1,9 @@ -(function(root, factory) { - /* global jQuery */ - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.pointerMock = module.exports = factory( - require('jquery'), - require('inferno'), - require('common/core/events/gesture/emitter.gesture'), - require('common/core/events/click')); - }); - } else { - root.pointerMock = factory(jQuery, DevExpress.events.GestureEmitter, DevExpress.events.click); - } -}(window, function($, inferno, GestureEmitter, clickEvent) { +import $ from 'jquery'; +import * as inferno from 'inferno'; +import GestureEmitter from 'common/core/events/gesture/emitter.gesture'; +import * as clickEvent from 'common/core/events/click'; + +const pointerMock = (function($, inferno, GestureEmitter, clickEvent) { GestureEmitter.touchBoundary(0); @@ -236,4 +228,6 @@ } }; }; -})); +})($, inferno, GestureEmitter, clickEvent); + +export default pointerMock; diff --git a/packages/devextreme/testing/helpers/positionFixtures.js b/packages/devextreme/testing/helpers/positionFixtures.js index cada61dab25b..978a65f1fabc 100644 --- a/packages/devextreme/testing/helpers/positionFixtures.js +++ b/packages/devextreme/testing/helpers/positionFixtures.js @@ -1,12 +1,6 @@ -(function(root, factory) { - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.fixtures = module.exports = factory(require('jquery')); - }); - } else { - root.fixtures = factory(root.jQuery); - } -}(window, function($) { +import $ from 'jquery'; + +const __moduleExports = (function($) { const fixtures = { simple: { @@ -258,4 +252,8 @@ }; return fixtures; -})); +})($); + +window.fixtures = __moduleExports; + +export default __moduleExports; diff --git a/packages/devextreme/testing/helpers/publicModulesHelper.js b/packages/devextreme/testing/helpers/publicModulesHelper.js index bff3366338de..3c39a4f42755 100644 --- a/packages/devextreme/testing/helpers/publicModulesHelper.js +++ b/packages/devextreme/testing/helpers/publicModulesHelper.js @@ -1,12 +1,6 @@ -(function(root, factory) { - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - root.testGlobalExports = module.exports = factory(require('jquery')); - }); - } else { - root.testGlobalExports = factory(root.jQuery); - } -}(window, function($) { +import $ from 'jquery'; + +const __moduleExports = (function($) { return function(namespaces, fields) { $.each(namespaces, function(namespaceName, namespace) { $.each(fields, function(fieldName, fieldValue) { @@ -17,4 +11,8 @@ }); }); }; -})); +})($); + +window.testGlobalExports = __moduleExports; + +export default __moduleExports; diff --git a/packages/devextreme/testing/helpers/quillDependencies/noQuill.js b/packages/devextreme/testing/helpers/quillDependencies/noQuill.js index e45fa7973937..3b197fe204b6 100644 --- a/packages/devextreme/testing/helpers/quillDependencies/noQuill.js +++ b/packages/devextreme/testing/helpers/quillDependencies/noQuill.js @@ -1 +1,2 @@ -window.Quill = module.exports = null; +window.Quill = null; +export default null; diff --git a/packages/devextreme/testing/helpers/qunitExtensions.js b/packages/devextreme/testing/helpers/qunitExtensions.js index c7b3344d568b..75507728a1bb 100644 --- a/packages/devextreme/testing/helpers/qunitExtensions.js +++ b/packages/devextreme/testing/helpers/qunitExtensions.js @@ -514,7 +514,7 @@ if(timerType === 'timeouts') { if( callback.indexOf('.Deferred.exceptionHook') > -1 || // NOTE: jQuery.Deferred are now asynchronous - callback.indexOf('e._drain()') > -1 // NOTE: SystemJS Promise polyfill + callback.indexOf('e._drain()') > -1 // NOTE: legacy Promise polyfill ) { return true; } diff --git a/packages/devextreme/testing/helpers/renovationScrollViewHelper.js b/packages/devextreme/testing/helpers/renovationScrollViewHelper.js index c64026d17a8e..64c7d0e96760 100644 --- a/packages/devextreme/testing/helpers/renovationScrollViewHelper.js +++ b/packages/devextreme/testing/helpers/renovationScrollViewHelper.js @@ -1,9 +1,9 @@ -const RenovatedScrollView = require('renovation/ui/scroll_view/scroll_view.j.js'); +import RenovatedScrollView from 'renovation/ui/scroll_view/scroll_view.j.js'; // eslint-disable-next-line spellcheck/spell-checker -const reRender = require('inferno').rerender; -const Deferred = require('core/utils/deferred').Deferred; +import { rerender as reRender } from 'inferno'; +import { Deferred } from 'core/utils/deferred'; -exports.WrappedWidget = class WrappedWidget extends RenovatedScrollView { +export class WrappedWidget extends RenovatedScrollView { _initMarkup() { super._initMarkup.apply(this, arguments); @@ -82,4 +82,4 @@ exports.WrappedWidget = class WrappedWidget extends RenovatedScrollView { return new Deferred().resolve(); } -}; +} diff --git a/packages/devextreme/testing/helpers/renovationScrollableHelper.js b/packages/devextreme/testing/helpers/renovationScrollableHelper.js index a40b168a796a..62e25aa7b735 100644 --- a/packages/devextreme/testing/helpers/renovationScrollableHelper.js +++ b/packages/devextreme/testing/helpers/renovationScrollableHelper.js @@ -1,8 +1,8 @@ -const RenovatedScrollable = require('renovation/ui/scroll_view/scrollable.j.js'); +import RenovatedScrollable from 'renovation/ui/scroll_view/scrollable.j.js'; // eslint-disable-next-line spellcheck/spell-checker -const reRender = require('inferno').rerender; +import { rerender as reRender } from 'inferno'; -exports.WrappedWidget = class WrappedWidget extends RenovatedScrollable { +export class WrappedWidget extends RenovatedScrollable { _initMarkup() { super._initMarkup.apply(this, arguments); @@ -59,4 +59,4 @@ exports.WrappedWidget = class WrappedWidget extends RenovatedScrollable { super.scrollToElement.apply(this, arguments); reRender(); } -}; +} diff --git a/packages/devextreme/testing/helpers/serverSideDOMAdapterPatch.js b/packages/devextreme/testing/helpers/serverSideDOMAdapterPatch.js index d5cdcebf932a..17fefbb7f08a 100644 --- a/packages/devextreme/testing/helpers/serverSideDOMAdapterPatch.js +++ b/packages/devextreme/testing/helpers/serverSideDOMAdapterPatch.js @@ -1,5 +1,5 @@ -const domAdapter = require('core/dom_adapter'); -const readyCallbacks = require('core/utils/ready_callbacks'); +import domAdapter from 'core/dom_adapter'; +import readyCallbacks from 'core/utils/ready_callbacks'; const documentMock = (function() { const documentMock = { @@ -20,7 +20,7 @@ const documentMock = (function() { return documentMock; })(); -exports.set = function() { +export function set() { // Emulate Angular DOM Adapter considering it's restricitons domAdapter.inject({ // `document` should be used only as is @@ -73,4 +73,4 @@ exports.set = function() { // Ready callbacks should be fired by the integration readyCallbacks.fire(); -}; +} diff --git a/packages/devextreme/testing/helpers/ssrEmulator.js b/packages/devextreme/testing/helpers/ssrEmulator.js index 80b30943691b..59c00165506b 100644 --- a/packages/devextreme/testing/helpers/ssrEmulator.js +++ b/packages/devextreme/testing/helpers/ssrEmulator.js @@ -1,6 +1,6 @@ import domAdapter from '__internal/core/m_dom_adapter'; import windowUtils from 'core/utils/window'; -import serverSideDOMAdapter from './serverSideDOMAdapterPatch.js'; +import { set as setServerSideDOMAdapter } from './serverSideDOMAdapterPatch.js'; (function emulateNoContains() { const originalContains = Element.prototype.contains; @@ -229,5 +229,5 @@ QUnit.begin(function() { // Now domAdapter is allowed to use restoreOriginalDomAdapter(); // Emulate DOMAdapter integration - serverSideDOMAdapter.set(); + setServerSideDOMAdapter(); }); diff --git a/packages/devextreme/testing/helpers/stubs/zodStub.js b/packages/devextreme/testing/helpers/stubs/zodStub.js deleted file mode 100644 index 668e5fd8ecd2..000000000000 --- a/packages/devextreme/testing/helpers/stubs/zodStub.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Minimal zod stub for QUnit / SystemJS tests. - * - * Uses AMD define() when available (CSP mode) and falls back - * to global assignment for regular SystemJS (NoCsp mode). - */ - -(function() { - const z = { - // top-level constructors - object: function() { return z; }, - string: function() { return z; }, - boolean: function() { return z; }, - number: function() { return z; }, - date: function() { return z; }, - null: function() { return z; }, - enum: function() { return z; }, - union: function() { return z; }, - array: function() { return z; }, - tuple: function() { return z; }, - literal: function() { return z; }, - record: function() { return z; }, - lazy: function() { return z; }, - // chain modifiers - optional: function() { return z; }, - nullable: function() { return z; }, - // eslint-disable-next-line spellcheck/spell-checker - nullish: function() { return z; }, - strict: function() { return z; }, - int: function() { return z; }, - // eslint-disable-next-line spellcheck/spell-checker - nonnegative: function() { return z; }, - positive: function() { return z; }, - min: function() { return z; }, - max: function() { return z; }, - transform: function() { return z; }, - describe: function() { return z; }, - // validation - safeParse: function() { return { success: true, data: {} }; }, - }; - - if(typeof define === 'function') { - define(function(require, exports) { - Object.defineProperty(exports, '__esModule', { value: true }); - exports.z = z; - exports.default = z; - }); - } else { - const root = typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : globalThis; - root.z = z; - root.zod = z; - } -})(); diff --git a/packages/devextreme/testing/helpers/stubs/zodToJsonSchemaStub.js b/packages/devextreme/testing/helpers/stubs/zodToJsonSchemaStub.js deleted file mode 100644 index a7aa7e3e9d70..000000000000 --- a/packages/devextreme/testing/helpers/stubs/zodToJsonSchemaStub.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Minimal zod-to-json-schema stub for QUnit / SystemJS tests. - * - * Uses AMD define() when available (CSP mode) and falls back - * to global assignment for regular SystemJS (NoCsp mode). - */ - -(function() { - const zodToJsonSchema = function() { return { type: 'object' }; }; - - if(typeof define === 'function') { - define(function(require, exports) { - Object.defineProperty(exports, '__esModule', { value: true }); - exports.zodToJsonSchema = zodToJsonSchema; - exports.default = zodToJsonSchema; - }); - } else { - const root = typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : globalThis; - root.zodToJsonSchema = zodToJsonSchema; - } -})(); diff --git a/packages/devextreme/testing/helpers/trackerMock.js b/packages/devextreme/testing/helpers/trackerMock.js index 745abb5717e9..9b8a6f7e513c 100644 --- a/packages/devextreme/testing/helpers/trackerMock.js +++ b/packages/devextreme/testing/helpers/trackerMock.js @@ -1,16 +1,13 @@ -const mock = require('./mockModule.js').mock; -const vizMocks = require('./vizMocks.js'); -const { ChartTracker, PieTracker } = require('viz/chart_components/tracker'); -const ChartTrackerStub = vizMocks.stubClass(ChartTracker); -const PieTrackerStub = vizMocks.stubClass(PieTracker); +import { stubClass } from './vizMocks.js'; +import trackerModule from 'viz/chart_components/tracker'; -const trackerModule = mock('viz/chart_components/tracker', { - ChartTracker: sinon.spy((parameters) => new ChartTrackerStub(parameters)), - PieTracker: sinon.spy((parameters) => new PieTrackerStub(parameters)) -}); +const ChartTrackerStub = stubClass(trackerModule.ChartTracker); +const PieTrackerStub = stubClass(trackerModule.PieTracker); -exports.default = trackerModule; -exports.__esModule = true; +trackerModule.ChartTracker = sinon.spy((parameters) => new ChartTrackerStub(parameters)); +trackerModule.PieTracker = sinon.spy((parameters) => new PieTrackerStub(parameters)); -exports.ChartTracker = trackerModule.ChartTracker; -exports.PieTracker = trackerModule.PieTracker; +export default trackerModule; + +export const ChartTracker = trackerModule.ChartTracker; +export const PieTracker = trackerModule.PieTracker; diff --git a/packages/devextreme/testing/helpers/treeListMocks.js b/packages/devextreme/testing/helpers/treeListMocks.js index 45f1d23b83e0..fcb1a8d606a1 100644 --- a/packages/devextreme/testing/helpers/treeListMocks.js +++ b/packages/devextreme/testing/helpers/treeListMocks.js @@ -1,32 +1,44 @@ -let gridBaseMock; +import $ from 'jquery'; +import treeListCoreModule from '__internal/grids/tree_list/m_core'; +import domUtilsModule from '__internal/core/utils/m_dom'; +import commonUtilsModule from '__internal/core/utils/m_common'; +import typeUtilsModule from '__internal/core/utils/m_type'; +import ArrayStoreModule from 'common/data/array_store'; +import gridBaseMockModule from './gridBaseMocks.js'; -/* global jQuery */ -if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - gridBaseMock = require('./gridBaseMocks.js'); +const gridBaseMock = gridBaseMockModule.default ?? gridBaseMockModule; +const treeListCore = treeListCoreModule.default ?? treeListCoreModule; +const domUtils = domUtilsModule.default ?? domUtilsModule; +const commonUtils = commonUtilsModule.default ?? commonUtilsModule; +const typeUtils = typeUtilsModule.default ?? typeUtilsModule; +const ArrayStore = ArrayStoreModule.default ?? ArrayStoreModule; - window.treeListMocks = module.exports = gridBaseMock( - require('jquery'), - require('__internal/grids/tree_list/m_core').default, - null, - require('__internal/core/utils/m_dom'), - require('__internal/core/utils/m_common'), - require('__internal/core/utils/m_type'), - require('common/data/array_store'), - 'TreeList' - ); - }); -} else { - gridBaseMock = require('./gridBaseMocks.js'); +const treeListMocks = gridBaseMock( + $, + treeListCore, + null, + domUtils, + commonUtils, + typeUtils, + ArrayStore, + 'TreeList' +); - jQuery.extend(window, gridBaseMock( - jQuery, - DevExpress.require('__internal/grids/tree_list/m_core'), - null, - DevExpress.require('__internal/core/utils/m_dom'), - DevExpress.require('__internal/core/utils/m_common'), - DevExpress.require('__internal/core/utils/m_type'), - DevExpress.require('common/data/array_store'), - 'TreeList' - )); -} +window.treeListMocks = treeListMocks; + +export const setupTreeListModules = treeListMocks.setupTreeListModules; +export const MockDataController = treeListMocks.MockDataController; +export const MockEditingController = treeListMocks.MockEditingController; +export const MockSelectionController = treeListMocks.MockSelectionController; +export const MockColumnsController = treeListMocks.MockColumnsController; +export const MockTablePositionViewController = treeListMocks.MockTablePositionViewController; +export const MockGridDataSource = treeListMocks.MockGridDataSource; +export const getCells = treeListMocks.getCells; +export const MockColumnsSeparatorView = treeListMocks.MockColumnsSeparatorView; +export const MockTrackerView = treeListMocks.MockTrackerView; +export const MockDraggingPanel = treeListMocks.MockDraggingPanel; +export const TestDraggingHeader = treeListMocks.TestDraggingHeader; +export const generateItems = treeListMocks.generateItems; +export const generateNestedData = treeListMocks.generateNestedData; + +export default treeListMocks; diff --git a/packages/devextreme/testing/helpers/visibilityChangeMock.js b/packages/devextreme/testing/helpers/visibilityChangeMock.js new file mode 100644 index 000000000000..01ff2d64e372 --- /dev/null +++ b/packages/devextreme/testing/helpers/visibilityChangeMock.js @@ -0,0 +1,11 @@ +import * as visibilityChange from 'common/core/events/visibility_change'; + +import { spySeam, stubSeam } from './moduleSeam.js'; + +export function spyVisibilityEvent(name) { + return spySeam(visibilityChange, name); +} + +export function stubVisibilityEvent(name) { + return stubSeam(visibilityChange, name); +} diff --git a/packages/devextreme/testing/helpers/vizMocks.js b/packages/devextreme/testing/helpers/vizMocks.js index ae1a8310d41b..19d5b610f701 100644 --- a/packages/devextreme/testing/helpers/vizMocks.js +++ b/packages/devextreme/testing/helpers/vizMocks.js @@ -1,16 +1,16 @@ /* global currentAssert, currentTest, sinon */ import $ from 'jquery'; -import * as tooltipModule from 'viz/core/tooltip'; -import * as titleModule from 'viz/core/title'; +import tooltipModule from 'viz/core/tooltip'; +import titleModule from 'viz/core/title'; import legendModule from 'viz/components/legend'; import axisModule from 'viz/axes/base_axis'; -import * as pointModule from 'viz/series/points/base_point'; +import pointModule from 'viz/series/points/base_point'; import { Series } from 'viz/series/base_series'; -import * as loadingIndicatorModule from 'viz/core/loading_indicator'; -import * as exportMenuModule from 'viz/core/export'; +import loadingIndicatorModule from 'viz/core/loading_indicator'; +import exportMenuModule from 'viz/core/export'; import rendererModule from 'viz/core/renderers/renderer_default'; -import * as errors from 'viz/core/errors_warnings'; +import errors from 'viz/core/errors_warnings'; import * as baseWidgetUtils from '__internal/viz/core/base_widget.utils'; import * as typeUtils from 'core/utils/type'; @@ -377,7 +377,17 @@ const Point = stubClass(pointModule.Point); const Legend = stubClass(legendModule.Legend); const Title = stubClass(titleModule.Title); const Tooltip = stubClass(tooltipModule.Tooltip); -const Axis = stubClass(axisModule.Axis); +// ESM npm artifacts strip /// #DEBUG methods (removeDebug: true). +// Restore the ones gauges/charts call on mocks (kept in legacy CJS transpile). +const Axis = stubClass(axisModule.Axis, null, { + $extraFunctions: [ + 'shift', + '_getTickMarkPoints', + '_validateOverlappingMode', + '_getStep', + '_validateDisplayMode', + ], +}); const SeriesStub = stubClass(Series); export { diff --git a/packages/devextreme/testing/helpers/widgetsList.js b/packages/devextreme/testing/helpers/widgetsList.js index 39a55a632040..eaf7b2dc9221 100644 --- a/packages/devextreme/testing/helpers/widgetsList.js +++ b/packages/devextreme/testing/helpers/widgetsList.js @@ -1,87 +1,159 @@ +import Accordion from 'ui/accordion'; +import ActionSheet from 'ui/action_sheet'; +import Autocomplete from 'ui/autocomplete'; +import BarGauge from 'viz/bar_gauge'; +import Box from 'ui/box'; +import Bullet from 'viz/bullet'; +import Button from 'ui/button'; +import Calendar from 'ui/calendar'; +import Chart from 'viz/chart'; +import CheckBox from 'ui/check_box'; +import CircularGauge from 'viz/circular_gauge'; +import ColorBox from 'ui/color_box'; +import ContextMenu from 'ui/context_menu'; +import DataGrid from 'ui/data_grid'; +import DateBox from 'ui/date_box'; +import DateRangeBox from 'ui/date_range_box'; +import Drawer from 'ui/drawer'; +import DropDownBox from 'ui/drop_down_box'; +import FileManager from 'ui/file_manager'; +import FileUploader from 'ui/file_uploader'; +import FilterBuilder from 'ui/filter_builder'; +import Form from 'ui/form'; +import Funnel from 'viz/funnel'; +import Gallery from 'ui/gallery'; +import Gantt from 'ui/gantt'; +import HtmlEditor from 'ui/html_editor'; +import LinearGauge from 'viz/linear_gauge'; +import List from 'ui/list'; +import LoadIndicator from 'ui/load_indicator'; +import LoadPanel from 'ui/load_panel'; +import Lookup from 'ui/lookup'; +import Map from 'ui/map'; +import Menu from 'ui/menu'; +import MultiView from 'ui/multi_view'; +import NumberBox from 'ui/number_box'; +import PieChart from 'viz/pie_chart'; +import PivotGrid from 'ui/pivot_grid'; +import PivotGridFieldChooser from 'ui/pivot_grid_field_chooser'; +import PolarChart from 'viz/polar_chart'; +import Popover from 'ui/popover'; +import Popup from 'ui/popup'; +import ProgressBar from 'ui/progress_bar'; +import RangeSelector from 'viz/range_selector'; +import RangeSlider from 'ui/range_slider'; +import RadioGroup from 'ui/radio_group'; +import Resizable from 'ui/resizable'; +import ResponsiveBox from 'ui/responsive_box'; +import Sankey from 'viz/sankey'; +import Scheduler from 'ui/scheduler'; +import ScrollView from 'ui/scroll_view'; +import SelectBox from 'ui/select_box'; +import Slider from 'ui/slider'; +import Sparkline from 'viz/sparkline'; +import Switch from 'ui/switch'; +import TabPanel from 'ui/tab_panel'; +import Tabs from 'ui/tabs'; +import TagBox from 'ui/tag_box'; +import TextArea from 'ui/text_area'; +import TextBox from 'ui/text_box'; +import TileView from 'ui/tile_view'; +import Toast from 'ui/toast'; +import Toolbar from 'ui/toolbar'; +import Tooltip from 'ui/tooltip'; +import TreeList from 'ui/tree_list'; +import TreeMap from 'viz/tree_map'; +import TreeView from 'ui/tree_view'; +import ValidationGroup from 'ui/validation_group'; +import ValidationSummary from 'ui/validation_summary'; +import VectorMap from 'viz/vector_map'; +import DropDownButton from 'ui/drop_down_button'; +import DxDropDownEditor from 'ui/drop_down_editor/ui.drop_down_editor'; +import DxDropDownList from 'ui/drop_down_editor/ui.drop_down_list'; + const widgetsList = { - Accordion: require('ui/accordion'), - ActionSheet: require('ui/action_sheet'), - Autocomplete: require('ui/autocomplete'), - BarGauge: require('viz/bar_gauge'), - Box: require('ui/box'), - Bullet: require('viz/bullet'), - Button: require('ui/button'), - Calendar: require('ui/calendar'), - Chart: require('viz/chart'), - CheckBox: require('ui/check_box'), - CircularGauge: require('viz/circular_gauge'), - ColorBox: require('ui/color_box'), - ContextMenu: require('ui/context_menu'), - DataGrid: require('ui/data_grid'), - DateBox: require('ui/date_box'), - DateRangeBox: require('ui/date_range_box'), - Drawer: require('ui/drawer'), - DropDownBox: require('ui/drop_down_box'), - FileManager: require('ui/file_manager'), - FileUploader: require('ui/file_uploader'), - FilterBuilder: require('ui/filter_builder'), - Form: require('ui/form'), - Funnel: require('viz/funnel'), - Gallery: require('ui/gallery'), - Gantt: require('ui/gantt'), - HtmlEditor: require('ui/html_editor'), - LinearGauge: require('viz/linear_gauge'), - List: require('ui/list'), - LoadIndicator: require('ui/load_indicator'), - LoadPanel: require('ui/load_panel'), - Lookup: require('ui/lookup'), - Map: require('ui/map'), - Menu: require('ui/menu'), - MultiView: require('ui/multi_view'), - NumberBox: require('ui/number_box'), - PieChart: require('viz/pie_chart'), - PivotGrid: require('ui/pivot_grid'), - PivotGridFieldChooser: require('ui/pivot_grid_field_chooser'), - PolarChart: require('viz/polar_chart'), - Popover: require('ui/popover'), - Popup: require('ui/popup'), - ProgressBar: require('ui/progress_bar'), - RangeSelector: require('viz/range_selector'), - RangeSlider: require('ui/range_slider'), - RadioGroup: require('ui/radio_group'), - Resizable: require('ui/resizable'), - ResponsiveBox: require('ui/responsive_box'), - Sankey: require('viz/sankey'), - Scheduler: require('ui/scheduler'), - ScrollView: require('ui/scroll_view'), - SelectBox: require('ui/select_box'), - Slider: require('ui/slider'), - Sparkline: require('viz/sparkline'), - Switch: require('ui/switch'), - TabPanel: require('ui/tab_panel'), - Tabs: require('ui/tabs'), - TagBox: require('ui/tag_box'), - TextArea: require('ui/text_area'), - TextBox: require('ui/text_box'), - TileView: require('ui/tile_view'), - Toast: require('ui/toast'), - Toolbar: require('ui/toolbar'), - Tooltip: require('ui/tooltip'), - TreeList: require('ui/tree_list'), - TreeMap: require('viz/tree_map'), - TreeView: require('ui/tree_view'), - ValidationGroup: require('ui/validation_group'), - ValidationSummary: require('ui/validation_summary'), - VectorMap: require('viz/vector_map') + Accordion, + ActionSheet, + Autocomplete, + BarGauge, + Box, + Bullet, + Button, + Calendar, + Chart, + CheckBox, + CircularGauge, + ColorBox, + ContextMenu, + DataGrid, + DateBox, + DateRangeBox, + Drawer, + DropDownBox, + FileManager, + FileUploader, + FilterBuilder, + Form, + Funnel, + Gallery, + Gantt, + HtmlEditor, + LinearGauge, + List, + LoadIndicator, + LoadPanel, + Lookup, + Map, + Menu, + MultiView, + NumberBox, + PieChart, + PivotGrid, + PivotGridFieldChooser, + PolarChart, + Popover, + Popup, + ProgressBar, + RangeSelector, + RangeSlider, + RadioGroup, + Resizable, + ResponsiveBox, + Sankey, + Scheduler, + ScrollView, + SelectBox, + Slider, + Sparkline, + Switch, + TabPanel, + Tabs, + TagBox, + TextArea, + TextBox, + TileView, + Toast, + Toolbar, + Tooltip, + TreeList, + TreeMap, + TreeView, + ValidationGroup, + ValidationSummary, + VectorMap }; const dropDownEditorsList = { - dxAutocomplete: require('ui/autocomplete'), - dxColorBox: require('ui/color_box'), - dxDateBox: require('ui/date_box'), - dxDateRangeBox: require('ui/date_range_box'), - dxDropDownBox: require('ui/drop_down_box'), - dxDropDownButton: require('ui/drop_down_button'), - dxSelectBox: require('ui/select_box'), - dxTagBox: require('ui/tag_box'), - dxDropDownEditor: require('ui/drop_down_editor/ui.drop_down_editor'), - dxDropDownList: require('ui/drop_down_editor/ui.drop_down_list'), + dxAutocomplete: Autocomplete, + dxColorBox: ColorBox, + dxDateBox: DateBox, + dxDateRangeBox: DateRangeBox, + dxDropDownBox: DropDownBox, + dxDropDownButton: DropDownButton, + dxSelectBox: SelectBox, + dxTagBox: TagBox, + dxDropDownEditor: DxDropDownEditor, + dxDropDownList: DxDropDownList, }; -exports.widgetsList = widgetsList; -exports.dropDownEditorsList = dropDownEditorsList; +export { widgetsList, dropDownEditorsList }; diff --git a/packages/devextreme/testing/helpers/wrapRenovatedWidget.js b/packages/devextreme/testing/helpers/wrapRenovatedWidget.js index 318697106789..6de4bb42ab62 100644 --- a/packages/devextreme/testing/helpers/wrapRenovatedWidget.js +++ b/packages/devextreme/testing/helpers/wrapRenovatedWidget.js @@ -1,7 +1,7 @@ // eslint-disable-next-line spellcheck/spell-checker -const reRender = require('inferno').rerender; +import { rerender as reRender } from 'inferno'; -exports.wrapRenovatedWidget = function wrapRenovatedWidget(renovatedWidget) { +export function wrapRenovatedWidget(renovatedWidget) { class WrappedWidget extends renovatedWidget { callMethod(name, ...args) { const result = super[name](...args); @@ -28,4 +28,4 @@ exports.wrapRenovatedWidget = function wrapRenovatedWidget(renovatedWidget) { const result = WrappedWidget; result.IS_RENOVATED_WIDGET = true; return result; -}; +} diff --git a/packages/devextreme/testing/helpers/xmlHttpRequestMock.js b/packages/devextreme/testing/helpers/xmlHttpRequestMock.js index cc55e4440a93..604163d61f3f 100644 --- a/packages/devextreme/testing/helpers/xmlHttpRequestMock.js +++ b/packages/devextreme/testing/helpers/xmlHttpRequestMock.js @@ -1,4 +1,4 @@ -/* global $ */ +import $ from 'jquery'; const RealXMLHttpRequest = window.XMLHttpRequest; diff --git a/packages/devextreme/testing/runner/README.md b/packages/devextreme/testing/runner/README.md new file mode 100644 index 000000000000..b1ea2acfb29c --- /dev/null +++ b/packages/devextreme/testing/runner/README.md @@ -0,0 +1,114 @@ +# QUnit test runner (native ESM) + +Developer notes for the Node HTTP runner that serves QUnit suites with **native ESM + import maps** (no SystemJS). + +Related layout: + +| Path | Role | +| --- | --- | +| `testing/runner/lib/` | Server-side request handling, source rewrites, import-map build | +| `testing/helpers/esm-shims/` | Browser-side shim modules wired through the import map / static redirects | + +After changing TypeScript under `testing/runner/`, recompile (`tsc -p testing/runner/tsconfig.json`) and **restart** the process on port `20060` — templates and rewrite logic are loaded at process start. + +--- + +## `lib/static.ts` + +HTTP static file server for the QUnit runner. + +**Responsibilities:** + +- Resolve and serve workspace files (tests, helpers, artifacts, vendors) with correct content types and cache headers. +- Apply **serve-time transforms** so the browser receives valid ESM: + - QUnit tests/helpers → `cjsInterop.rewriteQunitTestHelperSource` + - `aspnet.js` UMD artifact → `cjsInterop.rewriteAspnetArtifactToEsm` + - Vendor / Globalize / Intl / VectorMap bundles → wrap as ESM modules + - JSON (`?esm-export=1`) → `export default …` +- Redirect the few artifact URLs that have a hand-written shim (themes) — see `handWrittenShims.ts`. + +This module is the integration point: almost every special-case rewrite for QUnit ESM loading goes through `tryServeStatic`. + +--- + +## `lib/cjsInterop.ts` + +Serve-time **CJS → ESM** source rewrites for QUnit tests, helpers, and bundle templates. + +`testing/tests/**` and `testing/helpers/**` are now fully native ESM (no `require()`/`module.exports`/AMD left) — the CJS/AMD rewrites below only still fire for `build/bundle-templates/**` (bundler-input sources, out of scope for the QUnit migration). CJS-style `import x from 'bare-specifier'` (bare default/named imports on modules with an imperfect export shape) is still common everywhere and always rewritten, except `jquery` — its shim has a real `export default $`, so it's excluded and loads natively. + +**What it does:** + +1. **`require('…')`** (bundle templates only) → hoisted `import * as __dxReq_N` plus `('default' in ns ? ns.default : { …ns })` at the call site (keeps explicit `default: null` for noJQuery/…; mutable shallow copy only when there is no default — needed when tests assign onto the module object). +2. **`module.exports` / `exports.*`** (bundle templates only) → wrap the file with a synthetic `module`/`exports` object and emit `export default` + named exports. +3. **Bare default / named imports** → namespace import + CJS default interop (`'default' in ns ? ns.default : …`, merge default object/function into named bindings when needed); `jquery` is excluded and passes through untouched. +4. **Plugin-style JSON** (`file.json!` / `file.json!json`, bundle templates only) → absolute URLs with `?esm-export=1`. +5. **`aspnet.js`** → dedicated UMD → ESM conversion (`rewriteAspnetArtifactToEsm`). + +`esm-shims/` files are **excluded** from this pipeline (`isQunitTestOrHelperPath`) — they are already real ESM. + +--- + +## Stubbing a module from a test + +Modules are served as plain ESM artifacts. A module namespace object is frozen, so +`sinon.stub(module, 'name')` and `module.name = fn` both throw — the exporting module +is the only thing that can reassign its own binding. + +The house pattern is a **`DEBUG_set_*` seam**: turn the export into a `let` and add a +setter inside a `/// #DEBUG` block, which `-c qunit` builds keep and production builds +strip. + +```ts +export let Renderer = function (options) { /* … */ }; + +/// #DEBUG +export function DEBUG_set_Renderer(value: typeof Renderer): void { + Renderer = value; +} +/// #ENDDEBUG +``` + +Product code that does `import { Renderer } from '…'` sees the new value, because ESM +named exports are live bindings. + +In tests, drive the seam through [`testing/helpers/moduleSeam.js`](../helpers/moduleSeam.js), +which re-attaches the `.restore()` that an anonymous `sinon.stub()` lacks: + +```js +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; + +// was: sinon.stub(rendererModule, 'Renderer') +const stub = stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer'); +// … +stub.restore(); + +// was: rendererModule.Renderer = fn; +rendererModule.DEBUG_set_Renderer(fn); +``` + +**Import the barrel that has a default export.** `cjsInterop` rewrites a default import +from a bare specifier to `('default' in ns ? ns.default : { ...ns })`. A barrel with no +default (`viz/core/utils.js`, `viz/core/renderers/renderer.js`) therefore hands the test +a dead **copy** — seams installed elsewhere stay invisible. Use the `_default` barrel +(`viz/core/utils_default`, `viz/core/renderers/renderer_default`), which is +`import * as X; export default X`. + +Older sources use `exports.DEBUG_set_X = DEBUG_set_X` instead of `export function`; +`static.ts` rewrites that to a real ESM export at serve time, so both spellings work. + +--- + +## `testing/helpers/esm-shims/` + +Browser modules that the import map (and/or `static.ts` artifact redirects) substitute for real package / artifact specifiers during QUnit runs. + +**Why they exist:** + +- **Custom composition** — e.g. `themes.js`, which the import map and `static.ts` both point at. Stubbing is *not* a reason to add a shim; use a `DEBUG_set_*` seam instead. +- **Globals bridge** — e.g. `jquery.js` / `knockout.js` re-export the classic ``; - const integrationImportPaths = getJQueryIntegrationImports(); + // Restore CSP for default runs; `?nocsp` keeps the meta off for suites + // that branch on QUnit.urlParams['nocsp'] (Knockout, aspnet, …). const cspMetaTag = runProps.NoCsp ? '' : ` string; rootDirectory: string; - setNoCacheHeaders: (res: ServerResponse) => void; setStaticCacheHeaders: (res: ServerResponse, searchParams: URLSearchParams) => void; } @@ -18,53 +25,99 @@ export interface StaticFileService { ) => boolean; } +const CONTENT_TYPES: Readonly> = { + '.html': 'text/html; charset=utf-8', + '.htm': 'text/html; charset=utf-8', + '.css': 'text/css; charset=utf-8', + '.js': 'application/javascript; charset=utf-8', + '.mjs': 'application/javascript; charset=utf-8', + '.json': 'application/json; charset=utf-8', + '.xml': 'text/xml; charset=utf-8', + '.xsl': 'text/xml; charset=utf-8', + '.txt': 'text/plain; charset=utf-8', + '.md': 'text/plain; charset=utf-8', + '.log': 'text/plain; charset=utf-8', + '.svg': 'image/svg+xml', + '.png': 'image/png', + '.jpg': 'image/jpeg', + '.jpeg': 'image/jpeg', + '.gif': 'image/gif', + '.ico': 'image/x-icon', + '.woff': 'font/woff', + '.woff2': 'font/woff2', + '.ttf': 'font/ttf', + '.eot': 'application/vnd.ms-fontobject', + '.map': 'application/json; charset=utf-8', + '.wasm': 'application/wasm', +}; + +const JS_CONTENT_TYPE = 'application/javascript; charset=utf-8'; +const ESM_ARTIFACT_MARKER = '/artifacts/transpiled-esm-npm/esm/'; + +function normalizeUrlPath(filePath: string): string { + return filePath.split(path.sep).join('/'); +} + function getContentType(filePath: string): string { - const ext = path.extname(filePath).toLowerCase(); - - switch (ext) { - case '.html': - case '.htm': - return 'text/html; charset=utf-8'; - case '.css': - return 'text/css; charset=utf-8'; - case '.js': - case '.mjs': - return 'application/javascript; charset=utf-8'; - case '.json': - return 'application/json; charset=utf-8'; - case '.xml': - case '.xsl': - return 'text/xml; charset=utf-8'; - case '.txt': - case '.md': - case '.log': - return 'text/plain; charset=utf-8'; - case '.svg': - return 'image/svg+xml'; - case '.png': - return 'image/png'; - case '.jpg': - case '.jpeg': - return 'image/jpeg'; - case '.gif': - return 'image/gif'; - case '.ico': - return 'image/x-icon'; - case '.woff': - return 'font/woff'; - case '.woff2': - return 'font/woff2'; - case '.ttf': - return 'font/ttf'; - case '.eot': - return 'application/vnd.ms-fontobject'; - case '.map': - return 'application/json; charset=utf-8'; - case '.wasm': - return 'application/wasm'; - default: - return 'application/octet-stream'; + return CONTENT_TYPES[path.extname(filePath).toLowerCase()] ?? 'application/octet-stream'; +} + +function sendError(res: ServerResponse, statusCode: number, message: string): boolean { + // Always override any prior Cache-Control (e.g. DX_HTTP_CACHE year-long + // headers set before a transform/read failure). + applyNoCacheHeaders(res); + res.statusCode = statusCode; + res.setHeader('Content-Type', 'text/plain; charset=utf-8'); + res.end(message); + return true; +} + +function sendJsModuleBody(res: ServerResponse, body: string): boolean { + const buffer = Buffer.from(body, 'utf8'); + res.statusCode = 200; + res.setHeader('Content-Type', JS_CONTENT_TYPE); + res.setHeader('Content-Length', String(buffer.length)); + res.end(buffer); + return true; +} + +function sendTransformedJs( + res: ServerResponse, + filePath: string, + transform: (raw: string) => string, + errorMessage: string, +): boolean { + try { + return sendJsModuleBody(res, transform(fs.readFileSync(filePath, 'utf8'))); + } catch { + return sendError(res, 500, errorMessage); + } +} + +/** + * Native ESM requires resolvable URLs. Our transpiled ESM tree uses + * extensionless relative imports (`from './wrapper'`). Resolve those + * to `.js` / `/index.js` on disk so import maps can load artifacts. + * + * Prefer `name.js` over a sibling directory `name/` — otherwise imports like + * `../__internal/integration/jquery` resolve to a directory listing (HTML) + * and the browser reports "Failed to fetch dynamically imported module". + * + * Also: files like `ui.collection_widget.edit` have a dotted basename; + * `path.extname` returns `.edit`, so we must still try appending `.js`. + */ +function resolveStaticFilePath(filePath: string): string | null { + if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) { + return filePath; + } + + for (const candidate of [`${filePath}.js`, `${filePath}.mjs`, path.join(filePath, 'index.js')]) { + if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) { + return candidate; + } } + + return fs.existsSync(filePath) ? filePath : null; } function sendStaticFile(res: ServerResponse, filePath: string, fileSize: number): boolean { @@ -88,6 +141,314 @@ function sendStaticFile(res: ServerResponse, filePath: string, fileSize: number) return true; } +// --- Vendor / UMD → ESM wrappers ------------------------------------------------ + +const ESM_DEFAULT_FROM_CJS = `const __dxVendorExport = module.exports && module.exports.__esModule + && Object.prototype.hasOwnProperty.call(module.exports, 'default') + ? module.exports.default + : module.exports; +export default __dxVendorExport; +`; + +function forceVendorGlobalThis(source: string): string { + return source.replace(/}\(\s*this\s*,/g, '}(globalThis,'); +} + +function wrapVendorCjsBranch( + source: string, + options: { + preamble?: string; + requireShim?: string; + exportsInit?: string; + trailing?: string; + rewriteThis?: boolean; + } = {}, +): string { + const { + preamble = '', + requireShim = '', + exportsInit = '{}', + trailing = ESM_DEFAULT_FROM_CJS, + rewriteThis = true, + } = options; + + const vendorSource = rewriteThis ? forceVendorGlobalThis(source) : source; + + return [ + preamble, + preamble ? '\n' : '', + `const module = { exports: ${exportsInit} };\n`, + 'const exports = module.exports;\n', + 'var define;\n', + requireShim, + vendorSource, + '\n', + trailing, + ].join(''); +} + +/** + * `intl/dist/Intl.complete.js` appends locale data that expects a free + * `IntlPolyfill` binding from the UMD *browser* branch. Forcing CJS breaks + * that, so keep the global branch and re-export the polyfill. + */ +function wrapIntlVendorAsEsm(source: string): string { + return 'var define;\n' + + 'var IntlPolyfill;\n' + + `${source + .replace(/}\(this,/g, '}(globalThis,') + .replace(/e\.IntlPolyfill=r\(\)/g, 'e.IntlPolyfill=IntlPolyfill=r()')}\n` + + 'export default IntlPolyfill;\n'; +} + +/** + * Force the CJS branch of a UMD wrapper and re-export `module.exports` as default. + * Also emit synthetic named exports from the webpack entry module so + * `import Def, * as Ns from 'pkg'` gets CJS-style interop + * (needed by diagram.importer → `Ns.DiagramControl`). + */ +function collectWebpackEntryExportNames(source: string): string[] { + const entryMatch = /var __webpack_exports__ = __webpack_require__\((\d+)\);/.exec(source); + if (!entryMatch) { + return []; + } + + const entryId = entryMatch[1]; + const moduleStart = source.indexOf(`/***/ ${entryId}`); + if (moduleStart < 0) { + return []; + } + + const nextModule = source.indexOf('\n/***/ ', moduleStart + 1); + const moduleSource = nextModule < 0 + ? source.slice(moduleStart) + : source.slice(moduleStart, nextModule); + + const names = new Set(); + const definePropertyRe = /Object\.defineProperty\(\s*exports\s*,\s*["']([^"']+)["']/g; + let match = definePropertyRe.exec(moduleSource); + while (match) { + const name = match[1]; + if (name !== '__esModule' && name !== 'default' && /^[A-Za-z_$][\w$]*$/.test(name)) { + names.add(name); + } + match = definePropertyRe.exec(moduleSource); + } + + return [...names].sort(); +} + +function wrapWebpackVendorAsEsm(source: string): string { + const namedExports = collectWebpackEntryExportNames(source) + .map((name) => `export const ${name} = module.exports.${name};`) + .join('\n'); + + return wrapVendorCjsBranch(source, { + rewriteThis: false, + trailing: `${ESM_DEFAULT_FROM_CJS}${namedExports ? `${namedExports}\n` : ''}`, + }); +} + +/** globalize / cldrjs ship as UMD; native ESM needs a CJS-branch + require shim. */ +function wrapGlobalizeOrCldrAsEsm(source: string, relativeUrlPath: string): string { + const normalized = normalizeUrlPath(relativeUrlPath); + const isCldrMain = normalized.endsWith('/cldrjs/dist/cldr.js'); + const isCldrPlugin = /\/cldrjs\/dist\/cldr\/[^/]+\.js$/i.test(normalized); + const isGlobalizeMain = normalized.endsWith('/globalize/dist/globalize.js'); + const isGlobalizePlugin = normalized.includes('/globalize/dist/globalize/'); + const baseName = path.basename(normalized, '.js'); + const needsNumber = isGlobalizePlugin && (baseName === 'currency' || baseName === 'date'); + + const preamble: string[] = []; + if (isCldrPlugin) { + preamble.push('import __dxCldr from \'cldr\';'); + } else if (isGlobalizeMain || isGlobalizePlugin) { + preamble.push('import __dxCldr from \'cldr\';'); + preamble.push('import \'cldr/event\';'); + if (isGlobalizePlugin) { + preamble.push('import \'cldr/supplemental\';'); + preamble.push('import __dxGlobalize from \'globalize\';'); + if (needsNumber) { + // CJS factory skips `./number`; AMD/DevExtreme always load it first. + preamble.push('import \'./number.js\';'); + } + } + } + + const requireShim = isCldrMain + ? 'function require(id) { throw new Error(\'Unexpected require in cldr: \' + id); }\n' + : [ + 'function require(id) {\n', + ' if (id === \'cldrjs\' || id === \'cldr\' || id === \'../cldr\') {\n', + ' return __dxCldr;\n', + ' }\n', + ' if (id === \'../globalize\' || id === \'globalize\') {\n', + ' return __dxGlobalize;\n', + ' }\n', + ' throw new Error(\'Unhandled require in globalize/cldr UMD: \' + id);\n', + '}\n', + ].join(''); + + return wrapVendorCjsBranch(source, { + preamble: preamble.join('\n'), + requireShim, + }); +} + +/** + * Vector map geo data UMD: CJS writes into `exports`, browser branch expects + * bare `DevExpress`. Under ESM imports hoist above suite setup, so create the + * global sources bag and point `module.exports` at the same object. + */ +function wrapVectorMapDataAsEsm(source: string): string { + return wrapVendorCjsBranch(source, { + preamble: [ + 'globalThis.DevExpress = globalThis.DevExpress || {};', + 'globalThis.DevExpress.viz = globalThis.DevExpress.viz || {};', + 'globalThis.DevExpress.viz.map = globalThis.DevExpress.viz.map || {};', + 'globalThis.DevExpress.viz.map.sources = globalThis.DevExpress.viz.map.sources || {};', + ].join('\n'), + exportsInit: 'globalThis.DevExpress.viz.map.sources', + trailing: 'export default module.exports;\n', + }); +} + +/** `dx.vectormaputils.js` is UMD (`exports.parse = …`); tests do `import { parse }`. */ +function wrapVectorMapUtilsAsEsm(source: string): string { + return wrapVendorCjsBranch(source, { + rewriteThis: false, + trailing: 'export default module.exports;\nexport const parse = module.exports.parse;\n', + }); +} + +type VendorWrapper = (source: string, relativeUrlPath: string) => string; + +function resolveVendorEsmWrapper(relativeUrlPath: string): VendorWrapper | null { + const normalized = normalizeUrlPath(relativeUrlPath); + + if ( + normalized.endsWith('/intl/dist/Intl.complete.js') + || normalized.endsWith('/intl/dist/Intl.js') + ) { + return (source) => wrapIntlVendorAsEsm(source); + } + + if ( + normalized.endsWith('/globalize/dist/globalize.js') + || normalized.includes('/globalize/dist/globalize/') + || normalized.endsWith('/cldrjs/dist/cldr.js') + || /\/cldrjs\/dist\/cldr\/[^/]+\.js$/i.test(normalized) + ) { + return wrapGlobalizeOrCldrAsEsm; + } + + if (/\/artifacts\/js\/vectormap-data\/[^/]+\.js$/i.test(normalized)) { + return (source) => wrapVectorMapDataAsEsm(source); + } + + if (/\/artifacts\/js\/vectormap-utils\/dx\.vectormaputils\.js$/i.test(normalized)) { + return (source) => wrapVectorMapUtilsAsEsm(source); + } + + if ( + normalized.endsWith('/devextreme-quill/dist/dx-quill.js') + || normalized.endsWith('/artifacts/js/dx-diagram.js') + || normalized.endsWith('/artifacts/js/dx-gantt.js') + || normalized.endsWith('/artifacts/js/dx-exceljs-fork.js') + || normalized.endsWith('/artifacts/js/jszip.js') + ) { + return (source) => wrapWebpackVendorAsEsm(source); + } + + return null; +} + +/** Serve JSON as `export default …` for native ESM (`*.json!` replacement). */ +function sendJsonAsEsmModule(res: ServerResponse, filePath: string): boolean { + return sendTransformedJs( + res, + filePath, + (raw) => { + JSON.parse(raw); + return `export default ${raw};\n`; + }, + 'Failed to export JSON as ESM module', + ); +} + +// --- Mutable artifact facades --------------------------------------------------- + +function sendShimModule(res: ServerResponse, shimUrl: string): boolean { + // Serve a re-export at the artifact URL so relative library imports and + // bare import-map entries share the same shim module graph. + return sendJsModuleBody( + res, + `export * from '${shimUrl}';\nexport { default } from '${shimUrl}';\n`, + ); +} + +// --- ESM artifact tweaks -------------------------------------------------------- + +/** + * Convert leftover `exports.foo = …` (from #DEBUG / dual CJS-ESM sources) + * into native ESM exports so the browser does not throw "exports is not defined". + */ +function rewriteLegacyCjsExportsInEsmArtifact(source: string): string { + if (!/\bexports\./.test(source)) { + return source; + } + + return source + .replace( + /^exports\.([A-Za-z_$][\w$]*)\s*=\s*([A-Za-z_$][\w$]*);?\s*$/gm, + (_match, exportName: string, valueName: string) => (exportName === valueName + ? `export { ${exportName} };` + : `export { ${valueName} as ${exportName} };`), + ) + .replace( + /^exports\.([A-Za-z_$][\w$]*)\s*=\s*function\s*\(/gm, + 'export function $1(', + ) + .replace( + /^exports\.([A-Za-z_$][\w$]*)\s*=\s*async\s+function\s*\(/gm, + 'export async function $1(', + ); +} + +/** + * ESM npm artifacts are built with removeDebug:true, which strips QUnit-only + * hooks. Re-attach the ones still present as locals in the compiled module. + * + * When debug is kept (`-c qunit`), some sources still emit CJS `exports.*` + * assignments that throw under native ESM — rewrite those to ESM exports. + */ +function restoreEsmDebugTestHooks(relativeUrlPath: string, source: string): string { + const normalized = normalizeUrlPath(relativeUrlPath); + if (!normalized.includes(ESM_ARTIFACT_MARKER)) { + return source; + } + + return rewriteLegacyCjsExportsInEsmArtifact(source); +} + +function sendEsmArtifactJs( + res: ServerResponse, + filePath: string, + relativeUrlPath: string, +): boolean { + try { + const raw = fs.readFileSync(filePath, 'utf8'); + let body = restoreEsmDebugTestHooks(relativeUrlPath, raw); + body = rewriteAspnetArtifactToEsm(body, relativeUrlPath); + if (body === raw) { + return sendStaticFile(res, filePath, fs.statSync(filePath).size); + } + return sendJsModuleBody(res, body); + } catch { + return sendError(res, 500, 'Failed to serve ESM artifact'); + } +} + function sendDirectoryListing( res: ServerResponse, requestPath: string, @@ -141,7 +502,6 @@ ${items.join('\n')} export function createStaticFileService({ escapeHtml, rootDirectory, - setNoCacheHeaders, setStaticCacheHeaders, }: StaticFileServiceDeps): StaticFileService { function tryServeStatic( @@ -156,30 +516,77 @@ export function createStaticFileService({ const relativeToRoot = path.relative(rootDirectory, filePath); if (relativeToRoot.startsWith('..') || path.isAbsolute(relativeToRoot)) { - setNoCacheHeaders(res); - res.statusCode = 403; - res.setHeader('Content-Type', 'text/plain; charset=utf-8'); - res.end('Forbidden'); - return true; + return sendError(res, 403, 'Forbidden'); } - if (!fs.existsSync(filePath)) { + const resolvedFilePath = resolveStaticFilePath(filePath); + if (!resolvedFilePath) { return false; } setStaticCacheHeaders(res, searchParams); - const stat = fs.statSync(filePath); + const stat = fs.statSync(resolvedFilePath); if (stat.isDirectory()) { - return sendDirectoryListing(res, pathname, filePath, escapeHtml); + return sendDirectoryListing(res, pathname, resolvedFilePath, escapeHtml); } - if (stat.isFile()) { - return sendStaticFile(res, filePath, stat.size); + if (!stat.isFile()) { + return false; + } + + if (searchParams.has('esm-export') && path.extname(resolvedFilePath).toLowerCase() === '.json') { + return sendJsonAsEsmModule(res, resolvedFilePath); + } + + // Native ESM resolves relative imports against the request URL, not the + // on-disk file. Redirect extensionless URLs to the canonical file URL. + const resolvedUrlPath = `/${normalizeUrlPath(path.relative(rootDirectory, resolvedFilePath))}`; + if (resolvedUrlPath !== normalizedPath) { + const query = searchParams.toString(); + res.statusCode = 302; + res.setHeader('Location', query ? `${resolvedUrlPath}?${query}` : resolvedUrlPath); + res.end(); + return true; + } + + const relativeUrlPath = normalizeUrlPath(relativeToRoot); + const isJs = path.extname(resolvedFilePath).toLowerCase() === '.js'; + + if (isJs && isQunitTestOrHelperPath(relativeUrlPath)) { + return sendTransformedJs( + res, + resolvedFilePath, + (raw) => rewriteQunitTestHelperSource(raw, relativeUrlPath), + 'Failed to rewrite CJS-style test/helper module', + ); + } + + if (!searchParams.has('dx-original')) { + const shimUrl = findHandWrittenShim(relativeUrlPath); + if (shimUrl) { + return sendShimModule(res, shimUrl); + } + } + + if (isJs) { + const vendorWrapper = resolveVendorEsmWrapper(relativeUrlPath); + if (vendorWrapper) { + return sendTransformedJs( + res, + resolvedFilePath, + (raw) => vendorWrapper(raw, relativeUrlPath), + 'Failed to wrap vendor bundle as ESM', + ); + } + + if (relativeUrlPath.includes(ESM_ARTIFACT_MARKER)) { + return sendEsmArtifactJs(res, resolvedFilePath, relativeUrlPath); + } } - return false; + return sendStaticFile(res, resolvedFilePath, stat.size); } return { diff --git a/packages/devextreme/testing/runner/templates/run-suite.template.html b/packages/devextreme/testing/runner/templates/run-suite.template.html index a7660dce96c2..d206af4ba123 100644 --- a/packages/devextreme/testing/runner/templates/run-suite.template.html +++ b/packages/devextreme/testing/runner/templates/run-suite.template.html @@ -99,9 +99,9 @@ - + - + + + {{{IMPORT_MAP_SCRIPT}}} +
- + diff --git a/packages/devextreme/testing/systemjs-builder.js b/packages/devextreme/testing/systemjs-builder.js deleted file mode 100644 index 940b87d249de..000000000000 --- a/packages/devextreme/testing/systemjs-builder.js +++ /dev/null @@ -1,272 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const babel = require('@babel/core'); -const parseArguments = require('minimist'); - - -const root = path.join(__dirname, '..'); -const transpilePath = path.join(root, '/artifacts/transpiled'); - -const getFileList = (dirName) => { - let files = []; - const items = fs.readdirSync(dirName, { withFileTypes: true }); - - // eslint-disable-next-line no-restricted-syntax - for(const item of items) { - if(item.isDirectory()) { - files = [...files, ...getFileList(path.join(dirName, item.name))]; - } else if( - item.name.endsWith('.js') || - (item.name.endsWith('.json') && !item.name.includes('tsconfig') && !item.name.includes('__meta')) - ) { - files.push(path.join(dirName, item.name)); - } - } - - return files; -}; - -const writeFileSync = (destPath, file) => { - const destDir = path.dirname(destPath); - if(!fs.existsSync(destDir)) { - fs.mkdirSync(destDir, { recursive: true }); - } - - fs.writeFileSync(destPath, file); -}; - -const buildAmdModule = (body) => ` -define(function(require, exports, module) { - ${body} -}); -`; - -const transpileCommonJSFile = (source, pathToFile) => { - const [pre, post] = path.extname(pathToFile) === '.json' - ? ['module.exports = ', ';'] - : ['', '']; - - writeFileSync( - pathToFile, - buildAmdModule( - `${pre}${source}${post}`.replace(/(\n|\r)/g, '$1 ') - ) - ); -}; - -const buildJsonModule = (body) => ` -define(function(require, exports, module) { - module.exports = ${body}; -}); -`; - -const buildSystemJSModule = (body, pre = '') => ` -SystemJS.register([], function(exports) { - ${pre} - - return { - setters: [], - execute: function() { - ${body} - } - }; -}); -`; - -const transpileFile = async(sourcePath, targetPath) => { - const code = fs.readFileSync(sourcePath) - .toString() - .replaceAll('/packages/devextreme/testing/helpers/wrapRenovatedWidget.js', '/packages/devextreme/artifacts/transpiled-testing/helpers/wrapRenovatedWidget.js') - .replaceAll(path.normalize('/testing/helpers/'), path.normalize('/artifacts/transpiled-testing/helpers/')) - // TODO see packages/devextreme/testing/tests/DevExpress.viz.vectorMap.utils/tests.js - // import { parse } from '../../../artifacts/js/vectormap-utils/dx.vectormaputils.js'; - // This used to work because the runner cwd was the same as the devextreme root folder - // remove next 3 lines after fix - .replaceAll( - path.normalize('../../../artifacts/js/vectormap-utils/dx.vectormaputils.js'), - path.normalize('../../../../artifacts/js/vectormap-utils/dx.vectormaputils.js')); - - if(sourcePath.includes('testing/helpers/includeThemesLinks.js')) { - writeFileSync(targetPath, buildSystemJSModule('', code.replaceAll('\n', ' '))); - return; - } - - if( - /(^|\s)System(JS)?\.register/gm.test(code) || - /(^|\s)define\(/gm.test(code) || - sourcePath.includes('helpers/forMap') - ) { - writeFileSync(targetPath, code); - } else if(/(\(|\s|^)require\(/.test(code) || /(module\.)?exports(\.\w+)?\s?=/.test(code)) { - transpileCommonJSFile(code, targetPath); - } else if(sourcePath.endsWith('.json')) { - writeFileSync(targetPath, buildJsonModule(code)); - } else { - await transpileWithBabel(code, targetPath); - } -}; - -const transpileModules = async() => { - await Promise.all( - getFileList(transpilePath).map((filePath) => { - return transpileFile( - filePath, - filePath.replace(path.normalize('/transpiled'), path.normalize('/transpiled-systemjs')), - ); - }) - ); -}; - -const buildCssAsSystemModule = (name, filePath) => ` -System.register('${filePath}', [], false, function() {}); -(function() { - if (typeof document == 'undefined') return; - var link = document.createElement('link'); - link.rel = 'stylesheet'; - link.href = '/packages/devextreme/${filePath}'; - link.setAttribute('data-theme', '${name}'); - document.getElementsByTagName('head')[0].appendChild(link); -})(); -`; - -const transpileCss = async() => { - const cssList = [ - ['artifacts/css/dx.light.css', 'generic.light'], - ['artifacts/css/dx.material.blue.light.css', 'material.blue.light'], - ['artifacts/css/dx.fluent.blue.light.css', 'fluent.blue.light'], - ['artifacts/css/dx-gantt.css', 'gantt'], - ]; - - // eslint-disable-next-line no-restricted-syntax - for(const [cssFile, styleName] of cssList) { - const destPath = path.join(root, cssFile.replace('css', 'css-systemjs')); - - writeFileSync(destPath, buildCssAsSystemModule(styleName, cssFile)); - } -}; - -const transpileWithBabel = async(sourceCode, destPath) => { - const { code } = await babel.transform(sourceCode, { - compact: false, - plugins: ['@babel/plugin-transform-modules-systemjs'], - sourceMaps: true, - }); - - writeFileSync(destPath, code); -}; - -const transpileIntl = async() => { - const listIntlFiles = [ - { - filePath: require.resolve('intl/lib/core.js'), - destPath: path.join(root, 'artifacts/js-systemjs/intl/intl.js'), - }, - { - filePath: require.resolve('intl/locale-data/complete.js'), - destPath: path.join(root, 'artifacts/js-systemjs/intl/intl.complete.js'), - }, - ]; - - await Promise.all(listIntlFiles.map(({ filePath, destPath }) => { - const code = fs.readFileSync(filePath).toString(); - - writeFileSync( - destPath, - buildAmdModule( - code.replace('IntlPolyfill', 'require("./intl.js")') - ) - ); - })); - - const intlIndex = ` - define(function(require, exports, module) { - window.IntlPolyfill = require('./intl.js'); - - require('./intl.complete.js'); - - if (!window.Intl) { - window.Intl = window.IntlPolyfill; - window.IntlPolyfill.__applyLocaleSensitivePrototypes(); - } - - module.exports = window.IntlPolyfill; - }); - `; - - writeFileSync(path.join(root, 'artifacts/js-systemjs/intl/index.js'), intlIndex); -}; - -const transpileJsVendors = async() => { - const pluginsList = [ - { - filePath: require.resolve('systemjs-plugin-css/css.js'), - destPath: path.join(root, 'artifacts/js-systemjs/css.js'), - }, - { - filePath: require.resolve('systemjs-plugin-json/json.js'), - destPath: path.join(root, 'artifacts/js-systemjs/json.js'), - }, - ]; - - await Promise.all( - pluginsList.map(({ filePath, destPath }) => { - const code = fs.readFileSync(filePath).toString(); - - return writeFileSync( - destPath, - buildSystemJSModule( - '', - code.replaceAll('module.exports', 'exports') - ) - ); - }), - ); - - await transpileIntl(); - - await transpileFile( - require.resolve('knockout/build/output/knockout-latest.debug.js'), - path.join(root, 'artifacts/js-systemjs/knockout.js') - ); - await transpileFile( - path.join(root, 'node_modules/@preact/signals-core/dist/signals-core.js'), - path.join(root, 'artifacts/js-systemjs/preact-signals.js') - ); - - - [].concat( - getFileList(path.join(root, 'node_modules/devextreme-cldr-data')), - getFileList(path.join(root, 'node_modules/cldr-core/supplemental')) - ) - .filter(filePath => filePath.endsWith('.json')) - .forEach((filePath) => { - transpileFile(filePath, filePath.replace(path.normalize('/node_modules'), path.normalize('/artifacts/js-systemjs'))); - }); -}; - -const transpileTesting = async() => { - const contentList = getFileList(path.join(root, 'testing/content')); - const helpersList = getFileList(path.join(root, 'testing/helpers')); - const testsList = getFileList(path.join(root, 'testing/tests')); - - [].concat(contentList, helpersList, testsList) - .forEach((filePath) => { - transpileFile(filePath, filePath.replace(path.normalize('/testing/'), path.normalize('/artifacts/transpiled-testing/'))); - }); -}; - -(async() => { - - const { transpile } = parseArguments(process.argv); - - switch(transpile) { - case 'modules': - return await transpileModules(); - case 'testing': - return await transpileTesting(); - case 'css': - return await transpileCss(); - case 'js-vendors': - return await transpileJsVendors(); - } -})(); diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/animation.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/animation.tests.js index 4901738147fe..adb9bbba3336 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/animation.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/animation.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.test('animation', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/core.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/core.tests.js index b572f50372b9..a2869b26c482 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/core.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/core.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.test('core', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/data.odata.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/data.odata.tests.js index 58a2a5e54678..41385002be19 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/data.odata.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/data.odata.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.test('data.odata', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/events.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/events.tests.js index a4634362de59..b1c6fa2b2e61 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/events.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/events.tests.js @@ -1,5 +1,5 @@ -const $ = require('jquery'); -const special = require('../../../helpers/eventHelper.js').special; +import $ from 'jquery'; +import { special } from '../../../helpers/eventHelper.js'; QUnit.test('events', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-base.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-base.tests.js index 302526274c8a..f60e0e5ce790 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-base.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-base.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.test('widgets-base', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-web.tests.js b/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-web.tests.js index ed84590a1d82..76875c74e79c 100644 --- a/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-web.tests.js +++ b/packages/devextreme/testing/tests/Bundles/bundlesParts/widgets-web.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.test('widgets-web', function(assert) { diff --git a/packages/devextreme/testing/tests/Bundles/dx.all.tests.js b/packages/devextreme/testing/tests/Bundles/dx.all.tests.js index 004aaa59610a..26109431b59c 100644 --- a/packages/devextreme/testing/tests/Bundles/dx.all.tests.js +++ b/packages/devextreme/testing/tests/Bundles/dx.all.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); +import $ from 'jquery'; -require('bundles/dx.all.js'); +import 'bundles/dx.all.js'; QUnit.test('DevExpress namespaces', function(assert) { const namespaces = [ @@ -19,10 +19,10 @@ QUnit.test('DevExpress namespaces', function(assert) { assert.ok(DevExpress.utils.readyCallbacks, 'readyCallbacks namespace'); }); -require('./bundlesParts/core.tests.js'); -require('./bundlesParts/events.tests.js'); -require('./bundlesParts/data.tests.js'); -require('./bundlesParts/data.odata.tests.js'); -require('./bundlesParts/animation.tests.js'); -require('./bundlesParts/widgets-base.tests.js'); -require('./bundlesParts/widgets-web.tests.js'); +import './bundlesParts/core.tests.js'; +import './bundlesParts/events.tests.js'; +import './bundlesParts/data.tests.js'; +import './bundlesParts/data.odata.tests.js'; +import './bundlesParts/animation.tests.js'; +import './bundlesParts/widgets-base.tests.js'; +import './bundlesParts/widgets-web.tests.js'; diff --git a/packages/devextreme/testing/tests/Bundles/dx.custom.tests.js b/packages/devextreme/testing/tests/Bundles/dx.custom.tests.js index cfdd52f6ed78..81ad2c77a395 100644 --- a/packages/devextreme/testing/tests/Bundles/dx.custom.tests.js +++ b/packages/devextreme/testing/tests/Bundles/dx.custom.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); +import $ from 'jquery'; -require('bundles/dx.custom.js'); +import 'bundles/dx.custom.js'; QUnit.test('DevExpress namespaces', function(assert) { const namespaces = [ @@ -16,10 +16,10 @@ QUnit.test('DevExpress namespaces', function(assert) { }); }); -require('./bundlesParts/core.tests.js'); -require('./bundlesParts/events.tests.js'); -require('./bundlesParts/data.tests.js'); -require('./bundlesParts/data.odata.tests.js'); -require('./bundlesParts/animation.tests.js'); -require('./bundlesParts/widgets-base.tests.js'); -require('./bundlesParts/widgets-web.tests.js'); +import './bundlesParts/core.tests.js'; +import './bundlesParts/events.tests.js'; +import './bundlesParts/data.tests.js'; +import './bundlesParts/data.odata.tests.js'; +import './bundlesParts/animation.tests.js'; +import './bundlesParts/widgets-base.tests.js'; +import './bundlesParts/widgets-web.tests.js'; diff --git a/packages/devextreme/testing/tests/Bundles/dx.viz.tests.js b/packages/devextreme/testing/tests/Bundles/dx.viz.tests.js index b579be2030f6..88d61c7f24cf 100644 --- a/packages/devextreme/testing/tests/Bundles/dx.viz.tests.js +++ b/packages/devextreme/testing/tests/Bundles/dx.viz.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); +import $ from 'jquery'; -require('bundles/dx.viz.js'); +import 'bundles/dx.viz.js'; QUnit.test('DevExpress namespaces', function(assert) { const namespaces = [ @@ -16,8 +16,8 @@ QUnit.test('DevExpress namespaces', function(assert) { }); }); -require('./bundlesParts/core.tests.js'); -require('./bundlesParts/events.tests.js'); -require('./bundlesParts/data.tests.js'); -require('./bundlesParts/data.odata.tests.js'); -require('./bundlesParts/animation.tests.js'); +import './bundlesParts/core.tests.js'; +import './bundlesParts/events.tests.js'; +import './bundlesParts/data.tests.js'; +import './bundlesParts/data.odata.tests.js'; +import './bundlesParts/animation.tests.js'; diff --git a/packages/devextreme/testing/tests/Bundles/dx.web.tests.js b/packages/devextreme/testing/tests/Bundles/dx.web.tests.js index b96815164317..c8ef7037c130 100644 --- a/packages/devextreme/testing/tests/Bundles/dx.web.tests.js +++ b/packages/devextreme/testing/tests/Bundles/dx.web.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); +import $ from 'jquery'; -require('bundles/dx.web.js'); +import 'bundles/dx.web.js'; QUnit.test('DevExpress namespaces', function(assert) { const namespaces = [ @@ -23,10 +23,10 @@ QUnit.test('DevExpress namespaces', function(assert) { }); }); -require('./bundlesParts/core.tests.js'); -require('./bundlesParts/events.tests.js'); -require('./bundlesParts/data.tests.js'); -require('./bundlesParts/data.odata.tests.js'); -require('./bundlesParts/animation.tests.js'); -require('./bundlesParts/widgets-base.tests.js'); -require('./bundlesParts/widgets-web.tests.js'); +import './bundlesParts/core.tests.js'; +import './bundlesParts/events.tests.js'; +import './bundlesParts/data.tests.js'; +import './bundlesParts/data.odata.tests.js'; +import './bundlesParts/animation.tests.js'; +import './bundlesParts/widgets-base.tests.js'; +import './bundlesParts/widgets-web.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.animation/fx.tests.js b/packages/devextreme/testing/tests/DevExpress.animation/fx.tests.js index 68e939713614..5b25cee2a986 100644 --- a/packages/devextreme/testing/tests/DevExpress.animation/fx.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.animation/fx.tests.js @@ -4,6 +4,7 @@ import eventsEngine from 'common/core/events/core/events_engine'; import fx from 'common/core/animation/fx'; import translator from 'common/core/animation/translator'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import positionUtils from 'common/core/animation/position'; import support from '__internal/core/utils/m_support'; @@ -75,7 +76,7 @@ QUnit.module('frame transitions', { this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { return setTimeout(callback, 1); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.animation/position.tests.js b/packages/devextreme/testing/tests/DevExpress.animation/position.tests.js index 84f4b67bd58c..817c90f1fcd0 100644 --- a/packages/devextreme/testing/tests/DevExpress.animation/position.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.animation/position.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import positionUtils from 'common/core/animation/position'; import translator from '__internal/common/core/animation/translatorModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import browser from 'core/utils/browser'; import fixtures from '../../helpers/positionFixtures.js'; import { implementationsMap } from 'core/utils/size'; @@ -1020,7 +1021,7 @@ const testCollision = (name, fixtureName, params, expectedHorzDist, expectedVert // T664522 QUnit.test('setup should call resetPosition with finishTransition argument', function(assert) { - const resetPositionStub = sinon.stub(translator, 'resetPosition').callsFake(($element, finishTransition) => { + const resetPositionStub = stubSeam(translator, 'resetPosition', 'DEBUG_set_resetPosition').callsFake(($element, finishTransition) => { assert.equal(finishTransition, true, 'finishTransition is true'); }); diff --git a/packages/devextreme/testing/tests/DevExpress.animation/translator.tests.js b/packages/devextreme/testing/tests/DevExpress.animation/translator.tests.js index 795307a74539..d2e1bdd5e861 100644 --- a/packages/devextreme/testing/tests/DevExpress.animation/translator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.animation/translator.tests.js @@ -1,7 +1,8 @@ -const $ = require('jquery'); -const translator = require('common/core/animation/translator'); -const styleUtils = require('core/utils/style'); -const transformStyle = styleUtils.styleProp('transform'); +import $ from 'jquery'; +import translator from 'common/core/animation/translator'; +import { styleProp } from 'core/utils/style'; + +const transformStyle = styleProp('transform'); QUnit.module('translator', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet.tests.js b/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet.tests.js index c61b8e313b3c..6d2fdbc87a94 100644 --- a/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet.tests.js @@ -1,39 +1,28 @@ -(function(factory) { - if(typeof define === 'function' && define.amd) { - define(function(require, exports, module) { - require('integration/jquery'), - require('ui/button'); - require('ui/check_box'); - require('ui/drop_down_button'); - require('ui/form'); - require('ui/popup'); - require('ui/select_box'); - require('ui/text_box'); - require('ui/toolbar'); - require('ui/validator'); - require('ui/validation_summary'); - - const aspnet = require('aspnet'); - window.DevExpress = { aspnet: aspnet }; // for DevExpress.aspnet.createComponent in templates - - module.exports = factory( - require('jquery'), - require('core/templates/template_engine_registry').setTemplateEngine, - aspnet, - function() { return require('ui/widget/ui.errors'); }, - function() { return require('../../helpers/ajaxMock.js'); } - ); - }); - } else { - factory( - window.jQuery, - DevExpress.setTemplateEngine, - DevExpress.aspnet, - function() { return window.DevExpress_ui_widget_errors; }, - function() { return window.ajaxMock; } - ); - } -}(function($, setTemplateEngine, aspnet, errorsAccessor, ajaxMockAccessor) { +import 'integration/jquery'; +import 'ui/button'; +import 'ui/check_box'; +import 'ui/drop_down_button'; +import 'ui/form'; +import 'ui/popup'; +import 'ui/select_box'; +import 'ui/text_box'; +import 'ui/toolbar'; +import 'ui/validator'; +import 'ui/validation_summary'; + +import $ from 'jquery'; +import { setTemplateEngine } from 'core/templates/template_engine_registry'; +import aspnetModule from 'aspnet'; +import errorsModule from 'ui/widget/ui.errors'; +import ajaxMock from '../../helpers/ajaxMock.js'; + +// Templates call DevExpress.aspnet.createComponent / renderComponent. +// MVC-style templates also expect global `$` (runner calls jQuery.noConflict()). +window.DevExpress = window.DevExpress || {}; +window.DevExpress.aspnet = aspnetModule; +window.$ = $; + +(function($, setTemplateEngine, aspnet, errorsAccessor, ajaxMockAccessor) { if(QUnit.urlParams['nojquery']) { return; @@ -696,4 +685,4 @@ }); }); -})); +})($, setTemplateEngine, aspnetModule, function() { return errorsModule; }, function() { return ajaxMock; }); diff --git a/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet_bundled.tests.js b/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet_bundled.tests.js index 3b91756424b0..9677bb02ef5e 100644 --- a/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet_bundled.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.aspnet/aspnet_bundled.tests.js @@ -1,7 +1,8 @@ -define(function(require) { - window.DevExpress_ui_widget_errors = require('ui/widget/ui.errors'); - window.ajaxMock = require('../../helpers/ajaxMock.js'); - require('bundles/dx.web.js'); - require('aspnet.js'); - require('./aspnet.tests.js'); -}); +import DevExpress_ui_widget_errors from 'ui/widget/ui.errors'; +import ajaxMock from '../../helpers/ajaxMock.js'; +import 'bundles/dx.web.js'; +import 'aspnet.js'; +import './aspnet.tests.js'; + +window.DevExpress_ui_widget_errors = DevExpress_ui_widget_errors; +window.ajaxMock = ajaxMock; diff --git a/packages/devextreme/testing/tests/DevExpress.common/charts.tests.js b/packages/devextreme/testing/tests/DevExpress.common/charts.tests.js index 8c3260a4ca9b..70458d3829cb 100644 --- a/packages/devextreme/testing/tests/DevExpress.common/charts.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.common/charts.tests.js @@ -1,16 +1,19 @@ import { registerPattern, registerGradient } from 'common/charts'; import graphicObjects from '__internal/common/charts'; -import utils from 'viz/core/utils_default'; +function clearGraphicObjects() { + const objects = graphicObjects.getGraphicObjects(); + Object.keys(objects).forEach((key) => { + delete objects[key]; + }); +} QUnit.module('Graphic objects', { beforeEach: function() { - this.getNextDefsStub = sinon.stub(utils, 'getNextDefsSvgId'); - this.getNextDefsStub.onCall(0).returns('DevExpressId_1'); - this.getNextDefsStub.onCall(1).returns('DevExpressId_2'); + clearGraphicObjects(); }, afterEach: function() { - this.getNextDefsStub.restore(); + clearGraphicObjects(); } }); @@ -18,12 +21,11 @@ QUnit.test('should register pattern', function(assert) { const id_1 = registerPattern({ key: 'test_key_1' }); const id_2 = registerPattern({ key: 'test_key_2' }); - assert.equal(this.getNextDefsStub.callCount, 2); - assert.equal(id_1, 'DevExpressId_1'); - assert.equal(id_2, 'DevExpressId_2'); + assert.ok(/^DevExpress_\d+$/.test(id_1), 'id has expected format'); + assert.notEqual(id_1, id_2, 'ids are unique'); assert.deepEqual(graphicObjects.getGraphicObjects(), { - 'DevExpressId_1': { key: 'test_key_1', type: 'pattern' }, - 'DevExpressId_2': { key: 'test_key_2', type: 'pattern' } + [id_1]: { key: 'test_key_1', type: 'pattern' }, + [id_2]: { key: 'test_key_2', type: 'pattern' } }); }); @@ -31,11 +33,10 @@ QUnit.test('should register gradient', function(assert) { const id_1 = registerGradient('gradient_type', { key: 'test_key_1' }); const id_2 = registerGradient('gradient_type', { key: 'test_key_2' }); - assert.equal(this.getNextDefsStub.callCount, 2); - assert.equal(id_1, 'DevExpressId_1'); - assert.equal(id_2, 'DevExpressId_2'); + assert.ok(/^DevExpress_\d+$/.test(id_1), 'id has expected format'); + assert.notEqual(id_1, id_2, 'ids are unique'); assert.deepEqual(graphicObjects.getGraphicObjects(), { - 'DevExpressId_1': { key: 'test_key_1', type: 'gradient_type' }, - 'DevExpressId_2': { key: 'test_key_2', type: 'gradient_type' } + [id_1]: { key: 'test_key_1', type: 'gradient_type' }, + [id_2]: { key: 'test_key_2', type: 'gradient_type' } }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.core/config_bundled.tests.js b/packages/devextreme/testing/tests/DevExpress.core/config_bundled.tests.js index 7800023e6c96..e7cdd80db419 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/config_bundled.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/config_bundled.tests.js @@ -3,14 +3,14 @@ const useJQuery = !QUnit.urlParams['nojquery']; window.DevExpress = window.DevExpress || {}; window.DevExpress.config = { useJQuery: useJQuery }; -define(function(require) { - QUnit.test = QUnit.urlParams['nocsp'] ? QUnit.test : QUnit.skip; - require('bundles/dx.all.js'); +// Must stay dynamic: static imports hoist above the config assignment. +await import('bundles/dx.all.js'); - QUnit.module('config.useJQuery'); +QUnit.test = QUnit.urlParams['nocsp'] ? QUnit.test : QUnit.skip; - QUnit.test('config value useJQuery with jQuery in window', function(assert) { - const config = DevExpress.config; - assert.equal(config().useJQuery, useJQuery); - }); +QUnit.module('config.useJQuery'); + +QUnit.test('config value useJQuery with jQuery in window', function(assert) { + const config = DevExpress.config; + assert.equal(config().useJQuery, useJQuery); }); diff --git a/packages/devextreme/testing/tests/DevExpress.core/config_bundled_nojquery.tests.js b/packages/devextreme/testing/tests/DevExpress.core/config_bundled_nojquery.tests.js index b239f8f42fc9..8425f89264bd 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/config_bundled_nojquery.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/config_bundled_nojquery.tests.js @@ -1,11 +1,10 @@ -define(function(require) { - QUnit.test = QUnit.urlParams['nocsp'] ? QUnit.test : QUnit.skip; - require('bundles/dx.all.js'); +import 'bundles/dx.all.js'; - QUnit.module('config.useJQuery'); +QUnit.test = QUnit.urlParams['nocsp'] ? QUnit.test : QUnit.skip; - QUnit.test('config value useJQuery should be false if jquery is not included', function(assert) { - const config = DevExpress.config; - assert.equal(!!config().useJQuery, false); - }); +QUnit.module('config.useJQuery'); + +QUnit.test('config value useJQuery should be false if jquery is not included', function(assert) { + const config = DevExpress.config; + assert.equal(!!config().useJQuery, false); }); diff --git a/packages/devextreme/testing/tests/DevExpress.core/config_nojquery.tests.js b/packages/devextreme/testing/tests/DevExpress.core/config_nojquery.tests.js index 72c3071ea903..6b822ccfe13f 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/config_nojquery.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/config_nojquery.tests.js @@ -1,4 +1,4 @@ -const config = require('core/config'); +import config from 'core/config'; QUnit.module('config.useJQuery'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/domAdapter.tests.js b/packages/devextreme/testing/tests/DevExpress.core/domAdapter.tests.js index 20220591e88f..4ecb6f729423 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/domAdapter.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/domAdapter.tests.js @@ -1,4 +1,4 @@ -const domAdapter = require('core/dom_adapter'); +import domAdapter from 'core/dom_adapter'; QUnit.module('DOM Adapter', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.core/elementData.tests.js b/packages/devextreme/testing/tests/DevExpress.core/elementData.tests.js index 613c39d0ff37..b570f85b7d76 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/elementData.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/elementData.tests.js @@ -1,4 +1,4 @@ -const dataUtils = require('core/element_data'); +import * as dataUtils from 'core/element_data'; QUnit.module('Data'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/guid.tests.js b/packages/devextreme/testing/tests/DevExpress.core/guid.tests.js index a1084e1afab6..d34fc88c539a 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/guid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/guid.tests.js @@ -1,4 +1,4 @@ -const Guid = require('core/guid'); +import Guid from 'core/guid'; QUnit.module('Guid'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/namespace.tests.js b/packages/devextreme/testing/tests/DevExpress.core/namespace.tests.js index ff21a6088e2b..43f157d18be8 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/namespace.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/namespace.tests.js @@ -1,7 +1,7 @@ -const testGlobalExports = require('../../helpers/publicModulesHelper.js'); -const { version } = require('core/version'); +import testGlobalExports from '../../helpers/publicModulesHelper.js'; +import { version } from 'core/version'; -require('bundles/modules/core'); +import 'bundles/modules/core'; testGlobalExports({ 'DevExpress': DevExpress diff --git a/packages/devextreme/testing/tests/DevExpress.core/renderer.tests.js b/packages/devextreme/testing/tests/DevExpress.core/renderer.tests.js index 81e4982aa60e..20fef36c5dd6 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/renderer.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/renderer.tests.js @@ -1,5 +1,5 @@ -const { setHeight, setWidth, implementationsMap } = require('core/utils/size'); -const renderer = require('core/renderer'); +import { setHeight, setWidth, implementationsMap } from 'core/utils/size'; +import renderer from 'core/renderer'; QUnit.module('renderer'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.ajax.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.ajax.tests.js index e5cffcd95c9f..2ddc16fb90c3 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.ajax.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.ajax.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); -const ajax = require('core/utils/ajax'); -const compareVersion = require('core/utils/version').compare; +import $ from 'jquery'; +import ajax from 'core/utils/ajax'; +import { compare as compareVersion } from 'core/utils/version'; QUnit.test = QUnit.urlParams['nocsp'] ? QUnit.test : QUnit.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js index 4fcc57b708d0..cb656949677c 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.animationFrame.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); -const animationFrame = require('common/core/animation/frame'); -const coreUtilsType = require('core/utils/type'); +import $ from 'jquery'; +import * as animationFrame from 'common/core/animation/frame'; +import * as coreUtilsType from 'core/utils/type'; QUnit.module('animation frame'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.browser.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.browser.tests.js index 3b130918c3e8..73f57f1e2e9e 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.browser.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.browser.tests.js @@ -1,4 +1,4 @@ -const browser = require('core/utils/browser'); +import browser from 'core/utils/browser'; const userAgents = { webkit: 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Custom/43.0.2357.124', diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.callOnce.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.callOnce.tests.js index 40d37d5e9842..25f6af0c10ec 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.callOnce.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.callOnce.tests.js @@ -1,4 +1,4 @@ -const callOnce = require('core/utils/call_once'); +import callOnce from 'core/utils/call_once'; QUnit.module('callOnce'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.callbacks.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.callbacks.tests.js index 655765914043..7979d8f50a12 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.callbacks.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.callbacks.tests.js @@ -1,4 +1,4 @@ -const Callbacks = require('core/utils/callbacks'); +import Callbacks from 'core/utils/callbacks'; QUnit.module('Methods', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.date.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.date.tests.js index 33b63f0f13cc..57094138f274 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.date.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.date.tests.js @@ -1,4 +1,4 @@ -const dateUtils = require('core/utils/date'); +import dateUtils from 'core/utils/date'; const WEEK_DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.date_parser.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.date_parser.tests.js index 0f362cd3cf90..2adb57a35cb8 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.date_parser.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.date_parser.tests.js @@ -1,5 +1,5 @@ -const dateSerialization = require('core/utils/date_serialization'); -const config = require('core/config'); +import dateSerialization from 'core/utils/date_serialization'; +import config from 'core/config'; QUnit.module('Default DX Formats'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.date_serialization.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.date_serialization.tests.js index 52caaf89815c..1ef84b2d5312 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.date_serialization.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.date_serialization.tests.js @@ -1,5 +1,5 @@ -const dateSerialization = require('core/utils/date_serialization'); -const config = require('core/config'); +import dateSerialization from 'core/utils/date_serialization'; +import config from 'core/config'; QUnit.module('date serialization tests', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.deferred.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.deferred.tests.js index 00e03da93ee7..59d3b42bb705 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.deferred.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.deferred.tests.js @@ -1,12 +1,9 @@ -define(function(require) { - const isFunction = require('core/utils/type').isFunction; - const deferredUtils = require('core/utils/deferred'); - const Deferred = deferredUtils.Deferred; +import { isFunction } from 'core/utils/type'; +import * as deferredUtils from 'core/utils/deferred'; - if(!QUnit.urlParams['nojquery']) { - return; - } +const { Deferred } = deferredUtils; +if(QUnit.urlParams['nojquery']) { QUnit.module('when'); QUnit.test('when should be resolved synchronously', function(assert) { @@ -491,4 +488,4 @@ define(function(require) { deferred.resolve(1); }); -}); +} diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.dependencyInjector.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.dependencyInjector.tests.js index e0038433ce04..0c128e2bba9c 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.dependencyInjector.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.dependencyInjector.tests.js @@ -1,4 +1,4 @@ -const dependencyInjector = require('core/utils/dependency_injector'); +import dependencyInjector from 'core/utils/dependency_injector'; QUnit.module('dependencyInjector'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.inflector.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.inflector.tests.js index d89fb09febc9..d3821edba406 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.inflector.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.inflector.tests.js @@ -1,4 +1,4 @@ -const inflector = require('core/utils/inflector'); +import * as inflector from 'core/utils/inflector'; QUnit.module('inflector'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.math.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.math.tests.js index 08bad03e0d61..a6a12f9e637e 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.math.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.math.tests.js @@ -1,4 +1,4 @@ -const mathUtils = require('core/utils/math'); +import * as mathUtils from 'core/utils/math'; const adjust = mathUtils.adjust; QUnit.test('fitIntoRange', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.object.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.object.tests.js index ee2de0cafc59..8626f70f98e6 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.object.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.object.tests.js @@ -1,4 +1,4 @@ -const objectUtils = require('core/utils/object'); +import * as objectUtils from 'core/utils/object'; QUnit.test('orderEach', function(assert) { const checkOrderEach = function(mapKeys, keys) { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.queue.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.queue.tests.js index e45b3e012d1e..4b9152f6ab6f 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.queue.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.queue.tests.js @@ -1,5 +1,5 @@ -const $ = require('jquery'); -const queueUtils = require('core/utils/queue'); +import $ from 'jquery'; +import * as queueUtils from 'core/utils/queue'; QUnit.module('enqueue'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.ready_callbacks.js b/packages/devextreme/testing/tests/DevExpress.core/utils.ready_callbacks.js index d34014597f44..d5b31ae3320e 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.ready_callbacks.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.ready_callbacks.js @@ -1,4 +1,4 @@ -const readyCallbacks = require('core/utils/ready_callbacks'); +import readyCallbacks from 'core/utils/ready_callbacks'; QUnit.module('readyCallbacks injection', { afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.size.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.size.tests.js index 9869807eb0b3..1fd14a2d9351 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.size.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.size.tests.js @@ -1,5 +1,8 @@ import $ from 'jquery'; -import sizeUtils, { getHeight, getWidth, getInnerHeight, getInnerWidth, getOuterHeight, getOuterWidth } from 'core/utils/size'; +import { + getHeight, getWidth, getInnerHeight, getInnerWidth, getOuterHeight, getOuterWidth, + getElementBoxParams, addOffsetToMaxHeight, addOffsetToMinHeight, getVerticalOffsets, getVisibleHeight, +} from 'core/utils/size'; import browser from 'core/utils/browser'; const testStyles = [ @@ -268,13 +271,13 @@ QUnit.test('element in parent with fixed size', function(assert) { const computedStyles = window.getComputedStyle(element); - assert.deepEqual(sizeUtils.getElementBoxParams('width', computedStyles), { + assert.deepEqual(getElementBoxParams('width', computedStyles), { border: 2, margin: 12, padding: 8 }, 'element borders, paddings and margins were computed correctly'); - assert.deepEqual(sizeUtils.getElementBoxParams('height', computedStyles), { + assert.deepEqual(getElementBoxParams('height', computedStyles), { border: 2, margin: 10, padding: 6 @@ -297,7 +300,7 @@ QUnit.module('calculate height', { QUnit.test('check addOffsetToMaxHeight', function(assert) { const checkFunc = ({ value, offset, container }, expected) => { - assert.strictEqual(sizeUtils.addOffsetToMaxHeight(value, offset, container), expected); + assert.strictEqual(addOffsetToMaxHeight(value, offset, container), expected); }; checkFunc({ value: 300, offset: 0, container: null }, 300); @@ -310,13 +313,13 @@ QUnit.test('check addOffsetToMaxHeight', function(assert) { checkFunc({ value: 'auto', offset: 0, container: null }, 'auto'); checkFunc({ value: null, offset: -50, container: null }, 'none'); - assert.roughEqual(sizeUtils.addOffsetToMaxHeight('50%', -20, window), windowHeight / 2 - 20, 1, 'string value in percent'); - assert.roughEqual(sizeUtils.addOffsetToMaxHeight('50%', -20, this.container), 30, 1, 'string value in percent with specific container'); + assert.roughEqual(addOffsetToMaxHeight('50%', -20, window), windowHeight / 2 - 20, 1, 'string value in percent'); + assert.roughEqual(addOffsetToMaxHeight('50%', -20, this.container), 30, 1, 'string value in percent with specific container'); }); QUnit.test('check addOffsetToMinHeight', function(assert) { const checkFunc = ({ value, offset, container }, expected) => { - assert.strictEqual(sizeUtils.addOffsetToMinHeight(value, offset, container), expected); + assert.strictEqual(addOffsetToMinHeight(value, offset, container), expected); }; checkFunc({ value: 300, offset: 0, container: null }, 300); @@ -329,21 +332,21 @@ QUnit.test('check addOffsetToMinHeight', function(assert) { checkFunc({ value: 'auto', offset: 0, container: null }, 'auto'); checkFunc({ value: null, offset: -50, container: null }, 0); - assert.roughEqual(sizeUtils.addOffsetToMinHeight('50%', -20, window), windowHeight / 2 - 20, 1, 'string value in percent'); - assert.roughEqual(sizeUtils.addOffsetToMaxHeight('50%', -20, this.container), 30, 1, 'string value in percent with specific container'); + assert.roughEqual(addOffsetToMinHeight('50%', -20, window), windowHeight / 2 - 20, 1, 'string value in percent'); + assert.roughEqual(addOffsetToMaxHeight('50%', -20, this.container), 30, 1, 'string value in percent with specific container'); }); QUnit.test('check getVerticalOffsets', function(assert) { - assert.strictEqual(sizeUtils.getVerticalOffsets(null), 0, 'no element'); - assert.strictEqual(sizeUtils.getVerticalOffsets(this.container), 20, 'container paddings'); - assert.strictEqual(sizeUtils.getVerticalOffsets(this.container, true), 30, 'include margins'); - assert.strictEqual(sizeUtils.getVerticalOffsets(this.invisibleElement), 10, 'invisible element paddings'); + assert.strictEqual(getVerticalOffsets(null), 0, 'no element'); + assert.strictEqual(getVerticalOffsets(this.container), 20, 'container paddings'); + assert.strictEqual(getVerticalOffsets(this.container, true), 30, 'include margins'); + assert.strictEqual(getVerticalOffsets(this.invisibleElement), 10, 'invisible element paddings'); }); QUnit.test('check getVisibleHeight', function(assert) { - assert.strictEqual(sizeUtils.getVerticalOffsets(null), 0, 'no element'); - assert.strictEqual(sizeUtils.getVisibleHeight(this.container), 100, 'container height'); - assert.strictEqual(sizeUtils.getVisibleHeight(this.invisibleElement), 0, 'invisible element height'); + assert.strictEqual(getVerticalOffsets(null), 0, 'no element'); + assert.strictEqual(getVisibleHeight(this.container), 100, 'container height'); + assert.strictEqual(getVisibleHeight(this.invisibleElement), 0, 'invisible element height'); }); QUnit.test('height for element with transform', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.string.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.string.tests.js index 7d741058029f..dd40da14f95f 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.string.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.string.tests.js @@ -1,4 +1,4 @@ -const stringUtils = require('core/utils/string'); +import * as stringUtils from 'core/utils/string'; QUnit.module('String utils'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.topOverlay.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.topOverlay.tests.js index e166fe4a77b8..4a16594e8e4b 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.topOverlay.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.topOverlay.tests.js @@ -1,5 +1,5 @@ -const hideTopOverlay = require('common/core/environment/hide_top_overlay'); -const hideTopOverlayCallback = require('common/core/environment/hide_callback').hideCallback; +import hideTopOverlay from 'common/core/environment/hide_top_overlay'; +import { hideCallback as hideTopOverlayCallback } from 'common/core/environment/hide_callback'; QUnit.module('top overlay util'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.type.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.type.tests.js index 64fc102e8fbf..f9b83d4d1f72 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.type.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.type.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const typeUtils = require('core/utils/type'); -const Deferred = require('core/utils/deferred').Deferred; -const renderer = require('core/renderer'); -const eventsEngine = require('common/core/events/core/events_engine'); +import $ from 'jquery'; +import * as typeUtils from 'core/utils/type'; +import { Deferred } from 'core/utils/deferred'; +import renderer from 'core/renderer'; +import eventsEngine from 'common/core/events/core/events_engine'; QUnit.module('Type checking'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.variableWrapper.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.variableWrapper.tests.js index 6826b0d54b22..2d501deaa2bd 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.variableWrapper.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.variableWrapper.tests.js @@ -1,5 +1,5 @@ -const variableWrapper = require('core/utils/variable_wrapper'); -const { logger } = require('core/utils/console'); +import variableWrapper from 'core/utils/variable_wrapper'; +import { logger } from 'core/utils/console'; QUnit.test('Base wrapper methods', function(assert) { assert.strictEqual(variableWrapper.isWrapped(3), false, 'isWrapped method'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.version.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.version.tests.js index 52ac8ad732c5..7d92557fef71 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.version.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.version.tests.js @@ -1,4 +1,4 @@ -const compare = require('core/utils/version').compare; +import { compare } from 'core/utils/version'; QUnit.module('version'); diff --git a/packages/devextreme/testing/tests/DevExpress.core/utils.viewPort.tests.js b/packages/devextreme/testing/tests/DevExpress.core/utils.viewPort.tests.js index d221fc4188d7..2764eb8ea107 100644 --- a/packages/devextreme/testing/tests/DevExpress.core/utils.viewPort.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.core/utils.viewPort.tests.js @@ -1,5 +1,5 @@ -const $ = require('jquery'); -const viewPortUtils = require('core/utils/view_port'); +import $ from 'jquery'; +import * as viewPortUtils from 'core/utils/view_port'; const viewPort = viewPortUtils.value; const viewPortChanged = viewPortUtils.changeCallback; diff --git a/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js b/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js index 65714c62c3a7..59857ba336d3 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/odataCommonOData.tests.js @@ -1,8 +1,9 @@ -const $ = require('jquery'); -const converters = require('common/data/odata/utils').keyConverters; -const interpretJsonFormat = require('common/data/odata/utils').OData__internals.interpretJsonFormat; -const Guid = require('core/guid'); -const typeUtils = require('core/utils/type'); +import $ from 'jquery'; +import { keyConverters as converters, OData__internals } from 'common/data/odata/utils'; +import Guid from 'core/guid'; +import { isNumeric } from 'core/utils/type'; + +const interpretJsonFormat = OData__internals.interpretJsonFormat; QUnit.module('OData 2'); QUnit.test('key converters', function(assert) { @@ -83,10 +84,10 @@ QUnit.test('count', function(assert) { const t4 = interpretJsonFormat(a4, 'success'); assert.equal(t1.count, 3); - assert.ok(typeUtils.isNumeric(t1.count)); + assert.ok(isNumeric(t1.count)); assert.equal(t2.count, 3); - assert.ok(typeUtils.isNumeric(t2.count)); + assert.ok(isNumeric(t2.count)); assert.ok(!t3.count); assert.ok(!t4.count); @@ -173,10 +174,10 @@ QUnit.test('count', function(assert) { const t4 = interpretJsonFormat(a4, 'success'); assert.equal(t1.count, 3); - assert.ok(typeUtils.isNumeric(t1.count)); + assert.ok(isNumeric(t1.count)); assert.equal(t2.count, 3); - assert.ok(typeUtils.isNumeric(t2.count)); + assert.ok(isNumeric(t2.count)); assert.ok(!t3.count); assert.ok(!t4.count); diff --git a/packages/devextreme/testing/tests/DevExpress.data/storeCustom.tests.js b/packages/devextreme/testing/tests/DevExpress.data/storeCustom.tests.js index 77d783ec7864..9df83eb8ee6e 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/storeCustom.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/storeCustom.tests.js @@ -1,8 +1,10 @@ -const $ = require('jquery'); -const CustomStore = require('common/data/custom_store').CustomStore; -const { isLoadResultObject, isGroupItemsArray, isItemsArray } = require('common/data/custom_store'); -const processRequestResultLock = require('common/data/utils').processRequestResultLock; -const config = require('core/config'); +import $ from 'jquery'; +import { CustomStore, isLoadResultObject, isGroupItemsArray, isItemsArray } from 'common/data/custom_store'; +import { processRequestResultLock } from 'common/data/utils'; +import config from 'core/config'; +import ErrorHandlingHelper from '../../helpers/data.errorHandlingHelper.js'; +import ajaxMock from '../../helpers/ajaxMock.js'; + const ERRORS = { INVALID_RETURN: 'E4012', MISSING_USER_FUNC: 'E4011', @@ -10,8 +12,6 @@ const ERRORS = { QUERY_NOT_SUPPORTED: 'E4010', REQUEST_ERROR: 'E4013' }; -const ErrorHandlingHelper = require('../../helpers/data.errorHandlingHelper.js'); -const ajaxMock = require('../../helpers/ajaxMock.js'); QUnit.testDone(function() { ajaxMock.clear(); diff --git a/packages/devextreme/testing/tests/DevExpress.data/storeCustom_loadModeRaw.tests.js b/packages/devextreme/testing/tests/DevExpress.data/storeCustom_loadModeRaw.tests.js index 1d77cb003870..dfe93222a34e 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/storeCustom_loadModeRaw.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/storeCustom_loadModeRaw.tests.js @@ -1,5 +1,5 @@ -const CustomStore = require('common/data/custom_store').CustomStore; -const ErrorHandlingHelper = require('../../helpers/data.errorHandlingHelper.js'); +import { CustomStore } from 'common/data/custom_store'; +import ErrorHandlingHelper from '../../helpers/data.errorHandlingHelper.js'; const RAW = 'raw'; diff --git a/packages/devextreme/testing/tests/DevExpress.data/storeLocal.tests.js b/packages/devextreme/testing/tests/DevExpress.data/storeLocal.tests.js index 84d9f5ef2c2c..98f2a6ce1387 100644 --- a/packages/devextreme/testing/tests/DevExpress.data/storeLocal.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.data/storeLocal.tests.js @@ -1,4 +1,4 @@ -const LocalStore = require('common/data/local_store'); +import LocalStore from 'common/data/local_store'; const TEST_NAME = '65DFE188-D178-11E1-A097-51216288709B'; const DX_LOCALSTORAGE_ITEM_NAME = 'dx-data-localStore-' + TEST_NAME; diff --git a/packages/devextreme/testing/tests/DevExpress.exporter/pdfCreator.tests.js b/packages/devextreme/testing/tests/DevExpress.exporter/pdfCreator.tests.js index 0019aba4340f..455daabecc4f 100644 --- a/packages/devextreme/testing/tests/DevExpress.exporter/pdfCreator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.exporter/pdfCreator.tests.js @@ -1,10 +1,12 @@ -const $ = require('jquery'); -const version = require('core/version').version; -const getData = require('exporter').pdf.getData; -const pdfCreator = require('__internal/exporter/pdf_creator').__tests; -const isFunction = require('core/utils/type').isFunction; -const imageCreator = require('__internal/exporter/image_creator').imageCreator; -const getWindow = require('core/utils/window').getWindow; +import $ from 'jquery'; +import { version } from 'core/version'; +import { pdf } from 'exporter'; +import { __tests as pdfCreator } from '__internal/exporter/pdf_creator'; +import { isFunction } from 'core/utils/type'; +import { imageCreator } from '__internal/exporter/image_creator'; +import { getWindow } from 'core/utils/window'; + +const getData = pdf.getData; const window = getWindow(); const ASN_DATE_REGEX = /CreationDate\s\(D:([0-9]+)Z([0-9]+)'([0-9]+)'/; diff --git a/packages/devextreme/testing/tests/DevExpress.exporter/svgCreator.tests.js b/packages/devextreme/testing/tests/DevExpress.exporter/svgCreator.tests.js index 07af2a88a0a1..f52588a6dc00 100644 --- a/packages/devextreme/testing/tests/DevExpress.exporter/svgCreator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.exporter/svgCreator.tests.js @@ -1,8 +1,10 @@ -const $ = require('jquery'); -const isFunction = require('core/utils/type').isFunction; -const exporter = require('exporter').svg; +import $ from 'jquery'; +import { isFunction } from 'core/utils/type'; +import { svg } from 'exporter'; +import * as svgUtils from 'core/utils/svg'; + +const exporter = svg; const svgCreator = exporter.creator; -const svgUtils = require('core/utils/svg'); function setupCanvasStub() { // Blob diff --git a/packages/devextreme/testing/tests/DevExpress.jquery/bundled.tests.js b/packages/devextreme/testing/tests/DevExpress.jquery/bundled.tests.js index 0fc86f98a8e9..26ba47daecfb 100644 --- a/packages/devextreme/testing/tests/DevExpress.jquery/bundled.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.jquery/bundled.tests.js @@ -1,18 +1,13 @@ -define(function(require) { - if(QUnit.urlParams['nojquery']) { - return; - } - - const $ = require('jquery'); - - require('bundles/dx.all.js'); - +import $ from 'jquery'; +import 'integration/jquery'; +import dxButton from 'ui/button'; +if(!QUnit.urlParams['nojquery']) { QUnit.module('jquery integration'); QUnit.test('renderer uses correct strategy', function(assert) { const node = document.createElement('div'); - const element = new DevExpress.ui.dxButton(node).element(); + const element = new dxButton(node).element(); assert.ok(element instanceof window.jQuery); }); @@ -22,4 +17,4 @@ define(function(require) { assert.equal(typeof $element.dxButton, 'function'); }); -}); +} diff --git a/packages/devextreme/testing/tests/DevExpress.jquery/selectors.tests.js b/packages/devextreme/testing/tests/DevExpress.jquery/selectors.tests.js index 1fa633d8d503..3e03a4f8c55f 100644 --- a/packages/devextreme/testing/tests/DevExpress.jquery/selectors.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.jquery/selectors.tests.js @@ -1,10 +1,7 @@ -define(function(require) { - const $ = require('jquery'); - - if(QUnit.urlParams['nojquery']) { - return; - } +import $ from 'jquery'; +import selectors from '__internal/core/utils/m_selectors'; +if(!QUnit.urlParams['nojquery']) { QUnit.testStart(function() { const markup = `
@@ -49,8 +46,6 @@ define(function(require) { $('#qunit-fixture').html(markup); }); - const selectors = require('__internal/core/utils/m_selectors'); - QUnit.test('focusable', function(assert) { const focusableContainer = $('.focusable'); focusableContainer.each(function(index, item) { @@ -78,4 +73,4 @@ define(function(require) { assert.ok(!$(item).is(selectors.tabbable)); }); }); -}); +} diff --git a/packages/devextreme/testing/tests/DevExpress.jquery/template.tests.js b/packages/devextreme/testing/tests/DevExpress.jquery/template.tests.js index c072d222b479..c36c17a61804 100644 --- a/packages/devextreme/testing/tests/DevExpress.jquery/template.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.jquery/template.tests.js @@ -1,134 +1,126 @@ -SystemJS.config({ - map: { - 'jqueryify': SystemJS.map.jquery +import $ from 'jquery'; +import { Template } from 'core/templates/template'; +import { setTemplateEngine } from 'core/templates/template_engine_registry'; +import errors from 'core/errors'; + +QUnit.module('custom template rendering', { + beforeEach: function() { + this.originalLog = errors.log; + }, + afterEach: function() { + errors.log = this.originalLog; } }); -define(function(require) { - const $ = require('jquery'); - const Template = require('core/templates/template').Template; - const setTemplateEngine = require('core/templates/template_engine_registry').setTemplateEngine; - const errors = require('core/errors'); - - QUnit.module('custom template rendering', { - beforeEach: function() { - this.originalLog = errors.log; - }, - afterEach: function() { - errors.log = this.originalLog; +QUnit.module('user template engine'); + +const customUserTemplate = { + compile: function(element) { + element = $(element); + if(element[0].nodeName.toLowerCase() !== 'script') { + element = $('
').append(element); } - }); - QUnit.module('user template engine'); + const text = element.html(); - const customUserTemplate = { - compile: function(element) { - element = $(element); - if(element[0].nodeName.toLowerCase() !== 'script') { - element = $('
').append(element); + return text.split('$'); + }, + render: function(template, data, index) { + let i; + const result = template.slice(0); + for(i = 0; i < template.length; i++) { + if(template[i] in data) { + result[i] = data[template[i]]; } - - const text = element.html(); - - return text.split('$'); - }, - render: function(template, data, index) { - let i; - const result = template.slice(0); - for(i = 0; i < template.length; i++) { - if(template[i] in data) { - result[i] = data[template[i]]; - } - if(template[i] === '@index') { - result[i] = index; - } + if(template[i] === '@index') { + result[i] = index; } - return result.join(''); } - }; + return result.join(''); + } +}; - QUnit.test('custom user template engine for div template', function(assert) { - setTemplateEngine(customUserTemplate); +QUnit.test('custom user template engine for div template', function(assert) { + setTemplateEngine(customUserTemplate); - const template = new Template($('
$text$
')); - const container = $('
'); + const template = new Template($('
$text$
')); + const container = $('
'); - template.render({ model: { text: 123 }, container: container }); + template.render({ model: { text: 123 }, container: container }); - assert.equal(container.children().length, 1); - assert.equal(container.children().text(), '123'); - }); + assert.equal(container.children().length, 1); + assert.equal(container.children().text(), '123'); +}); - QUnit.test('custom user template engine for script template', function(assert) { - setTemplateEngine(customUserTemplate); +QUnit.test('custom user template engine for script template', function(assert) { + setTemplateEngine(customUserTemplate); - const template = new Template($('')); - const container = $('
'); + const template = new Template($('')); + const container = $('
'); - template.render({ model: { text: 123 }, container: container }); + template.render({ model: { text: 123 }, container: container }); - assert.equal(container.children('b').length, 1); - assert.equal(container.text().replace('\r\n', ''), 'Text: 123'); - }); + assert.equal(container.children('b').length, 1); + assert.equal(container.text().replace('\r\n', ''), 'Text: 123'); +}); - QUnit.test('custom user template engine has access to item index', function(assert) { - setTemplateEngine(customUserTemplate); +QUnit.test('custom user template engine has access to item index', function(assert) { + setTemplateEngine(customUserTemplate); - const template = new Template($('
$text$, ($@index$)
')); - const container = $('
'); + const template = new Template($('
$text$, ($@index$)
')); + const container = $('
'); - template.render({ model: { text: 123 }, container: container, index: 1 }); + template.render({ model: { text: 123 }, container: container, index: 1 }); - assert.equal(container.children().text(), '123, (1)'); - }); + assert.equal(container.children().text(), '123, (1)'); +}); - QUnit.test('removing div template from document on creation', function(assert) { - setTemplateEngine(customUserTemplate); +QUnit.test('removing div template from document on creation', function(assert) { + setTemplateEngine(customUserTemplate); - const template = new Template($('
$text$
')); - const container = $('
'); + const template = new Template($('
$text$
')); + const container = $('
'); - template.render({ model: { text: 123 }, container: container }); + template.render({ model: { text: 123 }, container: container }); - assert.equal(container.children().length, 1); - assert.equal(container.children().text(), '123'); - }); + assert.equal(container.children().length, 1); + assert.equal(container.children().text(), '123'); +}); - QUnit.test('template render result', function(assert) { - setTemplateEngine(customUserTemplate); +QUnit.test('template render result', function(assert) { + setTemplateEngine(customUserTemplate); - const template = new Template($('
$text$
')); - const container = $('
'); + const template = new Template($('
$text$
')); + const container = $('
'); - let result = template.render({ model: { text: 123 }, container: container }); + let result = template.render({ model: { text: 123 }, container: container }); - result = $(result); + result = $(result); - assert.equal(result.length, 1); - assert.equal(result[0].tagName.toLowerCase(), 'div'); - assert.equal(result.text(), '123'); - }); + assert.equal(result.length, 1); + assert.equal(result[0].tagName.toLowerCase(), 'div'); + assert.equal(result.text(), '123'); +}); - QUnit.module('default template engine', { - beforeEach: function() { - setTemplateEngine('default'); - } - }); +QUnit.module('default template engine', { + beforeEach: function() { + setTemplateEngine('default'); + } +}); - QUnit.test('default template engine should clone element', function(assert) { - const $element = $('
123
'); - const template = new Template($element); - const $result = template.render({ model: null, container: $('
') }); +QUnit.test('default template engine should clone element', function(assert) { + const $element = $('
123
'); + const template = new Template($element); + const $result = template.render({ model: null, container: $('
') }); - assert.notEqual($result[0], $element[0]); - }); + assert.notEqual($result[0], $element[0]); +}); - QUnit.test('default template engine should preserve element for transcluded templates', function(assert) { - const $element = $('
123
'); - const template = new Template($element); - const $result = template.render({ model: null, container: $('
'), transclude: true }); +QUnit.test('default template engine should preserve element for transcluded templates', function(assert) { + const $element = $('
123
'); + const template = new Template($element); + const $result = template.render({ model: null, container: $('
'), transclude: true }); - assert.equal($result[0], $element[0]); - }); + assert.equal($result[0], $element[0]); }); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js index 1aa8ec8d966b..73fb8de9fa96 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/accordion.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/accordion'); -require('integration/knockout'); +import 'ui/accordion'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('accordion'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/actionSheet.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/actionSheet.tests.js index 915242f80339..7f9b0f8be278 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/actionSheet.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/actionSheet.tests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const ko = require('knockout'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import ko from 'knockout'; -require('ui/action_sheet'); -require('integration/knockout'); +import 'ui/action_sheet'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('actionSheet'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js index 75e68a92ef42..051095d87f9e 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/autocomplete.tests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const keyboardMock = require('../../helpers/keyboardMock.js'); -const ko = require('knockout'); -const Autocomplete = require('ui/autocomplete'); +import $ from 'jquery'; +import keyboardMock from '../../helpers/keyboardMock.js'; +import ko from 'knockout'; +import Autocomplete from 'ui/autocomplete'; -require('integration/knockout'); +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('autocomplete'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js index dcf294de0542..895ea354435f 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/box.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/box'); -require('integration/knockout'); +import 'ui/box'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('box'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js index 67b304370855..36c48366dbfa 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/calendar.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('integration/knockout'); -require('ui/calendar'); +import 'integration/knockout'; +import 'ui/calendar'; if(QUnit.urlParams['nocsp']) { QUnit.module('calendar'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/cleanNode.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/cleanNode.tests.js index 09d033a2cb0f..18cfac3f7b09 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/cleanNode.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/cleanNode.tests.js @@ -1,8 +1,8 @@ -require('integration/knockout'); +import 'integration/knockout'; -const $ = require('jquery'); -const ko = require('knockout'); -const dataUtils = require('core/element_data'); +import $ from 'jquery'; +import ko from 'knockout'; +import * as dataUtils from 'core/element_data'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js index 85fc6c1a9364..782302d79e69 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/collectionWidget.tests.js @@ -1,10 +1,10 @@ -const $ = require('jquery'); -const ko = require('knockout'); -const registerComponent = require('core/component_registrator'); -const CollectionWidget = require('ui/collection/ui.collection_widget.edit'); -const executeAsyncMock = require('../../helpers/executeAsyncMock.js'); +import $ from 'jquery'; +import ko from 'knockout'; +import registerComponent from 'core/component_registrator'; +import CollectionWidget from 'ui/collection/ui.collection_widget.edit'; +import executeAsyncMock from '../../helpers/executeAsyncMock.js'; -require('integration/knockout'); +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js index f50865a4f32a..34b6cf81b199 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/componentRegistration.tests.js @@ -1,17 +1,17 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const ko = require('knockout'); -const registerComponent = require('core/component_registrator'); -const DOMComponent = require('core/dom_component'); -const Widget = require('ui/widget/ui.widget'); -const KoTemplate = require('__internal/integration/knockout/template').KoTemplate; -const CollectionWidget = require('ui/collection/ui.collection_widget.edit'); -const config = require('core/config'); -const dataUtils = require('core/element_data'); - -require('ui/select_box'); -require('ui/lookup'); -require('integration/knockout'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import ko from 'knockout'; +import registerComponent from 'core/component_registrator'; +import DOMComponent from 'core/dom_component'; +import Widget from 'ui/widget/ui.widget'; +import { KoTemplate } from '__internal/integration/knockout/template'; +import CollectionWidget from 'ui/collection/ui.collection_widget.edit'; +import config from 'core/config'; +import * as dataUtils from 'core/element_data'; + +import 'ui/select_box'; +import 'ui/lookup'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/contextMenu.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/contextMenu.tests.js index 2e00952a03ae..007675bd338a 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/contextMenu.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/contextMenu.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/context_menu'); -require('integration/knockout'); +import 'ui/context_menu'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('contextMenu'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/draggable.test.js b/packages/devextreme/testing/tests/DevExpress.knockout/draggable.test.js index 158144782ee3..3fd767fb6891 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/draggable.test.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/draggable.test.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/draggable'); -require('integration/knockout'); +import 'ui/draggable'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('draggable'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js index 71c25bda8a73..b37dce285d97 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/dropDownEditor.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('integration/knockout'); -require('ui/drop_down_editor/ui.drop_down_editor'); +import 'integration/knockout'; +import 'ui/drop_down_editor/ui.drop_down_editor'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/eventRegistration.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/eventRegistration.tests.js index d361180f9fd4..9f374cff9ec4 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/eventRegistration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/eventRegistration.tests.js @@ -1,13 +1,13 @@ -const $ = require('jquery'); -const ko = require('knockout'); -const registerEvent = require('common/core/events/core/event_registrator'); -const dragEvents = require('common/core/events/drag'); -const clickEvent = require('common/core/events/click'); -const holdEvent = require('common/core/events/hold'); -const pointerEvents = require('common/core/events/pointer'); -const swipeEvents = require('common/core/events/swipe'); - -require('integration/knockout'); +import $ from 'jquery'; +import ko from 'knockout'; +import registerEvent from 'common/core/events/core/event_registrator'; +import * as dragEvents from 'common/core/events/drag'; +import * as clickEvent from 'common/core/events/click'; +import holdEvent from 'common/core/events/hold'; +import pointerEvents from 'common/core/events/pointer'; +import * as swipeEvents from 'common/core/events/swipe'; + +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/fieldset_bundled.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/fieldset_bundled.tests.js index fca674de95b1..a06d1f04ed40 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/fieldset_bundled.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/fieldset_bundled.tests.js @@ -1,12 +1,12 @@ -const $ = require('jquery'); -const ko = require('knockout'); -const browser = require('core/utils/browser'); -const devices = require('core/devices'); - -require('fluent_blue_light.css!'); -require('../../helpers/executeAsyncMock.js'); -require('integration/knockout'); -require('bundles/modules/parts/widgets-web'); +import $ from 'jquery'; +import ko from 'knockout'; +import browser from 'core/utils/browser'; +import devices from 'core/devices'; + +import 'fluent_blue_light.css!'; +import '../../helpers/executeAsyncMock.js'; +import 'integration/knockout'; +import 'bundles/modules/parts/widgets-web'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js index ccaef0f8ac54..e714b13b60fa 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/list.tests.js @@ -1,13 +1,13 @@ // eslint-disable-next-line spellcheck/spell-checker -const { rerender } = require('inferno'); -const $ = require('jquery'); -const ko = require('knockout'); -const executeAsyncMock = require('../../helpers/executeAsyncMock.js'); +import { rerender } from 'inferno'; +import $ from 'jquery'; +import ko from 'knockout'; +import executeAsyncMock from '../../helpers/executeAsyncMock.js'; -require('ui/list'); -require('integration/knockout'); +import 'ui/list'; +import 'integration/knockout'; -require('fluent_blue_light.css!'); +import 'fluent_blue_light.css!'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/loadPanel.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/loadPanel.tests.js index fd1a488e1d02..1c0bac242b33 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/loadPanel.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/loadPanel.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/load_panel'); -require('integration/knockout'); +import 'ui/load_panel'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js index dce97a7ad480..e8a4e4f54572 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/lookup.tests.js @@ -1,10 +1,10 @@ -const $ = require('jquery'); -const fx = require('common/core/animation/fx'); -const executeAsyncMock = require('../../helpers/executeAsyncMock.js'); -const ko = require('knockout'); +import $ from 'jquery'; +import fx from 'common/core/animation/fx'; +import executeAsyncMock from '../../helpers/executeAsyncMock.js'; +import ko from 'knockout'; -require('ui/lookup'); -require('integration/knockout'); +import 'ui/lookup'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/objectUtils.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/objectUtils.tests.js index 957c8333967d..40473d14344f 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/objectUtils.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/objectUtils.tests.js @@ -1,8 +1,8 @@ -const ko = require('knockout'); -const variableWrapper = require('core/utils/variable_wrapper'); -const objectUtils = require('core/utils/object'); +import ko from 'knockout'; +import variableWrapper from 'core/utils/variable_wrapper'; +import * as objectUtils from 'core/utils/object'; -require('integration/knockout'); +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('objectUtils'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/overlay.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/overlay.tests.js index 43e88500b53c..589945083c9d 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/overlay.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/overlay.tests.js @@ -1,12 +1,12 @@ -const $ = require('jquery'); -const fx = require('common/core/animation/fx'); -const ko = require('knockout'); +import $ from 'jquery'; +import fx from 'common/core/animation/fx'; +import ko from 'knockout'; -require('ui/overlay/ui.overlay'); -require('ui/slider'); -require('integration/knockout'); +import 'ui/overlay/ui.overlay'; +import 'ui/slider'; +import 'integration/knockout'; -require('fluent_blue_light.css!'); +import 'fluent_blue_light.css!'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/pivotGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/pivotGrid.tests.js index 371579a4c8f6..8bba7db3198d 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/pivotGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/pivotGrid.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/pivot_grid/ui.pivot_grid'); -require('integration/knockout'); +import 'ui/pivot_grid/ui.pivot_grid'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/popup.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/popup.tests.js index 7674a1d2da9b..786a39b98e49 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/popup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/popup.tests.js @@ -1,11 +1,11 @@ -const $ = require('jquery'); -const viewPort = require('core/utils/view_port').value; -const devices = require('core/devices'); -const themes = require('ui/themes'); -const ko = require('knockout'); - -require('ui/popup'); -require('integration/knockout'); +import $ from 'jquery'; +import { value as viewPort } from 'core/utils/view_port'; +import devices from 'core/devices'; +import themes from 'ui/themes'; +import ko from 'knockout'; + +import 'ui/popup'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/scheduler.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/scheduler.tests.js index 9e4e250dd210..7c7d4a27cbb3 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/scheduler.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/scheduler.tests.js @@ -1,11 +1,11 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('integration/knockout'); -require('ui/scheduler'); -const { waitAsync } = require('../../helpers/scheduler/waitForAsync.js'); +import 'integration/knockout'; +import 'ui/scheduler'; +import { waitAsync } from '../../helpers/scheduler/waitForAsync.js'; -require('fluent_blue_light.css!'); +import 'fluent_blue_light.css!'; if(QUnit.urlParams['nocsp']) { QUnit.module('scheduler'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/selectBox.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/selectBox.tests.js index e1ef4e07e3a6..ebbcd6d86678 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/selectBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/selectBox.tests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const SelectBox = require('ui/select_box'); -const fx = require('common/core/animation/fx'); -const ko = require('knockout'); +import $ from 'jquery'; +import SelectBox from 'ui/select_box'; +import fx from 'common/core/animation/fx'; +import ko from 'knockout'; -require('integration/knockout'); +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/sortable.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/sortable.tests.js index d8ed65f0ad23..2a957de9f147 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/sortable.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/sortable.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/sortable'); -require('integration/knockout'); +import 'ui/sortable'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('sortable'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/tabs.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/tabs.tests.js index 04b7d4ecb257..6f0e24c9e0c5 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/tabs.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/tabs.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/tabs'); -require('integration/knockout'); +import 'ui/tabs'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('tabs'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js index 0669839de5d5..a3da1992fc6c 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/tagBox.tests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const TagBox = require('ui/tag_box'); -const fx = require('common/core/animation/fx'); -const ko = require('knockout'); +import $ from 'jquery'; +import TagBox from 'ui/tag_box'; +import fx from 'common/core/animation/fx'; +import ko from 'knockout'; -require('integration/knockout'); +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/template.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/template.tests.js index d1c93959a99b..0a0e61558a83 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/template.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/template.tests.js @@ -1,7 +1,7 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const ko = require('knockout'); -const KoTemplate = require('__internal/integration/knockout/template').KoTemplate; +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import ko from 'knockout'; +import { KoTemplate } from '__internal/integration/knockout/template'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/toolbar.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/toolbar.tests.js index c062021fd46d..feed2c66c09f 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/toolbar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/toolbar.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/toolbar'); -require('integration/knockout'); +import 'ui/toolbar'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/treeList.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/treeList.tests.js index c373b4e03a6c..cd28b27a44cb 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/treeList.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/treeList.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const ko = require('knockout'); +import $ from 'jquery'; +import ko from 'knockout'; -require('ui/tree_list'); -require('integration/knockout'); +import 'ui/tree_list'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('treeList'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/treeView.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/treeView.tests.js index f36d202feda9..e315f3c49d4e 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/treeView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/treeView.tests.js @@ -1,10 +1,10 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const ko = require('knockout'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import ko from 'knockout'; -require('ui/button'); -require('ui/tree_view'); -require('integration/knockout'); +import 'ui/button'; +import 'ui/tree_view'; +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('treeView'); diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/validationGroup.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/validationGroup.tests.js index 53552dd61d28..03cafdd745ad 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/validationGroup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/validationGroup.tests.js @@ -1,11 +1,11 @@ -const $ = require('jquery'); -const ko = require('knockout'); -const ValidationEngine = require('ui/validation_engine'); - -require('ui/text_box'); -require('ui/validation_group'); -require('ui/validator'); -require('integration/knockout'); +import $ from 'jquery'; +import ko from 'knockout'; +import ValidationEngine from 'ui/validation_engine'; + +import 'ui/text_box'; +import 'ui/validation_group'; +import 'ui/validator'; +import 'integration/knockout'; const moduleWithoutCsp = QUnit.urlParams['nocsp'] ? QUnit.module : QUnit.module.skip; diff --git a/packages/devextreme/testing/tests/DevExpress.knockout/variableWrapperUtils.tests.js b/packages/devextreme/testing/tests/DevExpress.knockout/variableWrapperUtils.tests.js index a43c88e1ab7f..bc793dc7d40c 100644 --- a/packages/devextreme/testing/tests/DevExpress.knockout/variableWrapperUtils.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.knockout/variableWrapperUtils.tests.js @@ -1,8 +1,8 @@ -const ko = require('knockout'); -const variableWrapper = require('core/utils/variable_wrapper'); -const { logger } = require('core/utils/console'); +import ko from 'knockout'; +import variableWrapper from 'core/utils/variable_wrapper'; +import { logger } from 'core/utils/console'; -require('integration/knockout'); +import 'integration/knockout'; if(QUnit.urlParams['nocsp']) { QUnit.module('variableWrapperUtils'); diff --git a/packages/devextreme/testing/tests/DevExpress.localization/ldml.tests.js b/packages/devextreme/testing/tests/DevExpress.localization/ldml.tests.js index b96f360e315f..c368509ea446 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/ldml.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/ldml.tests.js @@ -1,17 +1,15 @@ -require('../../helpers/noIntl.js'); -const getNumberFormatter = require('common/core/localization/ldml/number').getFormatter; -const getNumberFormat = require('common/core/localization/ldml/number').getFormat; -const getDateParser = require('common/core/localization/ldml/date.parser').getParser; -const getRegExpInfo = require('common/core/localization/ldml/date.parser').getRegExpInfo; -const getDateFormatter = require('common/core/localization/ldml/date.formatter').getFormatter; -const getDateFormat = require('common/core/localization/ldml/date.format').getFormat; -const defaultDateNames = require('common/core/localization/default_date_names'); -const numberLocalization = require('common/core/localization/number'); -const dateLocalization = require('common/core/localization/date'); -const extend = require('core/utils/extend').extend; -const console = require('core/utils/console').logger; - -require('common/core/localization/currency'); +import '../../helpers/noIntl.js'; +import { getFormatter as getNumberFormatter, getFormat as getNumberFormat } from 'common/core/localization/ldml/number'; +import { getParser as getDateParser, getRegExpInfo } from 'common/core/localization/ldml/date.parser'; +import { getFormatter as getDateFormatter } from 'common/core/localization/ldml/date.formatter'; +import { getFormat as getDateFormat } from 'common/core/localization/ldml/date.format'; +import defaultDateNames from 'common/core/localization/default_date_names'; +import numberLocalization from 'common/core/localization/number'; +import dateLocalization from 'common/core/localization/date'; +import { extend } from 'core/utils/extend'; +import { logger as console } from 'core/utils/console'; + +import 'common/core/localization/currency'; const dateParts = extend({}, defaultDateNames, { getPeriodNames: function() { @@ -406,14 +404,14 @@ QUnit.module('number formatter', () => { assert.deepEqual(regExpInfo.patterns, [ 'HH', '\' h \'', 'mm' ]); - // eslint-disable-next-line no-useless-escape + assert.deepEqual(regExpInfo.regexp, /^(2[0-3]|1[0-9]|0?[0-9])(\ h\ )([1-5][0-9]|0?[0-9])$/i); regExpInfo = getRegExpInfo('HH:mm', parts); assert.deepEqual(regExpInfo.patterns, [ 'HH', ':', 'mm' ]); - // eslint-disable-next-line no-useless-escape + assert.deepEqual(regExpInfo.regexp, /^(2[0-3]|1[0-9]|0?[0-9])(h|:)([1-5][0-9]|0?[0-9])$/i); parts.getTimeSeparator = function() { @@ -423,7 +421,7 @@ QUnit.module('number formatter', () => { assert.deepEqual(regExpInfo.patterns, [ 'HH', ':', 'mm' ]); - // eslint-disable-next-line no-useless-escape + assert.deepEqual(regExpInfo.regexp, /^(2[0-3]|1[0-9]|0?[0-9])(\[\.\]|:)([1-5][0-9]|0?[0-9])$/i); }); diff --git a/packages/devextreme/testing/tests/DevExpress.localization/localization.custom.tests.js b/packages/devextreme/testing/tests/DevExpress.localization/localization.custom.tests.js index c3079b762b39..254848e54d1f 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/localization.custom.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/localization.custom.tests.js @@ -1,5 +1,5 @@ -const numberLocalization = require('common/core/localization/number'); -const dateLocalization = require('common/core/localization/date'); +import numberLocalization from 'common/core/localization/number'; +import dateLocalization from 'common/core/localization/date'; QUnit.module('Custom date names', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.tests.js b/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.tests.js index d028a628baf6..02a4ec2b0a06 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.tests.js @@ -1,957 +1,933 @@ -SystemJS.config({ - meta: { - './localization.base.tests.js': { - deps: [ - 'common/core/localization/globalize/core', - 'common/core/localization/globalize/number', - 'common/core/localization/globalize/currency', - 'common/core/localization/globalize/date', - 'common/core/localization/globalize/message' - ] - } - }, - packages: { - 'globalize': { - meta: { - '../globalize.js': { - deps: ['cldr/unresolved'] - } - } - } - } -}); +import 'common/core/localization/globalize/core'; +import 'common/core/localization/globalize/number'; +import 'common/core/localization/globalize/currency'; +import 'common/core/localization/globalize/date'; +import 'common/core/localization/globalize/message'; -define(function(require, exports, module) { - const cldrData = [ - require('devextreme-cldr-data/ar.json!json'), - require('devextreme-cldr-data/ru.json!json'), - require('devextreme-cldr-data/de.json!json'), - require('devextreme-cldr-data/da.json!json') - ]; +import { generateDate as generateExpectedDate } from '../../helpers/dateHelper.js'; - require('common/core/localization/globalize/core'); - require('common/core/localization/globalize/number'); - require('common/core/localization/globalize/currency'); - require('common/core/localization/globalize/date'); - require('common/core/localization/globalize/message'); +import $ from 'jquery'; +import Globalize from 'globalize'; +import numberLocalization from 'common/core/localization/number'; +import dateLocalization from 'common/core/localization/date'; +import messageLocalization from 'common/core/localization/message'; +import config from 'core/config'; - const generateExpectedDate = require('../../helpers/dateHelper.js').generateDate; +import ExcelJSLocalizationFormatTests from '../DevExpress.exporter/exceljsParts/exceljs.format.tests.js'; - const $ = require('jquery'); - const Globalize = require('globalize'); - const numberLocalization = require('common/core/localization/number'); - const dateLocalization = require('common/core/localization/date'); - const messageLocalization = require('common/core/localization/message'); - const config = require('core/config'); +import likelySubtags from 'cldr-core/supplemental/likelySubtags.json!'; - const ExcelJSLocalizationFormatTests = require('../DevExpress.exporter/exceljsParts/exceljs.format.tests.js'); +import { noop } from 'core/utils/common'; +import formatHelper from 'format_helper'; +import browser from 'core/utils/browser'; +import dateUtils from 'core/utils/date'; - const likelySubtags = require('cldr-core/supplemental/likelySubtags.json!'); - Globalize.load(likelySubtags); +import sharedTests from './sharedParts/localization.shared.js'; - cldrData.forEach(localeCldrData => { - Globalize.load(localeCldrData); - }); +import ar from 'devextreme-cldr-data/ar.json!json'; +import ru from 'devextreme-cldr-data/ru.json!json'; +import de from 'devextreme-cldr-data/de.json!json'; +import da from 'devextreme-cldr-data/da.json!json'; - const NBSP = String.fromCharCode(160); - const RUB = String.fromCharCode(8381); +const cldrData = [ar, ru, de, da]; - const noop = require('core/utils/common').noop; - const formatHelper = require('format_helper'); - const browser = require('core/utils/browser'); - const dateUtils = require('core/utils/date'); +Globalize.load(likelySubtags); - const sharedTests = require('./sharedParts/localization.shared.js').default; +cldrData.forEach(localeCldrData => { + Globalize.load(localeCldrData); +}); - const NEGATIVE_NUMBERS = [-4.645, -35.855]; - const ROUNDING_CORRECTION = { - '-4.64': '-4.65', - '-35.85': '-35.86' - }; +const NBSP = String.fromCharCode(160); +const RUB = String.fromCharCode(8381); + +const NEGATIVE_NUMBERS = [-4.645, -35.855]; +const ROUNDING_CORRECTION = { + '-4.64': '-4.65', + '-35.85': '-35.86' +}; + +function isIosWithMSKTimeZone() { + const isIos = navigator.userAgent.indexOf('Mac OS X') > -1 && browser['webkit']; + const hasMSKTimeZone = new Date().toString().indexOf('MSK') > -1; + + return isIos && hasMSKTimeZone; +} + +QUnit.module('Globalize common', { + before: function() { + numberLocalization.inject({ + format: function(value, format) { + // NOTE: Globalizejs implementation of negative number rounding differs from Intl. + // https://github.com/globalizejs/globalize/issues/884 + // If the fractional portion is exactly 0.5 and the argument is negative, + // the argument is rounded to the next integer in the positive direction + let result = this.callBase.apply(this, arguments); + if(NEGATIVE_NUMBERS.indexOf(value) !== -1 && format.type === 'fixedPoint' && format.precision === 2 && !!ROUNDING_CORRECTION[result]) { + result = ROUNDING_CORRECTION[result]; + } + return result; + } + }); + } +}, function() { - function isIosWithMSKTimeZone() { - const isIos = navigator.userAgent.indexOf('Mac OS X') > -1 && browser['webkit']; - const hasMSKTimeZone = new Date().toString().indexOf('MSK') > -1; + QUnit.test('engine', function(assert) { + assert.equal(numberLocalization.engine(), 'globalize'); + assert.equal(dateLocalization.engine(), 'globalize'); + assert.equal(messageLocalization.engine(), 'globalize'); + }); + + sharedTests(); +}); - return isIos && hasMSKTimeZone; +QUnit.module('Localization date (ru)', { + beforeEach: function() { + Globalize.locale('ru'); + }, + afterEach: function() { + Globalize.locale('en'); } +}, () => { + QUnit.test('getFormatParts', function(assert) { + assert.equal(dateLocalization.getFormatParts('dayofweek').length, 0); + assert.equal(dateLocalization.getFormatParts('shortdate').join(' '), 'day month year'); + assert.equal(dateLocalization.getFormatParts('longDateLongTime').join(' '), 'day month year hours minutes seconds'); + assert.equal(dateLocalization.getFormatParts('d - M - y, hh:mm:ss [SSS]').join(' '), 'day month year hours minutes seconds milliseconds'); + assert.equal(dateLocalization.getFormatParts('ah:mm').join(' '), 'hours minutes'); // T460693 + }); - QUnit.module('Globalize common', { - before: function() { - numberLocalization.inject({ - format: function(value, format) { - // NOTE: Globalizejs implementation of negative number rounding differs from Intl. - // https://github.com/globalizejs/globalize/issues/884 - // If the fractional portion is exactly 0.5 and the argument is negative, - // the argument is rounded to the next integer in the positive direction - let result = this.callBase.apply(this, arguments); - if(NEGATIVE_NUMBERS.indexOf(value) !== -1 && format.type === 'fixedPoint' && format.precision === 2 && !!ROUNDING_CORRECTION[result]) { - result = ROUNDING_CORRECTION[result]; - } - return result; - } - }); - } - }, function() { + QUnit.test('getMonthNames', function(assert) { + assert.deepEqual(dateLocalization.getMonthNames(), + ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], + 'Array of month names'); + }); - QUnit.test('engine', function(assert) { - assert.equal(numberLocalization.engine(), 'globalize'); - assert.equal(dateLocalization.engine(), 'globalize'); - assert.equal(messageLocalization.engine(), 'globalize'); - }); + QUnit.test('getMonthNames with specified type', function(assert) { + assert.deepEqual(dateLocalization.getMonthNames('wide', 'format'), + ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], + 'Array of month names'); + }); - sharedTests(); + QUnit.test('getMonthNames with type=\'standalone\'', function(assert) { + assert.deepEqual(dateLocalization.getMonthNames('wide', 'standalone'), + ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], + 'Array of month names'); }); - QUnit.module('Localization date (ru)', { - beforeEach: function() { - Globalize.locale('ru'); - }, - afterEach: function() { - Globalize.locale('en'); - } - }, () => { - QUnit.test('getFormatParts', function(assert) { - assert.equal(dateLocalization.getFormatParts('dayofweek').length, 0); - assert.equal(dateLocalization.getFormatParts('shortdate').join(' '), 'day month year'); - assert.equal(dateLocalization.getFormatParts('longDateLongTime').join(' '), 'day month year hours minutes seconds'); - assert.equal(dateLocalization.getFormatParts('d - M - y, hh:mm:ss [SSS]').join(' '), 'day month year hours minutes seconds milliseconds'); - assert.equal(dateLocalization.getFormatParts('ah:mm').join(' '), 'hours minutes'); // T460693 - }); + QUnit.test('getPeriodNames', function(assert) { + assert.deepEqual(dateLocalization.getPeriodNames(), ['AM', 'PM'], 'Array of period names'); - QUnit.test('getMonthNames', function(assert) { - assert.deepEqual(dateLocalization.getMonthNames(), - ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], - 'Array of month names'); - }); + Globalize.locale('ar'); - QUnit.test('getMonthNames with specified type', function(assert) { - assert.deepEqual(dateLocalization.getMonthNames('wide', 'format'), - ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], - 'Array of month names'); - }); + [null, 'abbreviated', 'wide', 'narrow'].forEach(format => { + ['format', null].forEach(type => { + const expect = ([null, 'wide'].includes(format) && type == null) ? ['صباحًا', 'مساءً'] : ['ص', 'م']; - QUnit.test('getMonthNames with type=\'standalone\'', function(assert) { - assert.deepEqual(dateLocalization.getMonthNames('wide', 'standalone'), - ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], - 'Array of month names'); + assert.deepEqual(dateLocalization.getPeriodNames(format, type), expect, 'Array of correct period names'); + }); }); + }); - QUnit.test('getPeriodNames', function(assert) { - assert.deepEqual(dateLocalization.getPeriodNames(), ['AM', 'PM'], 'Array of period names'); - - Globalize.locale('ar'); + QUnit.test('getDayNames', function(assert) { + assert.deepEqual(dateLocalization.getDayNames(), + ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], + 'Array of day names'); + }); - [null, 'abbreviated', 'wide', 'narrow'].forEach(format => { - ['format', null].forEach(type => { - const expect = ([null, 'wide'].includes(format) && type == null) ? ['صباحًا', 'مساءً'] : ['ص', 'م']; + QUnit.test('getTimeSeparator', function(assert) { + assert.equal(dateLocalization.getTimeSeparator(), ':'); + }); - assert.deepEqual(dateLocalization.getPeriodNames(format, type), expect, 'Array of correct period names'); - }); - }); + QUnit.test('format', function(assert) { + const expectedValues = { + 'day': '2', + 'dayofweek': 'понедельник', + 'hour': '03', + 'longdate': 'понедельник, 2 марта 2015 г.', + 'longdatelongtime': 'понедельник, 2 марта 2015 г., 03:04:05', + 'longtime': '03:04:05', + 'millisecond': '006', + 'minute': '04', + 'month': 'март', + 'monthandday': '2 марта', + 'monthandyear': 'март 2015 г.', + 'quarter': '1-й кв.', + 'quarterandyear': '1-й кв. 2015 г.', + 'second': '05', + 'shortdate': '02.03.2015', + 'shortdateshorttime': '02.03.2015, 03:04', + 'shorttime': '03:04', + 'shortyear': '15', + 'year': '2015', + + 'datetime-local': '2015-03-02T03:04:05', + 'yyyy MMMM d': '2015 марта 2', + 'ss SSS': '05 006' + }; + const date = new Date(2015, 2, 2, 3, 4, 5); + + date.setMilliseconds(6); + + $.each(expectedValues, function(format, expectedValue) { + assert.equal(dateLocalization.format(date, format), expectedValue, format + ' format'); }); - QUnit.test('getDayNames', function(assert) { - assert.deepEqual(dateLocalization.getDayNames(), - ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], - 'Array of day names'); - }); - - QUnit.test('getTimeSeparator', function(assert) { - assert.equal(dateLocalization.getTimeSeparator(), ':'); - }); - - QUnit.test('format', function(assert) { - const expectedValues = { - 'day': '2', - 'dayofweek': 'понедельник', - 'hour': '03', - 'longdate': 'понедельник, 2 марта 2015 г.', - 'longdatelongtime': 'понедельник, 2 марта 2015 г., 03:04:05', - 'longtime': '03:04:05', - 'millisecond': '006', - 'minute': '04', - 'month': 'март', - 'monthandday': '2 марта', - 'monthandyear': 'март 2015 г.', - 'quarter': '1-й кв.', - 'quarterandyear': '1-й кв. 2015 г.', - 'second': '05', - 'shortdate': '02.03.2015', - 'shortdateshorttime': '02.03.2015, 03:04', - 'shorttime': '03:04', - 'shortyear': '15', - 'year': '2015', - - 'datetime-local': '2015-03-02T03:04:05', - 'yyyy MMMM d': '2015 марта 2', - 'ss SSS': '05 006' - }; - const date = new Date(2015, 2, 2, 3, 4, 5); - - date.setMilliseconds(6); - - $.each(expectedValues, function(format, expectedValue) { - assert.equal(dateLocalization.format(date, format), expectedValue, format + ' format'); - }); + assert.equal(dateLocalization.format(date), String(new Date(2015, 2, 2, 3, 4, 5)), 'without format'); + assert.notOk(dateLocalization.format(), 'without date'); + }); - assert.equal(dateLocalization.format(date), String(new Date(2015, 2, 2, 3, 4, 5)), 'without format'); - assert.notOk(dateLocalization.format(), 'without date'); - }); + QUnit.test('format cache for different locales', function(assert) { + const originalLocale = Globalize.locale().locale; + const date = new Date(2015, 2, 2, 3, 4, 5); + try { + Globalize.locale('en'); + assert.equal(dateLocalization.format(date, 'month'), 'March'); + } finally { + Globalize.locale(originalLocale); + assert.equal(dateLocalization.format(date, 'month'), 'март'); + } + }); - QUnit.test('format cache for different locales', function(assert) { - const originalLocale = Globalize.locale().locale; - const date = new Date(2015, 2, 2, 3, 4, 5); - try { - Globalize.locale('en'); - assert.equal(dateLocalization.format(date, 'month'), 'March'); - } finally { - Globalize.locale(originalLocale); - assert.equal(dateLocalization.format(date, 'month'), 'март'); + QUnit.test('parse', function(assert) { + const assertData = { + 'day': { + text: '2', + expectedConfig: { day: 2 } + }, + 'hour': { + text: '03', + expectedConfig: { hours: 3 } + }, + 'longdate': { + text: 'понедельник, 2 марта 2015 г.', + expected: new Date(2015, 2, 2) + }, + 'longdatelongtime': { + text: 'понедельник, 2 марта 2015 г., 3:04:05', + expected: new Date(2015, 2, 2, 3, 4, 5) + }, + 'longtime': { + text: '3:04:05', + expectedConfig: { hours: 3, minutes: 4, seconds: 5 } + }, + 'minute': { + text: '04', + expectedConfig: { minutes: 4 } + }, + 'month': { + text: 'март', + expectedConfig: { month: 2, day: 1 } + }, + 'monthandday': { + text: '2 марта', + expectedConfig: { month: 2, day: 2 } + }, + 'monthandyear': { + text: 'март 2015 г.', + expected: new Date(2015, 2, 1) + }, + 'second': { + text: '05', + expectedConfig: { seconds: 5 } + }, + 'shortdate': { + text: '02.03.2015', + expected: new Date(2015, 2, 2) + }, + 'shortdateshorttime': { + text: '02.03.2015, 3:04', + expected: new Date(2015, 2, 2, 3, 4) + }, + 'shorttime': { + text: '3:04', + expectedConfig: { hours: 3, minutes: 4 } + }, + 'shortyear': { + text: '15', + expected: new Date(2015, 0, 1) + }, + 'year': { + text: '2015', + expected: new Date(2015, 0, 1) + }, + + 'datetime-local': { + text: '2015-03-02T03:04:05', + expected: new Date(2015, 2, 2, 3, 4, 5) + }, + 'yyyy MMMM d': { + text: '2015 марта 2', + expected: new Date(2015, 2, 2) } + }; + + $.each(assertData, function(format, data) { + assert.equal(dateLocalization.parse(data.text, format), String(data.expected || generateExpectedDate(data.expectedConfig)), format + ' format'); }); - QUnit.test('parse', function(assert) { - const assertData = { - 'day': { - text: '2', - expectedConfig: { day: 2 } - }, - 'hour': { - text: '03', - expectedConfig: { hours: 3 } - }, - 'longdate': { - text: 'понедельник, 2 марта 2015 г.', - expected: new Date(2015, 2, 2) - }, - 'longdatelongtime': { - text: 'понедельник, 2 марта 2015 г., 3:04:05', - expected: new Date(2015, 2, 2, 3, 4, 5) - }, - 'longtime': { - text: '3:04:05', - expectedConfig: { hours: 3, minutes: 4, seconds: 5 } - }, - 'minute': { - text: '04', - expectedConfig: { minutes: 4 } - }, - 'month': { - text: 'март', - expectedConfig: { month: 2, day: 1 } - }, - 'monthandday': { - text: '2 марта', - expectedConfig: { month: 2, day: 2 } - }, - 'monthandyear': { - text: 'март 2015 г.', - expected: new Date(2015, 2, 1) - }, - 'second': { - text: '05', - expectedConfig: { seconds: 5 } - }, - 'shortdate': { - text: '02.03.2015', - expected: new Date(2015, 2, 2) - }, - 'shortdateshorttime': { - text: '02.03.2015, 3:04', - expected: new Date(2015, 2, 2, 3, 4) - }, - 'shorttime': { - text: '3:04', - expectedConfig: { hours: 3, minutes: 4 } - }, - 'shortyear': { - text: '15', - expected: new Date(2015, 0, 1) - }, - 'year': { - text: '2015', - expected: new Date(2015, 0, 1) - }, - - 'datetime-local': { - text: '2015-03-02T03:04:05', - expected: new Date(2015, 2, 2, 3, 4, 5) - }, - 'yyyy MMMM d': { - text: '2015 марта 2', - expected: new Date(2015, 2, 2) - } - }; + assert.equal(dateLocalization.parse('550', 'millisecond').getMilliseconds(), 550, 'millisecond format'); + assert.equal(dateLocalization.parse('550', 'SSS').getMilliseconds(), 550, 'millisecond format'); - $.each(assertData, function(format, data) { - assert.equal(dateLocalization.parse(data.text, format), String(data.expected || generateExpectedDate(data.expectedConfig)), format + ' format'); - }); + assert.equal(dateLocalization.parse(dateLocalization.format(new Date(), 'shortDate')), String(generateExpectedDate({ hours: 0 })), 'without format'); + assert.notOk(dateLocalization.parse(), 'without date'); - assert.equal(dateLocalization.parse('550', 'millisecond').getMilliseconds(), 550, 'millisecond format'); - assert.equal(dateLocalization.parse('550', 'SSS').getMilliseconds(), 550, 'millisecond format'); + assert.equal(dateLocalization.parse(Globalize.formatDate(new Date(), { date: 'short' }), { date: 'short' }), String(generateExpectedDate({ hours: 0 })), 'globalize format'); + }); - assert.equal(dateLocalization.parse(dateLocalization.format(new Date(), 'shortDate')), String(generateExpectedDate({ hours: 0 })), 'without format'); - assert.notOk(dateLocalization.parse(), 'without date'); + QUnit.test('firstDayOfWeekIndex', function(assert) { + assert.equal(dateLocalization.firstDayOfWeekIndex(), 1); + }); +}); - assert.equal(dateLocalization.parse(Globalize.formatDate(new Date(), { date: 'short' }), { date: 'short' }), String(generateExpectedDate({ hours: 0 })), 'globalize format'); - }); +QUnit.module('Custom format types', () => { + QUnit.test('format: { time: \'medium\' }', function(assert) { + assert.equal(dateLocalization.format(new Date(2015, 1, 2, 3, 4, 5, 6), { time: 'medium' }), '3:04:05 AM', 'with object format'); + }); - QUnit.test('firstDayOfWeekIndex', function(assert) { - assert.equal(dateLocalization.firstDayOfWeekIndex(), 1); - }); + QUnit.test('Parse custom format', function(assert) { + const expected = new Date(2010, 2, 2).toString(); + assert.equal(dateLocalization.parse('20100302', 'yyyyMMdd'), expected, 'Format \'yyyyMMdd\' parse ok'); + assert.equal(dateLocalization.parse('02mar10', 'dMyyyy'), expected, 'Format \'dMyyyy\' parse ok'); }); +}); - QUnit.module('Custom format types', () => { - QUnit.test('format: { time: \'medium\' }', function(assert) { - assert.equal(dateLocalization.format(new Date(2015, 1, 2, 3, 4, 5, 6), { time: 'medium' }), '3:04:05 AM', 'with object format'); +QUnit.module('Localization message (custom locales)', { + beforeEach: function() { + messageLocalization.load({ + 'en': { + addedKey: 'testValue', + hello: 'Hello, {0} {1}' + } + }); + } +}, () => { + QUnit.test('Fallback to neutral culture', function(assert) { + const originalLocale = Globalize.locale().locale; + + messageLocalization.load({ + 'ru': { + TestBack: 'Back ru', + TestCancel: 'Cancel ru' + } }); - QUnit.test('Parse custom format', function(assert) { - const expected = new Date(2010, 2, 2).toString(); - assert.equal(dateLocalization.parse('20100302', 'yyyyMMdd'), expected, 'Format \'yyyyMMdd\' parse ok'); - assert.equal(dateLocalization.parse('02mar10', 'dMyyyy'), expected, 'Format \'dMyyyy\' parse ok'); + messageLocalization.load({ + 'ru-RU': { + TestCancel: 'Cancel ru-RU' + } }); + + try { + Globalize.locale('ru-RU'); + + assert.equal(messageLocalization.format('TestBack'), 'Back ru'); + assert.equal(messageLocalization.format('TestCancel'), 'Cancel ru-RU'); + } finally { + Globalize.locale(originalLocale); + } }); - QUnit.module('Localization message (custom locales)', { - beforeEach: function() { - messageLocalization.load({ - 'en': { - addedKey: 'testValue', - hello: 'Hello, {0} {1}' - } - }); + + QUnit.test('Fallback to default (en) culture', function(assert) { + const originalLocale = Globalize.locale().locale; + try { + Globalize.locale('ru'); + + assert.equal(messageLocalization.format('OK'), 'OK'); + assert.equal(messageLocalization.getFormatter('OK')(), 'OK'); + } finally { + Globalize.locale(originalLocale); } - }, () => { - QUnit.test('Fallback to neutral culture', function(assert) { - const originalLocale = Globalize.locale().locale; + }); - messageLocalization.load({ - 'ru': { - TestBack: 'Back ru', - TestCancel: 'Cancel ru' - } - }); + QUnit.test('Extended culture with empty string value (T271323)', function(assert) { + const originalLocale = Globalize.locale().locale; - messageLocalization.load({ - 'ru-RU': { - TestCancel: 'Cancel ru-RU' + Globalize.load({ + 'supplemental': { + 'likelySubtags': { + 'zh': 'zh-Hans-CN' } - }); - - try { - Globalize.locale('ru-RU'); + } + }); - assert.equal(messageLocalization.format('TestBack'), 'Back ru'); - assert.equal(messageLocalization.format('TestCancel'), 'Cancel ru-RU'); - } finally { - Globalize.locale(originalLocale); + messageLocalization.load({ + 'zh-CN': { + addedKey: '' } }); + try { + Globalize.locale('zh-CN'); - QUnit.test('Fallback to default (en) culture', function(assert) { - const originalLocale = Globalize.locale().locale; - try { - Globalize.locale('ru'); + assert.equal(messageLocalization.localizeString('@addedKey'), 'testValue', 'Default culture value'); + } finally { + Globalize.locale(originalLocale); + } + }); - assert.equal(messageLocalization.format('OK'), 'OK'); - assert.equal(messageLocalization.getFormatter('OK')(), 'OK'); - } finally { - Globalize.locale(originalLocale); + QUnit.test('localizeString by custom locale (T383089)', function(assert) { + messageLocalization.load({ + 'ru': { + 'ruAddedKey': 'ruValue' } }); + Globalize.locale('ru'); + const localized = messageLocalization.localizeString('@ruAddedKey @@ruAddedKey @'); + assert.equal(localized, 'ruValue @ruAddedKey @'); - QUnit.test('Extended culture with empty string value (T271323)', function(assert) { - const originalLocale = Globalize.locale().locale; + Globalize.locale('en'); + }); - Globalize.load({ - 'supplemental': { - 'likelySubtags': { - 'zh': 'zh-Hans-CN' - } - } - }); + QUnit.test('Empty message', function(assert) { + Globalize.loadMessages({ + 'en': { + 'empty': '' + } + }); - messageLocalization.load({ - 'zh-CN': { - addedKey: '' - } - }); + assert.equal(messageLocalization.format('empty'), ''); + }); - try { - Globalize.locale('zh-CN'); + QUnit.test('DX messages can be customized', function(assert) { + assert.equal(messageLocalization.format('dxCollectionWidget-noDataText'), 'No data to display'); - assert.equal(messageLocalization.localizeString('@addedKey'), 'testValue', 'Default culture value'); - } finally { - Globalize.locale(originalLocale); + Globalize.loadMessages({ + 'en': { + 'dxCollectionWidget-noDataText': 'Custom caption' } }); - QUnit.test('localizeString by custom locale (T383089)', function(assert) { - messageLocalization.load({ - 'ru': { - 'ruAddedKey': 'ruValue' - } - }); - Globalize.locale('ru'); - const localized = messageLocalization.localizeString('@ruAddedKey @@ruAddedKey @'); - assert.equal(localized, 'ruValue @ruAddedKey @'); + assert.equal(messageLocalization.format('dxCollectionWidget-noDataText'), 'Custom caption'); + }); - Globalize.locale('en'); + QUnit.test('getDictionary ru', function(assert) { + messageLocalization.load({ + 'ru': { + 'freshRuAddedKey': 'ruValue' + } }); + Globalize.locale('ru'); - QUnit.test('Empty message', function(assert) { - Globalize.loadMessages({ - 'en': { - 'empty': '' - } - }); + messageLocalization.localizeString('@unknownKey'); + messageLocalization.localizeString('@ruAddedKey'); - assert.equal(messageLocalization.format('empty'), ''); - }); + assert.equal(messageLocalization.getDictionary()['freshRuAddedKey'], 'ruValue'); + assert.equal(messageLocalization.getDictionary(true)['freshRuAddedKey'], undefined); + assert.equal(messageLocalization.getDictionary()['unknownKey'], 'Unknown key'); + assert.equal(messageLocalization.getDictionary(true)['unknownKey'], 'Unknown key'); - QUnit.test('DX messages can be customized', function(assert) { - assert.equal(messageLocalization.format('dxCollectionWidget-noDataText'), 'No data to display'); + Globalize.locale('en'); + }); +}); - Globalize.loadMessages({ - 'en': { - 'dxCollectionWidget-noDataText': 'Custom caption' - } - }); +QUnit.module('Localization globalizeNumber', () => { + QUnit.test('format', function(assert) { + assert.equal(numberLocalization.format(1.2), '1.2'); + assert.equal(numberLocalization.format(12), '12'); + assert.equal(numberLocalization.format(2, { minimumIntegerDigits: 2 }), '02'); + assert.equal(numberLocalization.format(12, { minimumIntegerDigits: 2 }), '12'); + assert.equal(numberLocalization.format(2, { minimumIntegerDigits: 3 }), '002'); + assert.equal(numberLocalization.format(12, { minimumIntegerDigits: 3 }), '012'); + assert.equal(numberLocalization.format(123, { minimumIntegerDigits: 3 }), '123'); + }); +}); - assert.equal(messageLocalization.format('dxCollectionWidget-noDataText'), 'Custom caption'); - }); +QUnit.module('Localization currency with Globalize', () => { - QUnit.test('getDictionary ru', function(assert) { - messageLocalization.load({ - 'ru': { - 'freshRuAddedKey': 'ruValue' - } - }); - Globalize.locale('ru'); + QUnit.test('format currency default after global config change', function(assert) { + const originalDefaultCurrency = config().defaultCurrency; - messageLocalization.localizeString('@unknownKey'); - messageLocalization.localizeString('@ruAddedKey'); + assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); - assert.equal(messageLocalization.getDictionary()['freshRuAddedKey'], 'ruValue'); - assert.equal(messageLocalization.getDictionary(true)['freshRuAddedKey'], undefined); - assert.equal(messageLocalization.getDictionary()['unknownKey'], 'Unknown key'); - assert.equal(messageLocalization.getDictionary(true)['unknownKey'], 'Unknown key'); + config({ defaultCurrency: 'EUR' }); + assert.equal(numberLocalization.format(12, { currency: 'default' }), '€12.00'); + + config({ defaultCurrency: originalDefaultCurrency }); + assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); - Globalize.locale('en'); - }); }); - QUnit.module('Localization globalizeNumber', () => { - QUnit.test('format', function(assert) { - assert.equal(numberLocalization.format(1.2), '1.2'); - assert.equal(numberLocalization.format(12), '12'); - assert.equal(numberLocalization.format(2, { minimumIntegerDigits: 2 }), '02'); - assert.equal(numberLocalization.format(12, { minimumIntegerDigits: 2 }), '12'); - assert.equal(numberLocalization.format(2, { minimumIntegerDigits: 3 }), '002'); - assert.equal(numberLocalization.format(12, { minimumIntegerDigits: 3 }), '012'); - assert.equal(numberLocalization.format(123, { minimumIntegerDigits: 3 }), '123'); - }); + QUnit.test('format', function(assert) { + assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); + assert.equal(numberLocalization.format(12, { currency: 'default' }), '$12.00'); + assert.equal(numberLocalization.format(1, { minimumIntegerDigits: 2, minimumFractionDigits: 0, currency: 'default' }), '$01'); + assert.equal(numberLocalization.format(1, { minimumIntegerDigits: 2, minimumFractionDigits: 0, currency: 'RUB' }), 'RUB' + NBSP + '01'); }); - QUnit.module('Localization currency with Globalize', () => { + QUnit.test('format currency with sign/style (T1076906)', function(assert) { + assert.equal(numberLocalization.format(-1.2, { currency: 'default', style: 'accounting' }), '($1.20)'); + assert.equal(numberLocalization.format(-1.2, { type: 'currency', useCurrencyAccountingStyle: true }), '($1)'); + assert.equal(numberLocalization.format(-12, { currency: 'default', style: 'symbol' }), '-$12.00'); + assert.equal(numberLocalization.format(-12, { type: 'currency', useCurrencyAccountingStyle: false }), '-$12'); + }); - QUnit.test('format currency default after global config change', function(assert) { - const originalDefaultCurrency = config().defaultCurrency; + QUnit.test('format currency & power in RU locale', function(assert) { + Globalize.locale('ru'); + assert.equal(numberLocalization.format(0, { type: 'currency thousands', currency: undefined, precision: 0 }), '0K' + NBSP + '$'); + assert.equal(numberLocalization.format(0, { type: 'currency thousands', currency: 'CSK', precision: 2 }), '0,00K' + NBSP + 'CSK'); + assert.equal(numberLocalization.format(2e+5, { type: 'currency thousands', precision: 0 }), '200K' + NBSP + '$'); + Globalize.locale('en'); + }); - assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); + QUnit.test('getOpenXmlCurrencyFormat: check conversion for some cultures (T835933)', function(assert) { + try { + Globalize.locale('en'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '$#,##0{0}_);\\($#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '$#,##0{0}_);\\($#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '\\R\\U\\B#,##0{0}_);\\(\\R\\U\\B#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '\\C\\N\\¥#,##0{0}_);\\(\\C\\N\\¥#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '\\N\\O\\K#,##0{0}_);\\(\\N\\O\\K#,##0{0}\\)'); + + Globalize.locale('en-ru'); // switch to parent if there are no settings for the passed culture + assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '$#,##0{0}_);\\($#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '$#,##0{0}_);\\($#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '\\R\\U\\B#,##0{0}_);\\(\\R\\U\\B#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '\\C\\N\\¥#,##0{0}_);\\(\\C\\N\\¥#,##0{0}\\)'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '\\N\\O\\K#,##0{0}_);\\(\\N\\O\\K#,##0{0}\\)'); - config({ defaultCurrency: 'EUR' }); - assert.equal(numberLocalization.format(12, { currency: 'default' }), '€12.00'); + Globalize.locale('ru'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '#,##0{0}\xA0$'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '#,##0{0}\xA0$'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '#,##0{0}\xA0\\₽'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '#,##0{0}\xA0\\C\\N\\¥'); + assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '#,##0{0}\xA0\\N\\O\\K'); + } finally { + Globalize.locale('en'); + } + }); - config({ defaultCurrency: originalDefaultCurrency }); - assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); + QUnit.test('getDecimalSeparator and getThousandsSeparator in RU locale', function(assert) { + Globalize.locale('ru'); + assert.equal(numberLocalization.getDecimalSeparator(), ','); + assert.equal(numberLocalization.getThousandsSeparator(), '\xa0'); + Globalize.locale('en'); + }); - }); + QUnit.test('getCurrencySymbol and config.defaultCurrency', function(assert) { + const originalDefaultCurrency = config().defaultCurrency; - QUnit.test('format', function(assert) { - assert.equal(numberLocalization.format(1.2, { currency: 'default' }), '$1.20'); - assert.equal(numberLocalization.format(12, { currency: 'default' }), '$12.00'); - assert.equal(numberLocalization.format(1, { minimumIntegerDigits: 2, minimumFractionDigits: 0, currency: 'default' }), '$01'); - assert.equal(numberLocalization.format(1, { minimumIntegerDigits: 2, minimumFractionDigits: 0, currency: 'RUB' }), 'RUB' + NBSP + '01'); - }); + try { + assert.equal(numberLocalization.getCurrencySymbol().symbol, '$'); - QUnit.test('format currency with sign/style (T1076906)', function(assert) { - assert.equal(numberLocalization.format(-1.2, { currency: 'default', style: 'accounting' }), '($1.20)'); - assert.equal(numberLocalization.format(-1.2, { type: 'currency', useCurrencyAccountingStyle: true }), '($1)'); - assert.equal(numberLocalization.format(-12, { currency: 'default', style: 'symbol' }), '-$12.00'); - assert.equal(numberLocalization.format(-12, { type: 'currency', useCurrencyAccountingStyle: false }), '-$12'); - }); + config({ + defaultCurrency: 'EUR' + }); - QUnit.test('format currency & power in RU locale', function(assert) { - Globalize.locale('ru'); - assert.equal(numberLocalization.format(0, { type: 'currency thousands', currency: undefined, precision: 0 }), '0K' + NBSP + '$'); - assert.equal(numberLocalization.format(0, { type: 'currency thousands', currency: 'CSK', precision: 2 }), '0,00K' + NBSP + 'CSK'); - assert.equal(numberLocalization.format(2e+5, { type: 'currency thousands', precision: 0 }), '200K' + NBSP + '$'); - Globalize.locale('en'); - }); + assert.equal(numberLocalization.getCurrencySymbol().symbol, '€'); + } finally { + config({ + defaultCurrency: originalDefaultCurrency + }); + } + }); +}); - QUnit.test('getOpenXmlCurrencyFormat: check conversion for some cultures (T835933)', function(assert) { - try { - Globalize.locale('en'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '$#,##0{0}_);\\($#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '$#,##0{0}_);\\($#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '\\R\\U\\B#,##0{0}_);\\(\\R\\U\\B#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '\\C\\N\\¥#,##0{0}_);\\(\\C\\N\\¥#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '\\N\\O\\K#,##0{0}_);\\(\\N\\O\\K#,##0{0}\\)'); - - Globalize.locale('en-ru'); // switch to parent if there are no settings for the passed culture - assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '$#,##0{0}_);\\($#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '$#,##0{0}_);\\($#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '\\R\\U\\B#,##0{0}_);\\(\\R\\U\\B#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '\\C\\N\\¥#,##0{0}_);\\(\\C\\N\\¥#,##0{0}\\)'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '\\N\\O\\K#,##0{0}_);\\(\\N\\O\\K#,##0{0}\\)'); - - Globalize.locale('ru'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat(undefined), '#,##0{0}\xA0$'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('USD'), '#,##0{0}\xA0$'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('RUB'), '#,##0{0}\xA0\\₽'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('CNY'), '#,##0{0}\xA0\\C\\N\\¥'); - assert.equal(numberLocalization.getOpenXmlCurrencyFormat('NOK'), '#,##0{0}\xA0\\N\\O\\K'); - } finally { - Globalize.locale('en'); - } - }); +QUnit.module('Exceljs format', () => { + ExcelJSLocalizationFormatTests.runCurrencyTests([ + { value: 'USD', expected: '$#,##0_);\\($#,##0\\)' }, + { value: 'RUB', expected: '\\R\\U\\B#,##0_);\\(\\R\\U\\B#,##0\\)' }, + { value: 'JPY', expected: '\\¥#,##0_);\\(\\¥#,##0\\)' }, + { value: 'KPW', expected: '\\K\\P\\W#,##0_);\\(\\K\\P\\W#,##0\\)' }, + { value: 'LBP', expected: '\\L\\B\\P#,##0_);\\(\\L\\B\\P#,##0\\)' }, + { value: 'SEK', expected: '\\S\\E\\K#,##0_);\\(\\S\\E\\K#,##0\\)' } + ]); + + ExcelJSLocalizationFormatTests.runPivotGridCurrencyTests([ + { value: 'USD', expected: '$#,##0_);\\($#,##0\\)' }, + { value: 'RUB', expected: '\\R\\U\\B#,##0_);\\(\\R\\U\\B#,##0\\)' }, + { value: 'JPY', expected: '\\¥#,##0_);\\(\\¥#,##0\\)' }, + { value: 'KPW', expected: '\\K\\P\\W#,##0_);\\(\\K\\P\\W#,##0\\)' }, + { value: 'LBP', expected: '\\L\\B\\P#,##0_);\\(\\L\\B\\P#,##0\\)' }, + { value: 'SEK', expected: '\\S\\E\\K#,##0_);\\(\\S\\E\\K#,##0\\)' } + ]); +}); - QUnit.test('getDecimalSeparator and getThousandsSeparator in RU locale', function(assert) { - Globalize.locale('ru'); - assert.equal(numberLocalization.getDecimalSeparator(), ','); - assert.equal(numberLocalization.getThousandsSeparator(), '\xa0'); - Globalize.locale('en'); +QUnit.module('Format helper', () => { + QUnit.module('Numeric and dateTime formats', { + beforeEach: function() { + this.testDate = new Date(2010, 2, 5, 12, 13, 33, 0); + } + }, () => { + QUnit.test('Currency numeric formats', function(assert) { + assert.equal(formatHelper.format(1204, 'currency'), '$1,204'); + assert.equal(formatHelper.format(1204, { type: 'cuRRency', precision: 2 }), '$1,204.00'); + assert.equal(formatHelper.format(-1204, { type: 'currency', precision: 2 }), '($1,204.00)'); }); - QUnit.test('getCurrencySymbol and config.defaultCurrency', function(assert) { - const originalDefaultCurrency = config().defaultCurrency; + QUnit.test('currency RUB large number format with different locales', function(assert) { + const currentCultureName = Globalize.locale().locale; - try { - assert.equal(numberLocalization.getCurrencySymbol().symbol, '$'); + assert.equal(formatHelper.format(1.204, { type: 'currency', precision: 2, currency: 'RUB' }), 'RUB' + NBSP + '1.20'); - config({ - defaultCurrency: 'EUR' - }); - - assert.equal(numberLocalization.getCurrencySymbol().symbol, '€'); + Globalize.locale('ru'); + try { + assert.equal(formatHelper.format(1.204, { type: 'currency', precision: 2, currency: 'RUB' }), '1,20' + NBSP + RUB); } finally { - config({ - defaultCurrency: originalDefaultCurrency - }); + Globalize.locale(currentCultureName); } }); - }); - - QUnit.module('Exceljs format', () => { - ExcelJSLocalizationFormatTests.default.runCurrencyTests([ - { value: 'USD', expected: '$#,##0_);\\($#,##0\\)' }, - { value: 'RUB', expected: '\\R\\U\\B#,##0_);\\(\\R\\U\\B#,##0\\)' }, - { value: 'JPY', expected: '\\¥#,##0_);\\(\\¥#,##0\\)' }, - { value: 'KPW', expected: '\\K\\P\\W#,##0_);\\(\\K\\P\\W#,##0\\)' }, - { value: 'LBP', expected: '\\L\\B\\P#,##0_);\\(\\L\\B\\P#,##0\\)' }, - { value: 'SEK', expected: '\\S\\E\\K#,##0_);\\(\\S\\E\\K#,##0\\)' } - ]); - - ExcelJSLocalizationFormatTests.default.runPivotGridCurrencyTests([ - { value: 'USD', expected: '$#,##0_);\\($#,##0\\)' }, - { value: 'RUB', expected: '\\R\\U\\B#,##0_);\\(\\R\\U\\B#,##0\\)' }, - { value: 'JPY', expected: '\\¥#,##0_);\\(\\¥#,##0\\)' }, - { value: 'KPW', expected: '\\K\\P\\W#,##0_);\\(\\K\\P\\W#,##0\\)' }, - { value: 'LBP', expected: '\\L\\B\\P#,##0_);\\(\\L\\B\\P#,##0\\)' }, - { value: 'SEK', expected: '\\S\\E\\K#,##0_);\\(\\S\\E\\K#,##0\\)' } - ]); - }); - - QUnit.module('Format helper', () => { - QUnit.module('Numeric and dateTime formats', { - beforeEach: function() { - this.testDate = new Date(2010, 2, 5, 12, 13, 33, 0); - } - }, () => { - QUnit.test('Currency numeric formats', function(assert) { - assert.equal(formatHelper.format(1204, 'currency'), '$1,204'); - assert.equal(formatHelper.format(1204, { type: 'cuRRency', precision: 2 }), '$1,204.00'); - assert.equal(formatHelper.format(-1204, { type: 'currency', precision: 2 }), '($1,204.00)'); - }); - - QUnit.test('currency RUB large number format with different locales', function(assert) { - const currentCultureName = Globalize.locale().locale; - assert.equal(formatHelper.format(1.204, { type: 'currency', precision: 2, currency: 'RUB' }), 'RUB' + NBSP + '1.20'); + QUnit.test('Fixed point numeric formats', function(assert) { + assert.equal(formatHelper.format(23.04059872, { type: 'fIxedPoint', precision: 4 }), '23.0406'); + }); - Globalize.locale('ru'); - try { - assert.equal(formatHelper.format(1.204, { type: 'currency', precision: 2, currency: 'RUB' }), '1,20' + NBSP + RUB); - } finally { - Globalize.locale(currentCultureName); - } - }); + QUnit.test('Percent numeric formats', function(assert) { + assert.equal(formatHelper.format(0.45, 'percEnt'), '45%'); + assert.equal(formatHelper.format(0.45, { type: 'peRcent', precision: 2 }), '45.00%'); + }); - QUnit.test('Fixed point numeric formats', function(assert) { - assert.equal(formatHelper.format(23.04059872, { type: 'fIxedPoint', precision: 4 }), '23.0406'); - }); + QUnit.test('Decimal numeric formats', function(assert) { + assert.equal(formatHelper.format(437, 'decimAl'), '437'); + assert.equal(formatHelper.format(437, { type: 'deCimal', precision: 5 }), '00437'); + }); - QUnit.test('Percent numeric formats', function(assert) { - assert.equal(formatHelper.format(0.45, 'percEnt'), '45%'); - assert.equal(formatHelper.format(0.45, { type: 'peRcent', precision: 2 }), '45.00%'); - }); + QUnit.test('Long date format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'LONGDate'), 'Friday, March 5, 2010'); + }); - QUnit.test('Decimal numeric formats', function(assert) { - assert.equal(formatHelper.format(437, 'decimAl'), '437'); - assert.equal(formatHelper.format(437, { type: 'deCimal', precision: 5 }), '00437'); - }); + QUnit.test('Long time format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'longTIME'), '12:13:33 PM'); + }); + QUnit.test('Month and day format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'monthAndDAY'), 'March 5'); + }); - QUnit.test('Long date format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'LONGDate'), 'Friday, March 5, 2010'); - }); + QUnit.test('Month and year format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'MONTHAndYear'), 'March 2010'); + }); - QUnit.test('Long time format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'longTIME'), '12:13:33 PM'); - }); - QUnit.test('Month and day format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'monthAndDAY'), 'March 5'); - }); + QUnit.test('Short date format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'shoRTDate'), '3/5/2010'); + }); - QUnit.test('Month and year format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'MONTHAndYear'), 'March 2010'); - }); + QUnit.test('Short time format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'shoRTTime'), '12:13 PM'); + }); - QUnit.test('Short date format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'shoRTDate'), '3/5/2010'); - }); + QUnit.test('Custom date time format', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'dd MMM yy'), '05 Mar 10'); + }); - QUnit.test('Short time format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'shoRTTime'), '12:13 PM'); - }); + QUnit.test('LongDateLongTime', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'LONGDATELongTime'), 'Friday, March 5, 2010, 12:13:33 PM'); + }); - QUnit.test('Custom date time format', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'dd MMM yy'), '05 Mar 10'); - }); + QUnit.test('ShortDateShortTime', function(assert) { + assert.equal(formatHelper.format(this.testDate, 'shortDATESHORTTime'), '3/5/2010, 12:13 PM'); + }); - QUnit.test('LongDateLongTime', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'LONGDATELongTime'), 'Friday, March 5, 2010, 12:13:33 PM'); - }); + QUnit.test('Invalid format parameters', function(assert) { + assert.equal(formatHelper.format('test', 'percent'), 'test'); + assert.equal(formatHelper.format(12, 12), 12); + }); - QUnit.test('ShortDateShortTime', function(assert) { - assert.equal(formatHelper.format(this.testDate, 'shortDATESHORTTime'), '3/5/2010, 12:13 PM'); - }); + QUnit.test('Quarter and year', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QUarterAndYear'), 'Q1 2005'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'dd MMM yy, Q'), '01 Jan 05, 1'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq, dd MMM yy'), '01, 01 Jan 05'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q, yy'), '1, 05'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq, yy'), '01, 05'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQ, yyyy MM'), '01, 2005 01'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqq, yyyy'), 'Q1, 2005'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqqq, yyyy'), '1st quarter, 2005'); + }); - QUnit.test('Invalid format parameters', function(assert) { - assert.equal(formatHelper.format('test', 'percent'), 'test'); - assert.equal(formatHelper.format(12, 12), 12); - }); + // B218108 + QUnit.test('Custom quarter format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q'), '1', 'quarter format - q'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'Q'), '1', 'quarter format - Q'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq'), '01', 'quarter format - qq'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQ'), '01', 'quarter format - QQ'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqq'), 'Q1', 'quarter format - qqq'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQQ'), 'Q1', 'quarter format - QQQ'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqqq'), '1st quarter', 'quarter format - qqqq'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQQQ'), '1st quarter', 'quarter format - QQQQ'); + + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q MMM QQ'), '1 Jan 01', 'quarter format - q MMM QQ'); + }); - QUnit.test('Quarter and year', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QUarterAndYear'), 'Q1 2005'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'dd MMM yy, Q'), '01 Jan 05, 1'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq, dd MMM yy'), '01, 01 Jan 05'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q, yy'), '1, 05'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq, yy'), '01, 05'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQ, yyyy MM'), '01, 2005 01'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqq, yyyy'), 'Q1, 2005'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqqq, yyyy'), '1st quarter, 2005'); - }); + QUnit.test('Quarters for any months', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'quartERAndYear'), 'Q1 2005'); + assert.equal(formatHelper.format(new Date(2005, 1, 1), 'quartERAndYear'), 'Q1 2005'); + assert.equal(formatHelper.format(new Date(2005, 2, 1), 'quartERAndYear'), 'Q1 2005'); - // B218108 - QUnit.test('Custom quarter format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q'), '1', 'quarter format - q'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'Q'), '1', 'quarter format - Q'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qq'), '01', 'quarter format - qq'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQ'), '01', 'quarter format - QQ'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqq'), 'Q1', 'quarter format - qqq'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQQ'), 'Q1', 'quarter format - QQQ'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'qqqq'), '1st quarter', 'quarter format - qqqq'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'QQQQ'), '1st quarter', 'quarter format - QQQQ'); - - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'q MMM QQ'), '1 Jan 01', 'quarter format - q MMM QQ'); - }); + assert.equal(formatHelper.format(new Date(2005, 3, 1), 'quarterANDYear'), 'Q2 2005'); + assert.equal(formatHelper.format(new Date(2005, 4, 1), 'quarterANDYear'), 'Q2 2005'); + assert.equal(formatHelper.format(new Date(2005, 5, 1), 'quarterANDYear'), 'Q2 2005'); - QUnit.test('Quarters for any months', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'quartERAndYear'), 'Q1 2005'); - assert.equal(formatHelper.format(new Date(2005, 1, 1), 'quartERAndYear'), 'Q1 2005'); - assert.equal(formatHelper.format(new Date(2005, 2, 1), 'quartERAndYear'), 'Q1 2005'); + assert.equal(formatHelper.format(new Date(2005, 6, 1), 'qUARterAndYear'), 'Q3 2005'); + assert.equal(formatHelper.format(new Date(2005, 7, 1), 'qUARterAndYear'), 'Q3 2005'); + assert.equal(formatHelper.format(new Date(2005, 8, 1), 'qUARterAndYear'), 'Q3 2005'); - assert.equal(formatHelper.format(new Date(2005, 3, 1), 'quarterANDYear'), 'Q2 2005'); - assert.equal(formatHelper.format(new Date(2005, 4, 1), 'quarterANDYear'), 'Q2 2005'); - assert.equal(formatHelper.format(new Date(2005, 5, 1), 'quarterANDYear'), 'Q2 2005'); + assert.equal(formatHelper.format(new Date(2005, 9, 1), 'qUARterAndYear'), 'Q4 2005'); + assert.equal(formatHelper.format(new Date(2005, 10, 1), 'qUARterAndYear'), 'Q4 2005'); + assert.equal(formatHelper.format(new Date(2005, 11, 1), 'qUARterAndYear'), 'Q4 2005'); + }); - assert.equal(formatHelper.format(new Date(2005, 6, 1), 'qUARterAndYear'), 'Q3 2005'); - assert.equal(formatHelper.format(new Date(2005, 7, 1), 'qUARterAndYear'), 'Q3 2005'); - assert.equal(formatHelper.format(new Date(2005, 8, 1), 'qUARterAndYear'), 'Q3 2005'); + QUnit.test('Choose call format method by the value type', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'loNGDate'), 'Saturday, January 1, 2005'); + assert.equal(formatHelper.format(new Date(2005, 0, 1), 'SHORTDate'), '1/1/2005'); + assert.equal(formatHelper.format(12.098, { type: 'fixEDPoint', precision: 2 }), '12.10'); + assert.equal(formatHelper.format(12.098, { type: 'cuRRency', precision: 1 }), '$12.1'); + assert.equal(formatHelper.format('InvalidValue'), 'InvalidValue'); + }); - assert.equal(formatHelper.format(new Date(2005, 9, 1), 'qUARterAndYear'), 'Q4 2005'); - assert.equal(formatHelper.format(new Date(2005, 10, 1), 'qUARterAndYear'), 'Q4 2005'); - assert.equal(formatHelper.format(new Date(2005, 11, 1), 'qUARterAndYear'), 'Q4 2005'); - }); + QUnit.test('Millisecond date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 1, 10, 33, 20, 237), 'millisecond'), '237'); + assert.equal(formatHelper.format(new Date(2005, 0, 1, 10, 33, 20, 569), 'millisecond'), '569'); + }); - QUnit.test('Choose call format method by the value type', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'loNGDate'), 'Saturday, January 1, 2005'); - assert.equal(formatHelper.format(new Date(2005, 0, 1), 'SHORTDate'), '1/1/2005'); - assert.equal(formatHelper.format(12.098, { type: 'fixEDPoint', precision: 2 }), '12.10'); - assert.equal(formatHelper.format(12.098, { type: 'cuRRency', precision: 1 }), '$12.1'); - assert.equal(formatHelper.format('InvalidValue'), 'InvalidValue'); - }); + QUnit.test('Day date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'day'), '16'); + assert.equal(formatHelper.format(new Date(2005, 0, 30, 19, 23, 56, 237), 'day'), '30'); + }); - QUnit.test('Millisecond date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 1, 10, 33, 20, 237), 'millisecond'), '237'); - assert.equal(formatHelper.format(new Date(2005, 0, 1, 10, 33, 20, 569), 'millisecond'), '569'); - }); + QUnit.test('Month date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'month'), 'January'); + assert.equal(formatHelper.format(new Date(2005, 9, 27, 19, 23, 56, 237), 'month'), 'October'); + }); - QUnit.test('Day date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'day'), '16'); - assert.equal(formatHelper.format(new Date(2005, 0, 30, 19, 23, 56, 237), 'day'), '30'); - }); + QUnit.test('Quarter date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'quarter'), 'Q1'); + assert.equal(formatHelper.format(new Date(2005, 9, 27, 19, 23, 56, 237), 'quarter'), 'Q4'); + }); - QUnit.test('Month date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'month'), 'January'); - assert.equal(formatHelper.format(new Date(2005, 9, 27, 19, 23, 56, 237), 'month'), 'October'); - }); + QUnit.test('Year date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'year'), '2005'); + assert.equal(formatHelper.format(new Date(2009, 9, 27, 19, 23, 56, 237), 'year'), '2009'); + }); - QUnit.test('Quarter date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'quarter'), 'Q1'); - assert.equal(formatHelper.format(new Date(2005, 9, 27, 19, 23, 56, 237), 'quarter'), 'Q4'); - }); + QUnit.test('Short Year date time interval format', function(assert) { + assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'shortyear'), '05'); + assert.equal(formatHelper.format(new Date(2009, 9, 27, 19, 23, 56, 237), 'shortyear'), '09'); + }); - QUnit.test('Year date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'year'), '2005'); - assert.equal(formatHelper.format(new Date(2009, 9, 27, 19, 23, 56, 237), 'year'), '2009'); - }); + // This condition is added because of Safari bug 15434904 + if(!isIosWithMSKTimeZone()) { + QUnit.test('getDateMarkerFormat for second range', function(assert) { + const date1 = new Date(2010, 0, 1, 2, 23, 33); + const date2 = new Date(date1.getTime()); - QUnit.test('Short Year date time interval format', function(assert) { - assert.equal(formatHelper.format(new Date(2005, 0, 16, 10, 33, 20, 237), 'shortyear'), '05'); - assert.equal(formatHelper.format(new Date(2009, 9, 27, 19, 23, 56, 237), 'shortyear'), '09'); + date2.setMilliseconds(3000); + const format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), '2:23:36 AM'); }); - // This condition is added because of Safari bug 15434904 - if(!isIosWithMSKTimeZone()) { - QUnit.test('getDateMarkerFormat for second range', function(assert) { - const date1 = new Date(2010, 0, 1, 2, 23, 33); - const date2 = new Date(date1.getTime()); - - date2.setMilliseconds(3000); - const format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '2:23:36 AM'); - }); - - QUnit.test('getDateMarkerFormat for minute range', function(assert) { - const date1 = new Date(2010, 0, 1, 2, 23, 33, 990); - let date2 = new Date(date1.getTime()); - let format; - - date2.setSeconds(63); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '2:24:03 AM'); - - date2 = new Date(date1.getTime()); - date2.setMinutes(25); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '2:25 AM'); - }); - - QUnit.test('getDateMarkerFormat for hour range', function(assert) { - const date1 = new Date(2010, 0, 1, 2, 23, 33, 990); - let date2 = new Date(date1.getTime()); - let format; - - date2.setSeconds(30000); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '10:43:00 AM'); - - date2 = new Date(date1.getTime()); - date2.setHours(4); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '4:23 AM'); - }); - } - - QUnit.test('getDateMarkerFormat for day range', function(assert) { - const date1 = new Date(2010, 0, 29, 12, 23, 33, 990); + QUnit.test('getDateMarkerFormat for minute range', function(assert) { + const date1 = new Date(2010, 0, 1, 2, 23, 33, 990); let date2 = new Date(date1.getTime()); let format; - // day and time - date2 = new Date(date1.getTime()); - date2.setMinutes(1000); + date2.setSeconds(63); format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), 'Saturday, 30 4:40 AM'); + assert.equal(formatHelper.format(date2, format), '2:24:03 AM'); - // day date2 = new Date(date1.getTime()); - date2.setDate(30); + date2.setMinutes(25); format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), 'Saturday, 30'); + assert.equal(formatHelper.format(date2, format), '2:25 AM'); }); - QUnit.test('getDateMarkerFormat for month range', function(assert) { - const date1 = new Date(2010, 10, 29, 12, 23, 33, 990); + QUnit.test('getDateMarkerFormat for hour range', function(assert) { + const date1 = new Date(2010, 0, 1, 2, 23, 33, 990); let date2 = new Date(date1.getTime()); let format; - // month, day and time - date2.setHours(74); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), 'December 2 2:23 AM'); - - // year, month, day and time - date2 = new Date(date1.getTime()); - date2.setFullYear(2011); - date2.setMonth(11); - date2.setHours(74); - format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '1/1/2012 2:23 AM'); - - // month and day - date2 = new Date(date1.getTime()); - date2.setDate(32); + date2.setSeconds(30000); format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), 'December 2'); + assert.equal(formatHelper.format(date2, format), '10:43:00 AM'); - // month date2 = new Date(date1.getTime()); - date2.setMonth(11); + date2.setHours(4); format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), 'December'); + assert.equal(formatHelper.format(date2, format), '4:23 AM'); }); + } - QUnit.test('getDateMarkerFormat for year range', function(assert) { - const date1 = new Date(2010, 10, 29, 12, 23, 33, 990); - const date2 = new Date(date1.getTime()); + QUnit.test('getDateMarkerFormat for day range', function(assert) { + const date1 = new Date(2010, 0, 29, 12, 23, 33, 990); + let date2 = new Date(date1.getTime()); + let format; + + // day and time + date2 = new Date(date1.getTime()); + date2.setMinutes(1000); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), 'Saturday, 30 4:40 AM'); + + // day + date2 = new Date(date1.getTime()); + date2.setDate(30); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), 'Saturday, 30'); + }); - // year - date2.setFullYear(2031); - const format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); - assert.equal(formatHelper.format(date2, format), '2031'); - }); + QUnit.test('getDateMarkerFormat for month range', function(assert) { + const date1 = new Date(2010, 10, 29, 12, 23, 33, 990); + let date2 = new Date(date1.getTime()); + let format; + + // month, day and time + date2.setHours(74); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), 'December 2 2:23 AM'); + + // year, month, day and time + date2 = new Date(date1.getTime()); + date2.setFullYear(2011); + date2.setMonth(11); + date2.setHours(74); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), '1/1/2012 2:23 AM'); + + // month and day + date2 = new Date(date1.getTime()); + date2.setDate(32); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), 'December 2'); + + // month + date2 = new Date(date1.getTime()); + date2.setMonth(11); + format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), 'December'); + }); - // B217749 - QUnit.test('value is null or undefined', function(assert) { - assert.strictEqual(formatHelper.format(null, ''), ''); - assert.strictEqual(formatHelper.format(undefined, ''), ''); - assert.strictEqual(formatHelper.format('test', ''), 'test'); - }); + QUnit.test('getDateMarkerFormat for year range', function(assert) { + const date1 = new Date(2010, 10, 29, 12, 23, 33, 990); + const date2 = new Date(date1.getTime()); - QUnit.test('large number auto format negative numbers', function(assert) { - assert.strictEqual(formatHelper.format(-123, 'fixedPoint largeNumber'), '-123'); - assert.strictEqual(formatHelper.format(-1230, 'fixedPoint largeNumber'), '-1K'); - assert.strictEqual(formatHelper.format(-12300000, 'fixedPoint largeNumber'), '-12M'); - }); + // year + date2.setFullYear(2031); + const format = formatHelper.getDateFormatByDifferences(dateUtils.getDatesDifferences(date1, date2)); + assert.equal(formatHelper.format(date2, format), '2031'); + }); - QUnit.test('large number auto format precision', function(assert) { - assert.strictEqual(formatHelper.format(0.01, 'fixedPoint LARGENumber'), '0'); - assert.strictEqual(formatHelper.format(10.23, 'fixedPoint largeNumber'), '10'); - assert.strictEqual(formatHelper.format(123, { type: 'fixedPoint largeNumber', precision: 1 }), '123.0'); - assert.strictEqual(formatHelper.format(12345, { type: 'fixedPoint largeNUMBER', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(12345, { type: 'fixedPoint largeNumber', precision: 5 }), '12.34500K'); - }); + // B217749 + QUnit.test('value is null or undefined', function(assert) { + assert.strictEqual(formatHelper.format(null, ''), ''); + assert.strictEqual(formatHelper.format(undefined, ''), ''); + assert.strictEqual(formatHelper.format('test', ''), 'test'); + }); - QUnit.test('large number auto format small numbers', function(assert) { - assert.strictEqual(formatHelper.format(0.01, { type: 'fixedPoint largeNumber', precision: 2 }), '0.01'); - assert.strictEqual(formatHelper.format(999, { type: 'fixedPoint largeNumber', precision: 2 }), '999.00'); - assert.strictEqual(formatHelper.format(999.9, { type: 'fixedPoint largeNumber', precision: 0 }), '1,000'); - assert.strictEqual(formatHelper.format(1000, { type: 'fixedPoint largeNumber', precision: 0 }), '1K'); - }); + QUnit.test('large number auto format negative numbers', function(assert) { + assert.strictEqual(formatHelper.format(-123, 'fixedPoint largeNumber'), '-123'); + assert.strictEqual(formatHelper.format(-1230, 'fixedPoint largeNumber'), '-1K'); + assert.strictEqual(formatHelper.format(-12300000, 'fixedPoint largeNumber'), '-12M'); + }); - QUnit.test('large number auto format powers', function(assert) { - assert.strictEqual(formatHelper.format(1234.56, { type: 'fixedPoint largeNumber', precision: 2 }), '1.23K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint largeNumber', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(123400000, { type: 'fixedPoint largeNumber', precision: 2 }), '123.40M'); - assert.strictEqual(formatHelper.format(1234000000, { type: 'fixedPoint largeNumber', precision: 2 }), '1.23B'); - assert.strictEqual(formatHelper.format(12340000000000, { type: 'fixedPoint largeNumber', precision: 2 }), '12.34T'); - assert.strictEqual(formatHelper.format(12340000000000000, { type: 'fixedPoint largeNumber', precision: 2 }), '12,340.00T'); - }); + QUnit.test('large number auto format precision', function(assert) { + assert.strictEqual(formatHelper.format(0.01, 'fixedPoint LARGENumber'), '0'); + assert.strictEqual(formatHelper.format(10.23, 'fixedPoint largeNumber'), '10'); + assert.strictEqual(formatHelper.format(123, { type: 'fixedPoint largeNumber', precision: 1 }), '123.0'); + assert.strictEqual(formatHelper.format(12345, { type: 'fixedPoint largeNUMBER', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(12345, { type: 'fixedPoint largeNumber', precision: 5 }), '12.34500K'); + }); - QUnit.test('large number format powers', function(assert) { - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint', precision: 2 }), '12,345.67'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint largeNumber', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint thousands', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint miLLions', precision: 3 }), '0.012M'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint biLLions', precision: 7 }), '0.0000123B'); - assert.strictEqual(formatHelper.format(12345670, { type: 'fixedPoint triLLions', precision: 7 }), '0.0000123T'); - }); + QUnit.test('large number auto format small numbers', function(assert) { + assert.strictEqual(formatHelper.format(0.01, { type: 'fixedPoint largeNumber', precision: 2 }), '0.01'); + assert.strictEqual(formatHelper.format(999, { type: 'fixedPoint largeNumber', precision: 2 }), '999.00'); + assert.strictEqual(formatHelper.format(999.9, { type: 'fixedPoint largeNumber', precision: 0 }), '1,000'); + assert.strictEqual(formatHelper.format(1000, { type: 'fixedPoint largeNumber', precision: 0 }), '1K'); + }); - QUnit.test('currency large number format', function(assert) { - assert.strictEqual(formatHelper.format(12345.67, { type: 'currency largeNumber', precision: 2 }), '$12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'currency thoUSands', precision: 2 }), '$12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'currency miLLions', precision: 3 }), '$0.012M'); - }); + QUnit.test('large number auto format powers', function(assert) { + assert.strictEqual(formatHelper.format(1234.56, { type: 'fixedPoint largeNumber', precision: 2 }), '1.23K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint largeNumber', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(123400000, { type: 'fixedPoint largeNumber', precision: 2 }), '123.40M'); + assert.strictEqual(formatHelper.format(1234000000, { type: 'fixedPoint largeNumber', precision: 2 }), '1.23B'); + assert.strictEqual(formatHelper.format(12340000000000, { type: 'fixedPoint largeNumber', precision: 2 }), '12.34T'); + assert.strictEqual(formatHelper.format(12340000000000000, { type: 'fixedPoint largeNumber', precision: 2 }), '12,340.00T'); + }); - QUnit.test('large number format without number type', function(assert) { - assert.strictEqual(formatHelper.format(12345.67, { type: 'largeNumber', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'thousands', precision: 2 }), '12.35K'); - assert.strictEqual(formatHelper.format(12345.67, { type: 'millions', precision: 3 }), '0.012M'); - }); + QUnit.test('large number format powers', function(assert) { + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint', precision: 2 }), '12,345.67'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint largeNumber', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint thousands', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint miLLions', precision: 3 }), '0.012M'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'fixedPoint biLLions', precision: 7 }), '0.0000123B'); + assert.strictEqual(formatHelper.format(12345670, { type: 'fixedPoint triLLions', precision: 7 }), '0.0000123T'); + }); - QUnit.test('Empty format for number', function(assert) { - assert.equal(formatHelper.format(1204, ''), '1204'); - assert.equal(formatHelper.format(12.04, ''), '12.04'); - }); + QUnit.test('currency large number format', function(assert) { + assert.strictEqual(formatHelper.format(12345.67, { type: 'currency largeNumber', precision: 2 }), '$12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'currency thoUSands', precision: 2 }), '$12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'currency miLLions', precision: 3 }), '$0.012M'); + }); - QUnit.test('exponential number type pow', function(assert) { - assert.strictEqual(formatHelper.format(5, { type: 'exponEntial', precision: 2 }), '5.00E+0'); - assert.strictEqual(formatHelper.format(0.0081, { type: 'exponential', precision: 2 }), '8.10E-3'); - assert.strictEqual(formatHelper.format(-12345.67, { type: 'exponential', precision: 2 }), '-1.23E+4'); - assert.strictEqual(formatHelper.format(500000001, { type: 'exponential', precision: 2 }), '5.00E+8'); - assert.strictEqual(formatHelper.format(1.56662165464E+99, { type: 'exponential', precision: 2 }), '1.57E+99'); - assert.strictEqual(formatHelper.format(1.56662165464E-99, { type: 'exponential', precision: 2 }), '1.57E-99'); - }); + QUnit.test('large number format without number type', function(assert) { + assert.strictEqual(formatHelper.format(12345.67, { type: 'largeNumber', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'thousands', precision: 2 }), '12.35K'); + assert.strictEqual(formatHelper.format(12345.67, { type: 'millions', precision: 3 }), '0.012M'); + }); - QUnit.test('exponential number type precision', function(assert) { - assert.strictEqual(formatHelper.format(1234, 'exponential'), '1.2E+3'); - assert.strictEqual(formatHelper.format(5, { type: 'exponential', precision: 0 }), '5E+0'); - assert.strictEqual(formatHelper.format(0.0081, { type: 'exponential', precision: 1 }), '8.1E-3'); - assert.strictEqual(formatHelper.format(-12345.67, { type: 'exponential', precision: 2 }), '-1.23E+4'); - assert.strictEqual(formatHelper.format(500000001, { type: 'exponential', precision: 3 }), '5.000E+8'); - assert.strictEqual(formatHelper.format(-123456789, { type: 'exponential', precision: 8 }), '-1.23456789E+8'); - }); + QUnit.test('Empty format for number', function(assert) { + assert.equal(formatHelper.format(1204, ''), '1204'); + assert.equal(formatHelper.format(12.04, ''), '12.04'); + }); - QUnit.test('exponential number type round', function(assert) { - assert.strictEqual(formatHelper.format(0.00999, { type: 'exponential', precision: 0 }), '1E-2'); - assert.strictEqual(formatHelper.format(0.00999, { type: 'exponential', precision: 2 }), '9.99E-3'); - assert.strictEqual(formatHelper.format(999, { type: 'exponential', precision: 1 }), '1.0E+3'); - }); + QUnit.test('exponential number type pow', function(assert) { + assert.strictEqual(formatHelper.format(5, { type: 'exponEntial', precision: 2 }), '5.00E+0'); + assert.strictEqual(formatHelper.format(0.0081, { type: 'exponential', precision: 2 }), '8.10E-3'); + assert.strictEqual(formatHelper.format(-12345.67, { type: 'exponential', precision: 2 }), '-1.23E+4'); + assert.strictEqual(formatHelper.format(500000001, { type: 'exponential', precision: 2 }), '5.00E+8'); + assert.strictEqual(formatHelper.format(1.56662165464E+99, { type: 'exponential', precision: 2 }), '1.57E+99'); + assert.strictEqual(formatHelper.format(1.56662165464E-99, { type: 'exponential', precision: 2 }), '1.57E-99'); + }); + QUnit.test('exponential number type precision', function(assert) { + assert.strictEqual(formatHelper.format(1234, 'exponential'), '1.2E+3'); + assert.strictEqual(formatHelper.format(5, { type: 'exponential', precision: 0 }), '5E+0'); + assert.strictEqual(formatHelper.format(0.0081, { type: 'exponential', precision: 1 }), '8.1E-3'); + assert.strictEqual(formatHelper.format(-12345.67, { type: 'exponential', precision: 2 }), '-1.23E+4'); + assert.strictEqual(formatHelper.format(500000001, { type: 'exponential', precision: 3 }), '5.000E+8'); + assert.strictEqual(formatHelper.format(-123456789, { type: 'exponential', precision: 8 }), '-1.23456789E+8'); + }); - QUnit.test('exponential number type positive and negative number', function(assert) { - assert.strictEqual(formatHelper.format(0, { type: 'exponential', precision: 2 }), '0.00E+0'); - assert.strictEqual(formatHelper.format(1234, { type: 'exponential', precision: 2 }), '1.23E+3'); - assert.strictEqual(formatHelper.format(-1234, { type: 'exponential', precision: 2 }), '-1.23E+3'); - }); + QUnit.test('exponential number type round', function(assert) { + assert.strictEqual(formatHelper.format(0.00999, { type: 'exponential', precision: 0 }), '1E-2'); + assert.strictEqual(formatHelper.format(0.00999, { type: 'exponential', precision: 2 }), '9.99E-3'); + assert.strictEqual(formatHelper.format(999, { type: 'exponential', precision: 1 }), '1.0E+3'); + }); + + QUnit.test('exponential number type positive and negative number', function(assert) { + assert.strictEqual(formatHelper.format(0, { type: 'exponential', precision: 2 }), '0.00E+0'); + assert.strictEqual(formatHelper.format(1234, { type: 'exponential', precision: 2 }), '1.23E+3'); + assert.strictEqual(formatHelper.format(-1234, { type: 'exponential', precision: 2 }), '-1.23E+3'); }); - QUnit.module('formatNumberEx', () => { - QUnit.test('not execute formatNumberEx for non-number value', function(assert) { - assert.equal(formatHelper.format('test string', { format: 'currency' }), 'test string'); - }); + }); - QUnit.test('not execute formatNumberEx for infinite value', function(assert) { - assert.equal(formatHelper.format(Infinity, { format: 'fixedPoint' }), Infinity.toString()); - assert.equal(formatHelper.format(-Infinity, { format: 'fixedPoint' }), (-Infinity).toString()); - }); + QUnit.module('formatNumberEx', () => { + QUnit.test('not execute formatNumberEx for non-number value', function(assert) { + assert.equal(formatHelper.format('test string', { format: 'currency' }), 'test string'); + }); - QUnit.test('not execute formatNumberEx for NaN value', function(assert) { - assert.equal(formatHelper.format(NaN, { format: 'fixedPoint' }), NaN.toString()); - }); + QUnit.test('not execute formatNumberEx for infinite value', function(assert) { + assert.equal(formatHelper.format(Infinity, { format: 'fixedPoint' }), Infinity.toString()); + assert.equal(formatHelper.format(-Infinity, { format: 'fixedPoint' }), (-Infinity).toString()); + }); - QUnit.test('Case insensitive currency', function(assert) { - assert.equal(formatHelper.format(1204, 'currency'), '$1,204'); - assert.equal(formatHelper.format(1204, { type: 'cuRrency', precision: 2 }), '$1,204.00'); - }); + QUnit.test('not execute formatNumberEx for NaN value', function(assert) { + assert.equal(formatHelper.format(NaN, { format: 'fixedPoint' }), NaN.toString()); + }); + + QUnit.test('Case insensitive currency', function(assert) { + assert.equal(formatHelper.format(1204, 'currency'), '$1,204'); + assert.equal(formatHelper.format(1204, { type: 'cuRrency', precision: 2 }), '$1,204.00'); + }); - QUnit.test('not execute formatNumberEx for string w with set format', function(assert) { - /* eslint-disable no-extend-native */ + QUnit.test('not execute formatNumberEx for string w with set format', function(assert) { + /* eslint-disable no-extend-native */ - String.prototype.format = noop; + String.prototype.format = noop; - assert.equal(formatHelper.format(123, 'currency'), '$123'); + assert.equal(formatHelper.format(123, 'currency'), '$123'); - // cleanup - delete String.prototype.format; - }); + // cleanup + delete String.prototype.format; }); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.widgets.tests.js b/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.widgets.tests.js index 29056fc61eed..d0488ddaab72 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.widgets.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/localization.globalize.widgets.tests.js @@ -1,13 +1,27 @@ -const likelySubtags = require('cldr-core/supplemental/likelySubtags.json!'); -const numberingSystems = require('cldr-core/supplemental/numberingSystems.json!'); -const Globalize = require('globalize'); +import likelySubtags from 'cldr-core/supplemental/likelySubtags.json!'; +import numberingSystems from 'cldr-core/supplemental/numberingSystems.json!'; +import Globalize from 'globalize'; -const cldrData = [ - require('devextreme-cldr-data/fa.json!json'), - require('devextreme-cldr-data/mr.json!json'), - require('devextreme-cldr-data/ar.json!json'), - require('devextreme-cldr-data/de.json!json'), -]; +import fa from 'devextreme-cldr-data/fa.json!json'; +import mr from 'devextreme-cldr-data/mr.json!json'; +import ar from 'devextreme-cldr-data/ar.json!json'; +import de from 'devextreme-cldr-data/de.json!json'; + +import 'common/core/localization/globalize/core'; +import 'common/core/localization/globalize/number'; +import 'common/core/localization/globalize/currency'; +import 'common/core/localization/globalize/date'; +import 'common/core/localization/globalize/message'; + +import $ from 'jquery'; +import dateLocalization from 'common/core/localization/date'; + +import 'ui/date_box'; +import 'viz/chart'; + +import * as ExcelExport from '__internal/exporter/exceljs/export_format'; + +const cldrData = [fa, mr, ar, de]; Globalize.load(likelySubtags); Globalize.load(numberingSystems); @@ -16,20 +30,6 @@ cldrData.forEach(localeCldrData => { Globalize.load(localeCldrData); }); -require('common/core/localization/globalize/core'); -require('common/core/localization/globalize/number'); -require('common/core/localization/globalize/currency'); -require('common/core/localization/globalize/date'); -require('common/core/localization/globalize/message'); - -const $ = require('jquery'); -const dateLocalization = require('common/core/localization/date'); - -require('ui/date_box'); -require('viz/chart'); - -const ExcelExport = require('__internal/exporter/exceljs/export_format'); - const TEXTEDITOR_INPUT_SELECTOR = '.dx-texteditor-input'; const DATEVIEW_ITEM_SELECTOR = '.dx-dateview-item'; const DATEVIEW_ROLLER_DAY_SELECTOR = '.dx-dateviewroller-day'; diff --git a/packages/devextreme/testing/tests/DevExpress.localization/localization.messages.test.js b/packages/devextreme/testing/tests/DevExpress.localization/localization.messages.test.js index 6f4570399b3b..12845c890d5a 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/localization.messages.test.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/localization.messages.test.js @@ -1,18 +1,18 @@ -const localization = require('localization'); -const dictionaries = {}; - -dictionaries['zh-tw'] = require('localization/messages/zh-tw.json!'); +import { loadMessages, locale, formatMessage } from 'localization'; +// eslint-disable-next-line spellcheck/spell-checker +import zhTwMessages from 'localization/messages/zh-tw.json!'; QUnit.module('Locale messages of DevExtreme', { }, () => { QUnit.test('test zh-TW locale format message', function(assert) { try { - localization.loadMessages(dictionaries['zh-tw']); - localization.locale('zh-TW'); - assert.equal(localization.formatMessage('Yes'), '是'); + // eslint-disable-next-line spellcheck/spell-checker + loadMessages(zhTwMessages); + locale('zh-TW'); + assert.equal(formatMessage('Yes'), '是'); } finally { - localization.locale('en'); + locale('en'); } }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.localization/validation.tests.js b/packages/devextreme/testing/tests/DevExpress.localization/validation.tests.js index 623796d1dd67..4b12138141f5 100644 --- a/packages/devextreme/testing/tests/DevExpress.localization/validation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.localization/validation.tests.js @@ -1,22 +1,22 @@ -require('common/core/localization/globalize/core'); -require('common/core/localization/globalize/number'); -require('common/core/localization/globalize/currency'); -require('common/core/localization/globalize/date'); -require('common/core/localization/globalize/message'); -const cldrData = [ - require('devextreme-cldr-data/fr.json!json') -]; +import 'common/core/localization/globalize/core'; +import 'common/core/localization/globalize/number'; +import 'common/core/localization/globalize/currency'; +import 'common/core/localization/globalize/date'; +import 'common/core/localization/globalize/message'; -const ValidationEngine = require('ui/validation_engine'); -const Globalize = require('globalize'); -const localization = require('localization'); -const fr = require('localization/messages/fr.json!'); +import ValidationEngine from 'ui/validation_engine'; +import Globalize from 'globalize'; +import { loadMessages } from 'localization'; +import fr from 'localization/messages/fr.json!'; +import frCldr from 'devextreme-cldr-data/fr.json!json'; + +const cldrData = [frCldr]; cldrData.forEach(localeCldrData => { Globalize.load(localeCldrData); }); -localization.loadMessages(fr); +loadMessages(fr); QUnit.module('culture-specific validation', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/autocomplete.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/autocomplete.tests.js index 96bbb0814273..1465ec1041b3 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/autocomplete.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/autocomplete.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/autocomplete.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/autocomplete.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/calendar.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/calendar.tests.js index e66ea9a02d22..2e12f7ce1934 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/calendar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/calendar.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/calendar.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/calendar.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/calendarView.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/calendarView.tests.js index 379d0c3a2bde..1df0b685f22d 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/calendarView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/calendarView.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/calendarView.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/calendarView.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/checkbox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/checkbox.tests.js index c1b0d6e44add..b5fc2724d7ee 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/checkbox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/checkbox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/checkbox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/checkbox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/colorBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/colorBox.tests.js index 3bc387fd14fe..982ff39cba8b 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/colorBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/colorBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/colorBox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/colorBox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/colorView.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/colorView.tests.js index c201e83bda6d..f583b2c317b0 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/colorView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/colorView.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/colorView.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/colorView.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/dataGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/dataGrid.tests.js index ec74c8ebdb22..08524be4e186 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/dataGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/dataGrid.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.dataGrid/dataGrid.markup.tests.js'); +import '../DevExpress.ui.widgets.dataGrid/dataGrid.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/datebox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/datebox.tests.js index 83b3da7dae74..1abfc6833567 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/datebox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/datebox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/datebox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/datebox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownBox.tests.js index 7f0b377d0e1c..0a924c4d3ddd 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/dropDownBox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/dropDownBox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownEditor.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownEditor.tests.js index db2ecf9228a4..75ed630f0be3 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownEditor.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/dropDownEditor.tests.js @@ -1,6 +1,6 @@ -require('../DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/dropDownEditor.markup.tests.js'; -const $ = require('jquery'); +import $ from 'jquery'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/editor.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/editor.tests.js index 44c141bfad1c..35d3c16459a1 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/editor.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/editor.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/editor.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/editor.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/fieldChooser.js b/packages/devextreme/testing/tests/DevExpress.serverSide/fieldChooser.js index 6dcfd49d807f..e149cec5a68a 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/fieldChooser.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/fieldChooser.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.pivotGrid/fieldChooser.markup.tests.js'); +import '../DevExpress.ui.widgets.pivotGrid/fieldChooser.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/fileManager.test.js b/packages/devextreme/testing/tests/DevExpress.serverSide/fileManager.test.js index 99cab6583dd4..3279f15e81fc 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/fileManager.test.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/fileManager.test.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets/fileManagerParts/markup.tests.js'); +import '../DevExpress.ui.widgets/fileManagerParts/markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/fileUploader.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/fileUploader.tests.js index f4589a68023c..2bec0f8ddd17 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/fileUploader.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/fileUploader.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/fileUploader.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/fileUploader.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/filterBuilder.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/filterBuilder.tests.js index 8a0776fe2cf4..6ef6b145c922 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/filterBuilder.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/filterBuilder.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.testStart(function() { $('#qunit-fixture').html('
'); @@ -6,4 +6,4 @@ QUnit.testStart(function() { QUnit.module('Filter Builder markup'); -require('../DevExpress.ui.widgets/filterBuilderParts/markupTests.js'); +import '../DevExpress.ui.widgets/filterBuilderParts/markupTests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/gantt.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/gantt.tests.js index 1be9953591fc..a729ff53a995 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/gantt.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/gantt.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets/gantt.markup.tests.js'); +import '../DevExpress.ui.widgets/gantt.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/localization.intl.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/localization.intl.tests.js index e7d178cf6c91..b76ef02a5a17 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/localization.intl.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/localization.intl.tests.js @@ -1 +1 @@ -require('../DevExpress.localization/localization.intl.tests.js'); +import '../DevExpress.localization/localization.intl.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/lookup.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/lookup.tests.js index ad9f60381275..2117e3c204f0 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/lookup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/lookup.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/lookup.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/lookup.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/numberBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/numberBox.tests.js index 19ef38e94b32..a0a3b0669b1e 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/numberBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/numberBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/numberBox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/numberBox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/overlay.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/overlay.tests.js index e522acc25f38..dcb97e2244d4 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/overlay.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/overlay.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); +import $ from 'jquery'; -require('ui/overlay/ui.overlay'); +import 'ui/overlay/ui.overlay'; QUnit.testStart(function() { const markup = '
'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/pivotGrid.test.js b/packages/devextreme/testing/tests/DevExpress.serverSide/pivotGrid.test.js index f77edd20916f..28c2b5db5f05 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/pivotGrid.test.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/pivotGrid.test.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.pivotGrid/pivotGrid.markup.tests.js'); +import '../DevExpress.ui.widgets.pivotGrid/pivotGrid.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/progressBar.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/progressBar.tests.js index eb4872b71ad4..02ef76eea59b 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/progressBar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/progressBar.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets/progressBar.markup.tests.js'); +import '../DevExpress.ui.widgets/progressBar.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/rangeSlider.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/rangeSlider.tests.js index 79c5b0289c8f..394299a66e6d 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/rangeSlider.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/rangeSlider.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/rangeSlider.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/rangeSlider.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/selectBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/selectBox.tests.js index ecc17d5906c9..2182ec5303da 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/selectBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/selectBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/selectBox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/selectBox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/slider.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/slider.tests.js index a668a821e87f..ee9f7e4166fd 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/slider.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/slider.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; const SLIDER_HANDLE_CLASS = 'dx-slider-handle'; const TOOLTIP_CLASS = 'dx-tooltip'; @@ -27,5 +27,5 @@ QUnit.test('there is no tooltip in markup on server', function(assert) { assert.notOk($tooltip.length); }); -require('../DevExpress.ui.widgets.editors/slider.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/slider.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/switch.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/switch.tests.js index b91ca3f996d2..87f85ba12381 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/switch.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/switch.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/switch.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/switch.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/tagBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/tagBox.tests.js index f710d02b08a8..329ed5c3ec78 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/tagBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/tagBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/tagBox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/tagBox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/textArea.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/textArea.tests.js index cf7894744cf6..a6a89cfc7dbd 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/textArea.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/textArea.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/textArea.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/textArea.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/textBox.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/textBox.tests.js index 6a78b3b280f3..1dda1bebd5ff 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/textBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/textBox.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/textbox.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/textbox.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/textEditor.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/textEditor.tests.js index 830fe319edde..15a76356118b 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/textEditor.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/textEditor.tests.js @@ -4,4 +4,4 @@ QUnit.testStart(function() { document.getElementById('qunit-fixture').innerHTML = markup; }); -require('../DevExpress.ui.widgets.editors/textEditorParts/markup.tests.js'); +import '../DevExpress.ui.widgets.editors/textEditorParts/markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/trackBar.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/trackBar.tests.js index f461dea2be50..b5424648c678 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/trackBar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/trackBar.tests.js @@ -1,8 +1,8 @@ -require('../DevExpress.ui.widgets.editors/trackBar.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/trackBar.markup.tests.js'; -const $ = require('jquery'); +import $ from 'jquery'; -require('ui/track_bar'); +import 'ui/track_bar'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/treeList.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/treeList.tests.js index a12733657c3a..c8711b637d5f 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/treeList.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/treeList.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.treeList/treeList.markup.tests.js'); +import '../DevExpress.ui.widgets.treeList/treeList.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/utils.ready_callbacks.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/utils.ready_callbacks.tests.js index 31683ada9350..a9d6c21a0d4f 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/utils.ready_callbacks.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/utils.ready_callbacks.tests.js @@ -1,4 +1,4 @@ -const readyCallbacks = require('core/utils/ready_callbacks'); +import readyCallbacks from 'core/utils/ready_callbacks'; QUnit.module('readyCallbacks injection', { afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/validationGroup.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/validationGroup.tests.js index add3678c14f1..6bea69aa6175 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/validationGroup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/validationGroup.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/validationGroup.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/validationGroup.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/validationSummary.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/validationSummary.tests.js index b1a3df75a59e..9ba926ac4497 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/validationSummary.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/validationSummary.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/validationSummary.markup.tests.js'); +import '../DevExpress.ui.widgets.editors/validationSummary.markup.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/validator.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/validator.tests.js index d6eadca67b34..a6305d78403c 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/validator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/validator.tests.js @@ -1 +1 @@ -require('../DevExpress.ui.widgets.editors/validator.tests.js'); +import '../DevExpress.ui.widgets.editors/validator.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.serverSide/widgetsCreation.tests.js b/packages/devextreme/testing/tests/DevExpress.serverSide/widgetsCreation.tests.js index 86030b7adb10..090386d3d9ff 100644 --- a/packages/devextreme/testing/tests/DevExpress.serverSide/widgetsCreation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.serverSide/widgetsCreation.tests.js @@ -1,6 +1,6 @@ -const widgets = require('../../helpers/widgetsList.js').widgetsList; +import { widgetsList as widgets } from '../../helpers/widgetsList.js'; -const DataSource = require('common/data/data_source'); +import DataSource from 'common/data/data_source'; QUnit.module('Widget creation', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/contextmenu.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/contextmenu.tests.js index b2fbf79af553..cc79ce03817d 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/contextmenu.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/contextmenu.tests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const devices = require('core/devices'); -const support = require('core/utils/support'); -const holdEvent = require('common/core/events/hold'); -const contextMenuEvent = require('common/core/events/contextmenu'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import devices from 'core/devices'; +import * as support from 'core/utils/support'; +import holdEvent from 'common/core/events/hold'; +import * as contextMenuEvent from 'common/core/events/contextmenu'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/dblclick.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/dblclick.tests.js index acbeecedcecb..71464819b371 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/dblclick.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/dblclick.tests.js @@ -1,7 +1,7 @@ -const $ = require('jquery'); -const dblclickEvent = require('common/core/events/dblclick'); -const { dblClick } = require('__internal/events/dblclick'); -const pointerMock = require('../../helpers/pointerMock.js'); +import $ from 'jquery'; +import dblclickEvent from 'common/core/events/dblclick'; +import { dblClick } from '__internal/events/dblclick'; +import pointerMock from '../../helpers/pointerMock.js'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/drag.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/drag.tests.js index 182e9b32063c..cdcad45ebffa 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/drag.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/drag.tests.js @@ -1,10 +1,10 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const dragEvents = require('common/core/events/drag'); -const support = require('core/utils/support'); -const GestureEmitter = require('common/core/events/gesture/emitter.gesture'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import * as dragEvents from 'common/core/events/drag'; +import * as support from 'core/utils/support'; +import GestureEmitter from 'common/core/events/gesture/emitter.gesture'; const dropTargets = dragEvents.dropTargets; -const pointerMock = require('../../helpers/pointerMock.js'); +import pointerMock from '../../helpers/pointerMock.js'; $('#qunit-fixture').addClass('qunit-fixture-visible'); QUnit.testStart(function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/feedback.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/feedback.tests.js index 6458f0852da3..ee54e87596ba 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/feedback.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/feedback.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const devices = require('core/devices'); -const feedbackEvents = require('common/core/events/core/emitter.feedback'); -const pointerMock = require('../../helpers/pointerMock.js'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import devices from 'core/devices'; +import * as feedbackEvents from 'common/core/events/core/emitter.feedback'; +import pointerMock from '../../helpers/pointerMock.js'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/hold.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/hold.tests.js index 78a4db9961b1..a00284ee8a34 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/hold.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/hold.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); -const holdEvent = require('common/core/events/hold'); -const pointerMock = require('../../helpers/pointerMock.js'); +import $ from 'jquery'; +import holdEvent from 'common/core/events/hold'; +import pointerMock from '../../helpers/pointerMock.js'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/hover.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/hover.tests.js index a358fb58f39d..791e7fc26416 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/hover.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/hover.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); -const devices = require('core/devices'); -const hoverEvents = require('common/core/events/hover'); +import $ from 'jquery'; +import devices from 'core/devices'; +import * as hoverEvents from 'common/core/events/hover'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointer.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointer.tests.js index 93b47fdba064..fb85cd963e47 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointer.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointer.tests.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +import $ from 'jquery'; QUnit.testStart(function() { const markup = @@ -9,8 +9,8 @@ QUnit.testStart(function() { $('#qunit-fixture').html(markup); }); -require('./pointerParts/baseTests.js'); -require('./pointerParts/mouseTests.js'); -require('./pointerParts/touchTests.js'); -require('./pointerParts/mouseAndTouchTests.js'); -require('./pointerParts/strategySelectionTests.js'); +import './pointerParts/baseTests.js'; +import './pointerParts/mouseTests.js'; +import './pointerParts/touchTests.js'; +import './pointerParts/mouseAndTouchTests.js'; +import './pointerParts/strategySelectionTests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js index af476b785267..fdfb40692a7c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/baseTests.js @@ -1,9 +1,9 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const BaseStrategy = require('common/core/events/pointer/base'); -const registerEvent = require('common/core/events/core/event_registrator'); -const typeUtils = require('core/utils/type'); -const special = require('../../../helpers/eventHelper.js').special; +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import BaseStrategy from 'common/core/events/pointer/base'; +import registerEvent from 'common/core/events/core/event_registrator'; +import * as typeUtils from 'core/utils/type'; +import { special } from '../../../helpers/eventHelper.js'; const BubbledTestEventMap = { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseAndTouchTests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseAndTouchTests.js index ac065b0129b6..9f407cde1721 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseAndTouchTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseAndTouchTests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const MouseAndTouchStrategy = require('common/core/events/pointer/mouse_and_touch'); -const registerEvent = require('common/core/events/core/event_registrator'); -const nativePointerMock = require('../../../helpers/nativePointerMock.js'); -const special = require('../../../helpers/eventHelper.js').special; +import $ from 'jquery'; +import MouseAndTouchStrategy from 'common/core/events/pointer/mouse_and_touch'; +import registerEvent from 'common/core/events/core/event_registrator'; +import nativePointerMock from '../../../helpers/nativePointerMock.js'; +import { special } from '../../../helpers/eventHelper.js'; QUnit.module('mouse and touch events', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseTests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseTests.js index 8733017ed2d0..2b69eafcfbec 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/mouseTests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const MouseStrategy = require('common/core/events/pointer/mouse'); -const registerEvent = require('common/core/events/core/event_registrator'); -const nativePointerMock = require('../../../helpers/nativePointerMock.js'); -const special = require('../../../helpers/eventHelper.js').special; +import $ from 'jquery'; +import MouseStrategy from 'common/core/events/pointer/mouse'; +import registerEvent from 'common/core/events/core/event_registrator'; +import nativePointerMock from '../../../helpers/nativePointerMock.js'; +import { special } from '../../../helpers/eventHelper.js'; QUnit.module('mouse events', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/touchTests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/touchTests.js index 78cf41582d81..8cc336fa4fb2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/touchTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/pointerParts/touchTests.js @@ -1,10 +1,10 @@ -const $ = require('jquery'); -const TouchStrategy = require('common/core/events/pointer/touch'); -const registerEvent = require('common/core/events/core/event_registrator'); -const nativePointerMock = require('../../../helpers/nativePointerMock.js'); -const noop = require('core/utils/common').noop; -const special = require('../../../helpers/eventHelper.js').special; -const eventsEngine = require('common/core/events/core/events_engine'); +import $ from 'jquery'; +import TouchStrategy from 'common/core/events/pointer/touch'; +import registerEvent from 'common/core/events/core/event_registrator'; +import nativePointerMock from '../../../helpers/nativePointerMock.js'; +import { noop } from 'core/utils/common'; +import { special } from '../../../helpers/eventHelper.js'; +import eventsEngine from 'common/core/events/core/events_engine'; QUnit.module('touch events', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/scroll.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/scroll.tests.js index d80ac13750a1..f4738fd8e668 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/scroll.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/scroll.tests.js @@ -1,12 +1,12 @@ -const $ = require('jquery'); -const noop = require('core/utils/common').noop; -const scrollEvents = require('common/core/events/gesture/emitter.gesture.scroll'); -const GestureEmitter = require('common/core/events/gesture/emitter.gesture'); -const eventUtils = require('common/core/events/utils/index'); -const devices = require('core/devices'); -const compareVersions = require('core/utils/version').compare; -const animationFrame = require('common/core/animation/frame'); -const pointerMock = require('../../helpers/pointerMock.js'); +import $ from 'jquery'; +import { noop } from 'core/utils/common'; +import scrollEvents from 'common/core/events/gesture/emitter.gesture.scroll'; +import GestureEmitter from 'common/core/events/gesture/emitter.gesture'; +import * as eventUtils from 'common/core/events/utils/index'; +import devices from 'core/devices'; +import { compare as compareVersions } from 'core/utils/version'; +import * as animationFrame from 'common/core/animation/frame'; +import pointerMock from '../../helpers/pointerMock.js'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/transformation.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/transformation.tests.js index a0e83e63a5a6..e4422f6b6700 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/transformation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/transformation.tests.js @@ -1,5 +1,5 @@ -const $ = require('jquery'); -const transformEvent = require('common/core/events/transform'); +import $ from 'jquery'; +import * as transformEvent from 'common/core/events/transform'; $('#qunit-fixture').addClass('qunit-fixture-visible'); QUnit.testStart(function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.events/wheel.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.events/wheel.tests.js index f2f68c750db5..57f4ef469f58 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.events/wheel.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.events/wheel.tests.js @@ -1,6 +1,6 @@ -const $ = require('jquery'); -const wheelEvent = require('common/core/events/core/wheel'); -const nativePointerMock = require('../../helpers/nativePointerMock.js'); +import $ from 'jquery'; +import * as wheelEvent from 'common/core/events/core/wheel'; +import nativePointerMock from '../../helpers/nativePointerMock.js'; QUnit.testStart(function() { const markup = diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/adaptiveColumns.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/adaptiveColumns.tests.js index 7159ed187fb5..3ec0cf098d5a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/adaptiveColumns.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/adaptiveColumns.tests.js @@ -105,19 +105,22 @@ QUnit.module('AdaptiveColumns', { if(name === 'width' || name === 'height') { ++cssInvokeCounter; } + return cssFunc.apply(this, arguments); }; - // arrange, act - $('.dx-datagrid').width(200); - setupDataGrid(this); - this.rowsView.render($('#container')); - this.resizingController.updateDimensions(); - this.clock.tick(10); - - // assert - assert.equal(cssInvokeCounter, 0, 'no $.css() invokes for width/height CSS properties'); - - renderer.fn.css = cssFunc; + try { + // arrange, act + $('.dx-datagrid').width(200); + setupDataGrid(this); + this.rowsView.render($('#container')); + this.resizingController.updateDimensions(); + this.clock.tick(10); + + // assert + assert.equal(cssInvokeCounter, 0, 'no $.css() invokes for width/height CSS properties'); + } finally { + renderer.fn.css = cssFunc; + } }); // T516888 diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/gridView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/gridView.tests.js index c613ebdb395d..50e953df54df 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/gridView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/gridView.tests.js @@ -1,5 +1,5 @@ import devices from '__internal/core/m_devices'; -import visibilityChange from 'common/core/events/visibility_change'; +import * as visibilityChange from 'common/core/events/visibility_change'; import 'fluent_blue_light.css!'; import $ from 'jquery'; import 'ui/data_grid'; @@ -913,23 +913,29 @@ QUnit.module('Grid view', { this.createGridView(this.defaultOptions); - visibilityChange.triggerShownEvent = function() { + const triggerShownEventInitial = visibilityChange.triggerShownEvent; + + visibilityChange.DEBUG_set_triggerShownEvent(function() { isShownEventTriggered = true; - }; + }); this.resizingController.component._fireContentReadyAction = function() { isContentReadyCalled = true; }; - // act - this.resizingController._initPostRenderHandlers(); - this.resizingController._refreshSizesHandler({ - changeType: 'updateSelection', - }); + try { + // act + this.resizingController._initPostRenderHandlers(); + this.resizingController._refreshSizesHandler({ + changeType: 'updateSelection', + }); - // assert - assert.ok(!isShownEventTriggered, 'shown event'); - assert.ok(!isContentReadyCalled, 'content ready'); + // assert + assert.ok(!isShownEventTriggered, 'shown event'); + assert.ok(!isContentReadyCalled, 'content ready'); + } finally { + visibilityChange.DEBUG_set_triggerShownEvent(triggerShownEventInitial); + } }); QUnit.test('Render scrollable when there is max height (T427967)', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js index 69b3b7bd9bbb..a58a2ede028e 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { renderDateParts, getDatePartIndexByPosition } from '__internal/ui/date_box/date_box.mask.parts'; import dateParser from '__internal/core/localization/ldml/dateParserModule'; +import { spySeam } from '../../helpers/moduleSeam.js'; import dateLocalization from 'common/core/localization/date'; import localization from 'localization'; import { noop } from 'core/utils/common'; @@ -1761,7 +1762,7 @@ module('Options changed', setupModule, () => { }); test('performance - value change should not lead to recreate regexp and format pattern', function(assert) { - const regExpInfo = sinon.spy(dateParser, 'getRegExpInfo'); + const regExpInfo = spySeam(dateParser, 'getRegExpInfo', 'DEBUG_set_getRegExpInfo'); this.instance.option('displayFormat', 'dd.MM'); assert.strictEqual(regExpInfo.callCount, 1, 'regexpInfo should be called when format changed'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownBox.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownBox.tests.js index c0b2ad29a24d..3c4059e5a0f7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownBox.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dropDownBox.tests.js @@ -3,7 +3,7 @@ import renderer from 'core/renderer'; import keyboardMock from '../../helpers/keyboardMock.js'; import fx from 'common/core/animation/fx'; import DropDownBox from 'ui/drop_down_box'; -import typeUtils, { isRenderer } from 'core/utils/type'; +import { isRenderer, isFunction } from 'core/utils/type'; import config from 'core/config'; import devices from '__internal/core/m_devices'; import { normalizeKeyName } from 'common/core/events/utils/index'; @@ -789,7 +789,7 @@ QUnit.module('popup options', moduleConfig, () => { contentTemplate: () => $content }); - assert.ok(typeUtils.isFunction(instance.option('dropDownOptions.hideOnParentScroll'))); + assert.ok(isFunction(instance.option('dropDownOptions.hideOnParentScroll'))); }); [true, false].forEach((isMac) => { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/form.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/form.tests.js index 0f7a304b3962..3533d04adc83 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/form.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.form/form.tests.js @@ -6,7 +6,8 @@ import resizeCallbacks from '__internal/core/utils/m_resize_callbacks'; import typeUtils from 'core/utils/type'; import { extend } from 'core/utils/extend'; import messageLocalization from 'localization/message'; -import visibilityEventsModule from 'common/core/events/visibility_change'; +import * as visibilityEventsModule from 'common/core/events/visibility_change'; +import { spyVisibilityEvent } from '../../helpers/visibilityChangeMock.js'; import { TABS_ITEM_CLASS } from '__internal/ui/tabs/tabs'; import 'fluent_blue_light.css!'; import $ from 'jquery'; @@ -1042,7 +1043,7 @@ QUnit.module('T986577', () => { } QUnit.test('Toolbar is rendered inside form. alignItemLabels = false', function(assert) { - const resizeEventSpy = sinon.spy(visibilityEventsModule, 'triggerResizeEvent'); + const resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); const $form = $('#form').dxForm(extend({ alignItemLabels: false }, getFormConfig())); const resizeEventArg = resizeEventSpy.getCall(0).args[0]; @@ -1055,7 +1056,7 @@ QUnit.module('T986577', () => { }); QUnit.test('Toolbar is rendered inside form. alignItemLabels = true', function(assert) { - const resizeEventSpy = sinon.spy(visibilityEventsModule, 'triggerResizeEvent'); + const resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); const $form = $('#form').dxForm(extend({ alignItemLabels: true }, getFormConfig())); const resizeEventArg = resizeEventSpy.getCall(0).args[0]; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part1.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part1.js index d61a6192935d..13cf0441b0c7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part1.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part1.js @@ -1,2 +1,2 @@ -require('../../helpers/ignoreQuillTimers.js'); -require('./htmlEditorParts/importQuill.tests.js'); +import '../../helpers/ignoreQuillTimers.js'; +import './htmlEditorParts/importQuill.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js index 339dd30efcf3..52f2e5017af0 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part2.js @@ -1 +1 @@ -require('../../helpers/ignoreQuillTimers.js'); +import '../../helpers/ignoreQuillTimers.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importQuill.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importQuill.tests.js index 8ba22c6b1e98..954d86128ce6 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importQuill.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importQuill.tests.js @@ -1,22 +1,13 @@ +import quillImporter from 'ui/html_editor/quill_importer'; -SystemJS.config({ - map: { - 'devextreme-quill': '/packages/devextreme/testing/helpers/quillDependencies/noQuill.js' - } -}); - -define(function(require) { - const getQuill = require('ui/html_editor/quill_importer').getQuill; - - QUnit.module('Import 3rd party', function() { - QUnit.test('it throw an error if the quill script isn\'t referenced', function(assert) { - assert.throws( - function() { getQuill(); }, - function(e) { - return /(E1041)[\s\S]*(Quill)/.test(e.message); - }, - 'The Quill script isn\'t referenced' - ); - }); +QUnit.module('Import 3rd party', function() { + QUnit.test('it throw an error if the quill script is not referenced', function(assert) { + assert.throws( + function() { quillImporter.getQuill(); }, + function(e) { + return /(E1041)[\s\S]*(Quill)/.test(e.message); + }, + 'The Quill script is not referenced' + ); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/tableResizingModule.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/tableResizingModule.tests.js index 939672ded248..cf29a6de403a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/tableResizingModule.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/tableResizingModule.tests.js @@ -72,6 +72,8 @@ const moduleConfig = { }, afterEach: function() { + this.clock.tick(1000); + resizeCallbacks.empty(); this.clock.restore(); } }; @@ -176,7 +178,7 @@ module('Table resizing module', moduleConfig, () => { resizeCallbacks.fire(); - assert.strictEqual(typeof resizingInstance._resizeHandlerWithContext, 'object', '_resizeHandler is an object'); + assert.ok(resizingInstance._resizeHandlerWithContext, '_resizeHandlerWithContext is registered'); }); test('Window resize callback should be cleaned after the widget dispose', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/toolbarModule.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/toolbarModule.tests.js index 3afd5c78e87e..bcc686b7c3b1 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/toolbarModule.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/toolbarModule.tests.js @@ -1883,6 +1883,7 @@ testModule('Toolbar items state update', { test('state of the items in menu should be synchronized after toolbar repaint (t1117604)', function(assert) { this.options.items = this.mapToMenuItems(TABLE_OPERATIONS); + resizeCallbacks.empty(); const toolbar = new Toolbar(this.quillMock, this.options); this.quillMock.getFormat = () => ({ table: true }); toolbar.updateTableWidgets(); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/desktopTooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/desktopTooltip.tests.js index 9205430c2753..c097e42497ff 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/desktopTooltip.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/desktopTooltip.tests.js @@ -1,3 +1,4 @@ +import 'jquery'; import { DesktopTooltipStrategy } from '__internal/scheduler/tooltip_strategies/desktop_tooltip_strategy'; import { FunctionTemplate } from 'core/templates/function_template'; import { extend } from 'core/utils/extend'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/editing.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/editing.tests.js index e2125aa08ba8..a42f81dc26e5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/editing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/editing.tests.js @@ -1,12 +1,12 @@ -const $ = require('jquery'); -const devices = require('core/devices'); -const fx = require('common/core/animation/fx'); -const keyboardMock = require('../../helpers/keyboardMock.js'); -const { createWrapper } = require('../../helpers/scheduler/helpers.js'); -const { waitAsync } = require('../../helpers/scheduler/waitForAsync.js'); - -require('__internal/scheduler/scheduler'); -require('ui/drop_down_button'); +import $ from 'jquery'; +import devices from 'core/devices'; +import fx from 'common/core/animation/fx'; +import keyboardMock from '../../helpers/keyboardMock.js'; +import { createWrapper } from '../../helpers/scheduler/helpers.js'; +import { waitAsync } from '../../helpers/scheduler/waitForAsync.js'; + +import '__internal/scheduler/scheduler'; +import 'ui/drop_down_button'; QUnit.testStart(function() { $('#qunit-fixture').html('
'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.base.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.base.tests.js index 344a1ac27a97..81f0ba81e33c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.base.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.base.tests.js @@ -1,7 +1,16 @@ -const { getOuterHeight } = require('core/utils/size'); -const $ = require('jquery'); -const { createWrapper } = require('../../helpers/scheduler/helpers.js'); -const { waitAsync } = require('../../helpers/scheduler/waitForAsync.js'); +import { getOuterHeight } from 'core/utils/size'; +import $ from 'jquery'; +import { createWrapper } from '../../helpers/scheduler/helpers.js'; +import { waitAsync } from '../../helpers/scheduler/waitForAsync.js'; + +import 'fluent_blue_light.css!'; + +import { noop } from 'core/utils/common'; +import errors from 'ui/widget/ui.errors'; +import config from 'core/config'; + +import '__internal/scheduler/scheduler'; +import 'ui/drop_down_button'; QUnit.testStart(function() { $('#qunit-fixture').html( @@ -10,15 +19,6 @@ QUnit.testStart(function() {
'); }); -require('fluent_blue_light.css!'); - -const noop = require('core/utils/common').noop; -const errors = require('ui/widget/ui.errors'); -const config = require('core/config'); - -require('__internal/scheduler/scheduler'); -require('ui/drop_down_button'); - QUnit.module('Integration: Base', { beforeEach: function() { this.createInstance = async function(options) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.recurrenceRuleValidation.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.recurrenceRuleValidation.tests.js index a8d5b4170e91..9a93400f7933 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.recurrenceRuleValidation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.recurrenceRuleValidation.tests.js @@ -1,4 +1,14 @@ -const $ = require('jquery'); +import $ from 'jquery'; + +import 'fluent_blue_light.css!'; + +import fx from 'common/core/animation/fx'; +import * as dragEvents from 'common/core/events/drag'; +import { DataSource } from 'common/data/data_source/data_source'; +import { createWrapper } from '../../helpers/scheduler/helpers.js'; + +import '__internal/scheduler/scheduler'; +import 'ui/drop_down_button'; QUnit.testStart(function() { $('#qunit-fixture').html( @@ -7,16 +17,6 @@ QUnit.testStart(function() {
'); }); -require('fluent_blue_light.css!'); - -const fx = require('common/core/animation/fx'); -const dragEvents = require('common/core/events/drag'); -const DataSource = require('common/data/data_source/data_source').DataSource; -const { createWrapper } = require('../../helpers/scheduler/helpers.js'); - -require('__internal/scheduler/scheduler'); -require('ui/drop_down_button'); - QUnit.module('Integration: recurrence rules validation', { beforeEach: function() { fx.off = true; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.viewSwitcher.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.viewSwitcher.tests.js index 17d055ea0ba7..c0a720c0c6d7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.viewSwitcher.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.viewSwitcher.tests.js @@ -1,4 +1,14 @@ -const $ = require('jquery'); +import $ from 'jquery'; + +import 'fluent_blue_light.css!'; +import 'ui/drop_down_button'; + +import { noop } from 'core/utils/common'; +import { DataSource } from 'common/data/data_source/data_source'; +import { createWrapper } from '../../helpers/scheduler/helpers.js'; +import { waitAsync } from '../../helpers/scheduler/waitForAsync.js'; + +import '__internal/scheduler/scheduler'; QUnit.testStart(function() { $('#qunit-fixture').html( @@ -7,16 +17,6 @@ QUnit.testStart(function() {
'); }); -require('fluent_blue_light.css!'); -require('ui/drop_down_button'); - -const noop = require('core/utils/common').noop; -const DataSource = require('common/data/data_source/data_source').DataSource; -const { createWrapper } = require('../../helpers/scheduler/helpers.js'); -const { waitAsync } = require('../../helpers/scheduler/waitForAsync.js'); - -require('__internal/scheduler/scheduler'); - QUnit.module('Integration: View switcher', () => { QUnit.test('dataSource should be filtered if \'currentView\' option is changed', async function(assert) { const dataSource = new DataSource({ diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/loading.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/loading.tests.js index f49ef240ae7c..4f72cf33ef2b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/loading.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/loading.tests.js @@ -1,8 +1,8 @@ -const $ = require('jquery'); -const loading = require('__internal/scheduler/loading'); -const viewPort = require('core/utils/view_port').value; -const fx = require('common/core/animation/fx'); -const LoadPanel = require('ui/load_panel'); +import $ from 'jquery'; +import * as loading from '__internal/scheduler/loading'; +import { value as viewPort } from 'core/utils/view_port'; +import fx from 'common/core/animation/fx'; +import LoadPanel from 'ui/load_panel'; QUnit.module('loading tests', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/animator.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/animator.tests.js index 0d5648193c56..f75bb2a0a63f 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/animator.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/animator.tests.js @@ -1,12 +1,13 @@ import Animator from '__internal/ui/scroll_view/animator'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const REQUEST_ANIMATION_FRAME_TIMEOUT = 10; QUnit.module('Animator', { beforeEach: function() { this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { return window.setTimeout(callback, REQUEST_ANIMATION_FRAME_TIMEOUT); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagram.missingModules.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagram.missingModules.tests.js index 81ac9299d301..4d8198542df5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagram.missingModules.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagram.missingModules.tests.js @@ -1 +1 @@ -require('./diagramParts/importDiagram.tests.js'); +import './diagramParts/importDiagram.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagramParts/importDiagram.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagramParts/importDiagram.tests.js index ecc19597f49f..11113aa6afb5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagramParts/importDiagram.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/diagramParts/importDiagram.tests.js @@ -1,20 +1,12 @@ -SystemJS.config({ - map: { - 'devexpress-diagram': '/packages/devextreme/testing/helpers/noDiagram.js' - } -}); - -define(function(require) { - const getDiagram = require('__internal/ui/diagram/diagram.importer').getDiagram; +import { getDiagram } from '__internal/ui/diagram/diagram.importer'; - QUnit.module('Import devexpress-diagram', function() { - QUnit.test('throw an error if the devexpress-diagram script isn\'t referenced', function(assert) { - assert.throws( - function() { getDiagram(); }, - function(e) { - return /(E1041)[\s\S]*(devexpress-diagram)/.test(e.message); - } - ); - }); +QUnit.module('Import devexpress-diagram', function() { + QUnit.test('throw an error if the devexpress-diagram script isn\'t referenced', function(assert) { + assert.throws( + function() { getDiagram(); }, + function(e) { + return /(E1041)[\s\S]*(devexpress-diagram)/.test(e.message); + } + ); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/draggable.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/draggable.tests.js index 4853c0288d5c..a213047904a8 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/draggable.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/draggable.tests.js @@ -4,6 +4,7 @@ import pointerMock from '../../helpers/pointerMock.js'; import viewPort from 'core/utils/view_port'; import GestureEmitter from 'common/core/events/gesture/emitter.gesture.js'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import translator from 'common/core/animation/translator'; import fx from 'common/core/animation/fx'; import keyboardMock from '../../helpers/keyboardMock.js'; @@ -1664,7 +1665,7 @@ QUnit.module('autoScroll', $.extend({}, moduleConfig, { this.clock = sinon.useFakeTimers(); setupDraggable(this, $('#scrollableItem')); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { return window.setTimeout(callback, 10); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/drawer.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/drawer.tests.js index 7ca9ed022c71..25c7f056db2b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/drawer.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/drawer.tests.js @@ -7,7 +7,7 @@ import resizeCallbacks from 'core/utils/resize_callbacks'; import typeUtils from 'core/utils/type'; import { addShadowDomStyles } from 'core/utils/shadow_dom'; import eventsEngine from 'common/core/events/core/events_engine'; -import visibilityChange from 'common/core/events/visibility_change'; +import * as visibilityChange from 'common/core/events/visibility_change'; import $ from 'jquery'; import Button from 'ui/button'; import Drawer from 'ui/drawer'; @@ -281,16 +281,16 @@ QUnit.module('Drawer behavior', () => { const triggerResizeEventInitial = visibilityChange.triggerResizeEvent; - visibilityChange.triggerResizeEvent = ($element) => { + visibilityChange.DEBUG_set_triggerResizeEvent(($element) => { assert.ok(true, 'resize event call is expected'); assert.equal($element, drawer.viewContent(), 'ViewContent element is expected'); const rect = $(drawer.viewContent())[0].getBoundingClientRect(); assert.strictEqual(rect.width, 90, 'ViewContent element width'); assert.strictEqual(rect.height, 50, 'ViewContent element height'); - visibilityChange.triggerResizeEvent = triggerResizeEventInitial; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerResizeEventInitial); done(); - }; + }); drawer.toggle(); }); @@ -311,18 +311,18 @@ QUnit.module('Drawer behavior', () => { const triggerFunction = visibilityChange.triggerResizeEvent; try { - visibilityChange.triggerResizeEvent = ($element) => { + visibilityChange.DEBUG_set_triggerResizeEvent(($element) => { assert.ok(true, 'resize event call is expected'); assert.equal($element, drawer.viewContent(), 'ViewContent element is expected'); const rect = $(drawer.viewContent())[0].getBoundingClientRect(); assert.strictEqual(rect.width, 90, 'ViewContent element width'); assert.strictEqual(rect.height, 50, 'ViewContent element height'); - }; + }); drawer.toggle(); } finally { - visibilityChange.triggerResizeEvent = triggerFunction; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerFunction); } }); @@ -337,15 +337,15 @@ QUnit.module('Drawer behavior', () => { assert.expect(2); try { - visibilityChange.triggerResizeEvent = function($element) { + visibilityChange.DEBUG_set_triggerResizeEvent(function($element) { assert.ok(true, 'event was triggered'); assert.equal($element, instance.viewContent(), 'Event was triggered for right element'); - }; + }); instance.option('position', 'left'); } finally { - visibilityChange.triggerResizeEvent = triggerFunction; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerFunction); } }); @@ -979,7 +979,7 @@ QUnit.module('Drawer behavior', () => { minSize: minSize }).dxDrawer('instance'); - visibilityChange.triggerResizeEvent = ($element) => { + visibilityChange.DEBUG_set_triggerResizeEvent(($element) => { resizeCallCount++; assert.strictEqual(resizeCallCount, 1, 'resize event should be triggered once'); assert.equal($element, drawer.viewContent(), 'ViewContent element is expected'); @@ -993,9 +993,9 @@ QUnit.module('Drawer behavior', () => { assert.strictEqual(viewRect.width, expectedViewRect.width, 'ViewContent width'); assert.strictEqual(viewRect.height, expectedViewRect.height, 'ViewContent height'); - visibilityChange.triggerResizeEvent = triggerResizeEventInitial; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerResizeEventInitial); done(); - }; + }); drawer.toggle(); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/dropDownButton.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/dropDownButton.tests.js index 0c4faa275ab1..ffff4a3f23a7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/dropDownButton.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/dropDownButton.tests.js @@ -1,7 +1,7 @@ import { getHeight, getOuterHeight, getOuterWidth, getWidth } from 'core/utils/size'; import $ from 'jquery'; import DropDownButton from 'ui/drop_down_button'; -import typeUtils, { isRenderer } from 'core/utils/type'; +import { isRenderer, isPromise } from 'core/utils/type'; import config from 'core/config'; import eventsEngine from 'common/core/events/core/events_engine'; import keyboardMock from '../../helpers/keyboardMock.js'; @@ -1726,7 +1726,7 @@ QUnit.module('public methods', { const togglePromise = this.dropDownButton.toggle(); assert.strictEqual(popup.option('visible'), false, 'popup visibility is inverted'); - assert.ok(typeUtils.isPromise(togglePromise), 'toggle should return promise'); + assert.ok(isPromise(togglePromise), 'toggle should return promise'); }); QUnit.test('open method', function(assert) { @@ -1735,7 +1735,7 @@ QUnit.module('public methods', { const openPromise = this.dropDownButton.open(); assert.strictEqual(popup.option('visible'), true, 'popup is opened'); - assert.ok(typeUtils.isPromise(openPromise), 'open should return promise'); + assert.ok(isPromise(openPromise), 'open should return promise'); }); QUnit.test('close method', function(assert) { @@ -1745,7 +1745,7 @@ QUnit.module('public methods', { const closePromise = this.dropDownButton.close(); assert.strictEqual(popup.option('visible'), false, 'popup is closed'); - assert.ok(typeUtils.isPromise(closePromise), 'close should return promise'); + assert.ok(isPromise(closePromise), 'close should return promise'); }); QUnit.test('opened option', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.tests.js index d4627e9de67f..ff68e064e97e 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gallery.tests.js @@ -1,10 +1,11 @@ import { getHeight, getOuterHeight, getOuterWidth, getWidth } from 'core/utils/size'; import $ from 'jquery'; import { DataSource } from 'common/data/data_source/data_source'; -import visibilityChange from 'common/core/events/visibility_change'; +import { spyVisibilityEvent } from '../../helpers/visibilityChangeMock.js'; import ArrayStore from 'common/data/array_store'; import fx from 'common/core/animation/fx'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import resizeCallbacks from 'core/utils/resize_callbacks'; import { isRenderer } from 'core/utils/type'; import config from 'core/config'; @@ -731,7 +732,7 @@ QUnit.module('behavior', { }); QUnit.test('resizeCallback is called after item is rendered (T1132935)', function(assert) { - const resizeEventSpy = sinon.spy(visibilityChange, 'triggerResizeEvent'); + const resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); this.$element.dxGallery({ items: [0, 1, 2, 3], @@ -2176,7 +2177,7 @@ QUnit.module('api', { QUnit.test('animationDuration', function(assert) { fx.off = false; - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { return window.setTimeout(callback, 10); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gantt.missingModules.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gantt.missingModules.tests.js index 9510f40ebac3..c79cad2d7a43 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/gantt.missingModules.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/gantt.missingModules.tests.js @@ -1 +1 @@ -require('./ganttParts/importGantt.tests.js'); +import './ganttParts/importGantt.tests.js'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/ganttParts/importGantt.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/ganttParts/importGantt.tests.js index 66e095bfe854..58162b185b4c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/ganttParts/importGantt.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/ganttParts/importGantt.tests.js @@ -1,21 +1,12 @@ +import { getGanttViewCore as getGantt } from '__internal/ui/gantt/gantt_importer'; -SystemJS.config({ - map: { - 'devexpress-gantt': '/packages/devextreme/testing/helpers/noGantt.js' - } -}); - -define(function(require) { - const getGantt = require('__internal/ui/gantt/gantt_importer').getGanttViewCore; - - QUnit.module('Import devexpress-gantt', function() { - QUnit.test('throw an error if the devexpress-gantt script isn\'t referenced', function(assert) { - assert.throws( - function() { getGantt(); }, - function(e) { - return /(E1041)[\s\S]*(devexpress-gantt)/.test(e.message); - } - ); - }); +QUnit.module('Import devexpress-gantt', function() { + QUnit.test('throw an error if the devexpress-gantt script isn\'t referenced', function(assert) { + assert.throws( + function() { getGantt(); }, + function(e) { + return /(E1041)[\s\S]*(devexpress-gantt)/.test(e.message); + } + ); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/bingTests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/bingTests.js index 3a6a0a1acc7e..7df2f8f97e39 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/bingTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/bingTests.js @@ -2,17 +2,13 @@ import $ from 'jquery'; import errorsLogger from 'core/errors'; -import testing from './utils.js'; +import { LOCATIONS, MARKERS, ROUTES } from './utils.js'; import BingProvider from '__internal/ui/map/provider.dynamic.bing'; import ajaxMock from '../../../helpers/ajaxMock.js'; import errors from 'ui/widget/ui.errors'; import 'ui/map'; -const LOCATIONS = testing.LOCATIONS; -const MARKERS = testing.MARKERS; -const ROUTES = testing.ROUTES; - const prepareTestingBingProvider = function(abortDirectionsUpdate) { window.geocodedLocation = new Microsoft.Maps.Location(-1.12345, -1.12345); window.geocodedWithErrorLocation = new Microsoft.Maps.Location(); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/commonTests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/commonTests.js index 9d3f32f59dcb..754ac7c8141a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/commonTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/commonTests.js @@ -1,12 +1,9 @@ import $ from 'jquery'; -import testing from './utils.js'; +import { MARKERS, ROUTES } from './utils.js'; import Map from 'ui/map'; import GoogleStaticProvider from '__internal/ui/map/provider.google_static'; import ajaxMock from '../../../helpers/ajaxMock.js'; -const MARKERS = testing.MARKERS; -const ROUTES = testing.ROUTES; - const MAP_CLASS = 'dx-map'; const MAP_CONTAINER_CLASS = 'dx-map-container'; const MAP_SHIELD_CLASS = 'dx-map-shield'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/googleStaticTests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/googleStaticTests.js index 1e8697ba5a38..8917af82b6fc 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/googleStaticTests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/googleStaticTests.js @@ -1,14 +1,10 @@ import $ from 'jquery'; -import testing from './utils.js'; +import { LOCATIONS, MARKERS, ROUTES } from './utils.js'; import Map from 'ui/map'; import GoogleStaticProvider from '__internal/ui/map/provider.google_static'; import Color from 'color'; import ajaxMock from '../../../helpers/ajaxMock.js'; -const LOCATIONS = testing.LOCATIONS; -const MARKERS = testing.MARKERS; -const ROUTES = testing.ROUTES; - const MAP_CONTAINER_CLASS = 'dx-map-container'; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/utils.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/utils.js index 428c4949e952..6ab1eaebda00 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/utils.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/utils.js @@ -1,10 +1,10 @@ -exports.LOCATIONS = [ +export const LOCATIONS = [ 'Brooklyn Bridge,New York,NY', { lat: 40.537102, lng: -73.990318 }, [40.539102, -73.970318], '40.557102, -72.990318' ]; -exports.MARKERS = [ +export const MARKERS = [ { tooltip: { text: 'A', @@ -41,7 +41,7 @@ exports.MARKERS = [ } } ]; -exports.ROUTES = [ +export const ROUTES = [ { weight: 5, color: 'blue', diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js index 9b60cc53f2b4..8010f8a63cf5 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/overlay.tests.js @@ -10,7 +10,9 @@ import resizeCallbacks from 'core/utils/resize_callbacks'; import { isRenderer } from 'core/utils/type'; import { value as viewPort } from 'core/utils/view_port'; import eventsEngine from 'common/core/events/core/events_engine'; -import visibilityChange, { triggerHidingEvent, triggerShownEvent } from 'common/core/events/visibility_change'; +import * as visibilityChange from 'common/core/events/visibility_change'; +import { triggerHidingEvent, triggerShownEvent } from 'common/core/events/visibility_change'; +import { stubVisibilityEvent } from '../../helpers/visibilityChangeMock.js'; import $ from 'jquery'; import { hideCallback as hideTopOverlayCallback } from 'common/core/environment/hide_callback'; import errors from 'core/errors'; @@ -778,9 +780,9 @@ testModule('visibility', moduleConfig, () => { const triggerFunction = visibilityChange.triggerResizeEvent; try { - visibilityChange.triggerResizeEvent = () => { + visibilityChange.DEBUG_set_triggerResizeEvent(() => { assert.ok(true, 'event triggered'); - }; + }); const $overlay = $('#overlay').dxOverlay({ visible: true }); const overlay = $overlay.dxOverlay('instance'); @@ -789,7 +791,7 @@ testModule('visibility', moduleConfig, () => { overlay.show(); } finally { - visibilityChange.triggerResizeEvent = triggerFunction; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerFunction); } }); @@ -3127,7 +3129,7 @@ testModule('API', moduleConfig, () => { const instance = $element.dxOverlay({ visible: true }).dxOverlay('instance'); - const resizeStub = sinon.stub(visibilityChange, 'triggerResizeEvent'); + const resizeStub = stubVisibilityEvent('triggerResizeEvent'); instance.repaint(); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js index 1fcb96b26eef..79a1ca867418 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/popup.tests.js @@ -23,7 +23,7 @@ import windowUtils from '__internal/core/utils/m_window'; import uiErrors from 'ui/widget/ui.errors'; import themes from 'ui/themes'; import executeAsyncMock from '../../helpers/executeAsyncMock.js'; -import visibilityChangeUtils from 'common/core/events/visibility_change'; +import { spyVisibilityEvent } from '../../helpers/visibilityChangeMock.js'; import domAdapter from '__internal/core/m_dom_adapter'; import { TEMPLATE_WRAPPER_CLASS, @@ -1532,7 +1532,7 @@ QUnit.module('options changed callbacks', { QUnit.module('T934380, T1245421', { beforeEach() { - this.resizeEventSpy = sinon.spy(visibilityChangeUtils, 'triggerResizeEvent'); + this.resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); }, afterEach() { this.resizeEventSpy.restore(); @@ -1676,7 +1676,7 @@ QUnit.module('options changed callbacks', { QUnit.test('titleTemplate option change should trigger resize event for content correct geometry rendering', function(assert) { this.instance.option('visible', true); - const resizeEventSpy = sinon.spy(visibilityChangeUtils, 'triggerResizeEvent'); + const resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); try { this.instance.option({ @@ -1691,7 +1691,7 @@ QUnit.module('options changed callbacks', { QUnit.test('bottomTemplate option change should trigger resize event for content correct geometry rendering', function(assert) { this.instance.option('visible', true); - const resizeEventSpy = sinon.spy(visibilityChangeUtils, 'triggerResizeEvent'); + const resizeEventSpy = spyVisibilityEvent('triggerResizeEvent'); try { this.instance.option({ diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/resizable.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/resizable.tests.js index 688151935f87..3125bdcfe254 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/resizable.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/resizable.tests.js @@ -1,5 +1,5 @@ import translator from 'common/core/animation/translator'; -import visibilityChange from 'common/core/events/visibility_change'; +import * as visibilityChange from 'common/core/events/visibility_change'; import $ from 'jquery'; import 'ui/resizable'; import pointerMock from '../../helpers/pointerMock.js'; @@ -1808,14 +1808,14 @@ QUnit.module('actions', () => { assert.expect(1); try { - visibilityChange.triggerResizeEvent = function() { + visibilityChange.DEBUG_set_triggerResizeEvent(function() { assert.ok(true, 'event triggered'); - }; + }); pointer.dragStart().drag(10, 0); } finally { - visibilityChange.triggerResizeEvent = triggerFunction; + visibilityChange.DEBUG_set_triggerResizeEvent(triggerFunction); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js index a68329e45dd3..b6d6c37f0586 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js @@ -3,6 +3,7 @@ import renderer from 'core/renderer'; import { noop } from 'core/utils/common'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import devices from '__internal/core/m_devices'; import eventsEngine from 'common/core/events/core/events_engine'; import themes from 'ui/themes'; @@ -55,7 +56,7 @@ devices.current('iPhone'); const moduleConfig = { beforeEach: function() { this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); return new Promise((resolve) => themes.initialized(resolve)); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.actions.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.actions.tests.js index c7f2f6363390..9d46c86faa86 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.actions.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.actions.tests.js @@ -2,6 +2,7 @@ import $ from 'jquery'; import { noop } from 'core/utils/common'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import pointerMock from '../../../helpers/pointerMock.js'; import { @@ -33,7 +34,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js index 9979ac9fa302..4881f45ded04 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import resizeCallbacks from 'core/utils/resize_callbacks'; import pointerMock from '../../../helpers/pointerMock.js'; @@ -33,7 +34,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, @@ -176,9 +177,9 @@ QUnit.test('gesture prevent when scrollable is full and bounce enabled false', f QUnit.test('stop inertia on click', function(assert) { assert.expect(1); - animationFrame.requestAnimationFrame = function(callback) { + animationFrame.DEBUG_set_requestAnimationFrame(function(callback) { setTimeout(callback, 0); - }; + }); const moveDistance = -10; const moveDuration = 10; @@ -209,9 +210,9 @@ QUnit.test('stop inertia on click', function(assert) { QUnit.test('scrollbar is hidden on stop', function(assert) { assert.expect(1); - animationFrame.requestAnimationFrame = function(callback) { + animationFrame.DEBUG_set_requestAnimationFrame(function(callback) { setTimeout(callback, 0); - }; + }); const $scrollable = $('#scrollable').dxScrollable({ showScrollbar: 'onScroll', @@ -285,9 +286,9 @@ QUnit.test('bounce up', function(assert) { let scroll = 0; - animationFrame.requestAnimationFrame = function(callback) { + animationFrame.DEBUG_set_requestAnimationFrame(function(callback) { setTimeout(callback, 0); - }; + }); const $scrollable = $('#scrollable').dxScrollable({ useNative: false, @@ -313,9 +314,9 @@ QUnit.test('bounce up', function(assert) { QUnit.test('stop bounce on click', function(assert) { assert.expect(1); - animationFrame.requestAnimationFrame = function(callback) { + animationFrame.DEBUG_set_requestAnimationFrame(function(callback) { setTimeout(callback, 0); - }; + }); const moveDistance = -10; const moveDuration = 10; @@ -346,9 +347,9 @@ QUnit.test('stop bounce on click', function(assert) { QUnit.test('stop inertia bounce on after mouse up', function(assert) { assert.expect(1); - animationFrame.requestAnimationFrame = function(callback) { + animationFrame.DEBUG_set_requestAnimationFrame(function(callback) { setTimeout(callback, 0); - }; + }); const moveDistance = -10; const moveDuration = 10; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js index 4c3b07c73706..983cde84a48c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js @@ -1,4 +1,5 @@ import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import devices from '__internal/core/m_devices'; import domUtils from '__internal/core/utils/m_dom'; @@ -42,7 +43,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.mouseWheel.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.mouseWheel.tests.js index 91e41942b078..d5e054bba654 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.mouseWheel.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.mouseWheel.tests.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import devices from '__internal/core/m_devices'; import pointerMock from '../../../helpers/pointerMock.js'; @@ -33,7 +34,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.rtl.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.rtl.tests.js index c1e98042c9d5..68bc0ca1cc08 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.rtl.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.rtl.tests.js @@ -1,4 +1,5 @@ import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import { triggerShownEvent } from 'common/core/events/visibility_change'; import $ from 'jquery'; import Scrollable from 'ui/scroll_view/ui.scrollable'; @@ -32,7 +33,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollbar.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollbar.tests.js index 2fd827da508f..7a90a2f17912 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollbar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollbar.tests.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import devices from '__internal/core/m_devices'; import Scrollbar from '__internal/ui/scroll_view/scrollbar'; import pointerMock from '../../../helpers/pointerMock.js'; @@ -80,7 +81,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollingByThumb.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollingByThumb.tests.js index 5d3a73a8fe38..e2b0547dab63 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollingByThumb.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.scrollingByThumb.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import Scrollbar from '__internal/ui/scroll_view/scrollbar'; import pointerMock from '../../../helpers/pointerMock.js'; @@ -34,7 +35,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.useNative.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.useNative.tests.js index 8744cc522027..43e425b55496 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.useNative.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.useNative.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { getTranslateValues } from '__internal/ui/scroll_view/utils/get_translate_values'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import pointerMock from '../../../helpers/pointerMock.js'; import { @@ -33,7 +34,7 @@ const moduleConfig = { $('#qunit-fixture').html(markup); this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { callback(); }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js index 8013b9b0b350..780a1d32e7c2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js @@ -4,6 +4,7 @@ import 'ui/sortable'; import 'ui/scroll_view'; import fx from 'common/core/animation/fx'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import browser from 'core/utils/browser'; import translator from 'common/core/animation/translator'; import viewPort from 'core/utils/view_port'; @@ -2642,7 +2643,7 @@ function getModuleConfigForTestsWithScroll(elementSelector, scrollSelector) { beforeEach: function() { this.clock = sinon.useFakeTimers(); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake((callback) => { + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake((callback) => { return window.setTimeout(callback, 10); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js index 3e98fd22e59e..dff805a7fd8e 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js @@ -770,7 +770,7 @@ QUnit.module('initialized method', (hooks) => { test('initialized fires for ordinary link (init before link addition - should wait theme loading)', function(assert) { const done = assert.async(); - const url = ROOT_URL + 'packages/devextreme/testing' + '/helpers/themeMarker.css'; // WA for systemjs builder + const url = ROOT_URL + 'packages/devextreme/testing' + '/helpers/themeMarker.css'; const $frame = createFrame(); themes.setDefaultTimeout(30000); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js index 56837f471a08..f3b976cd4dae 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js @@ -2,6 +2,7 @@ import $ from 'jquery'; import { Renderer } from '../../helpers/vizMocks.js'; import executeAsyncMock from '../../helpers/executeAsyncMock.js'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import legendModule from 'viz/components/legend'; import titleModule from 'viz/core/title'; import dxChart from 'viz/chart'; @@ -12,7 +13,7 @@ import seriesFamilyModule from 'viz/core/series_family'; import { setupSeriesFamily } from '../../helpers/chartMocks.js'; import pointerMock from '../../helpers/pointerMock.js'; -const seriesFamilyNativeConstructor = { ...seriesFamilyModule }.SeriesFamily; +const seriesFamilyNativeConstructor = seriesFamilyModule.SeriesFamily; setupSeriesFamily(); QUnit.testStart(function() { const markup = @@ -2325,7 +2326,7 @@ QUnit.test('check horizontal alignment === center', function(assert) { QUnit.module('Auto hide point markers', $.extend({}, moduleSetup, { beforeEach: function() { moduleSetup.beforeEach.call(this); - seriesFamilyModule.SeriesFamily = seriesFamilyNativeConstructor; + seriesFamilyModule.DEBUG_set_SeriesFamily(seriesFamilyNativeConstructor); const dataSource = []; for(let i = 0; i < 500000; i += 250) { const y1 = Math.sin(i); @@ -3300,7 +3301,7 @@ QUnit.module('Option changing in onDrawn after zooming', { beforeEach: function() { this.legendShiftSpy = sinon.spy(legendModule.Legend.prototype, 'move'); this.titleShiftSpy = sinon.spy(titleModule.Title.prototype, 'move'); - sinon.stub(rendererModule, 'Renderer').callsFake(function() { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { return new Renderer(); }); }, @@ -4901,7 +4902,7 @@ QUnit.test('Reset axes animation before adjusting position of vertical axes (fix QUnit.module('SeriesFamily', $.extend({}, moduleSetup, { beforeEach: function() { moduleSetup.beforeEach.call(this); - seriesFamilyModule.SeriesFamily = seriesFamilyNativeConstructor; + seriesFamilyModule.DEBUG_set_SeriesFamily(seriesFamilyNativeConstructor); } })); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js index 98903e0642df..dd81141d23df 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part1.tests.js @@ -19,7 +19,7 @@ import layoutManagerModule from 'viz/chart_components/layout_manager'; import trackerModule from 'viz/chart_components/tracker'; import dxChart from 'viz/chart'; import resizeCallbacks from 'core/utils/resize_callbacks'; -import vizUtils from 'viz/core/utils'; +import vizUtils from 'viz/core/utils_default'; import { MockSeries, seriesMockData, @@ -951,10 +951,10 @@ QUnit.module('isReady', $.extend({}, environment, { beforeEach: function() { const that = this; environment.beforeEach.apply(this, arguments); - rendererModule.Renderer = sinon.spy(function(parameters) { + rendererModule.DEBUG_set_Renderer(sinon.spy(function(parameters) { that.renderer = new Renderer(parameters); return that.renderer; - }); + })); }, afterEach: function() { environment.afterEach.apply(this, arguments); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part2.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part2.tests.js index 9cf6b8b5b947..8b834b77359a 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part2.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part2.tests.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import { environment } from './chartParts/commons.js'; -import vizUtils from 'viz/core/utils'; +import vizUtils from 'viz/core/utils_default'; import { MockSeries, commonMethodsForTests, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part4.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part4.tests.js index c8b435a2130d..f6a80c436a9e 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part4.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part4.tests.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { environment, createChartInstance } from './chartParts/commons.js'; import vizUtils from 'viz/core/utils_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import { MockSeries, commonMethodsForTests, categories, seriesMockData } from '../../helpers/chartMocks.js'; $('
').appendTo('#qunit-fixture'); @@ -276,7 +277,7 @@ QUnit.test('Create clipRects. With financial series', function(assert) { }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); const stubSeries = new MockSeries(); @@ -338,7 +339,7 @@ QUnit.test('Create clipRects. With series with errorBars', function(assert) { }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); const stubSeries = new MockSeries({ @@ -409,7 +410,7 @@ QUnit.test('Create clipRects. With financial series. Rotated', function(assert) originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); const stubSeries = new MockSeries(); @@ -471,7 +472,7 @@ QUnit.test('Create clipRects. With financial series. Two panes', function(assert originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; panes[1].canvas = rect; }); @@ -554,7 +555,7 @@ QUnit.test('Create clipRects. With financial series. For second panes', function originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; panes[1].canvas = rect; }); @@ -646,7 +647,7 @@ QUnit.test('Create clipRects. With financial series. Two panes. Rotated', functi originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; panes[1].canvas = rect; }); @@ -730,7 +731,7 @@ QUnit.test('Create clipRects. With financial series. For second panes. Rotated', originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; panes[1].canvas = rect; }); @@ -842,7 +843,7 @@ QUnit.test('Update clipRects. With financial series', function(assert) { originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); @@ -958,7 +959,7 @@ QUnit.test('Update clipRects. With financial series. When start series does not originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); @@ -1049,7 +1050,7 @@ QUnit.test('Create clipRects with visible pane borders. With financial series', originalBottom: 70 }; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); const stubSeries = new MockSeries(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part7.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part7.tests.js index 4f947b7a2d25..473f593472fe 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part7.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.part7.tests.js @@ -10,11 +10,14 @@ import { createChartInstance, LabelCtor, } from './chartParts/commons.js'; -import { ERROR_MESSAGES as dxErrors } from 'viz/core/errors_warnings'; +import errorsWarnings from 'viz/core/errors_warnings'; import seriesModule from 'viz/series/base_series'; import dataValidatorModule from 'viz/components/data_validator'; import { MockSeries, categories, seriesMockData, MockTranslator } from '../../helpers/chartMocks.js'; import graphicObjects from '__internal/common/charts'; +import { stubSeam } from '../../helpers/moduleSeam.js'; + +const dxErrors = errorsWarnings.ERROR_MESSAGES; $('
').appendTo('#qunit-fixture'); @@ -69,7 +72,7 @@ $('
').appendTo('#qunit-fixture'); const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = this.createChart({ series: { @@ -84,7 +87,7 @@ $('
').appendTo('#qunit-fixture'); QUnit.test('dxChart with single series, series type is unknown in option series', function(assert) { const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = this.createChart({ series: { @@ -708,7 +711,7 @@ $('
').appendTo('#qunit-fixture'); environment.afterEach.call(this); }, mockValidateData: function() { - this.validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data) { + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data) { return { x: data || [] }; }); }, @@ -981,7 +984,7 @@ $('
').appendTo('#qunit-fixture'); const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = this.createChart({ series: { @@ -1003,7 +1006,7 @@ $('
').appendTo('#qunit-fixture'); const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = this.createChart({ series: { @@ -1025,7 +1028,7 @@ $('
').appendTo('#qunit-fixture'); const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = createChartInstance({ series: { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js index 4cb701dc1d9d..b4cb60bd99d5 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js @@ -5,6 +5,7 @@ import seriesModule from 'viz/series/base_series'; import pointModule from 'viz/series/points/base_point'; import axisModule from 'viz/axes/base_axis'; import titleModule from 'viz/core/title'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import dataValidatorModule from 'viz/components/data_validator'; import legendModule from 'viz/components/legend'; import rangeModule from 'viz/translators/range'; @@ -45,7 +46,6 @@ const environment = { layoutManagerModule.LayoutManager.restore(); seriesModule.Series.restore(); pointModule.Point.restore(); - this.Title.restore(); this.Legend.restore(); }, @@ -64,12 +64,12 @@ const environment = { return chart; }, _stubLayoutManager: function() { - this.LayoutManager = sinon.stub(layoutManagerModule, 'LayoutManager').callsFake(function() { + this.LayoutManager = stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager').callsFake(function() { return new LayoutManager(arguments); }); }, _stubLegend: function() { - this.Legend = sinon.stub(legendModule, 'Legend').callsFake(function() { + this.Legend = stubSeam(legendModule, 'Legend', '_setLegend').callsFake(function() { const legend = new Legend(); legend.getTemplatesGroups = sinon.spy(function() { return []; @@ -81,12 +81,12 @@ const environment = { }); }, _stubTitle: function() { - this.Title = sinon.stub(titleModule, 'Title').callsFake(function() { + this.Title = stubSeam(titleModule, 'Title', 'DEBUG_set_title').callsFake(function() { return new ChartTitle(); }); }, _stubAxis: function() { - this.Axis = sinon.stub(axisModule, 'Axis').callsFake(function() { + this.Axis = stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function() { const axis = new Axis(); axis.updateOptions = sinon.spy(function(options) { axis.name = options.name; @@ -106,24 +106,24 @@ const environment = { }); }, _stubRange: function() { - sinon.stub(rangeModule, 'Range').callsFake(function(opt) { + stubSeam(rangeModule, 'Range', 'DEBUG_set_Range').callsFake(function(opt) { const range = new Range(); $.extend(range, opt); return range; }); }, _stubSeriesAndPoint: function() { - sinon.stub(seriesModule, 'Series').callsFake(function() { + stubSeam(seriesModule, 'Series', 'DEBUG_set_Series').callsFake(function() { const series = new Series(); return series; }); - sinon.stub(pointModule, 'Point').callsFake(function() { + stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { return new Point(); }); }, _stubValidateData: function() { - this.validateData = sinon.stub(dataValidatorModule, 'validateData'); + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData'); }, _restoreValidateData: function() { this.validateData.restore(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartAxisDrawing.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartAxisDrawing.tests.js index bd3a9991fa33..cf1d64d104d5 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartAxisDrawing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartAxisDrawing.tests.js @@ -14,10 +14,11 @@ import titleModule from 'viz/core/title'; import rendererModule from 'viz/core/renderers/renderer_default'; import multiAxesSynchronizer from '__internal/viz/chart_components/multi_axes_synchronizer'; import { Deferred } from 'core/utils/deferred'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const TitleOrig = titleModule.Title; -rendererModule.Renderer = sinon.stub(); +rendererModule.DEBUG_set_Renderer(sinon.stub()); const environment = { beforeEach: function() { @@ -33,7 +34,7 @@ const environment = { getMargins: sinon.stub() }; - this.scrollBarStub = sinon.stub(scrollBarModule, 'ScrollBar').callsFake(function(renderer, group) { + this.scrollBarStub = stubSeam(scrollBarModule, 'ScrollBar', 'DEBUG_set_ScrollBar').callsFake(function(renderer, group) { const scrollBar = new originalScrollBar(renderer, group); const originalUpdateSize = scrollBar.updateSize; @@ -49,7 +50,7 @@ const environment = { let axisIndex = 0; const originalAxis = axisModule.Axis; - this.axisStub = sinon.stub(axisModule, 'Axis').callsFake(function(renderingSettings) { + this.axisStub = stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function(renderingSettings) { const axis = new originalAxis(renderingSettings); for(const stubName in axesStubs[axisIndex]) { @@ -62,7 +63,7 @@ const environment = { this.title = new Title(); this.legend = new Legend(); - this.legendStub = sinon.stub(legendModule, 'Legend').callsFake(() =>{ + this.legendStub = stubSeam(legendModule, 'Legend', '_setLegend').callsFake(() =>{ this.legend.getTemplatesGroups = sinon.spy(function() { return []; }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartParts/commons.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartParts/commons.js index da30309955ac..efc788fec0e6 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartParts/commons.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartParts/commons.js @@ -32,6 +32,7 @@ import { } from '../../../helpers/chartMocks.js'; import exportModule from '__internal/viz/core/exportModule'; import { _test_prepareSegmentRectPoints } from 'viz/utils'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; const ThemeManager = stubClass(chartThemeManagerModule.ThemeManager); const LayoutManager = stubClass(layoutManagerModule.LayoutManager); @@ -78,7 +79,7 @@ const defaultCrosshairOptions = { }; // stubs -sinon.stub(rendererModule, 'Renderer').callsFake((parameters) => { +stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake((parameters) => { return new Renderer(parameters); }); @@ -89,7 +90,7 @@ titleModule.DEBUG_set_title(sinon.spy(function(parameters) { return title; })); -sinon.stub(legendModule, 'Legend').callsFake((parameters) => { +stubSeam(legendModule, 'Legend', '_setLegend').callsFake((parameters) => { const legend = new Legend(parameters); legend.getActionCallback = sinon.spy(function(arg) { return arg; @@ -196,11 +197,11 @@ const environment = { that.layoutManager.layoutElements = sinon.spy(function() { arguments[2](); }); - this.StubLayoutManager = sinon.stub(layoutManagerModule, 'LayoutManager').callsFake(function() { + this.StubLayoutManager = stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager').callsFake(function() { return that.layoutManager; }); - sinon.stub(scrollBarClassModule, 'ScrollBar').callsFake(function() { + stubSeam(scrollBarClassModule, 'ScrollBar', 'DEBUG_set_ScrollBar').callsFake(function() { const ScrollBar = stubClass(ScrollBarClass); const scrollBar = new ScrollBar(); scrollBar.stub('init').returns(scrollBar); @@ -227,11 +228,11 @@ const environment = { }, options.argumentAxis)); return createChartInstance(options, this.$container); }; - this.createThemeManager = sinon.stub(chartThemeManagerModule, 'ThemeManager').callsFake(function() { + this.createThemeManager = stubSeam(chartThemeManagerModule, 'ThemeManager', 'DEBUG_set_ThemeManager').callsFake(function() { return that.themeManager; }); const family = sinon.createStubInstance(seriesFamilyModule.SeriesFamily); - this.createSeriesFamily = sinon.stub(seriesFamilyModule, 'SeriesFamily').callsFake(function() { + this.createSeriesFamily = stubSeam(seriesFamilyModule, 'SeriesFamily', 'DEBUG_set_SeriesFamily').callsFake(function() { family.pane = 'default'; family.adjustSeriesDimensions = sinon.stub(); family.adjustSeriesValues = sinon.stub(); @@ -239,14 +240,14 @@ const environment = { return family; }); this.prepareSegmentRectPoints = _test_prepareSegmentRectPoints(function(x, y, w, h, borderOptions) { return { points: [x, y, w, h], pathType: borderOptions }; }); - this.createCrosshair = sinon.stub(crosshairModule, 'Crosshair').callsFake(function() { + this.createCrosshair = stubSeam(crosshairModule, 'Crosshair', 'DEBUG_set_Crosshair').callsFake(function() { return sinon.createStubInstance(Crosshair); }); tooltipModule.DEBUG_set_tooltip(sinon.spy(function(parameters) { return that.tooltip; })); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes, canvas) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes, canvas) { $.each(panes, function(_, item) { item.canvas = $.extend({}, canvas); }); @@ -287,7 +288,7 @@ const environment = { tooltipModule.DEBUG_set_tooltip(null); }, mockValidateData: function() { - this.validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data, groupsData) { + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data, groupsData) { const categories = []; if(data) { data.forEach(function(item) { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartSync.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartSync.tests.js index bb388fa2dc37..378810dedb48 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chartSync.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chartSync.tests.js @@ -19,6 +19,7 @@ import { CustomStore } from 'common/data/custom_store'; import chartThemeManagerModule from 'viz/components/chart_theme_manager'; import scrollBarModule from 'viz/chart_components/scroll_bar'; import dxChart from 'viz/chart'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import { MockSeries, MockPoint, @@ -37,9 +38,9 @@ const ScrollBar = scrollBarModule.ScrollBar; $('
').appendTo('#qunit-fixture'); setupSeriesFamily(); -rendererModule.Renderer = function(parameters) { +rendererModule.DEBUG_set_Renderer(function(parameters) { return new Renderer(parameters); -}; +}); const defaultCrosshairOptions = { horizontalLine: {}, @@ -63,7 +64,7 @@ exportModule.DEBUG_set_ExportMenu(sinon.spy(function() { return new ExportMenu(); })); -legendModule.Legend = sinon.spy(function(parameters) { +legendModule._setLegend(sinon.spy(function(parameters) { const legend = new Legend(parameters); legend.update = sinon.spy(function(params, settings) { legend.getPosition = sinon.stub().returns(settings.position); @@ -82,7 +83,7 @@ legendModule.Legend = sinon.spy(function(parameters) { return []; }); return legend; -}); +})); function getLegendStub() { return legendModule.Legend.lastCall.returnValue; @@ -118,13 +119,13 @@ const environment = { that.themeManager.getOptions.withArgs('resolveLabelOverlapping').returns(false); that.themeManager.getOptions.returns({}); - titleModule.Title = sinon.spy(function(parameters) { + titleModule.DEBUG_set_title(sinon.spy(function(parameters) { const title = new Title(parameters); title.getLayoutOptions = sinon.stub().returns({ verticalAlignment: that.titleVerticalAlignment || 'bottom' }); return title; - }); + })); that.createChart = function(options) { options = $.extend(true, { @@ -145,7 +146,7 @@ const environment = { return createChartInstance(options, this.$container); }; - this.createThemeManager = sinon.stub(chartThemeManagerModule, 'ThemeManager').callsFake(function() { + this.createThemeManager = stubSeam(chartThemeManagerModule, 'ThemeManager', 'DEBUG_set_ThemeManager').callsFake(function() { return that.themeManager; }); this.layoutManager = new LayoutManager(); @@ -153,7 +154,7 @@ const environment = { arguments[2] && arguments[2](); }); - sinon.stub(layoutManagerModule, 'LayoutManager').callsFake(function() { + stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager').callsFake(function() { const layoutManager = new LayoutManager(); layoutManager .stub('needMoreSpaceForPanesCanvas') @@ -166,17 +167,17 @@ const environment = { return layoutManager; }); - sinon.stub(tooltipModule, 'Tooltip').callsFake(function(parameters) { + stubSeam(tooltipModule, 'Tooltip', 'DEBUG_set_tooltip').callsFake(function(parameters) { return new StubTooltip(parameters); }); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes, canvas) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes, canvas) { $.each(panes, function(_, item) { item.canvas = $.extend({}, canvas); }); }); - validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data) { + validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data) { return { arg: data || [] }; }); }, @@ -219,7 +220,7 @@ const environment = { const spyLayoutManager = layoutManagerModule.LayoutManager; vizUtils.updatePanesCanvases.restore(); - sinon.stub(vizUtils, 'updatePanesCanvases').callsFake(function(panes) { + stubSeam(vizUtils, 'updatePanesCanvases', 'DEBUG_set_updatePanesCanvases').callsFake(function(panes) { panes[0].canvas = rect; }); @@ -674,7 +675,7 @@ const environment = { }); QUnit.test('draw chart when scrollBar is visible', function(assert) { - sinon.stub(scrollBarModule, 'ScrollBar').callsFake(function() { + stubSeam(scrollBarModule, 'ScrollBar', 'DEBUG_set_ScrollBar').callsFake(function() { const stub = sinon.createStubInstance(ScrollBar); stub.init.returns(stub); stub.update.returns(stub); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/charts.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/charts.tests.js index a2a66750d1db..55ee38c98908 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/charts.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/charts.tests.js @@ -1,11 +1,11 @@ import testGlobalExports from '../../helpers/publicModulesHelper.js'; import * as AdvancedChartModule from '__internal/viz/chart_components/advanced_chart'; import * as baseChartModule from '__internal/viz/chart_components/base_chart'; -import * as CrosshairModule from 'viz/chart_components/crosshair'; -import * as LayoutManagerModule from 'viz/chart_components/layout_manager'; +import CrosshairModule from 'viz/chart_components/crosshair'; +import LayoutManagerModule from 'viz/chart_components/layout_manager'; import multiAxesSynchronizer from '__internal/viz/chart_components/multi_axes_synchronizer'; -import * as ScrollBarModule from 'viz/chart_components/scroll_bar'; -import * as trackerModule from 'viz/chart_components/tracker'; +import ScrollBarModule from 'viz/chart_components/scroll_bar'; +import trackerModule from 'viz/chart_components/tracker'; import 'viz/chart'; import 'viz/pie_chart'; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/equalPieSize.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/equalPieSize.tests.js index 68bbc7ed15e0..0241bd8d3782 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/equalPieSize.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/equalPieSize.tests.js @@ -6,6 +6,7 @@ import layoutManagerModule from 'viz/chart_components/layout_manager'; import dxPieChart from 'viz/pie_chart'; import { MockSeries, MockPoint, insertMockFactory, restoreMockFactory, resetMockFactory, seriesMockData } from '../../helpers/chartMocks.js'; import { rendererModule, resetModules } from './chartParts/commons.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; function getContainer(hidden) { const div = $('
').appendTo('#qunit-fixture'); @@ -60,18 +61,18 @@ const dataSourceTemplate = [ { cat: 'Third', val: 300 } ]; -rendererModule.Renderer = sinon.spy(function(parameters) { +rendererModule.DEBUG_set_Renderer(sinon.spy(function(parameters) { return new Renderer(parameters); -}); +})); const environment = { beforeEach: function() { setupMocks.call(this); this.originalLayoutManagerCtor = layoutManagerModule.LayoutManager; - this.LayoutManager = sinon.stub(layoutManagerModule, 'LayoutManager'); + this.LayoutManager = stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager'); - this.validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data) { + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data) { return { arg: data || [] }; }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js index 5678d675a517..a32866de372b 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/pieChart.tests.js @@ -19,7 +19,7 @@ import { import exportModule from '__internal/viz/core/exportModule'; import seriesModule from 'viz/series/base_series'; import { BaseChart } from '__internal/viz/chart_components/base_chart'; -import * as labelModule from 'viz/series/points/label'; +import labelModule from 'viz/series/points/label'; import dataValidatorModule from 'viz/components/data_validator'; import translator1DModule from 'viz/translators/translator1d'; import { CustomStore } from 'common/data/custom_store'; @@ -35,6 +35,7 @@ import TemplateManagerModule from '__internal/core/m_template_manager'; import graphicObjects from '__internal/common/charts'; import eventsEngine from 'common/core/events/core/events_engine'; import devices from '__internal/core/m_devices'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const LabelCtor = new ObjectPool(labelModule.Label); @@ -46,9 +47,9 @@ const dataSourceTemplate = [ { cat: 'Third', val: 300 } ]; -rendererModule.Renderer = sinon.spy(function(parameters) { +rendererModule.DEBUG_set_Renderer(sinon.spy(function(parameters) { return new Renderer(parameters); -}); +})); function createPieChart(options) { this.container = $('#chartContainer'); @@ -168,14 +169,14 @@ const environment = { that.layoutManager.needMoreSpaceForPanesCanvas.returns(true); that.layoutManager.applyPieChartSeriesLayout.returns({ radiusInner: 0, radiusOuter: 300, centerX: 100, centerY: 200 }); - that.LayoutManager = sinon.stub(layoutManagerModule, 'LayoutManager').callsFake(function() { + that.LayoutManager = stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager').callsFake(function() { return that.layoutManager; }); - this.createThemeManager = sinon.stub(chartThemeManagerModule, 'ThemeManager').callsFake(function() { + this.createThemeManager = stubSeam(chartThemeManagerModule, 'ThemeManager', 'DEBUG_set_ThemeManager').callsFake(function() { return that.themeManager; }); - this.validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data) { + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data) { return { arg: data || [] }; }); }, @@ -717,7 +718,7 @@ const overlappingEnvironment = $.extend({}, environment, { QUnit.test('dxChart with single series, series type is unknown', function(assert) { const stubSeries = new MockSeries({}); seriesMockData.series.push(stubSeries); - seriesModule.Series = function() { return { isUpdated: false }; }; + seriesModule.DEBUG_set_Series(function() { return { isUpdated: false }; }); const chart = this.createPieChart({ dataSource: dataSourceTemplate, @@ -832,7 +833,7 @@ const overlappingEnvironment = $.extend({}, environment, { environment.beforeEach.apply(this, arguments); const translatorClass = new stubClass(translator1DModule.Translator1D); - sinon.stub(translator1DModule, 'Translator1D').callsFake(function() { + stubSeam(translator1DModule, 'Translator1D', 'DEBUG_set_Translator1D').callsFake(function() { const translator = new translatorClass(); translator.stub('setDomain').returnsThis(); translator.stub('setCodomain').returnsThis(); @@ -891,7 +892,7 @@ const overlappingEnvironment = $.extend({}, environment, { const translatorClass = new stubClass(translator1DModule.Translator1D); - sinon.stub(translator1DModule, 'Translator1D').callsFake(function() { + stubSeam(translator1DModule, 'Translator1D', 'DEBUG_set_Translator1D').callsFake(function() { const translator = new translatorClass(); translator.stub('setDomain').returnsThis(); translator.stub('setCodomain').returnsThis(); @@ -1073,7 +1074,7 @@ const overlappingEnvironment = $.extend({}, environment, { this.mockSeries2 = new MockSeries({ argumentField: 'arg' }); const translatorClass = new stubClass(translator1DModule.Translator1D); - sinon.stub(translator1DModule, 'Translator1D').callsFake(function() { + stubSeam(translator1DModule, 'Translator1D', 'DEBUG_set_Translator1D').callsFake(function() { const translator = new translatorClass(); translator.stub('setDomain').returnsThis(); translator.stub('setCodomain').returnsThis(); @@ -2046,7 +2047,7 @@ const overlappingEnvironment = $.extend({}, environment, { const translatorClass = new stubClass(translator1DModule.Translator1D); - sinon.stub(translator1DModule, 'Translator1D').callsFake(function() { + stubSeam(translator1DModule, 'Translator1D', 'DEBUG_set_Translator1D').callsFake(function() { const translator = new translatorClass(); translator.stub('setDomain').returnsThis(); translator.stub('setCodomain').returnsThis(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/polarChart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/polarChart.tests.js index 781beda4acb4..f66a6fc6528f 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/polarChart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/polarChart.tests.js @@ -5,7 +5,7 @@ import { Renderer, Legend, ExportMenu } from '../../helpers/vizMocks.js'; import trackerModule from 'viz/chart_components/tracker'; import chartThemeManagerModule from 'viz/components/chart_theme_manager'; import legendModule from 'viz/components/legend'; -import seriesModule, { Series } from 'viz/series/base_series'; +import seriesModule from 'viz/series/base_series'; import seriesFamilyModule from 'viz/core/series_family'; import axisModule from 'viz/axes/base_axis'; import dxPolarChart from 'viz/polar_chart'; @@ -17,6 +17,9 @@ import layoutManagerModule from 'viz/chart_components/layout_manager'; import exportModule from '__internal/viz/core/exportModule'; import 'viz/chart'; +import { stubSeam } from '../../helpers/moduleSeam.js'; + +const { Series } = seriesModule; const stubTooltip = sinon.createStubInstance(tooltipModule.Tooltip); const stubRange = sinon.createStubInstance(rangeModule.Range); @@ -30,7 +33,7 @@ QUnit.testStart(function() { chartContainer.appendTo('#qunit-fixture'); }); -legendModule.Legend = sinon.spy(function(parameters) { +legendModule._setLegend(sinon.spy(function(parameters) { const legend = new Legend(parameters); legend.getActionCallback = sinon.spy(function(arg) { return arg; @@ -42,7 +45,7 @@ legendModule.Legend = sinon.spy(function(parameters) { return []; }); return legend; -}); +})); function stubExport() { const exportMenuInstance = new ExportMenu(); @@ -150,7 +153,7 @@ const environment = { that.$container = $('#chartContainer'); - this.createThemeManager = sinon.stub(chartThemeManagerModule, 'ThemeManager').callsFake(function() { + this.createThemeManager = stubSeam(chartThemeManagerModule, 'ThemeManager', 'DEBUG_set_ThemeManager').callsFake(function() { resetStub(stubThemeManager); that.themeManager = stubThemeManager; return stubThemeManager; @@ -167,25 +170,25 @@ const environment = { }; }; - that.createRenderer = sinon.stub(rendererModule, 'Renderer').callsFake(function() { + that.createRenderer = stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { const stubRenderer = new Renderer(); stubRenderer.clipCircle = that.clipFunc; stubRenderer.clipRect = that.clipFunc; return stubRenderer; }); - that.createTooltip = sinon.stub(tooltipModule, 'Tooltip').callsFake(function() { + that.createTooltip = stubSeam(tooltipModule, 'Tooltip', 'DEBUG_set_tooltip').callsFake(function() { resetStub(stubTooltip); return stubTooltip; }); - that.range = sinon.stub(rangeModule, 'Range').callsFake(function() { + that.range = stubSeam(rangeModule, 'Range', 'DEBUG_set_Range').callsFake(function() { resetStub(stubRange); stubRange.addRange = function() { this.min = 2; }; return stubRange; }); - that.createSeries = sinon.stub(seriesModule, 'Series').callsFake(function(settings, seriesTheme) { + that.createSeries = stubSeam(seriesModule, 'Series', 'DEBUG_set_Series').callsFake(function(settings, seriesTheme) { resetStub(stubSeries[seriesIndex]); stubSeries[seriesIndex].getValueAxis.returns(settings.valueAxis); if(seriesTheme.valueErrorBar) { @@ -194,7 +197,7 @@ const environment = { return $.extend(true, stubSeries[seriesIndex++], seriesTheme); }); - that.createAxis = sinon.stub(axisModule, 'Axis').callsFake(function() { + that.createAxis = stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function() { resetStub(stubAxes[axesIndex]); stubAxes[axesIndex].getMargins.returns({ @@ -207,12 +210,12 @@ const environment = { return stubAxes[axesIndex++]; }); - that.createSeriesFamily = sinon.stub(seriesFamilyModule, 'SeriesFamily').callsFake(function() { + that.createSeriesFamily = stubSeam(seriesFamilyModule, 'SeriesFamily', 'DEBUG_set_SeriesFamily').callsFake(function() { resetStub(stubSeriesFamily); return stubSeriesFamily; }); - that.createLayoutManager = sinon.stub(layoutManagerModule, 'LayoutManager').callsFake(function() { + that.createLayoutManager = stubSeam(layoutManagerModule, 'LayoutManager', 'DEBUG_set_LayoutManager').callsFake(function() { resetStub(stubLayoutManager); return stubLayoutManager; }); @@ -343,7 +346,7 @@ QUnit.test('create series with panes', function(assert) { }); QUnit.test('give series in groups to data validator', function(assert) { - const validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function(data) { + const validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function(data) { return data || []; }); try { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/scrollBar.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/scrollBar.tests.js index 5233d0a2ba6e..70b8554fbb65 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/scrollBar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/scrollBar.tests.js @@ -8,6 +8,7 @@ import { ScrollBar } from 'viz/chart_components/scroll_bar'; import translator2DModule from 'viz/translators/translator2d'; import pointerMock from '../../helpers/pointerMock.js'; import dragEvents from 'common/core/events/drag'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Translator = stubClass(translator2DModule.Translator2D); @@ -34,7 +35,7 @@ const environment = { this.group = this.renderer.g(); - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { const stub = new Translator(); stub.getScale = sinon.stub().returns(1); stub.stub('getCanvasVisibleArea'); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/areaSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/areaSeries.tests.js index 7c44e7490fee..d0347e0f12f2 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/areaSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/areaSeries.tests.js @@ -4,6 +4,7 @@ import { } from '../../helpers/vizMocks.js'; import { noop } from 'core/utils/common'; import vizUtils from 'viz/core/utils_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { insertMockFactory, MockAxis, restoreMockFactory } from '../../helpers/chartMocks.js'; @@ -99,7 +100,7 @@ const environmentWithSinonStubPoint = { beforeEach: function() { environment.beforeEach.call(this); let mockPointIndex = 0; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(series, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series, data) { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.angle = -data.argument; @@ -3059,7 +3060,7 @@ function setDiscreteType(series) { QUnit.module('Polar Series', { beforeEach: function() { environmentWithSinonStubPoint.beforeEach.call(this); - sinon.stub(vizUtils, 'getCosAndSin'); + stubSeam(vizUtils, 'getCosAndSin', 'DEBUG_set_getCosAndSin'); vizUtils.getCosAndSin.returns({ cos: 1, sin: -1 }); }, afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/barPoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/barPoint.tests.js index 5298fb48ac87..0c9fc618952f 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/barPoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/barPoint.tests.js @@ -76,14 +76,15 @@ const environment = { }; this.label = sinon.createStubInstance(labelModule.Label); - this.labelFactory = labelModule.Label = sinon.spy(function() { + this.labelFactory = sinon.spy(function() { return that.label; }); + labelModule.DEBUG_set_Label(this.labelFactory); this.label.getLayoutOptions.returns(this.options.label); this.label.getBoundingRect.returns({ height: 10, width: 20 }); }, afterEach: function() { - labelModule.Label = originalLabel; + labelModule.DEBUG_set_Label(originalLabel); } }; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/barSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/barSeries.tests.js index e2cf41d7b953..a1c67c6d1460 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/barSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/barSeries.tests.js @@ -6,6 +6,7 @@ import Color from 'color'; import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { MockAxis, MockTranslator } from '../../helpers/chartMocks.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -67,7 +68,7 @@ const environment = { this.renderer = new Renderer(); this.seriesGroup = this.renderer.g(); this.data = [{ arg: 1, val: 10 }, { arg: 2, val: 20 }, { arg: 3, val: 30 }, { arg: 4, val: 40 }]; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.getMarkerCoords.returns({ x: 1, y: 2, width: 20, height: 10 }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/basePoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/basePoint.tests.js index 986b07c4157f..20e5543b98da 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/basePoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/basePoint.tests.js @@ -6,6 +6,7 @@ import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import SeriesModule from 'viz/series/base_series'; import { MockTranslator } from '../../helpers/chartMocks.js'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -540,7 +541,7 @@ QUnit.module('Draw', { attributes: { r: 6 }, symbol: 'circle' }; - this.sinonFactory = sinon.stub(labelModule, 'Label').callsFake(function() { + this.sinonFactory = stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { return sinon.createStubInstance(originalLabel); }); this.series = { @@ -606,7 +607,7 @@ QUnit.module('Label', { this.renderer = new Renderer(); this.group = this.renderer.g(); - this.sinonFactory = sinon.stub(labelModule, 'Label').callsFake(function() { + this.sinonFactory = stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { return sinon.createStubInstance(originalLabel); }); this.labelsGroup = {}; @@ -1244,7 +1245,7 @@ QUnit.module('Dispose', { attributes: { r: 6 }, symbol: 'circle' }; - this.sinonFactory = sinon.stub(labelModule, 'Label').callsFake(function() { + this.sinonFactory = stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { return sinon.createStubInstance(originalLabel); }); this.series = { @@ -1355,7 +1356,7 @@ QUnit.module('API', { _argumentChecker: function() { return true; }, _valueChecker: function() { return true; } }; - sinon.spy(labelModule, 'Label'); + spySeam(labelModule, 'Label', 'DEBUG_set_Label'); }, afterEach: function() { labelModule.Label.restore(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/baseSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/baseSeries.tests.js index 65621c4d4211..90892b53c9ca 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/baseSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/baseSeries.tests.js @@ -8,6 +8,7 @@ import typeUtils from 'core/utils/type'; import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { insertMockFactory, MockTranslator, MockAxis, restoreMockFactory } from '../../helpers/chartMocks.js'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; const mixins = SeriesModule.mixins; @@ -67,12 +68,12 @@ const environment = { this.renderer = new Renderer(); _this.realCreatePoint = pointModule.Point; - pointModule.Point = function() { + pointModule.DEBUG_set_Point(function() { _this.pointsCreatingCount++; const point = _this.realCreatePoint.apply(null, arguments); point.setInvisibility = sinon.stub(); return point; - }; + }); chartSeriesNS['mocktype'] = { stylesHistory: [], @@ -160,7 +161,7 @@ const environment = { mixins.pie['mocktype'] = mixins.chart['mocktype']; }, afterEach: function() { - pointModule.Point = this.realCreatePoint; + pointModule.DEBUG_set_Point(this.realCreatePoint); restoreMockFactory(); } }; @@ -178,7 +179,7 @@ const environmentWithSinonStubPoint = { beforeEach: function() { environment.beforeEach.call(this); let mockPointIndex = 0; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(series, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series, data) { const stub = mockPoints[mockPointIndex++]; stub.series = series; stub.argument = data.argument || 1; @@ -794,7 +795,7 @@ QUnit.test('Pass errorBars options to point (on update). ErrorBars are visible', QUnit.module('tag to points', { beforeEach: function() { - this.spy = sinon.spy(pointModule, 'Point'); + this.spy = spySeam(pointModule, 'Point', 'DEBUG_set_Point'); this.data = [{ arg: 1, val: 1 }, { arg: 2, val: 2 }, { arg: 3, val: 3 }]; }, afterEach: function() { @@ -2183,7 +2184,7 @@ QUnit.test('Points count > maxLabelCount', function(assert) { QUnit.module('Series states - excludePointsMode', { beforeEach: function() { environment.beforeEach.call(this); - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); @@ -2551,7 +2552,7 @@ QUnit.test('setHoverState after Selected State in includePointsMode', function(a QUnit.module('Series states - nearestPoint Mode', { beforeEach: function() { environment.beforeEach.call(this); - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(_, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(_, data) { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; @@ -2910,7 +2911,7 @@ QUnit.test('reset nearest point on select', function(assert) { QUnit.module('Series states - includePointsMode', { beforeEach: function() { environment.beforeEach.call(this); - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); @@ -3269,7 +3270,7 @@ QUnit.test('clear selection hovered', function(assert) { QUnit.module('Series states - none mode', { beforeEach: function() { environment.beforeEach.call(this); - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); @@ -4877,7 +4878,7 @@ QUnit.module('Legend states', { beforeEach: function() { this.legendCallback = sinon.stub(); environment.beforeEach.call(this); - sinon.stub(pointModule, 'Point').callsFake(function(series) { + stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series) { const point = new Point(); point.argument = 1; point.series = series; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubblePoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubblePoint.tests.js index 85ff6594fec9..43f0abdb54b5 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubblePoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubblePoint.tests.js @@ -344,14 +344,15 @@ QUnit.module('Draw Label', { _valueChecker: function() { return true; } }; this.label = sinon.createStubInstance(labelModule.Label); - this.labelFactory = labelModule.Label = sinon.spy(function() { + this.labelFactory = sinon.spy(function() { return that.label; }); + labelModule.DEBUG_set_Label(this.labelFactory); this.label.getLayoutOptions.returns(this.options.label); this.label.getBoundingRect.returns({ height: 10, width: 20 }); }, afterEach: function() { - labelModule.Label = originalLabel; + labelModule.DEBUG_set_Label(originalLabel); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubbleSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubbleSeries.tests.js index 7fee08d47f4d..4b608fd0ae54 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubbleSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/bubbleSeries.tests.js @@ -6,6 +6,7 @@ import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; const Series = SeriesModule.Series; import { MockAxis, insertMockFactory, restoreMockFactory } from '../../helpers/chartMocks.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const createSeries = function(options, renderSettings) { renderSettings = renderSettings || {}; @@ -66,7 +67,7 @@ const environment = { this.seriesGroup = this.renderer.g(); this.data = [{ arg: 1, val: 10, size: 1 }, { arg: 2, val: 20, size: 1 }, { arg: 3, val: 30, size: 1 }, { arg: 4, val: 40, size: 1 }]; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.hasValue.returns(true); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialPoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialPoint.tests.js index b4d7fac27d4a..1ec80f003e77 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialPoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialPoint.tests.js @@ -6,6 +6,7 @@ import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import { MockTranslator, MockSeries } from '../../helpers/chartMocks.js'; import tooltipModule from 'viz/core/tooltip'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const originalLabel = labelModule.Label; @@ -1761,7 +1762,7 @@ QUnit.module('Draw label', { failOnWrongData: true }) }; - this.sinonFactory = sinon.stub(labelModule, 'Label').callsFake(function() { + this.sinonFactory = stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { const label = sinon.createStubInstance(originalLabel); label.getLayoutOptions.returns(that.options.label); label.getBoundingRect.returns({ height: 10, width: 20 }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialSeries.tests.js index 8000b8eeaadc..f4276f83161d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/financialSeries.tests.js @@ -5,6 +5,7 @@ import { import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { MockAxis, insertMockFactory, restoreMockFactory } from '../../helpers/chartMocks.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -29,7 +30,7 @@ const environment = { this.data = [ { date: 'arg1', high: 'high1', low: 'low1', open: 'open1', close: 'close1' } ]; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.hasValue.returns(true); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/lineSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/lineSeries.tests.js index e1b096619b24..82656c4556e3 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/lineSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/lineSeries.tests.js @@ -4,6 +4,7 @@ import { } from '../../helpers/vizMocks.js'; import { noop } from 'core/utils/common'; import vizUtils from 'viz/core/utils_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { @@ -78,7 +79,7 @@ const environmentWithSinonStubPoint = { environment.beforeEach.call(this); let mockPointIndex = 0; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(series, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series, data) { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.angle = -data.argument; @@ -1350,7 +1351,7 @@ function setDiscreteType(series) { this.options = { type: 'line' }; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); @@ -2277,7 +2278,7 @@ function setDiscreteType(series) { QUnit.module('polar Series', { beforeEach: function() { environmentWithSinonStubPoint.beforeEach.call(this); - sinon.stub(vizUtils, 'getCosAndSin'); + stubSeam(vizUtils, 'getCosAndSin', 'DEBUG_set_getCosAndSin'); vizUtils.getCosAndSin.returns({ cos: 1, sin: -1 }); }, afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/piePoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/piePoint.tests.js index 31b8f88887f6..960879cfd04d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/piePoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/piePoint.tests.js @@ -1348,12 +1348,13 @@ QUnit.module('Connector', { this.label = sinon.createStubInstance(labelModule.Label); this.label.getLayoutOptions.returns(this.options.label); this.label.getBoundingRect.returns({ height: 10, width: 20 }); - this.labelFactory = labelModule.Label = sinon.spy(function() { + this.labelFactory = sinon.spy(function() { return that.label; }); + labelModule.DEBUG_set_Label(this.labelFactory); }, afterEach: function() { - labelModule.Label = originalLabel; + labelModule.DEBUG_set_Label(originalLabel); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/pieSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/pieSeries.tests.js index 8fc75f54cf79..585a858f3a20 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/pieSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/pieSeries.tests.js @@ -6,6 +6,7 @@ import { noop } from 'core/utils/common'; import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import SeriesModule from 'viz/series/base_series'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -78,7 +79,7 @@ const environment = { beforeEach: function() { this.data = [{ arg: 1, val: 10 }, { arg: 2, val: 20 }, { arg: 3, val: 30 }, { arg: 4, val: 40 }]; let mockPointIndex = 0; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(series, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series, data) { const stub = mockPoints[mockPointIndex++]; stub.argument = data.argument || 1; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/polarPoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/polarPoint.tests.js index e6cbb4c97fd5..00459e50d36b 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/polarPoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/polarPoint.tests.js @@ -5,6 +5,7 @@ import { import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import SeriesModule from 'viz/series/base_series'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -61,7 +62,7 @@ const environment = { series._argumentChecker.returns(true); series._valueChecker.returns(true); - this.createLabel = sinon.stub(labelModule, 'Label').callsFake(function() { + this.createLabel = stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { label.getBoundingRect.returns({ x: 1, y: 2, width: 20, height: 10 }); label.getLayoutOptions.returns({ alignment: 'center', radialOffset: 0 }); resetStub(label); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangePoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangePoint.tests.js index 434d377fb08a..54ad00fca54f 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangePoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangePoint.tests.js @@ -7,6 +7,7 @@ import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import { MockTranslator, MockAxis } from '../../helpers/chartMocks.js'; import tooltipModule from 'viz/core/tooltip'; +import { spySeam } from '../../helpers/moduleSeam.js'; const originalLabel = labelModule.Label; @@ -71,12 +72,13 @@ const environment = { attributes: {} } }; - this.labelFactory = labelModule.Label = sinon.spy(function() { + this.labelFactory = sinon.spy(function() { const label = sinon.createStubInstance(originalLabel); label.getLayoutOptions.returns(that.options.label); label.getBoundingRect.returns({ height: 10, width: 20 }); return label; }); + labelModule.DEBUG_set_Label(this.labelFactory); this.series = { name: 'series', _labelsGroup: {}, @@ -92,7 +94,7 @@ const environment = { }; }, afterEach: function() { - labelModule.Label = originalLabel; + labelModule.DEBUG_set_Label(originalLabel); } }; @@ -2129,7 +2131,7 @@ QUnit.module('API', { _argumentChecker: function() { return true; }, _valueChecker: function() { return true; } }; - sinon.spy(labelModule, 'Label'); + spySeam(labelModule, 'Label', 'DEBUG_set_Label'); this.translators = { arg: new MockTranslator({ diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangeSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangeSeries.tests.js index 6423c169a150..23ea6787513b 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangeSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/rangeSeries.tests.js @@ -6,6 +6,7 @@ import pointModule from 'viz/series/points/base_point'; import SeriesModule from 'viz/series/base_series'; import { MockAxis, insertMockFactory, restoreMockFactory } from '../../helpers/chartMocks.js'; import { noop } from 'core/utils/common'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -79,7 +80,7 @@ const environmentWithSinonStubPoint = { beforeEach: function() { environment.beforeEach.call(this); let mockPointIndex = 0; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(params, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(params, data) { const stub = mockPoints[mockPointIndex++]; stub.argument = 1; stub.hasValue.returns(true); @@ -181,7 +182,7 @@ const environmentWithSinonStubPoint = { QUnit.module('RangeSeries. API', { beforeEach: function() { environment.beforeEach.call(this); - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); @@ -339,7 +340,7 @@ const environmentWithSinonStubPoint = { this.options = { type: 'rangearea' }; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function() { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function() { const stub = sinon.createStubInstance(originalPoint); stub.argument = 1; stub.hasValue.returns(true); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/scatterSeries.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/scatterSeries.tests.js index b0ebdb1172b8..99d40b13daea 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/scatterSeries.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/scatterSeries.tests.js @@ -7,6 +7,7 @@ import pointModule from 'viz/series/points/base_point'; import labelModule from 'viz/series/points/label'; import SeriesModule from 'viz/series/base_series'; import { insertMockFactory, MockAxis, restoreMockFactory } from '../../helpers/chartMocks.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const Series = SeriesModule.Series; @@ -85,7 +86,7 @@ const environment = { this.renderer = new Renderer(); this.seriesGroup = this.renderer.g(); this.data = [{ arg: 1, val: 10 }, { arg: 2, val: 20 }, { arg: 3, val: 30 }, { arg: 4, val: 40 }]; - this.createPoint = sinon.stub(pointModule, 'Point').callsFake(function(series, data) { + this.createPoint = stubSeam(pointModule, 'Point', 'DEBUG_set_Point').callsFake(function(series, data) { const stub = mockPoints[mockPointIndex++]; data = data || {}; stub.argument = data.argument || 1; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core.series/symbolPoint.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core.series/symbolPoint.tests.js index fcda018b09c2..36cbe03cc342 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core.series/symbolPoint.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core.series/symbolPoint.tests.js @@ -33,9 +33,10 @@ const environment = { return !this.draw.calledWith(false); }); - this.labelFactory = labelModule.Label = sinon.spy(function() { + this.labelFactory = sinon.spy(function() { return that.label; }); + labelModule.DEBUG_set_Label(this.labelFactory); this.options = { widgetType: 'chart', visible: true, @@ -71,7 +72,7 @@ const environment = { }; }, afterEach: function() { - labelModule.Label = originalLabel; + labelModule.DEBUG_set_Label(originalLabel); } }; const translateXData = { 'canvas_position_default': 'x0', 1: 'x1', 2: 'x2', 3: 'x3', 4: 'x4', 5: 'x5' }; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/annotations.plugins.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/annotations.plugins.tests.js index 4651ac45599d..edc6f85f9664 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/annotations.plugins.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/annotations.plugins.tests.js @@ -896,7 +896,7 @@ QUnit.test('Get coordinates using argument and location `edge`', function(assert QUnit.module('Lifecycle', { beforeEach() { this.renderer = new Renderer(); - rendererModule.Renderer = sinon.spy(() => this.renderer); + rendererModule.DEBUG_set_Renderer(sinon.spy(() => this.renderer)); this.createAnnotationStub = sinon.stub().returns([{ draw: sinon.spy(), plaque: { clear: sinon.spy() } }]); __test_utils.stub_createAnnotations(this.createAnnotationStub); @@ -1289,16 +1289,16 @@ QUnit.module('Lifecycle', { const environment = { beforeEach() { this.renderer = new Renderer(); - rendererModule.Renderer = sinon.spy(() => this.renderer); + rendererModule.DEBUG_set_Renderer(sinon.spy(() => this.renderer)); - TooltipModule.Tooltip = sinon.spy((options) => { + TooltipModule.DEBUG_set_tooltip(sinon.spy((options) => { this.tooltip = new Tooltip(options); this.tooltip.show = sinon.stub().returns(true); this.tooltip.hide = sinon.spy(); this.tooltip.move = sinon.spy(); this.tooltip.isCursorOnTooltip = sinon.stub().returns(false); return this.tooltip; - }); + })); }, createChart(options) { const chart = $('
').appendTo('#qunit-fixture').dxChart($.extend(true, { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/axesTicksGeneration.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/axesTicksGeneration.tests.js index 4ebb6c9dc17f..84f02146c2b7 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/axesTicksGeneration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/axesTicksGeneration.tests.js @@ -9,6 +9,7 @@ import { import { Axis } from 'viz/axes/base_axis'; import translator2DModule from 'viz/translators/translator2d'; import { Range } from 'viz/translators/range'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const StubTranslator = stubClass(translator2DModule.Translator2D, { updateBusinessRange: function(range) { @@ -29,7 +30,7 @@ function getArray(len, content) { const environment = { beforeEach: function() { const that = this; - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); this.renderer = new Renderer(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/axisDrawing.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/axisDrawing.tests.js index 5a818a865b72..cec3cac77391 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/axisDrawing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/axisDrawing.tests.js @@ -1,14 +1,17 @@ import $ from 'jquery'; -import { ERROR_MESSAGES as dxErrors } from 'viz/core/errors_warnings'; +import errorsWarnings from 'viz/core/errors_warnings'; import translator2DModule from 'viz/translators/translator2d'; import { Range } from 'viz/translators/range'; import tickGeneratorModule from 'viz/axes/tick_generator'; import { Axis } from 'viz/axes/base_axis'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import { Renderer, stubClass, } from '../../helpers/vizMocks.js'; +const dxErrors = errorsWarnings.ERROR_MESSAGES; + const StubTranslator = stubClass(translator2DModule.Translator2D, { updateBusinessRange: function(range) { this.getBusinessRange.returns(range); @@ -44,12 +47,12 @@ const environment = { }; const that = this; - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); this.renderer = new Renderer(); - this.tickGenerator = sinon.stub(tickGeneratorModule, 'tickGenerator').callsFake(function() { + this.tickGenerator = stubSeam(tickGeneratorModule, 'tickGenerator', 'DEBUG_set_tickGenerator').callsFake(function() { return function() { return { ticks: that.generatedTicks || [], diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/axisFormatting.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/axisFormatting.tests.js index 7138b4ecfdec..51da67218c09 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/axisFormatting.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/axisFormatting.tests.js @@ -4,6 +4,7 @@ import translator2DModule from 'viz/translators/translator2d'; import { Range } from 'viz/translators/range'; import tickGeneratorModule from 'viz/axes/tick_generator'; import { Axis } from 'viz/axes/base_axis'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import { Renderer, stubClass, @@ -41,12 +42,12 @@ const environment = { }; const that = this; - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); this.renderer = new Renderer(); - this.tickGenerator = sinon.stub(tickGeneratorModule, 'tickGenerator').callsFake(function() { + this.tickGenerator = stubSeam(tickGeneratorModule, 'tickGenerator', 'DEBUG_set_tickGenerator').callsFake(function() { return function() { return { ticks: that.generatedTicks || [], diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/baseAxis.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/baseAxis.tests.js index 344d26c1edce..898cd12ed372 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/baseAxis.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/baseAxis.tests.js @@ -10,6 +10,7 @@ import translator2DModule from 'viz/translators/translator2d'; import { Range } from 'viz/translators/range'; import xyMethods from '__internal/viz/axes/xy_axes'; import { isFunction, isDeferred } from 'core/utils/type'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; const StubTranslator = stubClass(translator2DModule.Translator2D, { updateBusinessRange: function(range) { @@ -29,7 +30,7 @@ const environment = { tickInterval: that.generatedTickInterval }; }); - this.tickGenerator = sinon.stub(tickGeneratorModule, 'tickGenerator').callsFake(function() { + this.tickGenerator = stubSeam(tickGeneratorModule, 'tickGenerator', 'DEBUG_set_tickGenerator').callsFake(function() { return that.tickGeneratorSpy; }); @@ -175,7 +176,7 @@ QUnit.module('API', { beforeEach: function() { const that = this; - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); environment.beforeEach.call(this); @@ -1195,7 +1196,7 @@ QUnit.test('Validate visualRange, option is set', function(assert) { QUnit.module('Zoom', { beforeEach: function() { const that = this; - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); @@ -1698,7 +1699,7 @@ QUnit.test('Get visualRange. visualRange is defined', function(assert) { const dataMarginsEnvironment = { beforeEach: function() { - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); environment.beforeEach.call(this); @@ -3597,7 +3598,7 @@ QUnit.test('Do not correct zero level if max > 0', function(assert) { QUnit.module('Set business range', { beforeEach: function() { environment.beforeEach.call(this); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); this.axis = new Axis({ renderer: this.renderer, @@ -4442,7 +4443,7 @@ QUnit.test('Logarithmic axis. Do not allowNegatives if option is not set and min QUnit.module('Set business range. Value axis', { beforeEach: function() { environment.beforeEach.call(this); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); this.axis = new Axis({ renderer: this.renderer, @@ -4608,7 +4609,7 @@ QUnit.test('Value axis ignores visual range on update option', function(assert) QUnit.module('Visual range on update. Argument axis', { beforeEach: function() { environment.beforeEach.call(this); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); this.axis = new Axis({ renderer: this.renderer, @@ -4992,7 +4993,7 @@ QUnit.test('Auto. Discrete axis - reset if visualRange consist of all old catego QUnit.module('Get scroll bounds', { beforeEach: function() { environment.beforeEach.call(this); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); this.axis = new Axis({ renderer: this.renderer, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/baseThemeManager.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/baseThemeManager.tests.js index 3ed3e29c14cd..850c89478d2d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/baseThemeManager.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/baseThemeManager.tests.js @@ -2,6 +2,7 @@ import $ from 'jquery'; import themeModule from 'viz/themes'; import { BaseThemeManager } from 'viz/core/base_theme_manager'; import paletteModule from '__internal/viz/paletteModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const currentTheme = themeModule.currentTheme(); @@ -34,9 +35,9 @@ const environment = { this.themeManager = new BaseThemeManager({ fontFields: [] }); this.callback = sinon.spy(); this.themeManager.setCallback(this.callback); - this.createPalette = sinon.stub(paletteModule, 'createPalette'); - this.getDiscretePalette = sinon.stub(paletteModule, 'getDiscretePalette'); - this.getAccentColor = sinon.stub(paletteModule, 'getAccentColor'); + this.createPalette = stubSeam(paletteModule, 'createPalette', 'DEBUG_set_createPalette'); + this.getDiscretePalette = stubSeam(paletteModule, 'getDiscretePalette', 'DEBUG_set_getDiscretePalette'); + this.getAccentColor = stubSeam(paletteModule, 'getAccentColor', 'DEBUG_set_getAccentColor'); }, afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js index 9acf3a6812df..438481f779ec 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/baseWidget.tests.js @@ -12,6 +12,7 @@ import BaseWidget from '__internal/viz/core/base_widget'; import { DEBUG_createEventTrigger, DEBUG_createResizeHandler } from '__internal/viz/core/base_widget.utils'; import { BaseThemeManager } from 'viz/core/base_theme_manager'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import { stubClass, environmentMethodInvoker, LoadingIndicator, Renderer, Title } from '../../helpers/vizMocks.js'; import { implementationsMap } from 'core/utils/size'; @@ -54,7 +55,7 @@ QUnit.begin(function() { registerComponent('dxBaseWidgetTester', dxBaseWidgetTester); - sinon.stub(rendererModule, 'Renderer').callsFake(function() { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { return currentTest().renderer; }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/export.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/export.integration.tests.js index 7f974ef2aef4..90e8cd06303d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/export.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/export.integration.tests.js @@ -2,7 +2,8 @@ import '__internal/viz/tree_map/tree_map'; import $ from 'jquery'; import { Renderer, ExportMenu } from '../../helpers/vizMocks.js'; import rendererModule from 'viz/core/renderers/renderer_default'; -import clientExporter from 'exporter'; +import * as clientExporter from 'exporter'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import exportModule from '__internal/viz/core/exportModule'; import { Deferred } from 'core/utils/deferred'; import { logger } from 'core/utils/console'; @@ -22,14 +23,14 @@ QUnit.module('Export', { beforeEach: function() { this.$container = $('#test-container'); const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { + rendererModule.DEBUG_set_Renderer(function() { return renderer; - }; + }); const exportMenu = this.exportMenu = new ExportMenu(); exportModule.DEBUG_set_ExportMenu(sinon.spy(function() { return exportMenu; })); - sinon.stub(clientExporter, 'export').returns(new Deferred()); + stubSeam(clientExporter, 'export').returns(new Deferred()); this.toDataURLStub = sinon.stub(window.HTMLCanvasElement.prototype, 'toDataURL'); this.toDataURLStub.returnsArg(0); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/export.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/export.tests.js index 15ce7e3c2c38..a745f3048761 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/export.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/export.tests.js @@ -2,7 +2,8 @@ import $ from 'jquery'; import { Renderer } from '../../helpers/vizMocks.js'; import exportModule from '__internal/viz/core/exportModule'; import themeModule from 'viz/themes'; -import clientExporter from 'exporter'; +import * as clientExporter from 'exporter'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import localization from 'localization'; const combineMarkupsOrig = exportModule.combineMarkups; @@ -559,7 +560,7 @@ QUnit.test('Combine widgets markups (combineMarkups) in grid layout with bottom- QUnit.module('API. Export methods', { beforeEach: function() { - sinon.stub(clientExporter, 'export'); + stubSeam(clientExporter, 'export'); this.toDataURLStub = sinon.stub(window.HTMLCanvasElement.prototype, 'toDataURL'); this.toDataURLStub.returnsArg(0); }, @@ -828,7 +829,7 @@ QUnit.module('API', { this.renderer = new Renderer(); this.incidentOccurred = sinon.spy(); - sinon.stub(clientExporter, 'export'); + stubSeam(clientExporter, 'export'); this.options = { printingEnabled: true, formats: ['JPEG'], @@ -1055,7 +1056,7 @@ QUnit.module('Events', { this.renderer = new Renderer(); this.incidentOccurred = sinon.spy(); - sinon.stub(clientExporter, 'export'); + stubSeam(clientExporter, 'export'); this.options = { enabled: true, @@ -1365,7 +1366,7 @@ QUnit.module('Layout', { this.renderer = new Renderer(); this.incidentOccurred = sinon.spy(); - sinon.stub(clientExporter, 'export'); + stubSeam(clientExporter, 'export'); this.options = { enabled: true, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/legend.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/legend.tests.js index 055dfdbe8026..1927e8eb96da 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/legend.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/legend.tests.js @@ -2215,7 +2215,7 @@ const titleEnvironment = $.extend({}, environment, { const titleConstructor = module.Title; that.titleLayout = { height: 17, width: 20, x: 4, y: 5 }; - module.Title = function(params) { + module.DEBUG_set_title(function(params) { that.title = new titleConstructor(params); that.title.getLayoutOptions = sinon.stub(); @@ -2231,7 +2231,7 @@ const titleEnvironment = $.extend({}, environment, { that.title.shift = sinon.spy(); return that.title; - }; + }); that.themeManagerTitleOptions = { backgroundColor: '#ffffff', diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/polarAxes.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/polarAxes.tests.js index 7d035cb017b9..0db79c4ec9e0 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/polarAxes.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/polarAxes.tests.js @@ -8,6 +8,7 @@ import tickGeneratorModule from 'viz/axes/tick_generator'; import rangeModule from 'viz/translators/range'; import { Axis } from 'viz/axes/base_axis'; import { extend } from 'core/utils/extend'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; const TranslatorStubCtor = new ObjectPool(translator2DModule.Translator2D); const RangeStubCtor = new ObjectPool(rangeModule.Range); @@ -31,7 +32,7 @@ const environment = { this.renderer = new Renderer(); - this.tickGenerator = sinon.stub(tickGeneratorModule, 'tickGenerator').callsFake(function() { + this.tickGenerator = stubSeam(tickGeneratorModule, 'tickGenerator', 'DEBUG_set_tickGenerator').callsFake(function() { return sinon.spy(function() { return { ticks: that.generatedTicks || [], @@ -95,7 +96,7 @@ const environment = { br.isEmpty.returns(true); this.translator.getBusinessRange.returns(br); - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); }, @@ -139,7 +140,7 @@ QUnit.module('Translators in axis', { beforeEach: function() { environment.beforeEach.call(this); translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); }, afterEach: function() { environment.afterEach.call(this); @@ -2230,7 +2231,7 @@ QUnit.module('Circular axis. Margins', $.extend({}, environment, { environment.beforeEach.call(this); translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); $.extend(this.renderSettings, { axisType: 'polarAxes', @@ -2328,7 +2329,7 @@ QUnit.module('Linear axis. Margins', $.extend({}, environment, { environment.beforeEach.call(this); translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); $.extend(this.renderSettings, { axisType: 'polarAxes', diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/tooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/tooltip.tests.js index de756462d436..aeef5b01833c 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/tooltip.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/tooltip.tests.js @@ -56,11 +56,11 @@ function getInitialOptions() { }; } -rendererModule.Renderer = function(parameters) { +rendererModule.DEBUG_set_Renderer(function(parameters) { const renderer = new Renderer(parameters); currentTest().renderer = renderer; return renderer; -}; +}); QUnit.module('Main functionality', { beforeEach: function() { @@ -68,10 +68,10 @@ QUnit.module('Main functionality', { this._oldPatchFontOptions = vizUtils.patchFontOptions; this.patchFontOptions = sinon.spy(function() { return this._oldPatchFontOptions.apply(null, arguments); }.bind(this)); - vizUtils.patchFontOptions = this.patchFontOptions; + vizUtils.DEBUG_set_patchFontOptions(this.patchFontOptions); }, afterEach: function() { - vizUtils.patchFontOptions = this._oldPatchFontOptions; + vizUtils.DEBUG_set_patchFontOptions(this._oldPatchFontOptions); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.core/xyAxes.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.core/xyAxes.tests.js index ddee7066bde7..561c72f18776 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.core/xyAxes.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.core/xyAxes.tests.js @@ -9,6 +9,7 @@ import rangeModule from 'viz/translators/range'; import { Axis } from 'viz/axes/base_axis'; import { MockSeries } from '../../helpers/chartMocks.js'; import { patchFontOptions } from 'viz/core/utils'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; const Translator2D = translator2DModule.Translator2D; @@ -45,11 +46,11 @@ const environment = { breaks: breaks }; }); - this.tickGenerator = sinon.stub(tickGeneratorModule, 'tickGenerator').callsFake(function() { + this.tickGenerator = stubSeam(tickGeneratorModule, 'tickGenerator', 'DEBUG_set_tickGenerator').callsFake(function() { return that.tickGeneratorSpy; }); - sinon.stub(translator2DModule, 'Translator2D').callsFake(function() { + stubSeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D').callsFake(function() { return that.translator; }); @@ -208,7 +209,7 @@ QUnit.module('Translators in axis', { beforeEach: function() { environment.beforeEach.call(this); translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); }, afterEach: function() { environment.afterEach.call(this); @@ -4377,7 +4378,7 @@ QUnit.module('XY axes margin calculation', { environment.beforeEach.call(this); translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); this.canvas = { top: 200, @@ -5084,7 +5085,7 @@ QUnit.module('Custom positioning', { }; translator2DModule.Translator2D.restore(); - sinon.spy(translator2DModule, 'Translator2D'); + spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); }, afterEach: function() { environment.afterEach.call(this); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/common.js b/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/common.js index b8176f837f89..b323705b352c 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/common.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/common.js @@ -3,6 +3,7 @@ import { Renderer } from '../../../helpers/vizMocks.js'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import * as tiling from '__internal/viz/funnel/tiling'; import '__internal/viz/funnel/funnel'; @@ -44,7 +45,7 @@ export const environment = { this.itemGroupNumber = 0; - sinon.stub(rendererModule, 'Renderer').callsFake(function() { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { return that.renderer; }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/label.js b/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/label.js index f2090e457b63..8eb284de2244 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/label.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.funnel/commonParts/label.js @@ -2,10 +2,11 @@ import $ from 'jquery'; import { environment, stubAlgorithm } from './common.js'; import labelModule from 'viz/series/points/label'; import { - stubClass + stubClass, } from '../../../helpers/vizMocks.js'; import * as labels from '__internal/viz/funnel/label'; import dxFunnel from '__internal/viz/funnel/funnel'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; const Label = labelModule.Label; const stubLabel = stubClass(Label); @@ -34,7 +35,7 @@ export const labelEnvironment = $.extend({}, environment, { const that = this; - sinon.stub(labelModule, 'Label').callsFake(function() { + stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { const stub = new stubLabel(); stub.stub('isVisible').returns(true); stub.stub('getBoundingRect').returns(that.labelBoxes[(labelBoxesIndex++) % that.labelBoxes.length]); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.base.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.base.tests.js index 1082fd01539c..5b44ef929e8f 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.base.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.base.tests.js @@ -1,9 +1,10 @@ import $ from 'jquery'; import { createFunnel, environment, stubAlgorithm } from './commonParts/common.js'; -import rendererModule from 'viz/core/renderers/renderer'; +import rendererModule from 'viz/core/renderers/renderer_default'; import paletteModule from '__internal/viz/paletteModule'; import themeModule from 'viz/themes'; +import { spySeam } from '../../helpers/moduleSeam.js'; themeModule.registerTheme({ name: 'test-theme', @@ -271,7 +272,7 @@ QUnit.test('Resize', function(assert) { }); QUnit.test('palette', function(assert) { - sinon.spy(paletteModule, 'createPalette'); + spySeam(paletteModule, 'createPalette', 'DEBUG_set_createPalette'); stubAlgorithm.normalizeValues.returns([1, 1]); stubAlgorithm.getFigures.returns([ @@ -452,7 +453,7 @@ QUnit.test('Update inverted option', function(assert) { }); QUnit.test('Update palette', function(assert) { - sinon.spy(paletteModule, 'createPalette'); + spySeam(paletteModule, 'createPalette', 'DEBUG_set_createPalette'); stubAlgorithm.normalizeValues.returns([1, 1]); stubAlgorithm.getFigures.returns([ diff --git a/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.tracker.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.tracker.tests.js index e7a9d31d308d..966ee647702e 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.tracker.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.funnel/funnel.tracker.tests.js @@ -8,6 +8,7 @@ import legendModule from 'viz/components/legend'; import { createFunnel, environment } from './commonParts/common.js'; import labelModule from 'viz/series/points/label'; import { stubClass } from '../../helpers/vizMocks.js'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const stubLabel = stubClass(labelModule.Label); const stubLegend = stubClass(legendModule.Legend); @@ -28,7 +29,7 @@ const trackerEnvironment = $.extend({}, environment, { const that = this; environment.beforeEach.apply(this); this.legend = new stubLegend(); - sinon.stub(labelModule, 'Label').callsFake(function() { + stubSeam(labelModule, 'Label', 'DEBUG_set_Label').callsFake(function() { const stub = new stubLabel(); stub.stub('getBoundingRect').returns({ width: 0, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge.tests.js index 6f4bb5c49201..0858624beb52 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge.tests.js @@ -24,7 +24,7 @@ const { BarWrapper, stubBarWrapper, restoreBarWrapper } = barGaugeModule; $('
').appendTo('#qunit-fixture'); let renderer; QUnit.begin(function() { - rendererModule.Renderer = sinon.spy(function() { + rendererModule.DEBUG_set_Renderer(sinon.spy(function() { const test = currentTest(); test.renderer = renderer || new Renderer(); test.renderer.g = sinon.spy(function() { @@ -61,12 +61,21 @@ QUnit.begin(function() { step(1); that.animationStep && that.animationStep(1); complete(); - that.animationComplete && that.animationComplete(); + // Drop the hook before calling it — overlapping animate() + // chains (or a second completion after done()) must not + // re-enter assert.async() under native ESM scheduling. + const onGroupComplete = that.animationComplete; + that.animationComplete = null; + onGroupComplete && onGroupComplete(); test.renderer.animationCompleted && test.renderer.animationCompleted(); } } if(arguments[1] && typeof arguments[1].step === 'function') { + // Real renderer replaces the in-flight animation; without this, + // a second animate() leaves an orphan setTimeout chain and + // animationComplete / assert.async() fire twice. + this.stopAnimation(); that = this; step = arguments[1].step; complete = arguments[1].complete || noop; @@ -77,13 +86,14 @@ QUnit.begin(function() { }; group.stopAnimation = function() { clearTimeout(this.__animation); + this.__animation = null; return this; }; return group; }); return test.renderer; - }); + })); titleModule.DEBUG_set_title(sinon.spy(function() { const title = new Title(); title.getLayoutOptions = () => ({ diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge_new.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge_new.tests.js index 167d8682b962..3565c73117cf 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge_new.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/barGauge_new.tests.js @@ -1,5 +1,5 @@ import $ from 'jquery'; -import legendModule, { Legend } from 'viz/components/legend'; +import legendModule from 'viz/components/legend'; import { Renderer, Title, @@ -8,6 +8,7 @@ import { stubClass } from '../../helpers/vizMocks.js'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import titleModule from 'viz/core/title'; import tooltipModule from 'viz/core/tooltip'; import loadingIndicatorModule from 'viz/core/loading_indicator'; @@ -15,11 +16,13 @@ import dxBarGauge from 'viz/bar_gauge'; import '__internal/viz/gauges/bar_gauge'; +const { Legend } = legendModule; + const environment = { beforeEach() { this.renderer = new Renderer(); - sinon.stub(rendererModule, 'Renderer').callsFake(() => { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(() => { return this.renderer; }); }, @@ -47,13 +50,13 @@ $('
') const _LoadingIndicator = loadingIndicatorModule.LoadingIndicator; titleModule.DEBUG_set_title(Title); -tooltipModule.Tooltip = Tooltip; +tooltipModule.DEBUG_set_tooltip(Tooltip); loadingIndicatorModule.DEBUG_set_LoadingIndicator(LoadingIndicator); QUnit.module('Misc', { beforeEach: function() { const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { return renderer; }; + rendererModule.DEBUG_set_Renderer(function() { return renderer; }); }, create: function(options) { @@ -169,7 +172,7 @@ QUnit.module('Legend', { beforeEach() { this.renderer = new Renderer(); - sinon.stub(rendererModule, 'Renderer').callsFake(() => { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(() => { return this.renderer; }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/baseGauge.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/baseGauge.tests.js index 4ee430fb18e3..1e8f6a2df266 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/baseGauge.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/baseGauge.tests.js @@ -52,9 +52,9 @@ $.each(ABSTRACT_METHODS, function(_, name) { BaseGauge.prototype[name] = sinon.stub(); }); -rendererModule.Renderer = sinon.spy(function() { +rendererModule.DEBUG_set_Renderer(sinon.spy(function() { return currentTest().renderer; -}); +})); themeManagerModule.ThemeManager = sinon.spy(function() { return currentTest().themeManager; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/circularGauge.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/circularGauge.tests.js index 7aa45225f2d6..d173e86d006a 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/circularGauge.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/circularGauge.tests.js @@ -8,6 +8,7 @@ import { import dxCircularGauge from 'viz/circular_gauge'; import axisModule from 'viz/axes/base_axis'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const factory = dxCircularGauge.prototype._factory; @@ -105,9 +106,9 @@ class TestPointerElement extends TestElement { } (function circularGauge() { - rendererModule.Renderer = sinon.stub(); + rendererModule.DEBUG_set_Renderer(sinon.stub()); - sinon.stub(axisModule, 'Axis').callsFake(function(parameters) { + stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function(parameters) { const axis = new Axis(parameters); axis.measureLabels = sinon.stub().returns({ width: 30, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/common.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/common.tests.js index f17fb9d6541c..1dfb91b51612 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/common.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/common.tests.js @@ -24,12 +24,13 @@ import rangeModule from 'viz/translators/range'; import translator1DModule from 'viz/translators/translator1d'; import rendererModule from 'viz/core/renderers/renderer_default'; import themeManagerModule from '__internal/viz/gauges/theme_manager'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const stubRange = stubClass(rangeModule.Range); $('
').appendTo('#qunit-fixture'); -sinon.stub(rangeModule, 'Range').callsFake(function(parameters) { +stubSeam(rangeModule, 'Range', 'DEBUG_set_Range').callsFake(function(parameters) { return new stubRange(parameters); }); @@ -80,11 +81,11 @@ const factory = dxTestGauge.prototype._factory = objectUtils.clone(dxGauge.proto registerComponent('dxTestGauge', dxTestGauge); const StubTooltip = Tooltip; -tooltipModule.Tooltip = function(parameters) { +tooltipModule.DEBUG_set_tooltip(function(parameters) { return new StubTooltip(parameters); -}; +}); -sinon.stub(axisModule, 'Axis').callsFake(function(parameters) { +stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function(parameters) { return new Axis(parameters); }); @@ -181,7 +182,7 @@ loadingIndicatorModule.DEBUG_set_LoadingIndicator(function(parameters) { return new LoadingIndicator(parameters); }); -sinon.stub(rendererModule, 'Renderer').callsFake(function() { +stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { return currentTest().renderer; }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js index d04bbcc54d8f..92025d3131fa 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js @@ -5,6 +5,7 @@ import { Axis as VizMocksAxis, Renderer as VizMocksRenderer } from '../../helper import dxLinearGauge from 'viz/linear_gauge'; import axisModule from 'viz/axes/base_axis'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const factory = dxLinearGauge.prototype._factory; @@ -100,9 +101,9 @@ class TestPointerElement extends TestElement { } (function linearGauge() { - rendererModule.Renderer = sinon.stub(); + rendererModule.DEBUG_set_Renderer(sinon.stub()); - sinon.stub(axisModule, 'Axis').callsFake(function(parameters) { + stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function(parameters) { const axis = new VizMocksAxis(parameters); axis.measureLabels = sinon.stub().returns({ width: 30, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part1.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part1.tests.js index 3ecc2744688f..3891b97818c0 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part1.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part1.tests.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import trackerModule from 'viz/range_selector/tracker'; +import { spySeam } from '../../helpers/moduleSeam.js'; import { DataSource } from 'common/data/data_source/data_source'; import seriesDataSourceModule from 'viz/range_selector/series_data_source'; import { @@ -196,7 +197,7 @@ QUnit.test('correct sliders place holder size by values', function(assert) { }); QUnit.test('Tracker creation', function(assert) { - const spy = sinon.spy(trackerModule, 'Tracker'); + const spy = spySeam(trackerModule, 'Tracker', 'DEBUG_set_Tracker'); this.createWidget(); assert.deepEqual(spy.lastCall.args, [{ renderer: this.renderer, controller: this.slidersController }]); @@ -261,7 +262,7 @@ QUnit.test('dataSource is loaded', function(assert) { }); QUnit.test('Update axis canvas before create series dataSorce', function(assert) { - const spy = sinon.spy(seriesDataSourceModule, 'SeriesDataSource'); + const spy = spySeam(seriesDataSourceModule, 'SeriesDataSource', 'DEBUG_set_SeriesDataSource'); this.seriesDataSource.stub('getBoundRange').returns({ arg: new StubRange(), val: new StubRange() @@ -379,7 +380,7 @@ QUnit.test('scale. not valid logarithmBase, string', function(assert) { }); QUnit.test('valueAxis. logarithmic type', function(assert) { - const spy = sinon.spy(seriesDataSourceModule, 'SeriesDataSource'); + const spy = spySeam(seriesDataSourceModule, 'SeriesDataSource', 'DEBUG_set_SeriesDataSource'); this.seriesDataSource.stub('getBoundRange').returns({ arg: new StubRange(), val: new StubRange() @@ -400,7 +401,7 @@ QUnit.test('valueAxis. logarithmic type', function(assert) { }); QUnit.test('valueAxis. not valid logarithmBase', function(assert) { - const spy = sinon.spy(seriesDataSourceModule, 'SeriesDataSource'); + const spy = spySeam(seriesDataSourceModule, 'SeriesDataSource', 'DEBUG_set_SeriesDataSource'); this.seriesDataSource.stub('isShowChart').returns(true); this.seriesDataSource.stub('getBoundRange').returns({ arg: new StubRange(), diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part2.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part2.tests.js index fd2ddaa1be90..1aeaabbf35b1 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part2.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part2.tests.js @@ -56,10 +56,10 @@ const environmentWithDataSource = $.extend({}, environment, { beforeEach: function() { environment.beforeEach.apply(this, arguments); const test = this; - seriesDataSourceModule.SeriesDataSource = function(params) { + seriesDataSourceModule.DEBUG_set_SeriesDataSource(function(params) { test.seriesDataSource = new _SeriesDataSource(params); return test.seriesDataSource; - }; + }); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js index 34f401fc6702..6b0d5fe5bad7 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common.part3.tests.js @@ -8,6 +8,7 @@ import { StubRange, } from './rangeSelectorParts/commons.js'; import slidersControllerModule from 'viz/range_selector/sliders_controller'; +import { spySeam } from '../../helpers/moduleSeam.js'; import seriesDataSourceModule from 'viz/range_selector/series_data_source'; import { DataSource } from 'common/data/data_source/data_source'; import dateLocalization from 'common/core/localization/date'; @@ -23,7 +24,7 @@ const formatsAreEqual = function(format1, format2) { QUnit.module('Parsing data', $.extend({}, environment, { beforeEach: function() { environment.beforeEach.apply(this, arguments); - seriesDataSourceModule.SeriesDataSource = _SeriesDataSource; + seriesDataSourceModule.DEBUG_set_SeriesDataSource(_SeriesDataSource); this.dataSource = [ { x: '10', y1: 0, y2: 10 }, { x: '15', y1: 6, y2: 12 }, @@ -400,7 +401,7 @@ QUnit.test('rangeSelector with scale.valueType and dataSourceField and without c QUnit.module('Semidiscrete scale', $.extend({}, environment, { beforeEach: function() { environment.beforeEach.apply(this, arguments); - seriesDataSourceModule.SeriesDataSource = _SeriesDataSource; + seriesDataSourceModule.DEBUG_set_SeriesDataSource(_SeriesDataSource); this.$container.width(1000); } @@ -1299,7 +1300,7 @@ QUnit.test('T214998. scale multi-line text label', function(assert) { }); QUnit.test('range selectedRangeChanged initialization', function(assert) { - const spy = sinon.spy(slidersControllerModule, 'SlidersController'); + const spy = spySeam(slidersControllerModule, 'SlidersController', 'DEBUG_set_SlidersController'); this.createWidget(); assert.strictEqual(typeof spy.lastCall.args[0].updateSelectedRange, 'function'); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common_new.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common_new.tests.js index 6eb75b4446ea..e53b49d267dd 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common_new.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/common_new.tests.js @@ -7,6 +7,7 @@ import rendererModule from 'viz/core/renderers/renderer_default'; import axisModule from 'viz/axes/base_axis'; import translator2DModule from 'viz/translators/translator2d'; import '__internal/viz/range_selector/range_selector'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const StubAxis = stubClass(axisModule.Axis); @@ -27,10 +28,10 @@ QUnit.module('RangeSelector', { const that = this; this.$container = $('#test-container'); const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { return renderer; }; + rendererModule.DEBUG_set_Renderer(function() { return renderer; }); this.axis = new StubAxis(); this.axis.stub('getVisibleArea').returns([]); - sinon.stub(axisModule, 'Axis').callsFake(function() { + stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis').callsFake(function() { return that.axis; }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeSelectorParts/commons.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeSelectorParts/commons.js index e2d9825cb24c..8cc8190597fe 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeSelectorParts/commons.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeSelectorParts/commons.js @@ -16,6 +16,7 @@ import { Renderer, } from '../../../helpers/vizMocks.js'; import '__internal/viz/range_selector/range_selector'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; const StubThemeManager = stubClass(themeManagerModule.BaseThemeManager); const StubRangeView = stubClass(rangeViewModule.RangeView); @@ -75,15 +76,15 @@ export const environment = { this.axis.calculateInterval = function(a, b) { return a - b; }; this.seriesDataSource = new StubSeriesDataSource(); - rendererModule.Renderer = returnValue(this.renderer); - themeManagerModule.BaseThemeManager = returnValue(this.themeManager); - rangeViewModule.RangeView = returnValue(this.rangeView); - slidersControllerModule.SlidersController = returnValue(this.slidersController); - trackerModule.Tracker = returnValue(this.tracker); - seriesDataSourceModule.SeriesDataSource = returnValue(this.seriesDataSource); - translator2DModule.Translator2D = returnValue(this.translator); + rendererModule.DEBUG_set_Renderer(returnValue(this.renderer)); + themeManagerModule.DEBUG_set_BaseThemeManager(returnValue(this.themeManager)); + rangeViewModule.DEBUG_set_RangeView(returnValue(this.rangeView)); + slidersControllerModule.DEBUG_set_SlidersController(returnValue(this.slidersController)); + trackerModule.DEBUG_set_Tracker(returnValue(this.tracker)); + seriesDataSourceModule.DEBUG_set_SeriesDataSource(returnValue(this.seriesDataSource)); + translator2DModule.DEBUG_set_Translator2D(returnValue(this.translator)); - sinon.stub(axisModule, 'Axis'); + stubSeam(axisModule, 'Axis', 'DEBUG_set_Axis'); axisModule.Axis.returns(this.axis); }, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeView.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeView.tests.js index 7c09e4d92efb..a78728925ff8 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/rangeView.tests.js @@ -3,6 +3,7 @@ import { Renderer, Element } from '../../helpers/vizMocks.js'; import translator2DModule from 'viz/translators/translator2d'; import rangeViewModule from 'viz/range_selector/range_view'; import { MockAxis } from '../../helpers/chartMocks.js'; +import { spySeam } from '../../helpers/moduleSeam.js'; QUnit.module('RangeView', { beforeEach: function() { @@ -99,7 +100,7 @@ QUnit.test('Chart view', function(assert) { QUnit.test('Chart view is not created because of seriesDataSource', function(assert) { const seriesDataSource = { isShowChart: function() { return false; } }; - const Translator2D = sinon.spy(translator2DModule, 'Translator2D'); + const Translator2D = spySeam(translator2DModule, 'Translator2D', 'DEBUG_set_Translator2D'); try { this.rangeView.update({ color: 'red', image: { url: 'url' } }, { visible: true, image: { location: 'loc' } }, this.canvas, false, 'animation-enabled', seriesDataSource, 'translator'); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/slidersController.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/slidersController.tests.js index 894f6c168aae..45c3daf026a6 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/slidersController.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.rangeSelector/slidersController.tests.js @@ -12,9 +12,9 @@ const environment = { beforeEach: function() { const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { + rendererModule.DEBUG_set_Renderer(function() { return renderer; - }; + }); this.translator = new translator2DModule.Translator2D({}, {}); this.translator.update({ min: 10, max: 30 }, { left: 1000, width: 3000 }, { isHorizontal: true }); this.root = new Element(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js index 31eb6bc37b2a..4a704f9ae1e5 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Animation.tests.js @@ -2,10 +2,11 @@ import $ from 'jquery'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; import commonUtils from 'core/utils/common'; import typeUtils from 'core/utils/type'; import animationModule from 'viz/core/renderers/animation'; -import rendererModule from 'viz/core/renderers/renderer'; +import rendererModule from 'viz/core/renderers/renderer_default'; import { stubClass } from '../../helpers/vizMocks.js'; @@ -49,10 +50,10 @@ import { this.animationController.dispose(); }, mockRequestAnimationFrame: function(callback) { - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake(callback); + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake(callback); }, mockCancelAnimationFrame: function(callback) { - this.cancelAnimationFrameStub = sinon.stub(animationFrame, 'cancelAnimationFrame').callsFake(callback); + this.cancelAnimationFrameStub = stubSeam(animationFrame, 'cancelAnimationFrame', 'DEBUG_set_cancelAnimationFrame').callsFake(callback); } }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Renderer.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Renderer.tests.js index 78cf7bb4d83b..0c6015395584 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.renderers/Renderer.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.renderers/Renderer.tests.js @@ -19,7 +19,7 @@ function getMockElement() { }; } -utils.getNextDefsSvgId = sinon.stub().returns('DevExpressId'); +utils.DEBUG_set_getNextDefsSvgId(sinon.stub().returns('DevExpressId')); QUnit.testDone(function() { renderers.SvgElement.resetHistory && renderers.SvgElement.resetHistory(); @@ -55,7 +55,7 @@ function resetMockElements() { }); } -animationModule.AnimationController = stubClass(animationModule.AnimationController); +animationModule.DEBUG_set_AnimationController(stubClass(animationModule.AnimationController)); const Renderer = renderers.Renderer; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.renderers/SvgElement.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.renderers/SvgElement.tests.js index b86cd6bc5562..18217fde7c8c 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.renderers/SvgElement.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.renderers/SvgElement.tests.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import typeUtils from 'core/utils/type'; -import rendererModule from 'viz/core/renderers/renderer'; +import rendererModule from 'viz/core/renderers/renderer_default'; import coreRenderer from 'core/renderer'; import eventsEngine from 'common/core/events/core/events_engine'; import domAdapter from '__internal/core/m_dom_adapter'; @@ -562,12 +562,11 @@ function checkDashStyle(assert, elem, result, style, value) { this.Element = renderer.SvgElement; - this.jQuery = $; - $ = coreRenderer; + this.$ = coreRenderer; this.eventsEngine = eventsEngine; this.rendererStub = { fake: 'fake', root: { element: document.createElement('div') } }; - this.$emptyStub = sinon.stub($.fn, 'empty'); - this.$removeStub = sinon.stub($.fn, 'remove').callsFake(function() { return this; }); + this.$emptyStub = sinon.stub(this.$.fn, 'empty'); + this.$removeStub = sinon.stub(this.$.fn, 'remove').callsFake(function() { return this; }); this.$onStub = sinon.stub(this.eventsEngine, 'on'); this.$offStub = sinon.stub(this.eventsEngine, 'off'); this.$triggerStub = sinon.stub(this.eventsEngine, 'trigger'); @@ -578,7 +577,6 @@ function checkDashStyle(assert, elem, result, style, value) { this.$onStub.restore(); this.$offStub.restore(); this.$triggerStub.restore(); - $ = this.jQuery; } }); @@ -588,8 +586,8 @@ function checkDashStyle(assert, elem, result, style, value) { const result = elem.clear(); assert.equal(result, elem); - assert.ok($.fn.empty.calledOnce); - assert.equal($.fn.empty.firstCall.thisValue.get(0), $(elem.element).get(0)); + assert.ok(this.$.fn.empty.calledOnce); + assert.equal(this.$.fn.empty.firstCall.thisValue.get(0), this.$(elem.element).get(0)); }); QUnit.test('Disposing', function(assert) { @@ -598,8 +596,8 @@ function checkDashStyle(assert, elem, result, style, value) { const result = elem.dispose(); assert.equal(result, elem); - assert.ok($.fn.remove.calledOnce); - assert.equal($.fn.remove.firstCall.thisValue.get(0), $(elem.element).get(0)); + assert.ok(this.$.fn.remove.calledOnce); + assert.equal(this.$.fn.remove.firstCall.thisValue.get(0), this.$(elem.element).get(0)); }); QUnit.test('On', function(assert) { @@ -610,7 +608,7 @@ function checkDashStyle(assert, elem, result, style, value) { assert.equal(result, elem); assert.ok(this.eventsEngine.on.calledOnce); assert.deepEqual(this.eventsEngine.on.firstCall.args.slice(1), [1, 2, 3, 4]); - assert.equal(this.eventsEngine.on.firstCall.args[0].get(0), $(elem.element).get(0)); + assert.equal(this.eventsEngine.on.firstCall.args[0].get(0), this.$(elem.element).get(0)); }); QUnit.test('Off', function(assert) { @@ -622,7 +620,7 @@ function checkDashStyle(assert, elem, result, style, value) { assert.ok(this.eventsEngine.off.calledOnce); assert.deepEqual(this.eventsEngine.off.firstCall.args.slice(1), [1, 2, 3, 4]); - assert.equal(this.eventsEngine.off.firstCall.args[0].get(0), $(elem.element).get(0)); + assert.equal(this.eventsEngine.off.firstCall.args[0].get(0), this.$(elem.element).get(0)); }); QUnit.test('Trigger', function(assert) { @@ -635,7 +633,7 @@ function checkDashStyle(assert, elem, result, style, value) { assert.ok(this.eventsEngine.trigger.calledOnce); assert.deepEqual(this.eventsEngine.trigger.firstCall.args.slice(1), [1, 2, 3, 4]); assert.equal(this.eventsEngine.trigger.firstCall.args[0].length, 1); - assert.equal(this.eventsEngine.trigger.firstCall.args[0].get(0), $(elem.element).get(0)); + assert.equal(this.eventsEngine.trigger.firstCall.args[0].get(0), this.$(elem.element).get(0)); }); QUnit.module('SvgElement. attr API, set attrs', { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sankey/commonParts/common.js b/packages/devextreme/testing/tests/DevExpress.viz.sankey/commonParts/common.js index 5e38e191f7a3..0c2bd84b63fe 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sankey/commonParts/common.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sankey/commonParts/common.js @@ -3,6 +3,7 @@ import { Renderer, } from '../../../helpers/vizMocks.js'; import rendererModule from 'viz/core/renderers/renderer_default'; +import { stubSeam } from '../../../helpers/moduleSeam.js'; import '__internal/viz/sankey/sankey'; import 'viz/themes'; import { layout as layoutBuilder } from '__internal/viz/sankey/layout'; @@ -40,7 +41,7 @@ const environment = { this.nodesGroupIndex = 1; this.labelsGroupIndex = 2; - sinon.stub(rendererModule, 'Renderer').callsFake(function() { + stubSeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer').callsFake(function() { return that.renderer; }); }, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sankey/sankey.base.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sankey/sankey.base.tests.js index 0dca120df794..48584317190c 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sankey/sankey.base.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sankey/sankey.base.tests.js @@ -1,8 +1,9 @@ import $ from 'jquery'; import { testData, createSankey, layoutBuilder, spiesLayoutBuilder, environment, find } from './commonParts/common.js'; -import rendererModule from 'viz/core/renderers/renderer'; +import rendererModule from 'viz/core/renderers/renderer_default'; import paletteModule from '__internal/viz/paletteModule'; import themeModule from 'viz/themes'; +import { spySeam } from '../../helpers/moduleSeam.js'; themeModule.registerTheme({ name: 'test-theme', @@ -558,7 +559,7 @@ QUnit.test('Resize', function(assert) { }); QUnit.test('Palette', function(assert) { - sinon.spy(paletteModule, 'createPalette'); + spySeam(paletteModule, 'createPalette', 'DEBUG_set_createPalette'); createSankey({ dataSource: [{ source: 'A', target: 'Z', weight: 1 }, { source: 'B', target: 'Z', weight: 1 }], @@ -737,7 +738,7 @@ QUnit.test('Update color of links', function(assert) { }); QUnit.test('Update palette', function(assert) { - sinon.spy(paletteModule, 'createPalette'); + spySeam(paletteModule, 'createPalette', 'DEBUG_set_createPalette'); const sankey = createSankey({ dataSource: [{ source: 'A', target: 'Z', weight: 1 }], diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js index 6eaa14b4626b..ee165c407d14 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js @@ -18,9 +18,9 @@ $('
') .appendTo(fixture); QUnit.begin(function() { - rendererModule.Renderer = function() { + rendererModule.DEBUG_set_Renderer(function() { return new Renderer(); - }; + }); }); const environment = (widget) => ({ diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bullet.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bullet.tests.js index 7918b96cbd85..eafab5d50af4 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bullet.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bullet.tests.js @@ -20,9 +20,9 @@ QUnit.begin(function() { getCanvasVisibleArea: function() { return {}; } }); - translator2DModule.Translator2D = sinon.spy(function() { + translator2DModule.DEBUG_set_Translator2D(sinon.spy(function() { return currentTest().translators.pop(); - }); + })); }); QUnit.testStart(function() { @@ -34,10 +34,10 @@ QUnit.testStart(function() { translator2DModule.Translator2D.resetHistory(); }); -rendererModule.Renderer = sinon.spy(function(parameters) { +rendererModule.DEBUG_set_Renderer(sinon.spy(function(parameters) { currentTest().renderer = new Renderer(parameters); return currentTest().renderer; -}); +})); tooltipModule.DEBUG_set_tooltip(sinon.spy(function() { return currentTest().tooltip; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bulletTooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bulletTooltip.tests.js index f7b42f70408c..4f0b8ca8d434 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bulletTooltip.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/bulletTooltip.tests.js @@ -26,13 +26,13 @@ const StubTooltip = stubClass(tooltipModule.Tooltip, { isEnabled: function() { r tooltipModule.DEBUG_set_tooltip(function(parameters) { return new StubTooltip(parameters); }); -rendererModule.Renderer = function() { +rendererModule.DEBUG_set_Renderer(function() { return currentTest().renderer; -}; +}); -baseThemeManagerModule.BaseThemeManager = function() { +baseThemeManagerModule.DEBUG_set_BaseThemeManager(function() { return currentTest().themeManager; -}; +}); StubThemeManager.prototype.setTheme = function() { forceThemeOptions(this); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js index c6bb2c091825..3b9dc963c9ee 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparkline.tests.js @@ -16,6 +16,7 @@ import translator2DModule from 'viz/translators/translator2d'; import seriesModule from 'viz/series/base_series'; import { DataSource } from 'common/data/data_source/data_source'; import 'viz/sparkline'; +import { stubSeam } from '../../helpers/moduleSeam.js'; $('
') .attr('id', 'container') @@ -30,17 +31,17 @@ QUnit.begin(function() { const StubSeries = Series; const StubTooltip = Tooltip; - rendererModule.Renderer = sinon.spy(function() { + rendererModule.DEBUG_set_Renderer(sinon.spy(function() { return currentTest().renderer; - }); + })); - translator2DModule.Translator2D = sinon.spy(function() { + translator2DModule.DEBUG_set_Translator2D(sinon.spy(function() { return new FakeTranslator(); - }); + })); - seriesModule.Series = sinon.spy(function() { + seriesModule.DEBUG_set_Series(sinon.spy(function() { return currentTest().series; - }); + })); tooltipModule.DEBUG_set_tooltip(sinon.spy(function() { return currentTest().tooltip; @@ -95,7 +96,7 @@ QUnit.begin(function() { return $.extend({}, environment, { beforeEach: function() { environment.beforeEach.apply(this, arguments); - this.validateData = sinon.stub(dataValidatorModule, 'validateData').callsFake(function() { + this.validateData = stubSeam(dataValidatorModule, 'validateData', 'DEBUG_set_validateData').callsFake(function() { return { arg: [{ argument: 1, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparklineTooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparklineTooltip.tests.js index 2f3ae286da64..5302b5f47339 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparklineTooltip.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/sparklineTooltip.tests.js @@ -34,13 +34,13 @@ StubThemeManager.prototype.setTheme = function() { tooltipModule.DEBUG_set_tooltip(function(parameters) { return new StubTooltip(parameters); }); -rendererModule.Renderer = function() { +rendererModule.DEBUG_set_Renderer(function() { return new Renderer(); -}; +}); -baseThemeManagerModule.BaseThemeManager = function() { +baseThemeManagerModule.DEBUG_set_BaseThemeManager(function() { return currentTest().themeManager; -}; +}); function getSparklineTooltip(sparkline) { return sparkline._tooltip; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.treeMap/commonParts/common.js b/packages/devextreme/testing/tests/DevExpress.viz.treeMap/commonParts/common.js index 8d8d94d95296..d961d03ded39 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.treeMap/commonParts/common.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.treeMap/commonParts/common.js @@ -22,7 +22,7 @@ $('#test-container').css({ width: '600px', height: '400px' }); /** Create a mocked renderer for TreeMap tests */ export function createRenderer() { const renderer = new Renderer(); - rendererModule.Renderer = function() { return renderer; }; + rendererModule.DEBUG_set_Renderer(function() { return renderer; }); return renderer; }; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/controlBar.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/controlBar.tests.js index 04f7ed9a1ff0..0ef0bf53391e 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/controlBar.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/controlBar.tests.js @@ -3,7 +3,7 @@ import { noop } from 'core/utils/common'; import { Renderer, } from '../../helpers/vizMocks.js'; -import * as controlBarModule from 'viz/vector_map/control_bar/control_bar'; +import controlBarModule from 'viz/vector_map/control_bar/control_bar'; function returnValue(value) { return function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dataExchanger.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dataExchanger.tests.js index b0d890ba6339..f3832caec158 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dataExchanger.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dataExchanger.tests.js @@ -1,4 +1,4 @@ -import * as dataExchangerModule from 'viz/vector_map/data_exchanger'; +import dataExchangerModule from 'viz/vector_map/data_exchanger'; QUnit.module('DataExchanger', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dxVectorMap.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dxVectorMap.tests.js index ffbbc3da422a..fa21a60efff8 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dxVectorMap.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/dxVectorMap.tests.js @@ -18,6 +18,7 @@ import { } from '../../helpers/vizMocks.js'; import typeUtils from 'core/utils/type'; import plaqueModule from 'viz/core/plaque'; +import { stubSeam, spySeam } from '../../helpers/moduleSeam.js'; import '__internal/viz/vector_map/vector_map'; @@ -26,7 +27,7 @@ const stubLayersEnvironment = $.extend({}, environment, { environment.beforeEach.apply(this, arguments); this.layerCollection.stub('items').returns([]); this.tracker.on = sinon.stub().returns(noop); - sinon.stub(plaqueModule, 'Plaque').returns({ draw: sinon.stub(), hitTest: sinon.stub(), clear: sinon.stub() }); + stubSeam(plaqueModule, 'Plaque', 'DEBUG_set_Plaque').returns({ draw: sinon.stub(), hitTest: sinon.stub(), clear: sinon.stub() }); }, afterEach: function() { plaqueModule.Plaque.restore(); @@ -36,7 +37,7 @@ const stubLayersEnvironment = $.extend({}, environment, { QUnit.module('Map - elements', stubLayersEnvironment); QUnit.test('Renderer', function(assert) { - const spy = sinon.spy(rendererModule, 'Renderer'); + const spy = spySeam(rendererModule, 'Renderer', 'DEBUG_set_Renderer'); this.createMap({ pathModified: 'path-modified' }); @@ -63,7 +64,7 @@ QUnit.test('Background', function(assert) { }); QUnit.test('Layer collection', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); this.createMap({ layers: [{ tag: 'layer-1', dataSource: 'data-1' }, { tag: 'layer-2', dataSource: 'data-2' }] @@ -90,7 +91,7 @@ QUnit.test('Layer collection', function(assert) { }); QUnit.test('Set bounds when data ready called. Without bounds in options', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = [{ proxy: { tag: 'p1', getBounds: function() { return [0, 0, 10, 10]; } }, getData: function() { return { count: function() { return 0; } }; } @@ -113,7 +114,7 @@ QUnit.test('Set bounds when data ready called. Without bounds in options', funct }); QUnit.test('Projection by data. Default bounds are include common bounds', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = [{ proxy: { tag: 'p1', getBounds: function() { return [0, 0, 10, 10]; } }, getData: function() { return { count: function() { return 0; } }; } @@ -134,7 +135,7 @@ QUnit.test('Projection by data. Default bounds are include common bounds', funct }); QUnit.test('Projection by data. Without projection in options', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = [{ proxy: { tag: 'p1', getBounds: function() { return [0, 0, 10, 10]; } }, getData: function() { return { count: function() { return 0; } }; } @@ -157,7 +158,7 @@ QUnit.test('Projection by data. Without projection in options', function(assert) }); QUnit.test('Projection by data. Projection in options', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = [{ proxy: { tag: 'p1', getBounds: function() { return [0, 0, 10, 10]; } }, getData: function() { return { count: function() { return 0; } }; } @@ -178,7 +179,7 @@ QUnit.test('Projection by data. Projection in options', function(assert) { }); QUnit.test('Bounds by data. Empty bbox', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = []; this.layerCollection.stub('items').returns(layers); @@ -195,7 +196,7 @@ QUnit.test('Bounds by data. Empty bbox', function(assert) { }); QUnit.test('Set bounds when data ready called. With bounds in options', function(assert) { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); const layers = [{ proxy: { tag: 'p1', getBounds: function() { return [0, 0, 10, 10]; } }, getData: function() { @@ -232,7 +233,7 @@ QUnit.test('Layer collection - object option', function(assert) { }); QUnit.test('Projection', function(assert) { - const spy = sinon.spy(projectionModule, 'Projection'); + const spy = spySeam(projectionModule, 'Projection', 'DEBUG_set_Projection'); this.createMap({ projection: 'projection', @@ -256,7 +257,7 @@ QUnit.test('Projection', function(assert) { }); QUnit.test('DataExchanger', function(assert) { - const spy = sinon.spy(dataExchangerModule, 'DataExchanger'); + const spy = spySeam(dataExchangerModule, 'DataExchanger', 'DEBUG_set_DataExchanger'); this.createMap(); @@ -264,7 +265,7 @@ QUnit.test('DataExchanger', function(assert) { }); QUnit.test('GestureHandler', function(assert) { - const spy = sinon.spy(gestureHandlerModule, 'GestureHandler'); + const spy = spySeam(gestureHandlerModule, 'GestureHandler', 'DEBUG_set_GestureHandler'); this.createMap({ panningEnabled: 1, @@ -282,7 +283,7 @@ QUnit.test('GestureHandler', function(assert) { }); QUnit.test('LayoutControl', function(assert) { - const spy = sinon.spy(layoutModule, 'LayoutControl'); + const spy = spySeam(layoutModule, 'LayoutControl', 'DEBUG_set_LayoutControl'); const map = this.createMap({ layers: {} }); @@ -297,7 +298,7 @@ QUnit.test('LayoutControl', function(assert) { }); QUnit.test('Tracker', function(assert) { - const spy = sinon.spy(trackerModule, 'Tracker'); + const spy = spySeam(trackerModule, 'Tracker', 'DEBUG_set_Tracker'); this.createMap({ touchEnabled: 0, @@ -315,7 +316,7 @@ QUnit.test('Tracker', function(assert) { }); QUnit.test('Control bar', function(assert) { - const spy = sinon.spy(controlBarModule, 'ControlBar'); + const spy = spySeam(controlBarModule, 'ControlBar', 'DEBUG_set_ControlBar'); this.themeManager.theme.withArgs('controlBar').returns({ theme: 'control-bar' }); this.createMap({ @@ -339,7 +340,7 @@ QUnit.test('Control bar', function(assert) { }); QUnit.test('Legends', function(assert) { - const spy = sinon.spy(legendModule, 'LegendsControl'); + const spy = spySeam(legendModule, 'LegendsControl', 'DEBUG_set_LegendsControl'); const map = this.createMap({ legends: { @@ -362,7 +363,7 @@ QUnit.test('Legends', function(assert) { }); QUnit.test('TooltipViewer', function(assert) { - const spy = sinon.spy(tooltipViewerModule, 'TooltipViewer'); + const spy = spySeam(tooltipViewerModule, 'TooltipViewer', 'DEBUG_set_TooltipViewer'); this.createMap(); @@ -437,8 +438,8 @@ QUnit.test('Should created group for annotations', function(assert) { }); QUnit.test('Should created group for annotations before controll bar and legend', function(assert) { - const spyLegend = sinon.spy(legendModule, 'LegendsControl'); - const spyControlBar = sinon.spy(controlBarModule, 'ControlBar'); + const spyLegend = spySeam(legendModule, 'LegendsControl', 'DEBUG_set_LegendsControl'); + const spyControlBar = spySeam(controlBarModule, 'ControlBar', 'DEBUG_set_ControlBar'); this.createMap(); assert.ok(this.renderer.g.returnValues[1].attr.calledBefore(spyControlBar)); @@ -548,7 +549,7 @@ QUnit.test('Applying bounds by data', function(assert) { }; } }]; - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); this.createMap({ getBoundsFromData: true }); @@ -1019,7 +1020,7 @@ QUnit.module('drawn', stubLayersEnvironment); QUnit.test('call drawn after layer collection ready', function(assert) { const onDrawn = sinon.spy(); - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); this.createMap({ onDrawn: onDrawn }); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/map.elementsInteraction.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/map.elementsInteraction.tests.js index 817d22978f41..93bba032c0f1 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/map.elementsInteraction.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/map.elementsInteraction.tests.js @@ -6,6 +6,7 @@ import { } from './vectorMapParts/commons.js'; import mapLayerModule from 'viz/vector_map/map_layer'; import projectionModule from 'viz/vector_map/projection.main'; +import { spySeam } from '../../helpers/moduleSeam.js'; import resizeCallbacks from 'core/utils/resize_callbacks'; import { implementationsMap } from 'core/utils/size'; import { @@ -23,7 +24,7 @@ QUnit.module('Map - projection events', $.extend({}, environment, { QUnit.test('On center', function(assert) { const onCenterChanged = sinon.spy(); - const spy = sinon.spy(projectionModule, 'Projection'); + const spy = spySeam(projectionModule, 'Projection', 'DEBUG_set_Projection'); this.createMap({ onCenterChanged: onCenterChanged }); spy.lastCall.args[0].centerChanged('test-center'); @@ -33,7 +34,7 @@ QUnit.test('On center', function(assert) { QUnit.test('On zoom', function(assert) { const onZoomFactorChanged = sinon.spy(); - const spy = sinon.spy(projectionModule, 'Projection'); + const spy = spySeam(projectionModule, 'Projection', 'DEBUG_set_Projection'); this.createMap({ onZoomFactorChanged: onZoomFactorChanged }); spy.lastCall.args[0].zoomChanged('test-zoom'); @@ -43,7 +44,7 @@ QUnit.test('On zoom', function(assert) { QUnit.module('Map - event trigger interaction', $.extend({}, environment, { createMap: function() { - const spy = sinon.spy(mapLayerModule, 'MapLayerCollection'); + const spy = spySeam(mapLayerModule, 'MapLayerCollection', 'DEBUG_set_MapLayerCollection'); environment.createMap.apply(this, arguments); this.eventTrigger = spy.lastCall.args[0].eventTrigger; }, diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/mapLayer_new.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/mapLayer_new.tests.js index ee960f4526c4..afd83b5c966d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/mapLayer_new.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/mapLayer_new.tests.js @@ -27,9 +27,9 @@ titleModule.DEBUG_set_title(stubClass(titleModule.Title, { })); tooltipModule.DEBUG_set_tooltip(stubClass(tooltipModule.Tooltip)); exportMenuModule.DEBUG_set_ExportMenu(stubClass(exportMenuModule.ExportMenu)); // TODO maybe if you test layer - you should create exact layer? loadingIndicatorModule.DEBUG_set_LoadingIndicator(stubClass(loadingIndicatorModule.LoadingIndicator)); -controlBarModule.ControlBar = stubClass(controlBarModule.ControlBar); -legendModule.LegendsControl = stubClass(legendModule.LegendsControl); -tooltipViewerModule.TooltipViewer = stubClass(tooltipViewerModule.TooltipViewer); +controlBarModule.DEBUG_set_ControlBar(stubClass(controlBarModule.ControlBar)); +legendModule.DEBUG_set_LegendsControl(stubClass(legendModule.LegendsControl)); +tooltipViewerModule.DEBUG_set_TooltipViewer(stubClass(tooltipViewerModule.TooltipViewer)); const simpleProjection = projection({ aspectRatio: 4 / 3, @@ -68,7 +68,7 @@ const createData = function(featureType, items) { const environment = { beforeEach: function() { const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { return renderer; }; + rendererModule.DEBUG_set_Renderer(function() { return renderer; }); }, createLayer: function(options) { @@ -473,7 +473,7 @@ QUnit.test('Line labels', function(assert) { QUnit.module('Layers management', { beforeEach: function() { const renderer = this.renderer = new Renderer(); - rendererModule.Renderer = function() { return renderer; }; + rendererModule.DEBUG_set_Renderer(function() { return renderer; }); }, createLayers: function(options) { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/tracker.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/tracker.tests.js index d28f0c618e0e..142bbc7985ba 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/tracker.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/tracker.tests.js @@ -13,6 +13,7 @@ import { import trackerModule from 'viz/vector_map/tracker'; import { _TESTS_eventEmitterMethods } from '__internal/viz/vector_map/event_emitter'; import animationFrame from '__internal/common/core/animation/frameModule'; +import { stubSeam } from '../../helpers/moduleSeam.js'; const FOCUS_OFF_DELAY = 100; @@ -55,8 +56,8 @@ const environment = { $.each(this.stubbedCallbacks || [], $.proxy(function(_, name) { this[name] = sinon.stub(); }, this)); - this.requestAnimationFrameStub = sinon.stub(animationFrame, 'requestAnimationFrame').callsFake(noop); - this.cancelAnimationFrameStub = sinon.stub(animationFrame, 'cancelAnimationFrame').callsFake(noop); + this.requestAnimationFrameStub = stubSeam(animationFrame, 'requestAnimationFrame', 'DEBUG_set_requestAnimationFrame').callsFake(noop); + this.cancelAnimationFrameStub = stubSeam(animationFrame, 'cancelAnimationFrame', 'DEBUG_set_cancelAnimationFrame').callsFake(noop); this.clock = sinon.useFakeTimers(); }, afterEach: function() { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/vectorMapParts/commons.js b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/vectorMapParts/commons.js index 15850d90551d..a26c73e7a5b5 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/vectorMapParts/commons.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.vectorMap/vectorMapParts/commons.js @@ -48,21 +48,21 @@ StubThemeManager.prototype.setTheme = function() { }; function stubComponentConstructors(test) { - rendererModule.Renderer = returnValue(test.renderer); + rendererModule.DEBUG_set_Renderer(returnValue(test.renderer)); titleModule.DEBUG_set_title(returnValue(test.title)); tooltipModule.DEBUG_set_tooltip(returnValue(test.tooltip)); exportModule.DEBUG_set_ExportMenu(returnValue(test.exportMenu)); - projectionModule.Projection = returnValue(test.projection); - controlBarModule.ControlBar = returnValue(test.controlBar); - gestureHandlerModule.GestureHandler = returnValue(test.gestureHandler); - trackerModule.Tracker = returnValue(test.tracker); - themeManagerModule.BaseThemeManager = returnValue(test.themeManager); - dataExchangerModule.DataExchanger = returnValue(test.dataExchanger); - legendModule.LegendsControl = returnValue(test.legendsControl); - layoutModule.LayoutControl = returnValue(test.layoutControl); - mapLayerModule.MapLayerCollection = returnValue(test.layerCollection); - tooltipViewerModule.TooltipViewer = returnValue(test.tooltipViewer); + projectionModule.DEBUG_set_Projection(returnValue(test.projection)); + controlBarModule.DEBUG_set_ControlBar(returnValue(test.controlBar)); + gestureHandlerModule.DEBUG_set_GestureHandler(returnValue(test.gestureHandler)); + trackerModule.DEBUG_set_Tracker(returnValue(test.tracker)); + themeManagerModule.DEBUG_set_BaseThemeManager(returnValue(test.themeManager)); + dataExchangerModule.DEBUG_set_DataExchanger(returnValue(test.dataExchanger)); + legendModule.DEBUG_set_LegendsControl(returnValue(test.legendsControl)); + layoutModule.DEBUG_set_LayoutControl(returnValue(test.layoutControl)); + mapLayerModule.DEBUG_set_MapLayerCollection(returnValue(test.layerCollection)); + tooltipViewerModule.DEBUG_set_TooltipViewer(returnValue(test.tooltipViewer)); } export { stubComponentConstructors }; diff --git a/packages/devextreme/testing/tests/DevExpress/color.tests.js b/packages/devextreme/testing/tests/DevExpress/color.tests.js index 52f75ff1ba14..0eeb0af899bd 100644 --- a/packages/devextreme/testing/tests/DevExpress/color.tests.js +++ b/packages/devextreme/testing/tests/DevExpress/color.tests.js @@ -1,4 +1,4 @@ -const Color = require('color'); +import Color from 'color'; QUnit.module('Colors parsing', { beforeEach: function() { diff --git a/packages/devextreme/testing/tests/Memory Leaks/vizWidgets.tests.js b/packages/devextreme/testing/tests/Memory Leaks/vizWidgets.tests.js index 4799c4cef71f..56edcb6d686e 100644 --- a/packages/devextreme/testing/tests/Memory Leaks/vizWidgets.tests.js +++ b/packages/devextreme/testing/tests/Memory Leaks/vizWidgets.tests.js @@ -1,4 +1,4 @@ -window.DevExpress = { viz: { map: { sources: {} } } }; +window.DevExpress = window.DevExpress || { viz: { map: { sources: {} } } }; import $ from 'core/renderer'; import { getWidth, getHeight, setWidth, setHeight } from 'core/utils/size'; @@ -18,6 +18,8 @@ import 'viz/tree_map'; import '/packages/devextreme/artifacts/js/vectormap-data/world.js'; import '/packages/devextreme/artifacts/js/vectormap-data/usa.js'; +const DevExpress = window.DevExpress; + const chartTestsSignature = { getInitOptions() { return { diff --git a/packages/nx-infra-plugin/AGENTS.md b/packages/nx-infra-plugin/AGENTS.md index a54a48137d65..d5b7ab411526 100644 --- a/packages/nx-infra-plugin/AGENTS.md +++ b/packages/nx-infra-plugin/AGENTS.md @@ -65,3 +65,24 @@ Each behavior is owned by exactly ONE executor's canonical tests; consumers must 3. Preserve exact functional parity. Verify with the executor's e2e spec before and after. 4. Update consumer imports in one batch. 5. Run the full validation pipeline. + +## Former gulp tasks (gulp fully removed) + +`gulpfile.js`, `build/gulp/`, and all gulp dependencies have been deleted outright — devextreme no longer depends on gulp or ships a gulp CLI. The Nx-consumed build assets that used to live under `build/gulp/` (`transpile-config.js`, `modules_metadata.json`, the `*.jst` templates) were relocated to purpose-named folders directly under `build/` (`build/transpile-config.js`, `build/modules_metadata.json`, `build/localization-templates/`, `build/vectormap-templates/`). The table below is a historical reference mapping each removed gulp task to its Nx replacement: + +| Former gulp task | Nx target | Notes | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `clean` | `clean:artifacts` | Uses `devextreme-nx-infra-plugin:clean` with `excludePatterns` to preserve `artifacts/css`, `artifacts/npm/devextreme/package.json`, and `artifacts/npm/devextreme-dist`. Run directly via `pnpm nx clean:artifacts devextreme`. | +| `bundler-config-watch` | `build:devextreme-bundler-config:watch` | Uses `devextreme-nx-infra-plugin:concatenate-files` in `watch` mode (chokidar over the `build/bundle-templates/modules/parts` sources) with `additionalPasses` so a change rebuilds both `dx.custom.js` and the derived `dx.custom.config.js`, matching the old gulp `bundler-config` chain. `cache: false`. | +| `bundler-config` (non-watch) | `build:devextreme-bundler-config` | Run via `pnpm nx build:devextreme-bundler-config devextreme` (add `-c prod` for parity with the old uglified variant). | +| `generate-community-locales` | `build:community-localization` | Uses `devextreme-nx-infra-plugin:generate-community-locales` to normalize `js/localization/messages/*.json` against `en.json` in place (fills translations, English fallback for missing/`TODO` values, escapes quotes, inherits en's key order/formatting). Target is `cache: false` with no `outputs` (input dir == output dir — a source-normalization task, not a cached build artifact). Run via `pnpm nx build:community-localization devextreme`. | +| `test-env` | `test-env` | Uses `nx:run-commands` to wrap the existing `node ./testing/launch` script (compiles the QUnit runner, starts the test server on port 20060, opens the browser). `cache: false`, no outputs (long-running server). `cwd` is `{projectRoot}`. | +| `transpile-watch` | `build:transpile:watch` | `nx:run-commands` (parallel, `cache: false`) fanning out to the incremental watch targets `build:ts:internal:watch` (TypeScript watch program emitting `dist_ts`), `build:npm:esm:watch -c qunit`, and `build:npm:esm:internal:watch -c qunit`. Together these keep `artifacts/transpiled-esm-npm/esm` fresh for the native-ESM QUnit runner; `-c qunit` sets `removeDebug: false` so the `/// #DEBUG` seams tests stub through survive. The former CJS watchers (`build:cjs:watch` / `build:cjs:internal:watch`, feeding `artifacts/transpiled` and `artifacts/transpiled-renovation-npm`) were removed together with SystemJS — CJS is now built only by the non-watch `build:transpile` default/`internal` configurations. Watch capability lives in the `babel-transform` (per-file, chokidar + debounce, `watch` option) and `build-typescript` (`ts.createWatchProgram`, `watch` option) executors via the shared `src/utils/watch.ts` helper. `babel-transform` watch is intentionally file-level incremental and does **not** do an initial full transform — it relies on a preceding build having already populated its source directory (mirroring gulp-watch, which fed babel from a single in-memory TS-compiler stream with no such gap). Because `build:transpile`'s last step (`clean:dist-ts`) deletes `artifacts/dist_ts` — the exact directory `build:npm:esm:internal:watch` reads from and that runs right before `dev-watch` starts — `build:transpile:watch` itself (not the leaf watch target, to avoid two parallel invocations each re-running the compile) declares `dependsOn: ["build:ts:internal"]`, so a real (or Nx-cache-restored) TS compile always repopulates `dist_ts/__internal` once, up front, before any of the fanned-out watch processes start; without it, whichever of the parallel TS-watch/babel-watch processes started first would decide — nondeterministically — whether the initial compile burst is picked up. | +| `transpile-tests` | `transpile:tests` | Uses `devextreme-nx-infra-plugin:babel-transform` with the flat (keyless) `./testing/tests.babelrc.json` config to transpile `testing/**/*.js` in place. `dependsOn: ["build:devextreme-bundler-config"]` reproduces the old gulp `series('bundler-config', …)` prerequisite. `cache: false` (in-place source transform, not a cached artifact). Run via `pnpm nx transpile:tests devextreme`. | +| `transpile-systemjs` | _(removed)_ | QUnit uses native ESM + import maps only. `build:systemjs` and `testing/systemjs-builder.js` are gone. ESM for QUnit is `artifacts/transpiled-esm-npm` from `build:transpile -c ci` (via `build:dev` / CI) or the dedicated `build:qunit-esm` target. | +| `js-bundles-watch` | _(removed)_ | Was `bundle:watch` (webpack watch via `devextreme-nx-infra-plugin:bundle` with `watch: true`). Dropped from `dev-watch` with the SystemJS removal — QUnit loads ESM artifacts directly and no longer needs watched debug bundles. Use the one-shot `bundle:debug` when a bundle is actually needed. | +| `js-bundles-prod` | `bundle:prod` | Use `pnpm nx bundle:prod devextreme` (add `-c production` for uglify/dist parity). | +| `js-bundles-debug` | `bundle:debug` | Use `pnpm nx bundle:debug devextreme` (add `-c production` for uglify/dist parity). | +| `dev-watch` | `dev-watch` | `nx:run-commands` (parallel, `cache: false`, `cwd: {projectRoot}`) fanning out to three watch targets — `build:transpile:watch`, `build:devextreme-bundler-config:watch`, `test-env`. The old gulp equivalent was `gulp.parallel('transpile-watch', 'bundler-config-watch', 'js-bundles-watch', 'test-env')`; the `js-bundles-watch` leg (`bundle:watch`) was dropped with the SystemJS removal. | +| `dev` | `dev` | `nx:run-commands` with `dependsOn: ["build:dev"]`; its own command then runs `pnpm nx dev-watch devextreme`, reproducing the old `gulp.series('default-dev', 'dev-watch')` build-then-watch sequencing. Reuses `build:dev` as the initial-build step rather than replicating gulp's lighter `default-dev` variant (which skipped `clean` and the one-shot `js-bundles-debug` build) — an accepted small startup-cost tradeoff. | +| `default` / `main-batch` / `misc-batch` | `build`, `build-dist`, `build:dev` | Gulp orchestration (`gulp.series` / `gulp-multi-process`) is gone. Native Nx `build` covers the non-uglify default batch; `build -c production` (+ `build:npm -c production`) matches the old `gulp default --uglify`; `build -c production-internal` matches uglify + `BUILD_INTERNAL_PACKAGE`; `build -c testing` matches `BUILD_TEST_INTERNAL_PACKAGE`. `build-dist` is a thin wrapper (`pnpm nx run devextreme:build -c production`, `-c internal` → `production-internal`). `build:dev` is the former `DEVEXTREME_TEST_CI` path: clean → localization → `build:transpile -c ci` → parallel `build:vectormap,copy:vendor` (skips all CJS transpile/bundle steps, prod bundles, aspnet, declarations, npm, license checks). npm scripts `build:dev` / `build-dist` / `clean` / `transpile-tests` call Nx directly. | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aed252f8908c..1628ba9434cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -288,7 +288,7 @@ importers: version: 0.8.5 stylelint: specifier: 'catalog:' - version: 16.22.0(supports-color@7.2.0)(typescript@5.9.3) + version: 16.22.0(typescript@5.9.3) ts-node: specifier: 10.9.2 version: 10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3) @@ -346,7 +346,7 @@ importers: version: 20.3.32(34f1a4d7f9578a4bb21369e276c05ced) '@angular/cli': specifier: catalog:angular - version: 20.3.32(@types/node@20.11.17)(chokidar@4.0.3)(supports-color@7.2.0) + version: 20.3.32(@types/node@20.11.17)(chokidar@4.0.3) '@types/jasmine': specifier: 5.1.4 version: 5.1.4 @@ -367,13 +367,13 @@ importers: dependencies: '@angular-devkit/build-angular': specifier: ^22.0.9 - version: 22.1.2(9ab32ed578a68caf92174a202d695664) + version: 22.1.2(5ff3e14daa3065d6e7c118ba510a3c83) '@angular/animations': specifier: ^22.0.8 version: 22.1.0(@angular/core@22.1.0(@angular/compiler@22.1.0)(rxjs@7.8.2)(zone.js@0.16.2)) '@angular/cli': specifier: ^22.0.9 - version: 22.1.2(@types/node@26.1.1)(chokidar@5.0.0) + version: 22.1.2(@types/node@20.19.37)(chokidar@5.0.0) '@angular/common': specifier: ^22.0.8 version: 22.1.0(@angular/core@22.1.0(@angular/compiler@22.1.0)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2) @@ -599,7 +599,7 @@ importers: version: 7.29.7 '@babel/eslint-parser': specifier: 'catalog:' - version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)) '@babel/preset-env': specifier: 7.29.7 version: 7.29.7(@babel/core@7.29.7) @@ -611,7 +611,7 @@ importers: version: 7.29.7(@babel/core@7.29.7) '@eslint/compat': specifier: 1.4.1 - version: 1.4.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 1.4.1(eslint@9.39.4(jiti@2.6.1)) '@eslint/eslintrc': specifier: 'catalog:' version: 3.3.5 @@ -620,7 +620,7 @@ importers: version: 9.39.4 '@stylistic/eslint-plugin': specifier: 'catalog:' - version: 5.10.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 5.10.0(eslint@9.39.4(jiti@2.6.1)) '@testcafe-community/axe': specifier: 3.5.0 version: 3.5.0(axe-core@4.11.3)(testcafe@3.7.5) @@ -644,13 +644,13 @@ importers: version: 17.0.35 '@typescript-eslint/eslint-plugin': specifier: 'catalog:' - version: 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + version: 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) '@typescript-eslint/parser': specifier: 'catalog:' - version: 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + version: 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) '@vue/eslint-config-typescript': specifier: 12.0.0 - version: 12.0.0(eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + version: 12.0.0(eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))))(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) '@vue/tsconfig': specifier: 0.9.1 version: 0.9.1(typescript@6.0.3)(vue@3.5.32(typescript@6.0.3)) @@ -674,40 +674,40 @@ importers: version: 2.0.17(testcafe@3.7.5) eslint: specifier: 'catalog:' - version: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + version: 9.39.4(jiti@2.6.1) eslint-config-airbnb-typescript: specifier: 'catalog:' - version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(554dde2dfd68364add0a2758e579b8b7) + version: 1.1.12(26d103e2bc0fb2b710d828b206e45d41) eslint-plugin-deprecation: specifier: 3.0.0 - version: 3.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + version: 3.0.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) eslint-plugin-import: specifier: 'catalog:' - version: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-jest: specifier: 29.15.2 - version: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3) + version: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3) eslint-plugin-no-only-tests: specifier: 'catalog:' version: 3.3.0 eslint-plugin-react: specifier: 7.37.5 - version: 7.37.5(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 7.37.5(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-react-hooks: specifier: 5.2.0 - version: 5.2.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 5.2.0(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-react-perf: specifier: 3.3.3 - version: 3.3.3(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 3.3.3(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-spellcheck: specifier: 0.0.20 - version: 0.0.20(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + version: 0.0.20(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-vue: specifier: 'catalog:' - version: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)) + version: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) express: specifier: 4.22.1 version: 4.22.1 @@ -722,7 +722,7 @@ importers: version: 14.1.1(supports-color@7.2.0) jest: specifier: 30.4.2 - version: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + version: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) jest-environment-node: specifier: 30.4.1 version: 30.4.1 @@ -761,7 +761,7 @@ importers: version: 38.0.0(stylelint@16.22.0(typescript@6.0.3)) testcafe: specifier: 'catalog:' - version: 3.7.5(supports-color@7.2.0) + version: 3.7.5 testcafe-reporter-spec-time: specifier: 4.0.0 version: 4.0.0 @@ -770,7 +770,7 @@ importers: version: 10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3) vue-eslint-parser: specifier: 'catalog:' - version: 10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0) + version: 10.0.0(eslint@9.39.4(jiti@2.6.1)) vue-tsc: specifier: 3.0.8 version: 3.0.8(typescript@6.0.3) @@ -980,7 +980,7 @@ importers: version: 9.39.4(jiti@2.6.1) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(f43ede1c63aef08b124dbf33bc5f83fb) + version: 1.1.12(3d401928aa66bf2e591f933b2739e58c) eslint-plugin-i18n: specifier: 'catalog:' version: 2.4.0 @@ -1052,7 +1052,7 @@ importers: version: 9.39.4(jiti@2.6.1) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(5552857efccfb3f1ba025df865cdfd0e) + version: 1.1.12(a25cda3163463b9772ba2a773a10316c) eslint-migration-utils: specifier: workspace:* version: link:../../packages/eslint-migration-utils @@ -1085,7 +1085,7 @@ importers: devDependencies: '@babel/eslint-parser': specifier: 'catalog:' - version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)) + version: 7.29.7(@babel/core@8.0.1)(eslint@9.39.4(jiti@2.6.1)) '@babel/plugin-transform-runtime': specifier: 7.29.7 version: 7.29.7(@babel/core@7.29.7) @@ -1127,7 +1127,7 @@ importers: version: 9.39.4(jiti@2.6.1) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(70f56e711195e33f9b23259278af4356) + version: 1.1.12(7dd464a0604f1d8e6bd5fce5260d6037) eslint-migration-utils: specifier: workspace:* version: link:../../packages/eslint-migration-utils @@ -1154,7 +1154,7 @@ importers: version: 0.12.1 testcafe: specifier: 'catalog:' - version: 3.7.5(supports-color@7.2.0) + version: 3.7.5 testcafe-reporter-spec-time: specifier: 4.0.0 version: 4.0.0 @@ -1468,7 +1468,7 @@ importers: version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(e659abf94f261cb548f87457fcc52d78) + version: 1.1.12(25bff8f024558126068f85a113b20273) eslint-migration-utils: specifier: workspace:* version: link:../eslint-migration-utils @@ -1495,7 +1495,7 @@ importers: version: 3.3.0 eslint-plugin-perfectionist: specifier: 'catalog:' - version: 5.9.1(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@4.9.5) + version: 5.9.1(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) eslint-plugin-qunit: specifier: 'catalog:' version: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -1562,21 +1562,6 @@ importers: sinon: specifier: 18.0.1 version: 18.0.1 - systemjs: - specifier: 0.19.41 - version: 0.19.41 - systemjs-plugin-babel: - specifier: 0.0.25 - version: 0.0.25 - systemjs-plugin-css: - specifier: 0.1.37 - version: 0.1.37 - systemjs-plugin-json: - specifier: 0.3.0 - version: 0.3.0 - systemjs-plugin-text: - specifier: 0.0.11 - version: 0.0.11 terser-webpack-plugin: specifier: 5.3.17 version: 5.3.17(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)(webpack@5.105.4(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)) @@ -1650,7 +1635,7 @@ importers: version: 20.3.27(@angular/common@20.3.27(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@20.3.27)(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@20.3.27(@angular/common@20.3.27(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1)))(rxjs@7.8.2) '@babel/eslint-parser': specifier: 'catalog:' - version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)) + version: 7.29.7(@babel/core@8.0.1)(eslint@9.39.4(jiti@2.6.1)) '@eslint-stylistic/metadata': specifier: 'catalog:' version: 2.13.0 @@ -1689,7 +1674,7 @@ importers: version: 9.39.4(jiti@2.6.1) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(5552857efccfb3f1ba025df865cdfd0e) + version: 1.1.12(a25cda3163463b9772ba2a773a10316c) eslint-migration-utils: specifier: workspace:* version: link:../eslint-migration-utils @@ -1809,7 +1794,7 @@ importers: devDependencies: '@babel/eslint-parser': specifier: 'catalog:' - version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)) + version: 7.29.7(@babel/core@8.0.1)(eslint@9.39.4(jiti@2.6.1)) '@eslint/eslintrc': specifier: 'catalog:' version: 3.3.5 @@ -1851,7 +1836,7 @@ importers: version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(e43b4562c396170e08a0bcb0bebad46e) + version: 1.1.12(a8f9319687a53bec0d2a70b73ac5ccad) eslint-migration-utils: specifier: workspace:* version: link:../eslint-migration-utils @@ -1882,7 +1867,7 @@ importers: devDependencies: '@stylistic/stylelint-plugin': specifier: 3.1.3 - version: 3.1.3(stylelint@16.22.0(typescript@6.0.3)) + version: 3.1.3(stylelint@16.22.0(typescript@5.9.3)) autoprefixer: specifier: 10.5.0 version: 10.5.0(postcss@8.5.23) @@ -1900,16 +1885,16 @@ importers: version: 1.93.3 stylelint: specifier: 'catalog:' - version: 16.22.0(typescript@6.0.3) + version: 16.22.0(typescript@5.9.3) stylelint-config-standard-scss: specifier: 14.0.0 - version: 14.0.0(postcss@8.5.23)(stylelint@16.22.0(typescript@6.0.3)) + version: 14.0.0(postcss@8.5.23)(stylelint@16.22.0(typescript@5.9.3)) stylelint-scss: specifier: 6.10.0 - version: 6.10.0(stylelint@16.22.0(typescript@6.0.3)) + version: 6.10.0(stylelint@16.22.0(typescript@5.9.3)) ts-jest: specifier: 29.4.12 - version: 29.4.12(@babel/core@7.29.7)(@jest/transform@30.4.1)(@jest/types@30.4.1)(babel-jest@30.4.1(@babel/core@7.29.7))(jest-util@30.4.1)(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3) + version: 29.4.12(@babel/core@7.29.7)(@jest/transform@30.4.1)(@jest/types@30.4.1)(babel-jest@30.4.1(@babel/core@7.29.7))(jest-util@30.4.1)(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.9.3) packages/devextreme-themebuilder: dependencies: @@ -1961,7 +1946,7 @@ importers: version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(4c739bafb4997092ce83f049f167b131) + version: 1.1.12(ba83ebe55aa7666ff88d6674f941478c) eslint-plugin-import: specifier: 'catalog:' version: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) @@ -2004,7 +1989,7 @@ importers: devDependencies: '@babel/eslint-parser': specifier: 'catalog:' - version: 7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)) + version: 7.29.7(@babel/core@8.0.1)(eslint@9.39.4(jiti@2.6.1)) '@eslint-stylistic/metadata': specifier: 'catalog:' version: 2.13.0 @@ -2043,7 +2028,7 @@ importers: version: 18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) eslint-config-devextreme: specifier: 'catalog:' - version: 1.1.12(e43b4562c396170e08a0bcb0bebad46e) + version: 1.1.12(a8f9319687a53bec0d2a70b73ac5ccad) eslint-plugin-i18n: specifier: 'catalog:' version: 2.4.0 @@ -2189,7 +2174,7 @@ importers: version: link:../devextreme/artifacts/npm/devextreme testcafe: specifier: 'catalog:' - version: 3.7.5(supports-color@7.2.0) + version: 3.7.5 packages: @@ -4405,33 +4390,16 @@ packages: '@csstools/css-parser-algorithms': ^3.0.5 '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-parser-algorithms@2.7.1': - resolution: {integrity: sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==} - engines: {node: ^14 || ^16 || >=18} - peerDependencies: - '@csstools/css-tokenizer': ^2.4.1 - '@csstools/css-parser-algorithms@3.0.5': resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} engines: {node: '>=18'} peerDependencies: '@csstools/css-tokenizer': ^3.0.4 - '@csstools/css-tokenizer@2.4.1': - resolution: {integrity: sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==} - engines: {node: ^14 || ^16 || >=18} - '@csstools/css-tokenizer@3.0.4': resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} engines: {node: '>=18'} - '@csstools/media-query-list-parser@2.1.13': - resolution: {integrity: sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA==} - engines: {node: ^14 || ^16 || >=18} - peerDependencies: - '@csstools/css-parser-algorithms': ^2.7.1 - '@csstools/css-tokenizer': ^2.4.1 - '@csstools/media-query-list-parser@3.0.1': resolution: {integrity: sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==} engines: {node: '>=18'} @@ -4446,12 +4414,6 @@ packages: '@csstools/css-parser-algorithms': ^3.0.5 '@csstools/css-tokenizer': ^3.0.4 - '@csstools/selector-specificity@3.1.1': - resolution: {integrity: sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==} - engines: {node: ^14 || ^16 || >=18} - peerDependencies: - postcss-selector-parser: ^6.1.3 - '@csstools/selector-specificity@5.0.0': resolution: {integrity: sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==} engines: {node: '>=18'} @@ -7576,9 +7538,6 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/minimist@1.2.5': - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} @@ -8668,10 +8627,6 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} - arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - asn1.js@4.10.1: resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} @@ -9176,10 +9131,6 @@ packages: camel-case@4.1.2: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} - camelcase-keys@7.0.2: - resolution: {integrity: sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==} - engines: {node: '>=12'} - camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -9778,10 +9729,6 @@ packages: css-select@6.0.0: resolution: {integrity: sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==} - css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - css-tree@3.2.1: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -9890,18 +9837,6 @@ packages: supports-color: optional: true - decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} - - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - - decamelize@5.0.1: - resolution: {integrity: sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==} - engines: {node: '>=10'} - decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} @@ -10319,10 +10254,6 @@ packages: resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} engines: {node: '>=10.13.0'} - enhanced-resolve@5.24.3: - resolution: {integrity: sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ==} - engines: {node: '>=10.13.0'} - enhanced-resolve@5.24.5: resolution: {integrity: sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==} engines: {node: '>=10.13.0'} @@ -10717,6 +10648,7 @@ packages: eslint@9.39.4: resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true peerDependencies: jiti: '*' @@ -10941,10 +10873,6 @@ packages: file-entry-cache@10.1.4: resolution: {integrity: sha512-5XRUFc0WTtUbjfGzEwXc42tiGxQHBmtbUG1h9L2apu4SulCGN3Hqm//9D6FAolf8MYNL7f/YlJl9vy08pj5JuA==} - file-entry-cache@7.0.2: - resolution: {integrity: sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==} - engines: {node: '>=12.0.0'} - file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -11326,10 +11254,6 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - harmony-reflect@1.6.2: resolution: {integrity: sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==} @@ -11461,10 +11385,6 @@ packages: hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - hosted-git-info@4.1.0: - resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} - engines: {node: '>=10'} - hosted-git-info@9.0.2: resolution: {integrity: sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==} engines: {node: ^20.17.0 || >=22.9.0} @@ -11695,10 +11615,6 @@ packages: resolution: {integrity: sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==} engines: {node: '>=6'} - import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - import-local@3.2.0: resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} engines: {node: '>=8'} @@ -12002,10 +11918,6 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} @@ -12640,9 +12552,6 @@ packages: knockout@3.5.3: resolution: {integrity: sha512-6iPv8M/xDPYfsiKyEyIPcSYBt8L+FZoJS/frLT8Nq3n9kMvP+WZ6ZPehYZV5c22Qc64Ie7unmTqYqgSdCB1Taw==} - known-css-properties@0.29.0: - resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==} - known-css-properties@0.35.0: resolution: {integrity: sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==} @@ -13048,14 +12957,6 @@ packages: makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - - map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - match-url-wildcard@0.0.4: resolution: {integrity: sha512-R1XhQaamUZPWLOPtp4ig5j+3jctN+skhgRmEQTUamMzmNtRG69QEirQs0NZKLtHMR7tzWpmtnS4Eqv65DcgXUA==} @@ -13087,9 +12988,6 @@ packages: mdast-util-to-string@3.2.0: resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} - mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} @@ -13121,10 +13019,6 @@ packages: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} - meow@10.1.5: - resolution: {integrity: sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - meow@13.2.0: resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} engines: {node: '>=18'} @@ -13308,10 +13202,6 @@ packages: resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} engines: {node: '>=16 || 14 >=14.17'} - minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -13653,10 +13543,6 @@ packages: normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - normalize-package-data@3.0.3: - resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} - engines: {node: '>=10'} - normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -14509,10 +14395,6 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - quill-delta@5.1.0: resolution: {integrity: sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==} engines: {node: '>= 12.0.0'} @@ -14632,18 +14514,10 @@ packages: read-only-stream@2.0.0: resolution: {integrity: sha512-3ALe0bjBVZtkdWKIcThYpQCLbBMd/+Tbh2CDSrAIDO3UsZ4Xs+tnyjv2MjCOMMgBG+AsUOeuP1cgtY1INISc8w==} - read-pkg-up@8.0.0: - resolution: {integrity: sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==} - engines: {node: '>=12'} - read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} - read-pkg@6.0.0: - resolution: {integrity: sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==} - engines: {node: '>=12'} - readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -14691,10 +14565,6 @@ packages: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} - redent@4.0.0: - resolution: {integrity: sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==} - engines: {node: '>=12'} - reflect-metadata@0.1.13: resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==} @@ -15750,11 +15620,6 @@ packages: peerDependencies: stylelint: ^16.0.2 - stylelint@15.11.0: - resolution: {integrity: sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==} - engines: {node: ^14.13.1 || >=16.0.0} - hasBin: true - stylelint@16.22.0: resolution: {integrity: sha512-SVEMTdjKNV4ollUrIY9ordZ36zHv2/PHzPjfPMau370MlL2VYXeLgSNMMiEbLGRO8RmD2R8/BVUeF2DfnfkC0w==} engines: {node: '>=18.12.0'} @@ -15819,21 +15684,6 @@ packages: syntax-error@1.4.0: resolution: {integrity: sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==} - systemjs-plugin-babel@0.0.25: - resolution: {integrity: sha512-RMKSizWWlw4+IpDB385ugxn7Owd9W+HEtjYDQ6yO1FpsnER/vk6FbXRweUF+mvRi6EHgk8vDdUdtui7ReDwX3w==} - - systemjs-plugin-css@0.1.37: - resolution: {integrity: sha512-wCGG62zYXuOlNji5FlBjeMFAnLeAO/HQmFg+8UBX/mlHoAKLHlGFYRstlhGKibRU2oxk/BH9DaihOuhhNLi7Kg==} - - systemjs-plugin-json@0.3.0: - resolution: {integrity: sha512-GPHZgc6bGIDIQsoNAkhthddApy4ErFhy30rMBrEepkoDidhs0JeSk821htUOSrtqJjnUPBf2gge325B5GfsW0w==} - - systemjs-plugin-text@0.0.11: - resolution: {integrity: sha512-buWE27P6iM3WZYXcsiy6+fiulQ/x+Puux4ni5ejTlcUgqUg3/sUvoAUZ4GGPACC0acjxmnaCt3kHb0+uNs1ekw==} - - systemjs@0.19.41: - resolution: {integrity: sha512-8E9CmZ01dIr52po2LNhc3QuKyeSTyvQfshHMi3lekSbEOdR9OAUOX2X+wPKunZX3CpudM6w3r8eTCjGQrK79Wg==} - table@6.9.0: resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} engines: {node: '>=10.0.0'} @@ -16060,10 +15910,6 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} - trim-newlines@4.1.1: - resolution: {integrity: sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==} - engines: {node: '>=12'} - trim-trailing-lines@2.1.0: resolution: {integrity: sha512-5UR5Biq4VlVOtzqkm2AZlgvSlDJtME46uV0br0gENbwN4l5+mMKT4b9gJKqWtuL2zAIqajGJGuvbCbcAJUZqBg==} @@ -16932,9 +16778,6 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - when@3.7.8: - resolution: {integrity: sha512-5cZ7mecD3eYcMiCH4wtRPA5iFJZ50BJYDfckI5RRpQiktMiYTcn0ccLTZOvcbBume+1304fQztxeNzNS9Gvrnw==} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -17190,9 +17033,6 @@ packages: zod@4.1.13: resolution: {integrity: sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==} - zod@4.4.2: - resolution: {integrity: sha512-IynmDyxsEsb9RKzO3J9+4SxXnl2FTFSzNBaKKaMV6tsSk0rw9gYw9gs+JFCq/qk2LCZ78KDwyj+Z289TijSkUw==} - zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} @@ -17498,13 +17338,13 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@22.1.2(9ab32ed578a68caf92174a202d695664)': + '@angular-devkit/build-angular@22.1.2(5ff3e14daa3065d6e7c118ba510a3c83)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2201.2(chokidar@5.0.0) '@angular-devkit/build-webpack': 0.2201.2(chokidar@5.0.0)(webpack-dev-server@5.2.6(tslib@2.8.1)(webpack@5.109.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)(postcss@8.5.23)))(webpack@5.109.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)(postcss@8.5.23)) '@angular-devkit/core': 22.1.2(chokidar@5.0.0) - '@angular/build': 22.1.2(7d59fb6e9d8777bab2b063c5a6c353b4) + '@angular/build': 22.1.2(3e08e0bd92b41fa22a30f22cc0508f3a) '@angular/compiler-cli': 22.1.0(@angular/compiler@22.1.0)(typescript@6.0.3) '@babel/core': 8.0.1 '@babel/generator': 8.0.0 @@ -17841,7 +17681,7 @@ snapshots: - tsx - yaml - '@angular/build@22.1.2(7d59fb6e9d8777bab2b063c5a6c353b4)': + '@angular/build@22.1.2(3e08e0bd92b41fa22a30f22cc0508f3a)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2201.2(chokidar@5.0.0) @@ -17850,8 +17690,8 @@ snapshots: '@babel/core': 8.0.1 '@babel/helper-annotate-as-pure': 8.0.0 '@babel/helper-split-export-declaration': 7.24.7 - '@inquirer/confirm': 6.1.1(@types/node@26.1.1) - '@vitejs/plugin-basic-ssl': 2.3.0(vite@8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0)) + '@inquirer/confirm': 6.1.1(@types/node@20.19.37) + '@vitejs/plugin-basic-ssl': 2.3.0(vite@8.1.5(@types/node@20.19.37)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0)) beasties: 0.4.3 browserslist: 4.28.7 esbuild: 0.28.1 @@ -17871,7 +17711,7 @@ snapshots: tinyglobby: 0.2.17 tslib: 2.8.1 typescript: 6.0.3 - vite: 8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0) + vite: 8.1.5(@types/node@20.19.37)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0) watchpack: 2.5.2 optionalDependencies: '@angular/core': 22.1.0(@angular/compiler@22.1.0)(rxjs@7.8.2)(zone.js@0.16.2) @@ -17897,14 +17737,14 @@ snapshots: - tsx - yaml - '@angular/cli@20.3.32(@types/node@20.11.17)(chokidar@4.0.3)(supports-color@7.2.0)': + '@angular/cli@20.3.32(@types/node@20.11.17)(chokidar@4.0.3)': dependencies: '@angular-devkit/architect': 0.2003.32(chokidar@4.0.3) '@angular-devkit/core': 20.3.32(chokidar@4.0.3) '@angular-devkit/schematics': 20.3.32(chokidar@4.0.3) '@inquirer/prompts': 7.8.2(@types/node@20.11.17) '@listr2/prompt-adapter-inquirer': 3.0.1(@inquirer/prompts@7.8.2(@types/node@20.11.17))(@types/node@20.11.17)(listr2@9.0.1) - '@modelcontextprotocol/sdk': 1.26.0(supports-color@7.2.0)(zod@4.1.13) + '@modelcontextprotocol/sdk': 1.26.0(zod@4.1.13) '@schematics/angular': 20.3.32(chokidar@4.0.3) '@yarnpkg/lockfile': 1.1.0 algoliasearch: 5.35.0 @@ -17912,7 +17752,7 @@ snapshots: jsonc-parser: 3.3.1 listr2: 9.0.1 npm-package-arg: 13.0.0 - pacote: 21.5.1(supports-color@7.2.0) + pacote: 21.5.1 resolve: 1.22.10 semver: 7.7.2 yargs: 18.0.0 @@ -17930,7 +17770,7 @@ snapshots: '@angular-devkit/schematics': 20.3.32(chokidar@4.0.3) '@inquirer/prompts': 7.8.2(@types/node@20.19.37) '@listr2/prompt-adapter-inquirer': 3.0.1(@inquirer/prompts@7.8.2(@types/node@20.19.37))(@types/node@20.19.37)(listr2@9.0.1) - '@modelcontextprotocol/sdk': 1.26.0(supports-color@7.2.0)(zod@4.1.13) + '@modelcontextprotocol/sdk': 1.26.0(zod@4.1.13) '@schematics/angular': 20.3.32(chokidar@4.0.3) '@yarnpkg/lockfile': 1.1.0 algoliasearch: 5.35.0 @@ -17938,7 +17778,7 @@ snapshots: jsonc-parser: 3.3.1 listr2: 9.0.1 npm-package-arg: 13.0.0 - pacote: 21.5.1(supports-color@7.2.0) + pacote: 21.5.1 resolve: 1.22.10 semver: 7.7.2 yargs: 18.0.0 @@ -17956,7 +17796,7 @@ snapshots: '@angular-devkit/schematics': 20.3.32(chokidar@4.0.3) '@inquirer/prompts': 7.8.2(@types/node@26.1.1) '@listr2/prompt-adapter-inquirer': 3.0.1(@inquirer/prompts@7.8.2(@types/node@26.1.1))(@types/node@26.1.1)(listr2@9.0.1) - '@modelcontextprotocol/sdk': 1.26.0(supports-color@7.2.0)(zod@4.1.13) + '@modelcontextprotocol/sdk': 1.26.0(zod@4.1.13) '@schematics/angular': 20.3.32(chokidar@4.0.3) '@yarnpkg/lockfile': 1.1.0 algoliasearch: 5.35.0 @@ -17964,7 +17804,7 @@ snapshots: jsonc-parser: 3.3.1 listr2: 9.0.1 npm-package-arg: 13.0.0 - pacote: 21.5.1(supports-color@7.2.0) + pacote: 21.5.1 resolve: 1.22.10 semver: 7.7.2 yargs: 18.0.0 @@ -17975,13 +17815,13 @@ snapshots: - chokidar - supports-color - '@angular/cli@22.1.2(@types/node@26.1.1)(chokidar@5.0.0)': + '@angular/cli@22.1.2(@types/node@20.19.37)(chokidar@5.0.0)': dependencies: '@angular-devkit/architect': 0.2201.2(chokidar@5.0.0) '@angular-devkit/core': 22.1.2(chokidar@5.0.0) '@angular-devkit/schematics': 22.1.2(chokidar@5.0.0) - '@inquirer/prompts': 8.5.2(@types/node@26.1.1) - '@listr2/prompt-adapter-inquirer': 4.2.4(@inquirer/prompts@8.5.2(@types/node@26.1.1))(@types/node@26.1.1)(listr2@10.2.2) + '@inquirer/prompts': 8.5.2(@types/node@20.19.37) + '@listr2/prompt-adapter-inquirer': 4.2.4(@inquirer/prompts@8.5.2(@types/node@20.19.37))(@types/node@20.19.37)(listr2@10.2.2) '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) '@schematics/angular': 22.1.2(chokidar@5.0.0) jsonc-parser: 3.3.1 @@ -18093,7 +17933,7 @@ snapshots: '@standard-schema/spec': 1.1.0 rxjs: 7.8.2 tslib: 2.8.1 - zod: 4.4.2 + zod: 4.4.3 '@angular/platform-browser-dynamic@20.3.27(@angular/common@20.3.27(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@20.3.27)(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@20.3.27(@angular/common@20.3.27(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@20.3.27(@angular/compiler@20.3.27)(rxjs@7.8.2)(zone.js@0.15.1)))': dependencies: @@ -18219,17 +18059,17 @@ snapshots: obug: 2.1.4 semver: 7.8.5 - '@babel/eslint-parser@7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))': + '@babel/eslint-parser@7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1))': dependencies: '@babel/core': 7.29.7 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) eslint-visitor-keys: 2.1.0 semver: 6.3.1 - '@babel/eslint-parser@7.29.7(@babel/core@7.29.7)(eslint@9.39.4(jiti@2.6.1))': + '@babel/eslint-parser@7.29.7(@babel/core@8.0.1)(eslint@9.39.4(jiti@2.6.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 8.0.1 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 eslint: 9.39.4(jiti@2.6.1) eslint-visitor-keys: 2.1.0 @@ -18354,7 +18194,7 @@ snapshots: regexpu-core: 6.4.0 semver: 7.8.5 - '@babel/helper-define-polyfill-provider@0.4.4(@babel/core@7.29.7)(supports-color@7.2.0)': + '@babel/helper-define-polyfill-provider@0.4.4(@babel/core@7.29.7)': dependencies: '@babel/core': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 @@ -18365,7 +18205,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-define-polyfill-provider@0.5.0(@babel/core@7.29.7)(supports-color@7.2.0)': + '@babel/helper-define-polyfill-provider@0.5.0(@babel/core@7.29.7)': dependencies: '@babel/core': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 @@ -19789,14 +19629,14 @@ snapshots: '@babel/core': 8.0.1 '@babel/helper-plugin-utils': 8.0.1(@babel/core@8.0.1) - '@babel/plugin-transform-runtime@7.23.3(@babel/core@7.29.7)(supports-color@7.2.0)': + '@babel/plugin-transform-runtime@7.23.3(@babel/core@7.29.7)': dependencies: '@babel/core': 7.29.7 '@babel/helper-module-imports': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7) - babel-plugin-polyfill-corejs3: 0.8.7(@babel/core@7.29.7)(supports-color@7.2.0) - babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.29.7)(supports-color@7.2.0) + babel-plugin-polyfill-corejs3: 0.8.7(@babel/core@7.29.7) + babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.29.7) semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -20456,23 +20296,12 @@ snapshots: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1)': - dependencies: - '@csstools/css-tokenizer': 2.4.1 - '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-tokenizer': 3.0.4 - '@csstools/css-tokenizer@2.4.1': {} - '@csstools/css-tokenizer@3.0.4': {} - '@csstools/media-query-list-parser@2.1.13(@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1))(@csstools/css-tokenizer@2.4.1)': - dependencies: - '@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1) - '@csstools/css-tokenizer': 2.4.1 - '@csstools/media-query-list-parser@3.0.1(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) @@ -20483,10 +20312,6 @@ snapshots: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.4)': - dependencies: - postcss-selector-parser: 6.1.4 - '@csstools/selector-specificity@5.0.0(postcss-selector-parser@7.1.5)': dependencies: postcss-selector-parser: 7.1.5 @@ -20663,11 +20488,6 @@ snapshots: '@esbuild/win32-x64@0.28.1': optional: true - '@eslint-community/eslint-utils@4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))': - dependencies: - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.10.1(eslint@9.39.4(jiti@2.6.1))': dependencies: eslint: 9.39.4(jiti@2.6.1) @@ -20682,13 +20502,13 @@ snapshots: '@eslint-stylistic/metadata@2.13.0': {} - '@eslint/compat@1.4.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))': + '@eslint/compat@1.4.1(eslint@9.39.4(jiti@2.6.1))': dependencies: '@eslint/core': 0.17.0 optionalDependencies: - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) - '@eslint/config-array@0.21.2(supports-color@7.2.0)': + '@eslint/config-array@0.21.2': dependencies: '@eslint/object-schema': 2.1.7 debug: 4.4.3(supports-color@7.2.0) @@ -20811,14 +20631,14 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/checkbox@5.2.1(@types/node@26.1.1)': + '@inquirer/checkbox@5.2.1(@types/node@20.19.37)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/confirm@5.1.14(@types/node@20.11.17)': dependencies: @@ -20855,12 +20675,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/confirm@6.1.1(@types/node@26.1.1)': + '@inquirer/confirm@6.1.1(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/core@10.3.2(@types/node@20.11.17)': dependencies: @@ -20901,17 +20721,17 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/core@11.2.1(@types/node@26.1.1)': + '@inquirer/core@11.2.1(@types/node@20.19.37)': dependencies: '@inquirer/ansi': 2.0.7 '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/type': 4.0.7(@types/node@20.19.37) cli-width: 4.1.0 fast-wrap-ansi: 0.2.2 mute-stream: 3.0.0 signal-exit: 4.1.0 optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/editor@4.2.23(@types/node@20.11.17)': dependencies: @@ -20937,13 +20757,13 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/editor@5.2.2(@types/node@26.1.1)': + '@inquirer/editor@5.2.2(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/external-editor': 3.0.3(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/external-editor': 3.0.3(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/expand@4.0.23(@types/node@20.11.17)': dependencies: @@ -20969,12 +20789,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/expand@5.1.1(@types/node@26.1.1)': + '@inquirer/expand@5.1.1(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/external-editor@1.0.3(@types/node@20.11.17)': dependencies: @@ -20997,12 +20817,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/external-editor@3.0.3(@types/node@26.1.1)': + '@inquirer/external-editor@3.0.3(@types/node@20.19.37)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.2 optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/figures@1.0.15': {} @@ -21029,12 +20849,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/input@5.1.2(@types/node@26.1.1)': + '@inquirer/input@5.1.2(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/number@3.0.23(@types/node@20.11.17)': dependencies: @@ -21057,12 +20877,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/number@4.1.1(@types/node@26.1.1)': + '@inquirer/number@4.1.1(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/password@4.0.23(@types/node@20.11.17)': dependencies: @@ -21088,13 +20908,13 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/password@5.1.1(@types/node@26.1.1)': + '@inquirer/password@5.1.1(@types/node@20.19.37)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/prompts@7.8.2(@types/node@20.11.17)': dependencies: @@ -21141,20 +20961,20 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/prompts@8.5.2(@types/node@26.1.1)': + '@inquirer/prompts@8.5.2(@types/node@20.19.37)': dependencies: - '@inquirer/checkbox': 5.2.1(@types/node@26.1.1) - '@inquirer/confirm': 6.1.1(@types/node@26.1.1) - '@inquirer/editor': 5.2.2(@types/node@26.1.1) - '@inquirer/expand': 5.1.1(@types/node@26.1.1) - '@inquirer/input': 5.1.2(@types/node@26.1.1) - '@inquirer/number': 4.1.1(@types/node@26.1.1) - '@inquirer/password': 5.1.1(@types/node@26.1.1) - '@inquirer/rawlist': 5.3.1(@types/node@26.1.1) - '@inquirer/search': 4.2.1(@types/node@26.1.1) - '@inquirer/select': 5.2.1(@types/node@26.1.1) + '@inquirer/checkbox': 5.2.1(@types/node@20.19.37) + '@inquirer/confirm': 6.1.1(@types/node@20.19.37) + '@inquirer/editor': 5.2.2(@types/node@20.19.37) + '@inquirer/expand': 5.1.1(@types/node@20.19.37) + '@inquirer/input': 5.1.2(@types/node@20.19.37) + '@inquirer/number': 4.1.1(@types/node@20.19.37) + '@inquirer/password': 5.1.1(@types/node@20.19.37) + '@inquirer/rawlist': 5.3.1(@types/node@20.19.37) + '@inquirer/search': 4.2.1(@types/node@20.19.37) + '@inquirer/select': 5.2.1(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/rawlist@4.1.11(@types/node@20.11.17)': dependencies: @@ -21180,12 +21000,12 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/rawlist@5.3.1(@types/node@26.1.1)': + '@inquirer/rawlist@5.3.1(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/search@3.2.2(@types/node@20.11.17)': dependencies: @@ -21214,13 +21034,13 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/search@4.2.1(@types/node@26.1.1)': + '@inquirer/search@4.2.1(@types/node@20.19.37)': dependencies: - '@inquirer/core': 11.2.1(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/select@4.4.2(@types/node@20.11.17)': dependencies: @@ -21252,14 +21072,14 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/select@5.2.1(@types/node@26.1.1)': + '@inquirer/select@5.2.1(@types/node@20.19.37)': dependencies: '@inquirer/ansi': 2.0.7 - '@inquirer/core': 11.2.1(@types/node@26.1.1) + '@inquirer/core': 11.2.1(@types/node@20.19.37) '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/type': 4.0.7(@types/node@20.19.37) optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@inquirer/type@3.0.10(@types/node@20.11.17)': optionalDependencies: @@ -21273,9 +21093,9 @@ snapshots: optionalDependencies: '@types/node': 26.1.1 - '@inquirer/type@4.0.7(@types/node@26.1.1)': + '@inquirer/type@4.0.7(@types/node@20.19.37)': optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 '@isaacs/cliui@8.0.2': dependencies: @@ -21999,10 +21819,10 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@listr2/prompt-adapter-inquirer@4.2.4(@inquirer/prompts@8.5.2(@types/node@26.1.1))(@types/node@26.1.1)(listr2@10.2.2)': + '@listr2/prompt-adapter-inquirer@4.2.4(@inquirer/prompts@8.5.2(@types/node@20.19.37))(@types/node@20.19.37)(listr2@10.2.2)': dependencies: - '@inquirer/prompts': 8.5.2(@types/node@26.1.1) - '@inquirer/type': 4.0.7(@types/node@26.1.1) + '@inquirer/prompts': 8.5.2(@types/node@20.19.37) + '@inquirer/type': 4.0.7(@types/node@20.19.37) listr2: 10.2.2 transitivePeerDependencies: - '@types/node' @@ -22079,7 +21899,7 @@ snapshots: '@lezer/lr': 1.4.10 json5: 2.2.3 - '@modelcontextprotocol/sdk@1.26.0(supports-color@7.2.0)(zod@4.1.13)': + '@modelcontextprotocol/sdk@1.26.0(zod@4.1.13)': dependencies: '@hono/node-server': 2.0.12(hono@4.13.0) ajv: 8.20.0 @@ -22089,7 +21909,7 @@ snapshots: cross-spawn: 7.0.6 eventsource: 3.0.7 eventsource-parser: 3.0.8 - express: 5.2.1(supports-color@7.2.0) + express: 5.2.1 express-rate-limit: 8.3.2(express@5.2.1) hono: 4.13.0 jose: 6.2.2 @@ -22111,7 +21931,7 @@ snapshots: cross-spawn: 7.0.6 eventsource: 3.0.7 eventsource-parser: 3.0.8 - express: 5.2.1(supports-color@7.2.0) + express: 5.2.1 express-rate-limit: 8.3.2(express@5.2.1) hono: 4.13.0 jose: 6.2.2 @@ -23712,10 +23532,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@sigstore/tuf@4.0.2(supports-color@7.2.0)': + '@sigstore/tuf@4.0.2': dependencies: '@sigstore/protobuf-specs': 0.5.1 - tuf-js: 4.1.0(supports-color@7.2.0) + tuf-js: 4.1.0 transitivePeerDependencies: - supports-color @@ -23915,16 +23735,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@stylistic/eslint-plugin@5.10.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))': - dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - '@typescript-eslint/types': 8.62.0 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - estraverse: 5.3.0 - picomatch: 4.0.4 - '@stylistic/eslint-plugin@5.10.0(eslint@9.39.4(jiti@2.6.1))': dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) @@ -23935,7 +23745,7 @@ snapshots: estraverse: 5.3.0 picomatch: 4.0.4 - '@stylistic/stylelint-plugin@3.1.3(stylelint@16.22.0(typescript@6.0.3))': + '@stylistic/stylelint-plugin@3.1.3(stylelint@16.22.0(typescript@5.9.3))': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 @@ -23945,7 +23755,7 @@ snapshots: postcss-selector-parser: 6.1.4 postcss-value-parser: 4.2.0 style-search: 0.1.0 - stylelint: 16.22.0(typescript@6.0.3) + stylelint: 16.22.0(typescript@5.9.3) '@swc/core-darwin-arm64@1.15.30': optional: true @@ -24016,7 +23826,7 @@ snapshots: dependencies: axe-core: 4.11.3 chalk: 2.4.2 - testcafe: 3.7.5(supports-color@7.2.0) + testcafe: 3.7.5 '@testing-library/dom@10.4.1': dependencies: @@ -24286,8 +24096,6 @@ snapshots: '@types/minimatch@5.1.2': {} - '@types/minimist@1.2.5': {} - '@types/ms@2.1.0': {} '@types/node-fetch@2.6.13': @@ -24433,16 +24241,16 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + '@typescript-eslint/parser': 6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/utils': 6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3) + '@typescript-eslint/type-utils': 6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) + '@typescript-eslint/utils': 6.21.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -24453,22 +24261,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/type-utils': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/utils': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.52.0 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -24517,10 +24309,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3)': + '@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) '@typescript-eslint/scope-manager': 8.52.0 '@typescript-eslint/type-utils': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) '@typescript-eslint/utils': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) @@ -24541,31 +24333,19 @@ snapshots: - supports-color - typescript - '@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@6.0.3) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) optionalDependencies: typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@6.0.3) - '@typescript-eslint/visitor-keys': 8.52.0 - debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - typescript: 6.0.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5)': dependencies: '@typescript-eslint/scope-manager': 8.52.0 @@ -24602,6 +24382,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.52.0 + '@typescript-eslint/types': 8.52.0 + '@typescript-eslint/typescript-estree': 8.52.0(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.52.0 + debug: 4.4.3(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.52.0(typescript@4.9.5)': dependencies: '@typescript-eslint/tsconfig-utils': 8.62.0(typescript@4.9.5) @@ -24665,7 +24457,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.62.0(supports-color@7.2.0)(typescript@4.9.5)': + '@typescript-eslint/project-service@8.58.2(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.62.0(typescript@5.9.3) + '@typescript-eslint/types': 8.62.0 + debug: 4.4.3(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.62.0(typescript@4.9.5)': dependencies: '@typescript-eslint/tsconfig-utils': 8.62.0(typescript@4.9.5) '@typescript-eslint/types': 8.62.0 @@ -24728,6 +24529,10 @@ snapshots: dependencies: typescript: 5.8.3 + '@typescript-eslint/tsconfig-utils@8.58.2(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + '@typescript-eslint/tsconfig-utils@8.58.2(typescript@6.0.3)': dependencies: typescript: 6.0.3 @@ -24748,30 +24553,18 @@ snapshots: dependencies: typescript: 6.0.3 - '@typescript-eslint/type-utils@6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@typescript-eslint/type-utils@6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@6.0.3) - '@typescript-eslint/utils': 6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3) + '@typescript-eslint/utils': 6.21.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) ts-api-utils: 1.4.3(typescript@6.0.3) optionalDependencies: typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': - dependencies: - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@6.0.3) - '@typescript-eslint/utils': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3) - debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5)': dependencies: '@typescript-eslint/types': 8.52.0 @@ -24995,9 +24788,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.62.0(supports-color@7.2.0)(typescript@4.9.5)': + '@typescript-eslint/typescript-estree@8.58.2(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.58.2(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@5.9.3) + '@typescript-eslint/types': 8.58.2 + '@typescript-eslint/visitor-keys': 8.58.2 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 10.2.4 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.62.0(typescript@4.9.5)': dependencies: - '@typescript-eslint/project-service': 8.62.0(supports-color@7.2.0)(typescript@4.9.5) + '@typescript-eslint/project-service': 8.62.0(typescript@4.9.5) '@typescript-eslint/tsconfig-utils': 8.62.0(typescript@4.9.5) '@typescript-eslint/types': 8.62.0 '@typescript-eslint/visitor-keys': 8.62.0 @@ -25025,42 +24833,31 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3)': + '@typescript-eslint/utils@6.21.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@types/json-schema': 7.0.15 '@types/semver': 7.7.1 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) semver: 7.8.5 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.18.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@typescript-eslint/utils@7.18.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(typescript@6.0.3)': - dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - '@typescript-eslint/scope-manager': 8.52.0 - '@typescript-eslint/types': 8.52.0 - '@typescript-eslint/typescript-estree': 8.52.0(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - typescript: 6.0.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5)': dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) @@ -25105,13 +24902,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.58.2(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@typescript-eslint/utils@8.58.2(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.58.2 '@typescript-eslint/types': 8.58.2 '@typescript-eslint/typescript-estree': 8.58.2(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -25138,23 +24935,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3)': + '@typescript-eslint/utils@8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.58.2 '@typescript-eslint/types': 8.58.2 - '@typescript-eslint/typescript-estree': 8.58.2(supports-color@7.2.0)(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) - typescript: 6.0.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.62.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@4.9.5)': + '@typescript-eslint/utils@8.62.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5)': dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.62.0 '@typescript-eslint/types': 8.62.0 - '@typescript-eslint/typescript-estree': 8.62.0(supports-color@7.2.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 8.62.0(typescript@4.9.5) eslint: 9.39.4(jiti@2.6.1) typescript: 4.9.5 transitivePeerDependencies: @@ -25275,9 +25072,9 @@ snapshots: vite: 7.3.6(@types/node@26.1.1)(jiti@2.6.1)(less@4.8.0)(lightningcss@1.32.0)(sass-embedded@1.93.3)(sass@1.90.0)(terser@5.49.0)(yaml@2.9.0) optional: true - '@vitejs/plugin-basic-ssl@2.3.0(vite@8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0))': + '@vitejs/plugin-basic-ssl@2.3.0(vite@8.1.5(@types/node@20.19.37)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0))': dependencies: - vite: 8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0) + vite: 8.1.5(@types/node@20.19.37)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0) '@vitejs/plugin-react@4.7.0(vite@8.0.16(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.8.3))': dependencies: @@ -25457,13 +25254,13 @@ snapshots: '@vue/devtools-api@6.6.4': {} - '@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)': + '@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))))(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3)': dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/parser': 6.21.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)) - vue-eslint-parser: 9.4.3(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) + '@typescript-eslint/parser': 6.21.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) + eslint: 9.39.4(jiti@2.6.1) + eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) + vue-eslint-parser: 9.4.3(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0) optionalDependencies: typescript: 6.0.3 transitivePeerDependencies: @@ -25999,8 +25796,6 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 - arrify@1.0.1: {} - asn1.js@4.10.1: dependencies: bn.js: 4.12.3 @@ -26232,10 +26027,10 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.8.7(@babel/core@7.29.7)(supports-color@7.2.0): + babel-plugin-polyfill-corejs3@0.8.7(@babel/core@7.29.7): dependencies: '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.29.7)(supports-color@7.2.0) + '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.29.7) core-js-compat: 3.49.0 transitivePeerDependencies: - supports-color @@ -26246,10 +26041,10 @@ snapshots: '@babel/helper-define-polyfill-provider': 1.0.0(@babel/core@8.0.1) core-js-compat: 3.49.0 - babel-plugin-polyfill-regenerator@0.5.5(@babel/core@7.29.7)(supports-color@7.2.0): + babel-plugin-polyfill-regenerator@0.5.5(@babel/core@7.29.7): dependencies: '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.29.7)(supports-color@7.2.0) + '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.29.7) transitivePeerDependencies: - supports-color @@ -26444,7 +26239,7 @@ snapshots: transitivePeerDependencies: - supports-color - body-parser@2.3.0(supports-color@7.2.0): + body-parser@2.3.0: dependencies: bytes: 3.1.2 content-type: 2.0.0 @@ -26699,13 +26494,6 @@ snapshots: pascal-case: 3.1.2 tslib: 2.8.1 - camelcase-keys@7.0.2: - dependencies: - camelcase: 6.3.0 - map-obj: 4.3.0 - quick-lru: 5.1.1 - type-fest: 1.4.0 - camelcase@5.3.1: {} camelcase@6.3.0: {} @@ -27205,24 +26993,6 @@ snapshots: path-type: 4.0.0 yaml: 1.10.3 - cosmiconfig@8.3.6(typescript@4.9.5): - dependencies: - import-fresh: 3.3.1 - js-yaml: 4.3.1 - parse-json: 5.2.0 - path-type: 4.0.0 - optionalDependencies: - typescript: 4.9.5 - - cosmiconfig@8.3.6(typescript@5.8.3): - dependencies: - import-fresh: 3.3.1 - js-yaml: 4.3.1 - parse-json: 5.2.0 - path-type: 4.0.0 - optionalDependencies: - typescript: 5.8.3 - cosmiconfig@8.3.6(typescript@5.9.3): dependencies: import-fresh: 3.3.1 @@ -27232,14 +27002,14 @@ snapshots: optionalDependencies: typescript: 5.9.3 - cosmiconfig@8.3.6(typescript@6.0.3): + cosmiconfig@9.0.1(typescript@4.9.5): dependencies: + env-paths: 2.2.1 import-fresh: 3.3.1 js-yaml: 4.3.1 parse-json: 5.2.0 - path-type: 4.0.0 optionalDependencies: - typescript: 6.0.3 + typescript: 4.9.5 cosmiconfig@9.0.1(typescript@5.8.3): dependencies: @@ -27423,11 +27193,6 @@ snapshots: domutils: 3.2.2 nth-check: 2.1.1 - css-tree@2.3.1: - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.1 - css-tree@3.2.1: dependencies: mdn-data: 2.27.1 @@ -27507,15 +27272,6 @@ snapshots: optionalDependencies: supports-color: 7.2.0 - decamelize-keys@1.1.1: - dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - - decamelize@1.2.0: {} - - decamelize@5.0.1: {} - decimal.js@10.6.0: {} decode-named-character-reference@1.3.0: @@ -27767,7 +27523,7 @@ snapshots: color-diff: 1.3.0 looks-same: 7.3.0 pngjs: 6.0.0 - testcafe: 3.7.5(supports-color@7.2.0) + testcafe: 3.7.5 tslib: 2.8.1 device-specs@1.0.1: {} @@ -27982,11 +27738,6 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.3.2 - enhanced-resolve@5.24.3: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.3 - enhanced-resolve@5.24.5: dependencies: graceful-fs: 4.2.11 @@ -28224,33 +27975,24 @@ snapshots: eslint: 9.39.4(jiti@2.6.1) semver: 7.8.5 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)): dependencies: confusing-browser-globals: 1.0.11 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + eslint: 9.39.4(jiti@2.6.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) object.assign: 4.1.7 object.entries: 1.1.9 semver: 6.3.1 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)): dependencies: confusing-browser-globals: 1.0.11 eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)) object.assign: 4.1.7 object.entries: 1.1.9 semver: 6.3.1 - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): - dependencies: - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - transitivePeerDependencies: - - eslint-plugin-import - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)): dependencies: '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) @@ -28260,14 +28002,23 @@ snapshots: transitivePeerDependencies: - eslint-plugin-import - eslint-config-devextreme@1.1.12(4c739bafb4997092ce83f049f167b131): + eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)): + dependencies: + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + eslint: 9.39.4(jiti@2.6.1) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1)) + transitivePeerDependencies: + - eslint-plugin-import + + eslint-config-devextreme@1.1.12(25bff8f024558126068f85a113b20273): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) eslint: 9.39.4(jiti@2.6.1) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.11.17)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.11.17)(typescript@4.9.5)))(typescript@4.9.5) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28276,36 +28027,36 @@ snapshots: eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@4.9.5) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@4.9.5)) - - eslint-config-devextreme@1.1.12(554dde2dfd68364add0a2758e579b8b7): - dependencies: - '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + stylelint: 16.22.0(typescript@4.9.5) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@4.9.5)) + + eslint-config-devextreme@1.1.12(26d103e2bc0fb2b710d828b206e45d41): + dependencies: + '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + eslint: 9.39.4(jiti@2.6.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3) + eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint-plugin-react: 7.37.5(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint-plugin-react-perf: 3.3.3(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-react: 7.37.5(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-react-perf: 3.3.3(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-rulesdir: 0.2.2 - eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)) + eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) stylelint: 16.22.0(typescript@6.0.3) stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@6.0.3)) - eslint-config-devextreme@1.1.12(5552857efccfb3f1ba025df865cdfd0e): + eslint-config-devextreme@1.1.12(3d401928aa66bf2e591f933b2739e58c): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.8.3) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.9.3) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28313,18 +28064,18 @@ snapshots: eslint-plugin-react-perf: 3.3.3(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@5.8.3) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@5.8.3)) + eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@5.9.3)) - eslint-config-devextreme@1.1.12(70f56e711195e33f9b23259278af4356): + eslint-config-devextreme@1.1.12(7dd464a0604f1d8e6bd5fce5260d6037): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.9.3) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28333,17 +28084,17 @@ snapshots: eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@6.0.3) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@6.0.3)) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@5.9.3)) - eslint-config-devextreme@1.1.12(e43b4562c396170e08a0bcb0bebad46e): + eslint-config-devextreme@1.1.12(a25cda3163463b9772ba2a773a10316c): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@4.9.5) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.8.3) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28351,18 +28102,18 @@ snapshots: eslint-plugin-react-perf: 3.3.3(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@4.9.5) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@4.9.5)) + eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) + stylelint: 16.22.0(typescript@5.8.3) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@5.8.3)) - eslint-config-devextreme@1.1.12(e659abf94f261cb548f87457fcc52d78): + eslint-config-devextreme@1.1.12(a8f9319687a53bec0d2a70b73ac5ccad): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) eslint: 9.39.4(jiti@2.6.1) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@4.9.5) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28371,17 +28122,17 @@ snapshots: eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@4.9.5) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@4.9.5)) + stylelint: 16.22.0(typescript@4.9.5) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@4.9.5)) - eslint-config-devextreme@1.1.12(f43ede1c63aef08b124dbf33bc5f83fb): + eslint-config-devextreme@1.1.12(ba83ebe55aa7666ff88d6674f941478c): dependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@9.39.4(jiti@2.6.1)) - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)) + eslint-plugin-jest: 29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.11.17)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.11.17)(typescript@4.9.5)))(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-qunit: 8.2.6(eslint@9.39.4(jiti@2.6.1)) @@ -28389,9 +28140,9 @@ snapshots: eslint-plugin-react-perf: 3.3.3(eslint@9.39.4(jiti@2.6.1)) eslint-plugin-rulesdir: 0.2.2 eslint-plugin-spellcheck: 0.0.20(eslint@9.39.4(jiti@2.6.1)) - eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) - stylelint: 15.11.0(typescript@6.0.3) - stylelint-config-standard: 38.0.0(stylelint@15.11.0(typescript@6.0.3)) + eslint-plugin-vue: 10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))) + stylelint: 16.22.0(typescript@4.9.5) + stylelint-config-standard: 38.0.0(stylelint@16.22.0(typescript@4.9.5)) eslint-import-resolver-node@0.3.10: dependencies: @@ -28401,50 +28152,50 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) + eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-plugin-deprecation@3.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3): + eslint-plugin-deprecation@3.0.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3): dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + '@typescript-eslint/utils': 7.18.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) + eslint: 9.39.4(jiti@2.6.1) ts-api-utils: 1.4.3(typescript@6.0.3) tslib: 2.8.1 typescript: 6.0.3 @@ -28460,7 +28211,7 @@ snapshots: eslint-plugin-i18n@2.4.0: {} - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -28469,9 +28220,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) hasown: 2.0.4 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -28483,13 +28234,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -28500,7 +28251,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) hasown: 2.0.4 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -28512,13 +28263,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.4(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -28529,7 +28280,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) hasown: 2.0.4 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -28541,13 +28292,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -28558,7 +28309,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.4(jiti@2.6.1) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.4(jiti@2.6.1)) hasown: 2.0.4 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -28570,7 +28321,7 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -28580,17 +28331,6 @@ snapshots: dependencies: eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3): - dependencies: - '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - jest: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) - typescript: 6.0.3 - transitivePeerDependencies: - - supports-color - eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.11.17)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.11.17)(typescript@4.9.5)))(typescript@4.9.5): dependencies: '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) @@ -28635,46 +28375,38 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3): + eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) optionalDependencies: '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) - jest: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) - typescript: 6.0.3 + jest: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3): + eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@5.9.3): dependencies: - '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) jest: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) - typescript: 6.0.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): + eslint-plugin-jest@29.15.2(@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)))(supports-color@7.2.0)(typescript@6.0.3): dependencies: - aria-query: 5.3.2 - array-includes: 3.1.9 - array.prototype.flatmap: 1.3.3 - ast-types-flow: 0.0.8 - axe-core: 4.12.1 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - hasown: 2.0.4 - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 3.1.5 - object.fromentries: 2.0.8 - safe-regex-test: 1.1.0 - string.prototype.includes: 2.0.1 + '@typescript-eslint/utils': 8.58.2(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@6.0.3) + eslint: 9.39.4(jiti@2.6.1) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + jest: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4(jiti@2.6.1)): dependencies: @@ -28712,30 +28444,24 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-perfectionist@5.9.1(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@4.9.5): + eslint-plugin-perfectionist@5.9.1(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5): dependencies: - '@typescript-eslint/utils': 8.62.0(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0)(typescript@4.9.5) + '@typescript-eslint/utils': 8.62.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5) eslint: 9.39.4(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-qunit@8.2.6(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): - dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - requireindex: 1.2.0 - eslint-plugin-qunit@8.2.6(eslint@9.39.4(jiti@2.6.1)): dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) eslint: 9.39.4(jiti@2.6.1) requireindex: 1.2.0 - eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): + eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)): dependencies: - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) eslint-plugin-react-hooks@7.0.1(eslint@9.39.4(jiti@2.6.1)): dependencies: @@ -28743,15 +28469,11 @@ snapshots: '@babel/parser': 7.29.2 eslint: 9.39.4(jiti@2.6.1) hermes-parser: 0.25.1 - zod: 4.4.2 - zod-validation-error: 4.0.2(zod@4.4.2) + zod: 4.4.3 + zod-validation-error: 4.0.2(zod@4.4.3) transitivePeerDependencies: - supports-color - eslint-plugin-react-perf@3.3.3(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): - dependencies: - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-plugin-react-perf@3.3.3(eslint@9.39.4(jiti@2.6.1)): dependencies: eslint: 9.39.4(jiti@2.6.1) @@ -28760,28 +28482,6 @@ snapshots: dependencies: eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-react@7.37.5(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): - dependencies: - array-includes: 3.1.9 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.3 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.3.2 - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - estraverse: 5.3.0 - hasown: 2.0.3 - jsx-ast-utils: 3.3.5 - minimatch: 3.1.5 - object.entries: 1.1.9 - object.fromentries: 2.0.8 - object.values: 1.2.1 - prop-types: 15.8.1 - resolve: 2.0.0-next.6 - semver: 6.3.1 - string.prototype.matchall: 4.0.12 - string.prototype.repeat: 1.0.0 - eslint-plugin-react@7.37.5(eslint@9.39.4(jiti@2.6.1)): dependencies: array-includes: 3.1.9 @@ -28810,13 +28510,6 @@ snapshots: dependencies: eslint: 9.39.4(jiti@2.6.1) - eslint-plugin-spellcheck@0.0.20(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)): - dependencies: - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - globals: 13.24.0 - hunspell-spellchecker: 1.0.2 - lodash: 4.18.1 - eslint-plugin-spellcheck@0.0.20(eslint@9.39.4(jiti@2.6.1)): dependencies: eslint: 9.39.4(jiti@2.6.1) @@ -28848,19 +28541,6 @@ snapshots: semver: 7.7.4 strip-indent: 4.1.1 - eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)): - dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - natural-compare: 1.4.0 - nth-check: 2.1.1 - postcss-selector-parser: 6.1.4 - semver: 7.8.5 - vue-eslint-parser: 10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0) - xml-name-validator: 4.0.0 - optionalDependencies: - '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3) - eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@4.9.5))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))): dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) @@ -28900,6 +28580,19 @@ snapshots: optionalDependencies: '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-vue@10.4.0(@typescript-eslint/parser@8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3))(eslint@9.39.4(jiti@2.6.1))(vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1))): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) + eslint: 9.39.4(jiti@2.6.1) + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.1.4 + semver: 7.8.5 + vue-eslint-parser: 10.0.0(eslint@9.39.4(jiti@2.6.1)) + xml-name-validator: 4.0.0 + optionalDependencies: + '@typescript-eslint/parser': 8.52.0(eslint@9.39.4(jiti@2.6.1))(typescript@6.0.3) + eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 @@ -28927,48 +28620,7 @@ snapshots: dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2(supports-color@7.2.0) - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.5 - '@eslint/js': 9.39.4 - '@eslint/plugin-kit': 0.4.1 - '@humanfs/node': 0.16.8 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.9 - ajv: 6.14.0 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@7.2.0) - escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.7.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.5 - natural-compare: 1.4.0 - optionator: 0.9.4 - optionalDependencies: - jiti: 2.6.1 - transitivePeerDependencies: - - supports-color - - eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0): - dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2(supports-color@7.2.0) + '@eslint/config-array': 0.21.2 '@eslint/config-helpers': 0.4.2 '@eslint/core': 0.17.0 '@eslint/eslintrc': 3.3.5 @@ -29154,7 +28806,7 @@ snapshots: express-rate-limit@8.3.2(express@5.2.1): dependencies: - express: 5.2.1(supports-color@7.2.0) + express: 5.2.1 ip-address: 10.4.0 express@4.22.1: @@ -29193,10 +28845,10 @@ snapshots: transitivePeerDependencies: - supports-color - express@5.2.1(supports-color@7.2.0): + express@5.2.1: dependencies: accepts: 2.0.0 - body-parser: 2.3.0(supports-color@7.2.0) + body-parser: 2.3.0 content-disposition: 1.1.0 content-type: 1.0.5 cookie: 0.7.2 @@ -29206,7 +28858,7 @@ snapshots: encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 2.1.1(supports-color@7.2.0) + finalhandler: 2.1.1 fresh: 2.0.0 http-errors: 2.0.1 merge-descriptors: 2.0.0 @@ -29217,8 +28869,8 @@ snapshots: proxy-addr: 2.0.7 qs: 6.15.3 range-parser: 1.3.0 - router: 2.2.0(supports-color@7.2.0) - send: 1.2.1(supports-color@7.2.0) + router: 2.2.0 + send: 1.2.1 serve-static: 2.2.1 statuses: 2.0.2 type-is: 2.1.0 @@ -29323,10 +28975,6 @@ snapshots: dependencies: flat-cache: 6.1.22 - file-entry-cache@7.0.2: - dependencies: - flat-cache: 3.2.0 - file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -29378,7 +29026,7 @@ snapshots: transitivePeerDependencies: - supports-color - finalhandler@2.1.1(supports-color@7.2.0): + finalhandler@2.1.1: dependencies: debug: 4.4.3(supports-color@7.2.0) encodeurl: 2.0.0 @@ -29779,8 +29427,6 @@ snapshots: optionalDependencies: uglify-js: 3.19.3 - hard-rejection@2.1.0: {} - harmony-reflect@1.6.2: {} has-bigints@1.1.0: {} @@ -29977,10 +29623,6 @@ snapshots: hosted-git-info@2.8.9: {} - hosted-git-info@4.1.0: - dependencies: - lru-cache: 6.0.0 - hosted-git-info@9.0.2: dependencies: lru-cache: 11.3.5 @@ -30294,8 +29936,6 @@ snapshots: import-lazy@3.1.0: {} - import-lazy@4.0.0: {} - import-local@3.2.0: dependencies: pkg-dir: 4.2.0 @@ -30553,8 +30193,6 @@ snapshots: is-path-inside@3.0.3: {} - is-plain-obj@1.1.0: {} - is-plain-obj@4.1.0: {} is-plain-object@2.0.4: @@ -30878,15 +30516,15 @@ snapshots: - supports-color - ts-node - jest-cli@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)): + jest-cli@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)): dependencies: - '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) + '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) '@jest/test-result': 30.4.1 '@jest/types': 30.4.1 chalk: 4.1.2 exit-x: 0.2.2 import-local: 3.2.0 - jest-config: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) + jest-config: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) jest-util: 30.4.1 jest-validate: 30.4.1 yargs: 17.7.2 @@ -30899,15 +30537,15 @@ snapshots: - supports-color - ts-node - jest-cli@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)): + jest-cli@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)): dependencies: - '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) '@jest/test-result': 30.4.1 '@jest/types': 30.4.1 chalk: 4.1.2 exit-x: 0.2.2 import-local: 3.2.0 - jest-config: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + jest-config: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) jest-util: 30.4.1 jest-validate: 30.4.1 yargs: 17.7.2 @@ -31242,38 +30880,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)): - dependencies: - '@babel/core': 7.29.7 - '@jest/get-type': 30.1.0 - '@jest/pattern': 30.4.0 - '@jest/test-sequencer': 30.4.1 - '@jest/types': 30.4.1 - babel-jest: 30.4.1(@babel/core@7.29.7) - chalk: 4.1.2 - ci-info: 4.4.0 - deepmerge: 4.3.1 - glob: 10.5.0 - graceful-fs: 4.2.11 - jest-circus: 30.4.2(babel-plugin-macros@3.1.0) - jest-docblock: 30.4.0 - jest-environment-node: 30.4.1 - jest-regex-util: 30.4.0 - jest-resolve: 30.4.1 - jest-runner: 30.4.2 - jest-util: 30.4.1 - jest-validate: 30.4.1 - parse-json: 5.2.0 - pretty-format: 30.4.1 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 26.1.1 - ts-node: 10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-diff@29.7.0: dependencies: chalk: 4.1.2 @@ -31812,12 +31418,12 @@ snapshots: - supports-color - ts-node - jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)): + jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)): dependencies: - '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) + '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) '@jest/types': 30.4.1 import-local: 3.2.0 - jest-cli: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) + jest-cli: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) optionalDependencies: node-notifier: 9.0.1 transitivePeerDependencies: @@ -31827,12 +31433,12 @@ snapshots: - supports-color - ts-node - jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)): + jest@30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)): dependencies: - '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + '@jest/core': 30.4.2(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) '@jest/types': 30.4.1 import-local: 3.2.0 - jest-cli: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@6.0.3)) + jest-cli: 30.4.2(@types/node@26.1.1)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) optionalDependencies: node-notifier: 9.0.1 transitivePeerDependencies: @@ -32067,8 +31673,6 @@ snapshots: knockout@3.5.3: {} - known-css-properties@0.29.0: {} - known-css-properties@0.35.0: {} known-css-properties@0.37.0: {} @@ -32521,10 +32125,6 @@ snapshots: dependencies: tmpl: 1.0.5 - map-obj@1.0.1: {} - - map-obj@4.3.0: {} - match-url-wildcard@0.0.4: dependencies: escape-string-regexp: 1.0.5 @@ -32593,8 +32193,6 @@ snapshots: dependencies: '@types/mdast': 3.0.15 - mdn-data@2.0.30: {} - mdn-data@2.27.1: {} mdn-data@2.28.0: {} @@ -32631,21 +32229,6 @@ snapshots: memorystream@0.3.1: {} - meow@10.1.5: - dependencies: - '@types/minimist': 1.2.5 - camelcase-keys: 7.0.2 - decamelize: 5.0.1 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 8.0.0 - redent: 4.0.0 - trim-newlines: 4.1.1 - type-fest: 1.4.0 - yargs-parser: 20.2.9 - meow@13.2.0: {} merge-descriptors@1.0.3: {} @@ -32869,12 +32452,6 @@ snapshots: dependencies: brace-expansion: 2.1.4 - minimist-options@4.1.0: - dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 - minimist@1.2.8: {} minimizer-webpack-plugin@5.6.1(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)(lightningcss@1.32.0)(postcss@8.5.23)(webpack@5.109.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(esbuild@0.28.1)(lightningcss@1.32.0)(postcss@8.5.23)): @@ -33241,13 +32818,6 @@ snapshots: semver: 5.7.2 validate-npm-package-license: 3.0.4 - normalize-package-data@3.0.3: - dependencies: - hosted-git-info: 4.1.0 - is-core-module: 2.16.2 - semver: 7.8.5 - validate-npm-package-license: 3.0.4 - normalize-path@3.0.0: {} normalize-range@0.1.2: {} @@ -33733,7 +33303,7 @@ snapshots: package-json-from-dist@1.0.1: {} - pacote@21.5.1(supports-color@7.2.0): + pacote@21.5.1: dependencies: '@gar/promise-retry': 1.0.3 '@npmcli/git': 7.0.2 @@ -33749,7 +33319,7 @@ snapshots: npm-pick-manifest: 11.0.3 npm-registry-fetch: 19.1.1 proc-log: 6.1.0 - sigstore: 4.1.1(supports-color@7.2.0) + sigstore: 4.1.1 ssri: 13.0.1 tar: 7.5.21 transitivePeerDependencies: @@ -34294,8 +33864,6 @@ snapshots: queue-microtask@1.2.3: {} - quick-lru@5.1.1: {} - quill-delta@5.1.0: dependencies: fast-diff: 1.3.0 @@ -34435,12 +34003,6 @@ snapshots: dependencies: readable-stream: 2.3.8 - read-pkg-up@8.0.0: - dependencies: - find-up: 5.0.0 - read-pkg: 6.0.0 - type-fest: 1.4.0 - read-pkg@5.2.0: dependencies: '@types/normalize-package-data': 2.4.4 @@ -34448,13 +34010,6 @@ snapshots: parse-json: 5.2.0 type-fest: 0.6.0 - read-pkg@6.0.0: - dependencies: - '@types/normalize-package-data': 2.4.4 - normalize-package-data: 3.0.3 - parse-json: 5.2.0 - type-fest: 1.4.0 - readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -34516,11 +34071,6 @@ snapshots: indent-string: 4.0.0 strip-indent: 3.0.0 - redent@4.0.0: - dependencies: - indent-string: 5.0.0 - strip-indent: 4.1.1 - reflect-metadata@0.1.13: {} reflect-metadata@0.2.2: {} @@ -34866,7 +34416,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.59.0 fsevents: 2.3.3 - router@2.2.0(supports-color@7.2.0): + router@2.2.0: dependencies: debug: 4.4.3(supports-color@7.2.0) depd: 2.0.0 @@ -35160,7 +34710,7 @@ snapshots: transitivePeerDependencies: - supports-color - send@1.2.1(supports-color@7.2.0): + send@1.2.1: dependencies: debug: 4.4.3(supports-color@7.2.0) encodeurl: 2.0.0 @@ -35204,7 +34754,7 @@ snapshots: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 1.2.1(supports-color@7.2.0) + send: 1.2.1 transitivePeerDependencies: - supports-color @@ -35316,13 +34866,13 @@ snapshots: dependencies: jquery: 4.0.0 - sigstore@4.1.1(supports-color@7.2.0): + sigstore@4.1.1: dependencies: '@sigstore/bundle': 4.0.0 '@sigstore/core': 3.2.1 '@sigstore/protobuf-specs': 0.5.1 '@sigstore/sign': 4.1.1 - '@sigstore/tuf': 4.0.2(supports-color@7.2.0) + '@sigstore/tuf': 4.0.2 '@sigstore/verify': 3.1.1 transitivePeerDependencies: - supports-color @@ -35763,12 +35313,12 @@ snapshots: postcss-html: 1.8.1 stylelint: 16.22.0(typescript@6.0.3) - stylelint-config-recommended-scss@14.1.0(postcss@8.5.23)(stylelint@16.22.0(typescript@6.0.3)): + stylelint-config-recommended-scss@14.1.0(postcss@8.5.23)(stylelint@16.22.0(typescript@5.9.3)): dependencies: postcss-scss: 4.0.9(postcss@8.5.23) - stylelint: 16.22.0(typescript@6.0.3) - stylelint-config-recommended: 14.0.1(stylelint@16.22.0(typescript@6.0.3)) - stylelint-scss: 6.10.0(stylelint@16.22.0(typescript@6.0.3)) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-recommended: 14.0.1(stylelint@16.22.0(typescript@5.9.3)) + stylelint-scss: 6.10.0(stylelint@16.22.0(typescript@5.9.3)) optionalDependencies: postcss: 8.5.23 @@ -35780,60 +35330,60 @@ snapshots: stylelint-config-html: 1.1.0(postcss-html@1.8.1)(stylelint@16.22.0(typescript@6.0.3)) stylelint-config-recommended: 16.0.0(stylelint@16.22.0(typescript@6.0.3)) - stylelint-config-recommended@14.0.1(stylelint@16.22.0(typescript@6.0.3)): + stylelint-config-recommended@14.0.1(stylelint@16.22.0(typescript@5.9.3)): dependencies: - stylelint: 16.22.0(typescript@6.0.3) + stylelint: 16.22.0(typescript@5.9.3) - stylelint-config-recommended@16.0.0(stylelint@15.11.0(typescript@4.9.5)): + stylelint-config-recommended@16.0.0(stylelint@16.22.0(typescript@4.9.5)): dependencies: - stylelint: 15.11.0(typescript@4.9.5) + stylelint: 16.22.0(typescript@4.9.5) - stylelint-config-recommended@16.0.0(stylelint@15.11.0(typescript@5.8.3)): + stylelint-config-recommended@16.0.0(stylelint@16.22.0(typescript@5.8.3)): dependencies: - stylelint: 15.11.0(typescript@5.8.3) + stylelint: 16.22.0(typescript@5.8.3) - stylelint-config-recommended@16.0.0(stylelint@15.11.0(typescript@6.0.3)): + stylelint-config-recommended@16.0.0(stylelint@16.22.0(typescript@5.9.3)): dependencies: - stylelint: 15.11.0(typescript@6.0.3) + stylelint: 16.22.0(typescript@5.9.3) stylelint-config-recommended@16.0.0(stylelint@16.22.0(typescript@6.0.3)): dependencies: stylelint: 16.22.0(typescript@6.0.3) - stylelint-config-standard-scss@14.0.0(postcss@8.5.23)(stylelint@16.22.0(typescript@6.0.3)): + stylelint-config-standard-scss@14.0.0(postcss@8.5.23)(stylelint@16.22.0(typescript@5.9.3)): dependencies: - stylelint: 16.22.0(typescript@6.0.3) - stylelint-config-recommended-scss: 14.1.0(postcss@8.5.23)(stylelint@16.22.0(typescript@6.0.3)) - stylelint-config-standard: 36.0.1(stylelint@16.22.0(typescript@6.0.3)) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-recommended-scss: 14.1.0(postcss@8.5.23)(stylelint@16.22.0(typescript@5.9.3)) + stylelint-config-standard: 36.0.1(stylelint@16.22.0(typescript@5.9.3)) optionalDependencies: postcss: 8.5.23 - stylelint-config-standard@36.0.1(stylelint@16.22.0(typescript@6.0.3)): + stylelint-config-standard@36.0.1(stylelint@16.22.0(typescript@5.9.3)): dependencies: - stylelint: 16.22.0(typescript@6.0.3) - stylelint-config-recommended: 14.0.1(stylelint@16.22.0(typescript@6.0.3)) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-recommended: 14.0.1(stylelint@16.22.0(typescript@5.9.3)) - stylelint-config-standard@38.0.0(stylelint@15.11.0(typescript@4.9.5)): + stylelint-config-standard@38.0.0(stylelint@16.22.0(typescript@4.9.5)): dependencies: - stylelint: 15.11.0(typescript@4.9.5) - stylelint-config-recommended: 16.0.0(stylelint@15.11.0(typescript@4.9.5)) + stylelint: 16.22.0(typescript@4.9.5) + stylelint-config-recommended: 16.0.0(stylelint@16.22.0(typescript@4.9.5)) - stylelint-config-standard@38.0.0(stylelint@15.11.0(typescript@5.8.3)): + stylelint-config-standard@38.0.0(stylelint@16.22.0(typescript@5.8.3)): dependencies: - stylelint: 15.11.0(typescript@5.8.3) - stylelint-config-recommended: 16.0.0(stylelint@15.11.0(typescript@5.8.3)) + stylelint: 16.22.0(typescript@5.8.3) + stylelint-config-recommended: 16.0.0(stylelint@16.22.0(typescript@5.8.3)) - stylelint-config-standard@38.0.0(stylelint@15.11.0(typescript@6.0.3)): + stylelint-config-standard@38.0.0(stylelint@16.22.0(typescript@5.9.3)): dependencies: - stylelint: 15.11.0(typescript@6.0.3) - stylelint-config-recommended: 16.0.0(stylelint@15.11.0(typescript@6.0.3)) + stylelint: 16.22.0(typescript@5.9.3) + stylelint-config-recommended: 16.0.0(stylelint@16.22.0(typescript@5.9.3)) stylelint-config-standard@38.0.0(stylelint@16.22.0(typescript@6.0.3)): dependencies: stylelint: 16.22.0(typescript@6.0.3) stylelint-config-recommended: 16.0.0(stylelint@16.22.0(typescript@6.0.3)) - stylelint-scss@6.10.0(stylelint@16.22.0(typescript@6.0.3)): + stylelint-scss@6.10.0(stylelint@16.22.0(typescript@5.9.3)): dependencies: css-tree: 3.2.1 is-plain-object: 5.0.0 @@ -35843,92 +35393,44 @@ snapshots: postcss-resolve-nested-selector: 0.1.6 postcss-selector-parser: 7.1.5 postcss-value-parser: 4.2.0 - stylelint: 16.22.0(typescript@6.0.3) - - stylelint@15.11.0(typescript@4.9.5): - dependencies: - '@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1) - '@csstools/css-tokenizer': 2.4.1 - '@csstools/media-query-list-parser': 2.1.13(@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1))(@csstools/css-tokenizer@2.4.1) - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.4) - balanced-match: 2.0.0 - colord: 2.9.3 - cosmiconfig: 8.3.6(typescript@4.9.5) - css-functions-list: 3.3.3 - css-tree: 2.3.1 - debug: 4.4.3(supports-color@7.2.0) - fast-glob: 3.3.3 - fastest-levenshtein: 1.0.16 - file-entry-cache: 7.0.2 - global-modules: 2.0.0 - globby: 11.1.0 - globjoin: 0.1.4 - html-tags: 3.3.1 - ignore: 5.3.2 - import-lazy: 4.0.0 - imurmurhash: 0.1.4 - is-plain-object: 5.0.0 - known-css-properties: 0.29.0 - mathml-tag-names: 2.1.3 - meow: 10.1.5 - micromatch: 4.0.8 - normalize-path: 3.0.0 - picocolors: 1.1.1 - postcss: 8.5.23 - postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 6.0.0(postcss@8.5.23) - postcss-selector-parser: 6.1.4 - postcss-value-parser: 4.2.0 - resolve-from: 5.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - style-search: 0.1.0 - supports-hyperlinks: 3.2.0 - svg-tags: 1.0.0 - table: 6.9.0 - write-file-atomic: 5.0.1 - transitivePeerDependencies: - - supports-color - - typescript + stylelint: 16.22.0(typescript@5.9.3) - stylelint@15.11.0(typescript@5.8.3): + stylelint@16.22.0(typescript@4.9.5): dependencies: - '@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1) - '@csstools/css-tokenizer': 2.4.1 - '@csstools/media-query-list-parser': 2.1.13(@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1))(@csstools/css-tokenizer@2.4.1) - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.5) + '@dual-bundle/import-meta-resolve': 4.2.1 balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 8.3.6(typescript@5.8.3) + cosmiconfig: 9.0.1(typescript@4.9.5) css-functions-list: 3.3.3 - css-tree: 2.3.1 + css-tree: 3.2.1 debug: 4.4.3(supports-color@7.2.0) fast-glob: 3.3.3 fastest-levenshtein: 1.0.16 - file-entry-cache: 7.0.2 + file-entry-cache: 10.1.4 global-modules: 2.0.0 globby: 11.1.0 globjoin: 0.1.4 html-tags: 3.3.1 - ignore: 5.3.2 - import-lazy: 4.0.0 + ignore: 7.0.5 imurmurhash: 0.1.4 is-plain-object: 5.0.0 - known-css-properties: 0.29.0 + known-css-properties: 0.37.0 mathml-tag-names: 2.1.3 - meow: 10.1.5 + meow: 13.2.0 micromatch: 4.0.8 normalize-path: 3.0.0 picocolors: 1.1.1 postcss: 8.5.23 postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 6.0.0(postcss@8.5.23) - postcss-selector-parser: 6.1.4 + postcss-safe-parser: 7.0.1(postcss@8.5.23) + postcss-selector-parser: 7.1.5 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 string-width: 4.2.3 - strip-ansi: 6.0.1 - style-search: 0.1.0 supports-hyperlinks: 3.2.0 svg-tags: 1.0.0 table: 6.9.0 @@ -35937,44 +35439,42 @@ snapshots: - supports-color - typescript - stylelint@15.11.0(typescript@6.0.3): + stylelint@16.22.0(typescript@5.8.3): dependencies: - '@csstools/css-parser-algorithms': 2.7.1(@csstools/css-tokenizer@2.4.1) - '@csstools/css-tokenizer': 2.4.1 - '@csstools/media-query-list-parser': 2.1.13(@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1))(@csstools/css-tokenizer@2.4.1) - '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.5) + '@dual-bundle/import-meta-resolve': 4.2.1 balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 8.3.6(typescript@6.0.3) + cosmiconfig: 9.0.1(typescript@5.8.3) css-functions-list: 3.3.3 - css-tree: 2.3.1 + css-tree: 3.2.1 debug: 4.4.3(supports-color@7.2.0) fast-glob: 3.3.3 fastest-levenshtein: 1.0.16 - file-entry-cache: 7.0.2 + file-entry-cache: 10.1.4 global-modules: 2.0.0 globby: 11.1.0 globjoin: 0.1.4 html-tags: 3.3.1 - ignore: 5.3.2 - import-lazy: 4.0.0 + ignore: 7.0.5 imurmurhash: 0.1.4 is-plain-object: 5.0.0 - known-css-properties: 0.29.0 + known-css-properties: 0.37.0 mathml-tag-names: 2.1.3 - meow: 10.1.5 + meow: 13.2.0 micromatch: 4.0.8 normalize-path: 3.0.0 picocolors: 1.1.1 postcss: 8.5.23 postcss-resolve-nested-selector: 0.1.6 - postcss-safe-parser: 6.0.0(postcss@8.5.23) - postcss-selector-parser: 6.1.4 + postcss-safe-parser: 7.0.1(postcss@8.5.23) + postcss-selector-parser: 7.1.5 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 string-width: 4.2.3 - strip-ansi: 6.0.1 - style-search: 0.1.0 supports-hyperlinks: 3.2.0 svg-tags: 1.0.0 table: 6.9.0 @@ -35983,7 +35483,7 @@ snapshots: - supports-color - typescript - stylelint@16.22.0(supports-color@7.2.0)(typescript@5.9.3): + stylelint@16.22.0(typescript@5.9.3): dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 @@ -36124,18 +35624,6 @@ snapshots: dependencies: acorn-node: 1.8.2 - systemjs-plugin-babel@0.0.25: {} - - systemjs-plugin-css@0.1.37: {} - - systemjs-plugin-json@0.3.0: {} - - systemjs-plugin-text@0.0.11: {} - - systemjs@0.19.41: - dependencies: - when: 3.7.8 - table@6.9.0: dependencies: ajv: 8.20.0 @@ -36283,7 +35771,7 @@ snapshots: glob: 7.2.3 minimatch: 3.1.5 - testcafe-browser-tools@2.0.26(supports-color@7.2.0): + testcafe-browser-tools@2.0.26: dependencies: array-find: 1.0.0 debug: 4.4.3(supports-color@7.2.0) @@ -36371,7 +35859,7 @@ snapshots: testcafe-selector-generator@0.1.0: {} - testcafe@3.7.5(supports-color@7.2.0): + testcafe@3.7.5: dependencies: '@babel/core': 7.29.7 '@babel/plugin-proposal-decorators': 7.29.7(@babel/core@7.29.7) @@ -36385,7 +35873,7 @@ snapshots: '@babel/plugin-transform-for-of': 7.29.7(@babel/core@7.29.7) '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/core@7.29.7) '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-runtime': 7.23.3(@babel/core@7.29.7)(supports-color@7.2.0) + '@babel/plugin-transform-runtime': 7.23.3(@babel/core@7.29.7) '@babel/preset-env': 7.29.7(@babel/core@7.29.7) '@babel/preset-flow': 7.27.1(@babel/core@7.29.7) '@babel/preset-react': 7.29.7(@babel/core@7.29.7) @@ -36454,7 +35942,7 @@ snapshots: set-cookie-parser: 2.7.2 source-map-support: 0.5.21 strip-bom: 2.0.0 - testcafe-browser-tools: 2.0.26(supports-color@7.2.0) + testcafe-browser-tools: 2.0.26 testcafe-hammerhead: 31.7.8(patch_hash=8655c07786177d3b611a05abf6b0ea87d32796eb2601f92a800ef041095f264c) testcafe-legacy-api: 5.1.8 testcafe-reporter-json: 2.2.0 @@ -36578,8 +36066,6 @@ snapshots: trim-lines@3.0.1: {} - trim-newlines@4.1.1: {} - trim-trailing-lines@2.1.0: {} triple-beam@1.4.1: {} @@ -36698,26 +36184,6 @@ snapshots: babel-jest: 30.4.1(@babel/core@7.29.7) jest-util: 30.4.1 - ts-jest@29.4.12(@babel/core@7.29.7)(@jest/transform@30.4.1)(@jest/types@30.4.1)(babel-jest@30.4.1(@babel/core@7.29.7))(jest-util@30.4.1)(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@6.0.3): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - handlebars: 4.7.9 - jest: 30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)) - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.8.5 - type-fest: 4.41.0 - typescript: 6.0.3 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.29.7 - '@jest/transform': 30.4.1 - '@jest/types': 30.4.1 - babel-jest: 30.4.1(@babel/core@7.29.7) - jest-util: 30.4.1 - ts-jest@29.4.12(@babel/core@8.0.1)(@jest/transform@30.4.1)(@jest/types@30.4.1)(babel-jest@30.4.1(@babel/core@8.0.1))(jest-util@30.4.1)(jest@30.4.2(@types/node@20.19.37)(babel-plugin-macros@3.1.0)(node-notifier@9.0.1)(ts-node@10.9.2(@swc/core@1.15.30(@swc/helpers@0.5.21))(@types/node@20.19.37)(typescript@5.9.3)))(typescript@4.9.5): dependencies: bs-logger: 0.2.6 @@ -36914,7 +36380,7 @@ snapshots: tty-browserify@0.0.1: {} - tuf-js@4.1.0(supports-color@7.2.0): + tuf-js@4.1.0: dependencies: '@tufjs/models': 4.1.0 debug: 4.4.3(supports-color@7.2.0) @@ -37389,7 +36855,7 @@ snapshots: terser: 5.49.0 yaml: 2.8.3 - vite@8.1.5(@types/node@26.1.1)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0): + vite@8.1.5(@types/node@20.19.37)(esbuild@0.28.1)(jiti@2.6.1)(less@4.8.0)(sass-embedded@1.93.3)(sass@1.101.0)(terser@5.49.0)(yaml@2.9.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.5 @@ -37397,7 +36863,7 @@ snapshots: rolldown: 1.1.5 tinyglobby: 0.2.17 optionalDependencies: - '@types/node': 26.1.1 + '@types/node': 20.19.37 esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.6.1 @@ -37413,19 +36879,6 @@ snapshots: vscode-uri@3.1.0: {} - vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0): - dependencies: - debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.7.0 - lodash: 4.18.1 - semver: 7.8.5 - transitivePeerDependencies: - - supports-color - vue-eslint-parser@10.0.0(eslint@9.39.4(jiti@2.6.1)): dependencies: debug: 4.4.3(supports-color@7.2.0) @@ -37439,10 +36892,10 @@ snapshots: transitivePeerDependencies: - supports-color - vue-eslint-parser@9.4.3(eslint@9.39.4(jiti@2.6.1)(supports-color@7.2.0))(supports-color@7.2.0): + vue-eslint-parser@9.4.3(eslint@9.39.4(jiti@2.6.1))(supports-color@7.2.0): dependencies: debug: 4.4.3(supports-color@7.2.0) - eslint: 9.39.4(jiti@2.6.1)(supports-color@7.2.0) + eslint: 9.39.4(jiti@2.6.1) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -37849,7 +37302,7 @@ snapshots: acorn-import-phases: 1.0.4(acorn@8.17.0) browserslist: 4.28.7 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.3 + enhanced-resolve: 5.24.5 es-module-lexer: 2.3.1 eslint-scope: 5.1.1 events: 3.3.0 @@ -38103,8 +37556,6 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 - when@3.7.8: {} - which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 @@ -38352,16 +37803,14 @@ snapshots: dependencies: zod: 4.4.3 - zod-validation-error@4.0.2(zod@4.4.2): + zod-validation-error@4.0.2(zod@4.4.3): dependencies: - zod: 4.4.2 + zod: 4.4.3 zod@3.24.4: {} zod@4.1.13: {} - zod@4.4.2: {} - zod@4.4.3: {} zone.js@0.15.1: {}