@fluentui/react-charting 5.16.60 → 5.17.1

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.
Files changed (64) hide show
  1. package/CHANGELOG.json +68 -3
  2. package/CHANGELOG.md +28 -4
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/docs/TestPlans/MultiStackedBarChart/componentTests.md +56 -0
  6. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  7. package/lib/components/CommonComponents/CartesianChart.base.js +58 -6
  8. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.styles.js +13 -2
  10. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.types.d.ts +23 -0
  12. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  13. package/lib/components/StackedBarChart/MultiStackedBarChart.base.d.ts +3 -0
  14. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +8 -5
  15. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  16. package/lib/utilities/SVGTooltipText.js.map +1 -1
  17. package/lib/utilities/utilities.d.ts +1 -0
  18. package/lib/utilities/utilities.js +16 -0
  19. package/lib/utilities/utilities.js.map +1 -1
  20. package/lib/version.js +1 -1
  21. package/lib/version.js.map +1 -1
  22. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  23. package/lib-amd/components/CommonComponents/CartesianChart.base.js +57 -6
  24. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  25. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +11 -0
  26. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  27. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +23 -0
  28. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  29. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.d.ts +3 -0
  30. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +8 -5
  31. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  32. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  33. package/lib-amd/utilities/utilities.d.ts +1 -0
  34. package/lib-amd/utilities/utilities.js +18 -1
  35. package/lib-amd/utilities/utilities.js.map +1 -1
  36. package/lib-amd/version.js +1 -1
  37. package/lib-amd/version.js.map +1 -1
  38. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  39. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +57 -5
  40. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  41. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +11 -0
  42. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  43. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +23 -0
  44. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  45. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.d.ts +3 -0
  46. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +8 -5
  47. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  48. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  49. package/lib-commonjs/utilities/utilities.d.ts +1 -0
  50. package/lib-commonjs/utilities/utilities.js +18 -1
  51. package/lib-commonjs/utilities/utilities.js.map +1 -1
  52. package/lib-commonjs/version.js +1 -1
  53. package/lib-commonjs/version.js.map +1 -1
  54. package/package.json +4 -5
  55. package/src/components/CommonComponents/CartesianChart.types.ts +28 -0
  56. package/lib/utilities/TestUtility.d.ts +0 -5
  57. package/lib/utilities/TestUtility.js +0 -61
  58. package/lib/utilities/TestUtility.js.map +0 -1
  59. package/lib-amd/utilities/TestUtility.d.ts +0 -5
  60. package/lib-amd/utilities/TestUtility.js +0 -65
  61. package/lib-amd/utilities/TestUtility.js.map +0 -1
  62. package/lib-commonjs/utilities/TestUtility.d.ts +0 -5
  63. package/lib-commonjs/utilities/TestUtility.js +0 -67
  64. package/lib-commonjs/utilities/TestUtility.js.map +0 -1
@@ -1,65 +0,0 @@
1
- define(["require", "exports", "tslib", "@testing-library/react", "react"], function (require, exports, tslib_1, react_1, React) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.testScreenResolutionChanges = exports.testWithWait = exports.testWithoutWait = exports.getByClass = exports.getById = void 0;
5
- exports.getById = react_1.queryAllByAttribute.bind(null, 'id');
6
- exports.getByClass = react_1.queryAllByAttribute.bind(null, 'class');
7
- // Test function that does not wait for any async calls to finish
8
- var testWithoutWait = function (description, component, props, testFunction, testFunctionBeforeWait) {
9
- test(description, function () {
10
- var container = (0, react_1.render)(React.createElement(component, (props = tslib_1.__assign({}, props)))).container;
11
- testFunctionBeforeWait !== undefined && testFunctionBeforeWait();
12
- testFunction(container);
13
- });
14
- };
15
- exports.testWithoutWait = testWithoutWait;
16
- // Test function that waits for async calls to finish
17
- var testWithWait = function (description, component, props, testFunction) {
18
- test(description, function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
19
- var container;
20
- return tslib_1.__generator(this, function (_a) {
21
- switch (_a.label) {
22
- case 0:
23
- container = (0, react_1.render)(React.createElement(component, (props = tslib_1.__assign({}, props)))).container;
24
- return [4 /*yield*/, (0, react_1.waitFor)(function () {
25
- testFunction(container);
26
- })];
27
- case 1:
28
- _a.sent();
29
- return [2 /*return*/];
30
- }
31
- });
32
- }); });
33
- };
34
- exports.testWithWait = testWithWait;
35
- // Test Screen Resolution changes like zoom in and zoom out
36
- var testScreenResolutionChanges = function (testFunction) {
37
- var originalInnerWidth = global.innerWidth;
38
- var originalInnerHeight = global.innerHeight;
39
- afterEach(function () {
40
- global.innerWidth = originalInnerWidth;
41
- global.innerHeight = originalInnerHeight;
42
- (0, react_1.act)(function () {
43
- global.dispatchEvent(new Event('resize'));
44
- });
45
- });
46
- test('Should remain unchanged on zoom in', function () {
47
- testFunction();
48
- global.innerWidth = window.innerWidth / 2;
49
- global.innerHeight = window.innerHeight / 2;
50
- (0, react_1.act)(function () {
51
- global.dispatchEvent(new Event('resize'));
52
- });
53
- });
54
- test('Should remain unchanged on zoom out', function () {
55
- testFunction();
56
- global.innerWidth = window.innerWidth * 2;
57
- global.innerHeight = window.innerHeight * 2;
58
- (0, react_1.act)(function () {
59
- global.dispatchEvent(new Event('resize'));
60
- });
61
- });
62
- };
63
- exports.testScreenResolutionChanges = testScreenResolutionChanges;
64
- });
65
- //# sourceMappingURL=TestUtility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestUtility.js","sourceRoot":"../src/","sources":["utilities/TestUtility.tsx"],"names":[],"mappings":";;;;IAIa,QAAA,OAAO,GAAG,2BAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,QAAA,UAAU,GAAG,2BAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAElE,iEAAiE;IAC1D,IAAM,eAAe,GAAG,UAC7B,WAAmB,EACnB,SAAc,EACd,KAAU,EACV,YAA8C,EAC9C,sBAAmC;QAEnC,IAAI,CAAC,WAAW,EAAE;YACR,IAAA,SAAS,GAAK,IAAA,cAAM,EAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,KAAK,wBAAQ,KAAK,CAAE,CAAC,CAAC,CAAC,UAAnE,CAAoE;YACrF,sBAAsB,KAAK,SAAS,IAAI,sBAAsB,EAAE,CAAC;YACjE,YAAY,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAZW,QAAA,eAAe,mBAY1B;IAEF,qDAAqD;IAC9C,IAAM,YAAY,GAAG,UAC1B,WAAmB,EACnB,SAAc,EACd,KAAU,EACV,YAA8C;QAE9C,IAAI,CAAC,WAAW,EAAE;;;;;wB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AAG,CAAC,CAAC;YAC5C,IAAA,WAAG,EAAC;gBACF,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IA1BW,QAAA,2BAA2B,+BA0BtC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { act, queryAllByAttribute, render, waitFor } from '@testing-library/react';\nimport * as React from 'react';\n\nexport const getById = queryAllByAttribute.bind(null, 'id');\nexport const getByClass = queryAllByAttribute.bind(null, 'class');\n\n// Test function that does not wait for any async calls to finish\nexport const testWithoutWait = (\n description: string,\n component: any,\n props: any,\n testFunction: (container: HTMLElement) => void,\n testFunctionBeforeWait?: () => void,\n) => {\n test(description, () => {\n const { container } = render(React.createElement(component, (props = { ...props })));\n testFunctionBeforeWait !== undefined && testFunctionBeforeWait();\n testFunction(container);\n });\n};\n\n// Test function that waits for async calls to finish\nexport const testWithWait = (\n description: string,\n component: any,\n props: any,\n testFunction: (container: HTMLElement) => void,\n) => {\n test(description, async () => {\n const { container } = render(React.createElement(component, (props = { ...props })));\n await waitFor(() => {\n testFunction(container);\n });\n });\n};\n\n// Test Screen Resolution changes like zoom in and zoom out\nexport const testScreenResolutionChanges = (testFunction: () => void) => {\n const originalInnerWidth = global.innerWidth;\n const originalInnerHeight = global.innerHeight;\n afterEach(() => {\n global.innerWidth = originalInnerWidth;\n global.innerHeight = originalInnerHeight;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n test('Should remain unchanged on zoom in', () => {\n testFunction();\n global.innerWidth = window.innerWidth / 2;\n global.innerHeight = window.innerHeight / 2;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n test('Should remain unchanged on zoom out', () => {\n testFunction();\n global.innerWidth = window.innerWidth * 2;\n global.innerHeight = window.innerHeight * 2;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n};\n"]}
@@ -1,5 +0,0 @@
1
- export declare const getById: (container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
2
- export declare const getByClass: (container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
3
- export declare const testWithoutWait: (description: string, component: any, props: any, testFunction: (container: HTMLElement) => void, testFunctionBeforeWait?: () => void) => void;
4
- export declare const testWithWait: (description: string, component: any, props: any, testFunction: (container: HTMLElement) => void) => void;
5
- export declare const testScreenResolutionChanges: (testFunction: () => void) => void;
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.testScreenResolutionChanges = exports.testWithWait = exports.testWithoutWait = exports.getByClass = exports.getById = void 0;
4
- var tslib_1 = require("tslib");
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- var react_1 = require("@testing-library/react");
7
- var React = require("react");
8
- exports.getById = react_1.queryAllByAttribute.bind(null, 'id');
9
- exports.getByClass = react_1.queryAllByAttribute.bind(null, 'class');
10
- // Test function that does not wait for any async calls to finish
11
- var testWithoutWait = function (description, component, props, testFunction, testFunctionBeforeWait) {
12
- test(description, function () {
13
- var container = (0, react_1.render)(React.createElement(component, (props = tslib_1.__assign({}, props)))).container;
14
- testFunctionBeforeWait !== undefined && testFunctionBeforeWait();
15
- testFunction(container);
16
- });
17
- };
18
- exports.testWithoutWait = testWithoutWait;
19
- // Test function that waits for async calls to finish
20
- var testWithWait = function (description, component, props, testFunction) {
21
- test(description, function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
22
- var container;
23
- return tslib_1.__generator(this, function (_a) {
24
- switch (_a.label) {
25
- case 0:
26
- container = (0, react_1.render)(React.createElement(component, (props = tslib_1.__assign({}, props)))).container;
27
- return [4 /*yield*/, (0, react_1.waitFor)(function () {
28
- testFunction(container);
29
- })];
30
- case 1:
31
- _a.sent();
32
- return [2 /*return*/];
33
- }
34
- });
35
- }); });
36
- };
37
- exports.testWithWait = testWithWait;
38
- // Test Screen Resolution changes like zoom in and zoom out
39
- var testScreenResolutionChanges = function (testFunction) {
40
- var originalInnerWidth = global.innerWidth;
41
- var originalInnerHeight = global.innerHeight;
42
- afterEach(function () {
43
- global.innerWidth = originalInnerWidth;
44
- global.innerHeight = originalInnerHeight;
45
- (0, react_1.act)(function () {
46
- global.dispatchEvent(new Event('resize'));
47
- });
48
- });
49
- test('Should remain unchanged on zoom in', function () {
50
- testFunction();
51
- global.innerWidth = window.innerWidth / 2;
52
- global.innerHeight = window.innerHeight / 2;
53
- (0, react_1.act)(function () {
54
- global.dispatchEvent(new Event('resize'));
55
- });
56
- });
57
- test('Should remain unchanged on zoom out', function () {
58
- testFunction();
59
- global.innerWidth = window.innerWidth * 2;
60
- global.innerHeight = window.innerHeight * 2;
61
- (0, react_1.act)(function () {
62
- global.dispatchEvent(new Event('resize'));
63
- });
64
- });
65
- };
66
- exports.testScreenResolutionChanges = testScreenResolutionChanges;
67
- //# sourceMappingURL=TestUtility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestUtility.js","sourceRoot":"../src/","sources":["utilities/TestUtility.tsx"],"names":[],"mappings":";;;;AAAA,uDAAuD;AACvD,gDAAmF;AACnF,6BAA+B;AAElB,QAAA,OAAO,GAAG,2BAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/C,QAAA,UAAU,GAAG,2BAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAElE,iEAAiE;AAC1D,IAAM,eAAe,GAAG,UAC7B,WAAmB,EACnB,SAAc,EACd,KAAU,EACV,YAA8C,EAC9C,sBAAmC;IAEnC,IAAI,CAAC,WAAW,EAAE;QACR,IAAA,SAAS,GAAK,IAAA,cAAM,EAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,KAAK,wBAAQ,KAAK,CAAE,CAAC,CAAC,CAAC,UAAnE,CAAoE;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,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,qCAAqC,EAAE;QAC1C,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;QAC1C,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC;QAC5C,IAAA,WAAG,EAAC;YACF,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA1BW,QAAA,2BAA2B,+BA0BtC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { act, queryAllByAttribute, render, waitFor } from '@testing-library/react';\nimport * as React from 'react';\n\nexport const getById = queryAllByAttribute.bind(null, 'id');\nexport const getByClass = queryAllByAttribute.bind(null, 'class');\n\n// Test function that does not wait for any async calls to finish\nexport const testWithoutWait = (\n description: string,\n component: any,\n props: any,\n testFunction: (container: HTMLElement) => void,\n testFunctionBeforeWait?: () => void,\n) => {\n test(description, () => {\n const { container } = render(React.createElement(component, (props = { ...props })));\n testFunctionBeforeWait !== undefined && testFunctionBeforeWait();\n testFunction(container);\n });\n};\n\n// Test function that waits for async calls to finish\nexport const testWithWait = (\n description: string,\n component: any,\n props: any,\n testFunction: (container: HTMLElement) => void,\n) => {\n test(description, async () => {\n const { container } = render(React.createElement(component, (props = { ...props })));\n await waitFor(() => {\n testFunction(container);\n });\n });\n};\n\n// Test Screen Resolution changes like zoom in and zoom out\nexport const testScreenResolutionChanges = (testFunction: () => void) => {\n const originalInnerWidth = global.innerWidth;\n const originalInnerHeight = global.innerHeight;\n afterEach(() => {\n global.innerWidth = originalInnerWidth;\n global.innerHeight = originalInnerHeight;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n test('Should remain unchanged on zoom in', () => {\n testFunction();\n global.innerWidth = window.innerWidth / 2;\n global.innerHeight = window.innerHeight / 2;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n test('Should remain unchanged on zoom out', () => {\n testFunction();\n global.innerWidth = window.innerWidth * 2;\n global.innerHeight = window.innerHeight * 2;\n act(() => {\n global.dispatchEvent(new Event('resize'));\n });\n });\n};\n"]}