@mui/x-tree-view-pro 7.19.0 → 7.21.0

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
@@ -3,6 +3,185 @@
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.21.0
7
+
8
+ _Oct 17, 2024_
9
+
10
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 Added [`dataset` prop support for the Scatter Chart component](https://mui.com/x/react-charts/scatter/#using-a-dataset)
13
+ - 🐞 Bugfixes
14
+ - 📚 Documentation improvements
15
+
16
+ Special thanks go out to the community contributors who have helped make this release possible:
17
+ @k-rajat19, @kalyan90, @rotembarsela, @wangkailang.
18
+ Following are all team members who have contributed to this release:
19
+ @arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @KenanYusuf, @oliviertassinari, @samuelsycamore.
20
+
21
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@7.21.0`
26
+
27
+ - [DataGrid] Fix `onRowSelectionModelChange` firing unnecessarily on initial render (#14909) @MBilalShafi
28
+ - [DataGrid] Fix `onRowSelectionModelChange` not being called after row is removed (#14972) @arminmeh
29
+ - [DataGrid] Fix pagination scrollbar issue on small zoom (#14911) @cherniavskii
30
+ - [DataGrid] Fix scroll jumping (#14929) @romgrk
31
+ - [DataGrid] Fix excessive white space at the end of the Data Grid (#14864) @kalyan90
32
+
33
+ #### `@mui/x-data-grid-pro@7.21.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@7.21.0`, plus:
36
+
37
+ - [DataGridPro] Fix indeterminate checkbox state for server-side data (#14956) @MBilalShafi
38
+ - [DataGridPro] Fix scrolling performance when `rowHeight={undefined}` (#14983) @cherniavskii
39
+ - [DataGridPro] List view (#14393) @KenanYusuf @cherniavskii
40
+
41
+ #### `@mui/x-data-grid-premium@7.21.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
42
+
43
+ Same changes as in `@mui/x-data-grid-pro@7.21.0`.
44
+
45
+ ### Date and Time Pickers
46
+
47
+ #### `@mui/x-date-pickers@7.21.0`
48
+
49
+ - [pickers] Cleanup `PageUp` and `PageDown` event handlers on time components (#14928) @arthurbalduini
50
+ - [pickers] Create the new picker's `ownerState` object (#14889) @flaviendelangle
51
+ - [pickers] Fix `PickerValidDate` usage in the Date Range Picker Toolbar (#14925) @flaviendelangle
52
+
53
+ #### `@mui/x-date-pickers-pro@7.21.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
54
+
55
+ Same changes as in `@mui/x-date-pickers@7.21.0`.
56
+
57
+ ### Charts
58
+
59
+ #### `@mui/x-charts@7.21.0`
60
+
61
+ - [charts] Allow `dataset` to be used with the Scatter Chart (#14915) @JCQuintas
62
+ - [charts] Ensure `reduce motion` preference disables animation on page load (#14417) @JCQuintas
63
+
64
+ #### `@mui/x-charts-pro@7.0.0-beta.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@7.21.0`.
67
+
68
+ ### Tree View
69
+
70
+ #### `@mui/x-tree-view@7.21.0`
71
+
72
+ - [TreeView] Fix `alpha` usage with CSS variables (#14969) @wangkailang
73
+ - [TreeView] Fix usage of the `aria-selected` attribute (#14991) @flaviendelangle
74
+ - [TreeView] Fix hydration error (#15002) @flaviendelangle
75
+
76
+ ### `@mui/x-codemod@7.21.0`
77
+
78
+ - [codemod] Add a new utility to rename imports (#14919) @flaviendelangle
79
+
80
+ ### Docs
81
+
82
+ - [docs] Add recipe showing how to toggle detail panels on row click (#14666) @k-rajat19
83
+ - [docs] Fix broken link to the validation section in the Data grid component (#14973) @arminmeh
84
+ - [docs] Update v5 migration codesandbox @oliviertassinari
85
+ - [docs] Enforce component style rules for the Tree View (#14963) @samuelsycamore
86
+
87
+ ### Core
88
+
89
+ - [core] Fix shortcut with localization keyboard (#14220) @rotembarsela
90
+ - [core] Fix docs deploy command (#14920) @arminmeh
91
+ - [code-infra] Prepare some tests to work in `vitest/playwright` (#14926) @JCQuintas
92
+ - [test] Fix `AdapterDayjs` coverage calculation (#14957) @LukasTy
93
+ - [test] Fix split infinitive API convention use @oliviertassinari
94
+
95
+ ## 7.20.0
96
+
97
+ _Oct 11, 2024_
98
+
99
+ We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
100
+
101
+ - 📚 Updated ["What's new"](https://mui.com/x/whats-new/) page giving more detailed overview of the latest new features and other highlights
102
+ - 📚 New [collapsible column groups demo](https://mui.com/x/react-data-grid/column-groups/#collapsible-column-groups) for the Data Grid component
103
+ - 📚 New [Tree Item Customization](https://mui.com/x/react-tree-view/tree-item-customization/) documentation to learn how to use the new APIs to create custom Tree Items. The old APIs (`props.ContentComponent` and `props.ContentProps`) have been deprecated and will be removed in the new major version of the Tree View component.
104
+ - 🌍 Improve Japanese (ja-JP) locale on the Data Grid component
105
+ - 🐞 Bugfixes
106
+ - 📚 Other documentation improvements
107
+
108
+ Special thanks go out to the community contributors who have helped make this release possible:
109
+ @k-rajat19, @kalyan90, @uma-neko, @vfbiby.
110
+ Following are all team members who have contributed to this release: @alelthomas, @arminmeh, @arthurbalduini,
111
+ @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte, @oliviertassinari, @samuelsycamore, @siriwatknp.
112
+
113
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
114
+
115
+ ### Data Grid
116
+
117
+ #### `@mui/x-data-grid@7.20.0`
118
+
119
+ - [DataGrid] Add `onColumnHeaderContextMenu` event (#14734) @vfbiby
120
+ - [DataGrid] Avoid row spanning computation of outdated rows (#14902) @MBilalShafi
121
+ - [DataGrid] Fix scrollbar position not being updated after `scrollToIndexes` (#14888) @arminmeh
122
+ - [DataGrid] Pass `rowId` param to `processRowUpdate` (#14821) @k-rajat19
123
+ - [l10n] Improve Japanese (ja-JP) locale (#14870) @uma-neko
124
+
125
+ #### `@mui/x-data-grid-pro@7.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
126
+
127
+ Same changes as in `@mui/x-data-grid@7.20.0`, plus:
128
+
129
+ - [DataGridPro] Fix wording on the `rowSelectionPropagation` JSDoc and doc section (#14907) @flaviendelangle
130
+
131
+ #### `@mui/x-data-grid-premium@7.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
132
+
133
+ Same changes as in `@mui/x-data-grid-pro@7.20.0`.
134
+
135
+ ### Date and Time Pickers
136
+
137
+ #### `@mui/x-date-pickers@7.20.0`
138
+
139
+ - [pickers] Add `PageUp` and `PageDown` support for time components (#14812) @arthurbalduini
140
+ - [pickers] Fix regression on `PickerValidDate` (#14896) @flaviendelangle
141
+ - [pickers] Move the `DateFieldInPickerProps` interface to the `DatePicker` folder and rename it `DatePickerFieldProps` (same for time and date time) (#14828) @flaviendelangle
142
+
143
+ #### `@mui/x-date-pickers-pro@7.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
144
+
145
+ Same changes as in `@mui/x-date-pickers@7.20.0`.
146
+
147
+ ### Charts
148
+
149
+ #### `@mui/x-charts@7.20.0`
150
+
151
+ No changes since `@mui/x-charts@v7.19.0`.
152
+
153
+ #### `@mui/x-charts-pro@7.0.0-beta.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
154
+
155
+ Same changes as in `@mui/x-charts@7.20.0`.
156
+
157
+ ### Tree View
158
+
159
+ #### `@mui/x-tree-view@7.20.0`
160
+
161
+ - [TreeItem] Deprecate the `ContentComponent` and `ContentProps` props (#14908) @flaviendelangle
162
+ - [TreeView] Rework how items are being rendered in Rich Tree View components (#14749) @flaviendelangle
163
+
164
+ ### Docs
165
+
166
+ - [docs] Update "What's new" page (#14858) @cherniavskii
167
+ - [docs] Add collapsible column groups demo (#14818) @cherniavskii
168
+ - [docs] Add custom columns panel demo (#14825) @cherniavskii
169
+ - [docs] Capitalize all instances of "Data Grid" (#14884) @samuelsycamore
170
+ - [docs] Divide charts `tooltip` and `highlighting` pages (#14824) @JCQuintas
171
+ - [docs] Document the `<TreeItem2 />` component and the `useTreeItem2` hook (#14551) @noraleonte
172
+ - [docs] Fix column pinning for "Disable detail panel content scroll" section (#14854 and #14885) @kalyan90
173
+ - [docs] Fix detail panel demo not working well with pinned columns (#14883) @cherniavskii
174
+ - [docs] New recipe of a read-only field (#14606) @flaviendelangle
175
+ - [docs] Change demo name example (#14822) @alelthomas
176
+
177
+ ### Core
178
+
179
+ - [core] Support `@mui/utils` v6 (#14867) @siriwatknp
180
+ - [code-infra] Remove deprecated `data-mui-test` in favour of `data-testid` (#14882) @JCQuintas
181
+ - [code-infra] Update renovate config and add a `vitest` group (#14856) @JCQuintas
182
+ - [test] Replace `waitFor()` with `act()` (#14851) @oliviertassinari
183
+ - [test] Restore "pnpm tc" CLI (#14852) @oliviertassinari
184
+
6
185
  ## 7.19.0
7
186
 
8
187
  _Oct 4, 2024_
@@ -90,13 +269,13 @@ Same changes as in `@mui/x-charts@7.19.0`.
90
269
 
91
270
  - [TreeView] Apply experimental features in `getDefaultizedParams` instead of in the plugin render (#14661) @flaviendelangle
92
271
  - [TreeView] Export `publicAPI` form `useTreeItem2Utils` (#14729) @noraleonte
93
- - [TreeView] Fix cursor navigation interfering with browser shortcut keys (#14798) @sai6855
272
+ - [TreeView] Fix cursor navigation interfering with browser shortcut keys (#14798) @sai6855
94
273
  - [TreeView] Fix invalid test for items reordering (#14665) @flaviendelangle
95
274
  - [TreeView] Remove `instance.getTreeItemIdAttribute` (#14667) @flaviendelangle
96
275
 
97
276
  ### Docs
98
277
 
99
- - [docs] Added warning callout for Firefox reordering bug (#14516) @michelengelen
278
+ - [docs] Added warning callout for Firefox reordering bug (#14516) @michelengelen
100
279
  - [docs] Copyedit `pages.ts` navigation (#14782) @samuelsycamore
101
280
  - [docs] Fix typo in row spanning doc (#14770) @flaviendelangle
102
281
  - [docs] Fix typo in the Tree View migration guide to v7 (#14727) @Sanderand
@@ -121,7 +300,7 @@ We'd like to offer a big thanks to the 14 contributors who made this release pos
121
300
 
122
301
  - 💫 Support [Row spanning](https://mui.com/x/react-data-grid/row-spanning/) on the Data Grid that automatically merges the consecutive cells in a column based on the cell value
123
302
 
124
- <img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
303
+ <img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="Data Grid row spanning" />
125
304
 
126
305
  - ⏰ Support `date-fns` v4 (#14673) @LukasTy
127
306
  - 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
@@ -277,7 +456,7 @@ Same changes as in `@mui/x-charts@7.17.0`.
277
456
 
278
457
  ### Docs
279
458
 
280
- - [docs] Add missing callout on "Imperative API" tree view sections (#14503) @flaviendelangle
459
+ - [docs] Add missing callout on "Imperative API" Tree View sections (#14503) @flaviendelangle
281
460
  - [docs] Fix broken redirection to MUI X v5 @oliviertassinari
282
461
  - [docs] Fix multiple `console.error` messages on `charts` docs (#14554) @JCQuintas
283
462
  - [docs] Fixed typo in Row Grouping recipes (#14549) @Miodini
@@ -560,7 +739,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
560
739
  #### `@mui/x-data-grid@7.13.0`
561
740
 
562
741
  - [DataGrid] Fix CSV export for `null` and `undefined` values (#14166) @k-rajat19
563
- - [DataGrid] Fix error logged during skeleton loading with nested data grid (#14186) @KenanYusuf
742
+ - [DataGrid] Fix error logged during skeleton loading with nested Data Grid (#14186) @KenanYusuf
564
743
  - [DataGrid] Remove needless check in `useGridStateInitialization` (#14181) @k-rajat19
565
744
  - [DataGrid] Add recipe for persisting filters in local storage (#14208) @cherniavskii
566
745
  - [l10n] Improve Vietnamese (vi-VN) locale (#14216) @hungnd-casso
@@ -618,7 +797,7 @@ Same changes as in `@mui/x-charts@7.13.0`.
618
797
  - [core] Fix ESLint issue (#14207) @LukasTy
619
798
  - [core] Fix Netlify build cache issue (#14182) @cherniavskii
620
799
  - [code-infra] Refactor Netlify `cache-docs` plugin setup (#14105) @LukasTy
621
- - [internals] Move utils needed for tree view virtualization to shared package (#14202) @flaviendelangle
800
+ - [internals] Move utils needed for Tree View virtualization to shared package (#14202) @flaviendelangle
622
801
 
623
802
  ## 7.12.1
624
803
 
@@ -678,6 +857,8 @@ Same changes as in `@mui/x-charts@7.12.1`, plus:
678
857
 
679
858
  #### `@mui/x-tree-view@7.12.1`
680
859
 
860
+ No changes since `@mui/x-tree-view@7.12.0`.
861
+
681
862
  ### Docs
682
863
 
683
864
  - [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
@@ -707,7 +888,7 @@ This expansion of the Pro plan comes with some adjustments to our pricing strate
707
888
 
708
889
  We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
709
890
 
710
- - 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
891
+ - 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `<RichTreeViewPro />` component
711
892
 
712
893
  <img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
713
894
 
@@ -1200,7 +1381,7 @@ Same changes as in `@mui/x-date-pickers@7.8.0`.
1200
1381
 
1201
1382
  - [core] Add eslint rule to restrict import from `../internals` root (#13633) @JCQuintas
1202
1383
  - [docs-infra] Sync `\_app` folder with monorepo (#13582) @Janpot
1203
- - [license] Allow usage of charts and tree view pro package for old premium licenses (#13619) @flaviendelangle
1384
+ - [license] Allow usage of Charts and Tree View Pro package for old premium licenses (#13619) @flaviendelangle
1204
1385
 
1205
1386
  ## 7.7.1
1206
1387
 
@@ -1268,7 +1449,7 @@ Same changes as in `@mui/x-date-pickers@7.7.1`, plus:
1268
1449
  - [TreeView] Improve typing to support optional dependencies in plugins and in the item (#13523) @flaviendelangle
1269
1450
  - [TreeView] Move `useTreeViewId` to the core plugins (#13566) @flaviendelangle
1270
1451
  - [TreeView] Remove unused state from `useTreeViewId` (#13579) @flaviendelangle
1271
- - [TreeView] Support `itemId` with escaping characters when using `SimpleTreeView` (#13487) @oukunan
1452
+ - [TreeView] Support `itemId` with escaping characters when using Simple Tree View (#13487) @oukunan
1272
1453
 
1273
1454
  ### Docs
1274
1455
 
@@ -1348,7 +1529,7 @@ Same changes as in `@mui/x-date-pickers@7.7.0`.
1348
1529
  - [TreeView] Improve TypeScript for plugins (#13380) @flaviendelangle
1349
1530
  - [TreeView] Improve the typing of the cancelable events (#13152) @flaviendelangle
1350
1531
  - [TreeView] Prepare support for PigmentCSS (#13412) @flaviendelangle
1351
- - [TreeView] Refactor the tree view internals to prepare for headless API (#13311) @flaviendelangle
1532
+ - [TreeView] Refactor the Tree View internals to prepare for headless API (#13311) @flaviendelangle
1352
1533
 
1353
1534
  ### Docs
1354
1535
 
@@ -1363,7 +1544,7 @@ Same changes as in `@mui/x-date-pickers@7.7.0`.
1363
1544
  - [core] Add `eslint-plugin-react-compiler` experimental version and rules (#13415) @JCQuintas
1364
1545
  - [core] Minor setup cleanup (#13467) @LukasTy
1365
1546
  - [infra] Adjust CI setup (#13448) @LukasTy
1366
- - [test] Add tests for the custom slots of `TreeItem2` (#13314) @flaviendelangle
1547
+ - [test] Add tests for the custom slots of `<TreeItem2 />` (#13314) @flaviendelangle
1367
1548
 
1368
1549
  ## 7.6.2
1369
1550
 
@@ -1528,7 +1709,7 @@ Same changes as in `@mui/x-date-pickers@7.6.0`.
1528
1709
  - [docs] Fix a small typo in property comment (#13245) @Janpot
1529
1710
  - [docs] Improve the Data Grid FAQ page (#13258) @MBilalShafi
1530
1711
  - [docs] Removes unused lines in TreeItem2 styling (#13264) @arthurbalduini
1531
- - [docs] Small improvements on accessibility data grid doc (#13233) @arthurbalduini
1712
+ - [docs] Small improvements on accessibility Data Grid doc (#13233) @arthurbalduini
1532
1713
  - [docs] Update Pickers demo configurations (#13303) @LukasTy
1533
1714
 
1534
1715
  ### Core
@@ -1542,13 +1723,13 @@ Same changes as in `@mui/x-date-pickers@7.6.0`.
1542
1723
  - [test] Use test-utils from npm (#12880) @michaldudak
1543
1724
  - [typescript] Remove duplicate `DateRangePosition` type in favor of `RangePosition` (#13288) @LukasTy
1544
1725
 
1545
- ## v7.5.1
1726
+ ## 7.5.1
1546
1727
 
1547
1728
  _May 23, 2024_
1548
1729
 
1549
1730
  We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
1550
1731
 
1551
- - 🧰 Improve tree view testing
1732
+ - 🧰 Improve Tree View testing
1552
1733
  - 📊 Add `label` to be displayed in BarChart
1553
1734
 
1554
1735
  ### Data Grid
@@ -1602,7 +1783,7 @@ Same changes as in `@mui/x-date-pickers@7.5.1`.
1602
1783
  - [code-infra] Run corepack enable on all CI jobs (#13205) @Janpot
1603
1784
  - [code-infra] Use `nx` for lerna tasks (#13166) @LukasTy
1604
1785
 
1605
- ## v7.5.0
1786
+ ## 7.5.0
1606
1787
 
1607
1788
  _May 17, 2024_
1608
1789
 
@@ -1724,7 +1905,7 @@ Same changes as in `@mui/x-date-pickers@7.4.0`.
1724
1905
 
1725
1906
  #### `@mui/x-tree-view@7.4.0`
1726
1907
 
1727
- - [TreeView] Fix props propagation and theme entry in `TreeItem2` (#12889) @flaviendelangle
1908
+ - [TreeView] Fix props propagation and theme entry in `<TreeItem2 />` (#12889) @flaviendelangle
1728
1909
 
1729
1910
  ### Docs
1730
1911
 
@@ -2034,7 +2215,7 @@ Same changes as in `@mui/x-date-pickers@7.2.0`, plus:
2034
2215
  ### Docs
2035
2216
 
2036
2217
  - [docs] Add `AxisFormatter` documentation for customizing tick/tooltip value formatting (#12700) @JCQuintas
2037
- - [docs] Add file explorer example to rich tree view customization docs (#12707) @noraleonte
2218
+ - [docs] Add file explorer example to rich Tree View customization docs (#12707) @noraleonte
2038
2219
  - [docs] Do not use import of depth 3 in the doc (#12716) @flaviendelangle
2039
2220
  - [docs] Explain how to clip plots with composition (#12679) @alexfauquette
2040
2221
  - [docs] Fix typo in Data Grid v7 migration page (#12720) @bfaulk96
@@ -2110,7 +2291,7 @@ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
2110
2291
  #### `@mui/x-tree-view@7.1.1`
2111
2292
 
2112
2293
  - [TreeView] Add JSDoc to all `publicAPI` methods (#12649) @flaviendelangle
2113
- - [TreeView] Create `RichTreeViewPro` component (not released yet) (#12610) @flaviendelangle
2294
+ - [TreeView] Create `<RichTreeViewPro />` component (not released yet) (#12610) @flaviendelangle
2114
2295
  - [TreeView] Create Pro package (not released yet) (#12240) @flaviendelangle
2115
2296
  - [TreeView] Fix typo in errors (#12623) @alissa-tung
2116
2297
  - [TreeView] New API method: `setItemExpansion` (#12595) @flaviendelangle
@@ -2127,16 +2308,16 @@ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
2127
2308
  - [docs] Fix typo in `getItemId` prop description (#12637) @flaviendelangle
2128
2309
  - [docs] Make the Charts `margin` usage more visible (#12591) @alexfauquette
2129
2310
  - [docs] Match IE 11 spacing with Material UI @oliviertassinari
2130
- - [docs] Move data grid interfaces to standard API page layout (#12016) @alexfauquette
2311
+ - [docs] Move Data Grid interfaces to standard API page layout (#12016) @alexfauquette
2131
2312
  - [docs] Remove ` around @default values (#12158) @alexfauquette
2132
2313
  - [docs] Remove `day` from the default `dayOfWeekFormatter` function params (#12644) @LukasTy
2133
- - [docs] Use `TreeItem2` for icon expansion example on `RichTreeView` (#12563) @flaviendelangle
2314
+ - [docs] Use `<TreeItem2 />` for icon expansion example on `<RichTreeView />` (#12563) @flaviendelangle
2134
2315
 
2135
2316
  ### Core
2136
2317
 
2137
2318
  - [core] Add cherry-pick `master` to `v6` action (#12648) @LukasTy
2138
2319
  - [core] Fix typo in `@mui/x-tree-view-pro/themeAugmentation` (#12674) @flaviendelangle
2139
- - [core] Introduce `describeTreeView` to run test on `SimpleTreeView` and `RichTreeView`, using `TreeItem` and `TreeItem2` + migrate expansion tests (#12428) @flaviendelangle
2320
+ - [core] Introduce `describeTreeView` to run test on `<SimpleTreeView />` and `<RichTreeView />`, using `<TreeItem />` and `<TreeItem2 />` + migrate expansion tests (#12428) @flaviendelangle
2140
2321
  - [core] Limit `test-types` CI step allowed memory (#12651) @LukasTy
2141
2322
  - [core] Remove explicit `express` package (#12602) @LukasTy
2142
2323
  - [core] Update to new embedded translations in the docs package (#12232) @Janpot
@@ -2201,7 +2382,7 @@ Same changes as in `@mui/x-date-pickers@7.1.0`, plus:
2201
2382
 
2202
2383
  #### `@mui/x-tree-view@7.1.0`
2203
2384
 
2204
- - [TreeView] Do not use outdated version of the state to compute new label first char in `RichTreeView` (#12512) @flaviendelangle
2385
+ - [TreeView] Do not use outdated version of the state to compute new label first char in Rich Tree View (#12512) @flaviendelangle
2205
2386
 
2206
2387
  ### Docs
2207
2388
 
@@ -2328,7 +2509,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0`, plus:
2328
2509
 
2329
2510
  #### Breaking changes
2330
2511
 
2331
- - The required `nodeId` prop used by the `TreeItem` has been renamed to `itemId` for consistency:
2512
+ - The required `nodeId` prop used by `<TreeItem />` has been renamed to `itemId` for consistency:
2332
2513
 
2333
2514
  ```diff
2334
2515
  <TreeView>
@@ -2481,7 +2662,7 @@ The `onNodeFocus` callback has been renamed to `onItemFocus` for consistency:
2481
2662
  #### `@mui/x-tree-view@7.0.0-beta.7`
2482
2663
 
2483
2664
  - [TreeView] Clean the usage of the term "item" and "node" in API introduced during v7 (#12368) @noraleonte
2484
- - [TreeView] Introduce a new `TreeItem2` component and a new `useTreeItem2` hook (#11721) @flaviendelangle
2665
+ - [TreeView] Introduce a new `<TreeItem2 />` component and a new `useTreeItem2` hook (#11721) @flaviendelangle
2485
2666
  - [TreeView] Rename `onNodeFocus` to `onItemFocus` (#12419) @noraleonte
2486
2667
 
2487
2668
  ### Docs
@@ -2539,9 +2720,9 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.6`.
2539
2720
 
2540
2721
  #### Breaking changes
2541
2722
 
2542
- - The component used to animate the item children is now defined as a slot on the `TreeItem` component.
2723
+ - The component used to animate the item children is now defined as a slot on the `<TreeItem />` component.
2543
2724
 
2544
- If you were passing a `TransitionComponent` or `TransitionProps` to your `TreeItem` component,
2725
+ If you were passing a `TransitionComponent` or `TransitionProps` to your `<TreeItem />` component,
2545
2726
  you need to use the new `groupTransition` slot on this component:
2546
2727
 
2547
2728
  ```diff
@@ -2557,7 +2738,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.6`.
2557
2738
  </SimpleTreeView>
2558
2739
  ```
2559
2740
 
2560
- - The `group` class of the `TreeItem` component has been renamed to `groupTransition` to match with its new slot name.
2741
+ - The `group` class of the `<TreeItem />` component has been renamed to `groupTransition` to match with its new slot name.
2561
2742
 
2562
2743
  ```diff
2563
2744
  const StyledTreeItem = styled(TreeItem)({
@@ -2571,14 +2752,14 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.6`.
2571
2752
  #### `@mui/x-tree-view@7.0.0-beta.6`
2572
2753
 
2573
2754
  - [TreeView] Fix invalid nodes state when updating `props.items` (#12359) @flaviendelangle
2574
- - [TreeView] In the `RichTreeView`, do not use the item id as the HTML id attribute (#12319) @flaviendelangle
2755
+ - [TreeView] In the Rich Tree View, do not use the item id as the HTML id attribute (#12319) @flaviendelangle
2575
2756
  - [TreeView] New instance and publicAPI method: `getItem` (#12251) @flaviendelangle
2576
2757
  - [TreeView] Replace `TransitionComponent` and `TransitionProps` with a `groupTransition` slot (#12336) @flaviendelangle
2577
2758
 
2578
2759
  ### Docs
2579
2760
 
2580
2761
  - [docs] Add a note about `z-index` usage in SVG (#12337) @alexfauquette
2581
- - [docs] `RichTreeView` customization docs (#12231) @noraleonte
2762
+ - [docs] Rich Tree View customization docs (#12231) @noraleonte
2582
2763
 
2583
2764
  ### Core
2584
2765
 
@@ -3231,7 +3412,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.0`, plus:
3231
3412
 
3232
3413
  ### Docs
3233
3414
 
3234
- - [docs] Add `contextValue` to the headless tree view doc (#11705) @flaviendelangle
3415
+ - [docs] Add `contextValue` to the headless Tree View doc (#11705) @flaviendelangle
3235
3416
  - [docs] Add section for the `disableSelection` prop (#11821) @flaviendelangle
3236
3417
  - [docs] Fix brand name non-breaking space (#11758) @oliviertassinari
3237
3418
  - [docs] Fix typo in Data Grid components page (#11775) @flaviendelangle
@@ -3254,7 +3435,7 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
3254
3435
 
3255
3436
  - 🎁 The Data Grid headers have been refactored to bring immense improvements to scrolling, state management, and overall performance of the grid.
3256
3437
  - ⚙️ The Data Grid disabled column-specific features like filtering, sorting, grouping, etc. could now be accessed programmatically. See the related [docs](https://next.mui.com/x/react-data-grid/api-object/#access-the-disabled-column-features) section.
3257
- - 🚀 Uplift the `SimpleTreeView` customization examples (#11424) @noraleonte
3438
+ - 🚀 Uplift the Simple Tree View customization examples (#11424) @noraleonte
3258
3439
  - 🌍 Add Croatian (hr-HR), Portuguese (pt-PT), and Chinese (Hong Kong) (zh-HK) locales (#11668) on the Data Grid @BCaspari
3259
3440
  - 🐞 Bugfixes
3260
3441
  - 💔 Bump `@mui/material` peer dependency for all packages (#11692) @LukasTy
@@ -3465,7 +3646,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
3465
3646
  ```
3466
3647
 
3467
3648
  - The `useTreeItem` hook has been renamed `useTreeItemState`.
3468
- This will help create a new headless version of the `TreeItem` component based on a future `useTreeItem` hook.
3649
+ This will help create a new headless version of the Tree Item component based on a future `useTreeItem` hook.
3469
3650
 
3470
3651
  ```diff
3471
3652
  -import { TreeItem, useTreeItem } from '@mui/x-tree-view/TreeItem';
@@ -3565,13 +3746,13 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
3565
3746
  - [docs] Cleanup and fix Pickers Playground styling (#11700) @LukasTy
3566
3747
  - [docs] First draft of the Tree View custom plugin doc (#11564) @flaviendelangle
3567
3748
  - [docs] Fix Pickers migration syntax and diffs (#11695) @LukasTy
3568
- - [docs] Fix generated tree view API docs (#11737) @LukasTy
3749
+ - [docs] Fix generated Tree View API docs (#11737) @LukasTy
3569
3750
  - [docs] Generate docs for Tree View slots (#11730) @flaviendelangle
3570
3751
  - [docs] Improve codemod for v7 (#11650) @oliviertassinari
3571
- - [docs] Improve data grid `pageSizeOptions` prop documentation (#11682) @oliviertassinari
3752
+ - [docs] Improve Data Grid `pageSizeOptions` prop documentation (#11682) @oliviertassinari
3572
3753
  - [docs] Parse markdown on API docs demo titles (#11728) @LukasTy
3573
3754
  - [docs] Remove the description from the `className` prop (#11693) @oliviertassinari
3574
- - [docs] Uplift `SimpleTreeView` customization examples (#11424) @noraleonte
3755
+ - [docs] Uplift Simple Tree View customization examples (#11424) @noraleonte
3575
3756
  - [docs] Uplift the Date Pickers playground (#11555) @danilo-leal
3576
3757
 
3577
3758
  ### Core
@@ -3648,16 +3829,16 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
3648
3829
 
3649
3830
  ### Tree View / `@mui/x-tree-view@7.0.0-alpha.8`
3650
3831
 
3651
- - [tree view] Cleanup `onKeyDown` handler (#11481) @flaviendelangle
3652
- - [tree view] Define the parameters used by each plugin to avoid listing them in each component (#11473) @flaviendelangle
3832
+ - [TreeView] Cleanup `onKeyDown` handler (#11481) @flaviendelangle
3833
+ - [TreeView] Define the parameters used by each plugin to avoid listing them in each component (#11473) @flaviendelangle
3653
3834
 
3654
3835
  ### Docs
3655
3836
 
3656
3837
  - [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11628) @LukasTy
3657
3838
  - [docs] Improve `git diff` format @oliviertassinari
3658
3839
  - [docs] Push up the MUI X brand (#11533) @oliviertassinari
3659
- - [docs] Remove old data grid translation files (#11646) @cherniavskii
3660
- - [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
3840
+ - [docs] Remove old Data Grid translation files (#11646) @cherniavskii
3841
+ - [docs] Improve Server-side Data Grid docs (#11589) @oliviertassinari
3661
3842
  - [docs] Improve charts landing page (#11570) @oliviertassinari
3662
3843
 
3663
3844
  ### Core
@@ -3676,7 +3857,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
3676
3857
 
3677
3858
  - 🎁 New component to create a Tree View from a structured data source:
3678
3859
 
3679
- You can now directly pass your data to the `RichTreeView` component instead of manually converting it into JSX `TreeItem` components:
3860
+ You can now directly pass your data to the `<RichTreeView />` component instead of manually converting it into JSX `<TreeItem />` components:
3680
3861
 
3681
3862
  ```tsx
3682
3863
  const ITEMS = [
@@ -4167,7 +4348,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
4167
4348
 
4168
4349
  - The clipboard related exports `ignoreValueFormatterDuringExport` and `splitClipboardPastedText` are no longer prefixed with `unstable_`.
4169
4350
 
4170
- - The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.
4351
+ - The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the Data Grid exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.
4171
4352
 
4172
4353
  - The `slots.preferencesPanel` slot and the `slotProps.preferencesPanel` prop were removed. Use `slots.panel` and `slotProps.panel` instead.
4173
4354
 
@@ -4879,7 +5060,7 @@ A special shoutout to thank the 12 contributors who made this release possible.
4879
5060
  - 🚀 First v7 alpha release
4880
5061
  - ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
4881
5062
  - 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
4882
- - 💫 New recipes added for the data grid
5063
+ - 💫 New recipes added for the Data Grid
4883
5064
  - 📈 `<ChartsReferenceLine />` component is now available
4884
5065
  - 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
4885
5066
  - 🐞 Bugfixes
@@ -5007,7 +5188,7 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
5007
5188
 
5008
5189
  ### Core
5009
5190
 
5010
- - [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
5191
+ - [core] Adds migration docs for Charts, Pickers, and Tree View (#10926) @michelengelen
5011
5192
  - [core] Bump monorepo (#10959) @LukasTy
5012
5193
  - [core] Changed prettier branch value to next (#10917) @michelengelen
5013
5194
  - [core] Fix GitHub title tag consistency @oliviertassinari
@@ -6,8 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
7
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
8
8
  import useSlotProps from '@mui/utils/useSlotProps';
9
- import { TreeItem } from '@mui/x-tree-view/TreeItem';
10
- import { useTreeView, TreeViewProvider } from '@mui/x-tree-view/internals';
9
+ import { useTreeView, TreeViewProvider, RichTreeViewItems } from '@mui/x-tree-view/internals';
11
10
  import { warnOnce } from '@mui/x-internals/warning';
12
11
  import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
13
12
  import { getRichTreeViewProUtilityClass } from "./richTreeViewProClasses.js";
@@ -35,57 +34,6 @@ export const RichTreeViewProRoot = styled('ul', {
35
34
  outline: 0,
36
35
  position: 'relative'
37
36
  });
38
- function WrappedTreeItem({
39
- slots,
40
- slotProps,
41
- label,
42
- id,
43
- itemId,
44
- children
45
- }) {
46
- const Item = slots?.item ?? TreeItem;
47
- const itemProps = useSlotProps({
48
- elementType: Item,
49
- externalSlotProps: slotProps?.item,
50
- additionalProps: {
51
- itemId,
52
- id,
53
- label
54
- },
55
- ownerState: {
56
- itemId,
57
- label
58
- }
59
- });
60
- return /*#__PURE__*/_jsx(Item, _extends({}, itemProps, {
61
- children: children
62
- }));
63
- }
64
- process.env.NODE_ENV !== "production" ? WrappedTreeItem.propTypes = {
65
- // ----------------------------- Warning --------------------------------
66
- // | These PropTypes are generated from the TypeScript type definitions |
67
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
68
- // ----------------------------------------------------------------------
69
- /**
70
- * The content of the component.
71
- */
72
- children: PropTypes.node,
73
- /**
74
- * The id of the item.
75
- */
76
- itemId: PropTypes.string.isRequired,
77
- label: PropTypes.string.isRequired,
78
- /**
79
- * The props used for each component slot.
80
- * @default {}
81
- */
82
- slotProps: PropTypes.object,
83
- /**
84
- * Overridable component slots.
85
- * @default {}
86
- */
87
- slots: PropTypes.object
88
- } : void 0;
89
37
  const releaseInfo = getReleaseInfo();
90
38
 
91
39
  /**
@@ -106,7 +54,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
106
54
  useLicenseVerifier('x-tree-view-pro', releaseInfo);
107
55
  if (process.env.NODE_ENV !== 'production') {
108
56
  if (props.children != null) {
109
- warnOnce(['MUI X: The `RichTreeViewPro` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
57
+ warnOnce(['MUI X: The `<RichTreeViewPro />` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
110
58
  }
111
59
  }
112
60
  const {
@@ -131,26 +79,14 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
131
79
  getSlotProps: getRootProps,
132
80
  ownerState: props
133
81
  });
134
- const itemsToRender = instance.getItemsToRender();
135
- const renderItem = ({
136
- label,
137
- itemId,
138
- id,
139
- children
140
- }) => {
141
- return /*#__PURE__*/_jsx(WrappedTreeItem, {
142
- slots: slots,
143
- slotProps: slotProps,
144
- label: label,
145
- id: id,
146
- itemId: itemId,
147
- children: children?.map(renderItem)
148
- }, itemId);
149
- };
150
82
  return /*#__PURE__*/_jsx(TreeViewProvider, {
151
83
  value: contextValue,
152
84
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
153
- children: [itemsToRender.map(renderItem), /*#__PURE__*/_jsx(Watermark, {
85
+ children: [/*#__PURE__*/_jsx(RichTreeViewItems, {
86
+ slots: slots,
87
+ slotProps: slotProps,
88
+ itemsToRender: instance.getItemsToRender()
89
+ }), /*#__PURE__*/_jsx(Watermark, {
154
90
  packageName: "x-tree-view-pro",
155
91
  releaseInfo: releaseInfo
156
92
  })]
@@ -187,7 +123,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
187
123
  */
188
124
  canMoveItemToNewPosition: PropTypes.func,
189
125
  /**
190
- * If `true`, the tree view renders a checkbox at the left of its label that allows selecting it.
126
+ * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
191
127
  * @default false
192
128
  */
193
129
  checkboxSelection: PropTypes.bool,
@@ -305,26 +241,26 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
305
241
  */
306
242
  multiSelect: PropTypes.bool,
307
243
  /**
308
- * Callback fired when tree items are expanded/collapsed.
244
+ * Callback fired when Tree Items are expanded/collapsed.
309
245
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
310
246
  * @param {array} itemIds The ids of the expanded items.
311
247
  */
312
248
  onExpandedItemsChange: PropTypes.func,
313
249
  /**
314
- * Callback fired when the `content` slot of a given tree item is clicked.
250
+ * Callback fired when the `content` slot of a given Tree Item is clicked.
315
251
  * @param {React.MouseEvent} event The DOM event that triggered the change.
316
252
  * @param {string} itemId The id of the focused item.
317
253
  */
318
254
  onItemClick: PropTypes.func,
319
255
  /**
320
- * Callback fired when a tree item is expanded or collapsed.
256
+ * Callback fired when a Tree Item is expanded or collapsed.
321
257
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
322
258
  * @param {array} itemId The itemId of the modified item.
323
259
  * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
324
260
  */
325
261
  onItemExpansionToggle: PropTypes.func,
326
262
  /**
327
- * Callback fired when a given tree item is focused.
263
+ * Callback fired when a given Tree Item is focused.
328
264
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
329
265
  * @param {string} itemId The id of the focused item.
330
266
  */
@@ -336,7 +272,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
336
272
  */
337
273
  onItemLabelChange: PropTypes.func,
338
274
  /**
339
- * Callback fired when a tree item is moved in the tree.
275
+ * Callback fired when a Tree Item is moved in the tree.
340
276
  * @param {object} params The params describing the item re-ordering.
341
277
  * @param {string} params.itemId The id of the item moved.
342
278
  * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item.
@@ -344,14 +280,14 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
344
280
  */
345
281
  onItemPositionChange: PropTypes.func,
346
282
  /**
347
- * Callback fired when a tree item is selected or deselected.
283
+ * Callback fired when a Tree Item is selected or deselected.
348
284
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
349
285
  * @param {array} itemId The itemId of the modified item.
350
286
  * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
351
287
  */
352
288
  onItemSelectionToggle: PropTypes.func,
353
289
  /**
354
- * Callback fired when tree items are selected/deselected.
290
+ * Callback fired when Tree Items are selected/deselected.
355
291
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
356
292
  * @param {string[] | string} itemIds The ids of the selected items.
357
293
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.19.0
2
+ * @mui/x-tree-view-pro v7.21.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -180,7 +180,7 @@ useTreeViewItemsReordering.getDefaultizedParams = ({
180
180
  const canUseFeature = experimentalFeatures?.indentationAtItemLevel && experimentalFeatures?.itemsReordering;
181
181
  if (process.env.NODE_ENV !== 'production') {
182
182
  if (params.itemsReordering && !canUseFeature) {
183
- warnOnce(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `RichTreeViewPro` component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
183
+ warnOnce(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `<RichTreeViewPro />`component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
184
184
  }
185
185
  }
186
186
  return _extends({}, params, {
@@ -81,7 +81,7 @@ export interface UseTreeViewItemsReorderingParameters {
81
81
  newPosition: TreeViewItemReorderPosition;
82
82
  }) => boolean;
83
83
  /**
84
- * Callback fired when a tree item is moved in the tree.
84
+ * Callback fired when a Tree Item is moved in the tree.
85
85
  * @param {object} params The params describing the item re-ordering.
86
86
  * @param {string} params.itemId The id of the item moved.
87
87
  * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item.
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNzk4OTIwMDAwMA==";
3
+ const releaseInfo = "MTcyOTExNjAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -6,8 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
7
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
8
8
  import useSlotProps from '@mui/utils/useSlotProps';
9
- import { TreeItem } from '@mui/x-tree-view/TreeItem';
10
- import { useTreeView, TreeViewProvider } from '@mui/x-tree-view/internals';
9
+ import { useTreeView, TreeViewProvider, RichTreeViewItems } from '@mui/x-tree-view/internals';
11
10
  import { warnOnce } from '@mui/x-internals/warning';
12
11
  import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
13
12
  import { getRichTreeViewProUtilityClass } from "./richTreeViewProClasses.js";
@@ -35,57 +34,6 @@ export const RichTreeViewProRoot = styled('ul', {
35
34
  outline: 0,
36
35
  position: 'relative'
37
36
  });
38
- function WrappedTreeItem({
39
- slots,
40
- slotProps,
41
- label,
42
- id,
43
- itemId,
44
- children
45
- }) {
46
- const Item = slots?.item ?? TreeItem;
47
- const itemProps = useSlotProps({
48
- elementType: Item,
49
- externalSlotProps: slotProps?.item,
50
- additionalProps: {
51
- itemId,
52
- id,
53
- label
54
- },
55
- ownerState: {
56
- itemId,
57
- label
58
- }
59
- });
60
- return /*#__PURE__*/_jsx(Item, _extends({}, itemProps, {
61
- children: children
62
- }));
63
- }
64
- process.env.NODE_ENV !== "production" ? WrappedTreeItem.propTypes = {
65
- // ----------------------------- Warning --------------------------------
66
- // | These PropTypes are generated from the TypeScript type definitions |
67
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
68
- // ----------------------------------------------------------------------
69
- /**
70
- * The content of the component.
71
- */
72
- children: PropTypes.node,
73
- /**
74
- * The id of the item.
75
- */
76
- itemId: PropTypes.string.isRequired,
77
- label: PropTypes.string.isRequired,
78
- /**
79
- * The props used for each component slot.
80
- * @default {}
81
- */
82
- slotProps: PropTypes.object,
83
- /**
84
- * Overridable component slots.
85
- * @default {}
86
- */
87
- slots: PropTypes.object
88
- } : void 0;
89
37
  const releaseInfo = getReleaseInfo();
90
38
 
91
39
  /**
@@ -106,7 +54,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
106
54
  useLicenseVerifier('x-tree-view-pro', releaseInfo);
107
55
  if (process.env.NODE_ENV !== 'production') {
108
56
  if (props.children != null) {
109
- warnOnce(['MUI X: The `RichTreeViewPro` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
57
+ warnOnce(['MUI X: The `<RichTreeViewPro />` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
110
58
  }
111
59
  }
112
60
  const {
@@ -131,26 +79,14 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
131
79
  getSlotProps: getRootProps,
132
80
  ownerState: props
133
81
  });
134
- const itemsToRender = instance.getItemsToRender();
135
- const renderItem = ({
136
- label,
137
- itemId,
138
- id,
139
- children
140
- }) => {
141
- return /*#__PURE__*/_jsx(WrappedTreeItem, {
142
- slots: slots,
143
- slotProps: slotProps,
144
- label: label,
145
- id: id,
146
- itemId: itemId,
147
- children: children?.map(renderItem)
148
- }, itemId);
149
- };
150
82
  return /*#__PURE__*/_jsx(TreeViewProvider, {
151
83
  value: contextValue,
152
84
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
153
- children: [itemsToRender.map(renderItem), /*#__PURE__*/_jsx(Watermark, {
85
+ children: [/*#__PURE__*/_jsx(RichTreeViewItems, {
86
+ slots: slots,
87
+ slotProps: slotProps,
88
+ itemsToRender: instance.getItemsToRender()
89
+ }), /*#__PURE__*/_jsx(Watermark, {
154
90
  packageName: "x-tree-view-pro",
155
91
  releaseInfo: releaseInfo
156
92
  })]
@@ -187,7 +123,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
187
123
  */
188
124
  canMoveItemToNewPosition: PropTypes.func,
189
125
  /**
190
- * If `true`, the tree view renders a checkbox at the left of its label that allows selecting it.
126
+ * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
191
127
  * @default false
192
128
  */
193
129
  checkboxSelection: PropTypes.bool,
@@ -305,26 +241,26 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
305
241
  */
306
242
  multiSelect: PropTypes.bool,
307
243
  /**
308
- * Callback fired when tree items are expanded/collapsed.
244
+ * Callback fired when Tree Items are expanded/collapsed.
309
245
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
310
246
  * @param {array} itemIds The ids of the expanded items.
311
247
  */
312
248
  onExpandedItemsChange: PropTypes.func,
313
249
  /**
314
- * Callback fired when the `content` slot of a given tree item is clicked.
250
+ * Callback fired when the `content` slot of a given Tree Item is clicked.
315
251
  * @param {React.MouseEvent} event The DOM event that triggered the change.
316
252
  * @param {string} itemId The id of the focused item.
317
253
  */
318
254
  onItemClick: PropTypes.func,
319
255
  /**
320
- * Callback fired when a tree item is expanded or collapsed.
256
+ * Callback fired when a Tree Item is expanded or collapsed.
321
257
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
322
258
  * @param {array} itemId The itemId of the modified item.
323
259
  * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
324
260
  */
325
261
  onItemExpansionToggle: PropTypes.func,
326
262
  /**
327
- * Callback fired when a given tree item is focused.
263
+ * Callback fired when a given Tree Item is focused.
328
264
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
329
265
  * @param {string} itemId The id of the focused item.
330
266
  */
@@ -336,7 +272,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
336
272
  */
337
273
  onItemLabelChange: PropTypes.func,
338
274
  /**
339
- * Callback fired when a tree item is moved in the tree.
275
+ * Callback fired when a Tree Item is moved in the tree.
340
276
  * @param {object} params The params describing the item re-ordering.
341
277
  * @param {string} params.itemId The id of the item moved.
342
278
  * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item.
@@ -344,14 +280,14 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
344
280
  */
345
281
  onItemPositionChange: PropTypes.func,
346
282
  /**
347
- * Callback fired when a tree item is selected or deselected.
283
+ * Callback fired when a Tree Item is selected or deselected.
348
284
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
349
285
  * @param {array} itemId The itemId of the modified item.
350
286
  * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
351
287
  */
352
288
  onItemSelectionToggle: PropTypes.func,
353
289
  /**
354
- * Callback fired when tree items are selected/deselected.
290
+ * Callback fired when Tree Items are selected/deselected.
355
291
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
356
292
  * @param {string[] | string} itemIds The ids of the selected items.
357
293
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.19.0
2
+ * @mui/x-tree-view-pro v7.21.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -180,7 +180,7 @@ useTreeViewItemsReordering.getDefaultizedParams = ({
180
180
  const canUseFeature = experimentalFeatures?.indentationAtItemLevel && experimentalFeatures?.itemsReordering;
181
181
  if (process.env.NODE_ENV !== 'production') {
182
182
  if (params.itemsReordering && !canUseFeature) {
183
- warnOnce(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `RichTreeViewPro` component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
183
+ warnOnce(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `<RichTreeViewPro />`component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
184
184
  }
185
185
  }
186
186
  return _extends({}, params, {
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNzk4OTIwMDAwMA==";
3
+ const releaseInfo = "MTcyOTExNjAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -13,7 +13,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
14
  var _xLicense = require("@mui/x-license");
15
15
  var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
16
- var _TreeItem = require("@mui/x-tree-view/TreeItem");
17
16
  var _internals = require("@mui/x-tree-view/internals");
18
17
  var _warning = require("@mui/x-internals/warning");
19
18
  var _zeroStyled = require("../internals/zero-styled");
@@ -42,57 +41,6 @@ const RichTreeViewProRoot = exports.RichTreeViewProRoot = (0, _zeroStyled.styled
42
41
  outline: 0,
43
42
  position: 'relative'
44
43
  });
45
- function WrappedTreeItem({
46
- slots,
47
- slotProps,
48
- label,
49
- id,
50
- itemId,
51
- children
52
- }) {
53
- const Item = slots?.item ?? _TreeItem.TreeItem;
54
- const itemProps = (0, _useSlotProps.default)({
55
- elementType: Item,
56
- externalSlotProps: slotProps?.item,
57
- additionalProps: {
58
- itemId,
59
- id,
60
- label
61
- },
62
- ownerState: {
63
- itemId,
64
- label
65
- }
66
- });
67
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Item, (0, _extends2.default)({}, itemProps, {
68
- children: children
69
- }));
70
- }
71
- process.env.NODE_ENV !== "production" ? WrappedTreeItem.propTypes = {
72
- // ----------------------------- Warning --------------------------------
73
- // | These PropTypes are generated from the TypeScript type definitions |
74
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
75
- // ----------------------------------------------------------------------
76
- /**
77
- * The content of the component.
78
- */
79
- children: _propTypes.default.node,
80
- /**
81
- * The id of the item.
82
- */
83
- itemId: _propTypes.default.string.isRequired,
84
- label: _propTypes.default.string.isRequired,
85
- /**
86
- * The props used for each component slot.
87
- * @default {}
88
- */
89
- slotProps: _propTypes.default.object,
90
- /**
91
- * Overridable component slots.
92
- * @default {}
93
- */
94
- slots: _propTypes.default.object
95
- } : void 0;
96
44
  const releaseInfo = (0, _releaseInfo.getReleaseInfo)();
97
45
 
98
46
  /**
@@ -113,7 +61,7 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
113
61
  (0, _xLicense.useLicenseVerifier)('x-tree-view-pro', releaseInfo);
114
62
  if (process.env.NODE_ENV !== 'production') {
115
63
  if (props.children != null) {
116
- (0, _warning.warnOnce)(['MUI X: The `RichTreeViewPro` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
64
+ (0, _warning.warnOnce)(['MUI X: The `<RichTreeViewPro />` component does not support JSX children.', 'If you want to add items, you need to use the `items` prop.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/.']);
117
65
  }
118
66
  }
119
67
  const {
@@ -138,26 +86,14 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
138
86
  getSlotProps: getRootProps,
139
87
  ownerState: props
140
88
  });
141
- const itemsToRender = instance.getItemsToRender();
142
- const renderItem = ({
143
- label,
144
- itemId,
145
- id,
146
- children
147
- }) => {
148
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedTreeItem, {
149
- slots: slots,
150
- slotProps: slotProps,
151
- label: label,
152
- id: id,
153
- itemId: itemId,
154
- children: children?.map(renderItem)
155
- }, itemId);
156
- };
157
89
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.TreeViewProvider, {
158
90
  value: contextValue,
159
91
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, {
160
- children: [itemsToRender.map(renderItem), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
92
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.RichTreeViewItems, {
93
+ slots: slots,
94
+ slotProps: slotProps,
95
+ itemsToRender: instance.getItemsToRender()
96
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
161
97
  packageName: "x-tree-view-pro",
162
98
  releaseInfo: releaseInfo
163
99
  })]
@@ -194,7 +130,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
194
130
  */
195
131
  canMoveItemToNewPosition: _propTypes.default.func,
196
132
  /**
197
- * If `true`, the tree view renders a checkbox at the left of its label that allows selecting it.
133
+ * If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
198
134
  * @default false
199
135
  */
200
136
  checkboxSelection: _propTypes.default.bool,
@@ -312,26 +248,26 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
312
248
  */
313
249
  multiSelect: _propTypes.default.bool,
314
250
  /**
315
- * Callback fired when tree items are expanded/collapsed.
251
+ * Callback fired when Tree Items are expanded/collapsed.
316
252
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
317
253
  * @param {array} itemIds The ids of the expanded items.
318
254
  */
319
255
  onExpandedItemsChange: _propTypes.default.func,
320
256
  /**
321
- * Callback fired when the `content` slot of a given tree item is clicked.
257
+ * Callback fired when the `content` slot of a given Tree Item is clicked.
322
258
  * @param {React.MouseEvent} event The DOM event that triggered the change.
323
259
  * @param {string} itemId The id of the focused item.
324
260
  */
325
261
  onItemClick: _propTypes.default.func,
326
262
  /**
327
- * Callback fired when a tree item is expanded or collapsed.
263
+ * Callback fired when a Tree Item is expanded or collapsed.
328
264
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
329
265
  * @param {array} itemId The itemId of the modified item.
330
266
  * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
331
267
  */
332
268
  onItemExpansionToggle: _propTypes.default.func,
333
269
  /**
334
- * Callback fired when a given tree item is focused.
270
+ * Callback fired when a given Tree Item is focused.
335
271
  * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
336
272
  * @param {string} itemId The id of the focused item.
337
273
  */
@@ -343,7 +279,7 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
343
279
  */
344
280
  onItemLabelChange: _propTypes.default.func,
345
281
  /**
346
- * Callback fired when a tree item is moved in the tree.
282
+ * Callback fired when a Tree Item is moved in the tree.
347
283
  * @param {object} params The params describing the item re-ordering.
348
284
  * @param {string} params.itemId The id of the item moved.
349
285
  * @param {TreeViewItemReorderPosition} params.oldPosition The old position of the item.
@@ -351,14 +287,14 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
351
287
  */
352
288
  onItemPositionChange: _propTypes.default.func,
353
289
  /**
354
- * Callback fired when a tree item is selected or deselected.
290
+ * Callback fired when a Tree Item is selected or deselected.
355
291
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
356
292
  * @param {array} itemId The itemId of the modified item.
357
293
  * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
358
294
  */
359
295
  onItemSelectionToggle: _propTypes.default.func,
360
296
  /**
361
- * Callback fired when tree items are selected/deselected.
297
+ * Callback fired when Tree Items are selected/deselected.
362
298
  * @param {React.SyntheticEvent} event The DOM event that triggered the change.
363
299
  * @param {string[] | string} itemIds The ids of the selected items.
364
300
  * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v7.19.0
2
+ * @mui/x-tree-view-pro v7.21.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -189,7 +189,7 @@ useTreeViewItemsReordering.getDefaultizedParams = ({
189
189
  const canUseFeature = experimentalFeatures?.indentationAtItemLevel && experimentalFeatures?.itemsReordering;
190
190
  if (process.env.NODE_ENV !== 'production') {
191
191
  if (params.itemsReordering && !canUseFeature) {
192
- (0, _warning.warnOnce)(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `RichTreeViewPro` component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
192
+ (0, _warning.warnOnce)(['MUI X: The items reordering feature requires the `indentationAtItemLevel` and `itemsReordering` experimental features to be enabled.', 'You can do it by passing `experimentalFeatures={{ indentationAtItemLevel: true, itemsReordering: true }}` to the `<RichTreeViewPro />`component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/']);
193
193
  }
194
194
  }
195
195
  return (0, _extends2.default)({}, params, {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcyNzk4OTIwMDAwMA==";
9
+ const releaseInfo = "MTcyOTExNjAwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-tree-view-pro",
3
- "version": "7.19.0",
3
+ "version": "7.21.0",
4
4
  "description": "The Pro plan edition of the Tree View components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,15 +33,15 @@
33
33
  "directory": "packages/x-tree-view-pro"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.25.6",
37
- "@mui/utils": "^5.16.6",
36
+ "@babel/runtime": "^7.25.7",
37
+ "@mui/utils": "^5.16.6 || ^6.0.0",
38
38
  "@types/react-transition-group": "^4.4.11",
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
41
  "react-transition-group": "^4.4.5",
42
- "@mui/x-internals": "7.18.0",
43
- "@mui/x-tree-view": "7.19.0",
44
- "@mui/x-license": "7.18.0"
42
+ "@mui/x-internals": "7.21.0",
43
+ "@mui/x-license": "7.21.0",
44
+ "@mui/x-tree-view": "7.21.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@emotion/react": "^11.9.0",