API reference: @salmonui/core/export-model
ExportModelinterface
import type { ExportModel } from '@salmonui/core/export-model';interface ExportModel<Row> {
readonly scope: ExportScope;
readonly columns: readonly ExportColumn<Row>[];
readonly headerRows: readonly ExportHeaderRow[];
readonly rowCount: number;
readonly dataRowCount: number;
readonly detailRowCount: number;
readonly groupDepth: number;
readonly tree?: {
readonly column: number;
readonly depth: number;
};
readonly footerRows: readonly ExportAggregateRow[];
readonly frozen: {
readonly left: number;
readonly right: number;
readonly top: number;
};
readonly locale: string;
readonly direction: 'ltr' | 'rtl';
readonly timeZone: string | undefined;
readonly hasCellHook: boolean;
getRow(index: number): ExportRow<Row>;
rows(): IterableIterator<ExportRow<Row>>;
cell(row: ExportDataRow<Row>, column: ExportColumn<Row>): ExportCell;
}
| Name | Signature | Description |
|---|---|---|
scope | readonly scope: ExportScope; | |
columns | readonly columns: readonly ExportColumn<Row>[]; | |
headerRows | readonly headerRows: readonly ExportHeaderRow[]; | Header rows, top first; the last row holds the leaves (rowSpan covers shallower leaves). |
rowCount | readonly rowCount: number; | Body rows (data, captions, group footers, details). |
dataRowCount | readonly dataRowCount: number; | Data rows among the body rows. |
detailRowCount | readonly detailRowCount: number; | Detail rows among the body rows (detail blocks and child models). |
groupDepth | readonly groupDepth: number; | Grouping levels (outline depth). 0 when ungrouped or flattened. |
treeoptional | readonly tree?: {
readonly column: number;
readonly depth: number;
}; | Tree mode: the exported tree column (index in |
footerRows | readonly footerRows: readonly ExportAggregateRow[]; | DataGrid footer aggregate lines. |
frozen | readonly frozen: {
readonly left: number;
readonly right: number;
readonly top: number;
}; | Frozen exported columns at the start (left zone) and end (right zone); frozen body rows at the top. |
locale | readonly locale: string; | |
direction | readonly direction: 'ltr' | 'rtl'; | |
timeZone | readonly timeZone: string | undefined; | |
hasCellHook | readonly hasCellHook: boolean; | True when a |
getRow | getRow(index: number): ExportRow<Row>; | |
rows | rows(): IterableIterator<ExportRow<Row>>; | |
cell | cell(row: ExportDataRow<Row>, column: ExportColumn<Row>): ExportCell; | The exported cell of a data row (hook applied). |