/** * The **Export Data Preparer** — the single place that turns "export this grid" * into a concrete set of columns, headers and cells. * * Every exporter consumes its output, which is the whole point: row scope * (selected / filtered / on-screen), column scope (explicit list / visible / * all), the `valueGetter → valueFormatter` pipeline, and the null/date/array * normalisation rules are decided **once**, here. Without this layer, CSV, * Excel and PDF each grow their own slightly different answer to "what is in * this cell", and a support ticket about the three disagreeing is inevitable. * * The preparer is pure and DOM-free: it reads through the * {@link ExportDataSource} port and returns data. That makes it directly * unit-testable with a literal source object, and keeps the export module free * of any dependency on `GridCore`. * * **Cost.** One pass over the exported rows × exported columns, with a single * pre-sized array per row and no intermediate copies. Row and column scope are * resolved before the loop, so a 10-column export of 100k rows does exactly * 1M `getCellValue` calls and allocates 100k arrays — not a row object graph. * * @packageDocumentation */ import type { ExportDataSource, ExportOptions, PreparedExportData } from './export.types'; /** * Builds {@link PreparedExportData} from a live grid. * * Stateless apart from its port, so one instance per grid is enough and * `prepare()` is safe to call concurrently. */ export declare class ExportDataPreparer { private readonly source; constructor(source: ExportDataSource); /** * Resolves scope and materialises the export payload. * * @param options - The resolved export options; only the scope and hook * fields are read, so any format's option object can be passed unchanged. * @returns Columns, headers and rows, all in export order. */ prepare(options?: ExportOptions): PreparedExportData; /** * Resolves which columns are exported, and in which order. * * Precedence, highest first: * 1. `options.columns` — an explicit list, honoured verbatim including its * order and any hidden column it names. * 2. `includeHiddenColumns` — every leaf column in display order. * 3. The visible columns in display order (the default). * * Columns marked {@link ColumnDef.suppressExport} are dropped from 2 and 3; * an explicit list in 1 outranks the flag, because naming a column *is* the * decision to export it. */ private resolveColumns; /** * Resolves which rows are exported. * * Precedence, highest first: `onlySelectedRows` → `onlyFilteredRows` → the * rows currently on screen. The last is the default because it is what * `GridApi.exportCsv()` has always exported, so upgrading changes nothing for * a grid that passes no options. * * Group headers, group footers, summary, detail and loading placeholder rows * are never exported — they are grid chrome, not data. */ private resolveRows; } //# sourceMappingURL=export-data-preparer.d.ts.map