@mui/x-data-grid 7.21.0 → 7.22.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 (80) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/components/cell/GridBooleanCell.d.ts +3 -3
  3. package/components/cell/GridBooleanCell.js +11 -1
  4. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
  5. package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
  6. package/components/containers/GridRootStyles.js +4 -2
  7. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  8. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
  9. package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  10. package/components/toolbar/GridToolbar.js +2 -3
  11. package/components/toolbar/GridToolbarExport.js +1 -13
  12. package/components/toolbar/GridToolbarFilterButton.js +1 -2
  13. package/components/virtualization/GridBottomContainer.js +0 -17
  14. package/components/virtualization/GridMainContainer.js +2 -1
  15. package/components/virtualization/GridVirtualScroller.js +2 -0
  16. package/constants/gridClasses.d.ts +5 -0
  17. package/constants/gridClasses.js +1 -1
  18. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +4 -0
  19. package/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
  20. package/hooks/features/focus/useGridFocus.js +18 -3
  21. package/hooks/features/pagination/gridPaginationSelector.js +2 -1
  22. package/hooks/features/virtualization/useGridVirtualScroller.js +2 -1
  23. package/index.js +1 -1
  24. package/joy/joySlots.js +45 -27
  25. package/locales/daDK.js +5 -6
  26. package/locales/itIT.js +27 -28
  27. package/locales/ptBR.js +4 -4
  28. package/material/index.js +4 -0
  29. package/models/gridExport.d.ts +1 -1
  30. package/models/gridSlotsComponent.d.ts +10 -0
  31. package/models/gridSlotsComponentsProps.d.ts +9 -0
  32. package/modern/components/cell/GridBooleanCell.js +11 -1
  33. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
  34. package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
  35. package/modern/components/containers/GridRootStyles.js +4 -2
  36. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  37. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
  38. package/modern/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  39. package/modern/components/toolbar/GridToolbar.js +2 -3
  40. package/modern/components/toolbar/GridToolbarExport.js +1 -13
  41. package/modern/components/toolbar/GridToolbarFilterButton.js +1 -2
  42. package/modern/components/virtualization/GridBottomContainer.js +0 -17
  43. package/modern/components/virtualization/GridMainContainer.js +2 -1
  44. package/modern/components/virtualization/GridVirtualScroller.js +2 -0
  45. package/modern/constants/gridClasses.js +1 -1
  46. package/modern/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
  47. package/modern/hooks/features/focus/useGridFocus.js +18 -3
  48. package/modern/hooks/features/pagination/gridPaginationSelector.js +2 -1
  49. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +2 -1
  50. package/modern/index.js +1 -1
  51. package/modern/joy/joySlots.js +45 -27
  52. package/modern/locales/daDK.js +5 -6
  53. package/modern/locales/itIT.js +27 -28
  54. package/modern/locales/ptBR.js +4 -4
  55. package/modern/material/index.js +4 -0
  56. package/node/components/cell/GridBooleanCell.js +11 -1
  57. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
  58. package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
  59. package/node/components/containers/GridRootStyles.js +4 -2
  60. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  61. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
  62. package/node/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  63. package/node/components/toolbar/GridToolbar.js +2 -3
  64. package/node/components/toolbar/GridToolbarExport.js +1 -13
  65. package/node/components/toolbar/GridToolbarFilterButton.js +1 -2
  66. package/node/components/virtualization/GridBottomContainer.js +0 -17
  67. package/node/components/virtualization/GridMainContainer.js +2 -1
  68. package/node/components/virtualization/GridVirtualScroller.js +2 -0
  69. package/node/constants/gridClasses.js +1 -1
  70. package/node/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
  71. package/node/hooks/features/focus/useGridFocus.js +18 -3
  72. package/node/hooks/features/pagination/gridPaginationSelector.js +3 -1
  73. package/node/hooks/features/virtualization/useGridVirtualScroller.js +2 -1
  74. package/node/index.js +1 -1
  75. package/node/joy/joySlots.js +45 -27
  76. package/node/locales/daDK.js +5 -6
  77. package/node/locales/itIT.js +27 -28
  78. package/node/locales/ptBR.js +4 -4
  79. package/node/material/index.js +4 -0
  80. package/package.json +1 -1
package/joy/joySlots.js CHANGED
@@ -1,14 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
4
- _excluded2 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
5
- _excluded3 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
6
- _excluded4 = ["color", "size", "sx", "touchRippleRef"],
7
- _excluded5 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
8
- _excluded6 = ["native"],
9
- _excluded7 = ["shrink", "variant", "sx"];
3
+ const _excluded = ["slotProps", "variant", "color", "sx"],
4
+ _excluded2 = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
5
+ _excluded3 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
6
+ _excluded4 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
7
+ _excluded5 = ["color", "size", "sx", "touchRippleRef"],
8
+ _excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
9
+ _excluded7 = ["native"],
10
+ _excluded8 = ["shrink", "variant", "sx"];
10
11
  import * as React from 'react';
12
+ import JoyBadge from '@mui/joy/Badge';
11
13
  import JoyCheckbox from '@mui/joy/Checkbox';
14
+ import JoyDivider from '@mui/joy/Divider';
12
15
  import JoyInput from '@mui/joy/Input';
13
16
  import JoyFormControl from '@mui/joy/FormControl';
14
17
  import JoyFormLabel from '@mui/joy/FormLabel';
@@ -58,14 +61,27 @@ function convertVariant(variant, defaultVariant = 'plain') {
58
61
  filled: 'soft'
59
62
  }[variant] || defaultVariant;
60
63
  }
61
- const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
64
+ const Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
65
+ let {
66
+ color,
67
+ sx
68
+ } = _ref,
69
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
70
+ return /*#__PURE__*/_jsx(JoyBadge, _extends({}, props, {
71
+ color: convertColor(color),
72
+ variant: "plain",
73
+ sx: sx,
74
+ ref: ref
75
+ }));
76
+ });
77
+ const Checkbox = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
62
78
  let {
63
79
  inputProps,
64
80
  onChange,
65
81
  checked,
66
82
  inputRef
67
- } = _ref,
68
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
83
+ } = _ref2,
84
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
69
85
  return /*#__PURE__*/_jsx(JoyCheckbox, _extends({}, props, {
70
86
  slotProps: {
71
87
  input: _extends({}, inputProps, {
@@ -77,7 +93,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
77
93
  onChange: onChange
78
94
  }));
79
95
  });
80
- const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
96
+ const TextField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
81
97
  let {
82
98
  onChange,
83
99
  label,
@@ -87,8 +103,8 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
87
103
  type,
88
104
  size,
89
105
  variant
90
- } = _ref2,
91
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
106
+ } = _ref3,
107
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
92
108
  const rootRef = useForkRef(ref, props.InputProps?.ref);
93
109
  const inputForkRef = useForkRef(inputRef, props?.inputProps?.ref);
94
110
  const {
@@ -116,7 +132,7 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
116
132
  })]
117
133
  });
118
134
  });
119
- const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
135
+ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref4, ref) {
120
136
  let {
121
137
  startIcon,
122
138
  color,
@@ -124,8 +140,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
124
140
  size,
125
141
  sx,
126
142
  variant
127
- } = _ref3,
128
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
143
+ } = _ref4,
144
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
129
145
  return /*#__PURE__*/_jsx(JoyButton, _extends({}, props, {
130
146
  size: convertSize(size),
131
147
  color: convertColor(color),
@@ -136,13 +152,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
136
152
  sx: sx
137
153
  }));
138
154
  });
139
- const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref) {
155
+ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref5, ref) {
140
156
  let {
141
157
  color,
142
158
  size,
143
159
  sx
144
- } = _ref4,
145
- props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
160
+ } = _ref5,
161
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
146
162
  return /*#__PURE__*/_jsx(JoyIconButton, _extends({}, props, {
147
163
  size: convertSize(size),
148
164
  color: convertColor(color) ?? 'neutral',
@@ -151,7 +167,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref)
151
167
  sx: sx
152
168
  }));
153
169
  });
154
- const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
170
+ const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
155
171
  let {
156
172
  open,
157
173
  onOpen,
@@ -163,8 +179,8 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
163
179
  MenuProps,
164
180
  inputRef,
165
181
  labelId
166
- } = _ref5,
167
- props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
182
+ } = _ref6,
183
+ props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
168
184
  const handleChange = (event, newValue) => {
169
185
  if (event && onChange) {
170
186
  // Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
@@ -215,17 +231,17 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
215
231
  }
216
232
  }));
217
233
  });
218
- const Option = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
219
- let props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
234
+ const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
235
+ let props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
220
236
  return /*#__PURE__*/_jsx(JoyOption, _extends({}, props, {
221
237
  ref: ref
222
238
  }));
223
239
  });
224
- const InputLabel = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
240
+ const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
225
241
  let {
226
242
  sx
227
- } = _ref7,
228
- props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
243
+ } = _ref8,
244
+ props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
229
245
  return /*#__PURE__*/_jsx(JoyFormLabel, _extends({}, props, {
230
246
  ref: ref,
231
247
  sx: sx
@@ -351,7 +367,9 @@ const LoadingOverlay = /*#__PURE__*/React.forwardRef((props, ref) => {
351
367
  }));
352
368
  });
353
369
  const joySlots = _extends({}, joyIconSlots, {
370
+ baseBadge: Badge,
354
371
  baseCheckbox: Checkbox,
372
+ baseDivider: JoyDivider,
355
373
  baseTextField: TextField,
356
374
  baseButton: Button,
357
375
  baseIconButton: IconButton,
package/locales/daDK.js CHANGED
@@ -33,8 +33,7 @@ const daDKGrid = {
33
33
  columnsManagementSearchTitle: 'Søg',
34
34
  columnsManagementNoColumns: 'Ingen søjler',
35
35
  columnsManagementShowHideAllText: 'Vis/Skjul Alle',
36
- // columnsManagementReset: 'Reset',
37
-
36
+ columnsManagementReset: 'Nulstil',
38
37
  // Filter panel text
39
38
  filterPanelAddFilter: 'Tilføj filter',
40
39
  filterPanelRemoveAll: 'Fjern alle',
@@ -48,9 +47,9 @@ const daDKGrid = {
48
47
  filterPanelInputPlaceholder: 'Filterværdi',
49
48
  // Filter operators text
50
49
  filterOperatorContains: 'indeholder',
51
- // filterOperatorDoesNotContain: 'does not contain',
50
+ filterOperatorDoesNotContain: 'indeholder ikke',
52
51
  filterOperatorEquals: 'lig med',
53
- // filterOperatorDoesNotEqual: 'does not equal',
52
+ filterOperatorDoesNotEqual: 'ikke lig med',
54
53
  filterOperatorStartsWith: 'begynder med',
55
54
  filterOperatorEndsWith: 'ender med',
56
55
  filterOperatorIs: 'er lig med',
@@ -70,9 +69,9 @@ const daDKGrid = {
70
69
  'filterOperator<=': '<=',
71
70
  // Header filter operators text
72
71
  headerFilterOperatorContains: 'Indeholder',
73
- // headerFilterOperatorDoesNotContain: 'Does not contain',
72
+ headerFilterOperatorDoesNotContain: 'Indeholder ikke',
74
73
  headerFilterOperatorEquals: 'Lig med',
75
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
74
+ headerFilterOperatorDoesNotEqual: 'Ikke lig med',
76
75
  headerFilterOperatorStartsWith: 'Begynder med',
77
76
  headerFilterOperatorEndsWith: 'Ender med',
78
77
  headerFilterOperatorIs: 'Er lig med',
package/locales/itIT.js CHANGED
@@ -30,11 +30,10 @@ const itITGrid = {
30
30
  toolbarExportPrint: 'Stampa',
31
31
  toolbarExportExcel: 'Scarica come Excel',
32
32
  // Columns management text
33
- // columnsManagementSearchTitle: 'Search',
34
- // columnsManagementNoColumns: 'No columns',
35
- // columnsManagementShowHideAllText: 'Show/Hide All',
36
- // columnsManagementReset: 'Reset',
37
-
33
+ columnsManagementSearchTitle: 'Cerca',
34
+ columnsManagementNoColumns: 'Nessuna colonna',
35
+ columnsManagementShowHideAllText: 'Mostra/Nascondi Tutto',
36
+ columnsManagementReset: 'Resetta',
38
37
  // Filter panel text
39
38
  filterPanelAddFilter: 'Aggiungi un filtro',
40
39
  filterPanelRemoveAll: 'Rimuovi filtri',
@@ -48,13 +47,13 @@ const itITGrid = {
48
47
  filterPanelInputPlaceholder: 'Filtra il valore',
49
48
  // Filter operators text
50
49
  filterOperatorContains: 'contiene',
51
- // filterOperatorDoesNotContain: 'does not contain',
50
+ filterOperatorDoesNotContain: 'non contiene',
52
51
  filterOperatorEquals: 'uguale a',
53
- // filterOperatorDoesNotEqual: 'does not equal',
52
+ filterOperatorDoesNotEqual: 'diverso da',
54
53
  filterOperatorStartsWith: 'comincia per',
55
54
  filterOperatorEndsWith: 'termina per',
56
55
  filterOperatorIs: 'uguale a',
57
- filterOperatorNot: 'diversa da',
56
+ filterOperatorNot: 'diverso da',
58
57
  filterOperatorAfter: 'dopo il',
59
58
  filterOperatorOnOrAfter: 'a partire dal',
60
59
  filterOperatorBefore: 'prima del',
@@ -70,26 +69,26 @@ const itITGrid = {
70
69
  'filterOperator<=': '<=',
71
70
  // Header filter operators text
72
71
  headerFilterOperatorContains: 'Contiene',
73
- // headerFilterOperatorDoesNotContain: 'Does not contain',
74
- headerFilterOperatorEquals: 'uguale a',
75
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
76
- headerFilterOperatorStartsWith: 'comincia per',
77
- headerFilterOperatorEndsWith: 'termina per',
78
- headerFilterOperatorIs: 'uguale a',
79
- headerFilterOperatorNot: 'diversa da',
80
- headerFilterOperatorAfter: 'dopo il',
81
- headerFilterOperatorOnOrAfter: 'a partire dal',
82
- headerFilterOperatorBefore: 'prima del',
83
- headerFilterOperatorOnOrBefore: 'fino al',
84
- headerFilterOperatorIsEmpty: 'è vuoto',
85
- headerFilterOperatorIsNotEmpty: 'non è vuoto',
86
- headerFilterOperatorIsAnyOf: 'è uno tra',
87
- 'headerFilterOperator=': 'uguale a',
88
- 'headerFilterOperator!=': 'diverso da',
89
- 'headerFilterOperator>': 'maggiore di',
90
- 'headerFilterOperator>=': 'maggiore o uguale a',
91
- 'headerFilterOperator<': 'minore di',
92
- 'headerFilterOperator<=': 'minore o uguale a',
72
+ headerFilterOperatorDoesNotContain: 'Non contiene',
73
+ headerFilterOperatorEquals: 'Uguale a',
74
+ headerFilterOperatorDoesNotEqual: 'Diverso da',
75
+ headerFilterOperatorStartsWith: 'Comincia per',
76
+ headerFilterOperatorEndsWith: 'Termina per',
77
+ headerFilterOperatorIs: 'Uguale a',
78
+ headerFilterOperatorNot: 'Diverso da',
79
+ headerFilterOperatorAfter: 'Dopo il',
80
+ headerFilterOperatorOnOrAfter: 'A partire dal',
81
+ headerFilterOperatorBefore: 'Prima del',
82
+ headerFilterOperatorOnOrBefore: 'Fino al',
83
+ headerFilterOperatorIsEmpty: 'È vuoto',
84
+ headerFilterOperatorIsNotEmpty: 'Non è vuoto',
85
+ headerFilterOperatorIsAnyOf: 'È uno tra',
86
+ 'headerFilterOperator=': 'Uguale a',
87
+ 'headerFilterOperator!=': 'Diverso da',
88
+ 'headerFilterOperator>': 'Maggiore di',
89
+ 'headerFilterOperator>=': 'Maggiore o uguale a',
90
+ 'headerFilterOperator<': 'Minore di',
91
+ 'headerFilterOperator<=': 'Minore o uguale a',
93
92
  // Filter values text
94
93
  filterValueAny: 'qualunque',
95
94
  filterValueTrue: 'vero',
package/locales/ptBR.js CHANGED
@@ -47,9 +47,9 @@ const ptBRGrid = {
47
47
  filterPanelInputPlaceholder: 'Filtrar valor',
48
48
  // Filter operators text
49
49
  filterOperatorContains: 'contém',
50
- // filterOperatorDoesNotContain: 'does not contain',
50
+ filterOperatorDoesNotContain: 'não contém',
51
51
  filterOperatorEquals: 'é igual a',
52
- // filterOperatorDoesNotEqual: 'does not equal',
52
+ filterOperatorDoesNotEqual: 'não é igual a',
53
53
  filterOperatorStartsWith: 'começa com',
54
54
  filterOperatorEndsWith: 'termina com',
55
55
  filterOperatorIs: 'é',
@@ -69,9 +69,9 @@ const ptBRGrid = {
69
69
  'filterOperator<=': 'menor ou igual que',
70
70
  // Header filter operators text
71
71
  headerFilterOperatorContains: 'Contém',
72
- // headerFilterOperatorDoesNotContain: 'Does not contain',
72
+ headerFilterOperatorDoesNotContain: 'Não contém',
73
73
  headerFilterOperatorEquals: 'Igual',
74
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
74
+ headerFilterOperatorDoesNotEqual: 'Não é igual a',
75
75
  headerFilterOperatorStartsWith: 'Começa com',
76
76
  headerFilterOperatorEndsWith: 'Termina com',
77
77
  headerFilterOperatorIs: 'É',
package/material/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import MUIBadge from '@mui/material/Badge';
2
3
  import MUICheckbox from '@mui/material/Checkbox';
4
+ import MUIDivider from '@mui/material/Divider';
3
5
  import MUITextField from '@mui/material/TextField';
4
6
  import MUIFormControl from '@mui/material/FormControl';
5
7
  import MUISelect from '@mui/material/Select';
@@ -51,7 +53,9 @@ const iconSlots = {
51
53
  columnReorderIcon: GridDragIcon
52
54
  };
53
55
  const materialSlots = _extends({}, iconSlots, {
56
+ baseBadge: MUIBadge,
54
57
  baseCheckbox: MUICheckbox,
58
+ baseDivider: MUIDivider,
55
59
  baseTextField: MUITextField,
56
60
  baseFormControl: MUIFormControl,
57
61
  baseSelect: MUISelect,
@@ -141,7 +141,7 @@ export interface GridPrintExportOptions extends GridExportOptions {
141
141
  /**
142
142
  * Provide Print specific styles to the print window.
143
143
  */
144
- pageStyle?: string | Function;
144
+ pageStyle?: string | (() => string);
145
145
  /**
146
146
  * Function that returns the list of row ids to export in the order they should be exported.
147
147
  * @param {GridPrintGetRowsToExportParams} params With all properties from [[GridPrintGetRowsToExportParams]].
@@ -3,6 +3,11 @@ import type { GridSlotProps } from './gridSlotsComponentsProps';
3
3
  import type { GridIconSlotsComponent } from './gridIconSlotsComponent';
4
4
  export type { GridSlotProps } from './gridSlotsComponentsProps';
5
5
  export interface GridBaseSlots {
6
+ /**
7
+ * The custom Badge component used in the grid for both header and cells.
8
+ * @default Badge
9
+ */
10
+ baseBadge: React.JSXElementConstructor<GridSlotProps['baseBadge']>;
6
11
  /**
7
12
  * The custom Checkbox component used in the grid for both header and cells.
8
13
  * @default Checkbox
@@ -13,6 +18,11 @@ export interface GridBaseSlots {
13
18
  * @default Chip
14
19
  */
15
20
  baseChip: React.JSXElementConstructor<GridSlotProps['baseChip']>;
21
+ /**
22
+ * The custom Divider component used in the grid.
23
+ * @default Divider
24
+ */
25
+ baseDivider: React.JSXElementConstructor<GridSlotProps['baseDivider']>;
16
26
  /**
17
27
  * The custom InputAdornment component used in the grid.
18
28
  * @default InputAdornment
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { BadgeProps } from '@mui/material/Badge';
2
3
  import type { CheckboxProps } from '@mui/material/Checkbox';
3
4
  import type { TextFieldProps } from '@mui/material/TextField';
4
5
  import type { FormControlProps } from '@mui/material/FormControl';
@@ -30,8 +31,13 @@ import type { GridColumnsManagementProps } from '../components/columnsManagement
30
31
  import type { GridLoadingOverlayProps } from '../components/GridLoadingOverlay';
31
32
  import type { GridRowCountProps } from '../components/GridRowCount';
32
33
  import type { GridColumnHeaderSortIconProps } from '../components/columnHeaders/GridColumnHeaderSortIcon';
34
+ type DividerProps = {};
35
+ export interface BaseBadgePropsOverrides {
36
+ }
33
37
  export interface BaseCheckboxPropsOverrides {
34
38
  }
39
+ export interface BaseDividerPropsOverrides {
40
+ }
35
41
  export interface BaseTextFieldPropsOverrides {
36
42
  }
37
43
  export interface BaseFormControlPropsOverrides {
@@ -95,7 +101,9 @@ export interface SkeletonCellPropsOverrides {
95
101
  export interface RowPropsOverrides {
96
102
  }
97
103
  export interface GridSlotProps {
104
+ baseBadge: BadgeProps & BaseBadgePropsOverrides;
98
105
  baseCheckbox: CheckboxProps & BaseCheckboxPropsOverrides;
106
+ baseDivider: DividerProps & BaseDividerPropsOverrides;
99
107
  baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
100
108
  baseFormControl: FormControlProps & BaseFormControlPropsOverrides;
101
109
  baseSelect: SelectProps & BaseSelectPropsOverrides;
@@ -139,3 +147,4 @@ export interface GridSlotProps {
139
147
  export type GridSlotsComponentsProps = Partial<{
140
148
  [K in keyof GridSlotProps]: Partial<GridSlotProps[K]>;
141
149
  }>;
150
+ export {};
@@ -4,6 +4,8 @@ const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowN
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
+ import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
8
+ import { gridRowMaximumTreeDepthSelector } from "../../hooks/features/rows/gridRowsSelector.js";
7
9
  import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
8
10
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
9
11
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
@@ -20,7 +22,8 @@ const useUtilityClasses = ownerState => {
20
22
  };
21
23
  function GridBooleanCellRaw(props) {
22
24
  const {
23
- value
25
+ value,
26
+ rowNode
24
27
  } = props,
25
28
  other = _objectWithoutPropertiesLoose(props, _excluded);
26
29
  const apiRef = useGridApiContext();
@@ -29,7 +32,14 @@ function GridBooleanCellRaw(props) {
29
32
  classes: rootProps.classes
30
33
  };
31
34
  const classes = useUtilityClasses(ownerState);
35
+ const maxDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
36
+ const isServerSideRowGroupingRow =
37
+ // @ts-expect-error - Access tree data prop
38
+ maxDepth > 0 && rowNode.type === 'group' && rootProps.treeData === false;
32
39
  const Icon = React.useMemo(() => value ? rootProps.slots.booleanCellTrueIcon : rootProps.slots.booleanCellFalseIcon, [rootProps.slots.booleanCellFalseIcon, rootProps.slots.booleanCellTrueIcon, value]);
40
+ if (isServerSideRowGroupingRow && value === undefined) {
41
+ return null;
42
+ }
33
43
  return /*#__PURE__*/_jsx(Icon, _extends({
34
44
  fontSize: "small",
35
45
  className: classes.root,
@@ -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_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
5
- import Badge from '@mui/material/Badge';
6
5
  import { useGridSelector } from "../../hooks/index.js";
7
6
  import { gridPreferencePanelStateSelector } from "../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js";
8
7
  import { GridPreferencePanelsValue } from "../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js";
@@ -76,7 +75,7 @@ function GridColumnHeaderFilterIconButton(props) {
76
75
  enterDelay: 1000
77
76
  }, rootProps.slotProps?.baseTooltip, {
78
77
  children: /*#__PURE__*/_jsxs(GridIconButtonContainer, {
79
- children: [counter > 1 && /*#__PURE__*/_jsx(Badge, {
78
+ children: [counter > 1 && /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
80
79
  badgeContent: counter,
81
80
  color: "default",
82
81
  children: iconButton
@@ -4,7 +4,6 @@ const _excluded = ["direction", "index", "sortingOrder", "disabled"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
- import Badge from '@mui/material/Badge';
8
7
  import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
9
8
  import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
10
9
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
@@ -63,7 +62,7 @@ function GridColumnHeaderSortIconRaw(props) {
63
62
  children: iconElement
64
63
  }));
65
64
  return /*#__PURE__*/_jsxs(GridIconButtonContainer, {
66
- children: [index != null && /*#__PURE__*/_jsx(Badge, {
65
+ children: [index != null && /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
67
66
  badgeContent: index,
68
67
  color: "default",
69
68
  overlap: "circular",
@@ -152,6 +152,8 @@ export const GridRootStyles = styled('div', {
152
152
  [`& .${c.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
153
153
  }, {
154
154
  [`& .${c.treeDataGroupingCellLoadingContainer}`]: styles.treeDataGroupingCellLoadingContainer
155
+ }, {
156
+ [`& .${c.groupingCriteriaCellLoadingContainer}`]: styles.groupingCriteriaCellLoadingContainer
155
157
  }, {
156
158
  [`& .${c.detailPanelToggleCell}`]: styles.detailPanelToggleCell
157
159
  }, {
@@ -685,7 +687,7 @@ export const GridRootStyles = styled('div', {
685
687
  alignSelf: 'stretch',
686
688
  marginRight: t.spacing(2)
687
689
  },
688
- [`& .${c.treeDataGroupingCellLoadingContainer}`]: {
690
+ [`& .${c.treeDataGroupingCellLoadingContainer}, .${c.groupingCriteriaCellLoadingContainer}`]: {
689
691
  display: 'flex',
690
692
  alignItems: 'center',
691
693
  justifyContent: 'center',
@@ -718,7 +720,7 @@ export const GridRootStyles = styled('div', {
718
720
  }
719
721
  },
720
722
  [`& .${c.filler}`]: {
721
- flex: 1
723
+ flex: '1 0 auto'
722
724
  },
723
725
  [`& .${c['filler--borderBottom']}`]: {
724
726
  borderBottom: '1px solid var(--DataGrid-rowBorderColor)'
@@ -38,7 +38,7 @@ function GridFilterInputBoolean(props) {
38
38
  const value = event.target.value;
39
39
  setFilterValueState(value);
40
40
  applyValue(_extends({}, item, {
41
- value
41
+ value: Boolean(value)
42
42
  }));
43
43
  }, [applyValue, item]);
44
44
  React.useEffect(() => {
@@ -39,9 +39,9 @@ function GridFilterInputMultipleValue(props) {
39
39
  const handleChange = React.useCallback((event, value) => {
40
40
  setFilterValueState(value.map(String));
41
41
  applyValue(_extends({}, item, {
42
- value: [...value]
42
+ value: [...value.map(filterItemValue => type === 'number' ? Number(filterItemValue) : filterItemValue)]
43
43
  }));
44
- }, [applyValue, item]);
44
+ }, [applyValue, item, type]);
45
45
  return /*#__PURE__*/_jsx(Autocomplete, _extends({
46
46
  multiple: true,
47
47
  freeSolo: true,
@@ -34,13 +34,13 @@ function GridFilterInputValue(props) {
34
34
  setIsApplying(true);
35
35
  filterTimeout.start(rootProps.filterDebounceMs, () => {
36
36
  const newItem = _extends({}, item, {
37
- value,
37
+ value: type === 'number' ? Number(value) : value,
38
38
  fromInput: id
39
39
  });
40
40
  applyValue(newItem);
41
41
  setIsApplying(false);
42
42
  });
43
- }, [id, applyValue, item, rootProps.filterDebounceMs, filterTimeout]);
43
+ }, [filterTimeout, rootProps.filterDebounceMs, item, type, id, applyValue]);
44
44
  React.useEffect(() => {
45
45
  const itemPlusTag = item;
46
46
  if (itemPlusTag.fromInput !== id || item.value === undefined) {
@@ -3,7 +3,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import Box from '@mui/material/Box';
7
6
  import { GridToolbarContainer } from "../containers/GridToolbarContainer.js";
8
7
  import { GridToolbarColumnsButton } from "./GridToolbarColumnsButton.js";
9
8
  import { GridToolbarDensitySelector } from "./GridToolbarDensitySelector.js";
@@ -36,8 +35,8 @@ const GridToolbar = /*#__PURE__*/React.forwardRef(function GridToolbar(props, re
36
35
  // TODO: remove the reference to excelOptions in community package
37
36
  ,
38
37
  excelOptions: excelOptions
39
- }), /*#__PURE__*/_jsx(Box, {
40
- sx: {
38
+ }), /*#__PURE__*/_jsx("div", {
39
+ style: {
41
40
  flex: 1
42
41
  }
43
42
  }), showQuickFilter && /*#__PURE__*/_jsx(GridToolbarQuickFilter, _extends({}, quickFilterProps))]
@@ -78,19 +78,7 @@ process.env.NODE_ENV !== "production" ? GridPrintExportMenuItem.propTypes = {
78
78
  hideFooter: PropTypes.bool,
79
79
  hideToolbar: PropTypes.bool,
80
80
  includeCheckboxes: PropTypes.bool,
81
- pageStyle: PropTypes.oneOfType([PropTypes.shape({
82
- '__@hasInstance@646': PropTypes.func.isRequired,
83
- '__@metadata@648': PropTypes.any,
84
- apply: PropTypes.func.isRequired,
85
- arguments: PropTypes.any.isRequired,
86
- bind: PropTypes.func.isRequired,
87
- call: PropTypes.func.isRequired,
88
- caller: PropTypes.object.isRequired,
89
- length: PropTypes.number.isRequired,
90
- name: PropTypes.string.isRequired,
91
- prototype: PropTypes.any.isRequired,
92
- toString: PropTypes.func.isRequired
93
- }), PropTypes.string])
81
+ pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
94
82
  })
95
83
  } : void 0;
96
84
  const GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExport(props, ref) {
@@ -3,7 +3,6 @@ import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';
6
- import Badge from '@mui/material/Badge';
7
6
  import { gridColumnLookupSelector } from "../../hooks/features/columns/gridColumnsSelector.js";
8
7
  import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
9
8
  import { gridFilterActiveItemsSelector } from "../../hooks/features/filter/gridFilterSelector.js";
@@ -104,7 +103,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
104
103
  "aria-controls": isOpen ? filterPanelId : undefined,
105
104
  "aria-expanded": isOpen,
106
105
  "aria-haspopup": true,
107
- startIcon: /*#__PURE__*/_jsx(Badge, {
106
+ startIcon: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
108
107
  badgeContent: activeFilters.length,
109
108
  color: "primary",
110
109
  children: /*#__PURE__*/_jsx(rootProps.slots.openFilterButtonIcon, {})
@@ -4,9 +4,6 @@ import clsx from 'clsx';
4
4
  import { styled } from '@mui/system';
5
5
  import composeClasses from '@mui/utils/composeClasses';
6
6
  import { gridClasses, getDataGridUtilityClass } from "../../constants/gridClasses.js";
7
- import { gridDimensionsSelector } from "../../hooks/features/dimensions/gridDimensionsSelectors.js";
8
- import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
9
- import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
10
7
  import { jsx as _jsx } from "react/jsx-runtime";
11
8
  const useUtilityClasses = () => {
12
9
  const slots = {
@@ -21,22 +18,8 @@ const Element = styled('div')({
21
18
  });
22
19
  export function GridBottomContainer(props) {
23
20
  const classes = useUtilityClasses();
24
- const apiRef = useGridApiContext();
25
- const {
26
- viewportOuterSize,
27
- minimumSize,
28
- hasScrollX,
29
- scrollbarSize
30
- } = useGridSelector(apiRef, gridDimensionsSelector);
31
- const scrollHeight = hasScrollX ? scrollbarSize : 0;
32
- const offset = Math.max(viewportOuterSize.height - minimumSize.height -
33
- // Subtract scroll height twice to account for GridVirtualScrollerFiller and horizontal scrollbar
34
- 2 * scrollHeight, 0);
35
21
  return /*#__PURE__*/_jsx(Element, _extends({}, props, {
36
22
  className: clsx(classes.root, gridClasses['container--bottom']),
37
- style: {
38
- transform: `translateY(${offset}px)`
39
- },
40
23
  role: "presentation"
41
24
  }));
42
25
  }
@@ -7,7 +7,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const GridPanelAnchor = styled('div')({
8
8
  position: 'absolute',
9
9
  top: `var(--DataGrid-headersTotalHeight)`,
10
- left: 0
10
+ left: 0,
11
+ width: 'calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))'
11
12
  });
12
13
  const Element = styled('div', {
13
14
  name: 'MuiDataGrid',
@@ -40,6 +40,8 @@ const Scroller = styled('div', {
40
40
  flexGrow: 1,
41
41
  overflow: 'scroll',
42
42
  scrollbarWidth: 'none' /* Firefox */,
43
+ display: 'flex',
44
+ flexDirection: 'column',
43
45
  '&::-webkit-scrollbar': {
44
46
  display: 'none' /* Safari and Chrome */
45
47
  },