@mui/x-internals 8.10.0 → 8.11.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.
- package/CHANGELOG.md +309 -0
- package/EventManager/EventManager.js +3 -5
- package/esm/EventManager/EventManager.js +3 -5
- package/esm/fastArrayCompare/fastArrayCompare.d.ts +1 -1
- package/esm/store/Store.d.ts +1 -2
- package/esm/store/Store.js +21 -29
- package/esm/throttle/index.d.ts +1 -1
- package/esm/throttle/index.js +1 -1
- package/fastArrayCompare/fastArrayCompare.d.ts +1 -1
- package/package.json +8 -19
- package/store/Store.d.ts +1 -2
- package/store/Store.js +21 -29
- package/throttle/index.d.ts +1 -1
- package/throttle/index.js +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,315 @@
|
|
|
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.11.0
|
|
9
|
+
|
|
10
|
+
_Aug 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add new `SankeyChart`
|
|
15
|
+
|
|
16
|
+
<img height="300" alt="Screenshot 2025-07-24 at 12 54 33" src="https://github.com/user-attachments/assets/d77bcec1-044b-48c6-b37d-d7b74793b91c" />
|
|
17
|
+
|
|
18
|
+
- 🚀 Data Grid row grouping now supports row reordering
|
|
19
|
+
|
|
20
|
+
See the [Drag-and-drop group reordering](https://mui.com/x/react-data-grid/row-grouping/#drag-and-drop-group-reordering) section for more details.
|
|
21
|
+
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
25
|
+
@dwrth, @lauri865, @Webini
|
|
26
|
+
|
|
27
|
+
The following are all team members who have contributed to this release:
|
|
28
|
+
@alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
|
|
29
|
+
|
|
30
|
+
### Data Grid
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid@8.11.0`
|
|
33
|
+
|
|
34
|
+
- [DataGrid] Fix focused column header scroll jump (#19323) @lauri865
|
|
35
|
+
- [DataGrid] Bring `columnUnsortedIcon` slot back (#19268) @arminmeh
|
|
36
|
+
- [DataGrid] Do not add `menu` role to the empty actions menu (#19338) @arminmeh
|
|
37
|
+
- [DataGrid] Fix `columnsManagementRow` style override slot not working (#19097) @dwrth
|
|
38
|
+
- [DataGrid] Fix pagination state synchronization issue (#19290) @MBilalShafi
|
|
39
|
+
- [DataGrid] Fix scroll issue in R17 (#19265) @romgrk
|
|
40
|
+
- [DataGrid] Hide column separator of non-resizable pinned column (#19277) @arminmeh
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid@8.11.0`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPro] Fix column menu sort when `multipleColumnsSortingMode="always"` (#19099) @MBilalShafi
|
|
47
|
+
- [DataGridPro] Keep the drop effect if `keepColumnPositionIfDraggedOutside` is enabled (#19372) @arminmeh
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-data-grid-premium@8.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-data-grid-pro@8.11.0`, plus:
|
|
52
|
+
|
|
53
|
+
- [DataGridPremium] Fix `valueFormatter` issues when `rowGroupingColumnMode="single"` (#18967) @cherniavskii
|
|
54
|
+
- [DataGridPremium] Reordering support for row grouping (#18251) @MBilalShafi
|
|
55
|
+
|
|
56
|
+
### Date and Time Pickers
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers@8.11.0`
|
|
59
|
+
|
|
60
|
+
- [pickers] Fix Firefox bug causing crash when `startContainer` is a restricted object (#18772) @Webini
|
|
61
|
+
- [pickers] RTL not applied correctly for Calendar Systems examples (works in v7.x but broken in latest version) (#19287) @rita-codes
|
|
62
|
+
- [pickers] Use the locale week day on the Luxon adapter (#19230) @flaviendelangle
|
|
63
|
+
- [pickers] Fix display of placeholder when label is shrunk (#19318) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-date-pickers-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-date-pickers@8.11.0`.
|
|
68
|
+
|
|
69
|
+
### Charts
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts@8.11.0`
|
|
72
|
+
|
|
73
|
+
- [charts] Add `RadarAxis` component to render labels (#19240) @alexfauquette
|
|
74
|
+
- [charts] Handle item identifier with data (#19295) @JCQuintas
|
|
75
|
+
- [charts] Refactor optional chaining for props in PieChart, PieChartPro, and ScatterChartPro components (#19292) @sai6855
|
|
76
|
+
- [charts] Remove unused `fill` and `stroke` properties (#19316) @sai6855
|
|
77
|
+
- [charts] Correct `hideLegend` prop description in docs (#19371) @sai6855
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-charts-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-charts@8.11.0`, plus:
|
|
82
|
+
|
|
83
|
+
- [charts-pro] Add new `SankeyChart` (#18895) @JCQuintas
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.11.0`
|
|
88
|
+
|
|
89
|
+
- [tree view] Improve the typing of the item's checkbox `slotProps` (#19247) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.11.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.11.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs][TreeView] Fix grammar and spelling mistakes (#19299) @mapache-salvaje
|
|
104
|
+
- [docs][DataGrid] Add pagination number formatting doc with a demo (#19221) @siriwatknp
|
|
105
|
+
- [docs][Charts] Correct some small grammar mistakes (#19297) @mapache-salvaje
|
|
106
|
+
- [docs][DataGrid] Correct grammar mistakes (#19298) @mapache-salvaje
|
|
107
|
+
- [docs][DataGrid] Make it clear that the API key for AI Assistant must be private (#19244) @oliviertassinari
|
|
108
|
+
|
|
109
|
+
### Core
|
|
110
|
+
|
|
111
|
+
- [code-infra] Remove unnecessary triggers from publish workflow (#19348) @Janpot
|
|
112
|
+
- [code-infra] Set up publishing from GitHub actions (#19264) @Janpot
|
|
113
|
+
- [code-infra] Update renovate, exclude infra packages from MUI group (#19288) @Janpot
|
|
114
|
+
- [internal] Add comment for Codspeed triggers (#19302) @oliviertassinari
|
|
115
|
+
- [internal] Fix changelog generation for infra tags (#19266) @oliviertassinari
|
|
116
|
+
- [internal] Remove dead repository field (#19301) @oliviertassinari
|
|
117
|
+
- [internal] Sentence case @oliviertassinari
|
|
118
|
+
- [internal] Update 8.10.1 changelog with missing changes (#19345) @cherniavskii
|
|
119
|
+
- [support-infra] Improve GitHub Action that check PRs labels (#19303) @oliviertassinari
|
|
120
|
+
|
|
121
|
+
### Miscellaneous
|
|
122
|
+
|
|
123
|
+
- [infra] Add `synchronize` to workflow triggers (#19342) @michelengelen
|
|
124
|
+
- [infra] Add charts docs folder in codowner (#19317) @alexfauquette
|
|
125
|
+
- [infra] Fix publish workflow complaint (#19346) @JCQuintas
|
|
126
|
+
- [infra] Migrate to use eslint without airbnb config (#19269) @brijeshb42
|
|
127
|
+
- [infra] Simplify release preparation script (#19351) @michelengelen
|
|
128
|
+
|
|
129
|
+
## 8.10.2
|
|
130
|
+
|
|
131
|
+
_Aug 20, 2025_
|
|
132
|
+
|
|
133
|
+
We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
134
|
+
|
|
135
|
+
- 🌎 Improve Finnish (fi-FI) locale on the Data Grid
|
|
136
|
+
|
|
137
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
138
|
+
@lauri-heinonen-2025-04, @Methuselah96, @sai6855, @wilcoschoneveld
|
|
139
|
+
|
|
140
|
+
The following are all team members who have contributed to this release:
|
|
141
|
+
@alexfauquette, @cherniavskii, @flaviendelangle, @Janpot, @oliviertassinari, @rita-codes
|
|
142
|
+
|
|
143
|
+
### Data Grid
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid@8.10.2`
|
|
146
|
+
|
|
147
|
+
- [DataGrid] Fix display for `<GridEditSingleSelect />` when `density='compact'` (#19249) @sai6855
|
|
148
|
+
- [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
|
|
149
|
+
- [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-data-grid@8.10.2`, plus:
|
|
154
|
+
|
|
155
|
+
- [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
158
|
+
|
|
159
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
160
|
+
|
|
161
|
+
### Date and Time Pickers
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers@8.10.2`
|
|
164
|
+
|
|
165
|
+
Internal changes.
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
168
|
+
|
|
169
|
+
Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
170
|
+
|
|
171
|
+
### Charts
|
|
172
|
+
|
|
173
|
+
#### `@mui/x-charts@8.10.2`
|
|
174
|
+
|
|
175
|
+
Internal changes.
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-charts@8.10.2`.
|
|
180
|
+
|
|
181
|
+
### Tree View
|
|
182
|
+
|
|
183
|
+
#### `@mui/x-tree-view@8.10.2`
|
|
184
|
+
|
|
185
|
+
- [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
|
|
186
|
+
|
|
187
|
+
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
188
|
+
|
|
189
|
+
Same changes as in `@mui/x-tree-view@8.10.2`.
|
|
190
|
+
|
|
191
|
+
### Codemod
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-codemod@8.10.2`
|
|
194
|
+
|
|
195
|
+
Internal changes.
|
|
196
|
+
|
|
197
|
+
### Docs
|
|
198
|
+
|
|
199
|
+
- [docs] Fix links to the pyramid chart (#19250) @alexfauquette
|
|
200
|
+
|
|
201
|
+
### Core
|
|
202
|
+
|
|
203
|
+
- [internal] Avoid script for CI only @oliviertassinari
|
|
204
|
+
- [internal] Fix `renovate.json` @oliviertassinari
|
|
205
|
+
- [internal] Polish renovate config @oliviertassinari
|
|
206
|
+
- [internal] Rename core to internal (#19203) @oliviertassinari
|
|
207
|
+
- [internal] Update link to GitHub labels @oliviertassinari
|
|
208
|
+
|
|
209
|
+
### Miscellaneous
|
|
210
|
+
|
|
211
|
+
- [code-infra] Prepare for incoming `execa` update (#19229) @Janpot
|
|
212
|
+
- [virtualizer] Fix type import (#19192) @Methuselah96
|
|
213
|
+
- [virtualizer] Improve type export (#19192) @Methuselah96
|
|
214
|
+
|
|
215
|
+
## 8.10.1
|
|
216
|
+
|
|
217
|
+
_Aug 15, 2025_
|
|
218
|
+
|
|
219
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
220
|
+
|
|
221
|
+
- 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
|
|
222
|
+
- 📚 Documentation improvements
|
|
223
|
+
|
|
224
|
+
The following are all team members who have contributed to this release:
|
|
225
|
+
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk, @brijeshb42, @noraleonte, @rita-codes
|
|
226
|
+
|
|
227
|
+
### Data Grid
|
|
228
|
+
|
|
229
|
+
#### `@mui/x-data-grid@8.10.1`
|
|
230
|
+
|
|
231
|
+
- [DataGrid] Fix scroll jumping (#19156) @romgrk
|
|
232
|
+
- [DataGrid] Fix scroll restoration (#19182) @romgrk
|
|
233
|
+
- [DataGrid] Fix "no row with id" error (#19193) @romgrk
|
|
234
|
+
- [DataGrid] Fix missing rows in the print export window (#19159) @cherniavskii
|
|
235
|
+
- [DataGrid] Fix broken scroll (#19178) @romgrk
|
|
236
|
+
|
|
237
|
+
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
238
|
+
|
|
239
|
+
Same changes as in `@mui/x-data-grid@8.10.1`.
|
|
240
|
+
|
|
241
|
+
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
242
|
+
|
|
243
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
244
|
+
|
|
245
|
+
### Date and Time Pickers
|
|
246
|
+
|
|
247
|
+
#### `@mui/x-date-pickers@8.10.0`
|
|
248
|
+
|
|
249
|
+
Internal changes.
|
|
250
|
+
|
|
251
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
252
|
+
|
|
253
|
+
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
254
|
+
|
|
255
|
+
### Charts
|
|
256
|
+
|
|
257
|
+
- Axes can now be grouped by category when using `band` and `point` scales
|
|
258
|
+
|
|
259
|
+
<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" />
|
|
260
|
+
|
|
261
|
+
#### `@mui/x-charts@8.10.1`
|
|
262
|
+
|
|
263
|
+
- [charts] Allow y-axis to be grouped (#19081) @JCQuintas
|
|
264
|
+
- [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
|
|
265
|
+
- [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
|
|
266
|
+
- [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
|
|
267
|
+
- [charts] Add demo for log-scale ticks without labels (#19152) @bernardobelchior
|
|
268
|
+
- [charts] Update animation customization docs (#19185) @bernardobelchior
|
|
269
|
+
|
|
270
|
+
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
271
|
+
|
|
272
|
+
Same changes as in `@mui/x-charts@8.10.1`.
|
|
273
|
+
|
|
274
|
+
### Tree View
|
|
275
|
+
|
|
276
|
+
#### `@mui/x-tree-view@8.10.1`
|
|
277
|
+
|
|
278
|
+
- [tree view] Fix root not loading from cache on remount (#19088) @noraleonte
|
|
279
|
+
- [tree view] Don't overwrite childrenIds when collapsed to preserve indeterminate state of the parent (#19196) @rita-codes
|
|
280
|
+
|
|
281
|
+
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
282
|
+
|
|
283
|
+
Same changes as in `@mui/x-tree-view@8.10.1`.
|
|
284
|
+
|
|
285
|
+
### Codemod
|
|
286
|
+
|
|
287
|
+
#### `@mui/x-codemod@8.10.1`
|
|
288
|
+
|
|
289
|
+
Internal changes.
|
|
290
|
+
|
|
291
|
+
### Docs
|
|
292
|
+
|
|
293
|
+
- [docs] Add all planned charts on the overview page (#19077) @prakhargupta1
|
|
294
|
+
- [docs] Add future charts components link in the sidebar (#19140) @prakhargupta1
|
|
295
|
+
- [docs] Fix Heatmap docs duplicate text (#19138) @JCQuintas
|
|
296
|
+
- [docs] Remove preview from Toolbar & Funnel (#19131) @mnajdova
|
|
297
|
+
- [docs] Reproduce npm sparkline (#19089) @alexfauquette
|
|
298
|
+
|
|
299
|
+
### Core
|
|
300
|
+
|
|
301
|
+
- [core] Fix licensing model name (#19025) @oliviertassinari
|
|
302
|
+
- [core] Fix usage of `:catalog` for `@babel/runtime` (#19028) @oliviertassinari
|
|
303
|
+
- [core] Refactor virtualizer API (#18995) @romgrk
|
|
304
|
+
|
|
305
|
+
### Miscellaneous
|
|
306
|
+
|
|
307
|
+
- [code-infra] Remove namespaces (#19071) @Janpot
|
|
308
|
+
- [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
|
|
309
|
+
- [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
|
|
310
|
+
- [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
|
|
311
|
+
- [code-infra] Migrate build command to code-infra (#19006) @brijeshb42
|
|
312
|
+
- [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
|
|
313
|
+
- [internal] Fix writing style action name @oliviertassinari
|
|
314
|
+
- [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
|
|
315
|
+
- [support-infra] Remove default issue label (#19104) @oliviertassinari
|
|
316
|
+
|
|
8
317
|
## 8.10.0
|
|
9
318
|
|
|
10
319
|
_Aug 8, 2025_
|
|
@@ -8,11 +8,9 @@ exports.EventManager = void 0;
|
|
|
8
8
|
// See https://github.com/browserify/events/blob/master/events.js for
|
|
9
9
|
// the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.
|
|
10
10
|
class EventManager {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.events = {};
|
|
15
|
-
}
|
|
11
|
+
maxListeners = 20;
|
|
12
|
+
warnOnce = false;
|
|
13
|
+
events = {};
|
|
16
14
|
on(eventName, listener, options = {}) {
|
|
17
15
|
let collection = this.events[eventName];
|
|
18
16
|
if (!collection) {
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
// See https://github.com/browserify/events/blob/master/events.js for
|
|
3
3
|
// the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.
|
|
4
4
|
export class EventManager {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.events = {};
|
|
9
|
-
}
|
|
5
|
+
maxListeners = 20;
|
|
6
|
+
warnOnce = false;
|
|
7
|
+
events = {};
|
|
10
8
|
on(eventName, listener, options = {}) {
|
|
11
9
|
let collection = this.events[eventName];
|
|
12
10
|
if (!collection) {
|
package/esm/store/Store.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ type Listener<T> = (value: T) => void;
|
|
|
2
2
|
export declare class Store<State> {
|
|
3
3
|
state: State;
|
|
4
4
|
private listeners;
|
|
5
|
-
private
|
|
6
|
-
private needsReset;
|
|
5
|
+
private updateTick;
|
|
7
6
|
static create<T>(state: T): Store<T>;
|
|
8
7
|
constructor(state: State);
|
|
9
8
|
subscribe: (fn: Listener<State>) => () => void;
|
package/esm/store/Store.js
CHANGED
|
@@ -1,51 +1,43 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
/* eslint-disable no-cond-assign */
|
|
3
|
-
/* eslint-disable lines-between-class-members */
|
|
4
3
|
|
|
5
4
|
export class Store {
|
|
5
|
+
// HACK: `any` fixes adding listeners that accept partial state.
|
|
6
|
+
|
|
7
|
+
// Internal state to handle recursive `setState()` calls
|
|
8
|
+
|
|
6
9
|
static create(state) {
|
|
7
10
|
return new Store(state);
|
|
8
11
|
}
|
|
9
12
|
constructor(state) {
|
|
10
|
-
this.state = void 0;
|
|
11
|
-
// HACK: `any` fixes adding listeners that accept partial state.
|
|
12
|
-
this.listeners = void 0;
|
|
13
|
-
// Internal state to handle recursive `setState()` calls
|
|
14
|
-
this.isUpdating = void 0;
|
|
15
|
-
this.needsReset = void 0;
|
|
16
|
-
this.subscribe = fn => {
|
|
17
|
-
this.listeners.add(fn);
|
|
18
|
-
return () => {
|
|
19
|
-
this.listeners.delete(fn);
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
this.getSnapshot = () => {
|
|
23
|
-
return this.state;
|
|
24
|
-
};
|
|
25
13
|
this.state = state;
|
|
26
14
|
this.listeners = new Set();
|
|
27
|
-
this.
|
|
28
|
-
this.needsReset = false;
|
|
15
|
+
this.updateTick = 0;
|
|
29
16
|
}
|
|
17
|
+
subscribe = fn => {
|
|
18
|
+
this.listeners.add(fn);
|
|
19
|
+
return () => {
|
|
20
|
+
this.listeners.delete(fn);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
getSnapshot = () => {
|
|
24
|
+
return this.state;
|
|
25
|
+
};
|
|
30
26
|
setState(newState) {
|
|
31
27
|
this.state = newState;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
this.isUpdating = true;
|
|
37
|
-
let it = this.listeners.values();
|
|
28
|
+
this.updateTick += 1;
|
|
29
|
+
const currentTick = this.updateTick;
|
|
30
|
+
const it = this.listeners.values();
|
|
38
31
|
let result;
|
|
39
32
|
while (result = it.next(), !result.done) {
|
|
40
|
-
if (this.
|
|
41
|
-
|
|
42
|
-
it
|
|
43
|
-
|
|
33
|
+
if (currentTick !== this.updateTick) {
|
|
34
|
+
// If the tick has changed, a recursive `setState` call has been made,
|
|
35
|
+
// and it has already notified all listeners.
|
|
36
|
+
return;
|
|
44
37
|
}
|
|
45
38
|
const listener = result.value;
|
|
46
39
|
listener(newState);
|
|
47
40
|
}
|
|
48
|
-
this.isUpdating = false;
|
|
49
41
|
}
|
|
50
42
|
update(changes) {
|
|
51
43
|
for (const key in changes) {
|
package/esm/throttle/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./throttle.js";
|
package/esm/throttle/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./throttle.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-internals",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Utility functions for the MUI X packages (internal use only).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.28.2",
|
|
34
|
-
"@mui/utils": "^7.
|
|
34
|
+
"@mui/utils": "^7.3.1",
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
36
|
"use-sync-external-store": "^1.5.0"
|
|
37
37
|
},
|
|
@@ -41,30 +41,19 @@
|
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=14.0.0"
|
|
43
43
|
},
|
|
44
|
-
"
|
|
44
|
+
"type": "commonjs",
|
|
45
45
|
"exports": {
|
|
46
46
|
"./package.json": "./package.json",
|
|
47
|
-
".": {
|
|
48
|
-
"require": {
|
|
49
|
-
"types": "./index.d.ts",
|
|
50
|
-
"default": "./index.js"
|
|
51
|
-
},
|
|
52
|
-
"import": {
|
|
53
|
-
"types": "./esm/index.d.ts",
|
|
54
|
-
"default": "./esm/index.js"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
47
|
"./*": {
|
|
58
|
-
"require": {
|
|
59
|
-
"types": "./*/index.d.ts",
|
|
60
|
-
"default": "./*/index.js"
|
|
61
|
-
},
|
|
62
48
|
"import": {
|
|
63
49
|
"types": "./esm/*/index.d.ts",
|
|
64
50
|
"default": "./esm/*/index.js"
|
|
51
|
+
},
|
|
52
|
+
"require": {
|
|
53
|
+
"types": "./*/index.d.ts",
|
|
54
|
+
"default": "./*/index.js"
|
|
65
55
|
}
|
|
66
56
|
},
|
|
67
|
-
"./esm": null
|
|
68
|
-
"./modern": null
|
|
57
|
+
"./esm": null
|
|
69
58
|
}
|
|
70
59
|
}
|
package/store/Store.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ type Listener<T> = (value: T) => void;
|
|
|
2
2
|
export declare class Store<State> {
|
|
3
3
|
state: State;
|
|
4
4
|
private listeners;
|
|
5
|
-
private
|
|
6
|
-
private needsReset;
|
|
5
|
+
private updateTick;
|
|
7
6
|
static create<T>(state: T): Store<T>;
|
|
8
7
|
constructor(state: State);
|
|
9
8
|
subscribe: (fn: Listener<State>) => () => void;
|
package/store/Store.js
CHANGED
|
@@ -7,52 +7,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.Store = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
/* eslint-disable no-cond-assign */
|
|
10
|
-
/* eslint-disable lines-between-class-members */
|
|
11
10
|
|
|
12
11
|
class Store {
|
|
12
|
+
// HACK: `any` fixes adding listeners that accept partial state.
|
|
13
|
+
|
|
14
|
+
// Internal state to handle recursive `setState()` calls
|
|
15
|
+
|
|
13
16
|
static create(state) {
|
|
14
17
|
return new Store(state);
|
|
15
18
|
}
|
|
16
19
|
constructor(state) {
|
|
17
|
-
this.state = void 0;
|
|
18
|
-
// HACK: `any` fixes adding listeners that accept partial state.
|
|
19
|
-
this.listeners = void 0;
|
|
20
|
-
// Internal state to handle recursive `setState()` calls
|
|
21
|
-
this.isUpdating = void 0;
|
|
22
|
-
this.needsReset = void 0;
|
|
23
|
-
this.subscribe = fn => {
|
|
24
|
-
this.listeners.add(fn);
|
|
25
|
-
return () => {
|
|
26
|
-
this.listeners.delete(fn);
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
this.getSnapshot = () => {
|
|
30
|
-
return this.state;
|
|
31
|
-
};
|
|
32
20
|
this.state = state;
|
|
33
21
|
this.listeners = new Set();
|
|
34
|
-
this.
|
|
35
|
-
this.needsReset = false;
|
|
22
|
+
this.updateTick = 0;
|
|
36
23
|
}
|
|
24
|
+
subscribe = fn => {
|
|
25
|
+
this.listeners.add(fn);
|
|
26
|
+
return () => {
|
|
27
|
+
this.listeners.delete(fn);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
getSnapshot = () => {
|
|
31
|
+
return this.state;
|
|
32
|
+
};
|
|
37
33
|
setState(newState) {
|
|
38
34
|
this.state = newState;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
this.isUpdating = true;
|
|
44
|
-
let it = this.listeners.values();
|
|
35
|
+
this.updateTick += 1;
|
|
36
|
+
const currentTick = this.updateTick;
|
|
37
|
+
const it = this.listeners.values();
|
|
45
38
|
let result;
|
|
46
39
|
while (result = it.next(), !result.done) {
|
|
47
|
-
if (this.
|
|
48
|
-
|
|
49
|
-
it
|
|
50
|
-
|
|
40
|
+
if (currentTick !== this.updateTick) {
|
|
41
|
+
// If the tick has changed, a recursive `setState` call has been made,
|
|
42
|
+
// and it has already notified all listeners.
|
|
43
|
+
return;
|
|
51
44
|
}
|
|
52
45
|
const listener = result.value;
|
|
53
46
|
listener(newState);
|
|
54
47
|
}
|
|
55
|
-
this.isUpdating = false;
|
|
56
48
|
}
|
|
57
49
|
update(changes) {
|
|
58
50
|
for (const key in changes) {
|
package/throttle/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./throttle.js";
|
package/throttle/index.js
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
var _throttle = require("./throttle");
|
|
7
|
+
Object.keys(_throttle).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _throttle[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _throttle[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|