@mui/x-internals 8.0.0-beta.0 → 8.0.0-beta.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 +312 -0
- package/esm/isDeepEqual/index.d.ts +1 -0
- package/esm/isDeepEqual/index.js +1 -0
- package/esm/isDeepEqual/isDeepEqual.d.ts +29 -0
- package/esm/isDeepEqual/isDeepEqual.js +124 -0
- package/isDeepEqual/index.d.ts +1 -0
- package/isDeepEqual/index.js +16 -0
- package/isDeepEqual/isDeepEqual.d.ts +29 -0
- package/isDeepEqual/isDeepEqual.js +130 -0
- package/modern/isDeepEqual/index.d.ts +1 -0
- package/modern/isDeepEqual/index.js +1 -0
- package/modern/isDeepEqual/isDeepEqual.d.ts +29 -0
- package/modern/isDeepEqual/isDeepEqual.js +124 -0
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,318 @@
|
|
|
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.0.0-beta.3
|
|
9
|
+
|
|
10
|
+
_Apr 3, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🚫 Removed `react-spring` as a dependency of `@mui/x-charts`
|
|
15
|
+
- 📦 Data Grid list view feature is now stable
|
|
16
|
+
- 💫 Support title in Data Grid
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
|
|
20
|
+
Team members who have contributed to this release:
|
|
21
|
+
@bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The list view feature and its related props are now stable.
|
|
30
|
+
|
|
31
|
+
The `unstable_listColumn` prop has been renamed to `listViewColumn`.
|
|
32
|
+
|
|
33
|
+
The `GridListColDef` type has been renamed to `GridListViewColDef`.
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
-const listViewColDef: GridListColDef = {
|
|
37
|
+
+const listViewColDef: GridListViewColDef = {
|
|
38
|
+
field: 'listColumn',
|
|
39
|
+
renderCell: ListViewCell,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
<DataGridPro
|
|
43
|
+
- unstable_listView
|
|
44
|
+
- unstable_listColumn={listViewColDef}
|
|
45
|
+
+ listView
|
|
46
|
+
+ listViewColumn={listViewColDef}
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The `useGridApiEventHandler()` hook has been renamed to `useGridEvent()`.
|
|
51
|
+
- The `useGridApiOptionHandler()` hook has been renamed to `useGridEventPriority()`.
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid@8.0.0-beta.3`
|
|
54
|
+
|
|
55
|
+
- [DataGrid] Fix "is any of" autocomplete rendering (#17226) @KenanYusuf
|
|
56
|
+
- [DataGrid] Rename `useGridApiEventHandler()` to `useGridEvent()` (#17159) @romgrk
|
|
57
|
+
- [DataGrid] Support adding a label to the grid (#17147) @KenanYusuf
|
|
58
|
+
- [DataGrid] Refactor: remove material typings (#17119) @romgrk
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-data-grid-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
61
|
+
|
|
62
|
+
Same changes as in `@mui/x-data-grid@8.0.0-beta.3`, plus:
|
|
63
|
+
|
|
64
|
+
- [DataGridPro] Make list view feature stable (#17217) @KenanYusuf
|
|
65
|
+
- [DataGridPro] Always refetch lazy-loading rows (#16827) @MBilalShafi
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-data-grid-premium@8.0.0-beta.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.3`.
|
|
70
|
+
|
|
71
|
+
### Date and Time Pickers
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-date-pickers@8.0.0-beta.3`
|
|
74
|
+
|
|
75
|
+
- [pickers] Add new `nextOrAccept` action bar action (#17037) @flaviendelangle
|
|
76
|
+
- [pickers] Improve the Multi Section Digital Clock scrollbar thickness (#16774) @oliviertassinari
|
|
77
|
+
- [TimePicker] Align the Digital Clock scrollbar thickness (#17203) @LukasTy
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-date-pickers-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-beta.3`.
|
|
82
|
+
|
|
83
|
+
### Charts
|
|
84
|
+
|
|
85
|
+
#### Breaking changes
|
|
86
|
+
|
|
87
|
+
- Removed `react-spring` as a dependency of `@mui/x-charts`.
|
|
88
|
+
A consequence of this change is that the props of some slots have been changed because the `SpringValue` wrapper has been removed. The affected slots and props are:
|
|
89
|
+
|
|
90
|
+
- the type of the `x`, `y`, `width` and `height` props of the `bar` slot are now `number`;
|
|
91
|
+
- the type of `startAngle`, `endAngle`, `innerRadius`, `outerRadius`, `arcLabelRadius`, `cornerRadius` and `paddingAngle` props of `pieArc` and `pieArcLabel` slot are now `number`.
|
|
92
|
+
|
|
93
|
+
Additionally, the `pieArc` slot now receives a `skipAnimation` prop to configure whether animations should be enabled or disabled.
|
|
94
|
+
|
|
95
|
+
- Tick labels in the y-axis of cartesian charts will now have an ellipsis applied to prevent overflow.
|
|
96
|
+
If your tick labels are being clipped sooner than you would like, you can increase the y-axis size by increasing its width property.
|
|
97
|
+
|
|
98
|
+
- The tooltip DOM structure is modified to improve accessibility. If you relied on it to apply some style or run tests, you might be impacted by this modification.
|
|
99
|
+
- The axis tooltip displays a table per axis with the axis value in a caption.
|
|
100
|
+
- Cells containing the series label and the color mark got merged in a th cell.
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-charts@8.0.0-beta.3`
|
|
103
|
+
|
|
104
|
+
- [charts] Adjust color palettes (#17209) @noraleonte
|
|
105
|
+
- [charts] Allow multiple axes in the tooltip (#17058) @alexfauquette
|
|
106
|
+
- [charts] Improve custom legend docs (#17231) @JCQuintas
|
|
107
|
+
- [charts] Fix crash when item shown in tooltip is unmounted (#17169) @bernardobelchior
|
|
108
|
+
- [charts] Migrate some animations from `react-spring` (#16961) @bernardobelchior
|
|
109
|
+
- [charts] Remove `react-spring` (#17123) @bernardobelchior
|
|
110
|
+
- [charts] Fix y-axis tick label overflow (#16846) @bernardobelchior
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-charts-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-charts@8.0.0-beta.3`.
|
|
115
|
+
|
|
116
|
+
### Tree View
|
|
117
|
+
|
|
118
|
+
#### `@mui/x-tree-view@8.0.0-beta.3`
|
|
119
|
+
|
|
120
|
+
Internal changes.
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-tree-view-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
123
|
+
|
|
124
|
+
Same changes as in `@mui/x-tree-view@8.0.0-beta.3`.
|
|
125
|
+
|
|
126
|
+
### `@mui/x-codemod@8.0.0-beta.3`
|
|
127
|
+
|
|
128
|
+
- [codemod] Add `listView` prop rename codemod (#17220) @MBilalShafi
|
|
129
|
+
|
|
130
|
+
### Docs
|
|
131
|
+
|
|
132
|
+
- [docs] Add "Usage with Material UI v5/v6" guide (#17164) @cherniavskii
|
|
133
|
+
- [docs] Fix 301 link @oliviertassinari
|
|
134
|
+
- [docs] Fix redirection getting-started (#17200) @oliviertassinari
|
|
135
|
+
- [docs] Sync Stack Overflow docs with reality (#17198) @oliviertassinari
|
|
136
|
+
- [docs] Update Localization Provider JSDoc link (#17207) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Core
|
|
139
|
+
|
|
140
|
+
- [core] Cleanup `@mui` dependency versions (#17160) @LukasTy
|
|
141
|
+
- [core] Sync scorecards.yml across codebase @oliviertassinari
|
|
142
|
+
- [core] Revert upgrade to React 19.1 (#17206) @bernardobelchior
|
|
143
|
+
- [code-infra] Fix `test:unit` warning (#17224) @JCQuintas
|
|
144
|
+
- [code-infra] Fix pickers failing test after clock=fake removal (#17202) @JCQuintas
|
|
145
|
+
- [code-infra] Remove clock=fake from `describeValidation` (#17150) @JCQuintas
|
|
146
|
+
- [code-infra] Remove clock=fake from `describeValue` (#17199) @JCQuintas
|
|
147
|
+
- [infra] Add write permission for actions in issue status label handler (#17161) @michelengelen
|
|
148
|
+
|
|
149
|
+
## 8.0.0-beta.2
|
|
150
|
+
|
|
151
|
+
_Mar 27, 2025_
|
|
152
|
+
|
|
153
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
154
|
+
|
|
155
|
+
- 🔍 Update the Data Grid quick filter to be collapsed when not in use
|
|
156
|
+
- 🐞 Bugfixes
|
|
157
|
+
|
|
158
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
159
|
+
@lhilgert9.
|
|
160
|
+
Following are all team members who have contributed to this release:
|
|
161
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @hasdfa, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @mnajdova, @romgrk.
|
|
162
|
+
|
|
163
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
164
|
+
|
|
165
|
+
### Data Grid
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-data-grid@8.0.0-beta.2`
|
|
168
|
+
|
|
169
|
+
- [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17057) @arminmeh
|
|
170
|
+
- [DataGrid] Refactor: remove more material (#16922) @romgrk
|
|
171
|
+
- [DataGrid] Update Quick Filter component to be expandable (#16862) @KenanYusuf
|
|
172
|
+
- [DataGrid] Fix crash when used with `@mui/styled-engine-sc` (#17154) @KenanYusuf
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-data-grid-pro@8.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
175
|
+
|
|
176
|
+
Same changes as in `@mui/x-data-grid@8.0.0-beta.2`, plus:
|
|
177
|
+
|
|
178
|
+
- [DataGridPro] Data source: Allow expanding groups with unknown children (#17144) @MBilalShafi
|
|
179
|
+
|
|
180
|
+
#### `@mui/x-data-grid-premium@8.0.0-beta.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
181
|
+
|
|
182
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.2`.
|
|
183
|
+
|
|
184
|
+
### Date and Time Pickers
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-date-pickers@8.0.0-beta.2`
|
|
187
|
+
|
|
188
|
+
- [fields] Extract the props of each field slot into a standalone hook for easier re-use (#17114) @flaviendelangle
|
|
189
|
+
- [pickers] Fix visual regression in Date Range Calendar's day (#17148) @flaviendelangle
|
|
190
|
+
- [pickers] Remove all code duplication to apply default values to validation props (#17038) @flaviendelangle
|
|
191
|
+
|
|
192
|
+
#### `@mui/x-date-pickers-pro@8.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
193
|
+
|
|
194
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-beta.2`.
|
|
195
|
+
|
|
196
|
+
### Charts
|
|
197
|
+
|
|
198
|
+
#### `@mui/x-charts@8.0.0-beta.2`
|
|
199
|
+
|
|
200
|
+
- [charts] Memoize axes and series with default (#17156) @alexfauquette
|
|
201
|
+
- [charts] Add pie benchmark (#17115) @JCQuintas
|
|
202
|
+
- [charts] Fix CSS vars support for dark theme (#17106) @alexfauquette
|
|
203
|
+
- [charts] Fix radar hover (#17134) @alexfauquette
|
|
204
|
+
- [charts] Move axis interaction to selectors (#17039) @alexfauquette
|
|
205
|
+
- [charts] Fix Pie benchmark (#17125) @JCQuintas
|
|
206
|
+
|
|
207
|
+
#### `@mui/x-charts-pro@8.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
208
|
+
|
|
209
|
+
Same changes as in `@mui/x-charts@8.0.0-beta.2`.
|
|
210
|
+
|
|
211
|
+
### Tree View
|
|
212
|
+
|
|
213
|
+
#### `@mui/x-tree-view@8.0.0-beta.2`
|
|
214
|
+
|
|
215
|
+
Internal changes.
|
|
216
|
+
|
|
217
|
+
#### `@mui/x-tree-view-pro@8.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
218
|
+
|
|
219
|
+
Same changes as in `@mui/x-tree-view@8.0.0-beta.2`.
|
|
220
|
+
|
|
221
|
+
### `@mui/x-codemod@8.0.0-beta.1`
|
|
222
|
+
|
|
223
|
+
- [codemod] Add Data Grid codemods (#17121, #17124) @MBilalShafi
|
|
224
|
+
|
|
225
|
+
### Docs
|
|
226
|
+
|
|
227
|
+
- [docs] Fix example import for `ExportExcel` component (#17110) @KenanYusuf
|
|
228
|
+
|
|
229
|
+
### Core
|
|
230
|
+
|
|
231
|
+
- [code-infra] Remove `@mui/styles` dependency & patches (#17071) @mnajdova
|
|
232
|
+
- [code-infra] Add more tests to slow screenshot tests (#17075) @JCQuintas
|
|
233
|
+
- [code-infra] Fix pickers codecov (#17120) @JCQuintas
|
|
234
|
+
- [code-infra] Move `isDeepEqual` to @mui/x-internals (#17129) @JCQuintas
|
|
235
|
+
- [code-infra] Remove `test_regressions` step from React 18 pipeline (#17108) @LukasTy
|
|
236
|
+
- [code-infra] Update some data-grid tests for vitest (#17078, #17104, #17146) @JCQuintas
|
|
237
|
+
- [code-infra] Update some date-pickers tests for vitest (#17083) @JCQuintas
|
|
238
|
+
- [infra] Update `issue-status-label-handler.yml` @michelengelen
|
|
239
|
+
- [infra] Added reusable issue status label handler workflow (#17145) @michelengelen
|
|
240
|
+
- [infra] Switch to reusable 'stale issues/PRs' workflow (#17107) @michelengelen
|
|
241
|
+
- [telemetry] Improve request body size, update dependencies, and optimize SSR handling (#17008) @hasdfa
|
|
242
|
+
|
|
243
|
+
## 8.0.0-beta.1
|
|
244
|
+
|
|
245
|
+
_Mar 21, 2025_
|
|
246
|
+
|
|
247
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
248
|
+
|
|
249
|
+
- 🐞 Bugfixes
|
|
250
|
+
|
|
251
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
252
|
+
@jyash97.
|
|
253
|
+
Following are all team members who have contributed to this release:
|
|
254
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf.
|
|
255
|
+
|
|
256
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
257
|
+
|
|
258
|
+
### Data Grid
|
|
259
|
+
|
|
260
|
+
#### `@mui/x-data-grid@8.0.0-beta.1`
|
|
261
|
+
|
|
262
|
+
- [DataGrid] Fix error caused by `forwardRef` to `ClickAwayListener` (#17049) @arminmeh
|
|
263
|
+
- [DataGrid] Fix error while editing rows with custom id (#17048) @arminmeh
|
|
264
|
+
|
|
265
|
+
#### `@mui/x-data-grid-pro@8.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
266
|
+
|
|
267
|
+
Same changes as in `@mui/x-data-grid@8.0.0-beta.1`, plus:
|
|
268
|
+
|
|
269
|
+
- [DataGridPro] Fix header select checkbox state with `checkboxSelectionVisibleOnly` and `paginationMode="server"` (#17026) @arminmeh
|
|
270
|
+
|
|
271
|
+
#### `@mui/x-data-grid-premium@8.0.0-beta.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
272
|
+
|
|
273
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.1`, plus:
|
|
274
|
+
|
|
275
|
+
- [DataGridPremium] Update column state correctly when grouping mode is updated with one grouping column (#17069) @arminmeh
|
|
276
|
+
|
|
277
|
+
### Date and Time Pickers
|
|
278
|
+
|
|
279
|
+
#### `@mui/x-date-pickers@8.0.0-beta.1`
|
|
280
|
+
|
|
281
|
+
- [fields] Clean the `useField` hook (part 1) (#16944) @flaviendelangle
|
|
282
|
+
- [fields] Improve the check for year in `doesSectionFormatHaveLeadingZeros` (#17051) @flaviendelangle
|
|
283
|
+
- [pickers] Deprecate the `disableOpenPicker` prop (#17040) @flaviendelangle
|
|
284
|
+
- [pickers] Simplify the `cleanLeadingZeros` method (#17063) @flaviendelangle
|
|
285
|
+
- [pickers] Use the new `ownerState` in `PickersDay` and `DateRangePickerDay` (#17035) @flaviendelangle
|
|
286
|
+
|
|
287
|
+
#### `@mui/x-date-pickers-pro@8.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
288
|
+
|
|
289
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-beta.1`, plus:
|
|
290
|
+
|
|
291
|
+
- [DateRangePicker] Use desktop media query constant on range pickers (#17052) @flaviendelangle
|
|
292
|
+
|
|
293
|
+
### Charts
|
|
294
|
+
|
|
295
|
+
#### `@mui/x-charts@8.0.0-beta.1`
|
|
296
|
+
|
|
297
|
+
- [charts] Fix horizontal bar with multiple axes (#17059) @alexfauquette
|
|
298
|
+
|
|
299
|
+
#### `@mui/x-charts-pro@8.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
300
|
+
|
|
301
|
+
Same changes as in `@mui/x-charts@8.0.0-beta.1`, plus:
|
|
302
|
+
|
|
303
|
+
- [charts-pro] Allow disabling Heatmap tooltip (#17060) @JCQuintas
|
|
304
|
+
|
|
305
|
+
### Tree View
|
|
306
|
+
|
|
307
|
+
#### `@mui/x-tree-view@8.0.0-beta.1`
|
|
308
|
+
|
|
309
|
+
Internal changes.
|
|
310
|
+
|
|
311
|
+
#### `@mui/x-tree-view-pro@8.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
312
|
+
|
|
313
|
+
Same changes as in `@mui/x-tree-view@8.0.0-beta.1`.
|
|
314
|
+
|
|
315
|
+
### Docs
|
|
316
|
+
|
|
317
|
+
- [docs] Fix 404 (#17033) @alexfauquette
|
|
318
|
+
- [docs] Fix Data Grid advanced list view demo (#17064) @KenanYusuf
|
|
319
|
+
|
|
8
320
|
## 8.0.0-beta.0
|
|
9
321
|
|
|
10
322
|
<img width="100%" alt="MUI X v8 Beta is live" src="https://github.com/user-attachments/assets/61ec4dd8-c946-456b-8b45-d51de8772f5d">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isDeepEqual.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isDeepEqual.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on `fast-deep-equal`
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2017 Evgeny Poberezkin
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Check if two values are deeply equal.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isDeepEqual<T>(actual: any, expected: T): actual is T;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on `fast-deep-equal`
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2017 Evgeny Poberezkin
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Check if two values are deeply equal.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export function isDeepEqual(a, b) {
|
|
32
|
+
if (a === b) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
if (a && b && typeof a === 'object' && typeof b === 'object') {
|
|
36
|
+
if (a.constructor !== b.constructor) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (Array.isArray(a)) {
|
|
40
|
+
const length = a.length;
|
|
41
|
+
if (length !== b.length) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
for (let i = 0; i < length; i += 1) {
|
|
45
|
+
if (!isDeepEqual(a[i], b[i])) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
if (a instanceof Map && b instanceof Map) {
|
|
52
|
+
if (a.size !== b.size) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const entriesA = Array.from(a.entries());
|
|
56
|
+
for (let i = 0; i < entriesA.length; i += 1) {
|
|
57
|
+
if (!b.has(entriesA[i][0])) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
for (let i = 0; i < entriesA.length; i += 1) {
|
|
62
|
+
const entryA = entriesA[i];
|
|
63
|
+
if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (a instanceof Set && b instanceof Set) {
|
|
70
|
+
if (a.size !== b.size) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
const entries = Array.from(a.entries());
|
|
74
|
+
for (let i = 0; i < entries.length; i += 1) {
|
|
75
|
+
if (!b.has(entries[i][0])) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
82
|
+
const length = a.length;
|
|
83
|
+
if (length !== b.length) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
for (let i = 0; i < length; i += 1) {
|
|
87
|
+
if (a[i] !== b[i]) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
if (a.constructor === RegExp) {
|
|
94
|
+
return a.source === b.source && a.flags === b.flags;
|
|
95
|
+
}
|
|
96
|
+
if (a.valueOf !== Object.prototype.valueOf) {
|
|
97
|
+
return a.valueOf() === b.valueOf();
|
|
98
|
+
}
|
|
99
|
+
if (a.toString !== Object.prototype.toString) {
|
|
100
|
+
return a.toString() === b.toString();
|
|
101
|
+
}
|
|
102
|
+
const keys = Object.keys(a);
|
|
103
|
+
const length = keys.length;
|
|
104
|
+
if (length !== Object.keys(b).length) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
for (let i = 0; i < length; i += 1) {
|
|
108
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
for (let i = 0; i < length; i += 1) {
|
|
113
|
+
const key = keys[i];
|
|
114
|
+
if (!isDeepEqual(a[key], b[key])) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// true if both NaN, false otherwise
|
|
122
|
+
// eslint-disable-next-line no-self-compare
|
|
123
|
+
return a !== a && b !== b;
|
|
124
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isDeepEqual.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _isDeepEqual = require("./isDeepEqual");
|
|
7
|
+
Object.keys(_isDeepEqual).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _isDeepEqual[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _isDeepEqual[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on `fast-deep-equal`
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2017 Evgeny Poberezkin
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Check if two values are deeply equal.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isDeepEqual<T>(actual: any, expected: T): actual is T;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isDeepEqual = isDeepEqual;
|
|
7
|
+
/**
|
|
8
|
+
* Based on `fast-deep-equal`
|
|
9
|
+
*
|
|
10
|
+
* MIT License
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2017 Evgeny Poberezkin
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
* furnished to do so, subject to the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
* copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
* SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check if two values are deeply equal.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
function isDeepEqual(a, b) {
|
|
38
|
+
if (a === b) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (a && b && typeof a === 'object' && typeof b === 'object') {
|
|
42
|
+
if (a.constructor !== b.constructor) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (Array.isArray(a)) {
|
|
46
|
+
const length = a.length;
|
|
47
|
+
if (length !== b.length) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
for (let i = 0; i < length; i += 1) {
|
|
51
|
+
if (!isDeepEqual(a[i], b[i])) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
if (a instanceof Map && b instanceof Map) {
|
|
58
|
+
if (a.size !== b.size) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const entriesA = Array.from(a.entries());
|
|
62
|
+
for (let i = 0; i < entriesA.length; i += 1) {
|
|
63
|
+
if (!b.has(entriesA[i][0])) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
for (let i = 0; i < entriesA.length; i += 1) {
|
|
68
|
+
const entryA = entriesA[i];
|
|
69
|
+
if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
if (a instanceof Set && b instanceof Set) {
|
|
76
|
+
if (a.size !== b.size) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const entries = Array.from(a.entries());
|
|
80
|
+
for (let i = 0; i < entries.length; i += 1) {
|
|
81
|
+
if (!b.has(entries[i][0])) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
88
|
+
const length = a.length;
|
|
89
|
+
if (length !== b.length) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
for (let i = 0; i < length; i += 1) {
|
|
93
|
+
if (a[i] !== b[i]) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (a.constructor === RegExp) {
|
|
100
|
+
return a.source === b.source && a.flags === b.flags;
|
|
101
|
+
}
|
|
102
|
+
if (a.valueOf !== Object.prototype.valueOf) {
|
|
103
|
+
return a.valueOf() === b.valueOf();
|
|
104
|
+
}
|
|
105
|
+
if (a.toString !== Object.prototype.toString) {
|
|
106
|
+
return a.toString() === b.toString();
|
|
107
|
+
}
|
|
108
|
+
const keys = Object.keys(a);
|
|
109
|
+
const length = keys.length;
|
|
110
|
+
if (length !== Object.keys(b).length) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
for (let i = 0; i < length; i += 1) {
|
|
114
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
for (let i = 0; i < length; i += 1) {
|
|
119
|
+
const key = keys[i];
|
|
120
|
+
if (!isDeepEqual(a[key], b[key])) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// true if both NaN, false otherwise
|
|
128
|
+
// eslint-disable-next-line no-self-compare
|
|
129
|
+
return a !== a && b !== b;
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isDeepEqual.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isDeepEqual.js";
|