@mui/x-codemod 9.0.0-alpha.2 → 9.0.0-alpha.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,127 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0-alpha.3
|
|
4
|
+
|
|
5
|
+
_Mar 12, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🐞 Bugfixes and internal improvements
|
|
10
|
+
|
|
11
|
+
The following team members contributed to this release:
|
|
12
|
+
@aemartos, @alexfauquette, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @michelengelen, @rita-codes, @sai6855, @siriwatknp
|
|
13
|
+
|
|
14
|
+
### Data Grid
|
|
15
|
+
|
|
16
|
+
#### `@mui/x-data-grid@9.0.0-alpha.3`
|
|
17
|
+
|
|
18
|
+
- [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21265) @michelengelen
|
|
19
|
+
- [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21538) @sai6855
|
|
20
|
+
- [DataGrid] Refactor `headerAlign` style calls (#21541) @sai6855
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
23
|
+
|
|
24
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.3`, plus:
|
|
25
|
+
|
|
26
|
+
- [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21634) @michelengelen
|
|
27
|
+
- [DataGridPro] Fix sorting not reflected in nested server-side data (#21619) @MBilalShafi
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.3`.
|
|
32
|
+
|
|
33
|
+
### Date and Time Pickers
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.3`
|
|
36
|
+
|
|
37
|
+
- [pickers] Refactor `DateRangePickerDay` overrides to use a centralized `elementOverrides` object (#21426) @sai6855
|
|
38
|
+
- [pickers] Migrate from deprecated props for `PickersModalDialog` (#21702) @siriwatknp
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.3`.
|
|
43
|
+
|
|
44
|
+
### Charts
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-charts@9.0.0-alpha.3`
|
|
47
|
+
|
|
48
|
+
- [charts] Differentiate Line Plot roots classes (#21679) @JCQuintas
|
|
49
|
+
- [charts] Enable keyboard navigation by default (#21675) @alexfauquette
|
|
50
|
+
- [charts] Fix keyboard tooltip radar (#21667) @alexfauquette
|
|
51
|
+
- [charts] Fix selector default parameter (#21638) @JCQuintas
|
|
52
|
+
- [charts] Fix tooltip blink between node and pointer anchor (#21611) @alexfauquette
|
|
53
|
+
- [charts] Let tooltip and legend reflect the line shape (#21475) @alexfauquette
|
|
54
|
+
- [charts] Refactor `BarChart` classes structure (#21601) @JCQuintas
|
|
55
|
+
- [charts] Refactor `LineChart` classes structure (#21648) @JCQuintas
|
|
56
|
+
- [charts] Refactor `ScatterChart` classes structure (#21651) @JCQuintas
|
|
57
|
+
- [charts] Refactor `PieChart` classes structure (#21649) @JCQuintas
|
|
58
|
+
- [charts] Remove batch rendering checks in highlight selectors (#21646) @bernardobelchior
|
|
59
|
+
- [charts] Standardize generic arg names to `SeriesType` (#21694) @alexfauquette
|
|
60
|
+
- [charts] Simplify highlight hooks return types (#21695) @alexfauquette
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
63
|
+
|
|
64
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.3`, plus:
|
|
65
|
+
|
|
66
|
+
- [charts-pro] Fix heatmap style override from `arc` to `cell` (#21693) @Copilot
|
|
67
|
+
- [charts-pro] Fix image export truncated when page is zoomed out (#21685) @bernardobelchior
|
|
68
|
+
- [charts-pro] Speed-up heatmap cell search with an index lookup (#21130) @alexfauquette
|
|
69
|
+
- [charts-pro] Fix heatmap highlight not working (#21710) @Copilot
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.3`, plus:
|
|
74
|
+
|
|
75
|
+
- [charts-premium] Re-enable WebGL tests (#21708) @bernardobelchior
|
|
76
|
+
|
|
77
|
+
### Tree View
|
|
78
|
+
|
|
79
|
+
#### Breaking changes
|
|
80
|
+
|
|
81
|
+
- Remove `TreeViewBaseItem` type (use `TreeViewDefaultItemModelProperties` or a custom interface)
|
|
82
|
+
- Remove `useTreeViewApiRef` hook (use `useRichTreeViewApiRef`, `useSimpleTreeViewApiRef`, or `useRichTreeViewProApiRef`)
|
|
83
|
+
- Remove `status` from content slot props returned by `getContentProps()` (use `data-*` attributes; `status` on `useTreeItem` return value is unchanged)
|
|
84
|
+
- Remove deprecated CSS state classes from `treeItemClasses`: `expanded`, `selected`, `focused`, `disabled`, `editable`, `editing` (use `[data-expanded]`, `[data-selected]`, etc.)
|
|
85
|
+
- The `<RichTreeViewPro />` component has now virtualization enabled by default.
|
|
86
|
+
- The items used inside the `<RichTreeViewPro />` now have a default height of `32px`.
|
|
87
|
+
- The events of the `<RichTreeViewPro />` are now rendered as a flat list instead of a nested tree.
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@9.0.0-alpha.3`
|
|
90
|
+
|
|
91
|
+
- [tree view] Remove deprecated APIs (#21591) @flaviendelangle
|
|
92
|
+
- [tree view] Fix collapsed children not selected with `selectionPropagation.descendants` in `SimpleTreeView` (#21253) @flaviendelangle
|
|
93
|
+
|
|
94
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
95
|
+
|
|
96
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.3`, plus:
|
|
97
|
+
|
|
98
|
+
- [RichTreeViewPro] Make the virtualization opt-out and port the layout doc from the data grid (#21461) @flaviendelangle
|
|
99
|
+
|
|
100
|
+
### Codemod
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-codemod@9.0.0-alpha.3`
|
|
103
|
+
|
|
104
|
+
Internal changes.
|
|
105
|
+
|
|
106
|
+
### Docs
|
|
107
|
+
|
|
108
|
+
- [docs] Fix `AssistantWithDataSource` demo crashing (#21555) @sai6855
|
|
109
|
+
- [docs] Remove `Preview` pill from Sankey (#21623) @bernardobelchior
|
|
110
|
+
- [docs] Migrate internal Material UI deprecated APIs (#21680) @siriwatknp
|
|
111
|
+
- [docs] Remove `New` flag on Tree View and Date and Time Pickers features released before v9 alpha (#21585) @flaviendelangle
|
|
112
|
+
|
|
113
|
+
### Core
|
|
114
|
+
|
|
115
|
+
- [code-infra] Remove checkout step (#21688) @Janpot
|
|
116
|
+
- [code-infra] Fix contributor generation in changelog (#21718) @brijeshb42
|
|
117
|
+
- [docs-infra] Do not point to non-existent v8 subdomain (#21640) @cherniavskii
|
|
118
|
+
|
|
119
|
+
### Miscellaneous
|
|
120
|
+
|
|
121
|
+
- [test] Add missing tests for forwarding props to filter operators in DataGrid (#21441) @siriwatknp
|
|
122
|
+
- [x-license] Export additional license types and constants (#21625) @aemartos
|
|
123
|
+
- [x-license] Refactor license verification to accept package info object and add v9 version gating (#21690) @aemartos
|
|
124
|
+
|
|
3
125
|
## 9.0.0-alpha.2
|
|
4
126
|
|
|
5
127
|
_Mar 5, 2026_
|
|
@@ -92,7 +214,7 @@ Internal changes.
|
|
|
92
214
|
|
|
93
215
|
- [docs] Add backticks and parentheses to all functions and hooks (DX-173) (#21496) @mapache-salvaje
|
|
94
216
|
- [docs] Remove mentions of `mySvgRef` (#21559) @bernardobelchior
|
|
95
|
-
- [docs] Update Roadmap section in the docs
|
|
217
|
+
- [docs] Update Roadmap section in the docs (#20892) @alelthomas
|
|
96
218
|
- [docs] Add tutorial and example app for aggregation with row grouping (DX-162) (#21102) @mapache-salvaje
|
|
97
219
|
- [docs] Fix missing codemod docs (#21604) @JCQuintas
|
|
98
220
|
|
package/README.md
CHANGED
|
@@ -102,8 +102,9 @@ The list includes these transformers
|
|
|
102
102
|
- [`rename-chart-container`](#rename-chart-container)
|
|
103
103
|
- [`rename-chart-data-provider`](#rename-chart-data-provider)
|
|
104
104
|
- [`rename-chart-zoom-slider`](#rename-chart-zoom-slider)
|
|
105
|
+
- [`remove-enable-keyboard-navigation`](#remove-enable-keyboard-navigation)
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
#### `replace-heatmap-hide-legend-false`
|
|
107
108
|
|
|
108
109
|
The default value of the `hideLegend` prop in the `Heatmap` component has changed from `true` to `false` in v9. This improves consistency across chart components and developer experience.
|
|
109
110
|
|
|
@@ -113,7 +114,7 @@ The default value of the `hideLegend` prop in the `Heatmap` component has change
|
|
|
113
114
|
/>
|
|
114
115
|
```
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
#### `rename-axis-tooltip-hook`
|
|
117
118
|
|
|
118
119
|
The `useAxisTooltip()` hook has been renamed to `useAxesTooltip()` to better reflect its functionality of handling multiple axes.
|
|
119
120
|
|
|
@@ -138,7 +139,7 @@ After running the codemod to do the renaming make sure to adapt the hook returne
|
|
|
138
139
|
}
|
|
139
140
|
```
|
|
140
141
|
|
|
141
|
-
|
|
142
|
+
#### `rename-chart-api-import`
|
|
142
143
|
|
|
143
144
|
Moves the `ChartApi` type import from `@mui/x-charts/ChartContainer` to `@mui/x-charts/context`.
|
|
144
145
|
|
|
@@ -229,6 +230,16 @@ Renames the `ChartDataProvider` component and related exports to `ChartsDataProv
|
|
|
229
230
|
+import { ChartsDataProviderPro } from '@mui/x-charts-pro/ChartsDataProviderPro';
|
|
230
231
|
```
|
|
231
232
|
|
|
233
|
+
#### `remove-enable-keyboard-navigation`
|
|
234
|
+
|
|
235
|
+
Removes the `enableKeyboardNavigation` props set to `true` since it's now the default behavior.
|
|
236
|
+
|
|
237
|
+
```diff
|
|
238
|
+
<LineChart
|
|
239
|
+
- enableKeyboardNavigation
|
|
240
|
+
/>
|
|
241
|
+
```
|
|
242
|
+
|
|
232
243
|
## v8.0.0
|
|
233
244
|
|
|
234
245
|
### 🚀 `preset-safe` for v8.0.0
|
package/package.json
CHANGED
package/util/removeProps.js
CHANGED
|
@@ -11,6 +11,7 @@ function removeProps({
|
|
|
11
11
|
root,
|
|
12
12
|
componentNames,
|
|
13
13
|
props,
|
|
14
|
+
shouldRemove,
|
|
14
15
|
j
|
|
15
16
|
}) {
|
|
16
17
|
return root.find(j.JSXElement).filter(path => {
|
|
@@ -18,7 +19,7 @@ function removeProps({
|
|
|
18
19
|
}).find(j.JSXAttribute).filter(attribute => props.includes(attribute.node.name.name)).forEach(attribute => {
|
|
19
20
|
// Only remove props from components in componentNames. Not nested ones.
|
|
20
21
|
const attributeParent = attribute.parentPath.parentPath;
|
|
21
|
-
if (attributeParent.value.type === 'JSXOpeningElement' && componentNames.includes(attributeParent.value.name.name)) {
|
|
22
|
+
if (attributeParent.value.type === 'JSXOpeningElement' && componentNames.includes(attributeParent.value.name.name) && (!shouldRemove || shouldRemove(attribute.node))) {
|
|
22
23
|
j(attribute).remove();
|
|
23
24
|
}
|
|
24
25
|
});
|
|
@@ -14,9 +14,10 @@ var renameChartZoomSlider = _interopRequireWildcard(require("../rename-chart-zoo
|
|
|
14
14
|
var replaceHeatmapHideLegend = _interopRequireWildcard(require("../replace-heatmap-hide-legend-false"));
|
|
15
15
|
var renameSankeyChart = _interopRequireWildcard(require("../rename-sankey-chart"));
|
|
16
16
|
var replaceShowMarkDefault = _interopRequireWildcard(require("../replace-show-mark-default"));
|
|
17
|
+
var removeEnableKeyboardNavigation = _interopRequireWildcard(require("../remove-enable-keyboard-navigation"));
|
|
17
18
|
const allModules = [
|
|
18
19
|
// Add other transforms here as they are created
|
|
19
|
-
replaceHeatmapHideLegend, replaceShowMarkDefault, renameIdToSeriesId, renameChartApiImport, renameSankeyChart, renameChartContainer, renameChartDataProvider, renameChartZoomSlider];
|
|
20
|
+
replaceHeatmapHideLegend, replaceShowMarkDefault, removeEnableKeyboardNavigation, renameIdToSeriesId, renameChartApiImport, renameSankeyChart, renameChartContainer, renameChartDataProvider, renameChartZoomSlider];
|
|
20
21
|
function transformer(file, api, options) {
|
|
21
22
|
allModules.forEach(module => {
|
|
22
23
|
file.source = module.default(file, api, options);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
exports.testConfig = void 0;
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
var _removeProps = _interopRequireDefault(require("../../../util/removeProps"));
|
|
11
|
+
var _readFile = _interopRequireDefault(require("../../../util/readFile"));
|
|
12
|
+
const componentNames = ['BarChart', 'LineChart', 'PieChart', 'ScatterChart', 'SparkLineChart', 'RadarChart', 'ChartsContainer', 'BarChartPro', 'LineChartPro', 'PieChartPro', 'ScatterChartPro', 'RadarChartPro', 'FunnelChart', 'Heatmap', 'SankeyChart', 'BarChartPremium', 'HeatmapPremium', 'ChartDataProvider', 'ChartDataProviderPro'];
|
|
13
|
+
function transformer(file, api, options) {
|
|
14
|
+
const j = api.jscodeshift;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
const printOptions = options.printOptions || {
|
|
17
|
+
quote: 'single',
|
|
18
|
+
trailingComma: true
|
|
19
|
+
};
|
|
20
|
+
(0, _removeProps.default)({
|
|
21
|
+
root,
|
|
22
|
+
componentNames,
|
|
23
|
+
props: ['enableKeyboardNavigation'],
|
|
24
|
+
shouldRemove: attribute => {
|
|
25
|
+
// Only remove the prop if it's not explicitly set to false or a variable that could be false.
|
|
26
|
+
if (attribute.value === null) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (attribute.value?.type === 'JSXExpressionContainer') {
|
|
30
|
+
if (attribute.value.expression.type === 'BooleanLiteral') {
|
|
31
|
+
return attribute.value.expression.value !== false;
|
|
32
|
+
}
|
|
33
|
+
// If it's an expression, we can't be sure of its value, so we keep it.
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
},
|
|
37
|
+
j
|
|
38
|
+
});
|
|
39
|
+
return root.toSource(printOptions);
|
|
40
|
+
}
|
|
41
|
+
const testConfig = () => ({
|
|
42
|
+
name: 'remove-enable-keyboard-navigation',
|
|
43
|
+
specFiles: [{
|
|
44
|
+
name: 'remove enableKeyboardNavigation prop',
|
|
45
|
+
actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual.spec.tsx')),
|
|
46
|
+
expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected.spec.tsx'))
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
exports.testConfig = testConfig;
|