@fluentui/react-charting 5.10.1 → 5.12.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 (90) hide show
  1. package/CHANGELOG.json +72 -1
  2. package/CHANGELOG.md +32 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/TreeChart.d.ts +1 -0
  6. package/lib/TreeChart.js +2 -0
  7. package/lib/TreeChart.js.map +1 -0
  8. package/lib/Utilities.d.ts +1 -1
  9. package/lib/Utilities.js +4 -2
  10. package/lib/Utilities.js.map +1 -1
  11. package/lib/components/Legends/Legends.base.js +2 -1
  12. package/lib/components/Legends/Legends.base.js.map +1 -1
  13. package/lib/components/TreeChart/TreeChart.base.d.ts +18 -0
  14. package/lib/components/TreeChart/TreeChart.base.js +239 -0
  15. package/lib/components/TreeChart/TreeChart.base.js.map +1 -0
  16. package/lib/components/TreeChart/TreeChart.d.ts +3 -0
  17. package/lib/components/TreeChart/TreeChart.js +5 -0
  18. package/lib/components/TreeChart/TreeChart.js.map +1 -0
  19. package/lib/components/TreeChart/TreeChart.styles.d.ts +2 -0
  20. package/lib/components/TreeChart/TreeChart.styles.js +20 -0
  21. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -0
  22. package/lib/components/TreeChart/TreeChart.types.d.ts +88 -0
  23. package/lib/components/TreeChart/TreeChart.types.js +11 -0
  24. package/lib/components/TreeChart/TreeChart.types.js.map +1 -0
  25. package/lib/components/TreeChart/index.d.ts +2 -0
  26. package/lib/components/TreeChart/index.js +3 -0
  27. package/lib/components/TreeChart/index.js.map +1 -0
  28. package/lib/index.d.ts +1 -0
  29. package/lib/index.js +1 -0
  30. package/lib/index.js.map +1 -1
  31. package/lib/version.js +1 -1
  32. package/lib/version.js.map +1 -1
  33. package/lib-amd/TreeChart.d.ts +1 -0
  34. package/lib-amd/TreeChart.js +6 -0
  35. package/lib-amd/TreeChart.js.map +1 -0
  36. package/lib-amd/Utilities.d.ts +1 -1
  37. package/lib-amd/Utilities.js +3 -1
  38. package/lib-amd/Utilities.js.map +1 -1
  39. package/lib-amd/components/Legends/Legends.base.js +2 -1
  40. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  41. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
  42. package/lib-amd/components/TreeChart/TreeChart.base.js +238 -0
  43. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
  44. package/lib-amd/components/TreeChart/TreeChart.d.ts +3 -0
  45. package/lib-amd/components/TreeChart/TreeChart.js +7 -0
  46. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
  47. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
  48. package/lib-amd/components/TreeChart/TreeChart.styles.js +25 -0
  49. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
  50. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +88 -0
  51. package/lib-amd/components/TreeChart/TreeChart.types.js +16 -0
  52. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
  53. package/lib-amd/components/TreeChart/index.d.ts +2 -0
  54. package/lib-amd/components/TreeChart/index.js +7 -0
  55. package/lib-amd/components/TreeChart/index.js.map +1 -0
  56. package/lib-amd/index.d.ts +1 -0
  57. package/lib-amd/index.js +2 -1
  58. package/lib-amd/index.js.map +1 -1
  59. package/lib-amd/version.js +1 -1
  60. package/lib-amd/version.js.map +1 -1
  61. package/lib-commonjs/TreeChart.d.ts +1 -0
  62. package/lib-commonjs/TreeChart.js +5 -0
  63. package/lib-commonjs/TreeChart.js.map +1 -0
  64. package/lib-commonjs/Utilities.d.ts +1 -1
  65. package/lib-commonjs/Utilities.js +6 -4
  66. package/lib-commonjs/Utilities.js.map +1 -1
  67. package/lib-commonjs/components/Legends/Legends.base.js +2 -1
  68. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  69. package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +18 -0
  70. package/lib-commonjs/components/TreeChart/TreeChart.base.js +242 -0
  71. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -0
  72. package/lib-commonjs/components/TreeChart/TreeChart.d.ts +3 -0
  73. package/lib-commonjs/components/TreeChart/TreeChart.js +8 -0
  74. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -0
  75. package/lib-commonjs/components/TreeChart/TreeChart.styles.d.ts +2 -0
  76. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +24 -0
  77. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -0
  78. package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +88 -0
  79. package/lib-commonjs/components/TreeChart/TreeChart.types.js +14 -0
  80. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -0
  81. package/lib-commonjs/components/TreeChart/index.d.ts +2 -0
  82. package/lib-commonjs/components/TreeChart/index.js +6 -0
  83. package/lib-commonjs/components/TreeChart/index.js.map +1 -0
  84. package/lib-commonjs/index.d.ts +1 -0
  85. package/lib-commonjs/index.js +1 -0
  86. package/lib-commonjs/index.js.map +1 -1
  87. package/lib-commonjs/version.js +1 -1
  88. package/lib-commonjs/version.js.map +1 -1
  89. package/package.json +6 -4
  90. package/src/components/TreeChart/TreeChart.types.ts +89 -0
@@ -0,0 +1,88 @@
1
+ import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ export interface ITreeChartDataPoint {
4
+ name: string;
5
+ subname: string;
6
+ metric?: string | undefined;
7
+ fill: string;
8
+ children?: Array<ITreeChartDataPoint>;
9
+ }
10
+ export declare enum NodesComposition {
11
+ long = 1,
12
+ compact = 0
13
+ }
14
+ export declare enum TreeTraverse {
15
+ preOrder = 1,
16
+ levelOrder = 0
17
+ }
18
+ export interface ITreeProps {
19
+ /**
20
+ * An object of chart data points for the Tree chart
21
+ */
22
+ treeData: ITreeChartDataPoint;
23
+ /**
24
+ * compostion for three layer chart, long: composition = 1; compact: composition = 0
25
+ */
26
+ composition?: NodesComposition.long | NodesComposition.compact | undefined;
27
+ /**
28
+ * traversal order for tree chart, preOrder = 1, levelOrder = 0
29
+ */
30
+ treeTraversal?: TreeTraverse.preOrder | TreeTraverse.levelOrder;
31
+ /**
32
+ * Width of SVG tree chart
33
+ * * @default 1200
34
+ */
35
+ width?: number;
36
+ /**
37
+ * Height of SVG tree chart
38
+ * * @default 700
39
+ */
40
+ height?: number;
41
+ /**
42
+ * Margin for the SVG tree chart
43
+ */
44
+ marign?: {
45
+ left: number;
46
+ right: number;
47
+ top: number;
48
+ bottom: number;
49
+ };
50
+ /**
51
+ * Call to provide customized styling that will layer on top of the variant rules.
52
+ */
53
+ styles?: IStyleFunctionOrObject<ITreeStyleProps, ITreeStyles>;
54
+ /**
55
+ * Additional CSS class(es) to apply to the TreeChart.
56
+ */
57
+ className?: string;
58
+ /**
59
+ * Theme (provided through customization.)
60
+ */
61
+ theme?: ITheme;
62
+ }
63
+ export interface ITreeState {
64
+ _width: number;
65
+ _height: number;
66
+ }
67
+ export interface ITreeDataStructure {
68
+ id: number;
69
+ children: unknown;
70
+ dataName: string;
71
+ subName: string;
72
+ metricName?: string | undefined;
73
+ fill: string;
74
+ x: number;
75
+ y: number;
76
+ parentID: number;
77
+ }
78
+ export interface ITreeStyleProps {
79
+ theme: ITheme;
80
+ className?: string;
81
+ }
82
+ export interface ITreeStyles {
83
+ link: IStyle;
84
+ rectNode: IStyle;
85
+ rectText: IStyle;
86
+ rectSubText: IStyle;
87
+ rectMetricText: IStyle;
88
+ }
@@ -0,0 +1,11 @@
1
+ export var NodesComposition;
2
+ (function (NodesComposition) {
3
+ NodesComposition[NodesComposition["long"] = 1] = "long";
4
+ NodesComposition[NodesComposition["compact"] = 0] = "compact";
5
+ })(NodesComposition || (NodesComposition = {}));
6
+ export var TreeTraverse;
7
+ (function (TreeTraverse) {
8
+ TreeTraverse[TreeTraverse["preOrder"] = 1] = "preOrder";
9
+ TreeTraverse[TreeTraverse["levelOrder"] = 0] = "levelOrder";
10
+ })(TreeTraverse || (TreeTraverse = {}));
11
+ //# sourceMappingURL=TreeChart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.types.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uDAAQ,CAAA;IACR,6DAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,uDAAY,CAAA;IACZ,2DAAc,CAAA;AAChB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\n\nexport interface ITreeChartDataPoint {\n name: string;\n subname: string;\n metric?: string | undefined;\n fill: string;\n children?: Array<ITreeChartDataPoint>;\n}\n\nexport enum NodesComposition {\n long = 1,\n compact = 0,\n}\n\nexport enum TreeTraverse {\n preOrder = 1,\n levelOrder = 0,\n}\n\nexport interface ITreeProps {\n /**\n * An object of chart data points for the Tree chart\n */\n treeData: ITreeChartDataPoint;\n /**\n * compostion for three layer chart, long: composition = 1; compact: composition = 0\n */\n composition?: NodesComposition.long | NodesComposition.compact | undefined;\n /**\n * traversal order for tree chart, preOrder = 1, levelOrder = 0\n */\n treeTraversal?: TreeTraverse.preOrder | TreeTraverse.levelOrder;\n /**\n * Width of SVG tree chart\n * * @default 1200\n */\n width?: number;\n /**\n * Height of SVG tree chart\n * * @default 700\n */\n height?: number;\n /**\n * Margin for the SVG tree chart\n */\n marign?: { left: number; right: number; top: number; bottom: number };\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ITreeStyleProps, ITreeStyles>;\n /**\n * Additional CSS class(es) to apply to the TreeChart.\n */\n className?: string;\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n}\nexport interface ITreeState {\n _width: number;\n _height: number;\n}\n\nexport interface ITreeDataStructure {\n id: number;\n children: unknown;\n dataName: string;\n subName: string;\n metricName?: string | undefined;\n fill: string;\n x: number;\n y: number;\n parentID: number;\n}\n\nexport interface ITreeStyleProps {\n theme: ITheme;\n className?: string;\n}\nexport interface ITreeStyles {\n link: IStyle;\n rectNode: IStyle;\n rectText: IStyle;\n rectSubText: IStyle;\n rectMetricText: IStyle;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './TreeChart';
2
+ export * from './TreeChart.types';
@@ -0,0 +1,3 @@
1
+ export * from './TreeChart';
2
+ export * from './TreeChart.types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TreeChart/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './TreeChart';\nexport * from './TreeChart.types';\n"]}
package/lib/index.d.ts CHANGED
@@ -13,5 +13,6 @@ export * from './types/index';
13
13
  export * from './utilities/ChartHoverCard/index';
14
14
  export * from './HeatMapChart';
15
15
  export * from './SankeyChart';
16
+ export * from './TreeChart';
16
17
  export * from './Sparkline';
17
18
  import './version';
package/lib/index.js CHANGED
@@ -13,6 +13,7 @@ export * from './types/index';
13
13
  export * from './utilities/ChartHoverCard/index';
14
14
  export * from './HeatMapChart';
15
15
  export * from './SankeyChart';
16
+ export * from './TreeChart';
16
17
  export * from './Sparkline';
17
18
  import './version';
18
19
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,OAAO,WAAW,CAAC","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,OAAO,WAAW,CAAC","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './TreeChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Do not modify this file; it is generated as part of publish.
2
2
  // The checked in version is a placeholder only and will not be updated.
3
3
  import { setVersion } from '@fluentui/set-version';
4
- setVersion('@fluentui/react-charting', '5.10.1');
4
+ setVersion('@fluentui/react-charting', '5.12.1');
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,UAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.10.1');"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,UAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.12.1');"]}
@@ -0,0 +1 @@
1
+ export * from './components/TreeChart/index';
@@ -0,0 +1,6 @@
1
+ define(["require", "exports", "tslib", "./components/TreeChart/index"], function (require, exports, tslib_1, index_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ tslib_1.__exportStar(index_1, exports);
5
+ });
6
+ //# sourceMappingURL=TreeChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.js","sourceRoot":"../src/","sources":["TreeChart.ts"],"names":[],"mappings":";;;IAAA,uCAA6C","sourcesContent":["export * from './components/TreeChart/index';\n"]}
@@ -1,2 +1,2 @@
1
- export { Async, AutoScroll, BaseComponent, Customizations, Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, DATA_PORTAL_ATTRIBUTE, DelayedRender, EventGroup, FabricPerformance, FocusRects, GlobalSettings, IsFocusVisibleClassName, KeyCodes, Rectangle, SELECTION_CHANGE, Selection, SelectionDirection, SelectionMode, addDirectionalKeyCode, addElementAtIndex, allowOverscrollOnElement, allowScrollOnElement, anchorProperties, appendFunction, arraysEqual, asAsync, assertNever, assign, audioProperties, baseElementEvents, baseElementProperties, buttonProperties, calculatePrecision, classNamesFunction, colGroupProperties, colProperties, composeComponentAs, composeRenderFunction, createArray, createMemoizer, createMergedRef, css, customizable, disableBodyScroll, divProperties, doesElementContainFocus, elementContains, elementContainsAttribute, enableBodyScroll, extendComponent, filteredAssign, find, findElementRecursive, findIndex, findScrollableParent, fitContentToBounds, flatten, focusAsync, focusFirstChild, formProperties, format, getChildren, getDistanceBetweenPoints, getDocument, getElementIndexPath, getFirstFocusable, getFirstTabbable, getFirstVisibleElementFromSelector, getFocusableByIndexPath, getId, getInitials, getLanguage, getLastFocusable, getLastTabbable, getNativeElementProps, getNativeProps, getNextElement, getParent, getPreviousElement, getPropsWithDefaults, getRTL, getRTLSafeKeyCode, getRect, getResourceUrl, getScrollbarWidth, getVirtualParent, getWindow, hasHorizontalOverflow, hasOverflow, hasVerticalOverflow, hoistMethods, hoistStatics, htmlElementProperties, iframeProperties, imageProperties, imgProperties, initializeComponentRef, initializeFocusRects, inputProperties, isControlled, isDirectionalKeyCode, isElementFocusSubZone, isElementFocusZone, isElementTabbable, isElementVisible, isElementVisibleAndNotHidden, isIE11, isIOS, isMac, isVirtualElement, labelProperties, liProperties, mapEnumByName, memoize, memoizeFunction, merge, mergeAriaAttributeValues, mergeCustomizations, mergeScopedSettings, mergeSettings, modalize, nullRender, olProperties, omit, on, optionProperties, portalContainsElement, precisionRound, raiseClick, removeIndex, replaceElement, resetControlledWarnings, resetIds, resetMemoizations, safeRequestAnimationFrame, safeSetTimeout, selectProperties, setBaseUrl, setFocusVisibility, setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, setSSR, setVirtualParent, setWarningCallback, shallowCompare, shouldWrapFocus, styled, tableProperties, tdProperties, textAreaProperties, thProperties, toMatrix, trProperties, unhoistMethods, useCustomizationSettings, useFocusRects, values, videoProperties, warn, warnConditionallyRequiredProps, warnControlledUsage, warnDeprecations, warnMutuallyExclusive, } from '@fluentui/react/lib/Utilities';
1
+ export { Async, AutoScroll, BaseComponent, Customizations, Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, DATA_PORTAL_ATTRIBUTE, DelayedRender, EventGroup, FabricPerformance, FocusRects, GlobalSettings, IsFocusVisibleClassName, KeyCodes, Rectangle, SELECTION_CHANGE, Selection, SelectionDirection, SelectionMode, addDirectionalKeyCode, addElementAtIndex, allowOverscrollOnElement, allowScrollOnElement, anchorProperties, appendFunction, arraysEqual, asAsync, assertNever, assign, audioProperties, baseElementEvents, baseElementProperties, buttonProperties, calculatePrecision, canUseDOM, classNamesFunction, colGroupProperties, colProperties, composeComponentAs, composeRenderFunction, createArray, createMemoizer, createMergedRef, css, customizable, disableBodyScroll, divProperties, doesElementContainFocus, elementContains, elementContainsAttribute, enableBodyScroll, extendComponent, filteredAssign, find, findElementRecursive, findIndex, findScrollableParent, fitContentToBounds, flatten, focusAsync, focusFirstChild, formProperties, format, getChildren, getDistanceBetweenPoints, getDocument, getElementIndexPath, getFirstFocusable, getFirstTabbable, getFirstVisibleElementFromSelector, getFocusableByIndexPath, getId, getInitials, getLanguage, getLastFocusable, getLastTabbable, getNativeElementProps, getNativeProps, getNextElement, getParent, getPreviousElement, getPropsWithDefaults, getRTL, getRTLSafeKeyCode, getRect, getResourceUrl, getScrollbarWidth, getVirtualParent, getWindow, hasHorizontalOverflow, hasOverflow, hasVerticalOverflow, hoistMethods, hoistStatics, htmlElementProperties, iframeProperties, imageProperties, imgProperties, initializeComponentRef, initializeFocusRects, inputProperties, isControlled, isDirectionalKeyCode, isElementFocusSubZone, isElementFocusZone, isElementTabbable, isElementVisible, isElementVisibleAndNotHidden, isIE11, isIOS, isMac, isVirtualElement, labelProperties, liProperties, mapEnumByName, memoize, memoizeFunction, merge, mergeAriaAttributeValues, mergeCustomizations, mergeScopedSettings, mergeSettings, modalize, nullRender, olProperties, omit, on, optionProperties, portalContainsElement, precisionRound, raiseClick, removeIndex, replaceElement, resetControlledWarnings, resetIds, resetMemoizations, safeRequestAnimationFrame, safeSetTimeout, selectProperties, setBaseUrl, setFocusVisibility, setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, setSSR, setVirtualParent, setWarningCallback, shallowCompare, shouldWrapFocus, styled, tableProperties, tdProperties, textAreaProperties, thProperties, toMatrix, trProperties, unhoistMethods, useCustomizationSettings, useFocusRects, values, videoProperties, warn, warnConditionallyRequiredProps, warnControlledUsage, warnDeprecations, warnMutuallyExclusive, } from '@fluentui/react/lib/Utilities';
2
2
  export type { FitMode, IAsAsyncOptions, IBaseProps, ICancelable, IChangeDescription, IChangeEventCallback, IClassNames, IClassNamesFunctionOptions, IComponentAs, IComponentAsProps, ICssInput, ICustomizableProps, ICustomizations, ICustomizerContext, ICustomizerProps, IDeclaredEventsByName, IDelayedRenderProps, IDelayedRenderState, IDictionary, IDisposable, IEventRecord, IEventRecordList, IEventRecordsByName, IFitContentToBoundsOptions, IObjectWithKey, IPerfData, IPerfMeasurement, IPerfSummary, IPoint, IPropsWithStyles, IRectangle, IRefObject, IRenderComponent, IRenderFunction, ISelection, ISelectionOptions, ISelectionOptionsWithRequiredGetKey, ISerializableObject, ISettings, ISettingsFunction, ISettingsMap, ISize, IStyleFunction, IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, Omit, Point, RefObject, Settings, SettingsFunction, StyleFunction, } from '@fluentui/react/lib/Utilities';
@@ -1,7 +1,7 @@
1
1
  define(["require", "exports", "@fluentui/react/lib/Utilities"], function (require, exports, Utilities_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.warnMutuallyExclusive = exports.warnDeprecations = exports.warnControlledUsage = exports.warnConditionallyRequiredProps = exports.warn = exports.videoProperties = exports.values = exports.useFocusRects = exports.useCustomizationSettings = exports.unhoistMethods = exports.trProperties = exports.toMatrix = exports.thProperties = exports.textAreaProperties = exports.tdProperties = exports.tableProperties = exports.styled = exports.shouldWrapFocus = exports.shallowCompare = exports.setWarningCallback = exports.setVirtualParent = exports.setSSR = exports.setRTL = exports.setPortalAttribute = exports.setMemoizeWeakMap = exports.setLanguage = exports.setFocusVisibility = exports.setBaseUrl = exports.selectProperties = exports.safeSetTimeout = exports.safeRequestAnimationFrame = exports.resetMemoizations = exports.resetIds = exports.resetControlledWarnings = exports.replaceElement = exports.removeIndex = exports.raiseClick = exports.precisionRound = exports.portalContainsElement = exports.optionProperties = exports.on = exports.omit = exports.olProperties = exports.nullRender = exports.modalize = exports.mergeSettings = exports.mergeScopedSettings = exports.mergeCustomizations = exports.mergeAriaAttributeValues = exports.merge = exports.memoizeFunction = exports.memoize = exports.mapEnumByName = exports.liProperties = exports.labelProperties = exports.isVirtualElement = exports.isMac = exports.isIOS = exports.isIE11 = exports.isElementVisibleAndNotHidden = exports.isElementVisible = exports.isElementTabbable = exports.isElementFocusZone = exports.isElementFocusSubZone = exports.isDirectionalKeyCode = exports.isControlled = exports.inputProperties = exports.initializeFocusRects = exports.initializeComponentRef = exports.imgProperties = exports.imageProperties = exports.iframeProperties = exports.htmlElementProperties = exports.hoistStatics = exports.hoistMethods = exports.hasVerticalOverflow = exports.hasOverflow = exports.hasHorizontalOverflow = exports.getWindow = exports.getVirtualParent = exports.getScrollbarWidth = exports.getResourceUrl = exports.getRect = exports.getRTLSafeKeyCode = exports.getRTL = exports.getPropsWithDefaults = exports.getPreviousElement = exports.getParent = exports.getNextElement = exports.getNativeProps = exports.getNativeElementProps = exports.getLastTabbable = exports.getLastFocusable = exports.getLanguage = exports.getInitials = exports.getId = exports.getFocusableByIndexPath = exports.getFirstVisibleElementFromSelector = exports.getFirstTabbable = exports.getFirstFocusable = exports.getElementIndexPath = exports.getDocument = exports.getDistanceBetweenPoints = exports.getChildren = exports.format = exports.formProperties = exports.focusFirstChild = exports.focusAsync = exports.flatten = exports.fitContentToBounds = exports.findScrollableParent = exports.findIndex = exports.findElementRecursive = exports.find = exports.filteredAssign = exports.extendComponent = exports.enableBodyScroll = exports.elementContainsAttribute = exports.elementContains = exports.doesElementContainFocus = exports.divProperties = exports.disableBodyScroll = exports.customizable = exports.css = exports.createMergedRef = exports.createMemoizer = exports.createArray = exports.composeRenderFunction = exports.composeComponentAs = exports.colProperties = exports.colGroupProperties = exports.classNamesFunction = exports.calculatePrecision = exports.buttonProperties = exports.baseElementProperties = exports.baseElementEvents = exports.audioProperties = exports.assign = exports.assertNever = exports.asAsync = exports.arraysEqual = exports.appendFunction = exports.anchorProperties = exports.allowScrollOnElement = exports.allowOverscrollOnElement = exports.addElementAtIndex = exports.addDirectionalKeyCode = exports.SelectionMode = exports.SelectionDirection = exports.Selection = exports.SELECTION_CHANGE = exports.Rectangle = exports.KeyCodes = exports.IsFocusVisibleClassName = exports.GlobalSettings = exports.FocusRects = exports.FabricPerformance = exports.EventGroup = exports.DelayedRender = exports.DATA_PORTAL_ATTRIBUTE = exports.DATA_IS_SCROLLABLE_ATTRIBUTE = exports.CustomizerContext = exports.Customizer = exports.Customizations = exports.BaseComponent = exports.AutoScroll = exports.Async = void 0;
4
+ exports.warnMutuallyExclusive = exports.warnDeprecations = exports.warnControlledUsage = exports.warnConditionallyRequiredProps = exports.warn = exports.videoProperties = exports.values = exports.useFocusRects = exports.useCustomizationSettings = exports.unhoistMethods = exports.trProperties = exports.toMatrix = exports.thProperties = exports.textAreaProperties = exports.tdProperties = exports.tableProperties = exports.styled = exports.shouldWrapFocus = exports.shallowCompare = exports.setWarningCallback = exports.setVirtualParent = exports.setSSR = exports.setRTL = exports.setPortalAttribute = exports.setMemoizeWeakMap = exports.setLanguage = exports.setFocusVisibility = exports.setBaseUrl = exports.selectProperties = exports.safeSetTimeout = exports.safeRequestAnimationFrame = exports.resetMemoizations = exports.resetIds = exports.resetControlledWarnings = exports.replaceElement = exports.removeIndex = exports.raiseClick = exports.precisionRound = exports.portalContainsElement = exports.optionProperties = exports.on = exports.omit = exports.olProperties = exports.nullRender = exports.modalize = exports.mergeSettings = exports.mergeScopedSettings = exports.mergeCustomizations = exports.mergeAriaAttributeValues = exports.merge = exports.memoizeFunction = exports.memoize = exports.mapEnumByName = exports.liProperties = exports.labelProperties = exports.isVirtualElement = exports.isMac = exports.isIOS = exports.isIE11 = exports.isElementVisibleAndNotHidden = exports.isElementVisible = exports.isElementTabbable = exports.isElementFocusZone = exports.isElementFocusSubZone = exports.isDirectionalKeyCode = exports.isControlled = exports.inputProperties = exports.initializeFocusRects = exports.initializeComponentRef = exports.imgProperties = exports.imageProperties = exports.iframeProperties = exports.htmlElementProperties = exports.hoistStatics = exports.hoistMethods = exports.hasVerticalOverflow = exports.hasOverflow = exports.hasHorizontalOverflow = exports.getWindow = exports.getVirtualParent = exports.getScrollbarWidth = exports.getResourceUrl = exports.getRect = exports.getRTLSafeKeyCode = exports.getRTL = exports.getPropsWithDefaults = exports.getPreviousElement = exports.getParent = exports.getNextElement = exports.getNativeProps = exports.getNativeElementProps = exports.getLastTabbable = exports.getLastFocusable = exports.getLanguage = exports.getInitials = exports.getId = exports.getFocusableByIndexPath = exports.getFirstVisibleElementFromSelector = exports.getFirstTabbable = exports.getFirstFocusable = exports.getElementIndexPath = exports.getDocument = exports.getDistanceBetweenPoints = exports.getChildren = exports.format = exports.formProperties = exports.focusFirstChild = exports.focusAsync = exports.flatten = exports.fitContentToBounds = exports.findScrollableParent = exports.findIndex = exports.findElementRecursive = exports.find = exports.filteredAssign = exports.extendComponent = exports.enableBodyScroll = exports.elementContainsAttribute = exports.elementContains = exports.doesElementContainFocus = exports.divProperties = exports.disableBodyScroll = exports.customizable = exports.css = exports.createMergedRef = exports.createMemoizer = exports.createArray = exports.composeRenderFunction = exports.composeComponentAs = exports.colProperties = exports.colGroupProperties = exports.classNamesFunction = exports.canUseDOM = exports.calculatePrecision = exports.buttonProperties = exports.baseElementProperties = exports.baseElementEvents = exports.audioProperties = exports.assign = exports.assertNever = exports.asAsync = exports.arraysEqual = exports.appendFunction = exports.anchorProperties = exports.allowScrollOnElement = exports.allowOverscrollOnElement = exports.addElementAtIndex = exports.addDirectionalKeyCode = exports.SelectionMode = exports.SelectionDirection = exports.Selection = exports.SELECTION_CHANGE = exports.Rectangle = exports.KeyCodes = exports.IsFocusVisibleClassName = exports.GlobalSettings = exports.FocusRects = exports.FabricPerformance = exports.EventGroup = exports.DelayedRender = exports.DATA_PORTAL_ATTRIBUTE = exports.DATA_IS_SCROLLABLE_ATTRIBUTE = exports.CustomizerContext = exports.Customizer = exports.Customizations = exports.BaseComponent = exports.AutoScroll = exports.Async = void 0;
5
5
  Object.defineProperty(exports, "Async", { enumerable: true, get: function () { return Utilities_1.Async; } });
6
6
  Object.defineProperty(exports, "AutoScroll", { enumerable: true, get: function () { return Utilities_1.AutoScroll; } });
7
7
  // eslint-disable-next-line deprecation/deprecation
@@ -39,6 +39,7 @@ define(["require", "exports", "@fluentui/react/lib/Utilities"], function (requir
39
39
  Object.defineProperty(exports, "baseElementProperties", { enumerable: true, get: function () { return Utilities_1.baseElementProperties; } });
40
40
  Object.defineProperty(exports, "buttonProperties", { enumerable: true, get: function () { return Utilities_1.buttonProperties; } });
41
41
  Object.defineProperty(exports, "calculatePrecision", { enumerable: true, get: function () { return Utilities_1.calculatePrecision; } });
42
+ Object.defineProperty(exports, "canUseDOM", { enumerable: true, get: function () { return Utilities_1.canUseDOM; } });
42
43
  Object.defineProperty(exports, "classNamesFunction", { enumerable: true, get: function () { return Utilities_1.classNamesFunction; } });
43
44
  Object.defineProperty(exports, "colGroupProperties", { enumerable: true, get: function () { return Utilities_1.colGroupProperties; } });
44
45
  Object.defineProperty(exports, "colProperties", { enumerable: true, get: function () { return Utilities_1.colProperties; } });
@@ -155,6 +156,7 @@ define(["require", "exports", "@fluentui/react/lib/Utilities"], function (requir
155
156
  Object.defineProperty(exports, "setMemoizeWeakMap", { enumerable: true, get: function () { return Utilities_1.setMemoizeWeakMap; } });
156
157
  Object.defineProperty(exports, "setPortalAttribute", { enumerable: true, get: function () { return Utilities_1.setPortalAttribute; } });
157
158
  Object.defineProperty(exports, "setRTL", { enumerable: true, get: function () { return Utilities_1.setRTL; } });
159
+ // eslint-disable-next-line deprecation/deprecation
158
160
  Object.defineProperty(exports, "setSSR", { enumerable: true, get: function () { return Utilities_1.setSSR; } });
159
161
  Object.defineProperty(exports, "setVirtualParent", { enumerable: true, get: function () { return Utilities_1.setVirtualParent; } });
160
162
  Object.defineProperty(exports, "setWarningCallback", { enumerable: true, get: function () { return Utilities_1.setWarningCallback; } });
@@ -1 +1 @@
1
- {"version":3,"file":"Utilities.js","sourceRoot":"../src/","sources":["Utilities.ts"],"names":[],"mappings":";;;;IACE,kGAAA,KAAK,OAAA;IACL,uGAAA,UAAU,OAAA;IACV,mDAAmD;IACnD,0GAAA,aAAa,OAAA;IACb,2GAAA,cAAc,OAAA;IACd,mDAAmD;IACnD,uGAAA,UAAU,OAAA;IACV,8GAAA,iBAAiB,OAAA;IACjB,yHAAA,4BAA4B,OAAA;IAC5B,kHAAA,qBAAqB,OAAA;IACrB,0GAAA,aAAa,OAAA;IACb,uGAAA,UAAU,OAAA;IACV,8GAAA,iBAAiB,OAAA;IACjB,uGAAA,UA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AAe,OAAA;IACf,yGAAA,YAAY,OAAA;IACZ,+GAAA,kBAAkB,OAAA;IAClB,yGAAA,YAAY,OAAA;IACZ,qGAAA,QAAQ,OAAA;IACR,yGAAA,YAAY,OAAA;IACZ,2GAAA,cAAc,OAAA;IACd,qHAAA,wBAAwB,OAAA;IACxB,0GAAA,aAAa,OAAA;IACb,mGAAA,MAAM,OAAA;IACN,4GAAA,eAAe,OAAA;IACf,iGAAA,IAAI,OAAA;IACJ,2HAAA,8BAA8B,OAAA;IAC9B,gHAAA,mBAAmB,OAAA;IACnB,6GAAA,gBAAgB,OAAA;IAChB,kHAAA,qBAAqB,OAAA","sourcesContent":["export {\n Async,\n AutoScroll,\n // eslint-disable-next-line deprecation/deprecation\n BaseComponent,\n Customizations,\n // eslint-disable-next-line deprecation/deprecation\n Customizer,\n CustomizerContext,\n DATA_IS_SCROLLABLE_ATTRIBUTE,\n DATA_PORTAL_ATTRIBUTE,\n DelayedRender,\n EventGroup,\n FabricPerformance,\n FocusRects,\n GlobalSettings,\n IsFocusVisibleClassName,\n KeyCodes,\n Rectangle,\n SELECTION_CHANGE,\n Selection,\n SelectionDirection,\n SelectionMode,\n addDirectionalKeyCode,\n addElementAtIndex,\n allowOverscrollOnElement,\n allowScrollOnElement,\n anchorProperties,\n appendFunction,\n arraysEqual,\n asAsync,\n assertNever,\n assign,\n audioProperties,\n baseElementEvents,\n baseElementProperties,\n buttonProperties,\n calculatePrecision,\n classNamesFunction,\n colGroupProperties,\n colProperties,\n composeComponentAs,\n composeRenderFunction,\n createArray,\n createMemoizer,\n createMergedRef,\n css,\n customizable,\n disableBodyScroll,\n divProperties,\n doesElementContainFocus,\n elementContains,\n elementContainsAttribute,\n enableBodyScroll,\n extendComponent,\n filteredAssign,\n find,\n findElementRecursive,\n findIndex,\n findScrollableParent,\n fitContentToBounds,\n flatten,\n focusAsync,\n focusFirstChild,\n formProperties,\n format,\n getChildren,\n getDistanceBetweenPoints,\n getDocument,\n getElementIndexPath,\n getFirstFocusable,\n getFirstTabbable,\n getFirstVisibleElementFromSelector,\n getFocusableByIndexPath,\n getId,\n getInitials,\n getLanguage,\n getLastFocusable,\n getLastTabbable,\n getNativeElementProps,\n getNativeProps,\n getNextElement,\n getParent,\n getPreviousElement,\n getPropsWithDefaults,\n getRTL,\n getRTLSafeKeyCode,\n getRect,\n // eslint-disable-next-line deprecation/deprecation\n getResourceUrl,\n getScrollbarWidth,\n getVirtualParent,\n getWindow,\n hasHorizontalOverflow,\n hasOverflow,\n hasVerticalOverflow,\n hoistMethods,\n hoistStatics,\n htmlElementProperties,\n iframeProperties,\n // eslint-disable-next-line deprecation/deprecation\n imageProperties,\n imgProperties,\n initializeComponentRef,\n // eslint-disable-next-line deprecation/deprecation\n initializeFocusRects,\n inputProperties,\n isControlled,\n isDirectionalKeyCode,\n isElementFocusSubZone,\n isElementFocusZone,\n isElementTabbable,\n isElementVisible,\n isElementVisibleAndNotHidden,\n isIE11,\n isIOS,\n isMac,\n isVirtualElement,\n labelProperties,\n liProperties,\n mapEnumByName,\n memoize,\n memoizeFunction,\n merge,\n mergeAriaAttributeValues,\n mergeCustomizations,\n mergeScopedSettings,\n mergeSettings,\n modalize,\n nullRender,\n olProperties,\n omit,\n on,\n optionProperties,\n portalContainsElement,\n precisionRound,\n // eslint-disable-next-line deprecation/deprecation\n raiseClick,\n removeIndex,\n replaceElement,\n resetControlledWarnings,\n resetIds,\n resetMemoizations,\n safeRequestAnimationFrame,\n safeSetTimeout,\n selectProperties,\n // eslint-disable-next-line deprecation/deprecation\n setBaseUrl,\n setFocusVisibility,\n // eslint-disable-next-line deprecation/deprecation\n setLanguage,\n setMemoizeWeakMap,\n setPortalAttribute,\n setRTL,\n setSSR,\n setVirtualParent,\n setWarningCallback,\n shallowCompare,\n shouldWrapFocus,\n styled,\n tableProperties,\n tdProperties,\n textAreaProperties,\n thProperties,\n toMatrix,\n trProperties,\n unhoistMethods,\n useCustomizationSettings,\n useFocusRects,\n values,\n videoProperties,\n warn,\n warnConditionallyRequiredProps,\n warnControlledUsage,\n warnDeprecations,\n warnMutuallyExclusive,\n} from '@fluentui/react/lib/Utilities';\nexport type {\n FitMode,\n IAsAsyncOptions,\n IBaseProps,\n ICancelable,\n IChangeDescription,\n IChangeEventCallback,\n // eslint-disable-next-line deprecation/deprecation\n IClassNames,\n IClassNamesFunctionOptions,\n IComponentAs,\n IComponentAsProps,\n ICssInput,\n ICustomizableProps,\n ICustomizations,\n ICustomizerContext,\n ICustomizerProps,\n IDeclaredEventsByName,\n IDelayedRenderProps,\n IDelayedRenderState,\n IDictionary,\n IDisposable,\n IEventRecord,\n IEventRecordList,\n IEventRecordsByName,\n IFitContentToBoundsOptions,\n IObjectWithKey,\n IPerfData,\n IPerfMeasurement,\n IPerfSummary,\n // eslint-disable-next-line deprecation/deprecation\n IPoint,\n IPropsWithStyles,\n IRectangle,\n IRefObject,\n IRenderComponent,\n IRenderFunction,\n ISelection,\n ISelectionOptions,\n ISelectionOptionsWithRequiredGetKey,\n ISerializableObject,\n ISettings,\n ISettingsFunction,\n ISettingsMap,\n ISize,\n IStyleFunction,\n IStyleFunctionOrObject,\n IVirtualElement,\n IWarnControlledUsageParams,\n // eslint-disable-next-line deprecation/deprecation\n Omit,\n Point,\n RefObject,\n // eslint-disable-next-line deprecation/deprecation\n Settings,\n // eslint-disable-next-line deprecation/deprecation\n SettingsFunction,\n StyleFunction,\n} from '@fluentui/react/lib/Utilities';\n"]}
1
+ {"version":3,"file":"Utilities.js","sourceRoot":"../src/","sources":["Utilities.ts"],"names":[],"mappings":";;;;IACE,kGAAA,KAAK,OAAA;IACL,uGAAA,UAAU,OAAA;IACV,mDAAmD;IACnD,0GAAA,aAAa,OAAA;IACb,2GAAA,cAAc,OAAA;IACd,mDAAmD;IACnD,uGAAA,UAAU,OAAA;IACV,8GAAA,iBAAiB,OAAA;IACjB,yHAAA,4BAA4B,OAAA;IAC5B,kHAAA,qBAAqB,OAAA;IACrB,0GAAA,aAAa,OAAA;IACb,uGAAA,U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AAA;IAClB,2GAAA,cAAc,OAAA;IACd,4GAAA,eAAe,OAAA;IACf,mGAAA,MAAM,OAAA;IACN,4GAAA,eAAe,OAAA;IACf,yGAAA,YAAY,OAAA;IACZ,+GAAA,kBAAkB,OAAA;IAClB,yGAAA,YAAY,OAAA;IACZ,qGAAA,QAAQ,OAAA;IACR,yGAAA,YAAY,OAAA;IACZ,2GAAA,cAAc,OAAA;IACd,qHAAA,wBAAwB,OAAA;IACxB,0GAAA,aAAa,OAAA;IACb,mGAAA,MAAM,OAAA;IACN,4GAAA,eAAe,OAAA;IACf,iGAAA,IAAI,OAAA;IACJ,2HAAA,8BAA8B,OAAA;IAC9B,gHAAA,mBAAmB,OAAA;IACnB,6GAAA,gBAAgB,OAAA;IAChB,kHAAA,qBAAqB,OAAA","sourcesContent":["export {\n Async,\n AutoScroll,\n // eslint-disable-next-line deprecation/deprecation\n BaseComponent,\n Customizations,\n // eslint-disable-next-line deprecation/deprecation\n Customizer,\n CustomizerContext,\n DATA_IS_SCROLLABLE_ATTRIBUTE,\n DATA_PORTAL_ATTRIBUTE,\n DelayedRender,\n EventGroup,\n FabricPerformance,\n FocusRects,\n GlobalSettings,\n IsFocusVisibleClassName,\n KeyCodes,\n Rectangle,\n SELECTION_CHANGE,\n Selection,\n SelectionDirection,\n SelectionMode,\n addDirectionalKeyCode,\n addElementAtIndex,\n allowOverscrollOnElement,\n allowScrollOnElement,\n anchorProperties,\n appendFunction,\n arraysEqual,\n asAsync,\n assertNever,\n assign,\n audioProperties,\n baseElementEvents,\n baseElementProperties,\n buttonProperties,\n calculatePrecision,\n canUseDOM,\n classNamesFunction,\n colGroupProperties,\n colProperties,\n composeComponentAs,\n composeRenderFunction,\n createArray,\n createMemoizer,\n createMergedRef,\n css,\n customizable,\n disableBodyScroll,\n divProperties,\n doesElementContainFocus,\n elementContains,\n elementContainsAttribute,\n enableBodyScroll,\n extendComponent,\n filteredAssign,\n find,\n findElementRecursive,\n findIndex,\n findScrollableParent,\n fitContentToBounds,\n flatten,\n focusAsync,\n focusFirstChild,\n formProperties,\n format,\n getChildren,\n getDistanceBetweenPoints,\n getDocument,\n getElementIndexPath,\n getFirstFocusable,\n getFirstTabbable,\n getFirstVisibleElementFromSelector,\n getFocusableByIndexPath,\n getId,\n getInitials,\n getLanguage,\n getLastFocusable,\n getLastTabbable,\n getNativeElementProps,\n getNativeProps,\n getNextElement,\n getParent,\n getPreviousElement,\n getPropsWithDefaults,\n getRTL,\n getRTLSafeKeyCode,\n getRect,\n // eslint-disable-next-line deprecation/deprecation\n getResourceUrl,\n getScrollbarWidth,\n getVirtualParent,\n getWindow,\n hasHorizontalOverflow,\n hasOverflow,\n hasVerticalOverflow,\n hoistMethods,\n hoistStatics,\n htmlElementProperties,\n iframeProperties,\n // eslint-disable-next-line deprecation/deprecation\n imageProperties,\n imgProperties,\n initializeComponentRef,\n // eslint-disable-next-line deprecation/deprecation\n initializeFocusRects,\n inputProperties,\n isControlled,\n isDirectionalKeyCode,\n isElementFocusSubZone,\n isElementFocusZone,\n isElementTabbable,\n isElementVisible,\n isElementVisibleAndNotHidden,\n isIE11,\n isIOS,\n isMac,\n isVirtualElement,\n labelProperties,\n liProperties,\n mapEnumByName,\n memoize,\n memoizeFunction,\n merge,\n mergeAriaAttributeValues,\n mergeCustomizations,\n mergeScopedSettings,\n mergeSettings,\n modalize,\n nullRender,\n olProperties,\n omit,\n on,\n optionProperties,\n portalContainsElement,\n precisionRound,\n // eslint-disable-next-line deprecation/deprecation\n raiseClick,\n removeIndex,\n replaceElement,\n resetControlledWarnings,\n resetIds,\n resetMemoizations,\n safeRequestAnimationFrame,\n safeSetTimeout,\n selectProperties,\n // eslint-disable-next-line deprecation/deprecation\n setBaseUrl,\n setFocusVisibility,\n // eslint-disable-next-line deprecation/deprecation\n setLanguage,\n setMemoizeWeakMap,\n setPortalAttribute,\n setRTL,\n // eslint-disable-next-line deprecation/deprecation\n setSSR,\n setVirtualParent,\n setWarningCallback,\n shallowCompare,\n shouldWrapFocus,\n styled,\n tableProperties,\n tdProperties,\n textAreaProperties,\n thProperties,\n toMatrix,\n trProperties,\n unhoistMethods,\n useCustomizationSettings,\n useFocusRects,\n values,\n videoProperties,\n warn,\n warnConditionallyRequiredProps,\n warnControlledUsage,\n warnDeprecations,\n warnMutuallyExclusive,\n} from '@fluentui/react/lib/Utilities';\nexport type {\n FitMode,\n IAsAsyncOptions,\n IBaseProps,\n ICancelable,\n IChangeDescription,\n IChangeEventCallback,\n // eslint-disable-next-line deprecation/deprecation\n IClassNames,\n IClassNamesFunctionOptions,\n IComponentAs,\n IComponentAsProps,\n ICssInput,\n ICustomizableProps,\n ICustomizations,\n ICustomizerContext,\n ICustomizerProps,\n IDeclaredEventsByName,\n IDelayedRenderProps,\n IDelayedRenderState,\n IDictionary,\n IDisposable,\n IEventRecord,\n IEventRecordList,\n IEventRecordsByName,\n IFitContentToBoundsOptions,\n IObjectWithKey,\n IPerfData,\n IPerfMeasurement,\n IPerfSummary,\n // eslint-disable-next-line deprecation/deprecation\n IPoint,\n IPropsWithStyles,\n IRectangle,\n IRefObject,\n IRenderComponent,\n IRenderFunction,\n ISelection,\n ISelectionOptions,\n ISelectionOptionsWithRequiredGetKey,\n ISerializableObject,\n ISettings,\n ISettingsFunction,\n ISettingsMap,\n ISize,\n IStyleFunction,\n IStyleFunctionOrObject,\n IVirtualElement,\n IWarnControlledUsageParams,\n // eslint-disable-next-line deprecation/deprecation\n Omit,\n Point,\n RefObject,\n // eslint-disable-next-line deprecation/deprecation\n Settings,\n // eslint-disable-next-line deprecation/deprecation\n SettingsFunction,\n StyleFunction,\n} from '@fluentui/react/lib/Utilities';\n"]}
@@ -15,7 +15,8 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/HoverCard",
15
15
  flexWrap: 'wrap',
16
16
  },
17
17
  };
18
- return (React.createElement(OverflowSet_1.OverflowSet, tslib_1.__assign({}, (allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' }), { items: data.primary, overflowItems: data.overflow, onRenderItem: _this._renderButton, onRenderOverflowButton: _this._renderOverflowItems }, overflowProps, { styles: tslib_1.__assign(tslib_1.__assign({}, rootStyles), overflowProps === null || overflowProps === void 0 ? void 0 : overflowProps.styles) })));
18
+ return (React.createElement(react_focus_1.FocusZone, tslib_1.__assign({}, (allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' })),
19
+ React.createElement(OverflowSet_1.OverflowSet, tslib_1.__assign({ items: data.primary, overflowItems: data.overflow, onRenderItem: _this._renderButton, onRenderOverflowButton: _this._renderOverflowItems }, overflowProps, { styles: tslib_1.__assign(tslib_1.__assign({}, rootStyles), overflowProps === null || overflowProps === void 0 ? void 0 : overflowProps.styles) }))));
19
20
  };
20
21
  _this._onReduceData = function (currentdata) {
21
22
  if (currentdata.primary.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";;;;IAqBA,IAAM,aAAa,GAAG,8BAAkB,EAAqC,CAAC;IAyB9E;QAAiC,uCAA4C;QAI3E,qBAAmB,KAAoB;YAAvC,YACE,kBAAM,KAAK,CAAC,SASb;YA6DO,mBAAa,GAAG,UAAC,IAAiD;gBAClE,IAAA,KAAgD,KAAI,CAAC,KAAK,EAAxD,aAAa,mBAAA,EAAE,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAe,CAAC;gBACjE,IAAM,UAAU,GAAG;oBACjB,IAAI,EAAE;wBACJ,cAAc,EAAE,KAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;wBAC7D,QAAQ,EAAE,MAAM;qBACjB;iBACF,CAAC;gBACF,OAAO,CACL,oBAAC,yBAAW,uBACN,CAAC,mBAAmB,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,IACzE,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,aAAa,EAAE,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c,KAAK,KAAK,EAAE;gBAC7G,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;aAC7B,CAAC,qFAAqF;YACvF,kFAAkF;iBAC7E,IAAI,CAAC,CAAC,wBAAwB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;gBACjH,WAAW,GAAG,KAAK,CAAC;aACrB,CAAC,mFAAmF;YACrF,2CAA2C;iBACtC,IACH,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,MAAM,CAAC;gBACnE,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,KAAK;gBACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,IAAI,CAAC,EACtC;gBACA,WAAW,GAAG,KAAK,CAAC;aACrB;iBAAM;gBACL,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;aAC7B;YACD,OAAO,WAAW,CAAC;QACrB,CAAC;QACH,kBAAC;IAAD,CAAC,AAvZD,CAAiC,KAAK,CAAC,SAAS,GAuZ/C;IAvZY,kCAAW","sourcesContent":["import * as React from 'react';\n\nimport { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nimport { silceOrAppendToArray } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n selectedLegend: string;\n selecetedLegendInHoverCard: string;\n selectedState: boolean;\n hoverState: boolean;\n isHoverCardVisible: boolean;\n selectedLegends: string[];\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n\n public constructor(props: ILegendsProps) {\n super(props);\n this.state = {\n selectedLegend: 'none',\n selectedState: false,\n hoverState: false,\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n };\n }\n\n public componentDidUpdate(prevProps: ILegendsProps) {\n if (prevProps.selectedLegend !== this.props.selectedLegend) {\n this.setState({ selectedLegend: this.props.selectedLegend! });\n }\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n };\n return (\n <OverflowSet\n {...(allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' })}\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * This function will get called when there is an ability to\n * select multiple legends\n * @param legend ILegend\n */\n private _canSelectMultipleLegends = (legend: ILegend): void => {\n const selectedLegends = silceOrAppendToArray(this.state.selectedLegends, legend.title);\n this.setState({\n //check if user selected all legends then empty it get the default behaviour\n selectedLegends: selectedLegends.length === this.props.legends.length ? [] : selectedLegends,\n // make selectedState to false if none or all the legends selected\n selectedState:\n selectedLegends.length === 0 || selectedLegends.length === this.props.legends.length ? false : true,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n selectedLegend: 'none',\n hoverState: false,\n });\n };\n\n /**\n * This function will get called when there is\n * ability to select only single legend\n * @param legend ILegend\n */\n\n private _canSelectOnlySingleLegend = (legend: ILegend): void => {\n if (this.state.selectedState === true && this.state.selectedLegend === legend.title) {\n this.setState({\n selectedLegend: 'none',\n selectedState: false,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n } else {\n this.setState({\n hoverState: true,\n selectedState: true,\n selectedLegend: legend.title,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n }\n };\n\n private _onClick = (legend: ILegend): void => {\n if (legend.action) {\n const { canSelectMultipleLegends = false } = this.props;\n if (canSelectMultipleLegends) {\n this._canSelectMultipleLegends(legend);\n } else {\n this._canSelectOnlySingleLegend(legend);\n }\n legend.action();\n }\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && { role: 'listbox' })}\n direction={FocusZoneDirection.vertical}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n const { canSelectMultipleLegends = false } = this.props;\n const selectedOverflowItem = find(\n legends,\n (legend: ILegend) =>\n legend.title === this.state.selecetedLegendInHoverCard || legend.title === this.state.selectedLegend,\n );\n this.setState(\n {\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n },\n () => {\n if (selectedOverflowItem) {\n this.setState({ selectedLegend: 'none', selectedState: false }, () => {\n if (selectedOverflowItem.action && !canSelectMultipleLegends) {\n selectedOverflowItem.action();\n }\n if (this.props.onLegendHoverCardLeave && canSelectMultipleLegends) {\n this.props.onLegendHoverCardLeave();\n }\n this.setState({ hoverState: false }, () => {\n if (selectedOverflowItem.onMouseOutAction) {\n selectedOverflowItem.onMouseOutAction(true);\n }\n });\n });\n }\n },\n );\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'link',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.hoverAction) {\n this.setState({ hoverState: true, selectedLegend: legend.title });\n legend.hoverAction();\n }\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.onMouseOutAction) {\n this.setState({ hoverState: false, selectedLegend: 'none' });\n legend.onMouseOutAction();\n }\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow: overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = () => {\n this._onClick(legend);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': this.state.selectedLegend === legend.title,\n role: 'option',\n 'aria-label': `${legend.title} selected`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme, canSelectMultipleLegends = false } = this.props;\n const { palette } = theme!;\n let legendColor = color;\n // below if statement will get executed for the hovered legend.\n // (which is also the slected legend see fucntion:-_onHoverOverLegend)\n if (this.state.hoverState && this.state.selectedLegend === title) {\n legendColor = color;\n } // below esle if statement will get executed for the unselected-legend which is hovered\n else if (this.state.hoverState && this.state.selectedLegend !== 'none' && this.state.selectedLegend !== title) {\n legendColor = palette.white;\n } // below else if statement will get executed if the legends are in the selected state\n // this is will only get executed when we have ability to select multiple legends\n else if (!!canSelectMultipleLegends && this.state.selectedState && this.state.selectedLegends.indexOf(title) > -1) {\n legendColor = color;\n } // below else if statement will get executed when no legend is selected and hovered\n //(for example:- initial render of legends)\n else if (\n (!this.state.selectedState && this.state.selectedLegend === 'none') ||\n this.state.selectedLegend === title ||\n this.state.selectedLegends.length <= 0\n ) {\n legendColor = color;\n } else {\n legendColor = palette.white;\n }\n return legendColor;\n }\n}\n"]}
1
+ {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";;;;IAqBA,IAAM,aAAa,GAAG,8BAAkB,EAAqC,CAAC;IAyB9E;QAAiC,uCAA4C;QAI3E,qBAAmB,KAAoB;YAAvC,YACE,kBAAM,KAAK,CAAC,SASb;YA6DO,mBAAa,GAAG,UAAC,IAAiD;gBAClE,IAAA,KAAgD,KAAI,CAAC,KAAK,EAAxD,aAAa,mBAAA,EAAE,2BAA0B,EAA1B,mB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ui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nimport { silceOrAppendToArray } from '../../utilities/utilities';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n selectedLegend: string;\n selecetedLegendInHoverCard: string;\n selectedState: boolean;\n hoverState: boolean;\n isHoverCardVisible: boolean;\n selectedLegends: string[];\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n\n public constructor(props: ILegendsProps) {\n super(props);\n this.state = {\n selectedLegend: 'none',\n selectedState: false,\n hoverState: false,\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n };\n }\n\n public componentDidUpdate(prevProps: ILegendsProps) {\n if (prevProps.selectedLegend !== this.props.selectedLegend) {\n this.setState({ selectedLegend: this.props.selectedLegend! });\n }\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n };\n return (\n <FocusZone {...(allowFocusOnLegends && { role: 'listbox', 'aria-label': 'Legends' })}>\n <OverflowSet\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n </FocusZone>\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * This function will get called when there is an ability to\n * select multiple legends\n * @param legend ILegend\n */\n private _canSelectMultipleLegends = (legend: ILegend): void => {\n const selectedLegends = silceOrAppendToArray(this.state.selectedLegends, legend.title);\n this.setState({\n //check if user selected all legends then empty it get the default behaviour\n selectedLegends: selectedLegends.length === this.props.legends.length ? [] : selectedLegends,\n // make selectedState to false if none or all the legends selected\n selectedState:\n selectedLegends.length === 0 || selectedLegends.length === this.props.legends.length ? false : true,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n selectedLegend: 'none',\n hoverState: false,\n });\n };\n\n /**\n * This function will get called when there is\n * ability to select only single legend\n * @param legend ILegend\n */\n\n private _canSelectOnlySingleLegend = (legend: ILegend): void => {\n if (this.state.selectedState === true && this.state.selectedLegend === legend.title) {\n this.setState({\n selectedLegend: 'none',\n selectedState: false,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n } else {\n this.setState({\n hoverState: true,\n selectedState: true,\n selectedLegend: legend.title,\n selecetedLegendInHoverCard: this.state.isHoverCardVisible ? legend.title : 'none',\n });\n }\n };\n\n private _onClick = (legend: ILegend): void => {\n if (legend.action) {\n const { canSelectMultipleLegends = false } = this.props;\n if (canSelectMultipleLegends) {\n this._canSelectMultipleLegends(legend);\n } else {\n this._canSelectOnlySingleLegend(legend);\n }\n legend.action();\n }\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && { role: 'listbox' })}\n direction={FocusZoneDirection.vertical}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n const { canSelectMultipleLegends = false } = this.props;\n const selectedOverflowItem = find(\n legends,\n (legend: ILegend) =>\n legend.title === this.state.selecetedLegendInHoverCard || legend.title === this.state.selectedLegend,\n );\n this.setState(\n {\n isHoverCardVisible: false,\n selecetedLegendInHoverCard: 'none',\n selectedLegends: [],\n },\n () => {\n if (selectedOverflowItem) {\n this.setState({ selectedLegend: 'none', selectedState: false }, () => {\n if (selectedOverflowItem.action && !canSelectMultipleLegends) {\n selectedOverflowItem.action();\n }\n if (this.props.onLegendHoverCardLeave && canSelectMultipleLegends) {\n this.props.onLegendHoverCardLeave();\n }\n this.setState({ hoverState: false }, () => {\n if (selectedOverflowItem.onMouseOutAction) {\n selectedOverflowItem.onMouseOutAction(true);\n }\n });\n });\n }\n },\n );\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'link',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.hoverAction) {\n this.setState({ hoverState: true, selectedLegend: legend.title });\n legend.hoverAction();\n }\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (!this.state.selectedState) {\n if (legend.onMouseOutAction) {\n this.setState({ hoverState: false, selectedLegend: 'none' });\n legend.onMouseOutAction();\n }\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow: overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = () => {\n this._onClick(legend);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': this.state.selectedLegend === legend.title,\n role: 'option',\n 'aria-label': `${legend.title} selected`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme, canSelectMultipleLegends = false } = this.props;\n const { palette } = theme!;\n let legendColor = color;\n // below if statement will get executed for the hovered legend.\n // (which is also the slected legend see fucntion:-_onHoverOverLegend)\n if (this.state.hoverState && this.state.selectedLegend === title) {\n legendColor = color;\n } // below esle if statement will get executed for the unselected-legend which is hovered\n else if (this.state.hoverState && this.state.selectedLegend !== 'none' && this.state.selectedLegend !== title) {\n legendColor = palette.white;\n } // below else if statement will get executed if the legends are in the selected state\n // this is will only get executed when we have ability to select multiple legends\n else if (!!canSelectMultipleLegends && this.state.selectedState && this.state.selectedLegends.indexOf(title) > -1) {\n legendColor = color;\n } // below else if statement will get executed when no legend is selected and hovered\n //(for example:- initial render of legends)\n else if (\n (!this.state.selectedState && this.state.selectedLegend === 'none') ||\n this.state.selectedLegend === title ||\n this.state.selectedLegends.length <= 0\n ) {\n legendColor = color;\n } else {\n legendColor = palette.white;\n }\n return legendColor;\n }\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ITreeProps, ITreeState } from '../../index';
3
+ export declare class TreeChartBase extends React.Component<ITreeProps, ITreeState> {
4
+ private _treeData;
5
+ private _width;
6
+ private _height;
7
+ private _composition;
8
+ private _classNames;
9
+ private _rootElem;
10
+ private _margin;
11
+ private _nodeElements;
12
+ private _linkElements;
13
+ private _treeTraversal;
14
+ constructor(props: ITreeProps);
15
+ componentDidMount(): void;
16
+ createTreeChart(): void;
17
+ render(): JSX.Element;
18
+ }