react-glide-table 1.1.5 → 1.1.7
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/README.md +38 -3
- package/dist/compound.cjs +378 -82
- package/dist/compound.d.cts +2 -2
- package/dist/compound.d.ts +2 -2
- package/dist/compound.js +381 -85
- package/dist/core.cjs +401 -76
- package/dist/core.d.cts +59 -6
- package/dist/core.d.ts +59 -6
- package/dist/core.js +395 -81
- package/dist/index.cjs +424 -84
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +420 -91
- package/dist/{types-BfthylVR.d.cts → types-DOLnknDe.d.cts} +52 -1
- package/dist/{types-BfthylVR.d.ts → types-DOLnknDe.d.ts} +52 -1
- package/package.json +1 -1
|
@@ -30,6 +30,40 @@ declare module "@tanstack/react-table" {
|
|
|
30
30
|
editType?: CellEditType;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
type DataTableCopyActions = {
|
|
34
|
+
/** Copies the active cell selection. Defaults to visible rows only. */
|
|
35
|
+
copySelection: (options?: {
|
|
36
|
+
includeDescendants?: boolean;
|
|
37
|
+
}) => Promise<boolean>;
|
|
38
|
+
};
|
|
39
|
+
type PasteMode = "overwrite" | "insert";
|
|
40
|
+
type RowsPastePayload = {
|
|
41
|
+
mode: PasteMode;
|
|
42
|
+
/** Top-left of the active selection (visible row / col index) */
|
|
43
|
+
startRow: number;
|
|
44
|
+
startCol: number;
|
|
45
|
+
/** Bottom row of the active selection (visible row index) */
|
|
46
|
+
endRow: number;
|
|
47
|
+
/**
|
|
48
|
+
* Visible row ids from `startRow` for each clipboard row (overwrite targets).
|
|
49
|
+
* Shorter than `values` when the paste runs past the last visible row.
|
|
50
|
+
*/
|
|
51
|
+
rowIds: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Row id at `endRow` (selection bottom).
|
|
54
|
+
* Use as the insert-after anchor for tree / nested data.
|
|
55
|
+
*/
|
|
56
|
+
anchorRowId: string;
|
|
57
|
+
/** Visible column ids from startCol for clipboard width */
|
|
58
|
+
columnIds: string[];
|
|
59
|
+
/** Parsed TSV matrix (rows × cols) */
|
|
60
|
+
values: string[][];
|
|
61
|
+
/**
|
|
62
|
+
* Relative tree depth per clipboard row (from leading tabs in subtree copy).
|
|
63
|
+
* All zeros when the paste has no hierarchy markers.
|
|
64
|
+
*/
|
|
65
|
+
depths?: number[];
|
|
66
|
+
};
|
|
33
67
|
type DataTableProps<T extends Record<string, unknown>> = {
|
|
34
68
|
data: T[];
|
|
35
69
|
columns: ColumnDef<T, unknown>[];
|
|
@@ -107,6 +141,23 @@ type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
107
141
|
onExpandedRowsChange?: (next: Set<string>) => void;
|
|
108
142
|
/** When true, expand is disabled (children always visible) */
|
|
109
143
|
preventExpand?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Enables Ctrl/Cmd+Shift+C and programmatic subtree copy for collapsed tree rows.
|
|
146
|
+
* Defaults to true when `toggleField` is set.
|
|
147
|
+
*/
|
|
148
|
+
enableSubtreeCopy?: boolean;
|
|
149
|
+
/** Receives copy helpers once the table mounts or updates. */
|
|
150
|
+
onCopyActionsReady?: (actions: DataTableCopyActions) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Clipboard paste into the active cell selection.
|
|
153
|
+
* Ctrl/Cmd+V → overwrite; Ctrl/Cmd+Shift+V → insert (when `enableInsertPaste`).
|
|
154
|
+
* The app applies domain conversion and data updates.
|
|
155
|
+
*/
|
|
156
|
+
onRowsPaste?: (payload: RowsPastePayload) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Enables Ctrl/Cmd+Shift+V insert paste. Defaults to true when `onRowsPaste` is set.
|
|
159
|
+
*/
|
|
160
|
+
enableInsertPaste?: boolean;
|
|
110
161
|
/**
|
|
111
162
|
* Enable row virtualization. Defaults to true.
|
|
112
163
|
* Forced off when enableRowSpan is true to preserve merges
|
|
@@ -217,4 +268,4 @@ type TableProps<T extends Record<string, unknown>> = Omit<DataTableProps<T>, "co
|
|
|
217
268
|
children: ReactNode;
|
|
218
269
|
};
|
|
219
270
|
|
|
220
|
-
export { type CellEditType as C, DEFAULT_DATA_TABLE_LABELS as D, type RowSelectionMode as R, type TableColumnProps as T, type DataTableClassNames as a, type
|
|
271
|
+
export { type CellEditType as C, DEFAULT_DATA_TABLE_LABELS as D, type PasteMode as P, type RowSelectionMode as R, type TableColumnProps as T, type DataTableClassNames as a, type DataTableCopyActions as b, type DataTableLabels as c, type DataTableProps as d, type DataTableSlots as e, type RowsPastePayload as f, type TableProps as g, resolveDataTableLabels as r };
|
|
@@ -30,6 +30,40 @@ declare module "@tanstack/react-table" {
|
|
|
30
30
|
editType?: CellEditType;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
type DataTableCopyActions = {
|
|
34
|
+
/** Copies the active cell selection. Defaults to visible rows only. */
|
|
35
|
+
copySelection: (options?: {
|
|
36
|
+
includeDescendants?: boolean;
|
|
37
|
+
}) => Promise<boolean>;
|
|
38
|
+
};
|
|
39
|
+
type PasteMode = "overwrite" | "insert";
|
|
40
|
+
type RowsPastePayload = {
|
|
41
|
+
mode: PasteMode;
|
|
42
|
+
/** Top-left of the active selection (visible row / col index) */
|
|
43
|
+
startRow: number;
|
|
44
|
+
startCol: number;
|
|
45
|
+
/** Bottom row of the active selection (visible row index) */
|
|
46
|
+
endRow: number;
|
|
47
|
+
/**
|
|
48
|
+
* Visible row ids from `startRow` for each clipboard row (overwrite targets).
|
|
49
|
+
* Shorter than `values` when the paste runs past the last visible row.
|
|
50
|
+
*/
|
|
51
|
+
rowIds: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Row id at `endRow` (selection bottom).
|
|
54
|
+
* Use as the insert-after anchor for tree / nested data.
|
|
55
|
+
*/
|
|
56
|
+
anchorRowId: string;
|
|
57
|
+
/** Visible column ids from startCol for clipboard width */
|
|
58
|
+
columnIds: string[];
|
|
59
|
+
/** Parsed TSV matrix (rows × cols) */
|
|
60
|
+
values: string[][];
|
|
61
|
+
/**
|
|
62
|
+
* Relative tree depth per clipboard row (from leading tabs in subtree copy).
|
|
63
|
+
* All zeros when the paste has no hierarchy markers.
|
|
64
|
+
*/
|
|
65
|
+
depths?: number[];
|
|
66
|
+
};
|
|
33
67
|
type DataTableProps<T extends Record<string, unknown>> = {
|
|
34
68
|
data: T[];
|
|
35
69
|
columns: ColumnDef<T, unknown>[];
|
|
@@ -107,6 +141,23 @@ type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
107
141
|
onExpandedRowsChange?: (next: Set<string>) => void;
|
|
108
142
|
/** When true, expand is disabled (children always visible) */
|
|
109
143
|
preventExpand?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Enables Ctrl/Cmd+Shift+C and programmatic subtree copy for collapsed tree rows.
|
|
146
|
+
* Defaults to true when `toggleField` is set.
|
|
147
|
+
*/
|
|
148
|
+
enableSubtreeCopy?: boolean;
|
|
149
|
+
/** Receives copy helpers once the table mounts or updates. */
|
|
150
|
+
onCopyActionsReady?: (actions: DataTableCopyActions) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Clipboard paste into the active cell selection.
|
|
153
|
+
* Ctrl/Cmd+V → overwrite; Ctrl/Cmd+Shift+V → insert (when `enableInsertPaste`).
|
|
154
|
+
* The app applies domain conversion and data updates.
|
|
155
|
+
*/
|
|
156
|
+
onRowsPaste?: (payload: RowsPastePayload) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Enables Ctrl/Cmd+Shift+V insert paste. Defaults to true when `onRowsPaste` is set.
|
|
159
|
+
*/
|
|
160
|
+
enableInsertPaste?: boolean;
|
|
110
161
|
/**
|
|
111
162
|
* Enable row virtualization. Defaults to true.
|
|
112
163
|
* Forced off when enableRowSpan is true to preserve merges
|
|
@@ -217,4 +268,4 @@ type TableProps<T extends Record<string, unknown>> = Omit<DataTableProps<T>, "co
|
|
|
217
268
|
children: ReactNode;
|
|
218
269
|
};
|
|
219
270
|
|
|
220
|
-
export { type CellEditType as C, DEFAULT_DATA_TABLE_LABELS as D, type RowSelectionMode as R, type TableColumnProps as T, type DataTableClassNames as a, type
|
|
271
|
+
export { type CellEditType as C, DEFAULT_DATA_TABLE_LABELS as D, type PasteMode as P, type RowSelectionMode as R, type TableColumnProps as T, type DataTableClassNames as a, type DataTableCopyActions as b, type DataTableLabels as c, type DataTableProps as d, type DataTableSlots as e, type RowsPastePayload as f, type TableProps as g, resolveDataTableLabels as r };
|