@mui/x-data-grid 8.11.3 → 8.12.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 (154) hide show
  1. package/CHANGELOG.md +151 -6
  2. package/DataGrid/DataGrid.js +3 -1
  3. package/DataGrid/useDataGridComponent.js +2 -2
  4. package/colDef/gridActionsColDef.js +1 -0
  5. package/colDef/gridBooleanColDef.js +1 -0
  6. package/colDef/gridCheckboxSelectionColDef.js +1 -0
  7. package/colDef/gridStringColDef.js +1 -0
  8. package/components/cell/GridCell.js +7 -5
  9. package/constants/localeTextConstants.js +29 -0
  10. package/esm/DataGrid/DataGrid.js +3 -1
  11. package/esm/DataGrid/useDataGridComponent.js +2 -2
  12. package/esm/colDef/gridActionsColDef.js +1 -0
  13. package/esm/colDef/gridBooleanColDef.js +1 -0
  14. package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
  15. package/esm/colDef/gridStringColDef.js +1 -0
  16. package/esm/components/cell/GridCell.js +7 -5
  17. package/esm/constants/localeTextConstants.js +29 -0
  18. package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -2
  19. package/esm/hooks/features/columns/useGridColumns.js +21 -4
  20. package/esm/hooks/features/filter/gridFilterSelector.d.ts +12 -4
  21. package/esm/hooks/features/filter/gridFilterSelector.js +21 -4
  22. package/esm/hooks/features/filter/gridFilterState.d.ts +3 -1
  23. package/esm/hooks/features/filter/gridFilterUtils.d.ts +3 -3
  24. package/esm/hooks/features/filter/gridFilterUtils.js +23 -13
  25. package/esm/hooks/features/filter/useGridFilter.d.ts +2 -1
  26. package/esm/hooks/features/filter/useGridFilter.js +7 -5
  27. package/esm/hooks/features/rows/gridRowsSelector.d.ts +3 -0
  28. package/esm/hooks/features/rows/gridRowsSelector.js +4 -0
  29. package/esm/hooks/features/rows/useGridParamsApi.js +16 -7
  30. package/esm/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
  31. package/esm/hooks/features/sorting/gridSortingUtils.js +10 -4
  32. package/esm/hooks/features/sorting/useGridSorting.d.ts +2 -1
  33. package/esm/hooks/features/sorting/useGridSorting.js +4 -3
  34. package/esm/index.js +1 -1
  35. package/esm/internals/index.d.ts +1 -1
  36. package/esm/internals/index.js +1 -1
  37. package/esm/locales/arSD.js +31 -0
  38. package/esm/locales/beBY.js +31 -0
  39. package/esm/locales/bgBG.js +31 -0
  40. package/esm/locales/bnBD.js +31 -0
  41. package/esm/locales/csCZ.js +31 -0
  42. package/esm/locales/daDK.js +31 -0
  43. package/esm/locales/deDE.js +32 -0
  44. package/esm/locales/elGR.js +31 -0
  45. package/esm/locales/esES.js +31 -0
  46. package/esm/locales/faIR.js +31 -0
  47. package/esm/locales/fiFI.js +31 -0
  48. package/esm/locales/frFR.js +32 -2
  49. package/esm/locales/heIL.js +31 -0
  50. package/esm/locales/hrHR.js +31 -0
  51. package/esm/locales/huHU.js +31 -0
  52. package/esm/locales/hyAM.js +31 -0
  53. package/esm/locales/idID.d.ts +1 -1
  54. package/esm/locales/idID.js +32 -0
  55. package/esm/locales/isIS.js +31 -0
  56. package/esm/locales/itIT.js +31 -0
  57. package/esm/locales/jaJP.js +31 -0
  58. package/esm/locales/koKR.js +31 -0
  59. package/esm/locales/nbNO.js +31 -0
  60. package/esm/locales/nlNL.js +31 -0
  61. package/esm/locales/nnNO.js +32 -0
  62. package/esm/locales/plPL.js +31 -0
  63. package/esm/locales/ptBR.js +31 -0
  64. package/esm/locales/ptPT.js +31 -0
  65. package/esm/locales/roRO.js +31 -0
  66. package/esm/locales/ruRU.js +31 -0
  67. package/esm/locales/skSK.js +31 -0
  68. package/esm/locales/svSE.js +31 -0
  69. package/esm/locales/trTR.js +31 -0
  70. package/esm/locales/ukUA.js +31 -0
  71. package/esm/locales/urPK.js +31 -0
  72. package/esm/locales/viVN.js +31 -0
  73. package/esm/locales/zhCN.js +31 -0
  74. package/esm/locales/zhHK.js +31 -0
  75. package/esm/locales/zhTW.js +31 -0
  76. package/esm/material/augmentation.d.ts +8 -0
  77. package/esm/material/index.js +122 -24
  78. package/esm/models/api/gridLocaleTextApi.d.ts +27 -0
  79. package/esm/models/api/gridParamsApi.d.ts +5 -1
  80. package/esm/models/configuration/gridAggregationConfiguration.d.ts +25 -0
  81. package/esm/models/configuration/gridAggregationConfiguration.js +1 -0
  82. package/esm/models/configuration/gridConfiguration.d.ts +6 -9
  83. package/esm/models/gridBaseSlots.d.ts +15 -0
  84. package/esm/models/gridSlotsComponent.d.ts +10 -0
  85. package/esm/models/gridSlotsComponentsProps.d.ts +5 -1
  86. package/hooks/features/columnResize/useGridColumnResize.js +2 -2
  87. package/hooks/features/columns/useGridColumns.js +23 -6
  88. package/hooks/features/filter/gridFilterSelector.d.ts +12 -4
  89. package/hooks/features/filter/gridFilterSelector.js +22 -5
  90. package/hooks/features/filter/gridFilterState.d.ts +3 -1
  91. package/hooks/features/filter/gridFilterUtils.d.ts +3 -3
  92. package/hooks/features/filter/gridFilterUtils.js +23 -13
  93. package/hooks/features/filter/useGridFilter.d.ts +2 -1
  94. package/hooks/features/filter/useGridFilter.js +7 -5
  95. package/hooks/features/rows/gridRowsSelector.d.ts +3 -0
  96. package/hooks/features/rows/gridRowsSelector.js +4 -0
  97. package/hooks/features/rows/useGridParamsApi.js +16 -7
  98. package/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
  99. package/hooks/features/sorting/gridSortingUtils.js +10 -4
  100. package/hooks/features/sorting/useGridSorting.d.ts +2 -1
  101. package/hooks/features/sorting/useGridSorting.js +4 -3
  102. package/index.js +1 -1
  103. package/internals/index.d.ts +1 -1
  104. package/internals/index.js +7 -0
  105. package/locales/arSD.js +31 -0
  106. package/locales/beBY.js +31 -0
  107. package/locales/bgBG.js +31 -0
  108. package/locales/bnBD.js +31 -0
  109. package/locales/csCZ.js +31 -0
  110. package/locales/daDK.js +31 -0
  111. package/locales/deDE.js +32 -0
  112. package/locales/elGR.js +31 -0
  113. package/locales/esES.js +31 -0
  114. package/locales/faIR.js +31 -0
  115. package/locales/fiFI.js +31 -0
  116. package/locales/frFR.js +32 -2
  117. package/locales/heIL.js +31 -0
  118. package/locales/hrHR.js +31 -0
  119. package/locales/huHU.js +31 -0
  120. package/locales/hyAM.js +31 -0
  121. package/locales/idID.d.ts +1 -1
  122. package/locales/idID.js +32 -0
  123. package/locales/isIS.js +31 -0
  124. package/locales/itIT.js +31 -0
  125. package/locales/jaJP.js +31 -0
  126. package/locales/koKR.js +31 -0
  127. package/locales/nbNO.js +31 -0
  128. package/locales/nlNL.js +31 -0
  129. package/locales/nnNO.js +32 -0
  130. package/locales/plPL.js +31 -0
  131. package/locales/ptBR.js +31 -0
  132. package/locales/ptPT.js +31 -0
  133. package/locales/roRO.js +31 -0
  134. package/locales/ruRU.js +31 -0
  135. package/locales/skSK.js +31 -0
  136. package/locales/svSE.js +31 -0
  137. package/locales/trTR.js +31 -0
  138. package/locales/ukUA.js +31 -0
  139. package/locales/urPK.js +31 -0
  140. package/locales/viVN.js +31 -0
  141. package/locales/zhCN.js +31 -0
  142. package/locales/zhHK.js +31 -0
  143. package/locales/zhTW.js +31 -0
  144. package/material/augmentation.d.ts +8 -0
  145. package/material/index.js +122 -24
  146. package/models/api/gridLocaleTextApi.d.ts +27 -0
  147. package/models/api/gridParamsApi.d.ts +5 -1
  148. package/models/configuration/gridAggregationConfiguration.d.ts +25 -0
  149. package/models/configuration/gridAggregationConfiguration.js +5 -0
  150. package/models/configuration/gridConfiguration.d.ts +6 -9
  151. package/models/gridBaseSlots.d.ts +15 -0
  152. package/models/gridSlotsComponent.d.ts +10 -0
  153. package/models/gridSlotsComponentsProps.d.ts +5 -1
  154. package/package.json +3 -3
package/locales/zhCN.js CHANGED
@@ -41,6 +41,9 @@ const zhCNGrid = {
41
41
  // Toolbar pivot button
42
42
  // toolbarPivot: 'Pivot',
43
43
 
44
+ // Toolbar charts button
45
+ // toolbarCharts: 'Charts',
46
+
44
47
  // Toolbar AI Assistant button
45
48
  // toolbarAssistant: 'AI Assistant',
46
49
 
@@ -121,6 +124,7 @@ const zhCNGrid = {
121
124
  columnMenuSortAsc: '升序',
122
125
  columnMenuSortDesc: '降序',
123
126
  // columnMenuManagePivot: 'Manage pivot',
127
+ // columnMenuManageCharts: 'Manage charts',
124
128
 
125
129
  // Column header text
126
130
  columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} 个筛选器` : `${count} 个筛选器`,
@@ -189,6 +193,7 @@ const zhCNGrid = {
189
193
  rowReorderingHeaderName: '重新排列行',
190
194
  // Aggregation
191
195
  aggregationMenuItemHeader: '集合',
196
+ // aggregationFunctionLabelNone: 'none',
192
197
  aggregationFunctionLabelSum: '总数',
193
198
  aggregationFunctionLabelAvg: '平均',
194
199
  aggregationFunctionLabelMin: '最小',
@@ -223,6 +228,32 @@ const zhCNGrid = {
223
228
  // pivotYearColumnHeaderName: '(Year)',
224
229
  // pivotQuarterColumnHeaderName: '(Quarter)',
225
230
 
231
+ // Charts configuration panel
232
+ // chartsNoCharts: 'There are no charts available',
233
+ // chartsChartNotSelected: 'Select a chart type to configure its options',
234
+ // chartsTabChart: 'Chart',
235
+ // chartsTabFields: 'Fields',
236
+ // chartsTabCustomize: 'Customize',
237
+ // chartsCloseButton: 'Close charts configuration',
238
+ // chartsSyncButtonLabel: 'Sync chart',
239
+ // chartsSearchPlaceholder: 'Search fields',
240
+ // chartsSearchLabel: 'Search fields',
241
+ // chartsSearchClear: 'Clear search',
242
+ // chartsNoFields: 'No fields',
243
+ // chartsFieldBlocked: 'This field cannot be added to any section',
244
+ // chartsCategories: 'Categories',
245
+ // chartsSeries: 'Series',
246
+ // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
247
+ // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
248
+ // chartsMenuMoveUp: 'Move up',
249
+ // chartsMenuMoveDown: 'Move down',
250
+ // chartsMenuMoveToTop: 'Move to top',
251
+ // chartsMenuMoveToBottom: 'Move to bottom',
252
+ // chartsMenuOptions: 'Field options',
253
+ // chartsMenuRemove: 'Remove',
254
+ // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
255
+ // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
256
+
226
257
  // AI Assistant panel
227
258
  // aiAssistantPanelTitle: 'AI Assistant',
228
259
  // aiAssistantPanelClose: 'Close AI Assistant',
package/locales/zhHK.js CHANGED
@@ -41,6 +41,9 @@ const zhHKGrid = {
41
41
  // Toolbar pivot button
42
42
  // toolbarPivot: 'Pivot',
43
43
 
44
+ // Toolbar charts button
45
+ // toolbarCharts: 'Charts',
46
+
44
47
  // Toolbar AI Assistant button
45
48
  // toolbarAssistant: 'AI Assistant',
46
49
 
@@ -121,6 +124,7 @@ const zhHKGrid = {
121
124
  columnMenuSortAsc: '按升序排序',
122
125
  columnMenuSortDesc: '按降序排序',
123
126
  // columnMenuManagePivot: 'Manage pivot',
127
+ // columnMenuManageCharts: 'Manage charts',
124
128
 
125
129
  // Column header text
126
130
  columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} 個有效過濾器` : `${count} 個活動過濾器`,
@@ -189,6 +193,7 @@ const zhHKGrid = {
189
193
  rowReorderingHeaderName: '行重新排序',
190
194
  // Aggregation
191
195
  aggregationMenuItemHeader: '聚合',
196
+ // aggregationFunctionLabelNone: 'none',
192
197
  aggregationFunctionLabelSum: '和',
193
198
  aggregationFunctionLabelAvg: '平均',
194
199
  aggregationFunctionLabelMin: '分分鐘',
@@ -223,6 +228,32 @@ const zhHKGrid = {
223
228
  // pivotYearColumnHeaderName: '(Year)',
224
229
  // pivotQuarterColumnHeaderName: '(Quarter)',
225
230
 
231
+ // Charts configuration panel
232
+ // chartsNoCharts: 'There are no charts available',
233
+ // chartsChartNotSelected: 'Select a chart type to configure its options',
234
+ // chartsTabChart: 'Chart',
235
+ // chartsTabFields: 'Fields',
236
+ // chartsTabCustomize: 'Customize',
237
+ // chartsCloseButton: 'Close charts configuration',
238
+ // chartsSyncButtonLabel: 'Sync chart',
239
+ // chartsSearchPlaceholder: 'Search fields',
240
+ // chartsSearchLabel: 'Search fields',
241
+ // chartsSearchClear: 'Clear search',
242
+ // chartsNoFields: 'No fields',
243
+ // chartsFieldBlocked: 'This field cannot be added to any section',
244
+ // chartsCategories: 'Categories',
245
+ // chartsSeries: 'Series',
246
+ // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
247
+ // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
248
+ // chartsMenuMoveUp: 'Move up',
249
+ // chartsMenuMoveDown: 'Move down',
250
+ // chartsMenuMoveToTop: 'Move to top',
251
+ // chartsMenuMoveToBottom: 'Move to bottom',
252
+ // chartsMenuOptions: 'Field options',
253
+ // chartsMenuRemove: 'Remove',
254
+ // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
255
+ // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
256
+
226
257
  // AI Assistant panel
227
258
  // aiAssistantPanelTitle: 'AI Assistant',
228
259
  // aiAssistantPanelClose: 'Close AI Assistant',
package/locales/zhTW.js CHANGED
@@ -41,6 +41,9 @@ const zhTWGrid = {
41
41
  // Toolbar pivot button
42
42
  // toolbarPivot: 'Pivot',
43
43
 
44
+ // Toolbar charts button
45
+ // toolbarCharts: 'Charts',
46
+
44
47
  // Toolbar AI Assistant button
45
48
  // toolbarAssistant: 'AI Assistant',
46
49
 
@@ -121,6 +124,7 @@ const zhTWGrid = {
121
124
  columnMenuSortAsc: '升序',
122
125
  columnMenuSortDesc: '降序',
123
126
  // columnMenuManagePivot: 'Manage pivot',
127
+ // columnMenuManageCharts: 'Manage charts',
124
128
 
125
129
  // Column header text
126
130
  columnHeaderFiltersTooltipActive: count => `${count} 個篩選器`,
@@ -189,6 +193,7 @@ const zhTWGrid = {
189
193
  rowReorderingHeaderName: '排序',
190
194
  // Aggregation
191
195
  aggregationMenuItemHeader: '集合',
196
+ // aggregationFunctionLabelNone: 'none',
192
197
  aggregationFunctionLabelSum: '總數',
193
198
  aggregationFunctionLabelAvg: '平均數',
194
199
  aggregationFunctionLabelMin: '最小',
@@ -223,6 +228,32 @@ const zhTWGrid = {
223
228
  // pivotYearColumnHeaderName: '(Year)',
224
229
  // pivotQuarterColumnHeaderName: '(Quarter)',
225
230
 
231
+ // Charts configuration panel
232
+ // chartsNoCharts: 'There are no charts available',
233
+ // chartsChartNotSelected: 'Select a chart type to configure its options',
234
+ // chartsTabChart: 'Chart',
235
+ // chartsTabFields: 'Fields',
236
+ // chartsTabCustomize: 'Customize',
237
+ // chartsCloseButton: 'Close charts configuration',
238
+ // chartsSyncButtonLabel: 'Sync chart',
239
+ // chartsSearchPlaceholder: 'Search fields',
240
+ // chartsSearchLabel: 'Search fields',
241
+ // chartsSearchClear: 'Clear search',
242
+ // chartsNoFields: 'No fields',
243
+ // chartsFieldBlocked: 'This field cannot be added to any section',
244
+ // chartsCategories: 'Categories',
245
+ // chartsSeries: 'Series',
246
+ // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
247
+ // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
248
+ // chartsMenuMoveUp: 'Move up',
249
+ // chartsMenuMoveDown: 'Move down',
250
+ // chartsMenuMoveToTop: 'Move to top',
251
+ // chartsMenuMoveToBottom: 'Move to bottom',
252
+ // chartsMenuOptions: 'Field options',
253
+ // chartsMenuRemove: 'Remove',
254
+ // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
255
+ // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
256
+
226
257
  // AI Assistant panel
227
258
  // aiAssistantPanelTitle: 'AI Assistant',
228
259
  // aiAssistantPanelClose: 'Close AI Assistant',
@@ -17,6 +17,8 @@ import type { TooltipProps } from '@mui/material/Tooltip';
17
17
  import type { InputProps } from '@mui/material/Input';
18
18
  import type { SelectProps } from '@mui/material/Select';
19
19
  import type { SkeletonProps } from '@mui/material/Skeleton';
20
+ import type { ToggleButtonProps } from '@mui/material/ToggleButton';
21
+ import type { TabsProps } from '@mui/material/Tabs';
20
22
  declare module '@mui/x-data-grid' {
21
23
  interface BaseAutocompletePropsOverrides {
22
24
  material?: Partial<AutocompleteProps<string, true, false, true>>;
@@ -54,6 +56,12 @@ declare module '@mui/x-data-grid' {
54
56
  interface BaseButtonPropsOverrides {
55
57
  material?: Partial<ButtonProps>;
56
58
  }
59
+ interface BaseToggleButtonPropsOverrides {
60
+ material?: Partial<ToggleButtonProps>;
61
+ }
62
+ interface BaseTabsPropsOverrides {
63
+ material?: Partial<TabsProps>;
64
+ }
57
65
  interface BaseIconButtonPropsOverrides {
58
66
  material?: Partial<IconButtonProps>;
59
67
  }
package/material/index.js CHANGED
@@ -48,7 +48,11 @@ var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
48
48
  var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
49
49
  var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
50
50
  var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
51
+ var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
52
+ var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
53
+ var _ToggleButton = _interopRequireDefault(require("@mui/material/ToggleButton"));
51
54
  var _forwardRef = require("@mui/x-internals/forwardRef");
55
+ var _useId = _interopRequireDefault(require("@mui/utils/useId"));
52
56
  var _icons = require("./icons");
53
57
  var _GridColumnUnsortedIcon = require("../components/GridColumnUnsortedIcon");
54
58
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
@@ -68,16 +72,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
68
72
  _excluded0 = ["material"],
69
73
  _excluded1 = ["material"],
70
74
  _excluded10 = ["material"],
71
- _excluded11 = ["material", "label", "className"],
72
- _excluded12 = ["material"],
73
- _excluded13 = ["inert", "iconStart", "iconEnd", "children", "material"],
74
- _excluded14 = ["slotProps", "material"],
75
- _excluded15 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
76
- _excluded16 = ["key"],
77
- _excluded17 = ["inputProps", "InputProps", "InputLabelProps"],
78
- _excluded18 = ["slotProps", "material"],
79
- _excluded19 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
80
- _excluded20 = ["native"];
75
+ _excluded11 = ["material"],
76
+ _excluded12 = ["material", "label", "className"],
77
+ _excluded13 = ["material"],
78
+ _excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
79
+ _excluded15 = ["slotProps", "material"],
80
+ _excluded16 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
81
+ _excluded17 = ["key"],
82
+ _excluded18 = ["inputProps", "InputProps", "InputLabelProps"],
83
+ _excluded19 = ["slotProps", "material"],
84
+ _excluded20 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
85
+ _excluded21 = ["native"],
86
+ _excluded22 = ["children", "value", "active"],
87
+ _excluded23 = ["items", "value", "material"];
81
88
  /* eslint-disable material-ui/disallow-react-api-in-server-components */
82
89
 
83
90
  const InputAdornment = (0, _styles.styled)(_InputAdornment.default)(({
@@ -336,11 +343,30 @@ const BaseButton = (0, _forwardRef.forwardRef)(function BaseButton(props, ref) {
336
343
  }));
337
344
  });
338
345
  if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
346
+ const StyledToggleButton = (0, _styles.styled)(_ToggleButton.default)(({
347
+ theme
348
+ }) => ({
349
+ gap: theme.spacing(1),
350
+ border: 0
351
+ }));
352
+ const BaseToggleButton = (0, _forwardRef.forwardRef)(function BaseToggleButton(props, ref) {
353
+ const {
354
+ material
355
+ } = props,
356
+ rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded9);
357
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledToggleButton, (0, _extends2.default)({
358
+ size: "small",
359
+ color: "primary"
360
+ }, rest, material, {
361
+ ref: ref
362
+ }));
363
+ });
364
+ if (process.env.NODE_ENV !== "production") BaseToggleButton.displayName = "BaseToggleButton";
339
365
  const BaseChip = (0, _forwardRef.forwardRef)(function BaseChip(props, ref) {
340
366
  const {
341
367
  material
342
368
  } = props,
343
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded9);
369
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded0);
344
370
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({}, other, material, {
345
371
  ref: ref
346
372
  }));
@@ -350,7 +376,7 @@ const BaseIconButton = (0, _forwardRef.forwardRef)(function BaseIconButton(props
350
376
  const {
351
377
  material
352
378
  } = props,
353
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded0);
379
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded1);
354
380
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, other, material, {
355
381
  ref: ref
356
382
  }));
@@ -360,7 +386,7 @@ const BaseTooltip = (0, _forwardRef.forwardRef)(function BaseTooltip(props, ref)
360
386
  const {
361
387
  material
362
388
  } = props,
363
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded1);
389
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded10);
364
390
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, (0, _extends2.default)({}, other, material, {
365
391
  ref: ref
366
392
  }));
@@ -370,7 +396,7 @@ const BaseSkeleton = (0, _forwardRef.forwardRef)(function BaseSkeleton(props, re
370
396
  const {
371
397
  material
372
398
  } = props,
373
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded10);
399
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded11);
374
400
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, (0, _extends2.default)({}, other, material, {
375
401
  ref: ref
376
402
  }));
@@ -382,7 +408,7 @@ const BaseSwitch = (0, _forwardRef.forwardRef)(function BaseSwitch(props, ref) {
382
408
  label,
383
409
  className
384
410
  } = props,
385
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded11);
411
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded12);
386
412
  if (!label) {
387
413
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, other, material, {
388
414
  className: className,
@@ -402,7 +428,7 @@ const BaseMenuList = (0, _forwardRef.forwardRef)(function BaseMenuList(props, re
402
428
  const {
403
429
  material
404
430
  } = props,
405
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded12);
431
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded13);
406
432
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, (0, _extends2.default)({}, other, material, {
407
433
  ref: ref
408
434
  }));
@@ -416,7 +442,7 @@ function BaseMenuItem(props) {
416
442
  children,
417
443
  material
418
444
  } = props,
419
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded13);
445
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded14);
420
446
  if (inert) {
421
447
  other.disableRipple = true;
422
448
  }
@@ -435,7 +461,7 @@ function BaseTextField(props) {
435
461
  slotProps,
436
462
  material
437
463
  } = props,
438
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded14);
464
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
439
465
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({
440
466
  variant: "outlined"
441
467
  }, other, material, {
@@ -462,7 +488,7 @@ function BaseAutocomplete(props) {
462
488
  slotProps,
463
489
  material
464
490
  } = props,
465
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
491
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
466
492
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
467
493
  id: id,
468
494
  multiple: multiple,
@@ -479,7 +505,7 @@ function BaseAutocomplete(props) {
479
505
  {
480
506
  key
481
507
  } = _getTagProps,
482
- tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded16);
508
+ tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded17);
483
509
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
484
510
  variant: "outlined",
485
511
  size: "small",
@@ -492,7 +518,7 @@ function BaseAutocomplete(props) {
492
518
  InputProps,
493
519
  InputLabelProps
494
520
  } = params,
495
- inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded17);
521
+ inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded18);
496
522
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, inputRest, {
497
523
  label: label,
498
524
  placeholder: placeholder,
@@ -516,7 +542,7 @@ function transformInputProps(props, wrapAdornments = true) {
516
542
  slotProps,
517
543
  material
518
544
  } = props,
519
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded18);
545
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded19);
520
546
  const result = other;
521
547
  if (wrapAdornments) {
522
548
  if (result.startAdornment) {
@@ -565,7 +591,7 @@ function BasePopper(props) {
565
591
  placement,
566
592
  material
567
593
  } = props,
568
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded19);
594
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded20);
569
595
  const modifiers = React.useMemo(() => {
570
596
  const result = [{
571
597
  name: 'preventOverflow',
@@ -663,12 +689,82 @@ function BaseSelectOption(_ref) {
663
689
  let {
664
690
  native
665
691
  } = _ref,
666
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded20);
692
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded21);
667
693
  if (native) {
668
694
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
669
695
  }
670
696
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuItem.default, (0, _extends2.default)({}, props));
671
697
  }
698
+ const StyledTabs = (0, _styles.styled)(_Tabs.default, {
699
+ name: 'MuiDataGrid',
700
+ slot: 'Tabs'
701
+ })(({
702
+ theme
703
+ }) => ({
704
+ borderBottom: `1px solid ${theme.palette.divider}`
705
+ }));
706
+ const StyledTab = (0, _styles.styled)(_Tab.default, {
707
+ name: 'MuiDataGrid',
708
+ slot: 'Tab'
709
+ })({
710
+ flex: 1,
711
+ minWidth: 'fit-content'
712
+ });
713
+ const StyledTabPanel = (0, _styles.styled)('div', {
714
+ name: 'MuiDataGrid',
715
+ slot: 'TabPanel'
716
+ })({
717
+ flex: 1,
718
+ display: 'flex',
719
+ flexDirection: 'column',
720
+ overflow: 'hidden'
721
+ });
722
+ function TabPanel(props) {
723
+ const {
724
+ children,
725
+ active
726
+ } = props,
727
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
728
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabPanel, (0, _extends2.default)({
729
+ role: "tabpanel",
730
+ style: {
731
+ display: active ? 'flex' : 'none'
732
+ }
733
+ }, other, {
734
+ children: children
735
+ }));
736
+ }
737
+ function BaseTabs(_ref2) {
738
+ let {
739
+ items,
740
+ value,
741
+ material
742
+ } = _ref2,
743
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded23);
744
+ const id = (0, _useId.default)();
745
+ const labelId = `${id}-tab-${value}`;
746
+ const panelId = `${id}-tabpanel-${value}`;
747
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
748
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabs, (0, _extends2.default)({}, props, {
749
+ value: value,
750
+ variant: "scrollable",
751
+ scrollButtons: "auto"
752
+ }, material, {
753
+ children: items.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTab, {
754
+ value: item.value,
755
+ label: item.label,
756
+ id: labelId,
757
+ "aria-controls": panelId
758
+ }, item.value))
759
+ })), items.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(TabPanel, {
760
+ value: item.value,
761
+ active: value === item.value,
762
+ id: panelId,
763
+ "aria-labelledby": labelId,
764
+ children: item.children
765
+ }, item.value))]
766
+ });
767
+ }
672
768
  const iconSlots = {
673
769
  booleanCellTrueIcon: _icons.GridCheckIcon,
674
770
  booleanCellFalseIcon: _icons.GridCloseIcon,
@@ -722,7 +818,9 @@ const baseSlots = {
722
818
  baseTextField: BaseTextField,
723
819
  baseButton: BaseButton,
724
820
  baseIconButton: BaseIconButton,
821
+ baseToggleButton: BaseToggleButton,
725
822
  baseTooltip: BaseTooltip,
823
+ baseTabs: BaseTabs,
726
824
  basePagination: BasePagination,
727
825
  basePopper: BasePopper,
728
826
  baseSelect: BaseSelect,
@@ -30,6 +30,7 @@ export interface GridLocaleText {
30
30
  toolbarExportPrint: React.ReactNode;
31
31
  toolbarExportExcel: string;
32
32
  toolbarPivot: string;
33
+ toolbarCharts: string;
33
34
  toolbarAssistant: React.ReactNode;
34
35
  columnsManagementSearchTitle: string;
35
36
  columnsManagementNoColumns: string;
@@ -102,6 +103,7 @@ export interface GridLocaleText {
102
103
  columnMenuSortAsc: React.ReactNode | ((colDef: GridColDef) => React.ReactNode);
103
104
  columnMenuSortDesc: React.ReactNode | ((colDef: GridColDef) => React.ReactNode);
104
105
  columnMenuManagePivot: string;
106
+ columnMenuManageCharts: string;
105
107
  columnHeaderFiltersTooltipActive: (count: number) => React.ReactNode;
106
108
  columnHeaderFiltersLabel: string;
107
109
  columnHeaderSortIconLabel: string;
@@ -130,6 +132,7 @@ export interface GridLocaleText {
130
132
  collapseDetailPanel: string;
131
133
  rowReorderingHeaderName: string;
132
134
  aggregationMenuItemHeader: string;
135
+ aggregationFunctionLabelNone: string;
133
136
  aggregationFunctionLabelSum: string;
134
137
  aggregationFunctionLabelAvg: string;
135
138
  aggregationFunctionLabelMin: string;
@@ -170,6 +173,30 @@ export interface GridLocaleText {
170
173
  pivotDragToValues: string;
171
174
  pivotYearColumnHeaderName: string;
172
175
  pivotQuarterColumnHeaderName: string;
176
+ chartsNoCharts: string;
177
+ chartsChartNotSelected: string;
178
+ chartsTabChart: string;
179
+ chartsTabFields: string;
180
+ chartsTabCustomize: string;
181
+ chartsCloseButton: string;
182
+ chartsSyncButtonLabel: string;
183
+ chartsSearchPlaceholder: string;
184
+ chartsSearchLabel: string;
185
+ chartsSearchClear: string;
186
+ chartsNoFields: string;
187
+ chartsFieldBlocked: string;
188
+ chartsCategories: string;
189
+ chartsSeries: string;
190
+ chartsMenuAddToDimensions: (dimensionLabel: string) => string;
191
+ chartsMenuAddToValues: (valuesLabel: string) => string;
192
+ chartsMenuMoveUp: string;
193
+ chartsMenuMoveDown: string;
194
+ chartsMenuMoveToTop: string;
195
+ chartsMenuMoveToBottom: string;
196
+ chartsMenuOptions: string;
197
+ chartsMenuRemove: string;
198
+ chartsDragToDimensions: (dimensionLabel: string) => string;
199
+ chartsDragToValues: (valuesLabel: string) => string;
173
200
  aiAssistantPanelTitle: string;
174
201
  aiAssistantPanelClose: string;
175
202
  aiAssistantPanelConversationHistory: string;
@@ -96,12 +96,16 @@ export interface GridParamsPrivateApi {
96
96
  colDef,
97
97
  hasFocus,
98
98
  rowNode,
99
- tabIndex
99
+ tabIndex,
100
+ value,
101
+ formattedValue
100
102
  }: {
101
103
  cellMode: GridCellMode;
102
104
  colDef: GridStateColDef;
103
105
  hasFocus: boolean;
104
106
  rowNode: N;
105
107
  tabIndex: 0 | -1;
108
+ value?: V;
109
+ formattedValue?: F;
106
110
  }) => GridCellParams<R, V, F, N>;
107
111
  }
@@ -0,0 +1,25 @@
1
+ import { RefObject } from '@mui/x-internals/types';
2
+ import type { GridRowId, GridRowModel } from "../gridRows.js";
3
+ import { GridColDef } from "../colDef/index.js";
4
+ /**
5
+ * Get the cell aggregation result
6
+ * @param {GridRowId} id The row id
7
+ * @param {string} field The field
8
+ * @returns { { position: 'footer' | 'inline'; value: any } | null } The cell aggregation result
9
+ */
10
+ export type GetCellAggregationResultFn = (id: GridRowId, field: string) => {
11
+ position: 'footer' | 'inline';
12
+ value: any;
13
+ formattedValue?: any;
14
+ } | null;
15
+ export type SortValueGetterFn = (id: GridRowId, field: string) => any;
16
+ export type FilterValueGetterFn = (row: GridRowModel, colDef: GridColDef) => any;
17
+ export interface GridAggregationInternalHooks<Api, Props> {
18
+ useCellAggregationResult: GetCellAggregationResultFn;
19
+ /**
20
+ * @param {RefObject<Api>} apiRef The API reference
21
+ * @returns {SortValueGetterFn} The function to get the value to sort by
22
+ */
23
+ useSortValueGetter: (apiRef: RefObject<Api>) => SortValueGetterFn;
24
+ useFilterValueGetter: (apiRef: RefObject<Api>, props: Props) => FilterValueGetterFn;
25
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,22 +1,19 @@
1
1
  import * as React from 'react';
2
- import { GridRowAriaAttributesInternalHook, GridRowsOverridableMethodsInternalHook } from "./gridRowConfiguration.js";
2
+ import type { GridRowAriaAttributesInternalHook, GridRowsOverridableMethodsInternalHook } from "./gridRowConfiguration.js";
3
+ import type { GridAggregationInternalHooks } from "./gridAggregationConfiguration.js";
3
4
  import type { GridCSSVariablesInterface } from "../../constants/cssVariables.js";
4
- import type { GridRowId } from "../gridRows.js";
5
+ import { DataGridProcessedProps } from "../props/DataGridProps.js";
5
6
  import type { GridPrivateApiCommon } from "../api/gridApiCommon.js";
6
7
  import type { GridPrivateApiCommunity } from "../api/gridApiCommunity.js";
7
8
  export interface GridAriaAttributesInternalHook {
8
9
  useGridAriaAttributes: () => React.HTMLAttributes<HTMLElement>;
9
10
  }
10
- export interface GridInternalHook<Api> extends GridAriaAttributesInternalHook, GridRowAriaAttributesInternalHook, GridRowsOverridableMethodsInternalHook<Api> {
11
+ export interface GridInternalHook<Api, Props> extends GridAriaAttributesInternalHook, GridRowAriaAttributesInternalHook, GridAggregationInternalHooks<Api, Props>, GridRowsOverridableMethodsInternalHook<Api> {
11
12
  useCSSVariables: () => {
12
13
  id: string;
13
14
  variables: GridCSSVariablesInterface;
14
15
  };
15
- useCellAggregationResult: (id: GridRowId, field: string) => {
16
- position: 'footer' | 'inline';
17
- value: any;
18
- } | null;
19
16
  }
20
- export interface GridConfiguration<Api extends GridPrivateApiCommon = GridPrivateApiCommunity> {
21
- hooks: GridInternalHook<Api>;
17
+ export interface GridConfiguration<Api extends GridPrivateApiCommon = GridPrivateApiCommunity, Props = DataGridProcessedProps> {
18
+ hooks: GridInternalHook<Api, Props>;
22
19
  }
@@ -116,6 +116,10 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
116
116
  color?: 'default' | 'inherit' | 'primary';
117
117
  edge?: 'start' | 'end' | false;
118
118
  };
119
+ export type ToggleButtonProps = CommonProps & {
120
+ selected?: boolean;
121
+ value: string;
122
+ };
119
123
  export type DividerProps = {
120
124
  className?: string;
121
125
  orientation?: 'horizontal' | 'vertical';
@@ -236,6 +240,17 @@ export type SwitchProps = CommonProps & {
236
240
  onChange?: React.ChangeEventHandler;
237
241
  size?: 'small' | 'medium';
238
242
  label?: React.ReactNode;
243
+ disabled?: boolean;
244
+ title?: string;
245
+ };
246
+ export type TabsProps = Omit<CommonProps, 'onChange'> & {
247
+ items: {
248
+ value: string;
249
+ label: string;
250
+ children: React.ReactNode;
251
+ }[];
252
+ value: string;
253
+ onChange: (event: React.SyntheticEvent, value: string) => void;
239
254
  };
240
255
  export type TextFieldProps = CommonProps & {
241
256
  role?: string;
@@ -73,6 +73,11 @@ export interface GridBaseSlots {
73
73
  * @default Input
74
74
  */
75
75
  baseInput: React.JSXElementConstructor<GridSlotProps['baseInput']>;
76
+ /**
77
+ * The custom ToggleButton component used in the grid.
78
+ * @default ToggleButton
79
+ */
80
+ baseToggleButton: React.JSXElementConstructor<GridSlotProps['baseToggleButton']>;
76
81
  /**
77
82
  * The custom Tooltip component used in the grid.
78
83
  * @default Tooltip
@@ -103,6 +108,11 @@ export interface GridBaseSlots {
103
108
  * @default Switch
104
109
  */
105
110
  baseSwitch: React.JSXElementConstructor<GridSlotProps['baseSwitch']>;
111
+ /**
112
+ * The custom Tabs component used in the grid.
113
+ * @default Tabs
114
+ */
115
+ baseTabs: React.JSXElementConstructor<GridSlotProps['baseTabs']>;
106
116
  }
107
117
  /**
108
118
  * Grid components React prop interface containing all the overridable components.