@mui/x-charts 7.0.0-alpha.4 → 7.0.0-alpha.7
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.
- package/BarChart/BarPlot.js +7 -6
- package/BarChart/formatter.js +15 -3
- package/CHANGELOG.md +524 -0
- package/ChartsAxis/ChartsAxis.js +4 -4
- package/ChartsLegend/ChartsLegend.d.ts +1 -1
- package/ChartsLegend/ChartsLegend.js +3 -2
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/ChartsReferenceLine/common.d.ts +1 -1
- package/ChartsText/ChartsText.d.ts +17 -0
- package/{internals/components → ChartsText}/ChartsText.js +32 -17
- package/ChartsText/index.d.ts +3 -0
- package/ChartsText/index.js +12 -0
- package/ChartsText/package.json +6 -0
- package/ChartsXAxis/ChartsXAxis.js +3 -2
- package/ChartsYAxis/ChartsYAxis.js +1 -1
- package/LineChart/AreaPlot.js +3 -2
- package/LineChart/LineHighlightPlot.js +2 -1
- package/LineChart/LinePlot.js +3 -2
- package/LineChart/MarkPlot.js +2 -1
- package/LineChart/formatter.js +14 -2
- package/PieChart/PieArcLabel.d.ts +1 -0
- package/PieChart/PieArcLabel.js +7 -8
- package/PieChart/PieArcLabelPlot.d.ts +2 -3
- package/PieChart/PieArcLabelPlot.js +14 -4
- package/PieChart/PieArcPlot.d.ts +2 -3
- package/PieChart/PieArcPlot.js +8 -2
- package/PieChart/PieChart.js +7 -4
- package/PieChart/PiePlot.js +23 -15
- package/PieChart/dataTransform/transition.js +9 -2
- package/PieChart/dataTransform/useTransformData.d.ts +3 -3
- package/PieChart/dataTransform/useTransformData.js +11 -8
- package/ResponsiveChartContainer/index.js +2 -2
- package/context/CartesianContextProvider.js +2 -2
- package/context/SeriesContextProvider.js +1 -1
- package/esm/BarChart/BarPlot.js +7 -5
- package/esm/BarChart/formatter.js +20 -4
- package/esm/ChartsAxis/ChartsAxis.js +4 -4
- package/esm/ChartsLegend/ChartsLegend.js +2 -1
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/esm/{internals/components → ChartsText}/ChartsText.js +33 -16
- package/esm/ChartsText/index.js +1 -0
- package/esm/ChartsXAxis/ChartsXAxis.js +2 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -1
- package/esm/LineChart/AreaPlot.js +3 -2
- package/esm/LineChart/LineHighlightPlot.js +2 -1
- package/esm/LineChart/LinePlot.js +3 -2
- package/esm/LineChart/MarkPlot.js +2 -1
- package/esm/LineChart/formatter.js +16 -3
- package/esm/PieChart/PieArcLabel.js +7 -8
- package/esm/PieChart/PieArcLabelPlot.js +14 -4
- package/esm/PieChart/PieArcPlot.js +8 -2
- package/esm/PieChart/PieChart.js +7 -4
- package/esm/PieChart/PiePlot.js +23 -15
- package/esm/PieChart/dataTransform/transition.js +9 -2
- package/esm/PieChart/dataTransform/useTransformData.js +12 -9
- package/esm/ResponsiveChartContainer/index.js +2 -2
- package/esm/context/CartesianContextProvider.js +2 -2
- package/esm/context/SeriesContextProvider.js +1 -1
- package/esm/index.js +1 -0
- package/esm/internals/getWordsByLines.js +14 -0
- package/esm/internals/utils.js +29 -0
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/defaultizeColor.d.ts +7 -4
- package/internals/{components/ChartsText.d.ts → getWordsByLines.d.ts} +2 -11
- package/internals/getWordsByLines.js +21 -0
- package/internals/utils.d.ts +7 -0
- package/internals/utils.js +30 -0
- package/legacy/BarChart/BarPlot.js +7 -5
- package/legacy/BarChart/formatter.js +23 -9
- package/legacy/ChartsAxis/ChartsAxis.js +4 -4
- package/legacy/ChartsLegend/ChartsLegend.js +2 -1
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/legacy/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/legacy/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/legacy/{internals/components → ChartsText}/ChartsText.js +38 -22
- package/legacy/ChartsText/index.js +1 -0
- package/legacy/ChartsXAxis/ChartsXAxis.js +2 -1
- package/legacy/ChartsYAxis/ChartsYAxis.js +1 -1
- package/legacy/LineChart/AreaPlot.js +3 -2
- package/legacy/LineChart/LineHighlightPlot.js +2 -1
- package/legacy/LineChart/LinePlot.js +3 -2
- package/legacy/LineChart/MarkPlot.js +2 -1
- package/legacy/LineChart/formatter.js +19 -8
- package/legacy/PieChart/PieArcLabel.js +7 -8
- package/legacy/PieChart/PieArcLabelPlot.js +14 -5
- package/legacy/PieChart/PieArcPlot.js +9 -2
- package/legacy/PieChart/PieChart.js +7 -4
- package/legacy/PieChart/PiePlot.js +23 -15
- package/legacy/PieChart/dataTransform/transition.js +9 -2
- package/legacy/PieChart/dataTransform/useTransformData.js +12 -9
- package/legacy/ResponsiveChartContainer/index.js +2 -2
- package/legacy/context/CartesianContextProvider.js +2 -2
- package/legacy/context/SeriesContextProvider.js +1 -1
- package/legacy/index.js +2 -1
- package/legacy/internals/getWordsByLines.js +15 -0
- package/legacy/internals/utils.js +29 -0
- package/models/axis.d.ts +1 -1
- package/models/seriesType/config.d.ts +4 -3
- package/models/seriesType/pie.d.ts +43 -7
- package/modern/BarChart/BarPlot.js +7 -5
- package/modern/BarChart/formatter.js +15 -3
- package/modern/ChartsAxis/ChartsAxis.js +4 -4
- package/modern/ChartsLegend/ChartsLegend.js +2 -1
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/modern/{internals/components → ChartsText}/ChartsText.js +33 -16
- package/modern/ChartsText/index.js +1 -0
- package/modern/ChartsXAxis/ChartsXAxis.js +2 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +1 -1
- package/modern/LineChart/AreaPlot.js +3 -2
- package/modern/LineChart/LineHighlightPlot.js +2 -1
- package/modern/LineChart/LinePlot.js +3 -2
- package/modern/LineChart/MarkPlot.js +2 -1
- package/modern/LineChart/formatter.js +14 -2
- package/modern/PieChart/PieArcLabel.js +7 -8
- package/modern/PieChart/PieArcLabelPlot.js +14 -4
- package/modern/PieChart/PieArcPlot.js +8 -2
- package/modern/PieChart/PieChart.js +7 -4
- package/modern/PieChart/PiePlot.js +23 -15
- package/modern/PieChart/dataTransform/transition.js +9 -2
- package/modern/PieChart/dataTransform/useTransformData.js +11 -8
- package/modern/ResponsiveChartContainer/index.js +2 -2
- package/modern/context/CartesianContextProvider.js +2 -2
- package/modern/context/SeriesContextProvider.js +1 -1
- package/modern/index.js +2 -1
- package/modern/internals/getWordsByLines.js +14 -0
- package/modern/internals/utils.js +29 -0
- package/package.json +5 -5
package/BarChart/BarPlot.js
CHANGED
|
@@ -14,10 +14,9 @@ var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
|
14
14
|
var _CartesianContextProvider = require("../context/CartesianContextProvider");
|
|
15
15
|
var _BarElement = require("./BarElement");
|
|
16
16
|
var _axis = require("../models/axis");
|
|
17
|
+
var _constants = require("../constants");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
const _excluded = ["skipAnimation"];
|
|
19
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
20
|
/**
|
|
22
21
|
* Solution of the equations
|
|
23
22
|
* W = barWidth * N + offset * (N-1)
|
|
@@ -27,6 +26,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
26
|
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
28
27
|
* @returns The bar width and the offset between bars.
|
|
29
28
|
*/
|
|
29
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
30
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
31
|
function getBandSize({
|
|
31
32
|
bandWidth: W,
|
|
32
33
|
numberOfGroups: N,
|
|
@@ -76,18 +77,18 @@ const useCompletedData = () => {
|
|
|
76
77
|
let baseScaleConfig;
|
|
77
78
|
if (verticalLayout) {
|
|
78
79
|
if (!(0, _axis.isBandScaleConfig)(xAxisConfig)) {
|
|
79
|
-
throw new Error(`
|
|
80
|
+
throw new Error(`MUI-X-Charts: ${xAxisKey === _constants.DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' : `The x-axis with id "${xAxisKey}"`} shoud be of type "band" to display the bar series of id "${seriesId}"`);
|
|
80
81
|
}
|
|
81
82
|
if (xAxis[xAxisKey].data === undefined) {
|
|
82
|
-
throw new Error(`
|
|
83
|
+
throw new Error(`MUI-X-Charts: ${xAxisKey === _constants.DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' : `The x-axis with id "${xAxisKey}"`} shoud have data property`);
|
|
83
84
|
}
|
|
84
85
|
baseScaleConfig = xAxisConfig;
|
|
85
86
|
} else {
|
|
86
87
|
if (!(0, _axis.isBandScaleConfig)(yAxisConfig)) {
|
|
87
|
-
throw new Error(`
|
|
88
|
+
throw new Error(`MUI-X-Charts: ${yAxisKey === _constants.DEFAULT_Y_AXIS_KEY ? 'The first `yAxis`' : `The y-axis with id "${yAxisKey}"`} shoud be of type "band" to display the bar series of id "${seriesId}"`);
|
|
88
89
|
}
|
|
89
90
|
if (yAxis[yAxisKey].data === undefined) {
|
|
90
|
-
throw new Error(`
|
|
91
|
+
throw new Error(`MUI-X-Charts: ${yAxisKey === _constants.DEFAULT_Y_AXIS_KEY ? 'The first `yAxis`' : `The y-axis with id "${yAxisKey}"`} shoud have data property`);
|
|
91
92
|
}
|
|
92
93
|
baseScaleConfig = yAxisConfig;
|
|
93
94
|
}
|
package/BarChart/formatter.js
CHANGED
|
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _d3Shape = require("d3-shape");
|
|
10
10
|
var _stackSeries = require("../internals/stackSeries");
|
|
11
11
|
var _defaultizeValueFormatter = _interopRequireDefault(require("../internals/defaultizeValueFormatter"));
|
|
12
|
+
let warnOnce = false;
|
|
12
13
|
const formatter = (params, dataset) => {
|
|
13
14
|
const {
|
|
14
15
|
seriesOrder,
|
|
@@ -31,7 +32,7 @@ const formatter = (params, dataset) => {
|
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
} else if (dataset === undefined) {
|
|
34
|
-
throw new Error([`MUI: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
|
|
35
|
+
throw new Error([`MUI-X-Charts: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
const completedSeries = {};
|
|
@@ -46,13 +47,24 @@ const formatter = (params, dataset) => {
|
|
|
46
47
|
// Use dataKey if needed and available
|
|
47
48
|
const dataKey = series[id].dataKey;
|
|
48
49
|
return series[id].data === undefined && dataKey !== undefined ? dataKey : id;
|
|
49
|
-
})).
|
|
50
|
+
})).value((d, key) => d[key] ?? 0) // defaultize null value to 0
|
|
51
|
+
.order(stackingOrder).offset(stackingOffset)(d3Dataset);
|
|
50
52
|
ids.forEach((id, index) => {
|
|
51
53
|
const dataKey = series[id].dataKey;
|
|
52
54
|
completedSeries[id] = (0, _extends2.default)({
|
|
53
55
|
layout: 'vertical'
|
|
54
56
|
}, series[id], {
|
|
55
|
-
data: dataKey ? dataset.map(
|
|
57
|
+
data: dataKey ? dataset.map(data => {
|
|
58
|
+
const value = data[dataKey];
|
|
59
|
+
if (typeof value !== 'number') {
|
|
60
|
+
if (process.env.NODE_ENV !== 'production' && !warnOnce && value !== null) {
|
|
61
|
+
warnOnce = true;
|
|
62
|
+
console.error([`MUI-X charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.']);
|
|
63
|
+
}
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
return value;
|
|
67
|
+
}) : series[id].data,
|
|
56
68
|
stackedData: stackedSeries[index].map(([a, b]) => [a, b])
|
|
57
69
|
});
|
|
58
70
|
});
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,397 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.0.0-alpha.7
|
|
7
|
+
|
|
8
|
+
_Jan 5, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 New component to create a Tree View from a structured data source:
|
|
13
|
+
|
|
14
|
+
You can now directly pass your data to the `RichTreeView` component instead of manually converting it into JSX `TreeItem` components:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
const ITEMS = [
|
|
18
|
+
{
|
|
19
|
+
id: 'node-1',
|
|
20
|
+
label: 'Node 1',
|
|
21
|
+
children: [
|
|
22
|
+
{ id: 'node-1-1', label: Node 1.1' },
|
|
23
|
+
{ id: 'node-1-2', label: Node 1.2' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'node-2',
|
|
28
|
+
label: 'Node 2',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
<RichTreeView
|
|
33
|
+
items={MUI_X_PRODUCTS}
|
|
34
|
+
defaultCollapseIcon={<ExpandMoreIcon />}
|
|
35
|
+
defaultExpandIcon={<ChevronRightIcon />}
|
|
36
|
+
/>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- 🌍 Improve Czech (cs-CZ) locale on the Data Grid
|
|
40
|
+
- 🐞 Bugfixes
|
|
41
|
+
|
|
42
|
+
### Data Grid
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-data-grid@7.0.0-alpha.7`
|
|
45
|
+
|
|
46
|
+
- [DataGrid] Don't evaluate `hasEval` when `disableEval` is set (#11516) @reihwald
|
|
47
|
+
- [DataGrid] follow warning message guideline for `autoPageSize` and `autoHeight` (#11585) @Sboonny
|
|
48
|
+
- [DataGrid] Replace `eval` with `new Function` (#11557) @oliviertassinari
|
|
49
|
+
- [DataGrid] Warn devs when `autoPageSize` is used with `autoHeight` (#11554) @Sboonny
|
|
50
|
+
- [l10n] Improve Czech (cs-CZ) locale (#11526) @fdebef
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.7`.
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
57
|
+
|
|
58
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.7`.
|
|
59
|
+
|
|
60
|
+
### Date Pickers
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.7`
|
|
63
|
+
|
|
64
|
+
- [pickers] Fix views management (#11419) @LukasTy
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
|
|
69
|
+
|
|
70
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.7`
|
|
71
|
+
|
|
72
|
+
- [charts] Add `arcLabelRadius` property (#11487) @alexfauquette
|
|
73
|
+
- [charts] Fix `null` in line chart using dataset (#11550) @alexfauquette
|
|
74
|
+
|
|
75
|
+
### Tree View
|
|
76
|
+
|
|
77
|
+
#### Breaking changes
|
|
78
|
+
|
|
79
|
+
- The expansion props have been renamed to better describe their behaviors:
|
|
80
|
+
|
|
81
|
+
| Old name | New name |
|
|
82
|
+
| :---------------- | :---------------------- |
|
|
83
|
+
| `onNodeToggle` | `onExpandedNodesChange` |
|
|
84
|
+
| `expanded` | `expandedNodes` |
|
|
85
|
+
| `defaultExpanded` | `defaultExpandedNodes` |
|
|
86
|
+
|
|
87
|
+
```diff
|
|
88
|
+
<TreeView
|
|
89
|
+
- onNodeToggle={handleExpansionChange}
|
|
90
|
+
+ onExpandedNodesChange={handleExpansionChange}
|
|
91
|
+
|
|
92
|
+
- expanded={expandedNodes}
|
|
93
|
+
+ expandedNodes={expandedNodes}
|
|
94
|
+
|
|
95
|
+
- defaultExpanded={defaultExpandedNodes}
|
|
96
|
+
+ defaultExpandedNodes={defaultExpandedNodes}
|
|
97
|
+
/>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- The selection props have been renamed to better describe their behaviors:
|
|
101
|
+
|
|
102
|
+
| Old name | New name |
|
|
103
|
+
| :---------------- | :---------------------- |
|
|
104
|
+
| `onNodeSelect` | `onSelectedNodesChange` |
|
|
105
|
+
| `selected` | `selectedNodes` |
|
|
106
|
+
| `defaultSelected` | `defaultSelectedNodes` |
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
<TreeView
|
|
110
|
+
- onNodeSelect={handleSelectionChange}
|
|
111
|
+
+ onSelectedNodesChange={handleSelectionChange}
|
|
112
|
+
|
|
113
|
+
- selected={selectedNodes}
|
|
114
|
+
+ selectedNodes={selectedNodes}
|
|
115
|
+
|
|
116
|
+
- defaultSelected={defaultSelectedNodes}
|
|
117
|
+
+ defaultSelectedNodes={defaultSelectedNodes}
|
|
118
|
+
/>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-tree-view@7.0.0-alpha.7`
|
|
122
|
+
|
|
123
|
+
- [TreeView] Improve the expansion API (#11476) @flaviendelangle
|
|
124
|
+
- [TreeView] Improve the selection API (#11560) @flaviendelangle
|
|
125
|
+
- [TreeView] Introduce the `items` prop (#11059) @flaviendelangle
|
|
126
|
+
|
|
127
|
+
### Docs
|
|
128
|
+
|
|
129
|
+
- [docs] Add example for TreeView `onNodeExpansionToggle` prop (#11547) @flaviendelangle
|
|
130
|
+
- [docs] Clarify Pickers usage with Luxon (#11545) @LukasTy
|
|
131
|
+
- [docs] Complete transition to next branch (#11521) @oliviertassinari
|
|
132
|
+
- [docs] Fix 404 links in the docs @oliviertassinari
|
|
133
|
+
- [docs] Fix over page fetching @oliviertassinari
|
|
134
|
+
- [docs] Lint `next.config.js` (#11514) @oliviertassinari
|
|
135
|
+
|
|
136
|
+
### Core
|
|
137
|
+
|
|
138
|
+
- [core] Fix release changelog (#11496) @romgrk
|
|
139
|
+
- [core] Fix use of ::before & ::after (#11515) @oliviertassinari
|
|
140
|
+
- [core] Localize the issue template to MUI X (#11511) @oliviertassinari
|
|
141
|
+
- [core] Regen api files (#11542) @flaviendelangle
|
|
142
|
+
- [core] Remove issue emoji @oliviertassinari
|
|
143
|
+
- [core] Sync the release instructions with MUI Core @oliviertassinari
|
|
144
|
+
- [core] Yaml format match most common convention @oliviertassinari
|
|
145
|
+
|
|
146
|
+
## 7.0.0-alpha.6
|
|
147
|
+
|
|
148
|
+
_Dec 22, 2023_
|
|
149
|
+
|
|
150
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
151
|
+
|
|
152
|
+
- 🎁 Data Grid now supports `Date` objects in the `filterModel`
|
|
153
|
+
- 🌍 Improve Russian (ru-RU) locale on the Data Grid
|
|
154
|
+
- 🐞 Bugfixes
|
|
155
|
+
|
|
156
|
+
### Data Grid
|
|
157
|
+
|
|
158
|
+
#### Breaking changes
|
|
159
|
+
|
|
160
|
+
- The filter panel no longer uses the native version of the [`Select`](https://mui.com/material-ui/react-select/) component for all components.
|
|
161
|
+
- The `getOptionValue` and `getOptionLabel` props were removed from the following components:
|
|
162
|
+
|
|
163
|
+
- `GridEditSingleSelectCell`
|
|
164
|
+
- `GridFilterInputSingleSelect`
|
|
165
|
+
- `GridFilterInputMultipleSingleSelect`
|
|
166
|
+
|
|
167
|
+
Use the `getOptionValue` and `getOptionLabel` properties on the `singleSelect` column definition instead:
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
const column: GridColDef = {
|
|
171
|
+
type: 'singleSelect',
|
|
172
|
+
field: 'country',
|
|
173
|
+
valueOptions: [
|
|
174
|
+
{ code: 'BR', name: 'Brazil' },
|
|
175
|
+
{ code: 'FR', name: 'France' },
|
|
176
|
+
],
|
|
177
|
+
getOptionValue: (value: any) => value.code,
|
|
178
|
+
getOptionLabel: (value: any) => value.name,
|
|
179
|
+
};
|
|
180
|
+
```
|
|
181
|
+
- The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types.
|
|
182
|
+
The `filterModel` still accepts strings as values for `date` and `dateTime` column types,
|
|
183
|
+
but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object.
|
|
184
|
+
|
|
185
|
+
#### `@mui/x-data-grid@7.0.0-alpha.6`
|
|
186
|
+
|
|
187
|
+
- [DataGrid] Fix typos in the JSDoc (#11451) @flaviendelangle
|
|
188
|
+
- [DataGrid] Make `checkboxSelection` respect the `disableMultipleRowSelection` prop (#11448) @cherniavskii
|
|
189
|
+
- [DataGrid] Support `Date` objects in filter model (#7069) @cherniavskii
|
|
190
|
+
- [DataGrid] Use non-native `Select`s by default (#11330) @cherniavskii
|
|
191
|
+
- [l10n] Improve Russian (ru-RU) locale (#11441) @wensiet
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
194
|
+
|
|
195
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.6`.
|
|
196
|
+
|
|
197
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
198
|
+
|
|
199
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.6`.
|
|
200
|
+
|
|
201
|
+
### Date Pickers
|
|
202
|
+
|
|
203
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.6`
|
|
204
|
+
|
|
205
|
+
- [fields] Adjust `PickersInput` sizing styles (#11392) @noraleonte
|
|
206
|
+
- [fields] Fix section pasting (#11447) @LukasTy
|
|
207
|
+
- [pickers] Add `PickersTextField` `standard` and `filled` variants (#11250) @noraleonte
|
|
208
|
+
- [pickers] Cleanup error messages in `PickersSectionList` (#11449) @flaviendelangle
|
|
209
|
+
- [pickers] Create new component `PickersSectionList` (#11352) @flaviendelangle
|
|
210
|
+
|
|
211
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
212
|
+
|
|
213
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.6`.
|
|
214
|
+
|
|
215
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
216
|
+
|
|
217
|
+
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
218
|
+
- [charts] Improve dataset typing (#11372) @alexfauquette
|
|
219
|
+
- [charts] Make error message more explicit (#11457) @alexfauquette
|
|
220
|
+
- [charts] Make the helper `ChartsText` component public (#11370) @alexfauquette
|
|
221
|
+
|
|
222
|
+
### Docs
|
|
223
|
+
|
|
224
|
+
- [docs] Document `false` default values for boolean props (#11477) @cherniavskii
|
|
225
|
+
- [docs] Improve Pickers `name` prop examples (#11422) @LukasTy
|
|
226
|
+
- [docs] Limit `date-fns` package to v2 in codesandbox (#11463) @LukasTy
|
|
227
|
+
|
|
228
|
+
### Core
|
|
229
|
+
|
|
230
|
+
- [core] Add missing breaking changes to changelog (#11420) @MBilalShafi
|
|
231
|
+
- [core] Cherry pick follow up (#11469) @LukasTy
|
|
232
|
+
- [core] Fix `cherry-pick` action (#11446) @LukasTy
|
|
233
|
+
- [core] Fix security regressions in cherry-pick-next-to-master.yml (#11482) @MBilalShafi
|
|
234
|
+
- [test] Reload the page if its blank and there are no links to the remaining tests (#11466) @cherniavskii
|
|
235
|
+
|
|
236
|
+
## 7.0.0-alpha.5
|
|
237
|
+
|
|
238
|
+
_Dec 14, 2023_
|
|
239
|
+
|
|
240
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
241
|
+
|
|
242
|
+
- 💫 New recipe added for the Data Grid
|
|
243
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
244
|
+
- 🐞 Bugfixes
|
|
245
|
+
|
|
246
|
+
### Data Grid
|
|
247
|
+
|
|
248
|
+
#### Breaking changes
|
|
249
|
+
|
|
250
|
+
- The `instanceId` prop is now required for state selectors.
|
|
251
|
+
This prop is used to distinguish between multiple Data Grid instances on the same page.
|
|
252
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#instanceid-prop-is-required-for-state-selectors) for more details.
|
|
253
|
+
|
|
254
|
+
#### `@mui/x-data-grid@7.0.0-alpha.5`
|
|
255
|
+
|
|
256
|
+
- [DataGrid] Make `instanceId` required for state selectors (#11395) @cherniavskii
|
|
257
|
+
- [DataGrid] Recipe for grouped rows autosizing (#11401) @michelengelen
|
|
258
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11373) @fredrikcarlbom
|
|
259
|
+
- [l10n] Improve Urdu (ur-PK) locale (#11400) @MBilalShafi
|
|
260
|
+
|
|
261
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
262
|
+
|
|
263
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.5`.
|
|
264
|
+
|
|
265
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
266
|
+
|
|
267
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
268
|
+
|
|
269
|
+
### Date Pickers
|
|
270
|
+
|
|
271
|
+
#### Breaking changes
|
|
272
|
+
|
|
273
|
+
- The slot interfaces got renamed to match with `@mui/base` naming.
|
|
274
|
+
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
275
|
+
|
|
276
|
+
```diff
|
|
277
|
+
- DateCalendarSlotsComponent
|
|
278
|
+
+ DateCalendarSlots
|
|
279
|
+
- DateCalendarSlotsComponentsProps
|
|
280
|
+
+ DateCalendarSlotProps
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
- Move `inputRef` inside the props passed to the field hooks
|
|
284
|
+
|
|
285
|
+
The field hooks now only receive the props instead of an object containing both the props and the `inputRef`.
|
|
286
|
+
|
|
287
|
+
```diff
|
|
288
|
+
- const { inputRef, ...otherProps } = props
|
|
289
|
+
- const fieldResponse = useDateField({ props: otherProps, inputRef });
|
|
290
|
+
+ const fieldResponse = useDateField(props);
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
If you are using a multi input range field hook, the same applies to `startInputRef` and `endInputRef` params
|
|
294
|
+
|
|
295
|
+
```diff
|
|
296
|
+
- const { inputRef: startInputRef, ...otherStartTextFieldProps } = startTextFieldProps
|
|
297
|
+
- const { inputRef: endInputRef, ...otherEndTextFieldProps } = endTextFieldProps
|
|
298
|
+
|
|
299
|
+
const fieldResponse = useMultiInputDateRangeField({
|
|
300
|
+
sharedProps,
|
|
301
|
+
- startTextFieldProps: otherStartTextFieldProps,
|
|
302
|
+
- endTextFieldProps: otherEndTextFieldProps,
|
|
303
|
+
- startInputRef
|
|
304
|
+
- endInputRef,
|
|
305
|
+
+ startTextFieldProps,
|
|
306
|
+
+ endTextFieldProps
|
|
307
|
+
});
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
- Rename the ref returned by the field hooks to `inputRef`
|
|
311
|
+
|
|
312
|
+
When used with the v6 TextField approach (where the input is an `<input />` HTML element), the field hooks return a ref that needs to be passed to the `<input />` element.
|
|
313
|
+
This ref was previously named `ref` and has been renamed `inputRef` for extra clarity.
|
|
314
|
+
|
|
315
|
+
```diff
|
|
316
|
+
const fieldResponse = useDateField(props);
|
|
317
|
+
|
|
318
|
+
- return <input ref={fieldResponse.ref} />
|
|
319
|
+
+ return <input ref={fieldResponse.inputRef} />
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
If you are using a multi input range field hook, the same applies to the ref in the `startDate` and `endDate` objects
|
|
323
|
+
|
|
324
|
+
```diff
|
|
325
|
+
const fieldResponse = useDateField(props);
|
|
326
|
+
|
|
327
|
+
return (
|
|
328
|
+
<div>
|
|
329
|
+
- <input ref={fieldResponse.startDate.ref} />
|
|
330
|
+
+ <input ref={fieldResponse.startDate.inputRef} />
|
|
331
|
+
<span>–</span>
|
|
332
|
+
- <input ref={fieldResponse.endDate.ref} />
|
|
333
|
+
+ <input ref={fieldResponse.endDate.inputRef} />
|
|
334
|
+
</div>
|
|
335
|
+
)
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
- Restructure the API of `useClearableField`
|
|
339
|
+
|
|
340
|
+
The `useClearableField` hook API has been simplified to now take a `props` parameter instead of a `fieldProps`, `InputProps`, `clearable`, `onClear`, `slots` and `slotProps` parameters.
|
|
341
|
+
|
|
342
|
+
You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
|
|
343
|
+
|
|
344
|
+
```diff
|
|
345
|
+
const fieldResponse = useDateField(props);
|
|
346
|
+
|
|
347
|
+
- const { InputProps, onClear, clearable, slots, slotProps, ...otherFieldProps } = fieldResponse
|
|
348
|
+
- const { InputProps: ProcessedInputProps, fieldProps: processedFieldProps } = useClearableField({
|
|
349
|
+
- fieldProps: otherFieldProps,
|
|
350
|
+
- InputProps,
|
|
351
|
+
- clearable,
|
|
352
|
+
- onClear,
|
|
353
|
+
- slots,
|
|
354
|
+
- slotProps,
|
|
355
|
+
- });
|
|
356
|
+
-
|
|
357
|
+
- return <MyCustomTextField {...processedFieldProps} InputProps={ProcessedInputProps} />
|
|
358
|
+
|
|
359
|
+
+ const processedFieldProps = useClearableField(fieldResponse);
|
|
360
|
+
+
|
|
361
|
+
+ return <MyCustomTextField {...processedFieldProps} />
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
365
|
+
|
|
366
|
+
- [fields] Support empty sections (#10307) @flaviendelangle
|
|
367
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
|
|
368
|
+
- [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
|
|
369
|
+
- [pickers] Rename slots interfaces (#11339) @alexfauquette
|
|
370
|
+
- [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
|
|
371
|
+
- [pickers] Support name prop (#11025) @gitstart
|
|
372
|
+
|
|
373
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
374
|
+
|
|
375
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
|
|
376
|
+
|
|
377
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11273) @kealjones-wk
|
|
378
|
+
|
|
379
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
380
|
+
|
|
381
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
382
|
+
|
|
383
|
+
### `@mui/x-codemod@7.0.0-alpha.5`
|
|
384
|
+
|
|
385
|
+
- [codemod] Add `cellSelection` codemod and update migration guide (#11353) @MBilalShafi
|
|
386
|
+
|
|
387
|
+
### Docs
|
|
388
|
+
|
|
389
|
+
- [docs] Respect GoT books (@janoma) (#11387) @alexfauquette
|
|
390
|
+
|
|
391
|
+
### Core
|
|
392
|
+
|
|
393
|
+
- [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
|
|
394
|
+
- [github] Update `no-response` workflow (#11369) @MBilalShafi
|
|
395
|
+
- [test] Fix flaky screenshots (#11388) @cherniavskii
|
|
396
|
+
|
|
6
397
|
## 7.0.0-alpha.4
|
|
7
398
|
|
|
8
399
|
_Dec 8, 2023_
|
|
@@ -949,6 +1340,139 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
949
1340
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
950
1341
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
951
1342
|
|
|
1343
|
+
## 6.18.7
|
|
1344
|
+
|
|
1345
|
+
_Jan 5, 2024_
|
|
1346
|
+
|
|
1347
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
1348
|
+
|
|
1349
|
+
- 🌍 Improve Czech (cs-CZ) locale on Data Grid (#11429) @wensiet
|
|
1350
|
+
- 🐞 Bugfixes
|
|
1351
|
+
|
|
1352
|
+
### Data Grid
|
|
1353
|
+
|
|
1354
|
+
#### `@mui/x-data-grid@6.18.7`
|
|
1355
|
+
|
|
1356
|
+
- [DataGrid] Don't evaluate `hasEval` when `disableEval` is set (#11553) @reihwald
|
|
1357
|
+
- [l10n] Update Czech (cs-CZ) locale (#11498) @fdebef
|
|
1358
|
+
|
|
1359
|
+
#### `@mui/x-data-grid-pro@6.18.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1360
|
+
|
|
1361
|
+
Same changes as in `@mui/x-data-grid@6.18.7`.
|
|
1362
|
+
|
|
1363
|
+
#### `@mui/x-data-grid-premium@6.18.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1364
|
+
|
|
1365
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.7`.
|
|
1366
|
+
|
|
1367
|
+
### Date Pickers
|
|
1368
|
+
|
|
1369
|
+
#### `@mui/x-date-pickers@6.18.7`
|
|
1370
|
+
|
|
1371
|
+
- [pickers] Fix views management (@LukasTy) (#11572)
|
|
1372
|
+
|
|
1373
|
+
#### `@mui/x-date-pickers-pro@6.18.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1374
|
+
|
|
1375
|
+
Same changes as in `@mui/x-date-pickers@6.18.7`.
|
|
1376
|
+
|
|
1377
|
+
### Charts / `@mui/x-charts@6.18.7`
|
|
1378
|
+
|
|
1379
|
+
- [charts] Fix `null` in line chart using dataset (@alexfauquette) (#11561)
|
|
1380
|
+
|
|
1381
|
+
### Docs
|
|
1382
|
+
|
|
1383
|
+
- [docs] Clarify Pickers usage with Luxon (#11566) @LukasTy
|
|
1384
|
+
|
|
1385
|
+
## 6.18.6
|
|
1386
|
+
|
|
1387
|
+
_Dec 22, 2023_
|
|
1388
|
+
|
|
1389
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
1390
|
+
|
|
1391
|
+
- 🌍 Improve Russian (ru-RU) locale (#11429) @wensiet
|
|
1392
|
+
- 🐞 Bugfixes
|
|
1393
|
+
|
|
1394
|
+
### Data Grid
|
|
1395
|
+
|
|
1396
|
+
#### `@mui/x-data-grid@6.18.6`
|
|
1397
|
+
|
|
1398
|
+
- [DataGrid] Fix typos in the JSDoc (#11475) @flaviendelangle
|
|
1399
|
+
- [l10n] Improve Russian (ru-RU) locale (#11429) @wensiet
|
|
1400
|
+
|
|
1401
|
+
#### `@mui/x-data-grid-pro@6.18.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1402
|
+
|
|
1403
|
+
Same changes as in `@mui/x-data-grid@6.18.6`.
|
|
1404
|
+
|
|
1405
|
+
#### `@mui/x-data-grid-premium@6.18.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1406
|
+
|
|
1407
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.6`.
|
|
1408
|
+
|
|
1409
|
+
### Date Pickers
|
|
1410
|
+
|
|
1411
|
+
#### `@mui/x-date-pickers@6.18.6`
|
|
1412
|
+
|
|
1413
|
+
- [fields] Fix section pasting (#11467) @LukasTy
|
|
1414
|
+
|
|
1415
|
+
#### `@mui/x-date-pickers-pro@6.18.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1416
|
+
|
|
1417
|
+
Same changes as in `@mui/x-date-pickers@6.18.6`.
|
|
1418
|
+
|
|
1419
|
+
### Charts / `@mui/x-charts@6.18.4`
|
|
1420
|
+
|
|
1421
|
+
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
1422
|
+
- [charts] Make error message more explicit (#11457) @alexfauquette
|
|
1423
|
+
- [charts] Make the helper `ChartsText` component public (#11370) @alexfauquette
|
|
1424
|
+
- [charts] Improve dataset typing (#11372) @alexfauquette
|
|
1425
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
1426
|
+
|
|
1427
|
+
### Docs
|
|
1428
|
+
|
|
1429
|
+
- [docs] Document false default values for boolean props (#11489) @cherniavskii
|
|
1430
|
+
- [docs] Improve Pickers `name` prop examples (#11442) @LukasTy
|
|
1431
|
+
- [docs] Limit `date-fns` package to v2 in codesandbox (#11478) @LukasTy
|
|
1432
|
+
- [test] Reload the page if its blank and there are no links to the remaining tests (#11471) @cherniavskii
|
|
1433
|
+
|
|
1434
|
+
## 6.18.5
|
|
1435
|
+
|
|
1436
|
+
_Dec 14, 2023_
|
|
1437
|
+
|
|
1438
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
1439
|
+
|
|
1440
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
1441
|
+
- 🐞 Bugfixes
|
|
1442
|
+
|
|
1443
|
+
### Data Grid
|
|
1444
|
+
|
|
1445
|
+
#### `@mui/x-data-grid@6.18.5`
|
|
1446
|
+
|
|
1447
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11379) @fredrikcarlbom
|
|
1448
|
+
- [l10n] Improve Urdu (ur-PK) locale for data grid (#11409) @MBilalShafi
|
|
1449
|
+
|
|
1450
|
+
#### `@mui/x-data-grid-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1451
|
+
|
|
1452
|
+
Same changes as in `@mui/x-data-grid@6.18.5`.
|
|
1453
|
+
|
|
1454
|
+
#### `@mui/x-data-grid-premium@6.18.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1455
|
+
|
|
1456
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.5`.
|
|
1457
|
+
|
|
1458
|
+
### Date Pickers
|
|
1459
|
+
|
|
1460
|
+
#### `@mui/x-date-pickers@6.18.5`
|
|
1461
|
+
|
|
1462
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11398) @LukasTy
|
|
1463
|
+
- [pickers] Support name prop (#11380) @gitstart
|
|
1464
|
+
|
|
1465
|
+
#### `@mui/x-date-pickers-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1466
|
+
|
|
1467
|
+
Same changes as in `@mui/x-date-pickers@6.18.5`, plus:
|
|
1468
|
+
|
|
1469
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11376) @kealjones-wk
|
|
1470
|
+
|
|
1471
|
+
### Docs
|
|
1472
|
+
|
|
1473
|
+
- [docs] Respect GoT books (#11294) @janoma
|
|
1474
|
+
- [test] Fix flaky screenshots (#11391) @cherniavskii
|
|
1475
|
+
|
|
952
1476
|
## 6.18.4
|
|
953
1477
|
|
|
954
1478
|
_Dec 8, 2023_
|
package/ChartsAxis/ChartsAxis.js
CHANGED
|
@@ -66,16 +66,16 @@ function ChartsAxis(props) {
|
|
|
66
66
|
const topId = getAxisId(topAxis);
|
|
67
67
|
const rightId = getAxisId(rightAxis);
|
|
68
68
|
if (topId !== null && !xAxis[topId]) {
|
|
69
|
-
throw Error(`MUI: id used for top axis "${topId}" is not defined`);
|
|
69
|
+
throw Error([`MUI-X-Charts: id used for top axis "${topId}" is not defined.`, `Available ids are: ${xAxisIds.join(', ')}.`].join('\n'));
|
|
70
70
|
}
|
|
71
71
|
if (leftId !== null && !yAxis[leftId]) {
|
|
72
|
-
throw Error(`MUI: id used for left axis "${leftId}" is not defined`);
|
|
72
|
+
throw Error([`MUI-X-Charts: id used for left axis "${leftId}" is not defined.`, `Available ids are: ${yAxisIds.join(', ')}.`].join('\n'));
|
|
73
73
|
}
|
|
74
74
|
if (rightId !== null && !yAxis[rightId]) {
|
|
75
|
-
throw Error(`MUI: id used for right axis "${rightId}" is not defined`);
|
|
75
|
+
throw Error([`MUI-X-Charts: id used for right axis "${rightId}" is not defined.`, `Available ids are: ${yAxisIds.join(', ')}.`].join('\n'));
|
|
76
76
|
}
|
|
77
77
|
if (bottomId !== null && !xAxis[bottomId]) {
|
|
78
|
-
throw Error(`MUI: id used for bottom axis "${bottomId}" is not defined`);
|
|
78
|
+
throw Error([`MUI-X-Charts: id used for bottom axis "${bottomId}" is not defined.`, `Available ids are: ${xAxisIds.join(', ')}.`].join('\n'));
|
|
79
79
|
}
|
|
80
80
|
const topAxisProps = mergeProps(topAxis, slots, slotProps);
|
|
81
81
|
const bottomAxisProps = mergeProps(bottomAxis, slots, slotProps);
|
|
@@ -6,7 +6,7 @@ import { FormattedSeries } from '../context/SeriesContextProvider';
|
|
|
6
6
|
import { ChartsLegendClasses } from './chartsLegendClasses';
|
|
7
7
|
import { DefaultizedProps } from '../models/helpers';
|
|
8
8
|
import { LegendParams } from '../models/seriesType/config';
|
|
9
|
-
import { ChartsTextStyle } from '../
|
|
9
|
+
import { ChartsTextStyle } from '../ChartsText';
|
|
10
10
|
import { CardinalDirections } from '../models/layout';
|
|
11
11
|
export interface ChartsLegendSlots {
|
|
12
12
|
legend?: React.JSXElementConstructor<LegendRendererProps>;
|
|
@@ -18,7 +18,8 @@ var _DrawingProvider = require("../context/DrawingProvider");
|
|
|
18
18
|
var _utils3 = require("./utils");
|
|
19
19
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
20
20
|
var _chartsLegendClasses = require("./chartsLegendClasses");
|
|
21
|
-
var _ChartsText = require("../
|
|
21
|
+
var _ChartsText = require("../ChartsText");
|
|
22
|
+
var _getWordsByLines = require("../internals/getWordsByLines");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const _excluded = ["rotate", "dominantBaseline"],
|
|
24
25
|
_excluded2 = ["label"];
|
|
@@ -96,7 +97,7 @@ function DefaultChartsLegend(props) {
|
|
|
96
97
|
const padding = React.useMemo(() => getStandardizedPadding(paddingProps), [paddingProps]);
|
|
97
98
|
const getItemSpace = React.useCallback((label, inStyle = {}) => {
|
|
98
99
|
const style = (0, _objectWithoutPropertiesLoose2.default)(inStyle, _excluded);
|
|
99
|
-
const linesSize = (0,
|
|
100
|
+
const linesSize = (0, _getWordsByLines.getWordsByLines)({
|
|
100
101
|
style,
|
|
101
102
|
needsComputation: true,
|
|
102
103
|
text: label
|