@elliemae/ds-dataviz 3.80.0-next.65 → 3.80.0-next.69

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 (398) hide show
  1. package/dist/cjs/constants/index.js +73 -0
  2. package/dist/cjs/constants/index.js.map +7 -0
  3. package/dist/cjs/graphs/Chart/Chart.js +6 -1
  4. package/dist/cjs/graphs/Chart/Chart.js.map +2 -2
  5. package/dist/cjs/graphs/Chart/ChartContext.js.map +2 -2
  6. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js +36 -24
  7. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +3 -3
  8. package/dist/cjs/graphs/Chart/SingleStackedBar/styles.js +12 -5
  9. package/dist/cjs/graphs/Chart/SingleStackedBar/styles.js.map +2 -2
  10. package/dist/cjs/graphs/Chart/config/chartInteractionStore.js +98 -0
  11. package/dist/cjs/graphs/Chart/config/chartInteractionStore.js.map +7 -0
  12. package/dist/cjs/graphs/Chart/config/useChart.js +56 -40
  13. package/dist/cjs/graphs/Chart/config/useChart.js.map +2 -2
  14. package/dist/cjs/graphs/Chart/config/useChartDescription.js +62 -0
  15. package/dist/cjs/graphs/Chart/config/useChartDescription.js.map +7 -0
  16. package/dist/cjs/graphs/Chart/config/useEntranceAnimation.js +141 -0
  17. package/dist/cjs/graphs/Chart/config/useEntranceAnimation.js.map +7 -0
  18. package/dist/cjs/graphs/Chart/config/useGetters.js +10 -0
  19. package/dist/cjs/graphs/Chart/config/useGetters.js.map +2 -2
  20. package/dist/cjs/graphs/Chart/config/useInternalMargins.js +25 -5
  21. package/dist/cjs/graphs/Chart/config/useInternalMargins.js.map +2 -2
  22. package/dist/cjs/graphs/Chart/config/useKeyboardNavigation.js +35 -51
  23. package/dist/cjs/graphs/Chart/config/useKeyboardNavigation.js.map +2 -2
  24. package/dist/cjs/graphs/Chart/config/useScales.js +200 -67
  25. package/dist/cjs/graphs/Chart/config/useScales.js.map +2 -2
  26. package/dist/cjs/graphs/Chart/config/useValidateProps.js +53 -4
  27. package/dist/cjs/graphs/Chart/config/useValidateProps.js.map +2 -2
  28. package/dist/cjs/graphs/Chart/config/useValueAxisTransition.js +128 -0
  29. package/dist/cjs/graphs/Chart/config/useValueAxisTransition.js.map +7 -0
  30. package/dist/cjs/graphs/Chart/config/useWheelScroll.js +111 -0
  31. package/dist/cjs/graphs/Chart/config/useWheelScroll.js.map +7 -0
  32. package/dist/cjs/graphs/Chart/helpers/alignedTicks.js +56 -0
  33. package/dist/cjs/graphs/Chart/helpers/alignedTicks.js.map +7 -0
  34. package/dist/cjs/graphs/Chart/helpers/barPath.js +53 -0
  35. package/dist/cjs/graphs/Chart/helpers/barPath.js.map +7 -0
  36. package/dist/cjs/graphs/Chart/{react-desc-prop-types.js → helpers/dataInView.js} +26 -27
  37. package/dist/cjs/graphs/Chart/helpers/dataInView.js.map +7 -0
  38. package/dist/cjs/graphs/Chart/helpers/index.js +34 -0
  39. package/dist/cjs/graphs/Chart/helpers/index.js.map +2 -2
  40. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/theming.js → helpers/logAxis.js} +13 -9
  41. package/dist/cjs/graphs/Chart/helpers/logAxis.js.map +7 -0
  42. package/dist/cjs/graphs/Chart/helpers/tickRotation.js +54 -0
  43. package/dist/cjs/graphs/Chart/helpers/tickRotation.js.map +7 -0
  44. package/dist/cjs/graphs/Chart/helpers/timeTicks.js +56 -0
  45. package/dist/cjs/graphs/Chart/helpers/timeTicks.js.map +7 -0
  46. package/dist/cjs/graphs/Chart/helpers/trend.js +45 -0
  47. package/dist/cjs/graphs/Chart/helpers/trend.js.map +7 -0
  48. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/index.js → helpers/useSerieDimming.js} +20 -6
  49. package/dist/cjs/graphs/Chart/helpers/useSerieDimming.js.map +7 -0
  50. package/dist/cjs/graphs/Chart/helpers/useUniqueData.js +15 -18
  51. package/dist/cjs/graphs/Chart/helpers/useUniqueData.js.map +2 -2
  52. package/dist/cjs/graphs/Chart/helpers/useVirtualizedSeries.js +12 -5
  53. package/dist/cjs/graphs/Chart/helpers/useVirtualizedSeries.js.map +2 -2
  54. package/dist/cjs/graphs/Chart/{DataTestIds.js → helpers/zeroLine.js} +12 -9
  55. package/dist/cjs/graphs/Chart/helpers/zeroLine.js.map +7 -0
  56. package/dist/cjs/graphs/Chart/parts/A11yRegion.js +8 -2
  57. package/dist/cjs/graphs/Chart/parts/A11yRegion.js.map +2 -2
  58. package/dist/cjs/graphs/Chart/parts/Axis/Axis.js +40 -4
  59. package/dist/cjs/graphs/Chart/parts/Axis/Axis.js.map +2 -2
  60. package/dist/cjs/graphs/Chart/parts/Axis/AxisBottom.js +18 -4
  61. package/dist/cjs/graphs/Chart/parts/Axis/AxisBottom.js.map +2 -2
  62. package/dist/cjs/graphs/Chart/parts/Axis/AxisLeft.js +14 -6
  63. package/dist/cjs/graphs/Chart/parts/Axis/AxisLeft.js.map +2 -2
  64. package/dist/cjs/graphs/Chart/parts/Axis/AxisRight.js +14 -4
  65. package/dist/cjs/graphs/Chart/parts/Axis/AxisRight.js.map +2 -2
  66. package/dist/cjs/graphs/Chart/parts/Axis/GridLine.js +15 -1
  67. package/dist/cjs/graphs/Chart/parts/Axis/GridLine.js.map +2 -2
  68. package/dist/cjs/graphs/Chart/parts/Axis/Tick.js +10 -4
  69. package/dist/cjs/graphs/Chart/parts/Axis/Tick.js.map +2 -2
  70. package/dist/cjs/graphs/Chart/parts/Axis/useTickTransition.js +170 -0
  71. package/dist/cjs/graphs/Chart/parts/Axis/useTickTransition.js.map +7 -0
  72. package/dist/cjs/graphs/Chart/parts/ChartContainer.js +41 -19
  73. package/dist/cjs/graphs/Chart/parts/ChartContainer.js.map +2 -2
  74. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js +6 -3
  75. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  76. package/dist/cjs/graphs/Chart/parts/HoverBand.js +86 -0
  77. package/dist/cjs/graphs/Chart/parts/HoverBand.js.map +7 -0
  78. package/dist/cjs/graphs/Chart/parts/Labels/Label.js +12 -1
  79. package/dist/cjs/graphs/Chart/parts/Labels/Label.js.map +2 -2
  80. package/dist/cjs/graphs/Chart/parts/Labels/index.js +12 -4
  81. package/dist/cjs/graphs/Chart/parts/Labels/index.js.map +2 -2
  82. package/dist/cjs/graphs/Chart/parts/Legend/BottomLegend.js +6 -3
  83. package/dist/cjs/graphs/Chart/parts/Legend/BottomLegend.js.map +2 -2
  84. package/dist/cjs/graphs/Chart/parts/Legend/LeftLegend.js +2 -6
  85. package/dist/cjs/graphs/Chart/parts/Legend/LeftLegend.js.map +2 -2
  86. package/dist/cjs/graphs/Chart/parts/Legend/LegendItem.js +91 -9
  87. package/dist/cjs/graphs/Chart/parts/Legend/LegendItem.js.map +2 -2
  88. package/dist/cjs/graphs/Chart/parts/Legend/RightLegend.js +3 -4
  89. package/dist/cjs/graphs/Chart/parts/Legend/RightLegend.js.map +2 -2
  90. package/dist/cjs/graphs/Chart/parts/Legend/TopLegend.js +8 -6
  91. package/dist/cjs/graphs/Chart/parts/Legend/TopLegend.js.map +2 -2
  92. package/dist/cjs/graphs/Chart/parts/Scrapper/Scrapper.js +29 -3
  93. package/dist/cjs/graphs/Chart/parts/Scrapper/Scrapper.js.map +2 -2
  94. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js +82 -55
  95. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +3 -3
  96. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapper.js +14 -6
  97. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapper.js.map +2 -2
  98. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +67 -43
  99. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  100. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/data-test-ids.js → parts/ScreenReaderText.js} +17 -7
  101. package/dist/cjs/graphs/Chart/parts/ScreenReaderText.js.map +7 -0
  102. package/dist/cjs/graphs/Chart/parts/Scroller/BlurMask.js +14 -9
  103. package/dist/cjs/graphs/Chart/parts/Scroller/BlurMask.js.map +2 -2
  104. package/dist/cjs/graphs/Chart/parts/Scroller/Controllers.js +152 -49
  105. package/dist/cjs/graphs/Chart/parts/Scroller/Controllers.js.map +2 -2
  106. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarX.js +22 -6
  107. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarX.js.map +2 -2
  108. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarY.js +13 -6
  109. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarY.js.map +2 -2
  110. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerX.js +42 -35
  111. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerX.js.map +2 -2
  112. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerY.js +9 -4
  113. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerY.js.map +2 -2
  114. package/dist/cjs/graphs/Chart/parts/SeriesFactory.js +39 -30
  115. package/dist/cjs/graphs/Chart/parts/SeriesFactory.js.map +2 -2
  116. package/dist/cjs/graphs/Chart/parts/TrendHighlight.js +57 -19
  117. package/dist/cjs/graphs/Chart/parts/TrendHighlight.js.map +2 -2
  118. package/dist/cjs/graphs/Chart/parts/ZeroLine.js +66 -0
  119. package/dist/cjs/graphs/Chart/parts/ZeroLine.js.map +7 -0
  120. package/dist/cjs/graphs/Chart/scales/index.js +50 -20
  121. package/dist/cjs/graphs/Chart/scales/index.js.map +3 -3
  122. package/dist/cjs/graphs/Chart/series/Area.js +76 -9
  123. package/dist/cjs/graphs/Chart/series/Area.js.map +2 -2
  124. package/dist/cjs/graphs/Chart/series/Bars.js +3 -1
  125. package/dist/cjs/graphs/Chart/series/Bars.js.map +2 -2
  126. package/dist/cjs/graphs/Chart/series/HorizontalBars.js +4 -1
  127. package/dist/cjs/graphs/Chart/series/HorizontalBars.js.map +2 -2
  128. package/dist/cjs/graphs/Chart/series/HorizontalStackedBars.js +14 -7
  129. package/dist/cjs/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
  130. package/dist/cjs/graphs/Chart/series/Line.js +9 -7
  131. package/dist/cjs/graphs/Chart/series/Line.js.map +2 -2
  132. package/dist/cjs/graphs/Chart/series/Point.js +114 -128
  133. package/dist/cjs/graphs/Chart/series/Point.js.map +3 -3
  134. package/dist/cjs/graphs/Chart/series/Points.js +8 -2
  135. package/dist/cjs/graphs/Chart/series/Points.js.map +2 -2
  136. package/dist/cjs/graphs/Chart/series/Rect.js +133 -122
  137. package/dist/cjs/graphs/Chart/series/Rect.js.map +3 -3
  138. package/dist/cjs/graphs/Chart/series/StackedBar.js +14 -6
  139. package/dist/cjs/graphs/Chart/series/StackedBar.js.map +2 -2
  140. package/dist/cjs/graphs/Chart/styles.js +65 -34
  141. package/dist/cjs/graphs/Chart/styles.js.map +2 -2
  142. package/dist/cjs/graphs/constants.js +24 -9
  143. package/dist/cjs/graphs/constants.js.map +2 -2
  144. package/dist/cjs/index.js +17 -6
  145. package/dist/cjs/index.js.map +3 -3
  146. package/dist/cjs/react-desc-prop-types.js +150 -0
  147. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  148. package/dist/cjs/typescript-testing/slot-props.js +69 -0
  149. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  150. package/dist/cjs/typescript-testing/typescript-data-viz-valid.js +34 -2
  151. package/dist/cjs/typescript-testing/typescript-data-viz-valid.js.map +2 -2
  152. package/dist/cjs/typescript-testing/typescript-single-stacked-bar-valid.js +93 -0
  153. package/dist/cjs/typescript-testing/typescript-single-stacked-bar-valid.js.map +7 -0
  154. package/dist/esm/constants/index.js +43 -0
  155. package/dist/esm/constants/index.js.map +7 -0
  156. package/dist/esm/graphs/Chart/Chart.js +6 -1
  157. package/dist/esm/graphs/Chart/Chart.js.map +2 -2
  158. package/dist/esm/graphs/Chart/ChartContext.js.map +2 -2
  159. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js +40 -23
  160. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +2 -2
  161. package/dist/esm/graphs/Chart/SingleStackedBar/styles.js +12 -5
  162. package/dist/esm/graphs/Chart/SingleStackedBar/styles.js.map +2 -2
  163. package/dist/esm/graphs/Chart/config/chartInteractionStore.js +68 -0
  164. package/dist/esm/graphs/Chart/config/chartInteractionStore.js.map +7 -0
  165. package/dist/esm/graphs/Chart/config/useChart.js +58 -42
  166. package/dist/esm/graphs/Chart/config/useChart.js.map +2 -2
  167. package/dist/esm/graphs/Chart/config/useChartDescription.js +32 -0
  168. package/dist/esm/graphs/Chart/config/useChartDescription.js.map +7 -0
  169. package/dist/esm/graphs/Chart/config/useEntranceAnimation.js +111 -0
  170. package/dist/esm/graphs/Chart/config/useEntranceAnimation.js.map +7 -0
  171. package/dist/esm/graphs/Chart/config/useGetters.js +10 -0
  172. package/dist/esm/graphs/Chart/config/useGetters.js.map +2 -2
  173. package/dist/esm/graphs/Chart/config/useInternalMargins.js +26 -6
  174. package/dist/esm/graphs/Chart/config/useInternalMargins.js.map +2 -2
  175. package/dist/esm/graphs/Chart/config/useKeyboardNavigation.js +35 -51
  176. package/dist/esm/graphs/Chart/config/useKeyboardNavigation.js.map +2 -2
  177. package/dist/esm/graphs/Chart/config/useScales.js +202 -69
  178. package/dist/esm/graphs/Chart/config/useScales.js.map +2 -2
  179. package/dist/esm/graphs/Chart/config/useValidateProps.js +53 -4
  180. package/dist/esm/graphs/Chart/config/useValidateProps.js.map +2 -2
  181. package/dist/esm/graphs/Chart/config/useValueAxisTransition.js +98 -0
  182. package/dist/esm/graphs/Chart/config/useValueAxisTransition.js.map +7 -0
  183. package/dist/esm/graphs/Chart/config/useWheelScroll.js +81 -0
  184. package/dist/esm/graphs/Chart/config/useWheelScroll.js.map +7 -0
  185. package/dist/esm/graphs/Chart/helpers/alignedTicks.js +26 -0
  186. package/dist/esm/graphs/Chart/helpers/alignedTicks.js.map +7 -0
  187. package/dist/esm/graphs/Chart/helpers/barPath.js +23 -0
  188. package/dist/esm/graphs/Chart/helpers/barPath.js.map +7 -0
  189. package/dist/esm/graphs/Chart/helpers/dataInView.js +28 -0
  190. package/dist/esm/graphs/Chart/helpers/dataInView.js.map +7 -0
  191. package/dist/esm/graphs/Chart/helpers/index.js +34 -0
  192. package/dist/esm/graphs/Chart/helpers/index.js.map +2 -2
  193. package/dist/esm/graphs/Chart/helpers/logAxis.js +14 -0
  194. package/dist/esm/graphs/Chart/helpers/logAxis.js.map +7 -0
  195. package/dist/esm/graphs/Chart/helpers/tickRotation.js +24 -0
  196. package/dist/esm/graphs/Chart/helpers/tickRotation.js.map +7 -0
  197. package/dist/esm/graphs/Chart/helpers/timeTicks.js +26 -0
  198. package/dist/esm/graphs/Chart/helpers/timeTicks.js.map +7 -0
  199. package/dist/esm/graphs/Chart/helpers/trend.js +15 -0
  200. package/dist/esm/graphs/Chart/helpers/trend.js.map +7 -0
  201. package/dist/esm/graphs/Chart/helpers/useSerieDimming.js +15 -0
  202. package/dist/esm/graphs/Chart/helpers/useSerieDimming.js.map +7 -0
  203. package/dist/esm/graphs/Chart/helpers/useUniqueData.js +15 -18
  204. package/dist/esm/graphs/Chart/helpers/useUniqueData.js.map +2 -2
  205. package/dist/esm/graphs/Chart/helpers/useVirtualizedSeries.js +12 -5
  206. package/dist/esm/graphs/Chart/helpers/useVirtualizedSeries.js.map +2 -2
  207. package/dist/esm/graphs/Chart/helpers/zeroLine.js +13 -0
  208. package/dist/esm/graphs/Chart/helpers/zeroLine.js.map +7 -0
  209. package/dist/esm/graphs/Chart/parts/A11yRegion.js +7 -1
  210. package/dist/esm/graphs/Chart/parts/A11yRegion.js.map +2 -2
  211. package/dist/esm/graphs/Chart/parts/Axis/Axis.js +40 -4
  212. package/dist/esm/graphs/Chart/parts/Axis/Axis.js.map +2 -2
  213. package/dist/esm/graphs/Chart/parts/Axis/AxisBottom.js +18 -4
  214. package/dist/esm/graphs/Chart/parts/Axis/AxisBottom.js.map +2 -2
  215. package/dist/esm/graphs/Chart/parts/Axis/AxisLeft.js +14 -6
  216. package/dist/esm/graphs/Chart/parts/Axis/AxisLeft.js.map +2 -2
  217. package/dist/esm/graphs/Chart/parts/Axis/AxisRight.js +14 -4
  218. package/dist/esm/graphs/Chart/parts/Axis/AxisRight.js.map +2 -2
  219. package/dist/esm/graphs/Chart/parts/Axis/GridLine.js +16 -2
  220. package/dist/esm/graphs/Chart/parts/Axis/GridLine.js.map +2 -2
  221. package/dist/esm/graphs/Chart/parts/Axis/Tick.js +11 -5
  222. package/dist/esm/graphs/Chart/parts/Axis/Tick.js.map +2 -2
  223. package/dist/esm/graphs/Chart/parts/Axis/useTickTransition.js +140 -0
  224. package/dist/esm/graphs/Chart/parts/Axis/useTickTransition.js.map +7 -0
  225. package/dist/esm/graphs/Chart/parts/ChartContainer.js +41 -19
  226. package/dist/esm/graphs/Chart/parts/ChartContainer.js.map +2 -2
  227. package/dist/esm/graphs/Chart/parts/FocusableRegion.js +7 -4
  228. package/dist/esm/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  229. package/dist/esm/graphs/Chart/parts/HoverBand.js +56 -0
  230. package/dist/esm/graphs/Chart/parts/HoverBand.js.map +7 -0
  231. package/dist/esm/graphs/Chart/parts/Labels/Label.js +12 -1
  232. package/dist/esm/graphs/Chart/parts/Labels/Label.js.map +2 -2
  233. package/dist/esm/graphs/Chart/parts/Labels/index.js +12 -4
  234. package/dist/esm/graphs/Chart/parts/Labels/index.js.map +2 -2
  235. package/dist/esm/graphs/Chart/parts/Legend/BottomLegend.js +7 -4
  236. package/dist/esm/graphs/Chart/parts/Legend/BottomLegend.js.map +2 -2
  237. package/dist/esm/graphs/Chart/parts/Legend/LeftLegend.js +3 -7
  238. package/dist/esm/graphs/Chart/parts/Legend/LeftLegend.js.map +2 -2
  239. package/dist/esm/graphs/Chart/parts/Legend/LegendItem.js +91 -9
  240. package/dist/esm/graphs/Chart/parts/Legend/LegendItem.js.map +2 -2
  241. package/dist/esm/graphs/Chart/parts/Legend/RightLegend.js +4 -5
  242. package/dist/esm/graphs/Chart/parts/Legend/RightLegend.js.map +2 -2
  243. package/dist/esm/graphs/Chart/parts/Legend/TopLegend.js +9 -7
  244. package/dist/esm/graphs/Chart/parts/Legend/TopLegend.js.map +2 -2
  245. package/dist/esm/graphs/Chart/parts/Scrapper/Scrapper.js +29 -3
  246. package/dist/esm/graphs/Chart/parts/Scrapper/Scrapper.js.map +2 -2
  247. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js +83 -56
  248. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +3 -3
  249. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapper.js +14 -6
  250. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapper.js.map +2 -2
  251. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +68 -44
  252. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  253. package/dist/esm/graphs/Chart/parts/ScreenReaderText.js +18 -0
  254. package/dist/esm/graphs/Chart/parts/ScreenReaderText.js.map +7 -0
  255. package/dist/esm/graphs/Chart/parts/Scroller/BlurMask.js +14 -9
  256. package/dist/esm/graphs/Chart/parts/Scroller/BlurMask.js.map +2 -2
  257. package/dist/esm/graphs/Chart/parts/Scroller/Controllers.js +154 -51
  258. package/dist/esm/graphs/Chart/parts/Scroller/Controllers.js.map +2 -2
  259. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarX.js +22 -6
  260. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarX.js.map +2 -2
  261. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarY.js +13 -6
  262. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarY.js.map +2 -2
  263. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerX.js +43 -36
  264. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerX.js.map +2 -2
  265. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerY.js +10 -5
  266. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerY.js.map +2 -2
  267. package/dist/esm/graphs/Chart/parts/SeriesFactory.js +40 -31
  268. package/dist/esm/graphs/Chart/parts/SeriesFactory.js.map +2 -2
  269. package/dist/esm/graphs/Chart/parts/TrendHighlight.js +58 -20
  270. package/dist/esm/graphs/Chart/parts/TrendHighlight.js.map +2 -2
  271. package/dist/esm/graphs/Chart/parts/ZeroLine.js +36 -0
  272. package/dist/esm/graphs/Chart/parts/ZeroLine.js.map +7 -0
  273. package/dist/esm/graphs/Chart/scales/index.js +51 -21
  274. package/dist/esm/graphs/Chart/scales/index.js.map +3 -3
  275. package/dist/esm/graphs/Chart/series/Area.js +77 -10
  276. package/dist/esm/graphs/Chart/series/Area.js.map +2 -2
  277. package/dist/esm/graphs/Chart/series/Bars.js +3 -1
  278. package/dist/esm/graphs/Chart/series/Bars.js.map +2 -2
  279. package/dist/esm/graphs/Chart/series/HorizontalBars.js +4 -1
  280. package/dist/esm/graphs/Chart/series/HorizontalBars.js.map +2 -2
  281. package/dist/esm/graphs/Chart/series/HorizontalStackedBars.js +15 -8
  282. package/dist/esm/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
  283. package/dist/esm/graphs/Chart/series/Line.js +9 -7
  284. package/dist/esm/graphs/Chart/series/Line.js.map +2 -2
  285. package/dist/esm/graphs/Chart/series/Point.js +120 -130
  286. package/dist/esm/graphs/Chart/series/Point.js.map +3 -3
  287. package/dist/esm/graphs/Chart/series/Points.js +8 -2
  288. package/dist/esm/graphs/Chart/series/Points.js.map +2 -2
  289. package/dist/esm/graphs/Chart/series/Rect.js +134 -123
  290. package/dist/esm/graphs/Chart/series/Rect.js.map +3 -3
  291. package/dist/esm/graphs/Chart/series/StackedBar.js +15 -7
  292. package/dist/esm/graphs/Chart/series/StackedBar.js.map +2 -2
  293. package/dist/esm/graphs/Chart/styles.js +66 -35
  294. package/dist/esm/graphs/Chart/styles.js.map +2 -2
  295. package/dist/esm/graphs/constants.js +25 -10
  296. package/dist/esm/graphs/constants.js.map +2 -2
  297. package/dist/esm/index.js +19 -7
  298. package/dist/esm/index.js.map +2 -2
  299. package/dist/esm/react-desc-prop-types.js +125 -0
  300. package/dist/esm/react-desc-prop-types.js.map +7 -0
  301. package/dist/esm/typescript-testing/slot-props.js +46 -0
  302. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  303. package/dist/esm/typescript-testing/typescript-data-viz-valid.js +35 -3
  304. package/dist/esm/typescript-testing/typescript-data-viz-valid.js.map +2 -2
  305. package/dist/esm/typescript-testing/typescript-single-stacked-bar-valid.js +70 -0
  306. package/dist/esm/typescript-testing/typescript-single-stacked-bar-valid.js.map +7 -0
  307. package/dist/types/constants/index.d.ts +42 -0
  308. package/dist/types/graphs/Chart/Chart.d.ts +4 -2
  309. package/dist/types/graphs/Chart/ChartContext.d.ts +9 -11
  310. package/dist/types/graphs/Chart/SingleStackedBar/SingleStackedBar.d.ts +1 -1
  311. package/dist/types/graphs/Chart/config/chartInteractionStore.d.ts +32 -0
  312. package/dist/types/graphs/Chart/config/useChart.d.ts +9 -11
  313. package/dist/types/graphs/Chart/config/useChartDescription.d.ts +5 -0
  314. package/dist/types/graphs/Chart/config/useEntranceAnimation.d.ts +16 -0
  315. package/dist/types/graphs/Chart/config/useGetters.d.ts +1 -1
  316. package/dist/types/graphs/Chart/config/useInternalMargins.d.ts +4 -1
  317. package/dist/types/graphs/Chart/config/useKeyboardNavigation.d.ts +1 -1
  318. package/dist/types/graphs/Chart/config/useScales.d.ts +8 -2
  319. package/dist/types/graphs/Chart/config/useValidateProps.d.ts +7 -1
  320. package/dist/types/graphs/Chart/config/useValueAxisTransition.d.ts +6 -0
  321. package/dist/types/graphs/Chart/config/useWheelScroll.d.ts +2 -0
  322. package/dist/types/graphs/Chart/helpers/alignedTicks.d.ts +1 -0
  323. package/dist/types/graphs/Chart/helpers/barPath.d.ts +11 -0
  324. package/dist/types/graphs/Chart/helpers/dataInView.d.ts +6 -0
  325. package/dist/types/graphs/Chart/helpers/index.d.ts +10 -1
  326. package/dist/types/graphs/Chart/helpers/logAxis.d.ts +8 -0
  327. package/dist/types/graphs/Chart/helpers/tickRotation.d.ts +2 -0
  328. package/dist/types/graphs/Chart/helpers/timeTicks.d.ts +2 -0
  329. package/dist/types/graphs/Chart/helpers/trend.d.ts +3 -0
  330. package/dist/types/graphs/Chart/helpers/useSerieDimming.d.ts +3 -0
  331. package/dist/types/graphs/Chart/helpers/useUniqueData.d.ts +1 -1
  332. package/dist/types/graphs/Chart/helpers/useVirtualizedSeries.d.ts +1 -1
  333. package/dist/types/graphs/Chart/helpers/zeroLine.d.ts +2 -0
  334. package/dist/types/graphs/Chart/parts/Axis/Axis.d.ts +4 -1
  335. package/dist/types/graphs/Chart/parts/Axis/Tick.d.ts +1 -0
  336. package/dist/types/graphs/Chart/parts/Axis/useTickTransition.d.ts +24 -0
  337. package/dist/types/graphs/Chart/parts/HoverBand.d.ts +2 -0
  338. package/dist/types/graphs/Chart/parts/Labels/Label.d.ts +3 -0
  339. package/dist/types/graphs/Chart/parts/Scrapper/ScrapperLine.d.ts +11 -1
  340. package/dist/types/graphs/Chart/parts/Scrapper/VerticalScrapperLine.d.ts +6 -7
  341. package/dist/types/graphs/Chart/parts/ScreenReaderText.d.ts +5 -0
  342. package/dist/types/graphs/Chart/parts/TrendHighlight.d.ts +3 -2
  343. package/dist/types/graphs/Chart/parts/ZeroLine.d.ts +2 -0
  344. package/dist/types/graphs/Chart/scales/index.d.ts +10 -3
  345. package/dist/types/graphs/Chart/series/Area.d.ts +1 -1
  346. package/dist/types/graphs/Chart/series/Bars.d.ts +1 -1
  347. package/dist/types/graphs/Chart/series/HorizontalBars.d.ts +1 -1
  348. package/dist/types/graphs/Chart/series/HorizontalStackedBars.d.ts +1 -1
  349. package/dist/types/graphs/Chart/series/Line.d.ts +1 -1
  350. package/dist/types/graphs/Chart/series/Point.d.ts +3 -2
  351. package/dist/types/graphs/Chart/series/Points.d.ts +1 -1
  352. package/dist/types/graphs/Chart/series/Rect.d.ts +3 -2
  353. package/dist/types/graphs/Chart/series/StackedBar.d.ts +1 -1
  354. package/dist/types/graphs/Chart/styles.d.ts +18 -5
  355. package/dist/types/graphs/constants.d.ts +13 -1
  356. package/dist/types/index.d.ts +6 -1
  357. package/dist/types/react-desc-prop-types.d.ts +228 -0
  358. package/package.json +8 -7
  359. package/dist/cjs/graphs/Chart/DataTestIds.js.map +0 -7
  360. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js.map +0 -7
  361. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/index.js.map +0 -7
  362. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/theming.js.map +0 -7
  363. package/dist/cjs/graphs/Chart/SingleStackedBar/index.js +0 -31
  364. package/dist/cjs/graphs/Chart/SingleStackedBar/index.js.map +0 -7
  365. package/dist/cjs/graphs/Chart/SingleStackedBar/react-desc-prop-types.js +0 -51
  366. package/dist/cjs/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +0 -7
  367. package/dist/cjs/graphs/Chart/index.js +0 -33
  368. package/dist/cjs/graphs/Chart/index.js.map +0 -7
  369. package/dist/cjs/graphs/Chart/react-desc-prop-types.js.map +0 -7
  370. package/dist/cjs/graphs/index.js +0 -31
  371. package/dist/cjs/graphs/index.js.map +0 -7
  372. package/dist/esm/graphs/Chart/DataTestIds.js +0 -10
  373. package/dist/esm/graphs/Chart/DataTestIds.js.map +0 -7
  374. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js +0 -8
  375. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js.map +0 -7
  376. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/index.js +0 -4
  377. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/index.js.map +0 -7
  378. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/theming.js +0 -10
  379. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/theming.js.map +0 -7
  380. package/dist/esm/graphs/Chart/SingleStackedBar/index.js +0 -4
  381. package/dist/esm/graphs/Chart/SingleStackedBar/index.js.map +0 -7
  382. package/dist/esm/graphs/Chart/SingleStackedBar/react-desc-prop-types.js +0 -21
  383. package/dist/esm/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +0 -7
  384. package/dist/esm/graphs/Chart/index.js +0 -6
  385. package/dist/esm/graphs/Chart/index.js.map +0 -7
  386. package/dist/esm/graphs/Chart/react-desc-prop-types.js +0 -29
  387. package/dist/esm/graphs/Chart/react-desc-prop-types.js.map +0 -7
  388. package/dist/esm/graphs/index.js +0 -4
  389. package/dist/esm/graphs/index.js.map +0 -7
  390. package/dist/types/graphs/Chart/DataTestIds.d.ts +0 -5
  391. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.d.ts +0 -3
  392. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/index.d.ts +0 -2
  393. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/theming.d.ts +0 -4
  394. package/dist/types/graphs/Chart/SingleStackedBar/index.d.ts +0 -3
  395. package/dist/types/graphs/Chart/SingleStackedBar/react-desc-prop-types.d.ts +0 -44
  396. package/dist/types/graphs/Chart/index.d.ts +0 -4
  397. package/dist/types/graphs/Chart/react-desc-prop-types.d.ts +0 -510
  398. package/dist/types/graphs/index.d.ts +0 -2
@@ -30,10 +30,12 @@ var constants_exports = {};
30
30
  __export(constants_exports, {
31
31
  FOCUS_RING: () => FOCUS_RING,
32
32
  LINE: () => LINE,
33
+ MARKS: () => MARKS,
33
34
  SCALE_TYPES: () => SCALE_TYPES,
34
35
  SCRAPPER: () => SCRAPPER,
36
+ SCRAPPER_DEFAULT_TOOLTIP_PREFERENCE: () => SCRAPPER_DEFAULT_TOOLTIP_PREFERENCE,
35
37
  SERIE_TYPES: () => SERIE_TYPES,
36
- TIME_OFFSET: () => TIME_OFFSET,
38
+ TIME_INTERVALS: () => TIME_INTERVALS,
37
39
  TOOLBAR: () => TOOLBAR,
38
40
  curveStyleMap: () => curveStyleMap
39
41
  });
@@ -47,9 +49,20 @@ const SCALE_TYPES = {
47
49
  TIME: "time"
48
50
  };
49
51
  const FOCUS_RING = {
50
- COLOR: "#335cad",
52
+ COLOR: "#006AA9",
53
+ // brand-700, the fallback when no theme is provided
51
54
  STROKE_WIDTH: 2,
52
- OFFSET: 4
55
+ OFFSET: 4,
56
+ // space between a mark and its focus ring (surface color shows through)
57
+ GAP: 2
58
+ };
59
+ const MARKS = {
60
+ BAR_MAX_THICKNESS: 24,
61
+ BAR_RADIUS: 4,
62
+ STACK_GAP: 2,
63
+ MARKER_RING: 2,
64
+ AREA_TOP_OPACITY: 0.24,
65
+ AREA_BOTTOM_OPACITY: 0.02
53
66
  };
54
67
  const SERIE_TYPES = { LINE: "line", BAR: "bar", AREA: "area", POINT: "point" };
55
68
  const SCRAPPER = {
@@ -90,11 +103,13 @@ const TOOLBAR = {
90
103
  WIDTH: 21
91
104
  }
92
105
  };
93
- const TIME_OFFSET = {
94
- HOUR: import_d3.timeHour,
95
- MINUTE: import_d3.timeMinute,
96
- WEEK: import_d3.timeWeek,
97
- DAY: import_d3.timeDay,
98
- MONTH: import_d3.timeMonth
106
+ const TIME_INTERVALS = {
107
+ MINUTE: import_d3.utcMinute,
108
+ HOUR: import_d3.utcHour,
109
+ DAY: import_d3.utcDay,
110
+ WEEK: import_d3.utcWeek,
111
+ MONTH: import_d3.utcMonth,
112
+ YEAR: import_d3.utcYear
99
113
  };
114
+ const SCRAPPER_DEFAULT_TOOLTIP_PREFERENCE = "top";
100
115
  //# sourceMappingURL=constants.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/graphs/constants.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { curveLinear, curveMonotoneX, timeDay, timeMonth, timeHour, timeMinute, timeWeek } from 'd3';\n\nexport const SCALE_TYPES = {\n LINEAR: 'linear',\n BAND: 'band',\n LOG: 'log',\n TIME: 'time',\n};\n\nexport const FOCUS_RING = {\n COLOR: '#335cad',\n STROKE_WIDTH: 2,\n OFFSET: 4,\n};\n\nexport const SERIE_TYPES = { LINE: 'line', BAR: 'bar', AREA: 'area', POINT: 'point' } as const;\n\nexport const SCRAPPER = {\n TYPE_HORIZONTAL: 'horizontal',\n TYPE_VERTICAL: 'vertical',\n};\n\nexport const LINE = {\n POINT_STYLE: {\n CIRCLE: 'CIRCLE',\n SQUARE: 'SQUARE',\n DIAMOND: 'DIAMOND',\n },\n DEFAULT_POINT_RADIUS: 4,\n DASH_STYLE: {\n SHORTDOT: 'SHORTDOT',\n SHORTDASHDOT: 'SHORTDASHDOT',\n DASH: 'DASH',\n SHORTDASH: 'SHORTDASH',\n },\n DASH_STYLE_VALUES: {\n SHORTDOT: [2, 2],\n SHORTDASHDOT: [6, 2, 2, 2],\n DASH: [8, 6],\n SHORTDASH: [6, 2],\n },\n CURVE_STYLE: {\n LINEAR: 'LINEAR',\n SPLINE: 'SPLINE',\n },\n};\n\nexport const curveStyleMap = {\n [LINE.CURVE_STYLE.LINEAR]: curveLinear,\n [LINE.CURVE_STYLE.SPLINE]: curveMonotoneX,\n};\n\nexport const TOOLBAR = {\n RESET: {\n HEIGHT: 21,\n WIDTH: 21,\n },\n};\n\nexport const TIME_OFFSET: Record<string, d3.CountableTimeInterval> = {\n HOUR: timeHour,\n MINUTE: timeMinute,\n WEEK: timeWeek,\n DAY: timeDay,\n MONTH: timeMonth,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gBAAgG;AAEzF,MAAM,cAAc;AAAA,EACzB,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AACV;AAEO,MAAM,cAAc,EAAE,MAAM,QAAQ,KAAK,OAAO,MAAM,QAAQ,OAAO,QAAQ;AAE7E,MAAM,WAAW;AAAA,EACtB,iBAAiB;AAAA,EACjB,eAAe;AACjB;AAEO,MAAM,OAAO;AAAA,EAClB,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,UAAU;AAAA,IACV,cAAc;AAAA,IACd,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EACA,mBAAmB;AAAA,IACjB,UAAU,CAAC,GAAG,CAAC;AAAA,IACf,cAAc,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,IACzB,MAAM,CAAC,GAAG,CAAC;AAAA,IACX,WAAW,CAAC,GAAG,CAAC;AAAA,EAClB;AAAA,EACA,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF;AAEO,MAAM,gBAAgB;AAAA,EAC3B,CAAC,KAAK,YAAY,MAAM,GAAG;AAAA,EAC3B,CAAC,KAAK,YAAY,MAAM,GAAG;AAC7B;AAEO,MAAM,UAAU;AAAA,EACrB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AACF;AAEO,MAAM,cAAwD;AAAA,EACnE,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AACT;",
4
+ "sourcesContent": ["import { curveLinear, curveMonotoneX, utcDay, utcHour, utcMinute, utcMonth, utcWeek, utcYear } from 'd3';\nimport type { CountableTimeInterval } from 'd3';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const SCALE_TYPES = {\n LINEAR: 'linear',\n BAND: 'band',\n LOG: 'log',\n TIME: 'time',\n};\n\nexport const FOCUS_RING = {\n COLOR: '#006AA9', // brand-700, the fallback when no theme is provided\n STROKE_WIDTH: 2,\n OFFSET: 4,\n // space between a mark and its focus ring (surface color shows through)\n GAP: 2,\n};\n\n// mark specs: thin bars with a rounded data end, a surface gap between stacked segments, a surface ring on markers\nexport const MARKS = {\n BAR_MAX_THICKNESS: 24,\n BAR_RADIUS: 4,\n STACK_GAP: 2,\n MARKER_RING: 2,\n AREA_TOP_OPACITY: 0.24,\n AREA_BOTTOM_OPACITY: 0.02,\n};\n\nexport const SERIE_TYPES = { LINE: 'line', BAR: 'bar', AREA: 'area', POINT: 'point' } as const;\n\nexport const SCRAPPER = {\n TYPE_HORIZONTAL: 'horizontal',\n TYPE_VERTICAL: 'vertical',\n};\n\nexport const LINE = {\n POINT_STYLE: {\n CIRCLE: 'CIRCLE',\n SQUARE: 'SQUARE',\n DIAMOND: 'DIAMOND',\n },\n DEFAULT_POINT_RADIUS: 4,\n DASH_STYLE: {\n SHORTDOT: 'SHORTDOT',\n SHORTDASHDOT: 'SHORTDASHDOT',\n DASH: 'DASH',\n SHORTDASH: 'SHORTDASH',\n },\n DASH_STYLE_VALUES: {\n SHORTDOT: [2, 2],\n SHORTDASHDOT: [6, 2, 2, 2],\n DASH: [8, 6],\n SHORTDASH: [6, 2],\n },\n CURVE_STYLE: {\n LINEAR: 'LINEAR',\n SPLINE: 'SPLINE',\n },\n};\n\nexport const curveStyleMap = {\n [LINE.CURVE_STYLE.LINEAR]: curveLinear,\n [LINE.CURVE_STYLE.SPLINE]: curveMonotoneX,\n};\n\nexport const TOOLBAR = {\n RESET: {\n HEIGHT: 21,\n WIDTH: 21,\n },\n};\n\n// the intervals of intervalType (a tick on each one) and of domainPaddingType (the unit of domainPadding), in UTC like\n// the ticks of a time axis (scaleUtc): in local time a day of padding was 23 or 25 hours on a daylight saving change\nexport const TIME_INTERVALS: Record<DSChartT.IntervalT, CountableTimeInterval> = {\n MINUTE: utcMinute,\n HOUR: utcHour,\n DAY: utcDay,\n WEEK: utcWeek,\n MONTH: utcMonth,\n YEAR: utcYear,\n};\n\n// where the tooltip of the scrapper opens when scrapper.tooltipPreference is not set\nexport const SCRAPPER_DEFAULT_TOOLTIP_PREFERENCE = 'top';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gBAAoG;AAI7F,MAAM,cAAc;AAAA,EACzB,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA;AAAA,EAER,KAAK;AACP;AAGO,MAAM,QAAQ;AAAA,EACnB,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,qBAAqB;AACvB;AAEO,MAAM,cAAc,EAAE,MAAM,QAAQ,KAAK,OAAO,MAAM,QAAQ,OAAO,QAAQ;AAE7E,MAAM,WAAW;AAAA,EACtB,iBAAiB;AAAA,EACjB,eAAe;AACjB;AAEO,MAAM,OAAO;AAAA,EAClB,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,UAAU;AAAA,IACV,cAAc;AAAA,IACd,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EACA,mBAAmB;AAAA,IACjB,UAAU,CAAC,GAAG,CAAC;AAAA,IACf,cAAc,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,IACzB,MAAM,CAAC,GAAG,CAAC;AAAA,IACX,WAAW,CAAC,GAAG,CAAC;AAAA,EAClB;AAAA,EACA,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF;AAEO,MAAM,gBAAgB;AAAA,EAC3B,CAAC,KAAK,YAAY,MAAM,GAAG;AAAA,EAC3B,CAAC,KAAK,YAAY,MAAM,GAAG;AAC7B;AAEO,MAAM,UAAU;AAAA,EACrB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AACF;AAIO,MAAM,iBAAoE;AAAA,EAC/E,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AACR;AAGO,MAAM,sCAAsC;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -28,13 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
- COLOR_PALLET: () => import_graphs.COLOR_PALLET,
32
- Chart: () => import_graphs.Chart,
33
- DSSingleStackedBar: () => import_graphs.DSSingleStackedBar,
34
- DSSingleStackedBarWithSchema: () => import_graphs.DSSingleStackedBarWithSchema,
35
- SERIE_TYPES: () => import_graphs.SERIE_TYPES
31
+ COLOR_PALLET: () => import_colorPallet.COLOR_PALLET,
32
+ Chart: () => import_Chart.Chart,
33
+ ChartWithSchema: () => import_Chart.ChartWithSchema,
34
+ DATAVIZ_DATA_TESTID: () => import_constants2.DATAVIZ_DATA_TESTID,
35
+ DATAVIZ_SLOTS: () => import_constants2.DATAVIZ_SLOTS,
36
+ DSDatavizName: () => import_constants2.DSDatavizName,
37
+ DSSingleStackedBar: () => import_SingleStackedBar.DSSingleStackedBar,
38
+ DSSingleStackedBarName: () => import_constants2.DSSingleStackedBarName,
39
+ DSSingleStackedBarWithSchema: () => import_SingleStackedBar.DSSingleStackedBarWithSchema,
40
+ SERIE_TYPES: () => import_constants.SERIE_TYPES,
41
+ SINGLE_STACKED_BAR_DATA_TESTID: () => import_constants2.SINGLE_STACKED_BAR_DATA_TESTID,
42
+ SINGLE_STACKED_BAR_SLOTS: () => import_constants2.SINGLE_STACKED_BAR_SLOTS
36
43
  });
37
44
  module.exports = __toCommonJS(index_exports);
38
45
  var React = __toESM(require("react"));
39
- var import_graphs = require("./graphs/index.js");
46
+ var import_Chart = require("./graphs/Chart/Chart.js");
47
+ var import_SingleStackedBar = require("./graphs/Chart/SingleStackedBar/SingleStackedBar.js");
48
+ var import_colorPallet = require("./graphs/Chart/helpers/colorPallet.js");
49
+ var import_constants = require("./graphs/constants.js");
50
+ var import_constants2 = require("./constants/index.js");
40
51
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export {\n Chart,\n DSSingleStackedBar,\n DSSingleStackedBarWithSchema,\n COLOR_PALLET,\n SERIE_TYPES,\n type DSChartT,\n type DSSingleStackedBarT,\n} from './graphs/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAQO;",
6
- "names": []
4
+ "sourcesContent": ["export { Chart, ChartWithSchema } from './graphs/Chart/Chart.js';\nexport { DSSingleStackedBar, DSSingleStackedBarWithSchema } from './graphs/Chart/SingleStackedBar/SingleStackedBar.js';\nexport { COLOR_PALLET } from './graphs/Chart/helpers/colorPallet.js';\nexport { SERIE_TYPES } from './graphs/constants.js';\nexport { type DSChartT, type DSSingleStackedBarT } from './react-desc-prop-types.js';\nexport {\n DSDatavizName,\n DATAVIZ_SLOTS,\n DATAVIZ_DATA_TESTID,\n DSSingleStackedBarName,\n SINGLE_STACKED_BAR_SLOTS,\n SINGLE_STACKED_BAR_DATA_TESTID,\n} from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuC;AACvC,8BAAiE;AACjE,yBAA6B;AAC7B,uBAA4B;AAE5B,IAAAA,oBAOO;",
6
+ "names": ["import_constants"]
7
7
  }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var react_desc_prop_types_exports = {};
30
+ __export(react_desc_prop_types_exports, {
31
+ DSChartPropTypes: () => DSChartPropTypes,
32
+ DSChartPropTypesSchema: () => DSChartPropTypesSchema,
33
+ DSSingleStackedBarPropTypes: () => DSSingleStackedBarPropTypes,
34
+ DSSingleStackedBarPropTypesSchema: () => DSSingleStackedBarPropTypesSchema,
35
+ defaultSingleStackedBarProps: () => defaultSingleStackedBarProps
36
+ });
37
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
38
+ var React = __toESM(require("react"));
39
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
+ var import_constants2 = require("./constants/index.js");
41
+ const TIME_INTERVAL_NAMES = ["MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "YEAR"];
42
+ const getAxisTickPropTypes = () => import_ds_props_helpers.PropTypes.shape({
43
+ tickValues: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.instanceOf(Date)])),
44
+ tickFormat: import_ds_props_helpers.PropTypes.oneOfType([
45
+ import_ds_props_helpers.PropTypes.func.signature("((value: string | number | Date) => string)"),
46
+ import_ds_props_helpers.PropTypes.string
47
+ ]),
48
+ tickCount: import_ds_props_helpers.PropTypes.number,
49
+ tickRotation: import_ds_props_helpers.PropTypes.number,
50
+ overwriteTicks: import_ds_props_helpers.PropTypes.bool,
51
+ color: import_ds_props_helpers.PropTypes.string
52
+ });
53
+ const getAxisPropTypes = () => import_ds_props_helpers.PropTypes.shape({
54
+ type: import_ds_props_helpers.PropTypes.oneOf(["log", "band", "time", "linear"]).isRequired,
55
+ showGrid: import_ds_props_helpers.PropTypes.bool,
56
+ color: import_ds_props_helpers.PropTypes.string,
57
+ label: import_ds_props_helpers.PropTypes.string,
58
+ cols: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.string),
59
+ domainPadding: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.number)]),
60
+ intervalType: import_ds_props_helpers.PropTypes.oneOf(TIME_INTERVAL_NAMES),
61
+ hideAxis: import_ds_props_helpers.PropTypes.bool,
62
+ beginAtZero: import_ds_props_helpers.PropTypes.bool,
63
+ advanced: import_ds_props_helpers.PropTypes.shape({
64
+ pointSpacing: import_ds_props_helpers.PropTypes.shape({ type: import_ds_props_helpers.PropTypes.oneOf(["ratio"]).isRequired, value: import_ds_props_helpers.PropTypes.number.isRequired }).isRequired
65
+ }),
66
+ tick: getAxisTickPropTypes(),
67
+ min: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.instanceOf(Date)]),
68
+ max: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.instanceOf(Date)]),
69
+ domainPaddingType: import_ds_props_helpers.PropTypes.oneOf(TIME_INTERVAL_NAMES),
70
+ fitToView: import_ds_props_helpers.PropTypes.bool
71
+ });
72
+ const DSChartPropTypes = {
73
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants2.DSDatavizName, import_constants2.DATAVIZ_SLOTS),
74
+ series: import_ds_props_helpers.PropTypes.arrayOf(
75
+ import_ds_props_helpers.PropTypes.shape({
76
+ name: import_ds_props_helpers.PropTypes.string.isRequired,
77
+ data: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.object])).isRequired,
78
+ type: import_ds_props_helpers.PropTypes.oneOf(["line", "bar", "area", "point"]).isRequired,
79
+ scale: import_ds_props_helpers.PropTypes.string,
80
+ color: import_ds_props_helpers.PropTypes.string.isRequired,
81
+ dashStyle: import_ds_props_helpers.PropTypes.string,
82
+ pointRadius: import_ds_props_helpers.PropTypes.number,
83
+ pointStyle: import_ds_props_helpers.PropTypes.string,
84
+ curveStyle: import_ds_props_helpers.PropTypes.string,
85
+ higherIsBetter: import_ds_props_helpers.PropTypes.bool
86
+ })
87
+ ).isRequired.description(
88
+ 'Series to plot. Each one has a name, its values, a type and a color (a Dimsum palette key such as "blue-200", or any CSS color). An empty list renders the axes with no data'
89
+ ),
90
+ xAxis: getAxisPropTypes().isRequired.description(
91
+ "Horizontal axis configuration. min and max widen the axis to hold them, and the data can widen it further"
92
+ ),
93
+ yAxis: getAxisPropTypes().isRequired.description(
94
+ "Vertical axis configuration. min and max widen the axis to hold them, and the data can widen it further"
95
+ ),
96
+ y2Axis: getAxisPropTypes().description(
97
+ 'Secondary vertical axis, drawn on the right. Series with scale "y2" are plotted against it, or against the main axis when it is not set. When both axes are linear, its ticks sit at the heights of the ticks of the main axis, on the grid lines, unless it sets min, max, domainPadding, tick.tickCount or tick.tickValues'
98
+ ),
99
+ groups: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.string)).description(
100
+ 'Series names to stack together, one array per stack, e.g. [["data1", "data2"]]'
101
+ ),
102
+ types: import_ds_props_helpers.PropTypes.oneOf(["scatter"]).description('"scatter" renders the series that have no type as points'),
103
+ scrapper: import_ds_props_helpers.PropTypes.shape({
104
+ type: import_ds_props_helpers.PropTypes.oneOf(["horizontal", "vertical"]).isRequired,
105
+ color: import_ds_props_helpers.PropTypes.string.isRequired,
106
+ tooltipPreference: import_ds_props_helpers.PropTypes.string
107
+ }).description(
108
+ 'Guide line that follows the pointer, with its direction, color and tooltip placement (tooltipPreference, "top" by default)'
109
+ ),
110
+ withTrendHighlight: import_ds_props_helpers.PropTypes.bool.description(
111
+ "Highlights the stretch of a line, or of the top of an area, that leads to its focused point (keyboard, pointer or scrapper): success color when it goes the good way, danger when it goes the bad way, neutral when flat. A rise is good unless the series sets higherIsBetter false. The points read the change to screen readers"
112
+ ),
113
+ withAnimation: import_ds_props_helpers.PropTypes.bool.description(
114
+ "Animates the series when the chart mounts: they grow from the baseline of the value axis. Skipped when the user prefers reduced motion"
115
+ ),
116
+ animationDuration: import_ds_props_helpers.PropTypes.number.description("Duration in milliseconds of the entrance animation of withAnimation").defaultValue(700),
117
+ TooltipRenderer: import_ds_props_helpers.PropTypes.func.signature(
118
+ "((props: { data: { name: string; xValue: string | number | Date | null; yValue: string | number | Date | null; datum: object }[] }) => JSX.Element)"
119
+ ).description("Component rendered as the tooltip of the active data point, it receives the data of that point"),
120
+ height: import_ds_props_helpers.PropTypes.number.description("Height of the chart in pixels").defaultValue(500),
121
+ width: import_ds_props_helpers.PropTypes.number.description(
122
+ "Width of the chart in pixels. When omitted the chart takes the width of its container and follows its resizes"
123
+ ),
124
+ legend: import_ds_props_helpers.PropTypes.shape({
125
+ position: import_ds_props_helpers.PropTypes.oneOf(["right", "bottom", "left", "top"]).isRequired,
126
+ preventFilterAction: import_ds_props_helpers.PropTypes.bool
127
+ }).description("Legend position, and whether clicking a legend item hides or shows its series"),
128
+ xScroll: import_ds_props_helpers.PropTypes.bool.description(
129
+ "Makes the horizontal axis scrollable and zoomable, together with xAxis.advanced.pointSpacing"
130
+ ),
131
+ yScroll: import_ds_props_helpers.PropTypes.bool.description("Makes the vertical axis scrollable, together with yAxis.advanced.pointSpacing")
132
+ };
133
+ const DSChartPropTypesSchema = DSChartPropTypes;
134
+ const defaultSingleStackedBarProps = {
135
+ gutter: "xxxs"
136
+ };
137
+ const DSSingleStackedBarPropTypes = {
138
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants2.DSSingleStackedBarName, import_constants2.SINGLE_STACKED_BAR_SLOTS),
139
+ ...import_ds_props_helpers.globalAttributesPropTypes,
140
+ ...import_ds_props_helpers.xstyledPropTypes,
141
+ height: import_ds_props_helpers.PropTypes.string.description("Height of the bar").isRequired,
142
+ gutter: import_ds_props_helpers.PropTypes.string.description("Gap between the bars").defaultValue("xxxs"),
143
+ TooltipRenderer: import_ds_props_helpers.PropTypes.func.description("Callback function that returns a custom renderer for the tooltip"),
144
+ LegendRenderer: import_ds_props_helpers.PropTypes.func.description("Callback function that returns a custom renderer for the legend"),
145
+ data: import_ds_props_helpers.PropTypes.arrayOf(
146
+ import_ds_props_helpers.PropTypes.shape({ name: import_ds_props_helpers.PropTypes.string, data: import_ds_props_helpers.PropTypes.number, color: import_ds_props_helpers.PropTypes.string })
147
+ ).description("Array of the series which represent the chart")
148
+ };
149
+ const DSSingleStackedBarPropTypesSchema = DSSingleStackedBarPropTypes;
150
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type BorderProps } from '@elliemae/ds-system';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { Series, ScaleLinear, ScaleBand } from 'd3';\nimport { type DSHookFloatingContextT } from '@elliemae/ds-floating-context';\nimport { type SERIE_TYPES } from './graphs/constants.js';\nimport { DATAVIZ_SLOTS, DSDatavizName, DSSingleStackedBarName, SINGLE_STACKED_BAR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSChartT {\n export type SlotFunctionArguments = {\n dsDatavizRoot: () => object;\n dsDatavizAxisLine: () => object;\n dsDatavizAxisLabel: () => object;\n dsDatavizLine: () => object;\n dsDatavizArea: () => object;\n dsDatavizBar: () => object;\n dsDatavizPoint: () => object;\n dsDatavizTooltip: () => object;\n dsDatavizTooltipHoverArea: () => object;\n dsDatavizResetZoomButton: () => object;\n dsDatavizZoomInButton: () => object;\n dsDatavizZoomOutButton: () => object;\n };\n\n export type AxisTypeT = 'log' | 'band' | 'time' | 'linear';\n\n export type LinearScale = ScaleLinear<number, number, never>;\n export type BandScale = ScaleBand<string>;\n export type SeriesTypes = (typeof SERIE_TYPES)[keyof typeof SERIE_TYPES];\n export type Scales = LinearScale | BandScale;\n export interface SeriesT {\n name: string;\n data: Array<number | null | { x: number | string | Date; y: number }>;\n type: SeriesTypes;\n scale?: string;\n color: string;\n // line\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n // line and area: \"LINEAR\" (the default) or \"SPLINE\"\n curveStyle?: string;\n /**\n * With withTrendHighlight, whether a rise is good for the series: true (the default) draws a rise in the success\n * color and a fall in the danger color, false the other way round, for a series such as days to close\n */\n higherIsBetter?: boolean;\n }\n\n export interface ScrapperT {\n type: 'horizontal' | 'vertical';\n color: string;\n // where the tooltip of the scrapper opens, \"top\" by default\n tooltipPreference?: DSHookFloatingContextT.PopperPlacementsT;\n }\n\n export interface SerieComponentT {\n serie: InternalSerie;\n }\n\n export interface LegendT {\n position: 'right' | 'bottom' | 'left' | 'top';\n preventFilterAction?: boolean;\n }\n\n export interface AxisTickT {\n tickValues?: number[] | Date[];\n tickFormat?: ((value: string | number | Date) => string) | string;\n tickCount?: number;\n tickRotation?: number;\n overwriteTicks?: boolean;\n color?: string;\n }\n\n export type IntervalT = 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';\n\n export interface AxisT {\n type: AxisTypeT;\n showGrid?: boolean;\n color?: string;\n label?: string;\n cols?: string[];\n domainPadding?: number | number[];\n intervalType?: IntervalT;\n hideAxis?: boolean;\n beginAtZero?: boolean;\n advanced?: {\n /**\n * The size of the plot against the visible part of it, for a scrollable axis (xScroll, yScroll): with value 2 the\n * plot is twice as wide (or tall) as the chart and scrolls. \"ratio\" is the only type\n */\n pointSpacing: {\n type: 'ratio';\n value: number;\n };\n };\n tick?: AxisTickT;\n /**\n * A value the axis holds at its start: the axis widens to include it, and the data can widen it further (a dev\n * warning says when it does). Ignored with beginAtZero, and on a log axis when it is not positive.\n */\n min?: number | Date;\n /**\n * A value the axis holds at its end: the axis widens to include it, and the data can widen it further (a dev\n * warning says when it does).\n */\n max?: number | Date;\n /** The unit of domainPadding on a time axis: the axis leaves that many minutes, hours, days... at each end */\n domainPaddingType?: IntervalT;\n /**\n * On a horizontally scrollable chart (xScroll), a vertical axis takes its domain from the data in view instead of\n * the whole data, so a stretch of small values reads at the full height. It changes as the chart scrolls and zooms,\n * rounded to its ticks and eased, and beginAtZero, min and max still apply. On by default: false keeps the domain of\n * the whole data, so stretches far apart compare at the same scale\n */\n fitToView?: boolean;\n }\n\n export interface InternalDatum {\n key: string;\n value: number | { x: number; y: number };\n position: number;\n serie: string;\n scale: string;\n color: string;\n }\n\n export interface InternalSerie {\n key: string;\n data: InternalDatum[];\n name: string;\n type: SeriesTypes;\n scale?: string | undefined;\n color: string;\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n curveStyle?: string;\n higherIsBetter?: boolean;\n }\n\n export type InternalData = InternalSerie[];\n export interface TooltipRenderDataT {\n data: {\n datum: InternalDatum;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n }[];\n }\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSDatavizName,\n typeof DATAVIZ_SLOTS\n > {\n groups?: string[][];\n types?: 'scatter';\n scrapper?: ScrapperT;\n withTrendHighlight?: boolean;\n withAnimation?: boolean;\n animationDuration?: number;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n height?: number;\n width?: number;\n legend?: LegendT;\n xScroll?: boolean;\n yScroll?: boolean;\n y2Axis?: AxisT;\n yAxis: AxisT;\n xAxis: AxisT;\n }\n\n export interface DefaultProps {\n series: SeriesT[];\n }\n\n export interface RequiredProps {}\n\n export interface Props extends OptionalProps, DefaultProps, RequiredProps {}\n\n export type StackedSeriesByGroupT = Series<\n {\n [key: string]: number;\n },\n string\n >[][];\n\n export interface ScrapperDatum {\n position: number | undefined;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n key: number;\n datum: DSChartT.InternalDatum;\n }\n}\n\nconst TIME_INTERVAL_NAMES: DSChartT.IntervalT[] = ['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'];\n\n// the PropTypes builders mutate the instance they are called on (isRequired, description), so every axis prop gets its own\nconst getAxisTickPropTypes = () =>\n PropTypes.shape({\n tickValues: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)])),\n tickFormat: PropTypes.oneOfType([\n PropTypes.func.signature('((value: string | number | Date) => string)'),\n PropTypes.string,\n ]),\n tickCount: PropTypes.number,\n tickRotation: PropTypes.number,\n overwriteTicks: PropTypes.bool,\n color: PropTypes.string,\n });\n\nconst getAxisPropTypes = () =>\n PropTypes.shape({\n type: PropTypes.oneOf(['log', 'band', 'time', 'linear']).isRequired,\n showGrid: PropTypes.bool,\n color: PropTypes.string,\n label: PropTypes.string,\n cols: PropTypes.arrayOf(PropTypes.string),\n domainPadding: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n intervalType: PropTypes.oneOf(TIME_INTERVAL_NAMES),\n hideAxis: PropTypes.bool,\n beginAtZero: PropTypes.bool,\n advanced: PropTypes.shape({\n pointSpacing: PropTypes.shape({ type: PropTypes.oneOf(['ratio']).isRequired, value: PropTypes.number.isRequired })\n .isRequired,\n }),\n tick: getAxisTickPropTypes(),\n min: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n domainPaddingType: PropTypes.oneOf(TIME_INTERVAL_NAMES),\n fitToView: PropTypes.bool,\n });\n\n// Chart forwards neither global attributes nor xstyled props to the DOM, so the schema documents only its own props;\n// attributes for the root container go through the dsDatavizRoot slot (see KNOWN_INTENTIONAL_DEVIATIONS.md)\nexport const DSChartPropTypes: DSPropTypesSchema<DSChartT.Props> = {\n ...getPropsPerSlotPropTypes(DSDatavizName, DATAVIZ_SLOTS),\n series: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n data: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object])).isRequired,\n type: PropTypes.oneOf(['line', 'bar', 'area', 'point']).isRequired,\n scale: PropTypes.string,\n color: PropTypes.string.isRequired,\n dashStyle: PropTypes.string,\n pointRadius: PropTypes.number,\n pointStyle: PropTypes.string,\n curveStyle: PropTypes.string,\n higherIsBetter: PropTypes.bool,\n }),\n ).isRequired.description(\n 'Series to plot. Each one has a name, its values, a type and a color (a Dimsum palette key such as \"blue-200\", or any CSS color). An empty list renders the axes with no data',\n ),\n xAxis: getAxisPropTypes().isRequired.description(\n 'Horizontal axis configuration. min and max widen the axis to hold them, and the data can widen it further',\n ),\n yAxis: getAxisPropTypes().isRequired.description(\n 'Vertical axis configuration. min and max widen the axis to hold them, and the data can widen it further',\n ),\n y2Axis: getAxisPropTypes().description(\n 'Secondary vertical axis, drawn on the right. Series with scale \"y2\" are plotted against it, or against the main axis when it is not set. When both axes are linear, its ticks sit at the heights of the ticks of the main axis, on the grid lines, unless it sets min, max, domainPadding, tick.tickCount or tick.tickValues',\n ),\n groups: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)).description(\n 'Series names to stack together, one array per stack, e.g. [[\"data1\", \"data2\"]]',\n ),\n types: PropTypes.oneOf(['scatter']).description('\"scatter\" renders the series that have no type as points'),\n scrapper: PropTypes.shape({\n type: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,\n color: PropTypes.string.isRequired,\n tooltipPreference: PropTypes.string,\n }).description(\n 'Guide line that follows the pointer, with its direction, color and tooltip placement (tooltipPreference, \"top\" by default)',\n ),\n withTrendHighlight: PropTypes.bool.description(\n 'Highlights the stretch of a line, or of the top of an area, that leads to its focused point (keyboard, pointer or scrapper): success color when it goes the good way, danger when it goes the bad way, neutral when flat. A rise is good unless the series sets higherIsBetter false. The points read the change to screen readers',\n ),\n withAnimation: PropTypes.bool.description(\n 'Animates the series when the chart mounts: they grow from the baseline of the value axis. Skipped when the user prefers reduced motion',\n ),\n animationDuration: PropTypes.number\n .description('Duration in milliseconds of the entrance animation of withAnimation')\n .defaultValue(700),\n TooltipRenderer: PropTypes.func\n .signature(\n '((props: { data: { name: string; xValue: string | number | Date | null; yValue: string | number | Date | null; datum: object }[] }) => JSX.Element)',\n )\n .description('Component rendered as the tooltip of the active data point, it receives the data of that point'),\n height: PropTypes.number.description('Height of the chart in pixels').defaultValue(500),\n width: PropTypes.number.description(\n 'Width of the chart in pixels. When omitted the chart takes the width of its container and follows its resizes',\n ),\n legend: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'bottom', 'left', 'top']).isRequired,\n preventFilterAction: PropTypes.bool,\n }).description('Legend position, and whether clicking a legend item hides or shows its series'),\n xScroll: PropTypes.bool.description(\n 'Makes the horizontal axis scrollable and zoomable, together with xAxis.advanced.pointSpacing',\n ),\n yScroll: PropTypes.bool.description('Makes the vertical axis scrollable, together with yAxis.advanced.pointSpacing'),\n};\n\nexport const DSChartPropTypesSchema = DSChartPropTypes as unknown as ValidationMap<DSChartT.Props>;\n\nexport declare namespace DSSingleStackedBarT {\n export type SlotFunctionArguments = {\n dsSingleStackedBarRoot: () => object;\n dsSingleStackedBarBar: () => object;\n dsSingleStackedBarTooltip: () => object;\n dsSingleStackedBarTooltipHoverArea: () => object;\n };\n\n export type DatumT = {\n name: string;\n data: number;\n color: string;\n };\n export type SingleStackedBarDatumT = DatumT[];\n export type TooltipRenderDataT = {\n datum: DatumT;\n };\n export interface SingleStackedBarT {\n data: SingleStackedBarDatumT;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n height: string | number;\n gutter?: string | number;\n }\n\n export interface BarT extends SingleStackedBarT {\n isFocused: boolean;\n borderRadius?: BorderProps['borderRadius'];\n bg: string;\n tabIndex?: 0 | -1;\n datum: DatumT;\n }\n\n export interface RequiredProps {\n height: string | number;\n data: DatumT[];\n }\n\n export interface DefaultProps {\n gutter: string;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSSingleStackedBarName,\n typeof SINGLE_STACKED_BAR_SLOTS\n > {\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultSingleStackedBarProps: DSSingleStackedBarT.DefaultProps = {\n gutter: 'xxxs',\n};\n\nexport const DSSingleStackedBarPropTypes: DSPropTypesSchema<DSSingleStackedBarT.Props> = {\n ...getPropsPerSlotPropTypes(DSSingleStackedBarName, SINGLE_STACKED_BAR_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n height: PropTypes.string.description('Height of the bar').isRequired,\n gutter: PropTypes.string.description('Gap between the bars').defaultValue('xxxs'),\n TooltipRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the tooltip'),\n LegendRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the legend'),\n data: PropTypes.arrayOf(\n PropTypes.shape({ name: PropTypes.string, data: PropTypes.number, color: PropTypes.string }),\n ).description('Array of the series which represent the chart'),\n};\n\nexport const DSSingleStackedBarPropTypesSchema =\n DSSingleStackedBarPropTypes as unknown as ValidationMap<DSSingleStackedBarT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "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",
6
+ "names": ["import_constants"]
7
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ const ChartSlotPropsAsObject = {
26
+ dsDatavizRoot: { "aria-label": "just a typescript test" },
27
+ dsDatavizAxisLine: { "aria-label": "just a typescript test" },
28
+ dsDatavizAxisLabel: { "aria-label": "just a typescript test" },
29
+ dsDatavizLine: { "aria-label": "just a typescript test" },
30
+ dsDatavizArea: { "aria-label": "just a typescript test" },
31
+ dsDatavizBar: { "aria-label": "just a typescript test" },
32
+ dsDatavizPoint: { "aria-label": "just a typescript test" },
33
+ dsDatavizTooltip: { "aria-label": "just a typescript test" },
34
+ dsDatavizTooltipHoverArea: { "aria-label": "just a typescript test" },
35
+ dsDatavizResetZoomButton: { "aria-label": "just a typescript test" },
36
+ dsDatavizZoomInButton: { "aria-label": "just a typescript test" },
37
+ dsDatavizZoomOutButton: { "aria-label": "just a typescript test" }
38
+ };
39
+ const ChartSlotPropsAsFunctions = {
40
+ dsDatavizRoot: () => ({ "aria-label": "just a typescript test" }),
41
+ dsDatavizAxisLine: () => ({ "aria-label": "just a typescript test" }),
42
+ dsDatavizAxisLabel: () => ({ "aria-label": "just a typescript test" }),
43
+ dsDatavizLine: () => ({ "aria-label": "just a typescript test" }),
44
+ dsDatavizArea: () => ({ "aria-label": "just a typescript test" }),
45
+ dsDatavizBar: () => ({ "aria-label": "just a typescript test" }),
46
+ dsDatavizPoint: () => ({ "aria-label": "just a typescript test" }),
47
+ dsDatavizTooltip: () => ({ "aria-label": "just a typescript test" }),
48
+ dsDatavizTooltipHoverArea: () => ({ "aria-label": "just a typescript test" }),
49
+ dsDatavizResetZoomButton: () => ({ "aria-label": "just a typescript test" }),
50
+ dsDatavizZoomInButton: () => ({ "aria-label": "just a typescript test" }),
51
+ dsDatavizZoomOutButton: () => ({ "aria-label": "just a typescript test" })
52
+ };
53
+ const ChartSlotFunctionsAreValidProps = ChartSlotPropsAsFunctions;
54
+ const EnsureAllChartSlotsExistInSlotFunctionArguments = ChartSlotPropsAsFunctions;
55
+ const SingleStackedBarSlotPropsAsObject = {
56
+ dsSingleStackedBarRoot: { "aria-label": "just a typescript test" },
57
+ dsSingleStackedBarBar: { "aria-label": "just a typescript test" },
58
+ dsSingleStackedBarTooltip: { "aria-label": "just a typescript test" },
59
+ dsSingleStackedBarTooltipHoverArea: { "aria-label": "just a typescript test" }
60
+ };
61
+ const SingleStackedBarSlotPropsAsFunctions = {
62
+ dsSingleStackedBarRoot: () => ({ "aria-label": "just a typescript test" }),
63
+ dsSingleStackedBarBar: () => ({ "aria-label": "just a typescript test" }),
64
+ dsSingleStackedBarTooltip: () => ({ "aria-label": "just a typescript test" }),
65
+ dsSingleStackedBarTooltipHoverArea: () => ({ "aria-label": "just a typescript test" })
66
+ };
67
+ const SingleStackedBarSlotFunctionsAreValidProps = SingleStackedBarSlotPropsAsFunctions;
68
+ const EnsureAllSingleStackedBarSlotsExistInSlotFunctionArguments = SingleStackedBarSlotPropsAsFunctions;
69
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type {\n DSDatavizName,\n DATAVIZ_SLOTS,\n DSSingleStackedBarName,\n SINGLE_STACKED_BAR_SLOTS,\n} from '../constants/index.js';\nimport type { DSChartT, DSSingleStackedBarT } from '../react-desc-prop-types.js';\n\n// Chart renders the DSDataviz slots\nconst ChartSlotPropsAsObject: Partial<DSChartT.Props> = {\n dsDatavizRoot: { 'aria-label': 'just a typescript test' },\n dsDatavizAxisLine: { 'aria-label': 'just a typescript test' },\n dsDatavizAxisLabel: { 'aria-label': 'just a typescript test' },\n dsDatavizLine: { 'aria-label': 'just a typescript test' },\n dsDatavizArea: { 'aria-label': 'just a typescript test' },\n dsDatavizBar: { 'aria-label': 'just a typescript test' },\n dsDatavizPoint: { 'aria-label': 'just a typescript test' },\n dsDatavizTooltip: { 'aria-label': 'just a typescript test' },\n dsDatavizTooltipHoverArea: { 'aria-label': 'just a typescript test' },\n dsDatavizResetZoomButton: { 'aria-label': 'just a typescript test' },\n dsDatavizZoomInButton: { 'aria-label': 'just a typescript test' },\n dsDatavizZoomOutButton: { 'aria-label': 'just a typescript test' },\n};\n\nconst ChartSlotPropsAsFunctions: DSChartT.SlotFunctionArguments = {\n dsDatavizRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizAxisLine: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizAxisLabel: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizLine: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizArea: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizBar: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizPoint: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizTooltip: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizTooltipHoverArea: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizResetZoomButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizZoomInButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsDatavizZoomOutButton: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// The function form must also be accepted by the public Props, slot by slot\nconst ChartSlotFunctionsAreValidProps: Partial<DSChartT.Props> = ChartSlotPropsAsFunctions;\n\n// Exhaustiveness check \u2014 fails compilation if a Chart slot is missing from SlotFunctionArguments\nconst EnsureAllChartSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSDatavizName, typeof DATAVIZ_SLOTS>\n> = ChartSlotPropsAsFunctions;\n\n// DSSingleStackedBar renders its own slots\nconst SingleStackedBarSlotPropsAsObject: Partial<DSSingleStackedBarT.Props> = {\n dsSingleStackedBarRoot: { 'aria-label': 'just a typescript test' },\n dsSingleStackedBarBar: { 'aria-label': 'just a typescript test' },\n dsSingleStackedBarTooltip: { 'aria-label': 'just a typescript test' },\n dsSingleStackedBarTooltipHoverArea: { 'aria-label': 'just a typescript test' },\n};\n\nconst SingleStackedBarSlotPropsAsFunctions: DSSingleStackedBarT.SlotFunctionArguments = {\n dsSingleStackedBarRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsSingleStackedBarBar: () => ({ 'aria-label': 'just a typescript test' }),\n dsSingleStackedBarTooltip: () => ({ 'aria-label': 'just a typescript test' }),\n dsSingleStackedBarTooltipHoverArea: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// The function form must also be accepted by the public Props, slot by slot\nconst SingleStackedBarSlotFunctionsAreValidProps: Partial<DSSingleStackedBarT.Props> =\n SingleStackedBarSlotPropsAsFunctions;\n\n// Exhaustiveness check \u2014 fails compilation if a DSSingleStackedBar slot is missing from SlotFunctionArguments\nconst EnsureAllSingleStackedBarSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSSingleStackedBarName, typeof SINGLE_STACKED_BAR_SLOTS>\n> = SingleStackedBarSlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACWvB,MAAM,yBAAkD;AAAA,EACtD,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,cAAc,EAAE,cAAc,yBAAyB;AAAA,EACvD,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,kBAAkB,EAAE,cAAc,yBAAyB;AAAA,EAC3D,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,wBAAwB,EAAE,cAAc,yBAAyB;AACnE;AAEA,MAAM,4BAA4D;AAAA,EAChE,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,oBAAoB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACpE,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,cAAc,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9D,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,kBAAkB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,wBAAwB,OAAO,EAAE,cAAc,yBAAyB;AAC1E;AAGA,MAAM,kCAA2D;AAGjE,MAAM,kDAEF;AAGJ,MAAM,oCAAwE;AAAA,EAC5E,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,oCAAoC,EAAE,cAAc,yBAAyB;AAC/E;AAEA,MAAM,uCAAkF;AAAA,EACtF,wBAAwB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACxE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,oCAAoC,OAAO,EAAE,cAAc,yBAAyB;AACtF;AAGA,MAAM,6CACJ;AAGF,MAAM,6DAEF;",
6
+ "names": []
7
+ }
@@ -28,15 +28,28 @@ var import__ = require("../index.js");
28
28
  const closeButtonRef = (0, import_react.createRef)();
29
29
  const testRequiredProps = {};
30
30
  const testOptionalProps = {
31
+ withAnimation: true,
32
+ // tooltipPreference is optional
33
+ scrapper: { type: "vertical", color: "gray" },
34
+ animationDuration: 500,
31
35
  xAxis: {
32
36
  label: "x-axis",
33
37
  type: "linear"
34
38
  },
35
39
  yAxis: {
36
40
  label: "y-axis",
37
- type: "linear"
41
+ type: "linear",
42
+ // on a horizontally scrollable chart, the domain of the data in view
43
+ fitToView: true
38
44
  }
39
45
  };
46
+ const testScrollableTimeAxis = {
47
+ type: "time",
48
+ intervalType: "HOUR",
49
+ domainPadding: [1, 1],
50
+ domainPaddingType: "MINUTE",
51
+ advanced: { pointSpacing: { type: "ratio", value: 2 } }
52
+ };
40
53
  const testPartialDefaults = {
41
54
  series: [
42
55
  {
@@ -58,7 +71,13 @@ const testCompleteDefaults = {
58
71
  data: [1, 2, 3, 4, 5],
59
72
  name: "Series 1",
60
73
  color: "red",
61
- type: "line"
74
+ type: "line",
75
+ curveStyle: "SPLINE",
76
+ // with withTrendHighlight, a fall is good for this series
77
+ higherIsBetter: false,
78
+ dashStyle: "DASH",
79
+ pointStyle: "SQUARE",
80
+ pointRadius: 4
62
81
  }
63
82
  ]
64
83
  };
@@ -81,6 +100,7 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
81
100
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Chart, { ...testExplicitDefinition }),
82
101
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Chart, { ...testInferedTypeCompatibility }),
83
102
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Chart, { ...testDefinitionAsConst }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChartWithSchema, { ...testExplicitDefinition }),
84
104
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
105
  import__.Chart,
86
106
  {
@@ -101,6 +121,18 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
101
121
  type: "linear"
102
122
  }
103
123
  }
124
+ ),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ import__.Chart,
127
+ {
128
+ series: [{ data: [1, 2, 3], name: "Series 1", color: "blue-200", type: "bar" }],
129
+ xAxis: { type: "band", cols: ["a", "b", "c"] },
130
+ yAxis: { type: "linear" },
131
+ dsDatavizRoot: { "aria-label": "Weekly production" },
132
+ dsDatavizBar: () => ({ "data-custom": "bar" }),
133
+ dsDatavizPoint: { "data-custom": "point" },
134
+ dsDatavizAxisLine: () => ({ "data-custom": "axis line" })
135
+ }
104
136
  )
105
137
  ] });
106
138
  //# sourceMappingURL=typescript-data-viz-valid.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-data-viz-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { Chart } from '../index.js';\nimport type { DSChartT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChartT.Props;\ntype ComponentPropsDefaultProps = DSChartT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChartT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChartT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n xAxis: {\n label: 'x-axis',\n type: 'linear',\n },\n yAxis: {\n label: 'y-axis',\n type: 'linear',\n },\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n series: [\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n },\n ],\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n series: [\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n },\n ],\n};\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <Chart {...testExplicitDefinition} />\n <Chart {...testInferedTypeCompatibility} />\n <Chart {...testDefinitionAsConst} />\n {/* works with inline values */}\n <Chart\n series={[\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n },\n ]}\n xAxis={{\n label: 'x-axis',\n type: 'linear',\n }}\n yAxis={{\n label: 'y-axis',\n type: 'linear',\n }}\n />\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC8ErB;AA7EF,mBAA0B;AAC1B,eAAsB;AAStB,MAAM,qBAAiB,wBAA6B;AAEpD,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;AAIA,MAAM,sBAA2D;AAAA,EAC/D,QAAQ;AAAA,IACN;AAAA,MACE,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AAAA,MACpB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,QAAQ;AAAA,IACN;AAAA,MACE,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AAAA,MACpB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAGA,MAAM,yBAA+C;AAAA,EACnD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,+BAA+B;AAAA,EACnC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,kBAAO,GAAG,wBAAwB;AAAA,EACnC,4CAAC,kBAAO,GAAG,8BAA8B;AAAA,EACzC,4CAAC,kBAAO,GAAG,uBAAuB;AAAA,EAElC;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,QACN;AAAA,UACE,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AAAA,UACpB,MAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAM;AAAA,QACR;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA;AAAA,EACF;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { Chart, ChartWithSchema } from '../index.js';\nimport type { DSChartT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChartT.Props;\ntype ComponentPropsDefaultProps = DSChartT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChartT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChartT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n withAnimation: true,\n // tooltipPreference is optional\n scrapper: { type: 'vertical', color: 'gray' },\n animationDuration: 500,\n xAxis: {\n label: 'x-axis',\n type: 'linear',\n },\n yAxis: {\n label: 'y-axis',\n type: 'linear',\n // on a horizontally scrollable chart, the domain of the data in view\n fitToView: true,\n },\n};\n\n// a scrollable time axis: pointSpacing takes the size of the plot against the visible part (\"ratio\" is its only type),\n// and intervalType and domainPaddingType take the UTC intervals from MINUTE to YEAR\nconst testScrollableTimeAxis: DSChartT.AxisT = {\n type: 'time',\n intervalType: 'HOUR',\n domainPadding: [1, 1],\n domainPaddingType: 'MINUTE',\n advanced: { pointSpacing: { type: 'ratio', value: 2 } },\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n series: [\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n },\n ],\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n series: [\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n curveStyle: 'SPLINE',\n // with withTrendHighlight, a fall is good for this series\n higherIsBetter: false,\n dashStyle: 'DASH',\n pointStyle: 'SQUARE',\n pointRadius: 4,\n },\n ],\n};\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <Chart {...testExplicitDefinition} />\n <Chart {...testInferedTypeCompatibility} />\n <Chart {...testDefinitionAsConst} />\n <ChartWithSchema {...testExplicitDefinition} />\n {/* works with inline values */}\n <Chart\n series={[\n {\n data: [1, 2, 3, 4, 5],\n name: 'Series 1',\n color: 'red',\n type: 'line',\n },\n ]}\n xAxis={{\n label: 'x-axis',\n type: 'linear',\n }}\n yAxis={{\n label: 'y-axis',\n type: 'linear',\n }}\n />\n {/* works with slot props, object and function forms */}\n <Chart\n series={[{ data: [1, 2, 3], name: 'Series 1', color: 'blue-200', type: 'bar' }]}\n xAxis={{ type: 'band', cols: ['a', 'b', 'c'] }}\n yAxis={{ type: 'linear' }}\n dsDatavizRoot={{ 'aria-label': 'Weekly production' }}\n dsDatavizBar={() => ({ 'data-custom': 'bar' })}\n dsDatavizPoint={{ 'data-custom': 'point' }}\n dsDatavizAxisLine={() => ({ 'data-custom': 'axis line' })}\n />\n </>\n);\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import__ = require("../index.js");
27
+ const TooltipRenderer = ({ datum }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: datum.name });
28
+ const testRequiredProps = {
29
+ height: 40,
30
+ data: [
31
+ { name: "James", data: 3, color: "green-100" },
32
+ { name: "Bill", data: 4, color: "orange-100" }
33
+ ]
34
+ };
35
+ const testOptionalProps = {
36
+ TooltipRenderer: ({ datum }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: datum.name }),
37
+ LegendRenderer: ({ datum }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: datum.data }),
38
+ dsSingleStackedBarRoot: { "aria-label": "votes" },
39
+ dsSingleStackedBarBar: () => ({ "data-custom": "bar" })
40
+ };
41
+ const testPartialDefaults = {};
42
+ const testProps = {
43
+ ...testRequiredProps,
44
+ ...testOptionalProps,
45
+ ...testPartialDefaults
46
+ };
47
+ const testCompleteDefaults = {
48
+ gutter: "xxxs"
49
+ };
50
+ const testInternalProps = {
51
+ ...testRequiredProps,
52
+ ...testOptionalProps,
53
+ ...testCompleteDefaults
54
+ };
55
+ const testExplicitDefinition = {
56
+ ...testRequiredProps,
57
+ ...testOptionalProps,
58
+ ...testCompleteDefaults
59
+ };
60
+ const testInferedTypeCompatibility = {
61
+ ...testRequiredProps,
62
+ ...testOptionalProps,
63
+ ...testCompleteDefaults
64
+ };
65
+ const testDefinitionAsConst = {
66
+ ...testRequiredProps,
67
+ ...testOptionalProps,
68
+ ...testCompleteDefaults
69
+ };
70
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSingleStackedBar, { ...testExplicitDefinition }),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSingleStackedBar, { ...testInferedTypeCompatibility }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSingleStackedBar, { ...testDefinitionAsConst }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSingleStackedBarWithSchema, { ...testExplicitDefinition }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ import__.DSSingleStackedBar,
77
+ {
78
+ height: "40",
79
+ gutter: "xs",
80
+ "aria-label": "votes",
81
+ data: [
82
+ { name: "James", data: 3, color: "green-100" },
83
+ { name: "Bill", data: 4, color: "orange-100" }
84
+ ],
85
+ TooltipRenderer,
86
+ dsSingleStackedBarRoot: { "aria-label": "votes" },
87
+ dsSingleStackedBarBar: () => ({ "data-custom": "bar" }),
88
+ dsSingleStackedBarTooltip: { "data-custom": "tooltip" },
89
+ dsSingleStackedBarTooltipHoverArea: () => ({ "data-custom": "hover area" })
90
+ }
91
+ )
92
+ ] });
93
+ //# sourceMappingURL=typescript-single-stacked-bar-valid.js.map