@fluentui/react-charts 9.1.9 → 9.2.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 (451) hide show
  1. package/CHANGELOG.md +47 -2
  2. package/dist/index.d.ts +348 -11
  3. package/lib/AreaChart.js.map +1 -1
  4. package/lib/CartesianChart.js.map +1 -1
  5. package/lib/DeclarativeChart.js.map +1 -1
  6. package/lib/DonutChart.js.map +1 -1
  7. package/lib/FunnelChart.js +1 -0
  8. package/lib/FunnelChart.js.map +1 -0
  9. package/lib/GanttChart.js +1 -0
  10. package/lib/GanttChart.js.map +1 -0
  11. package/lib/GaugeChart.js.map +1 -1
  12. package/lib/GroupedVerticalBarChart.js.map +1 -1
  13. package/lib/HeatMapChart.js.map +1 -1
  14. package/lib/HorizontalBarChart.js.map +1 -1
  15. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  16. package/lib/Legends.js.map +1 -1
  17. package/lib/LineChart.js.map +1 -1
  18. package/lib/Popover.js.map +1 -1
  19. package/lib/ResponsiveContainer.js.map +1 -1
  20. package/lib/SankeyChart.js.map +1 -1
  21. package/lib/ScatterChart.js.map +1 -1
  22. package/lib/Sparkline.js.map +1 -1
  23. package/lib/VerticalBarChart.js.map +1 -1
  24. package/lib/VerticalStackedBarChart.js.map +1 -1
  25. package/lib/components/AreaChart/AreaChart.js +24 -8
  26. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  27. package/lib/components/AreaChart/AreaChart.types.js.map +1 -1
  28. package/lib/components/AreaChart/index.js.map +1 -1
  29. package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
  30. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +41 -0
  31. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  32. package/lib/components/CommonComponents/CartesianChart.js +12 -8
  33. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  34. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  35. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  36. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  37. package/lib/components/CommonComponents/index.js.map +1 -1
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +1 -2
  39. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +128 -0
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  41. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +1 -2
  42. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +126 -0
  43. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  44. package/lib/components/DeclarativeChart/DeclarativeChart.js +15 -7
  45. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  46. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +44 -13
  47. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  48. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  49. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  50. package/lib/components/DeclarativeChart/index.js.map +1 -1
  51. package/lib/components/DonutChart/Arc/Arc.js +5 -5
  52. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  53. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +1 -2
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +44 -0
  57. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  58. package/lib/components/DonutChart/DonutChart.js +18 -4
  59. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  61. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  62. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  63. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  64. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +1 -2
  65. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +29 -0
  66. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  67. package/lib/components/DonutChart/index.js.map +1 -1
  68. package/lib/components/DonutChart/useDonutChartStyles.styles.js +1 -2
  69. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +45 -0
  70. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  71. package/lib/components/FunnelChart/FunnelChart.js +400 -0
  72. package/lib/components/FunnelChart/FunnelChart.js.map +1 -0
  73. package/lib/components/FunnelChart/FunnelChart.types.js +1 -0
  74. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -0
  75. package/lib/components/FunnelChart/funnelGeometry.js +220 -0
  76. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -0
  77. package/lib/components/FunnelChart/index.js +2 -0
  78. package/lib/components/FunnelChart/index.js.map +1 -0
  79. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +58 -0
  80. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  81. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +51 -0
  82. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  83. package/lib/components/GanttChart/GanttChart.js +547 -0
  84. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  85. package/lib/components/GanttChart/GanttChart.types.js +4 -0
  86. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  87. package/lib/components/GanttChart/index.js +2 -0
  88. package/lib/components/GanttChart/index.js.map +1 -0
  89. package/lib/components/GanttChart/useGanttChartStyles.styles.js +24 -0
  90. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  91. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +23 -0
  92. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  93. package/lib/components/GaugeChart/GaugeChart.js +9 -2
  94. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  95. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  96. package/lib/components/GaugeChart/index.js.map +1 -1
  97. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +1 -2
  98. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +142 -0
  99. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  100. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  101. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  102. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  103. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  104. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
  105. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +53 -0
  106. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  107. package/lib/components/HeatMapChart/HeatMapChart.js +11 -3
  108. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  109. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  110. package/lib/components/HeatMapChart/index.js.map +1 -1
  111. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -2
  112. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +38 -0
  113. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  114. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  115. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  116. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +5 -3
  117. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  118. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  119. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -2
  120. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +120 -0
  121. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  122. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  123. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  124. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  125. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  126. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -2
  127. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +39 -0
  128. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  129. package/lib/components/Legends/Legends.js +28 -10
  130. package/lib/components/Legends/Legends.js.map +1 -1
  131. package/lib/components/Legends/Legends.types.js.map +1 -1
  132. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  133. package/lib/components/Legends/index.js.map +1 -1
  134. package/lib/components/Legends/shape.js +3 -3
  135. package/lib/components/Legends/shape.js.map +1 -1
  136. package/lib/components/Legends/useLegendsStyles.styles.js +57 -14
  137. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  138. package/lib/components/Legends/useLegendsStyles.styles.raw.js +138 -0
  139. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  140. package/lib/components/LineChart/LineChart.js +23 -9
  141. package/lib/components/LineChart/LineChart.js.map +1 -1
  142. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  143. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  144. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  145. package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
  146. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  147. package/lib/components/LineChart/index.js.map +1 -1
  148. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
  149. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +52 -0
  150. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  151. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  152. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  153. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  154. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -2
  155. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +28 -0
  156. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  157. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  158. package/lib/components/SankeyChart/SankeyChart.js +5 -1
  159. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  160. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  161. package/lib/components/SankeyChart/index.js.map +1 -1
  162. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
  163. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +77 -0
  164. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  165. package/lib/components/ScatterChart/ScatterChart.js +19 -5
  166. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  167. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  168. package/lib/components/ScatterChart/index.js.map +1 -1
  169. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
  170. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +43 -0
  171. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  172. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  173. package/lib/components/Sparkline/Sparkline.types.js.map +1 -1
  174. package/lib/components/Sparkline/index.js.map +1 -1
  175. package/lib/components/Sparkline/useSparklineStyles.styles.js +1 -2
  176. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +30 -0
  177. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  178. package/lib/components/VerticalBarChart/VerticalBarChart.js +71 -31
  179. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  180. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  181. package/lib/components/VerticalBarChart/index.js.map +1 -1
  182. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
  183. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +58 -0
  184. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  185. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  186. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  187. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  188. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  189. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
  190. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +49 -0
  191. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  192. package/lib/index.js +2 -0
  193. package/lib/index.js.map +1 -1
  194. package/lib/types/DataPoint.js +3 -1
  195. package/lib/types/DataPoint.js.map +1 -1
  196. package/lib/types/EventAnnotation.js.map +1 -1
  197. package/lib/types/LegendDataItem.js.map +1 -1
  198. package/lib/types/index.js.map +1 -1
  199. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  200. package/lib/utilities/KeyCodes.js.map +1 -1
  201. package/lib/utilities/SVGTooltipText.js +2 -0
  202. package/lib/utilities/SVGTooltipText.js.map +1 -1
  203. package/lib/utilities/async-utils.js.map +1 -1
  204. package/lib/utilities/colors.js +12 -0
  205. package/lib/utilities/colors.js.map +1 -1
  206. package/lib/utilities/getWindow.js.map +1 -1
  207. package/lib/utilities/image-export-utils.js +256 -0
  208. package/lib/utilities/image-export-utils.js.map +1 -0
  209. package/lib/utilities/index.js.map +1 -1
  210. package/lib/utilities/overflow-utils.js.map +1 -1
  211. package/lib/utilities/string.js.map +1 -1
  212. package/lib/utilities/test-data.js +236 -0
  213. package/lib/utilities/test-data.js.map +1 -1
  214. package/lib/utilities/utilities.js +140 -27
  215. package/lib/utilities/utilities.js.map +1 -1
  216. package/lib/utilities/vbc-utils.js +2 -2
  217. package/lib/utilities/vbc-utils.js.map +1 -1
  218. package/lib-commonjs/AreaChart.js.map +1 -1
  219. package/lib-commonjs/CartesianChart.js.map +1 -1
  220. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  221. package/lib-commonjs/DonutChart.js.map +1 -1
  222. package/lib-commonjs/FunnelChart.js +6 -0
  223. package/lib-commonjs/FunnelChart.js.map +1 -0
  224. package/lib-commonjs/GanttChart.js +6 -0
  225. package/lib-commonjs/GanttChart.js.map +1 -0
  226. package/lib-commonjs/GaugeChart.js.map +1 -1
  227. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -1
  228. package/lib-commonjs/HeatMapChart.js.map +1 -1
  229. package/lib-commonjs/HorizontalBarChart.js.map +1 -1
  230. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -1
  231. package/lib-commonjs/Legends.js.map +1 -1
  232. package/lib-commonjs/LineChart.js.map +1 -1
  233. package/lib-commonjs/Popover.js.map +1 -1
  234. package/lib-commonjs/ResponsiveContainer.js.map +1 -1
  235. package/lib-commonjs/SankeyChart.js.map +1 -1
  236. package/lib-commonjs/ScatterChart.js.map +1 -1
  237. package/lib-commonjs/Sparkline.js.map +1 -1
  238. package/lib-commonjs/VerticalBarChart.js.map +1 -1
  239. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -1
  240. package/lib-commonjs/components/AreaChart/AreaChart.js +23 -7
  241. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  242. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -1
  243. package/lib-commonjs/components/AreaChart/index.js.map +1 -1
  244. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -1
  245. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  246. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +57 -0
  247. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -0
  248. package/lib-commonjs/components/CommonComponents/CartesianChart.js +11 -7
  249. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  250. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  251. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  252. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  253. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  254. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +1 -1
  255. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  256. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +142 -0
  257. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -0
  258. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +1 -1
  259. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  260. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +140 -0
  261. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -0
  262. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +14 -6
  263. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  264. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +47 -13
  265. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  266. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  267. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  268. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -1
  269. package/lib-commonjs/components/DonutChart/Arc/Arc.js +5 -5
  270. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  271. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  272. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -1
  273. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +1 -1
  274. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  275. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +58 -0
  276. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -0
  277. package/lib-commonjs/components/DonutChart/DonutChart.js +17 -3
  278. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  279. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  280. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  281. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  282. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -1
  283. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -1
  284. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  285. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +43 -0
  286. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -0
  287. package/lib-commonjs/components/DonutChart/index.js.map +1 -1
  288. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +1 -1
  289. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  290. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +59 -0
  291. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -0
  292. package/lib-commonjs/components/FunnelChart/FunnelChart.js +411 -0
  293. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -0
  294. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +6 -0
  295. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -0
  296. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +248 -0
  297. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -0
  298. package/lib-commonjs/components/FunnelChart/index.js +7 -0
  299. package/lib-commonjs/components/FunnelChart/index.js.map +1 -0
  300. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +79 -0
  301. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -0
  302. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +65 -0
  303. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -0
  304. package/lib-commonjs/components/GanttChart/GanttChart.js +558 -0
  305. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  306. package/lib-commonjs/components/GanttChart/GanttChart.types.js +7 -0
  307. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  308. package/lib-commonjs/components/GanttChart/index.js +7 -0
  309. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  310. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +39 -0
  311. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -0
  312. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +39 -0
  313. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -0
  314. package/lib-commonjs/components/GaugeChart/GaugeChart.js +9 -2
  315. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  316. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  317. package/lib-commonjs/components/GaugeChart/index.js.map +1 -1
  318. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -1
  319. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +160 -0
  321. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -0
  322. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +77 -60
  323. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  324. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  325. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -1
  326. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -1
  327. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  328. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +69 -0
  329. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -0
  330. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +10 -2
  331. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  332. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  333. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -1
  334. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -1
  335. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  336. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +56 -0
  337. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -0
  338. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +23 -26
  339. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  340. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +3 -3
  341. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  342. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -1
  343. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +1 -1
  344. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  345. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +134 -0
  346. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -0
  347. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +18 -5
  348. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  349. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  350. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  351. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -1
  352. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  353. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +55 -0
  354. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -0
  355. package/lib-commonjs/components/Legends/Legends.js +28 -10
  356. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  357. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  358. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  359. package/lib-commonjs/components/Legends/index.js.map +1 -1
  360. package/lib-commonjs/components/Legends/shape.js +2 -2
  361. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  362. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +101 -28
  363. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  364. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +174 -0
  365. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -0
  366. package/lib-commonjs/components/LineChart/LineChart.js +23 -9
  367. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  368. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  369. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  370. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  371. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
  372. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  373. package/lib-commonjs/components/LineChart/index.js.map +1 -1
  374. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -1
  375. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  376. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +66 -0
  377. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -0
  378. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  379. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  380. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -1
  381. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  382. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  383. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +46 -0
  384. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -0
  385. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  386. package/lib-commonjs/components/SankeyChart/SankeyChart.js +5 -1
  387. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  388. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  389. package/lib-commonjs/components/SankeyChart/index.js.map +1 -1
  390. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +1 -1
  391. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  392. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +95 -0
  393. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -0
  394. package/lib-commonjs/components/ScatterChart/ScatterChart.js +18 -4
  395. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  396. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  397. package/lib-commonjs/components/ScatterChart/index.js.map +1 -1
  398. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -1
  399. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  400. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +57 -0
  401. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -0
  402. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  403. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -1
  404. package/lib-commonjs/components/Sparkline/index.js.map +1 -1
  405. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -1
  406. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  407. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +44 -0
  408. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -0
  409. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +71 -31
  410. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  411. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  412. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -1
  413. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -1
  414. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  415. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +74 -0
  416. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -0
  417. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -12
  418. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  419. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  420. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -1
  421. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -1
  422. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  423. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +67 -0
  424. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -0
  425. package/lib-commonjs/index.js +2 -0
  426. package/lib-commonjs/index.js.map +1 -1
  427. package/lib-commonjs/types/DataPoint.js +3 -1
  428. package/lib-commonjs/types/DataPoint.js.map +1 -1
  429. package/lib-commonjs/types/EventAnnotation.js.map +1 -1
  430. package/lib-commonjs/types/LegendDataItem.js.map +1 -1
  431. package/lib-commonjs/types/index.js.map +1 -1
  432. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  433. package/lib-commonjs/utilities/KeyCodes.js.map +1 -1
  434. package/lib-commonjs/utilities/SVGTooltipText.js +2 -0
  435. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  436. package/lib-commonjs/utilities/async-utils.js.map +1 -1
  437. package/lib-commonjs/utilities/colors.js +18 -0
  438. package/lib-commonjs/utilities/colors.js.map +1 -1
  439. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  440. package/lib-commonjs/utilities/image-export-utils.js +274 -0
  441. package/lib-commonjs/utilities/image-export-utils.js.map +1 -0
  442. package/lib-commonjs/utilities/index.js.map +1 -1
  443. package/lib-commonjs/utilities/overflow-utils.js.map +1 -1
  444. package/lib-commonjs/utilities/string.js.map +1 -1
  445. package/lib-commonjs/utilities/test-data.js +245 -0
  446. package/lib-commonjs/utilities/test-data.js.map +1 -1
  447. package/lib-commonjs/utilities/utilities.js +142 -22
  448. package/lib-commonjs/utilities/utilities.js.map +1 -1
  449. package/lib-commonjs/utilities/vbc-utils.js +2 -2
  450. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  451. package/package.json +12 -22
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ donutPieClassNames: function() {
13
+ return donutPieClassNames;
14
+ },
15
+ usePieStyles: function() {
16
+ return usePieStyles;
17
+ }
18
+ });
19
+ const _reacttheme = require("@fluentui/react-theme");
20
+ const _react = require("@griffel/react");
21
+ const donutPieClassNames = {
22
+ root: 'fui-donut-pie__root',
23
+ insideDonutString: 'fui-donut-pie__insideDonutString'
24
+ };
25
+ /**
26
+ * Base Styles
27
+ */ const useStyles = (0, _react.makeStyles)({
28
+ root: {},
29
+ insideDonutString: {
30
+ ..._reacttheme.typographyStyles.title2,
31
+ fill: _reacttheme.tokens.colorNeutralForeground1,
32
+ forcedColorAdjust: 'auto'
33
+ }
34
+ });
35
+ const usePieStyles = (props)=>{
36
+ var _props_styles, _props_styles1;
37
+ const { className } = props;
38
+ const baseStyles = useStyles();
39
+ return {
40
+ root: (0, _react.mergeClasses)(donutPieClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
41
+ insideDonutString: (0, _react.mergeClasses)(donutPieClassNames.insideDonutString, baseStyles.insideDonutString, className, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.insideDonutString)
42
+ };
43
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/DonutChart/Pie/usePieStyles.styles.ts"],"sourcesContent":["import { PieProps, PieStyles } from './Pie.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @internal\n */\nexport const donutPieClassNames: SlotClassNames<PieStyles> = {\n root: 'fui-donut-pie__root',\n insideDonutString: 'fui-donut-pie__insideDonutString',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {},\n insideDonutString: {\n ...typographyStyles.title2,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n});\n\n/**\n * Apply styling to the Pie inside donut chart component\n */\nexport const usePieStyles = (props: PieProps): PieStyles => {\n const { className } = props;\n\n const baseStyles = useStyles();\n return {\n root: mergeClasses(donutPieClassNames.root, baseStyles.root, className, props.styles?.root),\n insideDonutString: mergeClasses(\n donutPieClassNames.insideDonutString,\n baseStyles.insideDonutString,\n className,\n props.styles?.insideDonutString,\n ),\n };\n};\n"],"names":["tokens","typographyStyles","makeStyles","mergeClasses","donutPieClassNames","root","insideDonutString","useStyles","title2","fill","colorNeutralForeground1","forcedColorAdjust","usePieStyles","props","className","baseStyles","styles"],"mappings":";;;;;;;;;;;IASaI,kBAAAA;;;IAoBAQ,YAAAA;;;;4BA5B4B,wBAAwB;uBAExB,iBAAiB;AAMnD,2BAAsD;IAC3DP,MAAM;IACNC,mBAAmB;AACrB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYL,iBAAAA,EAAW;IAC3BG,MAAM,CAAC;IACPC,mBAAmB;QACjB,GAAGL,4BAAAA,CAAiBO,MAAM;QAC1BC,MAAMT,kBAAAA,CAAOU,uBAAuB;QACpCC,mBAAmB;IACrB;AACF;AAKO,qBAAqB,CAACE;QAK+CA,eAKtEA;IATJ,MAAM,EAAEC,SAAS,EAAE,GAAGD;IAEtB,MAAME,aAAaR;IACnB,OAAO;QACLF,UAAMF,mBAAAA,EAAaC,mBAAmBC,IAAI,EAAEU,WAAWV,IAAI,EAAES,WAAAA,CAAWD,gBAAAA,MAAMG,MAAAA,AAAM,MAAA,QAAZH,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAAcR,IAAI;QAC1FC,uBAAmBH,mBAAAA,EACjBC,mBAAmBE,iBAAiB,EACpCS,WAAWT,iBAAiB,EAC5BQ,WAAAA,CACAD,iBAAAA,MAAMG,MAAAA,AAAM,MAAA,QAAZH,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAcP,iBAAiB;IAEnC;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DonutChart';\nexport * from './DonutChart.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
1
+ {"version":3,"sources":["../src/components/DonutChart/index.ts"],"sourcesContent":["export * from './DonutChart';\nexport * from './DonutChart.types';\nexport * from '../../types/index';\n"],"names":[],"mappings":";;;;;uBAAc,eAAe;uBACf,qBAAqB;uBACrB,oBAAoB"}
@@ -80,4 +80,4 @@ const useDonutChartStyles = (props)=>{
80
80
  legendContainer: (0, _react.mergeClasses)(donutClassNames.legendContainer, baseStyles.legendContainer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.legendContainer),
81
81
  chartWrapper: (0, _react.mergeClasses)(donutClassNames.chartWrapper, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartWrapper)
82
82
  };
83
- }; //# sourceMappingURL=useDonutChartStyles.styles.js.map
83
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDonutChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const donutClassNames = {\n root: 'fui-donut__root',\n chart: 'fui-donut__chart',\n legendContainer: 'fui-donut__legendContainer',\n chartWrapper: 'fui-donut__chartWrapper'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n // alignItems: 'center',\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%'\n },\n chart: {\n boxSizing: 'content-box',\n alignmentAdjust: 'center',\n display: 'block',\n overflow: 'visible'\n },\n legendContainer: {\n paddingTop: tokens.spacingVerticalL,\n width: '100%'\n }\n});\n/**\n * Apply styling to the DonutChart component\n */ export const useDonutChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3;\n const { className } = props;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(donutClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chart: mergeClasses(donutClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),\n legendContainer: mergeClasses(donutClassNames.legendContainer, baseStyles.legendContainer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.legendContainer),\n chartWrapper: mergeClasses(donutClassNames.chartWrapper, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartWrapper)\n };\n};\n"],"names":["donutClassNames","useDonutChartStyles","root","chart","legendContainer","chartWrapper","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","a9b677","Bqenvij","B7ck84d","ek0pe7","B68tc82","Bmxbyg5","Bpg54ce","z8tnut","d","p","props","_props_styles","_props_styles1","_props_styles2","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uB,CAAAA,iBAAiBF,MAAMQ,MAAM,AAANA,MAAY,QAAQN,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAevB,KAAK;QAClKC,iBAAiB2B,IAAAA,mBAAY,EAAC/B,gBAAgBI,eAAe,EAAE0B,WAAW1B,eAAe,EAAE,AAACuB,CAAAA,iBAAiBH,MAAMQ,MAAM,AAANA,MAAY,QAAQL,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAevB,eAAe;QAC1MC,cAAc0B,IAAAA,mBAAY,EAAC/B,gBAAgBK,YAAY,EAAE,AAACuB,CAAAA,iBAAiBJ,MAAMQ,MAAM,AAANA,MAAY,QAAQJ,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAevB,YAAY;IACzK;AACJ"}
1
+ {"version":3,"sources":["useDonutChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const donutClassNames = {\n root: 'fui-donut__root',\n chart: 'fui-donut__chart',\n legendContainer: 'fui-donut__legendContainer',\n chartWrapper: 'fui-donut__chartWrapper'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n // alignItems: 'center',\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%'\n },\n chart: {\n boxSizing: 'content-box',\n alignmentAdjust: 'center',\n display: 'block',\n overflow: 'visible'\n },\n legendContainer: {\n paddingTop: tokens.spacingVerticalL,\n width: '100%'\n }\n});\n/**\n * Apply styling to the DonutChart component\n */ export const useDonutChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3;\n const { className } = props;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(donutClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n chart: mergeClasses(donutClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),\n legendContainer: mergeClasses(donutClassNames.legendContainer, baseStyles.legendContainer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.legendContainer),\n chartWrapper: mergeClasses(donutClassNames.chartWrapper, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartWrapper)\n };\n};\n"],"names":["__styles","mergeClasses","tokens","typographyStyles","donutClassNames","root","chart","legendContainer","chartWrapper","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","a9b677","Bqenvij","B7ck84d","ek0pe7","B68tc82","Bmxbyg5","Bpg54ce","z8tnut","d","p","useDonutChartStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","className","baseStyles","styles"],"mappings":";;;;;;;;;;;IAIiBI,eAAe;;;IA8BfsB,mBAAmB;;;;uBAlCK,gBAAgB;AAI9C,wBAAwB;IAC/BrB,IAAI,EAAE,iBAAiB;IACvBC,KAAK,EAAE,kBAAkB;IACzBC,eAAe,EAAE,4BAA4B;IAC7CC,YAAY,EAAE;AAClB,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGT,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAK,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAX,KAAA,EAAA;QAAAY,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAL,MAAA,EAAA;QAAAM,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAf,eAAA,EAAA;QAAAgB,MAAA,EAAA;QAAAP,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAA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strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ donutClassNames: function() {
13
+ return donutClassNames;
14
+ },
15
+ useDonutChartStyles: function() {
16
+ return useDonutChartStyles;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const donutClassNames = {
22
+ root: 'fui-donut__root',
23
+ chart: 'fui-donut__chart',
24
+ legendContainer: 'fui-donut__legendContainer',
25
+ chartWrapper: 'fui-donut__chartWrapper'
26
+ };
27
+ /**
28
+ * Base Styles
29
+ */ const useStyles = (0, _react.makeStyles)({
30
+ root: {
31
+ // alignItems: 'center',
32
+ ..._reacttheme.typographyStyles.body1,
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ width: '100%',
36
+ height: '100%'
37
+ },
38
+ chart: {
39
+ boxSizing: 'content-box',
40
+ alignmentAdjust: 'center',
41
+ display: 'block',
42
+ overflow: 'visible'
43
+ },
44
+ legendContainer: {
45
+ paddingTop: _reacttheme.tokens.spacingVerticalL,
46
+ width: '100%'
47
+ }
48
+ });
49
+ const useDonutChartStyles = (props)=>{
50
+ var _props_styles, _props_styles1, _props_styles2, _props_styles3;
51
+ const { className } = props;
52
+ const baseStyles = useStyles();
53
+ return {
54
+ root: (0, _react.mergeClasses)(donutClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
55
+ chart: (0, _react.mergeClasses)(donutClassNames.chart, baseStyles.chart, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.chart),
56
+ legendContainer: (0, _react.mergeClasses)(donutClassNames.legendContainer, baseStyles.legendContainer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.legendContainer),
57
+ chartWrapper: (0, _react.mergeClasses)(donutClassNames.chartWrapper, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartWrapper)
58
+ };
59
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/DonutChart/useDonutChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { DonutChartProps, DonutChartStyles } from './index';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @internal\n */\nexport const donutClassNames: SlotClassNames<DonutChartStyles> = {\n root: 'fui-donut__root',\n chart: 'fui-donut__chart',\n legendContainer: 'fui-donut__legendContainer',\n chartWrapper: 'fui-donut__chartWrapper',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {\n // alignItems: 'center',\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n chart: {\n boxSizing: 'content-box',\n alignmentAdjust: 'center',\n display: 'block',\n overflow: 'visible',\n },\n legendContainer: {\n paddingTop: tokens.spacingVerticalL,\n width: '100%',\n },\n});\n\n/**\n * Apply styling to the DonutChart component\n */\nexport const useDonutChartStyles = (props: DonutChartProps): DonutChartStyles => {\n const { className } = props;\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(donutClassNames.root, baseStyles.root, className, props.styles?.root),\n chart: mergeClasses(donutClassNames.chart, baseStyles.chart, props.styles?.chart),\n legendContainer: mergeClasses(\n donutClassNames.legendContainer,\n baseStyles.legendContainer,\n props.styles?.legendContainer,\n ),\n chartWrapper: mergeClasses(donutClassNames.chartWrapper, props.styles?.chartWrapper),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","donutClassNames","root","chart","legendContainer","chartWrapper","useStyles","body1","display","flexDirection","width","height","boxSizing","alignmentAdjust","overflow","paddingTop","spacingVerticalL","useDonutChartStyles","props","className","baseStyles","styles"],"mappings":";;;;;;;;;;;IAQaI,eAA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,KAAAA,IAAAA,KAAAA,IAAAA,eAAcb,YAAY;IACrF;AACF,EAAE"}
@@ -0,0 +1,411 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FunnelChart", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FunnelChart;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _index = require("../../utilities/index");
15
+ const _index1 = require("../Legends/index");
16
+ const _reacttabster = require("@fluentui/react-tabster");
17
+ const _ChartPopover = require("../CommonComponents/ChartPopover");
18
+ const _chartutilities = require("@fluentui/chart-utilities");
19
+ const _colors = require("../../utilities/colors");
20
+ const _useFunnelChartStylesstyles = require("./useFunnelChartStyles.styles");
21
+ const _funnelGeometry = require("./funnelGeometry");
22
+ const _imageexportutils = require("../../utilities/image-export-utils");
23
+ const FunnelChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
24
+ var _props_legendProps;
25
+ const _emptyChartId = (0, _reactutilities.useId)('_FunnelChart_empty');
26
+ const isRTL = (0, _index.useRtl)();
27
+ const [hoveredStage, setHoveredStage] = _react.useState(null);
28
+ const [calloutData, setCalloutData] = _react.useState(null);
29
+ const [selectedLegends, setSelectedLegends] = _react.useState([]);
30
+ const [clickPosition, setClickPosition] = _react.useState({
31
+ x: 0,
32
+ y: 0
33
+ });
34
+ const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
35
+ const chartContainerRef = _react.useRef(null);
36
+ const isStacked = isStackedFunnelData(props.data);
37
+ const _legendsRef = _react.useRef(null);
38
+ _react.useEffect(()=>{
39
+ var _props_legendProps;
40
+ if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) {
41
+ setSelectedLegends(props.legendProps.selectedLegends);
42
+ }
43
+ }, [
44
+ (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends
45
+ ]);
46
+ _react.useImperativeHandle(props.componentRef, ()=>({
47
+ toImage: (opts)=>{
48
+ var _legendsRef_current;
49
+ return (0, _imageexportutils.toImage)(chartContainerRef.current, (_legendsRef_current = _legendsRef.current) === null || _legendsRef_current === void 0 ? void 0 : _legendsRef_current.toSVG, isRTL, opts);
50
+ }
51
+ }), []);
52
+ function _handleHover(data, mouseEvent) {
53
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
54
+ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
55
+ setCalloutData(data);
56
+ setPopoverOpen(true);
57
+ }
58
+ function _handleFocus(data, focusEvent) {
59
+ focusEvent === null || focusEvent === void 0 ? void 0 : focusEvent.persist();
60
+ let x = 0;
61
+ let y = 0;
62
+ const targetRect = focusEvent.target.getBoundingClientRect();
63
+ x = targetRect.left + targetRect.width / 2;
64
+ y = targetRect.top + targetRect.height / 2;
65
+ updatePosition(x, y);
66
+ setCalloutData(data);
67
+ setPopoverOpen(true);
68
+ }
69
+ function _handleStackedHover(stage, subValue, mouseEvent) {
70
+ mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.persist();
71
+ updatePosition(mouseEvent.clientX, mouseEvent.clientY);
72
+ setCalloutData({
73
+ stage,
74
+ value: subValue.value,
75
+ color: subValue.color,
76
+ category: subValue.category
77
+ });
78
+ setPopoverOpen(true);
79
+ }
80
+ function _handleStackedFocus(stage, subValue, focusEvent) {
81
+ focusEvent === null || focusEvent === void 0 ? void 0 : focusEvent.persist();
82
+ let x = 0;
83
+ let y = 0;
84
+ const targetRect = focusEvent.target.getBoundingClientRect();
85
+ x = targetRect.left + targetRect.width / 2;
86
+ y = targetRect.top + targetRect.height / 2;
87
+ updatePosition(x, y);
88
+ setCalloutData({
89
+ stage,
90
+ value: subValue.value,
91
+ color: subValue.color,
92
+ category: subValue.category
93
+ });
94
+ setPopoverOpen(true);
95
+ }
96
+ function _handleMouseOut() {
97
+ setHoveredStage(null);
98
+ setPopoverOpen(false);
99
+ setCalloutData(null);
100
+ }
101
+ function _onLegendSelectionChange(legendsSelected, event, currentLegend) {
102
+ var _props_legendProps, _props_legendProps1;
103
+ if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
104
+ setSelectedLegends(legendsSelected);
105
+ } else {
106
+ setSelectedLegends(legendsSelected.slice(-1));
107
+ }
108
+ if ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.onChange) {
109
+ props.legendProps.onChange(legendsSelected, event, currentLegend);
110
+ }
111
+ }
112
+ const _onLegendSelectionChangeCallback = _react.useCallback(_onLegendSelectionChange, [
113
+ props.legendProps
114
+ ]);
115
+ function getHighlightedLegend() {
116
+ return selectedLegends.length > 0 ? selectedLegends : hoveredStage ? [
117
+ hoveredStage
118
+ ] : [];
119
+ }
120
+ function legendHighlighted(legend) {
121
+ return getHighlightedLegend().includes(legend);
122
+ }
123
+ function noLegendHighlighted() {
124
+ return getHighlightedLegend().length === 0;
125
+ }
126
+ function _getEventHandlerProps(data, opacity) {
127
+ if ('subValue' in data) {
128
+ return {
129
+ culture: props.culture,
130
+ onMouseOver: opacity == 1 ? (event)=>_handleStackedHover(data.stage, data.subValue, event) : undefined,
131
+ onMouseMove: opacity == 1 ? (event)=>_handleStackedHover(data.stage, data.subValue, event) : undefined,
132
+ onFocus: (event)=>_handleStackedFocus(data.stage, data.subValue, event),
133
+ onBlur: ()=>_handleMouseOut(),
134
+ onMouseOut: ()=>_handleMouseOut()
135
+ };
136
+ } else {
137
+ return {
138
+ culture: props.culture,
139
+ onMouseOver: opacity == 1 ? (event)=>_handleHover(data, event) : undefined,
140
+ onMouseMove: opacity == 1 ? (event)=>_handleHover(data, event) : undefined,
141
+ onFocus: (event)=>_handleFocus(data, event),
142
+ onBlur: ()=>_handleMouseOut(),
143
+ onMouseOut: ()=>_handleMouseOut()
144
+ };
145
+ }
146
+ }
147
+ function _renderSegmentText({ show, x, y, value, textColor }) {
148
+ if (!show) {
149
+ return null;
150
+ }
151
+ const textElement = /*#__PURE__*/ _react.createElement("text", {
152
+ x: isRTL ? funnelWidth - x : x,
153
+ y: y,
154
+ textAnchor: "middle",
155
+ alignmentBaseline: "middle",
156
+ fill: textColor
157
+ }, (0, _chartutilities.formatToLocaleString)(value.toString(), props.culture));
158
+ if (isRTL) {
159
+ return /*#__PURE__*/ _react.createElement("g", {
160
+ transform: `scale(-1,1) translate(${-funnelWidth},0)`
161
+ }, textElement);
162
+ }
163
+ return textElement;
164
+ }
165
+ function _renderFunnelSegment({ key, pathD, fill, opacity, textProps, data, tabIndex }) {
166
+ const eventHandlers = _getEventHandlerProps(data, opacity);
167
+ const textColor = (0, _colors.getContrastTextColor)(fill);
168
+ return /*#__PURE__*/ _react.createElement("g", {
169
+ key: key
170
+ }, /*#__PURE__*/ _react.createElement("path", {
171
+ d: pathD,
172
+ fill: fill,
173
+ opacity: opacity,
174
+ ...eventHandlers,
175
+ tabIndex: tabIndex
176
+ }), textProps && /*#__PURE__*/ _react.createElement("g", eventHandlers, _renderSegmentText({
177
+ ...textProps,
178
+ textColor
179
+ })));
180
+ }
181
+ function _createFunnel(containerHeight, containerWidth) {
182
+ const { data } = props;
183
+ const funnelWidth = containerWidth;
184
+ const funnelHeight = containerHeight * 0.8;
185
+ return data.map((d, i)=>{
186
+ const geometryProps = props.orientation === 'vertical' ? (0, _funnelGeometry.getVerticalFunnelSegmentGeometry)({
187
+ d,
188
+ i,
189
+ data,
190
+ funnelWidth,
191
+ funnelHeight,
192
+ isRTL
193
+ }) : (0, _funnelGeometry.getHorizontalFunnelSegmentGeometry)({
194
+ d,
195
+ i,
196
+ data,
197
+ funnelWidth,
198
+ funnelHeight,
199
+ isRTL
200
+ });
201
+ const { pathD, textX, textY, availableWidth } = geometryProps;
202
+ const minTextWidth = 16;
203
+ const eventHandlerProps = _getEventHandlerProps(d);
204
+ const textProps = (0, _funnelGeometry.getSegmentTextProps)({
205
+ availableWidth,
206
+ minTextWidth,
207
+ textX,
208
+ textY,
209
+ value: d.value,
210
+ ...eventHandlerProps
211
+ });
212
+ return _renderFunnelSegment({
213
+ key: i,
214
+ pathD,
215
+ fill: d.color,
216
+ opacity: legendHighlighted(d.stage) || noLegendHighlighted() ? 1 : 0.1,
217
+ textProps,
218
+ data: d,
219
+ tabIndex: legendHighlighted(d.stage) || noLegendHighlighted() ? 0 : undefined
220
+ });
221
+ });
222
+ }
223
+ function isStackedFunnelData(data) {
224
+ return Array.isArray(data) && data.every((stage)=>Array.isArray(stage.subValues));
225
+ }
226
+ function _renderStackedSegment(stage, subValue, stageIndex, subValueIndex, geometryParams) {
227
+ // Ensure stages have subValues for geometry functions
228
+ const stagesWithSubValues = geometryParams.stages.map((s)=>({
229
+ ...s,
230
+ subValues: s.subValues || []
231
+ }));
232
+ const geom = props.orientation === 'vertical' ? (0, _funnelGeometry.getStackedVerticalFunnelSegmentGeometry)({
233
+ ...geometryParams,
234
+ stages: stagesWithSubValues,
235
+ i: stageIndex,
236
+ k: subValueIndex
237
+ }) : (0, _funnelGeometry.getStackedHorizontalFunnelSegmentGeometry)({
238
+ ...geometryParams,
239
+ stages: stagesWithSubValues,
240
+ i: stageIndex,
241
+ k: subValueIndex
242
+ });
243
+ const minTextWidth = 16;
244
+ const eventHandlerProps = _getEventHandlerProps({
245
+ stage: stage.stage,
246
+ subValue
247
+ });
248
+ const textProps = (0, _funnelGeometry.getSegmentTextProps)({
249
+ availableWidth: geom.availableWidth,
250
+ minTextWidth,
251
+ textX: geom.textX,
252
+ textY: geom.textY,
253
+ value: subValue.value,
254
+ ...eventHandlerProps
255
+ });
256
+ return _renderFunnelSegment({
257
+ key: `${stageIndex}-${subValueIndex}`,
258
+ pathD: geom.pathD,
259
+ fill: subValue.color,
260
+ opacity: isStackedFunnelData(props.data) && legendHighlighted(subValue.category) || noLegendHighlighted() ? 1 : 0.1,
261
+ textProps,
262
+ data: {
263
+ stage: stage.stage,
264
+ subValue
265
+ },
266
+ tabIndex: legendHighlighted(subValue.category) || noLegendHighlighted() ? 0 : undefined
267
+ });
268
+ }
269
+ function _createStackedFunnel(containerHeight, containerWidth) {
270
+ const { data } = props;
271
+ const stages = data;
272
+ const totals = stages.map((s)=>{
273
+ var _s_subValues;
274
+ var _s_subValues_reduce;
275
+ return (_s_subValues_reduce = s === null || s === void 0 ? void 0 : (_s_subValues = s.subValues) === null || _s_subValues === void 0 ? void 0 : _s_subValues.reduce((sum, subValue)=>sum + subValue.value, 0)) !== null && _s_subValues_reduce !== void 0 ? _s_subValues_reduce : 0;
276
+ });
277
+ const maxTotal = Math.max(...totals);
278
+ const funnelWidth = containerWidth;
279
+ const funnelHeight = containerHeight * 0.8;
280
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
281
+ const paths = [];
282
+ const geometryParams = {
283
+ stages,
284
+ totals,
285
+ maxTotal,
286
+ funnelWidth,
287
+ funnelHeight,
288
+ isRTL
289
+ };
290
+ for(let i = 0; i < stages.length; i++){
291
+ const cur = stages[i];
292
+ var _cur_subValues;
293
+ for(let k = 0; k < ((_cur_subValues = cur.subValues) !== null && _cur_subValues !== void 0 ? _cur_subValues : []).length; k++){
294
+ var _cur_subValues1;
295
+ const v = (_cur_subValues1 = cur.subValues) === null || _cur_subValues1 === void 0 ? void 0 : _cur_subValues1[k];
296
+ if (!v) {
297
+ continue;
298
+ }
299
+ paths.push(_renderStackedSegment(cur, v, i, k, geometryParams));
300
+ }
301
+ }
302
+ return paths;
303
+ }
304
+ function _renderLegends() {
305
+ if (props.hideLegend) {
306
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null);
307
+ }
308
+ let legends;
309
+ if (isStacked) {
310
+ // Collect unique categories and their color
311
+ const categoryMap = {};
312
+ props.data.forEach((stage)=>{
313
+ (stage.subValues || []).forEach((sub)=>{
314
+ if (!(sub.category in categoryMap)) {
315
+ categoryMap[sub.category] = sub.color;
316
+ }
317
+ });
318
+ });
319
+ legends = Object.entries(categoryMap).map(([category, color])=>({
320
+ title: category,
321
+ color,
322
+ hoverAction: ()=>setHoveredStage(category),
323
+ onMouseOutAction: ()=>setHoveredStage(null)
324
+ }));
325
+ } else {
326
+ legends = props.data.map((d)=>({
327
+ title: d.stage,
328
+ color: d.color,
329
+ hoverAction: ()=>setHoveredStage(d.stage),
330
+ onMouseOutAction: ()=>setHoveredStage(null)
331
+ }));
332
+ }
333
+ return /*#__PURE__*/ _react.createElement("div", {
334
+ style: {
335
+ display: 'flex',
336
+ justifyContent: 'center'
337
+ }
338
+ }, /*#__PURE__*/ _react.createElement(_index1.Legends, {
339
+ legends: legends,
340
+ centerLegends: true,
341
+ onChange: _onLegendSelectionChangeCallback,
342
+ ...props.legendProps,
343
+ legendRef: _legendsRef
344
+ }));
345
+ }
346
+ function _isChartEmpty() {
347
+ return !(props.data && props.data.length > 0);
348
+ }
349
+ function updatePosition(newX, newY) {
350
+ const threshold = 1; // Set a threshold for movement
351
+ const { x, y } = clickPosition;
352
+ // Calculate the distance moved
353
+ const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
354
+ // Update the position only if the distance moved is greater than the threshold
355
+ if (distance > threshold) {
356
+ setClickPosition({
357
+ x: newX,
358
+ y: newY
359
+ });
360
+ setPopoverOpen(true);
361
+ }
362
+ }
363
+ const classes = (0, _useFunnelChartStylesstyles.useFunnelChartStyles)(props);
364
+ const calloutProps = {
365
+ ...props.calloutProps,
366
+ color: calloutData === null || calloutData === void 0 ? void 0 : calloutData.color,
367
+ hoverXValue: calloutData === null || calloutData === void 0 ? void 0 : calloutData.stage,
368
+ YValue: calloutData === null || calloutData === void 0 ? void 0 : calloutData.value
369
+ };
370
+ const width = props.width || 350;
371
+ const height = props.height || 500;
372
+ const funnelMarginTop = 40;
373
+ const funnelWidth = width * 0.8;
374
+ const funnelOffsetX = (width - funnelWidth) / 2;
375
+ const focusAttributes = (0, _reacttabster.useFocusableGroup)();
376
+ var _props_culture;
377
+ return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement("div", {
378
+ ref: chartContainerRef,
379
+ className: classes.root,
380
+ ...focusAttributes
381
+ }, /*#__PURE__*/ _react.createElement("svg", {
382
+ width: width,
383
+ height: height,
384
+ className: classes.chart,
385
+ role: 'img',
386
+ "aria-label": props.chartTitle
387
+ }, /*#__PURE__*/ _react.createElement("g", {
388
+ transform: isRTL ? `translate(${funnelOffsetX + funnelWidth}, ${funnelMarginTop}) scale(-1,1)` : `translate(${funnelOffsetX}, ${funnelMarginTop})`
389
+ }, isStacked ? _createStackedFunnel(height - funnelMarginTop, funnelWidth) : _createFunnel(height - funnelMarginTop, funnelWidth))), isPopoverOpen && /*#__PURE__*/ _react.createElement(_ChartPopover.ChartPopover, {
390
+ ...props.calloutProps,
391
+ XValue: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.hoverXValue,
392
+ yCalloutValue: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.YValue,
393
+ culture: (_props_culture = props.culture) !== null && _props_culture !== void 0 ? _props_culture : 'en-us',
394
+ clickPosition: clickPosition,
395
+ isPopoverOpen: isPopoverOpen,
396
+ color: calloutProps === null || calloutProps === void 0 ? void 0 : calloutProps.color,
397
+ isCartesian: false
398
+ }), _renderLegends()) : /*#__PURE__*/ _react.createElement("div", {
399
+ id: _emptyChartId,
400
+ role: 'alert',
401
+ style: {
402
+ opacity: '0'
403
+ },
404
+ "aria-label": 'Graph has no data to display'
405
+ });
406
+ });
407
+ FunnelChart.displayName = 'FunnelChart';
408
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
409
+ FunnelChart.defaultProps = {
410
+ orientation: 'vertical'
411
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/FunnelChart/FunnelChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId } from '@fluentui/react-utilities';\nimport { useRtl } from '../../utilities/index';\nimport { FunnelChartDataPoint, FunnelChartProps } from './FunnelChart.types';\nimport { Legend, Legends, LegendContainer } from '../Legends/index';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { getContrastTextColor } from '../../utilities/colors';\nimport { useFunnelChartStyles } from './useFunnelChartStyles.styles';\nimport {\n getHorizontalFunnelSegmentGeometry,\n getVerticalFunnelSegmentGeometry,\n getSegmentTextProps,\n getStackedHorizontalFunnelSegmentGeometry,\n getStackedVerticalFunnelSegmentGeometry,\n} from './funnelGeometry';\nimport { ChartPopoverProps, ImageExportOptions } from '../../index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nexport const FunnelChart: React.FunctionComponent<FunnelChartProps> = React.forwardRef<\n HTMLDivElement,\n FunnelChartProps\n>((props, forwardedRef) => {\n const _emptyChartId: string = useId('_FunnelChart_empty');\n const isRTL = useRtl();\n\n const [hoveredStage, setHoveredStage] = React.useState<string | null>(null);\n const [calloutData, setCalloutData] = React.useState<FunnelChartDataPoint | null>(null);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>([]);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const chartContainerRef = React.useRef<HTMLDivElement | null>(null);\n const isStacked = isStackedFunnelData(props.data);\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n React.useEffect(() => {\n if (props.legendProps?.selectedLegends) {\n setSelectedLegends(props.legendProps.selectedLegends);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(chartContainerRef.current, _legendsRef.current?.toSVG, isRTL, opts);\n },\n }),\n [],\n );\n\n function _handleHover(data: FunnelChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent?.persist();\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setCalloutData(data);\n setPopoverOpen(true);\n }\n\n function _handleFocus(data: FunnelChartDataPoint, focusEvent: React.FocusEvent<SVGPathElement>) {\n focusEvent?.persist();\n let x = 0;\n let y = 0;\n const targetRect = (focusEvent.target as SVGPathElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n\n updatePosition(x, y);\n setCalloutData(data);\n setPopoverOpen(true);\n }\n\n function _handleStackedHover(\n stage: string,\n subValue: { category: string; value: number; color: string },\n mouseEvent: React.MouseEvent<SVGElement>,\n ) {\n mouseEvent?.persist();\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setCalloutData({\n stage,\n value: subValue.value,\n color: subValue.color,\n category: subValue.category,\n } as FunnelChartDataPoint);\n setPopoverOpen(true);\n }\n\n function _handleStackedFocus(\n stage: string,\n subValue: { category: string; value: number; color: string },\n focusEvent: React.FocusEvent<SVGPathElement>,\n ) {\n focusEvent?.persist();\n let x = 0;\n let y = 0;\n const targetRect = (focusEvent.target as SVGPathElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n\n updatePosition(x, y);\n setCalloutData({\n stage,\n value: subValue.value,\n color: subValue.color,\n category: subValue.category,\n } as FunnelChartDataPoint);\n setPopoverOpen(true);\n }\n\n function _handleMouseOut() {\n setHoveredStage(null);\n setPopoverOpen(false);\n setCalloutData(null);\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n const _onLegendSelectionChangeCallback = React.useCallback(_onLegendSelectionChange, [props.legendProps]);\n\n function getHighlightedLegend(): string[] {\n return selectedLegends.length > 0 ? selectedLegends : hoveredStage ? [hoveredStage] : [];\n }\n\n function legendHighlighted(legend: string): boolean {\n return getHighlightedLegend().includes(legend);\n }\n\n function noLegendHighlighted(): boolean {\n return getHighlightedLegend().length === 0;\n }\n\n function _getEventHandlerProps(\n data: FunnelChartDataPoint | { stage: string; subValue: { category: string; value: number; color: string } },\n opacity?: number,\n ) {\n if ('subValue' in data) {\n return {\n culture: props.culture,\n onMouseOver:\n opacity == 1\n ? (event: React.MouseEvent<SVGElement>) => _handleStackedHover(data.stage, data.subValue, event)\n : undefined,\n onMouseMove:\n opacity == 1\n ? (event: React.MouseEvent<SVGElement>) => _handleStackedHover(data.stage, data.subValue, event)\n : undefined,\n onFocus: (event: React.FocusEvent<SVGPathElement>) => _handleStackedFocus(data.stage, data.subValue, event),\n onBlur: () => _handleMouseOut(),\n onMouseOut: () => _handleMouseOut(),\n };\n } else {\n return {\n culture: props.culture,\n onMouseOver: opacity == 1 ? (event: React.MouseEvent<SVGElement>) => _handleHover(data, event) : undefined,\n onMouseMove: opacity == 1 ? (event: React.MouseEvent<SVGElement>) => _handleHover(data, event) : undefined,\n onFocus: (event: React.FocusEvent<SVGPathElement>) => _handleFocus(data, event),\n onBlur: () => _handleMouseOut(),\n onMouseOut: () => _handleMouseOut(),\n };\n }\n }\n\n function _renderSegmentText({\n show,\n x,\n y,\n value,\n textColor,\n }: {\n show: boolean;\n x: number;\n y: number;\n value: number;\n textColor: string;\n }) {\n if (!show) {\n return null;\n }\n\n const textElement = (\n <text x={isRTL ? funnelWidth - x : x} y={y} textAnchor=\"middle\" alignmentBaseline=\"middle\" fill={textColor}>\n {formatToLocaleString(value.toString(), props.culture) as React.ReactNode}\n </text>\n );\n\n if (isRTL) {\n return <g transform={`scale(-1,1) translate(${-funnelWidth},0)`}>{textElement}</g>;\n }\n return textElement;\n }\n\n function _renderFunnelSegment({\n key,\n pathD,\n fill,\n opacity,\n textProps,\n data,\n tabIndex,\n }: {\n key: string | number;\n pathD: string;\n fill: string;\n opacity: number;\n textProps?: {\n show: boolean;\n x: number;\n y: number;\n value: number;\n };\n data: FunnelChartDataPoint | { stage: string; subValue: { category: string; value: number; color: string } };\n tabIndex?: number;\n }) {\n const eventHandlers = _getEventHandlerProps(data, opacity);\n const textColor = getContrastTextColor(fill);\n\n return (\n <g key={key}>\n <path d={pathD} fill={fill} opacity={opacity} {...eventHandlers} tabIndex={tabIndex} />\n {textProps && <g {...eventHandlers}>{_renderSegmentText({ ...textProps, textColor })}</g>}\n </g>\n );\n }\n\n function _createFunnel(\n containerHeight: number,\n containerWidth: number,\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[] {\n const { data } = props;\n const funnelWidth = containerWidth;\n const funnelHeight = containerHeight * 0.8;\n\n return data.map((d, i) => {\n const geometryProps =\n props.orientation === 'vertical'\n ? getVerticalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL })\n : getHorizontalFunnelSegmentGeometry({ d, i, data, funnelWidth, funnelHeight, isRTL });\n\n const { pathD, textX, textY, availableWidth } = geometryProps;\n const minTextWidth = 16;\n const eventHandlerProps = _getEventHandlerProps(d);\n const textProps = getSegmentTextProps({\n availableWidth,\n minTextWidth,\n textX,\n textY,\n value: d.value!,\n ...eventHandlerProps,\n });\n\n return _renderFunnelSegment({\n key: i,\n pathD,\n fill: d.color!,\n opacity: legendHighlighted(d.stage as string) || noLegendHighlighted() ? 1 : 0.1,\n textProps,\n data: d,\n tabIndex: legendHighlighted(d.stage as string) || noLegendHighlighted() ? 0 : undefined,\n });\n });\n }\n\n function isStackedFunnelData(data: FunnelChartDataPoint[]): boolean {\n return Array.isArray(data) && data.every(stage => Array.isArray(stage.subValues));\n }\n\n function _renderStackedSegment(\n stage: FunnelChartDataPoint,\n subValue: { value: number; color: string; category: string },\n stageIndex: number,\n subValueIndex: number,\n geometryParams: {\n stages: FunnelChartDataPoint[];\n totals: number[];\n maxTotal: number;\n funnelWidth: number;\n funnelHeight: number;\n isRTL: boolean;\n },\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element {\n // Ensure stages have subValues for geometry functions\n const stagesWithSubValues = geometryParams.stages.map(s => ({\n ...s,\n subValues: s.subValues || [],\n }));\n const geom =\n props.orientation === 'vertical'\n ? getStackedVerticalFunnelSegmentGeometry({\n ...geometryParams,\n stages: stagesWithSubValues,\n i: stageIndex,\n k: subValueIndex,\n })\n : getStackedHorizontalFunnelSegmentGeometry({\n ...geometryParams,\n stages: stagesWithSubValues,\n i: stageIndex,\n k: subValueIndex,\n });\n\n const minTextWidth = 16;\n const eventHandlerProps = _getEventHandlerProps({ stage: stage.stage as string, subValue });\n const textProps = getSegmentTextProps({\n availableWidth: geom.availableWidth,\n minTextWidth,\n textX: geom.textX,\n textY: geom.textY,\n value: subValue.value,\n ...eventHandlerProps,\n });\n\n return _renderFunnelSegment({\n key: `${stageIndex}-${subValueIndex}`,\n pathD: geom.pathD,\n fill: subValue.color,\n opacity:\n (isStackedFunnelData(props.data) && legendHighlighted(subValue.category)) || noLegendHighlighted() ? 1 : 0.1,\n textProps,\n data: { stage: stage.stage as string, subValue },\n tabIndex: legendHighlighted(subValue.category) || noLegendHighlighted() ? 0 : undefined,\n });\n }\n\n function _createStackedFunnel(\n containerHeight: number,\n containerWidth: number,\n ): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[] {\n const { data } = props;\n\n const stages = data;\n const totals = stages.map(s => s?.subValues?.reduce((sum, subValue) => sum + subValue.value, 0) ?? 0);\n const maxTotal = Math.max(...totals);\n\n const funnelWidth = containerWidth;\n const funnelHeight = containerHeight * 0.8;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const paths: JSX.Element[] = [];\n\n const geometryParams = {\n stages,\n totals,\n maxTotal,\n funnelWidth,\n funnelHeight,\n isRTL,\n };\n\n for (let i = 0; i < stages.length; i++) {\n const cur = stages[i];\n for (let k = 0; k < (cur.subValues ?? []).length; k++) {\n const v = cur.subValues?.[k];\n if (!v) {\n continue;\n }\n paths.push(_renderStackedSegment(cur, v, i, k, geometryParams));\n }\n }\n return paths;\n }\n\n function _renderLegends(): // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n let legends: Legend[];\n\n if (isStacked) {\n // Collect unique categories and their color\n const categoryMap: Record<string, string> = {};\n props.data.forEach((stage: FunnelChartDataPoint) => {\n (stage.subValues || []).forEach(sub => {\n if (!(sub.category in categoryMap)) {\n categoryMap[sub.category] = sub.color;\n }\n });\n });\n legends = Object.entries(categoryMap).map(([category, color]) => ({\n title: category,\n color,\n hoverAction: () => setHoveredStage(category),\n onMouseOutAction: () => setHoveredStage(null),\n }));\n } else {\n legends = props.data.map((d: FunnelChartDataPoint) => ({\n title: d.stage as string,\n color: d.color!,\n hoverAction: () => setHoveredStage(d.stage as string),\n onMouseOutAction: () => setHoveredStage(null),\n }));\n }\n\n return (\n <div style={{ display: 'flex', justifyContent: 'center' }}>\n <Legends\n legends={legends}\n centerLegends={true}\n onChange={_onLegendSelectionChangeCallback}\n {...props.legendProps}\n legendRef={_legendsRef}\n />\n </div>\n );\n }\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n const classes = useFunnelChartStyles(props);\n\n const calloutProps: ChartPopoverProps = {\n ...props.calloutProps,\n color: calloutData?.color,\n hoverXValue: calloutData?.stage,\n YValue: calloutData?.value,\n };\n\n const width = props.width || 350;\n const height = props.height || 500;\n\n const funnelMarginTop = 40;\n const funnelWidth = width * 0.8;\n const funnelOffsetX = (width - funnelWidth) / 2;\n const focusAttributes = useFocusableGroup();\n\n return !_isChartEmpty() ? (\n <div ref={chartContainerRef} className={classes.root} {...focusAttributes}>\n <svg width={width} height={height} className={classes.chart} role={'img'} aria-label={props.chartTitle}>\n <g\n transform={\n isRTL\n ? `translate(${funnelOffsetX + funnelWidth}, ${funnelMarginTop}) scale(-1,1)`\n : `translate(${funnelOffsetX}, ${funnelMarginTop})`\n }\n >\n {isStacked\n ? _createStackedFunnel(height - funnelMarginTop, funnelWidth)\n : _createFunnel(height - funnelMarginTop, funnelWidth)}\n </g>\n </svg>\n {isPopoverOpen && (\n <ChartPopover\n {...props.calloutProps}\n XValue={calloutProps?.hoverXValue as string}\n yCalloutValue={calloutProps?.YValue as string}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n color={calloutProps?.color}\n isCartesian={false}\n />\n )}\n {_renderLegends()}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nFunnelChart.displayName = 'FunnelChart';\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nFunnelChart.defaultProps = {\n orientation: 'vertical',\n};\n"],"names":["React","useId","useRtl","Legends","useFocusableGroup","ChartPopover","formatToLocaleString","getContrastTextColor","useFunnelChartStyles","getHorizontalFunnelSegmentGeometry","getVerticalFunnelSegmentGeometry","getSegmentTextProps","getStackedHorizontalFunnelSegmentGeometry","getStackedVerticalFunnelSegmentGeometry","toImage","FunnelChart","forwardRef","props","forwardedRef","_emptyChartId","isRTL","hoveredStage","setHoveredStage","useState","calloutData","setCalloutData","selectedLegends","setSelectedLegends","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","chartContainerRef","useRef","isStacked","isStackedFunnelData","data","_legendsRef","useEffect","legendProps","useImperativeHandle","componentRef","opts","current","toSVG","_handleHover","mouseEvent","persist","updatePosition","clientX","clientY","_handleFocus","focusEvent","targetRect","target","getBoundingClientRect","left","width","top","height","_handleStackedHover","stage","subValue","value","color","category","_handleStackedFocus","_handleMouseOut","_onLegendSelectionChange","legendsSelected","event","currentLegend","canSelectMultipleLegends","slice","onChange","_onLegendSelectionChangeCallback","useCallback","getHighlightedLegend","length","legendHighlighted","legend","includes","noLegendHighlighted","_getEventHandlerProps","opacity","culture","onMouseOver","undefined","onMouseMove","onFocus","onBlur","onMouseOut","_renderSegmentText","show","textColor","textElement","text","funnelWidth","textAnchor","alignmentBaseline","fill","toString","g","transform","_renderFunnelSegment","key","pathD","textProps","tabIndex","eventHandlers","path","d","_createFunnel","containerHeight","containerWidth","funnelHeight","map","i","geometryProps","orientation","textX","textY","availableWidth","minTextWidth","eventHandlerProps","Array","isArray","every","subValues","_renderStackedSegment","stageIndex","subValueIndex","geometryParams","stagesWithSubValues","stages","s","geom","k","_createStackedFunnel","totals","reduce","sum","maxTotal","Math","max","paths","cur","v","push","_renderLegends","hideLegend","legends","categoryMap","forEach","sub","Object","entries","title","hoverAction","onMouseOutAction","div","style","display","justifyContent","centerLegends","legendRef","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","classes","calloutProps","hoverXValue","YValue","funnelMarginTop","funnelOffsetX","focusAttributes","ref","className","root","svg","chart","role","aria-label","chartTitle","XValue","yCalloutValue","isCartesian","id","displayName","defaultProps"],"mappings":";;;;+BAoBae;;;;;;;iEApBU,QAAQ;gCACT,4BAA4B;uBAC3B,wBAAwB;wBAEE,mBAAmB;8BAClC,0BAA0B;8BAC/B,mCAAmC;gCAC3B,4BAA4B;wBAC5B,yBAAyB;4CACzB,gCAAgC;gCAO9D,mBAAmB;kCAEF,qCAAqC;AAEtD,oBAAMA,WAAAA,GAAyDf,OAAMgB,UAAU,CAGpF,CAACC,OAAOC;QAiBJD;IAhBJ,MAAME,oBAAwBlB,qBAAAA,EAAM;IACpC,MAAMmB,QAAQlB,iBAAAA;IAEd,MAAM,CAACmB,cAAcC,gBAAgB,GAAGtB,OAAMuB,QAAQ,CAAgB;IACtE,MAAM,CAACC,aAAaC,eAAe,GAAGzB,OAAMuB,QAAQ,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D/I,YACGwG,qBAAqB/E,SAASsH,iBAAiBhF,eAC/Ce,cAAcrD,SAASsH,iBAAiBhF,gBAG/CnE,iBAAAA,WAAAA,GACC,OAAA,aAAA,CAAC3B,0BAAAA,EAAAA;QACE,GAAGY,MAAM+J,YAAY;QACtBc,MAAM,EAAEd,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAcC,WAAW;QACjCc,aAAa,EAAEf,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAcE,MAAM;QACnC3F,SAAStE,kBAAAA,MAAMsE,OAAAA,AAAO,MAAA,QAAbtE,mBAAAA,KAAAA,IAAAA,iBAAiB;QAC1BW,eAAeA;QACfI,eAAeA;QACfkC,KAAK,EAAE8G,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,aAAc9G,KAAK;QAC1B8H,aAAa;QAGhBzC,oBAAAA,WAAAA,GAGH,OAAA,aAAA,CAACW,OAAAA;QAAI+B,IAAI9K;QAAewK,MAAM;QAASxB,OAAO;YAAE7E,SAAS;QAAI;QAAGsG,cAAY;;AAEhF,GAAG;AACH7K,YAAYmL,WAAW,GAAG;AAC1B,4DAA4D;AAC5DnL,YAAYoL,YAAY,GAAG;IACzB1E,aAAa;AACf"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));