@mui/x-data-grid 6.18.0 → 7.0.0-alpha.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 (139) hide show
  1. package/CHANGELOG.md +212 -5
  2. package/DataGrid/DataGrid.js +0 -10
  3. package/DataGrid/useDataGridProps.js +9 -14
  4. package/colDef/gridActionsColDef.js +1 -2
  5. package/colDef/gridBooleanColDef.js +0 -1
  6. package/colDef/gridBooleanOperators.js +3 -4
  7. package/colDef/gridCheckboxSelectionColDef.js +0 -1
  8. package/colDef/gridDateOperators.js +10 -11
  9. package/colDef/gridNumericColDef.js +1 -3
  10. package/colDef/gridNumericOperators.d.ts +2 -2
  11. package/colDef/gridNumericOperators.js +13 -14
  12. package/colDef/gridSingleSelectOperators.js +5 -6
  13. package/colDef/gridStringColDef.js +1 -3
  14. package/colDef/gridStringOperators.d.ts +2 -2
  15. package/colDef/gridStringOperators.js +17 -13
  16. package/components/cell/GridActionsCell.js +19 -12
  17. package/components/cell/GridCell.js +4 -4
  18. package/constants/defaultGridSlotsComponents.js +17 -17
  19. package/hooks/features/export/useGridPrintExport.js +7 -10
  20. package/hooks/features/filter/gridFilterUtils.d.ts +1 -0
  21. package/hooks/features/filter/gridFilterUtils.js +20 -71
  22. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  23. package/hooks/features/filter/useGridFilter.js +2 -1
  24. package/hooks/features/rows/useGridRows.js +4 -1
  25. package/index.js +1 -1
  26. package/internals/index.d.ts +1 -1
  27. package/internals/index.js +1 -1
  28. package/internals/utils/computeSlots.d.ts +4 -6
  29. package/internals/utils/computeSlots.js +10 -9
  30. package/internals/utils/index.d.ts +0 -1
  31. package/internals/utils/index.js +0 -1
  32. package/internals/utils/useProps.d.ts +1 -8
  33. package/internals/utils/useProps.js +5 -8
  34. package/joy/icons.d.ts +1 -2
  35. package/joy/joySlots.d.ts +1 -2
  36. package/legacy/DataGrid/DataGrid.js +0 -10
  37. package/legacy/DataGrid/useDataGridProps.js +10 -18
  38. package/legacy/colDef/gridActionsColDef.js +1 -2
  39. package/legacy/colDef/gridBooleanColDef.js +0 -1
  40. package/legacy/colDef/gridBooleanOperators.js +3 -4
  41. package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -1
  42. package/legacy/colDef/gridDateOperators.js +10 -11
  43. package/legacy/colDef/gridNumericColDef.js +1 -3
  44. package/legacy/colDef/gridNumericOperators.js +13 -14
  45. package/legacy/colDef/gridSingleSelectOperators.js +5 -6
  46. package/legacy/colDef/gridStringColDef.js +1 -3
  47. package/legacy/colDef/gridStringOperators.js +17 -13
  48. package/legacy/components/cell/GridActionsCell.js +21 -12
  49. package/legacy/components/cell/GridCell.js +6 -4
  50. package/legacy/constants/defaultGridSlotsComponents.js +17 -17
  51. package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
  52. package/legacy/hooks/features/filter/gridFilterUtils.js +20 -71
  53. package/legacy/hooks/features/filter/useGridFilter.js +2 -1
  54. package/legacy/hooks/features/rows/useGridRows.js +2 -1
  55. package/legacy/index.js +1 -1
  56. package/legacy/internals/index.js +1 -1
  57. package/legacy/internals/utils/computeSlots.js +10 -9
  58. package/legacy/internals/utils/index.js +0 -1
  59. package/legacy/internals/utils/useProps.js +5 -6
  60. package/legacy/locales/csCZ.js +2 -2
  61. package/legacy/material/index.js +48 -48
  62. package/legacy/utils/getPublicApiRef.js +5 -0
  63. package/locales/csCZ.js +2 -2
  64. package/material/index.js +48 -48
  65. package/models/api/gridFilterApi.d.ts +5 -0
  66. package/models/colDef/gridColDef.d.ts +4 -14
  67. package/models/colDef/index.d.ts +1 -1
  68. package/models/gridFilterOperator.d.ts +4 -16
  69. package/models/gridIconSlotsComponent.d.ts +35 -36
  70. package/models/gridSlotsComponent.d.ts +31 -34
  71. package/models/index.d.ts +1 -1
  72. package/models/props/DataGridProps.d.ts +3 -14
  73. package/modern/DataGrid/DataGrid.js +0 -10
  74. package/modern/DataGrid/useDataGridProps.js +7 -9
  75. package/modern/colDef/gridActionsColDef.js +1 -2
  76. package/modern/colDef/gridBooleanColDef.js +0 -1
  77. package/modern/colDef/gridBooleanOperators.js +3 -4
  78. package/modern/colDef/gridCheckboxSelectionColDef.js +0 -1
  79. package/modern/colDef/gridDateOperators.js +10 -11
  80. package/modern/colDef/gridNumericColDef.js +1 -3
  81. package/modern/colDef/gridNumericOperators.js +13 -14
  82. package/modern/colDef/gridSingleSelectOperators.js +5 -6
  83. package/modern/colDef/gridStringColDef.js +1 -3
  84. package/modern/colDef/gridStringOperators.js +17 -13
  85. package/modern/components/cell/GridActionsCell.js +18 -12
  86. package/modern/components/cell/GridCell.js +3 -3
  87. package/modern/constants/defaultGridSlotsComponents.js +17 -17
  88. package/modern/hooks/features/export/useGridPrintExport.js +6 -10
  89. package/modern/hooks/features/filter/gridFilterUtils.js +20 -70
  90. package/modern/hooks/features/filter/useGridFilter.js +2 -1
  91. package/modern/hooks/features/rows/useGridRows.js +1 -1
  92. package/modern/index.js +1 -1
  93. package/modern/internals/index.js +1 -1
  94. package/modern/internals/utils/computeSlots.js +10 -9
  95. package/modern/internals/utils/index.js +0 -1
  96. package/modern/internals/utils/useProps.js +5 -8
  97. package/modern/locales/csCZ.js +2 -2
  98. package/modern/material/index.js +48 -48
  99. package/modern/utils/getPublicApiRef.js +5 -0
  100. package/node/DataGrid/DataGrid.js +0 -10
  101. package/node/DataGrid/useDataGridProps.js +6 -8
  102. package/node/colDef/gridActionsColDef.js +1 -2
  103. package/node/colDef/gridBooleanColDef.js +0 -1
  104. package/node/colDef/gridBooleanOperators.js +3 -4
  105. package/node/colDef/gridCheckboxSelectionColDef.js +0 -1
  106. package/node/colDef/gridDateOperators.js +10 -11
  107. package/node/colDef/gridNumericColDef.js +1 -3
  108. package/node/colDef/gridNumericOperators.js +14 -14
  109. package/node/colDef/gridSingleSelectOperators.js +5 -6
  110. package/node/colDef/gridStringColDef.js +1 -3
  111. package/node/colDef/gridStringOperators.js +18 -13
  112. package/node/components/cell/GridActionsCell.js +18 -12
  113. package/node/components/cell/GridCell.js +3 -3
  114. package/node/constants/defaultGridSlotsComponents.js +17 -17
  115. package/node/hooks/features/export/useGridPrintExport.js +5 -9
  116. package/node/hooks/features/filter/gridFilterUtils.js +21 -70
  117. package/node/hooks/features/filter/useGridFilter.js +2 -1
  118. package/node/hooks/features/rows/useGridRows.js +1 -1
  119. package/node/index.js +1 -1
  120. package/node/internals/index.js +13 -13
  121. package/node/internals/utils/computeSlots.js +10 -8
  122. package/node/internals/utils/index.js +0 -11
  123. package/node/internals/utils/useProps.js +4 -8
  124. package/node/locales/csCZ.js +2 -2
  125. package/node/material/index.js +48 -48
  126. package/node/utils/getPublicApiRef.js +11 -0
  127. package/package.json +1 -1
  128. package/utils/getPublicApiRef.d.ts +3 -0
  129. package/utils/getPublicApiRef.js +5 -0
  130. package/colDef/utils.d.ts +0 -21
  131. package/colDef/utils.js +0 -51
  132. package/internals/utils/slotsMigration.d.ts +0 -4
  133. package/internals/utils/slotsMigration.js +0 -13
  134. package/legacy/colDef/utils.js +0 -51
  135. package/legacy/internals/utils/slotsMigration.js +0 -14
  136. package/modern/colDef/utils.js +0 -51
  137. package/modern/internals/utils/slotsMigration.js +0 -13
  138. package/node/colDef/utils.js +0 -63
  139. package/node/internals/utils/slotsMigration.js +0 -21
@@ -1,182 +1,181 @@
1
1
  import * as React from 'react';
2
2
  /**
3
3
  * Set of icons used in the grid component UI.
4
- * TODO: Differentiate community and pro interface
5
4
  */
6
5
  export interface GridIconSlotsComponent {
7
6
  /**
8
7
  * Icon displayed on the boolean cell to represent the true value.
9
8
  * @default GridCheckIcon
10
9
  */
11
- BooleanCellTrueIcon: React.JSXElementConstructor<any>;
10
+ booleanCellTrueIcon: React.JSXElementConstructor<any>;
12
11
  /**
13
12
  * Icon displayed on the boolean cell to represent the false value.
14
13
  * @default GridCloseIcon
15
14
  */
16
- BooleanCellFalseIcon: React.JSXElementConstructor<any>;
15
+ booleanCellFalseIcon: React.JSXElementConstructor<any>;
17
16
  /**
18
17
  * Icon displayed on the side of the column header title to display the filter input component.
19
18
  * @default GridTripleDotsVerticalIcon
20
19
  */
21
- ColumnMenuIcon: React.JSXElementConstructor<any>;
20
+ columnMenuIcon: React.JSXElementConstructor<any>;
22
21
  /**
23
22
  * Icon displayed on the open filter button present in the toolbar by default.
24
23
  * @default GridFilterListIcon
25
24
  */
26
- OpenFilterButtonIcon: React.JSXElementConstructor<any>;
25
+ openFilterButtonIcon: React.JSXElementConstructor<any>;
27
26
  /**
28
27
  * Icon displayed on the column header menu to show that a filter has been applied to the column.
29
28
  * @default GridFilterAltIcon
30
29
  */
31
- ColumnFilteredIcon: React.JSXElementConstructor<any>;
30
+ columnFilteredIcon: React.JSXElementConstructor<any>;
32
31
  /**
33
32
  * Icon displayed on the column menu selector tab.
34
33
  * @default GridColumnIcon
35
34
  */
36
- ColumnSelectorIcon: React.JSXElementConstructor<any>;
35
+ columnSelectorIcon: React.JSXElementConstructor<any>;
37
36
  /**
38
37
  * Icon displayed on the side of the column header title when unsorted.
39
38
  * @default GridColumnUnsortedIcon
40
39
  */
41
- ColumnUnsortedIcon: React.JSXElementConstructor<any> | null;
40
+ columnUnsortedIcon: React.JSXElementConstructor<any> | null;
42
41
  /**
43
42
  * Icon displayed on the side of the column header title when sorted in ascending order.
44
43
  * @default GridArrowUpwardIcon
45
44
  */
46
- ColumnSortedAscendingIcon: React.JSXElementConstructor<any> | null;
45
+ columnSortedAscendingIcon: React.JSXElementConstructor<any> | null;
47
46
  /**
48
47
  * Icon displayed on the side of the column header title when sorted in descending order.
49
48
  * @default GridArrowDownwardIcon
50
49
  */
51
- ColumnSortedDescendingIcon: React.JSXElementConstructor<any> | null;
50
+ columnSortedDescendingIcon: React.JSXElementConstructor<any> | null;
52
51
  /**
53
52
  * Icon displayed in between two column headers that allows to resize the column header.
54
53
  * @default GridSeparatorIcon
55
54
  */
56
- ColumnResizeIcon: React.JSXElementConstructor<any>;
55
+ columnResizeIcon: React.JSXElementConstructor<any>;
57
56
  /**
58
57
  * Icon displayed on the compact density option in the toolbar.
59
58
  * @default GridViewHeadlineIcon
60
59
  */
61
- DensityCompactIcon: React.JSXElementConstructor<any>;
60
+ densityCompactIcon: React.JSXElementConstructor<any>;
62
61
  /**
63
62
  * Icon displayed on the standard density option in the toolbar.
64
63
  * @default GridTableRowsIcon
65
64
  */
66
- DensityStandardIcon: React.JSXElementConstructor<any>;
65
+ densityStandardIcon: React.JSXElementConstructor<any>;
67
66
  /**
68
67
  * Icon displayed on the "comfortable" density option in the toolbar.
69
68
  * @default GridViewStreamIcon
70
69
  */
71
- DensityComfortableIcon: React.JSXElementConstructor<any>;
70
+ densityComfortableIcon: React.JSXElementConstructor<any>;
72
71
  /**
73
72
  * Icon displayed on the open export button present in the toolbar by default.
74
73
  * @default GridSaveAltIcon
75
74
  */
76
- ExportIcon: React.JSXElementConstructor<any>;
75
+ exportIcon: React.JSXElementConstructor<any>;
77
76
  /**
78
77
  * Icon displayed on the `actions` column type to open the menu.
79
78
  * @default GridMoreVertIcon
80
79
  */
81
- MoreActionsIcon: React.JSXElementConstructor<any>;
80
+ moreActionsIcon: React.JSXElementConstructor<any>;
82
81
  /**
83
82
  * Icon displayed on the tree data toggling column when the children are collapsed
84
83
  * @default GridKeyboardArrowRight
85
84
  */
86
- TreeDataExpandIcon: React.JSXElementConstructor<any>;
85
+ treeDataExpandIcon: React.JSXElementConstructor<any>;
87
86
  /**
88
87
  * Icon displayed on the tree data toggling column when the children are expanded
89
88
  * @default GridExpandMoreIcon
90
89
  */
91
- TreeDataCollapseIcon: React.JSXElementConstructor<any>;
90
+ treeDataCollapseIcon: React.JSXElementConstructor<any>;
92
91
  /**
93
92
  * Icon displayed on the grouping column when the children are collapsed
94
93
  * @default GridKeyboardArrowRight
95
94
  */
96
- GroupingCriteriaExpandIcon: React.JSXElementConstructor<any>;
95
+ groupingCriteriaExpandIcon: React.JSXElementConstructor<any>;
97
96
  /**
98
97
  * Icon displayed on the grouping column when the children are expanded
99
98
  * @default GridExpandMoreIcon
100
99
  */
101
- GroupingCriteriaCollapseIcon: React.JSXElementConstructor<any>;
100
+ groupingCriteriaCollapseIcon: React.JSXElementConstructor<any>;
102
101
  /**
103
102
  * Icon displayed on the detail panel toggle column when collapsed.
104
103
  * @default GridAddIcon
105
104
  */
106
- DetailPanelExpandIcon: React.JSXElementConstructor<any>;
105
+ detailPanelExpandIcon: React.JSXElementConstructor<any>;
107
106
  /**
108
107
  * Icon displayed on the detail panel toggle column when expanded.
109
108
  * @default GridRemoveIcon
110
109
  */
111
- DetailPanelCollapseIcon: React.JSXElementConstructor<any>;
110
+ detailPanelCollapseIcon: React.JSXElementConstructor<any>;
112
111
  /**
113
112
  * Icon displayed for deleting the filter from filter panel.
114
113
  * @default GridAddIcon
115
114
  */
116
- FilterPanelAddIcon: React.JSXElementConstructor<any>;
115
+ filterPanelAddIcon: React.JSXElementConstructor<any>;
117
116
  /**
118
117
  * Icon displayed for deleting the filter from filter panel.
119
118
  * @default GridDeleteIcon
120
119
  */
121
- FilterPanelDeleteIcon: React.JSXElementConstructor<any>;
120
+ filterPanelDeleteIcon: React.JSXElementConstructor<any>;
122
121
  /**
123
122
  * Icon displayed for deleting all the active filters from filter panel.
124
123
  * @default GridDeleteForeverIcon
125
124
  */
126
- FilterPanelRemoveAllIcon: React.JSXElementConstructor<any>;
125
+ filterPanelRemoveAllIcon: React.JSXElementConstructor<any>;
127
126
  /**
128
127
  * Icon displayed on the `reorder` column type to reorder a row.
129
128
  * @default GridDragIcon
130
129
  */
131
- RowReorderIcon: React.JSXElementConstructor<any>;
130
+ rowReorderIcon: React.JSXElementConstructor<any>;
132
131
  /**
133
132
  * Icon displayed on the quick filter input.
134
133
  * @default GridSearchIcon
135
134
  */
136
- QuickFilterIcon: React.JSXElementConstructor<any>;
135
+ quickFilterIcon: React.JSXElementConstructor<any>;
137
136
  /**
138
137
  * Icon displayed on the quick filter reset input.
139
138
  * @default GridCloseIcon
140
139
  */
141
- QuickFilterClearIcon: React.JSXElementConstructor<any>;
140
+ quickFilterClearIcon: React.JSXElementConstructor<any>;
142
141
  /**
143
142
  * Icon displayed in column menu for hiding column
144
143
  * @default GridVisibilityOffIcon
145
144
  */
146
- ColumnMenuHideIcon: React.JSXElementConstructor<any>;
145
+ columnMenuHideIcon: React.JSXElementConstructor<any>;
147
146
  /**
148
147
  * Icon displayed in column menu for ascending sort
149
148
  * @default GridArrowUpwardIcon
150
149
  */
151
- ColumnMenuSortAscendingIcon: React.JSXElementConstructor<any>;
150
+ columnMenuSortAscendingIcon: React.JSXElementConstructor<any>;
152
151
  /**
153
152
  * Icon displayed in column menu for descending sort
154
153
  * @default GridArrowDownwardIcon
155
154
  */
156
- ColumnMenuSortDescendingIcon: React.JSXElementConstructor<any>;
155
+ columnMenuSortDescendingIcon: React.JSXElementConstructor<any>;
157
156
  /**
158
157
  * Icon displayed in column menu for filter
159
158
  * @default GridFilterAltIcon
160
159
  */
161
- ColumnMenuFilterIcon: React.JSXElementConstructor<any>;
160
+ columnMenuFilterIcon: React.JSXElementConstructor<any>;
162
161
  /**
163
162
  * Icon displayed in column menu for showing all columns
164
163
  * @default GridViewColumnIcon
165
164
  */
166
- ColumnMenuManageColumnsIcon: React.JSXElementConstructor<any>;
165
+ columnMenuManageColumnsIcon: React.JSXElementConstructor<any>;
167
166
  /**
168
167
  * Icon displayed in column menu for clearing values
169
168
  * @default GridClearIcon
170
169
  */
171
- ColumnMenuClearIcon: React.JSXElementConstructor<any>;
170
+ columnMenuClearIcon: React.JSXElementConstructor<any>;
172
171
  /**
173
172
  * Icon displayed on the input while processing.
174
173
  * @default GridLoadIcon
175
174
  */
176
- LoadIcon: React.JSXElementConstructor<any>;
175
+ loadIcon: React.JSXElementConstructor<any>;
177
176
  /**
178
177
  * Icon displayed on the column reorder button.
179
178
  * @default GridDragIcon
180
179
  */
181
- ColumnReorderIcon: React.JSXElementConstructor<any>;
180
+ columnReorderIcon: React.JSXElementConstructor<any>;
182
181
  }
@@ -1,72 +1,71 @@
1
1
  import * as React from 'react';
2
- import type { UncapitalizeObjectKeys } from '../internals/utils';
3
2
  import type { GridIconSlotsComponent } from './gridIconSlotsComponent';
4
3
  export interface GridBaseSlots {
5
4
  /**
6
5
  * The custom Checkbox component used in the grid for both header and cells.
7
6
  * @default Checkbox
8
7
  */
9
- BaseCheckbox: React.JSXElementConstructor<any>;
8
+ baseCheckbox: React.JSXElementConstructor<any>;
10
9
  /**
11
10
  * The custom Chip component used in the grid.
12
11
  * @default Chip
13
12
  */
14
- BaseChip: React.JSXElementConstructor<any>;
13
+ baseChip: React.JSXElementConstructor<any>;
15
14
  /**
16
15
  * The custom InputAdornment component used in the grid.
17
16
  * @default InputAdornment
18
17
  */
19
- BaseInputAdornment: React.JSXElementConstructor<any>;
18
+ baseInputAdornment: React.JSXElementConstructor<any>;
20
19
  /**
21
20
  * The custom TextField component used in the grid.
22
21
  * @default TextField
23
22
  */
24
- BaseTextField: React.JSXElementConstructor<any>;
23
+ baseTextField: React.JSXElementConstructor<any>;
25
24
  /**
26
25
  * The custom FormControl component used in the grid.
27
26
  * @default FormControl
28
27
  */
29
- BaseFormControl: React.JSXElementConstructor<any>;
28
+ baseFormControl: React.JSXElementConstructor<any>;
30
29
  /**
31
30
  * The custom Select component used in the grid.
32
31
  * @default Select
33
32
  */
34
- BaseSelect: React.JSXElementConstructor<any>;
33
+ baseSelect: React.JSXElementConstructor<any>;
35
34
  /**
36
35
  * The custom Switch component used in the grid.
37
36
  * @default Switch
38
37
  */
39
- BaseSwitch: React.JSXElementConstructor<any>;
38
+ baseSwitch: React.JSXElementConstructor<any>;
40
39
  /**
41
40
  * The custom Button component used in the grid.
42
41
  * @default Button
43
42
  */
44
- BaseButton: React.JSXElementConstructor<any>;
43
+ baseButton: React.JSXElementConstructor<any>;
45
44
  /**
46
45
  * The custom IconButton component used in the grid.
47
46
  * @default IconButton
48
47
  */
49
- BaseIconButton: React.JSXElementConstructor<any>;
48
+ baseIconButton: React.JSXElementConstructor<any>;
50
49
  /**
51
50
  * The custom Tooltip component used in the grid.
52
51
  * @default Tooltip
53
52
  */
54
- BaseTooltip: React.JSXElementConstructor<any>;
53
+ baseTooltip: React.JSXElementConstructor<any>;
55
54
  /**
56
55
  * The custom Popper component used in the grid.
57
56
  * @default Popper
58
57
  */
59
- BasePopper: React.JSXElementConstructor<any>;
58
+ basePopper: React.JSXElementConstructor<any>;
60
59
  /**
61
60
  * The custom InputLabel component used in the grid.
62
61
  * @default InputLabel
63
62
  */
64
- BaseInputLabel: React.JSXElementConstructor<any>;
63
+ baseInputLabel: React.JSXElementConstructor<any>;
65
64
  /**
66
65
  * The custom SelectOption component used in the grid.
67
66
  * @default MenuItem
68
67
  */
69
- BaseSelectOption: React.JSXElementConstructor<any>;
68
+ baseSelectOption: React.JSXElementConstructor<any>;
70
69
  }
71
70
  /**
72
71
  * Grid components React prop interface containing all the overridable components.
@@ -76,92 +75,90 @@ export interface GridSlotsComponent extends GridBaseSlots, GridIconSlotsComponen
76
75
  * The custom Chip component used in the grid.
77
76
  * @default Chip
78
77
  */
79
- BaseChip: React.JSXElementConstructor<any>;
78
+ baseChip: React.JSXElementConstructor<any>;
80
79
  /**
81
80
  * Component rendered for each cell.
82
81
  * @default GridCell
83
82
  */
84
- Cell: React.JSXElementConstructor<any>;
83
+ cell: React.JSXElementConstructor<any>;
85
84
  /**
86
85
  * Component rendered for each skeleton cell.
87
86
  * @default GridSkeletonCell
88
87
  */
89
- SkeletonCell: React.JSXElementConstructor<any>;
88
+ skeletonCell: React.JSXElementConstructor<any>;
90
89
  /**
91
90
  * Filter icon component rendered in each column header.
92
91
  * @default GridColumnHeaderFilterIconButton
93
92
  */
94
- ColumnHeaderFilterIconButton: React.JSXElementConstructor<any>;
93
+ columnHeaderFilterIconButton: React.JSXElementConstructor<any>;
95
94
  /**
96
95
  * Column menu component rendered by clicking on the 3 dots "kebab" icon in column headers.
97
96
  * @default GridColumnMenu
98
97
  */
99
- ColumnMenu: React.JSXElementConstructor<any>;
98
+ columnMenu: React.JSXElementConstructor<any>;
100
99
  /**
101
100
  * Component responsible for rendering the column headers.
102
101
  * @default DataGridColumnHeaders
103
102
  */
104
- ColumnHeaders: React.JSXElementConstructor<any>;
103
+ columnHeaders: React.JSXElementConstructor<any>;
105
104
  /**
106
105
  * Footer component rendered at the bottom of the grid viewport.
107
106
  * @default GridFooter
108
107
  */
109
- Footer: React.JSXElementConstructor<any>;
108
+ footer: React.JSXElementConstructor<any>;
110
109
  /**
111
110
  * Row count component rendered in the footer
112
111
  * @default GridRowCount
113
112
  */
114
- FooterRowCount: React.JSXElementConstructor<any>;
113
+ footerRowCount: React.JSXElementConstructor<any>;
115
114
  /**
116
115
  * Toolbar component rendered inside the Header component.
117
116
  * @default null
118
117
  */
119
- Toolbar: React.JSXElementConstructor<any> | null;
118
+ toolbar: React.JSXElementConstructor<any> | null;
120
119
  /**
121
120
  * PreferencesPanel component rendered inside the Header component.
122
121
  * @default GridPreferencesPanel
123
122
  */
124
- PreferencesPanel: React.JSXElementConstructor<any>;
123
+ preferencesPanel: React.JSXElementConstructor<any>;
125
124
  /**
126
125
  * Loading overlay component rendered when the grid is in a loading state.
127
126
  * @default GridLoadingOverlay
128
127
  */
129
- LoadingOverlay: React.JSXElementConstructor<any>;
128
+ loadingOverlay: React.JSXElementConstructor<any>;
130
129
  /**
131
130
  * No results overlay component rendered when the grid has no results after filtering.
132
131
  * @default GridNoResultsOverlay
133
132
  */
134
- NoResultsOverlay: React.JSXElementConstructor<any>;
133
+ noResultsOverlay: React.JSXElementConstructor<any>;
135
134
  /**
136
135
  * No rows overlay component rendered when the grid has no rows.
137
136
  * @default GridNoRowsOverlay
138
137
  */
139
- NoRowsOverlay: React.JSXElementConstructor<any>;
138
+ noRowsOverlay: React.JSXElementConstructor<any>;
140
139
  /**
141
140
  * Pagination component rendered in the grid footer by default.
142
141
  * @default Pagination
143
142
  */
144
- Pagination: React.JSXElementConstructor<any> | null;
143
+ pagination: React.JSXElementConstructor<any> | null;
145
144
  /**
146
145
  * Filter panel component rendered when clicking the filter button.
147
146
  * @default GridFilterPanel
148
147
  */
149
- FilterPanel: React.JSXElementConstructor<any>;
148
+ filterPanel: React.JSXElementConstructor<any>;
150
149
  /**
151
150
  * GridColumns panel component rendered when clicking the columns button.
152
151
  * @default GridColumnsPanel
153
152
  */
154
- ColumnsPanel: React.JSXElementConstructor<any>;
153
+ columnsPanel: React.JSXElementConstructor<any>;
155
154
  /**
156
155
  * Panel component wrapping the filters and columns panels.
157
156
  * @default GridPanel
158
157
  */
159
- Panel: React.JSXElementConstructor<any>;
158
+ panel: React.JSXElementConstructor<any>;
160
159
  /**
161
160
  * Component rendered for each row.
162
161
  * @default GridRow
163
162
  */
164
- Row: React.JSXElementConstructor<any>;
165
- }
166
- export interface UncapitalizedGridSlotsComponent extends UncapitalizeObjectKeys<GridSlotsComponent> {
163
+ row: React.JSXElementConstructor<any>;
167
164
  }
package/models/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export * from './gridCell';
16
16
  export * from './gridColumnHeaderClass';
17
17
  export * from './api';
18
18
  export * from './gridIconSlotsComponent';
19
- export type { GridSlotsComponent, UncapitalizedGridSlotsComponent } from './gridSlotsComponent';
19
+ export type { GridSlotsComponent } from './gridSlotsComponent';
20
20
  export * from './gridSlotsComponentsProps';
21
21
  export * from './gridDensity';
22
22
  export * from './logger';
@@ -24,7 +24,6 @@ import { GridColumnVisibilityModel } from '../../hooks/features/columns/gridColu
24
24
  import { GridCellModesModel, GridRowModesModel } from '../api/gridEditingApi';
25
25
  import { GridColumnGroupingModel } from '../gridColumnGrouping';
26
26
  import { GridPaginationModel } from '../gridPaginationProps';
27
- import { UncapitalizeObjectKeys } from '../../internals/utils';
28
27
  export interface GridExperimentalFeatures {
29
28
  /**
30
29
  * Enables the column grouping.
@@ -51,7 +50,7 @@ export type DataGridProps<R extends GridValidRowModel = any> = Omit<Partial<Data
51
50
  /**
52
51
  * The props of the `DataGrid` component after the pre-processing phase.
53
52
  */
54
- export interface DataGridProcessedProps<R extends GridValidRowModel = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, Omit<DataGridPropsWithoutDefaultValue<R>, 'componentsProps'> {
53
+ export interface DataGridProcessedProps<R extends GridValidRowModel = any> extends DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithoutDefaultValue<R> {
55
54
  }
56
55
  /**
57
56
  * The props of the `DataGrid` component after the pre-processing phase that the user should not be able to override.
@@ -62,7 +61,7 @@ export type DataGridForcedPropsKey = 'checkboxSelectionVisibleOnly' | 'disableMu
62
61
  * The `DataGrid` options with a default value that must be merged with the value given through props.
63
62
  */
64
63
  export interface DataGridPropsWithComplexDefaultValueAfterProcessing {
65
- slots: UncapitalizeObjectKeys<GridSlotsComponent>;
64
+ slots: GridSlotsComponent;
66
65
  localeText: GridLocaleText;
67
66
  }
68
67
  /**
@@ -71,13 +70,8 @@ export interface DataGridPropsWithComplexDefaultValueAfterProcessing {
71
70
  export interface DataGridPropsWithComplexDefaultValueBeforeProcessing {
72
71
  /**
73
72
  * Overridable components.
74
- * @deprecated Use `slots` instead.
75
73
  */
76
- components?: Partial<GridSlotsComponent>;
77
- /**
78
- * Overridable components.
79
- */
80
- slots?: UncapitalizeObjectKeys<Partial<GridSlotsComponent>>;
74
+ slots?: Partial<GridSlotsComponent>;
81
75
  /**
82
76
  * Set the locale text of the grid.
83
77
  * You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
@@ -703,11 +697,6 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
703
697
  * Overridable components props dynamically passed to the component at rendering.
704
698
  */
705
699
  slotProps?: GridSlotsComponentsProps;
706
- /**
707
- * Overridable components props dynamically passed to the component at rendering.
708
- * @deprecated Use the `slotProps` prop instead.
709
- */
710
- componentsProps?: GridSlotsComponentsProps;
711
700
  /**
712
701
  * The system prop that allows defining system overrides as well as additional CSS styles.
713
702
  */
@@ -125,16 +125,6 @@ DataGridRaw.propTypes = {
125
125
  * If defined, the grid will ignore the `hide` property in [[GridColDef]].
126
126
  */
127
127
  columnVisibilityModel: PropTypes.object,
128
- /**
129
- * Overridable components.
130
- * @deprecated Use `slots` instead.
131
- */
132
- components: PropTypes.object,
133
- /**
134
- * Overridable components props dynamically passed to the component at rendering.
135
- * @deprecated Use the `slotProps` prop instead.
136
- */
137
- componentsProps: PropTypes.object,
138
128
  /**
139
129
  * Set the density of the grid.
140
130
  * @default "standard"
@@ -4,7 +4,7 @@ import { useThemeProps } from '@mui/material/styles';
4
4
  import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
5
5
  import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
6
6
  import { GridEditModes } from '../models';
7
- import { computeSlots, useProps, uncapitalizeObjectKeys } from '../internals/utils';
7
+ import { computeSlots, useProps } from '../internals/utils';
8
8
  const DATA_GRID_FORCED_PROPS = {
9
9
  disableMultipleColumnsFiltering: true,
10
10
  disableMultipleColumnsSorting: true,
@@ -72,21 +72,19 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
72
72
  clipboardCopyCellDelimiter: '\t',
73
73
  rowPositionsDebounceMs: 166
74
74
  };
75
- const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
75
+ const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
76
76
  export const useDataGridProps = inProps => {
77
- const [components, componentsProps, themedProps] = useProps(useThemeProps({
77
+ const themedProps = useProps(useThemeProps({
78
78
  props: inProps,
79
79
  name: 'MuiDataGrid'
80
80
  }));
81
81
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
82
82
  const slots = React.useMemo(() => computeSlots({
83
83
  defaultSlots,
84
- slots: themedProps.slots,
85
- components
86
- }), [components, themedProps.slots]);
84
+ slots: themedProps.slots
85
+ }), [themedProps.slots]);
87
86
  return React.useMemo(() => _extends({}, DATA_GRID_PROPS_DEFAULT_VALUES, themedProps, {
88
87
  localeText,
89
- slots,
90
- slotProps: themedProps.slotProps ?? componentsProps
91
- }, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots, componentsProps]);
88
+ slots
89
+ }, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots]);
92
90
  };
@@ -14,6 +14,5 @@ export const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
14
14
  disableColumnMenu: true,
15
15
  disableExport: true,
16
16
  renderCell: renderActionsCell,
17
- getApplyQuickFilterFn: undefined,
18
- getApplyQuickFilterFnV7: undefined
17
+ getApplyQuickFilterFn: undefined
19
18
  });
@@ -36,7 +36,6 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
36
36
  valueFormatter: gridBooleanFormatter,
37
37
  filterOperators: getGridBooleanOperators(),
38
38
  getApplyQuickFilterFn: undefined,
39
- getApplyQuickFilterFnV7: undefined,
40
39
  // @ts-ignore
41
40
  aggregable: false,
42
41
  // @ts-ignore
@@ -1,8 +1,7 @@
1
1
  import { GridFilterInputBoolean } from '../components/panel/filterPanel/GridFilterInputBoolean';
2
- import { convertLegacyOperators } from './utils';
3
- export const getGridBooleanOperators = () => convertLegacyOperators([{
2
+ export const getGridBooleanOperators = () => [{
4
3
  value: 'is',
5
- getApplyFilterFnV7: filterItem => {
4
+ getApplyFilterFn: filterItem => {
6
5
  if (!filterItem.value) {
7
6
  return null;
8
7
  }
@@ -12,4 +11,4 @@ export const getGridBooleanOperators = () => convertLegacyOperators([{
12
11
  };
13
12
  },
14
13
  InputComponent: GridFilterInputBoolean
15
- }]);
14
+ }];
@@ -19,7 +19,6 @@ export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF
19
19
  disableReorder: true,
20
20
  disableExport: true,
21
21
  getApplyQuickFilterFn: undefined,
22
- getApplyQuickFilterFnV7: undefined,
23
22
  valueGetter: params => {
24
23
  const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
25
24
  return selectionLookup[params.id] !== undefined;
@@ -1,5 +1,4 @@
1
1
  import { GridFilterInputDate } from '../components/panel/filterPanel/GridFilterInputDate';
2
- import { convertLegacyOperators } from './utils';
3
2
  const dateRegex = /(\d+)-(\d+)-(\d+)/;
4
3
  const dateTimeRegex = /(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;
5
4
  function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
@@ -22,9 +21,9 @@ function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
22
21
  return compareFn(timeToCompare, time);
23
22
  };
24
23
  }
25
- export const getGridDateOperators = showTime => convertLegacyOperators([{
24
+ export const getGridDateOperators = showTime => [{
26
25
  value: 'is',
27
- getApplyFilterFnV7: filterItem => {
26
+ getApplyFilterFn: filterItem => {
28
27
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 === value2, showTime);
29
28
  },
30
29
  InputComponent: GridFilterInputDate,
@@ -33,7 +32,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
33
32
  }
34
33
  }, {
35
34
  value: 'not',
36
- getApplyFilterFnV7: filterItem => {
35
+ getApplyFilterFn: filterItem => {
37
36
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 !== value2, showTime);
38
37
  },
39
38
  InputComponent: GridFilterInputDate,
@@ -42,7 +41,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
42
41
  }
43
42
  }, {
44
43
  value: 'after',
45
- getApplyFilterFnV7: filterItem => {
44
+ getApplyFilterFn: filterItem => {
46
45
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 > value2, showTime);
47
46
  },
48
47
  InputComponent: GridFilterInputDate,
@@ -51,7 +50,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
51
50
  }
52
51
  }, {
53
52
  value: 'onOrAfter',
54
- getApplyFilterFnV7: filterItem => {
53
+ getApplyFilterFn: filterItem => {
55
54
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 >= value2, showTime);
56
55
  },
57
56
  InputComponent: GridFilterInputDate,
@@ -60,7 +59,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
60
59
  }
61
60
  }, {
62
61
  value: 'before',
63
- getApplyFilterFnV7: filterItem => {
62
+ getApplyFilterFn: filterItem => {
64
63
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 < value2, showTime, !showTime);
65
64
  },
66
65
  InputComponent: GridFilterInputDate,
@@ -69,7 +68,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
69
68
  }
70
69
  }, {
71
70
  value: 'onOrBefore',
72
- getApplyFilterFnV7: filterItem => {
71
+ getApplyFilterFn: filterItem => {
73
72
  return buildApplyFilterFn(filterItem, (value1, value2) => value1 <= value2, showTime);
74
73
  },
75
74
  InputComponent: GridFilterInputDate,
@@ -78,7 +77,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
78
77
  }
79
78
  }, {
80
79
  value: 'isEmpty',
81
- getApplyFilterFnV7: () => {
80
+ getApplyFilterFn: () => {
82
81
  return value => {
83
82
  return value == null;
84
83
  };
@@ -86,10 +85,10 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
86
85
  requiresFilterValue: false
87
86
  }, {
88
87
  value: 'isNotEmpty',
89
- getApplyFilterFnV7: () => {
88
+ getApplyFilterFn: () => {
90
89
  return value => {
91
90
  return value != null;
92
91
  };
93
92
  },
94
93
  requiresFilterValue: false
95
- }]);
94
+ }];