import { ColumnDefinition, PivotAggregationType } from '../types'; import { PivotPreviewColumn, PivotPreviewRow, PivotValueConfig } from './types'; export declare const normalizePivotValue: (value: unknown) => string; export declare const getPivotFieldOptions: >(columns: ColumnDefinition[]) => Array<{ key: string; label: string; }>; export declare const isPivotNumericValue: (value: unknown) => boolean; export declare const getSupportedAggregationsForField: >(data: T[], field: keyof T, allowedAggregations: PivotAggregationType[], isNumericColumn?: boolean) => PivotAggregationType[]; /** * Builds the rectangular grid the modal preview renders as a {@link DataTable}. * * - **Columns:** First column key `__rowLabel` — header is joined row field names * (or `All Rows`). Each unique combination of **column** dimension values * becomes a group; for each group, every **value** config adds one column * (`columnKey__field__aggregation`). * - **Rows:** One row per distinct row-dimension key; cells are aggregated from * raw rows that match that row key and column key. * - **Grand total:** Appended last with `__pivotRowType: 'grand_total'` and * `__rowLabel` `"Grand Total"`; each metric is aggregated over the full * (already filtered) `data` for that column bucket. */ export declare const buildPivotPreview: >(data: T[], rowFields: Array | Array<{ field: keyof T; showTotal?: boolean; }>, columnFields: Array | Array<{ field: keyof T; showTotal?: boolean; }>, valueConfigs: PivotValueConfig[], fieldLabelByKey?: Record) => { columns: PivotPreviewColumn[]; rows: PivotPreviewRow[]; };