@mui/x-tree-view 8.0.0-alpha.2 → 8.0.0-alpha.5

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 (28) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +1 -1
  3. package/hooks/useTreeItemUtils/useTreeItemUtils.d.ts +4 -4
  4. package/index.js +1 -1
  5. package/internals/models/plugin.d.ts +1 -1
  6. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +23 -24
  7. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.d.ts +66 -10
  8. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js +8 -1
  9. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +1 -5
  10. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.d.ts +3 -0
  11. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.js +12 -0
  12. package/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.d.ts +252 -84
  13. package/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +26 -8
  14. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.js +13 -16
  15. package/modern/index.js +1 -1
  16. package/modern/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +23 -24
  17. package/modern/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js +8 -1
  18. package/modern/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.js +12 -0
  19. package/modern/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.js +13 -16
  20. package/modern/useTreeItem/useTreeItem.js +3 -5
  21. package/node/index.js +1 -1
  22. package/node/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +22 -24
  23. package/node/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js +9 -2
  24. package/node/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.js +15 -2
  25. package/node/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.js +13 -16
  26. package/node/useTreeItem/useTreeItem.js +3 -5
  27. package/package.json +4 -4
  28. package/useTreeItem/useTreeItem.js +3 -5
package/CHANGELOG.md CHANGED
@@ -5,6 +5,338 @@
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-alpha.5
9
+
10
+ _Dec 19, 2024_
11
+
12
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🌍 Improve Korean (ko-KR) locale on the Data Grid
15
+ - 🐞 Bugfixes
16
+
17
+ Special thanks go out to the community contributors who have helped make this release possible:
18
+ @good-jinu, @k-rajat19.
19
+ Following are all team members who have contributed to this release:
20
+ @alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.
21
+
22
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
23
+
24
+ ### Data Grid
25
+
26
+ #### Breaking changes
27
+
28
+ - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
29
+
30
+ - For `.root` element, use `slotProps.root`.
31
+ - For `.main` element (the one with `role="grid"`), use `slotProps.main`.
32
+
33
+ - `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:
34
+
35
+ ```diff
36
+ -detailPanelExpandedRowIds?: GridRowId[];
37
+ +detailPanelExpandedRowIds?: Set<GridRowId>;
38
+
39
+ -onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
40
+ +onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
41
+ ```
42
+
43
+ - `apiRef.current.getExpandedDetailPanels` and `apiRef.current.setExpandedDetailPanels` methods receive and return a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
44
+ - `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
45
+ - `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.
46
+
47
+ #### `@mui/x-data-grid@8.0.0-alpha.5`
48
+
49
+ - [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
50
+ - [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
51
+ - [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
52
+ - [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
53
+ - [DataGrid] Remove the Joy UI demo (#15913) @romgrk
54
+ - [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
55
+ - [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
56
+ - [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu
57
+
58
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
59
+
60
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.5`, plus:
61
+
62
+ - [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii
63
+
64
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
65
+
66
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.5`.
67
+
68
+ ### Date and Time Pickers
69
+
70
+ #### Breaking changes
71
+
72
+ - The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).
73
+
74
+ - The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).
75
+
76
+ #### `@mui/x-date-pickers@8.0.0-alpha.5`
77
+
78
+ - [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
79
+ - [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
80
+ - [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle
81
+
82
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
83
+
84
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.5`.
85
+
86
+ ### Charts
87
+
88
+ #### `@mui/x-charts@8.0.0-alpha.5`
89
+
90
+ - [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette
91
+
92
+ #### `@mui/x-charts-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
93
+
94
+ Same changes as in `@mui/x-charts@8.0.0-alpha.5`.
95
+
96
+ ### Tree View
97
+
98
+ #### `@mui/x-tree-view@8.0.0-alpha.5`
99
+
100
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.4`.
101
+
102
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
103
+
104
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.5`.
105
+
106
+ ### Core
107
+
108
+ - [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy
109
+
110
+ ## 8.0.0-alpha.4
111
+
112
+ _Dec 13, 2024_
113
+
114
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
115
+
116
+ - 🌍 Improve Romanian locale on the Data Grid and Pickers
117
+ - 📚 Documentation improvements
118
+ - 🐞 Bugfixes
119
+
120
+ Special thanks go out to the community contributors who have helped make this release possible:
121
+ @k-rajat19, @nusr, @rares985, @zivl.
122
+ Following are all team members who have contributed to this release:
123
+ @alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi.
124
+
125
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
126
+
127
+ ### Data Grid
128
+
129
+ #### Breaking changes
130
+
131
+ - The selectors signature has been updated due to the support of arguments in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
132
+
133
+ ```diff
134
+ -mySelector(state, instanceId)
135
+ +mySelector(state, arguments, instanceId)
136
+ ```
137
+
138
+ - The `useGridSelector` signature has been updated due to the introduction of arguments parameter in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
139
+
140
+ ```diff
141
+ -const output = useGridSelector(apiRef, selector, equals)
142
+ +const output = useGridSelector(apiRef, selector, arguments, equals)
143
+ ```
144
+
145
+ - The default variant for text fields and selects in the filter panel has been changed to `outlined`.
146
+ - The "row spanning" feature is now stable.
147
+ ```diff
148
+ <DataGrid
149
+ - unstable_rowSpanning
150
+ + rowSpanning
151
+ />
152
+ ```
153
+ - Selected row is now deselected when clicked again.
154
+
155
+ #### `@mui/x-data-grid@8.0.0-alpha.4`
156
+
157
+ - [DataGrid] Deselect selected row on click (#15509) @k-rajat19
158
+ - [DataGrid] Fix "No rows" displaying when all rows are pinned (#15335) @nusr
159
+ - [DataGrid] Make row spanning feature stable (#15742) @MBilalShafi
160
+ - [DataGrid] Round dimensions to avoid subpixel rendering error (#15850) @KenanYusuf
161
+ - [DataGrid] Toggle menu on click in `<GridActionsCell />` (#15867) @k-rajat19
162
+ - [DataGrid] Trigger row spanning computation on rows update (#15858) @MBilalShafi
163
+ - [DataGrid] Update filter panel input variant (#15807) @KenanYusuf
164
+ - [DataGrid] Use `columnsManagement` slot (#15817) @k-rajat19
165
+ - [DataGrid] Use new selector signature (#15200) @MBilalShafi
166
+ - [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
167
+
168
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
169
+
170
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.4`, plus:
171
+
172
+ - [DataGridPro] Make row reordering work with pagination (#15355) @k-rajat19
173
+
174
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
175
+
176
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.4`, plus:
177
+
178
+ - [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15739) @arminmeh
179
+
180
+ ### Date and Time Pickers
181
+
182
+ #### `@mui/x-date-pickers@8.0.0-alpha.4`
183
+
184
+ - [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
185
+ - [pickers] Clean `usePicker` logic (#15763) @flaviendelangle
186
+ - [pickers] Rename layout `ownerState` property from `isRtl` to `layoutDirection` (#15803) @flaviendelangle
187
+ - [pickers] Use the new `ownerState` in `useClearableField` (#15776) @flaviendelangle
188
+ - [pickers] Use the new `ownerState` in the toolbar components (#15777) @flaviendelangle
189
+ - [pickers] Use the new `ownerState` object for the clock components and the desktop / mobile wrappers (#15669) @flaviendelangle
190
+
191
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
192
+
193
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.4`.
194
+
195
+ ### Charts
196
+
197
+ #### Breaking changes
198
+
199
+ - The default styling of the charts tooltip has been updated.
200
+
201
+ #### `@mui/x-charts@8.0.0-alpha.4`
202
+
203
+ - [charts] Fix hydration missmatch (#15647) @alexfauquette
204
+ - [charts] Fix internal spelling typo (#15805) @zivl
205
+ - [charts] Fix scatter dataset with missing data (#15802) @alexfauquette
206
+ - [charts] HTML Labels (#15813) @JCQuintas
207
+ - [charts] Only access store values by using hooks (#15764) @alexfauquette
208
+ - [charts] Update Tooltip style (#15630) @alexfauquette
209
+
210
+ #### `@mui/x-charts-pro@8.0.0-alpha.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
211
+
212
+ Same changes as in `@mui/x-charts@8.0.0-alpha.4`.
213
+
214
+ ### Tree View
215
+
216
+ #### `@mui/x-tree-view@8.0.0-alpha.4`
217
+
218
+ No changes, releasing to keep the versions in sync.
219
+
220
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
221
+
222
+ Releasing to benefit from license package fix (#15814).
223
+
224
+ ### Docs
225
+
226
+ - [docs] Clean Joy and Browser custom field demos (#15707) @flaviendelangle
227
+ - [docs] Fix outdated link to handbook (#15855) @oliviertassinari
228
+ - [docs] Improve Pickers accessible DOM migration section description (#15596) @LukasTy
229
+ - [docs] Use `updateRows` method for list view demos (#15732) @KenanYusuf
230
+ - [docs] Use date library version from package dev dependencies for sandboxes (#15762) @LukasTy
231
+
232
+ ### Core
233
+
234
+ - [code-infra] Add Charts sandbox generation (#15830) @JCQuintas
235
+ - [code-infra] Remove redundant `@type/react-test-renderer` dep (#15766) @LukasTy
236
+ - [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15814) @arminmeh
237
+
238
+ ## 8.0.0-alpha.3
239
+
240
+ _Dec 5, 2024_
241
+
242
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
243
+
244
+ - 💫 Support [Server-side lazy loading](https://mui.com/x/react-data-grid/server-side-data/lazy-loading/) on the Data Grid. Use [data source](https://mui.com/x/react-data-grid/server-side-data/#data-source) to fetch a range of rows on demand and update the rows in the same way as described in [Infinite loading](https://mui.com/x/react-data-grid/row-updates/#infinite-loading) and [Lazy loading](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) without the need to use any additional event listeners and callbacks.
245
+ - 🎯 Improved [data caching](https://mui.com/x/react-data-grid/server-side-data/#data-caching). Check out our [recommendations](https://mui.com/x/react-data-grid/server-side-data/#improving-the-cache-hit-rate) for improving the cache hit rate.
246
+
247
+ Special thanks go out to the community contributors who have helped make this release possible:
248
+ @ihsanberkozcan, @k-rajat19, @perezShaked.
249
+ Following are all team members who have contributed to this release:
250
+ @arminmeh, @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte.
251
+
252
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
253
+
254
+ ### Data Grid
255
+
256
+ #### Breaking changes
257
+
258
+ - The "Select all" checkbox is now checked when all the selectable rows are selected, ignoring rows that are not selectable because of the `isRowSelectable` prop.
259
+ - The `rowPositionsDebounceMs` prop was removed.
260
+ - The `gridRowsDataRowIdToIdLookupSelector` selector was removed. Use the `gridRowsLookupSelector` selector in combination with the `getRowId()` API method instead.
261
+ ```diff
262
+ -const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
263
+ -const rowId = idToIdLookup[id]
264
+ +const rowsLookup = gridRowsLookupSelector(apiRef);
265
+ +const rowId = apiRef.current.getRowId(rowsLookup[id])
266
+ ```
267
+ - The Grid is now more aligned with the WAI-ARIA authoring practices and sets the `role` attribute to `treegrid` if the Data Grid is used with row grouping feature.
268
+
269
+ #### `@mui/x-data-grid@8.0.0-alpha.3`
270
+
271
+ - [DataGrid] Fix deselection not working with `isRowSelectable` (#15692) @MBilalShafi
272
+ - [DataGrid] Make column autosizing work with flex columns (#15465) @cherniavskii
273
+ - [DataGrid] Remove `gridRowsDataRowIdToIdLookupSelector` selector (#15698) @arminmeh
274
+ - [DataGrid] Remove `rowPositionsDebounceMs` prop (#15482) @k-rajat19
275
+ - [l10n] Improve Hebrew (he-IL) locale (#15699) @perezShaked
276
+ - [l10n] Improve Turkish (tr-TR) locale (#15734) @ihsanberkozcan
277
+
278
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
279
+
280
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.3`, plus:
281
+
282
+ - [DataGridPro] Cleanup pinned rows on removal (#15697) @cherniavskii
283
+ - [DataGridPro] Server-side lazy loading (#13878) @arminmeh
284
+
285
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
286
+
287
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.3`, plus:
288
+
289
+ - [DataGridPremium] Remove the `ariaV8` experimental flag (#15694) @arminmeh
290
+
291
+ ### Date and Time Pickers
292
+
293
+ #### Breaking changes
294
+
295
+ - The `onOpen()` and `onClose()` methods of the `usePickerContext()` hook have been replaced with a single `setOpen` method — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usepickercontext).
296
+
297
+ #### `@mui/x-date-pickers@8.0.0-alpha.3`
298
+
299
+ - [pickers] Replace the `onOpen()` and `onClose()` methods of `usePickerContext()` with a single `setOpen()` method. (#15701) @flaviendelangle
300
+
301
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
302
+
303
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.3`.
304
+
305
+ ### Charts
306
+
307
+ #### `@mui/x-charts@8.0.0-alpha.3`
308
+
309
+ - [charts] Improve SVG `pattern` and `gradient` support (#15720) @JCQuintas
310
+
311
+ #### `@mui/x-charts-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
312
+
313
+ Same changes as in `@mui/x-charts@8.0.0-alpha.3`.
314
+
315
+ ### Tree View
316
+
317
+ #### `@mui/x-tree-view@8.0.0-alpha.3`
318
+
319
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.2`.
320
+
321
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
322
+
323
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.3`.
324
+
325
+ ### Docs
326
+
327
+ - [docs] Add a customization demo for the Date and Time Pickers overview page (#15118) @noraleonte
328
+ - [docs] Fix typo in charts axis documentation (#15743) @JCQuintas
329
+ - [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
330
+
331
+ ### Core
332
+
333
+ - [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15316) @flaviendelangle
334
+ - [code-infra] Lock file maintenance (#11894)
335
+ - [code-infra] Check if `preset-safe` folder exists in codemod test (#15703) @JCQuintas
336
+ - [code-infra] Import Pickers `preset-safe` into global codemod config (#15659) @JCQuintas
337
+ - [code-infra] Playwright 1.49 (#15493) @JCQuintas
338
+ - [test] Force hover in headless Chrome (#15710) @cherniavskii
339
+
8
340
  ## v8.0.0-alpha.2
9
341
 
10
342
  _Nov 29, 2024_
@@ -465,6 +797,153 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
465
797
  - [release] v8 preparation (#15054) @michelengelen
466
798
  - [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
467
799
 
800
+ ## 7.23.2
801
+
802
+ _Dec 12, 2024_
803
+
804
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
805
+
806
+ - 🌍 Improve Romanian and Turkish locales on the Data Grid
807
+ - 🌍 Improve Romanian locale on the Pickers
808
+ - 📚 Documentation improvements
809
+ - 🐞 Bugfixes
810
+
811
+ Special thanks go out to the community contributors who have helped make this release possible:
812
+ @ihsanberkozcan, @k-rajat19, @lhilgert9, @nusr, @rares985.
813
+
814
+ Following are all team members who have contributed to this release:
815
+ @alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy.
816
+
817
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
818
+
819
+ ### Data Grid
820
+
821
+ #### `@mui/x-data-grid@7.23.2`
822
+
823
+ - [DataGrid] Fix "No rows" displaying when all rows are pinned (#15851) @nusr
824
+ - [DataGrid] Use `columnsManagement` slot (#15821) @k-rajat19
825
+ - [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
826
+ - [l10n] Improve Turkish (tr-TR) locale (#15748) @ihsanberkozcan
827
+
828
+ #### `@mui/x-data-grid-pro@7.23.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
829
+
830
+ Same changes as in `@mui/x-data-grid@7.23.2`, plus:
831
+
832
+ - [DataGridPro] Make Row reordering work with pagination (#15782) @k-rajat19
833
+
834
+ #### `@mui/x-data-grid-premium@7.23.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
835
+
836
+ Same changes as in `@mui/x-data-grid-pro@7.23.2`, plus:
837
+
838
+ - [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15754) @arminmeh
839
+
840
+ ### Date and Time Pickers
841
+
842
+ #### `@mui/x-date-pickers@7.23.2`
843
+
844
+ - [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
845
+
846
+ #### `@mui/x-date-pickers-pro@7.23.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
847
+
848
+ Same changes as in `@mui/x-date-pickers@7.23.2`.
849
+
850
+ ### Charts
851
+
852
+ #### `@mui/x-charts@7.23.2`
853
+
854
+ - [charts] Fix key generation for the ChartsGrid (#15864) @alexfauquette
855
+ - [charts] Fix scatter dataset with missing data (#15804) @alexfauquette
856
+
857
+ #### `@mui/x-charts-pro@7.23.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
858
+
859
+ Same changes as in `@mui/x-charts@7.23.2`.
860
+
861
+ #### `@mui/x-tree-view@v7.23.2`
862
+
863
+ No changes, releasing to keep the versions in sync.
864
+
865
+ #### `@mui/x-tree-view-pro@7.23.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
866
+
867
+ Releasing to benefit from license package fix (#15818).
868
+
869
+ ### Docs
870
+
871
+ - [docs] Fix typo in charts axis documentation (#15746) @JCQuintas
872
+ - [docs] Improve Pickers accessible DOM structure description (#15752) @LukasTy
873
+ - [docs] Use `updateRows` method for list view demos (#15824) @KenanYusuf
874
+ - [docs] Use date library version from package dev dependencies for sandboxes (#15767) @LukasTy
875
+
876
+ ### Core
877
+
878
+ - [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
879
+ - [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15818) @arminmeh
880
+
881
+ ## 7.23.1
882
+
883
+ _Dec 5, 2024_
884
+
885
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
886
+
887
+ - 🌍 Improve German locale on the Data Grid component
888
+ - 🐞 Bugfixes
889
+
890
+ Special thanks go out to the community contributors who have helped make this release possible:
891
+ @lhilgert9.
892
+
893
+ Following are all team members who have contributed to this release:
894
+ @arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy and @MBilalShafi.
895
+
896
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
897
+
898
+ ### Data Grid
899
+
900
+ #### `@mui/x-data-grid@7.23.1`
901
+
902
+ - [DataGrid] Make column autosizing work with flex columns (#15712) @cherniavskii
903
+ - [l10n] Improve German (de-DE) locale (#15641) @lhilgert9
904
+
905
+ #### `@mui/x-data-grid-pro@7.23.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
906
+
907
+ Same changes as in `@mui/x-data-grid@7.23.1`, plus:
908
+
909
+ - [DataGridPro] Cleanup pinned rows on removal (#15702) @cherniavskii
910
+
911
+ #### `@mui/x-data-grid-premium@7.23.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
912
+
913
+ Same changes as in `@mui/x-data-grid-pro@7.23.1`.
914
+
915
+ ### Date and Time Pickers
916
+
917
+ #### `@mui/x-date-pickers@7.23.1`
918
+
919
+ - [TimePicker] Prevent mouse events after `touchend` event (#15430) @arthurbalduini
920
+
921
+ #### `@mui/x-date-pickers-pro@7.23.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
922
+
923
+ Same changes as in `@mui/x-date-pickers@7.23.1`.
924
+
925
+ ### Charts
926
+
927
+ #### `@mui/x-charts@7.23.1`
928
+
929
+ - [charts] Improve SVG `pattern` and `gradient` support (#15724) @JCQuintas
930
+
931
+ #### `@mui/x-charts-pro@7.23.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
932
+
933
+ Same changes as in `@mui/x-charts@7.23.1`.
934
+
935
+ ### Docs
936
+
937
+ - [docs] Fix Pickers theme augmentation example (#15675) @LukasTy
938
+ - [docs] Remove duplicated warning (#15715) @cherniavskii
939
+ - [test] Force hover in headless Chrome (#15711) @cherniavskii
940
+ - [docs-infra] Bump `@mui/internal-markdown` to support nested demo imports (#15738) @alexfauquette
941
+ - [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
942
+
943
+ ### Core
944
+
945
+ - [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
946
+
468
947
  ## 7.23.0
469
948
 
470
949
  _Nov 29, 2024_
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MUI X Tree View
2
2
 
3
3
  This package is the Community plan edition of the Tree View components.
4
- It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { UseTreeViewSelectionSignature } from '../../internals/plugins/useTreeViewSelection';
3
- import { UseTreeViewExpansionSignature } from '../../internals/plugins/useTreeViewExpansion';
4
- import { UseTreeViewItemsSignature } from '../../internals/plugins/useTreeViewItems';
5
- import { UseTreeViewFocusSignature } from '../../internals/plugins/useTreeViewFocus';
2
+ import type { UseTreeViewSelectionSignature } from '../../internals/plugins/useTreeViewSelection';
3
+ import type { UseTreeViewExpansionSignature } from '../../internals/plugins/useTreeViewExpansion';
4
+ import type { UseTreeViewItemsSignature } from '../../internals/plugins/useTreeViewItems';
5
+ import type { UseTreeViewFocusSignature } from '../../internals/plugins/useTreeViewFocus';
6
6
  import { UseTreeViewLabelSignature } from '../../internals/plugins/useTreeViewLabel';
7
7
  import type { UseTreeItemStatus } from '../../useTreeItem';
8
8
  import { TreeViewPublicAPI } from '../../internals/models';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.0.0-alpha.2
2
+ * @mui/x-tree-view v8.0.0-alpha.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -118,7 +118,7 @@ type TreeViewRequiredPlugins<TSignature extends TreeViewAnyPluginSignature> = [
118
118
  ];
119
119
  type PluginPropertyWithDependencies<TSignature extends TreeViewAnyPluginSignature, TProperty extends keyof TreeViewAnyPluginSignature> = TSignature[TProperty] & MergeSignaturesProperty<TreeViewRequiredPlugins<TSignature>, TProperty> & Partial<MergeSignaturesProperty<TSignature['optionalDependencies'], TProperty>>;
120
120
  export type TreeViewUsedParams<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'params'>;
121
- type TreeViewUsedDefaultizedParams<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'defaultizedParams'>;
121
+ export type TreeViewUsedDefaultizedParams<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'defaultizedParams'>;
122
122
  export type TreeViewUsedInstance<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'instance'> & {
123
123
  /**
124
124
  * Private property only defined in TypeScript to be able to access the plugin signature from the instance object.
@@ -1,25 +1,38 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
2
  import useEventCallback from '@mui/utils/useEventCallback';
4
3
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
4
  import { selectorIsItemExpandable, selectorIsItemExpanded } from "./useTreeViewExpansion.selectors.js";
6
- import { createExpandedItemsMap } from "./useTreeViewExpansion.utils.js";
5
+ import { createExpandedItemsMap, getExpansionTrigger } from "./useTreeViewExpansion.utils.js";
7
6
  import { selectorItemMeta, selectorItemOrderedChildrenIds } from "../useTreeViewItems/useTreeViewItems.selectors.js";
8
7
  export const useTreeViewExpansion = ({
9
8
  instance,
10
9
  store,
11
10
  params,
12
- models,
13
- experimentalFeatures
11
+ models
14
12
  }) => {
15
- const isTreeViewEditable = Boolean(params.isItemEditable) && !!experimentalFeatures.labelEditing;
16
13
  useEnhancedEffect(() => {
17
14
  store.update(prevState => _extends({}, prevState, {
18
- expansion: {
15
+ expansion: _extends({}, prevState.expansion, {
19
16
  expandedItemsMap: createExpandedItemsMap(models.expandedItems.value)
20
- }
17
+ })
21
18
  }));
22
19
  }, [store, models.expandedItems.value]);
20
+ useEnhancedEffect(() => {
21
+ store.update(prevState => {
22
+ const newExpansionTrigger = getExpansionTrigger({
23
+ isItemEditable: params.isItemEditable,
24
+ expansionTrigger: params.expansionTrigger
25
+ });
26
+ if (prevState.expansion.expansionTrigger === newExpansionTrigger) {
27
+ return prevState;
28
+ }
29
+ return _extends({}, prevState, {
30
+ expansion: _extends({}, prevState.expansion, {
31
+ expansionTrigger: newExpansionTrigger
32
+ })
33
+ });
34
+ });
35
+ }, [store, params.isItemEditable, params.expansionTrigger]);
23
36
  const setExpandedItems = (event, value) => {
24
37
  params.onExpandedItemsChange?.(event, value);
25
38
  models.expandedItems.setControlledValue(value);
@@ -61,20 +74,6 @@ export const useTreeViewExpansion = ({
61
74
  setExpandedItems(event, newExpanded);
62
75
  }
63
76
  };
64
- const expansionTrigger = React.useMemo(() => {
65
- if (params.expansionTrigger) {
66
- return params.expansionTrigger;
67
- }
68
- if (isTreeViewEditable) {
69
- return 'iconContainer';
70
- }
71
- return 'content';
72
- }, [params.expansionTrigger, isTreeViewEditable]);
73
- const pluginContextValue = React.useMemo(() => ({
74
- expansion: {
75
- expansionTrigger
76
- }
77
- }), [expansionTrigger]);
78
77
  return {
79
78
  publicAPI: {
80
79
  setItemExpansion
@@ -83,8 +82,7 @@ export const useTreeViewExpansion = ({
83
82
  setItemExpansion,
84
83
  toggleItemExpansion,
85
84
  expandAllSiblings
86
- },
87
- contextValue: pluginContextValue
85
+ }
88
86
  };
89
87
  };
90
88
  useTreeViewExpansion.models = {
@@ -100,7 +98,8 @@ useTreeViewExpansion.getDefaultizedParams = ({
100
98
  });
101
99
  useTreeViewExpansion.getInitialState = params => ({
102
100
  expansion: {
103
- expandedItemsMap: createExpandedItemsMap(params.expandedItems === undefined ? params.defaultExpandedItems : params.expandedItems)
101
+ expandedItemsMap: createExpandedItemsMap(params.expandedItems === undefined ? params.defaultExpandedItems : params.expandedItems),
102
+ expansionTrigger: getExpansionTrigger(params)
104
103
  }
105
104
  });
106
105
  useTreeViewExpansion.params = {