@mui/x-data-grid 6.19.1 → 6.19.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +84 -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/heIL.js +7 -8
  35. package/legacy/locales/plPL.js +0 -1
  36. package/legacy/utils/utils.js +0 -1
  37. package/locales/coreLocales.js +1 -0
  38. package/locales/heIL.js +7 -8
  39. package/locales/plPL.js +0 -1
  40. package/modern/components/GridRow.js +0 -1
  41. package/modern/components/base/GridOverlays.js +0 -2
  42. package/modern/components/cell/GridActionsCell.js +0 -1
  43. package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
  44. package/modern/components/virtualization/GridVirtualScroller.js +0 -1
  45. package/modern/hooks/features/editing/useGridCellEditing.js +0 -2
  46. package/modern/hooks/features/editing/useGridRowEditing.js +0 -1
  47. package/modern/hooks/features/rows/gridRowsUtils.js +4 -1
  48. package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
  49. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  50. package/modern/index.js +1 -1
  51. package/modern/locales/coreLocales.js +1 -0
  52. package/modern/locales/heIL.js +7 -8
  53. package/modern/locales/plPL.js +0 -1
  54. package/modern/utils/utils.js +0 -1
  55. package/node/components/GridRow.js +0 -1
  56. package/node/components/base/GridOverlays.js +0 -2
  57. package/node/components/cell/GridActionsCell.js +0 -1
  58. package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
  59. package/node/components/virtualization/GridVirtualScroller.js +0 -1
  60. package/node/hooks/features/editing/useGridCellEditing.js +0 -2
  61. package/node/hooks/features/editing/useGridRowEditing.js +0 -1
  62. package/node/hooks/features/rows/gridRowsUtils.js +4 -1
  63. package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
  64. package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
  65. package/node/index.js +1 -1
  66. package/node/locales/heIL.js +7 -8
  67. package/node/locales/plPL.js +0 -1
  68. package/node/utils/utils.js +0 -1
  69. package/package.json +1 -1
  70. package/utils/utils.js +0 -1
@@ -126,7 +126,6 @@ function GridActionsCell(props) {
126
126
  if (newIndex < 0 || newIndex >= numberOfButtons) {
127
127
  return; // We're already in the first or last item = do nothing and let the grid listen the event
128
128
  }
129
-
130
129
  if (newIndex !== focusedButtonIndex) {
131
130
  event.preventDefault(); // Prevent scrolling
132
131
  event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
@@ -123,12 +123,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
123
123
  * Function responsible for formatting values of quick filter in a string when the model is modified
124
124
  * @param {any[]} values The new values passed to the quick filter model
125
125
  * @returns {string} The string to display in the text field
126
+ * @default (values: string[]) => values.join(' ')
126
127
  */
127
128
  quickFilterFormatter: PropTypes.func,
128
129
  /**
129
130
  * Function responsible for parsing text input in an array of independent values for quick filtering.
130
131
  * @param {string} input The value entered by the user
131
132
  * @returns {any[]} The array of value on which quick filter is applied
133
+ * @default (searchText: string) => searchText
134
+ * .split(' ')
135
+ * .filter((word) => word !== '')
132
136
  */
133
137
  quickFilterParser: PropTypes.func
134
138
  } : void 0;
@@ -29,7 +29,6 @@ const VirtualScrollerRoot = styled('div', {
29
29
  },
30
30
  zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
31
31
  });
32
-
33
32
  const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
34
33
  const rootProps = useGridRootProps();
35
34
  const classes = useUtilityClasses(rootProps);
@@ -81,7 +81,6 @@ export const useGridCellEditing = (apiRef, props) => {
81
81
  reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;
82
82
  event.preventDefault(); // Prevent going to the next element in the tab sequence
83
83
  }
84
-
85
84
  if (reason) {
86
85
  const newParams = _extends({}, params, {
87
86
  reason
@@ -175,7 +174,6 @@ export const useGridCellEditing = (apiRef, props) => {
175
174
  if (props.cellModesModel && isNewModelDifferentFromProp) {
176
175
  return; // The prop always win
177
176
  }
178
-
179
177
  setCellModesModel(newModel);
180
178
  cellModesModelRef.current = newModel;
181
179
  apiRef.current.publishEvent('cellModesModelChange', newModel);
@@ -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.3
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: {
@@ -60,13 +60,12 @@ const heILGrid = {
60
60
  filterOperatorIsEmpty: 'ריק',
61
61
  filterOperatorIsNotEmpty: 'אינו ריק',
62
62
  filterOperatorIsAnyOf: 'הוא אחד מ-',
63
- // 'filterOperator=': '=',
64
- // 'filterOperator!=': '!=',
65
- // 'filterOperator>': '>',
66
- // 'filterOperator>=': '>=',
67
- // 'filterOperator<': '<',
68
- // 'filterOperator<=': '<=',
69
-
63
+ 'filterOperator=': '=',
64
+ 'filterOperator!=': '!=',
65
+ 'filterOperator>': '>',
66
+ 'filterOperator>=': '>=',
67
+ 'filterOperator<': '<',
68
+ 'filterOperator<=': '<=',
70
69
  // Header filter operators text
71
70
  headerFilterOperatorContains: 'מכיל',
72
71
  headerFilterOperatorEquals: 'שווה',
@@ -134,7 +133,7 @@ const heILGrid = {
134
133
  groupColumn: name => `קבץ לפי ${name}`,
135
134
  unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
136
135
  // Master/detail
137
- // detailPanelToggle: 'Detail panel toggle',
136
+ detailPanelToggle: 'הצג/הסתר פרטים',
138
137
  expandDetailPanel: 'הרחב',
139
138
  collapseDetailPanel: 'כווץ',
140
139
  // Row reordering text
@@ -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.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -66,13 +66,12 @@ const heILGrid = {
66
66
  filterOperatorIsEmpty: 'ריק',
67
67
  filterOperatorIsNotEmpty: 'אינו ריק',
68
68
  filterOperatorIsAnyOf: 'הוא אחד מ-',
69
- // 'filterOperator=': '=',
70
- // 'filterOperator!=': '!=',
71
- // 'filterOperator>': '>',
72
- // 'filterOperator>=': '>=',
73
- // 'filterOperator<': '<',
74
- // 'filterOperator<=': '<=',
75
-
69
+ 'filterOperator=': '=',
70
+ 'filterOperator!=': '!=',
71
+ 'filterOperator>': '>',
72
+ 'filterOperator>=': '>=',
73
+ 'filterOperator<': '<',
74
+ 'filterOperator<=': '<=',
76
75
  // Header filter operators text
77
76
  headerFilterOperatorContains: 'מכיל',
78
77
  headerFilterOperatorEquals: 'שווה',
@@ -140,7 +139,7 @@ const heILGrid = {
140
139
  groupColumn: name => `קבץ לפי ${name}`,
141
140
  unGroupColumn: name => `הפסק לקבץ לפי ${name}`,
142
141
  // Master/detail
143
- // detailPanelToggle: 'Detail panel toggle',
142
+ detailPanelToggle: 'הצג/הסתר פרטים',
144
143
  expandDetailPanel: 'הרחב',
145
144
  collapseDetailPanel: 'כווץ',
146
145
  // Row reordering text
@@ -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.3",
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();