@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
@@ -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;
@@ -20,17 +20,19 @@ const createGroupLookup = columnGroupingModel => {
20
20
  } = node,
21
21
  other = _objectWithoutPropertiesLoose(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=${groupId} has no children.`);
25
+ if (process.env.NODE_ENV !== 'production') {
26
+ if (!children) {
27
+ console.warn(`MUI X: group groupId=${groupId} has no children.`);
28
+ }
27
29
  }
28
30
  const groupParam = _extends({}, other, {
29
31
  groupId
30
32
  });
31
33
  const subTreeLookup = createGroupLookup(children);
32
34
  if (subTreeLookup[groupId] !== undefined || groupLookup[groupId] !== undefined) {
33
- throw new Error(`MUI: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);
35
+ throw new Error(`MUI X: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);
34
36
  }
35
37
  groupLookup = _extends({}, groupLookup, subTreeLookup, {
36
38
  [groupId]: groupParam
@@ -14,7 +14,7 @@ import { buildWarning } from '../../../utils/warning';
14
14
  import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector';
15
15
  import { deepClone } from '../../../utils/utils';
16
16
  import { GridCellEditStartReasons, GridCellEditStopReasons } from '../../../models/params/gridEditCellParams';
17
- const 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');
17
+ const 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');
18
18
  export const useGridCellEditing = (apiRef, props) => {
19
19
  const [cellModesModel, setCellModesModel] = React.useState({});
20
20
  const cellModesModelRef = React.useRef(cellModesModel);
@@ -33,12 +33,12 @@ export const useGridCellEditing = (apiRef, props) => {
33
33
  const throwIfNotEditable = React.useCallback((id, field) => {
34
34
  const params = apiRef.current.getCellParams(id, field);
35
35
  if (!apiRef.current.isCellEditable(params)) {
36
- throw new Error(`MUI: The cell with id=${id} and field=${field} is not editable.`);
36
+ throw new Error(`MUI X: The cell with id=${id} and field=${field} is not editable.`);
37
37
  }
38
38
  }, [apiRef]);
39
39
  const throwIfNotInMode = React.useCallback((id, field, mode) => {
40
40
  if (apiRef.current.getCellMode(id, field) !== mode) {
41
- throw new Error(`MUI: The cell with id=${id} and field=${field} is not in ${mode} mode.`);
41
+ throw new Error(`MUI X: The cell with id=${id} and field=${field} is not in ${mode} mode.`);
42
42
  }
43
43
  }, [apiRef]);
44
44
  const handleCellDoubleClick = React.useCallback((params, event) => {
@@ -302,7 +302,7 @@ export const useGridCellEditing = (apiRef, props) => {
302
302
  });
303
303
  if (onProcessRowUpdateError) {
304
304
  onProcessRowUpdateError(errorThrown);
305
- } else {
305
+ } else if (process.env.NODE_ENV !== 'production') {
306
306
  missingOnProcessRowUpdateErrorWarning();
307
307
  }
308
308
  };
@@ -16,7 +16,7 @@ import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector';
16
16
  import { deepClone } from '../../../utils/utils';
17
17
  import { GridRowEditStopReasons, GridRowEditStartReasons } from '../../../models/params/gridRowParams';
18
18
  import { GRID_ACTIONS_COLUMN_TYPE } from '../../../colDef';
19
- const 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');
19
+ const 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');
20
20
  export const useGridRowEditing = (apiRef, props) => {
21
21
  const [rowModesModel, setRowModesModel] = React.useState({});
22
22
  const rowModesModelRef = React.useRef(rowModesModel);
@@ -37,12 +37,12 @@ export const useGridRowEditing = (apiRef, props) => {
37
37
  const throwIfNotEditable = React.useCallback((id, field) => {
38
38
  const params = apiRef.current.getCellParams(id, field);
39
39
  if (!apiRef.current.isCellEditable(params)) {
40
- throw new Error(`MUI: The cell with id=${id} and field=${field} is not editable.`);
40
+ throw new Error(`MUI X: The cell with id=${id} and field=${field} is not editable.`);
41
41
  }
42
42
  }, [apiRef]);
43
43
  const throwIfNotInMode = React.useCallback((id, mode) => {
44
44
  if (apiRef.current.getRowMode(id) !== mode) {
45
- throw new Error(`MUI: The row with id=${id} is not in ${mode} mode.`);
45
+ throw new Error(`MUI X: The row with id=${id} is not in ${mode} mode.`);
46
46
  }
47
47
  }, [apiRef]);
48
48
  const handleCellDoubleClick = React.useCallback((params, event) => {
@@ -380,7 +380,7 @@ export const useGridRowEditing = (apiRef, props) => {
380
380
  });
381
381
  if (onProcessRowUpdateError) {
382
382
  onProcessRowUpdateError(errorThrown);
383
- } else {
383
+ } else if (process.env.NODE_ENV !== 'production') {
384
384
  missingOnProcessRowUpdateErrorWarning();
385
385
  }
386
386
  };
@@ -34,7 +34,7 @@ export const serializeCellValue = (cellParams, options) => {
34
34
  }
35
35
  return sanitizeCellValue(value, delimiterCharacter);
36
36
  };
37
- const 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.']);
37
+ const 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.']);
38
38
  class CSVRow {
39
39
  constructor(options) {
40
40
  this.options = void 0;
@@ -211,7 +211,7 @@ export const useGridPrintExport = (apiRef, props) => {
211
211
  var _options$getRowsToExp;
212
212
  logger.debug(`Export data as Print`);
213
213
  if (!apiRef.current.rootElementRef.current) {
214
- throw new Error('MUI: No grid root element available.');
214
+ throw new Error('MUI X: No grid root element available.');
215
215
  }
216
216
  previousGridState.current = apiRef.current.exportState();
217
217
  // It appends that the visibility model is not exported, especially if columnVisibility is not controlled
@@ -36,9 +36,9 @@ export const cleanFilterItem = (item, apiRef) => {
36
36
  }
37
37
  return cleanItem;
38
38
  };
39
- const 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
- const filterModelMissingItemIdWarning = buildWarning('MUI: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
41
- const filterModelMissingItemOperatorWarning = buildWarning('MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
39
+ const 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
+ const filterModelMissingItemIdWarning = buildWarning('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
41
+ const 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 const sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiRef) => {
43
43
  const hasSeveralItems = model.items.length > 1;
44
44
  let items;
@@ -104,11 +104,11 @@ const getFilterCallbackFromItem = (filterItem, apiRef) => {
104
104
  });
105
105
  const filterOperators = column.filterOperators;
106
106
  if (!(filterOperators != null && filterOperators.length)) {
107
- throw new Error(`MUI: No filter operators found for column '${column.field}'.`);
107
+ throw new Error(`MUI X: No filter operators found for column '${column.field}'.`);
108
108
  }
109
109
  const filterOperator = filterOperators.find(operator => operator.value === newFilterItem.operator);
110
110
  if (!filterOperator) {
111
- throw new Error(`MUI: No filter operator found for column '${column.field}' and operator value '${newFilterItem.operator}'.`);
111
+ throw new Error(`MUI X: No filter operator found for column '${column.field}' and operator value '${newFilterItem.operator}'.`);
112
112
  }
113
113
  const publicApiRef = getPublicApiRef(apiRef);
114
114
  const applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);
@@ -8,7 +8,7 @@ export const getPageCount = (rowCount, pageSize) => {
8
8
  }
9
9
  return 0;
10
10
  };
11
- export const 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');
11
+ export const 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');
12
12
  export const getDefaultGridPaginationModel = autoPageSize => ({
13
13
  page: 0,
14
14
  pageSize: autoPageSize ? 0 : 100
@@ -21,6 +21,6 @@ export const getValidPage = (page, pageCount = 0) => {
21
21
  };
22
22
  export const throwIfPageSizeExceedsTheLimit = (pageSize, signatureProp) => {
23
23
  if (signatureProp === GridSignature.DataGrid && pageSize > MAX_PAGE_SIZE) {
24
- 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'));
24
+ 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'));
25
25
  }
26
26
  };
@@ -96,7 +96,7 @@ export const useGridRowSelection = (apiRef, props) => {
96
96
  */
97
97
  const setRowSelectionModel = React.useCallback(model => {
98
98
  if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && Array.isArray(model) && model.length > 1) {
99
- 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'));
99
+ 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'));
100
100
  }
101
101
  const currentModel = gridRowSelectionStateSelector(apiRef.current.state);
102
102
  if (currentModel !== model) {
@@ -24,7 +24,7 @@ export const buildRootGroup = () => ({
24
24
  */
25
25
  export function checkGridRowIdIsValid(id, row, detailErrorMessage = 'A row was provided without id in the rows prop:') {
26
26
  if (id == null) {
27
- 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'));
27
+ 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'));
28
28
  }
29
29
  }
30
30
  export const getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) => {
@@ -145,7 +145,7 @@ export const updateCacheWithNewRows = ({
145
145
  }) => {
146
146
  var _previousCache$update, _previousCache$update2, _previousCache$update3;
147
147
  if (previousCache.updates.type === 'full') {
148
- throw new Error('MUI: Unable to prepare a partial update if a full update is not applied yet');
148
+ throw new Error('MUI X: Unable to prepare a partial update if a full update is not applied yet.');
149
149
  }
150
150
 
151
151
  // Remove duplicate updates.
@@ -121,7 +121,7 @@ export const useGridRows = (apiRef, props) => {
121
121
  }, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange, apiRef]);
122
122
  const updateRows = React.useCallback(updates => {
123
123
  if (props.signature === GridSignature.DataGrid && updates.length > 1) {
124
- 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'));
124
+ 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'));
125
125
  }
126
126
  const nonPinnedRowsUpdates = [];
127
127
  updates.forEach(update => {
@@ -162,10 +162,10 @@ export const useGridRows = (apiRef, props) => {
162
162
  const setRowChildrenExpansion = React.useCallback((id, isExpanded) => {
163
163
  const currentNode = apiRef.current.getRowNode(id);
164
164
  if (!currentNode) {
165
- throw new Error(`MUI: No row with id #${id} found`);
165
+ throw new Error(`MUI X: No row with id #${id} found.`);
166
166
  }
167
167
  if (currentNode.type !== 'group') {
168
- throw new Error('MUI: Only group nodes can be expanded or collapsed');
168
+ throw new Error('MUI X: Only group nodes can be expanded or collapsed.');
169
169
  }
170
170
  const newNode = _extends({}, currentNode, {
171
171
  childrenExpanded: isExpanded
@@ -220,13 +220,13 @@ export const useGridRows = (apiRef, props) => {
220
220
  const setRowIndex = React.useCallback((rowId, targetIndex) => {
221
221
  const node = apiRef.current.getRowNode(rowId);
222
222
  if (!node) {
223
- throw new Error(`MUI: No row with id #${rowId} found`);
223
+ throw new Error(`MUI X: No row with id #${rowId} found.`);
224
224
  }
225
225
  if (node.parent !== GRID_ROOT_GROUP_ID) {
226
- throw new Error(`MUI: The row reordering do not support reordering of grouped rows yet`);
226
+ throw new Error(`MUI X: The row reordering do not support reordering of grouped rows yet.`);
227
227
  }
228
228
  if (node.type !== 'leaf') {
229
- throw new Error(`MUI: The row reordering do not support reordering of footer or grouping rows`);
229
+ throw new Error(`MUI X: The row reordering do not support reordering of footer or grouping rows.`);
230
230
  }
231
231
  apiRef.current.setState(state => {
232
232
  const group = gridRowTreeSelector(state, apiRef.current.instanceId)[GRID_ROOT_GROUP_ID];
@@ -252,7 +252,7 @@ export const useGridRows = (apiRef, props) => {
252
252
  }, [apiRef, logger]);
253
253
  const replaceRows = React.useCallback((firstRowToRender, newRows) => {
254
254
  if (props.signature === GridSignature.DataGrid && newRows.length > 1) {
255
- 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'));
255
+ 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'));
256
256
  }
257
257
  if (newRows.length === 0) {
258
258
  return;
@@ -28,8 +28,8 @@ const getValidRowHeight = (rowHeightProp, defaultRowHeight, warningMessage) => {
28
28
  }
29
29
  return defaultRowHeight;
30
30
  };
31
- const rowHeightWarning = [`MUI: The \`rowHeight\` prop should be a number greater than 0.`, `The default value will be used instead.`].join('\n');
32
- const getRowHeightWarning = [`MUI: The \`getRowHeight\` prop should return a number greater than 0 or 'auto'.`, `The default value will be used instead.`].join('\n');
31
+ const rowHeightWarning = [`MUI X: The \`rowHeight\` prop should be a number greater than 0.`, `The default value will be used instead.`].join('\n');
32
+ const getRowHeightWarning = [`MUI X: The \`getRowHeight\` prop should return a number greater than 0 or 'auto'.`, `The default value will be used instead.`].join('\n');
33
33
 
34
34
  /**
35
35
  * @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
- const 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
+ const 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 const 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
  const 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
  const 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 const useGridRootProps = () => {
4
4
  const 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
  };
@@ -3,7 +3,7 @@ import { useLazyRef } from './useLazyRef';
3
3
  import { useOnMount } from './useOnMount';
4
4
  import { buildWarning } from '../../utils/warning';
5
5
  import { fastObjectShallowCompare } from '../../utils/fastObjectShallowCompare';
6
- const 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.']);
6
+ const 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.']);
7
7
  function isOutputSelector(selector) {
8
8
  return selector.acceptsApiRef;
9
9
  }
package/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export * from './DataGrid';
7
7
  export * from './components';
8
8
  export * from './constants';
9
9
  export * from './hooks';
10
- export * from './locales';
11
10
  export * from './models';
12
11
  export * from './context';
13
12
  export * from './colDef';
package/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';
@@ -80,3 +80,4 @@ export type { GridApiCommunity } from '../models/api/gridApiCommunity';
80
80
  export type { GridApiCaches } from '../models/gridApiCaches';
81
81
  export { serializeCellValue } from '../hooks/features/export/serializers/csvSerializer';
82
82
  export * from './utils';
83
+ export type { Localization } from '../utils/getGridLocalization';
@@ -1,2 +1,3 @@
1
1
  export * from './computeSlots';
2
2
  export * from './useProps';
3
+ export * from './propValidation';
@@ -1,2 +1,3 @@
1
1
  export * from './computeSlots';
2
- export * from './useProps';
2
+ export * from './useProps';
3
+ export * from './propValidation';
@@ -0,0 +1,4 @@
1
+ import { DataGridProcessedProps } from '../../models/props/DataGridProps';
2
+ export type PropValidator<TProps> = (props: TProps) => string | undefined;
3
+ export declare const propValidatorsDataGrid: PropValidator<DataGridProcessedProps>[];
4
+ export declare const validateProps: <TProps>(props: TProps, validators: PropValidator<TProps>[]) => void;
@@ -0,0 +1,19 @@
1
+ export const propValidatorsDataGrid = [props => 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];
2
+ const warnedOnceMap = new Set();
3
+ const warnOnce = message => {
4
+ if (!warnedOnceMap.has(message)) {
5
+ console.error(message);
6
+ warnedOnceMap.add(message);
7
+ }
8
+ };
9
+ export const validateProps = (props, validators) => {
10
+ if (process.env.NODE_ENV === 'production') {
11
+ return;
12
+ }
13
+ validators.forEach(validator => {
14
+ const warning = validator(props);
15
+ if (warning) {
16
+ warnOnce(warning);
17
+ }
18
+ });
19
+ };
@@ -1,17 +1,26 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
3
  import * as React from 'react';
3
4
  import PropTypes from 'prop-types';
4
- import { chainPropTypes } from '@mui/utils';
5
5
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from '../components';
6
6
  import { GridContextProvider } from '../context/GridContextProvider';
7
7
  import { useDataGridComponent } from './useDataGridComponent';
8
8
  import { useDataGridProps } from './useDataGridProps';
9
9
  import { DataGridVirtualScroller } from '../components/DataGridVirtualScroller';
10
+ import { propValidatorsDataGrid, validateProps } from '../internals/utils/propValidation';
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ var propValidators = [].concat(_toConsumableArray(propValidatorsDataGrid), [
14
+ // Only validate in MIT version
15
+ function (props) {
16
+ return props.columns && props.columns.some(function (column) {
17
+ return column.resizable;
18
+ }) && ["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;
19
+ }]);
12
20
  var DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
13
21
  var props = useDataGridProps(inProps);
14
22
  var privateApiRef = useDataGridComponent(props.apiRef, props);
23
+ validateProps(props, propValidators);
15
24
  return /*#__PURE__*/_jsx(GridContextProvider, {
16
25
  privateApiRef: privateApiRef,
17
26
  props: props,
@@ -63,12 +72,7 @@ DataGridRaw.propTypes = {
63
72
  * 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
73
  * @default false
65
74
  */
66
- autoPageSize: chainPropTypes(PropTypes.bool, function (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
- }),
75
+ autoPageSize: PropTypes.bool,
72
76
  /**
73
77
  * Controls the modes of the cells.
74
78
  */
@@ -99,17 +103,9 @@ DataGridRaw.propTypes = {
99
103
  */
100
104
  columnHeaderHeight: PropTypes.number,
101
105
  /**
102
- * Set of columns of type [[GridColDef[]]].
106
+ * Set of columns of type [[GridColDef]][].
103
107
  */
104
- columns: chainPropTypes(PropTypes.array.isRequired, function (props) {
105
- // @ts-ignore because otherwise `build:api` doesn't work
106
- if (props.columns && props.columns.some(function (column) {
107
- return column.resizable;
108
- })) {
109
- 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'));
110
- }
111
- return null;
112
- }),
108
+ columns: PropTypes.arrayOf(PropTypes.object).isRequired,
113
109
  /**
114
110
  * Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
115
111
  * @default 3
@@ -554,12 +550,7 @@ DataGridRaw.propTypes = {
554
550
  label: PropTypes.string.isRequired,
555
551
  value: PropTypes.number.isRequired
556
552
  })]).isRequired),
557
- pagination: function pagination(props) {
558
- if (props.pagination === false) {
559
- 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'));
560
- }
561
- return null;
562
- },
553
+ pagination: PropTypes.oneOf([true]),
563
554
  /**
564
555
  * Pagination can be processed on the server or client-side.
565
556
  * Set it to 'client' if you would like to handle the pagination on the client-side.
@@ -9,7 +9,7 @@ function throwIfNotDateObject(_ref) {
9
9
  rowId = _ref.rowId,
10
10
  field = _ref.field;
11
11
  if (!(value instanceof Date)) {
12
- throw new Error(["MUI: `".concat(columnType, "` column type only accepts `Date` objects as values."), 'Use `valueGetter` to transform the value into a `Date` object.', "Row ID: ".concat(rowId, ", field: \"").concat(field, "\".")].join('\n'));
12
+ throw new Error(["MUI X: `".concat(columnType, "` column type only accepts `Date` objects as values."), 'Use `valueGetter` to transform the value into a `Date` object.', "Row ID: ".concat(rowId, ", field: \"").concat(field, "\".")].join('\n'));
13
13
  }
14
14
  }
15
15
  export function gridDateFormatter(_ref2) {
@@ -59,7 +59,7 @@ export var GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginatio
59
59
  var warnedOnceMissingInPageSizeOptions = React.useRef(false);
60
60
  var pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
61
61
  if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
62
- console.warn(["MUI: The page size `".concat(paginationModel.pageSize, "` is not preset in the `pageSizeOptions`"), "Add it to show the pagination select."].join('\n'));
62
+ console.warn(["MUI X: The page size `".concat(paginationModel.pageSize, "` is not preset in the `pageSizeOptions`."), "Add it to show the pagination select."].join('\n'));
63
63
  warnedOnceMissingInPageSizeOptions.current = true;
64
64
  }
65
65
  }
@@ -52,7 +52,7 @@ function GridActionsCell(props) {
52
52
  var buttonId = useId();
53
53
  var rootProps = useGridRootProps();
54
54
  if (!hasActions(colDef)) {
55
- throw new Error('MUI: Missing the `getActions` property in the `GridColDef`.');
55
+ throw new Error('MUI X: Missing the `getActions` property in the `GridColDef`.');
56
56
  }
57
57
  var options = colDef.getActions(apiRef.current.getRowParams(id));
58
58
  var iconButtons = options.filter(function (option) {
@@ -276,7 +276,7 @@ var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
276
276
  return;
277
277
  }
278
278
  if (!warnedOnce) {
279
- console.warn(["MUI: The cell with id=".concat(rowId, " and field=").concat(field, " received focus."), "According to the state, the focus should be at id=".concat(focusedCell == null ? void 0 : focusedCell.id, ", field=").concat(focusedCell == null ? void 0 : 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'));
279
+ console.warn(["MUI X: The cell with id=".concat(rowId, " and field=").concat(field, " received focus."), "According to the state, the focus should be at id=".concat(focusedCell == null ? void 0 : focusedCell.id, ", field=").concat(focusedCell == null ? void 0 : 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'));
280
280
  warnedOnce = true;
281
281
  }
282
282
  };
@@ -554,7 +554,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
554
554
  return;
555
555
  }
556
556
  if (!warnedOnce) {
557
- console.warn(["MUI: The cell with id=".concat(rowId, " and field=").concat(field, " received focus."), "According to the state, the focus should be at id=".concat(focusedCell == null ? void 0 : focusedCell.id, ", field=").concat(focusedCell == null ? void 0 : 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'));
557
+ console.warn(["MUI X: The cell with id=".concat(rowId, " and field=").concat(field, " received focus."), "According to the state, the focus should be at id=".concat(focusedCell == null ? void 0 : focusedCell.id, ", field=").concat(focusedCell == null ? void 0 : 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'));
558
558
  warnedOnce = true;
559
559
  }
560
560
  };
@@ -103,7 +103,7 @@ var getLogicOperatorLocaleKey = function getLogicOperatorLocaleKey(logicOperator
103
103
  case GridLogicOperator.Or:
104
104
  return 'filterPanelOperatorOr';
105
105
  default:
106
- throw new Error('MUI: Invalid `logicOperator` property in the `GridFilterPanel`.');
106
+ throw new Error('MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.');
107
107
  }
108
108
  };
109
109
  var getColumnLabel = function getColumnLabel(col) {
@@ -139,12 +139,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
139
139
  * Function responsible for formatting values of quick filter in a string when the model is modified
140
140
  * @param {any[]} values The new values passed to the quick filter model
141
141
  * @returns {string} The string to display in the text field
142
+ * @default (values: string[]) => values.join(' ')
142
143
  */
143
144
  quickFilterFormatter: PropTypes.func,
144
145
  /**
145
146
  * Function responsible for parsing text input in an array of independent values for quick filtering.
146
147
  * @param {string} input The value entered by the user
147
148
  * @returns {any[]} The array of value on which quick filter is applied
149
+ * @default (searchText: string) => searchText
150
+ * .split(' ')
151
+ * .filter((word) => word !== '')
148
152
  */
149
153
  quickFilterParser: PropTypes.func
150
154
  } : void 0;
@@ -15,7 +15,7 @@ function getAppender(name, logLevel) {
15
15
  var appender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : console;
16
16
  var minLogLevelIdx = LOG_LEVELS.indexOf(logLevel);
17
17
  if (minLogLevelIdx === -1) {
18
- throw new Error("MUI: Log level ".concat(logLevel, " not recognized."));
18
+ throw new Error("MUI X: Log level ".concat(logLevel, " not recognized."));
19
19
  }
20
20
  var logger = LOG_LEVELS.reduce(function (loggerObj, method, idx) {
21
21
  if (idx >= minLogLevelIdx) {
@@ -26,7 +26,7 @@ function getAppender(name, logLevel) {
26
26
  }
27
27
  var message = args[0],
28
28
  other = args.slice(1);
29
- (_ref = appender)[method].apply(_ref, ["MUI: ".concat(name, " - ").concat(message)].concat(_toConsumableArray(other)));
29
+ (_ref = appender)[method].apply(_ref, ["MUI X: ".concat(name, " - ").concat(message)].concat(_toConsumableArray(other)));
30
30
  };
31
31
  } else {
32
32
  loggerObj[method] = noop;
@@ -5,7 +5,7 @@ import { isDeepEqual } from '../../../utils/utils';
5
5
  var recurrentUnwrapGroupingColumnModel = function recurrentUnwrapGroupingColumnModel(columnGroupNode, parents, unwrappedGroupingModelToComplete) {
6
6
  if (isLeaf(columnGroupNode)) {
7
7
  if (unwrappedGroupingModelToComplete[columnGroupNode.field] !== undefined) {
8
- throw new Error(["MUI: columnGroupingModel contains duplicated field", "column field ".concat(columnGroupNode.field, " occurs two times in the grouping model:"), "- ".concat(unwrappedGroupingModelToComplete[columnGroupNode.field].join(' > ')), "- ".concat(parents.join(' > '))].join('\n'));
8
+ throw new Error(["MUI X: columnGroupingModel contains duplicated field", "column field ".concat(columnGroupNode.field, " occurs two times in the grouping model:"), "- ".concat(unwrappedGroupingModelToComplete[columnGroupNode.field].join(' > ')), "- ".concat(parents.join(' > '))].join('\n'));
9
9
  }
10
10
  unwrappedGroupingModelToComplete[columnGroupNode.field] = parents;
11
11
  return;