@mui/x-tree-view-pro 8.0.0-beta.1 → 8.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,241 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.0.0-beta.3
9
+
10
+ _Apr 3, 2025_
11
+
12
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🚫 Removed `react-spring` as a dependency of `@mui/x-charts`
15
+ - 📦 Data Grid list view feature is now stable
16
+ - 💫 Support title in Data Grid
17
+ - 📚 Documentation improvements
18
+ - 🐞 Bugfixes
19
+
20
+ Team members who have contributed to this release:
21
+ @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
22
+
23
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24
+
25
+ ### Data Grid
26
+
27
+ #### Breaking changes
28
+
29
+ - The list view feature and its related props are now stable.
30
+
31
+ The `unstable_listColumn` prop has been renamed to `listViewColumn`.
32
+
33
+ The `GridListColDef` type has been renamed to `GridListViewColDef`.
34
+
35
+ ```diff
36
+ -const listViewColDef: GridListColDef = {
37
+ +const listViewColDef: GridListViewColDef = {
38
+ field: 'listColumn',
39
+ renderCell: ListViewCell,
40
+ };
41
+
42
+ <DataGridPro
43
+ - unstable_listView
44
+ - unstable_listColumn={listViewColDef}
45
+ + listView
46
+ + listViewColumn={listViewColDef}
47
+ />
48
+ ```
49
+
50
+ - The `useGridApiEventHandler()` hook has been renamed to `useGridEvent()`.
51
+ - The `useGridApiOptionHandler()` hook has been renamed to `useGridEventPriority()`.
52
+
53
+ #### `@mui/x-data-grid@8.0.0-beta.3`
54
+
55
+ - [DataGrid] Fix "is any of" autocomplete rendering (#17226) @KenanYusuf
56
+ - [DataGrid] Rename `useGridApiEventHandler()` to `useGridEvent()` (#17159) @romgrk
57
+ - [DataGrid] Support adding a label to the grid (#17147) @KenanYusuf
58
+ - [DataGrid] Refactor: remove material typings (#17119) @romgrk
59
+
60
+ #### `@mui/x-data-grid-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
61
+
62
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.3`, plus:
63
+
64
+ - [DataGridPro] Make list view feature stable (#17217) @KenanYusuf
65
+ - [DataGridPro] Always refetch lazy-loading rows (#16827) @MBilalShafi
66
+
67
+ #### `@mui/x-data-grid-premium@8.0.0-beta.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
68
+
69
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.3`.
70
+
71
+ ### Date and Time Pickers
72
+
73
+ #### `@mui/x-date-pickers@8.0.0-beta.3`
74
+
75
+ - [pickers] Add new `nextOrAccept` action bar action (#17037) @flaviendelangle
76
+ - [pickers] Improve the Multi Section Digital Clock scrollbar thickness (#16774) @oliviertassinari
77
+ - [TimePicker] Align the Digital Clock scrollbar thickness (#17203) @LukasTy
78
+
79
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
80
+
81
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.3`.
82
+
83
+ ### Charts
84
+
85
+ #### Breaking changes
86
+
87
+ - Removed `react-spring` as a dependency of `@mui/x-charts`.
88
+ A consequence of this change is that the props of some slots have been changed because the `SpringValue` wrapper has been removed. The affected slots and props are:
89
+
90
+ - the type of the `x`, `y`, `width` and `height` props of the `bar` slot are now `number`;
91
+ - the type of `startAngle`, `endAngle`, `innerRadius`, `outerRadius`, `arcLabelRadius`, `cornerRadius` and `paddingAngle` props of `pieArc` and `pieArcLabel` slot are now `number`.
92
+
93
+ Additionally, the `pieArc` slot now receives a `skipAnimation` prop to configure whether animations should be enabled or disabled.
94
+
95
+ - Tick labels in the y-axis of cartesian charts will now have an ellipsis applied to prevent overflow.
96
+ If your tick labels are being clipped sooner than you would like, you can increase the y-axis size by increasing its width property.
97
+
98
+ - The tooltip DOM structure is modified to improve accessibility. If you relied on it to apply some style or run tests, you might be impacted by this modification.
99
+ - The axis tooltip displays a table per axis with the axis value in a caption.
100
+ - Cells containing the series label and the color mark got merged in a th cell.
101
+
102
+ #### `@mui/x-charts@8.0.0-beta.3`
103
+
104
+ - [charts] Adjust color palettes (#17209) @noraleonte
105
+ - [charts] Allow multiple axes in the tooltip (#17058) @alexfauquette
106
+ - [charts] Improve custom legend docs (#17231) @JCQuintas
107
+ - [charts] Fix crash when item shown in tooltip is unmounted (#17169) @bernardobelchior
108
+ - [charts] Migrate some animations from `react-spring` (#16961) @bernardobelchior
109
+ - [charts] Remove `react-spring` (#17123) @bernardobelchior
110
+ - [charts] Fix y-axis tick label overflow (#16846) @bernardobelchior
111
+
112
+ #### `@mui/x-charts-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
113
+
114
+ Same changes as in `@mui/x-charts@8.0.0-beta.3`.
115
+
116
+ ### Tree View
117
+
118
+ #### `@mui/x-tree-view@8.0.0-beta.3`
119
+
120
+ Internal changes.
121
+
122
+ #### `@mui/x-tree-view-pro@8.0.0-beta.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
123
+
124
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.3`.
125
+
126
+ ### `@mui/x-codemod@8.0.0-beta.3`
127
+
128
+ - [codemod] Add `listView` prop rename codemod (#17220) @MBilalShafi
129
+
130
+ ### Docs
131
+
132
+ - [docs] Add "Usage with Material UI v5/v6" guide (#17164) @cherniavskii
133
+ - [docs] Fix 301 link @oliviertassinari
134
+ - [docs] Fix redirection getting-started (#17200) @oliviertassinari
135
+ - [docs] Sync Stack Overflow docs with reality (#17198) @oliviertassinari
136
+ - [docs] Update Localization Provider JSDoc link (#17207) @LukasTy
137
+
138
+ ### Core
139
+
140
+ - [core] Cleanup `@mui` dependency versions (#17160) @LukasTy
141
+ - [core] Sync scorecards.yml across codebase @oliviertassinari
142
+ - [core] Revert upgrade to React 19.1 (#17206) @bernardobelchior
143
+ - [code-infra] Fix `test:unit` warning (#17224) @JCQuintas
144
+ - [code-infra] Fix pickers failing test after clock=fake removal (#17202) @JCQuintas
145
+ - [code-infra] Remove clock=fake from `describeValidation` (#17150) @JCQuintas
146
+ - [code-infra] Remove clock=fake from `describeValue` (#17199) @JCQuintas
147
+ - [infra] Add write permission for actions in issue status label handler (#17161) @michelengelen
148
+
149
+ ## 8.0.0-beta.2
150
+
151
+ _Mar 27, 2025_
152
+
153
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
154
+
155
+ - 🔍 Update the Data Grid quick filter to be collapsed when not in use
156
+ - 🐞 Bugfixes
157
+
158
+ Special thanks go out to the community members for their valuable contributions:
159
+ @lhilgert9.
160
+ Following are all team members who have contributed to this release:
161
+ @alexfauquette, @arminmeh, @flaviendelangle, @hasdfa, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @mnajdova, @romgrk.
162
+
163
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
164
+
165
+ ### Data Grid
166
+
167
+ #### `@mui/x-data-grid@8.0.0-beta.2`
168
+
169
+ - [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17057) @arminmeh
170
+ - [DataGrid] Refactor: remove more material (#16922) @romgrk
171
+ - [DataGrid] Update Quick Filter component to be expandable (#16862) @KenanYusuf
172
+ - [DataGrid] Fix crash when used with `@mui/styled-engine-sc` (#17154) @KenanYusuf
173
+
174
+ #### `@mui/x-data-grid-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
175
+
176
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.2`, plus:
177
+
178
+ - [DataGridPro] Data source: Allow expanding groups with unknown children (#17144) @MBilalShafi
179
+
180
+ #### `@mui/x-data-grid-premium@8.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
181
+
182
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.2`.
183
+
184
+ ### Date and Time Pickers
185
+
186
+ #### `@mui/x-date-pickers@8.0.0-beta.2`
187
+
188
+ - [fields] Extract the props of each field slot into a standalone hook for easier re-use (#17114) @flaviendelangle
189
+ - [pickers] Fix visual regression in Date Range Calendar's day (#17148) @flaviendelangle
190
+ - [pickers] Remove all code duplication to apply default values to validation props (#17038) @flaviendelangle
191
+
192
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
193
+
194
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.2`.
195
+
196
+ ### Charts
197
+
198
+ #### `@mui/x-charts@8.0.0-beta.2`
199
+
200
+ - [charts] Memoize axes and series with default (#17156) @alexfauquette
201
+ - [charts] Add pie benchmark (#17115) @JCQuintas
202
+ - [charts] Fix CSS vars support for dark theme (#17106) @alexfauquette
203
+ - [charts] Fix radar hover (#17134) @alexfauquette
204
+ - [charts] Move axis interaction to selectors (#17039) @alexfauquette
205
+ - [charts] Fix Pie benchmark (#17125) @JCQuintas
206
+
207
+ #### `@mui/x-charts-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
208
+
209
+ Same changes as in `@mui/x-charts@8.0.0-beta.2`.
210
+
211
+ ### Tree View
212
+
213
+ #### `@mui/x-tree-view@8.0.0-beta.2`
214
+
215
+ Internal changes.
216
+
217
+ #### `@mui/x-tree-view-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
218
+
219
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.2`.
220
+
221
+ ### `@mui/x-codemod@8.0.0-beta.1`
222
+
223
+ - [codemod] Add Data Grid codemods (#17121, #17124) @MBilalShafi
224
+
225
+ ### Docs
226
+
227
+ - [docs] Fix example import for `ExportExcel` component (#17110) @KenanYusuf
228
+
229
+ ### Core
230
+
231
+ - [code-infra] Remove `@mui/styles` dependency & patches (#17071) @mnajdova
232
+ - [code-infra] Add more tests to slow screenshot tests (#17075) @JCQuintas
233
+ - [code-infra] Fix pickers codecov (#17120) @JCQuintas
234
+ - [code-infra] Move `isDeepEqual` to @mui/x-internals (#17129) @JCQuintas
235
+ - [code-infra] Remove `test_regressions` step from React 18 pipeline (#17108) @LukasTy
236
+ - [code-infra] Update some data-grid tests for vitest (#17078, #17104, #17146) @JCQuintas
237
+ - [code-infra] Update some date-pickers tests for vitest (#17083) @JCQuintas
238
+ - [infra] Update `issue-status-label-handler.yml` @michelengelen
239
+ - [infra] Added reusable issue status label handler workflow (#17145) @michelengelen
240
+ - [infra] Switch to reusable 'stale issues/PRs' workflow (#17107) @michelengelen
241
+ - [telemetry] Improve request body size, update dependencies, and optimize SSR handling (#17008) @hasdfa
242
+
8
243
  ## 8.0.0-beta.1
9
244
 
10
245
  _Mar 21, 2025_
@@ -25,10 +25,21 @@ const useUtilityClasses = ownerState => {
25
25
  const {
26
26
  classes
27
27
  } = ownerState;
28
- const slots = {
29
- root: ['root']
30
- };
31
- return (0, _composeClasses.default)(slots, _richTreeViewProClasses.getRichTreeViewProUtilityClass, classes);
28
+ return React.useMemo(() => {
29
+ const slots = {
30
+ root: ['root'],
31
+ item: ['item'],
32
+ itemContent: ['itemContent'],
33
+ itemGroupTransition: ['itemGroupTransition'],
34
+ itemIconContainer: ['itemIconContainer'],
35
+ itemLabel: ['itemLabel'],
36
+ itemLabelInput: ['itemLabelInput'],
37
+ itemCheckbox: ['itemCheckbox'],
38
+ itemDragAndDropOverlay: ['itemDragAndDropOverlay'],
39
+ itemErrorIcon: ['itemErrorIcon']
40
+ };
41
+ return (0, _composeClasses.default)(slots, _richTreeViewProClasses.getRichTreeViewProUtilityClass, classes);
42
+ }, [classes]);
32
43
  };
33
44
  const RichTreeViewProRoot = exports.RichTreeViewProRoot = (0, _zeroStyled.styled)('ul', {
34
45
  name: 'MuiRichTreeViewPro',
@@ -86,7 +97,8 @@ const RichTreeViewPro = exports.RichTreeViewPro = /*#__PURE__*/React.forwardRef(
86
97
  ownerState: props
87
98
  });
88
99
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.TreeViewProvider, {
89
- value: contextValue,
100
+ contextValue: contextValue,
101
+ classes: classes,
90
102
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, {
91
103
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.RichTreeViewItems, {
92
104
  slots: slots,
@@ -140,8 +152,8 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
140
152
  classes: _propTypes.default.object,
141
153
  className: _propTypes.default.string,
142
154
  dataSource: _propTypes.default.shape({
143
- getChildrenCount: _propTypes.default.func,
144
- getTreeItems: _propTypes.default.func
155
+ getChildrenCount: _propTypes.default.func.isRequired,
156
+ getTreeItems: _propTypes.default.func.isRequired
145
157
  }),
146
158
  dataSourceCache: _propTypes.default.shape({
147
159
  clear: _propTypes.default.func.isRequired,
@@ -1,7 +1,5 @@
1
- export interface RichTreeViewProClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
1
+ import { TreeViewClasses } from '@mui/x-tree-view/internals';
2
+ export interface RichTreeViewProClasses extends TreeViewClasses {}
5
3
  export type RichTreeViewProClassKey = keyof RichTreeViewProClasses;
6
4
  export declare function getRichTreeViewProUtilityClass(slot: string): string;
7
5
  export declare const richTreeViewProClasses: RichTreeViewProClasses;
@@ -11,4 +11,4 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
11
11
  function getRichTreeViewProUtilityClass(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiRichTreeViewPro', slot);
13
13
  }
14
- const richTreeViewProClasses = exports.richTreeViewProClasses = (0, _generateUtilityClasses.default)('MuiRichTreeViewPro', ['root']);
14
+ const richTreeViewProClasses = exports.richTreeViewProClasses = (0, _generateUtilityClasses.default)('MuiRichTreeViewPro', ['root', 'item', 'itemContent', 'itemGroupTransition', 'itemIconContainer', 'itemLabel', 'itemCheckbox', 'itemLabelInput', 'itemDragAndDropOverlay', 'itemErrorIcon', 'itemLoadingIcon']);
@@ -18,10 +18,21 @@ const useUtilityClasses = ownerState => {
18
18
  const {
19
19
  classes
20
20
  } = ownerState;
21
- const slots = {
22
- root: ['root']
23
- };
24
- return composeClasses(slots, getRichTreeViewProUtilityClass, classes);
21
+ return React.useMemo(() => {
22
+ const slots = {
23
+ root: ['root'],
24
+ item: ['item'],
25
+ itemContent: ['itemContent'],
26
+ itemGroupTransition: ['itemGroupTransition'],
27
+ itemIconContainer: ['itemIconContainer'],
28
+ itemLabel: ['itemLabel'],
29
+ itemLabelInput: ['itemLabelInput'],
30
+ itemCheckbox: ['itemCheckbox'],
31
+ itemDragAndDropOverlay: ['itemDragAndDropOverlay'],
32
+ itemErrorIcon: ['itemErrorIcon']
33
+ };
34
+ return composeClasses(slots, getRichTreeViewProUtilityClass, classes);
35
+ }, [classes]);
25
36
  };
26
37
  export const RichTreeViewProRoot = styled('ul', {
27
38
  name: 'MuiRichTreeViewPro',
@@ -79,7 +90,8 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
79
90
  ownerState: props
80
91
  });
81
92
  return /*#__PURE__*/_jsx(TreeViewProvider, {
82
- value: contextValue,
93
+ contextValue: contextValue,
94
+ classes: classes,
83
95
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
84
96
  children: [/*#__PURE__*/_jsx(RichTreeViewItems, {
85
97
  slots: slots,
@@ -133,8 +145,8 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
133
145
  classes: PropTypes.object,
134
146
  className: PropTypes.string,
135
147
  dataSource: PropTypes.shape({
136
- getChildrenCount: PropTypes.func,
137
- getTreeItems: PropTypes.func
148
+ getChildrenCount: PropTypes.func.isRequired,
149
+ getTreeItems: PropTypes.func.isRequired
138
150
  }),
139
151
  dataSourceCache: PropTypes.shape({
140
152
  clear: PropTypes.func.isRequired,
@@ -1,7 +1,5 @@
1
- export interface RichTreeViewProClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
1
+ import { TreeViewClasses } from '@mui/x-tree-view/internals';
2
+ export interface RichTreeViewProClasses extends TreeViewClasses {}
5
3
  export type RichTreeViewProClassKey = keyof RichTreeViewProClasses;
6
4
  export declare function getRichTreeViewProUtilityClass(slot: string): string;
7
5
  export declare const richTreeViewProClasses: RichTreeViewProClasses;
@@ -3,4 +3,4 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  export function getRichTreeViewProUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiRichTreeViewPro', slot);
5
5
  }
6
- export const richTreeViewProClasses = generateUtilityClasses('MuiRichTreeViewPro', ['root']);
6
+ export const richTreeViewProClasses = generateUtilityClasses('MuiRichTreeViewPro', ['root', 'item', 'itemContent', 'itemGroupTransition', 'itemIconContainer', 'itemLabel', 'itemCheckbox', 'itemLabelInput', 'itemDragAndDropOverlay', 'itemErrorIcon', 'itemLoadingIcon']);
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v8.0.0-beta.1
2
+ * @mui/x-tree-view-pro v8.0.0-beta.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useLazyRef from '@mui/utils/useLazyRef';
4
- import { warnOnce } from '@mui/x-internals/warning';
5
4
  import useEventCallback from '@mui/utils/useEventCallback';
6
5
  import { selectorItemMeta, selectorIsItemSelected, useInstanceEventHandler, selectorDataSourceState, selectorGetTreeItemError } from '@mui/x-tree-view/internals';
7
6
  import { DataSourceCacheDefault } from '@mui/x-tree-view/utils';
@@ -26,7 +25,7 @@ export const useTreeViewLazyLoading = ({
26
25
  params,
27
26
  store
28
27
  }) => {
29
- const isLazyLoadingEnabled = params.dataSource?.getChildrenCount !== undefined;
28
+ const isLazyLoadingEnabled = !!params.dataSource;
30
29
  const firstRenderRef = React.useRef(true);
31
30
  const nestedDataManager = useLazyRef(() => new NestedDataManager(instance)).current;
32
31
  const cacheRef = useLazyRef(() => getCache(params.dataSourceCache));
@@ -258,24 +257,6 @@ export const useTreeViewLazyLoading = ({
258
257
  publicAPI: {}
259
258
  };
260
259
  };
261
- useTreeViewLazyLoading.getDefaultizedParams = ({
262
- params,
263
- experimentalFeatures
264
- }) => {
265
- const canUseFeature = experimentalFeatures?.lazyLoading;
266
- if (process.env.NODE_ENV !== 'production') {
267
- if (params.dataSource && !canUseFeature) {
268
- warnOnce(['MUI X: The label editing feature requires the `lazyLoading` experimental feature to be enabled.', 'You can do it by passing `experimentalFeatures={{ lazyLoading: true}}` to the Rich Tree View Pro component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/lazy-loading/']);
269
- }
270
- }
271
- const defaultDataSource = params?.dataSource ?? {
272
- getChildrenCount: () => 0,
273
- getTreeItems: () => Promise.resolve([])
274
- };
275
- return _extends({}, params, {
276
- dataSource: canUseFeature ? defaultDataSource : {}
277
- });
278
- };
279
260
  useTreeViewLazyLoading.getInitialState = () => ({
280
261
  lazyLoading: {
281
262
  enabled: false,
@@ -1,6 +1,6 @@
1
1
  import ponyfillGlobal from '@mui/utils/ponyfillGlobal';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTc0MjUxNTIwMDAwMA==";
3
+ const releaseInfo = "MTc0MzYzMTIwMDAwMA==";
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
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v8.0.0-beta.1
2
+ * @mui/x-tree-view-pro v8.0.0-beta.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -9,7 +9,6 @@ exports.useTreeViewLazyLoading = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
12
- var _warning = require("@mui/x-internals/warning");
13
12
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
14
13
  var _internals = require("@mui/x-tree-view/internals");
15
14
  var _utils = require("@mui/x-tree-view/utils");
@@ -34,7 +33,7 @@ const useTreeViewLazyLoading = ({
34
33
  params,
35
34
  store
36
35
  }) => {
37
- const isLazyLoadingEnabled = params.dataSource?.getChildrenCount !== undefined;
36
+ const isLazyLoadingEnabled = !!params.dataSource;
38
37
  const firstRenderRef = React.useRef(true);
39
38
  const nestedDataManager = (0, _useLazyRef.default)(() => new _utils2.NestedDataManager(instance)).current;
40
39
  const cacheRef = (0, _useLazyRef.default)(() => getCache(params.dataSourceCache));
@@ -267,24 +266,6 @@ const useTreeViewLazyLoading = ({
267
266
  };
268
267
  };
269
268
  exports.useTreeViewLazyLoading = useTreeViewLazyLoading;
270
- useTreeViewLazyLoading.getDefaultizedParams = ({
271
- params,
272
- experimentalFeatures
273
- }) => {
274
- const canUseFeature = experimentalFeatures?.lazyLoading;
275
- if (process.env.NODE_ENV !== 'production') {
276
- if (params.dataSource && !canUseFeature) {
277
- (0, _warning.warnOnce)(['MUI X: The label editing feature requires the `lazyLoading` experimental feature to be enabled.', 'You can do it by passing `experimentalFeatures={{ lazyLoading: true}}` to the Rich Tree View Pro component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/lazy-loading/']);
278
- }
279
- }
280
- const defaultDataSource = params?.dataSource ?? {
281
- getChildrenCount: () => 0,
282
- getTreeItems: () => Promise.resolve([])
283
- };
284
- return (0, _extends2.default)({}, params, {
285
- dataSource: canUseFeature ? defaultDataSource : {}
286
- });
287
- };
288
269
  useTreeViewLazyLoading.getInitialState = () => ({
289
270
  lazyLoading: {
290
271
  enabled: false,
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getReleaseInfo = void 0;
8
8
  var _ponyfillGlobal = _interopRequireDefault(require("@mui/utils/ponyfillGlobal"));
9
9
  const getReleaseInfo = () => {
10
- const releaseInfo = "MTc0MjUxNTIwMDAwMA==";
10
+ const releaseInfo = "MTc0MzYzMTIwMDAwMA==";
11
11
  if (process.env.NODE_ENV !== 'production') {
12
12
  // A simple hack to set the value in the test environment (has no build step).
13
13
  // eslint-disable-next-line no-useless-concat
@@ -18,10 +18,21 @@ const useUtilityClasses = ownerState => {
18
18
  const {
19
19
  classes
20
20
  } = ownerState;
21
- const slots = {
22
- root: ['root']
23
- };
24
- return composeClasses(slots, getRichTreeViewProUtilityClass, classes);
21
+ return React.useMemo(() => {
22
+ const slots = {
23
+ root: ['root'],
24
+ item: ['item'],
25
+ itemContent: ['itemContent'],
26
+ itemGroupTransition: ['itemGroupTransition'],
27
+ itemIconContainer: ['itemIconContainer'],
28
+ itemLabel: ['itemLabel'],
29
+ itemLabelInput: ['itemLabelInput'],
30
+ itemCheckbox: ['itemCheckbox'],
31
+ itemDragAndDropOverlay: ['itemDragAndDropOverlay'],
32
+ itemErrorIcon: ['itemErrorIcon']
33
+ };
34
+ return composeClasses(slots, getRichTreeViewProUtilityClass, classes);
35
+ }, [classes]);
25
36
  };
26
37
  export const RichTreeViewProRoot = styled('ul', {
27
38
  name: 'MuiRichTreeViewPro',
@@ -79,7 +90,8 @@ const RichTreeViewPro = /*#__PURE__*/React.forwardRef(function RichTreeViewPro(i
79
90
  ownerState: props
80
91
  });
81
92
  return /*#__PURE__*/_jsx(TreeViewProvider, {
82
- value: contextValue,
93
+ contextValue: contextValue,
94
+ classes: classes,
83
95
  children: /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
84
96
  children: [/*#__PURE__*/_jsx(RichTreeViewItems, {
85
97
  slots: slots,
@@ -133,8 +145,8 @@ process.env.NODE_ENV !== "production" ? RichTreeViewPro.propTypes = {
133
145
  classes: PropTypes.object,
134
146
  className: PropTypes.string,
135
147
  dataSource: PropTypes.shape({
136
- getChildrenCount: PropTypes.func,
137
- getTreeItems: PropTypes.func
148
+ getChildrenCount: PropTypes.func.isRequired,
149
+ getTreeItems: PropTypes.func.isRequired
138
150
  }),
139
151
  dataSourceCache: PropTypes.shape({
140
152
  clear: PropTypes.func.isRequired,
@@ -1,7 +1,5 @@
1
- export interface RichTreeViewProClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
1
+ import { TreeViewClasses } from '@mui/x-tree-view/internals';
2
+ export interface RichTreeViewProClasses extends TreeViewClasses {}
5
3
  export type RichTreeViewProClassKey = keyof RichTreeViewProClasses;
6
4
  export declare function getRichTreeViewProUtilityClass(slot: string): string;
7
5
  export declare const richTreeViewProClasses: RichTreeViewProClasses;
@@ -3,4 +3,4 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
3
3
  export function getRichTreeViewProUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiRichTreeViewPro', slot);
5
5
  }
6
- export const richTreeViewProClasses = generateUtilityClasses('MuiRichTreeViewPro', ['root']);
6
+ export const richTreeViewProClasses = generateUtilityClasses('MuiRichTreeViewPro', ['root', 'item', 'itemContent', 'itemGroupTransition', 'itemIconContainer', 'itemLabel', 'itemCheckbox', 'itemLabelInput', 'itemDragAndDropOverlay', 'itemErrorIcon', 'itemLoadingIcon']);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view-pro v8.0.0-beta.1
2
+ * @mui/x-tree-view-pro v8.0.0-beta.3
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useLazyRef from '@mui/utils/useLazyRef';
4
- import { warnOnce } from '@mui/x-internals/warning';
5
4
  import useEventCallback from '@mui/utils/useEventCallback';
6
5
  import { selectorItemMeta, selectorIsItemSelected, useInstanceEventHandler, selectorDataSourceState, selectorGetTreeItemError } from '@mui/x-tree-view/internals';
7
6
  import { DataSourceCacheDefault } from '@mui/x-tree-view/utils';
@@ -26,7 +25,7 @@ export const useTreeViewLazyLoading = ({
26
25
  params,
27
26
  store
28
27
  }) => {
29
- const isLazyLoadingEnabled = params.dataSource?.getChildrenCount !== undefined;
28
+ const isLazyLoadingEnabled = !!params.dataSource;
30
29
  const firstRenderRef = React.useRef(true);
31
30
  const nestedDataManager = useLazyRef(() => new NestedDataManager(instance)).current;
32
31
  const cacheRef = useLazyRef(() => getCache(params.dataSourceCache));
@@ -258,24 +257,6 @@ export const useTreeViewLazyLoading = ({
258
257
  publicAPI: {}
259
258
  };
260
259
  };
261
- useTreeViewLazyLoading.getDefaultizedParams = ({
262
- params,
263
- experimentalFeatures
264
- }) => {
265
- const canUseFeature = experimentalFeatures?.lazyLoading;
266
- if (process.env.NODE_ENV !== 'production') {
267
- if (params.dataSource && !canUseFeature) {
268
- warnOnce(['MUI X: The label editing feature requires the `lazyLoading` experimental feature to be enabled.', 'You can do it by passing `experimentalFeatures={{ lazyLoading: true}}` to the Rich Tree View Pro component.', 'Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/lazy-loading/']);
269
- }
270
- }
271
- const defaultDataSource = params?.dataSource ?? {
272
- getChildrenCount: () => 0,
273
- getTreeItems: () => Promise.resolve([])
274
- };
275
- return _extends({}, params, {
276
- dataSource: canUseFeature ? defaultDataSource : {}
277
- });
278
- };
279
260
  useTreeViewLazyLoading.getInitialState = () => ({
280
261
  lazyLoading: {
281
262
  enabled: false,
@@ -1,6 +1,6 @@
1
1
  import ponyfillGlobal from '@mui/utils/ponyfillGlobal';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTc0MjUxNTIwMDAwMA==";
3
+ const releaseInfo = "MTc0MzYzMTIwMDAwMA==";
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-tree-view-pro",
3
- "version": "8.0.0-beta.1",
3
+ "version": "8.0.0-beta.3",
4
4
  "description": "The Pro plan edition of the Tree View components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -33,23 +33,23 @@
33
33
  "directory": "packages/x-tree-view-pro"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.26.10",
37
- "@mui/utils": "^7.0.0 || ^7.0.0-beta",
36
+ "@babel/runtime": "^7.27.0",
37
+ "@mui/utils": "^7.0.0",
38
38
  "@types/react-transition-group": "^4.4.12",
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
41
  "react-transition-group": "^4.4.5",
42
42
  "reselect": "^5.1.1",
43
43
  "use-sync-external-store": "^1.4.0",
44
- "@mui/x-internals": "8.0.0-beta.0",
45
- "@mui/x-tree-view": "8.0.0-beta.1",
46
- "@mui/x-license": "8.0.0-beta.0"
44
+ "@mui/x-internals": "8.0.0-beta.3",
45
+ "@mui/x-license": "8.0.0-beta.3",
46
+ "@mui/x-tree-view": "8.0.0-beta.3"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",
50
50
  "@emotion/styled": "^11.8.1",
51
- "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
52
- "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
51
+ "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
52
+ "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
53
53
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
54
54
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
55
55
  },