kapom-report - v0.1.2
    Preparing search index...

    Interface TableNode<T>

    interface TableNode<T> {
        columns: readonly TableColumn<T>[];
        data: readonly T[];
        group?: GroupResolver<T>;
        nested?: (row: T) => TableNode<unknown> | undefined;
        nestedIndentColumn?: number;
        nestedLayout?: "stacked" | "below";
        noDataText?: string;
        style?: TableStyleOptions<T>;
        summaryLabel?: string;
        type: "table";
    }

    Type Parameters

    • T
    Index
    columns: readonly TableColumn<T>[]

    top-level columns — leaf columns and/or ColumnGroups; the type: 'data' shorthand may be omitted anywhere (a group renders a spanning super-header)

    data: readonly T[]
    group?: GroupResolver<T>
    nested?: (row: T) => TableNode<unknown> | undefined

    master-detail (2 levels, MVP); returns a sub-table per row (undefined = this row has no detail). The child's row type is necessarily unknown here (rows across a whole table can't share a single concrete type when each row's child table has its own independent columns) — a concrete TableNode<Payment> literal needs satisfies TableNode<Payment> as unknown as TableNode<unknown> to assign here (an invariance quirk of DataColumn.key: keyof T, same reason ReportRegistry casts once internally)

    nestedIndentColumn?: number

    0-based column index the nested child table's left edge aligns to (default 0 = full width, no indent) — computed from this table's own resolved column widths, so the child's left edge always lines up exactly with that column's grid line, like a colSpan across the rest. Only applies to nestedLayout: 'below'.

    nestedLayout?: "stacked" | "below"

    how a nested child is laid out — default DEFAULT_NESTED_LAYOUT ('stacked'):

    • 'stacked' — each master row with a child becomes one self-contained block: the master column header + that row's values (an identity band) + the child header + the child rows, all in a single table so all of it repeats on a page break (the reader always knows which master row the detail belongs to). The trade-off: the master identity sits above the detail, not beside it. nestedIndentColumn is ignored in this mode.
    • 'below' — the child table renders indented right under its master row (see nestedIndentColumn); on a page break only the child's own header repeats, so detail continuing on a later page loses the master header/identity above it — opt into this only when the child is short enough not to break, or that context loss is acceptable
    noDataText?: string

    single-row message centered in the table when data is empty (No-Data fallback) — default DEFAULT_NO_DATA_TEXT

    summaryLabel?: string
    type: "table"