@mui/x-tree-view-pro 8.0.0-alpha.0 → 8.0.0-alpha.1

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 +429 -5
  2. package/README.md +2 -2
  3. package/RichTreeViewPro/RichTreeViewPro.js +2 -4
  4. package/RichTreeViewPro/RichTreeViewPro.types.d.ts +3 -16
  5. package/index.js +1 -1
  6. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.js +12 -14
  7. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.js +32 -30
  8. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.selectors.d.ts +159 -0
  9. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.selectors.js +35 -0
  10. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.d.ts +1 -1
  11. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.d.ts +4 -6
  12. package/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.js +25 -17
  13. package/internals/utils/releaseInfo.js +1 -1
  14. package/modern/RichTreeViewPro/RichTreeViewPro.js +2 -4
  15. package/modern/index.js +1 -1
  16. package/modern/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.js +12 -14
  17. package/modern/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.js +32 -30
  18. package/modern/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.selectors.js +35 -0
  19. package/modern/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.js +25 -17
  20. package/modern/internals/utils/releaseInfo.js +1 -1
  21. package/node/RichTreeViewPro/RichTreeViewPro.js +2 -4
  22. package/node/index.js +1 -1
  23. package/node/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.js +11 -13
  24. package/node/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.js +32 -30
  25. package/node/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.selectors.js +42 -0
  26. package/node/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.js +24 -16
  27. package/node/internals/utils/releaseInfo.js +1 -1
  28. package/package.json +8 -6
package/CHANGELOG.md CHANGED
@@ -5,6 +5,148 @@
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
+ ## v8.0.0-alpha.1
9
+
10
+ _Nov 22, 2024_
11
+
12
+ We'd like to offer a big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔧 Refactor Tooltip customisation for charts — [Learn more](https://next.mui.com/x/react-charts/tooltip/#overriding-content).
15
+ - ⚛️ React 19 support
16
+ - 🌍 Improve Chinese, Spanish, and Swedish locale on the Data Grid component
17
+ - 🐞 Bugfixes
18
+ - 📚 Documentation improvements
19
+
20
+ ### Breaking change
21
+
22
+ Special thanks go out to the community contributors who have helped make this release possible:
23
+ @CarlosLopezLg, @headironc, @hendrikpeilke, @k-rajat19, @lhilgert9, @viktormelin.
24
+ Following are all team members who have contributed to this release:
25
+ @alexfauquette, @arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @oliviertassinari, @KenanYusuf, @arminmeh.
26
+
27
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
28
+
29
+ ### Data Grid
30
+
31
+ #### `@mui/x-data-grid@v8.0.0-alpha.1`
32
+
33
+ - [DataGrid] React 19 support (#15342) @arminmeh
34
+ - [DataGrid] Add prop to override search input props in `GridColumnsManagement` (#15347) @k-rajat19
35
+ - [DataGrid] Add test coverage for issues fixed in #15184 (#15282) @MBilalShafi
36
+ - [DataGrid] Change default loading overlay variants (#15504) @KenanYusuf
37
+ - [DataGrid] Fix last separator not being hidden when grid is scrollable (#15543) @KenanYusuf
38
+ - [DataGrid] Fix right column group header border with virtualization (#15470) @hendrikpeilke
39
+ - [DataGrid] Fix row-spanning in combination with column-pinning (#15368) @lhilgert9
40
+ - [l10n] Improve Chinese (zh-CN) locale (#15365) @headironc
41
+ - [l10n] Improve Spanish (es-ES) locale (#15369) @CarlosLopezLg
42
+ - [l10n] Improve Swedish (sv-SE) locale (#15371) @viktormelin
43
+
44
+ #### `@mui/x-data-grid-pro@v8.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
45
+
46
+ Same changes as in `@mui/x-data-grid@v8.0.0-alpha.1`.
47
+
48
+ #### `@mui/x-data-grid-premium@v8.0.0-alpha.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
49
+
50
+ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
51
+
52
+ - [DataGridPremium] Prompt input control (#15401) @arminmeh
53
+
54
+ ### Date and Time Pickers
55
+
56
+ #### Breaking change
57
+
58
+ - The `FieldValueType` type has been renamed to `PickerValueType` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables).
59
+ - The `toolbar` and `layout` slots no longer receive the `disabled` and `readOnly` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
60
+
61
+ #### `@mui/x-date-pickers@v8.0.0-alpha.1`
62
+
63
+ - [fields] Fix focus management with new DOM structure (#15475) @flaviendelangle
64
+ - [pickers] React 19 support (#15342) @arminmeh
65
+ - [pickers] Add new properties to `PickerOwnerState` and `PickerContextValue` (#15415) @flaviendelangle
66
+ - [pickers] Always use `props.value` when it changes (#15490) @flaviendelangle
67
+ - [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
68
+ - [pickers] Fix unused code in `<PickersToolbar />` component (#15515) @LukasTy
69
+ - [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
70
+ - [pickers] Remove the form props from the layout and the toolbar slots (#15492) @flaviendelangle
71
+ - [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15532) @flaviendelangle
72
+ - [TimePicker] Prevent mouse events after `touchend` event (#15346) @arthurbalduini
73
+
74
+ #### `@mui/x-date-pickers-pro@v8.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
75
+
76
+ Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
77
+
78
+ - [DateTimeRangePicker] Use time in `referenceDate` when selecting date (#15429) @LukasTy
79
+
80
+ ### Charts
81
+
82
+ #### Breaking change
83
+
84
+ - The DX of the Tooltip customization has been refactored
85
+ - The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
86
+ - The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
87
+ - To override the tooltip content, use the `useItemTooltip` or `useAxisTooltip` hook to get the data, and wrap your component in `ChartsTooltipContainer` to follow the pointer position.
88
+ - To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
89
+
90
+ - The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
91
+ - This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
92
+ If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
93
+ - The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
94
+ You can still target those elements by using the `MuiLinePlot`, `MuiAreaPlot`, and `MuiBarPlot` and target the appropriate classes `lineElementClasses.root`, `areaElementClasses.root`, `barElementClasses.root`
95
+
96
+ - Removed the `resolveSizeBeforeRender` prop from all chart components — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#remove-resolvesizebeforerender-prop).
97
+ - Removed `width` and `height` props from the `ChartsSurface` component.
98
+ - Removed the `viewport` prop from all charts.
99
+
100
+ #### `@mui/x-charts@v8.0.0-alpha.1`
101
+
102
+ - [charts] React 19 support (#15342) @arminmeh
103
+ - [charts] Decouple `<ChartDataProvider />` and `<ChartsSurface />` (#15375) @JCQuintas
104
+ - [charts] Fix Scatter Chart tooltip wrong defaults (#15537) @JCQuintas
105
+ - [charts] Fix key generation for the `<ChartsGrid />` component (#15463) @alexfauquette
106
+ - [charts] Improve `<SvgRefProvider />` to split the received ref (#15424) @JCQuintas
107
+ - [charts] Move interaction state in store (#15426) @alexfauquette
108
+ - [charts] Refactor Tooltip customisation (#15154) @alexfauquette
109
+ - [charts] Remove intrinsic size requirement (#15471) @JCQuintas
110
+ - [charts] Replace `d3-color` with CSS filter for highlight (#15084) @alexfauquette
111
+ - [charts] Split `<DrawingProvider />` into `<DrawingAreaProvider />` and `<SvgRefProvider />` (#15417) @JCQuintas
112
+
113
+ #### `@mui/x-charts-pro@v8.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
114
+
115
+ Same changes as in `@mui/x-charts@v8.0.0-alpha.1`.
116
+
117
+ ### Tree View
118
+
119
+ #### Breaking changes
120
+
121
+ - The Tree Item component can no longer use `publicAPI` methods in the `render` because they are now memoized — [Learn more](https://next.mui.com/x/migration/migration-tree-view-v7/#stop-using-publicapi-methods-in-the-render).
122
+
123
+ #### `@mui/x-tree-view@v8.0.0-alpha.1`
124
+
125
+ - [TreeView] React 19 support (#15342) @arminmeh
126
+ - [TreeView] Do not re-render every Tree Item when the Rich Tree View re-renders (introduce selectors) (#14210) @flaviendelangle
127
+ - [TreeView] Remove `treeId` from the item context (#15542) @flaviendelangle
128
+ - [TreeView] Remove state mutation in `moveItemInTree()` (#15539) @flaviendelangle
129
+ - [TreeItem] Correct the typing of `slotProps.groupTransition` (#15534) @flaviendelangle
130
+
131
+ ### Docs
132
+
133
+ - [docs] Fix some migration typos (#15422) @LukasTy
134
+ - [docs] Fix typo in migration guide (#15508) @flaviendelangle
135
+ - [docs] Fix 301 redirection in docs @oliviertassinari
136
+ - [docs] Polish Server-side data section (#15330) @oliviertassinari
137
+ - [docs] Use loading state in the demos (#15512) @cherniavskii
138
+
139
+ ### Core
140
+
141
+ - [core] Keep OpenSSF badge up-to-date @oliviertassinari
142
+ - [code-infra] Add `'DensitySelectorGrid'` to time-sensitive argos tests (#15425) @JCQuintas
143
+ - [code-infra] Add documentation to internal types (#15540) @JCQuintas
144
+ - [code-infra] Prevent relative imports across packages (#15437) @JCQuintas
145
+ - [code-infra] Update renovate config to merge `action` pins (#15462) @LukasTy
146
+ - [docs-infra] Fix version tooltip (#15468) @alexfauquette
147
+ - [docs-infra] Transpile `.ts` demo files (#15345) @KenanYusuf
148
+ - [infra] Remove cherry-pick issue write permission (#15456) @oliviertassinari
149
+
8
150
  ## 8.0.0-alpha.0
9
151
 
10
152
  <img width="100%" alt="MUI X v8 Alpha is live" src="https://github.com/user-attachments/assets/114cf615-b617-435f-8499-76ac3c26c57b">
@@ -105,15 +247,15 @@ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.0`.
105
247
 
106
248
  #### Breaking changes
107
249
 
108
- - The `legend` prop got removed. To pass props to the legend, use `slotProps={{ legend: { ... } }}` instead. This can be automatically done with the codemod as long as the `legend` prop does not come from a destructured object — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-props-propagation-✅).
250
+ - The `legend` prop has been removed. To pass props to the legend, use `slotProps={{ legend: { ... } }}` instead. This can be automatically done with the codemod as long as the `legend` prop does not come from a destructured object — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-props-propagation-✅).
109
251
 
110
252
  - The `slots.legend` does not receive the `drawingArea` prop. You can still access your custom legend with the `useDrawingArea()` hook if your custom legend needs it.
111
253
 
112
254
  - Removed or renamed multiple props from Series — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#series-properties-renaming).
113
255
 
114
- - The `highlighted` and `faded` properties of highlightScope were deprecated in favor of `highlight` and `fade`.
256
+ - The `highlighted` and `faded` properties of highlightScope have been deprecated in favor of `highlight` and `fade`.
115
257
  The deprecated ones are now removed.
116
- - The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties got deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.
258
+ - The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties have been deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.
117
259
 
118
260
  - The Pie Chart lost all props and renderer linked to axes because pie chart does not need cartesian axes. If you used it, you can still add them back with composition. Please consider opening an issue to share your use case with us — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#remove-pie-chart-axes).
119
261
 
@@ -196,6 +338,288 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
196
338
  - [release] v8 preparation (#15054) @michelengelen
197
339
  - [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
198
340
 
341
+ ## v7.22.3
342
+
343
+ _Nov 21, 2024_
344
+
345
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
346
+
347
+ - 📊 Charts Pro get stable. The [zoom](https://mui.com/x/react-charts/zoom-and-pan/) and [Heatmap](https://mui.com/x/react-charts/heatmap/) are now stable.
348
+ - 🌍 Improve Chinese, Spanish, Swedish, and Turkish locales on the Data Grid
349
+ - 🐞 Bugfixes
350
+
351
+ Special thanks go out to the community contributors who have helped make this release possible:
352
+ @CarlosLopezLg, @headironc, @viktormelin, @qerkules, @DungTiger, @hendrikpeilke, @k-rajat19.
353
+ Following are all team members who have contributed to this release:
354
+ @alexfauquette, @LukasTy, @MBilalShafi, @flaviendelangle.
355
+
356
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
357
+
358
+ ### Data Grid
359
+
360
+ #### `@mui/x-data-grid@7.22.3`
361
+
362
+ - [DataGrid] Add prop to override search input props in `GridColumnsManagement` (#15476) @k-rajat19
363
+ - [DataGrid] Add test coverage for issues fixed in #15184 @MBilalShafi
364
+ - [DataGrid] Fix memoized selectors with arguments (#15336) @MBilalShafi
365
+ - [DataGrid] Fix right column group header border with virtualization (#15503) @hendrikpeilke
366
+ - [DataGrid] Pass reason to `onPaginationModelChange` (#15402) @DungTiger
367
+ - [DataGrid] Set default overlay height in flex parent layout (#15535) @cherniavskii
368
+ - [l10n] Improve Chinese (zh-CN) locale (#15365) @headironc
369
+ - [l10n] Improve Spanish (es-ES) locale (#15369) @CarlosLopezLg
370
+ - [l10n] Improve Swedish (sv-SE) locale (#15371) @viktormelin
371
+ - [l10n] Improve Turkish (tr-TR) locale (#15414) @qerkules
372
+
373
+ #### `@mui/x-data-grid-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
374
+
375
+ Same changes as in `@mui/x-data-grid@7.22.3`.
376
+
377
+ #### `@mui/x-data-grid-premium@7.22.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
378
+
379
+ Same changes as in `@mui/x-data-grid-pro@7.22.3`.
380
+
381
+ ### Date and Time Pickers
382
+
383
+ #### `@mui/x-date-pickers@7.22.3`
384
+
385
+ - [pickers] Always use `props.value` when it changes (#15500) @flaviendelangle
386
+ - [pickers] Ensure internal value timezone is updated (#15491) @LukasTy
387
+ - [pickers] Fix `DateTimeRangePicker` error when using format without time (#15341) @fxnoob
388
+ - [pickers] Fix unused code in `PickersToolbar` component (#15525) @LukasTy
389
+
390
+ #### `@mui/x-date-pickers-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
391
+
392
+ Same changes as in `@mui/x-date-pickers@7.22.3`, plus:
393
+
394
+ - [DateTimeRangePicker] Use time in `referenceDate` when selecting date (#15431) @LukasTy
395
+
396
+ ### Charts
397
+
398
+ #### `@mui/x-charts@7.22.3`
399
+
400
+ No changes since `@mui/x-charts@7.22.2`.
401
+
402
+ #### `@mui/x-charts-pro@7.22.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
403
+
404
+ - [charts-pro] Fix missing typeOverload (#15400) @alexfauquette
405
+
406
+ ### Docs
407
+
408
+ - [docs] Add `PickersPopper` component to customization playground (#15397) @LukasTy
409
+ - [docs] Add `next` version links (#15423) @LukasTy
410
+ - [docs] Use the `loading` state in the demos (#15538) @cherniavskii
411
+ - [docs] Add data caching to lazy loaded detail panel demo (#15506) @cherniavskii
412
+
413
+ - [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
414
+ - [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
415
+ - [core] Clarify release version bump strategy (#15536) @cherniavskii
416
+
417
+ ## 7.22.2
418
+
419
+ _Nov 8, 2024_
420
+
421
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
422
+
423
+ - 👨🏽‍💻 API enhancements
424
+ - 🐞 Bugfixes
425
+
426
+ Special thanks go out to the community contributors who have helped make this release possible:
427
+ @clins1994, @GuillaumeMeheut, @k-rajat19.
428
+ Following are all team members who have contributed to this release:
429
+ @LukasTy, @MBilalShafi, @KenanYusuf, @arminmeh.
430
+
431
+ ### Upcoming alpha
432
+
433
+ Keep an eye out for the MUI⠀X `v8.0.0-aplha.0` release soon. It will follow a weekly release schedule as always until it is stable.
434
+
435
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
436
+
437
+ ### Data Grid
438
+
439
+ #### `@mui/x-data-grid@7.22.2`
440
+
441
+ - [DataGrid] Fix `null` reference error in `GridVirtualScrollbar` (#15289) @MBilalShafi
442
+ - [DataGrid] Fix filtering with `boolean` column type (#15257) @k-rajat19
443
+ - [DataGrid] Improve row selection propagation trigger (#15274) @MBilalShafi
444
+ - [DataGrid] Preprocess edit cell props on backspace/delete (#15223) @KenanYusuf
445
+ - [DataGrid] Add a recipe to persist column width and order (#15309) @MBilalShafi
446
+
447
+ #### `@mui/x-data-grid-pro@7.22.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
448
+
449
+ Same changes as in `@mui/x-data-grid@7.22.2`, plus:
450
+
451
+ - [DataGridPro] Apply default properties if they are not passed in a reorder column (#15320) @k-rajat19
452
+ - [DataGridPro] Toggle row expansion with `Enter` key in Tree data (#15313) @k-rajat19
453
+
454
+ #### `@mui/x-data-grid-premium@7.22.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
455
+
456
+ Same changes as in `@mui/x-data-grid-pro@7.22.2`, plus:
457
+
458
+ - [DataGridPremium] Fix incorrect rows selection count when selection propagation is enabled with row grouping (#15222) @arminmeh
459
+
460
+ ### Date and Time Pickers
461
+
462
+ #### `@mui/x-date-pickers@7.22.2`
463
+
464
+ - [pickers] Add support for `moment-hijri@3.0.0` (#15248) @LukasTy
465
+
466
+ #### `@mui/x-date-pickers-pro@7.22.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
467
+
468
+ Same changes as in `@mui/x-date-pickers@7.22.2`.
469
+
470
+ ### Charts
471
+
472
+ #### `@mui/x-charts@7.22.2`
473
+
474
+ - [charts] Allow `SeriesValueFormatter` to return `null` value (#15295) @clins1994
475
+ - [charts] Allow configuring the `domainLimit` for each axis. (#15325) @GuillaumeMeheut
476
+
477
+ #### `@mui/x-charts-pro@7.0.0-beta.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
478
+
479
+ Same changes as in `@mui/x-charts@7.22.2`.
480
+
481
+ ## 7.22.1
482
+
483
+ _Nov 1, 2024_
484
+
485
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
486
+
487
+ - 🐞 Bugfixes
488
+ - 📚 Documentation improvements
489
+ - 🌍 Improve Polish (pl-PL) locale on the Date Pickers
490
+
491
+ Special thanks go out to the community contributors who have helped make this release possible:
492
+ @wojtkolos, @dpak-maurya, @k-rajat19.
493
+ Following are all team members who have contributed to this release:
494
+ @LukasTy, @arminmeh, @MBilalShafi, @KenanYusuf, @flaviendelangle.
495
+
496
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
497
+
498
+ ### Data Grid
499
+
500
+ #### `@mui/x-data-grid@7.22.1`
501
+
502
+ - [DataGrid] Fix right column group header border (#15152) @KenanYusuf
503
+ - [DataGrid] Fix scroll jump when holding down arrow keys (#15167) @arminmeh
504
+ - [DataGrid] Move `rowGroupingModelChange` handler to respective hook (#15127) @MBilalShafi
505
+ - [DataGrid] Prevent error when deleting the last row (#15153) @dpak-maurya
506
+ - [DataGrid] Fix overlay height in autoHeight mode (#15205) @cherniavskii
507
+
508
+ #### `@mui/x-data-grid-pro@7.22.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
509
+
510
+ Same changes as in `@mui/x-data-grid@7.22.1`, plus:
511
+
512
+ - [DataGridPro] Add list view tests (#15166) @KenanYusuf
513
+
514
+ #### `@mui/x-data-grid-premium@7.22.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
515
+
516
+ - [DataGridPremium] Keep focus on the grouping cell on space bar press #15155 @k-rajat19
517
+
518
+ ### Date and Time Pickers
519
+
520
+ #### `@mui/x-date-pickers@7.22.1`
521
+
522
+ - [l10n] Improve Polish (pl-PL) locale (#15177) @wojtkolos
523
+
524
+ #### `@mui/x-date-pickers-pro@7.22.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
525
+
526
+ Same changes as in `@mui/x-date-pickers@7.22.1`.
527
+
528
+ ### Tree View
529
+
530
+ #### `@mui/x-tree-view@7.22.1`
531
+
532
+ - [TreeView] Export `TreeItem2DragAndDropOverlay` and `TreeItem2LabelInput` from the root of each package (#15208) @flaviendelangle
533
+ - [TreeView] Fix drag and drop color usage (#15149) @LukasTy
534
+
535
+ #### `@mui/x-tree-view-pro@7.22.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
536
+
537
+ Same changes as in `@mui/x-tree-view@7.22.1`.
538
+
539
+ ### Docs
540
+
541
+ - [docs] Add section explaining how to keep the selection while filtering in Data grid docs (#15199) @arminmeh
542
+
543
+ ## 7.22.0
544
+
545
+ _Oct 25, 2024_
546
+
547
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
548
+
549
+ - 🛰 Introduce [server-side support for Data Grid row grouping](https://mui.com/x/react-data-grid/server-side-data/row-grouping/)
550
+ - 🐞 Bugfixes
551
+ - 📚 Documentation improvements
552
+ - 🌍 Improve Portuguese (pt-BR) locale on the Data Grid component
553
+
554
+ Special thanks go out to the community contributors who have helped make this release possible:
555
+ @clins1994, @GITPHLAP, @k-rajat19, @kalyan90, @merotosc, @yash49.
556
+ Following are all team members who have contributed to this release:
557
+ @cherniavskii, @flaviendelangle, @LukasTy, @MBilalShafi, @romgrk.
558
+
559
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
560
+
561
+ ### Data Grid
562
+
563
+ #### `@mui/x-data-grid@7.22.0`
564
+
565
+ - [DataGrid] Fix `GridPanelAnchor` positioning (#15022) @k-rajat19
566
+ - [DataGrid] Fix ugly prop-types for the `pageStyle` prop of the `GridPrintExportMenuItem` component (#15015) @flaviendelangle
567
+ - [DataGrid] Fix value type in filter model for number and boolean column type (#14733) @k-rajat19
568
+ - [DataGrid] Focus next row when the focused row is deleted (#15067) @cherniavskii
569
+ - [DataGrid] Remove some usages of `<Box />` and `<Badge />` (#15013) @romgrk
570
+ - [DataGrid] Fix number of rows to display for page size options with negative value (#14890) @kalyan90
571
+ - [l10n] Improve Portuguese (pt-BR) locale (#15021) @k-rajat19
572
+
573
+ #### `@mui/x-data-grid-pro@7.22.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
574
+
575
+ Same changes as in `@mui/x-data-grid@7.22.0`, plus:
576
+
577
+ - [DataGridPro] Fix column pinning layout (#15073) @cherniavskii
578
+
579
+ #### `@mui/x-data-grid-premium@7.22.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
580
+
581
+ Same changes as in `@mui/x-data-grid-pro@7.22.0`, plus:
582
+
583
+ - [DataGridPremium] Server-side data source with row grouping (#15109) @MBilalShafi
584
+
585
+ ### Date and Time Pickers
586
+
587
+ #### `@mui/x-date-pickers@7.22.0`
588
+
589
+ - [pickers] Fix `DateCalendar` timezone management (#15119) @LukasTy
590
+ - [pickers] Fix `DigitalClock` time options on a `DST` switch day (#15092) @LukasTy
591
+
592
+ #### `@mui/x-date-pickers-pro@7.22.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
593
+
594
+ Same changes as in `@mui/x-date-pickers@7.22.0`.
595
+
596
+ ### Charts
597
+
598
+ #### `@mui/x-charts@7.22.0`
599
+
600
+ - [charts] Export data type in `onAxisClick(_, data)` callback (#15038) @clins1994
601
+
602
+ #### `@mui/x-charts-pro@7.0.0-beta.6` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
603
+
604
+ Same changes as in `@mui/x-charts@7.22.0`.
605
+
606
+ ### Tree View
607
+
608
+ #### `@mui/x-tree-view@7.22.0`
609
+
610
+ - [TreeView] Make the cancellable event types public (#14992) @flaviendelangle
611
+
612
+ ### Docs
613
+
614
+ - [docs] Fix typo in Tree View docs (#15047) @yash49
615
+
616
+ ### Core
617
+
618
+ - [core] Adjust cherry-pick GH actions (#15101) @LukasTy
619
+ - [core] Update prettier target branch (#15100) @MBilalShafi
620
+ - [core] Update some `default-branch-switch` instances for `v7.x` (#15085) @MBilalShafi
621
+ - [test] Revert to using `fireEvent` instead of `userEvent` (#14927) @LukasTy
622
+
199
623
  ## 7.21.0
200
624
 
201
625
  _Oct 17, 2024_
@@ -4310,7 +4734,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
4310
4734
 
4311
4735
  #### Breaking changes
4312
4736
 
4313
- - The slot interfaces got renamed to match with `@mui/base` naming.
4737
+ - The slot interfaces have been renamed to match with `@mui/base` naming.
4314
4738
  The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
4315
4739
 
4316
4740
  ```diff
@@ -5352,7 +5776,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
5352
5776
 
5353
5777
  #### Breaking changes
5354
5778
 
5355
- Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
5779
+ Types for `slots` and `slotProps` have been renamed by removing the "Component" which is meaningless for charts.
5356
5780
  Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
5357
5781
 
5358
5782
  Here is an example of the renaming for the `<ChartsTooltip />` component.
package/README.md CHANGED
@@ -16,8 +16,8 @@ This component has the following peer dependencies that you need to install as w
16
16
  ```json
17
17
  "peerDependencies": {
18
18
  "@mui/material": "^5.15.14 || ^6.0.0",
19
- "react": "^17.0.0 || ^18.0.0",
20
- "react-dom": "^17.0.0 || ^18.0.0"
19
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
20
+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
21
21
  },
22
22
  ```
23
23
 
@@ -59,8 +59,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
59
59
  }
60
60
  const {
61
61
  getRootProps,
62
- contextValue,
63
- instance
62
+ contextValue
64
63
  } = useTreeView({
65
64
  plugins: RICH_TREE_VIEW_PRO_PLUGINS,
66
65
  rootRef: ref,
@@ -84,8 +83,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
84
83
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
85
84
  children: [/*#__PURE__*/_jsx(RichTreeViewItems, {
86
85
  slots: slots,
87
- slotProps: slotProps,
88
- itemsToRender: instance.getItemsToRender()
86
+ slotProps: slotProps
89
87
  }), /*#__PURE__*/_jsx(Watermark, {
90
88
  packageName: "x-tree-view-pro",
91
89
  releaseInfo: releaseInfo
@@ -2,30 +2,18 @@ import * as React from 'react';
2
2
  import { Theme } from '@mui/material/styles';
3
3
  import { SxProps } from '@mui/system';
4
4
  import { SlotComponentProps } from '@mui/utils';
5
- import { TreeItem, TreeItemProps } from '@mui/x-tree-view/TreeItem';
6
- import { TreeViewItemId } from '@mui/x-tree-view/models';
7
- import { TreeViewPublicAPI, TreeViewExperimentalFeatures } from '@mui/x-tree-view/internals';
5
+ import { TreeViewPublicAPI, TreeViewExperimentalFeatures, RichTreeViewItemsSlots, RichTreeViewItemsSlotProps } from '@mui/x-tree-view/internals';
8
6
  import { RichTreeViewProClasses } from './richTreeViewProClasses';
9
7
  import { RichTreeViewProPluginParameters, RichTreeViewProPluginSlotProps, RichTreeViewProPluginSlots, RichTreeViewProPluginSignatures } from './RichTreeViewPro.plugins';
10
- interface RichTreeViewItemProSlotOwnerState {
11
- itemId: TreeViewItemId;
12
- label: string;
13
- }
14
- export interface RichTreeViewProSlots extends RichTreeViewProPluginSlots {
8
+ export interface RichTreeViewProSlots extends RichTreeViewProPluginSlots, RichTreeViewItemsSlots {
15
9
  /**
16
10
  * Element rendered at the root.
17
11
  * @default RichTreeViewProRoot
18
12
  */
19
13
  root?: React.ElementType;
20
- /**
21
- * Custom component for the item.
22
- * @default TreeItem.
23
- */
24
- item?: React.JSXElementConstructor<TreeItemProps>;
25
14
  }
26
- export interface RichTreeViewProSlotProps<R extends {}, Multiple extends boolean | undefined> extends RichTreeViewProPluginSlotProps {
15
+ export interface RichTreeViewProSlotProps<R extends {}, Multiple extends boolean | undefined> extends RichTreeViewProPluginSlotProps, RichTreeViewItemsSlotProps {
27
16
  root?: SlotComponentProps<'ul', {}, RichTreeViewProProps<R, Multiple>>;
28
- item?: SlotComponentProps<typeof TreeItem, {}, RichTreeViewItemProSlotOwnerState>;
29
17
  }
30
18
  export type RichTreeViewProApiRef = React.MutableRefObject<TreeViewPublicAPI<RichTreeViewProPluginSignatures> | undefined>;
31
19
  export interface RichTreeViewProPropsBase extends React.HTMLAttributes<HTMLUListElement> {
@@ -61,4 +49,3 @@ export interface RichTreeViewProProps<R extends {}, Multiple extends boolean | u
61
49
  */
62
50
  experimentalFeatures?: TreeViewExperimentalFeatures<RichTreeViewProPluginSignatures>;
63
51
  }
64
- export {};
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v8.0.0-alpha.0
2
+ * @mui/x-tree-view-pro v8.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,17 +1,21 @@
1
1
  import * as React from 'react';
2
- import { useTreeViewContext, isTargetInDescendants } from '@mui/x-tree-view/internals';
2
+ import { useTreeViewContext, isTargetInDescendants, useSelector } from '@mui/x-tree-view/internals';
3
+ import { selectorItemsReorderingDraggedItemProperties, selectorItemsReorderingIsValidTarget } from "./useTreeViewItemsReordering.selectors.js";
3
4
  export const isAndroid = () => navigator.userAgent.toLowerCase().includes('android');
4
5
  export const useTreeViewItemsReorderingItemPlugin = ({
5
6
  props
6
7
  }) => {
7
8
  const {
8
- itemsReordering,
9
- instance
9
+ instance,
10
+ store,
11
+ itemsReordering
10
12
  } = useTreeViewContext();
11
13
  const {
12
14
  itemId
13
15
  } = props;
14
16
  const validActionsRef = React.useRef(null);
17
+ const draggedItemProperties = useSelector(store, selectorItemsReorderingDraggedItemProperties, itemId);
18
+ const isValidTarget = useSelector(store, selectorItemsReorderingIsValidTarget, itemId);
15
19
  return {
16
20
  propsEnhancers: {
17
21
  root: ({
@@ -19,8 +23,7 @@ export const useTreeViewItemsReorderingItemPlugin = ({
19
23
  contentRefObject,
20
24
  externalEventHandlers
21
25
  }) => {
22
- const draggable = instance.canItemBeDragged(itemId);
23
- if (!draggable) {
26
+ if (!itemsReordering.enabled || itemsReordering.isItemReorderable && !itemsReordering.isItemReorderable(itemId)) {
24
27
  return {};
25
28
  }
26
29
  const handleDragStart = event => {
@@ -75,8 +78,7 @@ export const useTreeViewItemsReorderingItemPlugin = ({
75
78
  externalEventHandlers,
76
79
  contentRefObject
77
80
  }) => {
78
- const currentDrag = itemsReordering.currentDrag;
79
- if (!currentDrag || currentDrag.draggedItemId === itemId) {
81
+ if (!isValidTarget) {
80
82
  return {};
81
83
  }
82
84
  const handleDragOver = event => {
@@ -109,17 +111,13 @@ export const useTreeViewItemsReorderingItemPlugin = ({
109
111
  };
110
112
  },
111
113
  dragAndDropOverlay: () => {
112
- const currentDrag = itemsReordering.currentDrag;
113
- if (!currentDrag || currentDrag.targetItemId !== itemId || currentDrag.action == null) {
114
+ if (!draggedItemProperties) {
114
115
  return {};
115
116
  }
116
- const targetDepth = currentDrag.newPosition?.parentId == null ? 0 :
117
- // The depth is always defined because drag&drop is only usable with Rich Tree View components.
118
- instance.getItemMeta(currentDrag.newPosition.parentId).depth + 1;
119
117
  return {
120
- action: currentDrag.action,
118
+ action: draggedItemProperties.action,
121
119
  style: {
122
- '--TreeView-targetDepth': targetDepth
120
+ '--TreeView-targetDepth': draggedItemProperties.targetDepth
123
121
  }
124
122
  };
125
123
  }