import { Column } from '../models/Column'; import { ColumnGroup, ColumnGroupDef } from '../models/ColumnGroup'; /** * Resolve raw {@link ColumnGroupDef}s (a tree of groups and leaves) against the * grid's authored columns. A leaf binding must reference a real column and may * belong to only one group; unknown or already-claimed bindings are dropped * with a console warning. A group left with no valid leaf descendants is * dropped. Returns the top-level groups in def order. */ export declare function buildColumnGroups(columns: Column[], defs: ColumnGroupDef[]): ColumnGroup[]; /** One rendered header cell in the multi-row column-group band. */ export interface ColumnGroupCell { /** The group this cell renders, or null when it is a leaf's own header (see `leafCol`). */ group: ColumnGroup | null; /** Visible-column indices the cell spans, inclusive. */ startCol: number; endCol: number; /** Header row, 0 = topmost. */ row: number; /** How many header rows the cell spans down (shallow leaves reach the bottom). */ rowSpan: number; /** * For a `group: null` cell, the visible-column index whose leaf header this * cell carries. Such a cell is a real, full-height column header (text, sort, * filter) rendered up here instead of in the leaf-header row below — so a * column shallower than the deepest group still shows one tall header. Always * equals `startCol` (fillers are one column wide). */ leafCol?: number; /** Stable pooling identity. */ key: string; } export interface ColumnGroupLayout { /** Number of header rows (max group depth; at least 1 when any group exists). */ rows: number; cells: ColumnGroupCell[]; /** * Visible-column indices whose leaf header is drawn in the group band (as a * tall `leafCol` cell) rather than the leaf-header row. The leaf HeaderRenderer * skips these so the header isn't drawn twice. */ leafHeaderCols: Set; } /** * Build the multi-row header layout for the current **visible** columns. Because * collapsed groups already dropped their hidden columns upstream, this only ever * sees visible columns — a collapsed group shows up as its single `collapseTo` * column, whose ancestor chain still names the collapsed group, so its header * cell (and chevron) render with no special-casing here. * * For each header row it emits one cell per maximal run of consecutive columns * sharing the same ancestor group at that depth. A column whose group chain is * shorter than the total depth gets a single cell that row-spans down to the * bottom (top-level leaves like Name/Curr span the whole header height). */ export declare function buildColumnGroupLayout(columns: Column[], groups: ColumnGroup[]): ColumnGroupLayout;