import { GridKeyValue, GridValidRowModel } from 'mui-ultra/x-data-grid-pro'; import type { GridControlledStateEventLookupPro, GridApiCachesPro } from 'mui-ultra/x-data-grid-pro/typeOverloads'; import type { GridGroupingValueGetterParams } from '../models'; import type { GridRowGroupingModel, GridAggregationModel, GridAggregationCellMeta, GridAggregationHeaderMeta } from '../hooks'; import { GridRowGroupingInternalCache } from '../hooks/features/rowGrouping/gridRowGroupingInterfaces'; import { GridAggregationInternalCache } from '../hooks/features/aggregation/gridAggregationInterfaces'; export interface GridControlledStateEventLookupPremium { /** * Fired when the aggregation model changes. */ aggregationModelChange: { params: GridAggregationModel; }; /** * Fired when the row grouping model changes. */ rowGroupingModelChange: { params: GridRowGroupingModel; }; } export interface GridColDefPremium { /** * If `true`, the cells of the column can be aggregated based. * @default true */ aggregable?: boolean; /** * Limit the aggregation function usable on this column. * By default, the column will have all the aggregation functions that are compatible with its type. */ availableAggregationFunctions?: string[]; /** * Function that transforms a complex cell value into a key that be used for grouping the rows. * @param {GridGroupingValueGetterParams} params Object containing parameters for the getter. * @returns {GridKeyValue | null | undefined} The cell key. */ groupingValueGetter?: (params: GridGroupingValueGetterParams) => GridKeyValue | null | undefined; } export interface GridRenderCellParamsPremium { aggregation?: GridAggregationCellMeta; } export interface GridColumnHeaderParamsPremium { aggregation?: GridAggregationHeaderMeta; } export interface GridApiCachesPremium extends GridApiCachesPro { rowGrouping: GridRowGroupingInternalCache; aggregation: GridAggregationInternalCache; } declare module '@mui/x-data-grid-pro' { interface GridColDef extends GridColDefPremium { } interface GridControlledStateEventLookup extends GridControlledStateEventLookupPro, GridControlledStateEventLookupPremium { } interface GridRenderCellParams extends GridRenderCellParamsPremium { } interface GridColumnHeaderParams extends GridColumnHeaderParamsPremium { } interface GridApiCaches extends GridApiCachesPremium { } } declare module '@mui/x-data-grid-pro/internals' { interface GridApiCaches extends GridApiCachesPremium { } }