@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.
Files changed (135) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/DataGrid/DataGrid.js +2 -0
  3. package/components/GridRow.js +3 -8
  4. package/components/GridShadowScrollArea.js +43 -35
  5. package/components/cell/GridBooleanCell.d.ts +1 -2
  6. package/components/cell/GridEditSingleSelectCell.d.ts +4 -4
  7. package/components/cell/GridEditSingleSelectCell.js +1 -1
  8. package/components/columnSelection/GridHeaderCheckbox.js +2 -2
  9. package/components/containers/GridToolbarContainer.js +5 -3
  10. package/components/quickFilter/QuickFilter.d.ts +26 -3
  11. package/components/quickFilter/QuickFilter.js +103 -19
  12. package/components/quickFilter/QuickFilterClear.js +10 -4
  13. package/components/quickFilter/QuickFilterContext.d.ts +4 -1
  14. package/components/quickFilter/QuickFilterControl.js +36 -10
  15. package/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
  16. package/components/quickFilter/QuickFilterTrigger.js +211 -0
  17. package/components/quickFilter/index.d.ts +2 -1
  18. package/components/quickFilter/index.js +11 -0
  19. package/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
  20. package/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
  21. package/components/toolbar/GridToolbarExport.d.ts +3 -4
  22. package/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
  23. package/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
  24. package/components/toolbar/GridToolbarFilterButton.js +1 -4
  25. package/components/toolbar/GridToolbarQuickFilter.js +101 -41
  26. package/components/toolbarV8/GridToolbar.js +22 -19
  27. package/components/toolbarV8/Toolbar.d.ts +1 -1
  28. package/components/toolbarV8/Toolbar.js +76 -23
  29. package/components/toolbarV8/ToolbarButton.js +34 -14
  30. package/components/toolbarV8/ToolbarContext.d.ts +4 -2
  31. package/constants/gridClasses.d.ts +12 -0
  32. package/constants/gridClasses.js +1 -1
  33. package/esm/DataGrid/DataGrid.js +2 -0
  34. package/esm/components/GridRow.js +4 -9
  35. package/esm/components/GridShadowScrollArea.js +43 -35
  36. package/esm/components/cell/GridBooleanCell.d.ts +1 -2
  37. package/esm/components/cell/GridEditSingleSelectCell.d.ts +4 -4
  38. package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
  39. package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -2
  40. package/esm/components/containers/GridToolbarContainer.js +5 -3
  41. package/esm/components/quickFilter/QuickFilter.d.ts +26 -3
  42. package/esm/components/quickFilter/QuickFilter.js +101 -17
  43. package/esm/components/quickFilter/QuickFilterClear.js +10 -4
  44. package/esm/components/quickFilter/QuickFilterContext.d.ts +4 -1
  45. package/esm/components/quickFilter/QuickFilterControl.js +36 -10
  46. package/esm/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
  47. package/esm/components/quickFilter/QuickFilterTrigger.js +204 -0
  48. package/esm/components/quickFilter/index.d.ts +2 -1
  49. package/esm/components/quickFilter/index.js +2 -1
  50. package/esm/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
  51. package/esm/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
  52. package/esm/components/toolbar/GridToolbarExport.d.ts +3 -4
  53. package/esm/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
  54. package/esm/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
  55. package/esm/components/toolbar/GridToolbarFilterButton.js +1 -4
  56. package/esm/components/toolbar/GridToolbarQuickFilter.js +102 -44
  57. package/esm/components/toolbarV8/GridToolbar.js +22 -19
  58. package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
  59. package/esm/components/toolbarV8/Toolbar.js +75 -22
  60. package/esm/components/toolbarV8/ToolbarButton.js +34 -14
  61. package/esm/components/toolbarV8/ToolbarContext.d.ts +4 -2
  62. package/esm/constants/gridClasses.d.ts +12 -0
  63. package/esm/constants/gridClasses.js +1 -1
  64. package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  65. package/esm/hooks/features/columns/useGridColumns.js +0 -1
  66. package/esm/hooks/features/dimensions/useGridDimensions.js +1 -1
  67. package/esm/hooks/features/editing/useGridRowEditing.js +1 -1
  68. package/esm/hooks/features/filter/useGridFilter.js +1 -1
  69. package/esm/hooks/features/pagination/useGridPaginationModel.js +1 -1
  70. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +12 -1
  71. package/esm/index.js +1 -1
  72. package/esm/locales/deDE.js +13 -13
  73. package/esm/material/index.js +1 -2
  74. package/esm/models/props/DataGridProps.d.ts +6 -2
  75. package/esm/utils/utils.d.ts +0 -27
  76. package/esm/utils/utils.js +0 -122
  77. package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +2 -2
  78. package/hooks/features/columns/useGridColumns.js +0 -1
  79. package/hooks/features/dimensions/useGridDimensions.js +2 -2
  80. package/hooks/features/editing/useGridRowEditing.js +1 -1
  81. package/hooks/features/filter/useGridFilter.js +3 -3
  82. package/hooks/features/pagination/useGridPaginationModel.js +2 -2
  83. package/hooks/features/virtualization/useGridVirtualScroller.js +11 -0
  84. package/index.js +1 -1
  85. package/locales/deDE.js +13 -13
  86. package/material/index.js +1 -2
  87. package/models/props/DataGridProps.d.ts +6 -2
  88. package/modern/DataGrid/DataGrid.js +2 -0
  89. package/modern/components/GridRow.js +4 -9
  90. package/modern/components/GridShadowScrollArea.js +43 -35
  91. package/modern/components/cell/GridBooleanCell.d.ts +1 -2
  92. package/modern/components/cell/GridEditSingleSelectCell.d.ts +4 -4
  93. package/modern/components/cell/GridEditSingleSelectCell.js +1 -1
  94. package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -2
  95. package/modern/components/containers/GridToolbarContainer.js +5 -3
  96. package/modern/components/quickFilter/QuickFilter.d.ts +26 -3
  97. package/modern/components/quickFilter/QuickFilter.js +101 -17
  98. package/modern/components/quickFilter/QuickFilterClear.js +10 -4
  99. package/modern/components/quickFilter/QuickFilterContext.d.ts +4 -1
  100. package/modern/components/quickFilter/QuickFilterControl.js +36 -10
  101. package/modern/components/quickFilter/QuickFilterTrigger.d.ts +28 -0
  102. package/modern/components/quickFilter/QuickFilterTrigger.js +204 -0
  103. package/modern/components/quickFilter/index.d.ts +2 -1
  104. package/modern/components/quickFilter/index.js +2 -1
  105. package/modern/components/toolbar/GridToolbarColumnsButton.d.ts +3 -4
  106. package/modern/components/toolbar/GridToolbarDensitySelector.d.ts +3 -4
  107. package/modern/components/toolbar/GridToolbarExport.d.ts +3 -4
  108. package/modern/components/toolbar/GridToolbarExportContainer.d.ts +3 -4
  109. package/modern/components/toolbar/GridToolbarFilterButton.d.ts +4 -6
  110. package/modern/components/toolbar/GridToolbarFilterButton.js +1 -4
  111. package/modern/components/toolbar/GridToolbarQuickFilter.js +102 -44
  112. package/modern/components/toolbarV8/GridToolbar.js +22 -19
  113. package/modern/components/toolbarV8/Toolbar.d.ts +1 -1
  114. package/modern/components/toolbarV8/Toolbar.js +75 -22
  115. package/modern/components/toolbarV8/ToolbarButton.js +34 -14
  116. package/modern/components/toolbarV8/ToolbarContext.d.ts +4 -2
  117. package/modern/constants/gridClasses.d.ts +12 -0
  118. package/modern/constants/gridClasses.js +1 -1
  119. package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  120. package/modern/hooks/features/columns/useGridColumns.js +0 -1
  121. package/modern/hooks/features/dimensions/useGridDimensions.js +1 -1
  122. package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
  123. package/modern/hooks/features/filter/useGridFilter.js +1 -1
  124. package/modern/hooks/features/pagination/useGridPaginationModel.js +1 -1
  125. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +12 -1
  126. package/modern/index.js +1 -1
  127. package/modern/locales/deDE.js +13 -13
  128. package/modern/material/index.js +1 -2
  129. package/modern/models/props/DataGridProps.d.ts +6 -2
  130. package/modern/utils/utils.d.ts +0 -27
  131. package/modern/utils/utils.js +0 -122
  132. package/package.json +2 -2
  133. package/tsconfig.build.tsbuildinfo +1 -1
  134. package/utils/utils.d.ts +0 -27
  135. 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 () => {