@mui/x-tree-view-pro 9.0.0-alpha.2 → 9.0.0-alpha.4
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 +246 -1
- package/RichTreeViewPro/RichTreeViewPro.js +29 -23
- package/RichTreeViewPro/RichTreeViewPro.mjs +22 -16
- package/RichTreeViewPro/useExtractRichTreeViewProParameters.js +4 -4
- package/RichTreeViewPro/useExtractRichTreeViewProParameters.mjs +4 -4
- package/components/RichTreeViewVirtualizedItems.js +1 -1
- package/components/RichTreeViewVirtualizedItems.mjs +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.js +2 -9
- package/index.mjs +2 -2
- package/internals/RichTreeViewProStore/RichTreeViewProStore.types.d.mts +9 -5
- package/internals/RichTreeViewProStore/RichTreeViewProStore.types.d.ts +9 -5
- package/internals/RichTreeViewProStore/RichTreeViewProStore.utils.js +4 -4
- package/internals/RichTreeViewProStore/RichTreeViewProStore.utils.mjs +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,250 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0-alpha.4
|
|
4
|
+
|
|
5
|
+
_Mar 19, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🐞 Bugfixes and internal improvements
|
|
10
|
+
|
|
11
|
+
The following team members contributed to this release:
|
|
12
|
+
@aemartos, @alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @rita-codes, @sai6855, @siriwatknp
|
|
13
|
+
|
|
14
|
+
### Data Grid
|
|
15
|
+
|
|
16
|
+
#### `@mui/x-data-grid@9.0.0-alpha.4`
|
|
17
|
+
|
|
18
|
+
- [DataGrid] Mark charts integration as stable (#21764) @JCQuintas
|
|
19
|
+
- [DataGrid] Move `elementOverrides` to constants and remove duplicates (#21618) @sai6855
|
|
20
|
+
- [DataGrid] Migrate from deprecated Material UI APIs (#21682) @siriwatknp
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
23
|
+
|
|
24
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.4`.
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.4`.
|
|
29
|
+
|
|
30
|
+
### Date and Time Pickers
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.4`
|
|
33
|
+
|
|
34
|
+
- [pickers] Avoid stealing focus on click away (#13434) @LukasTy
|
|
35
|
+
- [pickers] Promote `fieldRef` to stable and add `clearValue` method (#21655) @michelengelen
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
38
|
+
|
|
39
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.4`.
|
|
40
|
+
|
|
41
|
+
### Charts
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-charts@9.0.0-alpha.4`
|
|
44
|
+
|
|
45
|
+
- [charts] Add v9 chart series types and helper functions migration (#21009) @bernardobelchior
|
|
46
|
+
- [charts] Extract event listener to the layer container (#21751) @alexfauquette
|
|
47
|
+
- [charts] Fix WebGL print export canvas stretching (#21738) @JCQuintas
|
|
48
|
+
- [charts] Improve deprecation warnings (#21760) @alexfauquette
|
|
49
|
+
- [charts] Improve type safety in `identifierCleaner` (#21719) @bernardobelchior
|
|
50
|
+
- [charts] Make `preferStrictDomainInLineCharts` the default (#21744) @JCQuintas
|
|
51
|
+
- [charts] Move title and description to the layer container (#21757) @alexfauquette
|
|
52
|
+
- [charts] Refactor `FunnelChart` classes structure (#21652) @JCQuintas
|
|
53
|
+
- [charts] Refactor `Heatmap` classes structure (#21653) @JCQuintas
|
|
54
|
+
- [charts] Refactor `RadarChart` classes structure (#21650) @JCQuintas
|
|
55
|
+
- [charts] Refactor `SankeyChart` classes structure (#21654) @JCQuintas
|
|
56
|
+
- [charts] Refactor legend getters to use utility functions (#21628) @sai6855
|
|
57
|
+
- [charts] Remove deprecated `ChartContainer` and `ChartDataProvider` (#21777) @alexfauquette
|
|
58
|
+
- [charts] Remove deprecated `itemId` from `SeriesLegendItemContext` (#21788) @alexfauquette
|
|
59
|
+
- [charts] Remove deprecated `useMouseTracker()` (#21787) @alexfauquette
|
|
60
|
+
- [charts] Remove deprecated classes (#21775) @alexfauquette
|
|
61
|
+
- [charts] Remove deprecated props from PieArcLabel animation (#21789) @alexfauquette
|
|
62
|
+
- [charts] Remove get*UtilityClass from public exports (#21769) @JCQuintas
|
|
63
|
+
- [charts] Remove the deprecated `disableHover` property (#21785) @alexfauquette
|
|
64
|
+
- [charts] Remove the deprecated `message` prop (#21784) @alexfauquette
|
|
65
|
+
- [charts] Remove deprecated props about voronoi (#21796) @alexfauquette
|
|
66
|
+
- [charts] Remove deprecated pieArcClasses (#21795) @alexfauquette
|
|
67
|
+
- [charts] Rename `data-series-id` by `data-series` (#21761) @alexfauquette
|
|
68
|
+
- [charts] Rename `voronoiMaxRadius`/`disableVoronoi` to `hitAreaRadius`/`disableHitArea` (#21750) @bernardobelchior
|
|
69
|
+
- [charts] Update pt-PT locale (#21296) @bernardobelchior
|
|
70
|
+
- [charts] Use different shape per series by default (#21713) @alexfauquette
|
|
71
|
+
- [charts] Add className prop to Radar components (#21794) @JCQuintas
|
|
72
|
+
- [charts] Add className prop to shared chart components (#21792) @JCQuintas
|
|
73
|
+
- [charts] Add className prop to BarPlot (#21791) @JCQuintas
|
|
74
|
+
- [charts] Portal tooltip into ChartsLayerContainer (#21801) @JCQuintas
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
77
|
+
|
|
78
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.4`, plus:
|
|
79
|
+
|
|
80
|
+
- [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21716) @JCQuintas
|
|
81
|
+
- [charts-pro] Remove deprecated `onAxisClick` for Heatmap (#21786) @alexfauquette
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.4`, plus:
|
|
86
|
+
|
|
87
|
+
- [charts-premium] Add candlestick chart (#21129) @bernardobelchior
|
|
88
|
+
|
|
89
|
+
### Tree View
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view@9.0.0-alpha.4`
|
|
92
|
+
|
|
93
|
+
Internal changes.
|
|
94
|
+
|
|
95
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
96
|
+
|
|
97
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.4`.
|
|
98
|
+
|
|
99
|
+
### Codemod
|
|
100
|
+
|
|
101
|
+
#### `@mui/x-codemod@9.0.0-alpha.4`
|
|
102
|
+
|
|
103
|
+
Internal changes.
|
|
104
|
+
|
|
105
|
+
### Docs
|
|
106
|
+
|
|
107
|
+
- [docs-infra] Exclude `ServerSideLazyLoadingRevalidation` from argos (#21734) @sai6855
|
|
108
|
+
- [docs] Update charts v9 migration guide to include premium package (#21743) @bernardobelchior
|
|
109
|
+
- [docs] Update v9 migration guides to install next tag (#21741) @bernardobelchior
|
|
110
|
+
- [docs] Revise the Pie chart docs (#21565) @mapache-salvaje
|
|
111
|
+
- [docs] Revise the Bar Chart docs (#21482) @mapache-salvaje
|
|
112
|
+
- [docs] Removed a `console.log` from an aggregation demo (#21698) @michelengelen
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [code-infra] Add pkg-pr-new as dev dependency (#21754) @Janpot
|
|
117
|
+
- [code-infra] Prevent `combiner` to have default parameters (#21707) @JCQuintas
|
|
118
|
+
- [code-infra] Remove CI coverage collection and upload to Codecov (#21671) @Janpot
|
|
119
|
+
- [internal] Remove @bernardobelchior from Charts CODEOWNERS (#21776) @Copilot
|
|
120
|
+
|
|
121
|
+
### Miscellaneous
|
|
122
|
+
|
|
123
|
+
- [x-license] Fix process.env.MUI_VERSION not being replaced during build (#21727) @aemartos
|
|
124
|
+
- [x-license] Add new watermark license status message (#21720) @aemartos
|
|
125
|
+
|
|
126
|
+
## 9.0.0-alpha.3
|
|
127
|
+
|
|
128
|
+
_Mar 12, 2026_
|
|
129
|
+
|
|
130
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
131
|
+
|
|
132
|
+
- 🐞 Bugfixes and internal improvements
|
|
133
|
+
|
|
134
|
+
The following team members contributed to this release:
|
|
135
|
+
@aemartos, @alexfauquette, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @michelengelen, @rita-codes, @sai6855, @siriwatknp
|
|
136
|
+
|
|
137
|
+
### Data Grid
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-data-grid@9.0.0-alpha.3`
|
|
140
|
+
|
|
141
|
+
- [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21265) @michelengelen
|
|
142
|
+
- [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21538) @sai6855
|
|
143
|
+
- [DataGrid] Refactor `headerAlign` style calls (#21541) @sai6855
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
146
|
+
|
|
147
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.3`, plus:
|
|
148
|
+
|
|
149
|
+
- [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21634) @michelengelen
|
|
150
|
+
- [DataGridPro] Fix sorting not reflected in nested server-side data (#21619) @MBilalShafi
|
|
151
|
+
|
|
152
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
153
|
+
|
|
154
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.3`.
|
|
155
|
+
|
|
156
|
+
### Date and Time Pickers
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.3`
|
|
159
|
+
|
|
160
|
+
- [pickers] Refactor `DateRangePickerDay` overrides to use a centralized `elementOverrides` object (#21426) @sai6855
|
|
161
|
+
- [pickers] Migrate from deprecated props for `PickersModalDialog` (#21702) @siriwatknp
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
164
|
+
|
|
165
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.3`.
|
|
166
|
+
|
|
167
|
+
### Charts
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts@9.0.0-alpha.3`
|
|
170
|
+
|
|
171
|
+
- [charts] Differentiate Line Plot roots classes (#21679) @JCQuintas
|
|
172
|
+
- [charts] Enable keyboard navigation by default (#21675) @alexfauquette
|
|
173
|
+
- [charts] Fix keyboard tooltip radar (#21667) @alexfauquette
|
|
174
|
+
- [charts] Fix selector default parameter (#21638) @JCQuintas
|
|
175
|
+
- [charts] Fix tooltip blink between node and pointer anchor (#21611) @alexfauquette
|
|
176
|
+
- [charts] Let tooltip and legend reflect the line shape (#21475) @alexfauquette
|
|
177
|
+
- [charts] Refactor `BarChart` classes structure (#21601) @JCQuintas
|
|
178
|
+
- [charts] Refactor `LineChart` classes structure (#21648) @JCQuintas
|
|
179
|
+
- [charts] Refactor `ScatterChart` classes structure (#21651) @JCQuintas
|
|
180
|
+
- [charts] Refactor `PieChart` classes structure (#21649) @JCQuintas
|
|
181
|
+
- [charts] Remove batch rendering checks in highlight selectors (#21646) @bernardobelchior
|
|
182
|
+
- [charts] Standardize generic arg names to `SeriesType` (#21694) @alexfauquette
|
|
183
|
+
- [charts] Simplify highlight hooks return types (#21695) @alexfauquette
|
|
184
|
+
|
|
185
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
186
|
+
|
|
187
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.3`, plus:
|
|
188
|
+
|
|
189
|
+
- [charts-pro] Fix heatmap style override from `arc` to `cell` (#21693) @Copilot
|
|
190
|
+
- [charts-pro] Fix image export truncated when page is zoomed out (#21685) @bernardobelchior
|
|
191
|
+
- [charts-pro] Speed-up heatmap cell search with an index lookup (#21130) @alexfauquette
|
|
192
|
+
- [charts-pro] Fix heatmap highlight not working (#21710) @Copilot
|
|
193
|
+
|
|
194
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
195
|
+
|
|
196
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.3`, plus:
|
|
197
|
+
|
|
198
|
+
- [charts-premium] Re-enable WebGL tests (#21708) @bernardobelchior
|
|
199
|
+
|
|
200
|
+
### Tree View
|
|
201
|
+
|
|
202
|
+
#### Breaking changes
|
|
203
|
+
|
|
204
|
+
- Remove `TreeViewBaseItem` type (use `TreeViewDefaultItemModelProperties` or a custom interface)
|
|
205
|
+
- Remove `useTreeViewApiRef` hook (use `useRichTreeViewApiRef`, `useSimpleTreeViewApiRef`, or `useRichTreeViewProApiRef`)
|
|
206
|
+
- Remove `status` from content slot props returned by `getContentProps()` (use `data-*` attributes; `status` on `useTreeItem` return value is unchanged)
|
|
207
|
+
- Remove deprecated CSS state classes from `treeItemClasses`: `expanded`, `selected`, `focused`, `disabled`, `editable`, `editing` (use `[data-expanded]`, `[data-selected]`, etc.)
|
|
208
|
+
- The `<RichTreeViewPro />` component has now virtualization enabled by default.
|
|
209
|
+
- The items used inside the `<RichTreeViewPro />` now have a default height of `32px`.
|
|
210
|
+
- The events of the `<RichTreeViewPro />` are now rendered as a flat list instead of a nested tree.
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-tree-view@9.0.0-alpha.3`
|
|
213
|
+
|
|
214
|
+
- [tree view] Remove deprecated APIs (#21591) @flaviendelangle
|
|
215
|
+
- [tree view] Fix collapsed children not selected with `selectionPropagation.descendants` in `SimpleTreeView` (#21253) @flaviendelangle
|
|
216
|
+
|
|
217
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
218
|
+
|
|
219
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.3`, plus:
|
|
220
|
+
|
|
221
|
+
- [RichTreeViewPro] Make the virtualization opt-out and port the layout doc from the data grid (#21461) @flaviendelangle
|
|
222
|
+
|
|
223
|
+
### Codemod
|
|
224
|
+
|
|
225
|
+
#### `@mui/x-codemod@9.0.0-alpha.3`
|
|
226
|
+
|
|
227
|
+
Internal changes.
|
|
228
|
+
|
|
229
|
+
### Docs
|
|
230
|
+
|
|
231
|
+
- [docs] Fix `AssistantWithDataSource` demo crashing (#21555) @sai6855
|
|
232
|
+
- [docs] Remove `Preview` pill from Sankey (#21623) @bernardobelchior
|
|
233
|
+
- [docs] Migrate internal Material UI deprecated APIs (#21680) @siriwatknp
|
|
234
|
+
- [docs] Remove `New` flag on Tree View and Date and Time Pickers features released before v9 alpha (#21585) @flaviendelangle
|
|
235
|
+
|
|
236
|
+
### Core
|
|
237
|
+
|
|
238
|
+
- [code-infra] Remove checkout step (#21688) @Janpot
|
|
239
|
+
- [code-infra] Fix contributor generation in changelog (#21718) @brijeshb42
|
|
240
|
+
- [docs-infra] Do not point to non-existent v8 subdomain (#21640) @cherniavskii
|
|
241
|
+
|
|
242
|
+
### Miscellaneous
|
|
243
|
+
|
|
244
|
+
- [test] Add missing tests for forwarding props to filter operators in DataGrid (#21441) @siriwatknp
|
|
245
|
+
- [x-license] Export additional license types and constants (#21625) @aemartos
|
|
246
|
+
- [x-license] Refactor license verification to accept package info object and add v9 version gating (#21690) @aemartos
|
|
247
|
+
|
|
3
248
|
## 9.0.0-alpha.2
|
|
4
249
|
|
|
5
250
|
_Mar 5, 2026_
|
|
@@ -92,7 +337,7 @@ Internal changes.
|
|
|
92
337
|
|
|
93
338
|
- [docs] Add backticks and parentheses to all functions and hooks (DX-173) (#21496) @mapache-salvaje
|
|
94
339
|
- [docs] Remove mentions of `mySvgRef` (#21559) @bernardobelchior
|
|
95
|
-
- [docs] Update Roadmap section in the docs
|
|
340
|
+
- [docs] Update Roadmap section in the docs (#20892) @alelthomas
|
|
96
341
|
- [docs] Add tutorial and example app for aggregation with row grouping (DX-162) (#21102) @mapache-salvaje
|
|
97
342
|
- [docs] Fix missing codemod docs (#21604) @JCQuintas
|
|
98
343
|
|
|
@@ -13,9 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _useMergedRefs = require("@base-ui/utils/useMergedRefs");
|
|
14
14
|
var _store = require("@mui/x-internals/store");
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var _internals = require("@mui/x-tree-view/internals");
|
|
16
|
+
var _internals = require("@mui/x-license/internals");
|
|
17
|
+
var _internals2 = require("@mui/x-tree-view/internals");
|
|
19
18
|
var _warning = require("@mui/x-internals/warning");
|
|
20
19
|
var _zeroStyled = require("../internals/zero-styled");
|
|
21
20
|
var _richTreeViewProClasses = require("./richTreeViewProClasses");
|
|
@@ -59,7 +58,11 @@ const RichTreeViewProRoot = exports.RichTreeViewProRoot = (0, _zeroStyled.styled
|
|
|
59
58
|
width: '100%'
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
const
|
|
61
|
+
const packageInfo = {
|
|
62
|
+
releaseDate: "MTc3Mzk2NDgwMDAwMA==",
|
|
63
|
+
version: "9.0.0-alpha.4",
|
|
64
|
+
name: 'x-tree-view-pro'
|
|
65
|
+
};
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
68
|
*
|
|
@@ -76,7 +79,7 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
|
|
|
76
79
|
props: inProps,
|
|
77
80
|
name: 'MuiRichTreeViewPro'
|
|
78
81
|
});
|
|
79
|
-
(0,
|
|
82
|
+
(0, _internals.useLicenseVerifier)(packageInfo);
|
|
80
83
|
if (process.env.NODE_ENV !== 'production') {
|
|
81
84
|
if (props.children != null) {
|
|
82
85
|
(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/.']);
|
|
@@ -89,9 +92,14 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
|
|
|
89
92
|
parameters,
|
|
90
93
|
forwardedProps
|
|
91
94
|
} = (0, _useExtractRichTreeViewProParameters.useExtractRichTreeViewProParameters)(props);
|
|
95
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
96
|
+
if (parameters.itemHeight === null && !parameters.disableVirtualization) {
|
|
97
|
+
(0, _warning.warnOnce)(['MUI X: `itemHeight={null}` is not compatible with virtualization.', 'Please use `disableVirtualization` when using `itemHeight={null}`.']);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
92
100
|
|
|
93
101
|
// Context hooks
|
|
94
|
-
const store = (0,
|
|
102
|
+
const store = (0, _internals2.useTreeViewStore)(_RichTreeViewProStore.RichTreeViewProStore, parameters);
|
|
95
103
|
|
|
96
104
|
// Ref hooks
|
|
97
105
|
const ref = React.useRef(null);
|
|
@@ -105,25 +113,24 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
|
|
|
105
113
|
const slots = React.useMemo(() => (0, _extends2.default)({
|
|
106
114
|
root: RichTreeViewProRoot
|
|
107
115
|
}, inSlots), [inSlots]);
|
|
108
|
-
const Renderer = isVirtualizationEnabled ? _RichTreeViewVirtualizedItems.RichTreeViewVirtualizedItems :
|
|
109
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
116
|
+
const Renderer = isVirtualizationEnabled ? _RichTreeViewVirtualizedItems.RichTreeViewVirtualizedItems : _internals2.RichTreeViewItems;
|
|
117
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals2.TreeViewProvider, {
|
|
110
118
|
store: store,
|
|
111
119
|
classes: classes,
|
|
112
120
|
slots: slots,
|
|
113
121
|
slotProps: slotProps,
|
|
114
122
|
apiRef: apiRef,
|
|
115
123
|
rootRef: ref,
|
|
116
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
117
|
-
value:
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals2.TreeViewItemDepthContext.Provider, {
|
|
125
|
+
value: _internals2.itemsSelectors.itemDepth,
|
|
118
126
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Renderer, {
|
|
119
127
|
slots: slots,
|
|
120
128
|
slotProps: slotProps,
|
|
121
129
|
forwardedProps: forwardedProps,
|
|
122
130
|
ownerState: props,
|
|
123
131
|
rootRef: handleRef
|
|
124
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
125
|
-
|
|
126
|
-
releaseInfo: releaseInfo
|
|
132
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
|
|
133
|
+
packageInfo: packageInfo
|
|
127
134
|
})]
|
|
128
135
|
})
|
|
129
136
|
});
|
|
@@ -210,11 +217,16 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
210
217
|
* @default false
|
|
211
218
|
*/
|
|
212
219
|
disableSelection: _propTypes.default.bool,
|
|
220
|
+
/**
|
|
221
|
+
* If `true`, virtualization is disabled.
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
disableVirtualization: _propTypes.default.bool,
|
|
213
225
|
/**
|
|
214
226
|
* When equal to 'flat', the tree is rendered as a flat list (children are rendered as siblings of their parents).
|
|
215
227
|
* When equal to 'nested', the tree is rendered with nested children (children are rendered inside the groupTransition slot of their children).
|
|
216
228
|
* Nested DOM structure is not compatible with collapse / expansion animations.
|
|
217
|
-
* @default 'flat'
|
|
229
|
+
* @default 'flat'
|
|
218
230
|
*/
|
|
219
231
|
domStructure: _propTypes.default.oneOf(['flat', 'nested']),
|
|
220
232
|
/**
|
|
@@ -296,7 +308,8 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
296
308
|
itemChildrenIndentation: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
297
309
|
/**
|
|
298
310
|
* Sets the height in pixel of an item.
|
|
299
|
-
*
|
|
311
|
+
* Set to `null` to explicitly remove any item height restriction when items have different heights (not compatible with virtualization).
|
|
312
|
+
* @default 32
|
|
300
313
|
*/
|
|
301
314
|
itemHeight: _propTypes.default.number,
|
|
302
315
|
items: _propTypes.default.array.isRequired,
|
|
@@ -401,12 +414,5 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
401
414
|
/**
|
|
402
415
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
403
416
|
*/
|
|
404
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
405
|
-
/**
|
|
406
|
-
* Whether virtualization is enabled.
|
|
407
|
-
* If true, the DOM structure will be set to 'flat'.
|
|
408
|
-
* If true and no itemHeight is provided, a default item height of 32px will be used for calculating the virtualization.
|
|
409
|
-
* @default false
|
|
410
|
-
*/
|
|
411
|
-
virtualization: _propTypes.default.bool
|
|
417
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
412
418
|
} : void 0;
|
|
@@ -6,8 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
|
|
7
7
|
import { useStore } from '@mui/x-internals/store';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import { useLicenseVerifier } from '@mui/x-license/
|
|
10
|
-
import { Watermark } from '@mui/x-license/Watermark';
|
|
9
|
+
import { useLicenseVerifier, Watermark } from '@mui/x-license/internals';
|
|
11
10
|
import { TreeViewProvider, RichTreeViewItems, TreeViewItemDepthContext, itemsSelectors, useTreeViewStore } from '@mui/x-tree-view/internals';
|
|
12
11
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
13
12
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.mjs";
|
|
@@ -52,7 +51,11 @@ export const RichTreeViewProRoot = styled('ul', {
|
|
|
52
51
|
width: '100%'
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
|
-
const
|
|
54
|
+
const packageInfo = {
|
|
55
|
+
releaseDate: "MTc3Mzk2NDgwMDAwMA==",
|
|
56
|
+
version: "9.0.0-alpha.4",
|
|
57
|
+
name: 'x-tree-view-pro'
|
|
58
|
+
};
|
|
56
59
|
|
|
57
60
|
/**
|
|
58
61
|
*
|
|
@@ -69,7 +72,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
|
|
|
69
72
|
props: inProps,
|
|
70
73
|
name: 'MuiRichTreeViewPro'
|
|
71
74
|
});
|
|
72
|
-
useLicenseVerifier(
|
|
75
|
+
useLicenseVerifier(packageInfo);
|
|
73
76
|
if (process.env.NODE_ENV !== 'production') {
|
|
74
77
|
if (props.children != null) {
|
|
75
78
|
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/.']);
|
|
@@ -82,6 +85,11 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
|
|
|
82
85
|
parameters,
|
|
83
86
|
forwardedProps
|
|
84
87
|
} = useExtractRichTreeViewProParameters(props);
|
|
88
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
89
|
+
if (parameters.itemHeight === null && !parameters.disableVirtualization) {
|
|
90
|
+
warnOnce(['MUI X: `itemHeight={null}` is not compatible with virtualization.', 'Please use `disableVirtualization` when using `itemHeight={null}`.']);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
85
93
|
|
|
86
94
|
// Context hooks
|
|
87
95
|
const store = useTreeViewStore(RichTreeViewProStore, parameters);
|
|
@@ -115,8 +123,7 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
|
|
|
115
123
|
ownerState: props,
|
|
116
124
|
rootRef: handleRef
|
|
117
125
|
}), /*#__PURE__*/_jsx(Watermark, {
|
|
118
|
-
|
|
119
|
-
releaseInfo: releaseInfo
|
|
126
|
+
packageInfo: packageInfo
|
|
120
127
|
})]
|
|
121
128
|
})
|
|
122
129
|
});
|
|
@@ -203,11 +210,16 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
203
210
|
* @default false
|
|
204
211
|
*/
|
|
205
212
|
disableSelection: PropTypes.bool,
|
|
213
|
+
/**
|
|
214
|
+
* If `true`, virtualization is disabled.
|
|
215
|
+
* @default false
|
|
216
|
+
*/
|
|
217
|
+
disableVirtualization: PropTypes.bool,
|
|
206
218
|
/**
|
|
207
219
|
* When equal to 'flat', the tree is rendered as a flat list (children are rendered as siblings of their parents).
|
|
208
220
|
* When equal to 'nested', the tree is rendered with nested children (children are rendered inside the groupTransition slot of their children).
|
|
209
221
|
* Nested DOM structure is not compatible with collapse / expansion animations.
|
|
210
|
-
* @default 'flat'
|
|
222
|
+
* @default 'flat'
|
|
211
223
|
*/
|
|
212
224
|
domStructure: PropTypes.oneOf(['flat', 'nested']),
|
|
213
225
|
/**
|
|
@@ -289,7 +301,8 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
289
301
|
itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
290
302
|
/**
|
|
291
303
|
* Sets the height in pixel of an item.
|
|
292
|
-
*
|
|
304
|
+
* Set to `null` to explicitly remove any item height restriction when items have different heights (not compatible with virtualization).
|
|
305
|
+
* @default 32
|
|
293
306
|
*/
|
|
294
307
|
itemHeight: PropTypes.number,
|
|
295
308
|
items: PropTypes.array.isRequired,
|
|
@@ -394,13 +407,6 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
|
|
|
394
407
|
/**
|
|
395
408
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
396
409
|
*/
|
|
397
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
398
|
-
/**
|
|
399
|
-
* Whether virtualization is enabled.
|
|
400
|
-
* If true, the DOM structure will be set to 'flat'.
|
|
401
|
-
* If true and no itemHeight is provided, a default item height of 32px will be used for calculating the virtualization.
|
|
402
|
-
* @default false
|
|
403
|
-
*/
|
|
404
|
-
virtualization: PropTypes.bool
|
|
410
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
405
411
|
} : void 0;
|
|
406
412
|
export { RichTreeViewPro };
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useExtractRichTreeViewProParameters = useExtractRichTreeViewProParameters;
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
const _excluded = ["apiRef", "slots", "slotProps", "disabledItemsFocusable", "items", "isItemDisabled", "isItemSelectionDisabled", "getItemLabel", "getItemChildren", "getItemId", "onItemClick", "itemChildrenIndentation", "id", "expandedItems", "defaultExpandedItems", "onExpandedItemsChange", "onItemExpansionToggle", "expansionTrigger", "disableSelection", "selectedItems", "defaultSelectedItems", "multiSelect", "checkboxSelection", "selectionPropagation", "onSelectedItemsChange", "onItemSelectionToggle", "onItemFocus", "itemHeight", "onItemLabelChange", "isItemEditable", "domStructure", "dataSource", "dataSourceCache", "itemsReordering", "isItemReorderable", "canMoveItemToNewPosition", "onItemPositionChange", "
|
|
11
|
+
const _excluded = ["apiRef", "slots", "slotProps", "disabledItemsFocusable", "items", "isItemDisabled", "isItemSelectionDisabled", "getItemLabel", "getItemChildren", "getItemId", "onItemClick", "itemChildrenIndentation", "id", "expandedItems", "defaultExpandedItems", "onExpandedItemsChange", "onItemExpansionToggle", "expansionTrigger", "disableSelection", "selectedItems", "defaultSelectedItems", "multiSelect", "checkboxSelection", "selectionPropagation", "onSelectedItemsChange", "onItemSelectionToggle", "onItemFocus", "itemHeight", "onItemLabelChange", "isItemEditable", "domStructure", "dataSource", "dataSourceCache", "itemsReordering", "isItemReorderable", "canMoveItemToNewPosition", "onItemPositionChange", "disableVirtualization"];
|
|
12
12
|
function useExtractRichTreeViewProParameters(props) {
|
|
13
13
|
const {
|
|
14
14
|
// Props for Provider
|
|
@@ -52,7 +52,7 @@ function useExtractRichTreeViewProParameters(props) {
|
|
|
52
52
|
isItemReorderable,
|
|
53
53
|
canMoveItemToNewPosition,
|
|
54
54
|
onItemPositionChange,
|
|
55
|
-
|
|
55
|
+
disableVirtualization
|
|
56
56
|
|
|
57
57
|
// Forwarded props
|
|
58
58
|
} = props,
|
|
@@ -95,14 +95,14 @@ function useExtractRichTreeViewProParameters(props) {
|
|
|
95
95
|
isItemReorderable,
|
|
96
96
|
canMoveItemToNewPosition,
|
|
97
97
|
onItemPositionChange,
|
|
98
|
-
|
|
98
|
+
disableVirtualization
|
|
99
99
|
}), [
|
|
100
100
|
// Shared parameters
|
|
101
101
|
disabledItemsFocusable, items, isItemDisabled, isItemSelectionDisabled, getItemLabel, getItemChildren, getItemId, onItemClick, itemChildrenIndentation, id, expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemExpansionToggle, expansionTrigger, disableSelection, selectedItems, defaultSelectedItems, multiSelect, checkboxSelection, selectionPropagation, onSelectedItemsChange, onItemSelectionToggle, onItemFocus, itemHeight,
|
|
102
102
|
// RichTreeViewStore parameters
|
|
103
103
|
onItemLabelChange, isItemEditable, domStructure,
|
|
104
104
|
// RichTreeViewProStore parameters
|
|
105
|
-
dataSource, dataSourceCache, itemsReordering, isItemReorderable, canMoveItemToNewPosition, onItemPositionChange,
|
|
105
|
+
dataSource, dataSourceCache, itemsReordering, isItemReorderable, canMoveItemToNewPosition, onItemPositionChange, disableVirtualization]);
|
|
106
106
|
return {
|
|
107
107
|
apiRef,
|
|
108
108
|
slots,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
const _excluded = ["apiRef", "slots", "slotProps", "disabledItemsFocusable", "items", "isItemDisabled", "isItemSelectionDisabled", "getItemLabel", "getItemChildren", "getItemId", "onItemClick", "itemChildrenIndentation", "id", "expandedItems", "defaultExpandedItems", "onExpandedItemsChange", "onItemExpansionToggle", "expansionTrigger", "disableSelection", "selectedItems", "defaultSelectedItems", "multiSelect", "checkboxSelection", "selectionPropagation", "onSelectedItemsChange", "onItemSelectionToggle", "onItemFocus", "itemHeight", "onItemLabelChange", "isItemEditable", "domStructure", "dataSource", "dataSourceCache", "itemsReordering", "isItemReorderable", "canMoveItemToNewPosition", "onItemPositionChange", "
|
|
2
|
+
const _excluded = ["apiRef", "slots", "slotProps", "disabledItemsFocusable", "items", "isItemDisabled", "isItemSelectionDisabled", "getItemLabel", "getItemChildren", "getItemId", "onItemClick", "itemChildrenIndentation", "id", "expandedItems", "defaultExpandedItems", "onExpandedItemsChange", "onItemExpansionToggle", "expansionTrigger", "disableSelection", "selectedItems", "defaultSelectedItems", "multiSelect", "checkboxSelection", "selectionPropagation", "onSelectedItemsChange", "onItemSelectionToggle", "onItemFocus", "itemHeight", "onItemLabelChange", "isItemEditable", "domStructure", "dataSource", "dataSourceCache", "itemsReordering", "isItemReorderable", "canMoveItemToNewPosition", "onItemPositionChange", "disableVirtualization"];
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export function useExtractRichTreeViewProParameters(props) {
|
|
5
5
|
const {
|
|
@@ -44,7 +44,7 @@ export function useExtractRichTreeViewProParameters(props) {
|
|
|
44
44
|
isItemReorderable,
|
|
45
45
|
canMoveItemToNewPosition,
|
|
46
46
|
onItemPositionChange,
|
|
47
|
-
|
|
47
|
+
disableVirtualization
|
|
48
48
|
|
|
49
49
|
// Forwarded props
|
|
50
50
|
} = props,
|
|
@@ -87,14 +87,14 @@ export function useExtractRichTreeViewProParameters(props) {
|
|
|
87
87
|
isItemReorderable,
|
|
88
88
|
canMoveItemToNewPosition,
|
|
89
89
|
onItemPositionChange,
|
|
90
|
-
|
|
90
|
+
disableVirtualization
|
|
91
91
|
}), [
|
|
92
92
|
// Shared parameters
|
|
93
93
|
disabledItemsFocusable, items, isItemDisabled, isItemSelectionDisabled, getItemLabel, getItemChildren, getItemId, onItemClick, itemChildrenIndentation, id, expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemExpansionToggle, expansionTrigger, disableSelection, selectedItems, defaultSelectedItems, multiSelect, checkboxSelection, selectionPropagation, onSelectedItemsChange, onItemSelectionToggle, onItemFocus, itemHeight,
|
|
94
94
|
// RichTreeViewStore parameters
|
|
95
95
|
onItemLabelChange, isItemEditable, domStructure,
|
|
96
96
|
// RichTreeViewProStore parameters
|
|
97
|
-
dataSource, dataSourceCache, itemsReordering, isItemReorderable, canMoveItemToNewPosition, onItemPositionChange,
|
|
97
|
+
dataSource, dataSourceCache, itemsReordering, isItemReorderable, canMoveItemToNewPosition, onItemPositionChange, disableVirtualization]);
|
|
98
98
|
return {
|
|
99
99
|
apiRef,
|
|
100
100
|
slots,
|
|
@@ -68,7 +68,7 @@ function RichTreeViewVirtualizedItems(props) {
|
|
|
68
68
|
const virtualizer = (0, _xVirtualizer.useVirtualizer)({
|
|
69
69
|
layout,
|
|
70
70
|
dimensions: {
|
|
71
|
-
rowHeight: defaultItemHeight
|
|
71
|
+
rowHeight: defaultItemHeight ?? 32
|
|
72
72
|
},
|
|
73
73
|
virtualization: {},
|
|
74
74
|
rows: items,
|
|
@@ -61,7 +61,7 @@ export function RichTreeViewVirtualizedItems(props) {
|
|
|
61
61
|
const virtualizer = useVirtualizer({
|
|
62
62
|
layout,
|
|
63
63
|
dimensions: {
|
|
64
|
-
rowHeight: defaultItemHeight
|
|
64
|
+
rowHeight: defaultItemHeight ?? 32
|
|
65
65
|
},
|
|
66
66
|
virtualization: {},
|
|
67
67
|
rows: items,
|
package/index.d.mts
CHANGED
|
@@ -8,5 +8,5 @@ export * from '@mui/x-tree-view/TreeItemDragAndDropOverlay';
|
|
|
8
8
|
export * from '@mui/x-tree-view/TreeItemLabelInput';
|
|
9
9
|
export * from '@mui/x-tree-view/models';
|
|
10
10
|
export * from '@mui/x-tree-view/icons';
|
|
11
|
-
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount
|
|
11
|
+
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount } from '@mui/x-tree-view/hooks';
|
|
12
12
|
export * from "./hooks/index.mjs";
|
package/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export * from '@mui/x-tree-view/TreeItemDragAndDropOverlay';
|
|
|
8
8
|
export * from '@mui/x-tree-view/TreeItemLabelInput';
|
|
9
9
|
export * from '@mui/x-tree-view/models';
|
|
10
10
|
export * from '@mui/x-tree-view/icons';
|
|
11
|
-
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount
|
|
11
|
+
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount } from '@mui/x-tree-view/hooks';
|
|
12
12
|
export * from "./hooks/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-tree-view-pro v9.0.0-alpha.
|
|
2
|
+
* @mui/x-tree-view-pro v9.0.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -13,8 +13,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
13
13
|
var _exportNames = {
|
|
14
14
|
useTreeItemUtils: true,
|
|
15
15
|
useTreeItemModel: true,
|
|
16
|
-
useApplyPropagationToSelectedItemsOnMount: true
|
|
17
|
-
useTreeViewApiRef: true
|
|
16
|
+
useApplyPropagationToSelectedItemsOnMount: true
|
|
18
17
|
};
|
|
19
18
|
Object.defineProperty(exports, "useApplyPropagationToSelectedItemsOnMount", {
|
|
20
19
|
enumerable: true,
|
|
@@ -34,12 +33,6 @@ Object.defineProperty(exports, "useTreeItemUtils", {
|
|
|
34
33
|
return _hooks.useTreeItemUtils;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
Object.defineProperty(exports, "useTreeViewApiRef", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _hooks.useTreeViewApiRef;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
36
|
var _SimpleTreeView = require("@mui/x-tree-view/SimpleTreeView");
|
|
44
37
|
Object.keys(_SimpleTreeView).forEach(function (key) {
|
|
45
38
|
if (key === "default" || key === "__esModule") return;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-tree-view-pro v9.0.0-alpha.
|
|
2
|
+
* @mui/x-tree-view-pro v9.0.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -18,5 +18,5 @@ export * from '@mui/x-tree-view/TreeItemDragAndDropOverlay';
|
|
|
18
18
|
export * from '@mui/x-tree-view/TreeItemLabelInput';
|
|
19
19
|
export * from '@mui/x-tree-view/models';
|
|
20
20
|
export * from '@mui/x-tree-view/icons';
|
|
21
|
-
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount
|
|
21
|
+
export { useTreeItemUtils, useTreeItemModel, useApplyPropagationToSelectedItemsOnMount } from '@mui/x-tree-view/hooks';
|
|
22
22
|
export * from "./hooks/index.mjs";
|
|
@@ -74,14 +74,18 @@ export interface RichTreeViewProStoreParameters<R extends TreeViewValidItem<R>,
|
|
|
74
74
|
* When equal to 'flat', the tree is rendered as a flat list (children are rendered as siblings of their parents).
|
|
75
75
|
* When equal to 'nested', the tree is rendered with nested children (children are rendered inside the groupTransition slot of their children).
|
|
76
76
|
* Nested DOM structure is not compatible with collapse / expansion animations.
|
|
77
|
-
* @default 'flat'
|
|
77
|
+
* @default 'flat'
|
|
78
78
|
*/
|
|
79
79
|
domStructure?: TreeViewDOMStructure;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
82
|
-
* If true, the DOM structure will be set to 'flat'.
|
|
83
|
-
* If true and no itemHeight is provided, a default item height of 32px will be used for calculating the virtualization.
|
|
81
|
+
* If `true`, virtualization is disabled.
|
|
84
82
|
* @default false
|
|
85
83
|
*/
|
|
86
|
-
|
|
84
|
+
disableVirtualization?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the height in pixel of an item.
|
|
87
|
+
* Set to `null` to explicitly remove any item height restriction when items have different heights (not compatible with virtualization).
|
|
88
|
+
* @default 32
|
|
89
|
+
*/
|
|
90
|
+
itemHeight?: number | null;
|
|
87
91
|
}
|
|
@@ -74,14 +74,18 @@ export interface RichTreeViewProStoreParameters<R extends TreeViewValidItem<R>,
|
|
|
74
74
|
* When equal to 'flat', the tree is rendered as a flat list (children are rendered as siblings of their parents).
|
|
75
75
|
* When equal to 'nested', the tree is rendered with nested children (children are rendered inside the groupTransition slot of their children).
|
|
76
76
|
* Nested DOM structure is not compatible with collapse / expansion animations.
|
|
77
|
-
* @default 'flat'
|
|
77
|
+
* @default 'flat'
|
|
78
78
|
*/
|
|
79
79
|
domStructure?: TreeViewDOMStructure;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
82
|
-
* If true, the DOM structure will be set to 'flat'.
|
|
83
|
-
* If true and no itemHeight is provided, a default item height of 32px will be used for calculating the virtualization.
|
|
81
|
+
* If `true`, virtualization is disabled.
|
|
84
82
|
* @default false
|
|
85
83
|
*/
|
|
86
|
-
|
|
84
|
+
disableVirtualization?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the height in pixel of an item.
|
|
87
|
+
* Set to `null` to explicitly remove any item height restriction when items have different heights (not compatible with virtualization).
|
|
88
|
+
* @default 32
|
|
89
|
+
*/
|
|
90
|
+
itemHeight?: number | null;
|
|
87
91
|
}
|
|
@@ -10,14 +10,14 @@ var _internals = require("@mui/x-tree-view/internals");
|
|
|
10
10
|
var _lazyLoading = require("../plugins/lazyLoading");
|
|
11
11
|
const DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED = () => true;
|
|
12
12
|
const DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED = () => false;
|
|
13
|
-
const
|
|
13
|
+
const DEFAULT_ITEM_HEIGHT = 32;
|
|
14
14
|
const deriveStateFromParameters = parameters => ({
|
|
15
15
|
lazyLoadedItems: parameters.dataSource ? _lazyLoading.TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE : null,
|
|
16
16
|
currentReorder: null,
|
|
17
17
|
isItemReorderable: parameters.itemsReordering ? parameters.isItemReorderable ?? DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED : DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED,
|
|
18
|
-
domStructure: parameters.domStructure ??
|
|
19
|
-
virtualization: parameters.
|
|
20
|
-
itemHeight: parameters.itemHeight
|
|
18
|
+
domStructure: parameters.domStructure ?? 'flat',
|
|
19
|
+
virtualization: !(parameters.disableVirtualization ?? false),
|
|
20
|
+
itemHeight: parameters.itemHeight === undefined ? DEFAULT_ITEM_HEIGHT : parameters.itemHeight
|
|
21
21
|
});
|
|
22
22
|
const parametersToStateMapper = exports.parametersToStateMapper = {
|
|
23
23
|
getInitialState: (minimalInitialState, parameters) => (0, _extends2.default)({}, _internals.ExtendableRichTreeViewStore.rawMapper.getInitialState(minimalInitialState, parameters), deriveStateFromParameters(parameters)),
|
|
@@ -3,14 +3,14 @@ import { ExtendableRichTreeViewStore } from '@mui/x-tree-view/internals';
|
|
|
3
3
|
import { TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE } from "../plugins/lazyLoading/index.mjs";
|
|
4
4
|
const DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED = () => true;
|
|
5
5
|
const DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED = () => false;
|
|
6
|
-
const
|
|
6
|
+
const DEFAULT_ITEM_HEIGHT = 32;
|
|
7
7
|
const deriveStateFromParameters = parameters => ({
|
|
8
8
|
lazyLoadedItems: parameters.dataSource ? TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE : null,
|
|
9
9
|
currentReorder: null,
|
|
10
10
|
isItemReorderable: parameters.itemsReordering ? parameters.isItemReorderable ?? DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED : DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED,
|
|
11
|
-
domStructure: parameters.domStructure ??
|
|
12
|
-
virtualization: parameters.
|
|
13
|
-
itemHeight: parameters.itemHeight
|
|
11
|
+
domStructure: parameters.domStructure ?? 'flat',
|
|
12
|
+
virtualization: !(parameters.disableVirtualization ?? false),
|
|
13
|
+
itemHeight: parameters.itemHeight === undefined ? DEFAULT_ITEM_HEIGHT : parameters.itemHeight
|
|
14
14
|
});
|
|
15
15
|
export const parametersToStateMapper = {
|
|
16
16
|
getInitialState: (minimalInitialState, parameters) => _extends({}, ExtendableRichTreeViewStore.rawMapper.getInitialState(minimalInitialState, parameters), deriveStateFromParameters(parameters)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-tree-view-pro",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.4",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Tree View components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"react-transition-group": "^4.4.5",
|
|
41
41
|
"reselect": "^5.1.1",
|
|
42
42
|
"use-sync-external-store": "^1.6.0",
|
|
43
|
-
"@mui/x-internals": "9.0.0-alpha.
|
|
44
|
-
"@mui/x-license": "9.0.0-alpha.
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
43
|
+
"@mui/x-internals": "9.0.0-alpha.4",
|
|
44
|
+
"@mui/x-license": "9.0.0-alpha.4",
|
|
45
|
+
"@mui/x-virtualizer": "1.0.0-beta.0",
|
|
46
|
+
"@mui/x-tree-view": "9.0.0-alpha.4"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|