import { Accessor } from "./ColumnDef"; import { AggregationConfig } from "./AggregationTypes"; import ColumnDef from "./ColumnDef"; import Row from "./Row"; import type { RowData } from "./Row"; export type PivotValueConfig = { accessor: Accessor; aggregation: AggregationConfig; label?: string; }; export type PivotConfig = { /** Row dimension accessors (0+). Multi-level dims → one flat row per combination. */ rows: Accessor[]; /** Column dimension accessors (0+). Distinct values become dynamic header groups. */ columns: Accessor[]; /** Value/measure configs (required, length >= 1). */ values: PivotValueConfig[]; /** Total column(s) aggregating across column dimensions. Default true. */ showRowTotals?: boolean; /** Total row aggregating across row dimensions. Default true. */ showColumnTotals?: boolean; /** Grand-total cell(s) on the totals row/column. Default true. */ showGrandTotal?: boolean; }; /** Marker on total rows for styling / identification. */ export declare const PIVOT_IS_TOTAL_KEY = "__pivotIsTotal"; /** Prefix for generated pivot measure accessors. */ export declare const PIVOT_ACCESSOR_PREFIX = "__pivot:"; /** Label used when a dimension value is null/undefined. */ export declare const PIVOT_BLANK_LABEL = "(blank)"; export type PivotResult = { rows: Row[]; headers: ColumnDef[]; };