react-glide-table 2.3.1 → 2.3.3

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.
@@ -177,6 +177,14 @@ declare function resolveDataTableLabels(partial?: Partial<DataTableLabels>): Dat
177
177
  type RowSelectionMode = "none" | "single" | "multi";
178
178
  type CellEditType = "text" | "number";
179
179
  type DataTableEditInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue">;
180
+ /**
181
+ * Per-column clipboard serialization.
182
+ * - `"display"`: text extracted from the rendered cell
183
+ * - `"value"`: raw accessor / field value
184
+ * - `"omit"`: exclude this column from clipboard TSV entirely
185
+ * - function: custom clipboard string
186
+ */
187
+ type ColumnCopyValue<T extends Record<string, unknown> = Record<string, unknown>, V = unknown> = "display" | "value" | "omit" | ((ctx: CellRenderContext<T, V>) => string);
180
188
 
181
189
  declare module "@tanstack/react-table" {
182
190
  interface ColumnMeta<TData, TValue> {
@@ -209,6 +217,14 @@ declare module "@tanstack/react-table" {
209
217
  cellProps?: Record<string, unknown>;
210
218
  /** Compound `Column.render` stored for `ResolvedTableCell` */
211
219
  cellRender?: CellRenderFn<Record<string, unknown>>;
220
+ /**
221
+ * Clipboard serialization for this column.
222
+ * - `"display"`: rendered cell text (default when `render` / `kind` is set)
223
+ * - `"value"`: raw accessor / field value
224
+ * - `"omit"`: exclude this column from clipboard TSV entirely
225
+ * - function: custom string for the clipboard
226
+ */
227
+ copyValue?: ColumnCopyValue;
212
228
  /**
213
229
  * Freeze (sticky) this column without reordering.
214
230
  * `true` / `"left"` stick to the scrollport left; `"right"` to the right.
@@ -623,6 +639,14 @@ type TableColumnProps<T extends Record<string, unknown>, K extends string = keyo
623
639
  * Use `update` to commit via `onCellChange` / `onDataChange`.
624
640
  */
625
641
  render?: CellRenderFn<T, K extends keyof T ? T[K] : unknown>;
642
+ /**
643
+ * Clipboard serialization for this column.
644
+ * - `"display"`: rendered cell text (default when `render` / `kind` is set)
645
+ * - `"value"`: raw accessor / field value (useful for button cells that still wrap real data)
646
+ * - `"omit"`: exclude this column from clipboard TSV (shifts neighbors; prefer empty string for in-table paste)
647
+ * - function: custom string for the clipboard
648
+ */
649
+ copyValue?: ColumnCopyValue<T, K extends keyof T ? T[K] : unknown>;
626
650
  };
627
651
  /** Declares a multi-row header group wrapping leaf `Table.Column`s. */
628
652
  type TableColumnGroupProps = {
@@ -638,4 +662,4 @@ type TableProps<T extends Record<string, unknown>> = Omit<DataTableProps<T>, "co
638
662
  children: ReactNode;
639
663
  };
640
664
 
641
- export { collectSearchMatchesInRange as A, type BuiltinCellKind as B, type CellKind as C, DEFAULT_DATA_TABLE_LABELS as D, createSearchRegex as E, escapeSearchRegex as F, formatSearchResultLabel as G, getColumnFreezeEdgeAttr as H, INLINE_SEARCH_MAX_RESULTS as I, getColumnFreezeStyle as J, mapSearchResultToVisibleItem as K, mapSearchResultsToVisibleKeys as L, nextSearchIndex as M, nextSearchStride as N, previousSearchIndex as O, type PasteMode as P, resolveColumnFreezeSide as Q, type RowSelectionMode as R, type SearchCorpusRow as S, type TableColumnGroupProps as T, resolveDataTableLabels as U, resolveHeaderFreezeOffset as V, type CellEditType as W, type CellRenderContext as a, type CellRenderFn as b, type CellRenderer as c, type ColumnFreezeColumnInput as d, type ColumnFreezeEdgeSide as e, type ColumnFreezeMeta as f, type ColumnFreezeOffset as g, type ColumnFreezeSide as h, type DataTableClassNames as i, type DataTableCopyActions as j, type DataTableLabels as k, type DataTableProps as l, type DataTableScrollSlotProps as m, type DataTableSlots as n, type RowsPastePayload as o, type SearchResultItem as p, type SearchStatus as q, type TableColumnProps as r, type TableProps as s, buildColumnFreezeOffsets as t, buildFlatSearchCorpus as u, buildSearchMatchKey as v, buildSearchMatchKeys as w, buildTreeSearchCorpus as x, cellValueToSearchText as y, collectAncestorKeysToExpand as z };
665
+ export { collectAncestorKeysToExpand as A, type BuiltinCellKind as B, type CellKind as C, DEFAULT_DATA_TABLE_LABELS as D, collectSearchMatchesInRange as E, createSearchRegex as F, escapeSearchRegex as G, formatSearchResultLabel as H, INLINE_SEARCH_MAX_RESULTS as I, getColumnFreezeEdgeAttr as J, getColumnFreezeStyle as K, mapSearchResultToVisibleItem as L, mapSearchResultsToVisibleKeys as M, nextSearchIndex as N, nextSearchStride as O, type PasteMode as P, previousSearchIndex as Q, type RowSelectionMode as R, type SearchCorpusRow as S, type TableColumnGroupProps as T, resolveColumnFreezeSide as U, resolveDataTableLabels as V, resolveHeaderFreezeOffset as W, type CellEditType as X, type CellRenderContext as a, type CellRenderFn as b, type CellRenderer as c, type ColumnCopyValue as d, type ColumnFreezeColumnInput as e, type ColumnFreezeEdgeSide as f, type ColumnFreezeMeta as g, type ColumnFreezeOffset as h, type ColumnFreezeSide as i, type DataTableClassNames as j, type DataTableCopyActions as k, type DataTableLabels as l, type DataTableProps as m, type DataTableScrollSlotProps as n, type DataTableSlots as o, type RowsPastePayload as p, type SearchResultItem as q, type SearchStatus as r, type TableColumnProps as s, type TableProps as t, buildColumnFreezeOffsets as u, buildFlatSearchCorpus as v, buildSearchMatchKey as w, buildSearchMatchKeys as x, buildTreeSearchCorpus as y, cellValueToSearchText as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-glide-table",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/zpxlffjrm/react-glide-table.git"