/** * Data Export Utilities for NA-Kit UI * * Provides CSV and Excel (XLSX-like) export for Table and Data Grid data. * No external dependencies — pure browser APIs. * * @module data-export */ export interface ExportColumn { /** Column key/field name */ key: string; /** Display header */ header: string; /** Custom formatter for cell values */ formatter?: (value: unknown) => string; /** Whether to include this column in export */ include?: boolean; /** Column width (for Excel export) */ width?: number; } export interface ExportOptions { /** Filename (without extension) */ filename?: string; /** Columns to export */ columns?: ExportColumn[]; /** Whether to include headers */ includeHeaders?: boolean; /** Sheet name (for Excel) */ sheetName?: string; /** CSV delimiter */ delimiter?: string; /** Whether to add BOM for UTF-8 (helps Excel recognize encoding) */ bom?: boolean; /** Custom title/header rows */ title?: string; /** Include row numbers */ rowNumbers?: boolean; /** Date format string */ dateFormat?: string; } /** * Export data to CSV format */ export declare function exportToCSV(data: Record[], options?: ExportOptions): string; /** * Download data as a CSV file */ export declare function downloadCSV(data: Record[], options?: ExportOptions): void; /** * Export data to Excel-compatible XML Spreadsheet format * This uses the SpreadsheetML format which Excel, Google Sheets, and LibreOffice support. * No external dependencies needed. */ export declare function exportToExcel(data: Record[], options?: ExportOptions): string; /** * Download data as an Excel file */ export declare function downloadExcel(data: Record[], options?: ExportOptions): void; /** * Download data as JSON */ export declare function downloadJSON(data: Record[], options?: Pick): void; /** * Copy table data to clipboard in tab-separated format (paste-able into spreadsheets) */ export declare function copyToClipboard(data: Record[], options?: ExportOptions): Promise; /** * Open a print-friendly view of the data */ export declare function printData(data: Record[], options?: ExportOptions & { styles?: string; }): void; //# sourceMappingURL=data-export.d.ts.map