@mui/x-data-grid 8.0.0-beta.0 → 8.0.0-beta.2
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 +171 -0
- package/DataGrid/DataGrid.js +2 -0
- package/components/GridRow.js +3 -8
- package/components/GridShadowScrollArea.js +43 -35
- package/components/cell/GridBooleanCell.d.ts +1 -2
- package/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/components/containers/GridToolbarContainer.js +5 -3
- package/components/quickFilter/QuickFilter.d.ts +26 -3
- package/components/quickFilter/QuickFilter.js +103 -19
- package/components/quickFilter/QuickFilterClear.js +10 -4
- package/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/components/quickFilter/QuickFilterControl.js +36 -10
- package/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/components/quickFilter/QuickFilterTrigger.js +211 -0
- package/components/quickFilter/index.d.ts +2 -1
- package/components/quickFilter/index.js +11 -0
- package/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/components/toolbar/GridToolbarQuickFilter.js +101 -41
- package/components/toolbarV8/GridToolbar.js +22 -19
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/toolbarV8/Toolbar.js +76 -23
- package/components/toolbarV8/ToolbarButton.js +34 -14
- package/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/esm/DataGrid/DataGrid.js +2 -0
- package/esm/components/GridRow.js +4 -9
- package/esm/components/GridShadowScrollArea.js +43 -35
- package/esm/components/cell/GridBooleanCell.d.ts +1 -2
- package/esm/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/esm/components/containers/GridToolbarContainer.js +5 -3
- package/esm/components/quickFilter/QuickFilter.d.ts +26 -3
- package/esm/components/quickFilter/QuickFilter.js +101 -17
- package/esm/components/quickFilter/QuickFilterClear.js +10 -4
- package/esm/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/esm/components/quickFilter/QuickFilterControl.js +36 -10
- package/esm/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/esm/components/quickFilter/QuickFilterTrigger.js +204 -0
- package/esm/components/quickFilter/index.d.ts +2 -1
- package/esm/components/quickFilter/index.js +2 -1
- package/esm/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/esm/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/esm/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/esm/components/toolbar/GridToolbarQuickFilter.js +102 -44
- package/esm/components/toolbarV8/GridToolbar.js +22 -19
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/toolbarV8/Toolbar.js +75 -22
- package/esm/components/toolbarV8/ToolbarButton.js +34 -14
- package/esm/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +0 -1
- package/esm/hooks/features/dimensions/useGridDimensions.js +1 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +1 -1
- package/esm/hooks/features/pagination/useGridPaginationModel.js +1 -1
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +12 -1
- package/esm/index.js +1 -1
- package/esm/locales/deDE.js +13 -13
- package/esm/material/index.js +1 -2
- package/esm/models/props/DataGridProps.d.ts +6 -2
- package/esm/utils/utils.d.ts +0 -27
- package/esm/utils/utils.js +0 -122
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +2 -2
- package/hooks/features/columns/useGridColumns.js +0 -1
- package/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/filter/useGridFilter.js +3 -3
- package/hooks/features/pagination/useGridPaginationModel.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +11 -0
- package/index.js +1 -1
- package/locales/deDE.js +13 -13
- package/material/index.js +1 -2
- package/models/props/DataGridProps.d.ts +6 -2
- package/modern/DataGrid/DataGrid.js +2 -0
- package/modern/components/GridRow.js +4 -9
- package/modern/components/GridShadowScrollArea.js +43 -35
- package/modern/components/cell/GridBooleanCell.d.ts +1 -2
- package/modern/components/cell/GridEditSingleSelectCell.d.ts +4 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +1 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -2
- package/modern/components/containers/GridToolbarContainer.js +5 -3
- package/modern/components/quickFilter/QuickFilter.d.ts +26 -3
- package/modern/components/quickFilter/QuickFilter.js +101 -17
- package/modern/components/quickFilter/QuickFilterClear.js +10 -4
- package/modern/components/quickFilter/QuickFilterContext.d.ts +4 -1
- package/modern/components/quickFilter/QuickFilterControl.js +36 -10
- package/modern/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
- package/modern/components/quickFilter/QuickFilterTrigger.js +204 -0
- package/modern/components/quickFilter/index.d.ts +2 -1
- package/modern/components/quickFilter/index.js +2 -1
- package/modern/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarExport.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
- package/modern/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -4
- package/modern/components/toolbar/GridToolbarQuickFilter.js +102 -44
- package/modern/components/toolbarV8/GridToolbar.js +22 -19
- package/modern/components/toolbarV8/Toolbar.d.ts +1 -1
- package/modern/components/toolbarV8/Toolbar.js +75 -22
- package/modern/components/toolbarV8/ToolbarButton.js +34 -14
- package/modern/components/toolbarV8/ToolbarContext.d.ts +4 -2
- package/modern/constants/gridClasses.d.ts +12 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +0 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- package/modern/hooks/features/pagination/useGridPaginationModel.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +12 -1
- package/modern/index.js +1 -1
- package/modern/locales/deDE.js +13 -13
- package/modern/material/index.js +1 -2
- package/modern/models/props/DataGridProps.d.ts +6 -2
- package/modern/utils/utils.d.ts +0 -27
- package/modern/utils/utils.js +0 -122
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/utils.d.ts +0 -27
- package/utils/utils.js +0 -123
package/utils/utils.d.ts
CHANGED
|
@@ -12,33 +12,6 @@ export declare const clamp: (value: number, min: number, max: number) => number;
|
|
|
12
12
|
* Create an array containing the range [from, to[
|
|
13
13
|
*/
|
|
14
14
|
export declare function range(from: number, to: number): number[];
|
|
15
|
-
/**
|
|
16
|
-
* Based on `fast-deep-equal`
|
|
17
|
-
*
|
|
18
|
-
* MIT License
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) 2017 Evgeny Poberezkin
|
|
21
|
-
*
|
|
22
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
23
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
24
|
-
* in the Software without restriction, including without limitation the rights
|
|
25
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
26
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
27
|
-
* furnished to do so, subject to the following conditions:
|
|
28
|
-
*
|
|
29
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
30
|
-
* copies or substantial portions of the Software.
|
|
31
|
-
*
|
|
32
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
33
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
34
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
35
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
36
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
37
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
38
|
-
* SOFTWARE.
|
|
39
|
-
* We only type the public interface to avoid dozens of `as` in the function.
|
|
40
|
-
*/
|
|
41
|
-
export declare function isDeepEqual<T>(actual: any, expected: T): actual is T;
|
|
42
15
|
/**
|
|
43
16
|
* Create a random number generator from a seed. The seed
|
|
44
17
|
* ensures that the random number generator produces the
|
package/utils/utils.js
CHANGED
|
@@ -8,7 +8,6 @@ exports.createRandomNumberGenerator = createRandomNumberGenerator;
|
|
|
8
8
|
exports.deepClone = deepClone;
|
|
9
9
|
exports.escapeRegExp = escapeRegExp;
|
|
10
10
|
exports.eslintUseValue = eslintUseValue;
|
|
11
|
-
exports.isDeepEqual = isDeepEqual;
|
|
12
11
|
exports.isFunction = isFunction;
|
|
13
12
|
exports.isNumber = isNumber;
|
|
14
13
|
exports.isObject = isObject;
|
|
@@ -57,128 +56,6 @@ function range(from, to) {
|
|
|
57
56
|
}).map((_, i) => from + i);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
/**
|
|
61
|
-
* Based on `fast-deep-equal`
|
|
62
|
-
*
|
|
63
|
-
* MIT License
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) 2017 Evgeny Poberezkin
|
|
66
|
-
*
|
|
67
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
68
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
69
|
-
* in the Software without restriction, including without limitation the rights
|
|
70
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
71
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
72
|
-
* furnished to do so, subject to the following conditions:
|
|
73
|
-
*
|
|
74
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
75
|
-
* copies or substantial portions of the Software.
|
|
76
|
-
*
|
|
77
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
78
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
79
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
80
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
81
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
82
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
83
|
-
* SOFTWARE.
|
|
84
|
-
* We only type the public interface to avoid dozens of `as` in the function.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
function isDeepEqual(a, b) {
|
|
88
|
-
if (a === b) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
if (a && b && typeof a === 'object' && typeof b === 'object') {
|
|
92
|
-
if (a.constructor !== b.constructor) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
if (Array.isArray(a)) {
|
|
96
|
-
const length = a.length;
|
|
97
|
-
if (length !== b.length) {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
for (let i = 0; i < length; i += 1) {
|
|
101
|
-
if (!isDeepEqual(a[i], b[i])) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
if (a instanceof Map && b instanceof Map) {
|
|
108
|
-
if (a.size !== b.size) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
const entriesA = Array.from(a.entries());
|
|
112
|
-
for (let i = 0; i < entriesA.length; i += 1) {
|
|
113
|
-
if (!b.has(entriesA[i][0])) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
for (let i = 0; i < entriesA.length; i += 1) {
|
|
118
|
-
const entryA = entriesA[i];
|
|
119
|
-
if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
if (a instanceof Set && b instanceof Set) {
|
|
126
|
-
if (a.size !== b.size) {
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
const entries = Array.from(a.entries());
|
|
130
|
-
for (let i = 0; i < entries.length; i += 1) {
|
|
131
|
-
if (!b.has(entries[i][0])) {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
138
|
-
const length = a.length;
|
|
139
|
-
if (length !== b.length) {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
for (let i = 0; i < length; i += 1) {
|
|
143
|
-
if (a[i] !== b[i]) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
if (a.constructor === RegExp) {
|
|
150
|
-
return a.source === b.source && a.flags === b.flags;
|
|
151
|
-
}
|
|
152
|
-
if (a.valueOf !== Object.prototype.valueOf) {
|
|
153
|
-
return a.valueOf() === b.valueOf();
|
|
154
|
-
}
|
|
155
|
-
if (a.toString !== Object.prototype.toString) {
|
|
156
|
-
return a.toString() === b.toString();
|
|
157
|
-
}
|
|
158
|
-
const keys = Object.keys(a);
|
|
159
|
-
const length = keys.length;
|
|
160
|
-
if (length !== Object.keys(b).length) {
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
for (let i = 0; i < length; i += 1) {
|
|
164
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
for (let i = 0; i < length; i += 1) {
|
|
169
|
-
const key = keys[i];
|
|
170
|
-
if (!isDeepEqual(a[key], b[key])) {
|
|
171
|
-
return false;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// true if both NaN, false otherwise
|
|
178
|
-
// eslint-disable-next-line no-self-compare
|
|
179
|
-
return a !== a && b !== b;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
59
|
// Pseudo random number. See https://stackoverflow.com/a/47593316
|
|
183
60
|
function mulberry32(a) {
|
|
184
61
|
return () => {
|