@mui/x-charts-pro 8.0.0-beta.1 → 8.0.0-beta.3

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 (47) hide show
  1. package/BarChartPro/BarChartPro.js +2 -0
  2. package/CHANGELOG.md +235 -0
  3. package/Heatmap/Heatmap.d.ts +1 -1
  4. package/Heatmap/Heatmap.js +9 -7
  5. package/Heatmap/{HeatmapTooltip.js → HeatmapTooltip/HeatmapTooltip.js} +30 -34
  6. package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
  7. package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +26 -0
  8. package/Heatmap/HeatmapTooltip/index.d.ts +1 -0
  9. package/Heatmap/HeatmapTooltip/index.js +16 -0
  10. package/Heatmap/index.d.ts +1 -1
  11. package/LineChartPro/LineChartPro.js +2 -0
  12. package/ScatterChartPro/ScatterChartPro.js +2 -0
  13. package/esm/BarChartPro/BarChartPro.js +2 -0
  14. package/esm/Heatmap/Heatmap.d.ts +1 -1
  15. package/esm/Heatmap/Heatmap.js +9 -7
  16. package/{modern/Heatmap → esm/Heatmap/HeatmapTooltip}/HeatmapTooltip.js +30 -34
  17. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
  18. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +22 -0
  19. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -0
  20. package/esm/Heatmap/HeatmapTooltip/index.js +1 -0
  21. package/esm/Heatmap/index.d.ts +1 -1
  22. package/esm/Heatmap/index.js +1 -1
  23. package/esm/LineChartPro/LineChartPro.js +2 -0
  24. package/esm/ScatterChartPro/ScatterChartPro.js +2 -0
  25. package/esm/index.js +1 -1
  26. package/esm/internals/utils/releaseInfo.js +1 -1
  27. package/index.js +1 -1
  28. package/internals/utils/releaseInfo.js +1 -1
  29. package/modern/BarChartPro/BarChartPro.js +2 -0
  30. package/modern/Heatmap/Heatmap.d.ts +1 -1
  31. package/modern/Heatmap/Heatmap.js +9 -7
  32. package/{esm/Heatmap → modern/Heatmap/HeatmapTooltip}/HeatmapTooltip.js +30 -34
  33. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
  34. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +22 -0
  35. package/modern/Heatmap/HeatmapTooltip/index.d.ts +1 -0
  36. package/modern/Heatmap/HeatmapTooltip/index.js +1 -0
  37. package/modern/Heatmap/index.d.ts +1 -1
  38. package/modern/Heatmap/index.js +1 -1
  39. package/modern/LineChartPro/LineChartPro.js +2 -0
  40. package/modern/ScatterChartPro/ScatterChartPro.js +2 -0
  41. package/modern/index.js +1 -1
  42. package/modern/internals/utils/releaseInfo.js +1 -1
  43. package/package.json +9 -11
  44. package/tsconfig.build.tsbuildinfo +1 -1
  45. /package/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
  46. /package/esm/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
  47. /package/modern/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
@@ -277,6 +277,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
277
277
  height: _propTypes.default.number,
278
278
  hideTooltip: _propTypes.default.bool,
279
279
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
280
+ ignoreTooltip: _propTypes.default.bool,
280
281
  label: _propTypes.default.string,
281
282
  labelStyle: _propTypes.default.object,
282
283
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -341,6 +342,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
341
342
  fill: _propTypes.default.string,
342
343
  hideTooltip: _propTypes.default.bool,
343
344
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
345
+ ignoreTooltip: _propTypes.default.bool,
344
346
  label: _propTypes.default.string,
345
347
  labelStyle: _propTypes.default.object,
346
348
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
package/CHANGELOG.md CHANGED
@@ -5,6 +5,241 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.0.0-beta.3
9
+
10
+ _Apr 3, 2025_
11
+
12
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🚫 Removed `react-spring` as a dependency of `@mui/x-charts`
15
+ - 📦 Data Grid list view feature is now stable
16
+ - 💫 Support title in Data Grid
17
+ - 📚 Documentation improvements
18
+ - 🐞 Bugfixes
19
+
20
+ Team members who have contributed to this release:
21
+ @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
22
+
23
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24
+
25
+ ### Data Grid
26
+
27
+ #### Breaking changes
28
+
29
+ - The list view feature and its related props are now stable.
30
+
31
+ The `unstable_listColumn` prop has been renamed to `listViewColumn`.
32
+
33
+ The `GridListColDef` type has been renamed to `GridListViewColDef`.
34
+
35
+ ```diff
36
+ -const listViewColDef: GridListColDef = {
37
+ +const listViewColDef: GridListViewColDef = {
38
+ field: 'listColumn',
39
+ renderCell: ListViewCell,
40
+ };
41
+
42
+ <DataGridPro
43
+ - unstable_listView
44
+ - unstable_listColumn={listViewColDef}
45
+ + listView
46
+ + listViewColumn={listViewColDef}
47
+ />
48
+ ```
49
+
50
+ - The `useGridApiEventHandler()` hook has been renamed to `useGridEvent()`.
51
+ - The `useGridApiOptionHandler()` hook has been renamed to `useGridEventPriority()`.
52
+
53
+ #### `@mui/x-data-grid@8.0.0-beta.3`
54
+
55
+ - [DataGrid] Fix "is any of" autocomplete rendering (#17226) @KenanYusuf
56
+ - [DataGrid] Rename `useGridApiEventHandler()` to `useGridEvent()` (#17159) @romgrk
57
+ - [DataGrid] Support adding a label to the grid (#17147) @KenanYusuf
58
+ - [DataGrid] Refactor: remove material typings (#17119) @romgrk
59
+
60
+ #### `@mui/x-data-grid-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
61
+
62
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.3`, plus:
63
+
64
+ - [DataGridPro] Make list view feature stable (#17217) @KenanYusuf
65
+ - [DataGridPro] Always refetch lazy-loading rows (#16827) @MBilalShafi
66
+
67
+ #### `@mui/x-data-grid-premium@8.0.0-beta.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
68
+
69
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.3`.
70
+
71
+ ### Date and Time Pickers
72
+
73
+ #### `@mui/x-date-pickers@8.0.0-beta.3`
74
+
75
+ - [pickers] Add new `nextOrAccept` action bar action (#17037) @flaviendelangle
76
+ - [pickers] Improve the Multi Section Digital Clock scrollbar thickness (#16774) @oliviertassinari
77
+ - [TimePicker] Align the Digital Clock scrollbar thickness (#17203) @LukasTy
78
+
79
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
80
+
81
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.3`.
82
+
83
+ ### Charts
84
+
85
+ #### Breaking changes
86
+
87
+ - Removed `react-spring` as a dependency of `@mui/x-charts`.
88
+ A consequence of this change is that the props of some slots have been changed because the `SpringValue` wrapper has been removed. The affected slots and props are:
89
+
90
+ - the type of the `x`, `y`, `width` and `height` props of the `bar` slot are now `number`;
91
+ - the type of `startAngle`, `endAngle`, `innerRadius`, `outerRadius`, `arcLabelRadius`, `cornerRadius` and `paddingAngle` props of `pieArc` and `pieArcLabel` slot are now `number`.
92
+
93
+ Additionally, the `pieArc` slot now receives a `skipAnimation` prop to configure whether animations should be enabled or disabled.
94
+
95
+ - Tick labels in the y-axis of cartesian charts will now have an ellipsis applied to prevent overflow.
96
+ If your tick labels are being clipped sooner than you would like, you can increase the y-axis size by increasing its width property.
97
+
98
+ - The tooltip DOM structure is modified to improve accessibility. If you relied on it to apply some style or run tests, you might be impacted by this modification.
99
+ - The axis tooltip displays a table per axis with the axis value in a caption.
100
+ - Cells containing the series label and the color mark got merged in a th cell.
101
+
102
+ #### `@mui/x-charts@8.0.0-beta.3`
103
+
104
+ - [charts] Adjust color palettes (#17209) @noraleonte
105
+ - [charts] Allow multiple axes in the tooltip (#17058) @alexfauquette
106
+ - [charts] Improve custom legend docs (#17231) @JCQuintas
107
+ - [charts] Fix crash when item shown in tooltip is unmounted (#17169) @bernardobelchior
108
+ - [charts] Migrate some animations from `react-spring` (#16961) @bernardobelchior
109
+ - [charts] Remove `react-spring` (#17123) @bernardobelchior
110
+ - [charts] Fix y-axis tick label overflow (#16846) @bernardobelchior
111
+
112
+ #### `@mui/x-charts-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
113
+
114
+ Same changes as in `@mui/x-charts@8.0.0-beta.3`.
115
+
116
+ ### Tree View
117
+
118
+ #### `@mui/x-tree-view@8.0.0-beta.3`
119
+
120
+ Internal changes.
121
+
122
+ #### `@mui/x-tree-view-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
123
+
124
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.3`.
125
+
126
+ ### `@mui/x-codemod@8.0.0-beta.3`
127
+
128
+ - [codemod] Add `listView` prop rename codemod (#17220) @MBilalShafi
129
+
130
+ ### Docs
131
+
132
+ - [docs] Add "Usage with Material UI v5/v6" guide (#17164) @cherniavskii
133
+ - [docs] Fix 301 link @oliviertassinari
134
+ - [docs] Fix redirection getting-started (#17200) @oliviertassinari
135
+ - [docs] Sync Stack Overflow docs with reality (#17198) @oliviertassinari
136
+ - [docs] Update Localization Provider JSDoc link (#17207) @LukasTy
137
+
138
+ ### Core
139
+
140
+ - [core] Cleanup `@mui` dependency versions (#17160) @LukasTy
141
+ - [core] Sync scorecards.yml across codebase @oliviertassinari
142
+ - [core] Revert upgrade to React 19.1 (#17206) @bernardobelchior
143
+ - [code-infra] Fix `test:unit` warning (#17224) @JCQuintas
144
+ - [code-infra] Fix pickers failing test after clock=fake removal (#17202) @JCQuintas
145
+ - [code-infra] Remove clock=fake from `describeValidation` (#17150) @JCQuintas
146
+ - [code-infra] Remove clock=fake from `describeValue` (#17199) @JCQuintas
147
+ - [infra] Add write permission for actions in issue status label handler (#17161) @michelengelen
148
+
149
+ ## 8.0.0-beta.2
150
+
151
+ _Mar 27, 2025_
152
+
153
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
154
+
155
+ - 🔍 Update the Data Grid quick filter to be collapsed when not in use
156
+ - 🐞 Bugfixes
157
+
158
+ Special thanks go out to the community members for their valuable contributions:
159
+ @lhilgert9.
160
+ Following are all team members who have contributed to this release:
161
+ @alexfauquette, @arminmeh, @flaviendelangle, @hasdfa, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @mnajdova, @romgrk.
162
+
163
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
164
+
165
+ ### Data Grid
166
+
167
+ #### `@mui/x-data-grid@8.0.0-beta.2`
168
+
169
+ - [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17057) @arminmeh
170
+ - [DataGrid] Refactor: remove more material (#16922) @romgrk
171
+ - [DataGrid] Update Quick Filter component to be expandable (#16862) @KenanYusuf
172
+ - [DataGrid] Fix crash when used with `@mui/styled-engine-sc` (#17154) @KenanYusuf
173
+
174
+ #### `@mui/x-data-grid-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
175
+
176
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.2`, plus:
177
+
178
+ - [DataGridPro] Data source: Allow expanding groups with unknown children (#17144) @MBilalShafi
179
+
180
+ #### `@mui/x-data-grid-premium@8.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
181
+
182
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.2`.
183
+
184
+ ### Date and Time Pickers
185
+
186
+ #### `@mui/x-date-pickers@8.0.0-beta.2`
187
+
188
+ - [fields] Extract the props of each field slot into a standalone hook for easier re-use (#17114) @flaviendelangle
189
+ - [pickers] Fix visual regression in Date Range Calendar's day (#17148) @flaviendelangle
190
+ - [pickers] Remove all code duplication to apply default values to validation props (#17038) @flaviendelangle
191
+
192
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
193
+
194
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.2`.
195
+
196
+ ### Charts
197
+
198
+ #### `@mui/x-charts@8.0.0-beta.2`
199
+
200
+ - [charts] Memoize axes and series with default (#17156) @alexfauquette
201
+ - [charts] Add pie benchmark (#17115) @JCQuintas
202
+ - [charts] Fix CSS vars support for dark theme (#17106) @alexfauquette
203
+ - [charts] Fix radar hover (#17134) @alexfauquette
204
+ - [charts] Move axis interaction to selectors (#17039) @alexfauquette
205
+ - [charts] Fix Pie benchmark (#17125) @JCQuintas
206
+
207
+ #### `@mui/x-charts-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
208
+
209
+ Same changes as in `@mui/x-charts@8.0.0-beta.2`.
210
+
211
+ ### Tree View
212
+
213
+ #### `@mui/x-tree-view@8.0.0-beta.2`
214
+
215
+ Internal changes.
216
+
217
+ #### `@mui/x-tree-view-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
218
+
219
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.2`.
220
+
221
+ ### `@mui/x-codemod@8.0.0-beta.1`
222
+
223
+ - [codemod] Add Data Grid codemods (#17121, #17124) @MBilalShafi
224
+
225
+ ### Docs
226
+
227
+ - [docs] Fix example import for `ExportExcel` component (#17110) @KenanYusuf
228
+
229
+ ### Core
230
+
231
+ - [code-infra] Remove `@mui/styles` dependency & patches (#17071) @mnajdova
232
+ - [code-infra] Add more tests to slow screenshot tests (#17075) @JCQuintas
233
+ - [code-infra] Fix pickers codecov (#17120) @JCQuintas
234
+ - [code-infra] Move `isDeepEqual` to @mui/x-internals (#17129) @JCQuintas
235
+ - [code-infra] Remove `test_regressions` step from React 18 pipeline (#17108) @LukasTy
236
+ - [code-infra] Update some data-grid tests for vitest (#17078, #17104, #17146) @JCQuintas
237
+ - [code-infra] Update some date-pickers tests for vitest (#17083) @JCQuintas
238
+ - [infra] Update `issue-status-label-handler.yml` @michelengelen
239
+ - [infra] Added reusable issue status label handler workflow (#17145) @michelengelen
240
+ - [infra] Switch to reusable 'stale issues/PRs' workflow (#17107) @michelengelen
241
+ - [telemetry] Improve request body size, update dependencies, and optimize SSR handling (#17008) @hasdfa
242
+
8
243
  ## 8.0.0-beta.1
9
244
 
10
245
  _Mar 21, 2025_
@@ -6,7 +6,7 @@ import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProp
6
6
  import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
7
7
  import { ChartContainerProProps } from "../ChartContainerPro/index.js";
8
8
  import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
9
- import { HeatmapTooltipProps } from "./HeatmapTooltip.js";
9
+ import { HeatmapTooltipProps } from "./HeatmapTooltip/HeatmapTooltip.js";
10
10
  import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
11
11
  import { HeatmapPluginsSignatures } from "./Heatmap.plugins.js";
12
12
  export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots {
@@ -20,7 +20,7 @@ var _constants = require("@mui/x-charts/constants");
20
20
  var _ChartContainerPro = require("../ChartContainerPro");
21
21
  var _HeatmapPlot = require("./HeatmapPlot");
22
22
  var _seriesConfig = require("./seriesConfig");
23
- var _HeatmapTooltip = require("./HeatmapTooltip");
23
+ var _HeatmapTooltip = require("./HeatmapTooltip/HeatmapTooltip");
24
24
  var _Heatmap = require("./Heatmap.plugins");
25
25
  var _jsxRuntime = require("react/jsx-runtime");
26
26
  // The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
@@ -64,7 +64,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
64
64
  } = props;
65
65
  const id = (0, _useId.default)();
66
66
  const clipPathId = `${id}-clip-path`;
67
- const defaultizedXAxis = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
67
+ const xAxisWithDefault = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
68
68
  id: _constants.DEFAULT_X_AXIS_KEY
69
69
  }]).map(axis => (0, _extends2.default)({
70
70
  scaleType: 'band',
@@ -72,7 +72,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
72
72
  }, axis, {
73
73
  data: axis.data ?? getDefaultDataForXAxis(series)
74
74
  })), [series, xAxis]);
75
- const defaultizedYAxis = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
75
+ const yAxisWithDefault = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
76
76
  id: _constants.DEFAULT_Y_AXIS_KEY
77
77
  }]).map(axis => (0, _extends2.default)({
78
78
  scaleType: 'band',
@@ -80,7 +80,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
80
80
  }, axis, {
81
81
  data: axis.data ?? getDefaultDataForYAxis(series)
82
82
  })), [series, yAxis]);
83
- const defaultizedZAxis = React.useMemo(() => zAxis ?? [{
83
+ const zAxisWithDefault = React.useMemo(() => zAxis ?? [{
84
84
  colorMap: {
85
85
  type: 'continuous',
86
86
  min: 0,
@@ -98,9 +98,9 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
98
98
  width: width,
99
99
  height: height,
100
100
  margin: margin,
101
- xAxis: defaultizedXAxis,
102
- yAxis: defaultizedYAxis,
103
- zAxis: defaultizedZAxis,
101
+ xAxis: xAxisWithDefault,
102
+ yAxis: yAxisWithDefault,
103
+ zAxis: zAxisWithDefault,
104
104
  colors: colors,
105
105
  dataset: dataset,
106
106
  sx: sx,
@@ -266,6 +266,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
266
266
  height: _propTypes.default.number,
267
267
  hideTooltip: _propTypes.default.bool,
268
268
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
269
+ ignoreTooltip: _propTypes.default.bool,
269
270
  label: _propTypes.default.string,
270
271
  labelStyle: _propTypes.default.object,
271
272
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -332,6 +333,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
332
333
  fill: _propTypes.default.string,
333
334
  hideTooltip: _propTypes.default.bool,
334
335
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
336
+ ignoreTooltip: _propTypes.default.bool,
335
337
  label: _propTypes.default.string,
336
338
  labelStyle: _propTypes.default.object,
337
339
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -16,12 +16,13 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
16
16
  var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
17
17
  var _hooks = require("@mui/x-charts/hooks");
18
18
  var _internals = require("@mui/x-charts/internals");
19
- var _useHeatmapSeries = require("../hooks/useHeatmapSeries");
19
+ var _useHeatmapSeries = require("../../hooks/useHeatmapSeries");
20
+ var _HeatmapTooltipAxesValue = require("./HeatmapTooltipAxesValue");
20
21
  var _jsxRuntime = require("react/jsx-runtime");
21
- const useUtilityClasses = ownerState => {
22
+ const useUtilityClasses = props => {
22
23
  const {
23
24
  classes
24
- } = ownerState;
25
+ } = props;
25
26
  const slots = {
26
27
  root: ['root'],
27
28
  paper: ['paper'],
@@ -29,16 +30,14 @@ const useUtilityClasses = ownerState => {
29
30
  row: ['row'],
30
31
  cell: ['cell'],
31
32
  mark: ['mark'],
32
- markCell: ['markCell'],
33
+ markContainer: ['markContainer'],
33
34
  labelCell: ['labelCell'],
34
35
  valueCell: ['valueCell']
35
36
  };
36
37
  return (0, _composeClasses.default)(slots, _ChartsTooltip.getChartsTooltipUtilityClass, classes);
37
38
  };
38
39
  function DefaultHeatmapTooltipContent(props) {
39
- const {
40
- classes
41
- } = props;
40
+ const classes = useUtilityClasses(props);
42
41
  const xAxis = (0, _hooks.useXAxis)();
43
42
  const yAxis = (0, _hooks.useYAxis)();
44
43
  const heatmapSeries = (0, _useHeatmapSeries.useHeatmapSeriesContext)();
@@ -71,35 +70,32 @@ function DefaultHeatmapTooltipContent(props) {
71
70
  });
72
71
  const seriesLabel = (0, _internals.getLabel)(series[seriesId].label, 'tooltip');
73
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipPaper, {
74
- className: classes?.paper,
73
+ className: classes.paper,
75
74
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipTable, {
76
- className: classes?.table,
77
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
78
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipRow, {
79
- className: classes?.row,
80
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
81
- className: classes?.cell,
82
- children: formattedX
83
- }), formattedX && formattedY && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
84
- className: classes?.cell,
85
- children: formattedY
86
- })]
87
- })
75
+ className: classes.table,
76
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_HeatmapTooltipAxesValue.HeatmapTooltipAxesValue, {
77
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
78
+ children: formattedX
79
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
80
+ children: formattedY
81
+ })]
88
82
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
89
83
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipRow, {
90
- className: classes?.row,
91
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
92
- className: (0, _clsx.default)(classes?.markCell, classes?.cell),
93
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.ChartsLabelMark, {
94
- type: markType,
95
- color: color,
96
- className: classes?.mark
97
- })
98
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
99
- className: (0, _clsx.default)(classes?.labelCell, classes?.cell),
100
- children: seriesLabel
84
+ className: classes.row,
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipCell, {
86
+ className: (0, _clsx.default)(classes.labelCell, classes.cell),
87
+ component: "th",
88
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
89
+ className: classes.markContainer,
90
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.ChartsLabelMark, {
91
+ type: markType,
92
+ color: color,
93
+ className: classes.mark
94
+ })
95
+ }), seriesLabel]
101
96
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
102
- className: (0, _clsx.default)(classes?.valueCell, classes?.cell),
97
+ className: (0, _clsx.default)(classes.valueCell, classes.cell),
98
+ component: "td",
103
99
  children: formattedValue
104
100
  })]
105
101
  })
@@ -155,7 +151,7 @@ process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
155
151
  * The components used for each slot inside the Popper.
156
152
  * Either a string to use a HTML element or a component.
157
153
  *
158
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
154
+ * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
159
155
  * @default {}
160
156
  */
161
157
  components: _propTypes.default.shape({
@@ -164,7 +160,7 @@ process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
164
160
  /**
165
161
  * The props used for each slot inside the Popper.
166
162
  *
167
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
163
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
168
164
  * @default {}
169
165
  */
170
166
  componentsProps: _propTypes.default.shape({
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @ignore - internal component.
3
+ */
4
+ export declare const HeatmapTooltipAxesValue: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").ClassAttributes<HTMLElement> | keyof import("react").HTMLAttributes<HTMLElement>>, {}>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.HeatmapTooltipAxesValue = void 0;
8
+ var _styles = require("@mui/material/styles");
9
+ /**
10
+ * @ignore - internal component.
11
+ */
12
+ const HeatmapTooltipAxesValue = exports.HeatmapTooltipAxesValue = (0, _styles.styled)('caption', {
13
+ name: 'MuiChartsHeatmapTooltip',
14
+ slot: 'AxesValue'
15
+ })(({
16
+ theme
17
+ }) => ({
18
+ textAlign: 'start',
19
+ whiteSpace: 'nowrap',
20
+ padding: theme.spacing(0.5, 1.5),
21
+ color: (theme.vars || theme).palette.text.secondary,
22
+ borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`,
23
+ [`& span`]: {
24
+ marginRight: theme.spacing(1.5)
25
+ }
26
+ }));
@@ -0,0 +1 @@
1
+ export * from "./HeatmapTooltip.js";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _HeatmapTooltip = require("./HeatmapTooltip");
7
+ Object.keys(_HeatmapTooltip).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _HeatmapTooltip[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _HeatmapTooltip[key];
14
+ }
15
+ });
16
+ });
@@ -1,4 +1,4 @@
1
1
  export { Heatmap } from "./Heatmap.js";
2
2
  export { HeatmapPlot } from "./HeatmapPlot.js";
3
- export * from "./HeatmapTooltip.js";
3
+ export * from "./HeatmapTooltip/index.js";
4
4
  export * from "./heatmapClasses.js";
@@ -274,6 +274,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
274
274
  height: _propTypes.default.number,
275
275
  hideTooltip: _propTypes.default.bool,
276
276
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
277
+ ignoreTooltip: _propTypes.default.bool,
277
278
  label: _propTypes.default.string,
278
279
  labelStyle: _propTypes.default.object,
279
280
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -338,6 +339,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
338
339
  fill: _propTypes.default.string,
339
340
  hideTooltip: _propTypes.default.bool,
340
341
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
342
+ ignoreTooltip: _propTypes.default.bool,
341
343
  label: _propTypes.default.string,
342
344
  labelStyle: _propTypes.default.object,
343
345
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -268,6 +268,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
268
268
  height: _propTypes.default.number,
269
269
  hideTooltip: _propTypes.default.bool,
270
270
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
271
+ ignoreTooltip: _propTypes.default.bool,
271
272
  label: _propTypes.default.string,
272
273
  labelStyle: _propTypes.default.object,
273
274
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -332,6 +333,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
332
333
  fill: _propTypes.default.string,
333
334
  hideTooltip: _propTypes.default.bool,
334
335
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
336
+ ignoreTooltip: _propTypes.default.bool,
335
337
  label: _propTypes.default.string,
336
338
  labelStyle: _propTypes.default.object,
337
339
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
@@ -270,6 +270,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
270
270
  height: PropTypes.number,
271
271
  hideTooltip: PropTypes.bool,
272
272
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
273
+ ignoreTooltip: PropTypes.bool,
273
274
  label: PropTypes.string,
274
275
  labelStyle: PropTypes.object,
275
276
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -334,6 +335,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
334
335
  fill: PropTypes.string,
335
336
  hideTooltip: PropTypes.bool,
336
337
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
338
+ ignoreTooltip: PropTypes.bool,
337
339
  label: PropTypes.string,
338
340
  labelStyle: PropTypes.object,
339
341
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -6,7 +6,7 @@ import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProp
6
6
  import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
7
7
  import { ChartContainerProProps } from "../ChartContainerPro/index.js";
8
8
  import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
9
- import { HeatmapTooltipProps } from "./HeatmapTooltip.js";
9
+ import { HeatmapTooltipProps } from "./HeatmapTooltip/HeatmapTooltip.js";
10
10
  import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
11
11
  import { HeatmapPluginsSignatures } from "./Heatmap.plugins.js";
12
12
  export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots {
@@ -13,7 +13,7 @@ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants'
13
13
  import { ChartContainerPro } from "../ChartContainerPro/index.js";
14
14
  import { HeatmapPlot } from "./HeatmapPlot.js";
15
15
  import { seriesConfig as heatmapSeriesConfig } from "./seriesConfig/index.js";
16
- import { HeatmapTooltip } from "./HeatmapTooltip.js";
16
+ import { HeatmapTooltip } from "./HeatmapTooltip/HeatmapTooltip.js";
17
17
  import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
18
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
19
  // The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
@@ -57,7 +57,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
57
57
  } = props;
58
58
  const id = useId();
59
59
  const clipPathId = `${id}-clip-path`;
60
- const defaultizedXAxis = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
60
+ const xAxisWithDefault = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
61
61
  id: DEFAULT_X_AXIS_KEY
62
62
  }]).map(axis => _extends({
63
63
  scaleType: 'band',
@@ -65,7 +65,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
65
65
  }, axis, {
66
66
  data: axis.data ?? getDefaultDataForXAxis(series)
67
67
  })), [series, xAxis]);
68
- const defaultizedYAxis = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
68
+ const yAxisWithDefault = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
69
69
  id: DEFAULT_Y_AXIS_KEY
70
70
  }]).map(axis => _extends({
71
71
  scaleType: 'band',
@@ -73,7 +73,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
73
73
  }, axis, {
74
74
  data: axis.data ?? getDefaultDataForYAxis(series)
75
75
  })), [series, yAxis]);
76
- const defaultizedZAxis = React.useMemo(() => zAxis ?? [{
76
+ const zAxisWithDefault = React.useMemo(() => zAxis ?? [{
77
77
  colorMap: {
78
78
  type: 'continuous',
79
79
  min: 0,
@@ -91,9 +91,9 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
91
91
  width: width,
92
92
  height: height,
93
93
  margin: margin,
94
- xAxis: defaultizedXAxis,
95
- yAxis: defaultizedYAxis,
96
- zAxis: defaultizedZAxis,
94
+ xAxis: xAxisWithDefault,
95
+ yAxis: yAxisWithDefault,
96
+ zAxis: zAxisWithDefault,
97
97
  colors: colors,
98
98
  dataset: dataset,
99
99
  sx: sx,
@@ -259,6 +259,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
259
259
  height: PropTypes.number,
260
260
  hideTooltip: PropTypes.bool,
261
261
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
262
+ ignoreTooltip: PropTypes.bool,
262
263
  label: PropTypes.string,
263
264
  labelStyle: PropTypes.object,
264
265
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -325,6 +326,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
325
326
  fill: PropTypes.string,
326
327
  hideTooltip: PropTypes.bool,
327
328
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
329
+ ignoreTooltip: PropTypes.bool,
328
330
  label: PropTypes.string,
329
331
  labelStyle: PropTypes.object,
330
332
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),