@iyulab/flex-table 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export/export.d.ts +4 -3
- package/dist/export/xlsx-writer.d.ts +10 -0
- package/dist/{flex-table-DJvbRtBl.js → flex-table-fp3j2egA.js} +622 -100
- package/dist/flex-table.d.ts +21 -1
- package/dist/flex-table.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/models/types.d.ts +27 -0
- package/dist/react.js +1 -1
- package/dist/renderers/format.d.ts +19 -0
- package/dist/renderers/format.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/export/export.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ColumnDefinition, DataRow } from '../models/types.js';
|
|
2
|
-
export type ExportFormat = 'csv' | 'tsv' | 'json';
|
|
2
|
+
export type ExportFormat = 'csv' | 'tsv' | 'json' | 'xlsx';
|
|
3
3
|
/**
|
|
4
4
|
* Export data to the specified format.
|
|
5
|
+
* Returns string for text formats (csv/tsv/json) or Uint8Array for xlsx.
|
|
5
6
|
*/
|
|
6
|
-
export declare function exportData(data: DataRow[], columns: ColumnDefinition[], format: ExportFormat): string;
|
|
7
|
+
export declare function exportData(data: DataRow[], columns: ColumnDefinition[], format: ExportFormat): string | Uint8Array;
|
|
7
8
|
/**
|
|
8
9
|
* Trigger a file download in the browser.
|
|
9
10
|
*/
|
|
10
|
-
export declare function downloadFile(content: string, filename: string, mimeType: string): void;
|
|
11
|
+
export declare function downloadFile(content: string | Uint8Array, filename: string, mimeType: string): void;
|
|
11
12
|
export declare function getExportMimeType(format: ExportFormat): string;
|
|
12
13
|
export declare function getExportExtension(format: ExportFormat): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal XLSX writer — no external dependencies.
|
|
3
|
+
* Generates OOXML (.xlsx) files using ZIP STORE method (no compression).
|
|
4
|
+
* Supports string, number, boolean, and date cell types.
|
|
5
|
+
*/
|
|
6
|
+
import type { ColumnDefinition, DataRow } from '../models/types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Build an XLSX file as a Uint8Array.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildXlsx(data: DataRow[], columns: ColumnDefinition[]): Uint8Array;
|