@mui/x-data-grid 9.4.0 → 9.5.0

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 (82) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/colDef/gridColumnTypesRegistry.d.mts +8 -0
  3. package/colDef/gridColumnTypesRegistry.d.ts +8 -0
  4. package/colDef/gridColumnTypesRegistry.js +44 -0
  5. package/colDef/gridColumnTypesRegistry.mjs +34 -0
  6. package/colDef/gridDefaultColumnTypes.d.mts +1 -1
  7. package/colDef/gridDefaultColumnTypes.d.ts +1 -1
  8. package/colDef/gridDefaultColumnTypes.js +11 -23
  9. package/colDef/gridDefaultColumnTypes.mjs +4 -22
  10. package/components/cell/GridActionsCell.js +1 -1
  11. package/components/cell/GridActionsCell.mjs +1 -1
  12. package/components/cell/GridLongTextCell.js +2 -0
  13. package/components/cell/GridLongTextCell.mjs +2 -0
  14. package/components/containers/GridRootStyles.js +29 -0
  15. package/components/containers/GridRootStyles.mjs +29 -0
  16. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -4
  17. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +2 -4
  18. package/components/panel/filterPanel/filterPanelUtils.d.mts +3 -2
  19. package/components/panel/filterPanel/filterPanelUtils.d.ts +3 -2
  20. package/components/panel/filterPanel/filterPanelUtils.js +4 -0
  21. package/components/panel/filterPanel/filterPanelUtils.mjs +3 -0
  22. package/constants/cssVariables.d.mts +3 -0
  23. package/constants/cssVariables.d.ts +3 -0
  24. package/constants/cssVariables.js +2 -1
  25. package/constants/cssVariables.mjs +2 -1
  26. package/constants/gridClasses.d.mts +48 -0
  27. package/constants/gridClasses.d.ts +48 -0
  28. package/constants/gridClasses.js +1 -1
  29. package/constants/gridClasses.mjs +1 -1
  30. package/hooks/core/useGridProps.js +5 -3
  31. package/hooks/core/useGridProps.mjs +5 -3
  32. package/hooks/features/columns/gridColumnsUtils.js +18 -10
  33. package/hooks/features/columns/gridColumnsUtils.mjs +19 -11
  34. package/hooks/features/columns/useGridColumns.js +11 -0
  35. package/hooks/features/columns/useGridColumns.mjs +11 -0
  36. package/hooks/features/dataSource/useGridDataSourceBase.js +2 -2
  37. package/hooks/features/dataSource/useGridDataSourceBase.mjs +2 -2
  38. package/hooks/features/editing/useGridCellEditing.js +1 -1
  39. package/hooks/features/editing/useGridCellEditing.mjs +1 -1
  40. package/hooks/features/editing/useGridRowEditing.js +1 -1
  41. package/hooks/features/editing/useGridRowEditing.mjs +1 -1
  42. package/hooks/features/export/serializers/csvSerializer.js +3 -1
  43. package/hooks/features/export/serializers/csvSerializer.mjs +3 -1
  44. package/hooks/features/filter/gridFilterUtils.js +5 -3
  45. package/hooks/features/filter/gridFilterUtils.mjs +5 -3
  46. package/hooks/features/listView/useGridListView.js +1 -1
  47. package/hooks/features/listView/useGridListView.mjs +1 -1
  48. package/hooks/features/sorting/gridSortingUtils.js +3 -1
  49. package/hooks/features/sorting/gridSortingUtils.mjs +3 -1
  50. package/hooks/utils/useGridSelector.js +26 -23
  51. package/hooks/utils/useGridSelector.mjs +25 -23
  52. package/index.js +1 -1
  53. package/index.mjs +1 -1
  54. package/internals/index.d.mts +9 -4
  55. package/internals/index.d.ts +9 -4
  56. package/internals/index.js +62 -2
  57. package/internals/index.mjs +8 -4
  58. package/internals/utils/propValidation.js +3 -0
  59. package/internals/utils/propValidation.mjs +3 -0
  60. package/material/augmentation.d.mts +4 -0
  61. package/material/augmentation.d.ts +4 -0
  62. package/material/index.js +38 -24
  63. package/material/index.mjs +38 -24
  64. package/material/variables.js +2 -1
  65. package/material/variables.mjs +2 -1
  66. package/models/colDef/gridColDef.d.mts +35 -3
  67. package/models/colDef/gridColDef.d.ts +35 -3
  68. package/models/colDef/gridColType.d.mts +1 -0
  69. package/models/colDef/gridColType.d.ts +1 -0
  70. package/models/colDef/gridColumnTypesRecord.d.mts +1 -1
  71. package/models/colDef/gridColumnTypesRecord.d.ts +1 -1
  72. package/models/colDef/index.d.mts +1 -1
  73. package/models/colDef/index.d.ts +1 -1
  74. package/models/gridBaseSlots.d.mts +46 -0
  75. package/models/gridBaseSlots.d.ts +46 -0
  76. package/models/gridSlotsComponent.d.mts +5 -0
  77. package/models/gridSlotsComponent.d.ts +5 -0
  78. package/models/gridSlotsComponentsProps.d.mts +3 -1
  79. package/models/gridSlotsComponentsProps.d.ts +3 -1
  80. package/models/gridStateCommunity.d.mts +1 -1
  81. package/models/gridStateCommunity.d.ts +1 -1
  82. package/package.json +3 -3
@@ -514,6 +514,54 @@ export interface GridClasses {
514
514
  * Styles applied to the edit long text cell textarea.
515
515
  */
516
516
  editLongTextCellTextarea: string;
517
+ /**
518
+ * Styles applied to the multi-select cell root element.
519
+ */
520
+ multiSelectCell: string;
521
+ /**
522
+ * Styles applied to each chip in the multi-select cell.
523
+ */
524
+ multiSelectCellChip: string;
525
+ /**
526
+ * @ignore - do not document.
527
+ */
528
+ 'multiSelectCellChip--hidden': string;
529
+ /**
530
+ * Styles applied to the overflow "+N" chip in the multi-select cell.
531
+ */
532
+ multiSelectCellOverflow: string;
533
+ /**
534
+ * Styles applied to the multi-select cell expand popup.
535
+ */
536
+ multiSelectCellPopup: string;
537
+ /**
538
+ * Styles applied to the multi-select cell popper content.
539
+ */
540
+ multiSelectCellPopperContent: string;
541
+ /**
542
+ * Styles applied to the edit multi-select cell root element.
543
+ */
544
+ editMultiSelectCell: string;
545
+ /**
546
+ * Styles applied to each chip in the edit multi-select cell.
547
+ */
548
+ editMultiSelectCellChip: string;
549
+ /**
550
+ * @ignore - do not document.
551
+ */
552
+ 'editMultiSelectCellChip--hidden': string;
553
+ /**
554
+ * Styles applied to the overflow "+N" chip in the edit multi-select cell.
555
+ */
556
+ editMultiSelectCellOverflow: string;
557
+ /**
558
+ * Styles applied to the edit multi-select cell popup.
559
+ */
560
+ editMultiSelectCellPopup: string;
561
+ /**
562
+ * Styles applied to the edit multi-select cell popper content.
563
+ */
564
+ editMultiSelectCellPopperContent: string;
517
565
  /**
518
566
  * Styles applied to the filter icon element.
519
567
  */
@@ -30,4 +30,4 @@ const gridClassesOverrides = exports.gridClassesOverrides = {
30
30
  // TODO v9: Rename to `cell--dragging`
31
31
  'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
32
32
  };
33
- const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
33
+ const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'multiSelectCell', 'multiSelectCellChip', 'multiSelectCellChip--hidden', 'multiSelectCellOverflow', 'multiSelectCellPopup', 'multiSelectCellPopperContent', 'editMultiSelectCell', 'editMultiSelectCellChip', 'editMultiSelectCellChip--hidden', 'editMultiSelectCellOverflow', 'editMultiSelectCellPopup', 'editMultiSelectCellPopperContent', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
@@ -22,4 +22,4 @@ export const gridClassesOverrides = {
22
22
  // TODO v9: Rename to `cell--dragging`
23
23
  'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
24
24
  };
25
- export const gridClasses = generateUtilityClasses('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
25
+ export const gridClasses = generateUtilityClasses('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'multiSelectCell', 'multiSelectCellChip', 'multiSelectCellChip--hidden', 'multiSelectCellOverflow', 'multiSelectCellPopup', 'multiSelectCellPopperContent', 'editMultiSelectCell', 'editMultiSelectCellChip', 'editMultiSelectCellChip--hidden', 'editMultiSelectCellOverflow', 'editMultiSelectCellPopup', 'editMultiSelectCellPopperContent', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
@@ -16,7 +16,8 @@ const propsStateInitializer = (state, props) => {
16
16
  getRowId: props.getRowId,
17
17
  isCellEditable: props.isCellEditable,
18
18
  isRowSelectable: props.isRowSelectable,
19
- dataSource: props.dataSource
19
+ dataSource: props.dataSource,
20
+ signature: props.signature
20
21
  }
21
22
  });
22
23
  };
@@ -34,9 +35,10 @@ const useGridProps = (apiRef, props) => {
34
35
  getRowId: props.getRowId,
35
36
  isCellEditable: props.isCellEditable,
36
37
  isRowSelectable: props.isRowSelectable,
37
- dataSource: props.dataSource
38
+ dataSource: props.dataSource,
39
+ signature: props.signature
38
40
  }
39
41
  }));
40
- }, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource]);
42
+ }, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource, props.signature]);
41
43
  };
42
44
  exports.useGridProps = useGridProps;
@@ -9,7 +9,8 @@ export const propsStateInitializer = (state, props) => {
9
9
  getRowId: props.getRowId,
10
10
  isCellEditable: props.isCellEditable,
11
11
  isRowSelectable: props.isRowSelectable,
12
- dataSource: props.dataSource
12
+ dataSource: props.dataSource,
13
+ signature: props.signature
13
14
  }
14
15
  });
15
16
  };
@@ -26,8 +27,9 @@ export const useGridProps = (apiRef, props) => {
26
27
  getRowId: props.getRowId,
27
28
  isCellEditable: props.isCellEditable,
28
29
  isRowSelectable: props.isRowSelectable,
29
- dataSource: props.dataSource
30
+ dataSource: props.dataSource,
31
+ signature: props.signature
30
32
  }
31
33
  }));
32
- }, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource]);
34
+ }, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource, props.signature]);
33
35
  };
@@ -14,14 +14,14 @@ exports.hydrateColumnsWidth = void 0;
14
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
15
  var _resolveProps = _interopRequireDefault(require("@mui/utils/resolveProps"));
16
16
  var _colDef = require("../../../colDef");
17
+ var _gridColumnTypesRegistry = require("../../../colDef/gridColumnTypesRegistry");
18
+ var _signature = require("../../../constants/signature");
17
19
  var _gridColumnsSelector = require("./gridColumnsSelector");
18
20
  var _utils = require("../../../utils/utils");
19
21
  var _densitySelector = require("../density/densitySelector");
20
22
  var _gridHeaderFilteringSelectors = require("../headerFiltering/gridHeaderFilteringSelectors");
21
23
  var _gridColumnGroupsSelector = require("../columnGrouping/gridColumnGroupsSelector");
22
24
  const COLUMNS_DIMENSION_PROPERTIES = exports.COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];
23
- const COLUMN_TYPES = (0, _colDef.getGridDefaultColumnTypes)();
24
-
25
25
  /**
26
26
  * Computes width for flex columns.
27
27
  * Based on CSS Flexbox specification:
@@ -223,11 +223,7 @@ const applyInitialState = (columnsState, initialState) => {
223
223
  return newColumnsState;
224
224
  };
225
225
  function getDefaultColTypeDef(type) {
226
- let colDef = COLUMN_TYPES[_colDef.DEFAULT_GRID_COL_TYPE_KEY];
227
- if (type && COLUMN_TYPES[type]) {
228
- colDef = COLUMN_TYPES[type];
229
- }
230
- return colDef;
226
+ return (0, _gridColumnTypesRegistry.getRegisteredColumnTypeDef)(type);
231
227
  }
232
228
  const createColumnsState = ({
233
229
  apiRef,
@@ -238,6 +234,18 @@ const createColumnsState = ({
238
234
  updateInitialVisibilityModel = false
239
235
  }) => {
240
236
  const isInsideStateInitializer = !apiRef.current.state.columns;
237
+
238
+ // A community `DataGrid` must not resolve a Pro/Premium-only column type even if a Pro grid
239
+ // registered it globally in the same bundle (shared module registry). Fall back to the default
240
+ // type def in that case, so the column behaves like a plain column.
241
+ // NOTE: this is a community-vs-paid gate only — it does not distinguish Pro from Premium. It is
242
+ // enough today because the only registered type (`multiSelect`) is available in both Pro and
243
+ // Premium. If a Pro-only or Premium-only column type is added later, make this plan-aware:
244
+ // track each type's minimum plan in the registry and compare it against the grid signature
245
+ // (DataGrid < DataGridPro < DataGridPremium), so e.g. a Premium-only type also falls back in
246
+ // `DataGridPro`.
247
+ const isCommunity = apiRef.current.state.props?.signature === _signature.GridSignature.DataGrid;
248
+ const getColTypeDef = type => isCommunity && !(0, _gridColumnTypesRegistry.isCommunityColumnType)(type) ? getDefaultColTypeDef(undefined) : getDefaultColTypeDef(type);
241
249
  let columnsState;
242
250
  if (isInsideStateInitializer) {
243
251
  columnsState = {
@@ -270,7 +278,7 @@ const createColumnsState = ({
270
278
  columnsToKeep[field] = true;
271
279
  let existingState = columnsState.lookup[field];
272
280
  if (existingState == null) {
273
- existingState = (0, _extends2.default)({}, getDefaultColTypeDef(newColumn.type), {
281
+ existingState = (0, _extends2.default)({}, getColTypeDef(newColumn.type), {
274
282
  field,
275
283
  hasBeenResized: false
276
284
  });
@@ -281,7 +289,7 @@ const createColumnsState = ({
281
289
 
282
290
  // If the column type has changed - merge the existing state with the default column type definition
283
291
  if (existingState && existingState.type !== newColumn.type) {
284
- existingState = (0, _extends2.default)({}, getDefaultColTypeDef(newColumn.type), {
292
+ existingState = (0, _extends2.default)({}, getColTypeDef(newColumn.type), {
285
293
  field
286
294
  });
287
295
  }
@@ -294,7 +302,7 @@ const createColumnsState = ({
294
302
  }
295
303
  }
296
304
  });
297
- const mergedProps = (0, _extends2.default)({}, getDefaultColTypeDef(newColumn.type), {
305
+ const mergedProps = (0, _extends2.default)({}, getColTypeDef(newColumn.type), {
298
306
  hasBeenResized,
299
307
  field
300
308
  });
@@ -1,14 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import resolveProps from '@mui/utils/resolveProps';
3
- import { DEFAULT_GRID_COL_TYPE_KEY, GRID_STRING_COL_DEF, getGridDefaultColumnTypes } from "../../../colDef/index.mjs";
3
+ import { GRID_STRING_COL_DEF } from "../../../colDef/index.mjs";
4
+ import { getRegisteredColumnTypeDef, isCommunityColumnType } from "../../../colDef/gridColumnTypesRegistry.mjs";
5
+ import { GridSignature } from "../../../constants/signature.mjs";
4
6
  import { gridColumnsStateSelector, gridColumnVisibilityModelSelector } from "./gridColumnsSelector.mjs";
5
7
  import { clamp } from "../../../utils/utils.mjs";
6
8
  import { gridDensityFactorSelector } from "../density/densitySelector.mjs";
7
9
  import { gridHeaderFilteringEnabledSelector } from "../headerFiltering/gridHeaderFilteringSelectors.mjs";
8
10
  import { gridColumnGroupsHeaderMaxDepthSelector } from "../columnGrouping/gridColumnGroupsSelector.mjs";
9
11
  export const COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];
10
- const COLUMN_TYPES = getGridDefaultColumnTypes();
11
-
12
12
  /**
13
13
  * Computes width for flex columns.
14
14
  * Based on CSS Flexbox specification:
@@ -209,11 +209,7 @@ const applyInitialState = (columnsState, initialState) => {
209
209
  return newColumnsState;
210
210
  };
211
211
  export function getDefaultColTypeDef(type) {
212
- let colDef = COLUMN_TYPES[DEFAULT_GRID_COL_TYPE_KEY];
213
- if (type && COLUMN_TYPES[type]) {
214
- colDef = COLUMN_TYPES[type];
215
- }
216
- return colDef;
212
+ return getRegisteredColumnTypeDef(type);
217
213
  }
218
214
  export const createColumnsState = ({
219
215
  apiRef,
@@ -224,6 +220,18 @@ export const createColumnsState = ({
224
220
  updateInitialVisibilityModel = false
225
221
  }) => {
226
222
  const isInsideStateInitializer = !apiRef.current.state.columns;
223
+
224
+ // A community `DataGrid` must not resolve a Pro/Premium-only column type even if a Pro grid
225
+ // registered it globally in the same bundle (shared module registry). Fall back to the default
226
+ // type def in that case, so the column behaves like a plain column.
227
+ // NOTE: this is a community-vs-paid gate only — it does not distinguish Pro from Premium. It is
228
+ // enough today because the only registered type (`multiSelect`) is available in both Pro and
229
+ // Premium. If a Pro-only or Premium-only column type is added later, make this plan-aware:
230
+ // track each type's minimum plan in the registry and compare it against the grid signature
231
+ // (DataGrid < DataGridPro < DataGridPremium), so e.g. a Premium-only type also falls back in
232
+ // `DataGridPro`.
233
+ const isCommunity = apiRef.current.state.props?.signature === GridSignature.DataGrid;
234
+ const getColTypeDef = type => isCommunity && !isCommunityColumnType(type) ? getDefaultColTypeDef(undefined) : getDefaultColTypeDef(type);
227
235
  let columnsState;
228
236
  if (isInsideStateInitializer) {
229
237
  columnsState = {
@@ -256,7 +264,7 @@ export const createColumnsState = ({
256
264
  columnsToKeep[field] = true;
257
265
  let existingState = columnsState.lookup[field];
258
266
  if (existingState == null) {
259
- existingState = _extends({}, getDefaultColTypeDef(newColumn.type), {
267
+ existingState = _extends({}, getColTypeDef(newColumn.type), {
260
268
  field,
261
269
  hasBeenResized: false
262
270
  });
@@ -267,7 +275,7 @@ export const createColumnsState = ({
267
275
 
268
276
  // If the column type has changed - merge the existing state with the default column type definition
269
277
  if (existingState && existingState.type !== newColumn.type) {
270
- existingState = _extends({}, getDefaultColTypeDef(newColumn.type), {
278
+ existingState = _extends({}, getColTypeDef(newColumn.type), {
271
279
  field
272
280
  });
273
281
  }
@@ -280,7 +288,7 @@ export const createColumnsState = ({
280
288
  }
281
289
  }
282
290
  });
283
- const mergedProps = _extends({}, getDefaultColTypeDef(newColumn.type), {
291
+ const mergedProps = _extends({}, getColTypeDef(newColumn.type), {
284
292
  hasBeenResized,
285
293
  field
286
294
  });
@@ -10,6 +10,7 @@ exports.columnsStateInitializer = void 0;
10
10
  exports.useGridColumns = useGridColumns;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _warning = require("@mui/x-internals/warning");
13
14
  var _useGridApiMethod = require("../../utils/useGridApiMethod");
14
15
  var _useGridLogger = require("../../utils/useGridLogger");
15
16
  var _gridColumnsSelector = require("./gridColumnsSelector");
@@ -349,6 +350,16 @@ function useGridColumns(apiRef, props) {
349
350
  apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);
350
351
  }
351
352
  }, [apiRef, logger, props.columnVisibilityModel]);
353
+ const checkMultiSelectColumns = React.useCallback(orderedFields => {
354
+ if (props.signature !== _signature.GridSignature.DataGrid) {
355
+ return;
356
+ }
357
+ const lookup = (0, _gridColumnsSelector.gridColumnLookupSelector)(apiRef);
358
+ if (orderedFields.some(field => lookup[field]?.type === 'multiSelect')) {
359
+ (0, _warning.warnOnce)(['MUI X: The `multiSelect` column type is available in Pro and Premium versions', 'Use `<DataGridPro />` or `<DataGridPremium />` to render it correctly.', 'For more details, see https://mui.com/x/react-data-grid/column-definition/#multi-select-keyboard-interactions']);
360
+ }
361
+ }, [apiRef, props.signature]);
362
+ (0, _useGridEvent.useGridEvent)(apiRef, 'columnsChange', checkMultiSelectColumns);
352
363
  }
353
364
  function mergeColumnsState(columnsState) {
354
365
  return state => (0, _extends2.default)({}, state, {
@@ -2,6 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
+ import { warnOnce } from '@mui/x-internals/warning';
5
6
  import { useGridApiMethod } from "../../utils/useGridApiMethod.mjs";
6
7
  import { useGridLogger } from "../../utils/useGridLogger.mjs";
7
8
  import { gridColumnFieldsSelector, gridColumnDefinitionsSelector, gridColumnLookupSelector, gridColumnsStateSelector, gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector } from "./gridColumnsSelector.mjs";
@@ -340,6 +341,16 @@ export function useGridColumns(apiRef, props) {
340
341
  apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);
341
342
  }
342
343
  }, [apiRef, logger, props.columnVisibilityModel]);
344
+ const checkMultiSelectColumns = React.useCallback(orderedFields => {
345
+ if (props.signature !== GridSignature.DataGrid) {
346
+ return;
347
+ }
348
+ const lookup = gridColumnLookupSelector(apiRef);
349
+ if (orderedFields.some(field => lookup[field]?.type === 'multiSelect')) {
350
+ warnOnce(['MUI X: The `multiSelect` column type is available in Pro and Premium versions', 'Use `<DataGridPro />` or `<DataGridPremium />` to render it correctly.', 'For more details, see https://mui.com/x/react-data-grid/column-definition/#multi-select-keyboard-interactions']);
351
+ }
352
+ }, [apiRef, props.signature]);
353
+ useGridEvent(apiRef, 'columnsChange', checkMultiSelectColumns);
343
354
  }
344
355
  function mergeColumnsState(columnsState) {
345
356
  return state => _extends({}, state, {
@@ -133,7 +133,7 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
133
133
  params: fetchParams,
134
134
  cause: originalError
135
135
  }));
136
- } else {
136
+ } else if (process.env.NODE_ENV !== 'production') {
137
137
  (0, _warning.warnOnce)(['MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
138
138
  }
139
139
  }
@@ -250,7 +250,7 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
250
250
  params,
251
251
  cause: errorThrown
252
252
  }));
253
- } else {
253
+ } else if (process.env.NODE_ENV !== 'production') {
254
254
  (0, _warning.warnOnce)(['MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
255
255
  }
256
256
  throw errorThrown; // Let the caller handle the error further
@@ -126,7 +126,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
126
126
  params: fetchParams,
127
127
  cause: originalError
128
128
  }));
129
- } else {
129
+ } else if (process.env.NODE_ENV !== 'production') {
130
130
  warnOnce(['MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
131
131
  }
132
132
  }
@@ -243,7 +243,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
243
243
  params,
244
244
  cause: errorThrown
245
245
  }));
246
- } else {
246
+ } else if (process.env.NODE_ENV !== 'production') {
247
247
  warnOnce(['MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.', 'To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling.'], 'error');
248
248
  }
249
249
  throw errorThrown; // Let the caller handle the error further
@@ -373,7 +373,7 @@ const useGridCellEditing = (apiRef, props) => {
373
373
  });
374
374
  if (onProcessRowUpdateError) {
375
375
  onProcessRowUpdateError(errorThrown);
376
- } else {
376
+ } else if (process.env.NODE_ENV !== 'production') {
377
377
  (0, _warning.warnOnce)(['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, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
378
378
  }
379
379
  };
@@ -366,7 +366,7 @@ export const useGridCellEditing = (apiRef, props) => {
366
366
  });
367
367
  if (onProcessRowUpdateError) {
368
368
  onProcessRowUpdateError(errorThrown);
369
- } else {
369
+ } else if (process.env.NODE_ENV !== 'production') {
370
370
  warnOnce(['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, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
371
371
  }
372
372
  };
@@ -470,7 +470,7 @@ const useGridRowEditing = (apiRef, props) => {
470
470
  }
471
471
  if (onProcessRowUpdateError) {
472
472
  onProcessRowUpdateError(errorThrown);
473
- } else {
473
+ } else if (process.env.NODE_ENV !== 'production') {
474
474
  (0, _warning.warnOnce)(['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, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
475
475
  }
476
476
  };
@@ -463,7 +463,7 @@ export const useGridRowEditing = (apiRef, props) => {
463
463
  }
464
464
  if (onProcessRowUpdateError) {
465
465
  onProcessRowUpdateError(errorThrown);
466
- } else {
466
+ } else if (process.env.NODE_ENV !== 'production') {
467
467
  warnOnce(['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, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/persistence/.'], 'error');
468
468
  }
469
469
  };
@@ -85,7 +85,9 @@ const serializeRow = ({
85
85
  columns.forEach(column => {
86
86
  const cellParams = getCellParams(id, column.field);
87
87
  if (String(cellParams.formattedValue) === '[object Object]') {
88
- (0, _warning.warnOnce)(['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.']);
88
+ if (process.env.NODE_ENV !== 'production') {
89
+ (0, _warning.warnOnce)(['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.']);
90
+ }
89
91
  }
90
92
  row.addValue(serializeCellValue(cellParams, {
91
93
  ignoreValueFormatter,
@@ -77,7 +77,9 @@ const serializeRow = ({
77
77
  columns.forEach(column => {
78
78
  const cellParams = getCellParams(id, column.field);
79
79
  if (String(cellParams.formattedValue) === '[object Object]') {
80
- warnOnce(['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.']);
80
+ if (process.env.NODE_ENV !== 'production') {
81
+ warnOnce(['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.']);
82
+ }
81
83
  }
82
84
  row.addValue(serializeCellValue(cellParams, {
83
85
  ignoreValueFormatter,
@@ -50,17 +50,19 @@ const sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiRef) =>
50
50
  const hasSeveralItems = model.items.length > 1;
51
51
  let items;
52
52
  if (hasSeveralItems && disableMultipleColumnsFiltering) {
53
- (0, _warning.warnOnce)(['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 Data Grid, this prop is always `true`.'], 'error');
53
+ if (process.env.NODE_ENV !== 'production') {
54
+ (0, _warning.warnOnce)(['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 Data Grid, this prop is always `true`.'], 'error');
55
+ }
54
56
  items = [model.items[0]];
55
57
  } else {
56
58
  items = model.items;
57
59
  }
58
60
  const hasItemsWithoutIds = hasSeveralItems && items.some(item => item.id == null);
59
61
  const hasItemWithoutOperator = items.some(item => item.operator == null);
60
- if (hasItemsWithoutIds) {
62
+ if (hasItemsWithoutIds && process.env.NODE_ENV !== 'production') {
61
63
  (0, _warning.warnOnce)('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
62
64
  }
63
- if (hasItemWithoutOperator) {
65
+ if (hasItemWithoutOperator && process.env.NODE_ENV !== 'production') {
64
66
  (0, _warning.warnOnce)('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
65
67
  }
66
68
  if (hasItemWithoutOperator || hasItemsWithoutIds) {
@@ -42,17 +42,19 @@ export const sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiR
42
42
  const hasSeveralItems = model.items.length > 1;
43
43
  let items;
44
44
  if (hasSeveralItems && disableMultipleColumnsFiltering) {
45
- warnOnce(['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 Data Grid, this prop is always `true`.'], 'error');
45
+ if (process.env.NODE_ENV !== 'production') {
46
+ warnOnce(['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 Data Grid, this prop is always `true`.'], 'error');
47
+ }
46
48
  items = [model.items[0]];
47
49
  } else {
48
50
  items = model.items;
49
51
  }
50
52
  const hasItemsWithoutIds = hasSeveralItems && items.some(item => item.id == null);
51
53
  const hasItemWithoutOperator = items.some(item => item.operator == null);
52
- if (hasItemsWithoutIds) {
54
+ if (hasItemsWithoutIds && process.env.NODE_ENV !== 'production') {
53
55
  warnOnce('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');
54
56
  }
55
- if (hasItemWithoutOperator) {
57
+ if (hasItemWithoutOperator && process.env.NODE_ENV !== 'production') {
56
58
  warnOnce('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');
57
59
  }
58
60
  if (hasItemWithoutOperator || hasItemsWithoutIds) {
@@ -62,7 +62,7 @@ function useGridListView(apiRef, props) {
62
62
  }
63
63
  }, [apiRef, props.listViewColumn]);
64
64
  React.useEffect(() => {
65
- if (props.listView && !props.listViewColumn) {
65
+ if (process.env.NODE_ENV !== 'production' && props.listView && !props.listViewColumn) {
66
66
  (0, _warning.warnOnce)(['MUI X: The `listViewColumn` prop must be set if `listView` is enabled.', 'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.', 'For more details, see https://mui.com/x/react-data-grid/list-view/']);
67
67
  }
68
68
  }, [props.listView, props.listViewColumn]);
@@ -53,7 +53,7 @@ export function useGridListView(apiRef, props) {
53
53
  }
54
54
  }, [apiRef, props.listViewColumn]);
55
55
  React.useEffect(() => {
56
- if (props.listView && !props.listViewColumn) {
56
+ if (process.env.NODE_ENV !== 'production' && props.listView && !props.listViewColumn) {
57
57
  warnOnce(['MUI X: The `listViewColumn` prop must be set if `listView` is enabled.', 'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.', 'For more details, see https://mui.com/x/react-data-grid/list-view/']);
58
58
  }
59
59
  }, [props.listView, props.listViewColumn]);
@@ -10,7 +10,9 @@ var _warning = require("@mui/x-internals/warning");
10
10
  var _gridRowsSelector = require("../rows/gridRowsSelector");
11
11
  const sanitizeSortModel = (model, disableMultipleColumnsSorting) => {
12
12
  if (disableMultipleColumnsSorting && model.length > 1) {
13
- (0, _warning.warnOnce)(['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 Data Grid, this prop is always `true`.'], 'error');
13
+ if (process.env.NODE_ENV !== 'production') {
14
+ (0, _warning.warnOnce)(['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 Data Grid, this prop is always `true`.'], 'error');
15
+ }
14
16
  return [model[0]];
15
17
  }
16
18
  return model;
@@ -3,7 +3,9 @@ import { warnOnce } from '@mui/x-internals/warning';
3
3
  import { gridRowNodeSelector } from "../rows/gridRowsSelector.mjs";
4
4
  export const sanitizeSortModel = (model, disableMultipleColumnsSorting) => {
5
5
  if (disableMultipleColumnsSorting && model.length > 1) {
6
- warnOnce(['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 Data Grid, this prop is always `true`.'], 'error');
6
+ if (process.env.NODE_ENV !== 'production') {
7
+ warnOnce(['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 Data Grid, this prop is always `true`.'], 'error');
8
+ }
7
9
  return [model[0]];
8
10
  }
9
11
  return model;