@mui/utils 9.0.0-alpha.3 → 9.0.0-beta.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 +224 -3
- package/fastDeepAssign/fastDeepAssign.d.mts +5 -0
- package/fastDeepAssign/fastDeepAssign.d.ts +5 -0
- package/fastDeepAssign/fastDeepAssign.js +79 -0
- package/fastDeepAssign/fastDeepAssign.mjs +73 -0
- package/fastDeepAssign/index.d.mts +1 -0
- package/fastDeepAssign/index.d.ts +1 -0
- package/fastDeepAssign/index.js +13 -0
- package/fastDeepAssign/index.mjs +1 -0
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +17 -1
- package/index.mjs +3 -1
- package/isObjectEmpty/index.d.mts +1 -0
- package/isObjectEmpty/index.d.ts +1 -0
- package/isObjectEmpty/index.js +13 -0
- package/isObjectEmpty/index.mjs +1 -0
- package/isObjectEmpty/isObjectEmpty.d.mts +1 -0
- package/isObjectEmpty/isObjectEmpty.d.ts +1 -0
- package/isObjectEmpty/isObjectEmpty.js +16 -0
- package/isObjectEmpty/isObjectEmpty.mjs +10 -0
- package/package.json +31 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,216 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 9.0.0-beta.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.0.0-alpha.4..master -->
|
|
6
|
+
|
|
7
|
+
_Mar 25, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 8 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@9.0.0-beta.0`
|
|
12
|
+
|
|
13
|
+
#### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- [linear-progress] Remove deprecated CSS classes (#48068) @mj12albert
|
|
16
|
+
- [list-item, list-item-text] Remove deprecated props (#48042) @siriwatknp
|
|
17
|
+
- [button-group] Remove deprecated classes (#48043) @siriwatknp
|
|
18
|
+
- [card] Remove deprecated CardHeader props (#47995) @silviuaavram
|
|
19
|
+
- [checkbox][radio][switch] Remove deprecated inputProps and inputRef (#48059) @siriwatknp
|
|
20
|
+
- [chip] Remove deprecated classes (#48046) @silviuaavram
|
|
21
|
+
- [dialog][modal][drawer][swipeabledrawer] Remove deprecated props and classes (#48039) @silviuaavram
|
|
22
|
+
- [divider] Remove deprecated CSS classes (#48075) @siriwatknp
|
|
23
|
+
- [drawer] Remove deprecated CSS classes (#48077) @siriwatknp
|
|
24
|
+
- [image-list-item-bar] Remove deprecated CSS classes (#48064) @siriwatknp
|
|
25
|
+
- [inputs] Remove deprecated props & classes (#48071) @mj12albert
|
|
26
|
+
- [material-ui] Remove unnecessary overridesResolvers from styled components (#48082) @ZeeshanTamboli
|
|
27
|
+
- [material-ui][system] Remove deprecated system props from Box, Stack, Typography (#48072) @siriwatknp
|
|
28
|
+
- [pagination-item] Remove deprecated CSS classes (#48076) @siriwatknp
|
|
29
|
+
- [pagination-item] Remove deprecated props (#48038) @siriwatknp
|
|
30
|
+
- [rating] Remove deprecated IconContainerComponent (#48019) @siriwatknp
|
|
31
|
+
- [select] Remove deprecated CSS classes (#48065) @mj12albert
|
|
32
|
+
- [slider] Remove deprecated CSS classes (#48074) @siriwatknp
|
|
33
|
+
- [step-connector][step-content][step-label] Remove deprecated props and classes (#48058) @siriwatknp
|
|
34
|
+
- [tabs][tab] Remove deprecated CSS classes (#48078) @siriwatknp
|
|
35
|
+
- [table-pagination][table-sort-label] Remove deprecated props and classes (#48060) @siriwatknp
|
|
36
|
+
- [toggle-button-group] Remove deprecated classes (#48061) @siriwatknp
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
|
|
40
|
+
- [system] Improve performance when using sx prop (#44254) @romgrk
|
|
41
|
+
|
|
42
|
+
### `@mui/codemod@9.0.0-beta.0`
|
|
43
|
+
|
|
44
|
+
- [codemod] Add missing codemod links in upgrade guide (#48069) @silviuaavram
|
|
45
|
+
|
|
46
|
+
### Docs
|
|
47
|
+
|
|
48
|
+
- Mention all breaking changes in changelog (#48091) @silviuaavram
|
|
49
|
+
- Fix link to upgrade-to-v9 docs in release CHANGELOG (#48081) @ZeeshanTamboli
|
|
50
|
+
|
|
51
|
+
### Core
|
|
52
|
+
|
|
53
|
+
- Update browserslistrc (#48085) @silviuaavram
|
|
54
|
+
- [code-infra] Prevent major version updates of bundler/framework packages in bundling fixtures (#48062) @Copilot
|
|
55
|
+
- [code-infra][icons-material] Avoid material utils barrel in createSvgIcon (#48029) @anchmelev
|
|
56
|
+
- [docs-infra] Migrate more leaf components to mui-docs (#48018) @brijeshb42
|
|
57
|
+
|
|
58
|
+
All contributors of this release in alphabetical order: @anchmelev, @brijeshb42, @Copilot, @mj12albert, @romgrk, @silviuaavram, @siriwatknp, @ZeeshanTamboli
|
|
59
|
+
|
|
60
|
+
## 9.0.0-alpha.4
|
|
61
|
+
|
|
62
|
+
<!-- generated comparing v9.0.0-alpha.3..master -->
|
|
63
|
+
|
|
64
|
+
_Mar 20, 2026_
|
|
65
|
+
|
|
66
|
+
A big thanks to the 11 contributors who made this release possible.
|
|
67
|
+
|
|
68
|
+
### `@mui/material@9.0.0-alpha.4`
|
|
69
|
+
|
|
70
|
+
#### Breaking Changes
|
|
71
|
+
|
|
72
|
+
- [accordion] Remove deprecated props (#47963) @silviuaavram
|
|
73
|
+
- `TransitionComponent`
|
|
74
|
+
- `TransitionProps`
|
|
75
|
+
- [accordionsummary] Remove deprecated CSS class (#48006) @silviuaavram
|
|
76
|
+
- `contentGutters`
|
|
77
|
+
- [alert] Remove deprecated CSS classes (#48011) @silviuaavram
|
|
78
|
+
- `standardSuccess`
|
|
79
|
+
- `standardInfo`
|
|
80
|
+
- `standardWarning`
|
|
81
|
+
- `standardError`
|
|
82
|
+
- `outlinedSuccess`
|
|
83
|
+
- `outlinedInfo`
|
|
84
|
+
- `outlinedWarning`
|
|
85
|
+
- `outlinedError`
|
|
86
|
+
- `filledSuccess`
|
|
87
|
+
- `filledInfo`
|
|
88
|
+
- `filledWarning`
|
|
89
|
+
- `filledError`
|
|
90
|
+
- [alert] Remove deprecated props (#47965) @silviuaavram
|
|
91
|
+
- `components`
|
|
92
|
+
- `componentsProps`
|
|
93
|
+
- [autocomplete] Remove deprecated props (#47864) @ZeeshanTamboli
|
|
94
|
+
- `ChipProps`
|
|
95
|
+
- `componentsProps`
|
|
96
|
+
- `ListboxComponent`
|
|
97
|
+
- `ListboxProps`
|
|
98
|
+
- `PaperComponent`
|
|
99
|
+
- `PopperComponent`
|
|
100
|
+
- `renderTags`
|
|
101
|
+
- [avatar] Remove deprecated props (#47966) @silviuaavram
|
|
102
|
+
- `imgProps`
|
|
103
|
+
- [avatargroup] Remove deprecated props (#47968) @silviuaavram
|
|
104
|
+
- `componentsProps`
|
|
105
|
+
- [backdrop] Remove deprecated props (#47991) @silviuaavram
|
|
106
|
+
- `components`
|
|
107
|
+
- `componentsProps`
|
|
108
|
+
- `TransitionComponent`
|
|
109
|
+
- [badge] Remove deprecated props (#47993) @silviuaavram
|
|
110
|
+
- `components`
|
|
111
|
+
- `componentsProps`
|
|
112
|
+
- [button] Remove deprecated CSS classes (#48012) @silviuaavram
|
|
113
|
+
- Color variant classes: `textInherit`, `outlinedPrimary`, `containedSecondary`, etc.
|
|
114
|
+
- Size classes: `textSizeSmall`, `iconSizeMedium`, etc.
|
|
115
|
+
- [circularprogress] Remove deprecated CSS classes (#48014) @silviuaavram
|
|
116
|
+
- `circleDeterminate`
|
|
117
|
+
- `circleIndeterminate`
|
|
118
|
+
- [divider] Remove deprecated prop (#48013) @atharva3333
|
|
119
|
+
- `light`
|
|
120
|
+
- [formcontrollabel] Remove deprecated props (#48032) @atharva3333
|
|
121
|
+
- `componentsProps`
|
|
122
|
+
- [menu] Remove deprecated props (#48021) @siriwatknp
|
|
123
|
+
- `MenuListProps`
|
|
124
|
+
- `PaperProps`
|
|
125
|
+
- `TransitionProps`
|
|
126
|
+
- [mobilestepper] Remove deprecated props (#48041) @siriwatknp
|
|
127
|
+
- `LinearProgressProps`
|
|
128
|
+
- [popover] Remove deprecated props (#48021) @siriwatknp
|
|
129
|
+
- `BackdropComponent`
|
|
130
|
+
- `BackdropProps`
|
|
131
|
+
- `PaperProps`
|
|
132
|
+
- `TransitionComponent`
|
|
133
|
+
- `TransitionProps`
|
|
134
|
+
- [popper] Remove deprecated props (#48020) @siriwatknp
|
|
135
|
+
- `components`
|
|
136
|
+
- `componentsProps`
|
|
137
|
+
- [select] Remove deprecated props passed via `MenuProps` (#48021) @siriwatknp
|
|
138
|
+
- `MenuListProps`
|
|
139
|
+
- `PaperProps`
|
|
140
|
+
- `TransitionProps`
|
|
141
|
+
- [slider] Remove deprecated props (#47996) @siriwatknp
|
|
142
|
+
- `components`
|
|
143
|
+
- `componentsProps`
|
|
144
|
+
- [speeddial] Remove deprecated props (#47998) @siriwatknp
|
|
145
|
+
- `TransitionComponent`
|
|
146
|
+
- `TransitionProps`
|
|
147
|
+
- [speeddialaction] Remove deprecated props (#47998) @siriwatknp
|
|
148
|
+
- `FabProps`
|
|
149
|
+
- `tooltipTitle`
|
|
150
|
+
- `tooltipPlacement`
|
|
151
|
+
- `tooltipOpen`
|
|
152
|
+
- `TooltipClasses`
|
|
153
|
+
- [tabs] Remove deprecated props (#48017) @siriwatknp
|
|
154
|
+
- `ScrollButtonComponent`
|
|
155
|
+
- `TabIndicatorProps`
|
|
156
|
+
- `TabScrollButtonProps`
|
|
157
|
+
- `slots.StartScrollButtonIcon`
|
|
158
|
+
- `slots.EndScrollButtonIcon`
|
|
159
|
+
- [textfield] Remove deprecated props (#47878) @ZeeshanTamboli
|
|
160
|
+
- `InputProps`
|
|
161
|
+
- `inputProps`
|
|
162
|
+
- `SelectProps`
|
|
163
|
+
- `InputLabelProps`
|
|
164
|
+
- `FormHelperTextProps`
|
|
165
|
+
- [tooltip] Remove deprecated props (#47988) @siriwatknp
|
|
166
|
+
- `components`
|
|
167
|
+
- `componentsProps`
|
|
168
|
+
- `PopperComponent`
|
|
169
|
+
- `PopperProps`
|
|
170
|
+
- `TransitionComponent`
|
|
171
|
+
- `TransitionProps`
|
|
172
|
+
- [typography] Remove deprecated prop (#47986) @siriwatknp
|
|
173
|
+
- `paragraph`
|
|
174
|
+
- [buttonbase] Key handlers should not run on a disabled non-native button (#48003) @mj12albert
|
|
175
|
+
- [tablepagination] Format pagination numbers according to locale (#47803) @siriwatknp
|
|
176
|
+
- [textfield] Use non-native label for `<TextField select/>` (#47958) @mj12albert
|
|
177
|
+
|
|
178
|
+
Check out the [v9 upgrade guide](https://next.mui.com/material-ui/migration/upgrade-to-v9/).
|
|
179
|
+
|
|
180
|
+
#### Changes
|
|
181
|
+
|
|
182
|
+
- [autocomplete] Optimize selected option lookup (#47953) @anchmelev
|
|
183
|
+
- [buttonbase] Fix native button detection (#47985) @mj12albert
|
|
184
|
+
- [inputbase] Fix test using removed InputProps on TextField (#48000) @siriwatknp
|
|
185
|
+
- [popper] Add missing classes export (#48031) @mj12albert
|
|
186
|
+
- [select] Fix focus visible always set on menu item (#47912) @silviuaavram
|
|
187
|
+
- [slider] Fix focus visible styles incorrectly applied by pointer (#47894) @mj12albert
|
|
188
|
+
- [slider] Accept readonly array for the value prop (#47936) @pcorpet
|
|
189
|
+
|
|
190
|
+
### `@mui/codemod@9.0.0-alpha.4`
|
|
191
|
+
|
|
192
|
+
- [codemod] Add slot key rename to `tabs-props` codemod and add to README (#48035) @siriwatknp
|
|
193
|
+
- [codemod] Add card-header-props migration guide (#48005) @siriwatknp
|
|
194
|
+
|
|
195
|
+
### Docs
|
|
196
|
+
|
|
197
|
+
- [blog] Lowercase 2026-MUI-X-price-changes blog post URL (#47871) @Janpot
|
|
198
|
+
- [docs] Wide docs layout (#47950) @noraleonte
|
|
199
|
+
- [docs] Mention the list of props removed in upgrade guide (#48010) @silviuaavram
|
|
200
|
+
- [docs] Update Autocomplete deprecated props removal migration guide docs (#47990) @ZeeshanTamboli
|
|
201
|
+
- [docs-infra] Extract shared App component from \_app into @mui/docs (#47933) @brijeshb42
|
|
202
|
+
- [docs-infra] Expose global theme object (#47964) @Janpot
|
|
203
|
+
- [docs][system] Update `styled` API docs for easier understanding (#47957) @olivier-lxo
|
|
204
|
+
|
|
205
|
+
### Core
|
|
206
|
+
|
|
207
|
+
- [code-infra] Add pkg-pr-new as dev dependency (#47992) @Janpot
|
|
208
|
+
- [code-infra] Remove CI coverage collection and upload to Codecov (#47930) @Janpot
|
|
209
|
+
- [core] Migrate to ESLint 10 (#47872) @brijeshb42
|
|
210
|
+
- [core] Remove GridLegacy component (#47956) @siriwatknp
|
|
211
|
+
|
|
212
|
+
All contributors of this release in alphabetical order: @anchmelev, @atharva3333, @brijeshb42, @Janpot, @mj12albert, @noraleonte, @olivier-lxo, @pcorpet, @silviuaavram, @siriwatknp, @ZeeshanTamboli
|
|
213
|
+
|
|
3
214
|
## 9.0.0-alpha.3
|
|
4
215
|
|
|
5
216
|
<!-- generated comparing v9.0.0-alpha.2..master -->
|
|
@@ -13,11 +224,16 @@ A big thanks to the 10 contributors who made this release possible. Here are som
|
|
|
13
224
|
|
|
14
225
|
### `@mui/material@9.0.0-alpha.3`
|
|
15
226
|
|
|
227
|
+
#### Breaking Changes
|
|
228
|
+
|
|
229
|
+
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
230
|
+
|
|
231
|
+
#### Changes
|
|
232
|
+
|
|
16
233
|
- [autocomplete] Add `root` slot (#47852) @GerardasB
|
|
17
234
|
- [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
|
|
18
235
|
- [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
|
|
19
236
|
- [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
|
|
20
|
-
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
21
237
|
|
|
22
238
|
### Docs
|
|
23
239
|
|
|
@@ -75,16 +291,21 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
75
291
|
|
|
76
292
|
### @mui/material@9.0.0-alpha.1
|
|
77
293
|
|
|
294
|
+
#### Breaking Changes
|
|
295
|
+
|
|
78
296
|
- [Autocomplete] Prevents Autocomplete menu from opening on right click (#47797) @silviuaavram
|
|
79
297
|
- [Backdrop] Remove aria-hidden by default (#47798) @silviuaavram
|
|
80
298
|
- [ButtonBase] Ensure that onClick propagates when non-native button is clicked (#47800) @silviuaavram
|
|
81
299
|
- [Dialog][Modal] Remove `disableEscapeKeyDown` prop (#47695) @silviuaavram
|
|
82
300
|
- [Grid] Remove system props support (#47846) @siriwatknp
|
|
83
|
-
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
|
|
84
301
|
- [theme] Remove MuiTouchRipple from theme component types (#47849) @siriwatknp
|
|
85
|
-
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
|
|
86
302
|
- [useAutocomplete] Improve isOptionEqualToValue value argument type (#47801) @silviuaavram
|
|
87
303
|
|
|
304
|
+
#### Changes
|
|
305
|
+
|
|
306
|
+
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
|
|
307
|
+
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
|
|
308
|
+
|
|
88
309
|
### Docs
|
|
89
310
|
|
|
90
311
|
- [docs] Add updated community theme resource (#47847) @PeterTYLiu
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = fastDeepAssign;
|
|
7
|
+
// Based on https://github.com/TehShrike/deepmerge
|
|
8
|
+
// Based on https://github.com/fastify/deepmerge
|
|
9
|
+
// MIT License
|
|
10
|
+
// Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge
|
|
11
|
+
|
|
12
|
+
/* eslint-disable guard-for-in */
|
|
13
|
+
/* eslint-disable no-else-return */
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Assigns props from one object to another. Focused on performance, only normal objects with no
|
|
17
|
+
* prototype are supported.
|
|
18
|
+
*/
|
|
19
|
+
function fastDeepAssign(target, source) {
|
|
20
|
+
const sourceIsArray = Array.isArray(source);
|
|
21
|
+
const targetIsArray = Array.isArray(target);
|
|
22
|
+
if (isPrimitive(source)) {
|
|
23
|
+
return source;
|
|
24
|
+
} else if (isPrimitiveOrBuiltIn(target)) {
|
|
25
|
+
return clone(source);
|
|
26
|
+
} else if (sourceIsArray && targetIsArray) {
|
|
27
|
+
return mergeArray(target, source);
|
|
28
|
+
} else if (sourceIsArray !== targetIsArray) {
|
|
29
|
+
return clone(source);
|
|
30
|
+
} else {
|
|
31
|
+
return mergeObject(target, source);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function cloneArray(value) {
|
|
35
|
+
let i = 0;
|
|
36
|
+
const il = value.length;
|
|
37
|
+
const result = new Array(il);
|
|
38
|
+
for (i = 0; i < il; i += 1) {
|
|
39
|
+
result[i] = clone(value[i]);
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
function cloneObject(target) {
|
|
44
|
+
const result = {};
|
|
45
|
+
for (const key in target) {
|
|
46
|
+
result[key] = clone(target[key]);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
function mergeArray(target, source) {
|
|
51
|
+
const tl = target.length;
|
|
52
|
+
for (let i = 0; i < source.length; i += 1) {
|
|
53
|
+
target[tl + i] = clone(source[i]);
|
|
54
|
+
}
|
|
55
|
+
return target;
|
|
56
|
+
}
|
|
57
|
+
function isMergeableObject(value) {
|
|
58
|
+
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
|
|
59
|
+
}
|
|
60
|
+
function isPrimitive(value) {
|
|
61
|
+
return typeof value !== 'object' || value === null;
|
|
62
|
+
}
|
|
63
|
+
function isPrimitiveOrBuiltIn(value) {
|
|
64
|
+
return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;
|
|
65
|
+
}
|
|
66
|
+
function clone(entry) {
|
|
67
|
+
// eslint-disable-next-line no-nested-ternary
|
|
68
|
+
return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
|
|
69
|
+
}
|
|
70
|
+
function mergeObject(target, source) {
|
|
71
|
+
for (const key in source) {
|
|
72
|
+
if (key in target) {
|
|
73
|
+
target[key] = fastDeepAssign(target[key], source[key]);
|
|
74
|
+
} else {
|
|
75
|
+
target[key] = clone(source[key]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return target;
|
|
79
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Based on https://github.com/TehShrike/deepmerge
|
|
2
|
+
// Based on https://github.com/fastify/deepmerge
|
|
3
|
+
// MIT License
|
|
4
|
+
// Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge
|
|
5
|
+
|
|
6
|
+
/* eslint-disable guard-for-in */
|
|
7
|
+
/* eslint-disable no-else-return */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Assigns props from one object to another. Focused on performance, only normal objects with no
|
|
11
|
+
* prototype are supported.
|
|
12
|
+
*/
|
|
13
|
+
export default function fastDeepAssign(target, source) {
|
|
14
|
+
const sourceIsArray = Array.isArray(source);
|
|
15
|
+
const targetIsArray = Array.isArray(target);
|
|
16
|
+
if (isPrimitive(source)) {
|
|
17
|
+
return source;
|
|
18
|
+
} else if (isPrimitiveOrBuiltIn(target)) {
|
|
19
|
+
return clone(source);
|
|
20
|
+
} else if (sourceIsArray && targetIsArray) {
|
|
21
|
+
return mergeArray(target, source);
|
|
22
|
+
} else if (sourceIsArray !== targetIsArray) {
|
|
23
|
+
return clone(source);
|
|
24
|
+
} else {
|
|
25
|
+
return mergeObject(target, source);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function cloneArray(value) {
|
|
29
|
+
let i = 0;
|
|
30
|
+
const il = value.length;
|
|
31
|
+
const result = new Array(il);
|
|
32
|
+
for (i = 0; i < il; i += 1) {
|
|
33
|
+
result[i] = clone(value[i]);
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function cloneObject(target) {
|
|
38
|
+
const result = {};
|
|
39
|
+
for (const key in target) {
|
|
40
|
+
result[key] = clone(target[key]);
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function mergeArray(target, source) {
|
|
45
|
+
const tl = target.length;
|
|
46
|
+
for (let i = 0; i < source.length; i += 1) {
|
|
47
|
+
target[tl + i] = clone(source[i]);
|
|
48
|
+
}
|
|
49
|
+
return target;
|
|
50
|
+
}
|
|
51
|
+
function isMergeableObject(value) {
|
|
52
|
+
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
|
|
53
|
+
}
|
|
54
|
+
function isPrimitive(value) {
|
|
55
|
+
return typeof value !== 'object' || value === null;
|
|
56
|
+
}
|
|
57
|
+
function isPrimitiveOrBuiltIn(value) {
|
|
58
|
+
return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;
|
|
59
|
+
}
|
|
60
|
+
function clone(entry) {
|
|
61
|
+
// eslint-disable-next-line no-nested-ternary
|
|
62
|
+
return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
|
|
63
|
+
}
|
|
64
|
+
function mergeObject(target, source) {
|
|
65
|
+
for (const key in source) {
|
|
66
|
+
if (key in target) {
|
|
67
|
+
target[key] = fastDeepAssign(target[key], source[key]);
|
|
68
|
+
} else {
|
|
69
|
+
target[key] = clone(source[key]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return target;
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./fastDeepAssign.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./fastDeepAssign.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _fastDeepAssign.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _fastDeepAssign = _interopRequireDefault(require("./fastDeepAssign"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./fastDeepAssign.mjs";
|
package/index.d.mts
CHANGED
|
@@ -14,6 +14,8 @@ export { default as unstable_capitalize } from "./capitalize/index.mjs";
|
|
|
14
14
|
export { default as unstable_createChainedFunction } from "./createChainedFunction/index.mjs";
|
|
15
15
|
export { default as unstable_debounce } from "./debounce/index.mjs";
|
|
16
16
|
export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
|
|
17
|
+
export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
|
|
18
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
|
|
17
19
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
|
|
18
20
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
|
|
19
21
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { default as unstable_capitalize } from "./capitalize/index.js";
|
|
|
14
14
|
export { default as unstable_createChainedFunction } from "./createChainedFunction/index.js";
|
|
15
15
|
export { default as unstable_debounce } from "./debounce/index.js";
|
|
16
16
|
export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.js";
|
|
17
|
+
export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.js";
|
|
18
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.js";
|
|
17
19
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
|
|
18
20
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
|
|
19
21
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v9.0.0-
|
|
2
|
+
* @mui/utils v9.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -29,6 +29,8 @@ var _exportNames = {
|
|
|
29
29
|
unstable_createChainedFunction: true,
|
|
30
30
|
unstable_debounce: true,
|
|
31
31
|
unstable_deprecatedPropType: true,
|
|
32
|
+
unstable_fastDeepAssign: true,
|
|
33
|
+
unstable_isObjectEmpty: true,
|
|
32
34
|
unstable_isMuiElement: true,
|
|
33
35
|
unstable_ownerDocument: true,
|
|
34
36
|
unstable_ownerWindow: true,
|
|
@@ -203,6 +205,12 @@ Object.defineProperty(exports, "unstable_extractEventHandlers", {
|
|
|
203
205
|
return _extractEventHandlers.default;
|
|
204
206
|
}
|
|
205
207
|
});
|
|
208
|
+
Object.defineProperty(exports, "unstable_fastDeepAssign", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function () {
|
|
211
|
+
return _fastDeepAssign.default;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
206
214
|
Object.defineProperty(exports, "unstable_generateUtilityClass", {
|
|
207
215
|
enumerable: true,
|
|
208
216
|
get: function () {
|
|
@@ -257,6 +265,12 @@ Object.defineProperty(exports, "unstable_isMuiElement", {
|
|
|
257
265
|
return _isMuiElement.default;
|
|
258
266
|
}
|
|
259
267
|
});
|
|
268
|
+
Object.defineProperty(exports, "unstable_isObjectEmpty", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function () {
|
|
271
|
+
return _isObjectEmpty.default;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
260
274
|
Object.defineProperty(exports, "unstable_ownerDocument", {
|
|
261
275
|
enumerable: true,
|
|
262
276
|
get: function () {
|
|
@@ -386,6 +400,8 @@ var _capitalize = _interopRequireDefault(require("./capitalize"));
|
|
|
386
400
|
var _createChainedFunction = _interopRequireDefault(require("./createChainedFunction"));
|
|
387
401
|
var _debounce = _interopRequireDefault(require("./debounce"));
|
|
388
402
|
var _deprecatedPropType = _interopRequireDefault(require("./deprecatedPropType"));
|
|
403
|
+
var _fastDeepAssign = _interopRequireDefault(require("./fastDeepAssign"));
|
|
404
|
+
var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
|
|
389
405
|
var _isMuiElement = _interopRequireDefault(require("./isMuiElement"));
|
|
390
406
|
var _ownerDocument = _interopRequireDefault(require("./ownerDocument"));
|
|
391
407
|
var _ownerWindow = _interopRequireDefault(require("./ownerWindow"));
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v9.0.0-
|
|
2
|
+
* @mui/utils v9.0.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -21,6 +21,8 @@ export { default as unstable_capitalize } from "./capitalize/index.mjs";
|
|
|
21
21
|
export { default as unstable_createChainedFunction } from "./createChainedFunction/index.mjs";
|
|
22
22
|
export { default as unstable_debounce } from "./debounce/index.mjs";
|
|
23
23
|
export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
|
|
24
|
+
export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
|
|
25
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
|
|
24
26
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
|
|
25
27
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
|
|
26
28
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./isObjectEmpty.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./isObjectEmpty.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _isObjectEmpty.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./isObjectEmpty.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isObjectEmpty(object: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isObjectEmpty(object: any): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = isObjectEmpty;
|
|
7
|
+
function isObjectEmpty(object) {
|
|
8
|
+
if (object == null) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
// eslint-disable-next-line
|
|
12
|
+
for (const _ in object) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "9.0.0-
|
|
3
|
+
"version": "9.0.0-beta.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Utility functions for React components.",
|
|
6
6
|
"keywords": [
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"url": "https://opencollective.com/mui-org"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@babel/runtime": "^7.
|
|
27
|
+
"@babel/runtime": "^7.29.2",
|
|
28
28
|
"@types/prop-types": "^15.7.15",
|
|
29
29
|
"clsx": "^2.1.1",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
31
|
"react-is": "^19.2.4",
|
|
32
|
-
"@mui/types": "^9.0.0-
|
|
32
|
+
"@mui/types": "^9.0.0-beta.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -274,6 +274,20 @@
|
|
|
274
274
|
"default": "./extractEventHandlers/index.mjs"
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
|
+
"./fastDeepAssign": {
|
|
278
|
+
"import": {
|
|
279
|
+
"types": "./fastDeepAssign/index.d.mts",
|
|
280
|
+
"default": "./fastDeepAssign/index.mjs"
|
|
281
|
+
},
|
|
282
|
+
"require": {
|
|
283
|
+
"types": "./fastDeepAssign/index.d.ts",
|
|
284
|
+
"default": "./fastDeepAssign/index.js"
|
|
285
|
+
},
|
|
286
|
+
"default": {
|
|
287
|
+
"types": "./fastDeepAssign/index.d.mts",
|
|
288
|
+
"default": "./fastDeepAssign/index.mjs"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
277
291
|
"./formatMuiErrorMessage": {
|
|
278
292
|
"import": {
|
|
279
293
|
"types": "./formatMuiErrorMessage/index.d.mts",
|
|
@@ -456,6 +470,20 @@
|
|
|
456
470
|
"default": "./isMuiElement/index.mjs"
|
|
457
471
|
}
|
|
458
472
|
},
|
|
473
|
+
"./isObjectEmpty": {
|
|
474
|
+
"import": {
|
|
475
|
+
"types": "./isObjectEmpty/index.d.mts",
|
|
476
|
+
"default": "./isObjectEmpty/index.mjs"
|
|
477
|
+
},
|
|
478
|
+
"require": {
|
|
479
|
+
"types": "./isObjectEmpty/index.d.ts",
|
|
480
|
+
"default": "./isObjectEmpty/index.js"
|
|
481
|
+
},
|
|
482
|
+
"default": {
|
|
483
|
+
"types": "./isObjectEmpty/index.d.mts",
|
|
484
|
+
"default": "./isObjectEmpty/index.mjs"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
459
487
|
"./mergeSlotProps": {
|
|
460
488
|
"import": {
|
|
461
489
|
"types": "./mergeSlotProps/index.d.mts",
|