@mui/x-charts-pro 8.21.0 → 8.22.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 (374) hide show
  1. package/BarChartPro/BarChartPro.d.ts +5 -5
  2. package/BarChartPro/BarChartPro.js +20 -0
  3. package/BarChartPro/BarChartPro.plugins.d.ts +4 -4
  4. package/BarChartPro/BarChartPro.plugins.js +1 -1
  5. package/CHANGELOG.md +238 -1
  6. package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
  7. package/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
  9. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  10. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  11. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
  12. package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
  14. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -9
  15. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
  16. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
  17. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
  18. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +1 -1
  19. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  20. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
  21. package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  22. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
  23. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
  24. package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
  25. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -2
  26. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  27. package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
  28. package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
  29. package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
  30. package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
  31. package/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
  32. package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
  33. package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
  34. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
  35. package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
  36. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
  37. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
  38. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
  39. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
  40. package/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
  41. package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  42. package/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
  43. package/FunnelChart/FunnelChart.d.ts +9 -9
  44. package/FunnelChart/FunnelChart.plugins.d.ts +4 -4
  45. package/FunnelChart/FunnelChart.plugins.js +1 -1
  46. package/FunnelChart/FunnelPlot.d.ts +2 -2
  47. package/FunnelChart/FunnelPlot.js +3 -3
  48. package/FunnelChart/FunnelSection.d.ts +2 -2
  49. package/FunnelChart/FunnelSectionLabel.d.ts +2 -2
  50. package/FunnelChart/categoryAxis.types.d.ts +2 -2
  51. package/FunnelChart/coordinateMapper.d.ts +2 -2
  52. package/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
  53. package/FunnelChart/curves/bump.d.ts +1 -1
  54. package/FunnelChart/curves/curve.types.d.ts +1 -1
  55. package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
  56. package/FunnelChart/curves/linear.d.ts +1 -1
  57. package/FunnelChart/curves/pyramid.d.ts +1 -1
  58. package/FunnelChart/curves/step-pyramid.d.ts +1 -1
  59. package/FunnelChart/curves/step.d.ts +1 -1
  60. package/FunnelChart/funnel.types.d.ts +5 -5
  61. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
  62. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
  63. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +2 -2
  64. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  65. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
  66. package/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
  67. package/FunnelChart/funnelSlots.types.d.ts +6 -6
  68. package/FunnelChart/labelUtils.d.ts +2 -2
  69. package/FunnelChart/seriesConfig/extremums.d.ts +1 -1
  70. package/FunnelChart/seriesConfig/getColor.d.ts +1 -1
  71. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  72. package/FunnelChart/seriesConfig/legend.d.ts +1 -1
  73. package/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
  74. package/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
  75. package/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
  76. package/FunnelChart/useFunnelChartProps.d.ts +7 -7
  77. package/Heatmap/Heatmap.d.ts +13 -13
  78. package/Heatmap/Heatmap.js +10 -0
  79. package/Heatmap/Heatmap.plugins.d.ts +3 -3
  80. package/Heatmap/Heatmap.plugins.js +1 -1
  81. package/Heatmap/HeatmapItem.d.ts +2 -2
  82. package/Heatmap/HeatmapPlot.d.ts +1 -1
  83. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
  84. package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
  85. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
  86. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
  87. package/Heatmap/seriesConfig/extremums.d.ts +1 -1
  88. package/Heatmap/seriesConfig/getColor.d.ts +1 -1
  89. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  90. package/Heatmap/seriesConfig/index.d.ts +1 -1
  91. package/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
  92. package/Heatmap/seriesConfig/tooltip.d.ts +1 -1
  93. package/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
  94. package/LineChartPro/LineChartPro.d.ts +5 -5
  95. package/LineChartPro/LineChartPro.js +20 -0
  96. package/LineChartPro/LineChartPro.plugins.d.ts +4 -4
  97. package/LineChartPro/LineChartPro.plugins.js +1 -1
  98. package/PieChartPro/PieChartPro.d.ts +5 -5
  99. package/PieChartPro/PieChartPro.plugins.d.ts +3 -3
  100. package/RadarChartPro/RadarChartPro.d.ts +4 -4
  101. package/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
  102. package/RadarChartPro/RadarChartPro.plugins.js +1 -1
  103. package/SankeyChart/SankeyChart.d.ts +1 -1
  104. package/SankeyChart/SankeyChart.plugins.d.ts +3 -3
  105. package/SankeyChart/SankeyChart.plugins.js +1 -1
  106. package/SankeyChart/SankeyLinkElement.js +2 -2
  107. package/SankeyChart/SankeyLinkLabel.d.ts +1 -1
  108. package/SankeyChart/SankeyNodeElement.d.ts +0 -4
  109. package/SankeyChart/SankeyNodeElement.js +5 -24
  110. package/SankeyChart/SankeyNodeLabel.d.ts +12 -0
  111. package/SankeyChart/SankeyNodeLabel.js +61 -0
  112. package/SankeyChart/SankeyPlot.js +10 -7
  113. package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
  114. package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
  115. package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
  116. package/SankeyChart/calculateSankeyLayout.d.ts +2 -2
  117. package/SankeyChart/calculateSankeyLayout.js +12 -33
  118. package/SankeyChart/d3Sankey/align.d.ts +4 -4
  119. package/SankeyChart/d3Sankey/sankey.d.ts +3 -3
  120. package/SankeyChart/d3Sankey/sankey.js +4 -1
  121. package/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
  122. package/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
  123. package/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
  124. package/SankeyChart/plugins/useSankeyHighlight.js +1 -1
  125. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
  126. package/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
  127. package/SankeyChart/sankey.types.d.ts +32 -24
  128. package/SankeyChart/sankeyClasses.d.ts +3 -1
  129. package/SankeyChart/sankeyClasses.js +2 -1
  130. package/SankeyChart/sankeySlots.types.d.ts +4 -4
  131. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
  132. package/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
  133. package/SankeyChart/utils.d.ts +1 -1
  134. package/ScatterChartPro/ScatterChartPro.d.ts +6 -6
  135. package/ScatterChartPro/ScatterChartPro.js +20 -0
  136. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
  137. package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
  138. package/context/ChartProApi.d.ts +10 -10
  139. package/context/useChartProApiContext.d.ts +1 -1
  140. package/esm/BarChartPro/BarChartPro.d.ts +5 -5
  141. package/esm/BarChartPro/BarChartPro.js +20 -0
  142. package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -4
  143. package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
  144. package/esm/ChartContainerPro/ChartContainerPro.d.ts +4 -4
  145. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
  146. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
  147. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  148. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  149. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
  150. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +3 -3
  151. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
  152. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +10 -10
  153. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
  154. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +3 -3
  155. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
  156. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +2 -2
  157. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  158. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
  159. package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  160. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
  161. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +3 -3
  162. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
  163. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
  164. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  165. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +3 -3
  166. package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
  167. package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
  168. package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +3 -3
  169. package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
  170. package/esm/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
  171. package/esm/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
  172. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
  173. package/esm/ChartsToolbarPro/ChartsToolbarPro.js +2 -2
  174. package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
  175. package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +2 -2
  176. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
  177. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +2 -2
  178. package/esm/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
  179. package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  180. package/esm/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
  181. package/esm/FunnelChart/FunnelChart.d.ts +9 -9
  182. package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -4
  183. package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
  184. package/esm/FunnelChart/FunnelPlot.d.ts +2 -2
  185. package/esm/FunnelChart/FunnelPlot.js +4 -4
  186. package/esm/FunnelChart/FunnelSection.d.ts +2 -2
  187. package/esm/FunnelChart/FunnelSectionLabel.d.ts +2 -2
  188. package/esm/FunnelChart/categoryAxis.types.d.ts +2 -2
  189. package/esm/FunnelChart/coordinateMapper.d.ts +2 -2
  190. package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
  191. package/esm/FunnelChart/curves/bump.d.ts +1 -1
  192. package/esm/FunnelChart/curves/curve.types.d.ts +1 -1
  193. package/esm/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
  194. package/esm/FunnelChart/curves/linear.d.ts +1 -1
  195. package/esm/FunnelChart/curves/pyramid.d.ts +1 -1
  196. package/esm/FunnelChart/curves/step-pyramid.d.ts +1 -1
  197. package/esm/FunnelChart/curves/step.d.ts +1 -1
  198. package/esm/FunnelChart/funnel.types.d.ts +5 -5
  199. package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
  200. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
  201. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +3 -3
  202. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  203. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
  204. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
  205. package/esm/FunnelChart/funnelSlots.types.d.ts +6 -6
  206. package/esm/FunnelChart/labelUtils.d.ts +2 -2
  207. package/esm/FunnelChart/seriesConfig/extremums.d.ts +1 -1
  208. package/esm/FunnelChart/seriesConfig/getColor.d.ts +1 -1
  209. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  210. package/esm/FunnelChart/seriesConfig/legend.d.ts +1 -1
  211. package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
  212. package/esm/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
  213. package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
  214. package/esm/FunnelChart/useFunnelChartProps.d.ts +7 -7
  215. package/esm/Heatmap/Heatmap.d.ts +13 -13
  216. package/esm/Heatmap/Heatmap.js +10 -0
  217. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -3
  218. package/esm/Heatmap/Heatmap.plugins.js +2 -2
  219. package/esm/Heatmap/HeatmapItem.d.ts +2 -2
  220. package/esm/Heatmap/HeatmapPlot.d.ts +1 -1
  221. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
  222. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
  223. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
  224. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
  225. package/esm/Heatmap/seriesConfig/extremums.d.ts +1 -1
  226. package/esm/Heatmap/seriesConfig/getColor.d.ts +1 -1
  227. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  228. package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
  229. package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
  230. package/esm/Heatmap/seriesConfig/tooltip.d.ts +1 -1
  231. package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
  232. package/esm/LineChartPro/LineChartPro.d.ts +5 -5
  233. package/esm/LineChartPro/LineChartPro.js +20 -0
  234. package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -4
  235. package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
  236. package/esm/PieChartPro/PieChartPro.d.ts +5 -5
  237. package/esm/PieChartPro/PieChartPro.plugins.d.ts +3 -3
  238. package/esm/RadarChartPro/RadarChartPro.d.ts +4 -4
  239. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
  240. package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
  241. package/esm/SankeyChart/SankeyChart.d.ts +1 -1
  242. package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -3
  243. package/esm/SankeyChart/SankeyChart.plugins.js +2 -2
  244. package/esm/SankeyChart/SankeyLinkElement.js +3 -3
  245. package/esm/SankeyChart/SankeyLinkLabel.d.ts +1 -1
  246. package/esm/SankeyChart/SankeyNodeElement.d.ts +0 -4
  247. package/esm/SankeyChart/SankeyNodeElement.js +7 -26
  248. package/esm/SankeyChart/SankeyNodeLabel.d.ts +12 -0
  249. package/esm/SankeyChart/SankeyNodeLabel.js +55 -0
  250. package/esm/SankeyChart/SankeyPlot.js +10 -7
  251. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
  252. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
  253. package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
  254. package/esm/SankeyChart/calculateSankeyLayout.d.ts +2 -2
  255. package/esm/SankeyChart/calculateSankeyLayout.js +12 -33
  256. package/esm/SankeyChart/d3Sankey/align.d.ts +4 -4
  257. package/esm/SankeyChart/d3Sankey/sankey.d.ts +3 -3
  258. package/esm/SankeyChart/d3Sankey/sankey.js +4 -1
  259. package/esm/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
  260. package/esm/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
  261. package/esm/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
  262. package/esm/SankeyChart/plugins/useSankeyHighlight.js +1 -1
  263. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
  264. package/esm/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
  265. package/esm/SankeyChart/sankey.types.d.ts +32 -24
  266. package/esm/SankeyChart/sankeyClasses.d.ts +3 -1
  267. package/esm/SankeyChart/sankeyClasses.js +2 -1
  268. package/esm/SankeyChart/sankeySlots.types.d.ts +4 -4
  269. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
  270. package/esm/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
  271. package/esm/SankeyChart/utils.d.ts +1 -1
  272. package/esm/ScatterChartPro/ScatterChartPro.d.ts +6 -6
  273. package/esm/ScatterChartPro/ScatterChartPro.js +20 -0
  274. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
  275. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
  276. package/esm/context/ChartProApi.d.ts +10 -10
  277. package/esm/context/useChartProApiContext.d.ts +1 -1
  278. package/esm/hooks/useChartProApiRef.d.ts +3 -3
  279. package/esm/hooks/useFunnelSeries.d.ts +1 -1
  280. package/esm/hooks/useHeatmapSeries.d.ts +1 -1
  281. package/esm/hooks/useSankeySeries.d.ts +2 -2
  282. package/esm/hooks/useSankeySeries.js +3 -2
  283. package/esm/hooks/zoom/useIsZoomInteracting.js +2 -2
  284. package/esm/index.js +1 -1
  285. package/esm/internals/index.d.ts +2 -0
  286. package/esm/internals/index.js +1 -0
  287. package/esm/internals/material/components/BaseMenuItem.d.ts +1 -1
  288. package/esm/internals/material/components/BasePopper.d.ts +1 -1
  289. package/esm/internals/material/index.d.ts +3 -3
  290. package/esm/internals/plugins/allPlugins.d.ts +7 -7
  291. package/esm/internals/plugins/allPlugins.js +3 -3
  292. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  293. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  294. package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
  295. package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
  296. package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
  297. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
  298. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -4
  299. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
  300. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -4
  301. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
  302. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +4 -4
  303. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
  304. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
  305. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +4 -4
  306. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
  307. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +3 -3
  308. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
  309. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +4 -4
  310. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
  311. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +4 -4
  312. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
  313. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +4 -4
  314. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  315. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +3 -3
  316. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
  317. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  318. package/esm/internals/slots/chartBaseSlotProps.d.ts +1 -1
  319. package/esm/internals/slots/chartsBaseSlots.d.ts +3 -3
  320. package/esm/internals/slots/chartsIconSlots.d.ts +2 -2
  321. package/esm/models/seriesType/heatmap.d.ts +2 -2
  322. package/esm/themeAugmentation/components.d.ts +1 -1
  323. package/esm/themeAugmentation/overrides.d.ts +1 -1
  324. package/esm/themeAugmentation/props.d.ts +4 -4
  325. package/esm/typeOverloads/modules.d.ts +7 -7
  326. package/hooks/useChartProApiRef.d.ts +3 -3
  327. package/hooks/useFunnelSeries.d.ts +1 -1
  328. package/hooks/useHeatmapSeries.d.ts +1 -1
  329. package/hooks/useSankeySeries.d.ts +2 -2
  330. package/hooks/useSankeySeries.js +2 -1
  331. package/hooks/zoom/useIsZoomInteracting.js +1 -1
  332. package/index.js +1 -1
  333. package/internals/index.d.ts +2 -0
  334. package/internals/index.js +12 -0
  335. package/internals/material/components/BaseMenuItem.d.ts +1 -1
  336. package/internals/material/components/BasePopper.d.ts +1 -1
  337. package/internals/material/index.d.ts +3 -3
  338. package/internals/plugins/allPlugins.d.ts +7 -7
  339. package/internals/plugins/allPlugins.js +2 -2
  340. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  341. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  342. package/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
  343. package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
  344. package/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
  345. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
  346. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +3 -3
  347. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
  348. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +3 -3
  349. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
  350. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +3 -3
  351. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
  352. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
  353. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +3 -3
  354. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
  355. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +2 -2
  356. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
  357. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +3 -3
  358. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
  359. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +3 -3
  360. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
  361. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +3 -3
  362. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  363. package/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
  364. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
  365. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  366. package/internals/slots/chartBaseSlotProps.d.ts +1 -1
  367. package/internals/slots/chartsBaseSlots.d.ts +3 -3
  368. package/internals/slots/chartsIconSlots.d.ts +2 -2
  369. package/models/seriesType/heatmap.d.ts +2 -2
  370. package/package.json +5 -5
  371. package/themeAugmentation/components.d.ts +1 -1
  372. package/themeAugmentation/overrides.d.ts +1 -1
  373. package/themeAugmentation/props.d.ts +4 -4
  374. package/typeOverloads/modules.d.ts +7 -7
@@ -7,7 +7,7 @@ import type { SankeyExtraProperties, SankeyGraph, SankeyLayout } from "./sankey.
7
7
  *
8
8
  * Default nodes/links accessors are assumed.
9
9
  */
10
- export declare function sankey(): SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
10
+ export declare function sankey<WithPosition extends boolean>(withoutPositions?: WithPosition): SankeyLayout<WithPosition, SankeyGraph<WithPosition, {}, {}>, {}, {}>;
11
11
  /**
12
12
  * Get a Sankey layout generator.
13
13
  *
@@ -21,7 +21,7 @@ export declare function sankey(): SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
21
21
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
22
22
  * SankeyLinkMinimal interface.
23
23
  */
24
- export declare function sankey<N extends SankeyExtraProperties, L extends SankeyExtraProperties>(): SankeyLayout<SankeyGraph<N, L>, N, L>;
24
+ export declare function sankey<N extends SankeyExtraProperties, L extends SankeyExtraProperties, WithPosition extends boolean>(withoutPositions?: WithPosition): SankeyLayout<WithPosition, SankeyGraph<WithPosition, N, L>, N, L>;
25
25
  /**
26
26
  * Get a Sankey layout generator.
27
27
  *
@@ -39,4 +39,4 @@ export declare function sankey<N extends SankeyExtraProperties, L extends Sankey
39
39
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
40
40
  * SankeyLinkMinimal interface.
41
41
  */
42
- export declare function sankey<Data, N extends SankeyExtraProperties, L extends SankeyExtraProperties>(): SankeyLayout<Data, N, L>;
42
+ export declare function sankey<Data, N extends SankeyExtraProperties, L extends SankeyExtraProperties, WithPosition extends boolean>(withPositions?: WithPosition): SankeyLayout<WithPosition, Data, N, L>;
@@ -101,7 +101,7 @@ function computeLinkBreadths({
101
101
  * SankeyLinkMinimal interface.
102
102
  */
103
103
 
104
- function sankey() {
104
+ function sankey(withPositions) {
105
105
  let x0 = 0,
106
106
  y0 = 0,
107
107
  x1 = 1,
@@ -127,6 +127,9 @@ function sankey() {
127
127
  computeNodeValues(graph);
128
128
  computeNodeDepths(graph);
129
129
  computeNodeHeights(graph);
130
+ if (!withPositions) {
131
+ return graph;
132
+ }
130
133
  computeNodeBreadths(graph);
131
134
  computeLinkBreadths(graph);
132
135
  return graph;
@@ -10,25 +10,27 @@ export interface SankeyExtraProperties {
10
10
  * Helper interface to define the properties of Sankey Nodes. Calculated properties may only be defined,
11
11
  * once the layout(...) method of the Sankey layout generator has been invoked.
12
12
  *
13
+ * Those properties correspond to a SankyNode generated by `sankey(withoutPositions=true)`.
14
+ *
13
15
  * The first generic N refers to user-defined properties contained in the node data passed into
14
16
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
15
- * SankeyNodeMinimal interface.
17
+ * SankeyNodeStrictMinimal interface.
16
18
  *
17
19
  * The second generic L refers to user-defined properties contained in the link data passed into
18
20
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
19
- * SankeyLinkMinimal interface.
21
+ * SankeyLinkStrictMinimal interface.
20
22
  */
21
- export interface SankeyNodeMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
23
+ export interface SankeyNodeStrictMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
22
24
  /**
23
25
  * Array of outgoing links which have this node as their source.
24
26
  * This property is calculated internally by the Sankey layout generator.
25
27
  */
26
- sourceLinks?: Array<SankeyLink<N, L>> | undefined;
28
+ sourceLinks?: Array<SankeyLinkStrictMinimal<N, L>> | undefined;
27
29
  /**
28
30
  * Array of incoming links which have this node as their target.
29
31
  * This property is calculated internally by the Sankey layout generator.
30
32
  */
31
- targetLinks?: Array<SankeyLink<N, L>> | undefined;
33
+ targetLinks?: Array<SankeyLinkStrictMinimal<N, L>> | undefined;
32
34
  /**
33
35
  * Node's value calculated by Sankey layout Generator;
34
36
  * the sum of link.value for the node's incoming links.
@@ -50,6 +52,12 @@ export interface SankeyNodeMinimal<N extends SankeyExtraProperties, L extends Sa
50
52
  * Node's zero-based graph height, derived from the graph topology calculated by Sankey layout generator.
51
53
  */
52
54
  height?: number | undefined;
55
+ /**
56
+ * Link's layer in case of layered layout, calculated by Sankey layout generator.
57
+ */
58
+ layer?: number | undefined;
59
+ }
60
+ interface SankeyNodePosition {
53
61
  /**
54
62
  * Node's minimum horizontal position (derived from the node.depth) calculated by Sankey layout generator.
55
63
  */
@@ -66,11 +74,22 @@ export interface SankeyNodeMinimal<N extends SankeyExtraProperties, L extends Sa
66
74
  * Node's maximum vertical position (node.y1 - node.y0 is proportional to node.value) calculated by Sankey layout generator.
67
75
  */
68
76
  y1?: number | undefined;
69
- /**
70
- * Link's layer in case of layered layout, calculated by Sankey layout generator.
71
- */
72
- layer?: number | undefined;
73
77
  }
78
+ /**
79
+ * Helper interface to define the properties of Sankey Nodes. Calculated properties may only be defined,
80
+ * once the layout(...) method of the Sankey layout generator has been invoked.
81
+ *
82
+ * Those properties correspond to a SankyNode generated by `sankey(withoutPositions=false)`.
83
+ *
84
+ * The first generic N refers to user-defined properties contained in the node data passed into
85
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
86
+ * SankeyNodeMinimal interface.
87
+ *
88
+ * The second generic L refers to user-defined properties contained in the link data passed into
89
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
90
+ * SankeyLinkMinimal interface.
91
+ */
92
+ export interface SankeyNodeMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> extends SankeyNodeStrictMinimal<N & SankeyNode<true, N, L>, L & SankeyLink<true, N, L>>, SankeyNodePosition {}
74
93
  /**
75
94
  * Sankey Node type including both user-defined node data elements as well as those
76
95
  * calculated once the layout(...) method of the Sankey layout generators has been invoked.
@@ -83,11 +102,13 @@ export interface SankeyNodeMinimal<N extends SankeyExtraProperties, L extends Sa
83
102
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
84
103
  * SankeyLinkMinimal interface.
85
104
  */
86
- export type SankeyNode<N extends SankeyExtraProperties, L extends SankeyExtraProperties> = N & SankeyNodeMinimal<N, L>;
105
+ export type SankeyNode<WithPosition extends boolean, N extends SankeyExtraProperties, L extends SankeyExtraProperties> = N & (WithPosition extends true ? SankeyNodeMinimal<N, L> : SankeyNodeStrictMinimal<N, L>);
87
106
  /**
88
107
  * Helper interface to define the properties of Sankey Links. Calculated properties may only be defined,
89
108
  * once the layout(...) method of the Sankey layout generator has been invoked.
90
109
  *
110
+ * Those properties correspond to a SankyLink generated by `sankey(withoutPositions=true)`.
111
+ *
91
112
  * The first generic N refers to user-defined properties contained in the node data passed into
92
113
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
93
114
  * SankeyNodeMinimal interface.
@@ -96,7 +117,7 @@ export type SankeyNode<N extends SankeyExtraProperties, L extends SankeyExtraPro
96
117
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
97
118
  * SankeyLinkMinimal interface.
98
119
  */
99
- export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
120
+ export interface SankeyLinkStrictMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
100
121
  /**
101
122
  * Link's source node. For convenience, when initializing a Sankey layout using the default node id accessor,
102
123
  * source may be the zero-based index of the corresponding node in the nodes array
@@ -106,7 +127,7 @@ export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends Sa
106
127
  * Once the Sankey generator is invoked to return the Sankey graph object,
107
128
  * the numeric index will be replaced with the corresponding source node object.
108
129
  */
109
- source: number | string | SankeyNode<N, L>;
130
+ source: number | string | SankeyNodeStrictMinimal<N, L>;
110
131
  /**
111
132
  * Link's target node. For convenience, when initializing a Sankey layout using the default node id accessor,
112
133
  * target may be the zero-based index of the corresponding node in the nodes array
@@ -116,11 +137,17 @@ export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends Sa
116
137
  * Once the Sankey generator is invoked to return the Sankey graph object,
117
138
  * the numeric index will be replaced with the corresponding target node object.
118
139
  */
119
- target: number | string | SankeyNode<N, L>;
140
+ target: number | string | SankeyNodeStrictMinimal<N, L>;
120
141
  /**
121
142
  * Link's numeric value
122
143
  */
123
144
  value: number;
145
+ /**
146
+ * Link's zero-based index within the array of links calculated by Sankey layout generator.
147
+ */
148
+ index?: number | undefined;
149
+ }
150
+ interface SankeyLinkPosition {
124
151
  /**
125
152
  * Link's vertical starting position (at source node) calculated by Sankey layout generator.
126
153
  */
@@ -133,11 +160,20 @@ export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends Sa
133
160
  * Link's width (proportional to its value) calculated by Sankey layout generator.
134
161
  */
135
162
  width?: number | undefined;
136
- /**
137
- * Link's zero-based index within the array of links calculated by Sankey layout generator.
138
- */
139
- index?: number | undefined;
140
163
  }
164
+ /**
165
+ * Helper interface to define the properties of Sankey Links. Calculated properties may only be defined,
166
+ * once the layout(...) method of the Sankey layout generator has been invoked.
167
+ *
168
+ * The first generic N refers to user-defined properties contained in the node data passed into
169
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
170
+ * SankeyNodeMinimal interface.
171
+ *
172
+ * The second generic L refers to user-defined properties contained in the link data passed into
173
+ * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
174
+ * SankeyLinkMinimal interface.
175
+ */
176
+ export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends SankeyExtraProperties> extends SankeyLinkStrictMinimal<N & SankeyNode<true, N, L>, L & SankeyLink<true, N, L>>, SankeyLinkPosition {}
141
177
  /**
142
178
  * Sankey Link type including both user-defined link data elements, those required by the Sankey layout generator,
143
179
  * as well as those calculated once the layout(...) method of the layout generator has been invoked.
@@ -150,7 +186,7 @@ export interface SankeyLinkMinimal<N extends SankeyExtraProperties, L extends Sa
150
186
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
151
187
  * SankeyLinkMinimal interface.
152
188
  */
153
- export type SankeyLink<N extends SankeyExtraProperties, L extends SankeyExtraProperties> = L & SankeyLinkMinimal<N, L>;
189
+ export type SankeyLink<WithPosition extends boolean, N extends SankeyExtraProperties, L extends SankeyExtraProperties> = L & (WithPosition extends true ? SankeyLinkMinimal<N, L> : SankeyLinkStrictMinimal<N, L>);
154
190
  /**
155
191
  * A Sankey Graph Object which contains the computed layout information for nodes and links.
156
192
  *
@@ -162,15 +198,15 @@ export type SankeyLink<N extends SankeyExtraProperties, L extends SankeyExtraPro
162
198
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
163
199
  * SankeyLinkMinimal interface.
164
200
  */
165
- export interface SankeyGraph<N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
201
+ export interface SankeyGraph<WithPosition extends boolean, N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
166
202
  /**
167
203
  * Array of Sankey diagram nodes
168
204
  */
169
- nodes: Array<SankeyNode<N, L>>;
205
+ nodes: Array<SankeyNode<WithPosition, N, L>>;
170
206
  /**
171
207
  * Array of Sankey diagram links
172
208
  */
173
- links: Array<SankeyLink<N, L>>;
209
+ links: Array<SankeyLink<WithPosition, N, L>>;
174
210
  }
175
211
  /**
176
212
  * A Sankey layout generator.
@@ -186,14 +222,14 @@ export interface SankeyGraph<N extends SankeyExtraProperties, L extends SankeyEx
186
222
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
187
223
  * SankeyLinkMinimal interface.
188
224
  */
189
- export interface SankeyLayout<Data, N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
225
+ export interface SankeyLayout<WithPosition extends boolean, Data, N extends SankeyExtraProperties, L extends SankeyExtraProperties> {
190
226
  /**
191
227
  * Computes the node and link positions for the given arguments, returning a graph representing the Sankey layout.
192
228
  *
193
229
  * @param data Data object being passed as the first argument to the nodes and links accessor functions. Additional arguments will also be passed
194
230
  * to the accessor functions.
195
231
  */
196
- (data: Data, ...args: any[]): SankeyGraph<N, L>;
232
+ (data: Data, ...args: any[]): SankeyGraph<WithPosition, N, L>;
197
233
  /**
198
234
  * Recomputes the specified graph's links' positions, updating the following properties of each link:
199
235
  *
@@ -204,48 +240,48 @@ export interface SankeyLayout<Data, N extends SankeyExtraProperties, L extends S
204
240
  *
205
241
  * @param graph A previously initialized Sankey graph for which the link positions should be re-calculated
206
242
  */
207
- update(graph: SankeyGraph<N, L>): SankeyGraph<N, L>;
243
+ update(graph: SankeyGraph<WithPosition, N, L>): SankeyGraph<WithPosition, N, L>;
208
244
  /**
209
245
  * Return the current nodes accessor function, which defaults to a function returning the "nodes" property of the
210
246
  * first argument it is invoked with.
211
247
  */
212
- nodes(): (data: Data, ...args: any[]) => Array<SankeyNode<N, L>>;
248
+ nodes(): (data: Data, ...args: any[]) => Array<SankeyNode<WithPosition, N, L>>;
213
249
  /**
214
250
  * Set the Sankey generator's nodes accessor to a function returning the specified array of objects and returns this Sankey layout generator.
215
251
  *
216
252
  * @param nodes Array of nodes.
217
253
  */
218
- nodes(nodes: Array<SankeyNode<N, L>>): this;
254
+ nodes(nodes: Array<SankeyNode<WithPosition, N, L>>): this;
219
255
  /**
220
256
  * Set the Sankey generator's nodes accessor to the specified function and returns this Sankey layout generator.
221
257
  *
222
258
  * @param nodes A nodes accessor function. The function is invoked when the Sankey layout is generated, being passed any arguments passed to the Sankey generator.
223
259
  * This function must return an array of nodes.
224
260
  */
225
- nodes(nodes: (data: Data, ...args: any[]) => Array<SankeyNode<N, L>>): this;
261
+ nodes(nodes: (data: Data, ...args: any[]) => Array<SankeyNode<WithPosition, N, L>>): this;
226
262
  /**
227
263
  * Return the current links accessor function, which defaults to a function returning the "links" property of the
228
264
  * first argument it is invoked with.
229
265
  */
230
- links(): (data: Data, ...args: any[]) => Array<SankeyLink<N, L>>;
266
+ links(): (data: Data, ...args: any[]) => Array<SankeyLink<WithPosition, N, L>>;
231
267
  /**
232
268
  * Set the Sankey generator's links accessor to a function returning the specified array of objects and returns this Sankey layout generator.
233
269
  *
234
270
  * @param links Array of links.
235
271
  */
236
- links(links: Array<SankeyLink<N, L>>): this;
272
+ links(links: Array<SankeyLink<WithPosition, N, L>>): this;
237
273
  /**
238
274
  * Set the Sankey generator's links accessor to the specified function and returns this Sankey layout generator.
239
275
  *
240
276
  * @param links A links accessor function. The function is invoked when the Sankey layout is generated, being passed any arguments passed to the Sankey generator.
241
277
  * This function must return an array of links.
242
278
  */
243
- links(links: (data: Data, ...args: any[]) => Array<SankeyLink<N, L>>): this;
279
+ links(links: (data: Data, ...args: any[]) => Array<SankeyLink<WithPosition, N, L>>): this;
244
280
  /**
245
281
  * Return the current node id accessor.
246
282
  * The default accessor is a function being passed in a Sankey layout node and returning its numeric node.index.
247
283
  */
248
- nodeId(): (node: SankeyNode<N, L>) => string | number;
284
+ nodeId(): (node: SankeyNode<WithPosition, N, L>) => string | number;
249
285
  /**
250
286
  * Set the node id accessor to the specified function and return this Sankey layout generator.
251
287
  *
@@ -254,11 +290,11 @@ export interface SankeyLayout<Data, N extends SankeyExtraProperties, L extends S
254
290
  *
255
291
  * @param nodeId A node id accessor function being passed a node in the Sankey graph and returning its id.
256
292
  */
257
- nodeId(nodeId: (node: SankeyNode<N, L>) => string | number): this;
293
+ nodeId(nodeId: (node: SankeyNode<WithPosition, N, L>) => string | number): this;
258
294
  /**
259
295
  * Return the current node alignment method, which defaults to d3.sankeyJustify.
260
296
  */
261
- nodeAlign(): (node: SankeyNode<N, L>, n: number) => number;
297
+ nodeAlign(): (node: SankeyNode<WithPosition, N, L>, n: number) => number;
262
298
  /**
263
299
  * Set the node alignment method the specified function and return this Sankey layout generator.
264
300
  *
@@ -266,7 +302,7 @@ export interface SankeyLayout<Data, N extends SankeyExtraProperties, L extends S
266
302
  * being passed the current node and the total depth n of the graph (one plus the maximum node.depth),
267
303
  * and must return an integer between 0 and n - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.
268
304
  */
269
- nodeAlign(nodeAlign: (node: SankeyNode<N, L>, n: number) => number): this;
305
+ nodeAlign(nodeAlign: (node: SankeyNode<WithPosition, N, L>, n: number) => number): this;
270
306
  /**
271
307
  * Return the current node width, which defaults to 24.
272
308
  */
@@ -324,21 +360,22 @@ export interface SankeyLayout<Data, N extends SankeyExtraProperties, L extends S
324
360
  /**
325
361
  * Returns the node comparison function which defaults to undefined.
326
362
  */
327
- nodeSort(): ((a: SankeyNode<N, L>, b: SankeyNode<N, L>) => number) | undefined | null;
363
+ nodeSort(): ((a: SankeyNode<WithPosition, N, L>, b: SankeyNode<WithPosition, N, L>) => number) | undefined | null;
328
364
  /**
329
365
  * Set the node comparison function and return this Sankey layout generator.
330
366
  *
331
367
  * @param compare Node comparison function. If `null`, the order is fixed by the input.
332
368
  */
333
- nodeSort(compare: ((a: SankeyNode<N, L>, b: SankeyNode<N, L>) => number) | undefined | null): this;
369
+ nodeSort(compare: ((a: SankeyNode<WithPosition, N, L>, b: SankeyNode<WithPosition, N, L>) => number) | undefined | null): this;
334
370
  /**
335
371
  * Returns the link comparison function which defaults to undefined.
336
372
  */
337
- linkSort(): ((a: SankeyLink<N, L>, b: SankeyLink<N, L>) => number) | undefined | null;
373
+ linkSort(): ((a: SankeyLink<WithPosition, N, L>, b: SankeyLink<WithPosition, N, L>) => number) | undefined | null;
338
374
  /**
339
375
  * Set the link comparison function and return this Sankey layout generator.
340
376
  *
341
377
  * @param compare Link comparison function. If `null`, the order is fixed by the input.
342
378
  */
343
- linkSort(compare: ((a: SankeyLink<N, L>, b: SankeyLink<N, L>) => number) | undefined | null): this;
344
- }
379
+ linkSort(compare: ((a: SankeyLink<WithPosition, N, L>, b: SankeyLink<WithPosition, N, L>) => number) | undefined | null): this;
380
+ }
381
+ export {};
@@ -5,7 +5,7 @@ import type { SankeyExtraProperties, SankeyLink } from "./sankey.types.js";
5
5
  * Source and target accessors are pre-configured and work with the
6
6
  * default x- and y- accessors of the link shape generator.
7
7
  */
8
- export declare function sankeyLinkHorizontal(): Link<any, SankeyLink<{}, {}>, [number, number]>;
8
+ export declare function sankeyLinkHorizontal(): Link<any, SankeyLink<true, {}, {}>, [number, number]>;
9
9
  /**
10
10
  * Get a horizontal link shape suitable for a Sankey diagram.
11
11
  * Source and target accessors are pre-configured and work with the
@@ -19,4 +19,4 @@ export declare function sankeyLinkHorizontal(): Link<any, SankeyLink<{}, {}>, [n
19
19
  * Sankey layout generator. These properties are IN EXCESS to the properties explicitly identified in the
20
20
  * SankeyLinkMinimal interface.
21
21
  */
22
- export declare function sankeyLinkHorizontal<N extends SankeyExtraProperties, L extends SankeyExtraProperties>(): Link<any, SankeyLink<N, L>, [number, number]>;
22
+ export declare function sankeyLinkHorizontal<N extends SankeyExtraProperties, L extends SankeyExtraProperties>(): Link<any, SankeyLink<true, N, L>, [number, number]>;
@@ -1,4 +1,4 @@
1
- import { ChartPlugin } from '@mui/x-charts/internals';
1
+ import { type ChartPlugin } from '@mui/x-charts/internals';
2
2
  import type { UseSankeyHighlightSignature } from "./useSankeyHighlight.types.js";
3
3
  /**
4
4
  * Custom highlight plugin for Sankey charts that uses SankeyItemIdentifier
@@ -39,7 +39,7 @@ const useSankeyHighlight = ({
39
39
  }));
40
40
  });
41
41
  const setHighlight = (0, _useEventCallback.default)(newItem => {
42
- const prevItem = store.getSnapshot().highlight.item;
42
+ const prevItem = store.state.highlight.item;
43
43
  if ((0, _fastObjectShallowCompare.fastObjectShallowCompare)(prevItem, newItem)) {
44
44
  return;
45
45
  }
@@ -1,4 +1,4 @@
1
- import type { SankeyLayoutLink, SankeyNodeId } from "../sankey.types.js";
1
+ import type { SankeyNodeId } from "../sankey.types.js";
2
2
  import type { SankeyLinkFade, SankeyLinkHighlight, SankeyNodeFade, SankeyNodeHighlight } from "../sankey.highlight.types.js";
3
3
  /**
4
4
  * Get the node highlight configuration from the Sankey series.
@@ -51,7 +51,7 @@ export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/i
51
51
  */
52
52
  export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
53
53
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
54
- }, link: SankeyLayoutLink) => boolean;
54
+ }, link: import("../index.js").SankeyLayoutLinkWithPosition) => boolean;
55
55
  /**
56
56
  * Selector that determines if an item should be faded.
57
57
  * An item is faded if:
@@ -1,6 +1,6 @@
1
- import { DefaultizedProps } from '@mui/x-internals/types';
2
- import { ChartPluginSignature } from '@mui/x-charts/internals';
3
- import { SankeyItemIdentifier } from "../sankey.types.js";
1
+ import { type DefaultizedProps } from '@mui/x-internals/types';
2
+ import { type ChartPluginSignature } from '@mui/x-charts/internals';
3
+ import { type SankeyItemIdentifier } from "../sankey.types.js";
4
4
  /**
5
5
  * The data of the highlighted item in a Sankey chart.
6
6
  * Can be either a node or a link.
@@ -86,7 +86,7 @@ export type SankeyNodeOptions = {
86
86
  *
87
87
  * @default 'auto'
88
88
  */
89
- sort?: 'auto' | 'fixed' | ((a: SankeyLayoutNode, b: SankeyLayoutNode) => number);
89
+ sort?: 'auto' | 'fixed' | ((a: SankeyLayoutNode<true>, b: SankeyLayoutNode<true>) => number);
90
90
  } & SankeyNodeHighlightScope;
91
91
  export type SankeyLinkOptions = {
92
92
  /**
@@ -117,7 +117,7 @@ export type SankeyLinkOptions = {
117
117
  * @returns {number} Comparison result
118
118
  * @default 'auto'
119
119
  */
120
- sort?: 'auto' | 'fixed' | ((a: SankeyLayoutLink, b: SankeyLayoutLink) => number);
120
+ sort?: 'auto' | 'fixed' | ((a: SankeyLayoutLink<true>, b: SankeyLayoutLink<true>) => number);
121
121
  /**
122
122
  * Applies the given number to the X dimension of the control points of the link's curve function.
123
123
  * This can create better looking links between nodes, but is dependent on the graph layout.
@@ -180,34 +180,42 @@ export interface SankeySeriesType {
180
180
  */
181
181
  valueFormatter?: (value: number, context: SankeyValueFormatterContext) => string | null;
182
182
  }
183
+ export interface SankeyLayoutNodeWithoutPosition extends D3SankeyNode<false, MakeRequired<SankeyNode, 'label' | 'color'>, SankeyLayoutLinkWithoutPosition> {
184
+ targetLinks: SankeyLayoutLinkWithoutPosition[];
185
+ sourceLinks: SankeyLayoutLinkWithoutPosition[];
186
+ value: number;
187
+ }
188
+ export interface SankeyLayoutLinkWithoutPosition extends D3SankeyLink<false, SankeyLayoutNodeWithoutPosition, Omit<MakeRequired<SankeyLink, 'color'>, 'source' | 'target'>> {
189
+ source: SankeyLayoutNodeWithoutPosition;
190
+ target: SankeyLayoutNodeWithoutPosition;
191
+ }
192
+ export interface SankeyLayoutNodeWithPosition extends D3SankeyNode<true, MakeRequired<SankeyNode, 'label' | 'color'>, SankeyLayoutLinkWithPosition> {
193
+ targetLinks: SankeyLayoutLinkWithPosition[];
194
+ sourceLinks: SankeyLayoutLinkWithPosition[];
195
+ value: number;
196
+ }
197
+ export interface SankeyLayoutLinkWithPosition extends D3SankeyLink<true, SankeyLayoutNodeWithPosition, Omit<MakeRequired<SankeyLink, 'color'>, 'source' | 'target'>> {
198
+ path?: string | null;
199
+ source: SankeyLayoutNodeWithPosition;
200
+ target: SankeyLayoutNodeWithPosition;
201
+ }
183
202
  /**
184
203
  * Represents the calculated positions and dimensions for a node in the Sankey diagram
185
204
  */
186
- export interface SankeyLayoutNode extends D3SankeyNode<MakeRequired<SankeyNode, 'label' | 'color'>, SankeyLayoutLink> {
187
- targetLinks: SankeyLayoutLink[];
188
- sourceLinks: SankeyLayoutLink[];
189
- value: number;
190
- }
205
+ export type SankeyLayoutNode<WithPosition extends boolean = true> = WithPosition extends true ? SankeyLayoutNodeWithPosition : SankeyLayoutNodeWithoutPosition;
191
206
  /**
192
207
  * Represents the calculated positions and paths for a link in the Sankey diagram
193
208
  */
194
- export interface SankeyLayoutLink extends D3SankeyLink<SankeyLayoutNode, Omit<MakeRequired<SankeyLink, 'color'>, 'source' | 'target'>> {
195
- path?: string | null;
196
- source: SankeyLayoutNode;
197
- target: SankeyLayoutNode;
198
- }
209
+ export type SankeyLayoutLink<WithPosition extends boolean = true> = WithPosition extends true ? SankeyLayoutLinkWithPosition : SankeyLayoutLinkWithoutPosition;
199
210
  /**
200
211
  * Calculated layout for the Sankey diagram
201
212
  */
202
- export interface SankeyLayout {
203
- nodes: readonly SankeyLayoutNode[];
204
- links: readonly SankeyLayoutLink[];
213
+ export interface SankeyLayout<WithPosition extends boolean = true> {
214
+ nodes: readonly SankeyLayoutNode<WithPosition>[];
215
+ links: readonly SankeyLayoutLink<WithPosition>[];
205
216
  }
206
217
  export interface DefaultizedSankeySeriesType extends DefaultizedProps<Omit<SankeySeriesType, 'data'>, 'id' | 'valueFormatter'> {
207
- data: {
208
- nodes: Map<SankeyNodeId, SankeyNode>;
209
- links: readonly SankeyLink[];
210
- };
218
+ data: SankeyLayout<false>;
211
219
  highlightScope?: HighlightScope;
212
220
  }
213
221
  type SankeyNodeIdentifierBase = {
@@ -227,11 +235,11 @@ export type SankeyNodeIdentifier = SankeyNodeIdentifierBase & {
227
235
  */
228
236
  nodeId: SankeyNodeId;
229
237
  };
230
- export type SankeyNodeIdentifierWithData = SankeyNodeIdentifier & {
238
+ export type SankeyNodeIdentifierWithData<WithPosition extends boolean = true> = SankeyNodeIdentifier & {
231
239
  /**
232
240
  * The node object with all the calculated properties
233
241
  */
234
- node: SankeyLayoutNode;
242
+ node: SankeyLayoutNode<WithPosition>;
235
243
  };
236
244
  export type SankeyLinkIdentifier = SankeyNodeIdentifierBase & {
237
245
  /**
@@ -247,14 +255,14 @@ export type SankeyLinkIdentifier = SankeyNodeIdentifierBase & {
247
255
  */
248
256
  targetId: SankeyNodeId;
249
257
  };
250
- export type SankeyLinkIdentifierWithData = SankeyLinkIdentifier & {
258
+ export type SankeyLinkIdentifierWithData<WithPosition extends boolean = true> = SankeyLinkIdentifier & {
251
259
  /**
252
260
  * The link object with all the calculated properties
253
261
  */
254
- link: SankeyLayoutLink;
262
+ link: SankeyLayoutLink<WithPosition>;
255
263
  };
256
264
  export type SankeyItemIdentifier = SankeyNodeIdentifier | SankeyLinkIdentifier;
257
- export type SankeyItemIdentifierWithData = SankeyNodeIdentifierWithData | SankeyLinkIdentifierWithData;
265
+ export type SankeyItemIdentifierWithData<WithPosition extends boolean = true> = SankeyNodeIdentifierWithData<WithPosition> | SankeyLinkIdentifierWithData<WithPosition>;
258
266
  export type SankeyValueFormatterContext = {
259
267
  /**
260
268
  * Where the value will be displayed
@@ -3,6 +3,8 @@ export interface SankeyPlotClasses {
3
3
  root: string;
4
4
  /** Styles applied to the nodes container. */
5
5
  nodes: string;
6
+ /** Styles applied to the node label container. */
7
+ nodeLabels: string;
6
8
  /** Styles applied to the links container. */
7
9
  links: string;
8
10
  /** Styles applied to the link label container. */
@@ -12,4 +14,4 @@ export declare function getSankeyPlotUtilityClass(slot: string): string;
12
14
  export declare const sankeyPlotClasses: SankeyPlotClasses;
13
15
  export declare const useUtilityClasses: (ownerState: {
14
16
  classes?: Partial<SankeyPlotClasses>;
15
- }) => Record<"nodes" | "links" | "root" | "linkLabels", string>;
17
+ }) => Record<"nodes" | "links" | "root" | "nodeLabels" | "linkLabels", string>;
@@ -12,7 +12,7 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
12
12
  function getSankeyPlotUtilityClass(slot) {
13
13
  return (0, _generateUtilityClass.default)('MuiSankeyChart', slot);
14
14
  }
15
- const sankeyPlotClasses = exports.sankeyPlotClasses = (0, _generateUtilityClasses.default)('MuiSankeyChart', ['root', 'nodes', 'links', 'linkLabels']);
15
+ const sankeyPlotClasses = exports.sankeyPlotClasses = (0, _generateUtilityClasses.default)('MuiSankeyChart', ['root', 'nodes', 'nodeLabels', 'links', 'linkLabels']);
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
18
18
  classes
@@ -20,6 +20,7 @@ const useUtilityClasses = ownerState => {
20
20
  const slots = {
21
21
  root: ['root'],
22
22
  nodes: ['nodes'],
23
+ nodeLabels: ['nodeLabels'],
23
24
  links: ['links'],
24
25
  linkLabels: ['linkLabels']
25
26
  };
@@ -1,7 +1,7 @@
1
- import { ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
2
- import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
3
- import { ChartsSlotProps, ChartsSlots } from '@mui/x-charts/internals';
4
- import { ChartsToolbarSlotProps, ChartsToolbarSlots } from '@mui/x-charts/Toolbar';
1
+ import { type ChartsOverlaySlotProps, type ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
2
+ import { type ChartsTooltipProps, type ChartsTooltipSlotProps, type ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
3
+ import { type ChartsSlotProps, type ChartsSlots } from '@mui/x-charts/internals';
4
+ import { type ChartsToolbarSlotProps, type ChartsToolbarSlots } from '@mui/x-charts/Toolbar';
5
5
  export interface SankeyChartSlots extends ChartsTooltipSlots, ChartsOverlaySlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
6
6
  export interface SankeyChartSlotProps extends Omit<ChartsTooltipSlotProps, 'tooltip'>, ChartsOverlaySlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {
7
7
  /**