@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4

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 (275) hide show
  1. package/BarChartPro/BarChartPro.d.mts +2 -2
  2. package/BarChartPro/BarChartPro.d.ts +2 -2
  3. package/BarChartPro/BarChartPro.js +43 -10
  4. package/BarChartPro/BarChartPro.mjs +43 -10
  5. package/CHANGELOG.md +246 -1
  6. package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
  7. package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
  8. package/ChartsContainerPro/ChartsContainerPro.js +2 -2
  9. package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
  10. package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
  11. package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
  12. package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
  13. package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
  14. package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
  15. package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
  16. package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
  17. package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
  18. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
  19. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
  20. package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
  21. package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
  22. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
  23. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
  24. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
  25. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
  26. package/ChartsToolbarPro/index.d.mts +2 -1
  27. package/ChartsToolbarPro/index.d.ts +2 -1
  28. package/ChartsToolbarPro/index.mjs +2 -1
  29. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
  30. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
  31. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
  32. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
  33. package/FunnelChart/FunnelChart.d.mts +2 -2
  34. package/FunnelChart/FunnelChart.d.ts +2 -2
  35. package/FunnelChart/FunnelChart.js +23 -8
  36. package/FunnelChart/FunnelChart.mjs +23 -8
  37. package/FunnelChart/FunnelPlot.js +8 -3
  38. package/FunnelChart/FunnelPlot.mjs +8 -3
  39. package/FunnelChart/FunnelSection.d.mts +3 -3
  40. package/FunnelChart/FunnelSection.d.ts +3 -3
  41. package/FunnelChart/FunnelSection.js +8 -9
  42. package/FunnelChart/FunnelSection.mjs +8 -9
  43. package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
  44. package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
  45. package/FunnelChart/FunnelSectionLabel.js +15 -6
  46. package/FunnelChart/FunnelSectionLabel.mjs +15 -6
  47. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
  48. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
  49. package/FunnelChart/funnelClasses.d.mts +29 -0
  50. package/FunnelChart/funnelClasses.d.ts +29 -0
  51. package/FunnelChart/funnelClasses.js +29 -0
  52. package/FunnelChart/funnelClasses.mjs +19 -0
  53. package/FunnelChart/index.d.mts +2 -2
  54. package/FunnelChart/index.d.ts +2 -2
  55. package/FunnelChart/index.js +4 -4
  56. package/FunnelChart/index.mjs +1 -1
  57. package/FunnelChart/seriesConfig/legend.js +0 -2
  58. package/FunnelChart/seriesConfig/legend.mjs +0 -2
  59. package/FunnelChart/useFunnelChartProps.d.mts +2 -2
  60. package/FunnelChart/useFunnelChartProps.d.ts +2 -2
  61. package/FunnelChart/useFunnelChartProps.js +2 -2
  62. package/FunnelChart/useFunnelChartProps.mjs +2 -2
  63. package/Heatmap/Heatmap.d.mts +2 -11
  64. package/Heatmap/Heatmap.d.ts +2 -11
  65. package/Heatmap/Heatmap.js +25 -19
  66. package/Heatmap/Heatmap.mjs +25 -19
  67. package/Heatmap/HeatmapCell.d.mts +33 -0
  68. package/Heatmap/HeatmapCell.d.ts +33 -0
  69. package/Heatmap/HeatmapCell.js +62 -0
  70. package/Heatmap/HeatmapCell.mjs +55 -0
  71. package/Heatmap/HeatmapItem.d.mts +1 -9
  72. package/Heatmap/HeatmapItem.d.ts +1 -9
  73. package/Heatmap/HeatmapItem.js +5 -23
  74. package/Heatmap/HeatmapItem.mjs +5 -23
  75. package/Heatmap/HeatmapSVGPlot.js +14 -7
  76. package/Heatmap/HeatmapSVGPlot.mjs +15 -8
  77. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
  78. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
  79. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
  80. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
  81. package/Heatmap/heatmapClasses.d.mts +6 -1
  82. package/Heatmap/heatmapClasses.d.ts +6 -1
  83. package/Heatmap/heatmapClasses.js +18 -3
  84. package/Heatmap/heatmapClasses.mjs +16 -2
  85. package/Heatmap/index.d.mts +4 -2
  86. package/Heatmap/index.d.ts +4 -2
  87. package/Heatmap/index.js +17 -13
  88. package/Heatmap/index.mjs +2 -1
  89. package/Heatmap/seriesConfig/getColor.js +5 -3
  90. package/Heatmap/seriesConfig/getColor.mjs +5 -3
  91. package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
  92. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  93. package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
  94. package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
  95. package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
  96. package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
  97. package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
  98. package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
  99. package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
  100. package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
  101. package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
  102. package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
  103. package/Heatmap/seriesConfig/index.js +4 -2
  104. package/Heatmap/seriesConfig/index.mjs +5 -3
  105. package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
  106. package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
  107. package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
  108. package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
  109. package/Heatmap/seriesConfig/tooltip.js +7 -6
  110. package/Heatmap/seriesConfig/tooltip.mjs +7 -6
  111. package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
  112. package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
  113. package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
  114. package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
  115. package/Heatmap/useHeatmapProps.d.mts +2 -2
  116. package/Heatmap/useHeatmapProps.d.ts +2 -2
  117. package/Heatmap/useHeatmapProps.js +4 -6
  118. package/Heatmap/useHeatmapProps.mjs +4 -6
  119. package/LineChartPro/LineChartPro.d.mts +2 -2
  120. package/LineChartPro/LineChartPro.d.ts +2 -2
  121. package/LineChartPro/LineChartPro.js +40 -13
  122. package/LineChartPro/LineChartPro.mjs +40 -13
  123. package/PieChartPro/PieChartPro.d.mts +2 -2
  124. package/PieChartPro/PieChartPro.d.ts +2 -2
  125. package/PieChartPro/PieChartPro.js +22 -7
  126. package/PieChartPro/PieChartPro.mjs +22 -7
  127. package/RadarChartPro/RadarChartPro.d.mts +1 -1
  128. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  129. package/RadarChartPro/RadarChartPro.js +20 -2
  130. package/RadarChartPro/RadarChartPro.mjs +20 -2
  131. package/SankeyChart/SankeyChart.d.mts +2 -2
  132. package/SankeyChart/SankeyChart.d.ts +2 -2
  133. package/SankeyChart/SankeyChart.js +21 -12
  134. package/SankeyChart/SankeyChart.mjs +21 -12
  135. package/SankeyChart/SankeyDataProvider.d.mts +2 -2
  136. package/SankeyChart/SankeyDataProvider.d.ts +2 -2
  137. package/SankeyChart/SankeyDataProvider.js +2 -2
  138. package/SankeyChart/SankeyDataProvider.mjs +2 -2
  139. package/SankeyChart/SankeyLinkElement.js +7 -3
  140. package/SankeyChart/SankeyLinkElement.mjs +8 -4
  141. package/SankeyChart/SankeyLinkLabel.js +3 -0
  142. package/SankeyChart/SankeyLinkLabel.mjs +3 -0
  143. package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
  144. package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
  145. package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
  146. package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
  147. package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
  148. package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
  149. package/SankeyChart/SankeyLinkPlot.js +1 -1
  150. package/SankeyChart/SankeyLinkPlot.mjs +1 -1
  151. package/SankeyChart/SankeyNodeElement.d.mts +1 -1
  152. package/SankeyChart/SankeyNodeElement.d.ts +1 -1
  153. package/SankeyChart/SankeyNodeElement.js +20 -18
  154. package/SankeyChart/SankeyNodeElement.mjs +21 -19
  155. package/SankeyChart/SankeyNodeLabel.js +3 -0
  156. package/SankeyChart/SankeyNodeLabel.mjs +3 -0
  157. package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
  158. package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
  159. package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
  160. package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
  161. package/SankeyChart/SankeyNodePlot.d.mts +2 -2
  162. package/SankeyChart/SankeyNodePlot.d.ts +2 -2
  163. package/SankeyChart/SankeyNodePlot.js +1 -1
  164. package/SankeyChart/SankeyNodePlot.mjs +1 -1
  165. package/SankeyChart/SankeyPlot.d.mts +2 -2
  166. package/SankeyChart/SankeyPlot.d.ts +2 -2
  167. package/SankeyChart/SankeyPlot.js +3 -3
  168. package/SankeyChart/SankeyPlot.mjs +3 -3
  169. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
  170. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
  171. package/SankeyChart/index.d.mts +2 -1
  172. package/SankeyChart/index.d.ts +2 -1
  173. package/SankeyChart/index.js +3 -3
  174. package/SankeyChart/index.mjs +1 -1
  175. package/SankeyChart/sankeyClasses.d.mts +15 -6
  176. package/SankeyChart/sankeyClasses.d.ts +15 -6
  177. package/SankeyChart/sankeyClasses.js +12 -8
  178. package/SankeyChart/sankeyClasses.mjs +10 -6
  179. package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
  180. package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
  181. package/SankeyChart/sankeyHighlightHooks.js +2 -10
  182. package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
  183. package/SankeyChart/useSankeyChartProps.d.mts +2 -2
  184. package/SankeyChart/useSankeyChartProps.d.ts +2 -2
  185. package/SankeyChart/useSankeyChartProps.js +2 -2
  186. package/SankeyChart/useSankeyChartProps.mjs +2 -2
  187. package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
  188. package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
  189. package/ScatterChartPro/ScatterChartPro.js +62 -17
  190. package/ScatterChartPro/ScatterChartPro.mjs +62 -17
  191. package/context/useChartProApiContext.d.mts +1 -1
  192. package/context/useChartProApiContext.d.ts +1 -1
  193. package/context/useChartProApiContext.js +1 -1
  194. package/context/useChartProApiContext.mjs +1 -1
  195. package/index.d.mts +0 -4
  196. package/index.d.ts +0 -4
  197. package/index.js +2 -34
  198. package/index.mjs +1 -4
  199. package/internals/ChartsWatermark.d.mts +2 -2
  200. package/internals/ChartsWatermark.d.ts +2 -2
  201. package/internals/ChartsWatermark.js +5 -8
  202. package/internals/ChartsWatermark.mjs +3 -6
  203. package/internals/index.d.mts +0 -1
  204. package/internals/index.d.ts +0 -1
  205. package/internals/index.js +0 -8
  206. package/internals/index.mjs +0 -1
  207. package/internals/plugins/allPlugins.d.mts +4 -4
  208. package/internals/plugins/allPlugins.d.ts +4 -4
  209. package/internals/plugins/useChartProExport/common.js +4 -8
  210. package/internals/plugins/useChartProExport/common.mjs +4 -8
  211. package/internals/plugins/useChartProExport/exportImage.js +1 -1
  212. package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
  213. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
  214. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
  215. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
  216. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
  217. package/models/seriesType/heatmap.d.mts +36 -9
  218. package/models/seriesType/heatmap.d.ts +36 -9
  219. package/models/seriesType/heatmap.js +28 -1
  220. package/models/seriesType/heatmap.mjs +25 -1
  221. package/package.json +5 -61
  222. package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
  223. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
  224. package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
  225. package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
  226. package/themeAugmentation/components.d.mts +19 -1
  227. package/themeAugmentation/components.d.ts +19 -1
  228. package/themeAugmentation/overrides.d.mts +5 -2
  229. package/themeAugmentation/overrides.d.ts +5 -2
  230. package/themeAugmentation/props.d.mts +8 -0
  231. package/themeAugmentation/props.d.ts +8 -0
  232. package/typeOverloads/modules.d.mts +2 -2
  233. package/typeOverloads/modules.d.ts +2 -2
  234. package/ChartContainer/index.d.mts +0 -1
  235. package/ChartContainer/index.d.ts +0 -1
  236. package/ChartContainer/index.js +0 -16
  237. package/ChartContainer/index.mjs +0 -2
  238. package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
  239. package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
  240. package/ChartContainerPro/ChartContainerPro.js +0 -24
  241. package/ChartContainerPro/ChartContainerPro.mjs +0 -20
  242. package/ChartContainerPro/index.d.mts +0 -9
  243. package/ChartContainerPro/index.d.ts +0 -9
  244. package/ChartContainerPro/index.js +0 -17
  245. package/ChartContainerPro/index.mjs +0 -6
  246. package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
  247. package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
  248. package/ChartContainerPro/useChartContainerProProps.js +0 -19
  249. package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
  250. package/ChartDataProvider/index.d.mts +0 -1
  251. package/ChartDataProvider/index.d.ts +0 -1
  252. package/ChartDataProvider/index.js +0 -16
  253. package/ChartDataProvider/index.mjs +0 -2
  254. package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
  255. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
  256. package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
  257. package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
  258. package/ChartDataProviderPro/index.d.mts +0 -2
  259. package/ChartDataProviderPro/index.d.ts +0 -2
  260. package/ChartDataProviderPro/index.js +0 -13
  261. package/ChartDataProviderPro/index.mjs +0 -2
  262. package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
  263. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
  264. package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
  265. package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
  266. package/FunnelChart/funnelSectionClasses.d.mts +0 -30
  267. package/FunnelChart/funnelSectionClasses.d.ts +0 -30
  268. package/FunnelChart/funnelSectionClasses.js +0 -44
  269. package/FunnelChart/funnelSectionClasses.mjs +0 -35
  270. package/Heatmap/internals/HeatmapCell.d.mts +0 -21
  271. package/Heatmap/internals/HeatmapCell.d.ts +0 -21
  272. package/Heatmap/internals/HeatmapCell.js +0 -18
  273. package/Heatmap/internals/HeatmapCell.mjs +0 -12
  274. package/tests/constants.js +0 -7
  275. package/tests/constants.mjs +0 -1
@@ -1,5 +1,5 @@
1
1
  import composeClasses from '@mui/utils/composeClasses';
2
- import { getChartsTooltipUtilityClass } from '@mui/x-charts/ChartsTooltip';
2
+ import { getChartsTooltipUtilityClass } from '@mui/x-charts/internals';
3
3
  export const useUtilityClasses = props => {
4
4
  const {
5
5
  classes
@@ -21,21 +21,23 @@ function HeatmapTooltipContent(props) {
21
21
  const yAxis = (0, _hooks.useYAxis)();
22
22
  const heatmapSeries = (0, _useHeatmapSeries.useHeatmapSeriesContext)();
23
23
  const tooltipData = (0, _ChartsTooltip.useItemTooltip)();
24
- const dataIndex = tooltipData?.identifier.dataIndex;
25
- if (!tooltipData || dataIndex === undefined || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
24
+ if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
26
25
  return null;
27
26
  }
28
- const {
29
- series,
30
- seriesOrder
31
- } = heatmapSeries;
32
- const seriesId = seriesOrder[0];
33
27
  const {
34
28
  color,
35
- value,
36
- markType
29
+ markType,
30
+ identifier
37
31
  } = tooltipData;
38
- const [xIndex, yIndex] = value;
32
+ const thisSeries = heatmapSeries.series[heatmapSeries.seriesOrder[0]];
33
+ const value = thisSeries.heatmapData.getValue(identifier.xIndex, identifier.yIndex) ?? null;
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ const {
38
+ xIndex,
39
+ yIndex
40
+ } = identifier;
39
41
  const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
40
42
  location: 'tooltip',
41
43
  scale: xAxis.scale
@@ -44,10 +46,11 @@ function HeatmapTooltipContent(props) {
44
46
  location: 'tooltip',
45
47
  scale: yAxis.scale
46
48
  }) ?? yAxis.data[yIndex].toLocaleString();
47
- const formattedValue = series[seriesId].valueFormatter(value, {
48
- dataIndex
49
+ const formattedValue = thisSeries.valueFormatter(value, {
50
+ xIndex,
51
+ yIndex
49
52
  });
50
- const seriesLabel = (0, _internals.getLabel)(series[seriesId].label, 'tooltip');
53
+ const seriesLabel = (0, _internals.getLabel)(thisSeries.label, 'tooltip');
51
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipPaper, {
52
55
  className: classes.paper,
53
56
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipTable, {
@@ -15,21 +15,23 @@ export function HeatmapTooltipContent(props) {
15
15
  const yAxis = useYAxis();
16
16
  const heatmapSeries = useHeatmapSeriesContext();
17
17
  const tooltipData = useItemTooltip();
18
- const dataIndex = tooltipData?.identifier.dataIndex;
19
- if (!tooltipData || dataIndex === undefined || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
18
+ if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
20
19
  return null;
21
20
  }
22
- const {
23
- series,
24
- seriesOrder
25
- } = heatmapSeries;
26
- const seriesId = seriesOrder[0];
27
21
  const {
28
22
  color,
29
- value,
30
- markType
23
+ markType,
24
+ identifier
31
25
  } = tooltipData;
32
- const [xIndex, yIndex] = value;
26
+ const thisSeries = heatmapSeries.series[heatmapSeries.seriesOrder[0]];
27
+ const value = thisSeries.heatmapData.getValue(identifier.xIndex, identifier.yIndex) ?? null;
28
+ if (value === null) {
29
+ return null;
30
+ }
31
+ const {
32
+ xIndex,
33
+ yIndex
34
+ } = identifier;
33
35
  const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
34
36
  location: 'tooltip',
35
37
  scale: xAxis.scale
@@ -38,10 +40,11 @@ export function HeatmapTooltipContent(props) {
38
40
  location: 'tooltip',
39
41
  scale: yAxis.scale
40
42
  }) ?? yAxis.data[yIndex].toLocaleString();
41
- const formattedValue = series[seriesId].valueFormatter(value, {
42
- dataIndex
43
+ const formattedValue = thisSeries.valueFormatter(value, {
44
+ xIndex,
45
+ yIndex
43
46
  });
44
- const seriesLabel = getLabel(series[seriesId].label, 'tooltip');
47
+ const seriesLabel = getLabel(thisSeries.label, 'tooltip');
45
48
  return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
46
49
  className: classes.paper,
47
50
  children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
@@ -1,4 +1,7 @@
1
+ import type { HeatmapCellOwnerState } from "./HeatmapCell.mjs";
1
2
  export interface HeatmapClasses {
3
+ /** Styles applied to the heatmap plot root element. */
4
+ root: string;
2
5
  /** Styles applied to the heatmap cells. */
3
6
  cell: string;
4
7
  /**
@@ -14,9 +17,11 @@ export interface HeatmapClasses {
14
17
  /**
15
18
  * Styles applied to the root element for a specified series.
16
19
  * Needs to be suffixed with the series ID: `.${heatmapClasses.series}-${seriesId}`.
20
+ * @deprecated Use `[data-series="${seriesId}"]` selector instead.
17
21
  */
18
22
  series: string;
19
23
  }
20
24
  export type HeatmapClassKey = keyof HeatmapClasses;
21
25
  export declare function getHeatmapUtilityClass(slot: string): string;
22
- export declare const heatmapClasses: HeatmapClasses;
26
+ export declare const heatmapClasses: HeatmapClasses;
27
+ export declare const useUtilityClasses: (ownerState: HeatmapCellOwnerState) => Record<"cell" | "root", string>;
@@ -1,4 +1,7 @@
1
+ import type { HeatmapCellOwnerState } from "./HeatmapCell.js";
1
2
  export interface HeatmapClasses {
3
+ /** Styles applied to the heatmap plot root element. */
4
+ root: string;
2
5
  /** Styles applied to the heatmap cells. */
3
6
  cell: string;
4
7
  /**
@@ -14,9 +17,11 @@ export interface HeatmapClasses {
14
17
  /**
15
18
  * Styles applied to the root element for a specified series.
16
19
  * Needs to be suffixed with the series ID: `.${heatmapClasses.series}-${seriesId}`.
20
+ * @deprecated Use `[data-series="${seriesId}"]` selector instead.
17
21
  */
18
22
  series: string;
19
23
  }
20
24
  export type HeatmapClassKey = keyof HeatmapClasses;
21
25
  export declare function getHeatmapUtilityClass(slot: string): string;
22
- export declare const heatmapClasses: HeatmapClasses;
26
+ export declare const heatmapClasses: HeatmapClasses;
27
+ export declare const useUtilityClasses: (ownerState: HeatmapCellOwnerState) => Record<"cell" | "root", string>;
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.getHeatmapUtilityClass = getHeatmapUtilityClass;
8
- exports.heatmapClasses = void 0;
8
+ exports.useUtilityClasses = exports.heatmapClasses = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
11
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
11
12
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
12
13
  function getHeatmapUtilityClass(slot) {
13
14
  // Those should be common to all charts
@@ -16,7 +17,21 @@ function getHeatmapUtilityClass(slot) {
16
17
  }
17
18
  return (0, _generateUtilityClass.default)('MuiHeatmap', slot);
18
19
  }
19
- const heatmapClasses = exports.heatmapClasses = (0, _extends2.default)({}, (0, _generateUtilityClasses.default)('MuiHeatmap', ['cell', 'series']), {
20
+ const heatmapClasses = exports.heatmapClasses = (0, _extends2.default)({}, (0, _generateUtilityClasses.default)('MuiHeatmap', ['root', 'cell', 'series']), {
20
21
  highlighted: 'Charts-highlighted',
21
22
  faded: 'Charts-faded'
22
- });
23
+ });
24
+ const useUtilityClasses = ownerState => {
25
+ const {
26
+ classes,
27
+ seriesId,
28
+ isFaded,
29
+ isHighlighted
30
+ } = ownerState;
31
+ const slots = {
32
+ root: ['root'],
33
+ cell: ['cell', `series-${seriesId}`, isFaded && 'faded', isHighlighted && 'highlighted']
34
+ };
35
+ return (0, _composeClasses.default)(slots, getHeatmapUtilityClass, classes);
36
+ };
37
+ exports.useUtilityClasses = useUtilityClasses;
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
+ import composeClasses from '@mui/utils/composeClasses';
3
4
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
4
5
  export function getHeatmapUtilityClass(slot) {
5
6
  // Those should be common to all charts
@@ -8,7 +9,20 @@ export function getHeatmapUtilityClass(slot) {
8
9
  }
9
10
  return generateUtilityClass('MuiHeatmap', slot);
10
11
  }
11
- export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell', 'series']), {
12
+ export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['root', 'cell', 'series']), {
12
13
  highlighted: 'Charts-highlighted',
13
14
  faded: 'Charts-faded'
14
- });
15
+ });
16
+ export const useUtilityClasses = ownerState => {
17
+ const {
18
+ classes,
19
+ seriesId,
20
+ isFaded,
21
+ isHighlighted
22
+ } = ownerState;
23
+ const slots = {
24
+ root: ['root'],
25
+ cell: ['cell', `series-${seriesId}`, isFaded && 'faded', isHighlighted && 'highlighted']
26
+ };
27
+ return composeClasses(slots, getHeatmapUtilityClass, classes);
28
+ };
@@ -3,7 +3,9 @@ export type { HeatmapSeries, HeatmapProps, HeatmapSlots, HeatmapSlotProps } from
3
3
  export { HeatmapPlot, type HeatmapPlotProps } from "./HeatmapPlot.mjs";
4
4
  export type { HeatmapPlotSlots, HeatmapPlotSlotProps } from "./Heatmap.types.mjs";
5
5
  export * from "./FocusedHeatmapCell.mjs";
6
- export type { HeatmapCellProps } from "./internals/HeatmapCell.mjs";
6
+ export { HeatmapCell } from "./HeatmapCell.mjs";
7
+ export type { HeatmapCellProps, HeatmapCellOwnerState } from "./HeatmapCell.mjs";
7
8
  export * from "./HeatmapTooltip/index.mjs";
8
9
  export * from "./Heatmap.plugins.mjs";
9
- export * from "./heatmapClasses.mjs";
10
+ export { heatmapClasses } from "./heatmapClasses.mjs";
11
+ export type { HeatmapClasses, HeatmapClassKey } from "./heatmapClasses.mjs";
@@ -3,7 +3,9 @@ export type { HeatmapSeries, HeatmapProps, HeatmapSlots, HeatmapSlotProps } from
3
3
  export { HeatmapPlot, type HeatmapPlotProps } from "./HeatmapPlot.js";
4
4
  export type { HeatmapPlotSlots, HeatmapPlotSlotProps } from "./Heatmap.types.js";
5
5
  export * from "./FocusedHeatmapCell.js";
6
- export type { HeatmapCellProps } from "./internals/HeatmapCell.js";
6
+ export { HeatmapCell } from "./HeatmapCell.js";
7
+ export type { HeatmapCellProps, HeatmapCellOwnerState } from "./HeatmapCell.js";
7
8
  export * from "./HeatmapTooltip/index.js";
8
9
  export * from "./Heatmap.plugins.js";
9
- export * from "./heatmapClasses.js";
10
+ export { heatmapClasses } from "./heatmapClasses.js";
11
+ export type { HeatmapClasses, HeatmapClassKey } from "./heatmapClasses.js";
package/Heatmap/index.js CHANGED
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {
7
7
  Heatmap: true,
8
- HeatmapPlot: true
8
+ HeatmapPlot: true,
9
+ HeatmapCell: true,
10
+ heatmapClasses: true
9
11
  };
10
12
  Object.defineProperty(exports, "Heatmap", {
11
13
  enumerable: true,
@@ -13,12 +15,24 @@ Object.defineProperty(exports, "Heatmap", {
13
15
  return _Heatmap.Heatmap;
14
16
  }
15
17
  });
18
+ Object.defineProperty(exports, "HeatmapCell", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _HeatmapCell.HeatmapCell;
22
+ }
23
+ });
16
24
  Object.defineProperty(exports, "HeatmapPlot", {
17
25
  enumerable: true,
18
26
  get: function () {
19
27
  return _HeatmapPlot.HeatmapPlot;
20
28
  }
21
29
  });
30
+ Object.defineProperty(exports, "heatmapClasses", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _heatmapClasses.heatmapClasses;
34
+ }
35
+ });
22
36
  var _Heatmap = require("./Heatmap");
23
37
  var _HeatmapPlot = require("./HeatmapPlot");
24
38
  var _FocusedHeatmapCell = require("./FocusedHeatmapCell");
@@ -33,6 +47,7 @@ Object.keys(_FocusedHeatmapCell).forEach(function (key) {
33
47
  }
34
48
  });
35
49
  });
50
+ var _HeatmapCell = require("./HeatmapCell");
36
51
  var _HeatmapTooltip = require("./HeatmapTooltip");
37
52
  Object.keys(_HeatmapTooltip).forEach(function (key) {
38
53
  if (key === "default" || key === "__esModule") return;
@@ -57,15 +72,4 @@ Object.keys(_Heatmap2).forEach(function (key) {
57
72
  }
58
73
  });
59
74
  });
60
- var _heatmapClasses = require("./heatmapClasses");
61
- Object.keys(_heatmapClasses).forEach(function (key) {
62
- if (key === "default" || key === "__esModule") return;
63
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
64
- if (key in exports && exports[key] === _heatmapClasses[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _heatmapClasses[key];
69
- }
70
- });
71
- });
75
+ var _heatmapClasses = require("./heatmapClasses");
package/Heatmap/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  export { Heatmap } from "./Heatmap.mjs";
2
2
  export { HeatmapPlot } from "./HeatmapPlot.mjs";
3
3
  export * from "./FocusedHeatmapCell.mjs";
4
+ export { HeatmapCell } from "./HeatmapCell.mjs";
4
5
  export * from "./HeatmapTooltip/index.mjs";
5
6
  export * from "./Heatmap.plugins.mjs";
6
- export * from "./heatmapClasses.mjs";
7
+ export { heatmapClasses } from "./heatmapClasses.mjs";
@@ -7,9 +7,11 @@ exports.default = void 0;
7
7
  const getColor = (series, xAxis, yAxis, zAxis) => {
8
8
  const zColorScale = zAxis?.colorScale;
9
9
  if (zColorScale) {
10
- return dataIndex => {
11
- const value = series.data[dataIndex];
12
- const color = zColorScale(value[2]);
10
+ return value => {
11
+ if (value === null) {
12
+ return '';
13
+ }
14
+ const color = zColorScale(value);
13
15
  if (color === null) {
14
16
  return '';
15
17
  }
@@ -1,9 +1,11 @@
1
1
  const getColor = (series, xAxis, yAxis, zAxis) => {
2
2
  const zColorScale = zAxis?.colorScale;
3
3
  if (zColorScale) {
4
- return dataIndex => {
5
- const value = series.data[dataIndex];
6
- const color = zColorScale(value[2]);
4
+ return value => {
5
+ if (value === null) {
6
+ return '';
7
+ }
8
+ const color = zColorScale(value);
7
9
  if (color === null) {
8
10
  return '';
9
11
  }
@@ -1,6 +1,6 @@
1
1
  import type { ChartState, UseChartCartesianAxisSignature } from '@mui/x-charts/internals';
2
- import type { SeriesItemIdentifierWithType } from '@mui/x-charts/models';
2
+ import type { SeriesItemIdentifierWithData } from '@mui/x-charts/models';
3
3
  export default function getItemAtPosition(state: ChartState<[UseChartCartesianAxisSignature]>, point: {
4
4
  x: number;
5
5
  y: number;
6
- }): SeriesItemIdentifierWithType<'heatmap'> | undefined;
6
+ }): SeriesItemIdentifierWithData<'heatmap'> | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { ChartState, UseChartCartesianAxisSignature } from '@mui/x-charts/internals';
2
- import type { SeriesItemIdentifierWithType } from '@mui/x-charts/models';
2
+ import type { SeriesItemIdentifierWithData } from '@mui/x-charts/models';
3
3
  export default function getItemAtPosition(state: ChartState<[UseChartCartesianAxisSignature]>, point: {
4
4
  x: number;
5
5
  y: number;
6
- }): SeriesItemIdentifierWithType<'heatmap'> | undefined;
6
+ }): SeriesItemIdentifierWithData<'heatmap'> | undefined;
@@ -26,20 +26,12 @@ function getItemAtPosition(state, point) {
26
26
  if (xIndex === -1 || yIndex === -1) {
27
27
  return undefined;
28
28
  }
29
- const dataIndex = series ? series.series[series.seriesOrder[0]].data.findIndex(d => d[0] === xIndex && d[1] === yIndex) : -1;
30
- if (dataIndex === -1) {
31
- return {
32
- type: 'heatmap',
33
- seriesId,
34
- xIndex,
35
- yIndex
36
- };
37
- }
29
+ const value = series?.series[series.seriesOrder[0]].heatmapData.getValue(xIndex, yIndex) ?? null;
38
30
  return {
39
31
  type: 'heatmap',
40
32
  seriesId,
41
- dataIndex,
42
33
  xIndex,
43
- yIndex
34
+ yIndex,
35
+ value
44
36
  };
45
37
  }
@@ -20,20 +20,12 @@ export default function getItemAtPosition(state, point) {
20
20
  if (xIndex === -1 || yIndex === -1) {
21
21
  return undefined;
22
22
  }
23
- const dataIndex = series ? series.series[series.seriesOrder[0]].data.findIndex(d => d[0] === xIndex && d[1] === yIndex) : -1;
24
- if (dataIndex === -1) {
25
- return {
26
- type: 'heatmap',
27
- seriesId,
28
- xIndex,
29
- yIndex
30
- };
31
- }
23
+ const value = series?.series[series.seriesOrder[0]].heatmapData.getValue(xIndex, yIndex) ?? null;
32
24
  return {
33
25
  type: 'heatmap',
34
26
  seriesId,
35
- dataIndex,
36
27
  xIndex,
37
- yIndex
28
+ yIndex,
29
+ value
38
30
  };
39
31
  }
@@ -0,0 +1,3 @@
1
+ import type { IdentifierCleaner } from '@mui/x-charts/internals';
2
+ declare const identifierCleaner: IdentifierCleaner<'heatmap'>;
3
+ export default identifierCleaner;
@@ -0,0 +1,3 @@
1
+ import type { IdentifierCleaner } from '@mui/x-charts/internals';
2
+ declare const identifierCleaner: IdentifierCleaner<'heatmap'>;
3
+ export default identifierCleaner;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const identifierCleaner = identifier => {
8
+ return {
9
+ type: identifier.type,
10
+ seriesId: identifier.seriesId,
11
+ xIndex: identifier.xIndex,
12
+ yIndex: identifier.yIndex
13
+ };
14
+ };
15
+ var _default = exports.default = identifierCleaner;
@@ -0,0 +1,9 @@
1
+ const identifierCleaner = identifier => {
2
+ return {
3
+ type: identifier.type,
4
+ seriesId: identifier.seriesId,
5
+ xIndex: identifier.xIndex,
6
+ yIndex: identifier.yIndex
7
+ };
8
+ };
9
+ export default identifierCleaner;
@@ -0,0 +1,3 @@
1
+ import { type IdentifierSerializer } from '@mui/x-charts/internals';
2
+ declare const identifierSerializer: IdentifierSerializer<'heatmap'>;
3
+ export default identifierSerializer;
@@ -0,0 +1,3 @@
1
+ import { type IdentifierSerializer } from '@mui/x-charts/internals';
2
+ declare const identifierSerializer: IdentifierSerializer<'heatmap'>;
3
+ export default identifierSerializer;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const identifierSerializer = identifier => {
9
+ return `${(0, _internals.typeSerializer)(identifier.type)}${(0, _internals.seriesIdSerializer)(identifier.seriesId)}X(${identifier.xIndex})Y(${identifier.yIndex})`;
10
+ };
11
+ var _default = exports.default = identifierSerializer;
@@ -0,0 +1,5 @@
1
+ import { typeSerializer, seriesIdSerializer } from '@mui/x-charts/internals';
2
+ const identifierSerializer = identifier => {
3
+ return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}X(${identifier.xIndex})Y(${identifier.yIndex})`;
4
+ };
5
+ export default identifierSerializer;
@@ -15,6 +15,8 @@ var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
15
15
  var _getItemAtPosition = _interopRequireDefault(require("./getItemAtPosition"));
16
16
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
17
17
  var _highlight = require("./highlight");
18
+ var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
19
+ var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
18
20
  _internals.cartesianSeriesTypes.addType('heatmap');
19
21
  const heatmapSeriesConfig = exports.heatmapSeriesConfig = {
20
22
  seriesProcessor: _seriesProcessor.default,
@@ -25,8 +27,8 @@ const heatmapSeriesConfig = exports.heatmapSeriesConfig = {
25
27
  xExtremumGetter: _extremums.getBaseExtremum,
26
28
  yExtremumGetter: _extremums.getBaseExtremum,
27
29
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
28
- identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex,
29
- identifierCleaner: _internals.identifierCleanerSeriesIdDataIndex,
30
+ identifierSerializer: _identifierSerializer.default,
31
+ identifierCleaner: _identifierCleaner.default,
30
32
  getItemAtPosition: _getItemAtPosition.default,
31
33
  keyboardFocusHandler: _keyboardFocusHandler.default,
32
34
  isHighlightedCreator: _highlight.createIsHighlighted,
@@ -1,4 +1,4 @@
1
- import { cartesianSeriesTypes, identifierSerializerSeriesIdDataIndex, identifierCleanerSeriesIdDataIndex } from '@mui/x-charts/internals';
1
+ import { cartesianSeriesTypes } from '@mui/x-charts/internals';
2
2
  import { getBaseExtremum } from "./extremums.mjs";
3
3
  import seriesProcessor from "./seriesProcessor.mjs";
4
4
  import getColor from "./getColor.mjs";
@@ -8,6 +8,8 @@ import tooltipItemPositionGetter from "./tooltipPosition.mjs";
8
8
  import getItemAtPosition from "./getItemAtPosition.mjs";
9
9
  import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
10
10
  import { createIsFaded, createIsHighlighted } from "./highlight.mjs";
11
+ import identifierSerializer from "./identifierSerializer.mjs";
12
+ import identifierCleaner from "./identifierCleaner.mjs";
11
13
  cartesianSeriesTypes.addType('heatmap');
12
14
  export const heatmapSeriesConfig = {
13
15
  seriesProcessor,
@@ -18,8 +20,8 @@ export const heatmapSeriesConfig = {
18
20
  xExtremumGetter: getBaseExtremum,
19
21
  yExtremumGetter: getBaseExtremum,
20
22
  getSeriesWithDefaultValues,
21
- identifierSerializer: identifierSerializerSeriesIdDataIndex,
22
- identifierCleaner: identifierCleanerSeriesIdDataIndex,
23
+ identifierSerializer,
24
+ identifierCleaner,
23
25
  getItemAtPosition,
24
26
  keyboardFocusHandler,
25
27
  isHighlightedCreator: createIsHighlighted,
@@ -13,30 +13,17 @@ function getFirstCell(state) {
13
13
  if (!seriesId || !series || !data || data.length === 0) {
14
14
  return null;
15
15
  }
16
- const dataIndex = data.findIndex(value => value[0] === 0 && value[1] === 0);
17
- if (dataIndex === -1) {
18
- return {
19
- type: 'heatmap',
20
- seriesId,
21
- xIndex: 0,
22
- yIndex: 0
23
- };
24
- }
25
16
  return {
26
17
  type: 'heatmap',
27
18
  seriesId,
28
- dataIndex,
29
19
  xIndex: 0,
30
20
  yIndex: 0
31
21
  };
32
22
  }
33
- const updateCoordinates = (newXIndex, newYIndex, currentItem, state) => {
34
- const seriesData = state.series.defaultizedSeries.heatmap?.series[currentItem.seriesId]?.data;
35
- const dataIndex = seriesData?.findIndex(value => value[0] === newXIndex && value[1] === newYIndex);
23
+ const updateCoordinates = (newXIndex, newYIndex, currentItem) => {
36
24
  return (0, _extends2.default)({}, currentItem, {
37
25
  xIndex: newXIndex,
38
- yIndex: newYIndex,
39
- dataIndex: dataIndex === -1 || dataIndex === undefined ? undefined : dataIndex
26
+ yIndex: newYIndex
40
27
  });
41
28
  };
42
29
  const keyboardFocusHandler = event => {
@@ -50,7 +37,7 @@ const keyboardFocusHandler = event => {
50
37
  if (currentItem.xIndex + 1 === (maxLength ?? 0)) {
51
38
  return currentItem;
52
39
  }
53
- return updateCoordinates(currentItem.xIndex + 1, currentItem.yIndex, currentItem, state);
40
+ return updateCoordinates(currentItem.xIndex + 1, currentItem.yIndex, currentItem);
54
41
  };
55
42
  case 'ArrowLeft':
56
43
  return (currentItem, state) => {
@@ -60,7 +47,7 @@ const keyboardFocusHandler = event => {
60
47
  if (currentItem.xIndex - 1 < 0) {
61
48
  return currentItem;
62
49
  }
63
- return updateCoordinates(currentItem.xIndex - 1, currentItem.yIndex, currentItem, state);
50
+ return updateCoordinates(currentItem.xIndex - 1, currentItem.yIndex, currentItem);
64
51
  };
65
52
  case 'ArrowDown':
66
53
  return (currentItem, state) => {
@@ -71,7 +58,7 @@ const keyboardFocusHandler = event => {
71
58
  if (currentItem.yIndex + 1 === (maxLength ?? 0)) {
72
59
  return currentItem;
73
60
  }
74
- return updateCoordinates(currentItem.xIndex, currentItem.yIndex + 1, currentItem, state);
61
+ return updateCoordinates(currentItem.xIndex, currentItem.yIndex + 1, currentItem);
75
62
  };
76
63
  case 'ArrowUp':
77
64
  return (currentItem, state) => {
@@ -81,7 +68,7 @@ const keyboardFocusHandler = event => {
81
68
  if (currentItem.yIndex - 1 < 0) {
82
69
  return currentItem;
83
70
  }
84
- return updateCoordinates(currentItem.xIndex, currentItem.yIndex - 1, currentItem, state);
71
+ return updateCoordinates(currentItem.xIndex, currentItem.yIndex - 1, currentItem);
85
72
  };
86
73
  default:
87
74
  return null;