@dynatrace/strato-components 0.85.110 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buttons/button/Button.css +17 -17
- package/buttons/button/Button.js +1 -1
- package/buttons/button/Button.sty.js +4 -4
- package/content/progress/ProgressBar.css +71 -71
- package/content/progress/ProgressBar.d.ts +0 -7
- package/content/progress/ProgressBar.js +19 -45
- package/content/progress/ProgressBar.sty.js +5 -5
- package/content/progress/ProgressBarIcon.css +2 -2
- package/content/progress/ProgressBarIcon.sty.js +1 -1
- package/content/progress/ProgressBarLabel.css +3 -3
- package/content/progress/ProgressBarLabel.js +1 -1
- package/content/progress/ProgressBarLabel.sty.js +1 -1
- package/content/progress/ProgressBarValue.css +5 -5
- package/content/progress/ProgressBarValue.js +1 -1
- package/content/progress/ProgressBarValue.sty.js +1 -1
- package/content/progress/ProgressCircle.css +40 -40
- package/content/progress/ProgressCircle.d.ts +0 -7
- package/content/progress/ProgressCircle.js +2 -10
- package/content/progress/ProgressCircle.sty.js +5 -5
- package/content/progress/hooks/useProgressBarPropsContext.d.ts +5 -2
- package/content/progress/hooks/useProgressBarPropsContext.js +2 -2
- package/content/skeleton/Skeleton.css +6 -6
- package/content/skeleton/Skeleton.sty.js +1 -1
- package/core/components/app-root/AppRoot.css +0 -57
- package/core/hooks/useFontsUpdated.d.ts +1 -1
- package/core/hooks/useFontsUpdated.js +2 -2
- package/core/index.d.ts +0 -2
- package/core/index.js +0 -2
- package/core/styles/focusRing.css +66 -66
- package/core/styles/focusRing.sty.js +2 -2
- package/core/utils/colorUtils.css +60 -60
- package/core/utils/colorUtils.sty.js +2 -2
- package/esm/buttons/button/Button.css +17 -17
- package/esm/buttons/button/Button.js +1 -1
- package/esm/buttons/button/Button.js.map +2 -2
- package/esm/buttons/button/Button.sty.js +4 -4
- package/esm/buttons/button/Button.sty.js.map +2 -2
- package/esm/content/progress/ProgressBar.css +71 -71
- package/esm/content/progress/ProgressBar.js +19 -45
- package/esm/content/progress/ProgressBar.js.map +2 -2
- package/esm/content/progress/ProgressBar.sty.js +5 -5
- package/esm/content/progress/ProgressBar.sty.js.map +2 -2
- package/esm/content/progress/ProgressBarIcon.css +2 -2
- package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
- package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarLabel.css +3 -3
- package/esm/content/progress/ProgressBarLabel.js +2 -2
- package/esm/content/progress/ProgressBarLabel.js.map +2 -2
- package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
- package/esm/content/progress/ProgressBarLabel.sty.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.css +5 -5
- package/esm/content/progress/ProgressBarValue.js +2 -2
- package/esm/content/progress/ProgressBarValue.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.sty.js +1 -1
- package/esm/content/progress/ProgressBarValue.sty.js.map +2 -2
- package/esm/content/progress/ProgressCircle.css +40 -40
- package/esm/content/progress/ProgressCircle.js +2 -10
- package/esm/content/progress/ProgressCircle.js.map +2 -2
- package/esm/content/progress/ProgressCircle.sty.js +5 -5
- package/esm/content/progress/ProgressCircle.sty.js.map +2 -2
- package/esm/content/progress/hooks/useProgressBarPropsContext.js +2 -2
- package/esm/content/progress/hooks/useProgressBarPropsContext.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +6 -6
- package/esm/content/skeleton/Skeleton.sty.js +1 -1
- package/esm/content/skeleton/Skeleton.sty.js.map +2 -2
- package/esm/core/components/app-root/AppRoot.css +0 -57
- package/esm/core/hooks/useFontsUpdated.js +2 -2
- package/esm/core/hooks/useFontsUpdated.js.map +2 -2
- package/esm/core/index.js +0 -2
- package/esm/core/index.js.map +2 -2
- package/esm/core/styles/focusRing.css +66 -66
- package/esm/core/styles/focusRing.sty.js +2 -2
- package/esm/core/styles/focusRing.sty.js.map +2 -2
- package/esm/core/utils/colorUtils.css +60 -60
- package/esm/core/utils/colorUtils.sty.js +2 -2
- package/esm/core/utils/colorUtils.sty.js.map +2 -2
- package/esm/layouts/container/Container.css +4 -4
- package/esm/layouts/container/Container.sty.js +1 -1
- package/esm/layouts/container/Container.sty.js.map +1 -1
- package/esm/layouts/divider/Divider.css +6 -6
- package/esm/layouts/divider/Divider.sty.js +1 -1
- package/esm/layouts/divider/Divider.sty.js.map +2 -2
- package/esm/layouts/input-group/InputGroup.css +4 -4
- package/esm/layouts/input-group/InputGroup.sty.js +2 -2
- package/esm/layouts/input-group/InputGroup.sty.js.map +1 -1
- package/esm/layouts/surface/Surface.css +39 -39
- package/esm/layouts/surface/Surface.sty.js +2 -2
- package/esm/layouts/surface/Surface.sty.js.map +2 -2
- package/esm/layouts/surface/variables.sty.js +1 -1
- package/esm/layouts/surface/variables.sty.js.map +1 -1
- package/esm/styles/colorUtils.css +60 -60
- package/esm/styles/colorUtils.sty.js +2 -2
- package/esm/styles/colorUtils.sty.js.map +2 -2
- package/esm/styles/container.css +47 -47
- package/esm/styles/container.sty.js +2 -2
- package/esm/styles/container.sty.js.map +2 -2
- package/esm/styles/ellipsis.css +1 -1
- package/esm/styles/ellipsis.sty.js +1 -1
- package/esm/styles/ellipsis.sty.js.map +1 -1
- package/esm/styles/field.css +153 -153
- package/esm/styles/field.sty.js +2 -2
- package/esm/styles/field.sty.js.map +2 -2
- package/esm/styles/sprinkles.css +262 -262
- package/esm/styles/sprinkles.sty.js +1 -1
- package/esm/styles/sprinkles.sty.js.map +2 -2
- package/esm/styles/textStyle.css +8 -8
- package/esm/styles/textStyle.sty.js +1 -1
- package/esm/styles/textStyle.sty.js.map +2 -2
- package/esm/typography/block-quote/Blockquote.css +2 -2
- package/esm/typography/block-quote/Blockquote.sty.js +1 -1
- package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
- package/esm/typography/code/Code.css +1 -1
- package/esm/typography/code/Code.sty.js +1 -1
- package/esm/typography/code/Code.sty.js.map +1 -1
- package/esm/typography/emphasis/Emphasis.css +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
- package/esm/typography/external-link/ExternalLink.css +6 -6
- package/esm/typography/external-link/ExternalLink.sty.js +1 -1
- package/esm/typography/external-link/ExternalLink.sty.js.map +1 -1
- package/esm/typography/heading/Heading.css +7 -7
- package/esm/typography/heading/Heading.sty.js +1 -1
- package/esm/typography/heading/Heading.sty.js.map +2 -2
- package/esm/typography/highlight/Highlight.css +1 -1
- package/esm/typography/highlight/Highlight.sty.js +1 -1
- package/esm/typography/highlight/Highlight.sty.js.map +1 -1
- package/esm/typography/index.js +12 -12
- package/esm/typography/index.js.map +2 -2
- package/esm/typography/link/Link.css +4 -4
- package/esm/typography/link/Link.sty.js +1 -1
- package/esm/typography/link/Link.sty.js.map +1 -1
- package/esm/typography/list/List.css +4 -4
- package/esm/typography/list/List.sty.js +2 -2
- package/esm/typography/list/List.sty.js.map +1 -1
- package/esm/typography/paragraph/Paragraph.css +3 -3
- package/esm/typography/paragraph/Paragraph.sty.js +1 -1
- package/esm/typography/paragraph/Paragraph.sty.js.map +2 -2
- package/esm/typography/strikethrough/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
- package/esm/typography/strong/Strong.css +1 -1
- package/esm/typography/strong/Strong.sty.js +1 -1
- package/esm/typography/strong/Strong.sty.js.map +1 -1
- package/esm/typography/text/Text.css +3 -3
- package/esm/typography/text/Text.sty.js +1 -1
- package/esm/typography/text/Text.sty.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.css +4 -4
- package/esm/typography/text-ellipsis/TextEllipsis.js +45 -45
- package/esm/typography/text-ellipsis/TextEllipsis.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +1 -1
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +2 -2
- package/esm/typography/utils.js +19 -19
- package/esm/typography/utils.js.map +2 -2
- package/layouts/container/Container.css +4 -4
- package/layouts/container/Container.sty.js +1 -1
- package/layouts/divider/Divider.css +6 -6
- package/layouts/divider/Divider.sty.js +1 -1
- package/layouts/input-group/InputGroup.css +4 -4
- package/layouts/input-group/InputGroup.sty.js +2 -2
- package/layouts/surface/Surface.css +39 -39
- package/layouts/surface/Surface.sty.js +2 -2
- package/layouts/surface/variables.sty.js +1 -1
- package/package.json +15 -26
- package/styles/colorUtils.css +60 -60
- package/styles/colorUtils.sty.js +2 -2
- package/styles/container.css +47 -47
- package/styles/container.sty.js +2 -2
- package/styles/ellipsis.css +1 -1
- package/styles/ellipsis.sty.js +1 -1
- package/styles/field.css +153 -153
- package/styles/field.sty.js +2 -2
- package/styles/sprinkles.css +262 -262
- package/styles/sprinkles.sty.js +1 -1
- package/styles/textStyle.css +8 -8
- package/styles/textStyle.sty.js +1 -1
- package/typography/block-quote/Blockquote.css +2 -2
- package/typography/block-quote/Blockquote.sty.js +1 -1
- package/typography/code/Code.css +1 -1
- package/typography/code/Code.sty.js +1 -1
- package/typography/emphasis/Emphasis.css +1 -1
- package/typography/emphasis/Emphasis.sty.js +1 -1
- package/typography/external-link/ExternalLink.css +6 -6
- package/typography/external-link/ExternalLink.sty.js +1 -1
- package/typography/heading/Heading.css +7 -7
- package/typography/heading/Heading.sty.js +1 -1
- package/typography/highlight/Highlight.css +1 -1
- package/typography/highlight/Highlight.sty.js +1 -1
- package/typography/index.d.ts +3 -3
- package/typography/index.js +6 -6
- package/typography/link/Link.css +4 -4
- package/typography/link/Link.sty.js +1 -1
- package/typography/list/List.css +4 -4
- package/typography/list/List.sty.js +2 -2
- package/typography/paragraph/Paragraph.css +3 -3
- package/typography/paragraph/Paragraph.sty.js +1 -1
- package/typography/strikethrough/Strikethrough.css +1 -1
- package/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/typography/strong/Strong.css +1 -1
- package/typography/strong/Strong.sty.js +1 -1
- package/typography/text/Text.css +3 -3
- package/typography/text/Text.sty.js +1 -1
- package/typography/text-ellipsis/TextEllipsis.css +4 -4
- package/typography/text-ellipsis/TextEllipsis.d.ts +2 -2
- package/typography/text-ellipsis/TextEllipsis.js +44 -44
- package/typography/text-ellipsis/TextEllipsis.sty.js +1 -1
- package/typography/utils.d.ts +14 -11
- package/typography/utils.js +19 -19
- package/core/types/role-variant.d.ts +0 -12
- package/core/types/role-variant.js +0 -30
- package/esm/core/types/role-variant.js +0 -12
- package/esm/core/types/role-variant.js.map +0 -7
- package/testing/custom-render.d.ts +0 -12
- package/testing/custom-render.js +0 -62
- package/testing/index.d.ts +0 -22
- package/testing/index.js +0 -91
- package/testing/jest/index.d.ts +0 -1
- package/testing/jest/index.js +0 -5
- package/testing/jest/jest-preset.d.ts +0 -10
- package/testing/jest/jest-preset.js +0 -13
- package/testing/jest/resolver.d.ts +0 -0
- package/testing/jest/resolver.js +0 -27
- package/testing/mocks/bounding-client-rect-mock.d.ts +0 -8
- package/testing/mocks/bounding-client-rect-mock.js +0 -36
- package/testing/mocks/canvas-mock.d.ts +0 -14
- package/testing/mocks/canvas-mock.js +0 -192
- package/testing/mocks/create-mock-element.d.ts +0 -14
- package/testing/mocks/create-mock-element.js +0 -99
- package/testing/mocks/create-range-mock.d.ts +0 -10
- package/testing/mocks/create-range-mock.js +0 -47
- package/testing/mocks/dom-rect-mock.d.ts +0 -19
- package/testing/mocks/dom-rect-mock.js +0 -56
- package/testing/mocks/fetch-mock.d.ts +0 -9
- package/testing/mocks/fetch-mock.js +0 -38
- package/testing/mocks/intersection-observer-mock.d.ts +0 -10
- package/testing/mocks/intersection-observer-mock.js +0 -58
- package/testing/mocks/match-media-mock.d.ts +0 -10
- package/testing/mocks/match-media-mock.js +0 -45
- package/testing/mocks/offset-height-mock.d.ts +0 -8
- package/testing/mocks/offset-height-mock.js +0 -39
- package/testing/mocks/offset-width-mock.d.ts +0 -8
- package/testing/mocks/offset-width-mock.js +0 -39
- package/testing/mocks/pointer-event-mock.d.ts +0 -8
- package/testing/mocks/pointer-event-mock.js +0 -42
- package/testing/mocks/resize-observer-mock.d.ts +0 -11
- package/testing/mocks/resize-observer-mock.js +0 -42
- package/testing/mocks/screen-size-mock.d.ts +0 -8
- package/testing/mocks/screen-size-mock.js +0 -34
- package/testing/mocks/scroll-into-view-mock.d.ts +0 -10
- package/testing/mocks/scroll-into-view-mock.js +0 -34
- package/testing/mocks/scroll-width-mock.d.ts +0 -8
- package/testing/mocks/scroll-width-mock.js +0 -39
- package/testing/mocks/select-mock.d.ts +0 -11
- package/testing/mocks/select-mock.js +0 -45
- package/testing/mocks/table-virtualization-mock.d.ts +0 -10
- package/testing/mocks/table-virtualization-mock.js +0 -50
- package/testing/mocks/text-ellipsis-mock.d.ts +0 -8
- package/testing/mocks/text-ellipsis-mock.js +0 -43
- package/testing/setup.d.ts +0 -8
- package/testing/setup.js +0 -57
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var offset_height_mock_exports = {};
|
|
19
|
-
__export(offset_height_mock_exports, {
|
|
20
|
-
clearOffsetHeightMock: () => clearOffsetHeightMock,
|
|
21
|
-
setupOffsetHeightMock: () => setupOffsetHeightMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(offset_height_mock_exports);
|
|
24
|
-
const pristineOffsetHeightDescriptor = Object.getOwnPropertyDescriptor(
|
|
25
|
-
HTMLElement.prototype,
|
|
26
|
-
"offsetHeight"
|
|
27
|
-
);
|
|
28
|
-
function setupOffsetHeightMock(containerHeightOrMockFn) {
|
|
29
|
-
Object.defineProperty(HTMLElement.prototype, "offsetHeight", {
|
|
30
|
-
configurable: true,
|
|
31
|
-
get: typeof containerHeightOrMockFn === "number" ? () => containerHeightOrMockFn : containerHeightOrMockFn
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function clearOffsetHeightMock() {
|
|
35
|
-
Object.defineProperty(HTMLElement.prototype, "offsetHeight", {
|
|
36
|
-
configurable: true,
|
|
37
|
-
get: pristineOffsetHeightDescriptor?.get ?? (() => 0)
|
|
38
|
-
});
|
|
39
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Mocks the return value of the offsetWidth property on all HTMLElements.
|
|
2
|
-
* @deprecated The testing subpackage is deprecated.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setupOffsetWidthMock(containerWidthOrMockFn: number | (() => number)): void;
|
|
5
|
-
/** Clears mocked offsetWidth property on HTMLElements.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearOffsetWidthMock(): void;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var offset_width_mock_exports = {};
|
|
19
|
-
__export(offset_width_mock_exports, {
|
|
20
|
-
clearOffsetWidthMock: () => clearOffsetWidthMock,
|
|
21
|
-
setupOffsetWidthMock: () => setupOffsetWidthMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(offset_width_mock_exports);
|
|
24
|
-
const pristineOffsetWidthDescriptor = Object.getOwnPropertyDescriptor(
|
|
25
|
-
HTMLElement.prototype,
|
|
26
|
-
"offsetWidth"
|
|
27
|
-
);
|
|
28
|
-
function setupOffsetWidthMock(containerWidthOrMockFn) {
|
|
29
|
-
Object.defineProperty(HTMLElement.prototype, "offsetWidth", {
|
|
30
|
-
configurable: true,
|
|
31
|
-
get: typeof containerWidthOrMockFn === "number" ? () => containerWidthOrMockFn : containerWidthOrMockFn
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function clearOffsetWidthMock() {
|
|
35
|
-
Object.defineProperty(HTMLElement.prototype, "offsetWidth", {
|
|
36
|
-
configurable: true,
|
|
37
|
-
get: pristineOffsetWidthDescriptor?.get ?? (() => 0)
|
|
38
|
-
});
|
|
39
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Mocks `PointerEvent`.
|
|
2
|
-
* @deprecated The testing subpackage is deprecated.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setupPointerEventMock(): void;
|
|
5
|
-
/** Clears `PointerEvent` mock.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearPointerEventMock(): void;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var pointer_event_mock_exports = {};
|
|
19
|
-
__export(pointer_event_mock_exports, {
|
|
20
|
-
clearPointerEventMock: () => clearPointerEventMock,
|
|
21
|
-
setupPointerEventMock: () => setupPointerEventMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(pointer_event_mock_exports);
|
|
24
|
-
class MockPointerEvent extends Event {
|
|
25
|
-
button;
|
|
26
|
-
ctrlKey;
|
|
27
|
-
pointerType;
|
|
28
|
-
/** Creates a new MockPointerEvent. */
|
|
29
|
-
constructor(type, props) {
|
|
30
|
-
super(type, props);
|
|
31
|
-
this.button = props.button || 0;
|
|
32
|
-
this.ctrlKey = props.ctrlKey || false;
|
|
33
|
-
this.pointerType = props.pointerType || "mouse";
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const pristinePointerEvent = global.PointerEvent;
|
|
37
|
-
function setupPointerEventMock() {
|
|
38
|
-
global.PointerEvent = MockPointerEvent;
|
|
39
|
-
}
|
|
40
|
-
function clearPointerEventMock() {
|
|
41
|
-
global.PointerEvent = pristinePointerEvent;
|
|
42
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PartialDeep } from 'type-fest';
|
|
2
|
-
/** Mock the Resize Observer
|
|
3
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
4
|
-
*/
|
|
5
|
-
export declare function setupResizeObserverMock(
|
|
6
|
-
/** When the Resize Observer should return specific results, you can pass them here */
|
|
7
|
-
mockedObserveCallbackValue?: PartialDeep<ResizeObserverEntry>[]): void;
|
|
8
|
-
/** Clear the Resize Observer
|
|
9
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
10
|
-
*/
|
|
11
|
-
export declare function clearResizeObserverMock(): void;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var resize_observer_mock_exports = {};
|
|
19
|
-
__export(resize_observer_mock_exports, {
|
|
20
|
-
clearResizeObserverMock: () => clearResizeObserverMock,
|
|
21
|
-
setupResizeObserverMock: () => setupResizeObserverMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(resize_observer_mock_exports);
|
|
24
|
-
var import_globals = require("@jest/globals");
|
|
25
|
-
const pristineResizeObserver = window.ResizeObserver;
|
|
26
|
-
function setupResizeObserverMock(mockedObserveCallbackValue) {
|
|
27
|
-
Object.defineProperty(window, "ResizeObserver", {
|
|
28
|
-
writable: true,
|
|
29
|
-
value: import_globals.jest.fn(
|
|
30
|
-
(callback) => ({
|
|
31
|
-
observe: mockedObserveCallbackValue ? import_globals.jest.fn().mockImplementation(() => {
|
|
32
|
-
callback(mockedObserveCallbackValue);
|
|
33
|
-
}) : import_globals.jest.fn(),
|
|
34
|
-
unobserve: import_globals.jest.fn(),
|
|
35
|
-
disconnect: import_globals.jest.fn()
|
|
36
|
-
})
|
|
37
|
-
)
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function clearResizeObserverMock() {
|
|
41
|
-
window.ResizeObserver = pristineResizeObserver;
|
|
42
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Mocks the width and height on `window.screen`
|
|
2
|
-
* @deprecated The testing subpackage is deprecated.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setupScreenSizeMock(width?: number, height?: number): void;
|
|
5
|
-
/** Clears mocked width and height on `window.screen`.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearScreenSizeMock(): void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var screen_size_mock_exports = {};
|
|
19
|
-
__export(screen_size_mock_exports, {
|
|
20
|
-
clearScreenSizeMock: () => clearScreenSizeMock,
|
|
21
|
-
setupScreenSizeMock: () => setupScreenSizeMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(screen_size_mock_exports);
|
|
24
|
-
const pristineScreenWidth = window.screen.width;
|
|
25
|
-
const pristineScreenHeight = window.screen.height;
|
|
26
|
-
function setupScreenSizeMock(width = 1024, height = 768) {
|
|
27
|
-
Object.defineProperty(window, "screen", {
|
|
28
|
-
configurable: true,
|
|
29
|
-
value: { width, height }
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function clearScreenSizeMock() {
|
|
33
|
-
setupScreenSizeMock(pristineScreenWidth, pristineScreenHeight);
|
|
34
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mock the scrollIntoView function since jsdom doesn't provide it
|
|
3
|
-
* @deprecated The testing subpackage is deprecated.
|
|
4
|
-
*/
|
|
5
|
-
export declare function setupScrollIntoViewMock(): void;
|
|
6
|
-
/**
|
|
7
|
-
* reset the scrollIntoView
|
|
8
|
-
* @deprecated The testing subpackage is deprecated.
|
|
9
|
-
*/
|
|
10
|
-
export declare function clearScrollIntoViewMock(): void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var scroll_into_view_mock_exports = {};
|
|
19
|
-
__export(scroll_into_view_mock_exports, {
|
|
20
|
-
clearScrollIntoViewMock: () => clearScrollIntoViewMock,
|
|
21
|
-
setupScrollIntoViewMock: () => setupScrollIntoViewMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(scroll_into_view_mock_exports);
|
|
24
|
-
var import_globals = require("@jest/globals");
|
|
25
|
-
const pristineScrollIntoView = window.HTMLElement.prototype.scrollIntoView;
|
|
26
|
-
function setupScrollIntoViewMock() {
|
|
27
|
-
Object.defineProperty(HTMLElement.prototype, "scrollIntoView", {
|
|
28
|
-
writable: true,
|
|
29
|
-
value: import_globals.jest.fn()
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function clearScrollIntoViewMock() {
|
|
33
|
-
window.HTMLElement.prototype.scrollIntoView = pristineScrollIntoView;
|
|
34
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Mocks the return value of the `scrollWidth` property on all `HTMLElements`.
|
|
2
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setupScrollWidthMock(scrollWidth: number): void;
|
|
5
|
-
/** Clears mocked `scrollWidth` property on `HTMLElements`.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearScrollWidthMock(): void;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var scroll_width_mock_exports = {};
|
|
19
|
-
__export(scroll_width_mock_exports, {
|
|
20
|
-
clearScrollWidthMock: () => clearScrollWidthMock,
|
|
21
|
-
setupScrollWidthMock: () => setupScrollWidthMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(scroll_width_mock_exports);
|
|
24
|
-
const pristineScrollWidthDescriptor = Object.getOwnPropertyDescriptor(
|
|
25
|
-
HTMLElement.prototype,
|
|
26
|
-
"scrollWidth"
|
|
27
|
-
);
|
|
28
|
-
function setupScrollWidthMock(scrollWidth) {
|
|
29
|
-
Object.defineProperty(HTMLElement.prototype, "scrollWidth", {
|
|
30
|
-
configurable: true,
|
|
31
|
-
get: () => scrollWidth
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function clearScrollWidthMock() {
|
|
35
|
-
Object.defineProperty(HTMLElement.prototype, "scrollWidth", {
|
|
36
|
-
configurable: true,
|
|
37
|
-
get: pristineScrollWidthDescriptor?.get ? pristineScrollWidthDescriptor.get : () => 0
|
|
38
|
-
});
|
|
39
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mocks offsets, scrolling height and animation frame to allow proper interaction with select components.
|
|
3
|
-
* It takes care of setting them up and clearing them afterwards and should be used inside the
|
|
4
|
-
* describe block.
|
|
5
|
-
*
|
|
6
|
-
* (Mainly usefull when accessing different options than the first)
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
* @deprecated The testing subpackage is deprecated.
|
|
10
|
-
*/
|
|
11
|
-
export declare function _setupSelectMocks(): void;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var select_mock_exports = {};
|
|
19
|
-
__export(select_mock_exports, {
|
|
20
|
-
_setupSelectMocks: () => _setupSelectMocks
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(select_mock_exports);
|
|
23
|
-
var import_globals = require("@jest/globals");
|
|
24
|
-
function _setupSelectMocks() {
|
|
25
|
-
let offsetWidth;
|
|
26
|
-
let offsetHeight;
|
|
27
|
-
let scrollHeight;
|
|
28
|
-
(0, import_globals.beforeAll)(function() {
|
|
29
|
-
offsetWidth = import_globals.jest.spyOn(window.HTMLElement.prototype, "clientWidth", "get").mockImplementation(() => 1e3);
|
|
30
|
-
offsetHeight = import_globals.jest.spyOn(window.HTMLElement.prototype, "clientHeight", "get").mockImplementation(() => 1e3);
|
|
31
|
-
scrollHeight = import_globals.jest.spyOn(window.HTMLElement.prototype, "scrollHeight", "get").mockImplementation(() => 48);
|
|
32
|
-
import_globals.jest.spyOn(window, "requestAnimationFrame").mockImplementation((cb) => {
|
|
33
|
-
cb(500);
|
|
34
|
-
return 1;
|
|
35
|
-
});
|
|
36
|
-
import_globals.jest.useFakeTimers();
|
|
37
|
-
});
|
|
38
|
-
(0, import_globals.afterAll)(function() {
|
|
39
|
-
offsetWidth.mockReset();
|
|
40
|
-
offsetHeight.mockReset();
|
|
41
|
-
scrollHeight.mockReset();
|
|
42
|
-
import_globals.jest.runOnlyPendingTimers();
|
|
43
|
-
import_globals.jest.useRealTimers();
|
|
44
|
-
});
|
|
45
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mocks virtualisation scrolling away by setting the containers height to something really tall.
|
|
3
|
-
* Table virtualization will also rely on jest fake timers.
|
|
4
|
-
* @deprecated The testing subpackage is deprecated.
|
|
5
|
-
*/
|
|
6
|
-
export declare function setupTableVirtualizationMock(containerHeight?: number): void;
|
|
7
|
-
/** Clears the TableVirtualizationMock
|
|
8
|
-
* @deprecated The testing subpackage is deprecated.
|
|
9
|
-
*/
|
|
10
|
-
export declare function clearTableVirtualizationMock(): void;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var table_virtualization_mock_exports = {};
|
|
19
|
-
__export(table_virtualization_mock_exports, {
|
|
20
|
-
clearTableVirtualizationMock: () => clearTableVirtualizationMock,
|
|
21
|
-
setupTableVirtualizationMock: () => setupTableVirtualizationMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(table_virtualization_mock_exports);
|
|
24
|
-
var import_bounding_client_rect_mock = require("./bounding-client-rect-mock.js");
|
|
25
|
-
var import_dom_rect_mock = require("./dom-rect-mock.js");
|
|
26
|
-
var import_offset_height_mock = require("./offset-height-mock.js");
|
|
27
|
-
function setupTableVirtualizationMock(containerHeight = 15e3) {
|
|
28
|
-
(0, import_bounding_client_rect_mock.setupGetBoundingClientRectMock)(function() {
|
|
29
|
-
if (this.classList.contains("strato-table-header-group")) {
|
|
30
|
-
return (0, import_dom_rect_mock.createDOMRect)(1e3, 32);
|
|
31
|
-
}
|
|
32
|
-
if (this.classList.contains("strato-table-virtualization-container")) {
|
|
33
|
-
return (0, import_dom_rect_mock.createDOMRect)(1e3, containerHeight);
|
|
34
|
-
}
|
|
35
|
-
if (this.classList.contains("strato-table-row")) {
|
|
36
|
-
return (0, import_dom_rect_mock.createDOMRect)(1e3, 56);
|
|
37
|
-
}
|
|
38
|
-
if (this.classList.contains("strato-table-header-cell") || this.classList.contains("strato-table-cell")) {
|
|
39
|
-
return (0, import_dom_rect_mock.createDOMRect)(100, 32);
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
});
|
|
43
|
-
(0, import_offset_height_mock.setupOffsetHeightMock)(function() {
|
|
44
|
-
return this.classList.contains("strato-table-row") ? 56 : 0;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function clearTableVirtualizationMock() {
|
|
48
|
-
(0, import_bounding_client_rect_mock.clearGetBoundingClientRectMock)();
|
|
49
|
-
(0, import_offset_height_mock.clearOffsetHeightMock)();
|
|
50
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Mocks DOM properties and functions required for the TextEllipsis component to work.
|
|
2
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setupTextEllipsisMock(containerWidth?: number, textWidth?: number, mockCanvas?: boolean): void;
|
|
5
|
-
/** Clears mocked DOM properties and functions required for the TextEllipsis component to work.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearTextEllipsisMock(): void;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var text_ellipsis_mock_exports = {};
|
|
19
|
-
__export(text_ellipsis_mock_exports, {
|
|
20
|
-
clearTextEllipsisMock: () => clearTextEllipsisMock,
|
|
21
|
-
setupTextEllipsisMock: () => setupTextEllipsisMock
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(text_ellipsis_mock_exports);
|
|
24
|
-
var import_bounding_client_rect_mock = require("./bounding-client-rect-mock.js");
|
|
25
|
-
var import_canvas_mock = require("./canvas-mock.js");
|
|
26
|
-
var import_dom_rect_mock = require("./dom-rect-mock.js");
|
|
27
|
-
var import_scroll_width_mock = require("./scroll-width-mock.js");
|
|
28
|
-
function setupTextEllipsisMock(containerWidth = 250, textWidth = 200, mockCanvas = false) {
|
|
29
|
-
(0, import_bounding_client_rect_mock.setupGetBoundingClientRectMock)(function() {
|
|
30
|
-
if (this.getAttribute("data-ellipsis") !== null) {
|
|
31
|
-
return (0, import_dom_rect_mock.createDOMRect)(containerWidth, 0);
|
|
32
|
-
}
|
|
33
|
-
return (0, import_dom_rect_mock.createDOMRect)(textWidth, 0);
|
|
34
|
-
});
|
|
35
|
-
if (mockCanvas) {
|
|
36
|
-
(0, import_canvas_mock.setupCanvasMeasureTextMock)();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function clearTextEllipsisMock() {
|
|
40
|
-
(0, import_bounding_client_rect_mock.clearGetBoundingClientRectMock)();
|
|
41
|
-
(0, import_scroll_width_mock.clearScrollWidthMock)();
|
|
42
|
-
(0, import_canvas_mock.clearCanvasMeasureTextMock)();
|
|
43
|
-
}
|
package/testing/setup.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Sets up design-system mocks.
|
|
2
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
3
|
-
*/
|
|
4
|
-
export declare function setup(): void;
|
|
5
|
-
/** Resets design-system mocks.
|
|
6
|
-
* @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clear(): void;
|
package/testing/setup.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var setup_exports = {};
|
|
19
|
-
__export(setup_exports, {
|
|
20
|
-
clear: () => clear,
|
|
21
|
-
setup: () => setup
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(setup_exports);
|
|
24
|
-
var import_canvas_mock = require("./mocks/canvas-mock.js");
|
|
25
|
-
var import_create_range_mock = require("./mocks/create-range-mock.js");
|
|
26
|
-
var import_dom_rect_mock = require("./mocks/dom-rect-mock.js");
|
|
27
|
-
var import_intersection_observer_mock = require("./mocks/intersection-observer-mock.js");
|
|
28
|
-
var import_match_media_mock = require("./mocks/match-media-mock.js");
|
|
29
|
-
var import_offset_width_mock = require("./mocks/offset-width-mock.js");
|
|
30
|
-
var import_pointer_event_mock = require("./mocks/pointer-event-mock.js");
|
|
31
|
-
var import_resize_observer_mock = require("./mocks/resize-observer-mock.js");
|
|
32
|
-
var import_screen_size_mock = require("./mocks/screen-size-mock.js");
|
|
33
|
-
var import_scroll_into_view_mock = require("./mocks/scroll-into-view-mock.js");
|
|
34
|
-
function setup() {
|
|
35
|
-
(0, import_resize_observer_mock.setupResizeObserverMock)();
|
|
36
|
-
(0, import_pointer_event_mock.setupPointerEventMock)();
|
|
37
|
-
(0, import_intersection_observer_mock.setupIntersectionObserverMock)();
|
|
38
|
-
(0, import_create_range_mock.setupCreateRangeMock)();
|
|
39
|
-
(0, import_match_media_mock.setupMatchMediaMock)();
|
|
40
|
-
(0, import_dom_rect_mock.setupDomRectMock)();
|
|
41
|
-
(0, import_screen_size_mock.setupScreenSizeMock)();
|
|
42
|
-
(0, import_offset_width_mock.setupOffsetWidthMock)(0);
|
|
43
|
-
(0, import_canvas_mock.setupCanvasMeasureTextMock)(-Infinity);
|
|
44
|
-
(0, import_scroll_into_view_mock.setupScrollIntoViewMock)();
|
|
45
|
-
}
|
|
46
|
-
function clear() {
|
|
47
|
-
(0, import_resize_observer_mock.clearResizeObserverMock)();
|
|
48
|
-
(0, import_pointer_event_mock.clearPointerEventMock)();
|
|
49
|
-
(0, import_intersection_observer_mock.clearIntersectionObserverMock)();
|
|
50
|
-
(0, import_create_range_mock.clearCreateRangeMock)();
|
|
51
|
-
(0, import_offset_width_mock.clearOffsetWidthMock)();
|
|
52
|
-
(0, import_canvas_mock.clearCanvasMeasureTextMock)();
|
|
53
|
-
(0, import_match_media_mock.clearMatchMediaMock)();
|
|
54
|
-
(0, import_dom_rect_mock.clearDomRectMock)();
|
|
55
|
-
(0, import_screen_size_mock.clearScreenSizeMock)();
|
|
56
|
-
(0, import_scroll_into_view_mock.clearScrollIntoViewMock)();
|
|
57
|
-
}
|