@fluentui/react-charts 1.2.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/CHANGELOG.md +193 -15
  2. package/LICENSE +11 -17
  3. package/README.md +174 -23
  4. package/dist/index.d.ts +2143 -0
  5. package/lib/CartesianChart.js +1 -0
  6. package/lib/CartesianChart.js.map +1 -0
  7. package/lib/DeclarativeChart.js +1 -0
  8. package/lib/DeclarativeChart.js.map +1 -0
  9. package/lib/DonutChart.js +1 -0
  10. package/lib/DonutChart.js.map +1 -0
  11. package/lib/HorizontalBarChart.js +1 -0
  12. package/lib/HorizontalBarChart.js.map +1 -0
  13. package/lib/Legends.js +1 -0
  14. package/lib/Legends.js.map +1 -0
  15. package/lib/LineChart.js +1 -0
  16. package/lib/LineChart.js.map +1 -0
  17. package/lib/Popover.js +1 -0
  18. package/lib/Popover.js.map +1 -0
  19. package/lib/ResponsiveContainer.js +1 -0
  20. package/lib/ResponsiveContainer.js.map +1 -0
  21. package/lib/Sparkline.js +1 -0
  22. package/lib/Sparkline.js.map +1 -0
  23. package/lib/VerticalBarChart.js +1 -0
  24. package/lib/VerticalBarChart.js.map +1 -0
  25. package/lib/components/CommonComponents/CartesianChart.js +462 -0
  26. package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
  27. package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
  28. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
  29. package/lib/components/CommonComponents/ChartPopover.js +187 -0
  30. package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
  31. package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
  32. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
  33. package/lib/components/CommonComponents/index.js +4 -0
  34. package/lib/components/CommonComponents/index.js.map +1 -0
  35. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
  36. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  37. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
  38. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  39. package/lib/components/DeclarativeChart/DeclarativeChart.js +150 -0
  40. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  41. package/lib/components/DeclarativeChart/PlotlySchema.js +7 -0
  42. package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  43. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +400 -0
  44. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  45. package/lib/components/DeclarativeChart/imageExporter.js +221 -0
  46. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  47. package/lib/components/DeclarativeChart/index.js +1 -0
  48. package/lib/components/DeclarativeChart/index.js.map +1 -0
  49. package/lib/components/DonutChart/Arc/Arc.js +110 -0
  50. package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
  51. package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
  52. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
  53. package/lib/components/DonutChart/Arc/index.js +2 -0
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -0
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  57. package/lib/components/DonutChart/DonutChart.js +291 -0
  58. package/lib/components/DonutChart/DonutChart.js.map +1 -0
  59. package/lib/components/DonutChart/DonutChart.types.js +1 -0
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
  61. package/lib/components/DonutChart/Pie/Pie.js +72 -0
  62. package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
  63. package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
  64. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
  65. package/lib/components/DonutChart/Pie/index.js +2 -0
  66. package/lib/components/DonutChart/Pie/index.js.map +1 -0
  67. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
  68. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  69. package/lib/components/DonutChart/index.js +3 -0
  70. package/lib/components/DonutChart/index.js.map +1 -0
  71. package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
  72. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  73. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
  74. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  75. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
  76. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  77. package/lib/components/HorizontalBarChart/index.js +3 -0
  78. package/lib/components/HorizontalBarChart/index.js.map +1 -0
  79. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
  80. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  81. package/lib/components/Legends/Legends.js +302 -0
  82. package/lib/components/Legends/Legends.js.map +1 -0
  83. package/lib/components/Legends/Legends.types.js +1 -0
  84. package/lib/components/Legends/Legends.types.js.map +1 -0
  85. package/lib/components/Legends/OverflowMenu.js +25 -0
  86. package/lib/components/Legends/OverflowMenu.js.map +1 -0
  87. package/lib/components/Legends/index.js +3 -0
  88. package/lib/components/Legends/index.js.map +1 -0
  89. package/lib/components/Legends/shape.js +35 -0
  90. package/lib/components/Legends/shape.js.map +1 -0
  91. package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
  92. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
  93. package/lib/components/LineChart/LineChart.js +1026 -0
  94. package/lib/components/LineChart/LineChart.js.map +1 -0
  95. package/lib/components/LineChart/LineChart.types.js +3 -0
  96. package/lib/components/LineChart/LineChart.types.js.map +1 -0
  97. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
  98. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  99. package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
  100. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  101. package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
  102. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  103. package/lib/components/LineChart/index.js +4 -0
  104. package/lib/components/LineChart/index.js.map +1 -0
  105. package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
  106. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  107. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
  108. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  109. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
  110. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  111. package/lib/components/ResponsiveContainer/index.js +1 -0
  112. package/lib/components/ResponsiveContainer/index.js.map +1 -0
  113. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
  114. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  115. package/lib/components/Sparkline/Sparkline.js +119 -0
  116. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  117. package/lib/components/Sparkline/Sparkline.types.js +4 -0
  118. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  119. package/lib/components/Sparkline/index.js +3 -0
  120. package/lib/components/Sparkline/index.js.map +1 -0
  121. package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
  122. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  123. package/lib/components/VerticalBarChart/VerticalBarChart.js +849 -0
  124. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  125. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
  126. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  127. package/lib/components/VerticalBarChart/index.js +3 -0
  128. package/lib/components/VerticalBarChart/index.js.map +1 -0
  129. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
  130. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  131. package/lib/index.js +12 -8
  132. package/lib/index.js.map +1 -1
  133. package/lib/types/DataPoint.js +3 -0
  134. package/lib/types/DataPoint.js.map +1 -0
  135. package/lib/types/EventAnnotation.js +1 -0
  136. package/lib/types/EventAnnotation.js.map +1 -0
  137. package/lib/types/LegendDataItem.js +1 -0
  138. package/lib/types/LegendDataItem.js.map +1 -0
  139. package/lib/types/index.js +2 -2
  140. package/lib/types/index.js.map +1 -1
  141. package/lib/utilities/FocusableTooltipText.js +65 -0
  142. package/lib/utilities/FocusableTooltipText.js.map +1 -0
  143. package/lib/utilities/KeyCodes.js +8 -0
  144. package/lib/utilities/KeyCodes.js.map +1 -0
  145. package/lib/utilities/SVGTooltipText.js +138 -0
  146. package/lib/utilities/SVGTooltipText.js.map +1 -0
  147. package/lib/utilities/async-utils.js +380 -0
  148. package/lib/utilities/async-utils.js.map +1 -0
  149. package/lib/utilities/colors.js +249 -0
  150. package/lib/utilities/colors.js.map +1 -0
  151. package/lib/utilities/getWindow.js +25 -0
  152. package/lib/utilities/getWindow.js.map +1 -0
  153. package/lib/utilities/index.js +3 -0
  154. package/lib/utilities/index.js.map +1 -0
  155. package/lib/utilities/locale-util.js +15 -0
  156. package/lib/utilities/locale-util.js.map +1 -0
  157. package/lib/utilities/overflow-utils.js +27 -0
  158. package/lib/utilities/overflow-utils.js.map +1 -0
  159. package/lib/utilities/test-data.js +276 -0
  160. package/lib/utilities/test-data.js.map +1 -0
  161. package/lib/utilities/utilities.js +1215 -0
  162. package/lib/utilities/utilities.js.map +1 -0
  163. package/lib/utilities/vbc-utils.js +27 -0
  164. package/lib/utilities/vbc-utils.js.map +1 -0
  165. package/lib-commonjs/CartesianChart.js +6 -0
  166. package/lib-commonjs/CartesianChart.js.map +1 -0
  167. package/lib-commonjs/DeclarativeChart.js +6 -0
  168. package/lib-commonjs/DeclarativeChart.js.map +1 -0
  169. package/lib-commonjs/DonutChart.js +6 -0
  170. package/lib-commonjs/DonutChart.js.map +1 -0
  171. package/lib-commonjs/HorizontalBarChart.js +6 -0
  172. package/lib-commonjs/HorizontalBarChart.js.map +1 -0
  173. package/lib-commonjs/Legends.js +6 -0
  174. package/lib-commonjs/Legends.js.map +1 -0
  175. package/lib-commonjs/LineChart.js +6 -0
  176. package/lib-commonjs/LineChart.js.map +1 -0
  177. package/lib-commonjs/Popover.js +6 -0
  178. package/lib-commonjs/Popover.js.map +1 -0
  179. package/lib-commonjs/ResponsiveContainer.js +6 -0
  180. package/lib-commonjs/ResponsiveContainer.js.map +1 -0
  181. package/lib-commonjs/Sparkline.js +6 -0
  182. package/lib-commonjs/Sparkline.js.map +1 -0
  183. package/lib-commonjs/VerticalBarChart.js +6 -0
  184. package/lib-commonjs/VerticalBarChart.js.map +1 -0
  185. package/lib-commonjs/components/CommonComponents/CartesianChart.js +469 -0
  186. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
  187. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
  189. package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
  190. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
  191. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
  192. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
  193. package/lib-commonjs/components/CommonComponents/index.js +9 -0
  194. package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
  196. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  199. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +158 -0
  200. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  201. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +10 -0
  202. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  203. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +445 -0
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  205. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
  206. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  207. package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
  208. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  209. package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
  210. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
  211. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
  212. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
  213. package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
  214. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
  215. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
  216. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  217. package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
  218. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
  219. package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
  220. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
  221. package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
  222. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
  223. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
  224. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
  225. package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
  226. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
  227. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
  228. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  229. package/lib-commonjs/components/DonutChart/index.js +8 -0
  230. package/lib-commonjs/components/DonutChart/index.js.map +1 -0
  231. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
  232. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  233. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
  234. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  235. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
  236. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  237. package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
  238. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
  239. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
  240. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  241. package/lib-commonjs/components/Legends/Legends.js +313 -0
  242. package/lib-commonjs/components/Legends/Legends.js.map +1 -0
  243. package/lib-commonjs/components/Legends/Legends.types.js +6 -0
  244. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
  245. package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
  246. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
  247. package/lib-commonjs/components/Legends/index.js +8 -0
  248. package/lib-commonjs/components/Legends/index.js.map +1 -0
  249. package/lib-commonjs/components/Legends/shape.js +46 -0
  250. package/lib-commonjs/components/Legends/shape.js.map +1 -0
  251. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
  252. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
  253. package/lib-commonjs/components/LineChart/LineChart.js +1032 -0
  254. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
  255. package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
  256. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
  257. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
  258. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  259. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
  260. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  261. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
  262. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  263. package/lib-commonjs/components/LineChart/index.js +9 -0
  264. package/lib-commonjs/components/LineChart/index.js.map +1 -0
  265. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
  266. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  267. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
  268. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  269. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
  270. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  271. package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
  272. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
  273. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
  274. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  275. package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
  276. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  277. package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
  278. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  279. package/lib-commonjs/components/Sparkline/index.js +8 -0
  280. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  281. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
  282. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  283. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +851 -0
  284. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  285. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
  286. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  287. package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
  288. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
  289. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
  290. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  291. package/lib-commonjs/index.js +17 -0
  292. package/lib-commonjs/index.js.map +1 -0
  293. package/lib-commonjs/types/DataPoint.js +6 -0
  294. package/lib-commonjs/types/DataPoint.js.map +1 -0
  295. package/lib-commonjs/types/EventAnnotation.js +6 -0
  296. package/lib-commonjs/types/EventAnnotation.js.map +1 -0
  297. package/lib-commonjs/types/LegendDataItem.js +4 -0
  298. package/lib-commonjs/types/LegendDataItem.js.map +1 -0
  299. package/lib-commonjs/types/index.js +7 -0
  300. package/lib-commonjs/types/index.js.map +1 -0
  301. package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
  302. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  303. package/lib-commonjs/utilities/KeyCodes.js +18 -0
  304. package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
  305. package/lib-commonjs/utilities/SVGTooltipText.js +148 -0
  306. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  307. package/lib-commonjs/utilities/async-utils.js +382 -0
  308. package/lib-commonjs/utilities/async-utils.js.map +1 -0
  309. package/lib-commonjs/utilities/colors.js +270 -0
  310. package/lib-commonjs/utilities/colors.js.map +1 -0
  311. package/lib-commonjs/utilities/getWindow.js +28 -0
  312. package/lib-commonjs/utilities/getWindow.js.map +1 -0
  313. package/lib-commonjs/utilities/index.js +8 -0
  314. package/lib-commonjs/utilities/index.js.map +1 -0
  315. package/lib-commonjs/utilities/locale-util.js +25 -0
  316. package/lib-commonjs/utilities/locale-util.js.map +1 -0
  317. package/lib-commonjs/utilities/overflow-utils.js +36 -0
  318. package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
  319. package/lib-commonjs/utilities/test-data.js +324 -0
  320. package/lib-commonjs/utilities/test-data.js.map +1 -0
  321. package/lib-commonjs/utilities/utilities.js +1184 -0
  322. package/lib-commonjs/utilities/utilities.js.map +1 -0
  323. package/lib-commonjs/utilities/vbc-utils.js +45 -0
  324. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  325. package/package.json +80 -72
  326. package/CHANGELOG.json +0 -65
  327. package/lib/chart/chart-legend.d.ts +0 -6
  328. package/lib/chart/chart-legend.js +0 -445
  329. package/lib/chart/chart-legend.js.map +0 -1
  330. package/lib/chart/chart-render.d.ts +0 -3
  331. package/lib/chart/chart-render.js +0 -50
  332. package/lib/chart/chart-render.js.map +0 -1
  333. package/lib/chart/chart.d.ts +0 -3
  334. package/lib/chart/chart.js +0 -10
  335. package/lib/chart/chart.js.map +0 -1
  336. package/lib/chart/index.d.ts +0 -1
  337. package/lib/chart/index.js +0 -2
  338. package/lib/chart/index.js.map +0 -1
  339. package/lib/index.d.ts +0 -7
  340. package/lib/lib/builder.d.ts +0 -89
  341. package/lib/lib/builder.js +0 -379
  342. package/lib/lib/builder.js.map +0 -1
  343. package/lib/lib/datasets.d.ts +0 -123
  344. package/lib/lib/datasets.js +0 -285
  345. package/lib/lib/datasets.js.map +0 -1
  346. package/lib/lib/patterns.d.ts +0 -43
  347. package/lib/lib/patterns.js +0 -433
  348. package/lib/lib/patterns.js.map +0 -1
  349. package/lib/lib/plugins.d.ts +0 -11
  350. package/lib/lib/plugins.js +0 -403
  351. package/lib/lib/plugins.js.map +0 -1
  352. package/lib/lib/settings.d.ts +0 -12
  353. package/lib/lib/settings.js +0 -368
  354. package/lib/lib/settings.js.map +0 -1
  355. package/lib/lib/storybook.d.ts +0 -11
  356. package/lib/lib/storybook.js +0 -13
  357. package/lib/lib/storybook.js.map +0 -1
  358. package/lib/lib/utils.d.ts +0 -34
  359. package/lib/lib/utils.js +0 -253
  360. package/lib/lib/utils.js.map +0 -1
  361. package/lib/types/index.d.ts +0 -1
  362. package/lib/types/types.d.ts +0 -101
  363. package/lib/types/types.js +0 -41
  364. package/lib/types/types.js.map +0 -1
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ DataVizPalette: function() {
13
+ return DataVizPalette;
14
+ },
15
+ getColorFromToken: function() {
16
+ return getColorFromToken;
17
+ },
18
+ getNextColor: function() {
19
+ return getNextColor;
20
+ }
21
+ });
22
+ const DataVizPalette = {
23
+ color1: 'qualitative.1',
24
+ color2: 'qualitative.2',
25
+ color3: 'qualitative.3',
26
+ color4: 'qualitative.4',
27
+ color5: 'qualitative.5',
28
+ color6: 'qualitative.6',
29
+ color7: 'qualitative.7',
30
+ color8: 'qualitative.8',
31
+ color9: 'qualitative.9',
32
+ color10: 'qualitative.10',
33
+ color11: 'qualitative.11',
34
+ color12: 'qualitative.12',
35
+ color13: 'qualitative.13',
36
+ color14: 'qualitative.14',
37
+ color15: 'qualitative.15',
38
+ color16: 'qualitative.16',
39
+ color17: 'qualitative.17',
40
+ color18: 'qualitative.18',
41
+ color19: 'qualitative.19',
42
+ color20: 'qualitative.20',
43
+ color21: 'qualitative.21',
44
+ color22: 'qualitative.22',
45
+ color23: 'qualitative.23',
46
+ color24: 'qualitative.24',
47
+ color25: 'qualitative.25',
48
+ color26: 'qualitative.26',
49
+ color27: 'qualitative.27',
50
+ color28: 'qualitative.28',
51
+ color29: 'qualitative.29',
52
+ color30: 'qualitative.30',
53
+ color31: 'qualitative.31',
54
+ color32: 'qualitative.32',
55
+ color33: 'qualitative.33',
56
+ color34: 'qualitative.34',
57
+ color35: 'qualitative.35',
58
+ color36: 'qualitative.36',
59
+ color37: 'qualitative.37',
60
+ color38: 'qualitative.38',
61
+ color39: 'qualitative.39',
62
+ color40: 'qualitative.40',
63
+ info: 'semantic.info',
64
+ disabled: 'semantic.disabled',
65
+ highError: 'semantic.highError',
66
+ error: 'semantic.error',
67
+ warning: 'semantic.warning',
68
+ success: 'semantic.success',
69
+ highSuccess: 'semantic.highSuccess'
70
+ };
71
+ const QualitativePalette = {
72
+ '1': [
73
+ '#637cef'
74
+ ],
75
+ '2': [
76
+ '#e3008c'
77
+ ],
78
+ '3': [
79
+ '#2aa0a4'
80
+ ],
81
+ '4': [
82
+ '#9373c0'
83
+ ],
84
+ '5': [
85
+ '#13a10e'
86
+ ],
87
+ '6': [
88
+ '#3a96dd'
89
+ ],
90
+ '7': [
91
+ '#ca5010'
92
+ ],
93
+ '8': [
94
+ '#57811b'
95
+ ],
96
+ '9': [
97
+ '#b146c2'
98
+ ],
99
+ '10': [
100
+ '#ae8c00'
101
+ ],
102
+ '11': [
103
+ '#3c51b4',
104
+ '#93a4f4'
105
+ ],
106
+ '12': [
107
+ '#ad006a',
108
+ '#ee5fb7'
109
+ ],
110
+ '13': [
111
+ '#026467',
112
+ '#4cb4b7'
113
+ ],
114
+ '14': [
115
+ '#674c8c',
116
+ '#a083c9'
117
+ ],
118
+ '15': [
119
+ '#0e7a0b',
120
+ '#27ac22'
121
+ ],
122
+ '16': [
123
+ '#2c72a8',
124
+ '#4fa1e1'
125
+ ],
126
+ '17': [
127
+ '#9a3d0c',
128
+ '#d77440'
129
+ ],
130
+ '18': [
131
+ '#405f14',
132
+ '#73aa24'
133
+ ],
134
+ '19': [
135
+ '#863593',
136
+ '#c36bd1'
137
+ ],
138
+ '20': [
139
+ '#6d5700',
140
+ '#d0b232'
141
+ ],
142
+ '21': [
143
+ '#4f6bed'
144
+ ],
145
+ '22': [
146
+ '#ea38a6'
147
+ ],
148
+ '23': [
149
+ '#038387'
150
+ ],
151
+ '24': [
152
+ '#8764b8'
153
+ ],
154
+ '25': [
155
+ '#11910d'
156
+ ],
157
+ '26': [
158
+ '#3487c7'
159
+ ],
160
+ '27': [
161
+ '#d06228'
162
+ ],
163
+ '28': [
164
+ '#689920'
165
+ ],
166
+ '29': [
167
+ '#ba58c9'
168
+ ],
169
+ '30': [
170
+ '#937700',
171
+ '#c19c00'
172
+ ],
173
+ '31': [
174
+ '#2c3c85',
175
+ '#c8d1fa'
176
+ ],
177
+ '32': [
178
+ '#7f004e',
179
+ '#f7adda'
180
+ ],
181
+ '33': [
182
+ '#02494c',
183
+ '#9bd9db'
184
+ ],
185
+ '34': [
186
+ '#4c3867',
187
+ '#b29ad4'
188
+ ],
189
+ '35': [
190
+ '#0b5a08',
191
+ '#a7e3a5'
192
+ ],
193
+ '36': [
194
+ '#20547c',
195
+ '#83bdeb'
196
+ ],
197
+ '37': [
198
+ '#712d09',
199
+ '#df8e64'
200
+ ],
201
+ '38': [
202
+ '#23330b',
203
+ '#a4cc6c'
204
+ ],
205
+ '39': [
206
+ '#63276d',
207
+ '#cf87da'
208
+ ],
209
+ '40': [
210
+ '#3a2f00',
211
+ '#dac157'
212
+ ]
213
+ };
214
+ const SemanticPalette = {
215
+ info: [
216
+ '#015cda'
217
+ ],
218
+ disabled: [
219
+ '#dbdbdb',
220
+ '#4d4d4d'
221
+ ],
222
+ highError: [
223
+ '#6e0811',
224
+ '#cc2635'
225
+ ],
226
+ error: [
227
+ '#c50f1f',
228
+ '#dc626d'
229
+ ],
230
+ warning: [
231
+ '#f7630c',
232
+ '#f87528'
233
+ ],
234
+ success: [
235
+ '#107c10',
236
+ '#54b054'
237
+ ],
238
+ highSuccess: [
239
+ '#094509',
240
+ '#218c21'
241
+ ]
242
+ };
243
+ const Colors = {
244
+ qualitative: QualitativePalette,
245
+ semantic: SemanticPalette
246
+ };
247
+ const QUALITATIVE_COLORS = Object.values(QualitativePalette);
248
+ const TOKENS = Object.values(DataVizPalette);
249
+ const getThemeSpecificColor = (colors, isDarkTheme)=>{
250
+ if (colors.length === 0) {
251
+ return '';
252
+ }
253
+ const colorIdx = Number(isDarkTheme);
254
+ if (colorIdx < colors.length) {
255
+ return colors[colorIdx];
256
+ }
257
+ return colors[0];
258
+ };
259
+ const getNextColor = (index, offset = 0, isDarkTheme = false)=>{
260
+ const colors = QUALITATIVE_COLORS[(index + offset) % QUALITATIVE_COLORS.length];
261
+ return getThemeSpecificColor(colors, isDarkTheme);
262
+ };
263
+ const getColorFromToken = (token, isDarkTheme = false)=>{
264
+ if (TOKENS.indexOf(token) >= 0) {
265
+ const [paletteName, colorCode] = token.split('.');
266
+ const colors = Colors[paletteName][colorCode];
267
+ return getThemeSpecificColor(colors, isDarkTheme);
268
+ }
269
+ return token;
270
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["colors.ts"],"sourcesContent":["export const DataVizPalette = {\n color1: 'qualitative.1',\n color2: 'qualitative.2',\n color3: 'qualitative.3',\n color4: 'qualitative.4',\n color5: 'qualitative.5',\n color6: 'qualitative.6',\n color7: 'qualitative.7',\n color8: 'qualitative.8',\n color9: 'qualitative.9',\n color10: 'qualitative.10',\n color11: 'qualitative.11',\n color12: 'qualitative.12',\n color13: 'qualitative.13',\n color14: 'qualitative.14',\n color15: 'qualitative.15',\n color16: 'qualitative.16',\n color17: 'qualitative.17',\n color18: 'qualitative.18',\n color19: 'qualitative.19',\n color20: 'qualitative.20',\n color21: 'qualitative.21',\n color22: 'qualitative.22',\n color23: 'qualitative.23',\n color24: 'qualitative.24',\n color25: 'qualitative.25',\n color26: 'qualitative.26',\n color27: 'qualitative.27',\n color28: 'qualitative.28',\n color29: 'qualitative.29',\n color30: 'qualitative.30',\n color31: 'qualitative.31',\n color32: 'qualitative.32',\n color33: 'qualitative.33',\n color34: 'qualitative.34',\n color35: 'qualitative.35',\n color36: 'qualitative.36',\n color37: 'qualitative.37',\n color38: 'qualitative.38',\n color39: 'qualitative.39',\n color40: 'qualitative.40',\n info: 'semantic.info',\n disabled: 'semantic.disabled',\n highError: 'semantic.highError',\n error: 'semantic.error',\n warning: 'semantic.warning',\n success: 'semantic.success',\n highSuccess: 'semantic.highSuccess',\n};\n\n/**\n * Key: Color code.\n * Value:\n * Index 0 - Default color / Color for light theme,\n * Index 1 - Color for dark theme\n */\ntype Palette = { [key: string]: string[] };\n\nconst QualitativePalette: Palette = {\n '1': ['#637cef'], // [cornflower.tint10],\n '2': ['#e3008c'], // [hotPink.primary],\n '3': ['#2aa0a4'], // [teal.tint20],\n '4': ['#9373c0'], // [orchid.tint10],\n '5': ['#13a10e'], // [lightGreen.primary],\n '6': ['#3a96dd'], // [lightBlue.primary],\n '7': ['#ca5010'], // [pumpkin.primary],\n '8': ['#57811b'], // [lime.shade20],\n '9': ['#b146c2'], // [lilac.primary],\n '10': ['#ae8c00'], // [gold.shade10],\n '11': ['#3c51b4', '#93a4f4'], // [cornflower.shade20, cornflower.tint30],\n '12': ['#ad006a', '#ee5fb7'], // [hotPink.shade20, hotPink.tint30],\n '13': ['#026467', '#4cb4b7'], // [teal.shade20, teal.tint30],\n '14': ['#674c8c', '#a083c9'], // [orchid.shade20, orchid.tint20],\n '15': ['#0e7a0b', '#27ac22'], // [lightGreen.shade20, lightGreen.tint10],\n '16': ['#2c72a8', '#4fa1e1'], // [lightBlue.shade20, lightBlue.tint10],\n '17': ['#9a3d0c', '#d77440'], // [pumpkin.shade20, pumpkin.tint20],\n '18': ['#405f14', '#73aa24'], // [lime.shade30, lime.primary],\n '19': ['#863593', '#c36bd1'], // [lilac.shade20, lilac.tint20],\n '20': ['#6d5700', '#d0b232'], // [gold.shade30, gold.tint20],\n '21': ['#4f6bed'], // [cornflower.primary],\n '22': ['#ea38a6'], // [hotPink.tint20],\n '23': ['#038387'], // [teal.primary],\n '24': ['#8764b8'], // [orchid.primary],\n '25': ['#11910d'], // [lightGreen.shade10],\n '26': ['#3487c7'], // [lightBlue.shade10],\n '27': ['#d06228'], // [pumpkin.tint10],\n '28': ['#689920'], // [lime.shade10],\n '29': ['#ba58c9'], // [lilac.tint10],\n '30': ['#937700', '#c19c00'], // [gold.shade20, gold.primary],\n '31': ['#2c3c85', '#c8d1fa'], // [cornflower.shade30, cornflower.tint40],\n '32': ['#7f004e', '#f7adda'], // [hotPink.shade30, hotPink.tint40],\n '33': ['#02494c', '#9bd9db'], // [teal.shade30, teal.tint40],\n '34': ['#4c3867', '#b29ad4'], // [orchid.shade30, orchid.tint30],\n '35': ['#0b5a08', '#a7e3a5'], // [lightGreen.shade30, lightGreen.tint40],\n '36': ['#20547c', '#83bdeb'], // [lightBlue.shade30, lightBlue.tint30],\n '37': ['#712d09', '#df8e64'], // [pumpkin.shade30, pumpkin.tint30],\n '38': ['#23330b', '#a4cc6c'], // [lime.shade40, lime.tint30],\n '39': ['#63276d', '#cf87da'], // [lilac.shade30, lilac.tint30],\n '40': ['#3a2f00', '#dac157'], // [gold.shade40, gold.tint30],\n};\n\nconst SemanticPalette: Palette = {\n info: ['#015cda'],\n disabled: ['#dbdbdb', '#4d4d4d'], // [grey[86], grey[30]]\n highError: ['#6e0811', '#cc2635'], // [cranberry.shade30, cranberry.tint10],\n error: ['#c50f1f', '#dc626d'], // [cranberry.primary, cranberry.tint30],\n warning: ['#f7630c', '#f87528'], // [orange.primary, orange.tint10],\n success: ['#107c10', '#54b054'], // [green.primary, green.tint30],\n highSuccess: ['#094509', '#218c21'], // [green.shade30, green.tint10],\n};\n\nconst Colors: { [key: string]: Palette } = {\n qualitative: QualitativePalette,\n semantic: SemanticPalette,\n};\n\nconst QUALITATIVE_COLORS = Object.values(QualitativePalette);\nconst TOKENS = Object.values(DataVizPalette);\n\nconst getThemeSpecificColor = (colors: string[], isDarkTheme: boolean): string => {\n if (colors.length === 0) {\n return '';\n }\n const colorIdx = Number(isDarkTheme);\n if (colorIdx < colors.length) {\n return colors[colorIdx];\n }\n return colors[0];\n};\n\nexport const getNextColor = (index: number, offset: number = 0, isDarkTheme: boolean = false): string => {\n const colors = QUALITATIVE_COLORS[(index + offset) % QUALITATIVE_COLORS.length];\n return getThemeSpecificColor(colors, isDarkTheme);\n};\n\nexport const getColorFromToken = (token: string, isDarkTheme: boolean = false): string => {\n if (TOKENS.indexOf(token) >= 0) {\n const [paletteName, colorCode] = token.split('.');\n const colors = Colors[paletteName][colorCode];\n return getThemeSpecificColor(colors, isDarkTheme);\n }\n return token;\n};\n"],"names":["DataVizPalette","getColorFromToken","getNextColor","color1","color2","color3","color4","color5","color6","color7","color8","color9","color10","color11","color12","color13","color14","color15","color16","color17","color18","color19","color20","color21","color22","color23","color24","color25","color26","color27","color28","color29","color30","color31","color32","color33","color34","color35","color36","color37","color38","color39","color40","info","disabled","highError","error","warning","success","highSuccess","QualitativePalette","SemanticPalette","Colors","qualitative","semantic","QUALITATIVE_COLORS","Object","values","TOKENS","getThemeSpecificColor","colors","isDarkTheme","length","colorIdx","Number","index","offset","token","indexOf","paletteName","colorCode","split"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "getWindow", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return getWindow;
9
+ }
10
+ });
11
+ const _reactutilities = require("@fluentui/react-utilities");
12
+ let _window = undefined;
13
+ // Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window"
14
+ // hits a memory leak, whereas aliasing it and calling "typeof _window" does not.
15
+ // Caching the window value at the file scope lets us minimize the impact.
16
+ try {
17
+ // eslint-disable-next-line no-restricted-globals
18
+ _window = window;
19
+ } catch (e) {
20
+ /* no-op */ }
21
+ function getWindow(rootElement) {
22
+ if (!(0, _reactutilities.canUseDOM)() || typeof _window === 'undefined') {
23
+ return undefined;
24
+ } else {
25
+ const el = rootElement;
26
+ return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : _window;
27
+ }
28
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["getWindow.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\n\nlet _window: Window | undefined = undefined;\n\n// Note: Accessing \"window\" in IE11 is somewhat expensive, and calling \"typeof window\"\n// hits a memory leak, whereas aliasing it and calling \"typeof _window\" does not.\n// Caching the window value at the file scope lets us minimize the impact.\ntry {\n // eslint-disable-next-line no-restricted-globals\n _window = window;\n} catch (e) {\n /* no-op */\n}\n\n/**\n * Helper to get the window object. The helper will make sure to use a cached variable\n * of \"window\", to avoid overhead and memory leaks in IE11. Note that in popup scenarios the\n * window object won't match the \"global\" window object, and for these scenarios, you should\n * pass in an element hosted within the popup.\n *\n * @public\n */\nexport function getWindow(rootElement?: Element | null): Window | undefined {\n if (!canUseDOM() || typeof _window === 'undefined') {\n return undefined;\n } else {\n const el = rootElement as Element;\n\n return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : _window;\n }\n}\n"],"names":["getWindow","_window","undefined","window","e","rootElement","canUseDOM","el","ownerDocument","defaultView"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAsBgBA;;;eAAAA;;;gCAtBU;AAE1B,IAAIC,UAA8BC;AAElC,sFAAsF;AACtF,iFAAiF;AACjF,0EAA0E;AAC1E,IAAI;IACF,iDAAiD;IACjDD,UAAUE;AACZ,EAAE,OAAOC,GAAG;AACV,SAAS,GACX;AAUO,SAASJ,UAAUK,WAA4B;IACpD,IAAI,CAACC,IAAAA,yBAAAA,OAAe,OAAOL,YAAY,aAAa;QAClD,OAAOC;IACT,OAAO;QACL,MAAMK,KAAKF;QAEX,OAAOE,MAAMA,GAAGC,aAAa,IAAID,GAAGC,aAAa,CAACC,WAAW,GAAGF,GAAGC,aAAa,CAACC,WAAW,GAAGR;IACjG;AACF"}
@@ -0,0 +1,8 @@
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"), exports);
7
+ _export_star._(require("./colors"), exports);
8
+ _export_star._(require("./vbc-utils"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './utilities';\nexport * from './colors';\nexport * from './vbc-utils';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "convertToLocaleString", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return convertToLocaleString;
9
+ }
10
+ });
11
+ const convertToLocaleString = (data, culture)=>{
12
+ if (!data) {
13
+ return data;
14
+ }
15
+ culture = culture || undefined;
16
+ if (typeof data === 'number') {
17
+ return data.toLocaleString(culture);
18
+ } else if (typeof data === 'string' && !isNaN(Number(data))) {
19
+ const num = Number(data);
20
+ return num.toLocaleString(culture);
21
+ } else if (data instanceof Date) {
22
+ return data.toLocaleDateString(culture);
23
+ }
24
+ return data;
25
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["locale-util.ts"],"sourcesContent":["type LocaleStringDataProps = number | string | Date | { [id: string]: number } | undefined;\nexport const convertToLocaleString = (data: LocaleStringDataProps, culture?: string): LocaleStringDataProps => {\n if (!data) {\n return data;\n }\n culture = culture || undefined;\n if (typeof data === 'number') {\n return data.toLocaleString(culture);\n } else if (typeof data === 'string' && !isNaN(Number(data))) {\n const num = Number(data);\n return num.toLocaleString(culture);\n } else if (data instanceof Date) {\n return data.toLocaleDateString(culture);\n }\n return data;\n};\n"],"names":["convertToLocaleString","data","culture","undefined","toLocaleString","isNaN","Number","num","Date","toLocaleDateString"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BACaA;;;eAAAA;;;AAAN,MAAMA,wBAAwB,CAACC,MAA6BC;IACjE,IAAI,CAACD,MAAM;QACT,OAAOA;IACT;IACAC,UAAUA,WAAWC;IACrB,IAAI,OAAOF,SAAS,UAAU;QAC5B,OAAOA,KAAKG,cAAc,CAACF;IAC7B,OAAO,IAAI,OAAOD,SAAS,YAAY,CAACI,MAAMC,OAAOL,QAAQ;QAC3D,MAAMM,MAAMD,OAAOL;QACnB,OAAOM,IAAIH,cAAc,CAACF;IAC5B,OAAO,IAAID,gBAAgBO,MAAM;QAC/B,OAAOP,KAAKQ,kBAAkB,CAACP;IACjC;IACA,OAAOD;AACT"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Detects whether an element's content has horizontal overflow
3
+ *
4
+ * @public
5
+ * @param element - Element to check for overflow
6
+ * @returns True if element's content overflows
7
+ */ "use strict";
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: all[name]
15
+ });
16
+ }
17
+ _export(exports, {
18
+ hasHorizontalOverflow: function() {
19
+ return hasHorizontalOverflow;
20
+ },
21
+ hasOverflow: function() {
22
+ return hasOverflow;
23
+ },
24
+ hasVerticalOverflow: function() {
25
+ return hasVerticalOverflow;
26
+ }
27
+ });
28
+ function hasHorizontalOverflow(element) {
29
+ return element.clientWidth < element.scrollWidth;
30
+ }
31
+ function hasVerticalOverflow(element) {
32
+ return element.clientHeight < element.scrollHeight;
33
+ }
34
+ function hasOverflow(element) {
35
+ return hasHorizontalOverflow(element) || hasVerticalOverflow(element);
36
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["overflow-utils.ts"],"sourcesContent":["/**\n * Detects whether an element's content has horizontal overflow\n *\n * @public\n * @param element - Element to check for overflow\n * @returns True if element's content overflows\n */\nexport function hasHorizontalOverflow(element: HTMLElement): boolean {\n return element.clientWidth < element.scrollWidth;\n}\n\n/**\n * Detects whether an element's content has vertical overflow\n *\n * @public\n * @param element - Element to check for overflow\n * @returns True if element's content overflows\n */\nexport function hasVerticalOverflow(element: HTMLElement): boolean {\n return element.clientHeight < element.scrollHeight;\n}\n\n/**\n * Detects whether an element's content has overflow in any direction\n *\n * @public\n * @param element - Element to check for overflow\n * @returns True if element's content overflows\n */\nexport function hasOverflow(element: HTMLElement): boolean {\n return hasHorizontalOverflow(element) || hasVerticalOverflow(element);\n}\n"],"names":["hasHorizontalOverflow","hasOverflow","hasVerticalOverflow","element","clientWidth","scrollWidth","clientHeight","scrollHeight"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;;;;;CAMC;;;;;;;;;;;IACeA,qBAAAA;eAAAA;;IAsBAC,WAAAA;eAAAA;;IAXAC,mBAAAA;eAAAA;;;AAXT,SAASF,sBAAsBG,OAAoB;IACxD,OAAOA,QAAQC,WAAW,GAAGD,QAAQE,WAAW;AAClD;AASO,SAASH,oBAAoBC,OAAoB;IACtD,OAAOA,QAAQG,YAAY,GAAGH,QAAQI,YAAY;AACpD;AASO,SAASN,YAAYE,OAAoB;IAC9C,OAAOH,sBAAsBG,YAAYD,oBAAoBC;AAC/D"}