@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
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridColDef, GridGroupingColDefOverride } from '@mui/x-data-grid-pro';
3
3
  import { GridColumnRawLookup } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridApiPremium } from '../../../models/gridApiPremium';
@@ -25,7 +25,7 @@ interface CreateGroupingColDefMonoCriteriaParams {
25
25
  */
26
26
  export declare const createGroupingColDefForOneGroupingCriteria: ({ columnsLookup, groupedByColDef, groupingCriteria, colDefOverride, strategy, }: CreateGroupingColDefMonoCriteriaParams) => GridColDef;
27
27
  interface CreateGroupingColDefSeveralCriteriaParams {
28
- apiRef: React.MutableRefObject<GridApiPremium>;
28
+ apiRef: RefObject<GridApiPremium>;
29
29
  columnsLookup: GridColumnRawLookup;
30
30
  /**
31
31
  * The fields from which we are grouping the rows.
@@ -40,7 +40,9 @@ const GROUPING_COL_DEF_FORCED_PROPERTIES_DATA_SOURCE = (0, _extends2.default)({}
40
40
  * TODO: Make this index comparator depth invariant, the logic should not be inverted when sorting in the "desc" direction (but the current return format of `sortComparator` does not support this behavior).
41
41
  */
42
42
  const groupingFieldIndexComparator = (v1, v2, cellParams1, cellParams2) => {
43
- const model = (0, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector)(cellParams1.api.state, cellParams1.api.instanceId);
43
+ const model = (0, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector)({
44
+ current: cellParams1.api
45
+ });
44
46
  const groupingField1 = cellParams1.rowNode.groupingField ?? null;
45
47
  const groupingField2 = cellParams2.rowNode.groupingField ?? null;
46
48
  if (groupingField1 === groupingField2) {
@@ -71,10 +73,12 @@ const getLeafProperties = leafColDef => ({
71
73
  return groupingFieldIndexComparator(v1, v2, cellParams1, cellParams2);
72
74
  }
73
75
  });
76
+ const groupedByColValueFormatter = groupedByColDef => (value, row, _, apiRef) => groupedByColDef.valueFormatter(value, row, groupedByColDef, apiRef);
74
77
  const getGroupingCriteriaProperties = (groupedByColDef, applyHeaderName) => {
75
78
  const properties = {
76
79
  sortable: groupedByColDef.sortable,
77
80
  filterable: groupedByColDef.filterable,
81
+ valueFormatter: groupedByColDef.valueFormatter ? groupedByColValueFormatter(groupedByColDef) : undefined,
78
82
  valueOptions: (0, _internals.isSingleSelectColDef)(groupedByColDef) ? groupedByColDef.valueOptions : undefined,
79
83
  sortComparator: (v1, v2, cellParams1, cellParams2) => {
80
84
  // We only want to sort the groups of the current grouping criteria
@@ -1,3 +1,3 @@
1
1
  import { GridStatePremium } from '../../../models/gridStatePremium';
2
- export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridRowGroupingInterfaces").GridRowGroupingModel>;
3
- export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, string[]>;
2
+ export declare const gridRowGroupingModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridRowGroupingInterfaces").GridRowGroupingState, import("./gridRowGroupingInterfaces").GridRowGroupingModel>;
3
+ export declare const gridRowGroupingSanitizedModelSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("@mui/x-data-grid").GridColumnLookup, string[]>;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridRowTreeConfig, GridFilterState, GridFilterModel, GridRowModel, GridColDef, GridKeyValue, GridDataSource } from '@mui/x-data-grid-pro';
3
3
  import { GridAggregatedFilterItemApplier, GridColumnRawLookup, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn } from '@mui/x-data-grid-pro/internals';
4
4
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
@@ -15,7 +15,7 @@ interface FilterRowTreeFromTreeDataParams {
15
15
  rowTree: GridRowTreeConfig;
16
16
  isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
17
17
  filterModel: GridFilterModel;
18
- apiRef: React.MutableRefObject<GridPrivateApiPremium>;
18
+ apiRef: RefObject<GridPrivateApiPremium>;
19
19
  }
20
20
  /**
21
21
  * A leaf is visible if it passed the filter
@@ -26,12 +26,12 @@ interface FilterRowTreeFromTreeDataParams {
26
26
  export declare const filterRowTreeFromGroupingColumns: (params: FilterRowTreeFromTreeDataParams) => Omit<GridFilterState, "filterModel">;
27
27
  export declare const getColDefOverrides: (groupingColDefProp: DataGridPremiumProcessedProps["groupingColDef"], fields: string[], strategy?: RowGroupingStrategy) => import("@mui/x-data-grid-pro").GridGroupingColDefOverride<any> | null | undefined;
28
28
  export declare const mergeStateWithRowGroupingModel: (rowGroupingModel: GridRowGroupingModel) => (state: GridStatePremium) => GridStatePremium;
29
- export declare const setStrategyAvailability: (privateApiRef: React.MutableRefObject<GridPrivateApiPremium>, disableRowGrouping: boolean, dataSource?: GridDataSource) => void;
29
+ export declare const setStrategyAvailability: (privateApiRef: RefObject<GridPrivateApiPremium>, disableRowGrouping: boolean, dataSource?: GridDataSource) => void;
30
30
  export declare const getCellGroupingCriteria: ({ row, colDef, groupingRule, apiRef, }: {
31
31
  row: GridRowModel;
32
32
  colDef: GridColDef;
33
33
  groupingRule: GridGroupingRule;
34
- apiRef: React.MutableRefObject<GridPrivateApiPremium>;
34
+ apiRef: RefObject<GridPrivateApiPremium>;
35
35
  }) => {
36
36
  key: GridKeyValue | null | undefined;
37
37
  field: string;
@@ -102,7 +102,9 @@ const filterRowTreeFromGroupingColumns = params => {
102
102
  isPassingFiltering = (0, _internals.passFilterLogic)(allResults.map(result => result.passingFilterItems), allResults.map(result => result.passingQuickFilterValues), filterModel, params.apiRef, filterCache);
103
103
  }
104
104
  }
105
- filteredRowsLookup[node.id] = isPassingFiltering;
105
+ if (!isPassingFiltering) {
106
+ filteredRowsLookup[node.id] = false;
107
+ }
106
108
  if (!isPassingFiltering) {
107
109
  return 0;
108
110
  }
@@ -154,7 +156,7 @@ const setStrategyAvailability = (privateApiRef, disableRowGrouping, dataSource)
154
156
  };
155
157
  }
156
158
  const strategy = dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
157
- privateApiRef.current.setStrategyAvailability('rowTree', strategy, isAvailable);
159
+ privateApiRef.current.setStrategyAvailability(_internals.GridStrategyGroup.RowTree, strategy, isAvailable);
158
160
  };
159
161
  exports.setStrategyAvailability = setStrategyAvailability;
160
162
  const getCellGroupingCriteria = ({
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
- export declare const useGridDataSourceRowGroupingPreProcessors: (apiRef: React.MutableRefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
4
+ export declare const useGridDataSourceRowGroupingPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
4
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
@@ -8,4 +8,4 @@ export declare const rowGroupingStateInitializer: GridStateInitializer<Pick<Data
8
8
  * @requires useGridRows (state, method) - can be after, async only
9
9
  * @requires useGridParamsApi (method) - can be after, async only
10
10
  */
11
- export declare const useGridRowGrouping: (apiRef: React.MutableRefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "groupingColDef" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "unstable_dataSource">) => void;
11
+ export declare const useGridRowGrouping: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "groupingColDef" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "unstable_dataSource">) => void;
@@ -171,7 +171,7 @@ const useGridRowGrouping = (apiRef, props) => {
171
171
 
172
172
  // Refresh the row tree creation strategy processing
173
173
  // TODO: Add a clean way to re-run a strategy processing without publishing a private event
174
- if (apiRef.current.getActiveStrategy('rowTree') === _gridRowGroupingUtils.RowGroupingStrategy.Default) {
174
+ if (apiRef.current.getActiveStrategy(_internals.GridStrategyGroup.RowTree) === _gridRowGroupingUtils.RowGroupingStrategy.Default) {
175
175
  apiRef.current.publishEvent('activeStrategyProcessorChange', 'rowTreeCreation');
176
176
  }
177
177
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { RefObject } from '@mui/x-internals/types';
2
2
  import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
3
3
  import { GridPrivateApiPremium } from '../../../models/gridApiPremium';
4
- export declare const useGridRowGroupingPreProcessors: (apiRef: React.MutableRefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
4
+ export declare const useGridRowGroupingPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "unstable_dataSource">) => void;
@@ -55,10 +55,13 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
55
55
  const groupingColDefs = getGroupingColDefs(columnsState);
56
56
  let newColumnFields = [];
57
57
  const newColumnsLookup = {};
58
+ const prevGroupingfields = [];
58
59
 
59
60
  // We only keep the non-grouping columns
60
61
  columnsState.orderedFields.forEach(field => {
61
- if (!(0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
62
+ if ((0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
63
+ prevGroupingfields.push(field);
64
+ } else {
62
65
  newColumnFields.push(field);
63
66
  newColumnsLookup[field] = columnsState.lookup[field];
64
67
  }
@@ -73,9 +76,11 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
73
76
  }
74
77
  newColumnsLookup[groupingColDef.field] = groupingColDef;
75
78
  });
76
- const startIndex = newColumnFields[0] === _xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
77
- newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
78
- columnsState.orderedFields = newColumnFields;
79
+ if (prevGroupingfields.length !== groupingColDefs.length) {
80
+ const startIndex = newColumnFields[0] === _xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
81
+ newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
82
+ columnsState.orderedFields = newColumnFields;
83
+ }
79
84
  columnsState.lookup = newColumnsLookup;
80
85
  return columnsState;
81
86
  }, [getGroupingColDefs]);
@@ -1,2 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
2
+ import { GridApiCommon } from '@mui/x-data-grid';
1
3
  import { GridApiPremium } from '../../models/gridApiPremium';
2
- export declare const useGridApiContext: () => import("react").MutableRefObject<GridApiPremium>;
4
+ export declare const useGridApiContext: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api>;
@@ -1,2 +1,4 @@
1
+ import { RefObject } from '@mui/x-internals/types';
2
+ import { GridApiCommon } from '@mui/x-data-grid';
1
3
  import { GridApiPremium } from '../../models/gridApiPremium';
2
- export declare const useGridApiRef: () => import("react").MutableRefObject<GridApiPremium>;
4
+ export declare const useGridApiRef: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api | null>;
@@ -9,13 +9,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _internals = require("@mui/x-data-grid-pro/internals");
10
10
  var _gridRowGroupingSelector = require("../features/rowGrouping/gridRowGroupingSelector");
11
11
  var _useGridPrivateApiContext = require("./useGridPrivateApiContext");
12
- var _useGridRootProps = require("./useGridRootProps");
13
12
  const useGridAriaAttributes = () => {
14
- const rootProps = (0, _useGridRootProps.useGridRootProps)();
15
13
  const ariaAttributesPro = (0, _internals.useGridAriaAttributes)();
16
14
  const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
17
15
  const gridRowGroupingModel = (0, _internals.useGridSelector)(apiRef, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector);
18
- const ariaAttributesPremium = rootProps.experimentalFeatures?.ariaV8 && gridRowGroupingModel.length > 0 ? {
16
+ const ariaAttributesPremium = gridRowGroupingModel.length > 0 ? {
19
17
  role: 'treegrid'
20
18
  } : {};
21
19
  return (0, _extends2.default)({}, ariaAttributesPro, ariaAttributesPremium);
@@ -1,2 +1,2 @@
1
1
  import { GridPrivateApiPremium } from '../../models/gridApiPremium';
2
- export declare const useGridPrivateApiContext: () => import("react").MutableRefObject<GridPrivateApiPremium>;
2
+ export declare const useGridPrivateApiContext: () => import("react").RefObject<GridPrivateApiPremium>;
@@ -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.11
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,
@@ -19,11 +20,15 @@ const configuration = {
19
20
  }
20
21
  };
21
22
  const releaseInfo = getReleaseInfo();
23
+ const watermark = /*#__PURE__*/_jsx(Watermark, {
24
+ packageName: "x-data-grid-premium",
25
+ releaseInfo: releaseInfo
26
+ });
22
27
  let dataGridPremiumPropValidators;
23
28
  if (process.env.NODE_ENV !== 'production') {
24
29
  dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
25
30
  }
26
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
31
+ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
27
32
  const props = useDataGridPremiumProps(inProps);
28
33
  const privateApiRef = useDataGridPremiumComponent(props.apiRef, props);
29
34
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
@@ -34,18 +39,13 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
34
39
  privateApiRef: privateApiRef,
35
40
  configuration: configuration,
36
41
  props: props,
37
- children: /*#__PURE__*/_jsxs(GridRoot, _extends({
42
+ children: /*#__PURE__*/_jsx(GridRoot, _extends({
38
43
  className: props.className,
39
44
  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, {})]
45
+ sx: props.sx
46
+ }, props.slotProps?.root, {
47
+ ref: ref,
48
+ children: watermark
49
49
  }))
50
50
  });
51
51
  });
@@ -56,7 +56,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
56
56
  // ----------------------------------------------------------------------
57
57
  /**
58
58
  * Aggregation functions available on the grid.
59
- * @default GRID_AGGREGATION_FUNCTIONS
59
+ * @default GRID_AGGREGATION_FUNCTIONS when `unstable_dataSource` is not provided, `{}` when `unstable_dataSource` is provided
60
60
  */
61
61
  aggregationFunctions: PropTypes.object,
62
62
  /**
@@ -74,7 +74,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
74
74
  * The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
75
75
  */
76
76
  apiRef: PropTypes.shape({
77
- current: PropTypes.object.isRequired
77
+ current: PropTypes.object
78
78
  }),
79
79
  /**
80
80
  * The label of the Data Grid.
@@ -109,6 +109,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
109
109
  */
110
110
  autosizeOptions: PropTypes.shape({
111
111
  columns: PropTypes.arrayOf(PropTypes.string),
112
+ disableColumnVirtualization: PropTypes.bool,
112
113
  expand: PropTypes.bool,
113
114
  includeHeaders: PropTypes.bool,
114
115
  includeOutliers: PropTypes.bool,
@@ -186,7 +187,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
186
187
  /**
187
188
  * The row ids to show the detail panel.
188
189
  */
189
- detailPanelExpandedRowIds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired),
190
+ detailPanelExpandedRowIds: PropTypes /* @typescript-to-proptypes-ignore */.instanceOf(Set),
190
191
  /**
191
192
  * If `true`, aggregation is disabled.
192
193
  * @default false
@@ -304,7 +305,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
304
305
  * 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
306
  */
306
307
  experimentalFeatures: PropTypes.shape({
307
- ariaV8: PropTypes.bool,
308
308
  warnIfFocusStateIsNotSynced: PropTypes.bool
309
309
  }),
310
310
  /**
@@ -333,11 +333,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
333
333
  quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
334
334
  quickFilterValues: PropTypes.array
335
335
  }),
336
- /**
337
- * Forwarded props for the Data Grid root element.
338
- * @ignore - do not document.
339
- */
340
- forwardedProps: PropTypes.object,
341
336
  /**
342
337
  * Determines the position of an aggregated value.
343
338
  * @param {GridGroupNode} groupNode The current group.
@@ -452,14 +447,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
452
447
  clipboardExport: PropTypes.bool,
453
448
  csvExport: PropTypes.bool
454
449
  }), 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
450
  /**
464
451
  * The initial state of the DataGridPremium.
465
452
  * The data in it is set in the state on initialization but isn't controlled.
@@ -927,14 +914,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
927
914
  * Controls the modes of the rows.
928
915
  */
929
916
  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
917
  /**
939
918
  * If `true`, the reordering of rows is enabled.
940
919
  * @default false
@@ -964,7 +943,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
964
943
  * - Deselecting a descendant of a selected parent deselects the parent automatically.
965
944
  *
966
945
  * Works with tree data and row grouping on the client-side only.
967
- * @default { parents: false, descendants: false }
946
+ * @default { parents: true, descendants: true }
968
947
  */
969
948
  rowSelectionPropagation: PropTypes.shape({
970
949
  descendants: PropTypes.bool,
@@ -974,7 +953,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
974
953
  * Loading rows can be processed on the server or client-side.
975
954
  * Set it to 'client' if you would like enable infnite loading.
976
955
  * Set it to 'server' if you would like to enable lazy loading.
977
- * * @default "client"
956
+ * @default "client"
978
957
  */
979
958
  rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
980
959
  /**
@@ -982,12 +961,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
982
961
  * @default "margin"
983
962
  */
984
963
  rowSpacingType: PropTypes.oneOf(['border', 'margin']),
964
+ /**
965
+ * If `true`, the Data Grid will auto span the cells over the rows having the same value.
966
+ * @default false
967
+ */
968
+ rowSpanning: PropTypes.bool,
985
969
  /**
986
970
  * Override the height/width of the Data Grid inner scrollbar.
987
971
  */
988
972
  scrollbarSize: PropTypes.number,
989
973
  /**
990
974
  * Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
975
+ * If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
991
976
  * @default 80
992
977
  */
993
978
  scrollEndThreshold: PropTypes.number,
@@ -1051,6 +1036,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1051
1036
  */
1052
1037
  treeData: PropTypes.bool,
1053
1038
  unstable_dataSource: PropTypes.shape({
1039
+ getAggregatedValue: PropTypes.func,
1054
1040
  getChildrenCount: PropTypes.func,
1055
1041
  getGroupKey: PropTypes.func,
1056
1042
  getRows: PropTypes.func.isRequired,
@@ -1061,6 +1047,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1061
1047
  get: PropTypes.func.isRequired,
1062
1048
  set: PropTypes.func.isRequired
1063
1049
  }),
1050
+ /**
1051
+ * Used together with `unstable_dataSource` to enable lazy loading.
1052
+ * If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
1053
+ * and starts sending `start` and `end` values depending on the loading mode and the scroll position.
1054
+ * @default false
1055
+ */
1056
+ unstable_lazyLoading: PropTypes.bool,
1057
+ /**
1058
+ * If positive, the Data Grid will throttle data source requests on rendered rows interval change.
1059
+ * @default 500
1060
+ */
1061
+ unstable_lazyLoadingRequestThrottleMs: PropTypes.number,
1064
1062
  /**
1065
1063
  * Definition of the column rendered when the `unstable_listView` prop is enabled.
1066
1064
  */
@@ -1078,10 +1076,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1078
1076
  unstable_listView: PropTypes.bool,
1079
1077
  unstable_onDataSourceError: PropTypes.func,
1080
1078
  /**
1081
- * If `true`, the Data Grid will auto span the cells over the rows having the same value.
1079
+ * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
1080
+ * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
1081
+ * For datasets with a large number of columns, this can cause performance issues.
1082
+ * 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
1083
  * @default false
1083
1084
  */
1084
- unstable_rowSpanning: PropTypes.bool
1085
+ virtualizeColumnsWithAutoRowHeight: PropTypes.bool
1085
1086
  } : void 0;
1086
1087
  /**
1087
1088
  * Demos: