@mui/x-data-grid 8.0.0-alpha.4 → 8.0.0-alpha.5

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 (90) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/DataGrid/DataGrid.js +2 -6
  3. package/DataGrid/useDataGridProps.js +3 -3
  4. package/components/GridRow.js +12 -1
  5. package/components/cell/GridActionsCellItem.js +4 -6
  6. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  7. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  8. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  9. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  10. package/components/toolbar/GridToolbarDensitySelector.js +3 -5
  11. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  12. package/components/toolbar/GridToolbarFilterButton.js +3 -0
  13. package/components/toolbar/GridToolbarQuickFilter.js +27 -23
  14. package/components/virtualization/GridMainContainer.js +1 -1
  15. package/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  16. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
  17. package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  18. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  19. package/hooks/features/columnResize/useGridColumnResize.js +9 -4
  20. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
  21. package/hooks/features/columns/gridColumnsUtils.js +2 -1
  22. package/index.js +1 -1
  23. package/internals/utils/index.d.ts +0 -1
  24. package/internals/utils/index.js +0 -1
  25. package/locales/koKR.js +45 -49
  26. package/material/index.js +30 -4
  27. package/models/gridBaseSlots.d.ts +21 -0
  28. package/models/gridBaseSlots.js +1 -0
  29. package/models/gridSlotsComponentsProps.d.ts +25 -5
  30. package/models/props/DataGridProps.d.ts +0 -5
  31. package/modern/DataGrid/DataGrid.js +2 -6
  32. package/modern/DataGrid/useDataGridProps.js +3 -3
  33. package/modern/components/GridRow.js +12 -1
  34. package/modern/components/cell/GridActionsCellItem.js +4 -6
  35. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
  36. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
  37. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
  38. package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  39. package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -5
  40. package/modern/components/toolbar/GridToolbarFilterButton.js +3 -0
  41. package/modern/components/toolbar/GridToolbarQuickFilter.js +27 -23
  42. package/modern/components/virtualization/GridMainContainer.js +1 -1
  43. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  44. package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  45. package/modern/hooks/features/columnResize/useGridColumnResize.js +9 -4
  46. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
  47. package/modern/index.js +1 -1
  48. package/modern/internals/utils/index.js +0 -1
  49. package/modern/locales/koKR.js +45 -49
  50. package/modern/material/index.js +30 -4
  51. package/modern/models/gridBaseSlots.js +1 -0
  52. package/node/DataGrid/DataGrid.js +2 -6
  53. package/node/DataGrid/useDataGridProps.js +2 -2
  54. package/node/components/GridRow.js +12 -1
  55. package/node/components/cell/GridActionsCellItem.js +3 -5
  56. package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
  57. package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
  58. package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
  59. package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
  60. package/node/components/toolbar/GridToolbarDensitySelector.js +3 -5
  61. package/node/components/toolbar/GridToolbarFilterButton.js +3 -0
  62. package/node/components/toolbar/GridToolbarQuickFilter.js +27 -23
  63. package/node/components/virtualization/GridMainContainer.js +1 -1
  64. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  65. package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  66. package/node/hooks/features/columnResize/useGridColumnResize.js +9 -4
  67. package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
  68. package/node/index.js +1 -1
  69. package/node/internals/utils/index.js +0 -11
  70. package/node/locales/koKR.js +45 -49
  71. package/node/material/index.js +31 -4
  72. package/node/models/gridBaseSlots.js +5 -0
  73. package/package.json +2 -2
  74. package/internals/utils/useProps.d.ts +0 -1
  75. package/internals/utils/useProps.js +0 -24
  76. package/joy/icons.d.ts +0 -32
  77. package/joy/icons.js +0 -431
  78. package/joy/index.d.ts +0 -2
  79. package/joy/index.js +0 -2
  80. package/joy/joySlots.d.ts +0 -3
  81. package/joy/joySlots.js +0 -389
  82. package/joy/package.json +0 -6
  83. package/modern/internals/utils/useProps.js +0 -24
  84. package/modern/joy/icons.js +0 -431
  85. package/modern/joy/index.js +0 -2
  86. package/modern/joy/joySlots.js +0 -389
  87. package/node/internals/utils/useProps.js +0 -30
  88. package/node/joy/icons.js +0 -439
  89. package/node/joy/index.js +0 -13
  90. package/node/joy/joySlots.js +0 -397
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.0.0-alpha.4
2
+ * @mui/x-data-grid v8.0.0-alpha.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,4 +1,3 @@
1
1
  export * from './computeSlots';
2
- export * from './useProps';
3
2
  export * from './propValidation';
4
3
  export * from './gridRowGroupingUtils';
@@ -1,4 +1,3 @@
1
1
  export * from "./computeSlots.js";
2
- export * from "./useProps.js";
3
2
  export * from "./propValidation.js";
4
3
  export * from "./gridRowGroupingUtils.js";
package/locales/koKR.js CHANGED
@@ -24,16 +24,15 @@ const koKRGrid = {
24
24
  toolbarQuickFilterLabel: '검색',
25
25
  toolbarQuickFilterDeleteIconLabel: '초기화',
26
26
  // Prompt toolbar field
27
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
- // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
- // toolbarPromptControlSendActionLabel: 'Send',
34
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
-
27
+ toolbarPromptControlPlaceholder: '프롬프트 입력…',
28
+ toolbarPromptControlWithRecordingPlaceholder: '프롬프트 입력 또는 녹음…',
29
+ toolbarPromptControlRecordingPlaceholder: '녹음 중…',
30
+ toolbarPromptControlLabel: '프롬프트 입력',
31
+ toolbarPromptControlRecordButtonDefaultLabel: '녹음',
32
+ toolbarPromptControlRecordButtonActiveLabel: '녹음 정지',
33
+ toolbarPromptControlSendActionLabel: '전송',
34
+ toolbarPromptControlSendActionAriaLabel: '프롬프트 전송',
35
+ toolbarPromptControlErrorMessage: '요청을 처리하는 동안 오류가 발생했습니다. 다른 프롬프트로 다시 시도하십시오.',
37
36
  // Export selector toolbar button text
38
37
  toolbarExport: '내보내기',
39
38
  toolbarExportLabel: '내보내기',
@@ -41,15 +40,14 @@ const koKRGrid = {
41
40
  toolbarExportPrint: '프린트',
42
41
  toolbarExportExcel: 'Excel로 내보내기',
43
42
  // Columns management text
44
- // columnsManagementSearchTitle: 'Search',
45
- // columnsManagementNoColumns: 'No columns',
46
- // columnsManagementShowHideAllText: 'Show/Hide All',
47
- // columnsManagementReset: 'Reset',
48
- // columnsManagementDeleteIconLabel: 'Clear',
49
-
43
+ columnsManagementSearchTitle: '검색',
44
+ columnsManagementNoColumns: '열이 없습니다.',
45
+ columnsManagementShowHideAllText: '모두 보기/숨기기',
46
+ columnsManagementReset: '초기화',
47
+ columnsManagementDeleteIconLabel: '제거',
50
48
  // Filter panel text
51
49
  filterPanelAddFilter: '필터 추가',
52
- // filterPanelRemoveAll: 'Remove all',
50
+ filterPanelRemoveAll: '모두 삭제',
53
51
  filterPanelDeleteIconLabel: '삭제',
54
52
  filterPanelLogicOperator: '논리 연산자',
55
53
  filterPanelOperator: '연산자',
@@ -60,9 +58,9 @@ const koKRGrid = {
60
58
  filterPanelInputPlaceholder: '값 입력',
61
59
  // Filter operators text
62
60
  filterOperatorContains: '포함하는',
63
- // filterOperatorDoesNotContain: 'does not contain',
61
+ filterOperatorDoesNotContain: '포함하지 않는',
64
62
  filterOperatorEquals: '값이 같은',
65
- // filterOperatorDoesNotEqual: 'does not equal',
63
+ filterOperatorDoesNotEqual: '값이 다른',
66
64
  filterOperatorStartsWith: '시작하는',
67
65
  filterOperatorEndsWith: '끝나는',
68
66
  filterOperatorIs: '~인',
@@ -74,36 +72,34 @@ const koKRGrid = {
74
72
  filterOperatorIsEmpty: '값이 없는',
75
73
  filterOperatorIsNotEmpty: '값이 있는',
76
74
  filterOperatorIsAnyOf: '값 중 하나인',
77
- // 'filterOperator=': '=',
78
- // 'filterOperator!=': '!=',
79
- // 'filterOperator>': '>',
80
- // 'filterOperator>=': '>=',
81
- // 'filterOperator<': '<',
82
- // 'filterOperator<=': '<=',
83
-
75
+ 'filterOperator=': '=',
76
+ 'filterOperator!=': '!=',
77
+ 'filterOperator>': '>',
78
+ 'filterOperator>=': '>=',
79
+ 'filterOperator<': '<',
80
+ 'filterOperator<=': '<=',
84
81
  // Header filter operators text
85
- // headerFilterOperatorContains: 'Contains',
86
- // headerFilterOperatorDoesNotContain: 'Does not contain',
87
- // headerFilterOperatorEquals: 'Equals',
88
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
89
- // headerFilterOperatorStartsWith: 'Starts with',
90
- // headerFilterOperatorEndsWith: 'Ends with',
91
- // headerFilterOperatorIs: 'Is',
92
- // headerFilterOperatorNot: 'Is not',
93
- // headerFilterOperatorAfter: 'Is after',
94
- // headerFilterOperatorOnOrAfter: 'Is on or after',
95
- // headerFilterOperatorBefore: 'Is before',
96
- // headerFilterOperatorOnOrBefore: 'Is on or before',
97
- // headerFilterOperatorIsEmpty: 'Is empty',
98
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
99
- // headerFilterOperatorIsAnyOf: 'Is any of',
100
- // 'headerFilterOperator=': 'Equals',
101
- // 'headerFilterOperator!=': 'Not equals',
102
- // 'headerFilterOperator>': 'Greater than',
103
- // 'headerFilterOperator>=': 'Greater than or equal to',
104
- // 'headerFilterOperator<': 'Less than',
105
- // 'headerFilterOperator<=': 'Less than or equal to',
106
-
82
+ headerFilterOperatorContains: '포함하는',
83
+ headerFilterOperatorDoesNotContain: '포함하지 않는',
84
+ headerFilterOperatorEquals: '값이 같은',
85
+ headerFilterOperatorDoesNotEqual: '값이 다른',
86
+ headerFilterOperatorStartsWith: '시작하는',
87
+ headerFilterOperatorEndsWith: '끝나는',
88
+ headerFilterOperatorIs: '~인',
89
+ headerFilterOperatorNot: '~아닌',
90
+ headerFilterOperatorAfter: ' 이후',
91
+ headerFilterOperatorOnOrAfter: '이후',
92
+ headerFilterOperatorBefore: ' 이전',
93
+ headerFilterOperatorOnOrBefore: '이전',
94
+ headerFilterOperatorIsEmpty: '값이 없는',
95
+ headerFilterOperatorIsNotEmpty: '값이 있는',
96
+ headerFilterOperatorIsAnyOf: ' 하나인',
97
+ 'headerFilterOperator=': '값이 같은',
98
+ 'headerFilterOperator!=': '값이 다른',
99
+ 'headerFilterOperator>': ' ',
100
+ 'headerFilterOperator>=': '같거나 ',
101
+ 'headerFilterOperator<': ' 작은',
102
+ 'headerFilterOperator<=': '같거나 작은',
107
103
  // Filter values text
108
104
  filterValueAny: '아무값',
109
105
  filterValueTrue: '참',
@@ -111,7 +107,7 @@ const koKRGrid = {
111
107
  // Column menu text
112
108
  columnMenuLabel: '메뉴',
113
109
  columnMenuShowColumns: '열 표시',
114
- // columnMenuManageColumns: 'Manage columns',
110
+ columnMenuManageColumns: ' 관리',
115
111
  columnMenuFilter: '필터',
116
112
  columnMenuHideColumn: '열 숨기기',
117
113
  columnMenuUnsort: '정렬 해제',
package/material/index.js CHANGED
@@ -1,7 +1,12 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+ const _excluded = ["inert", "iconStart", "iconEnd", "children"];
4
+ import * as React from 'react';
2
5
  import MUIBadge from '@mui/material/Badge';
3
6
  import MUICheckbox from '@mui/material/Checkbox';
4
7
  import MUIDivider from '@mui/material/Divider';
8
+ import MUIListItemIcon from '@mui/material/ListItemIcon';
9
+ import MUIListItemText from '@mui/material/ListItemText';
5
10
  import MUIMenuList from '@mui/material/MenuList';
6
11
  import MUIMenuItem from '@mui/material/MenuItem';
7
12
  import MUITextField from '@mui/material/TextField';
@@ -17,6 +22,7 @@ import MUIChip from '@mui/material/Chip';
17
22
  import { GridColumnUnsortedIcon } from "./icons/GridColumnUnsortedIcon.js";
18
23
  import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSaveAltIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon } from "./icons/index.js";
19
24
  import MUISelectOption from "./components/MUISelectOption.js";
25
+ import { jsx as _jsx } from "react/jsx-runtime";
20
26
  const iconSlots = {
21
27
  booleanCellTrueIcon: GridCheckIcon,
22
28
  booleanCellFalseIcon: GridCloseIcon,
@@ -54,12 +60,12 @@ const iconSlots = {
54
60
  filterPanelRemoveAllIcon: GridDeleteForeverIcon,
55
61
  columnReorderIcon: GridDragIcon
56
62
  };
57
- const materialSlots = _extends({}, iconSlots, {
63
+ const baseSlots = {
58
64
  baseBadge: MUIBadge,
59
65
  baseCheckbox: MUICheckbox,
60
66
  baseDivider: MUIDivider,
61
67
  baseMenuList: MUIMenuList,
62
- baseMenuItem: MUIMenuItem,
68
+ baseMenuItem: BaseMenuItem,
63
69
  baseTextField: MUITextField,
64
70
  baseFormControl: MUIFormControl,
65
71
  baseSelect: MUISelect,
@@ -71,5 +77,25 @@ const materialSlots = _extends({}, iconSlots, {
71
77
  baseInputLabel: MUIInputLabel,
72
78
  baseSelectOption: MUISelectOption,
73
79
  baseChip: MUIChip
74
- });
75
- export default materialSlots;
80
+ };
81
+ const materialSlots = _extends({}, baseSlots, iconSlots);
82
+ export default materialSlots;
83
+ function BaseMenuItem(props) {
84
+ const {
85
+ inert,
86
+ iconStart,
87
+ iconEnd,
88
+ children
89
+ } = props,
90
+ other = _objectWithoutPropertiesLoose(props, _excluded);
91
+ if (inert) {
92
+ other.disableRipple = true;
93
+ }
94
+ return /*#__PURE__*/React.createElement(MUIMenuItem, other, [iconStart && /*#__PURE__*/_jsx(MUIListItemIcon, {
95
+ children: iconStart
96
+ }, "1"), /*#__PURE__*/_jsx(MUIListItemText, {
97
+ children: children
98
+ }, "2"), iconEnd && /*#__PURE__*/_jsx(MUIListItemIcon, {
99
+ children: iconEnd
100
+ }, "3")]);
101
+ }
@@ -0,0 +1,21 @@
1
+ export type BadgeProps = {
2
+ badgeContent?: React.ReactNode;
3
+ children: React.ReactNode;
4
+ color?: 'primary' | 'default' | 'error';
5
+ overlap?: 'circular';
6
+ variant?: 'dot';
7
+ invisible?: boolean;
8
+ };
9
+ export type DividerProps = {};
10
+ export type MenuItemProps = {
11
+ autoFocus?: boolean;
12
+ children: React.ReactNode;
13
+ /** For items that aren't interactive themselves (but may contain an interactive widget) */
14
+ inert?: boolean;
15
+ disabled?: boolean;
16
+ onClick?: React.MouseEventHandler<HTMLElement>;
17
+ iconStart?: React.ReactNode;
18
+ iconEnd?: React.ReactNode;
19
+ selected?: boolean;
20
+ value?: number | string | readonly string[];
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import type { BadgeProps } from '@mui/material/Badge';
2
+ import type { BadgeProps as MUIBadgeProps } from '@mui/material/Badge';
3
3
  import type { CheckboxProps } from '@mui/material/Checkbox';
4
4
  import type { MenuListProps } from '@mui/material/MenuList';
5
- import type { MenuItemProps } from '@mui/material/MenuItem';
5
+ import type { MenuItemProps as MUIMenuItemProps } from '@mui/material/MenuItem';
6
6
  import type { TextFieldProps } from '@mui/material/TextField';
7
7
  import type { FormControlProps } from '@mui/material/FormControl';
8
8
  import type { SelectProps } from '@mui/material/Select';
@@ -33,7 +33,9 @@ import type { GridColumnsManagementProps } from '../components/columnsManagement
33
33
  import type { GridLoadingOverlayProps } from '../components/GridLoadingOverlay';
34
34
  import type { GridRowCountProps } from '../components/GridRowCount';
35
35
  import type { GridColumnHeaderSortIconProps } from '../components/columnHeaders/GridColumnHeaderSortIcon';
36
- type DividerProps = {};
36
+ import type { BadgeProps, DividerProps, MenuItemProps } from './gridBaseSlots';
37
+ type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
38
+ type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
37
39
  export interface BaseBadgePropsOverrides {
38
40
  }
39
41
  export interface BaseCheckboxPropsOverrides {
@@ -106,7 +108,7 @@ export interface SkeletonCellPropsOverrides {
106
108
  }
107
109
  export interface RowPropsOverrides {
108
110
  }
109
- export interface GridSlotProps {
111
+ interface BaseSlotProps {
110
112
  baseBadge: BadgeProps & BaseBadgePropsOverrides;
111
113
  baseCheckbox: CheckboxProps & BaseCheckboxPropsOverrides;
112
114
  baseDivider: DividerProps & BaseDividerPropsOverrides;
@@ -128,6 +130,12 @@ export interface GridSlotProps {
128
130
  children?: React.ReactNode;
129
131
  } & BaseSelectOptionPropsOverrides;
130
132
  baseChip: ChipProps & BaseChipPropsOverrides;
133
+ }
134
+ interface MaterialSlotProps {
135
+ baseBadge: MUIBadgeProps;
136
+ baseMenuItem: MUIMenuItemProps;
137
+ }
138
+ interface ElementSlotProps {
131
139
  cell: GridCellProps & CellPropsOverrides;
132
140
  columnHeaders: GridColumnHeadersProps;
133
141
  columnHeaderFilterIconButton: ColumnHeaderFilterIconButtonProps & ColumnHeaderFilterIconButtonPropsOverrides;
@@ -148,7 +156,19 @@ export interface GridSlotProps {
148
156
  row: GridRowProps & RowPropsOverrides;
149
157
  skeletonCell: GridSkeletonCellProps & SkeletonCellPropsOverrides;
150
158
  toolbar: GridToolbarProps & ToolbarPropsOverrides;
151
- }
159
+ /**
160
+ * Props passed to the `.main` (role="grid") element
161
+ */
162
+ main: MainProps;
163
+ /**
164
+ * Props passed to the `.root` element
165
+ */
166
+ root: RootProps;
167
+ }
168
+ type Merge<A, B> = {
169
+ [K in keyof A | keyof B]: K extends keyof A & keyof B ? A[K] & B[K] : K extends keyof B ? B[K] : K extends keyof A ? A[K] : never;
170
+ };
171
+ export type GridSlotProps = Merge<BaseSlotProps, MaterialSlotProps> & ElementSlotProps;
152
172
  /**
153
173
  * Overridable components props dynamically passed to the component at rendering.
154
174
  */
@@ -370,11 +370,6 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
370
370
  * The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
371
371
  */
372
372
  apiRef?: React.MutableRefObject<GridApiCommunity>;
373
- /**
374
- * Forwarded props for the Data Grid root element.
375
- * @ignore - do not document.
376
- */
377
- forwardedProps?: Record<string, unknown>;
378
373
  /**
379
374
  * Signal to the underlying logic what version of the public component API
380
375
  * of the Data Grid is exposed [[GridSignature]].
@@ -38,7 +38,7 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
38
38
  style: props.style,
39
39
  sx: props.sx,
40
40
  ref: ref
41
- }, props.forwardedProps, {
41
+ }, props.slotProps?.root, {
42
42
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
43
43
  }))
44
44
  });
@@ -95,6 +95,7 @@ DataGridRaw.propTypes = {
95
95
  */
96
96
  autosizeOptions: PropTypes.shape({
97
97
  columns: PropTypes.arrayOf(PropTypes.string),
98
+ disableColumnVirtualization: PropTypes.bool,
98
99
  expand: PropTypes.bool,
99
100
  includeHeaders: PropTypes.bool,
100
101
  includeOutliers: PropTypes.bool,
@@ -248,11 +249,6 @@ DataGridRaw.propTypes = {
248
249
  quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
249
250
  quickFilterValues: PropTypes.array
250
251
  }),
251
- /**
252
- * Forwarded props for the Data Grid root element.
253
- * @ignore - do not document.
254
- */
255
- forwardedProps: PropTypes.object,
256
252
  /**
257
253
  * Function that applies CSS classes dynamically on cells.
258
254
  * @param {GridCellParams} params With all properties from [[GridCellParams]].
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { GRID_DEFAULT_LOCALE_TEXT } from "../constants/index.js";
5
5
  import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
6
- import { computeSlots, useProps } from "../internals/utils/index.js";
6
+ import { computeSlots } from "../internals/utils/index.js";
7
7
  import { DATA_GRID_PROPS_DEFAULT_VALUES } from "../constants/dataGridPropsDefaultValues.js";
8
8
  const DATA_GRID_FORCED_PROPS = {
9
9
  disableMultipleColumnsFiltering: true,
@@ -19,12 +19,12 @@ const DATA_GRID_FORCED_PROPS = {
19
19
  };
20
20
  const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
21
21
  export const useDataGridProps = inProps => {
22
- const themedProps = useProps(
22
+ const themedProps =
23
23
  // eslint-disable-next-line material-ui/mui-name-matches-component-name
24
24
  useThemeProps({
25
25
  props: inProps,
26
26
  name: 'MuiDataGrid'
27
- }));
27
+ });
28
28
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
29
29
  const slots = React.useMemo(() => computeSlots({
30
30
  defaultSlots,
@@ -25,6 +25,7 @@ import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFille
25
25
  import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
26
26
  import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
27
27
  import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
28
+ import { gridVirtualizationColumnEnabledSelector } from "../hooks/index.js";
28
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
30
  const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
30
31
  const {
@@ -68,6 +69,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
68
69
  const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
69
70
  const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
70
71
  const editable = rootProps.editMode === GridEditModes.Row;
72
+ const hasColumnVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
71
73
  const hasFocusCell = focusedColumnIndex !== undefined;
72
74
  const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
73
75
  const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
@@ -249,7 +251,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
249
251
  if (hasVirtualFocusCellLeft) {
250
252
  cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedPosition.VIRTUAL));
251
253
  }
252
- for (let i = renderContext.firstColumnIndex; i < renderContext.lastColumnIndex; i += 1) {
254
+ let firstColumnIndex;
255
+ let lastColumnIndex;
256
+ if (!rootProps.disableVirtualization && !hasColumnVirtualization) {
257
+ firstColumnIndex = 0;
258
+ lastColumnIndex = visibleColumns.length;
259
+ } else {
260
+ firstColumnIndex = renderContext.firstColumnIndex;
261
+ lastColumnIndex = renderContext.lastColumnIndex;
262
+ }
263
+ for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {
253
264
  const column = visibleColumns[i];
254
265
  const indexInSection = i - pinnedColumns.left.length;
255
266
  if (!column) {
@@ -4,9 +4,8 @@ const _excluded = ["label", "icon", "showInMenu", "onClick"],
4
4
  _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import ListItemIcon from '@mui/material/ListItemIcon';
8
7
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
10
9
  const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
11
10
  const rootProps = useGridRootProps();
12
11
  if (!props.showInMenu) {
@@ -46,13 +45,12 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
46
45
  closeMenu?.();
47
46
  }
48
47
  };
49
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, _extends({
48
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({
50
49
  ref: ref
51
50
  }, other, {
52
51
  onClick: handleClick,
53
- children: [icon && /*#__PURE__*/_jsx(ListItemIcon, {
54
- children: icon
55
- }), label]
52
+ iconStart: icon,
53
+ children: label
56
54
  }));
57
55
  });
58
56
  process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
@@ -1,10 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import ListItemIcon from '@mui/material/ListItemIcon';
4
- import ListItemText from '@mui/material/ListItemText';
5
3
  import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
6
4
  import { useGridRootProps } from "../../../../hooks/utils/useGridRootProps.js";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
8
6
  function GridColumnMenuFilterItem(props) {
9
7
  const {
10
8
  colDef,
@@ -19,15 +17,12 @@ function GridColumnMenuFilterItem(props) {
19
17
  if (rootProps.disableColumnFilter || !colDef.filterable) {
20
18
  return null;
21
19
  }
22
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
20
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
23
21
  onClick: showFilter,
24
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
25
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuFilterIcon, {
26
- fontSize: "small"
27
- })
28
- }), /*#__PURE__*/_jsx(ListItemText, {
29
- children: apiRef.current.getLocaleText('columnMenuFilter')
30
- })]
22
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuFilterIcon, {
23
+ fontSize: "small"
24
+ }),
25
+ children: apiRef.current.getLocaleText('columnMenuFilter')
31
26
  });
32
27
  }
33
28
  process.env.NODE_ENV !== "production" ? GridColumnMenuFilterItem.propTypes = {
@@ -1,11 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import ListItemIcon from '@mui/material/ListItemIcon';
4
- import ListItemText from '@mui/material/ListItemText';
5
3
  import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
6
4
  import { useGridRootProps } from "../../../../hooks/utils/useGridRootProps.js";
7
5
  import { gridVisibleColumnDefinitionsSelector } from "../../../../hooks/features/columns/index.js";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
9
7
  function GridColumnMenuHideItem(props) {
10
8
  const {
11
9
  colDef,
@@ -35,16 +33,13 @@ function GridColumnMenuHideItem(props) {
35
33
  if (colDef.hideable === false) {
36
34
  return null;
37
35
  }
38
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
36
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
39
37
  onClick: toggleColumn,
40
38
  disabled: disabled,
41
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
42
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuHideIcon, {
43
- fontSize: "small"
44
- })
45
- }), /*#__PURE__*/_jsx(ListItemText, {
46
- children: apiRef.current.getLocaleText('columnMenuHideColumn')
47
- })]
39
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuHideIcon, {
40
+ fontSize: "small"
41
+ }),
42
+ children: apiRef.current.getLocaleText('columnMenuHideColumn')
48
43
  });
49
44
  }
50
45
  process.env.NODE_ENV !== "production" ? GridColumnMenuHideItem.propTypes = {
@@ -1,11 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import ListItemIcon from '@mui/material/ListItemIcon';
4
- import ListItemText from '@mui/material/ListItemText';
5
3
  import { GridPreferencePanelsValue } from "../../../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js";
6
4
  import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
7
5
  import { useGridRootProps } from "../../../../hooks/utils/useGridRootProps.js";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
9
7
  function GridColumnMenuManageItem(props) {
10
8
  const {
11
9
  onClick
@@ -19,15 +17,12 @@ function GridColumnMenuManageItem(props) {
19
17
  if (rootProps.disableColumnSelector) {
20
18
  return null;
21
19
  }
22
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
20
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
23
21
  onClick: showColumns,
24
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
25
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuManageColumnsIcon, {
26
- fontSize: "small"
27
- })
28
- }), /*#__PURE__*/_jsx(ListItemText, {
29
- children: apiRef.current.getLocaleText('columnMenuManageColumns')
30
- })]
22
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuManageColumnsIcon, {
23
+ fontSize: "small"
24
+ }),
25
+ children: apiRef.current.getLocaleText('columnMenuManageColumns')
31
26
  });
32
27
  }
33
28
  process.env.NODE_ENV !== "production" ? GridColumnMenuManageItem.propTypes = {
@@ -1,7 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import ListItemIcon from '@mui/material/ListItemIcon';
4
- import ListItemText from '@mui/material/ListItemText';
5
3
  import { useGridSelector } from "../../../../hooks/utils/useGridSelector.js";
6
4
  import { gridSortModelSelector } from "../../../../hooks/features/sorting/gridSortingSelector.js";
7
5
  import { useGridApiContext } from "../../../../hooks/utils/useGridApiContext.js";
@@ -36,31 +34,24 @@ function GridColumnMenuSortItem(props) {
36
34
  return typeof label === 'function' ? label(colDef) : label;
37
35
  };
38
36
  return /*#__PURE__*/_jsxs(React.Fragment, {
39
- children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
37
+ children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
40
38
  onClick: onSortMenuItemClick,
41
39
  "data-value": "asc",
42
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
43
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortAscendingIcon, {
44
- fontSize: "small"
45
- })
46
- }), /*#__PURE__*/_jsx(ListItemText, {
47
- children: getLabel('columnMenuSortAsc')
48
- })]
49
- }) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
40
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortAscendingIcon, {
41
+ fontSize: "small"
42
+ }),
43
+ children: getLabel('columnMenuSortAsc')
44
+ }) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
50
45
  onClick: onSortMenuItemClick,
51
46
  "data-value": "desc",
52
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
53
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortDescendingIcon, {
54
- fontSize: "small"
55
- })
56
- }), /*#__PURE__*/_jsx(ListItemText, {
57
- children: getLabel('columnMenuSortDesc')
58
- })]
59
- }) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
47
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortDescendingIcon, {
48
+ fontSize: "small"
49
+ }),
50
+ children: getLabel('columnMenuSortDesc')
51
+ }) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
60
52
  onClick: onSortMenuItemClick,
61
- children: [/*#__PURE__*/_jsx(ListItemIcon, {}), /*#__PURE__*/_jsx(ListItemText, {
62
- children: apiRef.current.getLocaleText('columnMenuUnsort')
63
- })]
53
+ iconStart: "",
54
+ children: apiRef.current.getLocaleText('columnMenuUnsort')
64
55
  }) : null]
65
56
  });
66
57
  }
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils';
5
- import ListItemIcon from '@mui/material/ListItemIcon';
6
5
  import { gridDensitySelector } from "../../hooks/features/density/densitySelector.js";
7
6
  import { isHideMenuKey } from "../../utils/keyboardUtils.js";
8
7
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
@@ -72,12 +71,11 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
72
71
  if (rootProps.disableDensitySelector) {
73
72
  return null;
74
73
  }
75
- const densityElements = densityOptions.map((option, index) => /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
74
+ const densityElements = densityOptions.map((option, index) => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
76
75
  onClick: () => handleDensityUpdate(option.value),
77
76
  selected: option.value === density,
78
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
79
- children: option.icon
80
- }), option.label]
77
+ iconStart: option.icon,
78
+ children: option.label
81
79
  }, index));
82
80
  return /*#__PURE__*/_jsxs(React.Fragment, {
83
81
  children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
@@ -31,6 +31,9 @@ const GridToolbarFilterListRoot = styled('ul', {
31
31
  margin: theme.spacing(1, 1, 0.5),
32
32
  padding: theme.spacing(0, 1)
33
33
  }));
34
+
35
+ // FIXME(v8:romgrk): override slotProps
36
+
34
37
  const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolbarFilterButton(props, ref) {
35
38
  const {
36
39
  slotProps = {}