@mui/x-data-grid 6.19.1 → 6.19.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 (66) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/components/GridPagination.d.ts +4 -4
  3. package/components/GridRow.js +0 -1
  4. package/components/base/GridOverlays.js +0 -2
  5. package/components/cell/GridActionsCell.js +0 -1
  6. package/components/cell/GridActionsCellItem.d.ts +5 -5
  7. package/components/panel/GridPanel.d.ts +3 -3
  8. package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
  9. package/components/toolbar/GridToolbarQuickFilter.js +4 -0
  10. package/components/virtualization/GridVirtualScroller.js +0 -1
  11. package/hooks/features/editing/useGridCellEditing.js +0 -2
  12. package/hooks/features/editing/useGridRowEditing.js +0 -1
  13. package/hooks/features/rows/gridRowsUtils.js +4 -1
  14. package/hooks/features/rows/useGridRowsMeta.js +0 -1
  15. package/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  16. package/index.js +1 -1
  17. package/legacy/colDef/gridDefaultColumnTypes.js +2 -3
  18. package/legacy/components/GridPagination.js +3 -4
  19. package/legacy/components/GridRow.js +0 -1
  20. package/legacy/components/base/GridOverlays.js +0 -2
  21. package/legacy/components/cell/GridActionsCell.js +0 -1
  22. package/legacy/components/columnHeaders/GridColumnHeadersInner.js +4 -5
  23. package/legacy/components/containers/GridRootStyles.js +69 -70
  24. package/legacy/components/toolbar/GridToolbarQuickFilter.js +8 -5
  25. package/legacy/components/virtualization/GridVirtualScroller.js +0 -1
  26. package/legacy/hooks/features/editing/useGridCellEditing.js +0 -2
  27. package/legacy/hooks/features/editing/useGridRowEditing.js +0 -1
  28. package/legacy/hooks/features/rows/gridRowsUtils.js +4 -1
  29. package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
  30. package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -1
  31. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  32. package/legacy/index.js +1 -1
  33. package/legacy/locales/coreLocales.js +1 -0
  34. package/legacy/locales/plPL.js +0 -1
  35. package/legacy/utils/utils.js +0 -1
  36. package/locales/coreLocales.js +1 -0
  37. package/locales/plPL.js +0 -1
  38. package/modern/components/GridRow.js +0 -1
  39. package/modern/components/base/GridOverlays.js +0 -2
  40. package/modern/components/cell/GridActionsCell.js +0 -1
  41. package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
  42. package/modern/components/virtualization/GridVirtualScroller.js +0 -1
  43. package/modern/hooks/features/editing/useGridCellEditing.js +0 -2
  44. package/modern/hooks/features/editing/useGridRowEditing.js +0 -1
  45. package/modern/hooks/features/rows/gridRowsUtils.js +4 -1
  46. package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
  47. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  48. package/modern/index.js +1 -1
  49. package/modern/locales/coreLocales.js +1 -0
  50. package/modern/locales/plPL.js +0 -1
  51. package/modern/utils/utils.js +0 -1
  52. package/node/components/GridRow.js +0 -1
  53. package/node/components/base/GridOverlays.js +0 -2
  54. package/node/components/cell/GridActionsCell.js +0 -1
  55. package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
  56. package/node/components/virtualization/GridVirtualScroller.js +0 -1
  57. package/node/hooks/features/editing/useGridCellEditing.js +0 -2
  58. package/node/hooks/features/editing/useGridRowEditing.js +0 -1
  59. package/node/hooks/features/rows/gridRowsUtils.js +4 -1
  60. package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
  61. package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  62. package/node/index.js +1 -1
  63. package/node/locales/plPL.js +0 -1
  64. package/node/utils/utils.js +0 -1
  65. package/package.json +1 -1
  66. package/utils/utils.js +0 -1
@@ -239,7 +239,6 @@ export const useGridRowEditing = (apiRef, props) => {
239
239
  if (props.rowModesModel && isNewModelDifferentFromProp) {
240
240
  return; // The prop always win
241
241
  }
242
-
243
242
  setRowModesModel(newModel);
244
243
  rowModesModelRef.current = newModel;
245
244
  apiRef.current.publishEvent('rowModesModelChange', newModel);
@@ -131,7 +131,10 @@ export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) =>
131
131
  if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
132
132
  validDescendants.push(child);
133
133
  }
134
- validDescendants.push(...getTreeNodeDescendants(tree, child, skipAutoGeneratedRows));
134
+ const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
135
+ for (let j = 0; j < childDescendants.length; j += 1) {
136
+ validDescendants.push(childDescendants[j]);
137
+ }
135
138
  }
136
139
  if (!skipAutoGeneratedRows && node.footerId != null) {
137
140
  validDescendants.push(node.footerId);
@@ -67,7 +67,6 @@ export const useGridRowsMeta = (apiRef, props) => {
67
67
  needsFirstMeasurement: true // Assume all rows will need to be measured by default
68
68
  };
69
69
  }
70
-
71
70
  const {
72
71
  isResized,
73
72
  needsFirstMeasurement,
@@ -550,7 +550,6 @@ export const useGridVirtualScroller = props => {
550
550
  if (rootProps.autoHeight && currentPage.rows.length === 0) {
551
551
  size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
552
552
  }
553
-
554
553
  return size;
555
554
  }, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
556
555
  React.useEffect(() => {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.19.1
2
+ * @mui/x-data-grid v6.19.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -3,6 +3,7 @@
3
3
  // This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
4
4
  // in broader compatibility between the packages.
5
5
  // See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
6
+
6
7
  export const beBYCore = {
7
8
  components: {
8
9
  MuiTablePagination: {
@@ -149,5 +149,4 @@ const plPLGrid = {
149
149
  // aggregationFunctionLabelMax: 'max',
150
150
  // aggregationFunctionLabelSize: 'size',
151
151
  };
152
-
153
152
  export const plPL = getGridLocalization(plPLGrid, plPLCore);
@@ -163,7 +163,6 @@ function mulberry32(a) {
163
163
  /* eslint-enable */
164
164
  };
165
165
  }
166
-
167
166
  export function randomNumberBetween(seed, min, max) {
168
167
  const random = mulberry32(seed);
169
168
  return () => min + (max - min) * random();
@@ -61,7 +61,6 @@ function EmptyCell({
61
61
  style: style
62
62
  }); // TODO change to .MuiDataGrid-emptyCell or .MuiDataGrid-rowFiller
63
63
  }
64
-
65
64
  const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
66
65
  const {
67
66
  selected,
@@ -40,7 +40,6 @@ const GridOverlayWrapperRoot = (0, _system.styled)('div', {
40
40
  zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel
41
41
  : 4 // Should be above pinned columns and detail panel
42
42
  }));
43
-
44
43
  const GridOverlayWrapperInner = (0, _system.styled)('div', {
45
44
  name: 'MuiDataGrid',
46
45
  slot: 'OverlayWrapperInner',
@@ -71,7 +70,6 @@ function GridOverlayWrapper(props) {
71
70
  if (rootProps.autoHeight && height === 0) {
72
71
  height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
73
72
  }
74
-
75
73
  const classes = useUtilityClasses((0, _extends2.default)({}, props, {
76
74
  classes: rootProps.classes
77
75
  }));
@@ -135,7 +135,6 @@ function GridActionsCell(props) {
135
135
  if (newIndex < 0 || newIndex >= numberOfButtons) {
136
136
  return; // We're already in the first or last item = do nothing and let the grid listen the event
137
137
  }
138
-
139
138
  if (newIndex !== focusedButtonIndex) {
140
139
  event.preventDefault(); // Prevent scrolling
141
140
  event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
@@ -132,12 +132,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
132
132
  * Function responsible for formatting values of quick filter in a string when the model is modified
133
133
  * @param {any[]} values The new values passed to the quick filter model
134
134
  * @returns {string} The string to display in the text field
135
+ * @default (values: string[]) => values.join(' ')
135
136
  */
136
137
  quickFilterFormatter: _propTypes.default.func,
137
138
  /**
138
139
  * Function responsible for parsing text input in an array of independent values for quick filtering.
139
140
  * @param {string} input The value entered by the user
140
141
  * @returns {any[]} The array of value on which quick filter is applied
142
+ * @default (searchText: string) => searchText
143
+ * .split(' ')
144
+ * .filter((word) => word !== '')
141
145
  */
142
146
  quickFilterParser: _propTypes.default.func
143
147
  } : void 0;
@@ -38,7 +38,6 @@ const VirtualScrollerRoot = (0, _system.styled)('div', {
38
38
  },
39
39
  zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
40
40
  });
41
-
42
41
  const GridVirtualScroller = exports.GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
43
42
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
44
43
  const classes = useUtilityClasses(rootProps);
@@ -90,7 +90,6 @@ const useGridCellEditing = (apiRef, props) => {
90
90
  reason = event.shiftKey ? _gridEditCellParams.GridCellEditStopReasons.shiftTabKeyDown : _gridEditCellParams.GridCellEditStopReasons.tabKeyDown;
91
91
  event.preventDefault(); // Prevent going to the next element in the tab sequence
92
92
  }
93
-
94
93
  if (reason) {
95
94
  const newParams = (0, _extends2.default)({}, params, {
96
95
  reason
@@ -184,7 +183,6 @@ const useGridCellEditing = (apiRef, props) => {
184
183
  if (props.cellModesModel && isNewModelDifferentFromProp) {
185
184
  return; // The prop always win
186
185
  }
187
-
188
186
  setCellModesModel(newModel);
189
187
  cellModesModelRef.current = newModel;
190
188
  apiRef.current.publishEvent('cellModesModelChange', newModel);
@@ -248,7 +248,6 @@ const useGridRowEditing = (apiRef, props) => {
248
248
  if (props.rowModesModel && isNewModelDifferentFromProp) {
249
249
  return; // The prop always win
250
250
  }
251
-
252
251
  setRowModesModel(newModel);
253
252
  rowModesModelRef.current = newModel;
254
253
  apiRef.current.publishEvent('rowModesModelChange', newModel);
@@ -149,7 +149,10 @@ const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) => {
149
149
  if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
150
150
  validDescendants.push(child);
151
151
  }
152
- validDescendants.push(...getTreeNodeDescendants(tree, child, skipAutoGeneratedRows));
152
+ const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
153
+ for (let j = 0; j < childDescendants.length; j += 1) {
154
+ validDescendants.push(childDescendants[j]);
155
+ }
153
156
  }
154
157
  if (!skipAutoGeneratedRows && node.footerId != null) {
155
158
  validDescendants.push(node.footerId);
@@ -77,7 +77,6 @@ const useGridRowsMeta = (apiRef, props) => {
77
77
  needsFirstMeasurement: true // Assume all rows will need to be measured by default
78
78
  };
79
79
  }
80
-
81
80
  const {
82
81
  isResized,
83
82
  needsFirstMeasurement,
@@ -561,7 +561,6 @@ const useGridVirtualScroller = props => {
561
561
  if (rootProps.autoHeight && currentPage.rows.length === 0) {
562
562
  size.height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
563
563
  }
564
-
565
564
  return size;
566
565
  }, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
567
566
  React.useEffect(() => {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.19.1
2
+ * @mui/x-data-grid v6.19.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -155,5 +155,4 @@ const plPLGrid = {
155
155
  // aggregationFunctionLabelMax: 'max',
156
156
  // aggregationFunctionLabelSize: 'size',
157
157
  };
158
-
159
158
  const plPL = exports.plPL = (0, _getGridLocalization.getGridLocalization)(plPLGrid, _locale.plPL);
@@ -177,7 +177,6 @@ function mulberry32(a) {
177
177
  /* eslint-enable */
178
178
  };
179
179
  }
180
-
181
180
  function randomNumberBetween(seed, min, max) {
182
181
  const random = mulberry32(seed);
183
182
  return () => min + (max - min) * random();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "6.19.1",
3
+ "version": "6.19.2",
4
4
  "description": "The community edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
package/utils/utils.js CHANGED
@@ -163,7 +163,6 @@ function mulberry32(a) {
163
163
  /* eslint-enable */
164
164
  };
165
165
  }
166
-
167
166
  export function randomNumberBetween(seed, min, max) {
168
167
  const random = mulberry32(seed);
169
168
  return () => min + (max - min) * random();