@mui/x-tree-view 8.0.0-alpha.6 → 8.0.0-alpha.8
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 +242 -1
- package/RichTreeView/RichTreeView.types.d.ts +1 -1
- package/SimpleTreeView/SimpleTreeView.types.d.ts +1 -1
- package/TreeItem/TreeItem.d.ts +1 -1
- package/hooks/useTreeViewApiRef.d.ts +1 -1
- package/index.js +1 -1
- package/internals/TreeViewProvider/TreeViewProvider.types.d.ts +1 -1
- package/internals/hooks/useInstanceEventHandler.js +1 -1
- package/internals/models/itemPlugin.d.ts +2 -2
- package/internals/models/plugin.d.ts +1 -1
- package/internals/useTreeView/useTreeView.d.ts +1 -1
- package/internals/useTreeView/useTreeView.types.d.ts +1 -1
- package/internals/useTreeView/useTreeViewBuildContext.d.ts +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useInstanceEventHandler.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useInstanceEventHandler.js +1 -1
- package/package.json +2 -2
- package/useTreeItem/useTreeItem.types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,247 @@
|
|
|
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-alpha.8
|
|
9
|
+
|
|
10
|
+
_Jan 16, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🍬 Improved design for Data Grid [Header filters](https://next.mui.com/x/react-data-grid/filtering/header-filters/)
|
|
15
|
+
|
|
16
|
+
<img width="100%" alt="Data Grid Header filters" src="https://github.com/user-attachments/assets/74a50cd9-7a55-41fc-a2b8-f8a0d5b9120e" />
|
|
17
|
+
|
|
18
|
+
- 🔄 Data Grid [Scroll restoration](https://next.mui.com/x/react-data-grid/scrolling/#scroll-restoration)
|
|
19
|
+
- 📊 Charts support server-side rendering under [some conditions](https://next.mui.com/x/react-charts/getting-started/#server-side-rendering)
|
|
20
|
+
- 🐞 Bugfixes
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
|
+
@lauri865.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@arminmeh, @romgrk, @samuelsycamore, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### Breaking changes
|
|
32
|
+
|
|
33
|
+
- The clear button in header filter cells has been moved to the header filter menu. Use `slotProps={{ headerFilterCell: { showClearIcon: true } }}` to restore the clear button in the cell.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid@8.0.0-alpha.8`
|
|
36
|
+
|
|
37
|
+
- [DataGrid] Improve scrollbar deadzone with overlay scrollbars (#15961) @lauri865
|
|
38
|
+
- [DataGrid] Header filter design improvements (#15991) @KenanYusuf
|
|
39
|
+
- [DataGrid] Scroll restoration (#15623) @lauri865
|
|
40
|
+
- [DataGrid] Fix row, cell and header memoizations (#15666) @lauri865
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.8`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPro] Add test for column pinning with disabled column virtualization (#16176) @cherniavskii
|
|
47
|
+
- [DataGridPro] Fix width of right-pinned column group during resize (#16199) @cherniavskii
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.8` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.8`.
|
|
52
|
+
|
|
53
|
+
### Date and Time Pickers
|
|
54
|
+
|
|
55
|
+
#### Breaking changes
|
|
56
|
+
|
|
57
|
+
- The field is now editable if rendered inside a mobile Picker — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#field-editing-on-mobile-pickers)
|
|
58
|
+
- The `useMultiInputDateRangeField`, `useMultiInputTimeRangeField`, and `useMultiInputDateTimeRangeField` hooks have been removed in favor of the new `useMultiInputRangeField` hook — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usemultiinputdaterangefield)
|
|
59
|
+
- The component passed to the `field` slot no longer receives the `value`, `onChange`, `timezone`, `format`, `disabled`, `formatDensity`, `enableAccessibleFieldDOMStructure`, `selectedSections` and `onSelectedSectionsChange` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-field)
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.8`
|
|
62
|
+
|
|
63
|
+
- [pickers] Let the field components handle their opening UI, and allow field editing on mobile pickers (#15671) @flaviendelangle
|
|
64
|
+
- [pickers] Remove code duplication for the multi input range fields (#15505) @flaviendelangle
|
|
65
|
+
- [pickers] Rename `onRangePositionChange` into `setRangePosition` in `usePickerRangePositionContext` (#16189) @flaviendelangle
|
|
66
|
+
- [pickers] Use context to pass props from the picker to the field (#16042) @flaviendelangle
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.8`.
|
|
71
|
+
|
|
72
|
+
### Charts
|
|
73
|
+
|
|
74
|
+
#### Breaking changes
|
|
75
|
+
|
|
76
|
+
- Charts tooltip markers now have different styles for each chart type. The tooltip and legend marks are now the same.
|
|
77
|
+
- Duplicate axis id's across `x` and `y` axis now log a warning in dev mode. Axis ids should be unique to prevent internal issues.
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-charts@8.0.0-alpha.8`
|
|
80
|
+
|
|
81
|
+
- [charts] Fix flaky charts tests (#16180) @JCQuintas
|
|
82
|
+
- [charts] Handle case where gradient stop `offset` could be `Infinite` (#16131) @JCQuintas
|
|
83
|
+
- [charts] Make `useChartGradientId` public (#16106) @JCQuintas
|
|
84
|
+
- [charts] Move z-axis to plugin (#16130) @alexfauquette
|
|
85
|
+
- [charts] Plot data at first render if `skipAnimation` is set to `true` (#16166) @alexfauquette
|
|
86
|
+
- [charts] Replace tooltip mark with style (#16117) @JCQuintas
|
|
87
|
+
- [charts] Support `rtl` for gradient legend (#16115) @JCQuintas
|
|
88
|
+
- [charts] Use plugin system for series and axes (#15865) @alexfauquette
|
|
89
|
+
|
|
90
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
91
|
+
|
|
92
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.8`.
|
|
93
|
+
|
|
94
|
+
### Tree View
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-tree-view@8.0.0-alpha.8`
|
|
97
|
+
|
|
98
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.7`.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.8`.
|
|
103
|
+
|
|
104
|
+
### Docs
|
|
105
|
+
|
|
106
|
+
- [docs] Add example for custom legend (#16169) @alexfauquette
|
|
107
|
+
- [docs] Add full custom field creation example (#15194) @flaviendelangle
|
|
108
|
+
- [docs] Copyedit the Data Grid cell selection page (#16099) @samuelsycamore
|
|
109
|
+
- [docs] Fix demo rendering issue on Codesandbox (#16118) @arminmeh
|
|
110
|
+
- [docs] Remove broken links (#16167) @alexfauquette
|
|
111
|
+
- [docs] Split the Data Grid editing page (#14931) @MBilalShafi
|
|
112
|
+
- [docs] Fix wrong props warnings (#16119) @JCQuintas
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [core] Type all references as `RefObject` (#16124) @arminmeh
|
|
117
|
+
- [code-infra] Refactor `react` and `react-dom` definitions to simplify dep resolving (#16160) @LukasTy
|
|
118
|
+
- [code-infra] Stop renovate from updating `date-fns-v2` (#16158) @LukasTy
|
|
119
|
+
- [infra] Improve cherry-pick action target list (#16184) @michelengelen
|
|
120
|
+
- [test] Fix flaky column pinning unit test (#16202) @cherniavskii
|
|
121
|
+
- [test] Fix flaky screenshot (#16182) @cherniavskii
|
|
122
|
+
|
|
123
|
+
## 8.0.0-alpha.7
|
|
124
|
+
|
|
125
|
+
_Jan 9, 2025_
|
|
126
|
+
|
|
127
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
128
|
+
|
|
129
|
+
- 📊 Charts legend is now an HTML element which can be styled more easily
|
|
130
|
+
- 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
|
|
131
|
+
- 🏎️ Improve Data Grid aggregation performance
|
|
132
|
+
- 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
|
|
133
|
+
- 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
|
|
134
|
+
- 🐞 Bugfixes
|
|
135
|
+
|
|
136
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
137
|
+
@derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
|
|
138
|
+
Following are all team members who have contributed to this release:
|
|
139
|
+
@cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
|
|
140
|
+
|
|
141
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
142
|
+
|
|
143
|
+
### Data Grid
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid@8.0.0-alpha.7`
|
|
146
|
+
|
|
147
|
+
- [DataGrid] Improve React 19 support (#15769) @LukasTy
|
|
148
|
+
- [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
|
|
149
|
+
- [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
|
|
150
|
+
- [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
|
|
151
|
+
- [DataGrid] Refactor: create base button props (#15930) @romgrk
|
|
152
|
+
- [DataGrid] Refactor: create tooltip props (#16086) @romgrk
|
|
153
|
+
- [DataGrid] Fix TS error (#16046) @cherniavskii
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
156
|
+
|
|
157
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.7`.
|
|
158
|
+
|
|
159
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
160
|
+
|
|
161
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.7`, plus:
|
|
162
|
+
|
|
163
|
+
- [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
|
|
164
|
+
- [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
|
|
165
|
+
- [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
|
|
166
|
+
|
|
167
|
+
### Date and Time Pickers
|
|
168
|
+
|
|
169
|
+
#### Breaking changes
|
|
170
|
+
|
|
171
|
+
- The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
|
|
172
|
+
- Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
|
|
173
|
+
- The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
|
|
174
|
+
- The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
|
|
175
|
+
- The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
|
|
176
|
+
- The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
|
|
177
|
+
- The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
|
|
178
|
+
- The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
|
|
179
|
+
- The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
|
|
180
|
+
|
|
181
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.7`
|
|
182
|
+
|
|
183
|
+
- [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
|
|
184
|
+
- [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
|
|
185
|
+
- [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
|
|
186
|
+
- [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
|
|
187
|
+
- [pickers] Improve React 19 support (#15769) @LukasTy
|
|
188
|
+
- [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
|
|
189
|
+
- [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
|
|
190
|
+
- [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
|
|
191
|
+
- [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
|
|
192
|
+
- [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
|
|
193
|
+
- [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
|
|
194
|
+
- [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
|
|
195
|
+
- [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
|
|
196
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
|
|
197
|
+
|
|
198
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
199
|
+
|
|
200
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.7`.
|
|
201
|
+
|
|
202
|
+
### Charts
|
|
203
|
+
|
|
204
|
+
#### Breaking changes
|
|
205
|
+
|
|
206
|
+
- Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
|
|
207
|
+
- The default legend is now an HTML element and can be styled more easily.
|
|
208
|
+
- The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
|
|
209
|
+
- `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'` — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
|
|
210
|
+
- The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-charts@8.0.0-alpha.7`
|
|
213
|
+
|
|
214
|
+
- [charts] New HTML legend & styles (#15733) @JCQuintas
|
|
215
|
+
- [charts] Improve React 19 support (#15769) @LukasTy
|
|
216
|
+
- [charts] Fix 301 redirection in the API documentation @oliviertassinari
|
|
217
|
+
|
|
218
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
219
|
+
|
|
220
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.7`.
|
|
221
|
+
|
|
222
|
+
### Tree View
|
|
223
|
+
|
|
224
|
+
#### `@mui/x-tree-view@8.0.0-alpha.7`
|
|
225
|
+
|
|
226
|
+
- [TreeView] Improve React 19 support (#15769) @LukasTy
|
|
227
|
+
|
|
228
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
229
|
+
|
|
230
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.7`.
|
|
231
|
+
|
|
232
|
+
### Docs
|
|
233
|
+
|
|
234
|
+
- [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
|
|
235
|
+
- [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
|
|
236
|
+
- [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
|
|
237
|
+
- [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
|
|
238
|
+
- [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
|
|
239
|
+
|
|
240
|
+
### Core
|
|
241
|
+
|
|
242
|
+
- [core] Clarify the release strategy (#16014) @MBilalShafi
|
|
243
|
+
- [core] Small fixes on docs @oliviertassinari
|
|
244
|
+
- [core] Sync with other repos @oliviertassinari
|
|
245
|
+
- [core] Update the `release:version` docs (#16038) @cherniavskii
|
|
246
|
+
- [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
|
|
247
|
+
- [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
|
|
248
|
+
|
|
8
249
|
## 8.0.0-alpha.6
|
|
9
250
|
|
|
10
251
|
_Dec 26, 2024_
|
|
@@ -104,7 +345,7 @@ Following are all team members who have contributed to this release:
|
|
|
104
345
|
|
|
105
346
|
#### Breaking changes
|
|
106
347
|
|
|
107
|
-
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps
|
|
348
|
+
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
|
|
108
349
|
|
|
109
350
|
- For `.root` element, use `slotProps.root`.
|
|
110
351
|
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
@@ -16,7 +16,7 @@ export interface RichTreeViewSlots extends RichTreeViewPluginSlots, RichTreeView
|
|
|
16
16
|
export interface RichTreeViewSlotProps<R extends {}, Multiple extends boolean | undefined> extends RichTreeViewPluginSlotProps, RichTreeViewItemsSlotProps {
|
|
17
17
|
root?: SlotComponentProps<'ul', {}, RichTreeViewProps<R, Multiple>>;
|
|
18
18
|
}
|
|
19
|
-
export type RichTreeViewApiRef = React.
|
|
19
|
+
export type RichTreeViewApiRef = React.RefObject<TreeViewPublicAPI<RichTreeViewPluginSignatures> | undefined>;
|
|
20
20
|
export interface RichTreeViewPropsBase extends React.HTMLAttributes<HTMLUListElement> {
|
|
21
21
|
className?: string;
|
|
22
22
|
/**
|
|
@@ -15,7 +15,7 @@ export interface SimpleTreeViewSlots extends SimpleTreeViewPluginSlots {
|
|
|
15
15
|
export interface SimpleTreeViewSlotProps extends SimpleTreeViewPluginSlotProps {
|
|
16
16
|
root?: SlotComponentProps<'ul', {}, {}>;
|
|
17
17
|
}
|
|
18
|
-
export type SimpleTreeViewApiRef = React.
|
|
18
|
+
export type SimpleTreeViewApiRef = React.RefObject<TreeViewPublicAPI<SimpleTreeViewPluginSignatures> | undefined>;
|
|
19
19
|
export interface SimpleTreeViewProps<Multiple extends boolean | undefined> extends SimpleTreeViewPluginParameters<Multiple>, React.HTMLAttributes<HTMLUListElement> {
|
|
20
20
|
/**
|
|
21
21
|
* The content of the component.
|
package/TreeItem/TreeItem.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const TreeItemIconContainer: import("@emotion/styled").StyledComp
|
|
|
13
13
|
export declare const TreeItemGroupTransition: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").CollapseProps, keyof import("@mui/material").CollapseProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
14
14
|
export declare const TreeItemCheckbox: import("@emotion/styled").StyledComponent<Pick<Omit<CheckboxProps & {
|
|
15
15
|
visible?: boolean;
|
|
16
|
-
}, "ref"> & React.RefAttributes<HTMLButtonElement>, "hidden" | "visible" | "color" | "content" | "size" | "style" | "icon" | "translate" | "disabled" | "form" | "slot" | "title" | "suppressHydrationWarning" | "className" | "id" | "lang" | "
|
|
16
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>, "hidden" | "visible" | "color" | "content" | "size" | "style" | "icon" | "translate" | "disabled" | "form" | "slot" | "title" | "action" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "readOnly" | "required" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "component" | "sx" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "checkedIcon" | "inputProps" | "inputRef" | "indeterminate" | "indeterminateIcon" | keyof React.RefAttributes<HTMLButtonElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
17
17
|
type TreeItemComponent = ((props: TreeItemProps & React.RefAttributes<HTMLLIElement>) => React.JSX.Element) & {
|
|
18
18
|
propTypes?: any;
|
|
19
19
|
};
|
|
@@ -4,4 +4,4 @@ import { RichTreeViewPluginSignatures } from '../RichTreeView/RichTreeView.plugi
|
|
|
4
4
|
/**
|
|
5
5
|
* Hook that instantiates a [[TreeViewApiRef]].
|
|
6
6
|
*/
|
|
7
|
-
export declare const useTreeViewApiRef: <TSignatures extends readonly TreeViewAnyPluginSignature[] = readonly [import("../internals").UseTreeViewItemsSignature, import("../internals").UseTreeViewExpansionSignature, import("../internals").UseTreeViewSelectionSignature, import("../internals").UseTreeViewFocusSignature, import("../internals").UseTreeViewKeyboardNavigationSignature, import("../internals").UseTreeViewIconsSignature, import("../internals").UseTreeViewLabelSignature]>() => React.
|
|
7
|
+
export declare const useTreeViewApiRef: <TSignatures extends readonly TreeViewAnyPluginSignature[] = readonly [import("../internals").UseTreeViewItemsSignature, import("../internals").UseTreeViewExpansionSignature, import("../internals").UseTreeViewSelectionSignature, import("../internals").UseTreeViewFocusSignature, import("../internals").UseTreeViewKeyboardNavigationSignature, import("../internals").UseTreeViewIconsSignature, import("../internals").UseTreeViewLabelSignature]>() => React.RefObject<TreeViewPublicAPI<TSignatures> | undefined>;
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export type TreeViewContextValue<TSignatures extends readonly TreeViewAnyPluginS
|
|
|
8
8
|
instance: TreeViewInstance<TSignatures, TOptionalSignatures>;
|
|
9
9
|
publicAPI: TreeViewPublicAPI<TSignatures, TOptionalSignatures>;
|
|
10
10
|
store: TreeViewStore<TSignatures>;
|
|
11
|
-
rootRef: React.RefObject<HTMLUListElement>;
|
|
11
|
+
rootRef: React.RefObject<HTMLUListElement | null>;
|
|
12
12
|
wrapItem: TreeItemWrapper<TSignatures>;
|
|
13
13
|
wrapRoot: TreeRootWrapper;
|
|
14
14
|
runItemPlugins: TreeViewItemPluginsRunner;
|
|
@@ -14,7 +14,7 @@ export function createUseInstanceEventHandler(registryContainer) {
|
|
|
14
14
|
}
|
|
15
15
|
const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());
|
|
16
16
|
const subscription = React.useRef(null);
|
|
17
|
-
const handlerRef = React.useRef();
|
|
17
|
+
const handlerRef = React.useRef(undefined);
|
|
18
18
|
handlerRef.current = handler;
|
|
19
19
|
const cleanupTokenRef = React.useRef(null);
|
|
20
20
|
if (!subscription.current && handlerRef.current) {
|
|
@@ -4,8 +4,8 @@ import type { UseTreeItemContentSlotOwnProps, UseTreeItemDragAndDropOverlaySlotO
|
|
|
4
4
|
import type { UseTreeItemInteractions } from '../../hooks/useTreeItemUtils/useTreeItemUtils';
|
|
5
5
|
import type { TreeItemProps } from '../../TreeItem/TreeItem.types';
|
|
6
6
|
export interface TreeViewItemPluginSlotPropsEnhancerParams {
|
|
7
|
-
rootRefObject: React.
|
|
8
|
-
contentRefObject: React.
|
|
7
|
+
rootRefObject: React.RefObject<HTMLLIElement | null>;
|
|
8
|
+
contentRefObject: React.RefObject<HTMLDivElement | null>;
|
|
9
9
|
externalEventHandlers: EventHandlers;
|
|
10
10
|
interactions: UseTreeItemInteractions;
|
|
11
11
|
status: UseTreeItemStatus;
|
|
@@ -15,7 +15,7 @@ export interface TreeViewPluginOptions<TSignature extends TreeViewAnyPluginSigna
|
|
|
15
15
|
experimentalFeatures: TreeViewUsedExperimentalFeatures<TSignature>;
|
|
16
16
|
models: TreeViewUsedModels<TSignature>;
|
|
17
17
|
store: TreeViewUsedStore<TSignature>;
|
|
18
|
-
rootRef: React.RefObject<HTMLUListElement>;
|
|
18
|
+
rootRef: React.RefObject<HTMLUListElement | null>;
|
|
19
19
|
plugins: TreeViewPlugin<TreeViewAnyPluginSignature>[];
|
|
20
20
|
}
|
|
21
21
|
type TreeViewModelsInitializer<TSignature extends TreeViewAnyPluginSignature> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TreeViewAnyPluginSignature } from '../models';
|
|
3
3
|
import { UseTreeViewBaseProps, UseTreeViewParameters, UseTreeViewReturnValue } from './useTreeView.types';
|
|
4
|
-
export declare function useTreeViewApiInitialization<T>(inputApiRef: React.
|
|
4
|
+
export declare function useTreeViewApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): T;
|
|
5
5
|
export declare const useTreeView: <TSignatures extends readonly TreeViewAnyPluginSignature[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>>({ plugins: inPlugins, rootRef, props, }: UseTreeViewParameters<TSignatures, TProps>) => UseTreeViewReturnValue<TSignatures>;
|
|
@@ -8,7 +8,7 @@ export interface UseTreeViewParameters<TSignatures extends readonly TreeViewAnyP
|
|
|
8
8
|
props: TProps;
|
|
9
9
|
}
|
|
10
10
|
export interface UseTreeViewBaseProps<TSignatures extends readonly TreeViewAnyPluginSignature[]> {
|
|
11
|
-
apiRef: React.
|
|
11
|
+
apiRef: React.RefObject<TreeViewPublicAPI<TSignatures> | undefined> | undefined;
|
|
12
12
|
slots: MergeSignaturesProperty<TSignatures, 'slots'>;
|
|
13
13
|
slotProps: MergeSignaturesProperty<TSignatures, 'slotProps'>;
|
|
14
14
|
experimentalFeatures: TreeViewExperimentalFeatures<TSignatures>;
|
|
@@ -8,5 +8,5 @@ export declare const useTreeViewBuildContext: <TSignatures extends readonly Tree
|
|
|
8
8
|
instance: TreeViewInstance<TSignatures>;
|
|
9
9
|
publicAPI: TreeViewPublicAPI<TSignatures>;
|
|
10
10
|
store: TreeViewStore<TSignatures>;
|
|
11
|
-
rootRef: React.RefObject<HTMLUListElement>;
|
|
11
|
+
rootRef: React.RefObject<HTMLUListElement | null>;
|
|
12
12
|
}) => TreeViewContextValue<TSignatures>;
|
package/modern/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export function createUseInstanceEventHandler(registryContainer) {
|
|
|
14
14
|
}
|
|
15
15
|
const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());
|
|
16
16
|
const subscription = React.useRef(null);
|
|
17
|
-
const handlerRef = React.useRef();
|
|
17
|
+
const handlerRef = React.useRef(undefined);
|
|
18
18
|
handlerRef.current = handler;
|
|
19
19
|
const cleanupTokenRef = React.useRef(null);
|
|
20
20
|
if (!subscription.current && handlerRef.current) {
|
package/node/index.js
CHANGED
|
@@ -22,7 +22,7 @@ function createUseInstanceEventHandler(registryContainer) {
|
|
|
22
22
|
}
|
|
23
23
|
const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());
|
|
24
24
|
const subscription = React.useRef(null);
|
|
25
|
-
const handlerRef = React.useRef();
|
|
25
|
+
const handlerRef = React.useRef(undefined);
|
|
26
26
|
handlerRef.current = handler;
|
|
27
27
|
const cleanupTokenRef = React.useRef(null);
|
|
28
28
|
if (!subscription.current && handlerRef.current) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-tree-view",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.8",
|
|
4
4
|
"description": "The community edition of the Tree View components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
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-alpha.
|
|
44
|
+
"@mui/x-internals": "8.0.0-alpha.8"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|
|
@@ -78,7 +78,7 @@ export interface UseTreeItemLabelInputSlotOwnProps {
|
|
|
78
78
|
}
|
|
79
79
|
export type UseTreeItemLabelInputSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemLabelInputSlotOwnProps;
|
|
80
80
|
export interface UseTreeItemCheckboxSlotOwnProps {
|
|
81
|
-
ref: React.RefObject<HTMLButtonElement>;
|
|
81
|
+
ref: React.RefObject<HTMLButtonElement | null>;
|
|
82
82
|
}
|
|
83
83
|
export type UseTreeItemCheckboxSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemCheckboxSlotOwnProps;
|
|
84
84
|
export interface UseTreeItemGroupTransitionSlotOwnProps {
|