@mui/x-tree-view 8.1.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +233 -7
  2. package/RichTreeView/RichTreeView.js +0 -6
  3. package/RichTreeView/RichTreeView.plugins.d.ts +1 -1
  4. package/RichTreeView/RichTreeView.types.d.ts +1 -7
  5. package/RichTreeView/index.d.ts +2 -2
  6. package/SimpleTreeView/SimpleTreeView.js +0 -6
  7. package/SimpleTreeView/SimpleTreeView.plugins.d.ts +1 -1
  8. package/SimpleTreeView/SimpleTreeView.types.d.ts +1 -7
  9. package/SimpleTreeView/index.d.ts +1 -1
  10. package/TreeItem/index.d.ts +2 -2
  11. package/TreeItemDragAndDropOverlay/index.d.ts +1 -1
  12. package/TreeItemIcon/index.d.ts +1 -1
  13. package/TreeItemLabelInput/index.d.ts +1 -1
  14. package/TreeItemProvider/index.d.ts +1 -1
  15. package/esm/RichTreeView/RichTreeView.js +0 -6
  16. package/esm/RichTreeView/RichTreeView.plugins.d.ts +1 -1
  17. package/esm/RichTreeView/RichTreeView.types.d.ts +1 -7
  18. package/esm/RichTreeView/index.d.ts +2 -2
  19. package/esm/SimpleTreeView/SimpleTreeView.js +0 -6
  20. package/esm/SimpleTreeView/SimpleTreeView.plugins.d.ts +1 -1
  21. package/esm/SimpleTreeView/SimpleTreeView.types.d.ts +1 -7
  22. package/esm/SimpleTreeView/index.d.ts +1 -1
  23. package/esm/TreeItem/index.d.ts +2 -2
  24. package/esm/TreeItemDragAndDropOverlay/index.d.ts +1 -1
  25. package/esm/TreeItemIcon/index.d.ts +1 -1
  26. package/esm/TreeItemLabelInput/index.d.ts +1 -1
  27. package/esm/TreeItemProvider/index.d.ts +1 -1
  28. package/esm/hooks/useTreeItemUtils/useTreeItemUtils.d.ts +6 -6
  29. package/esm/index.js +1 -1
  30. package/esm/internals/TreeViewItemDepthContext/TreeViewItemDepthContext.d.ts +1 -1
  31. package/esm/internals/TreeViewProvider/TreeViewProvider.types.d.ts +1 -1
  32. package/esm/internals/TreeViewProvider/index.d.ts +1 -1
  33. package/esm/internals/corePlugins/corePlugins.d.ts +1 -1
  34. package/esm/internals/corePlugins/index.d.ts +1 -1
  35. package/esm/internals/corePlugins/useTreeViewId/index.d.ts +1 -1
  36. package/esm/internals/corePlugins/useTreeViewId/useTreeViewId.selectors.d.ts +2 -2
  37. package/esm/internals/corePlugins/useTreeViewId/useTreeViewId.types.d.ts +2 -2
  38. package/esm/internals/corePlugins/useTreeViewInstanceEvents/index.d.ts +1 -1
  39. package/esm/internals/corePlugins/useTreeViewInstanceEvents/useTreeViewInstanceEvents.d.ts +1 -1
  40. package/esm/internals/corePlugins/useTreeViewOptionalPlugins/index.d.ts +1 -1
  41. package/esm/internals/index.d.ts +14 -14
  42. package/esm/internals/index.js +1 -1
  43. package/esm/internals/models/helpers.d.ts +1 -1
  44. package/esm/internals/models/itemPlugin.d.ts +3 -3
  45. package/esm/internals/models/plugin.d.ts +15 -24
  46. package/esm/internals/models/treeView.d.ts +3 -4
  47. package/esm/internals/plugins/useTreeViewExpansion/index.d.ts +1 -1
  48. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +4 -3
  49. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.d.ts +31 -31
  50. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +2 -2
  51. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.d.ts +2 -2
  52. package/esm/internals/plugins/useTreeViewFocus/index.d.ts +1 -1
  53. package/esm/internals/plugins/useTreeViewFocus/useTreeViewFocus.selectors.d.ts +72 -72
  54. package/esm/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +4 -4
  55. package/esm/internals/plugins/useTreeViewItems/index.d.ts +1 -1
  56. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.js +1 -1
  57. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.d.ts +54 -54
  58. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +2 -2
  59. package/esm/internals/plugins/useTreeViewJSXItems/index.d.ts +1 -1
  60. package/esm/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.types.d.ts +2 -2
  61. package/esm/internals/plugins/useTreeViewKeyboardNavigation/index.d.ts +1 -1
  62. package/esm/internals/plugins/useTreeViewLabel/index.d.ts +1 -1
  63. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
  64. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.selectors.d.ts +5 -5
  65. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -2
  66. package/esm/internals/plugins/useTreeViewLazyLoading/index.d.ts +1 -1
  67. package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.d.ts +56 -56
  68. package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +2 -3
  69. package/esm/internals/plugins/useTreeViewSelection/index.d.ts +1 -1
  70. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +4 -3
  71. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.selectors.d.ts +71 -71
  72. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +3 -3
  73. package/esm/internals/useTreeView/{extractPluginParamsFromProps.d.ts → useExtractPluginParamsFromProps.d.ts} +8 -9
  74. package/esm/internals/useTreeView/useExtractPluginParamsFromProps.js +51 -0
  75. package/esm/internals/useTreeView/useTreeView.js +3 -5
  76. package/esm/internals/useTreeView/useTreeView.types.d.ts +2 -3
  77. package/esm/internals/useTreeView/useTreeViewBuildContext.d.ts +4 -8
  78. package/esm/internals/useTreeView/useTreeViewBuildContext.js +8 -7
  79. package/esm/internals/utils/TreeViewStore.d.ts +1 -1
  80. package/esm/internals/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
  81. package/esm/internals/utils/tree.d.ts +2 -2
  82. package/esm/internals/utils/tree.js +1 -1
  83. package/esm/themeAugmentation/components.js +1 -0
  84. package/esm/themeAugmentation/index.d.ts +3 -3
  85. package/esm/themeAugmentation/overrides.d.ts +0 -4
  86. package/esm/themeAugmentation/overrides.js +4 -0
  87. package/esm/themeAugmentation/props.d.ts +0 -2
  88. package/esm/themeAugmentation/props.js +2 -0
  89. package/esm/useTreeItem/index.d.ts +1 -1
  90. package/hooks/useTreeItemUtils/useTreeItemUtils.d.ts +6 -6
  91. package/index.js +1 -1
  92. package/internals/TreeViewItemDepthContext/TreeViewItemDepthContext.d.ts +1 -1
  93. package/internals/TreeViewProvider/TreeViewProvider.types.d.ts +1 -1
  94. package/internals/TreeViewProvider/index.d.ts +1 -1
  95. package/internals/corePlugins/corePlugins.d.ts +1 -1
  96. package/internals/corePlugins/index.d.ts +1 -1
  97. package/internals/corePlugins/useTreeViewId/index.d.ts +1 -1
  98. package/internals/corePlugins/useTreeViewId/useTreeViewId.selectors.d.ts +2 -2
  99. package/internals/corePlugins/useTreeViewId/useTreeViewId.types.d.ts +2 -2
  100. package/internals/corePlugins/useTreeViewInstanceEvents/index.d.ts +1 -1
  101. package/internals/corePlugins/useTreeViewInstanceEvents/useTreeViewInstanceEvents.d.ts +1 -1
  102. package/internals/corePlugins/useTreeViewOptionalPlugins/index.d.ts +1 -1
  103. package/internals/index.d.ts +14 -14
  104. package/internals/index.js +1 -1
  105. package/internals/models/helpers.d.ts +1 -1
  106. package/internals/models/itemPlugin.d.ts +3 -3
  107. package/internals/models/plugin.d.ts +15 -24
  108. package/internals/models/treeView.d.ts +3 -4
  109. package/internals/plugins/useTreeViewExpansion/index.d.ts +1 -1
  110. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +5 -4
  111. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.selectors.d.ts +31 -31
  112. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.d.ts +2 -2
  113. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.utils.d.ts +2 -2
  114. package/internals/plugins/useTreeViewFocus/index.d.ts +1 -1
  115. package/internals/plugins/useTreeViewFocus/useTreeViewFocus.selectors.d.ts +72 -72
  116. package/internals/plugins/useTreeViewFocus/useTreeViewFocus.types.d.ts +4 -4
  117. package/internals/plugins/useTreeViewItems/index.d.ts +1 -1
  118. package/internals/plugins/useTreeViewItems/useTreeViewItems.js +1 -1
  119. package/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.d.ts +54 -54
  120. package/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +2 -2
  121. package/internals/plugins/useTreeViewJSXItems/index.d.ts +1 -1
  122. package/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.types.d.ts +2 -2
  123. package/internals/plugins/useTreeViewKeyboardNavigation/index.d.ts +1 -1
  124. package/internals/plugins/useTreeViewLabel/index.d.ts +1 -1
  125. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +1 -1
  126. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.selectors.d.ts +5 -5
  127. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.types.d.ts +2 -2
  128. package/internals/plugins/useTreeViewLazyLoading/index.d.ts +1 -1
  129. package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.d.ts +56 -56
  130. package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +2 -3
  131. package/internals/plugins/useTreeViewSelection/index.d.ts +1 -1
  132. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +5 -4
  133. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.selectors.d.ts +71 -71
  134. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.types.d.ts +3 -3
  135. package/internals/useTreeView/{extractPluginParamsFromProps.d.ts → useExtractPluginParamsFromProps.d.ts} +8 -9
  136. package/internals/useTreeView/useExtractPluginParamsFromProps.js +60 -0
  137. package/internals/useTreeView/useTreeView.js +3 -5
  138. package/internals/useTreeView/useTreeView.types.d.ts +2 -3
  139. package/internals/useTreeView/useTreeViewBuildContext.d.ts +4 -8
  140. package/internals/useTreeView/useTreeViewBuildContext.js +8 -7
  141. package/internals/utils/TreeViewStore.d.ts +1 -1
  142. package/internals/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
  143. package/internals/utils/tree.d.ts +2 -2
  144. package/internals/utils/tree.js +1 -1
  145. package/package.json +4 -4
  146. package/themeAugmentation/components.js +5 -0
  147. package/themeAugmentation/index.d.ts +3 -3
  148. package/themeAugmentation/overrides.d.ts +0 -4
  149. package/themeAugmentation/overrides.js +5 -0
  150. package/themeAugmentation/props.d.ts +0 -2
  151. package/themeAugmentation/props.js +5 -0
  152. package/useTreeItem/index.d.ts +1 -1
  153. package/esm/internals/useTreeView/extractPluginParamsFromProps.js +0 -42
  154. package/esm/internals/useTreeView/useTreeViewPlugins.d.ts +0 -0
  155. package/esm/internals/useTreeView/useTreeViewPlugins.js +0 -0
  156. package/esm/internals/utils/models.d.ts +0 -7
  157. package/esm/internals/utils/models.js +0 -23
  158. package/internals/useTreeView/extractPluginParamsFromProps.js +0 -50
  159. package/internals/useTreeView/useTreeViewPlugins.d.ts +0 -0
  160. package/internals/useTreeView/useTreeViewPlugins.js +0 -1
  161. package/internals/utils/models.d.ts +0 -7
  162. package/internals/utils/models.js +0 -30
@@ -5,26 +5,26 @@ import { UseTreeViewSelectionSignature } from "./useTreeViewSelection.types.js";
5
5
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
6
6
  * @returns {TreeViewSelectionValue<boolean>} The selected items.
7
7
  */
8
- export declare const selectorSelectionModel: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
9
- cacheKey: import("../../models").TreeViewStateCacheKey;
8
+ export declare const selectorSelectionModel: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
9
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
10
10
  }) => string | string[] | null) & {
11
11
  clearCache: () => void;
12
12
  resultsCount: () => number;
13
13
  resetResultsCount: () => void;
14
14
  } & {
15
15
  resultFunc: (resultFuncArgs_0: {
16
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
16
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
17
17
  isEnabled: boolean;
18
18
  isMultiSelectEnabled: boolean;
19
19
  isCheckboxSelectionEnabled: boolean;
20
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
20
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
21
21
  }) => string | string[] | null;
22
22
  memoizedResultFunc: ((resultFuncArgs_0: {
23
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
23
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
24
24
  isEnabled: boolean;
25
25
  isMultiSelectEnabled: boolean;
26
26
  isCheckboxSelectionEnabled: boolean;
27
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
27
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
28
28
  }) => string | string[] | null) & {
29
29
  clearCache: () => void;
30
30
  resultsCount: () => number;
@@ -45,8 +45,8 @@ export declare const selectorSelectionModel: ((state: import("../../corePlugins/
45
45
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
46
46
  * @returns {TreeViewItemId[]} The selected items as an array.
47
47
  */
48
- export declare const selectorSelectionModelArray: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
49
- cacheKey: import("../../models").TreeViewStateCacheKey;
48
+ export declare const selectorSelectionModelArray: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
49
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
50
50
  }) => string[]) & {
51
51
  clearCache: () => void;
52
52
  resultsCount: () => number;
@@ -59,26 +59,26 @@ export declare const selectorSelectionModelArray: ((state: import("../../corePlu
59
59
  resetResultsCount: () => void;
60
60
  };
61
61
  lastResult: () => string[];
62
- dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
63
- cacheKey: import("../../models").TreeViewStateCacheKey;
62
+ dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
63
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
64
64
  }) => string | string[] | null) & {
65
65
  clearCache: () => void;
66
66
  resultsCount: () => number;
67
67
  resetResultsCount: () => void;
68
68
  } & {
69
69
  resultFunc: (resultFuncArgs_0: {
70
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
70
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
71
71
  isEnabled: boolean;
72
72
  isMultiSelectEnabled: boolean;
73
73
  isCheckboxSelectionEnabled: boolean;
74
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
74
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
75
75
  }) => string | string[] | null;
76
76
  memoizedResultFunc: ((resultFuncArgs_0: {
77
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
77
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
78
78
  isEnabled: boolean;
79
79
  isMultiSelectEnabled: boolean;
80
80
  isCheckboxSelectionEnabled: boolean;
81
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
81
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
82
82
  }) => string | string[] | null) & {
83
83
  clearCache: () => void;
84
84
  resultsCount: () => number;
@@ -119,8 +119,8 @@ export declare const selectorIsItemSelected: ((state: any, itemId: string) => bo
119
119
  resetResultsCount: () => void;
120
120
  };
121
121
  lastResult: () => boolean;
122
- dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
123
- cacheKey: import("../../models").TreeViewStateCacheKey;
122
+ dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
123
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
124
124
  }) => Map<string, true>) & {
125
125
  clearCache: () => void;
126
126
  resultsCount: () => number;
@@ -133,8 +133,8 @@ export declare const selectorIsItemSelected: ((state: any, itemId: string) => bo
133
133
  resetResultsCount: () => void;
134
134
  };
135
135
  lastResult: () => Map<string, true>;
136
- dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
137
- cacheKey: import("../../models").TreeViewStateCacheKey;
136
+ dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
137
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
138
138
  }) => string[]) & {
139
139
  clearCache: () => void;
140
140
  resultsCount: () => number;
@@ -147,26 +147,26 @@ export declare const selectorIsItemSelected: ((state: any, itemId: string) => bo
147
147
  resetResultsCount: () => void;
148
148
  };
149
149
  lastResult: () => string[];
150
- dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
151
- cacheKey: import("../../models").TreeViewStateCacheKey;
150
+ dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
151
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
152
152
  }) => string | string[] | null) & {
153
153
  clearCache: () => void;
154
154
  resultsCount: () => number;
155
155
  resetResultsCount: () => void;
156
156
  } & {
157
157
  resultFunc: (resultFuncArgs_0: {
158
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
158
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
159
159
  isEnabled: boolean;
160
160
  isMultiSelectEnabled: boolean;
161
161
  isCheckboxSelectionEnabled: boolean;
162
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
162
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
163
163
  }) => string | string[] | null;
164
164
  memoizedResultFunc: ((resultFuncArgs_0: {
165
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
165
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
166
166
  isEnabled: boolean;
167
167
  isMultiSelectEnabled: boolean;
168
168
  isCheckboxSelectionEnabled: boolean;
169
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
169
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
170
170
  }) => string | string[] | null) & {
171
171
  clearCache: () => void;
172
172
  resultsCount: () => number;
@@ -211,26 +211,26 @@ export declare const selectorIsItemSelected: ((state: any, itemId: string) => bo
211
211
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
212
212
  * @returns {boolean} `true` if multi selection is enabled, `false` otherwise.
213
213
  */
214
- export declare const selectorIsMultiSelectEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
215
- cacheKey: import("../../models").TreeViewStateCacheKey;
214
+ export declare const selectorIsMultiSelectEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
215
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
216
216
  }) => boolean) & {
217
217
  clearCache: () => void;
218
218
  resultsCount: () => number;
219
219
  resetResultsCount: () => void;
220
220
  } & {
221
221
  resultFunc: (resultFuncArgs_0: {
222
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
222
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
223
223
  isEnabled: boolean;
224
224
  isMultiSelectEnabled: boolean;
225
225
  isCheckboxSelectionEnabled: boolean;
226
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
226
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
227
227
  }) => boolean;
228
228
  memoizedResultFunc: ((resultFuncArgs_0: {
229
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
229
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
230
230
  isEnabled: boolean;
231
231
  isMultiSelectEnabled: boolean;
232
232
  isCheckboxSelectionEnabled: boolean;
233
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
233
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
234
234
  }) => boolean) & {
235
235
  clearCache: () => void;
236
236
  resultsCount: () => number;
@@ -251,26 +251,26 @@ export declare const selectorIsMultiSelectEnabled: ((state: import("../../corePl
251
251
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
252
252
  * @returns {boolean} `true` if selection is enabled, `false` otherwise.
253
253
  */
254
- export declare const selectorIsSelectionEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
255
- cacheKey: import("../../models").TreeViewStateCacheKey;
254
+ export declare const selectorIsSelectionEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
255
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
256
256
  }) => boolean) & {
257
257
  clearCache: () => void;
258
258
  resultsCount: () => number;
259
259
  resetResultsCount: () => void;
260
260
  } & {
261
261
  resultFunc: (resultFuncArgs_0: {
262
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
262
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
263
263
  isEnabled: boolean;
264
264
  isMultiSelectEnabled: boolean;
265
265
  isCheckboxSelectionEnabled: boolean;
266
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
266
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
267
267
  }) => boolean;
268
268
  memoizedResultFunc: ((resultFuncArgs_0: {
269
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
269
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
270
270
  isEnabled: boolean;
271
271
  isMultiSelectEnabled: boolean;
272
272
  isCheckboxSelectionEnabled: boolean;
273
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
273
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
274
274
  }) => boolean) & {
275
275
  clearCache: () => void;
276
276
  resultsCount: () => number;
@@ -291,26 +291,26 @@ export declare const selectorIsSelectionEnabled: ((state: import("../../corePlug
291
291
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
292
292
  * @returns {boolean} `true` if checkbox selection is enabled, `false` otherwise.
293
293
  */
294
- export declare const selectorIsCheckboxSelectionEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
295
- cacheKey: import("../../models").TreeViewStateCacheKey;
294
+ export declare const selectorIsCheckboxSelectionEnabled: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
295
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
296
296
  }) => boolean) & {
297
297
  clearCache: () => void;
298
298
  resultsCount: () => number;
299
299
  resetResultsCount: () => void;
300
300
  } & {
301
301
  resultFunc: (resultFuncArgs_0: {
302
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
302
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
303
303
  isEnabled: boolean;
304
304
  isMultiSelectEnabled: boolean;
305
305
  isCheckboxSelectionEnabled: boolean;
306
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
306
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
307
307
  }) => boolean;
308
308
  memoizedResultFunc: ((resultFuncArgs_0: {
309
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
309
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
310
310
  isEnabled: boolean;
311
311
  isMultiSelectEnabled: boolean;
312
312
  isCheckboxSelectionEnabled: boolean;
313
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
313
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
314
314
  }) => boolean) & {
315
315
  clearCache: () => void;
316
316
  resultsCount: () => number;
@@ -350,20 +350,20 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
350
350
  resetResultsCount: () => void;
351
351
  } & {
352
352
  resultFunc: (resultFuncArgs_0: {
353
- [itemId: string]: import("../..").TreeViewItemMeta;
353
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
354
354
  }, resultFuncArgs_1: string) => boolean;
355
355
  memoizedResultFunc: ((resultFuncArgs_0: {
356
- [itemId: string]: import("../..").TreeViewItemMeta;
356
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
357
357
  }, resultFuncArgs_1: string) => boolean) & {
358
358
  clearCache: () => void;
359
359
  resultsCount: () => number;
360
360
  resetResultsCount: () => void;
361
361
  };
362
362
  lastResult: () => boolean;
363
- dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("../useTreeViewItems").UseTreeViewItemsState<import("../../..").TreeViewDefaultItemModelProperties> & Partial<{}> & {
364
- cacheKey: import("../../models").TreeViewStateCacheKey;
363
+ dependencies: [((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("../useTreeViewItems/index.js").UseTreeViewItemsState<import("../../../index.js").TreeViewDefaultItemModelProperties> & Partial<{}> & {
364
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
365
365
  }) => {
366
- [itemId: string]: import("../..").TreeViewItemMeta;
366
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
367
367
  }) & {
368
368
  clearCache: () => void;
369
369
  resultsCount: () => number;
@@ -372,10 +372,10 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
372
372
  resultFunc: (resultFuncArgs_0: {
373
373
  disabledItemsFocusable: boolean;
374
374
  itemModelLookup: {
375
- [itemId: string]: import("../../..").TreeViewBaseItem<import("../../..").TreeViewDefaultItemModelProperties>;
375
+ [itemId: string]: import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>;
376
376
  };
377
377
  itemMetaLookup: {
378
- [itemId: string]: import("../..").TreeViewItemMeta;
378
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
379
379
  };
380
380
  itemOrderedChildrenIdsLookup: {
381
381
  [parentItemId: string]: string[];
@@ -388,15 +388,15 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
388
388
  loading: boolean;
389
389
  error: Error | null;
390
390
  }) => {
391
- [itemId: string]: import("../..").TreeViewItemMeta;
391
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
392
392
  };
393
393
  memoizedResultFunc: ((resultFuncArgs_0: {
394
394
  disabledItemsFocusable: boolean;
395
395
  itemModelLookup: {
396
- [itemId: string]: import("../../..").TreeViewBaseItem<import("../../..").TreeViewDefaultItemModelProperties>;
396
+ [itemId: string]: import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>;
397
397
  };
398
398
  itemMetaLookup: {
399
- [itemId: string]: import("../..").TreeViewItemMeta;
399
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
400
400
  };
401
401
  itemOrderedChildrenIdsLookup: {
402
402
  [parentItemId: string]: string[];
@@ -409,16 +409,16 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
409
409
  loading: boolean;
410
410
  error: Error | null;
411
411
  }) => {
412
- [itemId: string]: import("../..").TreeViewItemMeta;
412
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
413
413
  }) & {
414
414
  clearCache: () => void;
415
415
  resultsCount: () => number;
416
416
  resetResultsCount: () => void;
417
417
  };
418
418
  lastResult: () => {
419
- [itemId: string]: import("../..").TreeViewItemMeta;
419
+ [itemId: string]: import("../../index.js").TreeViewItemMeta;
420
420
  };
421
- dependencies: [TreeViewRootSelector<import("../useTreeViewItems").UseTreeViewItemsSignature>];
421
+ dependencies: [TreeViewRootSelector<import("../useTreeViewItems/index.js").UseTreeViewItemsSignature>];
422
422
  recomputations: () => number;
423
423
  resetRecomputations: () => void;
424
424
  dependencyRecomputations: () => number;
@@ -434,26 +434,26 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
434
434
  } & {
435
435
  argsMemoize: typeof import("reselect").weakMapMemoize;
436
436
  memoize: typeof import("reselect").weakMapMemoize;
437
- }, ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
438
- cacheKey: import("../../models").TreeViewStateCacheKey;
437
+ }, ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
438
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
439
439
  }) => boolean) & {
440
440
  clearCache: () => void;
441
441
  resultsCount: () => number;
442
442
  resetResultsCount: () => void;
443
443
  } & {
444
444
  resultFunc: (resultFuncArgs_0: {
445
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
445
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
446
446
  isEnabled: boolean;
447
447
  isMultiSelectEnabled: boolean;
448
448
  isCheckboxSelectionEnabled: boolean;
449
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
449
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
450
450
  }) => boolean;
451
451
  memoizedResultFunc: ((resultFuncArgs_0: {
452
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
452
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
453
453
  isEnabled: boolean;
454
454
  isMultiSelectEnabled: boolean;
455
455
  isCheckboxSelectionEnabled: boolean;
456
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
456
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
457
457
  }) => boolean) & {
458
458
  clearCache: () => void;
459
459
  resultsCount: () => number;
@@ -482,32 +482,32 @@ export declare const selectorIsItemSelectionEnabled: ((state: any, itemId: strin
482
482
  * @param {TreeViewState<[UseTreeViewSelectionSignature]>} state The state of the tree view.
483
483
  * @returns {TreeViewSelectionPropagation} The selection propagation rules.
484
484
  */
485
- export declare const selectorSelectionPropagationRules: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types").UseTreeViewIdState & import("./useTreeViewSelection.types").UseTreeViewSelectionState & Partial<{}> & {
486
- cacheKey: import("../../models").TreeViewStateCacheKey;
487
- }) => import("../../..").TreeViewSelectionPropagation) & {
485
+ export declare const selectorSelectionPropagationRules: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & import("./useTreeViewSelection.types.js").UseTreeViewSelectionState & Partial<{}> & {
486
+ cacheKey: import("../../models/index.js").TreeViewStateCacheKey;
487
+ }) => import("../../../index.js").TreeViewSelectionPropagation) & {
488
488
  clearCache: () => void;
489
489
  resultsCount: () => number;
490
490
  resetResultsCount: () => void;
491
491
  } & {
492
492
  resultFunc: (resultFuncArgs_0: {
493
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
493
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
494
494
  isEnabled: boolean;
495
495
  isMultiSelectEnabled: boolean;
496
496
  isCheckboxSelectionEnabled: boolean;
497
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
498
- }) => import("../../..").TreeViewSelectionPropagation;
497
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
498
+ }) => import("../../../index.js").TreeViewSelectionPropagation;
499
499
  memoizedResultFunc: ((resultFuncArgs_0: {
500
- selectedItems: import("./useTreeViewSelection.types").TreeViewSelectionValue<boolean>;
500
+ selectedItems: import("./useTreeViewSelection.types.js").TreeViewSelectionValue<boolean>;
501
501
  isEnabled: boolean;
502
502
  isMultiSelectEnabled: boolean;
503
503
  isCheckboxSelectionEnabled: boolean;
504
- selectionPropagation: import("../../..").TreeViewSelectionPropagation;
505
- }) => import("../../..").TreeViewSelectionPropagation) & {
504
+ selectionPropagation: import("../../../index.js").TreeViewSelectionPropagation;
505
+ }) => import("../../../index.js").TreeViewSelectionPropagation) & {
506
506
  clearCache: () => void;
507
507
  resultsCount: () => number;
508
508
  resetResultsCount: () => void;
509
509
  };
510
- lastResult: () => import("../../..").TreeViewSelectionPropagation;
510
+ lastResult: () => import("../../../index.js").TreeViewSelectionPropagation;
511
511
  dependencies: [TreeViewRootSelector<UseTreeViewSelectionSignature>];
512
512
  recomputations: () => number;
513
513
  resetRecomputations: () => void;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { DefaultizedProps } from '@mui/x-internals/types';
3
- import type { TreeViewPluginSignature } from '../../models';
3
+ import type { TreeViewPluginSignature } from "../../models/index.js";
4
4
  import { UseTreeViewItemsSignature } from "../useTreeViewItems/index.js";
5
5
  import { UseTreeViewExpansionSignature } from "../useTreeViewExpansion/index.js";
6
6
  import { TreeViewSelectionPropagation, TreeViewCancellableEventHandler } from "../../../models/index.js";
@@ -112,7 +112,7 @@ export interface UseTreeViewSelectionParameters<Multiple extends boolean | undef
112
112
  */
113
113
  onItemSelectionToggle?: (event: React.SyntheticEvent | null, itemId: string, isSelected: boolean) => void;
114
114
  }
115
- export type UseTreeViewSelectionDefaultizedParameters<Multiple extends boolean> = DefaultizedProps<UseTreeViewSelectionParameters<Multiple>, 'disableSelection' | 'defaultSelectedItems' | 'multiSelect' | 'checkboxSelection' | 'selectionPropagation'>;
115
+ export type UseTreeViewSelectionParametersWithDefaults<Multiple extends boolean> = DefaultizedProps<UseTreeViewSelectionParameters<Multiple>, 'disableSelection' | 'defaultSelectedItems' | 'multiSelect' | 'checkboxSelection' | 'selectionPropagation'>;
116
116
  export interface UseTreeViewSelectionState {
117
117
  selection: {
118
118
  selectedItems: TreeViewSelectionValue<boolean>;
@@ -124,7 +124,7 @@ export interface UseTreeViewSelectionState {
124
124
  }
125
125
  export type UseTreeViewSelectionSignature = TreeViewPluginSignature<{
126
126
  params: UseTreeViewSelectionParameters<any>;
127
- defaultizedParams: UseTreeViewSelectionDefaultizedParameters<any>;
127
+ paramsWithDefaults: UseTreeViewSelectionParametersWithDefaults<any>;
128
128
  instance: UseTreeViewSelectionInstance;
129
129
  publicAPI: UseTreeViewSelectionPublicAPI;
130
130
  state: UseTreeViewSelectionState;
@@ -1,20 +1,19 @@
1
1
  import { ConvertSignaturesIntoPlugins, MergeSignaturesProperty, TreeViewAnyPluginSignature, TreeViewPluginSignature } from "../models/index.js";
2
2
  import { UseTreeViewBaseProps } from "./useTreeView.types.js";
3
3
  import { TreeViewCorePluginSignatures } from "../corePlugins/index.js";
4
+ export declare const useExtractPluginParamsFromProps: <TSignatures extends readonly TreeViewPluginSignature<any>[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>>({
5
+ props: {
6
+ apiRef,
7
+ ...props
8
+ },
9
+ plugins
10
+ }: ExtractPluginParamsFromPropsParameters<TSignatures, TProps>) => ExtractPluginParamsFromPropsReturnValue<TSignatures, TProps>;
4
11
  interface ExtractPluginParamsFromPropsParameters<TSignatures extends readonly TreeViewAnyPluginSignature[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>> {
5
12
  plugins: ConvertSignaturesIntoPlugins<readonly [...TreeViewCorePluginSignatures, ...TSignatures]>;
6
13
  props: TProps;
7
14
  }
8
15
  interface ExtractPluginParamsFromPropsReturnValue<TSignatures extends readonly TreeViewAnyPluginSignature[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>> extends UseTreeViewBaseProps<TSignatures> {
9
- pluginParams: MergeSignaturesProperty<TSignatures, 'defaultizedParams'>;
16
+ pluginParams: MergeSignaturesProperty<TSignatures, 'paramsWithDefaults'>;
10
17
  forwardedProps: Omit<TProps, keyof MergeSignaturesProperty<TSignatures, 'params'>>;
11
18
  }
12
- export declare const extractPluginParamsFromProps: <TSignatures extends readonly TreeViewPluginSignature<any>[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>>({
13
- props: {
14
- apiRef,
15
- experimentalFeatures: inExperimentalFeatures,
16
- ...props
17
- },
18
- plugins
19
- }: ExtractPluginParamsFromPropsParameters<TSignatures, TProps>) => ExtractPluginParamsFromPropsReturnValue<TSignatures, TProps>;
20
19
  export {};
@@ -0,0 +1,51 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ const _excluded = ["apiRef"];
3
+ import * as React from 'react';
4
+ export const useExtractPluginParamsFromProps = _ref => {
5
+ let {
6
+ props: {
7
+ apiRef
8
+ },
9
+ plugins
10
+ } = _ref,
11
+ props = _objectWithoutPropertiesLoose(_ref.props, _excluded);
12
+ const paramsLookup = React.useMemo(() => {
13
+ const tempParamsLookup = {};
14
+ plugins.forEach(plugin => {
15
+ Object.assign(tempParamsLookup, plugin.params);
16
+ });
17
+ return tempParamsLookup;
18
+ }, [plugins]);
19
+ const {
20
+ forwardedProps,
21
+ pluginParams
22
+ } = React.useMemo(() => {
23
+ const tempPluginParams = {};
24
+ const tempForwardedProps = {};
25
+ Object.keys(props).forEach(propName => {
26
+ const prop = props[propName];
27
+ if (paramsLookup[propName]) {
28
+ tempPluginParams[propName] = prop;
29
+ } else {
30
+ tempForwardedProps[propName] = prop;
31
+ }
32
+ });
33
+ const pluginParamsWithDefaults = plugins.reduce((acc, plugin) => {
34
+ if (plugin.applyDefaultValuesToParams) {
35
+ return plugin.applyDefaultValuesToParams({
36
+ params: acc
37
+ });
38
+ }
39
+ return acc;
40
+ }, tempPluginParams);
41
+ return {
42
+ forwardedProps: tempForwardedProps,
43
+ pluginParams: pluginParamsWithDefaults
44
+ };
45
+ }, [plugins, props, paramsLookup]);
46
+ return {
47
+ forwardedProps,
48
+ pluginParams,
49
+ apiRef
50
+ };
51
+ };
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useForkRef from '@mui/utils/useForkRef';
4
4
  import { TREE_VIEW_CORE_PLUGINS } from "../corePlugins/index.js";
5
- import { extractPluginParamsFromProps } from "./extractPluginParamsFromProps.js";
5
+ import { useExtractPluginParamsFromProps } from "./useExtractPluginParamsFromProps.js";
6
6
  import { useTreeViewBuildContext } from "./useTreeViewBuildContext.js";
7
7
  import { TreeViewStore } from "../utils/TreeViewStore.js";
8
8
  function initializeInputApiRef(inputApiRef) {
@@ -38,9 +38,8 @@ export const useTreeView = ({
38
38
  const {
39
39
  pluginParams,
40
40
  forwardedProps,
41
- apiRef,
42
- experimentalFeatures
43
- } = extractPluginParamsFromProps({
41
+ apiRef
42
+ } = useExtractPluginParamsFromProps({
44
43
  plugins,
45
44
  props
46
45
  });
@@ -76,7 +75,6 @@ export const useTreeView = ({
76
75
  const pluginResponse = plugin({
77
76
  instance,
78
77
  params: pluginParams,
79
- experimentalFeatures,
80
78
  rootRef: innerRootRef,
81
79
  plugins,
82
80
  store: storeRef.current
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { EventHandlers } from '@mui/utils/types';
3
- import type { TreeViewContextValue } from '../TreeViewProvider';
4
- import { TreeViewAnyPluginSignature, ConvertSignaturesIntoPlugins, TreeViewPublicAPI, TreeViewExperimentalFeatures } from "../models/index.js";
3
+ import type { TreeViewContextValue } from "../TreeViewProvider/index.js";
4
+ import { TreeViewAnyPluginSignature, ConvertSignaturesIntoPlugins, TreeViewPublicAPI } from "../models/index.js";
5
5
  export interface UseTreeViewParameters<TSignatures extends readonly TreeViewAnyPluginSignature[], TProps extends Partial<UseTreeViewBaseProps<TSignatures>>> {
6
6
  plugins: ConvertSignaturesIntoPlugins<TSignatures>;
7
7
  rootRef?: React.Ref<HTMLUListElement> | undefined;
@@ -9,7 +9,6 @@ export interface UseTreeViewParameters<TSignatures extends readonly TreeViewAnyP
9
9
  }
10
10
  export interface UseTreeViewBaseProps<TSignatures extends readonly TreeViewAnyPluginSignature[]> {
11
11
  apiRef: React.RefObject<TreeViewPublicAPI<TSignatures> | undefined> | undefined;
12
- experimentalFeatures: TreeViewExperimentalFeatures<TSignatures>;
13
12
  }
14
13
  export interface UseTreeViewRootSlotProps extends Pick<React.HTMLAttributes<HTMLUListElement>, 'onFocus' | 'onBlur' | 'onKeyDown' | 'id' | 'aria-multiselectable' | 'role' | 'tabIndex'> {
15
14
  ref: React.Ref<HTMLUListElement>;
@@ -3,16 +3,12 @@ import { TreeViewContextValue } from "../TreeViewProvider/index.js";
3
3
  import { ConvertSignaturesIntoPlugins, TreeViewAnyPluginSignature, TreeViewInstance, TreeViewPublicAPI } from "../models/index.js";
4
4
  import { TreeViewCorePluginSignatures } from "../corePlugins/index.js";
5
5
  import { TreeViewStore } from "../utils/TreeViewStore.js";
6
- export declare const useTreeViewBuildContext: <TSignatures extends readonly TreeViewAnyPluginSignature[]>({
7
- plugins,
8
- instance,
9
- publicAPI,
10
- store,
11
- rootRef
12
- }: {
6
+ export declare const useTreeViewBuildContext: <TSignatures extends readonly TreeViewAnyPluginSignature[]>(parameters: UseTreeViewBuildContextParameters<TSignatures>) => TreeViewContextValue<TSignatures>;
7
+ interface UseTreeViewBuildContextParameters<TSignatures extends readonly TreeViewAnyPluginSignature[]> {
13
8
  plugins: ConvertSignaturesIntoPlugins<readonly [...TreeViewCorePluginSignatures, ...TSignatures]>;
14
9
  instance: TreeViewInstance<TSignatures>;
15
10
  publicAPI: TreeViewPublicAPI<TSignatures>;
16
11
  store: TreeViewStore<TSignatures>;
17
12
  rootRef: React.RefObject<HTMLUListElement | null>;
18
- }) => TreeViewContextValue<TSignatures>;
13
+ }
14
+ export {};
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
- export const useTreeViewBuildContext = ({
3
- plugins,
4
- instance,
5
- publicAPI,
6
- store,
7
- rootRef
8
- }) => {
2
+ export const useTreeViewBuildContext = parameters => {
3
+ const {
4
+ plugins,
5
+ instance,
6
+ publicAPI,
7
+ store,
8
+ rootRef
9
+ } = parameters;
9
10
  const runItemPlugins = React.useCallback(itemPluginProps => {
10
11
  let finalRootRef = null;
11
12
  let finalContentRef = null;
@@ -1,4 +1,4 @@
1
- import type { TreeViewAnyPluginSignature, TreeViewState } from '../models';
1
+ import type { TreeViewAnyPluginSignature, TreeViewState } from "../models/index.js";
2
2
  type Listener<T> = (value: T) => void;
3
3
  export type StoreUpdater<TSignatures extends readonly TreeViewAnyPluginSignature[]> = (prevState: TreeViewState<TSignatures>) => TreeViewState<TSignatures>;
4
4
  export declare class TreeViewStore<TSignatures extends readonly TreeViewAnyPluginSignature[]> {
@@ -1,6 +1,6 @@
1
1
  import { CleanupTracking, UnregisterToken, UnsubscribeFn } from "./CleanupTracking.js";
2
2
  export declare class TimerBasedCleanupTracking implements CleanupTracking {
3
- timeouts?: Map<number, NodeJS.Timeout> | undefined;
3
+ timeouts?: Map<number, number> | undefined;
4
4
  cleanupTimeout: number;
5
5
  constructor(timeout?: number);
6
6
  register(object: any, unsubscribe: UnsubscribeFn, unregisterToken: UnregisterToken): void;
@@ -1,6 +1,6 @@
1
1
  import { TreeViewState } from "../models/index.js";
2
- import type { UseTreeViewExpansionSignature } from '../plugins/useTreeViewExpansion';
3
- import type { UseTreeViewItemsSignature } from '../plugins/useTreeViewItems';
2
+ import type { UseTreeViewExpansionSignature } from "../plugins/useTreeViewExpansion/index.js";
3
+ import type { UseTreeViewItemsSignature } from "../plugins/useTreeViewItems/index.js";
4
4
  export declare const getPreviousNavigableItem: (state: TreeViewState<[UseTreeViewItemsSignature, UseTreeViewExpansionSignature]>, itemId: string) => string | null;
5
5
  export declare const getNextNavigableItem: (state: TreeViewState<[UseTreeViewItemsSignature, UseTreeViewExpansionSignature]>, itemId: string) => string | null;
6
6
  export declare const getLastNavigableItem: (state: TreeViewState<[UseTreeViewExpansionSignature, UseTreeViewItemsSignature]>) => string;
@@ -44,7 +44,7 @@ export const getPreviousNavigableItem = (state, itemId) => {
44
44
  let lastNavigableChild = getLastNavigableItemInArray(state, selectorItemOrderedChildrenIds(state, currentItemId));
45
45
  while (selectorIsItemExpanded(state, currentItemId) && lastNavigableChild != null) {
46
46
  currentItemId = lastNavigableChild;
47
- lastNavigableChild = selectorItemOrderedChildrenIds(state, currentItemId).find(childId => selectorCanItemBeFocused(state, childId));
47
+ lastNavigableChild = getLastNavigableItemInArray(state, selectorItemOrderedChildrenIds(state, currentItemId));
48
48
  }
49
49
  return currentItemId;
50
50
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,3 @@
1
- export type * from './overrides';
2
- export type * from './props';
3
- export type * from './components';
1
+ export type * from "./overrides.js";
2
+ export type * from "./props.js";
3
+ export type * from "./components.js";