@mui/x-tree-view 8.2.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +199 -6
- package/RichTreeView/RichTreeView.js +0 -6
- package/RichTreeView/RichTreeView.types.d.ts +1 -7
- package/SimpleTreeView/SimpleTreeView.js +0 -6
- package/SimpleTreeView/SimpleTreeView.types.d.ts +1 -7
- package/esm/RichTreeView/RichTreeView.js +0 -6
- package/esm/RichTreeView/RichTreeView.types.d.ts +1 -7
- package/esm/SimpleTreeView/SimpleTreeView.js +0 -6
- package/esm/SimpleTreeView/SimpleTreeView.types.d.ts +1 -7
- package/esm/index.js +1 -1
- package/esm/internals/corePlugins/useTreeViewId/index.d.ts +1 -1
- package/esm/internals/corePlugins/useTreeViewId/useTreeViewId.types.d.ts +2 -2
- package/esm/internals/index.d.ts +2 -2
- package/esm/internals/index.js +1 -1
- package/esm/internals/models/plugin.d.ts +13 -22
- package/esm/internals/models/treeView.d.ts +0 -1
- package/esm/internals/plugins/useTreeViewExpansion/index.d.ts +1 -1
- package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +4 -3
- package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewFocus/index.d.ts +1 -1
- package/esm/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewItems/index.d.ts +1 -1
- package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.js +1 -1
- package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewJSXItems/index.d.ts +1 -1
- package/esm/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.types.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
- package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -2
- package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +2 -3
- package/esm/internals/plugins/useTreeViewSelection/index.d.ts +1 -1
- package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +4 -3
- package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +2 -2
- package/esm/internals/useTreeView/{extractPluginParamsFromProps.d.ts → useExtractPluginParamsFromProps.d.ts} +8 -9
- package/esm/internals/useTreeView/useExtractPluginParamsFromProps.js +51 -0
- package/esm/internals/useTreeView/useTreeView.js +3 -5
- package/esm/internals/useTreeView/useTreeView.types.d.ts +1 -2
- package/esm/internals/useTreeView/useTreeViewBuildContext.d.ts +4 -8
- package/esm/internals/useTreeView/useTreeViewBuildContext.js +8 -7
- package/esm/internals/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
- package/esm/internals/utils/tree.js +1 -1
- package/index.js +1 -1
- package/internals/corePlugins/useTreeViewId/index.d.ts +1 -1
- package/internals/corePlugins/useTreeViewId/useTreeViewId.types.d.ts +2 -2
- package/internals/index.d.ts +2 -2
- package/internals/index.js +1 -1
- package/internals/models/plugin.d.ts +13 -22
- package/internals/models/treeView.d.ts +0 -1
- package/internals/plugins/useTreeViewExpansion/index.d.ts +1 -1
- package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +5 -4
- package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +2 -2
- package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.d.ts +2 -2
- package/internals/plugins/useTreeViewFocus/index.d.ts +1 -1
- package/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +2 -2
- package/internals/plugins/useTreeViewItems/index.d.ts +1 -1
- package/internals/plugins/useTreeViewItems/useTreeViewItems.js +1 -1
- package/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +2 -2
- package/internals/plugins/useTreeViewJSXItems/index.d.ts +1 -1
- package/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.types.d.ts +2 -2
- package/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
- package/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -2
- package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +2 -3
- package/internals/plugins/useTreeViewSelection/index.d.ts +1 -1
- package/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +5 -4
- package/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +2 -2
- package/internals/useTreeView/{extractPluginParamsFromProps.d.ts → useExtractPluginParamsFromProps.d.ts} +8 -9
- package/internals/useTreeView/useExtractPluginParamsFromProps.js +60 -0
- package/internals/useTreeView/useTreeView.js +3 -5
- package/internals/useTreeView/useTreeView.types.d.ts +1 -2
- package/internals/useTreeView/useTreeViewBuildContext.d.ts +4 -8
- package/internals/useTreeView/useTreeViewBuildContext.js +8 -7
- package/internals/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
- package/internals/utils/tree.js +1 -1
- package/package.json +4 -4
- package/esm/internals/useTreeView/extractPluginParamsFromProps.js +0 -42
- package/esm/internals/useTreeView/useTreeViewPlugins.d.ts +0 -0
- package/esm/internals/useTreeView/useTreeViewPlugins.js +0 -0
- package/esm/internals/utils/models.d.ts +0 -7
- package/esm/internals/utils/models.js +0 -23
- package/internals/useTreeView/extractPluginParamsFromProps.js +0 -50
- package/internals/useTreeView/useTreeViewPlugins.d.ts +0 -0
- package/internals/useTreeView/useTreeViewPlugins.js +0 -1
- package/internals/utils/models.d.ts +0 -7
- package/internals/utils/models.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,201 @@
|
|
|
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.3.1
|
|
9
|
+
|
|
10
|
+
_May 14, 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
|
+
- 🌍 Improve Norwegian Bokmål (nb-NO) locale on the Data Grid
|
|
15
|
+
- 🌍 Improve Korean (ko-KR) locale on the Data Grid and Pickers
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
|
|
19
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
20
|
+
@100pearlcent, @htollefsen, @JanPretzel, @sai6855.
|
|
21
|
+
Following are all team members who have contributed to this release:
|
|
22
|
+
@bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @oliviertassinari, @prakhargupta1.
|
|
23
|
+
|
|
24
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@8.3.1`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Add `reason` param for `onRowSelectionModelChange` callback (#17545) @sai6855
|
|
31
|
+
- [DataGrid] Fix `renderContext` calculation loop (#17779) @cherniavskii
|
|
32
|
+
- [DataGrid] Fix column spanning jump on scroll (#17759) @cherniavskii
|
|
33
|
+
- [DataGrid] Fix material augmentation not working (#17761) @cherniavskii
|
|
34
|
+
- [DataGrid] Use arguments selector for checkbox props (#17683) @MBilalShafi
|
|
35
|
+
- [l10n] Improve Norwegian Bokmål (nb-NO) locale (#17766) @htollefsen
|
|
36
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid@8.3.1`.
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.3.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.3.1`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPremium] Fix aggregation label not being used in pivot panel (#17760) @cherniavskii
|
|
47
|
+
|
|
48
|
+
### Date and Time Pickers
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-date-pickers@8.3.1`
|
|
51
|
+
|
|
52
|
+
- [fields] Add notch to the field outlined when the label is manually shrank (#17620) @flaviendelangle
|
|
53
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-date-pickers-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-date-pickers@8.3.1`.
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@8.3.1`
|
|
62
|
+
|
|
63
|
+
- [charts] Fix infinite tick number when zoom range is zero (#17750) @bernardobelchior
|
|
64
|
+
- [charts] Improve tick rendering performance (#17755) @bernardobelchior
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@8.3.1`, plus:
|
|
69
|
+
|
|
70
|
+
- [charts-pro] Fix ESM build issue with Vite (#17774) @bernardobelchior
|
|
71
|
+
- [charts-pro] Add benchmark for zoomed in scatter chart (#17756) @bernardobelchior
|
|
72
|
+
|
|
73
|
+
### Tree View
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-tree-view@8.3.1`
|
|
76
|
+
|
|
77
|
+
Internal changes.
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-tree-view-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-tree-view@8.3.1`.
|
|
82
|
+
|
|
83
|
+
### Docs
|
|
84
|
+
|
|
85
|
+
- [docs] Fix 301 to Next.js docs for license @oliviertassinari
|
|
86
|
+
- [docs] Fix AI assistant API URL (#17745) @oliviertassinari
|
|
87
|
+
- [docs] Fix heading structure in README @oliviertassinari
|
|
88
|
+
- [docs] Fix translation keys documentation (#17811) @JanPretzel
|
|
89
|
+
- [docs] Improve CHANGELOG format @oliviertassinari
|
|
90
|
+
|
|
91
|
+
### Core
|
|
92
|
+
|
|
93
|
+
- [core] Apply YAML convention, blank line only at top level @oliviertassinari
|
|
94
|
+
- [code-infra] Fix dynamic import missing extensions (#17767) @Janpot
|
|
95
|
+
- [code-infra] Replace `mocha` with `vitest` for browser & jsdom tests (#14508) @JCQuintas
|
|
96
|
+
- [scheduler] Create the package and setup a private doc page (#17239) @flaviendelangle
|
|
97
|
+
|
|
98
|
+
## 8.3.0
|
|
99
|
+
|
|
100
|
+
_May 8, 2025_
|
|
101
|
+
|
|
102
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
103
|
+
|
|
104
|
+
- 🎨 Added new styling options and shapes for `<FunnelChart />`, including `variant`, `borderRadius`, `pyramid`, and `step-pyramid` curves.
|
|
105
|
+
- 📚 Documentation improvements
|
|
106
|
+
- 🐞 Bugfixes
|
|
107
|
+
|
|
108
|
+
Special thanks go out to this community member for a valuable contribution: @ptuukkan.
|
|
109
|
+
Team members who have contributed to this release: @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
|
|
110
|
+
|
|
111
|
+
### Data Grid
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-data-grid@8.3.0`
|
|
114
|
+
|
|
115
|
+
- [DataGrid] Fix cell editing of computed columns with data source (#17684) @ptuukkan
|
|
116
|
+
- [DataGrid] Fix lazy loading crash with `isRowSelectable` prop (#17629) @MBilalShafi
|
|
117
|
+
- [DataGrid] Fix: use CSS nonce (#17726) @romgrk
|
|
118
|
+
- [DataGrid] Ignore `preProcessEditCellProps` for non-editable columns when starting a row update (#17732) @arminmeh
|
|
119
|
+
- [DataGrid] Avoid applying row selection propagation on filtered rows (#17739) @MBilalShafi
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-data-grid-pro@8.3.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
122
|
+
|
|
123
|
+
Same changes as in `@mui/x-data-grid@8.3.0`.
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid-premium@8.3.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
126
|
+
|
|
127
|
+
Same changes as in `@mui/x-data-grid-pro@8.3.0`.
|
|
128
|
+
|
|
129
|
+
### Date and Time Pickers
|
|
130
|
+
|
|
131
|
+
#### `@mui/x-date-pickers@8.3.0`
|
|
132
|
+
|
|
133
|
+
- [DateTimePicker] Fix focus behavior on desktop variant (#17719) @LukasTy
|
|
134
|
+
- [pickers] Avoid `DigitalClock` stealing focus from a Picker open button on close (#17686) @LukasTy
|
|
135
|
+
|
|
136
|
+
#### `@mui/x-date-pickers-pro@8.3.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
137
|
+
|
|
138
|
+
Same changes as in `@mui/x-date-pickers@8.3.0`, plus:
|
|
139
|
+
|
|
140
|
+
- [DateRangePicker] Fix to reset range position after closing mobile Picker (#17631) @LukasTy
|
|
141
|
+
|
|
142
|
+
### Charts
|
|
143
|
+
|
|
144
|
+
- The `<FunnelChart />` series now accepts a `variant='outlined'` prop for a simpler style.
|
|
145
|
+
<img width="398" alt="Screenshot 2025-05-06 at 20 36 12" src="https://github.com/user-attachments/assets/00fef14f-9026-421e-a4b6-7e081adce1e8" />
|
|
146
|
+
|
|
147
|
+
- Add a `borderRadius` property to `<FunnelChart />`. All funnels have `8px` as a default value.
|
|
148
|
+
<img width="386" alt="Screenshot 2025-05-06 at 14 00 20" src="https://github.com/user-attachments/assets/4f4cc0e7-01ce-4ed6-a0e1-a387f78def23" />
|
|
149
|
+
|
|
150
|
+
- Add a `pyramid` curve to `<FunnelChart />`, which allows creation of a pyramid-shaped funnel.
|
|
151
|
+
<img width="344" alt="Screenshot 2025-05-06 at 14 32 59" src="https://github.com/user-attachments/assets/0b2896e0-0478-4766-bb1b-258a4977a751" />
|
|
152
|
+
|
|
153
|
+
- Add a `step-pyramid` curve to `<FunnelChart />`, which creates a stepped-pyramid like shape.
|
|
154
|
+
<img width="344" alt="Screenshot 2025-05-06 at 14 33 03" src="https://github.com/user-attachments/assets/894f0ab3-7898-40fe-b0df-560feea4085a" />
|
|
155
|
+
|
|
156
|
+
#### `@mui/x-charts@8.3.0`
|
|
157
|
+
|
|
158
|
+
- [charts] Add charts toolbar with zoom options (#17615) @bernardobelchior
|
|
159
|
+
- [charts] Add zoom slider (#17496) @bernardobelchior
|
|
160
|
+
- [charts] Cleanup compiler warnings (#17360) @alexfauquette
|
|
161
|
+
- [charts] Fix `<PieArcLabel />` not taking `arcLabelRadius` into account (#17655) @bernardobelchior
|
|
162
|
+
- [charts] Fix spark line not having clip path (#17501) @bernardobelchior
|
|
163
|
+
- [charts] Fix type issue with ESM (#17624) @alexfauquette
|
|
164
|
+
- [charts] Improve `<MarkElement />` performance (#17546) @bernardobelchior
|
|
165
|
+
- [charts] Rename `materialSlots` internal constant (#17710) @bernardobelchior
|
|
166
|
+
- [charts] Update zoom slider design (#17682) @bernardobelchior
|
|
167
|
+
- [charts] Fix zoom being documented as available for heatmap (#17657) @bernardobelchior
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts-pro@8.3.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
170
|
+
|
|
171
|
+
Same changes as in `@mui/x-charts@8.3.0`, plus:
|
|
172
|
+
|
|
173
|
+
- [charts-pro] Add `pyramid` curve to `<FunnelChart />` (#17665) @JCQuintas
|
|
174
|
+
- [charts-pro] Add `variant='outlined'` to `<FunnelChart />` series (#17661) @JCQuintas
|
|
175
|
+
- [charts-pro] Add a `borderRadius` property to `<FunnelChart />` (#17660) @JCQuintas
|
|
176
|
+
|
|
177
|
+
### Tree View
|
|
178
|
+
|
|
179
|
+
#### `@mui/x-tree-view@8.3.0`
|
|
180
|
+
|
|
181
|
+
- [tree view] Bug fix - Escape does not cancel Drag n Drop (#17735) @rita-codes
|
|
182
|
+
- [tree view] Fix keyboard navigation error (#17685) @rita-codes
|
|
183
|
+
- [tree view] Continue cleaning the plugin system (#17386) @flaviendelangle
|
|
184
|
+
|
|
185
|
+
#### `@mui/x-tree-view-pro@8.3.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
186
|
+
|
|
187
|
+
Same changes as in `@mui/x-tree-view@8.3.0`.
|
|
188
|
+
|
|
189
|
+
### Docs
|
|
190
|
+
|
|
191
|
+
- [charts] Add population pyramid demo (#17652) @bernardobelchior
|
|
192
|
+
- [charts] Fix randomised argos test (#17658) @JCQuintas
|
|
193
|
+
- [docs] Make preview messaging consistent in charts @bernardobelchior
|
|
194
|
+
|
|
195
|
+
### Core
|
|
196
|
+
|
|
197
|
+
- [code-infra] Avoid `node` types in the built packages (#17533) @LukasTy
|
|
198
|
+
- [code-infra] Add `pkg.pr.new` publishing (#17402) @Janpot
|
|
199
|
+
- [code-infra] Normalize author package in org @oliviertassinari
|
|
200
|
+
- [code-infra] Remove required checkout step (#17729) @JCQuintas
|
|
201
|
+
- [docs-infra] Normalize netlify.toml in org @oliviertassinari
|
|
202
|
+
|
|
8
203
|
## 8.2.0
|
|
9
204
|
|
|
10
205
|
_May 1, 2025_
|
|
@@ -424,8 +619,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
424
619
|
- 📚 Documentation improvements
|
|
425
620
|
- 🐞 Bugfixes
|
|
426
621
|
|
|
427
|
-
Team members who have contributed to this release:
|
|
428
|
-
@bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
622
|
+
Team members who have contributed to this release: @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
429
623
|
|
|
430
624
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
431
625
|
|
|
@@ -738,7 +932,7 @@ We'd like to offer a big thanks to the 21 contributors who made this release pos
|
|
|
738
932
|
- 🌍 Improve Chinese (zh-CN), (zh-HK), (zh-TW), Czech (cs-CZ), Korean (ko-KR) and Slovak (sk-Sk) locales on the Data Grid
|
|
739
933
|
- 🌍 Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales on the Pickers
|
|
740
934
|
|
|
741
|
-
|
|
935
|
+
### Breaking changes
|
|
742
936
|
|
|
743
937
|
- ℹ️ The peer dependency on `@mui/material` has been updated to accept only v7.
|
|
744
938
|
This has been done to increase the adoption rate of ESM.
|
|
@@ -751,7 +945,7 @@ Following are all team members who have contributed to this release:
|
|
|
751
945
|
|
|
752
946
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
753
947
|
|
|
754
|
-
|
|
948
|
+
### Alpha release highlights
|
|
755
949
|
|
|
756
950
|
Below are the highlights of the alpha releases leading up to this beta release:
|
|
757
951
|
|
|
@@ -3045,8 +3239,7 @@ We'd like to offer a big thanks to the 4 contributors who made this release poss
|
|
|
3045
3239
|
|
|
3046
3240
|
- 🐞 Bugfixes
|
|
3047
3241
|
|
|
3048
|
-
Team members who have contributed to this release:
|
|
3049
|
-
@arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3242
|
+
Team members who have contributed to this release: @arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3050
3243
|
|
|
3051
3244
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
3052
3245
|
|
|
@@ -189,12 +189,6 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
|
|
|
189
189
|
* @default 'content'
|
|
190
190
|
*/
|
|
191
191
|
expansionTrigger: _propTypes.default.oneOf(['content', 'iconContainer']),
|
|
192
|
-
/**
|
|
193
|
-
* Unstable features, breaking changes might be introduced.
|
|
194
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
195
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
196
|
-
*/
|
|
197
|
-
experimentalFeatures: _propTypes.default.object,
|
|
198
192
|
/**
|
|
199
193
|
* Used to determine the id of a given item.
|
|
200
194
|
*
|
|
@@ -4,7 +4,7 @@ import { SxProps } from '@mui/system/styleFunctionSx';
|
|
|
4
4
|
import { SlotComponentProps } from '@mui/utils/types';
|
|
5
5
|
import { RichTreeViewClasses } from "./richTreeViewClasses.js";
|
|
6
6
|
import { RichTreeViewPluginParameters, RichTreeViewPluginSignatures } from "./RichTreeView.plugins.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TreeViewPublicAPI } from "../internals/models/index.js";
|
|
8
8
|
import { RichTreeViewItemsSlotProps, RichTreeViewItemsSlots } from "../internals/components/RichTreeViewItems.js";
|
|
9
9
|
import { TreeViewSlotProps, TreeViewSlots } from "../internals/TreeViewProvider/TreeViewStyleContext.js";
|
|
10
10
|
export interface RichTreeViewSlots extends TreeViewSlots, RichTreeViewItemsSlots {
|
|
@@ -44,10 +44,4 @@ export interface RichTreeViewProps<R extends {}, Multiple extends boolean | unde
|
|
|
44
44
|
* The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
|
|
45
45
|
*/
|
|
46
46
|
apiRef?: RichTreeViewApiRef;
|
|
47
|
-
/**
|
|
48
|
-
* Unstable features, breaking changes might be introduced.
|
|
49
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
50
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
51
|
-
*/
|
|
52
|
-
experimentalFeatures?: TreeViewExperimentalFeatures<RichTreeViewPluginSignatures>;
|
|
53
47
|
}
|
|
@@ -173,12 +173,6 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
|
|
|
173
173
|
* @default 'content'
|
|
174
174
|
*/
|
|
175
175
|
expansionTrigger: _propTypes.default.oneOf(['content', 'iconContainer']),
|
|
176
|
-
/**
|
|
177
|
-
* Unstable features, breaking changes might be introduced.
|
|
178
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
179
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
180
|
-
*/
|
|
181
|
-
experimentalFeatures: _propTypes.default.object,
|
|
182
176
|
/**
|
|
183
177
|
* This prop is used to help implement the accessibility logic.
|
|
184
178
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
@@ -4,7 +4,7 @@ import { SlotComponentProps } from '@mui/utils/types';
|
|
|
4
4
|
import { SxProps } from '@mui/system/styleFunctionSx';
|
|
5
5
|
import { SimpleTreeViewClasses } from "./simpleTreeViewClasses.js";
|
|
6
6
|
import { SimpleTreeViewPluginParameters, SimpleTreeViewPluginSignatures } from "./SimpleTreeView.plugins.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TreeViewPublicAPI } from "../internals/models/index.js";
|
|
8
8
|
import { TreeViewSlotProps, TreeViewSlots } from "../internals/TreeViewProvider/TreeViewStyleContext.js";
|
|
9
9
|
export interface SimpleTreeViewSlots extends TreeViewSlots {
|
|
10
10
|
/**
|
|
@@ -43,10 +43,4 @@ export interface SimpleTreeViewProps<Multiple extends boolean | undefined> exten
|
|
|
43
43
|
* The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
|
|
44
44
|
*/
|
|
45
45
|
apiRef?: SimpleTreeViewApiRef;
|
|
46
|
-
/**
|
|
47
|
-
* Unstable features, breaking changes might be introduced.
|
|
48
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
49
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
50
|
-
*/
|
|
51
|
-
experimentalFeatures?: TreeViewExperimentalFeatures<SimpleTreeViewPluginSignatures>;
|
|
52
46
|
}
|
|
@@ -182,12 +182,6 @@ process.env.NODE_ENV !== "production" ? RichTreeView.propTypes = {
|
|
|
182
182
|
* @default 'content'
|
|
183
183
|
*/
|
|
184
184
|
expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']),
|
|
185
|
-
/**
|
|
186
|
-
* Unstable features, breaking changes might be introduced.
|
|
187
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
188
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
189
|
-
*/
|
|
190
|
-
experimentalFeatures: PropTypes.object,
|
|
191
185
|
/**
|
|
192
186
|
* Used to determine the id of a given item.
|
|
193
187
|
*
|
|
@@ -4,7 +4,7 @@ import { SxProps } from '@mui/system/styleFunctionSx';
|
|
|
4
4
|
import { SlotComponentProps } from '@mui/utils/types';
|
|
5
5
|
import { RichTreeViewClasses } from "./richTreeViewClasses.js";
|
|
6
6
|
import { RichTreeViewPluginParameters, RichTreeViewPluginSignatures } from "./RichTreeView.plugins.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TreeViewPublicAPI } from "../internals/models/index.js";
|
|
8
8
|
import { RichTreeViewItemsSlotProps, RichTreeViewItemsSlots } from "../internals/components/RichTreeViewItems.js";
|
|
9
9
|
import { TreeViewSlotProps, TreeViewSlots } from "../internals/TreeViewProvider/TreeViewStyleContext.js";
|
|
10
10
|
export interface RichTreeViewSlots extends TreeViewSlots, RichTreeViewItemsSlots {
|
|
@@ -44,10 +44,4 @@ export interface RichTreeViewProps<R extends {}, Multiple extends boolean | unde
|
|
|
44
44
|
* The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
|
|
45
45
|
*/
|
|
46
46
|
apiRef?: RichTreeViewApiRef;
|
|
47
|
-
/**
|
|
48
|
-
* Unstable features, breaking changes might be introduced.
|
|
49
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
50
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
51
|
-
*/
|
|
52
|
-
experimentalFeatures?: TreeViewExperimentalFeatures<RichTreeViewPluginSignatures>;
|
|
53
47
|
}
|
|
@@ -166,12 +166,6 @@ process.env.NODE_ENV !== "production" ? SimpleTreeView.propTypes = {
|
|
|
166
166
|
* @default 'content'
|
|
167
167
|
*/
|
|
168
168
|
expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']),
|
|
169
|
-
/**
|
|
170
|
-
* Unstable features, breaking changes might be introduced.
|
|
171
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
172
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
173
|
-
*/
|
|
174
|
-
experimentalFeatures: PropTypes.object,
|
|
175
169
|
/**
|
|
176
170
|
* This prop is used to help implement the accessibility logic.
|
|
177
171
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
@@ -4,7 +4,7 @@ import { SlotComponentProps } from '@mui/utils/types';
|
|
|
4
4
|
import { SxProps } from '@mui/system/styleFunctionSx';
|
|
5
5
|
import { SimpleTreeViewClasses } from "./simpleTreeViewClasses.js";
|
|
6
6
|
import { SimpleTreeViewPluginParameters, SimpleTreeViewPluginSignatures } from "./SimpleTreeView.plugins.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TreeViewPublicAPI } from "../internals/models/index.js";
|
|
8
8
|
import { TreeViewSlotProps, TreeViewSlots } from "../internals/TreeViewProvider/TreeViewStyleContext.js";
|
|
9
9
|
export interface SimpleTreeViewSlots extends TreeViewSlots {
|
|
10
10
|
/**
|
|
@@ -43,10 +43,4 @@ export interface SimpleTreeViewProps<Multiple extends boolean | undefined> exten
|
|
|
43
43
|
* The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
|
|
44
44
|
*/
|
|
45
45
|
apiRef?: SimpleTreeViewApiRef;
|
|
46
|
-
/**
|
|
47
|
-
* Unstable features, breaking changes might be introduced.
|
|
48
|
-
* For each feature, if the flag is not explicitly set to `true`,
|
|
49
|
-
* the feature will be fully disabled and any property / method call will not have any effect.
|
|
50
|
-
*/
|
|
51
|
-
experimentalFeatures?: TreeViewExperimentalFeatures<SimpleTreeViewPluginSignatures>;
|
|
52
46
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useTreeViewId } from "./useTreeViewId.js";
|
|
2
|
-
export type { UseTreeViewIdSignature, UseTreeViewIdParameters,
|
|
2
|
+
export type { UseTreeViewIdSignature, UseTreeViewIdParameters, UseTreeViewIdParametersWithDefaults } from "./useTreeViewId.types.js";
|
|
@@ -6,7 +6,7 @@ export interface UseTreeViewIdParameters {
|
|
|
6
6
|
*/
|
|
7
7
|
id?: string;
|
|
8
8
|
}
|
|
9
|
-
export type
|
|
9
|
+
export type UseTreeViewIdParametersWithDefaults = UseTreeViewIdParameters;
|
|
10
10
|
export interface UseTreeViewIdState {
|
|
11
11
|
id: {
|
|
12
12
|
treeId: string | undefined;
|
|
@@ -15,6 +15,6 @@ export interface UseTreeViewIdState {
|
|
|
15
15
|
}
|
|
16
16
|
export type UseTreeViewIdSignature = TreeViewPluginSignature<{
|
|
17
17
|
params: UseTreeViewIdParameters;
|
|
18
|
-
|
|
18
|
+
paramsWithDefaults: UseTreeViewIdParametersWithDefaults;
|
|
19
19
|
state: UseTreeViewIdState;
|
|
20
20
|
}>;
|
package/esm/internals/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { RichTreeViewItems } from "./components/RichTreeViewItems.js";
|
|
|
4
4
|
export type { RichTreeViewItemsSlots, RichTreeViewItemsSlotProps } from "./components/RichTreeViewItems.js";
|
|
5
5
|
export { unstable_resetCleanupTracking, useInstanceEventHandler } from "./hooks/useInstanceEventHandler.js";
|
|
6
6
|
export { useSelector } from "./hooks/useSelector.js";
|
|
7
|
-
export type { TreeViewPlugin, TreeViewPluginSignature, ConvertPluginsIntoSignatures, MergeSignaturesProperty, TreeViewPublicAPI, TreeViewState,
|
|
7
|
+
export type { TreeViewPlugin, TreeViewPluginSignature, ConvertPluginsIntoSignatures, MergeSignaturesProperty, TreeViewPublicAPI, TreeViewState, TreeViewItemMeta, TreeViewInstance, TreeViewItemPlugin, TreeViewUsedStore } from "./models/index.js";
|
|
8
8
|
export type { TreeViewCorePluginParameters } from "./corePlugins/index.js";
|
|
9
9
|
export { useTreeViewExpansion } from "./plugins/useTreeViewExpansion/index.js";
|
|
10
10
|
export type { UseTreeViewExpansionSignature, UseTreeViewExpansionParameters } from "./plugins/useTreeViewExpansion/index.js";
|
|
@@ -18,7 +18,7 @@ export { useTreeViewItems, buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from
|
|
|
18
18
|
export { selectorItemMetaLookup, selectorItemMeta, selectorItemIndex, selectorItemOrderedChildrenIds } from "./plugins/useTreeViewItems/useTreeViewItems.selectors.js";
|
|
19
19
|
export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, UseTreeViewItemsState } from "./plugins/useTreeViewItems/index.js";
|
|
20
20
|
export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
|
|
21
|
-
export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited
|
|
21
|
+
export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited } from "./plugins/useTreeViewLabel/useTreeViewLabel.selectors.js";
|
|
22
22
|
export type { UseTreeViewLabelSignature, UseTreeViewLabelParameters } from "./plugins/useTreeViewLabel/index.js";
|
|
23
23
|
export { selectorIsItemExpanded } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
|
|
24
24
|
export { selectorIsItemSelected } from "./plugins/useTreeViewSelection/useTreeViewSelection.selectors.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { useTreeViewKeyboardNavigation } from "./plugins/useTreeViewKeyboardNavi
|
|
|
14
14
|
export { useTreeViewItems, buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from "./plugins/useTreeViewItems/index.js";
|
|
15
15
|
export { selectorItemMetaLookup, selectorItemMeta, selectorItemIndex, selectorItemOrderedChildrenIds } from "./plugins/useTreeViewItems/useTreeViewItems.selectors.js";
|
|
16
16
|
export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
|
|
17
|
-
export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited
|
|
17
|
+
export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited } from "./plugins/useTreeViewLabel/useTreeViewLabel.selectors.js";
|
|
18
18
|
export { selectorIsItemExpanded } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
|
|
19
19
|
export { selectorIsItemSelected } from "./plugins/useTreeViewSelection/useTreeViewSelection.selectors.js";
|
|
20
20
|
export { selectorDataSourceState, selectorGetTreeItemError } from "./plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { EventHandlers } from '@mui/utils/types';
|
|
3
|
-
import {
|
|
3
|
+
import { TreeViewInstance } from "./treeView.js";
|
|
4
4
|
import type { MergeSignaturesProperty, OptionalIfEmpty } from "./helpers.js";
|
|
5
5
|
import { TreeViewEventLookupElement } from "./events.js";
|
|
6
6
|
import type { TreeViewCorePluginSignatures } from "../corePlugins/index.js";
|
|
@@ -15,8 +15,7 @@ export interface TreeViewPluginOptions<TSignature extends TreeViewAnyPluginSigna
|
|
|
15
15
|
/**
|
|
16
16
|
* The Tree View parameters after being processed with the default values.
|
|
17
17
|
*/
|
|
18
|
-
params:
|
|
19
|
-
experimentalFeatures: TreeViewUsedExperimentalFeatures<TSignature>;
|
|
18
|
+
params: TreeViewUsedParamsWithDefaults<TSignature>;
|
|
20
19
|
/**
|
|
21
20
|
* The store that can be used to access the state of other plugins.
|
|
22
21
|
*/
|
|
@@ -35,12 +34,11 @@ type TreeViewResponse<TSignature extends TreeViewAnyPluginSignature> = {
|
|
|
35
34
|
} & OptionalIfEmpty<'publicAPI', TSignature['publicAPI']> & OptionalIfEmpty<'instance', TSignature['instance']>;
|
|
36
35
|
export type TreeViewPluginSignature<T extends {
|
|
37
36
|
params?: {};
|
|
38
|
-
|
|
37
|
+
paramsWithDefaults?: {};
|
|
39
38
|
instance?: {};
|
|
40
39
|
publicAPI?: {};
|
|
41
40
|
events?: { [key in keyof T['events']]: TreeViewEventLookupElement };
|
|
42
41
|
state?: {};
|
|
43
|
-
experimentalFeatures?: string;
|
|
44
42
|
dependencies?: readonly TreeViewAnyPluginSignature[];
|
|
45
43
|
optionalDependencies?: readonly TreeViewAnyPluginSignature[];
|
|
46
44
|
}> = {
|
|
@@ -53,9 +51,9 @@ export type TreeViewPluginSignature<T extends {
|
|
|
53
51
|
/**
|
|
54
52
|
* The params after being processed with the default values.
|
|
55
53
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
} ? T['
|
|
54
|
+
paramsWithDefaults: T extends {
|
|
55
|
+
paramsWithDefaults: {};
|
|
56
|
+
} ? T['paramsWithDefaults'] : {};
|
|
59
57
|
/**
|
|
60
58
|
* An imperative api available for internal use.
|
|
61
59
|
*/
|
|
@@ -78,9 +76,6 @@ export type TreeViewPluginSignature<T extends {
|
|
|
78
76
|
state: T extends {
|
|
79
77
|
state: {};
|
|
80
78
|
} ? T['state'] : {};
|
|
81
|
-
experimentalFeatures: T extends {
|
|
82
|
-
experimentalFeatures: string;
|
|
83
|
-
} ? { [key in T['experimentalFeatures']]?: boolean } : {};
|
|
84
79
|
/**
|
|
85
80
|
* Any plugins that this plugin depends on.
|
|
86
81
|
*/
|
|
@@ -98,17 +93,16 @@ export type TreeViewAnyPluginSignature = {
|
|
|
98
93
|
state: any;
|
|
99
94
|
instance: any;
|
|
100
95
|
params: any;
|
|
101
|
-
|
|
96
|
+
paramsWithDefaults: any;
|
|
102
97
|
dependencies: any;
|
|
103
98
|
optionalDependencies: any;
|
|
104
99
|
events: any;
|
|
105
|
-
experimentalFeatures: any;
|
|
106
100
|
publicAPI: any;
|
|
107
101
|
};
|
|
108
102
|
type TreeViewRequiredPlugins<TSignature extends TreeViewAnyPluginSignature> = [...TreeViewCorePluginSignatures, ...TSignature['dependencies']];
|
|
109
103
|
type PluginPropertyWithDependencies<TSignature extends TreeViewAnyPluginSignature, TProperty extends keyof TreeViewAnyPluginSignature> = TSignature[TProperty] & MergeSignaturesProperty<TreeViewRequiredPlugins<TSignature>, TProperty> & Partial<MergeSignaturesProperty<TSignature['optionalDependencies'], TProperty>>;
|
|
110
104
|
export type TreeViewUsedParams<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'params'>;
|
|
111
|
-
export type
|
|
105
|
+
export type TreeViewUsedParamsWithDefaults<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'paramsWithDefaults'>;
|
|
112
106
|
export type TreeViewUsedInstance<TSignature extends TreeViewAnyPluginSignature> = PluginPropertyWithDependencies<TSignature, 'instance'> & {
|
|
113
107
|
/**
|
|
114
108
|
* Private property only defined in TypeScript to be able to access the plugin signature from the instance object.
|
|
@@ -116,7 +110,6 @@ export type TreeViewUsedInstance<TSignature extends TreeViewAnyPluginSignature>
|
|
|
116
110
|
$$signature: TSignature;
|
|
117
111
|
};
|
|
118
112
|
export type TreeViewUsedStore<TSignature extends TreeViewAnyPluginSignature> = TreeViewStore<[TSignature, ...TSignature['dependencies']]>;
|
|
119
|
-
type TreeViewUsedExperimentalFeatures<TSignature extends TreeViewAnyPluginSignature> = TreeViewExperimentalFeatures<[TSignature, ...TSignature['dependencies']], TSignature['optionalDependencies']>;
|
|
120
113
|
export type TreeViewUsedEvents<TSignature extends TreeViewAnyPluginSignature> = TSignature['events'] & MergeSignaturesProperty<TreeViewRequiredPlugins<TSignature>, 'events'>;
|
|
121
114
|
export type TreeItemWrapper<TSignatures extends readonly TreeViewAnyPluginSignature[]> = (params: {
|
|
122
115
|
itemId: TreeViewItemId;
|
|
@@ -139,22 +132,20 @@ export type TreeViewPlugin<TSignature extends TreeViewAnyPluginSignature> = {
|
|
|
139
132
|
*
|
|
140
133
|
* @param {TreeViewUsedParams<TSignature>} options The options object.
|
|
141
134
|
* @param {TreeViewUsedParams<TSignature>['params']} options.params The parameters before being processed with the default values.
|
|
142
|
-
* @
|
|
143
|
-
* @returns {TSignature['defaultizedParams']} The parameters after being processed with the default values.
|
|
135
|
+
* @returns {TSignature['paramsWithDefaults']} The parameters after being processed with the default values.
|
|
144
136
|
*/
|
|
145
|
-
|
|
137
|
+
applyDefaultValuesToParams?: (options: {
|
|
146
138
|
params: TreeViewUsedParams<TSignature>;
|
|
147
|
-
|
|
148
|
-
}) => TSignature['defaultizedParams'];
|
|
139
|
+
}) => TSignature['paramsWithDefaults'];
|
|
149
140
|
/**
|
|
150
141
|
* The initial state is computed after the default values are applied.
|
|
151
142
|
* It sets up the state for the first render.
|
|
152
143
|
* Other state modifications have to be done in effects and so could not be applied on the initial render.
|
|
153
144
|
*
|
|
154
|
-
* @param {
|
|
145
|
+
* @param {TreeViewUsedParamsWithDefaults<TSignature>} params The parameters after being processed with the default values.
|
|
155
146
|
* @returns {TSignature['state']} The initial state of the plugin.
|
|
156
147
|
*/
|
|
157
|
-
getInitialState?: (params:
|
|
148
|
+
getInitialState?: (params: TreeViewUsedParamsWithDefaults<TSignature>) => TSignature['state'];
|
|
158
149
|
/**
|
|
159
150
|
* An object where each property used by the plugin is set to `true`.
|
|
160
151
|
*/
|
|
@@ -18,7 +18,6 @@ export interface TreeViewItemMeta {
|
|
|
18
18
|
}
|
|
19
19
|
export type TreeViewInstance<TSignatures extends readonly TreeViewAnyPluginSignature[], TOptionalSignatures extends readonly TreeViewAnyPluginSignature[] = []> = MergeSignaturesProperty<[...TreeViewCorePluginSignatures, ...TSignatures], 'instance'> & Partial<MergeSignaturesProperty<TOptionalSignatures, 'instance'>>;
|
|
20
20
|
export type TreeViewPublicAPI<TSignatures extends readonly TreeViewAnyPluginSignature[], TOptionalSignatures extends readonly TreeViewAnyPluginSignature[] = []> = MergeSignaturesProperty<[...TreeViewCorePluginSignatures, ...TSignatures], 'publicAPI'> & Partial<MergeSignaturesProperty<TOptionalSignatures, 'instance'>>;
|
|
21
|
-
export type TreeViewExperimentalFeatures<TSignatures extends readonly TreeViewAnyPluginSignature[], TOptionalSignatures extends readonly TreeViewAnyPluginSignature[] = []> = MergeSignaturesProperty<[...TSignatures, ...TOptionalSignatures], 'experimentalFeatures'>;
|
|
22
21
|
export type TreeViewStateCacheKey = {
|
|
23
22
|
id: number;
|
|
24
23
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useTreeViewExpansion } from "./useTreeViewExpansion.js";
|
|
2
|
-
export type { UseTreeViewExpansionSignature, UseTreeViewExpansionParameters,
|
|
2
|
+
export type { UseTreeViewExpansionSignature, UseTreeViewExpansionParameters, UseTreeViewExpansionParametersWithDefaults } from "./useTreeViewExpansion.types.js";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';
|
|
2
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
3
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
4
5
|
import { selectorExpandedItems, selectorIsItemExpandable, selectorIsItemExpanded } from "./useTreeViewExpansion.selectors.js";
|
|
5
6
|
import { getExpansionTrigger } from "./useTreeViewExpansion.utils.js";
|
|
6
7
|
import { selectorItemMeta, selectorItemOrderedChildrenIds } from "../useTreeViewItems/useTreeViewItems.selectors.js";
|
|
7
8
|
import { publishTreeViewEvent } from "../../utils/publishTreeViewEvent.js";
|
|
8
|
-
import { useAssertModelConsistency } from "../../utils/models.js";
|
|
9
9
|
export const useTreeViewExpansion = ({
|
|
10
10
|
instance,
|
|
11
11
|
store,
|
|
12
12
|
params
|
|
13
13
|
}) => {
|
|
14
14
|
useAssertModelConsistency({
|
|
15
|
-
|
|
15
|
+
componentName: 'Tree View',
|
|
16
|
+
propName: 'expandedItems',
|
|
16
17
|
controlled: params.expandedItems,
|
|
17
18
|
defaultValue: params.defaultExpandedItems
|
|
18
19
|
});
|
|
@@ -128,7 +129,7 @@ export const useTreeViewExpansion = ({
|
|
|
128
129
|
};
|
|
129
130
|
};
|
|
130
131
|
const DEFAULT_EXPANDED_ITEMS = [];
|
|
131
|
-
useTreeViewExpansion.
|
|
132
|
+
useTreeViewExpansion.applyDefaultValuesToParams = ({
|
|
132
133
|
params
|
|
133
134
|
}) => _extends({}, params, {
|
|
134
135
|
defaultExpandedItems: params.defaultExpandedItems ?? DEFAULT_EXPANDED_ITEMS
|
|
@@ -71,7 +71,7 @@ export interface UseTreeViewExpansionParameters {
|
|
|
71
71
|
*/
|
|
72
72
|
expansionTrigger?: 'content' | 'iconContainer';
|
|
73
73
|
}
|
|
74
|
-
export type
|
|
74
|
+
export type UseTreeViewExpansionParametersWithDefaults = DefaultizedProps<UseTreeViewExpansionParameters, 'defaultExpandedItems'>;
|
|
75
75
|
export interface UseTreeViewExpansionState {
|
|
76
76
|
expansion: {
|
|
77
77
|
expandedItems: string[];
|
|
@@ -90,7 +90,7 @@ interface UseTreeViewExpansionEventLookup {
|
|
|
90
90
|
}
|
|
91
91
|
export type UseTreeViewExpansionSignature = TreeViewPluginSignature<{
|
|
92
92
|
params: UseTreeViewExpansionParameters;
|
|
93
|
-
|
|
93
|
+
paramsWithDefaults: UseTreeViewExpansionParametersWithDefaults;
|
|
94
94
|
instance: UseTreeViewExpansionInstance;
|
|
95
95
|
publicAPI: UseTreeViewExpansionPublicAPI;
|
|
96
96
|
modelNames: 'expandedItems';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TreeViewUsedParamsWithDefaults } from "../../models/index.js";
|
|
2
2
|
import { UseTreeViewExpansionSignature } from "./useTreeViewExpansion.types.js";
|
|
3
3
|
export declare const getExpansionTrigger: ({
|
|
4
4
|
isItemEditable,
|
|
5
5
|
expansionTrigger
|
|
6
|
-
}: Pick<
|
|
6
|
+
}: Pick<TreeViewUsedParamsWithDefaults<UseTreeViewExpansionSignature>, "isItemEditable" | "expansionTrigger">) => "content" | "iconContainer";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useTreeViewFocus } from "./useTreeViewFocus.js";
|
|
2
|
-
export type { UseTreeViewFocusSignature, UseTreeViewFocusParameters,
|
|
2
|
+
export type { UseTreeViewFocusSignature, UseTreeViewFocusParameters, UseTreeViewFocusParametersWithDefaults } from "./useTreeViewFocus.types.js";
|