@mui/x-tree-view 8.10.0 → 8.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,188 @@
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.10.2
9
+
10
+ _Aug 20, 2025_
11
+
12
+ We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🌎 Improve Finnish (fi-FI) locale on the Data Grid
15
+
16
+ Special thanks go out to the community members for their valuable contributions:
17
+ @lauri-heinonen-2025-04, @Methuselah96, @sai6855, @wilcoschoneveld
18
+
19
+ The following are all team members who have contributed to this release:
20
+ @alexfauquette, @cherniavskii, @flaviendelangle, @Janpot, @oliviertassinari, @rita-codes
21
+
22
+ ### Data Grid
23
+
24
+ #### `@mui/x-data-grid@8.10.2`
25
+
26
+ - [DataGrid] Fix display for `<GridEditSingleSelect />` when `density='compact'` (#19249) @sai6855
27
+ - [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
28
+ - [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
29
+
30
+ #### `@mui/x-data-grid-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
31
+
32
+ Same changes as in `@mui/x-data-grid@8.10.2`, plus:
33
+
34
+ - [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
35
+
36
+ #### `@mui/x-data-grid-premium@8.10.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
37
+
38
+ Same changes as in `@mui/x-data-grid-pro@8.10.2`.
39
+
40
+ ### Date and Time Pickers
41
+
42
+ #### `@mui/x-date-pickers@8.10.2`
43
+
44
+ Internal changes.
45
+
46
+ #### `@mui/x-date-pickers-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
47
+
48
+ Same changes as in `@mui/x-date-pickers@8.10.2`.
49
+
50
+ ### Charts
51
+
52
+ #### `@mui/x-charts@8.10.2`
53
+
54
+ Internal changes.
55
+
56
+ #### `@mui/x-charts-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
57
+
58
+ Same changes as in `@mui/x-charts@8.10.2`.
59
+
60
+ ### Tree View
61
+
62
+ #### `@mui/x-tree-view@8.10.2`
63
+
64
+ - [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
65
+
66
+ #### `@mui/x-tree-view-pro@8.10.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
67
+
68
+ Same changes as in `@mui/x-tree-view@8.10.2`.
69
+
70
+ ### Codemod
71
+
72
+ #### `@mui/x-codemod@8.10.2`
73
+
74
+ Internal changes.
75
+
76
+ ### Docs
77
+
78
+ - [docs] Fix links to the pyramid chart (#19250) @alexfauquette
79
+
80
+ ### Core
81
+
82
+ - [internal] Avoid script for CI only @oliviertassinari
83
+ - [internal] Fix `renovate.json` @oliviertassinari
84
+ - [internal] Polish renovate config @oliviertassinari
85
+ - [internal] Rename core to internal (#19203) @oliviertassinari
86
+ - [internal] Update link to GitHub labels @oliviertassinari
87
+
88
+ ### Miscellaneous
89
+
90
+ - [code-infra] Prepare for incoming `execa` update (#19229) @Janpot
91
+ - [virtualizer] Fix type import (#19192) @Methuselah96
92
+ - [virtualizer] Improve type export (#19192) @Methuselah96
93
+
94
+ ## 8.10.1
95
+
96
+ _Aug 15, 2025_
97
+
98
+ We'd like to extend a big thank you to the 8 contributors who made this release possible. Here are some highlights ✨:
99
+
100
+ - 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
101
+ - 📚 Documentation improvements
102
+
103
+ The following are all team members who have contributed to this release:
104
+ @alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
105
+
106
+ ### Data Grid
107
+
108
+ #### `@mui/x-data-grid@8.10.1`
109
+
110
+ - [DataGrid] Fix scroll jumping (#19156) @romgrk
111
+ - [DataGrid] Fix scroll restoration (#19182) @romgrk
112
+ - [DataGrid] Fix "no row with id" error (#19193) @romgrk
113
+
114
+ #### `@mui/x-data-grid-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
115
+
116
+ Same changes as in `@mui/x-data-grid@8.10.1`.
117
+
118
+ #### `@mui/x-data-grid-premium@8.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
119
+
120
+ Same changes as in `@mui/x-data-grid-pro@8.10.1`.
121
+
122
+ ### Date and Time Pickers
123
+
124
+ #### `@mui/x-date-pickers@8.10.0`
125
+
126
+ Internal changes.
127
+
128
+ #### `@mui/x-date-pickers-pro@8.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
129
+
130
+ Same changes as in `@mui/x-date-pickers@8.10.0`.
131
+
132
+ ### Charts
133
+
134
+ - Axes can now be grouped by category when using `band` and `point` scales
135
+
136
+ <img width="643" height="455" alt="Bar chart with y-axis grouped per categories" src="https://github.com/user-attachments/assets/59044afe-bcc5-4152-8bf1-225db0635025" />
137
+
138
+ #### `@mui/x-charts@8.10.1`
139
+
140
+ - [charts] Allow y-axis to be grouped (#19081) @JCQuintas
141
+ - [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
142
+ - [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
143
+ - [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
144
+
145
+ #### `@mui/x-charts-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
146
+
147
+ Same changes as in `@mui/x-charts@8.10.1`.
148
+
149
+ ### Tree View
150
+
151
+ #### `@mui/x-tree-view@8.10.1`
152
+
153
+ Internal changes.
154
+
155
+ #### `@mui/x-tree-view-pro@8.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
156
+
157
+ Same changes as in `@mui/x-tree-view@8.10.1`.
158
+
159
+ ### Codemod
160
+
161
+ #### `@mui/x-codemod@8.10.1`
162
+
163
+ Internal changes.
164
+
165
+ ### Docs
166
+
167
+ - [docs] Add all planned charts on the overview page (#19077) @prakhargupta1
168
+ - [docs] Add future charts components link in the sidebar (#19140) @prakhargupta1
169
+ - [docs] Fix Heatmap docs duplicate text (#19138) @JCQuintas
170
+ - [docs] Remove preview from Toolbar & Funnel (#19131) @mnajdova
171
+ - [docs] Reproduce npm sparkline (#19089) @alexfauquette
172
+
173
+ ### Core
174
+
175
+ - [core] Fix licensing model name (#19025) @oliviertassinari
176
+ - [core] Fix usage of `:catalog` for `@babel/runtime` (#19028) @oliviertassinari
177
+ - [core] Refactor virtualizer API (#18995) @romgrk
178
+
179
+ ### Miscellaneous
180
+
181
+ - [code-infra] Remove namespaces (#19071) @Janpot
182
+ - [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
183
+ - [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
184
+ - [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
185
+ - [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
186
+ - [internal] Fix writing style action name @oliviertassinari
187
+ - [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
188
+ - [support-infra] Remove default issue label (#19104) @oliviertassinari
189
+
8
190
  ## 8.10.0
9
191
 
10
192
  _Aug 8, 2025_
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.10.0
2
+ * @mui/x-tree-view v8.10.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -26,6 +26,14 @@ export function TreeViewChildrenItemProvider(props) {
26
26
  }
27
27
  const previousChildrenIds = selectorItemOrderedChildrenIds(store.value, itemId ?? null) ?? [];
28
28
  const escapedIdAttr = escapeOperandAttributeSelector(idAttribute ?? rootRef.current.id);
29
+
30
+ // If collapsed, skip childrenIds update prevents clearing the parent's indeterminate state after opening a sibling.
31
+ if (itemId != null) {
32
+ const itemRoot = rootRef.current.querySelector(`*[id="${escapedIdAttr}"][role="treeitem"]`);
33
+ if (itemRoot && itemRoot.getAttribute('aria-expanded') === 'false') {
34
+ return;
35
+ }
36
+ }
29
37
  const childrenElements = rootRef.current.querySelectorAll(`${itemId == null ? '' : `*[id="${escapedIdAttr}"] `}[role="treeitem"]:not(*[id="${escapedIdAttr}"] [role="treeitem"] [role="treeitem"])`);
30
38
  const childrenIds = Array.from(childrenElements).map(child => childrenIdAttrToIdRef.current.get(child.id));
31
39
  const hasChanged = childrenIds.length !== previousChildrenIds.length || childrenIds.some((childId, index) => childId !== previousChildrenIds[index]);
@@ -20,7 +20,7 @@ export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, UseTreeView
20
20
  export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
21
21
  export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited } from "./plugins/useTreeViewLabel/useTreeViewLabel.selectors.js";
22
22
  export type { UseTreeViewLabelSignature, UseTreeViewLabelParameters } from "./plugins/useTreeViewLabel/index.js";
23
- export { selectorIsItemExpanded } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
23
+ export { selectorIsItemExpanded, selectorExpandedItems } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
24
24
  export { selectorIsItemSelected } from "./plugins/useTreeViewSelection/useTreeViewSelection.selectors.js";
25
25
  export { selectorDataSourceState, selectorGetTreeItemError } from "./plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.js";
26
26
  export type { UseTreeViewLazyLoadingSignature } from "./plugins/useTreeViewLazyLoading/index.js";
@@ -15,7 +15,7 @@ export { useTreeViewItems, buildSiblingIndexes, TREE_VIEW_ROOT_PARENT_ID } from
15
15
  export { selectorItemMetaLookup, selectorItemMeta, selectorItemIndex, selectorItemOrderedChildrenIds } from "./plugins/useTreeViewItems/useTreeViewItems.selectors.js";
16
16
  export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
17
17
  export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited } from "./plugins/useTreeViewLabel/useTreeViewLabel.selectors.js";
18
- export { selectorIsItemExpanded } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
18
+ export { selectorIsItemExpanded, selectorExpandedItems } 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";
21
21
  export { useTreeViewJSXItems } from "./plugins/useTreeViewJSXItems/index.js";
@@ -43,6 +43,9 @@ export const useTreeViewExpansion = ({
43
43
  }
44
44
  params.onExpandedItemsChange?.(event, value);
45
45
  };
46
+ const resetItemExpansion = useEventCallback(() => {
47
+ setExpandedItems(null, []);
48
+ });
46
49
  const applyItemExpansion = useEventCallback(({
47
50
  itemId,
48
51
  event,
@@ -124,7 +127,8 @@ export const useTreeViewExpansion = ({
124
127
  instance: {
125
128
  setItemExpansion,
126
129
  applyItemExpansion,
127
- expandAllSiblings
130
+ expandAllSiblings,
131
+ resetItemExpansion
128
132
  }
129
133
  };
130
134
  };
@@ -26,7 +26,7 @@ export interface UseTreeViewExpansionInstance extends UseTreeViewExpansionPublic
26
26
  */
27
27
  expandAllSiblings: (event: React.KeyboardEvent, itemId: TreeViewItemId) => void;
28
28
  /**
29
- * APply the new expansion status of a given item.
29
+ * Apply the new expansion status of a given item.
30
30
  * Is used by the `setItemExpansion` method and by the `useTreeViewLazyLoading` plugin.
31
31
  * Unlike `setItemExpansion`, this method does not trigger the lazy loading.
32
32
  * @param {object} parameters The parameters of the method.
@@ -39,6 +39,10 @@ export interface UseTreeViewExpansionInstance extends UseTreeViewExpansionPublic
39
39
  event: React.SyntheticEvent | null;
40
40
  shouldBeExpanded: boolean;
41
41
  }) => void;
42
+ /**
43
+ * Reset the expansion state of all items.
44
+ */
45
+ resetItemExpansion: () => void;
42
46
  }
43
47
  export interface UseTreeViewExpansionParameters {
44
48
  /**
@@ -1,24 +1,22 @@
1
1
  export class TreeViewStore {
2
2
  constructor(value) {
3
- this.value = void 0;
4
- this.listeners = void 0;
5
- this.subscribe = fn => {
6
- this.listeners.add(fn);
7
- return () => {
8
- this.listeners.delete(fn);
9
- };
10
- };
11
- this.getSnapshot = () => {
12
- return this.value;
13
- };
14
- this.update = updater => {
15
- const newState = updater(this.value);
16
- if (newState !== this.value) {
17
- this.value = newState;
18
- this.listeners.forEach(l => l(newState));
19
- }
20
- };
21
3
  this.value = value;
22
4
  this.listeners = new Set();
23
5
  }
6
+ subscribe = fn => {
7
+ this.listeners.add(fn);
8
+ return () => {
9
+ this.listeners.delete(fn);
10
+ };
11
+ };
12
+ getSnapshot = () => {
13
+ return this.value;
14
+ };
15
+ update = updater => {
16
+ const newState = updater(this.value);
17
+ if (newState !== this.value) {
18
+ this.value = newState;
19
+ this.listeners.forEach(l => l(newState));
20
+ }
21
+ };
24
22
  }
@@ -1,11 +1,9 @@
1
1
  export class FinalizationRegistryBasedCleanupTracking {
2
- constructor() {
3
- this.registry = new FinalizationRegistry(unsubscribe => {
4
- if (typeof unsubscribe === 'function') {
5
- unsubscribe();
6
- }
7
- });
8
- }
2
+ registry = (() => new FinalizationRegistry(unsubscribe => {
3
+ if (typeof unsubscribe === 'function') {
4
+ unsubscribe();
5
+ }
6
+ }))();
9
7
  register(object, unsubscribe, unregisterToken) {
10
8
  this.registry.register(object, unsubscribe, unregisterToken);
11
9
  }
@@ -1,9 +1,9 @@
1
1
  // If no effect ran after this amount of time, we assume that the render was not committed by React
2
2
  const CLEANUP_TIMER_LOOP_MILLIS = 1000;
3
3
  export class TimerBasedCleanupTracking {
4
+ timeouts = (() => new Map())();
5
+ cleanupTimeout = (() => CLEANUP_TIMER_LOOP_MILLIS)();
4
6
  constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {
5
- this.timeouts = new Map();
6
- this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
7
7
  this.cleanupTimeout = timeout;
8
8
  }
9
9
  register(object, unsubscribe, unregisterToken) {
@@ -202,7 +202,8 @@ export const useTreeItem = parameters => {
202
202
  const getCheckboxProps = (externalProps = {}) => {
203
203
  const externalEventHandlers = extractEventHandlers(externalProps);
204
204
  const props = _extends({}, externalEventHandlers, {
205
- ref: checkboxRef
205
+ ref: checkboxRef,
206
+ 'aria-hidden': true
206
207
  }, externalProps);
207
208
  const enhancedCheckboxProps = propsEnhancers.checkbox?.(_extends({}, sharedPropsEnhancerParams, {
208
209
  externalEventHandlers
@@ -81,6 +81,7 @@ export interface UseTreeItemLabelInputSlotOwnProps {}
81
81
  export type UseTreeItemLabelInputSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemLabelInputSlotOwnProps;
82
82
  export interface UseTreeItemCheckboxSlotOwnProps {
83
83
  ref: React.RefObject<HTMLButtonElement | null>;
84
+ 'aria-hidden': true;
84
85
  }
85
86
  export type UseTreeItemCheckboxSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemCheckboxSlotOwnProps;
86
87
  export type UseTreeItemErrorContainerSlotProps<ExternalProps = {}> = ExternalProps & {};
@@ -2,8 +2,6 @@ export class DataSourceCacheDefault {
2
2
  constructor({
3
3
  ttl = 300_000
4
4
  }) {
5
- this.cache = void 0;
6
- this.ttl = void 0;
7
5
  this.cache = {};
8
6
  this.ttl = ttl;
9
7
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.10.0
2
+ * @mui/x-tree-view v8.10.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -34,6 +34,14 @@ function TreeViewChildrenItemProvider(props) {
34
34
  }
35
35
  const previousChildrenIds = (0, _useTreeViewItems.selectorItemOrderedChildrenIds)(store.value, itemId ?? null) ?? [];
36
36
  const escapedIdAttr = (0, _utils.escapeOperandAttributeSelector)(idAttribute ?? rootRef.current.id);
37
+
38
+ // If collapsed, skip childrenIds update prevents clearing the parent's indeterminate state after opening a sibling.
39
+ if (itemId != null) {
40
+ const itemRoot = rootRef.current.querySelector(`*[id="${escapedIdAttr}"][role="treeitem"]`);
41
+ if (itemRoot && itemRoot.getAttribute('aria-expanded') === 'false') {
42
+ return;
43
+ }
44
+ }
37
45
  const childrenElements = rootRef.current.querySelectorAll(`${itemId == null ? '' : `*[id="${escapedIdAttr}"] `}[role="treeitem"]:not(*[id="${escapedIdAttr}"] [role="treeitem"] [role="treeitem"])`);
38
46
  const childrenIds = Array.from(childrenElements).map(child => childrenIdAttrToIdRef.current.get(child.id));
39
47
  const hasChanged = childrenIds.length !== previousChildrenIds.length || childrenIds.some((childId, index) => childId !== previousChildrenIds[index]);
@@ -20,7 +20,7 @@ export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, UseTreeView
20
20
  export { useTreeViewLabel } from "./plugins/useTreeViewLabel/index.js";
21
21
  export { selectorIsItemBeingEdited, selectorIsAnyItemBeingEdited } from "./plugins/useTreeViewLabel/useTreeViewLabel.selectors.js";
22
22
  export type { UseTreeViewLabelSignature, UseTreeViewLabelParameters } from "./plugins/useTreeViewLabel/index.js";
23
- export { selectorIsItemExpanded } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
23
+ export { selectorIsItemExpanded, selectorExpandedItems } from "./plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.js";
24
24
  export { selectorIsItemSelected } from "./plugins/useTreeViewSelection/useTreeViewSelection.selectors.js";
25
25
  export { selectorDataSourceState, selectorGetTreeItemError } from "./plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.js";
26
26
  export type { UseTreeViewLazyLoadingSignature } from "./plugins/useTreeViewLazyLoading/index.js";
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "selectorDataSourceState", {
51
51
  return _useTreeViewLazyLoading.selectorDataSourceState;
52
52
  }
53
53
  });
54
+ Object.defineProperty(exports, "selectorExpandedItems", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _useTreeViewExpansion2.selectorExpandedItems;
58
+ }
59
+ });
54
60
  Object.defineProperty(exports, "selectorGetTreeItemError", {
55
61
  enumerable: true,
56
62
  get: function () {
@@ -50,6 +50,9 @@ const useTreeViewExpansion = ({
50
50
  }
51
51
  params.onExpandedItemsChange?.(event, value);
52
52
  };
53
+ const resetItemExpansion = (0, _useEventCallback.default)(() => {
54
+ setExpandedItems(null, []);
55
+ });
53
56
  const applyItemExpansion = (0, _useEventCallback.default)(({
54
57
  itemId,
55
58
  event,
@@ -131,7 +134,8 @@ const useTreeViewExpansion = ({
131
134
  instance: {
132
135
  setItemExpansion,
133
136
  applyItemExpansion,
134
- expandAllSiblings
137
+ expandAllSiblings,
138
+ resetItemExpansion
135
139
  }
136
140
  };
137
141
  };
@@ -26,7 +26,7 @@ export interface UseTreeViewExpansionInstance extends UseTreeViewExpansionPublic
26
26
  */
27
27
  expandAllSiblings: (event: React.KeyboardEvent, itemId: TreeViewItemId) => void;
28
28
  /**
29
- * APply the new expansion status of a given item.
29
+ * Apply the new expansion status of a given item.
30
30
  * Is used by the `setItemExpansion` method and by the `useTreeViewLazyLoading` plugin.
31
31
  * Unlike `setItemExpansion`, this method does not trigger the lazy loading.
32
32
  * @param {object} parameters The parameters of the method.
@@ -39,6 +39,10 @@ export interface UseTreeViewExpansionInstance extends UseTreeViewExpansionPublic
39
39
  event: React.SyntheticEvent | null;
40
40
  shouldBeExpanded: boolean;
41
41
  }) => void;
42
+ /**
43
+ * Reset the expansion state of all items.
44
+ */
45
+ resetItemExpansion: () => void;
42
46
  }
43
47
  export interface UseTreeViewExpansionParameters {
44
48
  /**
@@ -6,26 +6,24 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TreeViewStore = void 0;
7
7
  class TreeViewStore {
8
8
  constructor(value) {
9
- this.value = void 0;
10
- this.listeners = void 0;
11
- this.subscribe = fn => {
12
- this.listeners.add(fn);
13
- return () => {
14
- this.listeners.delete(fn);
15
- };
16
- };
17
- this.getSnapshot = () => {
18
- return this.value;
19
- };
20
- this.update = updater => {
21
- const newState = updater(this.value);
22
- if (newState !== this.value) {
23
- this.value = newState;
24
- this.listeners.forEach(l => l(newState));
25
- }
26
- };
27
9
  this.value = value;
28
10
  this.listeners = new Set();
29
11
  }
12
+ subscribe = fn => {
13
+ this.listeners.add(fn);
14
+ return () => {
15
+ this.listeners.delete(fn);
16
+ };
17
+ };
18
+ getSnapshot = () => {
19
+ return this.value;
20
+ };
21
+ update = updater => {
22
+ const newState = updater(this.value);
23
+ if (newState !== this.value) {
24
+ this.value = newState;
25
+ this.listeners.forEach(l => l(newState));
26
+ }
27
+ };
30
28
  }
31
29
  exports.TreeViewStore = TreeViewStore;
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.FinalizationRegistryBasedCleanupTracking = void 0;
7
7
  class FinalizationRegistryBasedCleanupTracking {
8
- constructor() {
9
- this.registry = new FinalizationRegistry(unsubscribe => {
10
- if (typeof unsubscribe === 'function') {
11
- unsubscribe();
12
- }
13
- });
14
- }
8
+ registry = new FinalizationRegistry(unsubscribe => {
9
+ if (typeof unsubscribe === 'function') {
10
+ unsubscribe();
11
+ }
12
+ });
15
13
  register(object, unsubscribe, unregisterToken) {
16
14
  this.registry.register(object, unsubscribe, unregisterToken);
17
15
  }
@@ -7,9 +7,9 @@ exports.TimerBasedCleanupTracking = void 0;
7
7
  // If no effect ran after this amount of time, we assume that the render was not committed by React
8
8
  const CLEANUP_TIMER_LOOP_MILLIS = 1000;
9
9
  class TimerBasedCleanupTracking {
10
+ timeouts = new Map();
11
+ cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
10
12
  constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {
11
- this.timeouts = new Map();
12
- this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
13
13
  this.cleanupTimeout = timeout;
14
14
  }
15
15
  register(object, unsubscribe, unregisterToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-tree-view",
3
- "version": "8.10.0",
3
+ "version": "8.10.2",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of the MUI X Tree View components.",
6
6
  "main": "./index.js",
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.28.2",
36
- "@mui/utils": "^7.2.0",
36
+ "@mui/utils": "^7.3.1",
37
37
  "@types/react-transition-group": "^4.4.12",
38
38
  "clsx": "^2.1.1",
39
39
  "prop-types": "^15.8.1",
40
40
  "react-transition-group": "^4.4.5",
41
41
  "reselect": "^5.1.1",
42
42
  "use-sync-external-store": "^1.5.0",
43
- "@mui/x-internals": "8.10.0"
43
+ "@mui/x-internals": "8.10.2"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@emotion/react": "^11.9.0",
@@ -61,31 +61,30 @@
61
61
  "engines": {
62
62
  "node": ">=14.0.0"
63
63
  },
64
- "private": false,
64
+ "type": "commonjs",
65
+ "types": "./index.d.ts",
65
66
  "exports": {
66
67
  "./package.json": "./package.json",
67
68
  ".": {
68
- "require": {
69
- "types": "./index.d.ts",
70
- "default": "./index.js"
71
- },
72
69
  "import": {
73
70
  "types": "./esm/index.d.ts",
74
71
  "default": "./esm/index.js"
72
+ },
73
+ "require": {
74
+ "types": "./index.d.ts",
75
+ "default": "./index.js"
75
76
  }
76
77
  },
77
78
  "./*": {
78
- "require": {
79
- "types": "./*/index.d.ts",
80
- "default": "./*/index.js"
81
- },
82
79
  "import": {
83
80
  "types": "./esm/*/index.d.ts",
84
81
  "default": "./esm/*/index.js"
82
+ },
83
+ "require": {
84
+ "types": "./*/index.d.ts",
85
+ "default": "./*/index.js"
85
86
  }
86
87
  },
87
- "./esm": null,
88
- "./modern": null
89
- },
90
- "types": "./index.d.ts"
88
+ "./esm": null
89
+ }
91
90
  }
@@ -209,7 +209,8 @@ const useTreeItem = parameters => {
209
209
  const getCheckboxProps = (externalProps = {}) => {
210
210
  const externalEventHandlers = (0, _extractEventHandlers.default)(externalProps);
211
211
  const props = (0, _extends2.default)({}, externalEventHandlers, {
212
- ref: checkboxRef
212
+ ref: checkboxRef,
213
+ 'aria-hidden': true
213
214
  }, externalProps);
214
215
  const enhancedCheckboxProps = propsEnhancers.checkbox?.((0, _extends2.default)({}, sharedPropsEnhancerParams, {
215
216
  externalEventHandlers
@@ -81,6 +81,7 @@ export interface UseTreeItemLabelInputSlotOwnProps {}
81
81
  export type UseTreeItemLabelInputSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemLabelInputSlotOwnProps;
82
82
  export interface UseTreeItemCheckboxSlotOwnProps {
83
83
  ref: React.RefObject<HTMLButtonElement | null>;
84
+ 'aria-hidden': true;
84
85
  }
85
86
  export type UseTreeItemCheckboxSlotProps<ExternalProps = {}> = ExternalProps & UseTreeItemCheckboxSlotOwnProps;
86
87
  export type UseTreeItemErrorContainerSlotProps<ExternalProps = {}> = ExternalProps & {};
package/utils/cache.js CHANGED
@@ -8,8 +8,6 @@ class DataSourceCacheDefault {
8
8
  constructor({
9
9
  ttl = 300_000
10
10
  }) {
11
- this.cache = void 0;
12
- this.ttl = void 0;
13
11
  this.cache = {};
14
12
  this.ttl = ttl;
15
13
  }