@mui/x-tree-view 7.16.0 → 7.18.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 +184 -4
- package/RichTreeView/RichTreeView.js +3 -1
- package/SimpleTreeView/SimpleTreeView.js +3 -1
- package/TreeItem/TreeItem.js +2 -0
- package/TreeItem/useTreeItemState.js +2 -0
- package/TreeItem2/TreeItem2.js +3 -1
- package/TreeView/TreeView.js +2 -0
- package/hooks/useTreeViewApiRef.js +2 -0
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +1 -2
- package/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
- package/modern/RichTreeView/RichTreeView.js +3 -1
- package/modern/SimpleTreeView/SimpleTreeView.js +3 -1
- package/modern/TreeItem/TreeItem.js +2 -0
- package/modern/TreeItem/useTreeItemState.js +2 -0
- package/modern/TreeItem2/TreeItem2.js +3 -1
- package/modern/TreeView/TreeView.js +2 -0
- package/modern/hooks/useTreeViewApiRef.js +2 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -2
- package/modern/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
- package/modern/useTreeItem2/index.js +4 -1
- package/node/RichTreeView/RichTreeView.js +2 -1
- package/node/SimpleTreeView/SimpleTreeView.js +2 -1
- package/node/TreeItem/TreeItem.js +1 -0
- package/node/TreeItem/useTreeItemState.js +1 -0
- package/node/TreeItem2/TreeItem2.js +2 -1
- package/node/TreeView/TreeView.js +1 -0
- package/node/hooks/useTreeViewApiRef.js +1 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +1 -8
- package/node/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
- package/node/useTreeItem2/index.js +5 -7
- package/package.json +3 -3
- package/useTreeItem2/index.d.ts +2 -1
- package/useTreeItem2/index.js +4 -1
- package/internals/utils/warning.d.ts +0 -2
- package/internals/utils/warning.js +0 -21
- package/modern/internals/utils/warning.js +0 -21
- package/node/internals/utils/warning.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,186 @@
|
|
|
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.18.0
|
|
7
|
+
|
|
8
|
+
_Sep 20, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 💫 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
|
|
13
|
+
|
|
14
|
+
<img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
|
|
15
|
+
|
|
16
|
+
- ⏰ Support `date-fns` v4 (#14673) @LukasTy
|
|
17
|
+
- 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
- 📚 Documentation improvements
|
|
20
|
+
|
|
21
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@7.18.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Add default reset value in row edit mode (#14050) @michelengelen
|
|
28
|
+
- [DataGrid] Add `columnGroupHeaderHeight` prop for sizing column group headers (#14637) @KenanYusuf
|
|
29
|
+
- [DataGrid] Fix `document` reference when the grid is rendered in a popup window (#14649) @arminmeh
|
|
30
|
+
- [DataGrid] Remove `minFirstColumn` from `GetHeadersParams` interface (#14450) @k-rajat19
|
|
31
|
+
- [DataGrid] Row spanning (#14124) @MBilalShafi
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid@7.18.0`, plus:
|
|
36
|
+
|
|
37
|
+
- [DataGridPro] Fix `onRowsScrollEnd` being triggered instantly when bottom pinned row is present (#14602) @arminmeh
|
|
38
|
+
- [DataGridPro] Fix header filters rendering issue for `isEmpty` and `isNotEmpty` filter operators (#14493) @k-rajat19
|
|
39
|
+
- [DataGridPro] Fix pinned columns in RTL mode (#14586) @KenanYusuf
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-premium@7.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid-pro@7.18.0`.
|
|
44
|
+
|
|
45
|
+
### Date and Time Pickers
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-date-pickers@7.18.0`
|
|
48
|
+
|
|
49
|
+
- [pickers] Add option to change the order of displayed years (#11780) @thomasmoon
|
|
50
|
+
- [pickers] Support `date-fns` v4 (#14673) @LukasTy
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@7.18.0`.
|
|
55
|
+
|
|
56
|
+
### Charts
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts@7.18.0`
|
|
59
|
+
|
|
60
|
+
- [charts] Add a `PolarProvider` to manage polar axes (#14642) @alexfauquette
|
|
61
|
+
- [charts] Fix `LineChart` animation being stuck with initial drawing area value (#14553) @JCQuintas
|
|
62
|
+
- [charts] Fix legend slot typing (#14657) @alexfauquette
|
|
63
|
+
- [charts] Pass the axis index to extremum getter (#14641) @alexfauquette
|
|
64
|
+
- [charts] Provide hooks to create custom tooltip (#14377) @alexfauquette
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@7.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@7.18.0`.
|
|
69
|
+
|
|
70
|
+
### Tree View
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-tree-view@7.18.0`
|
|
73
|
+
|
|
74
|
+
- [TreeView] Add `"use client"` directive to every public component and hook (#14579) @flaviendelangle
|
|
75
|
+
|
|
76
|
+
### Docs
|
|
77
|
+
|
|
78
|
+
- [docs] Add `groupingValueGetter` callout in column definition docs (#14599) @michelengelen
|
|
79
|
+
- [docs] Clean v6 => v7 migration guide (#14652) @flaviendelangle
|
|
80
|
+
- [docs] Copy `vale-action.yml` from main repo @oliviertassinari
|
|
81
|
+
- [docs] Edit the Pickers Getting started doc (#14555) @samuelsycamore
|
|
82
|
+
- [docs] Fix TypeScript capitalization @oliviertassinari
|
|
83
|
+
- [docs] Fix Vale error @oliviertassinari
|
|
84
|
+
- [docs] Make the migration guide diff a bit easier to read @oliviertassinari
|
|
85
|
+
- [docs] Report Vale at warning level (#14660) @oliviertassinari
|
|
86
|
+
- [docs] Warn about the `valueGetter` and `valueFormatter` signature change (#14613) @cherniavskii
|
|
87
|
+
- [docs] Polish code formatting (#14603) @oliviertassinari
|
|
88
|
+
- [test] Spy on `observe` method to avoid flaky wait for a callback (#14640) @arminmeh
|
|
89
|
+
|
|
90
|
+
### Core
|
|
91
|
+
|
|
92
|
+
- [core] Fix 301 link to Next.js and git diff @oliviertassinari
|
|
93
|
+
- [core] Fix failing CI on `master` (#14644) @cherniavskii
|
|
94
|
+
- [core] Fix `package.json` repository rule @oliviertassinari
|
|
95
|
+
- [core] MUI X repository moved to a new location @oliviertassinari
|
|
96
|
+
- [docs-infra] Strengthen CSP (#14581) @oliviertassinari
|
|
97
|
+
- [license] Finish renaming of LicensingModel (#14615) @oliviertassinari
|
|
98
|
+
|
|
99
|
+
## 7.17.0
|
|
100
|
+
|
|
101
|
+
_Sep 13, 2024_
|
|
102
|
+
|
|
103
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
104
|
+
|
|
105
|
+
- 📊 Charts performance improvement
|
|
106
|
+
- 🧑💻 New Data Grid [custom columns demo](https://mui.com/x/react-data-grid/custom-columns/#full-example)
|
|
107
|
+
- 🐞 Bugfixes
|
|
108
|
+
- 📚 Documentation improvements
|
|
109
|
+
- 🌍 Improve Hungarian (hu-HU) locale on the Data Grid
|
|
110
|
+
|
|
111
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
112
|
+
|
|
113
|
+
### Data Grid
|
|
114
|
+
|
|
115
|
+
#### `@mui/x-data-grid@7.17.0`
|
|
116
|
+
|
|
117
|
+
- [DataGrid] Add "does not equal" and "does not contain" filter operators (#14489) @KenanYusuf
|
|
118
|
+
- [DataGrid] Add demo to the "Custom columns" page that does not use generator (#13695) @arminmeh
|
|
119
|
+
- [DataGrid] Fix Voice Over reading the column name twice (#14482) @arminmeh
|
|
120
|
+
- [DataGrid] Fix bug in CRUD example (#14513) @michelengelen
|
|
121
|
+
- [DataGrid] Fix failing jsdom tests caused by `:has()` selectors (#14559) @KenanYusuf
|
|
122
|
+
- [DataGrid] Refactor string operator filter functions (#14564) @KenanYusuf
|
|
123
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#14506) @ntamas
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid-pro@7.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
126
|
+
|
|
127
|
+
Same changes as in `@mui/x-data-grid@7.17.0`.
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-data-grid-premium@7.17.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-data-grid-pro@7.17.0`.
|
|
132
|
+
|
|
133
|
+
### Date and Time Pickers
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-date-pickers@7.17.0`
|
|
136
|
+
|
|
137
|
+
- [fields] Improve `useSplitFieldProps` and make it public (#14514) @flaviendelangle
|
|
138
|
+
- [pickers] Improve clear action label (#14243) @oliviertassinari
|
|
139
|
+
- [pickers] Add `"use client"` directive to every public component and hook (#14562) @flaviendelangle
|
|
140
|
+
- [pickers] Allow custom fields to validate the value (#14486) @flaviendelangle
|
|
141
|
+
- [pickers] Stop using utils in locales (#14505) @flaviendelangle
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-date-pickers-pro@7.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-date-pickers@7.17.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DateRangePicker] Fix `currentMonthCalendarPosition` not scrolling to future sibling (#14442) @GMchris
|
|
148
|
+
|
|
149
|
+
### Charts
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-charts@7.17.0`
|
|
152
|
+
|
|
153
|
+
- [charts] Add `"use client"` directive to every public component and hook (#14578) @flaviendelangle
|
|
154
|
+
- [charts] Allow `onItemClick` on the `Legend` component (#14231) @JCQuintas
|
|
155
|
+
- [charts] Fix `onAxisClick` with `layout='horizontal'` (#14547) @alexfauquette
|
|
156
|
+
- [charts] Replace `path` with `circle` for performance improvement (#14518) @alexfauquette
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-charts-pro@7.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
159
|
+
|
|
160
|
+
Same changes as in `@mui/x-charts@7.17.0`.
|
|
161
|
+
|
|
162
|
+
### Tree View
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-tree-view@7.17.0`
|
|
165
|
+
|
|
166
|
+
- [TreeView] Make `useTreeItem2` stable (#14498) @flaviendelangle
|
|
167
|
+
|
|
168
|
+
### Docs
|
|
169
|
+
|
|
170
|
+
- [docs] Add missing callout on "Imperative API" tree view sections (#14503) @flaviendelangle
|
|
171
|
+
- [docs] Fix broken redirection to MUI X v5 @oliviertassinari
|
|
172
|
+
- [docs] Fix multiple `console.error` messages on `charts` docs (#14554) @JCQuintas
|
|
173
|
+
- [docs] Fixed typo in Row Grouping recipes (#14549) @Miodini
|
|
174
|
+
- [docs] Match title with blog posts @oliviertassinari
|
|
175
|
+
|
|
176
|
+
### Core
|
|
177
|
+
|
|
178
|
+
- [core] Move warning methods to `@mui/x-internals` (#14528) @k-rajat19
|
|
179
|
+
- [core] Sync with core release flow @oliviertassinari
|
|
180
|
+
- [code-infra] Fix charts benchmark workflow (#14573) @JCQuintas
|
|
181
|
+
- [docs-infra] Type interface API pages (#14138) @alexfauquette
|
|
182
|
+
- [infra] Create `ESLint plugins` renovate group (#14574) @LukasTy
|
|
183
|
+
- [license] Clean-up terminology to match codebase (#14531) @oliviertassinari
|
|
184
|
+
- [test] Remove dead `act()` logic (#14529) @oliviertassinari
|
|
185
|
+
|
|
6
186
|
## 7.16.0
|
|
7
187
|
|
|
8
188
|
_Sep 5, 2024_
|
|
@@ -108,7 +288,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
108
288
|
|
|
109
289
|
- 💫 Support Material UI v6 (`@mui/material@6`) peer dependency (#14142) @cherniavskii
|
|
110
290
|
|
|
111
|
-
You can now use MUI
|
|
291
|
+
You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
|
|
112
292
|
|
|
113
293
|
- 🐞 Bugfixes
|
|
114
294
|
|
|
@@ -153,7 +333,7 @@ Same changes as in `@mui/x-charts@7.15.0`, plus:
|
|
|
153
333
|
|
|
154
334
|
- [docs] Fix sentence case `h2` @oliviertassinari
|
|
155
335
|
- [docs] Clarify contribution guide references @oliviertassinari
|
|
156
|
-
- [docs] Fix Stack
|
|
336
|
+
- [docs] Fix Stack Overflow issue canned response @oliviertassinari
|
|
157
337
|
- [docs] Fix outdated link to support page @oliviertassinari
|
|
158
338
|
- [docs] Fix use of Material UI @oliviertassinari
|
|
159
339
|
- [docs] Update deprecated props in docs (#14295) @JCQuintas
|
|
@@ -411,7 +591,7 @@ The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving
|
|
|
411
591
|
|
|
412
592
|
As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
|
|
413
593
|
|
|
414
|
-
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI
|
|
594
|
+
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
|
|
415
595
|
|
|
416
596
|
### Highlights
|
|
417
597
|
|
|
@@ -476,7 +656,7 @@ Same changes as in `@mui/x-date-pickers@7.12.0`.
|
|
|
476
656
|
#### `@mui/x-charts@7.12.0`
|
|
477
657
|
|
|
478
658
|
- [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
|
|
479
|
-
- [charts] Use vendor to have
|
|
659
|
+
- [charts] Use vendor to have CommonJS bundle working out of the box (#13608) @alexfauquette
|
|
480
660
|
- [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
|
|
481
661
|
|
|
482
662
|
### Tree View
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
7
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
9
|
import { getRichTreeViewUtilityClass } from "./richTreeViewClasses.js";
|
|
7
10
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
8
11
|
import { useTreeView } from "../internals/useTreeView/index.js";
|
|
9
12
|
import { TreeViewProvider } from "../internals/TreeViewProvider/index.js";
|
|
10
13
|
import { RICH_TREE_VIEW_PLUGINS } from "./RichTreeView.plugins.js";
|
|
11
14
|
import { TreeItem } from "../TreeItem/index.js";
|
|
12
|
-
import { warnOnce } from "../internals/utils/warning.js";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
const useThemeProps = createUseThemeProps('MuiRichTreeView');
|
|
15
17
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
7
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
9
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
7
10
|
import { getSimpleTreeViewUtilityClass } from "./simpleTreeViewClasses.js";
|
|
8
11
|
import { useTreeView } from "../internals/useTreeView/index.js";
|
|
9
12
|
import { TreeViewProvider } from "../internals/TreeViewProvider/index.js";
|
|
10
13
|
import { SIMPLE_TREE_VIEW_PLUGINS } from "./SimpleTreeView.plugins.js";
|
|
11
|
-
import { warnOnce } from "../internals/utils/warning.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useThemeProps = createUseThemeProps('MuiSimpleTreeView');
|
|
14
16
|
const useUtilityClasses = ownerState => {
|
package/TreeItem/TreeItem.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"],
|
package/TreeItem2/TreeItem2.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["visible"],
|
|
@@ -13,7 +15,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
13
15
|
import { shouldForwardProp } from '@mui/system/createStyled';
|
|
14
16
|
import composeClasses from '@mui/utils/composeClasses';
|
|
15
17
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
16
|
-
import {
|
|
18
|
+
import { useTreeItem2 } from "../useTreeItem2/index.js";
|
|
17
19
|
import { getTreeItemUtilityClass } from "../TreeItem/index.js";
|
|
18
20
|
import { TreeItem2Icon } from "../TreeItem2Icon/index.js";
|
|
19
21
|
import { TreeItem2DragAndDropOverlay } from "../TreeItem2DragAndDropOverlay/index.js";
|
package/TreeView/TreeView.js
CHANGED
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -20,4 +20,3 @@ export type { UseTreeViewLabelSignature, UseTreeViewLabelParameters, } from './p
|
|
|
20
20
|
export { useTreeViewJSXItems } from './plugins/useTreeViewJSXItems';
|
|
21
21
|
export type { UseTreeViewJSXItemsSignature, UseTreeViewJSXItemsParameters, } from './plugins/useTreeViewJSXItems';
|
|
22
22
|
export { isTargetInDescendants } from './utils/tree';
|
|
23
|
-
export { warnOnce } from './utils/warning';
|
package/internals/index.js
CHANGED
|
@@ -13,5 +13,4 @@ export { useTreeViewIcons } from "./plugins/useTreeViewIcons/index.js";
|
|
|
13
13
|
export { useTreeViewItems, buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from "./plugins/useTreeViewItems/index.js";
|
|
14
14
|
export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
|
|
15
15
|
export { useTreeViewJSXItems } from "./plugins/useTreeViewJSXItems/index.js";
|
|
16
|
-
export { isTargetInDescendants } from "./utils/tree.js";
|
|
17
|
-
export { warnOnce } from "./utils/warning.js";
|
|
16
|
+
export { isTargetInDescendants } from "./utils/tree.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { warnOnce } from
|
|
3
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
4
4
|
import { useTreeViewLabelItemPlugin } from "./useTreeViewLabel.itemPlugin.js";
|
|
5
5
|
export const useTreeViewLabel = ({
|
|
6
6
|
instance,
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
7
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
9
|
import { getRichTreeViewUtilityClass } from "./richTreeViewClasses.js";
|
|
7
10
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
8
11
|
import { useTreeView } from "../internals/useTreeView/index.js";
|
|
9
12
|
import { TreeViewProvider } from "../internals/TreeViewProvider/index.js";
|
|
10
13
|
import { RICH_TREE_VIEW_PLUGINS } from "./RichTreeView.plugins.js";
|
|
11
14
|
import { TreeItem } from "../TreeItem/index.js";
|
|
12
|
-
import { warnOnce } from "../internals/utils/warning.js";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
const useThemeProps = createUseThemeProps('MuiRichTreeView');
|
|
15
17
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
7
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
9
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
7
10
|
import { getSimpleTreeViewUtilityClass } from "./simpleTreeViewClasses.js";
|
|
8
11
|
import { useTreeView } from "../internals/useTreeView/index.js";
|
|
9
12
|
import { TreeViewProvider } from "../internals/TreeViewProvider/index.js";
|
|
10
13
|
import { SIMPLE_TREE_VIEW_PLUGINS } from "./SimpleTreeView.plugins.js";
|
|
11
|
-
import { warnOnce } from "../internals/utils/warning.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useThemeProps = createUseThemeProps('MuiSimpleTreeView');
|
|
14
16
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["visible"],
|
|
@@ -13,7 +15,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
13
15
|
import { shouldForwardProp } from '@mui/system/createStyled';
|
|
14
16
|
import composeClasses from '@mui/utils/composeClasses';
|
|
15
17
|
import { styled, createUseThemeProps } from "../internals/zero-styled/index.js";
|
|
16
|
-
import {
|
|
18
|
+
import { useTreeItem2 } from "../useTreeItem2/index.js";
|
|
17
19
|
import { getTreeItemUtilityClass } from "../TreeItem/index.js";
|
|
18
20
|
import { TreeItem2Icon } from "../TreeItem2Icon/index.js";
|
|
19
21
|
import { TreeItem2DragAndDropOverlay } from "../TreeItem2DragAndDropOverlay/index.js";
|
package/modern/index.js
CHANGED
|
@@ -13,5 +13,4 @@ export { useTreeViewIcons } from "./plugins/useTreeViewIcons/index.js";
|
|
|
13
13
|
export { useTreeViewItems, buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from "./plugins/useTreeViewItems/index.js";
|
|
14
14
|
export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
|
|
15
15
|
export { useTreeViewJSXItems } from "./plugins/useTreeViewJSXItems/index.js";
|
|
16
|
-
export { isTargetInDescendants } from "./utils/tree.js";
|
|
17
|
-
export { warnOnce } from "./utils/warning.js";
|
|
16
|
+
export { isTargetInDescendants } from "./utils/tree.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { warnOnce } from
|
|
3
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
4
4
|
import { useTreeViewLabelItemPlugin } from "./useTreeViewLabel.itemPlugin.js";
|
|
5
5
|
export const useTreeViewLabel = ({
|
|
6
6
|
instance,
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { useTreeItem2 as useTreeItem2Export } from "./useTreeItem2.js";
|
|
2
|
+
export const useTreeItem2 = useTreeItem2Export;
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4
|
+
export const unstable_useTreeItem2 = useTreeItem2Export;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
@@ -11,13 +12,13 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
14
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
|
+
var _warning = require("@mui/x-internals/warning");
|
|
14
16
|
var _richTreeViewClasses = require("./richTreeViewClasses");
|
|
15
17
|
var _zeroStyled = require("../internals/zero-styled");
|
|
16
18
|
var _useTreeView = require("../internals/useTreeView");
|
|
17
19
|
var _TreeViewProvider = require("../internals/TreeViewProvider");
|
|
18
20
|
var _RichTreeView = require("./RichTreeView.plugins");
|
|
19
21
|
var _TreeItem = require("../TreeItem");
|
|
20
|
-
var _warning = require("../internals/utils/warning");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiRichTreeView');
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
@@ -11,12 +12,12 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
14
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
|
+
var _warning = require("@mui/x-internals/warning");
|
|
14
16
|
var _zeroStyled = require("../internals/zero-styled");
|
|
15
17
|
var _simpleTreeViewClasses = require("./simpleTreeViewClasses");
|
|
16
18
|
var _useTreeView = require("../internals/useTreeView");
|
|
17
19
|
var _TreeViewProvider = require("../internals/TreeViewProvider");
|
|
18
20
|
var _SimpleTreeView = require("./SimpleTreeView.plugins");
|
|
19
|
-
var _warning = require("../internals/utils/warning");
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSimpleTreeView');
|
|
22
23
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
5
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
@@ -241,7 +242,7 @@ const TreeItem2 = exports.TreeItem2 = /*#__PURE__*/React.forwardRef(function Tre
|
|
|
241
242
|
getLabelInputProps,
|
|
242
243
|
getDragAndDropOverlayProps,
|
|
243
244
|
status
|
|
244
|
-
} = (0, _useTreeItem.
|
|
245
|
+
} = (0, _useTreeItem.useTreeItem2)({
|
|
245
246
|
id,
|
|
246
247
|
itemId,
|
|
247
248
|
children,
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -93,12 +93,6 @@ Object.defineProperty(exports, "useTreeViewSelection", {
|
|
|
93
93
|
return _useTreeViewSelection.useTreeViewSelection;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
Object.defineProperty(exports, "warnOnce", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _warning.warnOnce;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
96
|
var _useTreeView = require("./useTreeView");
|
|
103
97
|
var _TreeViewProvider = require("./TreeViewProvider");
|
|
104
98
|
var _useInstanceEventHandler = require("./hooks/useInstanceEventHandler");
|
|
@@ -110,5 +104,4 @@ var _useTreeViewIcons = require("./plugins/useTreeViewIcons");
|
|
|
110
104
|
var _useTreeViewItems = require("./plugins/useTreeViewItems");
|
|
111
105
|
var _useTreeViewLabel = require("./plugins/useTreeViewLabel");
|
|
112
106
|
var _useTreeViewJSXItems = require("./plugins/useTreeViewJSXItems");
|
|
113
|
-
var _tree = require("./utils/tree");
|
|
114
|
-
var _warning = require("./utils/warning");
|
|
107
|
+
var _tree = require("./utils/tree");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useTreeViewLabel = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _warning = require("
|
|
11
|
+
var _warning = require("@mui/x-internals/warning");
|
|
12
12
|
var _useTreeViewLabel = require("./useTreeViewLabel.itemPlugin");
|
|
13
13
|
const useTreeViewLabel = ({
|
|
14
14
|
instance,
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
var _useTreeItem = require("./useTreeItem2");
|
|
6
|
+
exports.useTreeItem2 = exports.unstable_useTreeItem2 = void 0;
|
|
7
|
+
var _useTreeItem = require("./useTreeItem2");
|
|
8
|
+
const useTreeItem2 = exports.useTreeItem2 = _useTreeItem.useTreeItem2;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
|
+
const unstable_useTreeItem2 = exports.unstable_useTreeItem2 = _useTreeItem.useTreeItem2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-tree-view",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.0",
|
|
4
4
|
"description": "The community edition of the Tree View components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/mui/mui-x.git",
|
|
32
|
+
"url": "git+https://github.com/mui/mui-x.git",
|
|
33
33
|
"directory": "packages/x-tree-view"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
@@ -39,7 +39,7 @@
|
|
|
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.
|
|
42
|
+
"@mui/x-internals": "7.18.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.9.0",
|
package/useTreeItem2/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const useTreeItem2: <TSignatures extends import("./useTreeItem2.types").UseTreeItem2MinimalPlugins = import("./useTreeItem2.types").UseTreeItem2MinimalPlugins, TOptionalSignatures extends import("./useTreeItem2.types").UseTreeItem2OptionalPlugins = readonly []>(parameters: import("./useTreeItem2.types").UseTreeItem2Parameters) => import("./useTreeItem2.types").UseTreeItem2ReturnValue<TSignatures, TOptionalSignatures>;
|
|
2
|
+
export declare const unstable_useTreeItem2: <TSignatures extends import("./useTreeItem2.types").UseTreeItem2MinimalPlugins = import("./useTreeItem2.types").UseTreeItem2MinimalPlugins, TOptionalSignatures extends import("./useTreeItem2.types").UseTreeItem2OptionalPlugins = readonly []>(parameters: import("./useTreeItem2.types").UseTreeItem2Parameters) => import("./useTreeItem2.types").UseTreeItem2ReturnValue<TSignatures, TOptionalSignatures>;
|
|
2
3
|
export type { UseTreeItem2Parameters, UseTreeItem2ReturnValue, UseTreeItem2Status, UseTreeItem2RootSlotOwnProps, UseTreeItem2ContentSlotOwnProps, UseTreeItem2LabelInputSlotOwnProps, UseTreeItem2LabelSlotOwnProps, UseTreeItem2IconContainerSlotOwnProps, UseTreeItem2GroupTransitionSlotOwnProps, UseTreeItem2DragAndDropOverlaySlotOwnProps, } from './useTreeItem2.types';
|
package/useTreeItem2/index.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { useTreeItem2 as useTreeItem2Export } from "./useTreeItem2.js";
|
|
2
|
+
export const useTreeItem2 = useTreeItem2Export;
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4
|
+
export const unstable_useTreeItem2 = useTreeItem2Export;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const warnedOnceCache = new Set();
|
|
2
|
-
|
|
3
|
-
// TODO move to @mui/x-internals
|
|
4
|
-
// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
|
|
5
|
-
export function warnOnce(message, gravity = 'warning') {
|
|
6
|
-
if (process.env.NODE_ENV === 'production') {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
|
|
10
|
-
if (!warnedOnceCache.has(cleanMessage)) {
|
|
11
|
-
warnedOnceCache.add(cleanMessage);
|
|
12
|
-
if (gravity === 'error') {
|
|
13
|
-
console.error(cleanMessage);
|
|
14
|
-
} else {
|
|
15
|
-
console.warn(cleanMessage);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function clearWarningsCache() {
|
|
20
|
-
warnedOnceCache.clear();
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const warnedOnceCache = new Set();
|
|
2
|
-
|
|
3
|
-
// TODO move to @mui/x-internals
|
|
4
|
-
// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
|
|
5
|
-
export function warnOnce(message, gravity = 'warning') {
|
|
6
|
-
if (process.env.NODE_ENV === 'production') {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
|
|
10
|
-
if (!warnedOnceCache.has(cleanMessage)) {
|
|
11
|
-
warnedOnceCache.add(cleanMessage);
|
|
12
|
-
if (gravity === 'error') {
|
|
13
|
-
console.error(cleanMessage);
|
|
14
|
-
} else {
|
|
15
|
-
console.warn(cleanMessage);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function clearWarningsCache() {
|
|
20
|
-
warnedOnceCache.clear();
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.clearWarningsCache = clearWarningsCache;
|
|
7
|
-
exports.warnOnce = warnOnce;
|
|
8
|
-
const warnedOnceCache = new Set();
|
|
9
|
-
|
|
10
|
-
// TODO move to @mui/x-internals
|
|
11
|
-
// TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
|
|
12
|
-
function warnOnce(message, gravity = 'warning') {
|
|
13
|
-
if (process.env.NODE_ENV === 'production') {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
|
|
17
|
-
if (!warnedOnceCache.has(cleanMessage)) {
|
|
18
|
-
warnedOnceCache.add(cleanMessage);
|
|
19
|
-
if (gravity === 'error') {
|
|
20
|
-
console.error(cleanMessage);
|
|
21
|
-
} else {
|
|
22
|
-
console.warn(cleanMessage);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function clearWarningsCache() {
|
|
27
|
-
warnedOnceCache.clear();
|
|
28
|
-
}
|