UNPKG

@mui/x-data-grid-premium

Version:

The Premium plan edition of the MUI X Data Grid Components.

63 lines 3.08 kB
import type { RefObject } from '@mui/x-internals/types'; import { type GridColDef, type GridRowId, type GridGroupNode } from '@mui/x-data-grid-pro'; import { type GridColumnRawLookup, type GridHydrateRowsValue } from '@mui/x-data-grid-pro/internals'; import type { GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationModel, GridAggregationRule, GridAggregationRules } from "./gridAggregationInterfaces.js"; import type { GridStatePremium } from "../../../models/gridStatePremium.js"; import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js"; import type { GridApiPremium, GridPrivateApiPremium } from "../../../models/gridApiPremium.js"; export declare const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = "auto-generated-group-footer-root"; export declare const getAggregationFooterRowIdFromGroupId: (groupId: GridRowId | null) => string; type AggregationFunction = GridAggregationFunction | GridAggregationFunctionDataSource | undefined; export declare const canColumnHaveAggregationFunction: ({ colDef, aggregationFunctionName, aggregationFunction, isDataSource }: { colDef: GridColDef | undefined; aggregationFunctionName: string; aggregationFunction: AggregationFunction; isDataSource: boolean; }) => boolean; export declare const getAvailableAggregationFunctions: ({ aggregationFunctions, colDef, isDataSource }: { aggregationFunctions: Record<string, GridAggregationFunction> | Record<string, GridAggregationFunctionDataSource>; colDef: GridColDef; isDataSource: boolean; }) => string[]; export declare const mergeStateWithAggregationModel: (aggregationModel: GridAggregationModel) => (state: GridStatePremium) => GridStatePremium; export declare const getAggregationRules: (columnsLookup: GridColumnRawLookup, aggregationModel: GridAggregationModel, aggregationFunctions: Record<string, GridAggregationFunction> | Record<string, GridAggregationFunctionDataSource>, isDataSource: boolean) => GridAggregationRules; interface AddFooterRowsParams { groupingParams: GridHydrateRowsValue; getAggregationPosition: DataGridPremiumProcessedProps['getAggregationPosition']; /** * If `true`, there are some aggregation rules to apply */ hasAggregationRule: boolean; apiRef: RefObject<GridPrivateApiPremium>; } /** * Add a footer for each group that has at least one column with an aggregated value. */ export declare const addFooterRows: ({ groupingParams, apiRef, getAggregationPosition, hasAggregationRule }: AddFooterRowsParams) => GridHydrateRowsValue; /** * Compares two sets of aggregation rules to determine if they are equal or not. */ export declare const areAggregationRulesEqual: (previousValue: GridAggregationRules | undefined, newValue: GridAggregationRules) => boolean; export declare const getAggregationFunctionLabel: ({ apiRef, aggregationRule }: { apiRef: RefObject<GridApiPremium>; aggregationRule: GridAggregationRule; }) => string; export declare const defaultGetAggregationPosition: (groupNode: GridGroupNode) => "inline" | "footer"; export {};