@mui/x-tree-view 8.27.2 → 8.28.3
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 +383 -0
- package/esm/index.js +1 -1
- package/esm/utils/cache.d.ts +8 -9
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/cache.d.ts +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,389 @@
|
|
|
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.28.3
|
|
9
|
+
|
|
10
|
+
_Apr 15, 2026_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
Special thanks go out to this community member for their valuable contribution:
|
|
17
|
+
@nk10nikhil
|
|
18
|
+
|
|
19
|
+
The following team members contributed to this release:
|
|
20
|
+
@flaviendelangle, @LukasTy, @MBilalShafi, @michelengelen, @sai6855
|
|
21
|
+
|
|
22
|
+
### Data Grid
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@8.28.2`
|
|
25
|
+
|
|
26
|
+
Internal changes.
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
29
|
+
|
|
30
|
+
Same changes as in `@mui/x-data-grid@8.28.2`, plus:
|
|
31
|
+
|
|
32
|
+
- [DataGridPro] Improve trigger for nested row reordering (#21996) @MBilalShafi
|
|
33
|
+
|
|
34
|
+
#### `@mui/x-data-grid-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
35
|
+
|
|
36
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.2`.
|
|
37
|
+
|
|
38
|
+
### Date and Time Pickers
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-date-pickers@8.28.3`
|
|
41
|
+
|
|
42
|
+
- [pickers] Ensure correct `display` property on Day component (#21980) @LukasTy
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers-pro@8.28.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
45
|
+
|
|
46
|
+
Same changes as in `@mui/x-date-pickers@8.28.3`.
|
|
47
|
+
|
|
48
|
+
### Charts
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-charts@8.28.2`
|
|
51
|
+
|
|
52
|
+
- [charts] Add missing export for `ChartsBrushOverlay` (#21993) (#22008) @nk10nikhil
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-charts-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-charts@8.28.2`.
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-charts-pro@8.28.2`.
|
|
61
|
+
|
|
62
|
+
### Tree View
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-tree-view@8.28.3`
|
|
65
|
+
|
|
66
|
+
- [tree view] Move `lazyLoadedItems` initialization to state initializer (#22087) @michelengelen
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-tree-view-pro@8.28.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-tree-view@8.28.3`, plus:
|
|
71
|
+
|
|
72
|
+
- [RichTreeViewPro] Allow to auto-expand lazy loaded items (#21957) @flaviendelangle
|
|
73
|
+
|
|
74
|
+
### Docs
|
|
75
|
+
|
|
76
|
+
- [docs] Fix `TreeDataFullExample` data grid demo crash (#22007) @sai6855
|
|
77
|
+
|
|
78
|
+
### Miscellaneous
|
|
79
|
+
|
|
80
|
+
- [core] Post v9 stable updates (#22035) @LukasTy
|
|
81
|
+
|
|
82
|
+
## 8.28.2
|
|
83
|
+
|
|
84
|
+
_Apr 1, 2026_
|
|
85
|
+
|
|
86
|
+
We'd like to extend a big thank you to the 4 contributors who made this release possible.
|
|
87
|
+
|
|
88
|
+
Special thanks go out to this community member for their valuable contribution:
|
|
89
|
+
@mixelburg, @sibananda485
|
|
90
|
+
|
|
91
|
+
The following team members contributed to this release:
|
|
92
|
+
@dav-is, @JCQuintas
|
|
93
|
+
|
|
94
|
+
### Data Grid
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-data-grid@8.28.2`
|
|
97
|
+
|
|
98
|
+
- [DataGrid] Export `GridColumnUnsortedIconProps` for custom column icon slots (#21898) @mixelburg
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-data-grid-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-data-grid@8.28.2`.
|
|
103
|
+
|
|
104
|
+
#### `@mui/x-data-grid-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
105
|
+
|
|
106
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.2`, plus:
|
|
107
|
+
|
|
108
|
+
- [DataGridPremium] Fix clipboard paste issue in portal (#21949) @sibananda485
|
|
109
|
+
|
|
110
|
+
### Charts
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-charts@8.28.2`
|
|
113
|
+
|
|
114
|
+
- [charts] Fix zoom slider preview with discard filter mode (#21906) @JCQuintas
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-charts-pro@8.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-charts@8.28.2`.
|
|
119
|
+
|
|
120
|
+
#### `@mui/x-charts-premium@8.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
121
|
+
|
|
122
|
+
Same changes as in `@mui/x-charts-pro@8.28.2`.
|
|
123
|
+
|
|
124
|
+
### Docs
|
|
125
|
+
|
|
126
|
+
- [docs] Fix JSDOM → jsdom casing (#21908) @JCQuintas
|
|
127
|
+
|
|
128
|
+
### Core
|
|
129
|
+
|
|
130
|
+
- [docs-infra] Set `SEARCH_INDEX` Env for v8 (#21875) @dav-is
|
|
131
|
+
|
|
132
|
+
## 8.28.1
|
|
133
|
+
|
|
134
|
+
_Mar 26, 2026_
|
|
135
|
+
|
|
136
|
+
We'd like to extend a big thank you to the 2 contributors who made this release possible.
|
|
137
|
+
|
|
138
|
+
The following team members contributed to this release:
|
|
139
|
+
@arminmeh, @cherniavskii
|
|
140
|
+
|
|
141
|
+
### Data Grid
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid@8.28.1`
|
|
144
|
+
|
|
145
|
+
- [DataGrid] Prevent repeated `hasScrollbar` state updates (#21847) @arminmeh
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-data-grid-pro@8.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
148
|
+
|
|
149
|
+
Same changes as in `@mui/x-data-grid@8.28.1`, plus:
|
|
150
|
+
|
|
151
|
+
- [DataGridPro] `fetchRows()` API's default `start` and `end` params based on scroll position with lazy loading (#21811) @arminmeh
|
|
152
|
+
|
|
153
|
+
#### `@mui/x-data-grid-premium@8.28.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
154
|
+
|
|
155
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.1`.
|
|
156
|
+
|
|
157
|
+
### Core
|
|
158
|
+
|
|
159
|
+
- [internal] Remove headless data grid packages (#21848) @cherniavskii
|
|
160
|
+
|
|
161
|
+
## 8.28.0
|
|
162
|
+
|
|
163
|
+
_Mar 19, 2026_
|
|
164
|
+
|
|
165
|
+
We'd like to extend a big thank you to the 5 contributors who made this release possible.
|
|
166
|
+
|
|
167
|
+
The following team members contributed to this release:
|
|
168
|
+
@alexfauquette, @brijeshb42, @Janpot, @JCQuintas, @sai6855
|
|
169
|
+
|
|
170
|
+
### Data Grid
|
|
171
|
+
|
|
172
|
+
#### `@mui/x-data-grid@8.28.0`
|
|
173
|
+
|
|
174
|
+
- [DataGrid] Move `elementOverrides` to constants and remove duplicates (@sai6855) (#21752) @github-actions[bot]
|
|
175
|
+
|
|
176
|
+
#### `@mui/x-data-grid-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
177
|
+
|
|
178
|
+
Same changes as in `@mui/x-data-grid@8.28.0`.
|
|
179
|
+
|
|
180
|
+
#### `@mui/x-data-grid-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
181
|
+
|
|
182
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.0`.
|
|
183
|
+
|
|
184
|
+
### Date and Time Pickers
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-date-pickers@8.27.2`
|
|
187
|
+
|
|
188
|
+
Internal changes.
|
|
189
|
+
|
|
190
|
+
#### `@mui/x-date-pickers-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
191
|
+
|
|
192
|
+
Same changes as in `@mui/x-date-pickers@8.27.2`.
|
|
193
|
+
|
|
194
|
+
### Charts
|
|
195
|
+
|
|
196
|
+
#### `@mui/x-charts@8.28.0`
|
|
197
|
+
|
|
198
|
+
- [charts] Improve deprecation warnings (#21760) (#21767) @alexfauquette
|
|
199
|
+
- [charts] Refactor `FunnelChart` classes structure (@JCQuintas) (#21763) @github-actions[bot]
|
|
200
|
+
- [charts] Refactor `Heatmap` classes structure (#21653) (#21745) @JCQuintas
|
|
201
|
+
- [charts] Refactor `PieChart` classes structure (@JCQuintas) (#21715) @github-actions[bot]
|
|
202
|
+
- [charts] Refactor `RadarChart` classes structure (@JCQuintas) (#21730) @github-actions[bot]
|
|
203
|
+
- [charts] Refactor `SankeyChart` classes structure (#21654) (#21726) @JCQuintas
|
|
204
|
+
- [charts] Rename `data-series-id` by `data-series` (#21761) (#21772) @alexfauquette
|
|
205
|
+
|
|
206
|
+
#### `@mui/x-charts-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
207
|
+
|
|
208
|
+
Same changes as in `@mui/x-charts@8.28.0`, plus:
|
|
209
|
+
|
|
210
|
+
- [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21723) @JCQuintas
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-charts-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
213
|
+
|
|
214
|
+
Same changes as in `@mui/x-charts-pro@8.28.0`.
|
|
215
|
+
|
|
216
|
+
### Tree View
|
|
217
|
+
|
|
218
|
+
#### `@mui/x-tree-view@8.27.2`
|
|
219
|
+
|
|
220
|
+
Internal changes.
|
|
221
|
+
|
|
222
|
+
#### `@mui/x-tree-view-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
223
|
+
|
|
224
|
+
Same changes as in `@mui/x-tree-view@8.27.2`.
|
|
225
|
+
|
|
226
|
+
### Codemod
|
|
227
|
+
|
|
228
|
+
#### `@mui/x-codemod@8.27.0`
|
|
229
|
+
|
|
230
|
+
Internal changes.
|
|
231
|
+
|
|
232
|
+
### Core
|
|
233
|
+
|
|
234
|
+
- [code-infra] Fix contributor generation in changelog (#21712) @brijeshb42
|
|
235
|
+
- [code-infra] Install pkg-pr-new (#21778) @Janpot
|
|
236
|
+
|
|
237
|
+
## 8.27.5
|
|
238
|
+
|
|
239
|
+
_Mar 11, 2026_
|
|
240
|
+
|
|
241
|
+
We'd like to extend a big thank you to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
242
|
+
|
|
243
|
+
- 🐞 Bugfixes
|
|
244
|
+
|
|
245
|
+
The following team members contributed to this release:
|
|
246
|
+
@bernardobelchior, @JCQuintas, @MBilalShafi, @michelengelen, @mj12albert, @sai6855, @siriwatknp
|
|
247
|
+
|
|
248
|
+
### Data Grid
|
|
249
|
+
|
|
250
|
+
#### `@mui/x-data-grid@8.27.5`
|
|
251
|
+
|
|
252
|
+
- [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21684) @michelengelen
|
|
253
|
+
- [DataGrid] Forward rest props in `GridFilterInputMultipleValue` (#21444) @siriwatknp
|
|
254
|
+
- [DataGrid] Remove double rtl inversion logic for columns pinning (#21443) @siriwatknp
|
|
255
|
+
- [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21632) @sai6855
|
|
256
|
+
- [DataGrid] Refactor `headerAlign` style calls (#21633) @sai6855
|
|
257
|
+
- [DataGrid] Fix keyboard navigation with single-row checkbox selection (#21529) @mj12albert
|
|
258
|
+
|
|
259
|
+
#### `@mui/x-data-grid-pro@8.27.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
260
|
+
|
|
261
|
+
Same changes as in `@mui/x-data-grid@8.27.5`, plus:
|
|
262
|
+
|
|
263
|
+
- [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21691) @michelengelen
|
|
264
|
+
- [DataGridPro] Fix sorting not reflected in nested server-side data (#21641) @MBilalShafi
|
|
265
|
+
|
|
266
|
+
#### `@mui/x-data-grid-premium@8.27.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
267
|
+
|
|
268
|
+
Same changes as in `@mui/x-data-grid-pro@8.27.5`.
|
|
269
|
+
|
|
270
|
+
### Charts
|
|
271
|
+
|
|
272
|
+
#### `@mui/x-charts@8.27.5`
|
|
273
|
+
|
|
274
|
+
- [charts] Refactor `BarChart` classes structure (#21601) (#21644) @JCQuintas
|
|
275
|
+
- [charts] Refactor `LineChart` classes structure (#21672) @JCQuintas
|
|
276
|
+
- [charts] Refactor `ScatterChart` classes structure (#21706) @JCQuintas
|
|
277
|
+
|
|
278
|
+
#### `@mui/x-charts-pro@8.27.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
279
|
+
|
|
280
|
+
Same changes as in `@mui/x-charts@8.27.5`, plus:
|
|
281
|
+
|
|
282
|
+
- [charts-pro] Fix image export truncated when page is zoomed out (#21696) @bernardobelchior
|
|
283
|
+
|
|
284
|
+
#### `@mui/x-charts-premium@8.27.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
285
|
+
|
|
286
|
+
Same changes as in `@mui/x-charts-pro@8.27.5`.
|
|
287
|
+
|
|
288
|
+
### Docs
|
|
289
|
+
|
|
290
|
+
- [docs] Fix `AssistantWithDataSource` demo crashing (#21631) @sai6855
|
|
291
|
+
- [docs] Move Range Bar Chart to existing charts (#21122) @bernardobelchior
|
|
292
|
+
|
|
293
|
+
### Core
|
|
294
|
+
|
|
295
|
+
- [code-infra] Fix datagrid test flakyness (#21657) @JCQuintas
|
|
296
|
+
- [code-infra] Removed `getTeamMembers` function and usage from the release script (#21608) @michelengelen
|
|
297
|
+
|
|
298
|
+
### Miscellaneous
|
|
299
|
+
|
|
300
|
+
- [test] Add missing tests for forwarding props to filter operators in DataGrid (#21700) @siriwatknp
|
|
301
|
+
|
|
302
|
+
## 8.27.4
|
|
303
|
+
|
|
304
|
+
_Mar 5, 2026_
|
|
305
|
+
|
|
306
|
+
We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
307
|
+
|
|
308
|
+
- 🐞 Bugfixes
|
|
309
|
+
- 🌎 Improve Ukrainian (uk-UA) locale
|
|
310
|
+
|
|
311
|
+
Special thanks go out to this community member for their valuable contribution:
|
|
312
|
+
@lion1963
|
|
313
|
+
|
|
314
|
+
The following team members contributed to this release:
|
|
315
|
+
@arminmeh, @brijeshb42, @dav-is, @JCQuintas, @sai6855
|
|
316
|
+
|
|
317
|
+
### Data Grid
|
|
318
|
+
|
|
319
|
+
#### `@mui/x-data-grid@8.27.4`
|
|
320
|
+
|
|
321
|
+
- [DataGrid] Prevent unnecessary row selection checkbox rerendering (#21571) @arminmeh
|
|
322
|
+
- [DataGrid] Make `GridScrollArea` overrides resolver dynamic (#21612) @sai6855
|
|
323
|
+
- [l10n] Improve Ukrainian (uk-UA) locale (#21381) @lion1963
|
|
324
|
+
|
|
325
|
+
#### `@mui/x-data-grid-pro@8.27.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
326
|
+
|
|
327
|
+
Same changes as in `@mui/x-data-grid@8.27.4`, plus:
|
|
328
|
+
|
|
329
|
+
- [DataGridPro] Use `getRowId` prop to calculate the tree data row update (#21544) @arminmeh
|
|
330
|
+
|
|
331
|
+
#### `@mui/x-data-grid-premium@8.27.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
332
|
+
|
|
333
|
+
Same changes as in `@mui/x-data-grid-pro@8.27.4`.
|
|
334
|
+
|
|
335
|
+
### Charts
|
|
336
|
+
|
|
337
|
+
#### `@mui/x-charts@8.27.4`
|
|
338
|
+
|
|
339
|
+
- [charts] Deprecate `ChartDataProvider` in favour of `ChartsDataProvider` (#21549) @JCQuintas
|
|
340
|
+
- [charts] Rename `ChartContainer` to `ChartsContainer` (#21186) @JCQuintas
|
|
341
|
+
- [charts] Rename `ChartZoomSlider` to `ChartsZoomSlider` (#21572) @JCQuintas
|
|
342
|
+
|
|
343
|
+
#### `@mui/x-charts-pro@8.27.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
344
|
+
|
|
345
|
+
Same changes as in `@mui/x-charts@8.27.4`.
|
|
346
|
+
|
|
347
|
+
#### `@mui/x-charts-premium@8.27.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
348
|
+
|
|
349
|
+
Same changes as in `@mui/x-charts-pro@8.27.4`.
|
|
350
|
+
|
|
351
|
+
### Core
|
|
352
|
+
|
|
353
|
+
- [code-infra] Add eslint rule to prevent `Math.random` in docs (#21505) (#21563) @JCQuintas
|
|
354
|
+
- [code-infra] V8 Dedupe (#21561) @JCQuintas
|
|
355
|
+
- [docs-infra] Apply Cookie Banner to v8.x Branch (#21448) @dav-is
|
|
356
|
+
- [code-infra] Setup checkout to do full clone for non master branches (#21624) @brijeshb42
|
|
357
|
+
|
|
358
|
+
## 8.27.3
|
|
359
|
+
|
|
360
|
+
_Feb 25, 2026_
|
|
361
|
+
|
|
362
|
+
We'd like to extend a big thank you to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
363
|
+
|
|
364
|
+
- 🐞 Bugfixes
|
|
365
|
+
- ⚡️ Improved dynamic data support and cache invalidation in lazy loading for Data Grid Pro
|
|
366
|
+
|
|
367
|
+
The following team members contributed to this release:
|
|
368
|
+
@cherniavskii, @michelengelen, @MBilalShafi, @arminmeh
|
|
369
|
+
|
|
370
|
+
### Data Grid
|
|
371
|
+
|
|
372
|
+
#### `@mui/x-data-grid@8.27.3`
|
|
373
|
+
|
|
374
|
+
- [DataGrid] Preserve key input during row edit when using `rowModesModel` (#21457) @michelengelen
|
|
375
|
+
|
|
376
|
+
#### `@mui/x-data-grid-pro@8.27.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
377
|
+
|
|
378
|
+
Same changes as in `@mui/x-data-grid@8.27.3`, plus:
|
|
379
|
+
|
|
380
|
+
- [DataGridPro] Improve dynamic data support and cache invalidation in lazy loading (#21465) @MBilalShafi
|
|
381
|
+
|
|
382
|
+
#### `@mui/x-data-grid-premium@8.27.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
383
|
+
|
|
384
|
+
Same changes as in `@mui/x-data-grid-pro@8.27.3`.
|
|
385
|
+
|
|
386
|
+
### Core
|
|
387
|
+
|
|
388
|
+
- [code-infra] Do not append `x` to the last version for the compare API (#21422) @arminmeh
|
|
389
|
+
- [docs-infra] Fix current version detection logic (#21415) @cherniavskii
|
|
390
|
+
|
|
8
391
|
## 8.27.2
|
|
9
392
|
|
|
10
393
|
_Feb 20, 2026_
|
package/esm/index.js
CHANGED
package/esm/utils/cache.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TreeViewItemMeta } from "../internals/models/index.js";
|
|
2
1
|
type DataSourceCacheDefaultConfig = {
|
|
3
2
|
/**
|
|
4
3
|
* Time To Live for each cache entry in milliseconds.
|
|
@@ -7,32 +6,32 @@ type DataSourceCacheDefaultConfig = {
|
|
|
7
6
|
*/
|
|
8
7
|
ttl?: number;
|
|
9
8
|
};
|
|
10
|
-
export interface DataSourceCache {
|
|
9
|
+
export interface DataSourceCache<T = any> {
|
|
11
10
|
/**
|
|
12
11
|
* Set the cache entry for the given key.
|
|
13
12
|
* @param {string} key The key of type `string`
|
|
14
|
-
* @param {
|
|
13
|
+
* @param {T[]} value The value to be stored in the cache
|
|
15
14
|
*/
|
|
16
|
-
set: (key: string, value:
|
|
15
|
+
set: (key: string, value: T[]) => void;
|
|
17
16
|
/**
|
|
18
17
|
* Get the cache entry for the given key.
|
|
19
18
|
* @param {string} key The key of type `string`
|
|
20
|
-
* @returns {
|
|
19
|
+
* @returns {T[] | undefined | -1} The value stored in the cache, `undefined` if not found, or `-1` if the cache entry is stale.
|
|
21
20
|
*/
|
|
22
|
-
get: (key: string) =>
|
|
21
|
+
get: (key: string) => T[] | undefined | -1;
|
|
23
22
|
/**
|
|
24
23
|
* Clear the cache.
|
|
25
24
|
*/
|
|
26
25
|
clear: () => void;
|
|
27
26
|
}
|
|
28
|
-
export declare class DataSourceCacheDefault {
|
|
27
|
+
export declare class DataSourceCacheDefault<T = any> implements DataSourceCache<T> {
|
|
29
28
|
private cache;
|
|
30
29
|
private ttl;
|
|
31
30
|
constructor({
|
|
32
31
|
ttl
|
|
33
32
|
}: DataSourceCacheDefaultConfig);
|
|
34
|
-
set(key: string, value:
|
|
35
|
-
get(key: string):
|
|
33
|
+
set(key: string, value: T[]): void;
|
|
34
|
+
get(key: string): T[] | undefined | -1;
|
|
36
35
|
clear(): void;
|
|
37
36
|
}
|
|
38
37
|
export {};
|
package/index.js
CHANGED
package/package.json
CHANGED
package/utils/cache.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TreeViewItemMeta } from "../internals/models/index.js";
|
|
2
1
|
type DataSourceCacheDefaultConfig = {
|
|
3
2
|
/**
|
|
4
3
|
* Time To Live for each cache entry in milliseconds.
|
|
@@ -7,32 +6,32 @@ type DataSourceCacheDefaultConfig = {
|
|
|
7
6
|
*/
|
|
8
7
|
ttl?: number;
|
|
9
8
|
};
|
|
10
|
-
export interface DataSourceCache {
|
|
9
|
+
export interface DataSourceCache<T = any> {
|
|
11
10
|
/**
|
|
12
11
|
* Set the cache entry for the given key.
|
|
13
12
|
* @param {string} key The key of type `string`
|
|
14
|
-
* @param {
|
|
13
|
+
* @param {T[]} value The value to be stored in the cache
|
|
15
14
|
*/
|
|
16
|
-
set: (key: string, value:
|
|
15
|
+
set: (key: string, value: T[]) => void;
|
|
17
16
|
/**
|
|
18
17
|
* Get the cache entry for the given key.
|
|
19
18
|
* @param {string} key The key of type `string`
|
|
20
|
-
* @returns {
|
|
19
|
+
* @returns {T[] | undefined | -1} The value stored in the cache, `undefined` if not found, or `-1` if the cache entry is stale.
|
|
21
20
|
*/
|
|
22
|
-
get: (key: string) =>
|
|
21
|
+
get: (key: string) => T[] | undefined | -1;
|
|
23
22
|
/**
|
|
24
23
|
* Clear the cache.
|
|
25
24
|
*/
|
|
26
25
|
clear: () => void;
|
|
27
26
|
}
|
|
28
|
-
export declare class DataSourceCacheDefault {
|
|
27
|
+
export declare class DataSourceCacheDefault<T = any> implements DataSourceCache<T> {
|
|
29
28
|
private cache;
|
|
30
29
|
private ttl;
|
|
31
30
|
constructor({
|
|
32
31
|
ttl
|
|
33
32
|
}: DataSourceCacheDefaultConfig);
|
|
34
|
-
set(key: string, value:
|
|
35
|
-
get(key: string):
|
|
33
|
+
set(key: string, value: T[]): void;
|
|
34
|
+
get(key: string): T[] | undefined | -1;
|
|
36
35
|
clear(): void;
|
|
37
36
|
}
|
|
38
37
|
export {};
|