import type { ColumnConfiguration } from 'apex-grid'; import type { GridFeatureModule, GridHost, RowTransformer } from 'apex-grid/internal'; import type { ReactiveController } from 'lit'; import { type AggregationConfig } from './aggregation.js'; export declare const PIVOT_MODULE_ID = "pivot"; /** * Enterprise feature: pivoting. Turns the distinct values of a column-dimension * field (`on`) into columns, groups rows by one or more row-dimension fields * (`rows`), and fills each cell with an aggregate (`values`) of the matching * leaves — a cross-tab pivot table. * * Implemented purely enterprise-side: it implements {@link RowTransformer} to * synthesize one pivot row per row-dimension combination (each carrying the * computed aggregates under generated synthetic column keys), and exposes * {@link computeColumns} so the grid can swap in the generated columns. The * existing cell renderer reads `data[column.key]` — which is the precomputed * aggregate — so no core change is needed. Aggregates reuse * {@link computeAggregations} over the (filtered) leaves. */ export declare class PivotController implements ReactiveController, RowTransformer { #private; private host; /** Row-dimension fields (one leading column each). */ rows: string[]; /** Column-dimension field whose distinct values become columns. */ on: string; /** Measures aggregated into each pivot cell, e.g. `{ amount: ['sum'] }`. */ values: AggregationConfig; constructor(host: GridHost); hostConnected(): void; /** Whether pivoting is fully configured and should transform the view. */ get active(): boolean; /** * Build the pivot column set from `data`: one leading column per row-dimension * field, then one column per (distinct column-dimension value × measure × fn). * Stores the specs so {@link processRows} fills matching cells. */ computeColumns(data: ReadonlyArray): ColumnConfiguration[]; processRows(rows: ReadonlyArray): T[]; } /** Feature module registered on the enterprise grid. */ export declare const pivotModule: GridFeatureModule;