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

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 +1903 -231
  2. package/DataGridPremium/DataGridPremium.js +40 -40
  3. package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
  4. package/DataGridPremium/useDataGridPremiumComponent.js +4 -2
  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 +42 -42
  16. package/esm/DataGridPremium/useDataGridPremiumComponent.js +5 -3
  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 +17 -13
  27. package/esm/hooks/features/aggregation/index.js +0 -1
  28. package/esm/hooks/features/aggregation/useGridAggregation.js +22 -10
  29. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +8 -14
  30. package/esm/hooks/features/cellSelection/useGridCellSelection.js +5 -6
  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 +2 -2
  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 +17 -13
  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 -10
  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 +4 -5
  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 +1 -1
  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 +1 -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 +42 -42
  91. package/modern/DataGridPremium/useDataGridPremiumComponent.js +5 -3
  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 +17 -13
  102. package/modern/hooks/features/aggregation/index.js +0 -1
  103. package/modern/hooks/features/aggregation/useGridAggregation.js +22 -10
  104. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +8 -14
  105. package/modern/hooks/features/cellSelection/useGridCellSelection.js +5 -6
  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 +2 -2
  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
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridApi } from '@mui/x-data-grid-pro';
3
3
  import { GridInitialStatePremium } from '../../models/gridStatePremium';
4
4
  import { DataGridPremiumProps } from '../../models/dataGridPremiumProps';
@@ -8,5 +8,5 @@ import { DataGridPremiumProps } from '../../models/dataGridPremiumProps';
8
8
  * Does not work when used with the `hide` property of `GridColDef`
9
9
  */
10
10
  export declare const useKeepGroupedColumnsHidden: (props: {
11
- apiRef: React.MutableRefObject<GridApi>;
11
+ apiRef: RefObject<GridApi | null>;
12
12
  } & Pick<DataGridPremiumProps, "initialState" | "rowGroupingModel">) => GridInitialStatePremium;
@@ -33,9 +33,9 @@ const useKeepGroupedColumnsHidden = props => {
33
33
  const initialProps = React.useRef(props);
34
34
  const rowGroupingModel = React.useRef(props.rowGroupingModel ?? props.initialState?.rowGrouping?.model);
35
35
  React.useEffect(() => {
36
- props.apiRef.current.subscribeEvent('rowGroupingModelChange', newModel => {
36
+ props.apiRef.current?.subscribeEvent('rowGroupingModelChange', newModel => {
37
37
  const columnVisibilityModel = updateColumnVisibilityModel((0, _xDataGridPro.gridColumnVisibilityModelSelector)(props.apiRef), newModel, rowGroupingModel.current);
38
- props.apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
38
+ props.apiRef.current?.setColumnVisibilityModel(columnVisibilityModel);
39
39
  rowGroupingModel.current = newModel;
40
40
  });
41
41
  }, [props.apiRef]);
package/index.d.ts CHANGED
@@ -27,3 +27,5 @@ export type { DataGridPremiumProps, GridExperimentalPremiumFeatures, } from './m
27
27
  export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
28
28
  export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
29
29
  export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS, } from './components/reexports';
30
+ export type { GridDataSourceCache } from '@mui/x-data-grid-pro';
31
+ export type { GridGetRowsParamsPremium as GridGetRowsParams, GridGetRowsResponsePremium as GridGetRowsResponse, GridDataSourcePremium as GridDataSource, GridDataSourceApiPremium as GridDataSourceApi, GridDataSourceApiBasePremium as GridDataSourceApiBase, GridDataSourcePremiumPrivateApi as GridDataSourcePrivateApi, } from './hooks/features/dataSource/models';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.0.0-alpha.1
2
+ * @mui/x-data-grid-premium v8.0.0-alpha.10
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,19 +1,14 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridCallbackDetails, GridValidRowModel, GridGroupNode, GridEventListener } from '@mui/x-data-grid-pro';
3
3
  import { GridExperimentalProFeatures, DataGridProPropsWithDefaultValue, DataGridProPropsWithoutDefaultValue, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithComplexDefaultValueBeforeProcessing, DataGridPremiumSharedPropsWithDefaultValue } from '@mui/x-data-grid-pro/internals';
4
4
  import type { GridRowGroupingModel } from '../hooks/features/rowGrouping';
5
- import type { GridAggregationModel, GridAggregationFunction, GridAggregationPosition } from '../hooks/features/aggregation';
5
+ import type { GridAggregationModel, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationPosition } from '../hooks/features/aggregation';
6
6
  import { GridPremiumSlotsComponent } from './gridPremiumSlotsComponent';
7
7
  import { GridInitialStatePremium } from './gridStatePremium';
8
8
  import { GridApiPremium } from './gridApiPremium';
9
9
  import { GridCellSelectionModel } from '../hooks/features/cellSelection';
10
+ import { GridDataSourcePremium as GridDataSource } from '../hooks/features/dataSource/models';
10
11
  export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {
11
- /**
12
- * Enables accessibility improvements that will be enabled by default in V8.
13
- * If you rely on the v7 ARIA attributes (e.g. for CSS selectors), this might be a breaking change.
14
- * @default false
15
- */
16
- ariaV8: boolean;
17
12
  }
18
13
  export interface DataGridPremiumPropsWithComplexDefaultValueBeforeProcessing extends Pick<DataGridPropsWithComplexDefaultValueBeforeProcessing, 'localeText'> {
19
14
  /**
@@ -59,9 +54,9 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
59
54
  rowGroupingColumnMode: 'single' | 'multiple';
60
55
  /**
61
56
  * Aggregation functions available on the grid.
62
- * @default GRID_AGGREGATION_FUNCTIONS
57
+ * @default GRID_AGGREGATION_FUNCTIONS when `unstable_dataSource` is not provided, `{}` when `unstable_dataSource` is provided
63
58
  */
64
- aggregationFunctions: Record<string, GridAggregationFunction>;
59
+ aggregationFunctions: Record<string, GridAggregationFunction> | Record<string, GridAggregationFunctionDataSource>;
65
60
  /**
66
61
  * Rows used to generate the aggregated value.
67
62
  * If `filtered`, the aggregated values are generated using only the rows currently passing the filtering process.
@@ -89,11 +84,11 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
89
84
  */
90
85
  splitClipboardPastedText: (text: string) => string[][] | null;
91
86
  }
92
- export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridProPropsWithoutDefaultValue<R>, 'initialState' | 'apiRef'> {
87
+ export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridProPropsWithoutDefaultValue<R>, 'initialState' | 'apiRef' | 'unstable_dataSource'> {
93
88
  /**
94
89
  * The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
95
90
  */
96
- apiRef?: React.MutableRefObject<GridApiPremium>;
91
+ apiRef?: RefObject<GridApiPremium | null>;
97
92
  /**
98
93
  * The initial state of the DataGridPremium.
99
94
  * The data in it is set in the state on initialization but isn't controlled.
@@ -158,4 +153,5 @@ export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowM
158
153
  * 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.
159
154
  */
160
155
  experimentalFeatures?: Partial<GridExperimentalPremiumFeatures>;
156
+ unstable_dataSource?: GridDataSource;
161
157
  }
@@ -1,14 +1,16 @@
1
1
  import { GridPrivateOnlyApiCommon } from '@mui/x-data-grid/internals';
2
- import { GridApiCommon, GridColumnPinningApi, GridDetailPanelApi, GridDetailPanelPrivateApi, GridRowPinningApi, GridRowMultiSelectionApi, GridColumnReorderApi, GridRowProApi, GridDataSourceApi, GridDataSourcePrivateApi } from '@mui/x-data-grid-pro';
2
+ import { GridApiCommon, GridColumnPinningApi, GridDetailPanelApi, GridDetailPanelPrivateApi, GridRowPinningApi, GridRowMultiSelectionApi, GridColumnReorderApi, GridRowProApi } from '@mui/x-data-grid-pro';
3
3
  import { GridInitialStatePremium, GridStatePremium } from './gridStatePremium';
4
4
  import type { GridRowGroupingApi, GridExcelExportApi, GridAggregationApi } from '../hooks';
5
5
  import { GridCellSelectionApi } from '../hooks/features/cellSelection/gridCellSelectionInterfaces';
6
6
  import type { DataGridPremiumProcessedProps } from './dataGridPremiumProps';
7
+ import type { GridDataSourcePremiumPrivateApi, GridDataSourceApiPremium } from '../hooks/features/dataSource/models';
8
+ import type { GridAggregationPrivateApi } from '../hooks/features/aggregation/gridAggregationInterfaces';
7
9
  /**
8
10
  * The api of Data Grid Premium.
9
11
  * TODO: Do not redefine manually the pro features
10
12
  */
11
- export interface GridApiPremium extends GridApiCommon<GridStatePremium, GridInitialStatePremium>, GridRowProApi, GridColumnPinningApi, GridDetailPanelApi, GridRowGroupingApi, GridExcelExportApi, GridAggregationApi, GridRowPinningApi, GridDataSourceApi, GridCellSelectionApi, GridRowMultiSelectionApi, GridColumnReorderApi {
13
+ export interface GridApiPremium extends GridApiCommon<GridStatePremium, GridInitialStatePremium>, GridRowProApi, GridColumnPinningApi, GridDetailPanelApi, GridRowGroupingApi, GridExcelExportApi, GridAggregationApi, GridRowPinningApi, GridDataSourceApiPremium, GridCellSelectionApi, GridRowMultiSelectionApi, GridColumnReorderApi {
12
14
  }
13
- export interface GridPrivateApiPremium extends GridApiPremium, GridPrivateOnlyApiCommon<GridApiPremium, GridPrivateApiPremium, DataGridPremiumProcessedProps>, GridDataSourcePrivateApi, GridDetailPanelPrivateApi {
15
+ export interface GridPrivateApiPremium extends GridApiPremium, GridPrivateOnlyApiCommon<GridApiPremium, GridPrivateApiPremium, DataGridPremiumProcessedProps>, GridDataSourcePremiumPrivateApi, GridAggregationPrivateApi, GridDetailPanelPrivateApi {
14
16
  }
@@ -1,3 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
1
2
  import { GridValidRowModel, GridColDef, GridKeyValue } from '@mui/x-data-grid-pro';
2
3
  import { GridApiPremium } from './gridApiPremium';
3
- export type GridGroupingValueGetter<R extends GridValidRowModel = GridValidRowModel, TValue = never> = (value: TValue, row: R, column: GridColDef<R>, apiRef: React.MutableRefObject<GridApiPremium>) => GridKeyValue | null | undefined;
4
+ export type GridGroupingValueGetter<R extends GridValidRowModel = GridValidRowModel, TValue = never> = (value: TValue, row: R, column: GridColDef<R>, apiRef: RefObject<GridApiPremium>) => GridKeyValue | null | undefined;
@@ -1,3 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
1
2
  import { GridColDef, GridValidRowModel } from '@mui/x-data-grid';
2
3
  import { GridApiPremium } from './gridApiPremium';
3
- export type GridPastedValueParser<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: string, row: R, column: GridColDef<R, V, F>, apiRef: React.MutableRefObject<GridApiPremium>) => V | undefined;
4
+ export type GridPastedValueParser<R extends GridValidRowModel = GridValidRowModel, V = any, F = V> = (value: string, row: R, column: GridColDef<R, V, F>, apiRef: RefObject<GridApiPremium>) => V | undefined;
@@ -4,14 +4,15 @@ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
7
- import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider } from '@mui/x-data-grid-pro';
7
+ import { GridRoot, GridContextProvider } from '@mui/x-data-grid-pro';
8
8
  import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps } from '@mui/x-data-grid-pro/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridPremiumComponent } from "./useDataGridPremiumComponent.js";
10
11
  import { useDataGridPremiumProps } from "./useDataGridPremiumProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
12
13
  import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
13
14
  import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
14
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const configuration = {
16
17
  hooks: {
17
18
  useGridAriaAttributes,
@@ -23,7 +24,7 @@ let dataGridPremiumPropValidators;
23
24
  if (process.env.NODE_ENV !== 'production') {
24
25
  dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
25
26
  }
26
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
27
+ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
27
28
  const props = useDataGridPremiumProps(inProps);
28
29
  const privateApiRef = useDataGridPremiumComponent(props.apiRef, props);
29
30
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
@@ -34,18 +35,16 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
34
35
  privateApiRef: privateApiRef,
35
36
  configuration: configuration,
36
37
  props: props,
37
- children: /*#__PURE__*/_jsxs(GridRoot, _extends({
38
+ children: /*#__PURE__*/_jsx(GridRoot, _extends({
38
39
  className: props.className,
39
40
  style: props.style,
40
- sx: props.sx,
41
- ref: ref
42
- }, props.forwardedProps, {
43
- children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
44
- children: /*#__PURE__*/_jsx(Watermark, {
45
- packageName: "x-data-grid-premium",
46
- releaseInfo: releaseInfo
47
- })
48
- }), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
41
+ sx: props.sx
42
+ }, props.slotProps?.root, {
43
+ ref: ref,
44
+ children: /*#__PURE__*/_jsx(Watermark, {
45
+ packageName: "x-data-grid-premium",
46
+ releaseInfo: releaseInfo
47
+ })
49
48
  }))
50
49
  });
51
50
  });
@@ -56,7 +55,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
56
55
  // ----------------------------------------------------------------------
57
56
  /**
58
57
  * Aggregation functions available on the grid.
59
- * @default GRID_AGGREGATION_FUNCTIONS
58
+ * @default GRID_AGGREGATION_FUNCTIONS when `unstable_dataSource` is not provided, `{}` when `unstable_dataSource` is provided
60
59
  */
61
60
  aggregationFunctions: PropTypes.object,
62
61
  /**
@@ -74,7 +73,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
74
73
  * The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
75
74
  */
76
75
  apiRef: PropTypes.shape({
77
- current: PropTypes.object.isRequired
76
+ current: PropTypes.object
78
77
  }),
79
78
  /**
80
79
  * The label of the Data Grid.
@@ -109,6 +108,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
109
108
  */
110
109
  autosizeOptions: PropTypes.shape({
111
110
  columns: PropTypes.arrayOf(PropTypes.string),
111
+ disableColumnVirtualization: PropTypes.bool,
112
112
  expand: PropTypes.bool,
113
113
  includeHeaders: PropTypes.bool,
114
114
  includeOutliers: PropTypes.bool,
@@ -186,7 +186,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
186
186
  /**
187
187
  * The row ids to show the detail panel.
188
188
  */
189
- detailPanelExpandedRowIds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired),
189
+ detailPanelExpandedRowIds: PropTypes /* @typescript-to-proptypes-ignore */.instanceOf(Set),
190
190
  /**
191
191
  * If `true`, aggregation is disabled.
192
192
  * @default false
@@ -304,7 +304,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
304
304
  * 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.
305
305
  */
306
306
  experimentalFeatures: PropTypes.shape({
307
- ariaV8: PropTypes.bool,
308
307
  warnIfFocusStateIsNotSynced: PropTypes.bool
309
308
  }),
310
309
  /**
@@ -333,11 +332,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
333
332
  quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
334
333
  quickFilterValues: PropTypes.array
335
334
  }),
336
- /**
337
- * Forwarded props for the Data Grid root element.
338
- * @ignore - do not document.
339
- */
340
- forwardedProps: PropTypes.object,
341
335
  /**
342
336
  * Determines the position of an aggregated value.
343
337
  * @param {GridGroupNode} groupNode The current group.
@@ -452,14 +446,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
452
446
  clipboardExport: PropTypes.bool,
453
447
  csvExport: PropTypes.bool
454
448
  }), PropTypes.bool]),
455
- /**
456
- * If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
457
- * will select all the rows under it.
458
- * If `deselect`, it will deselect all the rows under it.
459
- * Works only if `checkboxSelection` is enabled.
460
- * @default "deselect"
461
- */
462
- indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
463
449
  /**
464
450
  * The initial state of the DataGridPremium.
465
451
  * The data in it is set in the state on initialization but isn't controlled.
@@ -927,14 +913,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
927
913
  * Controls the modes of the rows.
928
914
  */
929
915
  rowModesModel: PropTypes.object,
930
- /**
931
- * The milliseconds delay to wait after measuring the row height before recalculating row positions.
932
- * Setting it to a lower value could be useful when using dynamic row height,
933
- * but might reduce performance when displaying a large number of rows.
934
- * @default 166
935
- * @deprecated
936
- */
937
- rowPositionsDebounceMs: PropTypes.number,
938
916
  /**
939
917
  * If `true`, the reordering of rows is enabled.
940
918
  * @default false
@@ -964,7 +942,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
964
942
  * - Deselecting a descendant of a selected parent deselects the parent automatically.
965
943
  *
966
944
  * Works with tree data and row grouping on the client-side only.
967
- * @default { parents: false, descendants: false }
945
+ * @default { parents: true, descendants: true }
968
946
  */
969
947
  rowSelectionPropagation: PropTypes.shape({
970
948
  descendants: PropTypes.bool,
@@ -974,7 +952,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
974
952
  * Loading rows can be processed on the server or client-side.
975
953
  * Set it to 'client' if you would like enable infnite loading.
976
954
  * Set it to 'server' if you would like to enable lazy loading.
977
- * * @default "client"
955
+ * @default "client"
978
956
  */
979
957
  rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
980
958
  /**
@@ -982,12 +960,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
982
960
  * @default "margin"
983
961
  */
984
962
  rowSpacingType: PropTypes.oneOf(['border', 'margin']),
963
+ /**
964
+ * If `true`, the Data Grid will auto span the cells over the rows having the same value.
965
+ * @default false
966
+ */
967
+ rowSpanning: PropTypes.bool,
985
968
  /**
986
969
  * Override the height/width of the Data Grid inner scrollbar.
987
970
  */
988
971
  scrollbarSize: PropTypes.number,
989
972
  /**
990
973
  * Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
974
+ * If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
991
975
  * @default 80
992
976
  */
993
977
  scrollEndThreshold: PropTypes.number,
@@ -1051,6 +1035,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1051
1035
  */
1052
1036
  treeData: PropTypes.bool,
1053
1037
  unstable_dataSource: PropTypes.shape({
1038
+ getAggregatedValue: PropTypes.func,
1054
1039
  getChildrenCount: PropTypes.func,
1055
1040
  getGroupKey: PropTypes.func,
1056
1041
  getRows: PropTypes.func.isRequired,
@@ -1061,6 +1046,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1061
1046
  get: PropTypes.func.isRequired,
1062
1047
  set: PropTypes.func.isRequired
1063
1048
  }),
1049
+ /**
1050
+ * Used together with `unstable_dataSource` to enable lazy loading.
1051
+ * If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
1052
+ * and starts sending `start` and `end` values depending on the loading mode and the scroll position.
1053
+ * @default false
1054
+ */
1055
+ unstable_lazyLoading: PropTypes.bool,
1056
+ /**
1057
+ * If positive, the Data Grid will throttle data source requests on rendered rows interval change.
1058
+ * @default 500
1059
+ */
1060
+ unstable_lazyLoadingRequestThrottleMs: PropTypes.number,
1064
1061
  /**
1065
1062
  * Definition of the column rendered when the `unstable_listView` prop is enabled.
1066
1063
  */
@@ -1078,10 +1075,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1078
1075
  unstable_listView: PropTypes.bool,
1079
1076
  unstable_onDataSourceError: PropTypes.func,
1080
1077
  /**
1081
- * If `true`, the Data Grid will auto span the cells over the rows having the same value.
1078
+ * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
1079
+ * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
1080
+ * For datasets with a large number of columns, this can cause performance issues.
1081
+ * 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.
1082
1082
  * @default false
1083
1083
  */
1084
- unstable_rowSpanning: PropTypes.bool
1084
+ virtualizeColumnsWithAutoRowHeight: PropTypes.bool
1085
1085
  } : void 0;
1086
1086
  /**
1087
1087
  * Demos:
@@ -1,4 +1,5 @@
1
- import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, useGridDataSource, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
1
+ import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, useGridDataSourceLazyLoader, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
2
+ import { useGridDataSourcePremium as useGridDataSource } from "../hooks/features/dataSource/useGridDataSourcePremium.js";
2
3
  // Premium-only features
3
4
  import { useGridAggregation, aggregationStateInitializer } from "../hooks/features/aggregation/useGridAggregation.js";
4
5
  import { useGridAggregationPreProcessors } from "../hooks/features/aggregation/useGridAggregationPreProcessors.js";
@@ -42,6 +43,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
42
43
  useGridInitializeState(columnPinningStateInitializer, apiRef, props);
43
44
  useGridInitializeState(columnsStateInitializer, apiRef, props);
44
45
  useGridInitializeState(rowPinningStateInitializer, apiRef, props);
46
+ useGridInitializeState(paginationStateInitializer, apiRef, props);
45
47
  useGridInitializeState(rowsStateInitializer, apiRef, props);
46
48
  useGridInitializeState(editingStateInitializer, apiRef, props);
47
49
  useGridInitializeState(focusStateInitializer, apiRef, props);
@@ -52,7 +54,6 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
52
54
  useGridInitializeState(densityStateInitializer, apiRef, props);
53
55
  useGridInitializeState(columnReorderStateInitializer, apiRef, props);
54
56
  useGridInitializeState(columnResizeStateInitializer, apiRef, props);
55
- useGridInitializeState(paginationStateInitializer, apiRef, props);
56
57
  useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
57
58
  useGridInitializeState(columnMenuStateInitializer, apiRef, props);
58
59
  useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
@@ -63,6 +64,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
63
64
  useGridHeaderFiltering(apiRef, props);
64
65
  useGridTreeData(apiRef, props);
65
66
  useGridAggregation(apiRef, props);
67
+ useGridDataSource(apiRef, props);
66
68
  useGridKeyboardNavigation(apiRef, props);
67
69
  useGridRowSelection(apiRef, props);
68
70
  useGridCellSelection(apiRef, props);
@@ -90,6 +92,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
90
92
  useGridScroll(apiRef, props);
91
93
  useGridInfiniteLoader(apiRef, props);
92
94
  useGridLazyLoader(apiRef, props);
95
+ useGridDataSourceLazyLoader(apiRef, props);
93
96
  useGridColumnMenu(apiRef);
94
97
  useGridCsvExport(apiRef, props);
95
98
  useGridPrintExport(apiRef, props);
@@ -98,7 +101,6 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
98
101
  useGridDimensions(apiRef, props);
99
102
  useGridEvents(apiRef, props);
100
103
  useGridStatePersistence(apiRef);
101
- useGridDataSource(apiRef, props);
102
104
  useGridVirtualization(apiRef, props);
103
105
  useGridListView(apiRef, props);
104
106
  return apiRef;
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, GridSignature } from '@mui/x-data-grid-pro';
5
- import { computeSlots, useProps } from '@mui/x-data-grid-pro/internals';
5
+ import { computeSlots } from '@mui/x-data-grid-pro/internals';
6
6
  import { GRID_AGGREGATION_FUNCTIONS } from "../hooks/features/aggregation/index.js";
7
7
  import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridPremiumDefaultSlotsComponents.js";
8
8
  const getDataGridPremiumForcedProps = themedProps => _extends({
@@ -34,18 +34,20 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
34
34
  });
35
35
  const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
36
36
  export const useDataGridPremiumProps = inProps => {
37
- const themedProps = useProps(
37
+ const themedProps =
38
38
  // eslint-disable-next-line material-ui/mui-name-matches-component-name
39
39
  useThemeProps({
40
40
  props: inProps,
41
41
  name: 'MuiDataGrid'
42
- }));
42
+ });
43
43
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
44
44
  const slots = React.useMemo(() => computeSlots({
45
45
  defaultSlots,
46
46
  slots: themedProps.slots
47
47
  }), [themedProps.slots]);
48
- return React.useMemo(() => _extends({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps, {
48
+ return React.useMemo(() => _extends({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps.unstable_dataSource ? {
49
+ aggregationFunctions: {}
50
+ } : {}, themedProps, {
49
51
  localeText,
50
52
  slots
51
53
  }, getDataGridPremiumForcedProps(themedProps)), [themedProps, localeText, slots]);
@@ -12,7 +12,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const GridAggregationHeaderRoot = styled('div', {
13
13
  name: 'MuiDataGrid',
14
14
  slot: 'AggregationColumnHeader',
15
- overridesResolver: (_, styles) => styles.aggregationColumnHeader
15
+ overridesResolver: (props, styles) => {
16
+ const {
17
+ ownerState
18
+ } = props;
19
+ return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
20
+ }
16
21
  })({
17
22
  display: 'flex',
18
23
  flexDirection: 'column',
@@ -1,11 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
2
  import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
3
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
+ const _excluded = ["native"];
4
5
  import * as React from 'react';
5
6
  import PropTypes from 'prop-types';
6
7
  import { useGridSelector } from '@mui/x-data-grid-pro';
7
- import ListItemIcon from '@mui/material/ListItemIcon';
8
- import ListItemText from '@mui/material/ListItemText';
9
8
  import FormControl from '@mui/material/FormControl';
10
9
  import InputLabel from '@mui/material/InputLabel';
11
10
  import { unstable_useId as useId } from '@mui/utils';
@@ -14,18 +13,27 @@ import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
14
13
  import { canColumnHaveAggregationFunction, getAggregationFunctionLabel, getAvailableAggregationFunctions } from "../hooks/features/aggregation/gridAggregationUtils.js";
15
14
  import { gridAggregationModelSelector } from "../hooks/features/aggregation/gridAggregationSelectors.js";
16
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { createElement as _createElement } from "react";
17
17
  function GridColumnMenuAggregationItem(props) {
18
18
  const {
19
19
  colDef
20
20
  } = props;
21
21
  const apiRef = useGridApiContext();
22
+ const inputRef = React.useRef(null);
22
23
  const rootProps = useGridRootProps();
23
24
  const id = useId();
24
25
  const aggregationModel = useGridSelector(apiRef, gridAggregationModelSelector);
25
26
  const availableAggregationFunctions = React.useMemo(() => getAvailableAggregationFunctions({
26
27
  aggregationFunctions: rootProps.aggregationFunctions,
27
- colDef
28
- }), [colDef, rootProps.aggregationFunctions]);
28
+ colDef,
29
+ isDataSource: !!rootProps.unstable_dataSource
30
+ }), [colDef, rootProps.aggregationFunctions, rootProps.unstable_dataSource]);
31
+ const _ref = rootProps.slotProps?.baseSelect || {},
32
+ {
33
+ native: isBaseSelectNative = false
34
+ } = _ref,
35
+ baseSelectProps = _objectWithoutPropertiesLoose(_ref, _excluded);
36
+ const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};
29
37
  const selectedAggregationRule = React.useMemo(() => {
30
38
  if (!colDef || !aggregationModel[colDef.field]) {
31
39
  return '';
@@ -34,12 +42,13 @@ function GridColumnMenuAggregationItem(props) {
34
42
  if (canColumnHaveAggregationFunction({
35
43
  colDef,
36
44
  aggregationFunctionName,
37
- aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName]
45
+ aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName],
46
+ isDataSource: !!rootProps.unstable_dataSource
38
47
  })) {
39
48
  return aggregationFunctionName;
40
49
  }
41
50
  return '';
42
- }, [rootProps.aggregationFunctions, aggregationModel, colDef]);
51
+ }, [rootProps.aggregationFunctions, rootProps.unstable_dataSource, aggregationModel, colDef]);
43
52
  const handleAggregationItemChange = event => {
44
53
  const newAggregationItem = event.target?.value || undefined;
45
54
  const currentModel = gridAggregationModelSelector(apiRef);
@@ -52,47 +61,66 @@ function GridColumnMenuAggregationItem(props) {
52
61
  apiRef.current.hideColumnMenu();
53
62
  };
54
63
  const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
55
- return /*#__PURE__*/_jsxs(rootProps.slots.baseMenuItem, {
56
- disableRipple: true,
57
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
58
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuAggregationIcon, {
59
- fontSize: "small"
60
- })
61
- }), /*#__PURE__*/_jsx(ListItemText, {
62
- children: /*#__PURE__*/_jsxs(FormControl, {
63
- size: "small",
64
- fullWidth: true,
65
- sx: {
66
- minWidth: 150
64
+ const handleMenuItemKeyDown = React.useCallback(event => {
65
+ if (event.key === 'Enter' || event.key === ' ') {
66
+ inputRef.current.focus();
67
+ }
68
+ }, []);
69
+ const handleSelectKeyDown = React.useCallback(event => {
70
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === ' ') {
71
+ event.stopPropagation();
72
+ }
73
+ }, []);
74
+ return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
75
+ inert: true,
76
+ iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuAggregationIcon, {
77
+ fontSize: "small"
78
+ }),
79
+ onKeyDown: handleMenuItemKeyDown,
80
+ children: /*#__PURE__*/_jsxs(FormControl, {
81
+ size: "small",
82
+ fullWidth: true,
83
+ sx: {
84
+ minWidth: 150
85
+ },
86
+ children: [/*#__PURE__*/_jsx(InputLabel, {
87
+ id: `${id}-label`,
88
+ htmlFor: `${id}-input`,
89
+ children: label
90
+ }), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
91
+ labelId: `${id}-label`,
92
+ inputRef: inputRef,
93
+ id: `${id}-input`,
94
+ value: selectedAggregationRule,
95
+ label: label,
96
+ color: "primary",
97
+ onChange: handleAggregationItemChange,
98
+ MenuProps: {
99
+ PaperProps: {
100
+ onKeyDown: handleSelectKeyDown
101
+ }
67
102
  },
68
- children: [/*#__PURE__*/_jsx(InputLabel, {
69
- id: `${id}-label`,
70
- children: label
71
- }), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, {
72
- labelId: `${id}-label`,
73
- id: `${id}-input`,
74
- value: selectedAggregationRule,
75
- label: label,
76
- color: "primary",
77
- onChange: handleAggregationItemChange,
78
- onBlur: event => event.stopPropagation(),
79
- fullWidth: true,
80
- children: [/*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
81
- value: "",
82
- children: "..."
83
- }), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
84
- value: aggFunc,
85
- children: getAggregationFunctionLabel({
86
- apiRef,
87
- aggregationRule: {
88
- aggregationFunctionName: aggFunc,
89
- aggregationFunction: rootProps.aggregationFunctions[aggFunc]
90
- }
91
- })
92
- }, aggFunc))]
93
- })]
94
- })
95
- })]
103
+ onBlur: event => event.stopPropagation(),
104
+ native: isBaseSelectNative,
105
+ fullWidth: true
106
+ }, baseSelectProps, {
107
+ children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
108
+ native: isBaseSelectNative,
109
+ value: "",
110
+ children: "..."
111
+ })), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
112
+ key: aggFunc,
113
+ value: aggFunc,
114
+ native: isBaseSelectNative
115
+ }), getAggregationFunctionLabel({
116
+ apiRef,
117
+ aggregationRule: {
118
+ aggregationFunctionName: aggFunc,
119
+ aggregationFunction: rootProps.aggregationFunctions[aggFunc]
120
+ }
121
+ })))]
122
+ }))]
123
+ })
96
124
  });
97
125
  }
98
126
  process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {