@fluentui/react-charting 5.10.0 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) 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/Sparkline.d.ts +1 -0
  6. package/lib/Sparkline.js +2 -0
  7. package/lib/Sparkline.js.map +1 -0
  8. package/lib/TreeChart.d.ts +1 -0
  9. package/lib/TreeChart.js +2 -0
  10. package/lib/TreeChart.js.map +1 -0
  11. package/lib/Utilities.d.ts +1 -1
  12. package/lib/Utilities.js +4 -2
  13. package/lib/Utilities.js.map +1 -1
  14. package/lib/components/Sparkline/Sparkline.base.d.ts +18 -0
  15. package/lib/components/Sparkline/Sparkline.base.js +65 -0
  16. package/lib/components/Sparkline/Sparkline.base.js.map +1 -0
  17. package/lib/components/Sparkline/Sparkline.d.ts +3 -0
  18. package/lib/components/Sparkline/Sparkline.js +6 -0
  19. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  20. package/lib/components/Sparkline/Sparkline.styles.d.ts +2 -0
  21. package/lib/components/Sparkline/Sparkline.styles.js +10 -0
  22. package/lib/components/Sparkline/Sparkline.styles.js.map +1 -0
  23. package/lib/components/Sparkline/Sparkline.types.d.ts +46 -0
  24. package/lib/components/Sparkline/Sparkline.types.js +2 -0
  25. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  26. package/lib/components/Sparkline/index.d.ts +2 -0
  27. package/lib/components/Sparkline/index.js +3 -0
  28. package/lib/components/Sparkline/index.js.map +1 -0
  29. package/lib/components/TreeChart/TreeChart.base.d.ts +18 -0
  30. package/lib/components/TreeChart/TreeChart.base.js +239 -0
  31. package/lib/components/TreeChart/TreeChart.base.js.map +1 -0
  32. package/lib/components/TreeChart/TreeChart.d.ts +3 -0
  33. package/lib/components/TreeChart/TreeChart.js +5 -0
  34. package/lib/components/TreeChart/TreeChart.js.map +1 -0
  35. package/lib/components/TreeChart/TreeChart.styles.d.ts +2 -0
  36. package/lib/components/TreeChart/TreeChart.styles.js +20 -0
  37. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -0
  38. package/lib/components/TreeChart/TreeChart.types.d.ts +88 -0
  39. package/lib/components/TreeChart/TreeChart.types.js +11 -0
  40. package/lib/components/TreeChart/TreeChart.types.js.map +1 -0
  41. package/lib/components/TreeChart/index.d.ts +2 -0
  42. package/lib/components/TreeChart/index.js +3 -0
  43. package/lib/components/TreeChart/index.js.map +1 -0
  44. package/lib/index.d.ts +2 -0
  45. package/lib/index.js +2 -0
  46. package/lib/index.js.map +1 -1
  47. package/lib/version.js +1 -1
  48. package/lib/version.js.map +1 -1
  49. package/lib-amd/Sparkline.d.ts +1 -0
  50. package/lib-amd/Sparkline.js +6 -0
  51. package/lib-amd/Sparkline.js.map +1 -0
  52. package/lib-amd/TreeChart.d.ts +1 -0
  53. package/lib-amd/TreeChart.js +6 -0
  54. package/lib-amd/TreeChart.js.map +1 -0
  55. package/lib-amd/Utilities.d.ts +1 -1
  56. package/lib-amd/Utilities.js +3 -1
  57. package/lib-amd/Utilities.js.map +1 -1
  58. package/lib-amd/components/Sparkline/Sparkline.base.d.ts +18 -0
  59. package/lib-amd/components/Sparkline/Sparkline.base.js +63 -0
  60. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -0
  61. package/lib-amd/components/Sparkline/Sparkline.d.ts +3 -0
  62. package/lib-amd/components/Sparkline/Sparkline.js +8 -0
  63. package/lib-amd/components/Sparkline/Sparkline.js.map +1 -0
  64. package/lib-amd/components/Sparkline/Sparkline.styles.d.ts +2 -0
  65. package/lib-amd/components/Sparkline/Sparkline.styles.js +15 -0
  66. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -0
  67. package/lib-amd/components/Sparkline/Sparkline.types.d.ts +46 -0
  68. package/lib-amd/components/Sparkline/Sparkline.types.js +5 -0
  69. package/lib-amd/components/Sparkline/Sparkline.types.js.map +1 -0
  70. package/lib-amd/components/Sparkline/index.d.ts +2 -0
  71. package/lib-amd/components/Sparkline/index.js +7 -0
  72. package/lib-amd/components/Sparkline/index.js.map +1 -0
  73. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
  74. package/lib-amd/components/TreeChart/TreeChart.base.js +238 -0
  75. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
  76. package/lib-amd/components/TreeChart/TreeChart.d.ts +3 -0
  77. package/lib-amd/components/TreeChart/TreeChart.js +7 -0
  78. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
  79. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
  80. package/lib-amd/components/TreeChart/TreeChart.styles.js +25 -0
  81. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
  82. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +88 -0
  83. package/lib-amd/components/TreeChart/TreeChart.types.js +16 -0
  84. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
  85. package/lib-amd/components/TreeChart/index.d.ts +2 -0
  86. package/lib-amd/components/TreeChart/index.js +7 -0
  87. package/lib-amd/components/TreeChart/index.js.map +1 -0
  88. package/lib-amd/index.d.ts +2 -0
  89. package/lib-amd/index.js +3 -1
  90. package/lib-amd/index.js.map +1 -1
  91. package/lib-amd/version.js +1 -1
  92. package/lib-amd/version.js.map +1 -1
  93. package/lib-commonjs/Sparkline.d.ts +1 -0
  94. package/lib-commonjs/Sparkline.js +5 -0
  95. package/lib-commonjs/Sparkline.js.map +1 -0
  96. package/lib-commonjs/TreeChart.d.ts +1 -0
  97. package/lib-commonjs/TreeChart.js +5 -0
  98. package/lib-commonjs/TreeChart.js.map +1 -0
  99. package/lib-commonjs/Utilities.d.ts +1 -1
  100. package/lib-commonjs/Utilities.js +6 -4
  101. package/lib-commonjs/Utilities.js.map +1 -1
  102. package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +18 -0
  103. package/lib-commonjs/components/Sparkline/Sparkline.base.js +68 -0
  104. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -0
  105. package/lib-commonjs/components/Sparkline/Sparkline.d.ts +3 -0
  106. package/lib-commonjs/components/Sparkline/Sparkline.js +9 -0
  107. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  108. package/lib-commonjs/components/Sparkline/Sparkline.styles.d.ts +2 -0
  109. package/lib-commonjs/components/Sparkline/Sparkline.styles.js +14 -0
  110. package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -0
  111. package/lib-commonjs/components/Sparkline/Sparkline.types.d.ts +46 -0
  112. package/lib-commonjs/components/Sparkline/Sparkline.types.js +3 -0
  113. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  114. package/lib-commonjs/components/Sparkline/index.d.ts +2 -0
  115. package/lib-commonjs/components/Sparkline/index.js +6 -0
  116. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  117. package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +18 -0
  118. package/lib-commonjs/components/TreeChart/TreeChart.base.js +242 -0
  119. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -0
  120. package/lib-commonjs/components/TreeChart/TreeChart.d.ts +3 -0
  121. package/lib-commonjs/components/TreeChart/TreeChart.js +8 -0
  122. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -0
  123. package/lib-commonjs/components/TreeChart/TreeChart.styles.d.ts +2 -0
  124. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +24 -0
  125. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -0
  126. package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +88 -0
  127. package/lib-commonjs/components/TreeChart/TreeChart.types.js +14 -0
  128. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -0
  129. package/lib-commonjs/components/TreeChart/index.d.ts +2 -0
  130. package/lib-commonjs/components/TreeChart/index.js +6 -0
  131. package/lib-commonjs/components/TreeChart/index.js.map +1 -0
  132. package/lib-commonjs/index.d.ts +2 -0
  133. package/lib-commonjs/index.js +2 -0
  134. package/lib-commonjs/index.js.map +1 -1
  135. package/lib-commonjs/version.js +1 -1
  136. package/lib-commonjs/version.js.map +1 -1
  137. package/package.json +6 -4
  138. package/src/components/Sparkline/Sparkline.types.ts +55 -0
  139. package/src/components/TreeChart/TreeChart.types.ts +89 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.base.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWlD,IAAM,aAAa,GAAG,kBAAkB,EAAgC,CAAC;AAEzE,mDAAmD;AACnD;IAaE,sBACE,QAA6B,EAC7B,eAAkH,EAClH,aAA0F,EAC1F,aAAyD;QADzD,8BAAA,EAAA,kBAA0F;QAC1F,8BAAA,EAAA,kBAAyD;QAPnD,kBAAa,GAA2E,EAAE,CAAC;QAC3F,kBAAa,GAA0C,EAAE,CAAC;QAQhE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,uBAAuB;IACvB,8BAA8B;IACvB,wCAAiB,GAAxB,UACE,IAAY,EACZ,OAAe,EACf,UAA8B,EAC9B,WAAmB,EACnB,WAAmB,EACnB,SAAiB,EACjB,cAAsB,EACtB,eAAuB,EACvB,MAAc,EACd,UAAkB;QA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;QACxD,IAAM,eAAe,GAAG;YACtB,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YAC3B,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ;YACnC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ;YACnC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW;YACzC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc;SAChD,CAAC;QAEF,0EAA0E;QAC1E,IAAM,UAAU,GAAG,IAAI,WAAW,CAChC,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,YAAY,EACjB,eAAe,EACf,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,cAAc,CACpB,CAAC;QACF,UAAU,CAAC,UAAU,EAAE,CAAC;IAC1B,CAAC;IAEM,8BAAM,GAAb;QAAA,iBAWC;QAVC,OAAO,CACL,oBAAC,SAAS;YACR,6BAAK,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,UAAC,QAA4B,IAAK,OAAA,CAAC,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,EAA3B,CAA2B;gBAC5F,6BAAK,SAAS,EAAC,SAAS;oBACtB,2BAAG,SAAS,EAAC,SAAS,IAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,EAAP,CAAO,CAAC,CAAK;oBACvE,2BAAG,SAAS,EAAC,SAAS,IAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,EAAP,CAAO,CAAC,CAAK,CACnE,CACF,CACI,CACb,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AApFD,CAAmC,KAAK,CAAC,SAAS,GAoFjD","sourcesContent":["import * as React from 'react';\nimport { select } from 'd3-selection';\nimport { hierarchy, tree } from 'd3-hierarchy';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { FocusZone } from '@fluentui/react-focus';\n\nimport {\n ITreeProps,\n ITreeState,\n ITreeDataStructure,\n ITreeChartDataPoint,\n ITreeStyleProps,\n ITreeStyles,\n} from '../../index';\n\nconst getClassNames = classNamesFunction<ITreeStyleProps, ITreeStyles>();\n\n// Create a parent class for common tree components\nclass StandardTree {\n public treeData: ITreeChartDataPoint;\n public styleClassNames: {\n rectmetricText: string | undefined;\n rectSubText: string | undefined;\n link: string;\n rectNode: string;\n rectText: string;\n };\n\n private _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [];\n private _linkElements: Array<React.SVGProps<SVGPathElement>> = [];\n\n constructor(\n treeData: ITreeChartDataPoint,\n styleClassNames: { link: string; rectNode: string; rectText: string; rectSubText: string; rectmetricText: string },\n _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [],\n _linkElements: Array<React.SVGProps<SVGPathElement>> = [],\n ) {\n this.treeData = treeData;\n this.styleClassNames = styleClassNames;\n this._nodeElements = _nodeElements;\n this._linkElements = _linkElements;\n }\n\n // Append node elements\n // nodeId to create unique key\n public addNodeShapetoSVG(\n name: string,\n subname: string,\n metricName: string | undefined,\n xCoordinate: number,\n yCoordinate: number,\n fillColor: string,\n rectangleWidth: number,\n rectangleHeight: number,\n nodeId: number,\n parentInfo: string,\n ) {\n const ariaLabel = `nodeId: ${nodeId} \\nnodeMainText: ${name}\\nsubText ${subname} ${parentInfo}`;\n this._nodeElements.push(\n <rect\n width={rectangleWidth}\n height={rectangleHeight}\n x={xCoordinate}\n y={yCoordinate}\n tabIndex={0}\n role={'text'}\n data-is-focusable={true}\n aria-label={ariaLabel}\n className={this.styleClassNames.rectNode}\n stroke={fillColor}\n key={`${nodeId}${this.styleClassNames.rectNode}`}\n />,\n );\n\n // Text position y = y + rectHeight/2, 2 is ratio for depth\n // Text position x = x + rectWidth/2, 2 is ratio for length\n // Sub-text position x = x + rectWidth/2, 2 is ratio for length\n\n const subValue =\n metricName !== undefined ? (\n <tspan className={this.styleClassNames.rectmetricText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {metricName}\n </tspan>\n ) : (\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n );\n\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={metricName !== undefined ? this.styleClassNames.rectSubText : this.styleClassNames.rectText}\n dy={metricName !== undefined ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n >\n {name}\n {subValue}\n </text>,\n );\n }\n\n // Create a rectangular path from parent to the child nodes\n public createPathLink(\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n ): string {\n // gap adds ratio for parent.y to child.y\n const path = `M${childX + rectWidth / 2},${childY - gap} H${parentX + rectWidth / 2} V${\n parentY + rectHeight + gap / 2\n }`;\n const leafpath = `M${parentX + rectWidth / 2},${parentY + rectHeight + gap / 2} V${\n parentY + gap * 5\n } H${parentX} H${parentX + rectWidth}`;\n\n // based on the type of node return leafpath or path element\n return leaf ? leafpath : path;\n }\n\n // Append path link element\n public addLinktoSVG(\n nodeId: number,\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n ) {\n this._linkElements.push(\n <path\n className={this.styleClassNames.link}\n d={this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap)}\n key={`${nodeId}${this.styleClassNames.link}`}\n />,\n );\n }\n}\n\n// Create child class to Add Tree component based on treeHeight\nclass LayeredTree extends StandardTree {\n public composition: number | undefined;\n private _treeTraversal: number | undefined;\n constructor(\n treeData: ITreeChartDataPoint,\n composition: number | undefined,\n styleClassNames: { link: string; rectNode: string; rectText: string; rectSubText: string; rectmetricText: string },\n _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [],\n _linkElements: Array<React.SVGProps<SVGPathElement>> = [],\n _treeTraversal: number | undefined,\n ) {\n super(treeData, styleClassNames, _nodeElements, _linkElements);\n this.composition = composition;\n this._treeTraversal = _treeTraversal;\n }\n public createTree() {\n const root = hierarchy(this.treeData, d => {\n return d.children;\n });\n\n // Find tree Height\n const treeHeight = root?.height + 1;\n\n // Create tree layout, width: 70, height: 90 and add node separation\n const treemap = tree()\n .nodeSize([75, 50])\n .separation((a, b) => {\n return a.parent === root && b.parent === root ? 3.5 : 1;\n });\n\n // Assigns the x and y position for the nodes\n const treeData = treemap(root);\n\n // Compute the new tree layout.\n const nodes = treeData.descendants();\n\n // Normalize for fixed-depth and width\n // Normalise y coordinate by depth of each node by a factor of 130\n // Normalise x coordinate by start coordinate 0 with 450\n nodes.forEach(d => {\n d.y = d.depth === 0 ? 10 : d.depth * 130;\n d.x += 400;\n });\n\n // <------------------ Traversal section ------------------>\n\n // Create tree data structure\n const treeDataStructure: Array<ITreeDataStructure> = [];\n let TreeID: number = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const createTreeDataStructure = (d: any) => {\n d.id = TreeID;\n treeDataStructure.push({\n id: TreeID,\n children: d.children,\n dataName: d.data.name,\n subName: d.data.subname,\n metricName: d.data?.metric,\n fill: d.data.fill,\n x: d.x,\n y: d.y,\n parentID: d.parent?.id,\n });\n TreeID++;\n };\n\n this._treeTraversal === 0\n ? root.each(d => {\n createTreeDataStructure(d);\n })\n : root.eachBefore(d => {\n createTreeDataStructure(d);\n });\n\n const rectHeight = 70;\n const rectWidth = 220;\n const gap: number = 20;\n const parentSet = new Set();\n\n for (const d of treeDataStructure) {\n const parentInfo =\n d.id === 0\n ? 'Root Node'\n : `Parent info parentId: ${d.parentID}\n ${treeDataStructure[d.parentID].dataName}\n ${treeDataStructure[d.parentID].subName}`;\n\n // check for leaf nodes\n if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {\n const newWidth = (rectWidth - gap) / 2;\n const newHeight = 70;\n parentSet.add(d.parentID);\n\n // <------------------ Links section ------------------>\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n true,\n rectWidth,\n rectHeight,\n gap,\n );\n\n // <------------------ Nodes section ------------------>\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.parentID]?.children;\n\n const dx1: number = treeDataStructure[d.parentID]?.x;\n const dx2: number = treeDataStructure[d.parentID]?.x + newWidth + gap;\n let dy: number = children[0]?.y;\n\n for (let itr = 0; itr < children.length; ++itr) {\n const child = children[itr];\n\n // Given Composition\n if (this.composition !== undefined) {\n // For compact compostion\n if (this.composition === 0) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n itr % 2 === 0 ? dx1 : dx2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : newWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += newHeight + gap;\n }\n }\n // For long compostion\n else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n dx1,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += newHeight + gap;\n }\n }\n\n // Automatic Node Composition\n else {\n if (children.length > 2) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n itr % 2 === 0 ? dx1 : dx2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : newWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += newHeight + gap;\n }\n } else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n dx1,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += newHeight + gap;\n }\n }\n }\n }\n\n if (d.children || treeHeight <= 2) {\n // <------------------ Nodes section ------------------>\n this.addNodeShapetoSVG(\n d.dataName,\n d.subName,\n d.metricName,\n d.x,\n d.y,\n d.fill,\n rectWidth,\n rectHeight,\n d.id,\n parentInfo,\n );\n\n // <------------------ Links section ------------------>\n if (d.id !== 0) {\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n false,\n rectWidth,\n rectHeight,\n gap,\n );\n }\n }\n }\n }\n}\n\nexport class TreeChartBase extends React.Component<ITreeProps, ITreeState> {\n private _treeData: ITreeChartDataPoint;\n private _width: number | undefined;\n private _height: number | undefined;\n private _composition: number | undefined;\n private _classNames: IProcessedStyleSet<ITreeStyles>;\n private _rootElem: HTMLElement | null;\n private _margin: { left: number; right: number; top: number; bottom: number };\n private _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [];\n private _linkElements: Array<React.SVGProps<SVGPathElement>> = [];\n private _treeTraversal: number | undefined;\n\n constructor(props: ITreeProps) {\n super(props);\n this._margin = { top: 30, right: 20, bottom: 30, left: 50 };\n this._width = this.props.width || 1200;\n this._height = this.props.height || 700;\n this._treeData = this.props.treeData;\n this._composition = this.props?.composition;\n this._treeTraversal = this.props.treeTraversal;\n\n this.state = {\n _width: this._width || 1000,\n _height: this._height || 700,\n };\n }\n\n public componentDidMount() {\n const { theme, className, styles } = this.props;\n // Get classNames to create component styling\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n // Call createTreeChart function in componentDidMount\n this.createTreeChart();\n const reducedHeight = this._rootElem && this._rootElem.offsetHeight / 5;\n this.setState({\n _width: (this._rootElem && this._rootElem!.offsetWidth)!,\n _height: (this._rootElem && this._rootElem!.offsetHeight - reducedHeight!)!,\n });\n }\n\n public createTreeChart() {\n const svg = select('.svgTree');\n\n // Set SVG width and height\n svg\n .attr('width', this.state._width - this._margin.left - this._margin.right)\n .attr('height', this.state._height - this._margin.top - this._margin.bottom);\n\n // Create styleClass object to access it in parent class\n const styleClassNames = {\n link: this._classNames.link,\n rectNode: this._classNames.rectNode,\n rectText: this._classNames.rectText,\n rectSubText: this._classNames.rectSubText,\n rectmetricText: this._classNames.rectMetricText,\n };\n\n // Instantiate inherited class and call createTree function for the object\n const treeObject = new LayeredTree(\n this._treeData,\n this._composition,\n styleClassNames,\n this._nodeElements,\n this._linkElements,\n this._treeTraversal,\n );\n treeObject.createTree();\n }\n\n public render(): JSX.Element {\n return (\n <FocusZone>\n <div className=\"svgTreeDiv\" ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}>\n <svg className=\"svgTree\">\n <g className=\"svgNode\">{this._nodeElements.map(element => element)}</g>\n <g className=\"svgLink\">{this._linkElements.map(element => element)}</g>\n </svg>\n </div>\n </FocusZone>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ITreeProps } from './TreeChart.types';
3
+ export declare const TreeChart: React.FunctionComponent<ITreeProps>;
@@ -0,0 +1,5 @@
1
+ import { styled } from '@fluentui/react/lib/Utilities';
2
+ import { TreeChartBase } from './TreeChart.base';
3
+ import { getStyles } from './TreeChart.styles';
4
+ export var TreeChart = styled(TreeChartBase, getStyles);
5
+ //# sourceMappingURL=TreeChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,IAAM,SAAS,GAAwC,MAAM,CAClE,aAAa,EACb,SAAS,CACV,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { ITreeStyles, ITreeProps, ITreeStyleProps } from './TreeChart.types';\nimport { TreeChartBase } from './TreeChart.base';\nimport { getStyles } from './TreeChart.styles';\n\nexport const TreeChart: React.FunctionComponent<ITreeProps> = styled<ITreeProps, ITreeStyleProps, ITreeStyles>(\n TreeChartBase,\n getStyles,\n);\n"]}
@@ -0,0 +1,2 @@
1
+ import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';
2
+ export declare const getStyles: (props: ITreeStyleProps) => ITreeStyles;
@@ -0,0 +1,20 @@
1
+ import { __assign } from "tslib";
2
+ export var getStyles = function (props) {
3
+ return {
4
+ link: {
5
+ fill: 'none',
6
+ stroke: '#A1A1A1',
7
+ strokeWidth: '2px',
8
+ },
9
+ rectNode: {
10
+ strokeWidth: '2px',
11
+ fill: 'white',
12
+ padding: '10px',
13
+ rx: '2px',
14
+ },
15
+ rectText: __assign({ fill: 'black' }, props.theme.fonts.large),
16
+ rectSubText: __assign({ fill: '#484644' }, props.theme.fonts.medium),
17
+ rectMetricText: __assign({ fill: '#000000' }, props.theme.fonts.xLarge),
18
+ };
19
+ };
20
+ //# sourceMappingURL=TreeChart.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.styles.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.styles.ts"],"names":[],"mappings":";AAEA,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAsB;IAC9C,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,MAAM;YACf,EAAE,EAAE,KAAK;SACV;QACD,QAAQ,aACN,IAAI,EAAE,OAAO,IACV,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,KAAK,CAC5B;QACD,WAAW,aACT,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;QACD,cAAc,aACZ,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';\n\nexport const getStyles = (props: ITreeStyleProps): ITreeStyles => {\n return {\n link: {\n fill: 'none',\n stroke: '#A1A1A1',\n strokeWidth: '2px',\n },\n rectNode: {\n strokeWidth: '2px',\n fill: 'white',\n padding: '10px',\n rx: '2px',\n },\n rectText: {\n fill: 'black',\n ...props.theme!.fonts.large,\n },\n rectSubText: {\n fill: '#484644',\n ...props.theme!.fonts.medium,\n },\n rectMetricText: {\n fill: '#000000',\n ...props.theme!.fonts.xLarge,\n },\n };\n};\n"]}
@@ -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,4 +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';
17
+ export * from './Sparkline';
16
18
  import './version';
package/lib/index.js CHANGED
@@ -13,5 +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';
17
+ export * from './Sparkline';
16
18
  import './version';
17
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;AAE9B,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';\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.0');
4
+ setVersion('@fluentui/react-charting', '5.12.0');
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.0');"]}
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.0');"]}
@@ -0,0 +1 @@
1
+ export * from './components/Sparkline/index';
@@ -0,0 +1,6 @@
1
+ define(["require", "exports", "tslib", "./components/Sparkline/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=Sparkline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.js","sourceRoot":"../src/","sources":["Sparkline.ts"],"names":[],"mappings":";;;IAAA,uCAA6C","sourcesContent":["export * from './components/Sparkline/index';\n"]}
@@ -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,OA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B,OAAA;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 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;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,OAAA;IACN,mDAAmD;IACnD,mGAAA,MAAM,OAAA;IACN,6GAAA,gBAAgB,OAAA;IAChB,+GAAA,kBAAkB,OAAA;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"]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ILineChartDataPoint } from '../../types/IDataPoint';
3
+ import { ISparklineProps } from '../../index';
4
+ export interface ISparklineState {
5
+ _points: ILineChartDataPoint[] | null;
6
+ _width: number;
7
+ _height: number;
8
+ }
9
+ export declare class SparklineBase extends React.Component<ISparklineProps, ISparklineState> {
10
+ private margin;
11
+ private x;
12
+ private y;
13
+ private area;
14
+ constructor(props: ISparklineProps);
15
+ componentDidMount(): void;
16
+ drawSparkline(): JSX.Element;
17
+ render(): JSX.Element;
18
+ }
@@ -0,0 +1,63 @@
1
+ define(["require", "exports", "tslib", "react", "d3-scale", "d3-shape", "d3-array", "@fluentui/react-focus", "@fluentui/react/lib/Utilities"], function (require, exports, tslib_1, React, d3_scale_1, d3_shape_1, d3_array_1, react_focus_1, Utilities_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SparklineBase = void 0;
5
+ var getClassNames = Utilities_1.classNamesFunction();
6
+ var SparklineBase = /** @class */ (function (_super) {
7
+ tslib_1.__extends(SparklineBase, _super);
8
+ function SparklineBase(props) {
9
+ var _this = _super.call(this, props) || this;
10
+ _this.margin = {
11
+ top: 2,
12
+ right: 0,
13
+ bottom: 0,
14
+ left: 0,
15
+ };
16
+ _this.state = {
17
+ _points: null,
18
+ _width: _this.props.width || 80,
19
+ _height: _this.props.height || 20 + _this.margin.bottom + _this.margin.top,
20
+ };
21
+ return _this;
22
+ }
23
+ SparklineBase.prototype.componentDidMount = function () {
24
+ var _this = this;
25
+ var area = d3_shape_1.area()
26
+ /* eslint-disable @typescript-eslint/no-explicit-any */
27
+ .x(function (d) { return _this.x(d.x); })
28
+ .y0(this.state._height)
29
+ /* eslint-disable @typescript-eslint/no-explicit-any */
30
+ .y1(function (d) { return _this.y(d.y); })
31
+ .curve(d3_shape_1.curveMonotoneX);
32
+ this.area = area;
33
+ var points = this.props.data.lineChartData[0].data;
34
+ /* eslint-disable @typescript-eslint/no-explicit-any */
35
+ var _a = d3_array_1.extent(points, function (d) { return d.x; }), xMin = _a[0], xMax = _a[1];
36
+ this.x = d3_scale_1.scaleLinear()
37
+ .domain([xMin, xMax])
38
+ .range([this.margin.left, this.state._width - this.margin.right]);
39
+ this.y = d3_scale_1.scaleLinear()
40
+ /* eslint-disable @typescript-eslint/no-explicit-any */
41
+ .domain([0, d3_array_1.max(points, function (d) { return d.y; })])
42
+ .range([this.state._height - this.margin.bottom, this.margin.top]);
43
+ this.setState({
44
+ _points: points,
45
+ });
46
+ };
47
+ SparklineBase.prototype.drawSparkline = function () {
48
+ return (React.createElement("path", { className: "area", d: this.area(this.state._points), opacity: 1, fillOpacity: 0.2, fill: this.props.data.lineChartData[0].color, strokeWidth: 2, stroke: this.props.data.lineChartData[0].color, "aria-label": "Sparkline with label " + this.props.data.lineChartData[0].legend }));
49
+ };
50
+ SparklineBase.prototype.render = function () {
51
+ var classNames = getClassNames(this.props.styles, {
52
+ theme: this.props.theme,
53
+ });
54
+ return (React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, isCircularNavigation: true, className: classNames.inlineBlock },
55
+ React.createElement("div", { className: classNames.inlineBlock },
56
+ this.state._width >= 50 && this.state._height >= 16 ? (React.createElement("svg", { width: this.state._width, height: this.state._height, tabIndex: 0 }, this.state._points ? this.drawSparkline() : null)) : (React.createElement(React.Fragment, null)),
57
+ this.props.showLegend && this.props.data.lineChartData[0].legend ? (React.createElement("span", { role: "text", className: classNames.titleText, tabIndex: 0 }, this.props.data.lineChartData[0].legend)) : (React.createElement(React.Fragment, null)))));
58
+ };
59
+ return SparklineBase;
60
+ }(React.Component));
61
+ exports.SparklineBase = SparklineBase;
62
+ });
63
+ //# sourceMappingURL=Sparkline.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.base.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.base.tsx"],"names":[],"mappings":";;;;IAQA,IAAM,aAAa,GAAG,8BAAkB,EAA0C,CAAC;IAQnF;QAAmC,yCAAiD;QAelF,uBAAY,KAAsB;YAAlC,YACE,kBAAM,KAAK,CAAC,SAMb;YArBO,YAAM,GAAG;gBAC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AC,uBAAS,IACR,SAAS,EAAE,gCAAkB,CAAC,UAAU,EACxC,oBAAoB,EAAE,IAAI,EAC1B,SAAS,EAAE,UAAU,CAAC,WAAW;gBAEjC,6BAAK,SAAS,EAAE,UAAU,CAAC,WAAW;oBACnC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CACrD,6BAAK,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAC7C,CACP,CAAC,CAAC,CAAC,CACF,yCAAK,CACN;oBACA,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,IAAK,CAAC,aAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CACpE,8BAAM,IAAI,EAAC,MAAM,EAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC,IAC3D,IAAI,CAAC,KAAK,CAAC,IAAK,CAAC,aAAc,CAAC,CAAC,CAAC,CAAC,MAAO,CACtC,CACR,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACI,CACb,CAAC;QACJ,CAAC;QACH,oBAAC;IAAD,CAAC,AAhGD,CAAmC,KAAK,CAAC,SAAS,GAgGjD;IAhGY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { area as d3Area, curveMonotoneX as d3CurveMonotoneX } from 'd3-shape';\nimport { max as d3Max, extent as d3Extent } from 'd3-array';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { ILineChartDataPoint } from '../../types/IDataPoint';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from '../../index';\nconst getClassNames = classNamesFunction<ISparklineStyleProps, ISparklineStyles>();\n\nexport interface ISparklineState {\n _points: ILineChartDataPoint[] | null;\n _width: number;\n _height: number;\n}\n\nexport class SparklineBase extends React.Component<ISparklineProps, ISparklineState> {\n private margin = {\n top: 2,\n right: 0,\n bottom: 0,\n left: 0,\n };\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private x: any;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private y: any;\n private area: any;\n\n constructor(props: ISparklineProps) {\n super(props);\n this.state = {\n _points: null,\n _width: this.props.width! || 80,\n _height: this.props.height! || 20 + this.margin.bottom + this.margin.top,\n };\n }\n\n public componentDidMount() {\n const area = d3Area()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .x((d: any) => this.x(d.x))\n .y0(this.state._height)\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .y1((d: any) => this.y(d.y))\n .curve(d3CurveMonotoneX);\n this.area = area;\n\n const points = this.props.data!.lineChartData![0].data;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const [xMin, xMax] = d3Extent(points, (d: any) => d.x);\n\n this.x = d3ScaleLinear()\n .domain([xMin, xMax])\n .range([this.margin.left!, this.state._width - this.margin.right!]);\n this.y = d3ScaleLinear()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .domain([0, d3Max(points, (d: any) => d.y)])\n .range([this.state._height - this.margin.bottom!, this.margin.top!]);\n\n this.setState({\n _points: points,\n });\n }\n\n public drawSparkline() {\n return (\n <path\n className=\"area\"\n d={this.area(this.state._points)}\n opacity={1}\n fillOpacity={0.2}\n fill={this.props.data!.lineChartData![0].color!}\n strokeWidth={2}\n stroke={this.props.data!.lineChartData![0].color!}\n aria-label={`Sparkline with label ${this.props.data!.lineChartData![0].legend!}`}\n />\n );\n }\n\n public render() {\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n return (\n <FocusZone\n direction={FocusZoneDirection.horizontal}\n isCircularNavigation={true}\n className={classNames.inlineBlock}\n >\n <div className={classNames.inlineBlock}>\n {this.state._width >= 50 && this.state._height >= 16 ? (\n <svg width={this.state._width} height={this.state._height} tabIndex={0}>\n {this.state._points ? this.drawSparkline() : null}\n </svg>\n ) : (\n <></>\n )}\n {this.props.showLegend && this.props.data!.lineChartData![0].legend ? (\n <span role=\"text\" className={classNames.titleText} tabIndex={0}>\n {this.props.data!.lineChartData![0].legend!}\n </span>\n ) : (\n <></>\n )}\n </div>\n </FocusZone>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ISparklineProps } from '../../index';
3
+ export declare const Sparkline: React.FunctionComponent<ISparklineProps>;
@@ -0,0 +1,8 @@
1
+ define(["require", "exports", "@fluentui/react/lib/Utilities", "./Sparkline.base", "./Sparkline.styles"], function (require, exports, Utilities_1, Sparkline_base_1, Sparkline_styles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Sparkline = void 0;
5
+ // Create a Sparkline variant which uses these default styles and this styled subcomponent.
6
+ exports.Sparkline = Utilities_1.styled(Sparkline_base_1.SparklineBase, Sparkline_styles_1.getStyles);
7
+ });
8
+ //# sourceMappingURL=Sparkline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.tsx"],"names":[],"mappings":";;;;IAMA,2FAA2F;IAC9E,QAAA,SAAS,GAA6C,kBAAM,CAIvE,8BAAa,EAAE,4BAAS,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { ISparklineStyles, ISparklineProps, ISparklineStyleProps } from '../../index';\nimport { SparklineBase } from './Sparkline.base';\nimport { getStyles } from './Sparkline.styles';\n\n// Create a Sparkline variant which uses these default styles and this styled subcomponent.\nexport const Sparkline: React.FunctionComponent<ISparklineProps> = styled<\n ISparklineProps,\n ISparklineStyleProps,\n ISparklineStyles\n>(SparklineBase, getStyles);\n"]}
@@ -0,0 +1,2 @@
1
+ import { ISparklineStyleProps, ISparklineStyles } from './Sparkline.types';
2
+ export declare const getStyles: (props: ISparklineStyleProps) => ISparklineStyles;
@@ -0,0 +1,15 @@
1
+ define(["require", "exports", "tslib"], function (require, exports, tslib_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getStyles = void 0;
5
+ var getStyles = function (props) {
6
+ return {
7
+ inlineBlock: {
8
+ display: 'inline',
9
+ },
10
+ titleText: tslib_1.__assign({ marginLeft: '8px', textAlign: 'center' }, props.theme.fonts.smallPlus),
11
+ };
12
+ };
13
+ exports.getStyles = getStyles;
14
+ });
15
+ //# sourceMappingURL=Sparkline.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.styles.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.styles.ts"],"names":[],"mappings":";;;;IAEO,IAAM,SAAS,GAAG,UAAC,KAA2B;QACnD,OAAO;YACL,WAAW,EAAE;gBACX,OAAO,EAAE,QAAQ;aAClB;YACD,SAAS,qBACP,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,QAAQ,IAChB,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,SAAS,CAChC;SACF,CAAC;IACJ,CAAC,CAAC;IAXW,QAAA,SAAS,aAWpB","sourcesContent":["import { ISparklineStyleProps, ISparklineStyles } from './Sparkline.types';\n\nexport const getStyles = (props: ISparklineStyleProps): ISparklineStyles => {\n return {\n inlineBlock: {\n display: 'inline',\n },\n titleText: {\n marginLeft: '8px',\n textAlign: 'center',\n ...props.theme!.fonts.smallPlus,\n },\n };\n};\n"]}
@@ -0,0 +1,46 @@
1
+ import { ITheme, IStyle } from '@fluentui/react/lib/Styling';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ import { IChartProps } from '../../types/IDataPoint';
4
+ import { ICartesianChartStyleProps } from '../CommonComponents/index';
5
+ export interface ISparklineStyleProps extends ICartesianChartStyleProps {
6
+ }
7
+ export interface ISparklineProps {
8
+ /**
9
+ * An array of chart data points for the Sparkline chart
10
+ */
11
+ data?: IChartProps;
12
+ /**
13
+ * Width of chart
14
+ * * @default 80
15
+ */
16
+ width?: number;
17
+ /**
18
+ * Height of chart
19
+ * @default 20
20
+ */
21
+ height?: number;
22
+ /**
23
+ * Additional CSS class(es) to apply to the SparklineChart.
24
+ */
25
+ className?: string;
26
+ /**
27
+ * Theme (provided through customization.)
28
+ */
29
+ theme?: ITheme;
30
+ /**
31
+ * The prop used to define the culture to localized the numbers
32
+ */
33
+ culture?: string;
34
+ /**
35
+ * Prop used to determine whether to show the legend or not
36
+ */
37
+ showLegend?: boolean;
38
+ /**
39
+ * Call to provide customized styling that will layer on top of the variant rules.
40
+ */
41
+ styles?: IStyleFunctionOrObject<ISparklineStyleProps, ISparklineStyles>;
42
+ }
43
+ export interface ISparklineStyles {
44
+ inlineBlock?: IStyle;
45
+ titleText?: IStyle;
46
+ }