@expcat/tigercat-core 2.0.0-preview.4 → 2.0.0-preview.6
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/data-export-CJTP3rIi.d.ts +57 -0
- package/dist/index.d.ts +60 -6
- package/dist/index.js +50 -1
- package/dist/{locale-DKOXT9k0.d.ts → locale-CaxkEHEG.d.ts} +14 -1
- package/dist/locales/ar-SA.d.ts +1 -1
- package/dist/locales/ar-SA.js +7 -0
- package/dist/locales/de-DE.d.ts +1 -1
- package/dist/locales/de-DE.js +7 -0
- package/dist/locales/en-US.d.ts +1 -1
- package/dist/locales/en-US.js +7 -0
- package/dist/locales/es-ES.d.ts +1 -1
- package/dist/locales/es-ES.js +7 -0
- package/dist/locales/fr-FR.d.ts +1 -1
- package/dist/locales/fr-FR.js +7 -0
- package/dist/locales/id-ID.d.ts +1 -1
- package/dist/locales/id-ID.js +7 -0
- package/dist/locales/ja-JP.d.ts +1 -1
- package/dist/locales/ja-JP.js +7 -0
- package/dist/locales/ko-KR.d.ts +1 -1
- package/dist/locales/ko-KR.js +7 -0
- package/dist/locales/pt-BR.d.ts +1 -1
- package/dist/locales/pt-BR.js +7 -0
- package/dist/locales/th-TH.d.ts +1 -1
- package/dist/locales/th-TH.js +7 -0
- package/dist/locales/vi-VN.d.ts +1 -1
- package/dist/locales/vi-VN.js +7 -0
- package/dist/locales/zh-CN.d.ts +1 -1
- package/dist/locales/zh-CN.js +7 -0
- package/dist/locales/zh-TW.d.ts +1 -1
- package/dist/locales/zh-TW.js +7 -0
- package/dist/{table-export-DR-OBL6e.d.ts → table-DtmPxL6W.d.ts} +28 -23
- package/dist/utils/data-export.d.ts +42 -0
- package/dist/utils/data-export.js +203 -0
- package/dist/utils/table-export.d.ts +25 -2
- package/package.json +5 -1
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import '../locale-
|
|
1
|
+
import { x as TableExportFormat, T as TableColumn } from '../table-DtmPxL6W.js';
|
|
2
|
+
import '../locale-CaxkEHEG.js';
|
|
3
3
|
import '../datepicker-Digy7Stt.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Table export utilities (CSV / Excel-compatible HTML worksheet)
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Export table data to CSV string
|
|
11
|
+
*/
|
|
12
|
+
declare function exportTableToCsv<T>(columns: TableColumn<T>[], data: T[], _filename?: string): string;
|
|
13
|
+
declare function exportTableToExcel<T>(columns: TableColumn<T>[], data: T[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* Trigger a CSV file download in the browser
|
|
16
|
+
*/
|
|
17
|
+
declare function downloadCsv(csvContent: string, filename?: string): void;
|
|
18
|
+
declare function downloadExcel(excelContent: string, filename?: string): void;
|
|
19
|
+
declare function exportTableData<T>(columns: TableColumn<T>[], data: T[], format?: TableExportFormat): string;
|
|
20
|
+
declare function downloadTableExport(content: string, filename?: string, format?: TableExportFormat): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get export button classes
|
|
23
|
+
*/
|
|
24
|
+
declare const tableExportButtonClasses = "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] text-[var(--tiger-text,#111827)] bg-[var(--tiger-surface,#ffffff)] hover:bg-[var(--tiger-surface-muted,#f9fafb)] transition-colors";
|
|
25
|
+
|
|
26
|
+
export { downloadCsv, downloadExcel, downloadTableExport, exportTableData, exportTableToCsv, exportTableToExcel, tableExportButtonClasses };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expcat/tigercat-core",
|
|
3
|
-
"version": "2.0.0-preview.
|
|
3
|
+
"version": "2.0.0-preview.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core utilities for Tigercat UI library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -169,6 +169,10 @@
|
|
|
169
169
|
"./utils/table-export": {
|
|
170
170
|
"types": "./dist/utils/table-export.d.ts",
|
|
171
171
|
"import": "./dist/utils/table-export.js"
|
|
172
|
+
},
|
|
173
|
+
"./utils/data-export": {
|
|
174
|
+
"types": "./dist/utils/data-export.d.ts",
|
|
175
|
+
"import": "./dist/utils/data-export.js"
|
|
172
176
|
}
|
|
173
177
|
},
|
|
174
178
|
"files": [
|