@fluentui/react-charts 9.3.22 → 9.3.24

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 (755) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/dist/index.d.cts +5724 -0
  3. package/lib/AnnotationOnlyChart.js +1 -1
  4. package/lib/AnnotationOnlyChart.js.map +1 -1
  5. package/lib/AreaChart.js +1 -1
  6. package/lib/AreaChart.js.map +1 -1
  7. package/lib/CartesianChart.js +1 -1
  8. package/lib/CartesianChart.js.map +1 -1
  9. package/lib/ChartTable.js +1 -1
  10. package/lib/ChartTable.js.map +1 -1
  11. package/lib/DeclarativeChart.js +1 -1
  12. package/lib/DeclarativeChart.js.map +1 -1
  13. package/lib/DonutChart.js +1 -1
  14. package/lib/DonutChart.js.map +1 -1
  15. package/lib/FunnelChart.js +1 -1
  16. package/lib/FunnelChart.js.map +1 -1
  17. package/lib/GanttChart.js +1 -1
  18. package/lib/GanttChart.js.map +1 -1
  19. package/lib/GaugeChart.js +1 -1
  20. package/lib/GaugeChart.js.map +1 -1
  21. package/lib/GroupedVerticalBarChart.js +1 -1
  22. package/lib/GroupedVerticalBarChart.js.map +1 -1
  23. package/lib/HeatMapChart.js +1 -1
  24. package/lib/HeatMapChart.js.map +1 -1
  25. package/lib/HorizontalBarChart.js +1 -1
  26. package/lib/HorizontalBarChart.js.map +1 -1
  27. package/lib/HorizontalBarChartWithAxis.js +1 -1
  28. package/lib/HorizontalBarChartWithAxis.js.map +1 -1
  29. package/lib/Legends.js +1 -1
  30. package/lib/Legends.js.map +1 -1
  31. package/lib/LineChart.js +1 -1
  32. package/lib/LineChart.js.map +1 -1
  33. package/lib/PolarChart.js +1 -1
  34. package/lib/PolarChart.js.map +1 -1
  35. package/lib/Popover.js +1 -1
  36. package/lib/Popover.js.map +1 -1
  37. package/lib/ResponsiveContainer.js +1 -1
  38. package/lib/ResponsiveContainer.js.map +1 -1
  39. package/lib/SankeyChart.js +1 -1
  40. package/lib/SankeyChart.js.map +1 -1
  41. package/lib/ScatterChart.js +1 -1
  42. package/lib/ScatterChart.js.map +1 -1
  43. package/lib/Sparkline.js +1 -1
  44. package/lib/Sparkline.js.map +1 -1
  45. package/lib/VegaDeclarativeChart.js +1 -1
  46. package/lib/VegaDeclarativeChart.js.map +1 -1
  47. package/lib/VerticalBarChart.js +1 -1
  48. package/lib/VerticalBarChart.js.map +1 -1
  49. package/lib/VerticalStackedBarChart.js +1 -1
  50. package/lib/VerticalStackedBarChart.js.map +1 -1
  51. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +5 -5
  52. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  53. package/lib/components/AnnotationOnlyChart/index.js +2 -2
  54. package/lib/components/AnnotationOnlyChart/index.js.map +1 -1
  55. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +2 -2
  56. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -1
  57. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +2 -2
  58. package/lib/components/AreaChart/AreaChart.js +11 -11
  59. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  60. package/lib/components/AreaChart/index.js +3 -3
  61. package/lib/components/AreaChart/index.js.map +1 -1
  62. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -2
  63. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  64. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +2 -2
  65. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  66. package/lib/components/ChartTable/ChartTable.js +9 -9
  67. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  68. package/lib/components/ChartTable/index.js +3 -3
  69. package/lib/components/ChartTable/index.js.map +1 -1
  70. package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
  71. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  72. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -3
  73. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  74. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +5 -5
  75. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  76. package/lib/components/CommonComponents/Annotations/index.js +2 -2
  77. package/lib/components/CommonComponents/Annotations/index.js.map +1 -1
  78. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +3 -3
  79. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  80. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +3 -3
  81. package/lib/components/CommonComponents/CartesianChart.js +9 -9
  82. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  83. package/lib/components/CommonComponents/ChartPopover.js +9 -9
  84. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  85. package/lib/components/CommonComponents/index.js +6 -6
  86. package/lib/components/CommonComponents/index.js.map +1 -1
  87. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +4 -4
  88. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  89. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -4
  90. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  91. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -2
  92. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  93. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -2
  94. package/lib/components/DeclarativeChart/DeclarativeChart.js +28 -28
  95. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  96. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +5 -5
  97. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  98. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +9 -9
  99. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  100. package/lib/components/DeclarativeChart/index.js +1 -1
  101. package/lib/components/DeclarativeChart/index.js.map +1 -1
  102. package/lib/components/DonutChart/Arc/Arc.js +8 -7
  103. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  104. package/lib/components/DonutChart/Arc/index.js +2 -2
  105. package/lib/components/DonutChart/Arc/index.js.map +1 -1
  106. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +3 -3
  107. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  108. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +3 -3
  109. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  110. package/lib/components/DonutChart/DonutChart.js +10 -10
  111. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  112. package/lib/components/DonutChart/Pie/Pie.js +8 -6
  113. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  114. package/lib/components/DonutChart/Pie/index.js +2 -2
  115. package/lib/components/DonutChart/Pie/index.js.map +1 -1
  116. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -2
  117. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  118. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +2 -2
  119. package/lib/components/DonutChart/index.js +3 -3
  120. package/lib/components/DonutChart/index.js.map +1 -1
  121. package/lib/components/DonutChart/useDonutChartStyles.styles.js +3 -3
  122. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  123. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +3 -3
  124. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  125. package/lib/components/FunnelChart/FunnelChart.js +25 -14
  126. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  127. package/lib/components/FunnelChart/index.js +2 -2
  128. package/lib/components/FunnelChart/index.js.map +1 -1
  129. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +3 -3
  130. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  131. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +3 -3
  132. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  133. package/lib/components/GanttChart/GanttChart.js +14 -11
  134. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  135. package/lib/components/GanttChart/index.js +2 -2
  136. package/lib/components/GanttChart/index.js.map +1 -1
  137. package/lib/components/GaugeChart/GaugeChart.js +17 -14
  138. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  139. package/lib/components/GaugeChart/index.js +3 -3
  140. package/lib/components/GaugeChart/index.js.map +1 -1
  141. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +3 -3
  142. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  143. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +3 -3
  144. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  145. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +11 -11
  146. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  147. package/lib/components/GroupedVerticalBarChart/index.js +3 -3
  148. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -1
  149. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -2
  150. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  151. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +2 -2
  152. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  153. package/lib/components/HeatMapChart/HeatMapChart.js +21 -16
  154. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  155. package/lib/components/HeatMapChart/index.js +3 -3
  156. package/lib/components/HeatMapChart/index.js.map +1 -1
  157. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -2
  158. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  159. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +2 -2
  160. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +11 -11
  161. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  162. package/lib/components/HorizontalBarChart/index.js +3 -3
  163. package/lib/components/HorizontalBarChart/index.js.map +1 -1
  164. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +6 -6
  165. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  166. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -5
  167. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  168. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +13 -13
  169. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  170. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -3
  171. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -1
  172. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -3
  173. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  174. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -3
  175. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  176. package/lib/components/Legends/Legends.js +72 -42
  177. package/lib/components/Legends/Legends.js.map +1 -1
  178. package/lib/components/Legends/OverflowMenu.js +50 -12
  179. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  180. package/lib/components/Legends/index.js +3 -3
  181. package/lib/components/Legends/index.js.map +1 -1
  182. package/lib/components/Legends/shape.js +2 -2
  183. package/lib/components/Legends/shape.js.map +1 -1
  184. package/lib/components/Legends/useLegendsStyles.styles.js +3 -3
  185. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  186. package/lib/components/Legends/useLegendsStyles.styles.raw.js +3 -3
  187. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  188. package/lib/components/LineChart/LineChart.js +16 -16
  189. package/lib/components/LineChart/LineChart.js.map +1 -1
  190. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +5 -5
  191. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  192. package/lib/components/LineChart/eventAnnotation/LabelLink.js +4 -4
  193. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  194. package/lib/components/LineChart/eventAnnotation/Textbox.js +3 -3
  195. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  196. package/lib/components/LineChart/index.js +4 -4
  197. package/lib/components/LineChart/index.js.map +1 -1
  198. package/lib/components/LineChart/useLineChartStyles.styles.js +4 -4
  199. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  200. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +4 -4
  201. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  202. package/lib/components/PolarChart/PolarChart.js +13 -13
  203. package/lib/components/PolarChart/PolarChart.js.map +1 -1
  204. package/lib/components/PolarChart/PolarChart.utils.js +6 -6
  205. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -1
  206. package/lib/components/PolarChart/index.js +2 -2
  207. package/lib/components/PolarChart/index.js.map +1 -1
  208. package/lib/components/PolarChart/usePolarChartStyles.styles.js +2 -2
  209. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +1 -1
  210. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +2 -2
  211. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +4 -4
  212. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  213. package/lib/components/ResponsiveContainer/index.js +3 -3
  214. package/lib/components/ResponsiveContainer/index.js.map +1 -1
  215. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -1
  216. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  217. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -1
  218. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +2 -2
  219. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  220. package/lib/components/SankeyChart/SankeyChart.js +27 -21
  221. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  222. package/lib/components/SankeyChart/index.js +3 -3
  223. package/lib/components/SankeyChart/index.js.map +1 -1
  224. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +3 -3
  225. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  226. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +3 -3
  227. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  228. package/lib/components/ScatterChart/ScatterChart.js +16 -16
  229. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  230. package/lib/components/ScatterChart/index.js +3 -3
  231. package/lib/components/ScatterChart/index.js.map +1 -1
  232. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +2 -2
  233. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  234. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +2 -2
  235. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  236. package/lib/components/Sparkline/Sparkline.js +7 -7
  237. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  238. package/lib/components/Sparkline/index.js +3 -3
  239. package/lib/components/Sparkline/index.js.map +1 -1
  240. package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -2
  241. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  242. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +2 -2
  243. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +15 -15
  244. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +1 -1
  245. package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +4 -4
  246. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +2 -2
  247. package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +1 -1
  248. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +5 -5
  249. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  250. package/lib/components/VegaDeclarativeChart/index.js +1 -1
  251. package/lib/components/VegaDeclarativeChart/index.js.map +1 -1
  252. package/lib/components/VerticalBarChart/VerticalBarChart.js +16 -13
  253. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  254. package/lib/components/VerticalBarChart/index.js +3 -3
  255. package/lib/components/VerticalBarChart/index.js.map +1 -1
  256. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +4 -4
  257. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  258. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +4 -4
  259. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  260. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +11 -11
  261. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  262. package/lib/components/VerticalStackedBarChart/index.js +3 -3
  263. package/lib/components/VerticalStackedBarChart/index.js.map +1 -1
  264. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -2
  265. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  266. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +2 -2
  267. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  268. package/lib/index.js +26 -26
  269. package/lib/index.js.map +1 -1
  270. package/lib/types/index.js +3 -3
  271. package/lib/types/index.js.map +1 -1
  272. package/lib/utilities/ChartTitle.js +4 -4
  273. package/lib/utilities/ChartTitle.js.map +1 -1
  274. package/lib/utilities/Common.styles.js +2 -2
  275. package/lib/utilities/Common.styles.js.map +1 -1
  276. package/lib/utilities/Common.styles.raw.js +2 -2
  277. package/lib/utilities/Common.styles.raw.js.map +1 -1
  278. package/lib/utilities/FocusableTooltipText.js +6 -6
  279. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  280. package/lib/utilities/SVGTooltipText.js +7 -7
  281. package/lib/utilities/SVGTooltipText.js.map +1 -1
  282. package/lib/utilities/async-utils.js +1 -1
  283. package/lib/utilities/async-utils.js.map +1 -1
  284. package/lib/utilities/colors.js +2 -2
  285. package/lib/utilities/getWindow.js +1 -1
  286. package/lib/utilities/hooks.js +3 -3
  287. package/lib/utilities/hooks.js.map +1 -1
  288. package/lib/utilities/image-export-utils.js +4 -4
  289. package/lib/utilities/image-export-utils.js.map +1 -1
  290. package/lib/utilities/index.js +5 -5
  291. package/lib/utilities/index.js.map +1 -1
  292. package/lib/utilities/scatterpolar-utils.js +1 -1
  293. package/lib/utilities/test-data.js +1 -1
  294. package/lib/utilities/test-data.js.map +1 -1
  295. package/lib/utilities/utilities.js +13 -13
  296. package/lib/utilities/utilities.js.map +1 -1
  297. package/lib-commonjs/AnnotationOnlyChart.cjs +6 -0
  298. package/lib-commonjs/{AnnotationOnlyChart.js.map → AnnotationOnlyChart.cjs.map} +1 -1
  299. package/lib-commonjs/{DonutChart.js → AreaChart.cjs} +1 -1
  300. package/lib-commonjs/{AreaChart.js.map → AreaChart.cjs.map} +1 -1
  301. package/lib-commonjs/{AnnotationOnlyChart.js → CartesianChart.cjs} +1 -1
  302. package/lib-commonjs/{CartesianChart.js.map → CartesianChart.cjs.map} +1 -1
  303. package/lib-commonjs/{VegaDeclarativeChart.js → ChartTable.cjs} +1 -1
  304. package/lib-commonjs/{ChartTable.js.map → ChartTable.cjs.map} +1 -1
  305. package/lib-commonjs/DeclarativeChart.cjs +6 -0
  306. package/lib-commonjs/{DeclarativeChart.js.map → DeclarativeChart.cjs.map} +1 -1
  307. package/lib-commonjs/{ChartTable.js → DonutChart.cjs} +1 -1
  308. package/lib-commonjs/{DonutChart.js.map → DonutChart.cjs.map} +1 -1
  309. package/lib-commonjs/FunnelChart.cjs +6 -0
  310. package/lib-commonjs/{FunnelChart.js.map → FunnelChart.cjs.map} +1 -1
  311. package/lib-commonjs/GanttChart.cjs +6 -0
  312. package/lib-commonjs/{GanttChart.js.map → GanttChart.cjs.map} +1 -1
  313. package/lib-commonjs/GaugeChart.cjs +6 -0
  314. package/lib-commonjs/{GaugeChart.js.map → GaugeChart.cjs.map} +1 -1
  315. package/lib-commonjs/{GroupedVerticalBarChart.js → GroupedVerticalBarChart.cjs} +1 -1
  316. package/lib-commonjs/{GroupedVerticalBarChart.js.map → GroupedVerticalBarChart.cjs.map} +1 -1
  317. package/lib-commonjs/{DeclarativeChart.js → HeatMapChart.cjs} +1 -1
  318. package/lib-commonjs/{HeatMapChart.js.map → HeatMapChart.cjs.map} +1 -1
  319. package/lib-commonjs/HorizontalBarChart.cjs +6 -0
  320. package/lib-commonjs/{HorizontalBarChart.js.map → HorizontalBarChart.cjs.map} +1 -1
  321. package/lib-commonjs/{HorizontalBarChartWithAxis.js → HorizontalBarChartWithAxis.cjs} +1 -1
  322. package/lib-commonjs/{HorizontalBarChartWithAxis.js.map → HorizontalBarChartWithAxis.cjs.map} +1 -1
  323. package/lib-commonjs/{SankeyChart.js → Legends.cjs} +1 -1
  324. package/lib-commonjs/{Legends.js.map → Legends.cjs.map} +1 -1
  325. package/lib-commonjs/{FunnelChart.js → LineChart.cjs} +1 -1
  326. package/lib-commonjs/{LineChart.js.map → LineChart.cjs.map} +1 -1
  327. package/lib-commonjs/PolarChart.cjs +6 -0
  328. package/lib-commonjs/{PolarChart.js.map → PolarChart.cjs.map} +1 -1
  329. package/lib-commonjs/Popover.cjs +6 -0
  330. package/lib-commonjs/{Popover.js.map → Popover.cjs.map} +1 -1
  331. package/lib-commonjs/ResponsiveContainer.cjs +6 -0
  332. package/lib-commonjs/{ResponsiveContainer.js.map → ResponsiveContainer.cjs.map} +1 -1
  333. package/lib-commonjs/SankeyChart.cjs +6 -0
  334. package/lib-commonjs/{SankeyChart.js.map → SankeyChart.cjs.map} +1 -1
  335. package/lib-commonjs/{CartesianChart.js → ScatterChart.cjs} +1 -1
  336. package/lib-commonjs/{ScatterChart.js.map → ScatterChart.cjs.map} +1 -1
  337. package/lib-commonjs/{AreaChart.js → Sparkline.cjs} +1 -1
  338. package/lib-commonjs/{Sparkline.js.map → Sparkline.cjs.map} +1 -1
  339. package/lib-commonjs/VegaDeclarativeChart.cjs +6 -0
  340. package/lib-commonjs/{VegaDeclarativeChart.js.map → VegaDeclarativeChart.cjs.map} +1 -1
  341. package/lib-commonjs/VerticalBarChart.cjs +6 -0
  342. package/lib-commonjs/{VerticalBarChart.js.map → VerticalBarChart.cjs.map} +1 -1
  343. package/lib-commonjs/{VerticalStackedBarChart.js → VerticalStackedBarChart.cjs} +1 -1
  344. package/lib-commonjs/{VerticalStackedBarChart.js.map → VerticalStackedBarChart.cjs.map} +1 -1
  345. package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.js → AnnotationOnlyChart.cjs} +5 -5
  346. package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.js.map → AnnotationOnlyChart.cjs.map} +1 -1
  347. package/lib-commonjs/{HeatMapChart.js → components/AnnotationOnlyChart/index.cjs} +2 -1
  348. package/lib-commonjs/components/AnnotationOnlyChart/{index.js.map → index.cjs.map} +1 -1
  349. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.cjs.map +1 -0
  350. package/lib-commonjs/components/AreaChart/{AreaChart.js → AreaChart.cjs} +4 -4
  351. package/lib-commonjs/components/AreaChart/{AreaChart.js.map → AreaChart.cjs.map} +1 -1
  352. package/lib-commonjs/components/AreaChart/index.cjs +8 -0
  353. package/lib-commonjs/components/AreaChart/{index.js.map → index.cjs.map} +1 -1
  354. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.cjs.map +1 -0
  355. package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.raw.js → useAreaChartStyles.styles.raw.cjs} +1 -1
  356. package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.raw.js.map → useAreaChartStyles.styles.raw.cjs.map} +1 -1
  357. package/lib-commonjs/components/ChartTable/{ChartTable.js → ChartTable.cjs} +5 -5
  358. package/lib-commonjs/components/ChartTable/{ChartTable.js.map → ChartTable.cjs.map} +1 -1
  359. package/lib-commonjs/components/ChartTable/index.cjs +8 -0
  360. package/lib-commonjs/components/ChartTable/{index.js.map → index.cjs.map} +1 -1
  361. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.cjs.map +1 -0
  362. package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.raw.js → useChartTableStyles.styles.raw.cjs} +1 -1
  363. package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.raw.js.map → useChartTableStyles.styles.raw.cjs.map} +1 -1
  364. package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.js → ChartAnnotationLayer.cjs} +1 -1
  365. package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.js.map → ChartAnnotationLayer.cjs.map} +1 -1
  366. package/lib-commonjs/components/CommonComponents/Annotations/index.cjs +7 -0
  367. package/lib-commonjs/components/CommonComponents/Annotations/{index.js.map → index.cjs.map} +1 -1
  368. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.cjs.map +1 -0
  369. package/lib-commonjs/components/CommonComponents/{CartesianChart.js → CartesianChart.cjs} +5 -5
  370. package/lib-commonjs/components/CommonComponents/{CartesianChart.js.map → CartesianChart.cjs.map} +1 -1
  371. package/lib-commonjs/components/CommonComponents/{ChartPopover.js → ChartPopover.cjs} +3 -3
  372. package/lib-commonjs/components/CommonComponents/{ChartPopover.js.map → ChartPopover.cjs.map} +1 -1
  373. package/lib-commonjs/components/CommonComponents/index.cjs +11 -0
  374. package/lib-commonjs/components/CommonComponents/{index.js.map → index.cjs.map} +1 -1
  375. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.js → useCartesianChartStyles.styles.cjs} +1 -1
  376. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.cjs.map +1 -0
  377. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.raw.js → useCartesianChartStyles.styles.raw.cjs} +2 -2
  378. package/lib-commonjs/components/CommonComponents/{useCartesianChartStyles.styles.raw.js.map → useCartesianChartStyles.styles.raw.cjs.map} +1 -1
  379. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.cjs.map +1 -0
  380. package/lib-commonjs/components/DeclarativeChart/{DeclarativeChart.js → DeclarativeChart.cjs} +21 -21
  381. package/lib-commonjs/components/DeclarativeChart/{DeclarativeChart.js.map → DeclarativeChart.cjs.map} +1 -1
  382. package/lib-commonjs/components/DeclarativeChart/{PlotlyColorAdapter.js → PlotlyColorAdapter.cjs} +2 -2
  383. package/lib-commonjs/components/DeclarativeChart/{PlotlyColorAdapter.js.map → PlotlyColorAdapter.cjs.map} +1 -1
  384. package/lib-commonjs/components/DeclarativeChart/{PlotlySchemaAdapter.js → PlotlySchemaAdapter.cjs} +3 -3
  385. package/lib-commonjs/components/DeclarativeChart/{PlotlySchemaAdapter.js.map → PlotlySchemaAdapter.cjs.map} +1 -1
  386. package/lib-commonjs/components/DeclarativeChart/{index.js → index.cjs} +1 -1
  387. package/lib-commonjs/components/DeclarativeChart/{index.js.map → index.cjs.map} +1 -1
  388. package/lib-commonjs/components/DonutChart/Arc/{Arc.js → Arc.cjs} +5 -4
  389. package/lib-commonjs/components/DonutChart/Arc/Arc.cjs.map +1 -0
  390. package/lib-commonjs/components/DonutChart/Arc/index.cjs +7 -0
  391. package/lib-commonjs/components/DonutChart/Arc/{index.js.map → index.cjs.map} +1 -1
  392. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.cjs.map +1 -0
  393. package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.raw.js → useArcStyles.styles.raw.cjs} +1 -1
  394. package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.raw.js.map → useArcStyles.styles.raw.cjs.map} +1 -1
  395. package/lib-commonjs/components/DonutChart/{DonutChart.js → DonutChart.cjs} +6 -6
  396. package/lib-commonjs/components/DonutChart/{DonutChart.js.map → DonutChart.cjs.map} +1 -1
  397. package/lib-commonjs/components/DonutChart/Pie/{Pie.js → Pie.cjs} +6 -4
  398. package/lib-commonjs/components/DonutChart/Pie/{Pie.js.map → Pie.cjs.map} +1 -1
  399. package/lib-commonjs/components/DonutChart/Pie/index.cjs +7 -0
  400. package/lib-commonjs/components/DonutChart/Pie/{index.js.map → index.cjs.map} +1 -1
  401. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.cjs.map +1 -0
  402. package/lib-commonjs/components/DonutChart/index.cjs +8 -0
  403. package/lib-commonjs/components/DonutChart/{index.js.map → index.cjs.map} +1 -1
  404. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.cjs.map +1 -0
  405. package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.raw.js → useDonutChartStyles.styles.raw.cjs} +1 -1
  406. package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.raw.js.map → useDonutChartStyles.styles.raw.cjs.map} +1 -1
  407. package/lib-commonjs/components/FunnelChart/{FunnelChart.js → FunnelChart.cjs} +21 -10
  408. package/lib-commonjs/components/FunnelChart/FunnelChart.cjs.map +1 -0
  409. package/lib-commonjs/components/FunnelChart/index.cjs +7 -0
  410. package/lib-commonjs/components/FunnelChart/{index.js.map → index.cjs.map} +1 -1
  411. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.cjs.map +1 -0
  412. package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.raw.js → useFunnelChartStyles.styles.raw.cjs} +1 -1
  413. package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.raw.js.map → useFunnelChartStyles.styles.raw.cjs.map} +1 -1
  414. package/lib-commonjs/components/GanttChart/{GanttChart.js → GanttChart.cjs} +10 -7
  415. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -0
  416. package/lib-commonjs/components/GanttChart/index.cjs +7 -0
  417. package/lib-commonjs/components/GanttChart/{index.js.map → index.cjs.map} +1 -1
  418. package/lib-commonjs/components/GaugeChart/{GaugeChart.js → GaugeChart.cjs} +12 -9
  419. package/lib-commonjs/components/GaugeChart/{GaugeChart.js.map → GaugeChart.cjs.map} +1 -1
  420. package/lib-commonjs/components/GaugeChart/index.cjs +8 -0
  421. package/lib-commonjs/components/GaugeChart/{index.js.map → index.cjs.map} +1 -1
  422. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.cjs.map +1 -0
  423. package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.raw.js → useGaugeChartStyles.styles.raw.cjs} +1 -1
  424. package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.raw.js.map → useGaugeChartStyles.styles.raw.cjs.map} +1 -1
  425. package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.js → GroupedVerticalBarChart.cjs} +4 -4
  426. package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.js.map → GroupedVerticalBarChart.cjs.map} +1 -1
  427. package/lib-commonjs/components/GroupedVerticalBarChart/index.cjs +8 -0
  428. package/lib-commonjs/components/GroupedVerticalBarChart/{index.js.map → index.cjs.map} +1 -1
  429. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.cjs.map +1 -0
  430. package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.raw.js → useGroupedVerticalBarChartStyles.styles.raw.cjs} +1 -1
  431. package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.raw.js.map → useGroupedVerticalBarChartStyles.styles.raw.cjs.map} +1 -1
  432. package/lib-commonjs/components/HeatMapChart/{HeatMapChart.js → HeatMapChart.cjs} +13 -8
  433. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -0
  434. package/lib-commonjs/components/HeatMapChart/index.cjs +8 -0
  435. package/lib-commonjs/components/HeatMapChart/{index.js.map → index.cjs.map} +1 -1
  436. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.cjs.map +1 -0
  437. package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.js → HorizontalBarChart.cjs} +6 -6
  438. package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.js.map → HorizontalBarChart.cjs.map} +1 -1
  439. package/lib-commonjs/components/HorizontalBarChart/index.cjs +8 -0
  440. package/lib-commonjs/components/HorizontalBarChart/{index.js.map → index.cjs.map} +1 -1
  441. package/lib-commonjs/components/HorizontalBarChart/{useHorizontalBarChartStyles.styles.js → useHorizontalBarChartStyles.styles.cjs} +5 -5
  442. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.cjs.map +1 -0
  443. package/lib-commonjs/components/HorizontalBarChart/{useHorizontalBarChartStyles.styles.raw.js → useHorizontalBarChartStyles.styles.raw.cjs} +3 -3
  444. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.cjs.map +1 -0
  445. package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.js → HorizontalBarChartWithAxis.cjs} +9 -9
  446. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -0
  447. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.cjs +8 -0
  448. package/lib-commonjs/components/HorizontalBarChartWithAxis/{index.js.map → index.cjs.map} +1 -1
  449. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.cjs.map +1 -0
  450. package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.raw.js → useHorizontalBarChartWithAxisStyles.styles.raw.cjs} +1 -1
  451. package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.raw.js.map → useHorizontalBarChartWithAxisStyles.styles.raw.cjs.map} +1 -1
  452. package/lib-commonjs/components/Legends/{Legends.js → Legends.cjs} +66 -36
  453. package/lib-commonjs/components/Legends/Legends.cjs.map +1 -0
  454. package/lib-commonjs/components/Legends/OverflowMenu.cjs +82 -0
  455. package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -0
  456. package/lib-commonjs/components/Legends/index.cjs +8 -0
  457. package/lib-commonjs/components/Legends/{index.js.map → index.cjs.map} +1 -1
  458. package/lib-commonjs/components/Legends/{shape.js → shape.cjs} +1 -1
  459. package/lib-commonjs/components/Legends/{shape.js.map → shape.cjs.map} +1 -1
  460. package/lib-commonjs/components/Legends/useLegendsStyles.styles.cjs.map +1 -0
  461. package/lib-commonjs/components/Legends/{useLegendsStyles.styles.raw.js → useLegendsStyles.styles.raw.cjs} +1 -1
  462. package/lib-commonjs/components/Legends/{useLegendsStyles.styles.raw.js.map → useLegendsStyles.styles.raw.cjs.map} +1 -1
  463. package/lib-commonjs/components/LineChart/{LineChart.js → LineChart.cjs} +7 -7
  464. package/lib-commonjs/components/LineChart/{LineChart.js.map → LineChart.cjs.map} +1 -1
  465. package/lib-commonjs/components/LineChart/eventAnnotation/{EventAnnotation.js → EventAnnotation.cjs} +3 -3
  466. package/lib-commonjs/components/LineChart/eventAnnotation/{EventAnnotation.js.map → EventAnnotation.cjs.map} +1 -1
  467. package/lib-commonjs/components/LineChart/eventAnnotation/{LabelLink.js → LabelLink.cjs} +2 -2
  468. package/lib-commonjs/components/LineChart/eventAnnotation/{LabelLink.js.map → LabelLink.cjs.map} +1 -1
  469. package/lib-commonjs/components/LineChart/eventAnnotation/{Textbox.js → Textbox.cjs} +1 -1
  470. package/lib-commonjs/components/LineChart/eventAnnotation/{Textbox.js.map → Textbox.cjs.map} +1 -1
  471. package/lib-commonjs/components/LineChart/index.cjs +9 -0
  472. package/lib-commonjs/components/LineChart/{index.js.map → index.cjs.map} +1 -1
  473. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.cjs.map +1 -0
  474. package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.raw.js → useLineChartStyles.styles.raw.cjs} +1 -1
  475. package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.raw.js.map → useLineChartStyles.styles.raw.cjs.map} +1 -1
  476. package/lib-commonjs/components/PolarChart/{PolarChart.js → PolarChart.cjs} +6 -6
  477. package/lib-commonjs/components/PolarChart/{PolarChart.js.map → PolarChart.cjs.map} +1 -1
  478. package/lib-commonjs/components/PolarChart/{PolarChart.utils.js → PolarChart.utils.cjs} +1 -1
  479. package/lib-commonjs/components/PolarChart/{PolarChart.utils.js.map → PolarChart.utils.cjs.map} +1 -1
  480. package/lib-commonjs/components/PolarChart/index.cjs +7 -0
  481. package/lib-commonjs/components/PolarChart/{index.js.map → index.cjs.map} +1 -1
  482. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.cjs.map +1 -0
  483. package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.js → ResponsiveContainer.cjs} +2 -2
  484. package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.js.map → ResponsiveContainer.cjs.map} +1 -1
  485. package/lib-commonjs/components/ResponsiveContainer/index.cjs +8 -0
  486. package/lib-commonjs/components/ResponsiveContainer/{index.js.map → index.cjs.map} +1 -1
  487. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.cjs.map +1 -0
  488. package/lib-commonjs/components/ResponsiveContainer/{withResponsiveContainer.js → withResponsiveContainer.cjs} +1 -1
  489. package/lib-commonjs/components/ResponsiveContainer/{withResponsiveContainer.js.map → withResponsiveContainer.cjs.map} +1 -1
  490. package/lib-commonjs/components/SankeyChart/{SankeyChart.js → SankeyChart.cjs} +18 -12
  491. package/lib-commonjs/components/SankeyChart/SankeyChart.cjs.map +1 -0
  492. package/lib-commonjs/components/SankeyChart/index.cjs +8 -0
  493. package/lib-commonjs/components/SankeyChart/{index.js.map → index.cjs.map} +1 -1
  494. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.cjs.map +1 -0
  495. package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.raw.js → useSankeyChartStyles.styles.raw.cjs} +1 -1
  496. package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.raw.js.map → useSankeyChartStyles.styles.raw.cjs.map} +1 -1
  497. package/lib-commonjs/components/ScatterChart/{ScatterChart.js → ScatterChart.cjs} +9 -9
  498. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -0
  499. package/lib-commonjs/components/ScatterChart/index.cjs +8 -0
  500. package/lib-commonjs/components/ScatterChart/{index.js.map → index.cjs.map} +1 -1
  501. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.cjs.map +1 -0
  502. package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.raw.js → useScatterChartStyles.styles.raw.cjs} +1 -1
  503. package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.raw.js.map → useScatterChartStyles.styles.raw.cjs.map} +1 -1
  504. package/lib-commonjs/components/Sparkline/{Sparkline.js → Sparkline.cjs} +2 -2
  505. package/lib-commonjs/components/Sparkline/{Sparkline.js.map → Sparkline.cjs.map} +1 -1
  506. package/lib-commonjs/components/Sparkline/index.cjs +8 -0
  507. package/lib-commonjs/components/Sparkline/{index.js.map → index.cjs.map} +1 -1
  508. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.cjs.map +1 -0
  509. package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChart.js → VegaDeclarativeChart.cjs} +14 -14
  510. package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChart.js.map → VegaDeclarativeChart.cjs.map} +1 -1
  511. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteColorAdapter.js → VegaLiteColorAdapter.cjs} +2 -2
  512. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteColorAdapter.js.map → VegaLiteColorAdapter.cjs.map} +1 -1
  513. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteSchemaAdapter.js → VegaLiteSchemaAdapter.cjs} +2 -2
  514. package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteSchemaAdapter.js.map → VegaLiteSchemaAdapter.cjs.map} +1 -1
  515. package/lib-commonjs/{Legends.js → components/VegaDeclarativeChart/index.cjs} +1 -1
  516. package/lib-commonjs/components/VegaDeclarativeChart/{index.js.map → index.cjs.map} +1 -1
  517. package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.js → VerticalBarChart.cjs} +10 -7
  518. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -0
  519. package/lib-commonjs/components/VerticalBarChart/index.cjs +8 -0
  520. package/lib-commonjs/components/VerticalBarChart/{index.js.map → index.cjs.map} +1 -1
  521. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.cjs.map +1 -0
  522. package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.raw.js → useVerticalBarChartStyles.styles.raw.cjs} +2 -2
  523. package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.raw.js.map → useVerticalBarChartStyles.styles.raw.cjs.map} +1 -1
  524. package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.js → VerticalStackedBarChart.cjs} +4 -4
  525. package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.js.map → VerticalStackedBarChart.cjs.map} +1 -1
  526. package/lib-commonjs/components/VerticalStackedBarChart/index.cjs +8 -0
  527. package/lib-commonjs/components/VerticalStackedBarChart/{index.js.map → index.cjs.map} +1 -1
  528. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.cjs.map +1 -0
  529. package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.raw.js → useVerticalStackedBarChartStyles.styles.raw.cjs} +1 -1
  530. package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.raw.js.map → useVerticalStackedBarChartStyles.styles.raw.cjs.map} +1 -1
  531. package/lib-commonjs/index.cjs +31 -0
  532. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  533. package/lib-commonjs/types/index.cjs +8 -0
  534. package/lib-commonjs/types/{index.js.map → index.cjs.map} +1 -1
  535. package/lib-commonjs/utilities/{ChartTitle.js → ChartTitle.cjs} +3 -3
  536. package/lib-commonjs/utilities/{ChartTitle.js.map → ChartTitle.cjs.map} +1 -1
  537. package/lib-commonjs/utilities/{Common.styles.raw.js → Common.styles.cjs} +1 -1
  538. package/lib-commonjs/utilities/Common.styles.cjs.map +1 -0
  539. package/lib-commonjs/utilities/{Common.styles.js → Common.styles.raw.cjs} +1 -1
  540. package/lib-commonjs/utilities/{Common.styles.raw.js.map → Common.styles.raw.cjs.map} +1 -1
  541. package/lib-commonjs/utilities/{FocusableTooltipText.js → FocusableTooltipText.cjs} +3 -3
  542. package/lib-commonjs/utilities/{FocusableTooltipText.js.map → FocusableTooltipText.cjs.map} +1 -1
  543. package/lib-commonjs/utilities/{SVGTooltipText.js → SVGTooltipText.cjs} +2 -2
  544. package/lib-commonjs/utilities/{SVGTooltipText.js.map → SVGTooltipText.cjs.map} +1 -1
  545. package/lib-commonjs/utilities/{async-utils.js → async-utils.cjs} +1 -1
  546. package/lib-commonjs/utilities/{async-utils.js.map → async-utils.cjs.map} +1 -1
  547. package/lib-commonjs/utilities/{hooks.js → hooks.cjs} +2 -2
  548. package/lib-commonjs/utilities/{hooks.js.map → hooks.cjs.map} +1 -1
  549. package/lib-commonjs/utilities/{image-export-utils.js → image-export-utils.cjs} +2 -2
  550. package/lib-commonjs/utilities/{image-export-utils.js.map → image-export-utils.cjs.map} +1 -1
  551. package/lib-commonjs/utilities/index.cjs +10 -0
  552. package/lib-commonjs/utilities/{index.js.map → index.cjs.map} +1 -1
  553. package/lib-commonjs/utilities/{test-data.js → test-data.cjs} +1 -1
  554. package/lib-commonjs/utilities/{test-data.js.map → test-data.cjs.map} +1 -1
  555. package/lib-commonjs/utilities/{utilities.js → utilities.cjs} +2 -2
  556. package/lib-commonjs/utilities/utilities.cjs.map +1 -0
  557. package/package.json +21 -15
  558. package/lib-commonjs/GanttChart.js +0 -6
  559. package/lib-commonjs/GaugeChart.js +0 -6
  560. package/lib-commonjs/HorizontalBarChart.js +0 -6
  561. package/lib-commonjs/LineChart.js +0 -6
  562. package/lib-commonjs/PolarChart.js +0 -6
  563. package/lib-commonjs/Popover.js +0 -6
  564. package/lib-commonjs/ResponsiveContainer.js +0 -6
  565. package/lib-commonjs/ScatterChart.js +0 -6
  566. package/lib-commonjs/Sparkline.js +0 -6
  567. package/lib-commonjs/VerticalBarChart.js +0 -6
  568. package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
  569. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
  570. package/lib-commonjs/components/AreaChart/index.js +0 -8
  571. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
  572. package/lib-commonjs/components/ChartTable/index.js +0 -8
  573. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
  574. package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
  575. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
  576. package/lib-commonjs/components/CommonComponents/index.js +0 -11
  577. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
  578. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
  579. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
  580. package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
  581. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
  582. package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
  583. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
  584. package/lib-commonjs/components/DonutChart/index.js +0 -8
  585. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
  586. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
  587. package/lib-commonjs/components/FunnelChart/index.js +0 -7
  588. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
  589. package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
  590. package/lib-commonjs/components/GanttChart/index.js +0 -7
  591. package/lib-commonjs/components/GaugeChart/index.js +0 -8
  592. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
  593. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
  594. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
  595. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
  596. package/lib-commonjs/components/HeatMapChart/index.js +0 -8
  597. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
  598. package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
  599. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
  600. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
  601. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
  602. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
  603. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
  604. package/lib-commonjs/components/Legends/Legends.js.map +0 -1
  605. package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
  606. package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
  607. package/lib-commonjs/components/Legends/index.js +0 -8
  608. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
  609. package/lib-commonjs/components/LineChart/index.js +0 -9
  610. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
  611. package/lib-commonjs/components/PolarChart/index.js +0 -7
  612. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
  613. package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
  614. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
  615. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
  616. package/lib-commonjs/components/SankeyChart/index.js +0 -8
  617. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
  618. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
  619. package/lib-commonjs/components/ScatterChart/index.js +0 -8
  620. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
  621. package/lib-commonjs/components/Sparkline/index.js +0 -8
  622. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
  623. package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
  624. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
  625. package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
  626. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
  627. package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
  628. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
  629. package/lib-commonjs/index.js +0 -31
  630. package/lib-commonjs/types/index.js +0 -8
  631. package/lib-commonjs/utilities/Common.styles.js.map +0 -1
  632. package/lib-commonjs/utilities/index.js +0 -10
  633. package/lib-commonjs/utilities/utilities.js.map +0 -1
  634. /package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.types.js → AnnotationOnlyChart.types.cjs} +0 -0
  635. /package/lib-commonjs/components/AnnotationOnlyChart/{AnnotationOnlyChart.types.js.map → AnnotationOnlyChart.types.cjs.map} +0 -0
  636. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.js → useAnnotationOnlyChartStyles.styles.cjs} +0 -0
  637. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.raw.js → useAnnotationOnlyChartStyles.styles.raw.cjs} +0 -0
  638. /package/lib-commonjs/components/AnnotationOnlyChart/{useAnnotationOnlyChartStyles.styles.raw.js.map → useAnnotationOnlyChartStyles.styles.raw.cjs.map} +0 -0
  639. /package/lib-commonjs/components/AreaChart/{AreaChart.types.js → AreaChart.types.cjs} +0 -0
  640. /package/lib-commonjs/components/AreaChart/{AreaChart.types.js.map → AreaChart.types.cjs.map} +0 -0
  641. /package/lib-commonjs/components/AreaChart/{useAreaChartStyles.styles.js → useAreaChartStyles.styles.cjs} +0 -0
  642. /package/lib-commonjs/components/ChartTable/{ChartTable.types.js → ChartTable.types.cjs} +0 -0
  643. /package/lib-commonjs/components/ChartTable/{ChartTable.types.js.map → ChartTable.types.cjs.map} +0 -0
  644. /package/lib-commonjs/components/ChartTable/{useChartTableStyles.styles.js → useChartTableStyles.styles.cjs} +0 -0
  645. /package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.types.js → ChartAnnotationLayer.types.cjs} +0 -0
  646. /package/lib-commonjs/components/CommonComponents/Annotations/{ChartAnnotationLayer.types.js.map → ChartAnnotationLayer.types.cjs.map} +0 -0
  647. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.js → useChartAnnotationLayer.styles.cjs} +0 -0
  648. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.raw.js → useChartAnnotationLayer.styles.raw.cjs} +0 -0
  649. /package/lib-commonjs/components/CommonComponents/Annotations/{useChartAnnotationLayer.styles.raw.js.map → useChartAnnotationLayer.styles.raw.cjs.map} +0 -0
  650. /package/lib-commonjs/components/CommonComponents/{CartesianChart.types.js → CartesianChart.types.cjs} +0 -0
  651. /package/lib-commonjs/components/CommonComponents/{CartesianChart.types.js.map → CartesianChart.types.cjs.map} +0 -0
  652. /package/lib-commonjs/components/CommonComponents/{ChartPopover.types.js → ChartPopover.types.cjs} +0 -0
  653. /package/lib-commonjs/components/CommonComponents/{ChartPopover.types.js.map → ChartPopover.types.cjs.map} +0 -0
  654. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.js → useChartPopoverStyles.styles.cjs} +0 -0
  655. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.raw.js → useChartPopoverStyles.styles.raw.cjs} +0 -0
  656. /package/lib-commonjs/components/CommonComponents/{useChartPopoverStyles.styles.raw.js.map → useChartPopoverStyles.styles.raw.cjs.map} +0 -0
  657. /package/lib-commonjs/components/DonutChart/Arc/{Arc.types.js → Arc.types.cjs} +0 -0
  658. /package/lib-commonjs/components/DonutChart/Arc/{Arc.types.js.map → Arc.types.cjs.map} +0 -0
  659. /package/lib-commonjs/components/DonutChart/Arc/{useArcStyles.styles.js → useArcStyles.styles.cjs} +0 -0
  660. /package/lib-commonjs/components/DonutChart/{DonutChart.types.js → DonutChart.types.cjs} +0 -0
  661. /package/lib-commonjs/components/DonutChart/{DonutChart.types.js.map → DonutChart.types.cjs.map} +0 -0
  662. /package/lib-commonjs/components/DonutChart/Pie/{Pie.types.js → Pie.types.cjs} +0 -0
  663. /package/lib-commonjs/components/DonutChart/Pie/{Pie.types.js.map → Pie.types.cjs.map} +0 -0
  664. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.js → usePieStyles.styles.cjs} +0 -0
  665. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.raw.js → usePieStyles.styles.raw.cjs} +0 -0
  666. /package/lib-commonjs/components/DonutChart/Pie/{usePieStyles.styles.raw.js.map → usePieStyles.styles.raw.cjs.map} +0 -0
  667. /package/lib-commonjs/components/DonutChart/{useDonutChartStyles.styles.js → useDonutChartStyles.styles.cjs} +0 -0
  668. /package/lib-commonjs/components/FunnelChart/{FunnelChart.types.js → FunnelChart.types.cjs} +0 -0
  669. /package/lib-commonjs/components/FunnelChart/{FunnelChart.types.js.map → FunnelChart.types.cjs.map} +0 -0
  670. /package/lib-commonjs/components/FunnelChart/{funnelGeometry.js → funnelGeometry.cjs} +0 -0
  671. /package/lib-commonjs/components/FunnelChart/{funnelGeometry.js.map → funnelGeometry.cjs.map} +0 -0
  672. /package/lib-commonjs/components/FunnelChart/{useFunnelChartStyles.styles.js → useFunnelChartStyles.styles.cjs} +0 -0
  673. /package/lib-commonjs/components/GanttChart/{GanttChart.types.js → GanttChart.types.cjs} +0 -0
  674. /package/lib-commonjs/components/GanttChart/{GanttChart.types.js.map → GanttChart.types.cjs.map} +0 -0
  675. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.js → useGanttChartStyles.styles.cjs} +0 -0
  676. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.js.map → useGanttChartStyles.styles.cjs.map} +0 -0
  677. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.raw.js → useGanttChartStyles.styles.raw.cjs} +0 -0
  678. /package/lib-commonjs/components/GanttChart/{useGanttChartStyles.styles.raw.js.map → useGanttChartStyles.styles.raw.cjs.map} +0 -0
  679. /package/lib-commonjs/components/GaugeChart/{GaugeChart.types.js → GaugeChart.types.cjs} +0 -0
  680. /package/lib-commonjs/components/GaugeChart/{GaugeChart.types.js.map → GaugeChart.types.cjs.map} +0 -0
  681. /package/lib-commonjs/components/GaugeChart/{useGaugeChartStyles.styles.js → useGaugeChartStyles.styles.cjs} +0 -0
  682. /package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.types.js → GroupedVerticalBarChart.types.cjs} +0 -0
  683. /package/lib-commonjs/components/GroupedVerticalBarChart/{GroupedVerticalBarChart.types.js.map → GroupedVerticalBarChart.types.cjs.map} +0 -0
  684. /package/lib-commonjs/components/GroupedVerticalBarChart/{useGroupedVerticalBarChartStyles.styles.js → useGroupedVerticalBarChartStyles.styles.cjs} +0 -0
  685. /package/lib-commonjs/components/HeatMapChart/{HeatMapChart.types.js → HeatMapChart.types.cjs} +0 -0
  686. /package/lib-commonjs/components/HeatMapChart/{HeatMapChart.types.js.map → HeatMapChart.types.cjs.map} +0 -0
  687. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.js → useHeatMapChartStyles.styles.cjs} +0 -0
  688. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.raw.js → useHeatMapChartStyles.styles.raw.cjs} +0 -0
  689. /package/lib-commonjs/components/HeatMapChart/{useHeatMapChartStyles.styles.raw.js.map → useHeatMapChartStyles.styles.raw.cjs.map} +0 -0
  690. /package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.types.js → HorizontalBarChart.types.cjs} +0 -0
  691. /package/lib-commonjs/components/HorizontalBarChart/{HorizontalBarChart.types.js.map → HorizontalBarChart.types.cjs.map} +0 -0
  692. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.types.js → HorizontalBarChartWithAxis.types.cjs} +0 -0
  693. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{HorizontalBarChartWithAxis.types.js.map → HorizontalBarChartWithAxis.types.cjs.map} +0 -0
  694. /package/lib-commonjs/components/HorizontalBarChartWithAxis/{useHorizontalBarChartWithAxisStyles.styles.js → useHorizontalBarChartWithAxisStyles.styles.cjs} +0 -0
  695. /package/lib-commonjs/components/Legends/{Legends.types.js → Legends.types.cjs} +0 -0
  696. /package/lib-commonjs/components/Legends/{Legends.types.js.map → Legends.types.cjs.map} +0 -0
  697. /package/lib-commonjs/components/Legends/{useLegendsStyles.styles.js → useLegendsStyles.styles.cjs} +0 -0
  698. /package/lib-commonjs/components/LineChart/{LineChart.types.js → LineChart.types.cjs} +0 -0
  699. /package/lib-commonjs/components/LineChart/{LineChart.types.js.map → LineChart.types.cjs.map} +0 -0
  700. /package/lib-commonjs/components/LineChart/{useLineChartStyles.styles.js → useLineChartStyles.styles.cjs} +0 -0
  701. /package/lib-commonjs/components/PolarChart/{PolarChart.types.js → PolarChart.types.cjs} +0 -0
  702. /package/lib-commonjs/components/PolarChart/{PolarChart.types.js.map → PolarChart.types.cjs.map} +0 -0
  703. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.js → usePolarChartStyles.styles.cjs} +0 -0
  704. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.raw.js → usePolarChartStyles.styles.raw.cjs} +0 -0
  705. /package/lib-commonjs/components/PolarChart/{usePolarChartStyles.styles.raw.js.map → usePolarChartStyles.styles.raw.cjs.map} +0 -0
  706. /package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.types.js → ResponsiveContainer.types.cjs} +0 -0
  707. /package/lib-commonjs/components/ResponsiveContainer/{ResponsiveContainer.types.js.map → ResponsiveContainer.types.cjs.map} +0 -0
  708. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.js → useResponsiveChildStyles.styles.cjs} +0 -0
  709. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.raw.js → useResponsiveChildStyles.styles.raw.cjs} +0 -0
  710. /package/lib-commonjs/components/ResponsiveContainer/{useResponsiveChildStyles.styles.raw.js.map → useResponsiveChildStyles.styles.raw.cjs.map} +0 -0
  711. /package/lib-commonjs/components/SankeyChart/{SankeyChart.types.js → SankeyChart.types.cjs} +0 -0
  712. /package/lib-commonjs/components/SankeyChart/{SankeyChart.types.js.map → SankeyChart.types.cjs.map} +0 -0
  713. /package/lib-commonjs/components/SankeyChart/{useSankeyChartStyles.styles.js → useSankeyChartStyles.styles.cjs} +0 -0
  714. /package/lib-commonjs/components/ScatterChart/{ScatterChart.types.js → ScatterChart.types.cjs} +0 -0
  715. /package/lib-commonjs/components/ScatterChart/{ScatterChart.types.js.map → ScatterChart.types.cjs.map} +0 -0
  716. /package/lib-commonjs/components/ScatterChart/{useScatterChartStyles.styles.js → useScatterChartStyles.styles.cjs} +0 -0
  717. /package/lib-commonjs/components/Sparkline/{Sparkline.types.js → Sparkline.types.cjs} +0 -0
  718. /package/lib-commonjs/components/Sparkline/{Sparkline.types.js.map → Sparkline.types.cjs.map} +0 -0
  719. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.js → useSparklineStyles.styles.cjs} +0 -0
  720. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.raw.js → useSparklineStyles.styles.raw.cjs} +0 -0
  721. /package/lib-commonjs/components/Sparkline/{useSparklineStyles.styles.raw.js.map → useSparklineStyles.styles.raw.cjs.map} +0 -0
  722. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChartHooks.js → VegaDeclarativeChartHooks.cjs} +0 -0
  723. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaDeclarativeChartHooks.js.map → VegaDeclarativeChartHooks.cjs.map} +0 -0
  724. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteExpressionEvaluator.js → VegaLiteExpressionEvaluator.cjs} +0 -0
  725. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteExpressionEvaluator.js.map → VegaLiteExpressionEvaluator.cjs.map} +0 -0
  726. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteTypes.js → VegaLiteTypes.cjs} +0 -0
  727. /package/lib-commonjs/components/VegaDeclarativeChart/{VegaLiteTypes.js.map → VegaLiteTypes.cjs.map} +0 -0
  728. /package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.types.js → VerticalBarChart.types.cjs} +0 -0
  729. /package/lib-commonjs/components/VerticalBarChart/{VerticalBarChart.types.js.map → VerticalBarChart.types.cjs.map} +0 -0
  730. /package/lib-commonjs/components/VerticalBarChart/{useVerticalBarChartStyles.styles.js → useVerticalBarChartStyles.styles.cjs} +0 -0
  731. /package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.types.js → VerticalStackedBarChart.types.cjs} +0 -0
  732. /package/lib-commonjs/components/VerticalStackedBarChart/{VerticalStackedBarChart.types.js.map → VerticalStackedBarChart.types.cjs.map} +0 -0
  733. /package/lib-commonjs/components/VerticalStackedBarChart/{useVerticalStackedBarChartStyles.styles.js → useVerticalStackedBarChartStyles.styles.cjs} +0 -0
  734. /package/lib-commonjs/types/{ChartAnnotation.js → ChartAnnotation.cjs} +0 -0
  735. /package/lib-commonjs/types/{ChartAnnotation.js.map → ChartAnnotation.cjs.map} +0 -0
  736. /package/lib-commonjs/types/{DataPoint.js → DataPoint.cjs} +0 -0
  737. /package/lib-commonjs/types/{DataPoint.js.map → DataPoint.cjs.map} +0 -0
  738. /package/lib-commonjs/types/{EventAnnotation.js → EventAnnotation.cjs} +0 -0
  739. /package/lib-commonjs/types/{EventAnnotation.js.map → EventAnnotation.cjs.map} +0 -0
  740. /package/lib-commonjs/types/{LegendDataItem.js → LegendDataItem.cjs} +0 -0
  741. /package/lib-commonjs/types/{LegendDataItem.js.map → LegendDataItem.cjs.map} +0 -0
  742. /package/lib-commonjs/utilities/{KeyCodes.js → KeyCodes.cjs} +0 -0
  743. /package/lib-commonjs/utilities/{KeyCodes.js.map → KeyCodes.cjs.map} +0 -0
  744. /package/lib-commonjs/utilities/{colors.js → colors.cjs} +0 -0
  745. /package/lib-commonjs/utilities/{colors.js.map → colors.cjs.map} +0 -0
  746. /package/lib-commonjs/utilities/{getWindow.js → getWindow.cjs} +0 -0
  747. /package/lib-commonjs/utilities/{getWindow.js.map → getWindow.cjs.map} +0 -0
  748. /package/lib-commonjs/utilities/{overflow-utils.js → overflow-utils.cjs} +0 -0
  749. /package/lib-commonjs/utilities/{overflow-utils.js.map → overflow-utils.cjs.map} +0 -0
  750. /package/lib-commonjs/utilities/{scatterpolar-utils.js → scatterpolar-utils.cjs} +0 -0
  751. /package/lib-commonjs/utilities/{scatterpolar-utils.js.map → scatterpolar-utils.cjs.map} +0 -0
  752. /package/lib-commonjs/utilities/{string.js → string.cjs} +0 -0
  753. /package/lib-commonjs/utilities/{string.js.map → string.cjs.map} +0 -0
  754. /package/lib-commonjs/utilities/{vbc-utils.js → vbc-utils.cjs} +0 -0
  755. /package/lib-commonjs/utilities/{vbc-utils.js.map → vbc-utils.cjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts"],"sourcesContent":["export * from './DataPoint';\nexport * from './LegendDataItem';\nexport * from './ChartAnnotation';\n"],"names":[],"mappings":";;;;;uBAAc,cAAc;uBACd,mBAAmB;uBACnB,oBAAoB"}
1
+ {"version":3,"sources":["../src/types/index.ts"],"sourcesContent":["export * from './DataPoint';\nexport * from './LegendDataItem';\nexport * from './ChartAnnotation';\n"],"names":[],"mappings":";;;;;uBAAc,iBAAc;uBACd,sBAAmB;uBACnB,uBAAoB"}
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "ChartTitle", {
10
10
  });
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _SVGTooltipText = require("./SVGTooltipText");
14
- const _Commonstyles = require("./Common.styles");
15
- const _utilities = require("./utilities");
13
+ const _SVGTooltipText = require("./SVGTooltipText.cjs");
14
+ const _Commonstyles = require("./Common.styles.cjs");
15
+ const _utilities = require("./utilities.cjs");
16
16
  const AXIS_TITLE_PADDING = 8;
17
17
  const ChartTitle = (props)=>{
18
18
  const { title, x, y, maxWidth, className, titleStyles, tooltipProps, tooltipClassName } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/ChartTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { SVGTooltipTextProps } from './SVGTooltipText';\nimport { SVGTooltipText } from './SVGTooltipText';\nimport type { TitleStyles } from './Common.styles';\nimport { CHART_TITLE_PADDING, getChartTitleInlineStyles } from './Common.styles';\nimport { wrapContent } from './utilities';\n\nconst AXIS_TITLE_PADDING = 8;\n\n/**\n * Props for the ChartTitle component\n */\nexport interface ChartTitleProps {\n /**\n * The title text to display\n */\n title: string;\n /**\n * The x position for the title (typically center of chart)\n */\n x: number;\n /**\n * Optional custom y position. If not provided, calculated based on font size.\n */\n y?: number;\n /**\n * Maximum width for the title text before wrapping/truncation\n */\n maxWidth?: number;\n /**\n * CSS class name for the title text element\n */\n className?: string;\n /**\n * Title styles configuration (font, anchors, padding)\n */\n titleStyles?: TitleStyles;\n /**\n * Text anchor for SVG text element\n * @default 'middle'\n */\n textAnchor?: 'start' | 'middle' | 'end';\n /**\n * Additional SVGTooltipText props to pass through\n */\n tooltipProps?: Partial<SVGTooltipTextProps>;\n /**\n * CSS class for the tooltip\n */\n tooltipClassName?: string;\n}\n\n/**\n * A reusable chart title component that renders an SVG text element with tooltip support.\n * This component encapsulates the common pattern for rendering chart titles across all chart types.\n */\nexport const ChartTitle: React.FunctionComponent<ChartTitleProps> = props => {\n const { title, x, y, maxWidth, className, titleStyles, tooltipProps, tooltipClassName } = props;\n\n const { titleFont, titleXAnchor, titleYAnchor, titlePad } = titleStyles ?? {};\n const computedTextAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';\n\n // Calculate dominantBaseline from titleYAnchor for vertical alignment\n // 'top' means text hangs below the y position (text-before-edge/hanging)\n // 'bottom' means text sits above the y position (text-after-edge/alphabetic)\n // 'middle' means text is centered on the y position (central)\n const computedDominantBaseline =\n titleYAnchor === 'top'\n ? 'hanging'\n : titleYAnchor === 'bottom'\n ? 'alphabetic'\n : titleYAnchor === 'middle'\n ? 'central'\n : 'auto';\n\n // Calculate x position with padding adjustments\n const computedX = x + (titlePad?.l ?? 0) - (titlePad?.r ?? 0);\n\n // Calculate y position with padding adjustments\n const calculatedY =\n (y ??\n Math.max(\n (typeof titleFont?.size === 'number' ? titleFont.size : 13) + AXIS_TITLE_PADDING,\n CHART_TITLE_PADDING - AXIS_TITLE_PADDING,\n )) +\n (titlePad?.t ?? 0) -\n (titlePad?.b ?? 0);\n\n const commonSvgToolTipProps: Partial<SVGTooltipTextProps> = {\n wrapContent,\n showBackground: true,\n className: tooltipClassName,\n ...tooltipProps,\n };\n return (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={title}\n textProps={{\n x: computedX,\n y: calculatedY,\n textAnchor: computedTextAnchor,\n dominantBaseline: computedDominantBaseline,\n className,\n 'aria-hidden': true,\n style: getChartTitleInlineStyles(titleFont),\n }}\n maxWidth={maxWidth}\n />\n );\n};\n\nChartTitle.displayName = 'ChartTitle';\n"],"names":["React","SVGTooltipText","CHART_TITLE_PADDING","getChartTitleInlineStyles","wrapContent","AXIS_TITLE_PADDING","ChartTitle","props","title","x","y","maxWidth","className","titleStyles","tooltipProps","tooltipClassName","titleFont","titleXAnchor","titleYAnchor","titlePad","computedTextAnchor","computedDominantBaseline","computedX","l","r","calculatedY","Math","max","size","t","b","commonSvgToolTipProps","showBackground","content","textProps","textAnchor","dominantBaseline","style","displayName"],"mappings":";;;;+BAwDaM;;;;;;;iEAxDU,QAAQ;gCAEA,mBAAmB;8BAEa,kBAAkB;2BACrD,cAAc;AAE1C,MAAMD,qBAAqB;AAiDpB,mBAA6DE,CAAAA;IAClE,MAAM,EAAEC,KAAK,EAAEC,CAAC,EAAEC,CAAC,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,YAAY,EAAEC,gBAAgB,EAAE,GAAGR;IAE1F,MAAM,EAAES,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGN,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,cAAe,CAAC;IAC5E,MAAMO,qBAAqBH,iBAAiB,SAAS,UAAUA,iBAAiB,UAAU,QAAQ;IAElG,sEAAsE;IACtE,yEAAyE;IACzE,6EAA6E;IAC7E,8DAA8D;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T;YACA,eAAe;YACfyB,WAAOlC,uCAAAA,EAA0Ba;QACnC;QACAL,UAAUA;;AAGhB,EAAE;AAEFL,WAAWgC,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/utilities/ChartTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { SVGTooltipTextProps } from './SVGTooltipText';\nimport { SVGTooltipText } from './SVGTooltipText';\nimport type { TitleStyles } from './Common.styles';\nimport { CHART_TITLE_PADDING, getChartTitleInlineStyles } from './Common.styles';\nimport { wrapContent } from './utilities';\n\nconst AXIS_TITLE_PADDING = 8;\n\n/**\n * Props for the ChartTitle component\n */\nexport interface ChartTitleProps {\n /**\n * The title text to display\n */\n title: string;\n /**\n * The x position for the title (typically center of chart)\n */\n x: number;\n /**\n * Optional custom y position. If not provided, calculated based on font size.\n */\n y?: number;\n /**\n * Maximum width for the title text before wrapping/truncation\n */\n maxWidth?: number;\n /**\n * CSS class name for the title text element\n */\n className?: string;\n /**\n * Title styles configuration (font, anchors, padding)\n */\n titleStyles?: TitleStyles;\n /**\n * Text anchor for SVG text element\n * @default 'middle'\n */\n textAnchor?: 'start' | 'middle' | 'end';\n /**\n * Additional SVGTooltipText props to pass through\n */\n tooltipProps?: Partial<SVGTooltipTextProps>;\n /**\n * CSS class for the tooltip\n */\n tooltipClassName?: string;\n}\n\n/**\n * A reusable chart title component that renders an SVG text element with tooltip support.\n * This component encapsulates the common pattern for rendering chart titles across all chart types.\n */\nexport const ChartTitle: React.FunctionComponent<ChartTitleProps> = props => {\n const { title, x, y, maxWidth, className, titleStyles, tooltipProps, tooltipClassName } = props;\n\n const { titleFont, titleXAnchor, titleYAnchor, titlePad } = titleStyles ?? {};\n const computedTextAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';\n\n // Calculate dominantBaseline from titleYAnchor for vertical alignment\n // 'top' means text hangs below the y position (text-before-edge/hanging)\n // 'bottom' means text sits above the y position (text-after-edge/alphabetic)\n // 'middle' means text is centered on the y position (central)\n const computedDominantBaseline =\n titleYAnchor === 'top'\n ? 'hanging'\n : titleYAnchor === 'bottom'\n ? 'alphabetic'\n : titleYAnchor === 'middle'\n ? 'central'\n : 'auto';\n\n // Calculate x position with padding adjustments\n const computedX = x + (titlePad?.l ?? 0) - (titlePad?.r ?? 0);\n\n // Calculate y position with padding adjustments\n const calculatedY =\n (y ??\n Math.max(\n (typeof titleFont?.size === 'number' ? titleFont.size : 13) + AXIS_TITLE_PADDING,\n CHART_TITLE_PADDING - AXIS_TITLE_PADDING,\n )) +\n (titlePad?.t ?? 0) -\n (titlePad?.b ?? 0);\n\n const commonSvgToolTipProps: Partial<SVGTooltipTextProps> = {\n wrapContent,\n showBackground: true,\n className: tooltipClassName,\n ...tooltipProps,\n };\n return (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={title}\n textProps={{\n x: computedX,\n y: calculatedY,\n textAnchor: computedTextAnchor,\n dominantBaseline: computedDominantBaseline,\n className,\n 'aria-hidden': true,\n style: getChartTitleInlineStyles(titleFont),\n }}\n maxWidth={maxWidth}\n />\n );\n};\n\nChartTitle.displayName = 'ChartTitle';\n"],"names":["React","SVGTooltipText","CHART_TITLE_PADDING","getChartTitleInlineStyles","wrapContent","AXIS_TITLE_PADDING","ChartTitle","props","title","x","y","maxWidth","className","titleStyles","tooltipProps","tooltipClassName","titleFont","titleXAnchor","titleYAnchor","titlePad","computedTextAnchor","computedDominantBaseline","computedX","l","r","calculatedY","Math","max","size","t","b","commonSvgToolTipProps","showBackground","content","textProps","textAnchor","dominantBaseline","style","displayName"],"mappings":";;;;+BAwDaM;;;;;;;iEAxDU,QAAQ;gCAEA,sBAAmB;8BAEa,qBAAkB;2BACrD,iBAAc;AAE1C,MAAMD,qBAAqB;AAiDpB,mBAA6DE,CAAAA;IAClE,MAAM,EAAEC,KAAK,EAAEC,CAAC,EAAEC,CAAC,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,YAAY,EAAEC,gBAAgB,EAA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;IAElB,MAAMY,wBAAsD;qBAC1D3B,sBAAAA;QACA4B,gBAAgB;QAChBpB,WAAWG;QACX,GAAGD,YAAY;IACjB;IACA,OAAA,WAAA,GACE,OAAA,aAAA,CAACb,8BAAAA,EAAAA;QACE,GAAG8B,qBAAqB;QACzBE,SAASzB;QACT0B,WAAW;YACTzB,GAAGa;YACHZ,GAAGe;YACHU,YAAYf;YACZgB,kBAAkBf;YAClBT;YACA,eAAe;YACfyB,WAAOlC,uCAAAA,EAA0Ba;QACnC;QACAL,UAAUA;;AAGhB,EAAE;AAEFL,WAAWgC,WAAW,GAAG"}
@@ -31,7 +31,7 @@ _export(exports, {
31
31
  return getTooltipStyle;
32
32
  }
33
33
  });
34
- const _utilities = require("../utilities/utilities");
34
+ const _utilities = require("./utilities.cjs");
35
35
  const _reacttheme = require("@fluentui/react-theme");
36
36
  const CHART_TITLE_PADDING = 20;
37
37
  const getTooltipStyle = ()=>{
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Common.styles.js"],"sourcesContent":["import { HighContrastSelector } from \"./utilities.js\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\n/**\n * Default padding below chart title (in pixels).\n * Used consistently across all chart types for spacing between title and chart content.\n */ export const CHART_TITLE_PADDING = 20;\nexport const getTooltipStyle = ()=>{\n return {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: tokens.spacingHorizontalS,\n position: 'absolute',\n textAlign: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n };\n};\nexport const getAxisTitleStyle = ()=>{\n return {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n };\n};\nexport const getBarLabelStyle = ()=>{\n return {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n };\n};\nexport const getMarkerLabelStyle = ()=>{\n return {\n ...typographyStyles.body1,\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n };\n};\nexport const getChartTitleStyles = ()=>{\n return {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n textAlign: 'center',\n marginBottom: tokens.spacingVerticalS\n };\n};\n/**\n * Creates dynamic chart title styles using CSS properties.\n * @param titleFont - Optional font configuration from Plotly layout\n * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')\n * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')\n * @param pad - Optional padding configuration\n * @returns Style object with CSS properties for dynamic styling\n */ export function getChartTitleInlineStyles(titleFont, xanchor, yanchor, pad) {\n const styles = {};\n if (titleFont) {\n Object.assign(styles, titleFont.family && {\n fontFamily: titleFont.family\n }, titleFont.size && {\n fontSize: `${titleFont.size}px`\n }, titleFont.weight && {\n fontWeight: titleFont.weight\n }, titleFont.color && {\n fill: titleFont.color\n }, titleFont.shadow && titleFont.shadow !== 'none' && {\n filter: `drop-shadow(${titleFont.shadow})`\n });\n }\n if (xanchor) {\n const anchorMap = {\n left: 'left',\n center: 'center',\n right: 'right'\n };\n const alignmentKey = xanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.textAlign = anchorMap[alignmentKey];\n }\n }\n if (yanchor) {\n const anchorMap = {\n top: 'flex-start',\n middle: 'center',\n bottom: 'flex-end'\n };\n const alignmentKey = yanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.alignSelf = anchorMap[alignmentKey];\n }\n }\n if (pad) {\n var _pad_t;\n const t = (_pad_t = pad.t) !== null && _pad_t !== void 0 ? _pad_t : 0;\n var _pad_r;\n const r = (_pad_r = pad.r) !== null && _pad_r !== void 0 ? _pad_r : 0;\n var _pad_b;\n const b = (_pad_b = pad.b) !== null && _pad_b !== void 0 ? _pad_b : 0;\n var _pad_l;\n const l = (_pad_l = pad.l) !== null && _pad_l !== void 0 ? _pad_l : 0;\n styles.padding = `${t}px ${r}px ${b}px ${l}px`;\n }\n return styles;\n}\n"],"names":["HighContrastSelector","tokens","typographyStyles","CHART_TITLE_PADDING","getTooltipStyle","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","backgroundColor","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","getAxisTitleStyle","caption2Strong","fontStyle","colorNeutralForeground2","fill","getBarLabelStyle","caption1Strong","forcedColorAdjust","getMarkerLabelStyle","textAnchor","getChartTitleStyles","marginBottom","spacingVerticalS","getChartTitleInlineStyles","titleFont","xanchor","yanchor","pad","styles","Object","assign","family","fontFamily","size","fontSize","weight","fontWeight","shadow","filter","anchorMap","left","center","right","alignmentKey","toLowerCase","top","middle","bottom","alignSelf","_pad_t","t","_pad_r","r","_pad_b","b","_pad_l","l"],"mappings":";;;;;;;;;;;IAKiBG,mBAAmB;;;IAevBgB,iBAAiB;;;oBAYD;eAAhBK;;6BAiCgCQ;eAAzBA;;uBAhBY;eAAnBH;;uBAVmB;;;mBAjCJ;;;;2BANS,gBAAgB;4BACZ,uBAAuB;AAIrD,4BAA4B,EAAE;AAClC,MAAMzB,kBAAkBA,CAAA,KAAI;IAC/B,OAAO;QACH,GAAGF,4BAAgB,CAACG,KAAK;QACzBC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE,QAAQ;QACvBC,OAAO,EAAEP,kBAAM,CAACQ,kBAAkB;QAClCC,QAAQ,EAAE,UAAU;QACpBC,SAAS,EAAE,QAAQ;QACnBC,eAAe,EAAEX,kBAAM,CAACY,uBAAuB;QAC/CC,YAAY,EAAEb,kBAAM,CAACc,iBAAiB;QACtCC,aAAa,EAAE,MAAM;QACrBC,KAAK,EAAEhB,kBAAM,CAACiB,uBAAAA;IAClB,CAAC;AACL,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,GAAG,CAACD,MAAM,GAAGxB,GAAG,CAACyB,CAAC,MAAM,IAAI,IAAID,MAAM,KAAK,KAAK,CAAC,GAAGA,MAAM,GAAG,CAAC;QACrE,IAAIE,MAAM;QACV,MAAMC,CAAC,GAAG,CAACD,MAAM,GAAG1B,GAAG,EAAC2B,AAAC,MAAM,IAAI,IAAID,MAAM,KAAK,KAAK,CAAC,GAAGA,MAAM,GAAG,CAAC;QACrE,IAAIE,MAAM;QACV,MAAMC,CAAC,GAAG,CAACD,MAAM,GAAG5B,GAAG,EAAC6B,AAAC,MAAM,IAAI,IAAID,MAAM,KAAK,KAAK,CAAC,GAAGA,MAAM,GAAG,CAAC;QACrE3B,MAAM,CAAC7B,OAAO,GAAG,GAAGmD,CAAC,CAAA,GAAA,EAAME,CAAC,CAAA,GAAA,EAAME,CAAC,CAAA,GAAA,EAAME,CAAC,CAAA,EAAA,CAAI;IAClD;IACA,OAAO5B,MAAM;AACjB"}
@@ -31,7 +31,7 @@ _export(exports, {
31
31
  return getTooltipStyle;
32
32
  }
33
33
  });
34
- const _utilities = require("../utilities/utilities");
34
+ const _utilities = require("./utilities.cjs");
35
35
  const _reacttheme = require("@fluentui/react-theme");
36
36
  const CHART_TITLE_PADDING = 20;
37
37
  const getTooltipStyle = ()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/Common.styles.ts"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { type GriffelStyle } from '@griffel/react';\nimport type { Font } from '@fluentui/chart-utilities';\n\n/**\n * Default padding below chart title (in pixels).\n * Used consistently across all chart types for spacing between title and chart content.\n */\nexport const CHART_TITLE_PADDING = 20;\n\n/**\n * Shared interface for chart title styling properties.\n * Used by components that display a chart title with customizable font, alignment, and padding.\n * {@docCategory TitleStyles}\n */\nexport interface TitleStyles {\n /**\n * Font configuration for the title\n */\n titleFont?: Partial<Font>;\n /**\n * Horizontal anchor/alignment for the chart title\n */\n titleXAnchor?: 'auto' | 'left' | 'center' | 'right';\n /**\n * Vertical anchor/alignment for the chart title\n */\n titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';\n /**\n * Padding for the chart title\n */\n titlePad?: { t?: number; r?: number; b?: number; l?: number };\n}\n\nexport const getTooltipStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: tokens.spacingHorizontalS,\n position: 'absolute',\n textAlign: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1,\n };\n};\n\nexport const getAxisTitleStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n\nexport const getBarLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption1Strong, // Confirm styles\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n };\n};\n\nexport const getMarkerLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n\nexport const getChartTitleStyles = (): GriffelStyle => {\n return {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n textAlign: 'center',\n marginBottom: tokens.spacingVerticalS,\n };\n};\n\n/**\n * Creates dynamic chart title styles using CSS properties.\n * @param titleFont - Optional font configuration from Plotly layout\n * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')\n * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')\n * @param pad - Optional padding configuration\n * @returns Style object with CSS properties for dynamic styling\n */\nexport function getChartTitleInlineStyles(\n titleFont: Partial<Font> | undefined,\n xanchor?: string,\n yanchor?: string,\n pad?: { t?: number; r?: number; b?: number; l?: number },\n): React.CSSProperties {\n const styles: React.CSSProperties = {};\n\n if (titleFont) {\n Object.assign(\n styles,\n titleFont.family && { fontFamily: titleFont.family },\n titleFont.size && { fontSize: `${titleFont.size}px` },\n titleFont.weight && { fontWeight: titleFont.weight },\n titleFont.color && { fill: titleFont.color as string },\n titleFont.shadow && titleFont.shadow !== 'none' && { filter: `drop-shadow(${titleFont.shadow})` },\n );\n }\n\n if (xanchor) {\n const anchorMap: Record<string, React.CSSProperties['textAlign']> = {\n left: 'left',\n center: 'center',\n right: 'right',\n };\n const alignmentKey = xanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.textAlign = anchorMap[alignmentKey];\n }\n }\n\n if (yanchor) {\n const anchorMap: Record<string, React.CSSProperties['alignSelf']> = {\n top: 'flex-start',\n middle: 'center',\n bottom: 'flex-end',\n };\n const alignmentKey = yanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.alignSelf = anchorMap[alignmentKey];\n }\n }\n\n if (pad) {\n const t = pad.t ?? 0;\n const r = pad.r ?? 0;\n const b = pad.b ?? 0;\n const l = pad.l ?? 0;\n styles.padding = `${t}px ${r}px ${b}px ${l}px`;\n }\n\n return styles;\n}\n"],"names":["HighContrastSelector","tokens","typographyStyles","CHART_TITLE_PADDING","getTooltipStyle","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","backgroundColor","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","getAxisTitleStyle","caption2Strong","fontStyle","colorNeutralForeground2","fill","getBarLabelStyle","caption1Strong","forcedColorAdjust","getMarkerLabelStyle","textAnchor","getChartTitleStyles","marginBottom","spacingVerticalS","getChartTitleInlineStyles","titleFont","xanchor","yanchor","pad","styles","Object","assign","family","fontFamily","size","fontSize","weight","fontWeight","shadow","filter","anchorMap","left","center","right","alignmentKey","toLowerCase","top","middle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AA,IAAAA,SAAS;YACTA;QAAV,MAAMwB,IAAIxB,CAAAA,SAAAA,KAAIwB,AAAC,MAAA,QAALxB,WAAAA,KAAAA,IAAAA,SAAS;YACTA;QAAV,MAAMyB,IAAIzB,CAAAA,SAAAA,KAAIyB,AAAC,MAAA,QAALzB,WAAAA,KAAAA,IAAAA,SAAS;QACnBC,OAAO7B,OAAO,GAAG,GAAGkD,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,EAAE,CAAC;IAChD;IAEA,OAAOxB;AACT"}
1
+ {"version":3,"sources":["../src/utilities/Common.styles.ts"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { type GriffelStyle } from '@griffel/react';\nimport type { Font } from '@fluentui/chart-utilities';\n\n/**\n * Default padding below chart title (in pixels).\n * Used consistently across all chart types for spacing between title and chart content.\n */\nexport const CHART_TITLE_PADDING = 20;\n\n/**\n * Shared interface for chart title styling properties.\n * Used by components that display a chart title with customizable font, alignment, and padding.\n * {@docCategory TitleStyles}\n */\nexport interface TitleStyles {\n /**\n * Font configuration for the title\n */\n titleFont?: Partial<Font>;\n /**\n * Horizontal anchor/alignment for the chart title\n */\n titleXAnchor?: 'auto' | 'left' | 'center' | 'right';\n /**\n * Vertical anchor/alignment for the chart title\n */\n titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';\n /**\n * Padding for the chart title\n */\n titlePad?: { t?: number; r?: number; b?: number; l?: number };\n}\n\nexport const getTooltipStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: tokens.spacingHorizontalS,\n position: 'absolute',\n textAlign: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1,\n };\n};\n\nexport const getAxisTitleStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n\nexport const getBarLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption1Strong, // Confirm styles\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n };\n};\n\nexport const getMarkerLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n\nexport const getChartTitleStyles = (): GriffelStyle => {\n return {\n ...typographyStyles.caption2Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n textAlign: 'center',\n marginBottom: tokens.spacingVerticalS,\n };\n};\n\n/**\n * Creates dynamic chart title styles using CSS properties.\n * @param titleFont - Optional font configuration from Plotly layout\n * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')\n * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')\n * @param pad - Optional padding configuration\n * @returns Style object with CSS properties for dynamic styling\n */\nexport function getChartTitleInlineStyles(\n titleFont: Partial<Font> | undefined,\n xanchor?: string,\n yanchor?: string,\n pad?: { t?: number; r?: number; b?: number; l?: number },\n): React.CSSProperties {\n const styles: React.CSSProperties = {};\n\n if (titleFont) {\n Object.assign(\n styles,\n titleFont.family && { fontFamily: titleFont.family },\n titleFont.size && { fontSize: `${titleFont.size}px` },\n titleFont.weight && { fontWeight: titleFont.weight },\n titleFont.color && { fill: titleFont.color as string },\n titleFont.shadow && titleFont.shadow !== 'none' && { filter: `drop-shadow(${titleFont.shadow})` },\n );\n }\n\n if (xanchor) {\n const anchorMap: Record<string, React.CSSProperties['textAlign']> = {\n left: 'left',\n center: 'center',\n right: 'right',\n };\n const alignmentKey = xanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.textAlign = anchorMap[alignmentKey];\n }\n }\n\n if (yanchor) {\n const anchorMap: Record<string, React.CSSProperties['alignSelf']> = {\n top: 'flex-start',\n middle: 'center',\n bottom: 'flex-end',\n };\n const alignmentKey = yanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.alignSelf = anchorMap[alignmentKey];\n }\n }\n\n if (pad) {\n const t = pad.t ?? 0;\n const r = pad.r ?? 0;\n const b = pad.b ?? 0;\n const l = pad.l ?? 0;\n styles.padding = `${t}px ${r}px ${b}px ${l}px`;\n }\n\n return styles;\n}\n"],"names":["HighContrastSelector","tokens","typographyStyles","CHART_TITLE_PADDING","getTooltipStyle","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","backgroundColor","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","getAxisTitleStyle","caption2Strong","fontStyle","colorNeutralForeground2","fill","getBarLabelStyle","caption1Strong","forcedColorAdjust","getMarkerLabelStyle","textAnchor","getChartTitleStyles","marginBottom","spacingVerticalS","getChartTitleInlineStyles","titleFont","xanchor","yanchor","pad","styles","Object","assign","family","fontFamily","size","fontSize","weight","fontWeight","shadow","filter","anchorMap","left","center","right","alignmentKey","toLowerCase","top","middle","bottom","alignSelf","t","r","b","l"],"mappings":";;;;;;;;;;;IASaG,mBAAAA;;;IAyCAgB,iBAAAA;;;oBAaAK;eAAAA;;6BAqCGQ;eAAAA;;uBAlBHH;eAAAA;;uBAXAF;;;mBApCAvB;;;;2BAnCwB,iBAAyB;4BACrB,wBAAwB;AAQ1D,4BAA4B,GAAG;AA0B/B,MAAMA,kBAAkB;IAC7B,OAAO;QACL,GAAGF,4BAAAA,CAAiBG,KAAK;QACzBC,SAAS;QACTC,eAAe;QACfC,SAASP,kBAAAA,CAAOQ,kBAAkB;QAClCC,UAAU;QACVC,WAAW;QACXC,iBAAiBX,kBAAAA,CAAOY,uBAAuB;QAC/CC,cAAcb,kBAAAA,CAAOc,iBAAiB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KAAK;QAAW,GACrDgB,UAAUa,MAAM,IAAIb,UAAUa,MAAM,KAAK,UAAU;YAAEC,QAAQ,CAAC,YAAY,EAAEd,UAAUa,MAAM,CAAC,CAAC,CAAC;QAAC;IAEpG;IAEA,IAAIZ,SAAS;QACX,MAAMc,YAA8D;YAClEC,MAAM;YACNC,QAAQ;YACRC,OAAO;QACT;QACA,MAAMC,eAAelB,QAAQmB,WAAW;QACxC,IAAIL,SAAS,CAACI,aAAa,EAAE;YAC3Bf,OAAO1B,SAAS,GAAGqC,SAAS,CAACI,aAAa;QAC5C;IACF;IAEA,IAAIjB,SAAS;QACX,MAAMa,YAA8D;YAClEM,KAAK;YACLC,QAAQ;YACRC,QAAQ;QACV;QACA,MAAMJ,eAAejB,QAAQkB,WAAW;QACxC,IAAIL,SAAS,CAACI,aAAa,EAAE;YAC3Bf,OAAOoB,SAAS,GAAGT,SAAS,CAACI,aAAa;QAC5C;IACF;IAEA,IAAIhB,KAAK;YACGA;QAAV,MAAMsB,IAAItB,CAAAA,SAAAA,KAAIsB,AAAC,MAAA,QAALtB,WAAAA,KAAAA,IAAAA,SAAS;YACTA;QAAV,MAAMuB,IAAIvB,CAAAA,SAAAA,IAAIuB,CAAC,MAAA,QAALvB,WAAAA,KAAAA,IAAAA,SAAS;YACTA;QAAV,MAAMwB,IAAIxB,CAAAA,SAAAA,KAAIwB,AAAC,MAAA,QAALxB,WAAAA,KAAAA,IAAAA,SAAS;YACTA;QAAV,MAAMyB,IAAIzB,CAAAA,SAAAA,KAAIyB,AAAC,MAAA,QAALzB,WAAAA,KAAAA,IAAAA,SAAS;QACnBC,OAAO7B,OAAO,GAAG,GAAGkD,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,EAAE,CAAC;IAChD;IAEA,OAAOxB;AACT"}
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "FocusableTooltipText", {
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
14
  const _reacttooltip = require("@fluentui/react-tooltip");
15
- const _overflowutils = require("./overflow-utils");
16
- const _index = require("./index");
17
- const _asyncutils = require("./async-utils");
15
+ const _overflowutils = require("./overflow-utils.cjs");
16
+ const _index = require("./index.cjs");
17
+ const _asyncutils = require("./async-utils.cjs");
18
18
  const FocusableTooltipText = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
19
19
  const [textOverflow, setTextOverflow] = (0, _react.useState)(false);
20
20
  const tooltipChild = (0, _react.useRef)(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/FocusableTooltipText.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCallback, useState, useEffect, useRef } from 'react';\nimport { Tooltip } from '@fluentui/react-tooltip';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { hasOverflow } from './overflow-utils';\nimport { getAccessibleDataObject } from './index';\nimport type { AccessibilityProps } from '../types/index';\nimport { Async } from './async-utils';\n\ninterface IFocusableTooltipTextProps {\n className?: string;\n content: string | JSXElement | JSXElement[];\n accessibilityData?: AccessibilityProps;\n}\n\nexport const FocusableTooltipText: React.FunctionComponent<IFocusableTooltipTextProps> = React.forwardRef<\n HTMLDivElement,\n IFocusableTooltipTextProps\n>((props, forwardedRef) => {\n const [textOverflow, setTextOverflow] = useState(false);\n const tooltipChild = useRef<HTMLSpanElement>(null);\n const async = useRef(new Async()).current;\n const resizeObserver = useRef<ResizeObserver | undefined>(undefined);\n\n const getTargetElement = useCallback((): HTMLElement | undefined => {\n if (!tooltipChild.current || !tooltipChild.current.parentElement) {\n return undefined;\n }\n return tooltipChild.current.parentElement;\n }, [tooltipChild]);\n\n const checkTextOverflow = useCallback(() => {\n const overflowElement = getTargetElement();\n const isTextOverflow = !!overflowElement && hasOverflow(overflowElement);\n if (isTextOverflow !== textOverflow) {\n setTextOverflow(isTextOverflow);\n }\n }, [getTargetElement, textOverflow, setTextOverflow]);\n\n useEffect(() => {\n checkTextOverflow();\n }, [checkTextOverflow]);\n\n useEffect(() => {\n // setup part executed only when the component mounts/updates\n const overflowElement = getTargetElement();\n if (window.ResizeObserver && overflowElement) {\n resizeObserver.current = new window.ResizeObserver(async.debounce(checkTextOverflow, 500));\n resizeObserver.current.observe(overflowElement);\n }\n // cleanup part executed only when the component unmounts\n return () => {\n resizeObserver.current?.disconnect();\n async.dispose();\n };\n }, [async, checkTextOverflow, getTargetElement]);\n\n return (\n <div className={props.className}>\n <Tooltip content={props.content} relationship=\"description\">\n <span {...getAccessibleDataObject(props.accessibilityData)} ref={tooltipChild} data-is-focusable={textOverflow}>\n {props.content}\n </span>\n </Tooltip>\n </div>\n );\n});\n"],"names":["React","useCallback","useState","useEffect","useRef","Tooltip","hasOverflow","getAccessibleDataObject","Async","FocusableTooltipText","forwardRef","props","forwardedRef","textOverflow","setTextOverflow","tooltipChild","async","current","resizeObserver","undefined","getTargetElement","parentElement","checkTextOverflow","overflowElement","isTextOverflow","window","ResizeObserver","debounce","observe","disconnect","dispose","div","className","content","relationship","span","accessibilityData","ref","data-is-focusable"],"mappings":"AAAA;;;;;+BAiBaS;;;;;;;iEAfU,QAAQ;8BAEP,0BAA0B;+BAEtB,mBAAmB;uBACP,UAAU;4BAE5B,gBAAgB;AAQ/B,6BAAMA,WAAAA,GAA4ET,OAAMU,UAAU,CAGvG,CAACC,OAAOC;IACR,MAAM,CAACC,cAAcC,gBAAgB,OAAGZ,eAAAA,EAAS;IACjD,MAAMa,mBAAeX,aAAAA,EAAwB;IAC7C,MAAMY,YAAQZ,aAAAA,EAAO,IAAII,iBAAAA,IAASS,OAAO;IACzC,MAAMC,qBAAiBd,aAAAA,EAAmCe;IAE1D,MAAMC,uBAAmBnB,kBAAAA,EAAY;QACnC,IAAI,CAACc,aAAaE,OAAO,IAAI,CAACF,aAAaE,OAAO,CAACI,aAAa,EAAE;YAChE,OAAOF;QACT;QACA,OAAOJ,aAAaE,OAAO,CAACI,aAAa;IAC3C,GAAG;QAACN;KAAa;IAEjB,MAAMO,wBAAoBrB,kBAAAA,EAAY;QACpC,MAAMsB,kBAAkBH;QACxB,MAAMI,iBAAiB,CAAC,CAACD,uBAAmBjB,0BAAAA,EAAYiB;QACxD,IAAIC,mBAAmBX,cAAc;YACnCC,gBAAgBU;QAClB;IACF,GAAG;QAACJ;QAAkBP;QAAcC;KAAgB;QAEpDX,gBAAAA,EAAU;QACRmB;IACF,GAAG;QAACA;KAAkB;QAEtBnB,gBAAAA,EAAU;QACR,6DAA6D;QAC7D,MAAMoB,kBAAkBH;QACxB,IAAIK,OAAOC,cAAc,IAAIH,iBAAiB;YAC5CL,eAAeD,OAAO,GAAG,IAAIQ,OAAOC,cAAc,CAACV,MAAMW,QAAQ,CAACL,mBAAmB;YACrFJ,eAAeD,OAAO,CAACW,OAAO,CAACL;QACjC;QACA,yDAAyD;QACzD,OAAO;gBACLL;aAAAA,0BAAAA,eAAeD,OAAAA,AAAO,MAAA,QAAtBC,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAwBW,UAAU;YAClCb,MAAMc,OAAO;QACf;IACF,GAAG;QAACd;QAAOM;QAAmBF;KAAiB;IAE/C,OAAA,WAAA,GACE,OAAA,aAAA,CAACW,OAAAA;QAAIC,WAAWrB,MAAMqB,SAAS;qBAC7B,OAAA,aAAA,CAAC3B,qBAAAA,EAAAA;QAAQ4B,SAAStB,MAAMsB,OAAO;QAAEC,cAAa;qBAC5C,OAAA,aAAA,CAACC,QAAAA;QAAM,OAAG5B,8BAAAA,EAAwBI,MAAMyB,iBAAiB,CAAC;QAAEC,KAAKtB;QAAcuB,qBAAmBzB;OAC/FF,MAAMsB,OAAO;AAKxB,GAAG"}
1
+ {"version":3,"sources":["../src/utilities/FocusableTooltipText.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCallback, useState, useEffect, useRef } from 'react';\nimport { Tooltip } from '@fluentui/react-tooltip';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { hasOverflow } from './overflow-utils';\nimport { getAccessibleDataObject } from './index';\nimport type { AccessibilityProps } from '../types/index';\nimport { Async } from './async-utils';\n\ninterface IFocusableTooltipTextProps {\n className?: string;\n content: string | JSXElement | JSXElement[];\n accessibilityData?: AccessibilityProps;\n}\n\nexport const FocusableTooltipText: React.FunctionComponent<IFocusableTooltipTextProps> = React.forwardRef<\n HTMLDivElement,\n IFocusableTooltipTextProps\n>((props, forwardedRef) => {\n const [textOverflow, setTextOverflow] = useState(false);\n const tooltipChild = useRef<HTMLSpanElement>(null);\n const async = useRef(new Async()).current;\n const resizeObserver = useRef<ResizeObserver | undefined>(undefined);\n\n const getTargetElement = useCallback((): HTMLElement | undefined => {\n if (!tooltipChild.current || !tooltipChild.current.parentElement) {\n return undefined;\n }\n return tooltipChild.current.parentElement;\n }, [tooltipChild]);\n\n const checkTextOverflow = useCallback(() => {\n const overflowElement = getTargetElement();\n const isTextOverflow = !!overflowElement && hasOverflow(overflowElement);\n if (isTextOverflow !== textOverflow) {\n setTextOverflow(isTextOverflow);\n }\n }, [getTargetElement, textOverflow, setTextOverflow]);\n\n useEffect(() => {\n checkTextOverflow();\n }, [checkTextOverflow]);\n\n useEffect(() => {\n // setup part executed only when the component mounts/updates\n const overflowElement = getTargetElement();\n if (window.ResizeObserver && overflowElement) {\n resizeObserver.current = new window.ResizeObserver(async.debounce(checkTextOverflow, 500));\n resizeObserver.current.observe(overflowElement);\n }\n // cleanup part executed only when the component unmounts\n return () => {\n resizeObserver.current?.disconnect();\n async.dispose();\n };\n }, [async, checkTextOverflow, getTargetElement]);\n\n return (\n <div className={props.className}>\n <Tooltip content={props.content} relationship=\"description\">\n <span {...getAccessibleDataObject(props.accessibilityData)} ref={tooltipChild} data-is-focusable={textOverflow}>\n {props.content}\n </span>\n </Tooltip>\n </div>\n );\n});\n"],"names":["React","useCallback","useState","useEffect","useRef","Tooltip","hasOverflow","getAccessibleDataObject","Async","FocusableTooltipText","forwardRef","props","forwardedRef","textOverflow","setTextOverflow","tooltipChild","async","current","resizeObserver","undefined","getTargetElement","parentElement","checkTextOverflow","overflowElement","isTextOverflow","window","ResizeObserver","debounce","observe","disconnect","dispose","div","className","content","relationship","span","accessibilityData","ref","data-is-focusable"],"mappings":"AAAA;;;;;+BAiBaS;;;;;;;iEAfU,QAAQ;8BAEP,0BAA0B;+BAEtB,sBAAmB;uBACP,aAAU;4BAE5B,mBAAgB;AAQ/B,6BAAMA,WAAAA,GAA4ET,OAAMU,UAAU,CAGvG,CAACC,OAAOC;IACR,MAAM,CAACC,cAAcC,gBAAgB,OAAGZ,eAAAA,EAAS;IACjD,MAAMa,mBAAeX,aAAAA,EAAwB;IAC7C,MAAMY,YAAQZ,aAAAA,EAAO,IAAII,iBAAAA,IAASS,OAAO;IACzC,MAAMC,qBAAiBd,aAAAA,EAAmCe;IAE1D,MAAMC,uBAAmBnB,kBAAAA,EAAY;QACnC,IAAI,CAACc,aAAaE,OAAO,IAAI,CAACF,aAAaE,OAAO,CAACI,aAAa,EAAE;YAChE,OAAOF;QACT;QACA,OAAOJ,aAAaE,OAAO,CAACI,aAAa;IAC3C,GAAG;QAACN;KAAa;IAEjB,MAAMO,wBAAoBrB,kBAAAA,EAAY;QACpC,MAAMsB,kBAAkBH;QACxB,MAAMI,iBAAiB,CAAC,CAACD,uBAAmBjB,0BAAAA,EAAYiB;QACxD,IAAIC,mBAAmBX,cAAc;YACnCC,gBAAgBU;QAClB;IACF,GAAG;QAACJ;QAAkBP;QAAcC;KAAgB;QAEpDX,gBAAAA,EAAU;QACRmB;IACF,GAAG;QAACA;KAAkB;QAEtBnB,gBAAAA,EAAU;QACR,6DAA6D;QAC7D,MAAMoB,kBAAkBH;QACxB,IAAIK,OAAOC,cAAc,IAAIH,iBAAiB;YAC5CL,eAAeD,OAAO,GAAG,IAAIQ,OAAOC,cAAc,CAACV,MAAMW,QAAQ,CAACL,mBAAmB;YACrFJ,eAAeD,OAAO,CAACW,OAAO,CAACL;QACjC;QACA,yDAAyD;QACzD,OAAO;gBACLL;aAAAA,0BAAAA,eAAeD,OAAAA,AAAO,MAAA,QAAtBC,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAwBW,UAAU;YAClCb,MAAMc,OAAO;QACf;IACF,GAAG;QAACd;QAAOM;QAAmBF;KAAiB;IAE/C,OAAA,WAAA,GACE,OAAA,aAAA,CAACW,OAAAA;QAAIC,WAAWrB,MAAMqB,SAAS;qBAC7B,OAAA,aAAA,CAAC3B,qBAAAA,EAAAA;QAAQ4B,SAAStB,MAAMsB,OAAO;QAAEC,cAAa;qBAC5C,OAAA,aAAA,CAACC,QAAAA;QAAM,OAAG5B,8BAAAA,EAAwBI,MAAMyB,iBAAiB,CAAC;QAAEC,KAAKtB;QAAcuB,qBAAmBzB;OAC/FF,MAAMsB,OAAO;AAKxB,GAAG"}
@@ -13,8 +13,8 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
14
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
15
  const _reacttooltip = require("@fluentui/react-tooltip");
16
- const _asyncutils = require("./async-utils");
17
- const _KeyCodes = require("./KeyCodes");
16
+ const _asyncutils = require("./async-utils.cjs");
17
+ const _KeyCodes = require("./KeyCodes.cjs");
18
18
  const _reactutilities = require("@fluentui/react-utilities");
19
19
  const SVGTooltipText = /*#__PURE__*/ _react.forwardRef(({ delay = 0, showBackground = false, ...restProps }, forwardedRef)=>{
20
20
  var _props_textProps, _props_textProps1, _props_textProps2;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/SVGTooltipText.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useState, useRef, useEffect, useCallback } from 'react';\nimport { usePortalMountNode } from '@fluentui/react-shared-contexts';\nimport { Tooltip } from '@fluentui/react-tooltip';\nimport { Async } from './async-utils';\nimport { KeyCodes } from './KeyCodes';\nimport { useId } from '@fluentui/react-utilities';\n\nexport interface SVGTooltipTextProps {\n closeDelay?: number;\n content: string;\n delay?: number;\n tooltipProps?: React.ComponentProps<typeof Tooltip>;\n textProps?: React.SVGAttributes<SVGTextElement>;\n maxWidth?: number;\n maxHeight?: number;\n shouldReceiveFocus?: boolean;\n isTooltipVisibleProp?: boolean;\n wrapContent?: (content: string, id: string, maxWidth: number, maxHeight?: number) => boolean;\n showBackground?: boolean;\n className?: string;\n}\n\nexport const SVGTooltipText: React.FunctionComponent<SVGTooltipTextProps> = React.forwardRef<\n HTMLDivElement,\n SVGTooltipTextProps\n>(({ delay = 0, showBackground = false, ...restProps }, forwardedRef) => {\n const props = { delay, showBackground, ...restProps };\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isOverflowing, setIsOverflowing] = useState(false);\n const [textWidth, setTextWidth] = useState(0);\n const [textHeight, setTextHeight] = useState(0);\n\n const tooltipHostRef = useRef<SVGTextElement>(null);\n const async = useRef(new Async()).current;\n const dismissTimerId = useRef<number | undefined>(undefined);\n const openTimerId = useRef<number | undefined>(undefined);\n const tooltipHostId = useRef(useId('tooltip-host')).current;\n const ignoreNextFocusEvent = useRef<boolean>(false);\n const portalMountNode = usePortalMountNode();\n const PADDING = 3;\n\n const wrapContentCallback = useCallback(() => {\n if (\n props.content &&\n props.wrapContent &&\n props.wrapContent(props.content, tooltipHostId, props.maxWidth ?? 100, props.maxHeight)\n // ToDo - Specify a correct fallback value here\n ) {\n setIsOverflowing(true);\n } else {\n setIsOverflowing(false);\n }\n }, [props, tooltipHostId]);\n\n const measureText = useCallback((): void => {\n if (tooltipHostRef.current && typeof tooltipHostRef.current.getBBox === 'function') {\n const bbox = tooltipHostRef.current.getBBox();\n setTextWidth(bbox.width);\n setTextHeight(bbox.height);\n }\n }, []);\n\n useEffect(() => {\n wrapContentCallback();\n return () => {\n async.dispose();\n };\n }, [wrapContentCallback, async]);\n\n useEffect(() => {\n wrapContentCallback();\n }, [props.maxWidth, props.maxHeight, wrapContentCallback]);\n\n useEffect(() => {\n if (isTooltipVisible) {\n measureText();\n }\n }, [isTooltipVisible, measureText]);\n\n useEffect(() => {\n // Recalculate text dimensions when content or dimensions change\n measureText();\n }, [props.content, props.textProps, props.maxWidth, props.maxHeight, measureText]);\n\n const hideTooltip = useCallback(() => {\n async.clearTimeout(openTimerId.current!);\n async.clearTimeout(dismissTimerId.current!);\n setIsTooltipVisible(false);\n }, [async]);\n\n const onTooltipMouseEnter = useCallback(\n (ev: React.MouseEvent<SVGElement>) => {\n if (!isOverflowing) {\n return;\n }\n\n if (ev.target && portalMountNode?.contains(ev.target as HTMLElement)) {\n return;\n }\n\n async.clearTimeout(dismissTimerId.current!);\n async.clearTimeout(openTimerId.current!);\n\n if (props.delay !== 0) {\n openTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(true);\n }, props.delay!);\n } else {\n setIsTooltipVisible(true);\n }\n },\n [isOverflowing, portalMountNode, async, props.delay],\n );\n\n const onTooltipMouseLeave = useCallback(\n (ev: React.MouseEvent<SVGElement>) => {\n async.clearTimeout(dismissTimerId.current!);\n async.clearTimeout(openTimerId.current!);\n\n if (props.closeDelay) {\n dismissTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(false);\n }, props.closeDelay);\n } else {\n setIsTooltipVisible(false);\n }\n },\n [async, props.closeDelay],\n );\n\n const onTooltipFocus = useCallback(\n (ev: React.FocusEvent<SVGElement>) => {\n if (ignoreNextFocusEvent.current) {\n ignoreNextFocusEvent.current = false;\n return;\n }\n onTooltipMouseEnter(ev as unknown as React.MouseEvent<SVGElement>);\n },\n [onTooltipMouseEnter],\n );\n\n const onTooltipBlur = useCallback(\n (ev: React.FocusEvent<SVGElement>) => {\n ignoreNextFocusEvent.current = document?.activeElement === ev.target;\n dismissTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(false);\n }, 0);\n },\n [async],\n );\n\n const onTooltipKeyDown = useCallback(\n (ev: React.KeyboardEvent<SVGElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if ((ev.which === KeyCodes.escape || ev.ctrlKey) && isTooltipVisible) {\n hideTooltip();\n ev.stopPropagation();\n }\n },\n [isTooltipVisible, hideTooltip],\n );\n\n const showTooltip =\n (props.isTooltipVisibleProp && isOverflowing && !!props.content) || (isTooltipVisible && !!props.content);\n\n const rectX = (typeof props.textProps?.x === 'number' ? props.textProps.x : 0) - (textWidth ?? 0) / 2 - PADDING;\n const rectY = (typeof props.textProps?.y === 'number' ? props.textProps.y : 0) - (textHeight ?? 0) / 2 - 2 * PADDING;\n\n return (\n <>\n {props.showBackground && (\n <rect\n x={rectX}\n y={rectY}\n width={(textWidth ?? 0) + 2 * PADDING}\n height={(textHeight ?? 0) + PADDING}\n transform={props.textProps?.transform}\n className={props.className}\n />\n )}\n <Tooltip\n relationship=\"description\"\n {...props.tooltipProps}\n withArrow\n content={props.content}\n // targetElement={getTargetElement()} ToDo - This assignment is causing build failure. Needs to be fixed.\n visible={showTooltip}\n >\n <text\n {...props.textProps}\n id={tooltipHostId}\n ref={tooltipHostRef}\n onFocusCapture={onTooltipFocus}\n onBlurCapture={onTooltipBlur}\n onMouseEnter={onTooltipMouseEnter}\n onMouseLeave={onTooltipMouseLeave}\n onKeyDown={onTooltipKeyDown}\n data-is-focusable={props.shouldReceiveFocus && isOverflowing}\n >\n {props.content}\n </text>\n </Tooltip>\n </>\n );\n});\n"],"names":["React","useState","useRef","useEffect","useCallback","usePortalMountNode","Tooltip","Async","KeyCodes","useId","SVGTooltipText","forwardRef","delay","showBackground","restProps","forwardedRef","props","isTooltipVisible","setIsTooltipVisible","isOverflowing","setIsOverflowing","textWidth","setTextWidth","textHeight","setTextHeight","tooltipHostRef","async","current","dismissTimerId","undefined","openTimerId","tooltipHostId","ignoreNextFocusEvent","portalMountNode","PADDING","wrapContentCallback","content","wrapContent","maxWidth","maxHeight","measureText","getBBox","bbox","width","height","dispose","textProps","hideTooltip","clearTimeout","onTooltipMouseEnter","ev","target","contains","setTimeout","onTooltipMouseLeave","closeDelay","onTooltipFocus","onTooltipBlur","document","activeElement","onTooltipKeyDown","which","escape","ctrlKey","stopPropagation","showTooltip","isTooltipVisibleProp","rectX","x","rectY","y","rect","transform","className","relationship","tooltipProps","withArrow","visible","text","id","ref","onFocusCapture","onBlurCapture","onMouseEnter","onMouseLeave","onKeyDown","data-is-focusable","shouldReceiveFocus"],"mappings":"AAAA;;;;;+BAyBaU;;;;;;;iEAvBU,QAAQ;qCAEI,kCAAkC;8BAC7C,0BAA0B;4BAC5B,gBAAgB;0BACb,aAAa;gCAChB,4BAA4B;AAiB3C,uBAAMA,WAAAA,GAA+DV,OAAMW,UAAU,CAG1F,CAAC,EAAEC,QAAQ,CAAC,EAAEC,iBAAiB,KAAK,EAAE,GAAGC,WAAW,EAAEC;QA4IhCC,kBACAA,mBAUHA;IAtJnB,MAAMA,QAAQ;QAAEJ;QAAOC;QAAgB,GAAGC,SAAS;IAAC;IACpD,MAAM,CAACG,kBAAkBC,oBAAoB,OAAGjB,eAAAA,EAAS;IACzD,MAAM,CAACkB,eAAeC,iBAAiB,OAAGnB,eAAAA,EAAS;IACnD,MAAM,CAACoB,WAAWC,aAAa,OAAGrB,eAAAA,EAAS;IAC3C,MAAM,CAACsB,YAAYC,cAAc,OAAGvB,eAAAA,EAAS;IAE7C,MAAMwB,iBAAiBvB,iBAAAA,EAAuB;IAC9C,MAAMwB,YAAQxB,aAAAA,EAAO,IAAIK,iBAAAA,IAASoB,OAAO;IACzC,MAAMC,qBAAiB1B,aAAAA,EAA2B2B;IAClD,MAAMC,kBAAc5B,aAAAA,EAA2B2B;IAC/C,MAAME,oBAAgB7B,aAAAA,EAAOO,yBAAAA,EAAM,iBAAiBkB,OAAO;IAC3D,MAAMK,2BAAuB9B,aAAAA,EAAgB;IAC7C,MAAM+B,sBAAkB5B,uCAAAA;IACxB,MAAM6B,UAAU;IAEhB,MAAMC,0BAAsB/B,kBAAAA,EAAY;YAIYY;QAHlD,IACEA,MAAMoB,OAAO,IACbpB,MAAMqB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AA,IAAAA,cAAc,CAAA,GAAKW;QAC5BsC,SAAS,EAAA,CAAExD,oBAAAA,MAAM8B,SAAAA,AAAS,MAAA,QAAf9B,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAiBwD,SAAS;QACrCC,WAAWzD,MAAMyD,SAAS;sBAG9B,OAAA,aAAA,CAACnE,qBAAAA,EAAAA;QACCoE,cAAa;QACZ,GAAG1D,MAAM2D,YAAY;QACtBC,WAAAA;QACAxC,SAASpB,MAAMoB,OAAO;QACtB,yGAAyG;QACzGyC,SAASZ;qBAET,OAAA,aAAA,CAACa,QAAAA;QACE,GAAG9D,MAAM8B,SAAS;QACnBiC,IAAIhD;QACJiD,KAAKvD;QACLwD,gBAAgBzB;QAChB0B,eAAezB;QACf0B,cAAclC;QACdmC,cAAc9B;QACd+B,WAAWzB;QACX0B,qBAAmBtE,MAAMuE,kBAAkB,IAAIpE;OAE9CH,MAAMoB,OAAO;AAKxB,GAAG"}
1
+ {"version":3,"sources":["../src/utilities/SVGTooltipText.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useState, useRef, useEffect, useCallback } from 'react';\nimport { usePortalMountNode } from '@fluentui/react-shared-contexts';\nimport { Tooltip } from '@fluentui/react-tooltip';\nimport { Async } from './async-utils';\nimport { KeyCodes } from './KeyCodes';\nimport { useId } from '@fluentui/react-utilities';\n\nexport interface SVGTooltipTextProps {\n closeDelay?: number;\n content: string;\n delay?: number;\n tooltipProps?: React.ComponentProps<typeof Tooltip>;\n textProps?: React.SVGAttributes<SVGTextElement>;\n maxWidth?: number;\n maxHeight?: number;\n shouldReceiveFocus?: boolean;\n isTooltipVisibleProp?: boolean;\n wrapContent?: (content: string, id: string, maxWidth: number, maxHeight?: number) => boolean;\n showBackground?: boolean;\n className?: string;\n}\n\nexport const SVGTooltipText: React.FunctionComponent<SVGTooltipTextProps> = React.forwardRef<\n HTMLDivElement,\n SVGTooltipTextProps\n>(({ delay = 0, showBackground = false, ...restProps }, forwardedRef) => {\n const props = { delay, showBackground, ...restProps };\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isOverflowing, setIsOverflowing] = useState(false);\n const [textWidth, setTextWidth] = useState(0);\n const [textHeight, setTextHeight] = useState(0);\n\n const tooltipHostRef = useRef<SVGTextElement>(null);\n const async = useRef(new Async()).current;\n const dismissTimerId = useRef<number | undefined>(undefined);\n const openTimerId = useRef<number | undefined>(undefined);\n const tooltipHostId = useRef(useId('tooltip-host')).current;\n const ignoreNextFocusEvent = useRef<boolean>(false);\n const portalMountNode = usePortalMountNode();\n const PADDING = 3;\n\n const wrapContentCallback = useCallback(() => {\n if (\n props.content &&\n props.wrapContent &&\n props.wrapContent(props.content, tooltipHostId, props.maxWidth ?? 100, props.maxHeight)\n // ToDo - Specify a correct fallback value here\n ) {\n setIsOverflowing(true);\n } else {\n setIsOverflowing(false);\n }\n }, [props, tooltipHostId]);\n\n const measureText = useCallback((): void => {\n if (tooltipHostRef.current && typeof tooltipHostRef.current.getBBox === 'function') {\n const bbox = tooltipHostRef.current.getBBox();\n setTextWidth(bbox.width);\n setTextHeight(bbox.height);\n }\n }, []);\n\n useEffect(() => {\n wrapContentCallback();\n return () => {\n async.dispose();\n };\n }, [wrapContentCallback, async]);\n\n useEffect(() => {\n wrapContentCallback();\n }, [props.maxWidth, props.maxHeight, wrapContentCallback]);\n\n useEffect(() => {\n if (isTooltipVisible) {\n measureText();\n }\n }, [isTooltipVisible, measureText]);\n\n useEffect(() => {\n // Recalculate text dimensions when content or dimensions change\n measureText();\n }, [props.content, props.textProps, props.maxWidth, props.maxHeight, measureText]);\n\n const hideTooltip = useCallback(() => {\n async.clearTimeout(openTimerId.current!);\n async.clearTimeout(dismissTimerId.current!);\n setIsTooltipVisible(false);\n }, [async]);\n\n const onTooltipMouseEnter = useCallback(\n (ev: React.MouseEvent<SVGElement>) => {\n if (!isOverflowing) {\n return;\n }\n\n if (ev.target && portalMountNode?.contains(ev.target as HTMLElement)) {\n return;\n }\n\n async.clearTimeout(dismissTimerId.current!);\n async.clearTimeout(openTimerId.current!);\n\n if (props.delay !== 0) {\n openTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(true);\n }, props.delay!);\n } else {\n setIsTooltipVisible(true);\n }\n },\n [isOverflowing, portalMountNode, async, props.delay],\n );\n\n const onTooltipMouseLeave = useCallback(\n (ev: React.MouseEvent<SVGElement>) => {\n async.clearTimeout(dismissTimerId.current!);\n async.clearTimeout(openTimerId.current!);\n\n if (props.closeDelay) {\n dismissTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(false);\n }, props.closeDelay);\n } else {\n setIsTooltipVisible(false);\n }\n },\n [async, props.closeDelay],\n );\n\n const onTooltipFocus = useCallback(\n (ev: React.FocusEvent<SVGElement>) => {\n if (ignoreNextFocusEvent.current) {\n ignoreNextFocusEvent.current = false;\n return;\n }\n onTooltipMouseEnter(ev as unknown as React.MouseEvent<SVGElement>);\n },\n [onTooltipMouseEnter],\n );\n\n const onTooltipBlur = useCallback(\n (ev: React.FocusEvent<SVGElement>) => {\n ignoreNextFocusEvent.current = document?.activeElement === ev.target;\n dismissTimerId.current = async.setTimeout(() => {\n setIsTooltipVisible(false);\n }, 0);\n },\n [async],\n );\n\n const onTooltipKeyDown = useCallback(\n (ev: React.KeyboardEvent<SVGElement>) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if ((ev.which === KeyCodes.escape || ev.ctrlKey) && isTooltipVisible) {\n hideTooltip();\n ev.stopPropagation();\n }\n },\n [isTooltipVisible, hideTooltip],\n );\n\n const showTooltip =\n (props.isTooltipVisibleProp && isOverflowing && !!props.content) || (isTooltipVisible && !!props.content);\n\n const rectX = (typeof props.textProps?.x === 'number' ? props.textProps.x : 0) - (textWidth ?? 0) / 2 - PADDING;\n const rectY = (typeof props.textProps?.y === 'number' ? props.textProps.y : 0) - (textHeight ?? 0) / 2 - 2 * PADDING;\n\n return (\n <>\n {props.showBackground && (\n <rect\n x={rectX}\n y={rectY}\n width={(textWidth ?? 0) + 2 * PADDING}\n height={(textHeight ?? 0) + PADDING}\n transform={props.textProps?.transform}\n className={props.className}\n />\n )}\n <Tooltip\n relationship=\"description\"\n {...props.tooltipProps}\n withArrow\n content={props.content}\n // targetElement={getTargetElement()} ToDo - This assignment is causing build failure. Needs to be fixed.\n visible={showTooltip}\n >\n <text\n {...props.textProps}\n id={tooltipHostId}\n ref={tooltipHostRef}\n onFocusCapture={onTooltipFocus}\n onBlurCapture={onTooltipBlur}\n onMouseEnter={onTooltipMouseEnter}\n onMouseLeave={onTooltipMouseLeave}\n onKeyDown={onTooltipKeyDown}\n data-is-focusable={props.shouldReceiveFocus && isOverflowing}\n >\n {props.content}\n </text>\n </Tooltip>\n </>\n );\n});\n"],"names":["React","useState","useRef","useEffect","useCallback","usePortalMountNode","Tooltip","Async","KeyCodes","useId","SVGTooltipText","forwardRef","delay","showBackground","restProps","forwardedRef","props","isTooltipVisible","setIsTooltipVisible","isOverflowing","setIsOverflowing","textWidth","setTextWidth","textHeight","setTextHeight","tooltipHostRef","async","current","dismissTimerId","undefined","openTimerId","tooltipHostId","ignoreNextFocusEvent","portalMountNode","PADDING","wrapContentCallback","content","wrapContent","maxWidth","maxHeight","measureText","getBBox","bbox","width","height","dispose","textProps","hideTooltip","clearTimeout","onTooltipMouseEnter","ev","target","contains","setTimeout","onTooltipMouseLeave","closeDelay","onTooltipFocus","onTooltipBlur","document","activeElement","onTooltipKeyDown","which","escape","ctrlKey","stopPropagation","showTooltip","isTooltipVisibleProp","rectX","x","rectY","y","rect","transform","className","relationship","tooltipProps","withArrow","visible","text","id","ref","onFocusCapture","onBlurCapture","onMouseEnter","onMouseLeave","onKeyDown","data-is-focusable","shouldReceiveFocus"],"mappings":"AAAA;;;;;+BAyBaU;;;;;;;iEAvBU,QAAQ;qCAEI,kCAAkC;8BAC7C,0BAA0B;4BAC5B,mBAAgB;0BACb,gBAAa;gCAChB,4BAA4B;AAiB3C,uBAAMA,WAAAA,GAA+DV,OAAMW,UAAU,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AM8B,SAAS;QACnBiC,IAAIhD;QACJiD,KAAKvD;QACLwD,gBAAgBzB;QAChB0B,eAAezB;QACf0B,cAAclC;QACdmC,cAAc9B;QACd+B,WAAWzB;QACX0B,qBAAmBtE,MAAMuE,kBAAkB,IAAIpE;OAE9CH,MAAMoB,OAAO;AAKxB,GAAG"}
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "Async", {
9
9
  }
10
10
  });
11
11
  const _define_property = require("@swc/helpers/_/_define_property");
12
- const _getWindow = require("./getWindow");
12
+ const _getWindow = require("./getWindow.cjs");
13
13
  class Async {
14
14
  /**
15
15
  * Dispose function, clears all async operations.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/async-utils.ts"],"sourcesContent":["import { getWindow } from './getWindow';\n\ndeclare function setTimeout(cb: Function, delay: number): number;\ndeclare function setInterval(cb: Function, delay: number): number;\n\n/**\n * Bugs often appear in async code when stuff gets disposed, but async operations don't get canceled.\n * This Async helper class solves these issues by tying async code to the lifetime of a disposable object.\n *\n * Usage: Anything class extending from BaseModel can access this helper via this.async. Otherwise create a\n * new instance of the class and remember to call dispose() during your code's dispose handler.\n *\n * @public\n */\nexport class Async {\n private _timeoutIds: { [id: number]: boolean } | null = null;\n private _immediateIds: { [id: number]: boolean } | null = null;\n private _intervalIds: { [id: number]: boolean } | null = null;\n private _animationFrameIds: { [id: number]: boolean } | null = null;\n private _isDisposed: boolean;\n private _parent: object | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onErrorHandler: ((e: any) => void) | undefined;\n private _noop: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(parent?: object, onError?: (e: any) => void) {\n this._isDisposed = false;\n this._parent = parent || null;\n this._onErrorHandler = onError;\n this._noop = () => {\n /* do nothing */\n };\n }\n\n /**\n * Dispose function, clears all async operations.\n */\n public dispose(): void {\n let id;\n\n this._isDisposed = true;\n this._parent = null;\n\n // Clear timeouts.\n if (this._timeoutIds) {\n for (id in this._timeoutIds) {\n if (this._timeoutIds.hasOwnProperty(id)) {\n this.clearTimeout(parseInt(id, 10));\n }\n }\n\n this._timeoutIds = null;\n }\n\n // Clear immediates.\n if (this._immediateIds) {\n for (id in this._immediateIds) {\n if (this._immediateIds.hasOwnProperty(id)) {\n this.clearImmediate(parseInt(id, 10));\n }\n }\n\n this._immediateIds = null;\n }\n\n // Clear intervals.\n if (this._intervalIds) {\n for (id in this._intervalIds) {\n if (this._intervalIds.hasOwnProperty(id)) {\n this.clearInterval(parseInt(id, 10));\n }\n }\n this._intervalIds = null;\n }\n\n // Clear animation frames.\n if (this._animationFrameIds) {\n for (id in this._animationFrameIds) {\n if (this._animationFrameIds.hasOwnProperty(id)) {\n this.cancelAnimationFrame(parseInt(id, 10));\n }\n }\n\n this._animationFrameIds = null;\n }\n }\n\n /**\n * SetTimeout override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n public setTimeout(callback: () => void, duration: number): number {\n let timeoutId = 0;\n\n if (!this._isDisposed) {\n if (!this._timeoutIds) {\n this._timeoutIds = {};\n }\n\n timeoutId = setTimeout(() => {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n\n try {\n // Now delete the record and call the callback.\n if (this._timeoutIds) {\n delete this._timeoutIds[timeoutId];\n }\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n }, duration);\n\n this._timeoutIds[timeoutId] = true;\n }\n\n return timeoutId;\n }\n\n /**\n * Clears the timeout.\n * @param id - Id to cancel.\n */\n public clearTimeout(id: number): void {\n if (this._timeoutIds && this._timeoutIds[id]) {\n clearTimeout(id);\n delete this._timeoutIds[id];\n }\n }\n\n /**\n * SetImmediate override, which will auto cancel the immediate during dispose.\n * @param callback - Callback to execute.\n * @param targetElement - Optional target element to use for identifying the correct window.\n * @returns The setTimeout id.\n */\n public setImmediate(callback: () => void, targetElement?: Element | null): number {\n let immediateId = 0;\n const win = getWindow(targetElement)!;\n\n if (!this._isDisposed) {\n if (!this._immediateIds) {\n this._immediateIds = {};\n }\n\n const setImmediateCallback = () => {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n\n try {\n // Now delete the record and call the callback.\n if (this._immediateIds) {\n delete this._immediateIds[immediateId];\n }\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n };\n\n immediateId = win.setTimeout(setImmediateCallback, 0);\n\n this._immediateIds[immediateId] = true;\n }\n\n return immediateId;\n }\n\n /**\n * Clears the immediate.\n * @param id - Id to cancel.\n * @param targetElement - Optional target element to use for identifying the correct window.\n */\n public clearImmediate(id: number, targetElement?: Element | null): void {\n const win = getWindow(targetElement)!;\n\n if (this._immediateIds && this._immediateIds[id]) {\n win.clearTimeout(id);\n delete this._immediateIds[id];\n }\n }\n\n /**\n * SetInterval override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n public setInterval(callback: () => void, duration: number): number {\n let intervalId = 0;\n\n if (!this._isDisposed) {\n if (!this._intervalIds) {\n this._intervalIds = {};\n }\n\n intervalId = setInterval(() => {\n // Time to execute the interval callback, enqueue it as a foreground task to be executed.\n try {\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n }, duration);\n\n this._intervalIds[intervalId] = true;\n }\n\n return intervalId;\n }\n\n /**\n * Clears the interval.\n * @param id - Id to cancel.\n */\n public clearInterval(id: number): void {\n if (this._intervalIds && this._intervalIds[id]) {\n clearInterval(id);\n delete this._intervalIds[id];\n }\n }\n\n /**\n * Creates a function that, when executed, will only call the func function at most once per\n * every wait milliseconds. Provide an options object to indicate that func should be invoked\n * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled\n * function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the throttled function is invoked more than once during the wait timeout.\n *\n * @param func - The function to throttle.\n * @param wait - The number of milliseconds to throttle executions to. Defaults to 0.\n * @param options - The options object.\n * @returns The new throttled function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public throttle<T extends (...args: any[]) => any>(\n func: T,\n wait?: number,\n options?: {\n leading?: boolean;\n trailing?: boolean;\n },\n ): T {\n if (this._isDisposed) {\n return this._noop as T;\n }\n\n const waitMS = wait || 0;\n let leading = true;\n let trailing = true;\n let lastExecuteTime = 0;\n let lastResult: T;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let lastArgs: any[];\n let timeoutId: number | null = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n const callback = (userCall?: boolean) => {\n const now = Date.now();\n const delta = now - lastExecuteTime;\n const waitLength = leading ? waitMS - delta : waitMS;\n if (delta >= waitMS && (!userCall || leading)) {\n lastExecuteTime = now;\n if (timeoutId) {\n this.clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastResult = func.apply(this._parent, lastArgs);\n } else if (timeoutId === null && trailing) {\n timeoutId = this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const resultFunction = ((...args: any[]): any => {\n lastArgs = args;\n return callback(true);\n }) as T;\n\n return resultFunction;\n }\n\n /**\n * Creates a function that will delay the execution of func until after wait milliseconds have\n * elapsed since the last time it was invoked. Provide an options object to indicate that func\n * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls\n * to the debounced function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the debounced function is invoked more than once during the wait\n * timeout.\n *\n * @param func - The function to debounce.\n * @param wait - The number of milliseconds to delay.\n * @param options - The options object.\n * @returns The new debounced function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public debounce<T extends (...args: any[]) => any>(\n func: T,\n wait?: number,\n options?: {\n leading?: boolean;\n maxWait?: number;\n trailing?: boolean;\n },\n ): ICancelable<T> & T {\n if (this._isDisposed) {\n const noOpFunction = (() => {\n /** Do nothing */\n }) as ICancelable<T> & T;\n\n noOpFunction.cancel = () => {\n return;\n };\n noOpFunction.flush = (() => null) as unknown as () => ReturnType<T>;\n noOpFunction.pending = () => false;\n\n return noOpFunction;\n }\n\n const waitMS = wait || 0;\n let leading = false;\n let trailing = true;\n let maxWait: number | null = null;\n let lastCallTime = 0;\n let lastExecuteTime = Date.now();\n let lastResult: ReturnType<T>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let lastArgs: any[];\n let timeoutId: number | null = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n if (options && typeof options.maxWait === 'number' && !isNaN(options.maxWait)) {\n maxWait = options.maxWait;\n }\n\n const markExecuted = (time: number) => {\n if (timeoutId) {\n this.clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastExecuteTime = time;\n };\n\n const invokeFunction = (time: number) => {\n markExecuted(time);\n lastResult = func.apply(this._parent, lastArgs);\n };\n\n const callback = (userCall?: boolean) => {\n const now = Date.now();\n let executeImmediately = false;\n if (userCall) {\n if (leading && now - lastCallTime >= waitMS) {\n executeImmediately = true;\n }\n lastCallTime = now;\n }\n const delta = now - lastCallTime;\n let waitLength = waitMS - delta;\n const maxWaitDelta = now - lastExecuteTime;\n let maxWaitExpired = false;\n\n if (maxWait !== null) {\n // maxWait only matters when there is a pending callback\n if (maxWaitDelta >= maxWait && timeoutId) {\n maxWaitExpired = true;\n } else {\n waitLength = Math.min(waitLength, maxWait - maxWaitDelta);\n }\n }\n\n if (delta >= waitMS || maxWaitExpired || executeImmediately) {\n invokeFunction(now);\n } else if ((timeoutId === null || !userCall) && trailing) {\n timeoutId = this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n };\n\n const pending = (): boolean => {\n return !!timeoutId;\n };\n\n const cancel = (): void => {\n if (pending()) {\n // Mark the debounced function as having executed\n markExecuted(Date.now());\n }\n };\n\n const flush = () => {\n if (pending()) {\n invokeFunction(Date.now());\n }\n\n return lastResult;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const resultFunction = ((...args: any[]) => {\n lastArgs = args;\n return callback(true);\n }) as ICancelable<T> & T;\n\n resultFunction.cancel = cancel;\n resultFunction.flush = flush;\n resultFunction.pending = pending;\n\n return resultFunction;\n }\n\n public requestAnimationFrame(callback: () => void, targetElement?: Element | null): number {\n let animationFrameId = 0;\n const win = getWindow(targetElement)!;\n\n if (!this._isDisposed) {\n if (!this._animationFrameIds) {\n this._animationFrameIds = {};\n }\n\n const animationFrameCallback = () => {\n try {\n // Now delete the record and call the callback.\n if (this._animationFrameIds) {\n delete this._animationFrameIds[animationFrameId];\n }\n\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n };\n\n animationFrameId = win.requestAnimationFrame\n ? win.requestAnimationFrame(animationFrameCallback)\n : win.setTimeout(animationFrameCallback, 0);\n\n this._animationFrameIds[animationFrameId] = true;\n }\n\n return animationFrameId;\n }\n\n public cancelAnimationFrame(id: number, targetElement?: Element | null): void {\n const win = getWindow(targetElement)!;\n\n if (this._animationFrameIds && this._animationFrameIds[id]) {\n win.cancelAnimationFrame ? win.cancelAnimationFrame(id) : win.clearTimeout(id);\n delete this._animationFrameIds[id];\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected _logError(e: any): void {\n if (this._onErrorHandler) {\n this._onErrorHandler(e);\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ICancelable<T extends (...args: any[]) => any> = {\n flush: () => ReturnType<T>;\n cancel: () => void;\n pending: () => boolean;\n};\n"],"names":["getWindow","Async","dispose","id","_isDisposed","_parent","_timeoutIds","hasOwnProperty","clearTimeout","parseInt","_immediateIds","clearImmediate","_intervalIds","clearInterval","_animationFrameIds","cancelAnimationFrame","setTimeout","callback","duration","timeoutId","apply","e","_logError","setImmediate","targetElement","immediateId","win","setImmediateCallback","setInterval","intervalId","throttle","func","wait","options","_noop","waitMS","leading","trailing","lastExecuteTime","lastResult","lastArgs","userCall","now","Date","delta","waitLength","resultFunction","args","debounce","noOpFunction","cancel","flush","pending","maxWait","lastCallTime","isNaN","markExecuted","time","invokeFunction","executeImmediately","maxWaitDelta","maxWaitExpired","Math","min","requestAnimationFrame","animationFrameId","animationFrameCallback","_onErrorHandler","constructor","parent","onError"],"mappings":";;;;;;;eAcaC;;;;2BAda,cAAc;AAcjC;IAoBL;;GAEC,GACMC,UAAgB;QACrB,IAAIC;QAEJ,IAAI,CAACC,WAAW,GAAG;QACnB,IAAI,CAACC,OAAO,GAAG;QAEf,kBAAkB;QAClB,IAAI,IAAI,CAACC,WAAW,EAAE;YACpB,IAAKH,MAAM,IAAI,CAACG,WAAW,CAAE;gBAC3B,IAAI,IAAI,CAACA,WAAW,CAACC,cAAc,CAACJ,KAAK;oBACvC,IAAI,CAACK,YAAY,CAACC,SAASN,IAAI;gBACjC;YACF;YAEA,IAAI,CAACG,WAAW,GAAG;QACrB;QAEA,oBAAoB;QACpB,IAAI,IAAI,CAACI,aAAa,EAAE;YACtB,IAAKP,MAAM,IAAI,CAACO,aAAa,CAAE;gBAC7B,IAAI,IAAI,CAACA,aAAa,CAACH,cAAc,CAACJ,KAAK;oBACzC,IAAI,CAACQ,cAAc,CAACF,SAASN,IAAI;gBACnC;YACF;YAEA,IAAI,CAACO,aAAa,GAAG;QACvB;QAEA,mBAAmB;QACnB,IAAI,IAAI,CAACE,YAAY,EAAE;YACrB,IAAKT,MAAM,IAAI,CAACS,YAAY,CAAE;gBAC5B,IAAI,IAAI,CAACA,YAAY,CAACL,cAAc,CAACJ,KAAK;oBACxC,IAAI,CAACU,aAAa,CAACJ,SAASN,IAAI;gBAClC;YACF;YACA,IAAI,CAACS,YAAY,GAAG;QACtB;QAEA,0BAA0B;QAC1B,IAAI,IAAI,CAACE,kBAAkB,EAAE;YAC3B,IAAKX,MAAM,IAAI,CAACW,kBAAkB,CAAE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\n\ndeclare function setTimeout(cb: Function, delay: number): number;\ndeclare function setInterval(cb: Function, delay: number): number;\n\n/**\n * Bugs often appear in async code when stuff gets disposed, but async operations don't get canceled.\n * This Async helper class solves these issues by tying async code to the lifetime of a disposable object.\n *\n * Usage: Anything class extending from BaseModel can access this helper via this.async. Otherwise create a\n * new instance of the class and remember to call dispose() during your code's dispose handler.\n *\n * @public\n */\nexport class Async {\n private _timeoutIds: { [id: number]: boolean } | null = null;\n private _immediateIds: { [id: number]: boolean } | null = null;\n private _intervalIds: { [id: number]: boolean } | null = null;\n private _animationFrameIds: { [id: number]: boolean } | null = null;\n private _isDisposed: boolean;\n private _parent: object | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onErrorHandler: ((e: any) => void) | undefined;\n private _noop: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(parent?: object, onError?: (e: any) => void) {\n this._isDisposed = false;\n this._parent = parent || null;\n this._onErrorHandler = onError;\n this._noop = () => {\n /* do nothing */\n };\n }\n\n /**\n * Dispose function, clears all async operations.\n */\n public dispose(): void {\n let id;\n\n this._isDisposed = true;\n this._parent = null;\n\n // Clear timeouts.\n if (this._timeoutIds) {\n for (id in this._timeoutIds) {\n if (this._timeoutIds.hasOwnProperty(id)) {\n this.clearTimeout(parseInt(id, 10));\n }\n }\n\n this._timeoutIds = null;\n }\n\n // Clear immediates.\n if (this._immediateIds) {\n for (id in this._immediateIds) {\n if (this._immediateIds.hasOwnProperty(id)) {\n this.clearImmediate(parseInt(id, 10));\n }\n }\n\n this._immediateIds = null;\n }\n\n // Clear intervals.\n if (this._intervalIds) {\n for (id in this._intervalIds) {\n if (this._intervalIds.hasOwnProperty(id)) {\n this.clearInterval(parseInt(id, 10));\n }\n }\n this._intervalIds = null;\n }\n\n // Clear animation frames.\n if (this._animationFrameIds) {\n for (id in this._animationFrameIds) {\n if (this._animationFrameIds.hasOwnProperty(id)) {\n this.cancelAnimationFrame(parseInt(id, 10));\n }\n }\n\n this._animationFrameIds = null;\n }\n }\n\n /**\n * SetTimeout override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n public setTimeout(callback: () => void, duration: number): number {\n let timeoutId = 0;\n\n if (!this._isDisposed) {\n if (!this._timeoutIds) {\n this._timeoutIds = {};\n }\n\n timeoutId = setTimeout(() => {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n\n try {\n // Now delete the record and call the callback.\n if (this._timeoutIds) {\n delete this._timeoutIds[timeoutId];\n }\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n }, duration);\n\n this._timeoutIds[timeoutId] = true;\n }\n\n return timeoutId;\n }\n\n /**\n * Clears the timeout.\n * @param id - Id to cancel.\n */\n public clearTimeout(id: number): void {\n if (this._timeoutIds && this._timeoutIds[id]) {\n clearTimeout(id);\n delete this._timeoutIds[id];\n }\n }\n\n /**\n * SetImmediate override, which will auto cancel the immediate during dispose.\n * @param callback - Callback to execute.\n * @param targetElement - Optional target element to use for identifying the correct window.\n * @returns The setTimeout id.\n */\n public setImmediate(callback: () => void, targetElement?: Element | null): number {\n let immediateId = 0;\n const win = getWindow(targetElement)!;\n\n if (!this._isDisposed) {\n if (!this._immediateIds) {\n this._immediateIds = {};\n }\n\n const setImmediateCallback = () => {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n\n try {\n // Now delete the record and call the callback.\n if (this._immediateIds) {\n delete this._immediateIds[immediateId];\n }\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n };\n\n immediateId = win.setTimeout(setImmediateCallback, 0);\n\n this._immediateIds[immediateId] = true;\n }\n\n return immediateId;\n }\n\n /**\n * Clears the immediate.\n * @param id - Id to cancel.\n * @param targetElement - Optional target element to use for identifying the correct window.\n */\n public clearImmediate(id: number, targetElement?: Element | null): void {\n const win = getWindow(targetElement)!;\n\n if (this._immediateIds && this._immediateIds[id]) {\n win.clearTimeout(id);\n delete this._immediateIds[id];\n }\n }\n\n /**\n * SetInterval override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n public setInterval(callback: () => void, duration: number): number {\n let intervalId = 0;\n\n if (!this._isDisposed) {\n if (!this._intervalIds) {\n this._intervalIds = {};\n }\n\n intervalId = setInterval(() => {\n // Time to execute the interval callback, enqueue it as a foreground task to be executed.\n try {\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n }, duration);\n\n this._intervalIds[intervalId] = true;\n }\n\n return intervalId;\n }\n\n /**\n * Clears the interval.\n * @param id - Id to cancel.\n */\n public clearInterval(id: number): void {\n if (this._intervalIds && this._intervalIds[id]) {\n clearInterval(id);\n delete this._intervalIds[id];\n }\n }\n\n /**\n * Creates a function that, when executed, will only call the func function at most once per\n * every wait milliseconds. Provide an options object to indicate that func should be invoked\n * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled\n * function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the throttled function is invoked more than once during the wait timeout.\n *\n * @param func - The function to throttle.\n * @param wait - The number of milliseconds to throttle executions to. Defaults to 0.\n * @param options - The options object.\n * @returns The new throttled function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public throttle<T extends (...args: any[]) => any>(\n func: T,\n wait?: number,\n options?: {\n leading?: boolean;\n trailing?: boolean;\n },\n ): T {\n if (this._isDisposed) {\n return this._noop as T;\n }\n\n const waitMS = wait || 0;\n let leading = true;\n let trailing = true;\n let lastExecuteTime = 0;\n let lastResult: T;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let lastArgs: any[];\n let timeoutId: number | null = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n const callback = (userCall?: boolean) => {\n const now = Date.now();\n const delta = now - lastExecuteTime;\n const waitLength = leading ? waitMS - delta : waitMS;\n if (delta >= waitMS && (!userCall || leading)) {\n lastExecuteTime = now;\n if (timeoutId) {\n this.clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastResult = func.apply(this._parent, lastArgs);\n } else if (timeoutId === null && trailing) {\n timeoutId = this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const resultFunction = ((...args: any[]): any => {\n lastArgs = args;\n return callback(true);\n }) as T;\n\n return resultFunction;\n }\n\n /**\n * Creates a function that will delay the execution of func until after wait milliseconds have\n * elapsed since the last time it was invoked. Provide an options object to indicate that func\n * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls\n * to the debounced function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the debounced function is invoked more than once during the wait\n * timeout.\n *\n * @param func - The function to debounce.\n * @param wait - The number of milliseconds to delay.\n * @param options - The options object.\n * @returns The new debounced function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public debounce<T extends (...args: any[]) => any>(\n func: T,\n wait?: number,\n options?: {\n leading?: boolean;\n maxWait?: number;\n trailing?: boolean;\n },\n ): ICancelable<T> & T {\n if (this._isDisposed) {\n const noOpFunction = (() => {\n /** Do nothing */\n }) as ICancelable<T> & T;\n\n noOpFunction.cancel = () => {\n return;\n };\n noOpFunction.flush = (() => null) as unknown as () => ReturnType<T>;\n noOpFunction.pending = () => false;\n\n return noOpFunction;\n }\n\n const waitMS = wait || 0;\n let leading = false;\n let trailing = true;\n let maxWait: number | null = null;\n let lastCallTime = 0;\n let lastExecuteTime = Date.now();\n let lastResult: ReturnType<T>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let lastArgs: any[];\n let timeoutId: number | null = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n if (options && typeof options.maxWait === 'number' && !isNaN(options.maxWait)) {\n maxWait = options.maxWait;\n }\n\n const markExecuted = (time: number) => {\n if (timeoutId) {\n this.clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastExecuteTime = time;\n };\n\n const invokeFunction = (time: number) => {\n markExecuted(time);\n lastResult = func.apply(this._parent, lastArgs);\n };\n\n const callback = (userCall?: boolean) => {\n const now = Date.now();\n let executeImmediately = false;\n if (userCall) {\n if (leading && now - lastCallTime >= waitMS) {\n executeImmediately = true;\n }\n lastCallTime = now;\n }\n const delta = now - lastCallTime;\n let waitLength = waitMS - delta;\n const maxWaitDelta = now - lastExecuteTime;\n let maxWaitExpired = false;\n\n if (maxWait !== null) {\n // maxWait only matters when there is a pending callback\n if (maxWaitDelta >= maxWait && timeoutId) {\n maxWaitExpired = true;\n } else {\n waitLength = Math.min(waitLength, maxWait - maxWaitDelta);\n }\n }\n\n if (delta >= waitMS || maxWaitExpired || executeImmediately) {\n invokeFunction(now);\n } else if ((timeoutId === null || !userCall) && trailing) {\n timeoutId = this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n };\n\n const pending = (): boolean => {\n return !!timeoutId;\n };\n\n const cancel = (): void => {\n if (pending()) {\n // Mark the debounced function as having executed\n markExecuted(Date.now());\n }\n };\n\n const flush = () => {\n if (pending()) {\n invokeFunction(Date.now());\n }\n\n return lastResult;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const resultFunction = ((...args: any[]) => {\n lastArgs = args;\n return callback(true);\n }) as ICancelable<T> & T;\n\n resultFunction.cancel = cancel;\n resultFunction.flush = flush;\n resultFunction.pending = pending;\n\n return resultFunction;\n }\n\n public requestAnimationFrame(callback: () => void, targetElement?: Element | null): number {\n let animationFrameId = 0;\n const win = getWindow(targetElement)!;\n\n if (!this._isDisposed) {\n if (!this._animationFrameIds) {\n this._animationFrameIds = {};\n }\n\n const animationFrameCallback = () => {\n try {\n // Now delete the record and call the callback.\n if (this._animationFrameIds) {\n delete this._animationFrameIds[animationFrameId];\n }\n\n callback.apply(this._parent);\n } catch (e) {\n this._logError(e);\n }\n };\n\n animationFrameId = win.requestAnimationFrame\n ? win.requestAnimationFrame(animationFrameCallback)\n : win.setTimeout(animationFrameCallback, 0);\n\n this._animationFrameIds[animationFrameId] = true;\n }\n\n return animationFrameId;\n }\n\n public cancelAnimationFrame(id: number, targetElement?: Element | null): void {\n const win = getWindow(targetElement)!;\n\n if (this._animationFrameIds && this._animationFrameIds[id]) {\n win.cancelAnimationFrame ? win.cancelAnimationFrame(id) : win.clearTimeout(id);\n delete this._animationFrameIds[id];\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected _logError(e: any): void {\n if (this._onErrorHandler) {\n this._onErrorHandler(e);\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ICancelable<T extends (...args: any[]) => any> = {\n flush: () => ReturnType<T>;\n cancel: () => void;\n pending: () => boolean;\n};\n"],"names":["getWindow","Async","dispose","id","_isDisposed","_parent","_timeoutIds","hasOwnProperty","clearTimeout","parseInt","_immediateIds","clearImmediate","_intervalIds","clearInterval","_animationFrameIds","cancelAnimationFrame","setTimeout","callback","duration","timeoutId","apply","e","_logError","setImmediate","targetElement","immediateId","win","setImmediateCallback","setInterval","intervalId","throttle","func","wait","options","_noop","waitMS","leading","trailing","lastExecuteTime","lastResult","lastArgs","userCall","now","Date","delta","waitLength","resultFunction","args","debounce","noOpFunction","cancel","flush","pending","maxWait","lastCallTime","isNaN","markExecuted","time","invokeFunction","executeImmediately","maxWaitDelta","maxWaitExpired","Math","min","requestAnimationFrame","animationFrameId","animationFrameCallback","_onErrorHandler","constructor","parent","onError"],"mappings":";;;;;;;eAcaC;;;;2BAda,iBAAc;AAcjC;IAoBL;;GAEC,GACMC,UAAgB;QACrB,IAAIC;QAEJ,IAAI,CAACC,WAAW,GAAG;QACnB,IAAI,CAACC,OAAO,GAAG;QAEf,kBAAkB;QAClB,IAAI,IAAI,CAACC,WAAW,EAAE;YACpB,IAAKH,MAAM,I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pDmB,UAAUD,CAAM,EAAQ;QAChC,IAAI,IAAI,CAAC8C,eAAe,EAAE;YACxB,IAAI,CAACA,eAAe,CAAC9C;QACvB;IACF;IAvcA,8DAA8D;IAC9D+C,YAAYC,MAAe,EAAEC,OAA0B,CAAE;YAVzD,kBAAA,EAAA,IAAA,EAAQhE,eAAgD;QACxD,sBAAA,EAAA,IAAA,EAAQI,iBAAkD;YAC1D,kBAAA,EAAA,IAAA,EAAQE,gBAAiD;YACzD,kBAAA,EAAA,IAAA,EAAQE,sBAAuD;YAC/D,kBAAA,EAAA,IAAA,EAAQV,eAAR,KAAA;QACA,sBAAA,EAAA,IAAA,EAAQC,WAAR,KAAA;QACA,8DAA8D;YAC9D,kBAAA,EAAA,IAAA,EAAQ8D,mBAAR,KAAA;YACA,kBAAA,EAAA,IAAA,EAAQjC,SAAR,KAAA;QAGE,IAAI,CAAC9B,WAAW,GAAG;QACnB,IAAI,CAACC,OAAO,GAAGgE,UAAU;QACzB,IAAI,CAACF,eAAe,GAAGG;QACvB,IAAI,CAACpC,KAAK,GAAG;QACX,cAAc,GAChB;IACF;AAgcF"}
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "useImageExport", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _imageexportutils = require("./image-export-utils");
15
- const _utilities = require("./utilities");
14
+ const _imageexportutils = require("./image-export-utils.cjs");
15
+ const _utilities = require("./utilities.cjs");
16
16
  const useImageExport = (componentRef, hideLegends, isChartCartesian = true)=>{
17
17
  const cartesianChartRef = _react.useRef(null);
18
18
  const chartContainerRef = _react.useRef(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/hooks.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { Chart, ImageExportOptions } from '../types/index';\nimport type { LegendContainer } from '../Legends';\nimport { exportChartsAsImage } from './image-export-utils';\nimport { useRtl } from './utilities';\n\nexport const useImageExport = (\n componentRef: React.Ref<Chart> | undefined,\n hideLegends: boolean | undefined,\n isChartCartesian: boolean = true,\n): {\n cartesianChartRef: React.RefObject<Chart | null>;\n chartContainerRef: React.RefObject<HTMLDivElement | null>;\n legendsRef: React.RefObject<LegendContainer | null>;\n} => {\n const cartesianChartRef = React.useRef<Chart>(null);\n const chartContainerRef = React.useRef<HTMLDivElement>(null);\n const legendsRef = React.useRef<LegendContainer>(null);\n const isRTL = useRtl();\n\n React.useImperativeHandle(\n componentRef,\n () => {\n const chartContainer = isChartCartesian ? cartesianChartRef.current?.chartContainer : chartContainerRef.current;\n\n return {\n chartContainer: chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return exportChartsAsImage(\n [{ container: chartContainer }],\n hideLegends ? undefined : legendsRef.current?.toSVG,\n isRTL,\n opts,\n );\n },\n };\n },\n [hideLegends, isChartCartesian, isRTL],\n );\n\n return {\n cartesianChartRef,\n chartContainerRef,\n legendsRef,\n };\n};\n"],"names":["React","exportChartsAsImage","useRtl","useImageExport","componentRef","hideLegends","isChartCartesian","cartesianChartRef","useRef","chartContainerRef","legendsRef","isRTL","useImperativeHandle","chartContainer","current","toImage","opts","container","undefined","toSVG"],"mappings":"AAAA;;;;;+BAQaG;;;;;;;iEANU,QAAQ;kCAGK,uBAAuB;2BACpC,cAAc;AAE9B,uBAAuB,CAC5BC,cACAC,aACAC,mBAA4B,IAAI;IAMhC,MAAMC,oBAAoBP,OAAMQ,MAAM,CAAQ;IAC9C,MAAMC,oBAAoBT,OAAMQ,MAAM,CAAiB;IACvD,MAAME,aAAaV,OAAMQ,MAAM,CAAkB;IACjD,MAAMG,YAAQT,iBAAAA;IAEdF,OAAMY,mBAAmB,CACvBR,cACA;YAC4CG;QAA1C,MAAMM,iBAAiBP,mBAAAA,CAAmBC,6BAAAA,kBAAkBO,OAAAA,AAAO,MAAA,QAAzBP,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2BM,cAAc,GAAGJ,kBAAkBK,OAAO;QAE/G,OAAO;YACLD,gBAAgBA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,iBAAkB;YAClCE,SAAS,CAACC;oBAGoBN;gBAF5B,WAAOT,qCAAAA,EACL;oBAAC;wBAAEgB,WAAWJ;oBAAe;iBAAE,EAC/BR,cAAca,YAAAA,CAAYR,sBAAAA,WAAWI,OAAAA,AAAO,MAAA,QAAlBJ,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAoBS,KAAK,EACnDR,OACAK;YAEJ;QACF;IACF,GACA;QAACX;QAAaC;QAAkBK;KAAM;IAGxC,OAAO;QACLJ;QACAE;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/utilities/hooks.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { Chart, ImageExportOptions } from '../types/index';\nimport type { LegendContainer } from '../Legends';\nimport { exportChartsAsImage } from './image-export-utils';\nimport { useRtl } from './utilities';\n\nexport const useImageExport = (\n componentRef: React.Ref<Chart> | undefined,\n hideLegends: boolean | undefined,\n isChartCartesian: boolean = true,\n): {\n cartesianChartRef: React.RefObject<Chart | null>;\n chartContainerRef: React.RefObject<HTMLDivElement | null>;\n legendsRef: React.RefObject<LegendContainer | null>;\n} => {\n const cartesianChartRef = React.useRef<Chart>(null);\n const chartContainerRef = React.useRef<HTMLDivElement>(null);\n const legendsRef = React.useRef<LegendContainer>(null);\n const isRTL = useRtl();\n\n React.useImperativeHandle(\n componentRef,\n () => {\n const chartContainer = isChartCartesian ? cartesianChartRef.current?.chartContainer : chartContainerRef.current;\n\n return {\n chartContainer: chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return exportChartsAsImage(\n [{ container: chartContainer }],\n hideLegends ? undefined : legendsRef.current?.toSVG,\n isRTL,\n opts,\n );\n },\n };\n },\n [hideLegends, isChartCartesian, isRTL],\n );\n\n return {\n cartesianChartRef,\n chartContainerRef,\n legendsRef,\n };\n};\n"],"names":["React","exportChartsAsImage","useRtl","useImageExport","componentRef","hideLegends","isChartCartesian","cartesianChartRef","useRef","chartContainerRef","legendsRef","isRTL","useImperativeHandle","chartContainer","current","toImage","opts","container","undefined","toSVG"],"mappings":"AAAA;;;;;+BAQaG;;;;;;;iEANU,QAAQ;kCAGK,0BAAuB;2BACpC,iBAAc;AAE9B,uBAAuB,CAC5BC,cACAC,aACAC,mBAA4B,IAAI;IAMhC,MAAMC,oBAAoBP,OAAMQ,MAAM,CAAQ;IAC9C,MAAMC,oBAAoBT,OAAMQ,MAAM,CAAiB;IACvD,MAAME,aAAaV,OAAMQ,MAAM,CAAkB;IACjD,MAAMG,YAAQT,iBAAAA;IAEdF,OAAMY,mBAAmB,CACvBR,cACA;YAC4CG;QAA1C,MAAMM,iBAAiBP,mBAAAA,CAAmBC,6BAAAA,kBAAkBO,OAAAA,AAAO,MAAA,QAAzBP,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2BM,cAAc,GAAGJ,kBAAkBK,OAAO;QAE/G,OAAO;YACLD,gBAAgBA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,iBAAkB;YAClCE,SAAS,CAACC;oBAGoBN;gBAF5B,WAAOT,qCAAAA,EACL;oBAAC;wBAAEgB,WAAWJ;oBAAe;iBAAE,EAC/BR,cAAca,YAAAA,CAAYR,sBAAAA,WAAWI,OAAAA,AAAO,MAAA,QAAlBJ,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAoBS,KAAK,EACnDR,OACAK;YAEJ;QACF;IACF,GACA;QAACX;QAAaC;QAAkBK;KAAM;IAGxC,OAAO;QACLJ;QACAE;QACAC;IACF;AACF,EAAE"}
@@ -19,8 +19,8 @@ _export(exports, {
19
19
  });
20
20
  const _d3selection = require("d3-selection");
21
21
  const _reactutilities = require("@fluentui/react-utilities");
22
- const _index = require("./index");
23
- const _useLegendsStylesstyles = require("../components/Legends/useLegendsStyles.styles");
22
+ const _index = require("./index.cjs");
23
+ const _useLegendsStylesstyles = require("../components/Legends/useLegendsStyles.styles.cjs");
24
24
  async function exportChartsAsImage(charts, legendsToSvg, isRTL = false, opts = {}) {
25
25
  if (charts.length === 0 && !legendsToSvg) {
26
26
  throw new Error('No charts or legends to export');
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utilities/image-export-utils.ts"],"sourcesContent":["'use client';\n\nimport type { Selection } from 'd3-selection';\nimport { create as d3Create, select as d3Select } from 'd3-selection';\nimport { isHTMLElement } from '@fluentui/react-utilities';\nimport { copyStyle, measureTextWithDOM } from './index';\nimport type { ImageExportOptions } from '../types/index';\nimport type { Legend, LegendContainer } from '../Legends';\nimport {\n LEGEND_CONTAINER_MARGIN_TOP,\n LEGEND_CONTAINER_MARGIN_START,\n LEGEND_PADDING,\n LEGEND_HEIGHT,\n LEGEND_SHAPE_BORDER,\n LEGEND_SHAPE_SIZE,\n LEGEND_SHAPE_MARGIN_END,\n INACTIVE_LEGEND_TEXT_OPACITY,\n} from '../components/Legends/useLegendsStyles.styles';\n\nexport type GridChart = {\n container: HTMLElement | null | undefined;\n row?: number;\n col?: number;\n};\n\ntype SvgImage = {\n dataUrl: string;\n width: number;\n height: number;\n};\n\nexport async function exportChartsAsImage(\n charts: GridChart[],\n legendsToSvg?: LegendContainer['toSVG'],\n isRTL: boolean = false,\n opts: ImageExportOptions = {},\n): Promise<string> {\n if (charts.length === 0 && !legendsToSvg) {\n throw new Error('No charts or legends to export');\n }\n\n const chartImages = await Promise.all(\n charts.map(chart => {\n return new Promise<SvgImage>(resolve => {\n const svg = cloneStyledSVG(chart.container, isRTL);\n const svgDataUrl = svgToBase64(svg.node);\n resolve({ dataUrl: svgDataUrl, width: svg.width, height: svg.height });\n });\n }),\n );\n\n const grid: SvgImage[][] = []; // Sparse 2D array\n charts.forEach((chart, i) => {\n const row = chart.row || 0;\n const col = chart.col || 0;\n if (!grid[row]) {\n grid[row] = [];\n }\n grid[row][col] = chartImages[i];\n });\n\n if (legendsToSvg) {\n let totalWidth = 0;\n grid.forEach(row => {\n let rowWidth = 0;\n row.forEach(item => {\n rowWidth += item.width;\n });\n totalWidth = Math.max(totalWidth, rowWidth);\n });\n\n const svg = legendsToSvg(totalWidth, isRTL);\n if (svg.node) {\n const svgDataUrl = svgToBase64(svg.node);\n grid.push([{ dataUrl: svgDataUrl, width: svg.width, height: svg.height }]);\n }\n }\n\n return svgToPng(grid, opts);\n}\n\nconst SVG_STYLE_PROPERTIES = [\n 'display',\n 'fill',\n 'fill-opacity',\n 'opacity',\n 'stroke',\n 'stroke-width',\n 'transform',\n 'border-collapse',\n];\nconst SVG_TEXT_STYLE_PROPERTIES = [\n 'font-family',\n 'font-size',\n 'font-weight',\n 'text-anchor',\n 'background-color',\n 'color',\n 'padding',\n 'text-align',\n 'border',\n];\n\nconst ANNOTATION_HTML_STYLE_PROPERTIES = [\n 'align-items',\n 'background',\n 'background-color',\n 'border',\n 'border-radius',\n 'box-shadow',\n 'box-sizing',\n 'color',\n 'column-gap',\n 'display',\n 'flex',\n 'flex-direction',\n 'font-family',\n 'font-size',\n 'font-style',\n 'font-weight',\n 'gap',\n 'height',\n 'justify-content',\n 'letter-spacing',\n 'line-height',\n 'margin',\n 'max-height',\n 'max-width',\n 'min-height',\n 'min-width',\n 'opacity',\n 'overflow',\n 'padding',\n 'pointer-events',\n 'position',\n 'row-gap',\n 'text-align',\n 'text-decoration',\n 'text-transform',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'visibility',\n 'white-space',\n 'width',\n 'z-index',\n];\nconst ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES = ['overflow', 'pointer-events'];\n\nfunction cloneStyledSVG(chartContainer: HTMLElement | null | undefined, isRTL: boolean) {\n if (!chartContainer) {\n throw new Error('Chart container is not defined');\n }\n\n const svg = chartContainer.querySelector<SVGSVGElement>('svg');\n if (!svg) {\n throw new Error('SVG not found');\n }\n\n let clonedSvg = d3Select(svg.cloneNode(true) as SVGSVGElement)\n .attr('width', null)\n .attr('height', null)\n .attr('viewBox', null);\n let svgElements = svg.getElementsByTagName('*');\n let clonedSvgElements = clonedSvg.node()!.getElementsByTagName('*');\n\n const TEXT_ELEMENTS = ['text'];\n const TABLE_ELEMENTS = ['table', 'thead', 'tbody', 'tr', 'th', 'td'];\n\n for (let i = 0; i < svgElements.length; i++) {\n const tag = svgElements[i].tagName.toLowerCase();\n\n if (TEXT_ELEMENTS.includes(tag) || TABLE_ELEMENTS.includes(tag)) {\n copyStyle([...SVG_STYLE_PROPERTIES, ...SVG_TEXT_STYLE_PROPERTIES], svgElements[i], clonedSvgElements[i]);\n } else {\n copyStyle(SVG_STYLE_PROPERTIES, svgElements[i], clonedSvgElements[i]);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n svgElements = null as any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n clonedSvgElements = null as any;\n\n const originalForeignObjects = svg.querySelectorAll('foreignObject');\n const clonedForeignObjects = clonedSvg.node()!.querySelectorAll('foreignObject');\n\n originalForeignObjects.forEach((originalFo, index) => {\n const clonedFo = clonedForeignObjects[index];\n if (!clonedFo) {\n return;\n }\n\n const originalRoot = originalFo.firstElementChild as HTMLElement | null;\n const clonedRoot = clonedFo.firstElementChild as HTMLElement | null;\n\n if (originalRoot && clonedRoot) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, originalRoot, clonedRoot);\n }\n\n const originalHtmlElements = originalFo.querySelectorAll<HTMLElement>('*');\n const clonedHtmlElements = clonedFo.querySelectorAll<HTMLElement>('*');\n\n originalHtmlElements.forEach((originalEl, elementIndex) => {\n const clonedEl = clonedHtmlElements[elementIndex];\n if (clonedEl) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, originalEl, clonedEl);\n }\n });\n });\n\n const annotationSvg = chartContainer.querySelector<SVGSVGElement>('[data-chart-annotation-svg=\"true\"]');\n let annotationClone: SVGSVGElement | null = null;\n\n if (annotationSvg) {\n annotationClone = annotationSvg.cloneNode(true) as SVGSVGElement;\n copyStyle(SVG_STYLE_PROPERTIES, annotationSvg, annotationClone);\n\n const annotationElements = annotationSvg.getElementsByTagName('*');\n const clonedAnnotationElements = annotationClone.getElementsByTagName('*');\n\n for (let i = 0; i < annotationElements.length; i++) {\n const original = annotationElements[i];\n const cloned = clonedAnnotationElements[i];\n const tag = original.tagName.toLowerCase();\n const isSvgElement = original instanceof SVGElement;\n const isTextElement = tag === 'text';\n const isHtmlElement = isHTMLElement(original);\n\n if (isSvgElement) {\n if (isTextElement) {\n copyStyle([...SVG_STYLE_PROPERTIES, ...SVG_TEXT_STYLE_PROPERTIES], original, cloned);\n } else {\n copyStyle(SVG_STYLE_PROPERTIES, original, cloned);\n }\n }\n\n if (isHtmlElement) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, original, cloned);\n }\n\n if (tag === 'foreignobject') {\n copyStyle(ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES, original, cloned);\n }\n }\n }\n\n const { width, height } = svg.getBoundingClientRect();\n\n clonedSvg\n .attr('width', width)\n .attr('height', height)\n .attr('viewBox', `0 0 ${width} ${height}`)\n .attr('direction', isRTL ? 'rtl' : 'ltr');\n\n if (annotationClone) {\n clonedSvg.selectAll('[data-chart-annotation-layer=\"true\"]').remove();\n d3Select(annotationClone).attr('x', 0).attr('y', 0).attr('width', width).attr('height', height);\n clonedSvg.append(() => annotationClone as SVGSVGElement);\n }\n const result = {\n node: clonedSvg.node(),\n width,\n height,\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n clonedSvg = null as any;\n\n return result;\n}\n\nconst LEGEND_TEXT_STYLE_PROPERTIES_MAP = {\n color: 'fill',\n 'font-family': 'font-family',\n 'font-size': 'font-size',\n 'font-weight': 'font-weight',\n};\n\nexport function cloneLegendsToSVG(\n legends: Legend[],\n svgWidth: number,\n config: {\n selectedLegends: Record<string, boolean>;\n centerLegends: boolean;\n textClassName: string;\n isRTL: boolean;\n },\n legendContainer?: HTMLElement | null,\n): {\n node: SVGSVGElement | null;\n width: number;\n height: number;\n} {\n if (legends.length === 0) {\n return {\n node: null,\n width: 0,\n height: 0,\n };\n }\n\n const { selectedLegends, centerLegends, textClassName, isRTL } = config;\n const legendGroup = d3Create<SVGGElement>('svg:g');\n let legendX = centerLegends ? 0 : LEGEND_CONTAINER_MARGIN_START;\n let legendY = LEGEND_CONTAINER_MARGIN_TOP;\n let legendLine: { elem: Selection<SVGGElement, unknown, null, undefined>; width: number }[] = [];\n const legendLines: (typeof legendLine)[] = [];\n const legendLineWidths: number[] = [];\n const noLegendsSelected = Object.keys(selectedLegends).length === 0;\n\n for (let i = 0; i < legends.length; i++) {\n const textOffset = LEGEND_PADDING + LEGEND_SHAPE_SIZE + LEGEND_SHAPE_MARGIN_END;\n const legendText = measureTextWithDOM(legends[i].title, `.${textClassName}`, legendContainer);\n const legendWidth = textOffset + legendText.width + LEGEND_PADDING;\n const legendItem = legendGroup.append('g');\n\n legendLine.push({ elem: legendItem, width: legendWidth });\n if (legendX + legendWidth > svgWidth && legendLine.length > 1) {\n legendLine.pop();\n legendLines.push(legendLine);\n legendLineWidths.push(legendX);\n\n legendLine = [{ elem: legendItem, width: legendWidth }];\n legendX = centerLegends ? 0 : LEGEND_CONTAINER_MARGIN_START;\n legendY += LEGEND_HEIGHT;\n }\n\n const isLegendActive = selectedLegends[legends[i].title] || noLegendsSelected;\n\n legendItem\n .append('rect')\n .attr('x', legendX + (isRTL ? legendWidth - LEGEND_PADDING - LEGEND_SHAPE_SIZE : LEGEND_PADDING))\n .attr('y', legendY + LEGEND_PADDING)\n .attr('width', LEGEND_SHAPE_SIZE)\n .attr('height', LEGEND_SHAPE_SIZE)\n .style('fill', isLegendActive ? legends[i].color : 'transparent')\n .style('stroke-width', LEGEND_SHAPE_BORDER)\n .style('stroke', legends[i].color);\n\n legendItem\n .append('text')\n .attr('x', legendX + (isRTL ? legendWidth - textOffset : textOffset))\n .attr('y', legendY + LEGEND_PADDING)\n .attr('dominant-baseline', 'hanging')\n .style('opacity', isLegendActive ? 1 : INACTIVE_LEGEND_TEXT_OPACITY)\n .text(legends[i].title)\n .call(selection => copyStyle(LEGEND_TEXT_STYLE_PROPERTIES_MAP, legendText.node, selection.node()!));\n\n legendX += legendWidth;\n }\n\n legendLines.push(legendLine);\n legendLineWidths.push(legendX);\n legendY += LEGEND_HEIGHT;\n\n if (centerLegends) {\n legendLines.forEach((ln, idx) => {\n const lineOffsetX = Math.max((svgWidth - legendLineWidths[idx]) / 2, 0);\n let remLineWidth = legendLineWidths[idx];\n let itemOffsetX = 0;\n ln.forEach(item => {\n const newOffsetX = lineOffsetX + (isRTL ? remLineWidth - item.width - itemOffsetX : 0);\n item.elem.attr('transform', `translate(${newOffsetX}, 0)`);\n remLineWidth -= item.width;\n itemOffsetX += item.width;\n });\n });\n } else if (isRTL) {\n const w1 = Math.max(svgWidth, ...legendLineWidths);\n legendLines.forEach(ln => {\n let remLineWidth = w1 - LEGEND_CONTAINER_MARGIN_START;\n let itemOffsetX = LEGEND_CONTAINER_MARGIN_START;\n ln.forEach(item => {\n const newOffsetX = remLineWidth - item.width - itemOffsetX;\n item.elem.attr('transform', `translate(${newOffsetX}, 0)`);\n remLineWidth -= item.width;\n itemOffsetX += item.width;\n });\n });\n }\n\n const w1 = Math.max(svgWidth, ...legendLineWidths);\n const h1 = legendY;\n const svg = d3Create<SVGSVGElement>('svg').attr('width', w1).attr('height', h1).attr('viewBox', `0 0 ${w1} ${h1}`);\n svg.append(() => legendGroup.node()!);\n\n return {\n node: svg.node(),\n width: w1,\n height: h1,\n };\n}\n\ntype PositionedImage = SvgImage & {\n x: number;\n y: number;\n};\n\nasync function svgToPng(grid: SvgImage[][], opts: ImageExportOptions = {}): Promise<string> {\n let totalWidth = 0;\n let totalHeight = 0;\n\n const positionedImages: PositionedImage[] = grid\n .map(row => {\n let rowWidth = 0;\n let rowHeight = 0;\n\n const items = row.map(item => {\n const positioned = { ...item, x: rowWidth, y: totalHeight };\n rowWidth += item.width;\n rowHeight = Math.max(rowHeight, item.height);\n return positioned;\n });\n\n totalWidth = Math.max(totalWidth, rowWidth);\n totalHeight += rowHeight;\n\n return items;\n })\n .flat();\n\n const scale = opts.scale || 1;\n const w0 = opts.width || totalWidth;\n const h0 = opts.height || totalHeight;\n const scaleX = (scale * w0) / totalWidth;\n const scaleY = (scale * h0) / totalHeight;\n totalWidth = scaleX * totalWidth;\n totalHeight = scaleY * totalHeight;\n\n const canvas = document.createElement('canvas');\n canvas.width = totalWidth;\n canvas.height = totalHeight;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Canvas context is null');\n }\n\n ctx.fillStyle = opts.background || 'transparent';\n ctx.fillRect(0, 0, totalWidth, totalHeight);\n\n await Promise.all(\n positionedImages.map(\n item =>\n new Promise<void>((resolve, reject) => {\n const img = new Image();\n img.onload = () => {\n ctx.drawImage(img, scaleX * item.x, scaleY * item.y, scaleX * item.width, scaleY * item.height);\n resolve();\n };\n img.onerror = reject;\n img.src = item.dataUrl;\n }),\n ),\n );\n\n return canvas.toDataURL('image/png');\n}\n\nfunction svgToBase64(svgNode: SVGSVGElement | null) {\n if (!svgNode) {\n throw new Error('SVG node is null');\n }\n\n const svgData = new XMLSerializer().serializeToString(svgNode);\n const svgDataUrl = 'data:image/svg+xml;base64,' + btoa(unescapePonyfill(encodeURIComponent(svgData)));\n return svgDataUrl;\n}\n\nconst hex2 = /^[\\da-f]{2}$/i;\nconst hex4 = /^[\\da-f]{4}$/i;\n\n/**\n * A ponyfill for the deprecated `unescape` method, taken from the `core-js` library.\n *\n * Source: {@link https://github.com/zloirock/core-js/blob/167136f479d3b8519953f2e4c534ecdd1031d3cf/packages/core-js/modules/es.unescape.js core-js/packages/core-js/modules/es.unescape.js}\n */\nfunction unescapePonyfill(str: string) {\n let result = '';\n const length = str.length;\n let index = 0;\n let chr;\n let part;\n while (index < length) {\n chr = str.charAt(index++);\n if (chr === '%') {\n if (str.charAt(index) === 'u') {\n part = str.slice(index + 1, index + 5);\n if (hex4.exec(part)) {\n result += String.fromCharCode(parseInt(part, 16));\n index += 5;\n continue;\n }\n } else {\n part = str.slice(index, index + 2);\n if (hex2.exec(part)) {\n result += String.fromCharCode(parseInt(part, 16));\n index += 2;\n continue;\n }\n }\n }\n result += chr;\n }\n return result;\n}\n"],"names":["create","d3Create","select","d3Select","isHTMLElement","copyStyle","measureTextWithDOM","LEGEND_CONTAINER_MARGIN_TOP","LEGEND_CONTAINER_MARGIN_START","LEGEND_PADDING","LEGEND_HEIGHT","LEGEND_SHAPE_BORDER","LEGEND_SHAPE_SIZE","LEGEND_SHAPE_MARGIN_END","INACTIVE_LEGEND_TEXT_OPACITY","exportChartsAsImage","charts","legendsToSvg","isRTL","opts","length","Error","chartImages","Promise","all","map","chart","resolve","svg","cloneStyledSVG","container","svgDataUrl","svgToBase64","node","dataUrl","width","height","grid","forEach","i","row","col","totalWidth","rowWidth","item","Math","max","push","svgToPng","SVG_STYLE_PROPERTIES","SVG_TEXT_STYLE_PROPERTIES","ANNOTATION_HTML_STYLE_PROPERTIES","ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES","chartContainer","querySelector","clonedSvg","cloneNode","attr","svgElements","getElementsByTagName","clonedSvgElements","TEXT_ELEMENTS","TABLE_ELEMENTS","tag","tagName","toLowerCase","includes","originalForeignObjects","querySelectorAll","clonedForeignObjects","originalFo","index","clonedFo","originalRoot","firstElementChild","clonedRoot","originalHtmlElements","clonedHtmlElements","originalEl","elementIndex","clonedEl","annotationSvg","annotationClone","annotationElements","clonedAnnotationElements","original","cloned","isSvgElement","SVGElement","isTextElement","isHtmlElement","getBoundingClientRect","selectAll","remove","append","result","LEGEND_TEXT_STYLE_PROPERTIES_MAP","color","cloneLegendsToSVG","legends","svgWidth","config","legendContainer","selectedLegends","centerLegends","textClassName","legendGroup","legendX","legendY","legendLine","legendLines","legendLineWidths","noLegendsSelected","Object","keys","textOffset","legendText","title","legendWidth","legendItem","elem","pop","isLegendActive","style","text","call","selection","ln","idx","lineOffsetX","remLineWidth","itemOffsetX","newOffsetX","w1","h1","totalHeight","positionedImages","rowHeight","items","positioned","x","y","flat","scale","w0","h0","scaleX","scaleY","canvas","document","createElement","ctx","getContext","fillStyle","background","fillRect","reject","img","Image","onload","drawImage","onerror","src","toDataURL","svgNode","svgData","XMLSerializer","serializeToString","btoa","unescapePonyfill","encodeURIComponent","hex2","hex4","str","chr","part","charAt","slice","exec","String","fromCharCode","parseInt"],"mappings":"AAAA;;;;;;;;;;;;qBAuRgBkG;eAAAA;;IAxPMnF,mBAAAA;;;;6BA5BiC,eAAe;gCACxC,4BAA4B;uBACZ,UAAU;wCAYjD,gDAAgD;AAchD,mCACLC,MAAmB,EACnBC,YAAuC,EACvCC,QAAiB,KAAK,EACtBC,OAA2B,CAAC,CAAC;IAE7B,IAAIH,OAAOI,MAAM,KAAK,KAAK,CAACH,cAAc;QACxC,MAAM,IAAII,MAAM;IAClB;IAEA,MAAMC,cAAc,MAAMC,QAAQC,GAAG,CACnCR,OAAOS,GAAG,CAACC,CAAAA;QACT,OAAO,IAAIH,QAAkBI,CAAAA;YAC3B,MAAMC,MAAMC,eAAeH,MAAMI,SAAS,EAAEZ;YAC5C,MAAMa,aAAaC,YAAYJ,IAAIK,IAAI;YACvCN,QAAQ;gBAAEO,SAASH;gBAAYI,OAAOP,IAAIO,KAAK;gBAAEC,QAAQR,IAAIQ,MAAM;YAAC;QACtE;IACF;IAGF,MAAMC,OAAqB,EAAE,EAAE,kBAAkB;IACjDrB,OAAOsB,OAAO,CAAC,CAACZ,OAAOa;QACrB,MAAMC,MAAMd,MAAMc,GAAG,IAAI;QACzB,MAAMC,MAAMf,MAAMe,GAAG,IAAI;QACzB,IAAI,CAACJ,IAAI,CAACG,IAAI,EAAE;YACdH,IAAI,CAACG,IAAI,GAAG,EAAE;QAChB;QACAH,IAAI,CAACG,IAAI,CAACC,IAAI,GAAGnB,WAAW,CAACiB,EAAE;IACjC;IAEA,IAAItB,cAAc;QAChB,IAAIyB,a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AAM;oBAC7CxG,SAAS;oBACT;gBACF;YACF,OAAO;gBACLwG,OAAOF,IAAII,KAAK,CAAC1G,OAAOA,QAAQ;gBAChC,IAAIoG,KAAKO,IAAI,CAACH,OAAO;oBACnBhF,UAAUoF,OAAOC,YAAY,CAACC,SAASN,MAAM;oBAC7CxG,SAAS;oBACT;gBACF;YACF;QACF;QACAwB,UAAU+E;IACZ;IACA,OAAO/E;AACT"}
1
+ {"version":3,"sources":["../src/utilities/image-export-utils.ts"],"sourcesContent":["'use client';\n\nimport type { Selection } from 'd3-selection';\nimport { create as d3Create, select as d3Select } from 'd3-selection';\nimport { isHTMLElement } from '@fluentui/react-utilities';\nimport { copyStyle, measureTextWithDOM } from './index';\nimport type { ImageExportOptions } from '../types/index';\nimport type { Legend, LegendContainer } from '../Legends';\nimport {\n LEGEND_CONTAINER_MARGIN_TOP,\n LEGEND_CONTAINER_MARGIN_START,\n LEGEND_PADDING,\n LEGEND_HEIGHT,\n LEGEND_SHAPE_BORDER,\n LEGEND_SHAPE_SIZE,\n LEGEND_SHAPE_MARGIN_END,\n INACTIVE_LEGEND_TEXT_OPACITY,\n} from '../components/Legends/useLegendsStyles.styles';\n\nexport type GridChart = {\n container: HTMLElement | null | undefined;\n row?: number;\n col?: number;\n};\n\ntype SvgImage = {\n dataUrl: string;\n width: number;\n height: number;\n};\n\nexport async function exportChartsAsImage(\n charts: GridChart[],\n legendsToSvg?: LegendContainer['toSVG'],\n isRTL: boolean = false,\n opts: ImageExportOptions = {},\n): Promise<string> {\n if (charts.length === 0 && !legendsToSvg) {\n throw new Error('No charts or legends to export');\n }\n\n const chartImages = await Promise.all(\n charts.map(chart => {\n return new Promise<SvgImage>(resolve => {\n const svg = cloneStyledSVG(chart.container, isRTL);\n const svgDataUrl = svgToBase64(svg.node);\n resolve({ dataUrl: svgDataUrl, width: svg.width, height: svg.height });\n });\n }),\n );\n\n const grid: SvgImage[][] = []; // Sparse 2D array\n charts.forEach((chart, i) => {\n const row = chart.row || 0;\n const col = chart.col || 0;\n if (!grid[row]) {\n grid[row] = [];\n }\n grid[row][col] = chartImages[i];\n });\n\n if (legendsToSvg) {\n let totalWidth = 0;\n grid.forEach(row => {\n let rowWidth = 0;\n row.forEach(item => {\n rowWidth += item.width;\n });\n totalWidth = Math.max(totalWidth, rowWidth);\n });\n\n const svg = legendsToSvg(totalWidth, isRTL);\n if (svg.node) {\n const svgDataUrl = svgToBase64(svg.node);\n grid.push([{ dataUrl: svgDataUrl, width: svg.width, height: svg.height }]);\n }\n }\n\n return svgToPng(grid, opts);\n}\n\nconst SVG_STYLE_PROPERTIES = [\n 'display',\n 'fill',\n 'fill-opacity',\n 'opacity',\n 'stroke',\n 'stroke-width',\n 'transform',\n 'border-collapse',\n];\nconst SVG_TEXT_STYLE_PROPERTIES = [\n 'font-family',\n 'font-size',\n 'font-weight',\n 'text-anchor',\n 'background-color',\n 'color',\n 'padding',\n 'text-align',\n 'border',\n];\n\nconst ANNOTATION_HTML_STYLE_PROPERTIES = [\n 'align-items',\n 'background',\n 'background-color',\n 'border',\n 'border-radius',\n 'box-shadow',\n 'box-sizing',\n 'color',\n 'column-gap',\n 'display',\n 'flex',\n 'flex-direction',\n 'font-family',\n 'font-size',\n 'font-style',\n 'font-weight',\n 'gap',\n 'height',\n 'justify-content',\n 'letter-spacing',\n 'line-height',\n 'margin',\n 'max-height',\n 'max-width',\n 'min-height',\n 'min-width',\n 'opacity',\n 'overflow',\n 'padding',\n 'pointer-events',\n 'position',\n 'row-gap',\n 'text-align',\n 'text-decoration',\n 'text-transform',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'visibility',\n 'white-space',\n 'width',\n 'z-index',\n];\nconst ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES = ['overflow', 'pointer-events'];\n\nfunction cloneStyledSVG(chartContainer: HTMLElement | null | undefined, isRTL: boolean) {\n if (!chartContainer) {\n throw new Error('Chart container is not defined');\n }\n\n const svg = chartContainer.querySelector<SVGSVGElement>('svg');\n if (!svg) {\n throw new Error('SVG not found');\n }\n\n let clonedSvg = d3Select(svg.cloneNode(true) as SVGSVGElement)\n .attr('width', null)\n .attr('height', null)\n .attr('viewBox', null);\n let svgElements = svg.getElementsByTagName('*');\n let clonedSvgElements = clonedSvg.node()!.getElementsByTagName('*');\n\n const TEXT_ELEMENTS = ['text'];\n const TABLE_ELEMENTS = ['table', 'thead', 'tbody', 'tr', 'th', 'td'];\n\n for (let i = 0; i < svgElements.length; i++) {\n const tag = svgElements[i].tagName.toLowerCase();\n\n if (TEXT_ELEMENTS.includes(tag) || TABLE_ELEMENTS.includes(tag)) {\n copyStyle([...SVG_STYLE_PROPERTIES, ...SVG_TEXT_STYLE_PROPERTIES], svgElements[i], clonedSvgElements[i]);\n } else {\n copyStyle(SVG_STYLE_PROPERTIES, svgElements[i], clonedSvgElements[i]);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n svgElements = null as any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n clonedSvgElements = null as any;\n\n const originalForeignObjects = svg.querySelectorAll('foreignObject');\n const clonedForeignObjects = clonedSvg.node()!.querySelectorAll('foreignObject');\n\n originalForeignObjects.forEach((originalFo, index) => {\n const clonedFo = clonedForeignObjects[index];\n if (!clonedFo) {\n return;\n }\n\n const originalRoot = originalFo.firstElementChild as HTMLElement | null;\n const clonedRoot = clonedFo.firstElementChild as HTMLElement | null;\n\n if (originalRoot && clonedRoot) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, originalRoot, clonedRoot);\n }\n\n const originalHtmlElements = originalFo.querySelectorAll<HTMLElement>('*');\n const clonedHtmlElements = clonedFo.querySelectorAll<HTMLElement>('*');\n\n originalHtmlElements.forEach((originalEl, elementIndex) => {\n const clonedEl = clonedHtmlElements[elementIndex];\n if (clonedEl) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, originalEl, clonedEl);\n }\n });\n });\n\n const annotationSvg = chartContainer.querySelector<SVGSVGElement>('[data-chart-annotation-svg=\"true\"]');\n let annotationClone: SVGSVGElement | null = null;\n\n if (annotationSvg) {\n annotationClone = annotationSvg.cloneNode(true) as SVGSVGElement;\n copyStyle(SVG_STYLE_PROPERTIES, annotationSvg, annotationClone);\n\n const annotationElements = annotationSvg.getElementsByTagName('*');\n const clonedAnnotationElements = annotationClone.getElementsByTagName('*');\n\n for (let i = 0; i < annotationElements.length; i++) {\n const original = annotationElements[i];\n const cloned = clonedAnnotationElements[i];\n const tag = original.tagName.toLowerCase();\n const isSvgElement = original instanceof SVGElement;\n const isTextElement = tag === 'text';\n const isHtmlElement = isHTMLElement(original);\n\n if (isSvgElement) {\n if (isTextElement) {\n copyStyle([...SVG_STYLE_PROPERTIES, ...SVG_TEXT_STYLE_PROPERTIES], original, cloned);\n } else {\n copyStyle(SVG_STYLE_PROPERTIES, original, cloned);\n }\n }\n\n if (isHtmlElement) {\n copyStyle(ANNOTATION_HTML_STYLE_PROPERTIES, original, cloned);\n }\n\n if (tag === 'foreignobject') {\n copyStyle(ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES, original, cloned);\n }\n }\n }\n\n const { width, height } = svg.getBoundingClientRect();\n\n clonedSvg\n .attr('width', width)\n .attr('height', height)\n .attr('viewBox', `0 0 ${width} ${height}`)\n .attr('direction', isRTL ? 'rtl' : 'ltr');\n\n if (annotationClone) {\n clonedSvg.selectAll('[data-chart-annotation-layer=\"true\"]').remove();\n d3Select(annotationClone).attr('x', 0).attr('y', 0).attr('width', width).attr('height', height);\n clonedSvg.append(() => annotationClone as SVGSVGElement);\n }\n const result = {\n node: clonedSvg.node(),\n width,\n height,\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n clonedSvg = null as any;\n\n return result;\n}\n\nconst LEGEND_TEXT_STYLE_PROPERTIES_MAP = {\n color: 'fill',\n 'font-family': 'font-family',\n 'font-size': 'font-size',\n 'font-weight': 'font-weight',\n};\n\nexport function cloneLegendsToSVG(\n legends: Legend[],\n svgWidth: number,\n config: {\n selectedLegends: Record<string, boolean>;\n centerLegends: boolean;\n textClassName: string;\n isRTL: boolean;\n },\n legendContainer?: HTMLElement | null,\n): {\n node: SVGSVGElement | null;\n width: number;\n height: number;\n} {\n if (legends.length === 0) {\n return {\n node: null,\n width: 0,\n height: 0,\n };\n }\n\n const { selectedLegends, centerLegends, textClassName, isRTL } = config;\n const legendGroup = d3Create<SVGGElement>('svg:g');\n let legendX = centerLegends ? 0 : LEGEND_CONTAINER_MARGIN_START;\n let legendY = LEGEND_CONTAINER_MARGIN_TOP;\n let legendLine: { elem: Selection<SVGGElement, unknown, null, undefined>; width: number }[] = [];\n const legendLines: (typeof legendLine)[] = [];\n const legendLineWidths: number[] = [];\n const noLegendsSelected = Object.keys(selectedLegends).length === 0;\n\n for (let i = 0; i < legends.length; i++) {\n const textOffset = LEGEND_PADDING + LEGEND_SHAPE_SIZE + LEGEND_SHAPE_MARGIN_END;\n const legendText = measureTextWithDOM(legends[i].title, `.${textClassName}`, legendContainer);\n const legendWidth = textOffset + legendText.width + LEGEND_PADDING;\n const legendItem = legendGroup.append('g');\n\n legendLine.push({ elem: legendItem, width: legendWidth });\n if (legendX + legendWidth > svgWidth && legendLine.length > 1) {\n legendLine.pop();\n legendLines.push(legendLine);\n legendLineWidths.push(legendX);\n\n legendLine = [{ elem: legendItem, width: legendWidth }];\n legendX = centerLegends ? 0 : LEGEND_CONTAINER_MARGIN_START;\n legendY += LEGEND_HEIGHT;\n }\n\n const isLegendActive = selectedLegends[legends[i].title] || noLegendsSelected;\n\n legendItem\n .append('rect')\n .attr('x', legendX + (isRTL ? legendWidth - LEGEND_PADDING - LEGEND_SHAPE_SIZE : LEGEND_PADDING))\n .attr('y', legendY + LEGEND_PADDING)\n .attr('width', LEGEND_SHAPE_SIZE)\n .attr('height', LEGEND_SHAPE_SIZE)\n .style('fill', isLegendActive ? legends[i].color : 'transparent')\n .style('stroke-width', LEGEND_SHAPE_BORDER)\n .style('stroke', legends[i].color);\n\n legendItem\n .append('text')\n .attr('x', legendX + (isRTL ? legendWidth - textOffset : textOffset))\n .attr('y', legendY + LEGEND_PADDING)\n .attr('dominant-baseline', 'hanging')\n .style('opacity', isLegendActive ? 1 : INACTIVE_LEGEND_TEXT_OPACITY)\n .text(legends[i].title)\n .call(selection => copyStyle(LEGEND_TEXT_STYLE_PROPERTIES_MAP, legendText.node, selection.node()!));\n\n legendX += legendWidth;\n }\n\n legendLines.push(legendLine);\n legendLineWidths.push(legendX);\n legendY += LEGEND_HEIGHT;\n\n if (centerLegends) {\n legendLines.forEach((ln, idx) => {\n const lineOffsetX = Math.max((svgWidth - legendLineWidths[idx]) / 2, 0);\n let remLineWidth = legendLineWidths[idx];\n let itemOffsetX = 0;\n ln.forEach(item => {\n const newOffsetX = lineOffsetX + (isRTL ? remLineWidth - item.width - itemOffsetX : 0);\n item.elem.attr('transform', `translate(${newOffsetX}, 0)`);\n remLineWidth -= item.width;\n itemOffsetX += item.width;\n });\n });\n } else if (isRTL) {\n const w1 = Math.max(svgWidth, ...legendLineWidths);\n legendLines.forEach(ln => {\n let remLineWidth = w1 - LEGEND_CONTAINER_MARGIN_START;\n let itemOffsetX = LEGEND_CONTAINER_MARGIN_START;\n ln.forEach(item => {\n const newOffsetX = remLineWidth - item.width - itemOffsetX;\n item.elem.attr('transform', `translate(${newOffsetX}, 0)`);\n remLineWidth -= item.width;\n itemOffsetX += item.width;\n });\n });\n }\n\n const w1 = Math.max(svgWidth, ...legendLineWidths);\n const h1 = legendY;\n const svg = d3Create<SVGSVGElement>('svg').attr('width', w1).attr('height', h1).attr('viewBox', `0 0 ${w1} ${h1}`);\n svg.append(() => legendGroup.node()!);\n\n return {\n node: svg.node(),\n width: w1,\n height: h1,\n };\n}\n\ntype PositionedImage = SvgImage & {\n x: number;\n y: number;\n};\n\nasync function svgToPng(grid: SvgImage[][], opts: ImageExportOptions = {}): Promise<string> {\n let totalWidth = 0;\n let totalHeight = 0;\n\n const positionedImages: PositionedImage[] = grid\n .map(row => {\n let rowWidth = 0;\n let rowHeight = 0;\n\n const items = row.map(item => {\n const positioned = { ...item, x: rowWidth, y: totalHeight };\n rowWidth += item.width;\n rowHeight = Math.max(rowHeight, item.height);\n return positioned;\n });\n\n totalWidth = Math.max(totalWidth, rowWidth);\n totalHeight += rowHeight;\n\n return items;\n })\n .flat();\n\n const scale = opts.scale || 1;\n const w0 = opts.width || totalWidth;\n const h0 = opts.height || totalHeight;\n const scaleX = (scale * w0) / totalWidth;\n const scaleY = (scale * h0) / totalHeight;\n totalWidth = scaleX * totalWidth;\n totalHeight = scaleY * totalHeight;\n\n const canvas = document.createElement('canvas');\n canvas.width = totalWidth;\n canvas.height = totalHeight;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Canvas context is null');\n }\n\n ctx.fillStyle = opts.background || 'transparent';\n ctx.fillRect(0, 0, totalWidth, totalHeight);\n\n await Promise.all(\n positionedImages.map(\n item =>\n new Promise<void>((resolve, reject) => {\n const img = new Image();\n img.onload = () => {\n ctx.drawImage(img, scaleX * item.x, scaleY * item.y, scaleX * item.width, scaleY * item.height);\n resolve();\n };\n img.onerror = reject;\n img.src = item.dataUrl;\n }),\n ),\n );\n\n return canvas.toDataURL('image/png');\n}\n\nfunction svgToBase64(svgNode: SVGSVGElement | null) {\n if (!svgNode) {\n throw new Error('SVG node is null');\n }\n\n const svgData = new XMLSerializer().serializeToString(svgNode);\n const svgDataUrl = 'data:image/svg+xml;base64,' + btoa(unescapePonyfill(encodeURIComponent(svgData)));\n return svgDataUrl;\n}\n\nconst hex2 = /^[\\da-f]{2}$/i;\nconst hex4 = /^[\\da-f]{4}$/i;\n\n/**\n * A ponyfill for the deprecated `unescape` method, taken from the `core-js` library.\n *\n * Source: {@link https://github.com/zloirock/core-js/blob/167136f479d3b8519953f2e4c534ecdd1031d3cf/packages/core-js/modules/es.unescape.js core-js/packages/core-js/modules/es.unescape.js}\n */\nfunction unescapePonyfill(str: string) {\n let result = '';\n const length = str.length;\n let index = 0;\n let chr;\n let part;\n while (index < length) {\n chr = str.charAt(index++);\n if (chr === '%') {\n if (str.charAt(index) === 'u') {\n part = str.slice(index + 1, index + 5);\n if (hex4.exec(part)) {\n result += String.fromCharCode(parseInt(part, 16));\n index += 5;\n continue;\n }\n } else {\n part = str.slice(index, index + 2);\n if (hex2.exec(part)) {\n result += String.fromCharCode(parseInt(part, 16));\n index += 2;\n continue;\n }\n }\n }\n result += chr;\n }\n return result;\n}\n"],"names":["create","d3Create","select","d3Select","isHTMLElement","copyStyle","measureTextWithDOM","LEGEND_CONTAINER_MARGIN_TOP","LEGEND_CONTAINER_MARGIN_START","LEGEND_PADDING","LEGEND_HEIGHT","LEGEND_SHAPE_BORDER","LEGEND_SHAPE_SIZE","LEGEND_SHAPE_MARGIN_END","INACTIVE_LEGEND_TEXT_OPACITY","exportChartsAsImage","charts","legendsToSvg","isRTL","opts","length","Error","chartImages","Promise","all","map","chart","resolve","svg","cloneStyledSVG","container","svgDataUrl","svgToBase64","node","dataUrl","width","height","grid","forEach","i","row","col","totalWidth","rowWidth","item","Math","max","push","svgToPng","SVG_STYLE_PROPERTIES","SVG_TEXT_STYLE_PROPERTIES","ANNOTATION_HTML_STYLE_PROPERTIES","ANNOTATION_FOREIGN_OBJECT_STYLE_PROPERTIES","chartContainer","querySelector","clonedSvg","cloneNode","attr","svgElements","getElementsByTagName","clonedSvgElements","TEXT_ELEMENTS","TABLE_ELEMENTS","tag","tagName","toLowerCase","includes","originalForeignObjects","querySelectorAll","clonedForeignObjects","originalFo","index","clonedFo","originalRoot","firstElementChild","clonedRoot","originalHtmlElements","clonedHtmlElements","originalEl","elementIndex","clonedEl","annotationSvg","annotationClone","annotationElements","clonedAnnotationElements","original","cloned","isSvgElement","SVGElement","isTextElement","isHtmlElement","getBoundingClientRect","selectAll","remove","append","result","LEGEND_TEXT_STYLE_PROPERTIES_MAP","color","cloneLegendsToSVG","legends","svgWidth","config","legendContainer","selectedLegends","centerLegends","textClassName","legendGroup","legendX","legendY","legendLine","legendLines","legendLineWidths","noLegendsSelected","Object","keys","textOffset","legendText","title","legendWidth","legendItem","elem","pop","isLegendActive","style","text","call","selection","ln","idx","lineOffsetX","remLineWidth","itemOffsetX","newOffsetX","w1","h1","totalHeight","positionedImages","rowHeight","items","positioned","x","y","flat","scale","w0","h0","scaleX","scaleY","canvas","document","createElement","ctx","getContext","fillStyle","background","fillRect","reject","img","Image","onload","drawImage","onerror","src","toDataURL","svgNode","svgData","XMLSerializer","serializeToString","btoa","unescapePonyfill","encodeURIComponent","hex2","hex4","str","chr","part","charAt","slice","exec","String","fromCharCode","parseInt"],"mappings":"AAAA;;;;;;;;;;;;qBAuRgBkG;eAAAA;;IAxPMnF,mBAAAA;;;;6BA5BiC,eAAe;gCACxC,4BAA4B;uBACZ,aAAU;wCAYjD,mDAAgD;AAchD,mCACLC,MAAmB,EACnBC,YAAuC,EACvCC,QAAiB,KAAK,EACtBC,OAA2B,CAAC,CAAC;IAE7B,IAAIH,OAAOI,MAAM,KAAK,KAAK,CAACH,cAAc;QACxC,MAAM,IAAII,MAAM;IAClB;IAEA,MAAMC,cAAc,MAAMC,QAAQC,GAAG,CACnCR,OAAOS,GAAG,CAACC,CAAAA;QACT,OAAO,IAAIH,QAAkBI,CAAAA;YAC3B,MAAMC,MAAMC,eAAeH,MAAMI,SAAS,EAAEZ;YAC5C,MAAMa,aAAaC,YAAYJ,IAAIK,IAAI;YACvCN,QAAQ;gBAAEO,SAASH;gBAAYI,OAAOP,IAAIO,KAAK;gBAAEC,QAAQR,IAAIQ,MAAM;YAAC;QACtE;IACF;IAGF,MAAMC,OAAqB,EAAE,EAAE,kBAAkB;IACjDrB,OAAOsB,OAAO,CAAC,CAACZ,OAAOa;QACrB,MAAMC,MAAMd,MAAMc,GAAG,IAAI;QACzB,MAAMC,MAAMf,MAAMe,GAAG,IAAI;QACzB,IAAI,CAACJ,IAAI,CAACG,IAAI,EAAE;YACdH,IAAI,CAACG,IAAI,GAAG,EAAE;QAChB;QACAH,IAAI,CAACG,IAAI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pC,IAAIqG,KAAKM,IAAI,CAACH,OAAO;oBACnBhF,UAAUoF,OAAOC,YAAY,CAACC,SAASN,MAAM;oBAC7CxG,SAAS;oBACT;gBACF;YACF,OAAO;gBACLwG,OAAOF,IAAII,KAAK,CAAC1G,OAAOA,QAAQ;gBAChC,IAAIoG,KAAKO,IAAI,CAACH,OAAO;oBACnBhF,UAAUoF,OAAOC,YAAY,CAACC,SAASN,MAAM;oBAC7CxG,SAAS;oBACT;gBACF;YACF;QACF;QACAwB,UAAU+E;IACZ;IACA,OAAO/E;AACT"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./utilities.cjs"), exports);
7
+ _export_star._(require("./colors.cjs"), exports);
8
+ _export_star._(require("./vbc-utils.cjs"), exports);
9
+ _export_star._(require("./Common.styles.cjs"), exports);
10
+ _export_star._(require("./ChartTitle.cjs"), exports);