@mui/x-data-grid-premium 8.0.0-alpha.1 → 8.0.0-alpha.11

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 (119) hide show
  1. package/CHANGELOG.md +2007 -230
  2. package/DataGridPremium/DataGridPremium.js +41 -40
  3. package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
  4. package/DataGridPremium/useDataGridPremiumComponent.js +6 -4
  5. package/DataGridPremium/useDataGridPremiumProps.js +5 -3
  6. package/README.md +1 -1
  7. package/components/GridAggregationHeader.js +6 -1
  8. package/components/GridColumnMenuAggregationItem.js +77 -49
  9. package/components/GridColumnMenuRowGroupItem.js +5 -11
  10. package/components/GridColumnMenuRowUngroupItem.js +10 -19
  11. package/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  12. package/components/GridPremiumColumnMenu.d.ts +1 -1
  13. package/components/GridPremiumColumnMenu.js +5 -5
  14. package/components/promptControl/GridToolbarPromptControl.js +47 -36
  15. package/esm/DataGridPremium/DataGridPremium.js +43 -42
  16. package/esm/DataGridPremium/useDataGridPremiumComponent.js +7 -5
  17. package/esm/DataGridPremium/useDataGridPremiumProps.js +6 -4
  18. package/esm/components/GridAggregationHeader.js +6 -1
  19. package/esm/components/GridColumnMenuAggregationItem.js +75 -47
  20. package/esm/components/GridColumnMenuRowGroupItem.js +6 -11
  21. package/esm/components/GridColumnMenuRowUngroupItem.js +11 -19
  22. package/esm/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  23. package/esm/components/GridPremiumColumnMenu.js +5 -5
  24. package/esm/components/promptControl/GridToolbarPromptControl.js +47 -36
  25. package/esm/hooks/features/aggregation/createAggregationLookup.js +52 -55
  26. package/esm/hooks/features/aggregation/gridAggregationUtils.js +18 -14
  27. package/esm/hooks/features/aggregation/index.js +0 -1
  28. package/esm/hooks/features/aggregation/useGridAggregation.js +22 -12
  29. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +8 -14
  30. package/esm/hooks/features/cellSelection/useGridCellSelection.js +17 -15
  31. package/esm/hooks/features/clipboard/useGridClipboardImport.js +1 -1
  32. package/esm/hooks/features/dataSource/cache.js +3 -0
  33. package/esm/hooks/features/dataSource/models.js +1 -0
  34. package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +53 -0
  35. package/esm/hooks/features/rowGrouping/createGroupingColDef.js +5 -1
  36. package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +5 -3
  37. package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +2 -2
  38. package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  39. package/esm/hooks/utils/useGridAriaAttributes.js +1 -3
  40. package/esm/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
  41. package/esm/utils/releaseInfo.js +1 -1
  42. package/hooks/features/aggregation/createAggregationLookup.d.ts +7 -6
  43. package/hooks/features/aggregation/createAggregationLookup.js +52 -55
  44. package/hooks/features/aggregation/gridAggregationInterfaces.d.ts +18 -5
  45. package/hooks/features/aggregation/gridAggregationSelectors.d.ts +2 -2
  46. package/hooks/features/aggregation/gridAggregationUtils.d.ts +12 -13
  47. package/hooks/features/aggregation/gridAggregationUtils.js +18 -14
  48. package/hooks/features/aggregation/index.d.ts +1 -1
  49. package/hooks/features/aggregation/index.js +0 -12
  50. package/hooks/features/aggregation/useGridAggregation.d.ts +2 -2
  51. package/hooks/features/aggregation/useGridAggregation.js +22 -12
  52. package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +2 -2
  53. package/hooks/features/aggregation/useGridAggregationPreProcessors.js +8 -14
  54. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +3 -2
  55. package/hooks/features/cellSelection/gridCellSelectionInterfaces.d.ts +3 -3
  56. package/hooks/features/cellSelection/useGridCellSelection.d.ts +2 -2
  57. package/hooks/features/cellSelection/useGridCellSelection.js +15 -13
  58. package/hooks/features/clipboard/useGridClipboardImport.d.ts +2 -2
  59. package/hooks/features/clipboard/useGridClipboardImport.js +1 -1
  60. package/hooks/features/dataSource/cache.d.ts +2 -0
  61. package/hooks/features/dataSource/cache.js +9 -0
  62. package/hooks/features/dataSource/models.d.ts +47 -0
  63. package/hooks/features/dataSource/models.js +5 -0
  64. package/hooks/features/dataSource/useGridDataSourcePremium.d.ts +4 -0
  65. package/hooks/features/dataSource/useGridDataSourcePremium.js +62 -0
  66. package/hooks/features/export/serializer/excelSerializer.d.ts +3 -2
  67. package/hooks/features/export/useGridExcelExport.d.ts +2 -2
  68. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +2 -2
  69. package/hooks/features/rowGrouping/createGroupingColDef.js +5 -1
  70. package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +2 -2
  71. package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +4 -4
  72. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +4 -2
  73. package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +2 -2
  74. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +2 -2
  75. package/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
  76. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +2 -2
  77. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  78. package/hooks/utils/useGridApiContext.d.ts +3 -1
  79. package/hooks/utils/useGridApiRef.d.ts +3 -1
  80. package/hooks/utils/useGridAriaAttributes.js +1 -3
  81. package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
  82. package/hooks/utils/useKeepGroupedColumnsHidden.d.ts +2 -2
  83. package/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
  84. package/index.d.ts +2 -0
  85. package/index.js +1 -1
  86. package/models/dataGridPremiumProps.d.ts +8 -12
  87. package/models/gridApiPremium.d.ts +5 -3
  88. package/models/gridGroupingValueGetter.d.ts +2 -1
  89. package/models/gridPastedValueParser.d.ts +2 -1
  90. package/modern/DataGridPremium/DataGridPremium.js +43 -42
  91. package/modern/DataGridPremium/useDataGridPremiumComponent.js +7 -5
  92. package/modern/DataGridPremium/useDataGridPremiumProps.js +6 -4
  93. package/modern/components/GridAggregationHeader.js +6 -1
  94. package/modern/components/GridColumnMenuAggregationItem.js +75 -47
  95. package/modern/components/GridColumnMenuRowGroupItem.js +6 -11
  96. package/modern/components/GridColumnMenuRowUngroupItem.js +11 -19
  97. package/modern/components/GridDataSourceGroupingCriteriaCell.js +1 -2
  98. package/modern/components/GridPremiumColumnMenu.js +5 -5
  99. package/modern/components/promptControl/GridToolbarPromptControl.js +47 -36
  100. package/modern/hooks/features/aggregation/createAggregationLookup.js +52 -55
  101. package/modern/hooks/features/aggregation/gridAggregationUtils.js +18 -14
  102. package/modern/hooks/features/aggregation/index.js +0 -1
  103. package/modern/hooks/features/aggregation/useGridAggregation.js +22 -12
  104. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +8 -14
  105. package/modern/hooks/features/cellSelection/useGridCellSelection.js +17 -15
  106. package/modern/hooks/features/clipboard/useGridClipboardImport.js +1 -1
  107. package/modern/hooks/features/dataSource/cache.js +3 -0
  108. package/modern/hooks/features/dataSource/models.js +1 -0
  109. package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +53 -0
  110. package/modern/hooks/features/rowGrouping/createGroupingColDef.js +5 -1
  111. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +5 -3
  112. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +2 -2
  113. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +9 -4
  114. package/modern/hooks/utils/useGridAriaAttributes.js +1 -3
  115. package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +2 -2
  116. package/modern/index.js +1 -1
  117. package/modern/utils/releaseInfo.js +1 -1
  118. package/package.json +6 -6
  119. package/utils/releaseInfo.js +1 -1
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _xLicense = require("@mui/x-license");
14
14
  var _xDataGridPro = require("@mui/x-data-grid-pro");
15
15
  var _internals = require("@mui/x-data-grid-pro/internals");
16
+ var _forwardRef = require("@mui/x-internals/forwardRef");
16
17
  var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
17
18
  var _useDataGridPremiumProps = require("./useDataGridPremiumProps");
18
19
  var _releaseInfo = require("../utils/releaseInfo");
@@ -26,11 +27,15 @@ const configuration = {
26
27
  }
27
28
  };
28
29
  const releaseInfo = (0, _releaseInfo.getReleaseInfo)();
30
+ const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
31
+ packageName: "x-data-grid-premium",
32
+ releaseInfo: releaseInfo
33
+ });
29
34
  let dataGridPremiumPropValidators;
30
35
  if (process.env.NODE_ENV !== 'production') {
31
36
  dataGridPremiumPropValidators = [..._internals.propValidatorsDataGrid, ..._internals.propValidatorsDataGridPro];
32
37
  }
33
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
38
+ const DataGridPremiumRaw = (0, _forwardRef.forwardRef)(function DataGridPremium(inProps, ref) {
34
39
  const props = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
35
40
  const privateApiRef = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(props.apiRef, props);
36
41
  (0, _xLicense.useLicenseVerifier)('x-data-grid-premium', releaseInfo);
@@ -41,18 +46,13 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
41
46
  privateApiRef: privateApiRef,
42
47
  configuration: configuration,
43
48
  props: props,
44
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridRoot, (0, _extends2.default)({
49
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridRoot, (0, _extends2.default)({
45
50
  className: props.className,
46
51
  style: props.style,
47
- sx: props.sx,
48
- ref: ref
49
- }, props.forwardedProps, {
50
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
51
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
52
- packageName: "x-data-grid-premium",
53
- releaseInfo: releaseInfo
54
- })
55
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridFooterPlaceholder, {})]
52
+ sx: props.sx
53
+ }, props.slotProps?.root, {
54
+ ref: ref,
55
+ children: watermark
56
56
  }))
57
57
  });
58
58
  });
@@ -63,7 +63,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
63
63
  // ----------------------------------------------------------------------
64
64
  /**
65
65
  * Aggregation functions available on the grid.
66
- * @default GRID_AGGREGATION_FUNCTIONS
66
+ * @default GRID_AGGREGATION_FUNCTIONS when `unstable_dataSource` is not provided, `{}` when `unstable_dataSource` is provided
67
67
  */
68
68
  aggregationFunctions: _propTypes.default.object,
69
69
  /**
@@ -81,7 +81,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
81
81
  * The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
82
82
  */
83
83
  apiRef: _propTypes.default.shape({
84
- current: _propTypes.default.object.isRequired
84
+ current: _propTypes.default.object
85
85
  }),
86
86
  /**
87
87
  * The label of the Data Grid.
@@ -116,6 +116,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
116
116
  */
117
117
  autosizeOptions: _propTypes.default.shape({
118
118
  columns: _propTypes.default.arrayOf(_propTypes.default.string),
119
+ disableColumnVirtualization: _propTypes.default.bool,
119
120
  expand: _propTypes.default.bool,
120
121
  includeHeaders: _propTypes.default.bool,
121
122
  includeOutliers: _propTypes.default.bool,
@@ -193,7 +194,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
193
194
  /**
194
195
  * The row ids to show the detail panel.
195
196
  */
196
- detailPanelExpandedRowIds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired),
197
+ detailPanelExpandedRowIds: _propTypes.default /* @typescript-to-proptypes-ignore */.instanceOf(Set),
197
198
  /**
198
199
  * If `true`, aggregation is disabled.
199
200
  * @default false
@@ -311,7 +312,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
311
312
  * For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
312
313
  */
313
314
  experimentalFeatures: _propTypes.default.shape({
314
- ariaV8: _propTypes.default.bool,
315
315
  warnIfFocusStateIsNotSynced: _propTypes.default.bool
316
316
  }),
317
317
  /**
@@ -340,11 +340,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
340
340
  quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
341
341
  quickFilterValues: _propTypes.default.array
342
342
  }),
343
- /**
344
- * Forwarded props for the Data Grid root element.
345
- * @ignore - do not document.
346
- */
347
- forwardedProps: _propTypes.default.object,
348
343
  /**
349
344
  * Determines the position of an aggregated value.
350
345
  * @param {GridGroupNode} groupNode The current group.
@@ -459,14 +454,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
459
454
  clipboardExport: _propTypes.default.bool,
460
455
  csvExport: _propTypes.default.bool
461
456
  }), _propTypes.default.bool]),
462
- /**
463
- * If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
464
- * will select all the rows under it.
465
- * If `deselect`, it will deselect all the rows under it.
466
- * Works only if `checkboxSelection` is enabled.
467
- * @default "deselect"
468
- */
469
- indeterminateCheckboxAction: _propTypes.default.oneOf(['deselect', 'select']),
470
457
  /**
471
458
  * The initial state of the DataGridPremium.
472
459
  * The data in it is set in the state on initialization but isn't controlled.
@@ -934,14 +921,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
934
921
  * Controls the modes of the rows.
935
922
  */
936
923
  rowModesModel: _propTypes.default.object,
937
- /**
938
- * The milliseconds delay to wait after measuring the row height before recalculating row positions.
939
- * Setting it to a lower value could be useful when using dynamic row height,
940
- * but might reduce performance when displaying a large number of rows.
941
- * @default 166
942
- * @deprecated
943
- */
944
- rowPositionsDebounceMs: _propTypes.default.number,
945
924
  /**
946
925
  * If `true`, the reordering of rows is enabled.
947
926
  * @default false
@@ -971,7 +950,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
971
950
  * - Deselecting a descendant of a selected parent deselects the parent automatically.
972
951
  *
973
952
  * Works with tree data and row grouping on the client-side only.
974
- * @default { parents: false, descendants: false }
953
+ * @default { parents: true, descendants: true }
975
954
  */
976
955
  rowSelectionPropagation: _propTypes.default.shape({
977
956
  descendants: _propTypes.default.bool,
@@ -981,7 +960,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
981
960
  * Loading rows can be processed on the server or client-side.
982
961
  * Set it to 'client' if you would like enable infnite loading.
983
962
  * Set it to 'server' if you would like to enable lazy loading.
984
- * * @default "client"
963
+ * @default "client"
985
964
  */
986
965
  rowsLoadingMode: _propTypes.default.oneOf(['client', 'server']),
987
966
  /**
@@ -989,12 +968,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
989
968
  * @default "margin"
990
969
  */
991
970
  rowSpacingType: _propTypes.default.oneOf(['border', 'margin']),
971
+ /**
972
+ * If `true`, the Data Grid will auto span the cells over the rows having the same value.
973
+ * @default false
974
+ */
975
+ rowSpanning: _propTypes.default.bool,
992
976
  /**
993
977
  * Override the height/width of the Data Grid inner scrollbar.
994
978
  */
995
979
  scrollbarSize: _propTypes.default.number,
996
980
  /**
997
981
  * Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
982
+ * If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
998
983
  * @default 80
999
984
  */
1000
985
  scrollEndThreshold: _propTypes.default.number,
@@ -1058,6 +1043,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1058
1043
  */
1059
1044
  treeData: _propTypes.default.bool,
1060
1045
  unstable_dataSource: _propTypes.default.shape({
1046
+ getAggregatedValue: _propTypes.default.func,
1061
1047
  getChildrenCount: _propTypes.default.func,
1062
1048
  getGroupKey: _propTypes.default.func,
1063
1049
  getRows: _propTypes.default.func.isRequired,
@@ -1068,6 +1054,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1068
1054
  get: _propTypes.default.func.isRequired,
1069
1055
  set: _propTypes.default.func.isRequired
1070
1056
  }),
1057
+ /**
1058
+ * Used together with `unstable_dataSource` to enable lazy loading.
1059
+ * If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
1060
+ * and starts sending `start` and `end` values depending on the loading mode and the scroll position.
1061
+ * @default false
1062
+ */
1063
+ unstable_lazyLoading: _propTypes.default.bool,
1064
+ /**
1065
+ * If positive, the Data Grid will throttle data source requests on rendered rows interval change.
1066
+ * @default 500
1067
+ */
1068
+ unstable_lazyLoadingRequestThrottleMs: _propTypes.default.number,
1071
1069
  /**
1072
1070
  * Definition of the column rendered when the `unstable_listView` prop is enabled.
1073
1071
  */
@@ -1085,10 +1083,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1085
1083
  unstable_listView: _propTypes.default.bool,
1086
1084
  unstable_onDataSourceError: _propTypes.default.func,
1087
1085
  /**
1088
- * If `true`, the Data Grid will auto span the cells over the rows having the same value.
1086
+ * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
1087
+ * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
1088
+ * For datasets with a large number of columns, this can cause performance issues.
1089
+ * The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
1089
1090
  * @default false
1090
1091
  */
1091
- unstable_rowSpanning: _propTypes.default.bool
1092
+ virtualizeColumnsWithAutoRowHeight: _propTypes.default.bool
1092
1093
  } : void 0;
1093
1094
  /**
1094
1095
  * Demos:
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridApiPremium, GridPrivateApiPremium } from '../models/gridApiPremium';
3
3
  import { DataGridPremiumProcessedProps } from '../models/dataGridPremiumProps';
4
- export declare const useDataGridPremiumComponent: (inputApiRef: React.MutableRefObject<GridApiPremium> | undefined, props: DataGridPremiumProcessedProps) => React.MutableRefObject<GridPrivateApiPremium>;
4
+ export declare const useDataGridPremiumComponent: (inputApiRef: RefObject<GridApiPremium | null> | undefined, props: DataGridPremiumProcessedProps) => import("react").RefObject<GridPrivateApiPremium>;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useDataGridPremiumComponent = void 0;
7
7
  var _internals = require("@mui/x-data-grid-pro/internals");
8
+ var _useGridDataSourcePremium = require("../hooks/features/dataSource/useGridDataSourcePremium");
8
9
  var _useGridAggregation = require("../hooks/features/aggregation/useGridAggregation");
9
10
  var _useGridAggregationPreProcessors = require("../hooks/features/aggregation/useGridAggregationPreProcessors");
10
11
  var _useGridRowGrouping = require("../hooks/features/rowGrouping/useGridRowGrouping");
@@ -39,7 +40,6 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
39
40
  /**
40
41
  * Register all state initializers here.
41
42
  */
42
- (0, _internals.useGridInitializeState)(_internals.dimensionsStateInitializer, apiRef, props);
43
43
  (0, _internals.useGridInitializeState)(_internals.headerFilteringStateInitializer, apiRef, props);
44
44
  (0, _internals.useGridInitializeState)(_useGridRowGrouping.rowGroupingStateInitializer, apiRef, props);
45
45
  (0, _internals.useGridInitializeState)(_useGridAggregation.aggregationStateInitializer, apiRef, props);
@@ -49,6 +49,7 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
49
49
  (0, _internals.useGridInitializeState)(_internals.columnPinningStateInitializer, apiRef, props);
50
50
  (0, _internals.useGridInitializeState)(_internals.columnsStateInitializer, apiRef, props);
51
51
  (0, _internals.useGridInitializeState)(_internals.rowPinningStateInitializer, apiRef, props);
52
+ (0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
52
53
  (0, _internals.useGridInitializeState)(_internals.rowsStateInitializer, apiRef, props);
53
54
  (0, _internals.useGridInitializeState)(_internals.editingStateInitializer, apiRef, props);
54
55
  (0, _internals.useGridInitializeState)(_internals.focusStateInitializer, apiRef, props);
@@ -59,17 +60,18 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
59
60
  (0, _internals.useGridInitializeState)(_internals.densityStateInitializer, apiRef, props);
60
61
  (0, _internals.useGridInitializeState)(_internals.columnReorderStateInitializer, apiRef, props);
61
62
  (0, _internals.useGridInitializeState)(_internals.columnResizeStateInitializer, apiRef, props);
62
- (0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
63
- (0, _internals.useGridInitializeState)(_internals.rowsMetaStateInitializer, apiRef, props);
64
63
  (0, _internals.useGridInitializeState)(_internals.columnMenuStateInitializer, apiRef, props);
65
64
  (0, _internals.useGridInitializeState)(_internals.columnGroupsStateInitializer, apiRef, props);
66
65
  (0, _internals.useGridInitializeState)(_internals.virtualizationStateInitializer, apiRef, props);
67
66
  (0, _internals.useGridInitializeState)(_internals.dataSourceStateInitializer, apiRef, props);
67
+ (0, _internals.useGridInitializeState)(_internals.dimensionsStateInitializer, apiRef, props);
68
+ (0, _internals.useGridInitializeState)(_internals.rowsMetaStateInitializer, apiRef, props);
68
69
  (0, _internals.useGridInitializeState)(_internals.listViewStateInitializer, apiRef, props);
69
70
  (0, _useGridRowGrouping.useGridRowGrouping)(apiRef, props);
70
71
  (0, _internals.useGridHeaderFiltering)(apiRef, props);
71
72
  (0, _internals.useGridTreeData)(apiRef, props);
72
73
  (0, _useGridAggregation.useGridAggregation)(apiRef, props);
74
+ (0, _useGridDataSourcePremium.useGridDataSourcePremium)(apiRef, props);
73
75
  (0, _internals.useGridKeyboardNavigation)(apiRef, props);
74
76
  (0, _internals.useGridRowSelection)(apiRef, props);
75
77
  (0, _useGridCellSelection.useGridCellSelection)(apiRef, props);
@@ -97,6 +99,7 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
97
99
  (0, _internals.useGridScroll)(apiRef, props);
98
100
  (0, _internals.useGridInfiniteLoader)(apiRef, props);
99
101
  (0, _internals.useGridLazyLoader)(apiRef, props);
102
+ (0, _internals.useGridDataSourceLazyLoader)(apiRef, props);
100
103
  (0, _internals.useGridColumnMenu)(apiRef);
101
104
  (0, _internals.useGridCsvExport)(apiRef, props);
102
105
  (0, _internals.useGridPrintExport)(apiRef, props);
@@ -105,7 +108,6 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
105
108
  (0, _internals.useGridDimensions)(apiRef, props);
106
109
  (0, _internals.useGridEvents)(apiRef, props);
107
110
  (0, _internals.useGridStatePersistence)(apiRef);
108
- (0, _internals.useGridDataSource)(apiRef, props);
109
111
  (0, _internals.useGridVirtualization)(apiRef, props);
110
112
  (0, _internals.useGridListView)(apiRef, props);
111
113
  return apiRef;
@@ -42,18 +42,20 @@ const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PREMIUM_PROPS_D
42
42
  });
43
43
  const defaultSlots = _dataGridPremiumDefaultSlotsComponents.DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
44
44
  const useDataGridPremiumProps = inProps => {
45
- const themedProps = (0, _internals.useProps)(
45
+ const themedProps =
46
46
  // eslint-disable-next-line material-ui/mui-name-matches-component-name
47
47
  (0, _styles.useThemeProps)({
48
48
  props: inProps,
49
49
  name: 'MuiDataGrid'
50
- }));
50
+ });
51
51
  const localeText = React.useMemo(() => (0, _extends2.default)({}, _xDataGridPro.GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
52
52
  const slots = React.useMemo(() => (0, _internals.computeSlots)({
53
53
  defaultSlots,
54
54
  slots: themedProps.slots
55
55
  }), [themedProps.slots]);
56
- return React.useMemo(() => (0, _extends2.default)({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps, {
56
+ return React.useMemo(() => (0, _extends2.default)({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps.unstable_dataSource ? {
57
+ aggregationFunctions: {}
58
+ } : {}, themedProps, {
57
59
  localeText,
58
60
  slots
59
61
  }, getDataGridPremiumForcedProps(themedProps)), [themedProps, localeText, slots]);
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MUI X Data Grid Premium
2
2
 
3
3
  This package is the Premium plan edition of the Data Grid components.
4
- It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
@@ -20,7 +20,12 @@ const _excluded = ["renderHeader"];
20
20
  const GridAggregationHeaderRoot = (0, _styles.styled)('div', {
21
21
  name: 'MuiDataGrid',
22
22
  slot: 'AggregationColumnHeader',
23
- overridesResolver: (_, styles) => styles.aggregationColumnHeader
23
+ overridesResolver: (props, styles) => {
24
+ const {
25
+ ownerState
26
+ } = props;
27
+ return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
28
+ }
24
29
  })({
25
30
  display: 'flex',
26
31
  flexDirection: 'column',
@@ -1,19 +1,18 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.GridColumnMenuAggregationItem = GridColumnMenuAggregationItem;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
10
  var _toPropertyKey2 = _interopRequireDefault(require("@babel/runtime/helpers/toPropertyKey"));
12
- var React = _interopRequireWildcard(require("react"));
11
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var React = _react;
13
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
15
  var _xDataGridPro = require("@mui/x-data-grid-pro");
15
- var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
16
- var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
17
16
  var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
18
17
  var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
19
18
  var _utils = require("@mui/utils");
@@ -22,18 +21,27 @@ var _useGridRootProps = require("../hooks/utils/useGridRootProps");
22
21
  var _gridAggregationUtils = require("../hooks/features/aggregation/gridAggregationUtils");
23
22
  var _gridAggregationSelectors = require("../hooks/features/aggregation/gridAggregationSelectors");
24
23
  var _jsxRuntime = require("react/jsx-runtime");
24
+ const _excluded = ["native"];
25
25
  function GridColumnMenuAggregationItem(props) {
26
26
  const {
27
27
  colDef
28
28
  } = props;
29
29
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
30
+ const inputRef = React.useRef(null);
30
31
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
31
32
  const id = (0, _utils.unstable_useId)();
32
33
  const aggregationModel = (0, _xDataGridPro.useGridSelector)(apiRef, _gridAggregationSelectors.gridAggregationModelSelector);
33
34
  const availableAggregationFunctions = React.useMemo(() => (0, _gridAggregationUtils.getAvailableAggregationFunctions)({
34
35
  aggregationFunctions: rootProps.aggregationFunctions,
35
- colDef
36
- }), [colDef, rootProps.aggregationFunctions]);
36
+ colDef,
37
+ isDataSource: !!rootProps.unstable_dataSource
38
+ }), [colDef, rootProps.aggregationFunctions, rootProps.unstable_dataSource]);
39
+ const _ref = rootProps.slotProps?.baseSelect || {},
40
+ {
41
+ native: isBaseSelectNative = false
42
+ } = _ref,
43
+ baseSelectProps = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
44
+ const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};
37
45
  const selectedAggregationRule = React.useMemo(() => {
38
46
  if (!colDef || !aggregationModel[colDef.field]) {
39
47
  return '';
@@ -42,12 +50,13 @@ function GridColumnMenuAggregationItem(props) {
42
50
  if ((0, _gridAggregationUtils.canColumnHaveAggregationFunction)({
43
51
  colDef,
44
52
  aggregationFunctionName,
45
- aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName]
53
+ aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName],
54
+ isDataSource: !!rootProps.unstable_dataSource
46
55
  })) {
47
56
  return aggregationFunctionName;
48
57
  }
49
58
  return '';
50
- }, [rootProps.aggregationFunctions, aggregationModel, colDef]);
59
+ }, [rootProps.aggregationFunctions, rootProps.unstable_dataSource, aggregationModel, colDef]);
51
60
  const handleAggregationItemChange = event => {
52
61
  const newAggregationItem = event.target?.value || undefined;
53
62
  const currentModel = (0, _gridAggregationSelectors.gridAggregationModelSelector)(apiRef);
@@ -60,47 +69,66 @@ function GridColumnMenuAggregationItem(props) {
60
69
  apiRef.current.hideColumnMenu();
61
70
  };
62
71
  const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
63
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
64
- disableRipple: true,
65
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
66
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuAggregationIcon, {
67
- fontSize: "small"
68
- })
69
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
70
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
71
- size: "small",
72
- fullWidth: true,
73
- sx: {
74
- minWidth: 150
72
+ const handleMenuItemKeyDown = React.useCallback(event => {
73
+ if (event.key === 'Enter' || event.key === ' ') {
74
+ inputRef.current.focus();
75
+ }
76
+ }, []);
77
+ const handleSelectKeyDown = React.useCallback(event => {
78
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === ' ') {
79
+ event.stopPropagation();
80
+ }
81
+ }, []);
82
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
83
+ inert: true,
84
+ iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuAggregationIcon, {
85
+ fontSize: "small"
86
+ }),
87
+ onKeyDown: handleMenuItemKeyDown,
88
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
89
+ size: "small",
90
+ fullWidth: true,
91
+ sx: {
92
+ minWidth: 150
93
+ },
94
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
95
+ id: `${id}-label`,
96
+ htmlFor: `${id}-input`,
97
+ children: label
98
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, (0, _extends2.default)({
99
+ labelId: `${id}-label`,
100
+ inputRef: inputRef,
101
+ id: `${id}-input`,
102
+ value: selectedAggregationRule,
103
+ label: label,
104
+ color: "primary",
105
+ onChange: handleAggregationItemChange,
106
+ MenuProps: {
107
+ PaperProps: {
108
+ onKeyDown: handleSelectKeyDown
109
+ }
75
110
  },
76
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
77
- id: `${id}-label`,
78
- children: label
79
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, {
80
- labelId: `${id}-label`,
81
- id: `${id}-input`,
82
- value: selectedAggregationRule,
83
- label: label,
84
- color: "primary",
85
- onChange: handleAggregationItemChange,
86
- onBlur: event => event.stopPropagation(),
87
- fullWidth: true,
88
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
89
- value: "",
90
- children: "..."
91
- }), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
92
- value: aggFunc,
93
- children: (0, _gridAggregationUtils.getAggregationFunctionLabel)({
94
- apiRef,
95
- aggregationRule: {
96
- aggregationFunctionName: aggFunc,
97
- aggregationFunction: rootProps.aggregationFunctions[aggFunc]
98
- }
99
- })
100
- }, aggFunc))]
101
- })]
102
- })
103
- })]
111
+ onBlur: event => event.stopPropagation(),
112
+ native: isBaseSelectNative,
113
+ fullWidth: true
114
+ }, baseSelectProps, {
115
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSelectOption, (0, _extends2.default)({}, baseSelectOptionProps, {
116
+ native: isBaseSelectNative,
117
+ value: "",
118
+ children: "..."
119
+ })), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/(0, _react.createElement)(rootProps.slots.baseSelectOption, (0, _extends2.default)({}, baseSelectOptionProps, {
120
+ key: aggFunc,
121
+ value: aggFunc,
122
+ native: isBaseSelectNative
123
+ }), (0, _gridAggregationUtils.getAggregationFunctionLabel)({
124
+ apiRef,
125
+ aggregationRule: {
126
+ aggregationFunctionName: aggFunc,
127
+ aggregationFunction: rootProps.aggregationFunctions[aggFunc]
128
+ }
129
+ })))]
130
+ }))]
131
+ })
104
132
  });
105
133
  }
106
134
  process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.GridColumnMenuRowGroupItem = GridColumnMenuRowGroupItem;
9
8
  var React = _interopRequireWildcard(require("react"));
10
- var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
11
- var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
12
9
  var _xDataGridPro = require("@mui/x-data-grid-pro");
13
10
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
14
11
  var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
@@ -31,16 +28,13 @@ function GridColumnMenuRowGroupItem(props) {
31
28
  };
32
29
  const groupedColumn = columnsLookup[field];
33
30
  const name = groupedColumn.headerName ?? field;
34
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
35
32
  onClick: ungroupColumn,
36
33
  disabled: !groupedColumn.groupable,
37
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
38
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
39
- fontSize: "small"
40
- })
41
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
42
- children: apiRef.current.getLocaleText('unGroupColumn')(name)
43
- })]
34
+ iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
35
+ fontSize: "small"
36
+ }),
37
+ children: apiRef.current.getLocaleText('unGroupColumn')(name)
44
38
  }, field);
45
39
  };
46
40
  if (!colDef || !(0, _gridRowGroupingUtils.isGroupingColumn)(colDef.field)) {
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.GridColumnMenuRowUngroupItem = GridColumnMenuRowUngroupItem;
9
8
  var React = _interopRequireWildcard(require("react"));
10
- var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
11
- var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
12
9
  var _xDataGridPro = require("@mui/x-data-grid-pro");
13
10
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
14
11
  var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
@@ -36,25 +33,19 @@ function GridColumnMenuRowUngroupItem(props) {
36
33
  };
37
34
  const name = columnsLookup[colDef.field].headerName ?? colDef.field;
38
35
  if (rowGroupingModel.includes(colDef.field)) {
39
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
40
37
  onClick: ungroupColumn,
41
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
42
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
43
- fontSize: "small"
44
- })
45
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
46
- children: apiRef.current.getLocaleText('unGroupColumn')(name)
47
- })]
38
+ iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuUngroupIcon, {
39
+ fontSize: "small"
40
+ }),
41
+ children: apiRef.current.getLocaleText('unGroupColumn')(name)
48
42
  });
49
43
  }
50
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuItem, {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
51
45
  onClick: groupColumn,
52
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
53
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuGroupIcon, {
54
- fontSize: "small"
55
- })
56
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
57
- children: apiRef.current.getLocaleText('groupColumn')(name)
58
- })]
46
+ iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuGroupIcon, {
47
+ fontSize: "small"
48
+ }),
49
+ children: apiRef.current.getLocaleText('groupColumn')(name)
59
50
  });
60
51
  }
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _utils = require("@mui/utils");
12
12
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
13
- var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
14
13
  var _internals = require("@mui/x-data-grid-pro/internals");
15
14
  var _xDataGridPro = require("@mui/x-data-grid-pro");
16
15
  var _useGridApiContext = require("../hooks/utils/useGridApiContext");
@@ -55,7 +54,7 @@ function GridGroupingCriteriaCellIcon(props) {
55
54
  if (isDataLoading) {
56
55
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
57
56
  className: classes.loadingContainer,
58
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseCircularProgress, {
59
58
  size: "1rem",
60
59
  color: "inherit"
61
60
  })
@@ -30,4 +30,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
30
30
  displayOrder: number;
31
31
  };
32
32
  };
33
- export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
33
+ export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps> | React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
@@ -11,6 +11,7 @@ exports.GridPremiumColumnMenu = void 0;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _xDataGridPro = require("@mui/x-data-grid-pro");
14
+ var _forwardRef = require("@mui/x-internals/forwardRef");
14
15
  var _GridColumnMenuAggregationItem = require("./GridColumnMenuAggregationItem");
15
16
  var _rowGrouping = require("../hooks/features/rowGrouping");
16
17
  var _GridColumnMenuRowGroupItem = require("./GridColumnMenuRowGroupItem");
@@ -37,11 +38,10 @@ const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = exports.GRID_COLUMN_MENU_SLOT_PROPS_
37
38
  displayOrder: 27
38
39
  }
39
40
  });
40
- const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
41
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({
42
- ref: ref
43
- }, props, {
41
+ const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = (0, _forwardRef.forwardRef)(function GridPremiumColumnMenuSimple(props, ref) {
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({}, props, {
44
43
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
45
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
44
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
45
+ ref: ref
46
46
  }));
47
47
  });