@updog/data-editor 0.1.0 → 0.1.1
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/index.d.ts +27 -27
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2751,6 +2751,33 @@ type DataEditorInlineProps<TRow extends DataEditorRow = DataEditorRow> = DataEdi
|
|
|
2751
2751
|
*/
|
|
2752
2752
|
type DataEditorProps<TRow extends DataEditorRow = DataEditorRow> = DataEditorModalProps<TRow> | DataEditorInlineProps<TRow>;
|
|
2753
2753
|
|
|
2754
|
+
type ExportParams<TRow extends DataEditorRow> = {
|
|
2755
|
+
store: DataStore<TRow>;
|
|
2756
|
+
columns: DataEditorColumn[];
|
|
2757
|
+
format: DataEditorFormat;
|
|
2758
|
+
scope: "all" | "filtered";
|
|
2759
|
+
fileName?: string;
|
|
2760
|
+
rtl?: boolean;
|
|
2761
|
+
};
|
|
2762
|
+
/**
|
|
2763
|
+
* Download a template file with column headers and a sample row matching your editor config.
|
|
2764
|
+
* Useful for giving users a file to fill in and import back.
|
|
2765
|
+
*
|
|
2766
|
+
* @param columns - Your column definitions (headers are taken from `column.title`).
|
|
2767
|
+
* @param format - File format to generate (`"csv"`, `"xlsx"`, etc.).
|
|
2768
|
+
*/
|
|
2769
|
+
declare function downloadExampleFile(columns: DataEditorColumn[], format: DataEditorFormat, sampleData?: Record<string, unknown>[]): Promise<void>;
|
|
2770
|
+
/**
|
|
2771
|
+
* Export the editor's data as a downloadable file.
|
|
2772
|
+
*
|
|
2773
|
+
* @param params.store - The DataStore instance (available from the editor context).
|
|
2774
|
+
* @param params.columns - Column definitions (for headers and formatting).
|
|
2775
|
+
* @param params.format - File format (`"csv"`, `"xlsx"`, `"tsv"`, `"json"`, `"xml"`).
|
|
2776
|
+
* @param params.scope - `"all"` exports every row, `"filtered"` exports only currently visible rows.
|
|
2777
|
+
* @param params.fileName - Base filename without extension. Defaults to `"data-export-YYYY-MM-DD"`.
|
|
2778
|
+
*/
|
|
2779
|
+
declare function exportDataEditor<TRow extends DataEditorRow>(params: ExportParams<TRow>): Promise<void>;
|
|
2780
|
+
|
|
2754
2781
|
/**
|
|
2755
2782
|
* Creates a validator that rejects empty values.
|
|
2756
2783
|
*
|
|
@@ -2812,33 +2839,6 @@ declare function date(message: string): CellValidator;
|
|
|
2812
2839
|
declare function oneOf(values: string[], message: string): CellValidator;
|
|
2813
2840
|
declare function endDateAfterStart(startDateField: string, message: string): CellValidator;
|
|
2814
2841
|
|
|
2815
|
-
type ExportParams<TRow extends DataEditorRow> = {
|
|
2816
|
-
store: DataStore<TRow>;
|
|
2817
|
-
columns: DataEditorColumn[];
|
|
2818
|
-
format: DataEditorFormat;
|
|
2819
|
-
scope: "all" | "filtered";
|
|
2820
|
-
fileName?: string;
|
|
2821
|
-
rtl?: boolean;
|
|
2822
|
-
};
|
|
2823
|
-
/**
|
|
2824
|
-
* Download a template file with column headers and a sample row matching your editor config.
|
|
2825
|
-
* Useful for giving users a file to fill in and import back.
|
|
2826
|
-
*
|
|
2827
|
-
* @param columns - Your column definitions (headers are taken from `column.title`).
|
|
2828
|
-
* @param format - File format to generate (`"csv"`, `"xlsx"`, etc.).
|
|
2829
|
-
*/
|
|
2830
|
-
declare function downloadExampleFile(columns: DataEditorColumn[], format: DataEditorFormat, sampleData?: Record<string, unknown>[]): Promise<void>;
|
|
2831
|
-
/**
|
|
2832
|
-
* Export the editor's data as a downloadable file.
|
|
2833
|
-
*
|
|
2834
|
-
* @param params.store - The DataStore instance (available from the editor context).
|
|
2835
|
-
* @param params.columns - Column definitions (for headers and formatting).
|
|
2836
|
-
* @param params.format - File format (`"csv"`, `"xlsx"`, `"tsv"`, `"json"`, `"xml"`).
|
|
2837
|
-
* @param params.scope - `"all"` exports every row, `"filtered"` exports only currently visible rows.
|
|
2838
|
-
* @param params.fileName - Base filename without extension. Defaults to `"data-export-YYYY-MM-DD"`.
|
|
2839
|
-
*/
|
|
2840
|
-
declare function exportDataEditor<TRow extends DataEditorRow>(params: ExportParams<TRow>): Promise<void>;
|
|
2841
|
-
|
|
2842
2842
|
/**
|
|
2843
2843
|
* Full-screen modal spreadsheet editor for large datasets.
|
|
2844
2844
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updog/data-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Enterprise-grade spreadsheet editor SDK for React. Edit large datasets with validation, undo/redo, CSV/XLSX import, and multi-source merging.",
|
|
5
5
|
"author": "Mikhail Kutateladze <admin@updog.tech>",
|
|
6
6
|
"homepage": "https://updog.tech",
|