@mui/x-data-grid 7.0.0-alpha.7 → 7.0.0-alpha.8

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 (132) hide show
  1. package/CHANGELOG.md +175 -49
  2. package/DataGrid/DataGrid.js +9 -21
  3. package/colDef/gridDateColDef.js +1 -1
  4. package/components/GridPagination.d.ts +4 -4
  5. package/components/GridPagination.js +1 -1
  6. package/components/cell/GridActionsCell.js +1 -1
  7. package/components/cell/GridActionsCellItem.d.ts +5 -5
  8. package/components/cell/GridCell.js +2 -2
  9. package/components/panel/GridPanel.d.ts +3 -3
  10. package/components/panel/filterPanel/GridFilterForm.js +1 -1
  11. package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
  12. package/components/toolbar/GridToolbarQuickFilter.js +4 -0
  13. package/hooks/core/useGridLoggerFactory.js +2 -2
  14. package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  15. package/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
  16. package/hooks/features/editing/useGridCellEditing.js +4 -4
  17. package/hooks/features/editing/useGridRowEditing.js +4 -4
  18. package/hooks/features/export/serializers/csvSerializer.js +1 -1
  19. package/hooks/features/export/useGridPrintExport.js +1 -1
  20. package/hooks/features/filter/gridFilterUtils.js +5 -5
  21. package/hooks/features/pagination/gridPaginationUtils.js +2 -2
  22. package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
  23. package/hooks/features/rows/gridRowsUtils.js +2 -2
  24. package/hooks/features/rows/useGridRows.js +7 -7
  25. package/hooks/features/rows/useGridRowsMeta.js +2 -2
  26. package/hooks/features/sorting/gridSortingUtils.js +4 -2
  27. package/hooks/utils/useGridApiContext.js +1 -1
  28. package/hooks/utils/useGridPrivateApiContext.js +1 -1
  29. package/hooks/utils/useGridRootProps.js +1 -1
  30. package/hooks/utils/useGridSelector.js +1 -1
  31. package/index.d.ts +0 -1
  32. package/index.js +1 -2
  33. package/internals/index.d.ts +1 -0
  34. package/internals/utils/index.d.ts +1 -0
  35. package/internals/utils/index.js +2 -1
  36. package/internals/utils/propValidation.d.ts +4 -0
  37. package/internals/utils/propValidation.js +19 -0
  38. package/legacy/DataGrid/DataGrid.js +14 -23
  39. package/legacy/colDef/gridDateColDef.js +1 -1
  40. package/legacy/components/GridPagination.js +1 -1
  41. package/legacy/components/cell/GridActionsCell.js +1 -1
  42. package/legacy/components/cell/GridCell.js +2 -2
  43. package/legacy/components/panel/filterPanel/GridFilterForm.js +1 -1
  44. package/legacy/components/toolbar/GridToolbarQuickFilter.js +4 -0
  45. package/legacy/hooks/core/useGridLoggerFactory.js +2 -2
  46. package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  47. package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
  48. package/legacy/hooks/features/editing/useGridCellEditing.js +4 -4
  49. package/legacy/hooks/features/editing/useGridRowEditing.js +4 -4
  50. package/legacy/hooks/features/export/serializers/csvSerializer.js +1 -1
  51. package/legacy/hooks/features/export/useGridPrintExport.js +1 -1
  52. package/legacy/hooks/features/filter/gridFilterUtils.js +5 -5
  53. package/legacy/hooks/features/pagination/gridPaginationUtils.js +2 -2
  54. package/legacy/hooks/features/rowSelection/useGridRowSelection.js +1 -1
  55. package/legacy/hooks/features/rows/gridRowsUtils.js +2 -2
  56. package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
  57. package/legacy/hooks/features/rows/useGridRows.js +7 -7
  58. package/legacy/hooks/features/rows/useGridRowsMeta.js +2 -2
  59. package/legacy/hooks/features/sorting/gridSortingUtils.js +4 -2
  60. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  61. package/legacy/hooks/utils/useGridPrivateApiContext.js +1 -1
  62. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  63. package/legacy/hooks/utils/useGridSelector.js +1 -1
  64. package/legacy/index.js +1 -2
  65. package/legacy/internals/utils/index.js +2 -1
  66. package/legacy/internals/utils/propValidation.js +21 -0
  67. package/legacy/utils/createSelector.js +1 -1
  68. package/legacy/utils/exportAs.js +1 -1
  69. package/models/props/DataGridProps.d.ts +1 -1
  70. package/modern/DataGrid/DataGrid.js +9 -21
  71. package/modern/colDef/gridDateColDef.js +1 -1
  72. package/modern/components/GridPagination.js +1 -1
  73. package/modern/components/cell/GridActionsCell.js +1 -1
  74. package/modern/components/cell/GridCell.js +2 -2
  75. package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
  76. package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
  77. package/modern/hooks/core/useGridLoggerFactory.js +2 -2
  78. package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  79. package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
  80. package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
  81. package/modern/hooks/features/editing/useGridRowEditing.js +4 -4
  82. package/modern/hooks/features/export/serializers/csvSerializer.js +1 -1
  83. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  84. package/modern/hooks/features/filter/gridFilterUtils.js +5 -5
  85. package/modern/hooks/features/pagination/gridPaginationUtils.js +2 -2
  86. package/modern/hooks/features/rowSelection/useGridRowSelection.js +1 -1
  87. package/modern/hooks/features/rows/gridRowsUtils.js +2 -2
  88. package/modern/hooks/features/rows/useGridRows.js +7 -7
  89. package/modern/hooks/features/rows/useGridRowsMeta.js +2 -2
  90. package/modern/hooks/features/sorting/gridSortingUtils.js +4 -2
  91. package/modern/hooks/utils/useGridApiContext.js +1 -1
  92. package/modern/hooks/utils/useGridPrivateApiContext.js +1 -1
  93. package/modern/hooks/utils/useGridRootProps.js +1 -1
  94. package/modern/hooks/utils/useGridSelector.js +1 -1
  95. package/modern/index.js +1 -2
  96. package/modern/internals/utils/index.js +2 -1
  97. package/modern/internals/utils/propValidation.js +19 -0
  98. package/modern/utils/createSelector.js +1 -1
  99. package/modern/utils/exportAs.js +1 -1
  100. package/node/DataGrid/DataGrid.js +9 -21
  101. package/node/colDef/gridDateColDef.js +1 -1
  102. package/node/components/GridPagination.js +1 -1
  103. package/node/components/cell/GridActionsCell.js +1 -1
  104. package/node/components/cell/GridCell.js +2 -2
  105. package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
  106. package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
  107. package/node/hooks/core/useGridLoggerFactory.js +2 -2
  108. package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
  109. package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
  110. package/node/hooks/features/editing/useGridCellEditing.js +4 -4
  111. package/node/hooks/features/editing/useGridRowEditing.js +4 -4
  112. package/node/hooks/features/export/serializers/csvSerializer.js +1 -1
  113. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  114. package/node/hooks/features/filter/gridFilterUtils.js +5 -5
  115. package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
  116. package/node/hooks/features/rowSelection/useGridRowSelection.js +1 -1
  117. package/node/hooks/features/rows/gridRowsUtils.js +2 -2
  118. package/node/hooks/features/rows/useGridRows.js +7 -7
  119. package/node/hooks/features/rows/useGridRowsMeta.js +2 -2
  120. package/node/hooks/features/sorting/gridSortingUtils.js +4 -2
  121. package/node/hooks/utils/useGridApiContext.js +1 -1
  122. package/node/hooks/utils/useGridPrivateApiContext.js +1 -1
  123. package/node/hooks/utils/useGridRootProps.js +1 -1
  124. package/node/hooks/utils/useGridSelector.js +1 -1
  125. package/node/index.js +1 -13
  126. package/node/internals/utils/index.js +11 -0
  127. package/node/internals/utils/propValidation.js +26 -0
  128. package/node/utils/createSelector.js +1 -1
  129. package/node/utils/exportAs.js +1 -1
  130. package/package.json +1 -1
  131. package/utils/createSelector.js +1 -1
  132. package/utils/exportAs.js +1 -1
@@ -20,17 +20,19 @@ var createGroupLookup = function createGroupLookup(columnGroupingModel) {
20
20
  children = node.children,
21
21
  other = _objectWithoutProperties(node, _excluded);
22
22
  if (!groupId) {
23
- throw new Error('MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.');
23
+ throw new Error('MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.');
24
24
  }
25
- if (!children) {
26
- console.warn("MUI: group groupId=".concat(groupId, " has no children."));
25
+ if (process.env.NODE_ENV !== 'production') {
26
+ if (!children) {
27
+ console.warn("MUI X: group groupId=".concat(groupId, " has no children."));
28
+ }
27
29
  }
28
30
  var groupParam = _extends({}, other, {
29
31
  groupId: groupId
30
32
  });
31
33
  var subTreeLookup = createGroupLookup(children);
32
34
  if (subTreeLookup[groupId] !== undefined || groupLookup[groupId] !== undefined) {
33
- throw new Error("MUI: The groupId ".concat(groupId, " is used multiple times in the columnGroupingModel."));
35
+ throw new Error("MUI X: The groupId ".concat(groupId, " is used multiple times in the columnGroupingModel."));
34
36
  }
35
37
  groupLookup = _extends({}, groupLookup, subTreeLookup, _defineProperty({}, groupId, groupParam));
36
38
  });
@@ -18,7 +18,7 @@ import { buildWarning } from '../../../utils/warning';
18
18
  import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector';
19
19
  import { deepClone } from '../../../utils/utils';
20
20
  import { GridCellEditStartReasons, GridCellEditStopReasons } from '../../../models/params/gridEditCellParams';
21
- var missingOnProcessRowUpdateErrorWarning = buildWarning(['MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence.'], 'error');
21
+ var missingOnProcessRowUpdateErrorWarning = buildWarning(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
22
22
  export var useGridCellEditing = function useGridCellEditing(apiRef, props) {
23
23
  var _React$useState = React.useState({}),
24
24
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -40,12 +40,12 @@ export var useGridCellEditing = function useGridCellEditing(apiRef, props) {
40
40
  var throwIfNotEditable = React.useCallback(function (id, field) {
41
41
  var params = apiRef.current.getCellParams(id, field);
42
42
  if (!apiRef.current.isCellEditable(params)) {
43
- throw new Error("MUI: The cell with id=".concat(id, " and field=").concat(field, " is not editable."));
43
+ throw new Error("MUI X: The cell with id=".concat(id, " and field=").concat(field, " is not editable."));
44
44
  }
45
45
  }, [apiRef]);
46
46
  var throwIfNotInMode = React.useCallback(function (id, field, mode) {
47
47
  if (apiRef.current.getCellMode(id, field) !== mode) {
48
- throw new Error("MUI: The cell with id=".concat(id, " and field=").concat(field, " is not in ").concat(mode, " mode."));
48
+ throw new Error("MUI X: The cell with id=".concat(id, " and field=").concat(field, " is not in ").concat(mode, " mode."));
49
49
  }
50
50
  }, [apiRef]);
51
51
  var handleCellDoubleClick = React.useCallback(function (params, event) {
@@ -299,7 +299,7 @@ export var useGridCellEditing = function useGridCellEditing(apiRef, props) {
299
299
  });
300
300
  if (onProcessRowUpdateError) {
301
301
  onProcessRowUpdateError(errorThrown);
302
- } else {
302
+ } else if (process.env.NODE_ENV !== 'production') {
303
303
  missingOnProcessRowUpdateErrorWarning();
304
304
  }
305
305
  };
@@ -18,7 +18,7 @@ import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector';
18
18
  import { deepClone } from '../../../utils/utils';
19
19
  import { GridRowEditStopReasons, GridRowEditStartReasons } from '../../../models/params/gridRowParams';
20
20
  import { GRID_ACTIONS_COLUMN_TYPE } from '../../../colDef';
21
- var missingOnProcessRowUpdateErrorWarning = buildWarning(['MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence.'], 'error');
21
+ var missingOnProcessRowUpdateErrorWarning = buildWarning(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');
22
22
  export var useGridRowEditing = function useGridRowEditing(apiRef, props) {
23
23
  var _React$useState = React.useState({}),
24
24
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -42,12 +42,12 @@ export var useGridRowEditing = function useGridRowEditing(apiRef, props) {
42
42
  var throwIfNotEditable = React.useCallback(function (id, field) {
43
43
  var params = apiRef.current.getCellParams(id, field);
44
44
  if (!apiRef.current.isCellEditable(params)) {
45
- throw new Error("MUI: The cell with id=".concat(id, " and field=").concat(field, " is not editable."));
45
+ throw new Error("MUI X: The cell with id=".concat(id, " and field=").concat(field, " is not editable."));
46
46
  }
47
47
  }, [apiRef]);
48
48
  var throwIfNotInMode = React.useCallback(function (id, mode) {
49
49
  if (apiRef.current.getRowMode(id) !== mode) {
50
- throw new Error("MUI: The row with id=".concat(id, " is not in ").concat(mode, " mode."));
50
+ throw new Error("MUI X: The row with id=".concat(id, " is not in ").concat(mode, " mode."));
51
51
  }
52
52
  }, [apiRef]);
53
53
  var handleCellDoubleClick = React.useCallback(function (params, event) {
@@ -378,7 +378,7 @@ export var useGridRowEditing = function useGridRowEditing(apiRef, props) {
378
378
  });
379
379
  if (onProcessRowUpdateError) {
380
380
  onProcessRowUpdateError(errorThrown);
381
- } else {
381
+ } else if (process.env.NODE_ENV !== 'production') {
382
382
  missingOnProcessRowUpdateErrorWarning();
383
383
  }
384
384
  };
@@ -36,7 +36,7 @@ export var serializeCellValue = function serializeCellValue(cellParams, options)
36
36
  }
37
37
  return sanitizeCellValue(value, delimiterCharacter);
38
38
  };
39
- var objectFormattedValueWarning = buildWarning(['MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
39
+ var objectFormattedValueWarning = buildWarning(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);
40
40
  var CSVRow = /*#__PURE__*/function () {
41
41
  function CSVRow(options) {
42
42
  _classCallCheck(this, CSVRow);
@@ -234,7 +234,7 @@ export var useGridPrintExport = function useGridPrintExport(apiRef, props) {
234
234
  _context.next = 3;
235
235
  break;
236
236
  }
237
- throw new Error('MUI: No grid root element available.');
237
+ throw new Error('MUI X: No grid root element available.');
238
238
  case 3:
239
239
  previousGridState.current = apiRef.current.exportState();
240
240
  // It appends that the visibility model is not exported, especially if columnVisibility is not controlled
@@ -36,9 +36,9 @@ export var cleanFilterItem = function cleanFilterItem(item, apiRef) {
36
36
  }
37
37
  return cleanItem;
38
38
  };
39
- var filterModelDisableMultiColumnsFilteringWarning = buildWarning(['MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
40
- var filterModelMissingItemIdWarning = buildWarning('MUI: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
41
- var filterModelMissingItemOperatorWarning = buildWarning('MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
39
+ var filterModelDisableMultiColumnsFilteringWarning = buildWarning(['MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
40
+ var filterModelMissingItemIdWarning = buildWarning('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
41
+ var filterModelMissingItemOperatorWarning = buildWarning('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
42
42
  export var sanitizeFilterModel = function sanitizeFilterModel(model, disableMultipleColumnsFiltering, apiRef) {
43
43
  var hasSeveralItems = model.items.length > 1;
44
44
  var items;
@@ -114,13 +114,13 @@ var getFilterCallbackFromItem = function getFilterCallbackFromItem(filterItem, a
114
114
  });
115
115
  var filterOperators = column.filterOperators;
116
116
  if (!(filterOperators != null && filterOperators.length)) {
117
- throw new Error("MUI: No filter operators found for column '".concat(column.field, "'."));
117
+ throw new Error("MUI X: No filter operators found for column '".concat(column.field, "'."));
118
118
  }
119
119
  var filterOperator = filterOperators.find(function (operator) {
120
120
  return operator.value === newFilterItem.operator;
121
121
  });
122
122
  if (!filterOperator) {
123
- throw new Error("MUI: No filter operator found for column '".concat(column.field, "' and operator value '").concat(newFilterItem.operator, "'."));
123
+ throw new Error("MUI X: No filter operator found for column '".concat(column.field, "' and operator value '").concat(newFilterItem.operator, "'."));
124
124
  }
125
125
  var publicApiRef = getPublicApiRef(apiRef);
126
126
  var applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);
@@ -10,7 +10,7 @@ export var getPageCount = function getPageCount(rowCount, pageSize) {
10
10
  }
11
11
  return 0;
12
12
  };
13
- export var noRowCountInServerMode = buildWarning(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'", 'For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation'], 'error');
13
+ export var noRowCountInServerMode = buildWarning(["MUI X: the 'rowCount' prop is undefined while using paginationMode='server'", 'For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation'], 'error');
14
14
  export var getDefaultGridPaginationModel = function getDefaultGridPaginationModel(autoPageSize) {
15
15
  return {
16
16
  page: 0,
@@ -26,6 +26,6 @@ export var getValidPage = function getValidPage(page) {
26
26
  };
27
27
  export var throwIfPageSizeExceedsTheLimit = function throwIfPageSizeExceedsTheLimit(pageSize, signatureProp) {
28
28
  if (signatureProp === GridSignature.DataGrid && pageSize > MAX_PAGE_SIZE) {
29
- throw new Error(['MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
29
+ throw new Error(['MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
30
30
  }
31
31
  };
@@ -101,7 +101,7 @@ export var useGridRowSelection = function useGridRowSelection(apiRef, props) {
101
101
  */
102
102
  var setRowSelectionModel = React.useCallback(function (model) {
103
103
  if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && Array.isArray(model) && model.length > 1) {
104
- throw new Error(['MUI: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
104
+ throw new Error(['MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
105
105
  }
106
106
  var currentModel = gridRowSelectionStateSelector(apiRef.current.state);
107
107
  if (currentModel !== model) {
@@ -28,7 +28,7 @@ export var buildRootGroup = function buildRootGroup() {
28
28
  export function checkGridRowIdIsValid(id, row) {
29
29
  var detailErrorMessage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'A row was provided without id in the rows prop:';
30
30
  if (id == null) {
31
- throw new Error(['MUI: The data grid component requires all rows to have a unique `id` property.', 'Alternatively, you can use the `getRowId` prop to specify a custom id for each row.', detailErrorMessage, JSON.stringify(row)].join('\n'));
31
+ throw new Error(['MUI X: The data grid component requires all rows to have a unique `id` property.', 'Alternatively, you can use the `getRowId` prop to specify a custom id for each row.', detailErrorMessage, JSON.stringify(row)].join('\n'));
32
32
  }
33
33
  }
34
34
  export var getRowIdFromRowModel = function getRowIdFromRowModel(rowModel, getRowId, detailErrorMessage) {
@@ -148,7 +148,7 @@ export var updateCacheWithNewRows = function updateCacheWithNewRows(_ref4) {
148
148
  getRowId = _ref4.getRowId,
149
149
  updates = _ref4.updates;
150
150
  if (previousCache.updates.type === 'full') {
151
- throw new Error('MUI: Unable to prepare a partial update if a full update is not applied yet');
151
+ throw new Error('MUI X: Unable to prepare a partial update if a full update is not applied yet.');
152
152
  }
153
153
 
154
154
  // Remove duplicate updates.
@@ -1,11 +1,11 @@
1
1
  import _createClass from "@babel/runtime/helpers/esm/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _inherits from "@babel/runtime/helpers/esm/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
6
  import _wrapNativeSuper from "@babel/runtime/helpers/esm/wrapNativeSuper";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import * as React from 'react';
10
10
  import { getGridCellElement, getGridColumnHeaderElement, getGridRowElement } from '../../../utils/domUtils';
11
11
  import { GRID_ID_AUTOGENERATED } from './gridRowsUtils';
@@ -13,10 +13,9 @@ import { useGridApiMethod } from '../../utils/useGridApiMethod';
13
13
  import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
14
14
  export var MissingRowIdError = /*#__PURE__*/function (_Error) {
15
15
  _inherits(MissingRowIdError, _Error);
16
- var _super = _createSuper(MissingRowIdError);
17
16
  function MissingRowIdError() {
18
17
  _classCallCheck(this, MissingRowIdError);
19
- return _super.apply(this, arguments);
18
+ return _callSuper(this, MissingRowIdError, arguments);
20
19
  }
21
20
  return _createClass(MissingRowIdError);
22
21
  }( /*#__PURE__*/_wrapNativeSuper(Error));
@@ -124,7 +124,7 @@ export var useGridRows = function useGridRows(apiRef, props) {
124
124
  }, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange, apiRef]);
125
125
  var updateRows = React.useCallback(function (updates) {
126
126
  if (props.signature === GridSignature.DataGrid && updates.length > 1) {
127
- throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
127
+ throw new Error(["MUI X: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
128
128
  }
129
129
  var nonPinnedRowsUpdates = [];
130
130
  updates.forEach(function (update) {
@@ -171,10 +171,10 @@ export var useGridRows = function useGridRows(apiRef, props) {
171
171
  var setRowChildrenExpansion = React.useCallback(function (id, isExpanded) {
172
172
  var currentNode = apiRef.current.getRowNode(id);
173
173
  if (!currentNode) {
174
- throw new Error("MUI: No row with id #".concat(id, " found"));
174
+ throw new Error("MUI X: No row with id #".concat(id, " found."));
175
175
  }
176
176
  if (currentNode.type !== 'group') {
177
- throw new Error('MUI: Only group nodes can be expanded or collapsed');
177
+ throw new Error('MUI X: Only group nodes can be expanded or collapsed.');
178
178
  }
179
179
  var newNode = _extends({}, currentNode, {
180
180
  childrenExpanded: isExpanded
@@ -231,13 +231,13 @@ export var useGridRows = function useGridRows(apiRef, props) {
231
231
  var setRowIndex = React.useCallback(function (rowId, targetIndex) {
232
232
  var node = apiRef.current.getRowNode(rowId);
233
233
  if (!node) {
234
- throw new Error("MUI: No row with id #".concat(rowId, " found"));
234
+ throw new Error("MUI X: No row with id #".concat(rowId, " found."));
235
235
  }
236
236
  if (node.parent !== GRID_ROOT_GROUP_ID) {
237
- throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");
237
+ throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");
238
238
  }
239
239
  if (node.type !== 'leaf') {
240
- throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");
240
+ throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");
241
241
  }
242
242
  apiRef.current.setState(function (state) {
243
243
  var group = gridRowTreeSelector(state, apiRef.current.instanceId)[GRID_ROOT_GROUP_ID];
@@ -263,7 +263,7 @@ export var useGridRows = function useGridRows(apiRef, props) {
263
263
  }, [apiRef, logger]);
264
264
  var replaceRows = React.useCallback(function (firstRowToRender, newRows) {
265
265
  if (props.signature === GridSignature.DataGrid && newRows.length > 1) {
266
- throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.", 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
266
+ throw new Error(["MUI X: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.", 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
267
267
  }
268
268
  if (newRows.length === 0) {
269
269
  return;
@@ -30,8 +30,8 @@ var getValidRowHeight = function getValidRowHeight(rowHeightProp, defaultRowHeig
30
30
  }
31
31
  return defaultRowHeight;
32
32
  };
33
- var rowHeightWarning = ["MUI: The `rowHeight` prop should be a number greater than 0.", "The default value will be used instead."].join('\n');
34
- var getRowHeightWarning = ["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.", "The default value will be used instead."].join('\n');
33
+ var rowHeightWarning = ["MUI X: The `rowHeight` prop should be a number greater than 0.", "The default value will be used instead."].join('\n');
34
+ var getRowHeightWarning = ["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.", "The default value will be used instead."].join('\n');
35
35
 
36
36
  /**
37
37
  * @requires useGridPageSize (method)
@@ -1,9 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { buildWarning } from '../../../utils/warning';
3
- var sortModelDisableMultiColumnsSortingWarning = buildWarning(['MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
3
+ var sortModelDisableMultiColumnsSortingWarning = buildWarning(['MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', 'If you are using the community version of the `DataGrid`, this prop is always `true`.'], 'error');
4
4
  export var sanitizeSortModel = function sanitizeSortModel(model, disableMultipleColumnsSorting) {
5
5
  if (disableMultipleColumnsSorting && model.length > 1) {
6
- sortModelDisableMultiColumnsSortingWarning();
6
+ if (process.env.NODE_ENV !== 'production') {
7
+ sortModelDisableMultiColumnsSortingWarning();
8
+ }
7
9
  return [model[0]];
8
10
  }
9
11
  return model;
@@ -3,7 +3,7 @@ import { GridApiContext } from '../../components/GridApiContext';
3
3
  export function useGridApiContext() {
4
4
  var apiRef = React.useContext(GridApiContext);
5
5
  if (apiRef === undefined) {
6
- throw new Error(['MUI: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
6
+ throw new Error(['MUI X: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
7
7
  }
8
8
  return apiRef;
9
9
  }
@@ -6,7 +6,7 @@ if (process.env.NODE_ENV !== 'production') {
6
6
  export function useGridPrivateApiContext() {
7
7
  var privateApiRef = React.useContext(GridPrivateApiContext);
8
8
  if (privateApiRef === undefined) {
9
- throw new Error(['MUI: Could not find the data grid private context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
9
+ throw new Error(['MUI X: Could not find the data grid private context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
10
10
  }
11
11
  return privateApiRef;
12
12
  }
@@ -3,7 +3,7 @@ import { GridRootPropsContext } from '../../context/GridRootPropsContext';
3
3
  export var useGridRootProps = function useGridRootProps() {
4
4
  var contextValue = React.useContext(GridRootPropsContext);
5
5
  if (!contextValue) {
6
- throw new Error('MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.');
6
+ throw new Error('MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.');
7
7
  }
8
8
  return contextValue;
9
9
  };
@@ -4,7 +4,7 @@ import { useLazyRef } from './useLazyRef';
4
4
  import { useOnMount } from './useOnMount';
5
5
  import { buildWarning } from '../../utils/warning';
6
6
  import { fastObjectShallowCompare } from '../../utils/fastObjectShallowCompare';
7
- var stateNotInitializedWarning = buildWarning(['MUI: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
7
+ var stateNotInitializedWarning = buildWarning(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
8
8
  function isOutputSelector(selector) {
9
9
  return selector.acceptsApiRef;
10
10
  }
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.0.0-alpha.7
2
+ * @mui/x-data-grid v7.0.0-alpha.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -12,7 +12,6 @@ export * from './DataGrid';
12
12
  export * from './components';
13
13
  export * from './constants';
14
14
  export * from './hooks';
15
- export * from './locales';
16
15
  export * from './models';
17
16
  export * from './context';
18
17
  export * from './colDef';
@@ -1,2 +1,3 @@
1
1
  export * from './computeSlots';
2
- export * from './useProps';
2
+ export * from './useProps';
3
+ export * from './propValidation';
@@ -0,0 +1,21 @@
1
+ export var propValidatorsDataGrid = [function (props) {
2
+ return props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined;
3
+ }];
4
+ var warnedOnceMap = new Set();
5
+ var warnOnce = function warnOnce(message) {
6
+ if (!warnedOnceMap.has(message)) {
7
+ console.error(message);
8
+ warnedOnceMap.add(message);
9
+ }
10
+ };
11
+ export var validateProps = function validateProps(props, validators) {
12
+ if (process.env.NODE_ENV === 'production') {
13
+ return;
14
+ }
15
+ validators.forEach(function (validator) {
16
+ var warning = validator(props);
17
+ if (warning) {
18
+ warnOnce(warning);
19
+ }
20
+ });
21
+ };
@@ -3,7 +3,7 @@ import { buildWarning } from './warning';
3
3
  var cacheContainer = {
4
4
  cache: new WeakMap()
5
5
  };
6
- var missingInstanceIdWarning = buildWarning(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
6
+ var missingInstanceIdWarning = buildWarning(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`.']);
7
7
  function checkIsAPIRef(value) {
8
8
  return 'current' in value && 'instanceId' in value.current;
9
9
  }
@@ -36,5 +36,5 @@ export function exportAs(blob) {
36
36
  });
37
37
  return;
38
38
  }
39
- throw new Error('MUI: exportAs not supported');
39
+ throw new Error('MUI X: exportAs not supported.');
40
40
  }
@@ -668,7 +668,7 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
668
668
  */
669
669
  'aria-labelledby'?: string;
670
670
  /**
671
- * Set of columns of type [[GridColDef[]]].
671
+ * Set of columns of type [[GridColDef]][].
672
672
  */
673
673
  columns: readonly GridColDef<R>[];
674
674
  /**
@@ -1,17 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { chainPropTypes } from '@mui/utils';
5
4
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from '../components';
6
5
  import { GridContextProvider } from '../context/GridContextProvider';
7
6
  import { useDataGridComponent } from './useDataGridComponent';
8
7
  import { useDataGridProps } from './useDataGridProps';
9
8
  import { DataGridVirtualScroller } from '../components/DataGridVirtualScroller';
9
+ import { propValidatorsDataGrid, validateProps } from '../internals/utils/propValidation';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ const propValidators = [...propValidatorsDataGrid,
13
+ // Only validate in MIT version
14
+ props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
12
15
  const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
13
16
  const props = useDataGridProps(inProps);
14
17
  const privateApiRef = useDataGridComponent(props.apiRef, props);
18
+ validateProps(props, propValidators);
15
19
  return /*#__PURE__*/_jsx(GridContextProvider, {
16
20
  privateApiRef: privateApiRef,
17
21
  props: props,
@@ -63,12 +67,7 @@ DataGridRaw.propTypes = {
63
67
  * If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
64
68
  * @default false
65
69
  */
66
- autoPageSize: chainPropTypes(PropTypes.bool, props => {
67
- if (props.autoHeight && props.autoPageSize) {
68
- return new Error(['MUI: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n'));
69
- }
70
- return null;
71
- }),
70
+ autoPageSize: PropTypes.bool,
72
71
  /**
73
72
  * Controls the modes of the cells.
74
73
  */
@@ -99,15 +98,9 @@ DataGridRaw.propTypes = {
99
98
  */
100
99
  columnHeaderHeight: PropTypes.number,
101
100
  /**
102
- * Set of columns of type [[GridColDef[]]].
101
+ * Set of columns of type [[GridColDef]][].
103
102
  */
104
- columns: chainPropTypes(PropTypes.array.isRequired, props => {
105
- // @ts-ignore because otherwise `build:api` doesn't work
106
- if (props.columns && props.columns.some(column => column.resizable)) {
107
- return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
108
- }
109
- return null;
110
- }),
103
+ columns: PropTypes.arrayOf(PropTypes.object).isRequired,
111
104
  /**
112
105
  * Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
113
106
  * @default 3
@@ -552,12 +545,7 @@ DataGridRaw.propTypes = {
552
545
  label: PropTypes.string.isRequired,
553
546
  value: PropTypes.number.isRequired
554
547
  })]).isRequired),
555
- pagination: props => {
556
- if (props.pagination === false) {
557
- return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
558
- }
559
- return null;
560
- },
548
+ pagination: PropTypes.oneOf([true]),
561
549
  /**
562
550
  * Pagination can be processed on the server or client-side.
563
551
  * Set it to 'client' if you would like to handle the pagination on the client-side.
@@ -10,7 +10,7 @@ function throwIfNotDateObject({
10
10
  field
11
11
  }) {
12
12
  if (!(value instanceof Date)) {
13
- throw new Error([`MUI: \`${columnType}\` column type only accepts \`Date\` objects as values.`, 'Use `valueGetter` to transform the value into a `Date` object.', `Row ID: ${rowId}, field: "${field}".`].join('\n'));
13
+ throw new Error([`MUI X: \`${columnType}\` column type only accepts \`Date\` objects as values.`, 'Use `valueGetter` to transform the value into a `Date` object.', `Row ID: ${rowId}, field: "${field}".`].join('\n'));
14
14
  }
15
15
  }
16
16
  export function gridDateFormatter({
@@ -56,7 +56,7 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
56
56
  const warnedOnceMissingInPageSizeOptions = React.useRef(false);
57
57
  const pageSize = rootProps.paginationModel?.pageSize ?? paginationModel.pageSize;
58
58
  if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
59
- console.warn([`MUI: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\``, `Add it to show the pagination select.`].join('\n'));
59
+ console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\`.`, `Add it to show the pagination select.`].join('\n'));
60
60
  warnedOnceMissingInPageSizeOptions.current = true;
61
61
  }
62
62
  }
@@ -35,7 +35,7 @@ function GridActionsCell(props) {
35
35
  const buttonId = useId();
36
36
  const rootProps = useGridRootProps();
37
37
  if (!hasActions(colDef)) {
38
- throw new Error('MUI: Missing the `getActions` property in the `GridColDef`.');
38
+ throw new Error('MUI X: Missing the `getActions` property in the `GridColDef`.');
39
39
  }
40
40
  const options = colDef.getActions(apiRef.current.getRowParams(id));
41
41
  const iconButtons = options.filter(option => !option.props.showInMenu);
@@ -274,7 +274,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
274
274
  return;
275
275
  }
276
276
  if (!warnedOnce) {
277
- console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell?.id}, field=${focusedCell?.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
277
+ console.warn([`MUI X: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell?.id}, field=${focusedCell?.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
278
278
  warnedOnce = true;
279
279
  }
280
280
  };
@@ -544,7 +544,7 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
544
544
  return;
545
545
  }
546
546
  if (!warnedOnce) {
547
- console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell?.id}, field=${focusedCell?.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
547
+ console.warn([`MUI X: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell?.id}, field=${focusedCell?.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
548
548
  warnedOnce = true;
549
549
  }
550
550
  };
@@ -91,7 +91,7 @@ const getLogicOperatorLocaleKey = logicOperator => {
91
91
  case GridLogicOperator.Or:
92
92
  return 'filterPanelOperatorOr';
93
93
  default:
94
- throw new Error('MUI: Invalid `logicOperator` property in the `GridFilterPanel`.');
94
+ throw new Error('MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.');
95
95
  }
96
96
  };
97
97
  const getColumnLabel = col => col.headerName || col.field;
@@ -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;
@@ -13,13 +13,13 @@ const LOG_LEVELS = ['debug', 'info', 'warn', 'error'];
13
13
  function getAppender(name, logLevel, appender = console) {
14
14
  const minLogLevelIdx = LOG_LEVELS.indexOf(logLevel);
15
15
  if (minLogLevelIdx === -1) {
16
- throw new Error(`MUI: Log level ${logLevel} not recognized.`);
16
+ throw new Error(`MUI X: Log level ${logLevel} not recognized.`);
17
17
  }
18
18
  const logger = LOG_LEVELS.reduce((loggerObj, method, idx) => {
19
19
  if (idx >= minLogLevelIdx) {
20
20
  loggerObj[method] = (...args) => {
21
21
  const [message, ...other] = args;
22
- appender[method](`MUI: ${name} - ${message}`, ...other);
22
+ appender[method](`MUI X: ${name} - ${message}`, ...other);
23
23
  };
24
24
  } else {
25
25
  loggerObj[method] = noop;
@@ -4,7 +4,7 @@ import { isDeepEqual } from '../../../utils/utils';
4
4
  const recurrentUnwrapGroupingColumnModel = (columnGroupNode, parents, unwrappedGroupingModelToComplete) => {
5
5
  if (isLeaf(columnGroupNode)) {
6
6
  if (unwrappedGroupingModelToComplete[columnGroupNode.field] !== undefined) {
7
- throw new Error([`MUI: columnGroupingModel contains duplicated field`, `column field ${columnGroupNode.field} occurs two times in the grouping model:`, `- ${unwrappedGroupingModelToComplete[columnGroupNode.field].join(' > ')}`, `- ${parents.join(' > ')}`].join('\n'));
7
+ throw new Error([`MUI X: columnGroupingModel contains duplicated field`, `column field ${columnGroupNode.field} occurs two times in the grouping model:`, `- ${unwrappedGroupingModelToComplete[columnGroupNode.field].join(' > ')}`, `- ${parents.join(' > ')}`].join('\n'));
8
8
  }
9
9
  unwrappedGroupingModelToComplete[columnGroupNode.field] = parents;
10
10
  return;