import type { Column, ColumnMeta, Header, HeaderGroup, RowData, TableInstance } from "../types.js"; import type { TableFeature } from "./table.js"; export interface CoreHeaderGroup { depth: number; headers: Header[]; id: string; } export interface HeaderContext { /** * An instance of a column. * * @inheritDoc */ column: Column; /** * An instance of a header. * * @inheritDoc */ header: Header; /** * The table instance. * * @inheritDoc */ table: TableInstance; } export interface CoreHeader { /** * The {@link https://www.w3schools.com/tags/att_colspan.asp colspan} for the header. */ colSpan: number; /** * The header's associated column object. * * @inheritDoc */ column: Column; /** * The depth of the header, zero-indexed based. */ depth: number; /** * Returns the rendering context (or props) for column-based components like * headers, footers and filters. */ getContext: () => HeaderContext; /** * Returns the leaf headers hierarchically nested under this header. * * @inheritDoc */ getLeafHeaders: () => Header[]; /** * The header's associated header group object. * * @inheritDoc */ headerGroup: HeaderGroup; /** * The unique identifier for the header. */ id: string; /** * The index for the header within the header group. */ index: number; /** * A boolean denoting if the header is a placeholder header. */ isPlaceholder: boolean; /** * If the header is a placeholder header, this will be a unique header ID that * does not conflict with any other headers across the table. */ placeholderId?: string; /** * The row-span for the header. */ rowSpan: number; /** * The header's hierarchical sub/child headers. Will be empty if the header's * associated column is a leaf-column. * * @inheritDoc */ subHeaders: Header[]; } export interface HeadersInstance { /** * If pinning, returns headers for all columns that are not pinned, including * parent headers. * * @inheritDoc */ getCenterFlatHeaders: () => Header[]; /** * If pinning, returns the footer groups for columns that are not pinned. * * @inheritDoc */ getCenterFooterGroups: () => HeaderGroup[]; /** * If pinning, returns the header groups for columns that are not pinned. * * @inheritDoc */ getCenterHeaderGroups: () => HeaderGroup[]; /** * If pinning, returns headers for all columns that are not pinned, (not including * parent headers). * * @inheritDoc */ getCenterLeafHeaders: () => Header[]; /** * Returns headers for all columns in the table, including parent headers. * * @inheritDoc */ getFlatHeaders: () => Header[]; /** * Returns the footer groups for the table. * * @inheritDoc */ getFooterGroups: () => HeaderGroup[]; /** * Returns all header groups for the table. * * @inheritDoc */ getHeaderGroups: () => HeaderGroup[]; /** * Returns headers for all leaf columns in the table, (not including parent * headers). * * @inheritDoc */ getLeafHeaders: () => Header[]; /** * If pinning, returns headers for all left pinned columns in the table, including * parent headers. * * @inheritDoc */ getLeftFlatHeaders: () => Header[]; /** * If pinning, returns the footer groups for the left pinned columns. * * @inheritDoc */ getLeftFooterGroups: () => HeaderGroup[]; /** * If pinning, returns the header groups for the left pinned columns. * * @inheritDoc */ getLeftHeaderGroups: () => HeaderGroup[]; /** * If pinning, returns headers for all left pinned leaf columns in the table, (not * including parent headers). * * @inheritDoc */ getLeftLeafHeaders: () => Header[]; /** * If pinning, returns headers for all right pinned columns in the table, * including parent headers. * * @inheritDoc */ getRightFlatHeaders: () => Header[]; /** * If pinning, returns the footer groups for the right pinned columns. * * @inheritDoc */ getRightFooterGroups: () => HeaderGroup[]; /** * If pinning, returns the header groups for the right pinned columns. * * @inheritDoc */ getRightHeaderGroups: () => HeaderGroup[]; /** * If pinning, returns headers for all right pinned leaf columns in the table, * (not including parent headers). * * @inheritDoc */ getRightLeafHeaders: () => Header[]; } export declare const Headers: TableFeature; export declare function buildHeaderGroups(allColumns: Column[], columnsToGroup: Column[], table: TableInstance, headerFamily?: "center" | "left" | "right"): HeaderGroup[]; //# sourceMappingURL=headers.d.ts.map