@zvndev/yable-react 0.2.0 → 0.4.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/LICENSE +21 -0
- package/dist/index.cjs +1245 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +262 -14
- package/dist/index.d.ts +262 -14
- package/dist/index.js +1232 -204
- package/dist/index.js.map +1 -1
- package/package.json +34 -16
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Table as Table$1, RowData, Cell, Header, Row, TableOptions, ColumnDef, SortDirection, CellContext, ClipboardOptions, CellFlashInfo } from '@zvndev/yable-core';
|
|
1
|
+
import { Table as Table$1, RowData, Cell, Header, Row, TableOptions, TableState, Updater, Column, ColumnDef, ColumnDefBase, SortDirection, CellContext, ClipboardOptions, CellFlashInfo } from '@zvndev/yable-core';
|
|
2
2
|
export { AccessorFnColumnDef, AccessorKeyColumnDef, AggregationFn, Cell, CellStatus as CellCommitStatus, CellContext, CellFlashEvent, CellPatch, ClipboardOptions, Column, ColumnDef, ColumnDefBase, ColumnFiltersState, ColumnMeta, ColumnOrderState, ColumnPinningState, ColumnSizingInfoState, ColumnSizingState, CommitError, CommitErrorCells, CommitRecord, CommitResult, CommitsSlice, DisplayColumnDef, EditingState, ExpandedState, FillHandleState, FilterFn, FormulaEngine, FormulaError, FormulaFunction, FormulaState, GroupColumnDef, Header, HeaderContext, HeaderGroup, KeyboardNavigationAction, KeyboardNavigationCell, KeyboardNavigationDirection, KeyboardNavigationState, OnChangeFn, OnCommitFn, PaginationState, PartialLocale, PivotColumn, PivotConfig, PivotEngine, PivotFieldConfig, PivotRow, PivotState, PivotValueConfig, Row, RowData, RowDragEndEvent, RowDragEvent, RowDragState, RowEditCommitEvent, RowEditEvent, RowPinningState, RowReorderEvent, RowSelectionState, SortDirection, SortingFn, SortingState, Table as TableInstance, TableOptions, TableOptionsResolved, TableState, UndoAction, UndoRedoOptions, UndoRedoState, UndoStack, Updater, VisibilityState, YableLocale, aggregationFns, createColumnHelper, createLocale, createUndoRedoIntegration, en, filterFns, formulaFunctions, functionalUpdate, generatePivotColumnDefs, getDefaultLocale, getInitialPivotState, getPivotRowModel, resetLocale, setDefaultLocale, sortingFns } from '@zvndev/yable-core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
4
|
+
import React__default, { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ReactNode } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { RowDragState } from '@zvndev/yable-core/features/rowDragging';
|
|
7
7
|
|
|
@@ -53,6 +53,14 @@ interface TableProps<TData extends RowData> extends Omit<HTMLAttributes<HTMLDivE
|
|
|
53
53
|
sidebarPanels?: ('columns' | 'filters')[];
|
|
54
54
|
/** Default sidebar panel */
|
|
55
55
|
defaultSidebarPanel?: 'columns' | 'filters';
|
|
56
|
+
/** Render a second header row with per-column floating filters */
|
|
57
|
+
floatingFilters?: boolean;
|
|
58
|
+
/** Virtualize wide tables horizontally when safe to do so */
|
|
59
|
+
columnVirtualization?: boolean;
|
|
60
|
+
/** Additional columns rendered beyond the viewport when column virtualization is enabled */
|
|
61
|
+
columnVirtualizationOverscan?: number;
|
|
62
|
+
/** Accessible label for the grid container. Default: "Data table" */
|
|
63
|
+
ariaLabel?: string;
|
|
56
64
|
}
|
|
57
65
|
/** Status bar panel configuration */
|
|
58
66
|
interface StatusBarPanelConfig {
|
|
@@ -91,6 +99,69 @@ interface TableHeaderCellProps<TData extends RowData, TValue = unknown> extends
|
|
|
91
99
|
*/
|
|
92
100
|
declare function useTable<TData extends RowData>(options: TableOptions<TData>): Table$1<TData>;
|
|
93
101
|
|
|
102
|
+
interface UseTablePersistenceOptions {
|
|
103
|
+
/** Storage key used for getItem/setItem. */
|
|
104
|
+
key: string;
|
|
105
|
+
/** Which TableState slices to persist. Defaults to column layout keys. */
|
|
106
|
+
persistedKeys?: (keyof TableState)[];
|
|
107
|
+
/** Milliseconds to debounce storage writes. Default: 100. */
|
|
108
|
+
debounce?: number;
|
|
109
|
+
/** Schema version — bumping this discards any stale stored data. */
|
|
110
|
+
version?: number;
|
|
111
|
+
/** Custom Storage implementation. Default: localStorage. */
|
|
112
|
+
storage?: Storage;
|
|
113
|
+
}
|
|
114
|
+
interface UseTablePersistenceReturn {
|
|
115
|
+
/**
|
|
116
|
+
* Partial state hydrated from storage — pass to `useTable({ initialState })`.
|
|
117
|
+
* Only useful when NOT passing `onStateChange` (i.e., uncontrolled mode).
|
|
118
|
+
*/
|
|
119
|
+
initialState: Partial<TableState>;
|
|
120
|
+
/**
|
|
121
|
+
* State-change handler that persists relevant slices on each update.
|
|
122
|
+
* When passed to `useTable({ onStateChange })`, the persistence hook
|
|
123
|
+
* takes over state management (controlled mode). You MUST also pass
|
|
124
|
+
* `state` to useTable in this case.
|
|
125
|
+
*/
|
|
126
|
+
onStateChange: (updater: Updater<TableState>) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Current table state managed by the persistence hook.
|
|
129
|
+
* Pass to `useTable({ state })` alongside `onStateChange`.
|
|
130
|
+
*/
|
|
131
|
+
state: Partial<TableState>;
|
|
132
|
+
/** Manually clear all persisted state for this key. */
|
|
133
|
+
clearPersistedState: () => void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* React hook that persists selected table state slices to storage.
|
|
137
|
+
*
|
|
138
|
+
* Returns `initialState` (hydrated from storage), `state`, and
|
|
139
|
+
* `onStateChange` — pass all three to `useTable` so that persisted
|
|
140
|
+
* slices survive page reloads.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```tsx
|
|
144
|
+
* const persistence = useTablePersistence({ key: 'my-table', version: 1 })
|
|
145
|
+
*
|
|
146
|
+
* // Controlled mode (recommended) — persistence manages state:
|
|
147
|
+
* const table = useTable({
|
|
148
|
+
* data,
|
|
149
|
+
* columns,
|
|
150
|
+
* initialState: persistence.initialState,
|
|
151
|
+
* state: persistence.state,
|
|
152
|
+
* onStateChange: persistence.onStateChange,
|
|
153
|
+
* })
|
|
154
|
+
*
|
|
155
|
+
* // Uncontrolled mode — only hydrate, no live persistence:
|
|
156
|
+
* const table = useTable({
|
|
157
|
+
* data,
|
|
158
|
+
* columns,
|
|
159
|
+
* initialState: persistence.initialState,
|
|
160
|
+
* })
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
declare function useTablePersistence(options: UseTablePersistenceOptions): UseTablePersistenceReturn;
|
|
164
|
+
|
|
94
165
|
interface VirtualRow {
|
|
95
166
|
index: number;
|
|
96
167
|
start: number;
|
|
@@ -106,6 +177,12 @@ interface UseVirtualizationOptions {
|
|
|
106
177
|
pretextHeights?: Float64Array | null;
|
|
107
178
|
/** Pre-computed prefix sums for O(log n) scroll lookups */
|
|
108
179
|
pretextPrefixSums?: Float64Array | null;
|
|
180
|
+
/**
|
|
181
|
+
* Opaque key that changes when column widths change.
|
|
182
|
+
* When this value changes the height cache is invalidated because column
|
|
183
|
+
* resizing can affect text wrapping and therefore row heights.
|
|
184
|
+
*/
|
|
185
|
+
columnSizingHash?: string | number;
|
|
109
186
|
}
|
|
110
187
|
interface UseVirtualizationResult {
|
|
111
188
|
virtualRows: VirtualRow[];
|
|
@@ -113,19 +190,51 @@ interface UseVirtualizationResult {
|
|
|
113
190
|
startIndex: number;
|
|
114
191
|
endIndex: number;
|
|
115
192
|
scrollTo: (index: number) => void;
|
|
193
|
+
/**
|
|
194
|
+
* Manually clear the row-height cache and force recalculation.
|
|
195
|
+
* Call this when cell content changes (data mutations, font-size changes, etc.)
|
|
196
|
+
* that may affect row heights.
|
|
197
|
+
*/
|
|
198
|
+
invalidateRowHeights: () => void;
|
|
116
199
|
}
|
|
117
200
|
/**
|
|
118
201
|
* Computes which rows are visible in a scrollable container and returns
|
|
119
202
|
* positioning data so only those rows (plus an overscan buffer) are rendered.
|
|
120
203
|
*
|
|
121
|
-
* Returns `{ virtualRows, totalHeight, startIndex, endIndex, scrollTo }`.
|
|
204
|
+
* Returns `{ virtualRows, totalHeight, startIndex, endIndex, scrollTo, invalidateRowHeights }`.
|
|
122
205
|
* Re-renders are triggered by scroll (rAF-throttled) and ResizeObserver
|
|
123
206
|
* container resize. Supports fixed, variable, and Pretext-pre-measured heights.
|
|
124
207
|
*
|
|
125
|
-
*
|
|
126
|
-
* `
|
|
208
|
+
* The height cache is automatically invalidated when `totalRows`, `isFixedHeight`,
|
|
209
|
+
* or `columnSizingHash` changes. For manual invalidation (e.g. after data mutations
|
|
210
|
+
* or font-size changes), call `invalidateRowHeights()`.
|
|
127
211
|
*/
|
|
128
|
-
declare function useVirtualization({ containerRef, totalRows, rowHeight, overscan, estimateRowHeight: _estimateRowHeight, pretextHeights, pretextPrefixSums, }: UseVirtualizationOptions): UseVirtualizationResult;
|
|
212
|
+
declare function useVirtualization({ containerRef, totalRows, rowHeight, overscan, estimateRowHeight: _estimateRowHeight, pretextHeights, pretextPrefixSums, columnSizingHash, }: UseVirtualizationOptions): UseVirtualizationResult;
|
|
213
|
+
|
|
214
|
+
interface VirtualColumn<TData extends RowData> {
|
|
215
|
+
column: Column<TData, unknown>;
|
|
216
|
+
index: number;
|
|
217
|
+
start: number;
|
|
218
|
+
size: number;
|
|
219
|
+
}
|
|
220
|
+
interface UseColumnVirtualizationOptions<TData extends RowData> {
|
|
221
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
222
|
+
columns: Column<TData, unknown>[];
|
|
223
|
+
overscan?: number;
|
|
224
|
+
enabled?: boolean;
|
|
225
|
+
}
|
|
226
|
+
interface UseColumnVirtualizationResult<TData extends RowData> {
|
|
227
|
+
virtualColumns: VirtualColumn<TData>[];
|
|
228
|
+
startOffset: number;
|
|
229
|
+
endOffset: number;
|
|
230
|
+
totalWidth: number;
|
|
231
|
+
visibleWidth: number;
|
|
232
|
+
startIndex: number;
|
|
233
|
+
endIndex: number;
|
|
234
|
+
isVirtualized: boolean;
|
|
235
|
+
scrollToIndex: (index: number) => void;
|
|
236
|
+
}
|
|
237
|
+
declare function useColumnVirtualization<TData extends RowData>({ containerRef, columns, overscan, enabled, }: UseColumnVirtualizationOptions<TData>): UseColumnVirtualizationResult<TData>;
|
|
129
238
|
|
|
130
239
|
interface CellMeasurement {
|
|
131
240
|
/** Column ID */
|
|
@@ -360,18 +469,68 @@ declare function getRegisteredCellTypes(): readonly string[];
|
|
|
360
469
|
declare const TableProvider: React$1.Provider<Table$1<any> | null>;
|
|
361
470
|
declare function useTableContext<TData extends RowData>(): Table$1<TData>;
|
|
362
471
|
|
|
363
|
-
|
|
472
|
+
/**
|
|
473
|
+
* Project-wide default table and column options.
|
|
474
|
+
*
|
|
475
|
+
* Wrap your app (or a subtree) in `<YableProvider>` so every `<Table>` and
|
|
476
|
+
* `useTable` call inherits these defaults without repeating config.
|
|
477
|
+
*
|
|
478
|
+
* Component-level and hook-level values always take precedence over provider
|
|
479
|
+
* defaults.
|
|
480
|
+
*/
|
|
481
|
+
interface YableDefaults {
|
|
482
|
+
/** Default props applied to every `<Table>` in the subtree */
|
|
483
|
+
tableProps?: Partial<Pick<TableProps<any>, 'striped' | 'bordered' | 'compact' | 'stickyHeader' | 'theme' | 'direction' | 'ariaLabel'>>;
|
|
484
|
+
/** Default column definition merged under every table's own `defaultColumnDef` */
|
|
485
|
+
defaultColumnDef?: Partial<ColumnDefBase<any, unknown>>;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Read the nearest `YableProvider` defaults.
|
|
489
|
+
*
|
|
490
|
+
* Safe to call outside a provider — returns an empty object.
|
|
491
|
+
*/
|
|
492
|
+
declare function useYableDefaults(): YableDefaults;
|
|
493
|
+
/**
|
|
494
|
+
* Provide project-wide defaults for all Yable tables in a subtree.
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* ```tsx
|
|
498
|
+
* <YableProvider
|
|
499
|
+
* striped
|
|
500
|
+
* stickyHeader
|
|
501
|
+
* theme="stripe"
|
|
502
|
+
* defaultColumnDef={{ enableSorting: true }}
|
|
503
|
+
* >
|
|
504
|
+
* <EmployeeTable />
|
|
505
|
+
* <ProjectTable />
|
|
506
|
+
* </YableProvider>
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
declare function YableProvider({ children, defaultColumnDef, striped, stickyHeader, bordered, compact, theme, direction, ariaLabel, }: YableDefaults & {
|
|
510
|
+
children: ReactNode;
|
|
511
|
+
striped?: boolean;
|
|
512
|
+
stickyHeader?: boolean;
|
|
513
|
+
bordered?: boolean;
|
|
514
|
+
compact?: boolean;
|
|
515
|
+
theme?: string;
|
|
516
|
+
direction?: 'ltr' | 'rtl';
|
|
517
|
+
ariaLabel?: string;
|
|
518
|
+
}): react_jsx_runtime.JSX.Element;
|
|
519
|
+
|
|
520
|
+
declare function Table<TData extends RowData>({ table, stickyHeader: stickyHeaderProp, striped: stripedProp, bordered: borderedProp, compact: compactProp, theme: themeProp, clickableRows, footer, loading, loadingComponent, loadingText, emptyMessage, emptyComponent, emptyIcon, emptyDetail, renderEmpty, renderLoading, children, className, direction: directionProp, statusBar, statusBarPanels, sidebar, sidebarPanels, defaultSidebarPanel, floatingFilters, columnVirtualization, columnVirtualizationOverscan, ariaLabel: ariaLabelProp, ...rest }: TableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
364
521
|
|
|
365
522
|
interface TableHeaderProps<TData extends RowData> {
|
|
366
523
|
table: Table$1<TData>;
|
|
524
|
+
floatingFilters?: boolean;
|
|
367
525
|
}
|
|
368
|
-
declare function TableHeader<TData extends RowData>({ table, }: TableHeaderProps<TData>): react_jsx_runtime.JSX.Element;
|
|
526
|
+
declare function TableHeader<TData extends RowData>({ table, floatingFilters, }: TableHeaderProps<TData>): react_jsx_runtime.JSX.Element;
|
|
369
527
|
|
|
370
528
|
interface TableBodyProps<TData extends RowData> {
|
|
371
529
|
table: Table$1<TData>;
|
|
372
530
|
clickableRows?: boolean;
|
|
531
|
+
colgroup?: React__default.ReactNode;
|
|
373
532
|
}
|
|
374
|
-
declare function TableBody<TData extends RowData>({ table, clickableRows, }: TableBodyProps<TData>): react_jsx_runtime.JSX.Element;
|
|
533
|
+
declare function TableBody<TData extends RowData>({ table, clickableRows, colgroup, }: TableBodyProps<TData>): react_jsx_runtime.JSX.Element;
|
|
375
534
|
|
|
376
535
|
interface TableCellProps<TData extends RowData> {
|
|
377
536
|
cell: Cell<TData, unknown>;
|
|
@@ -386,7 +545,7 @@ declare function TableCell<TData extends RowData>({ cell, table, rowIndex, colum
|
|
|
386
545
|
interface TableFooterProps<TData extends RowData> {
|
|
387
546
|
table: Table$1<TData>;
|
|
388
547
|
}
|
|
389
|
-
declare function TableFooter<TData extends RowData>({ table
|
|
548
|
+
declare function TableFooter<TData extends RowData>({ table }: TableFooterProps<TData>): react_jsx_runtime.JSX.Element | null;
|
|
390
549
|
|
|
391
550
|
interface PaginationProps<TData extends RowData> {
|
|
392
551
|
table: Table$1<TData>;
|
|
@@ -412,6 +571,17 @@ interface GlobalFilterProps<TData extends RowData> {
|
|
|
412
571
|
}
|
|
413
572
|
declare function GlobalFilter<TData extends RowData>({ table, placeholder, debounce, className, }: GlobalFilterProps<TData>): react_jsx_runtime.JSX.Element;
|
|
414
573
|
|
|
574
|
+
interface FloatingFilterProps<TData extends RowData> {
|
|
575
|
+
column: Column<TData, unknown>;
|
|
576
|
+
}
|
|
577
|
+
declare function FloatingFilter<TData extends RowData>({ column }: FloatingFilterProps<TData>): react_jsx_runtime.JSX.Element;
|
|
578
|
+
|
|
579
|
+
interface SetFilterProps<TData extends RowData> {
|
|
580
|
+
column: Column<TData, unknown>;
|
|
581
|
+
className?: string;
|
|
582
|
+
}
|
|
583
|
+
declare function SetFilter<TData extends RowData>({ column, className }: SetFilterProps<TData>): react_jsx_runtime.JSX.Element;
|
|
584
|
+
|
|
415
585
|
interface SortIndicatorProps {
|
|
416
586
|
direction: SortDirection | false;
|
|
417
587
|
index?: number;
|
|
@@ -956,7 +1126,7 @@ interface UsePrintLayoutOptions {
|
|
|
956
1126
|
*/
|
|
957
1127
|
additionalCSS?: string;
|
|
958
1128
|
}
|
|
959
|
-
declare function usePrintLayout<TData extends RowData>(
|
|
1129
|
+
declare function usePrintLayout<TData extends RowData>(_table: Table$1<TData>, options?: UsePrintLayoutOptions): {
|
|
960
1130
|
preparePrint: () => void;
|
|
961
1131
|
isPrinting: boolean;
|
|
962
1132
|
};
|
|
@@ -970,11 +1140,89 @@ interface UseThemeOptions {
|
|
|
970
1140
|
declare function useTheme(options?: UseThemeOptions): {
|
|
971
1141
|
theme: string;
|
|
972
1142
|
setTheme: (newTheme: string) => void;
|
|
973
|
-
colorScheme: "auto" | "
|
|
1143
|
+
colorScheme: "auto" | "dark" | "light";
|
|
974
1144
|
setColorScheme: (scheme: "light" | "dark" | "auto") => void;
|
|
975
1145
|
toggleColorScheme: () => void;
|
|
976
|
-
resolvedColorScheme: "
|
|
1146
|
+
resolvedColorScheme: "dark" | "light";
|
|
977
1147
|
containerRef: React$1.RefObject<HTMLElement | null>;
|
|
978
1148
|
};
|
|
979
1149
|
|
|
980
|
-
|
|
1150
|
+
interface SelectColumnOptions {
|
|
1151
|
+
id?: string;
|
|
1152
|
+
size?: number;
|
|
1153
|
+
headerAriaLabel?: string;
|
|
1154
|
+
}
|
|
1155
|
+
declare function selectColumn<TData extends RowData>(options?: SelectColumnOptions): ColumnDef<TData, unknown>;
|
|
1156
|
+
|
|
1157
|
+
interface RowNumberColumnOptions {
|
|
1158
|
+
id?: string;
|
|
1159
|
+
header?: string;
|
|
1160
|
+
size?: number;
|
|
1161
|
+
startFrom?: number;
|
|
1162
|
+
}
|
|
1163
|
+
declare function rowNumberColumn<TData extends RowData>(options?: RowNumberColumnOptions): ColumnDef<TData, unknown>;
|
|
1164
|
+
|
|
1165
|
+
interface ActionItem<TData extends RowData> {
|
|
1166
|
+
label: string;
|
|
1167
|
+
icon?: ReactNode;
|
|
1168
|
+
onClick: (row: Row<TData>) => void;
|
|
1169
|
+
hidden?: (row: Row<TData>) => boolean;
|
|
1170
|
+
disabled?: (row: Row<TData>) => boolean;
|
|
1171
|
+
}
|
|
1172
|
+
interface ActionsColumnOptions<TData extends RowData> {
|
|
1173
|
+
id?: string;
|
|
1174
|
+
header?: string;
|
|
1175
|
+
size?: number;
|
|
1176
|
+
actions: ActionItem<TData>[] | ((row: Row<TData>) => ActionItem<TData>[]);
|
|
1177
|
+
}
|
|
1178
|
+
declare function actionsColumn<TData extends RowData>(options: ActionsColumnOptions<TData>): ColumnDef<TData, unknown>;
|
|
1179
|
+
|
|
1180
|
+
interface ExpandColumnOptions {
|
|
1181
|
+
id?: string;
|
|
1182
|
+
size?: number;
|
|
1183
|
+
}
|
|
1184
|
+
declare function expandColumn<TData extends RowData>(options?: ExpandColumnOptions): ColumnDef<TData, unknown>;
|
|
1185
|
+
|
|
1186
|
+
interface CellStackProps {
|
|
1187
|
+
children: React__default.ReactNode;
|
|
1188
|
+
gap?: number;
|
|
1189
|
+
}
|
|
1190
|
+
declare function CellStack({ children, gap }: CellStackProps): react_jsx_runtime.JSX.Element;
|
|
1191
|
+
|
|
1192
|
+
interface CellRowProps {
|
|
1193
|
+
children: React__default.ReactNode;
|
|
1194
|
+
gap?: number;
|
|
1195
|
+
align?: 'start' | 'center' | 'end' | 'baseline';
|
|
1196
|
+
justify?: 'start' | 'center' | 'end' | 'between';
|
|
1197
|
+
}
|
|
1198
|
+
declare function CellRow({ children, gap, align, justify }: CellRowProps): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
|
|
1200
|
+
interface CellWithIconProps {
|
|
1201
|
+
icon: React__default.ReactNode;
|
|
1202
|
+
children: React__default.ReactNode;
|
|
1203
|
+
gap?: number;
|
|
1204
|
+
iconSize?: number;
|
|
1205
|
+
}
|
|
1206
|
+
declare function CellWithIcon({ icon, children, gap, iconSize }: CellWithIconProps): react_jsx_runtime.JSX.Element;
|
|
1207
|
+
|
|
1208
|
+
interface CellTextProps {
|
|
1209
|
+
children: React__default.ReactNode;
|
|
1210
|
+
variant?: 'primary' | 'secondary' | 'muted';
|
|
1211
|
+
bold?: boolean;
|
|
1212
|
+
truncate?: boolean;
|
|
1213
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1214
|
+
}
|
|
1215
|
+
declare function CellText({ children, variant, bold, truncate, size, }: CellTextProps): react_jsx_runtime.JSX.Element;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Merges edit-commit changes into a data array, returning a new array
|
|
1219
|
+
* with matching rows shallow-merged. Rows without changes keep their
|
|
1220
|
+
* original reference so downstream memoisation works.
|
|
1221
|
+
*
|
|
1222
|
+
* @param data Current data array
|
|
1223
|
+
* @param changes Map of row ID -> partial row values (same shape as `onEditCommit`)
|
|
1224
|
+
* @param getRowId Optional row-ID resolver; defaults to string index
|
|
1225
|
+
*/
|
|
1226
|
+
declare function mergeEditChanges<TData>(data: TData[], changes: Record<string, Partial<TData>>, getRowId?: (row: TData, index: number) => string): TData[];
|
|
1227
|
+
|
|
1228
|
+
export { type ActionItem, type ActionsColumnOptions, type AutoMeasurementsOptions, CellBadge, type CellBadgeProps, CellBoolean, type CellBooleanProps, CellCheckbox, CellCurrency, type CellCurrencyProps, CellDate, CellDatePicker, type CellDateProps, CellErrorBoundary, CellInput, CellLink, type CellLinkProps, type CellMeasureRecipe, type CellMeasurement, CellNumeric, type CellNumericProps, CellProgress, type CellProgressProps, CellRating, type CellRatingProps, CellRow, type CellRowProps, CellSelect, CellStack, type CellStackProps, CellStatus, CellStatusBadge, type CellStatusBadgeProps, type CellStatusProps, CellText, type CellTextProps, CellToggle, CellWithIcon, type CellWithIconProps, ColumnsPanel, ContextMenu, ContextMenuItem, type ContextMenuItemDef, DEFAULT_TEXT_RECIPE, DragHandle, ErrorBoundary, type ExpandColumnOptions, ExpandIcon, FillHandle, type FillHandleDragState, type FillHandleProps, FiltersPanel, FlashCell, FloatingFilter, GlobalFilter, LoadingOverlay, type LoadingOverlayProps, MasterDetail, NoRowsOverlay, type NoRowsOverlayProps, Pagination, PivotConfigPanel, type PivotConfigProps, type PivotFieldItem, type PivotValueItem, PrintLayout, type RowNumberColumnOptions, type SelectColumnOptions, SetFilter, Sidebar, SortIndicator, StatusBar, StatusBarPanelComponent, type StatusBarPanelComponentProps, type StatusBarPanelConfig, type StatusBarPanelProps, Table, TableBody, TableCell, type TableCellProps$1 as TableCellProps, TableFooter, TableHeader, type TableHeaderCellProps, type TableProps, TableProvider, type TableRowProps, Tooltip, type TooltipPosition, type TooltipProps, TreeToggle, type UseCellFlashOptions, type UseClipboardOptions, type UseColumnVirtualizationOptions, type UseColumnVirtualizationResult, type UseFillHandleOptions, type UseFillHandleReturn, type UseKeyboardNavigationOptions, type UsePretextMeasurementOptions, type UsePretextMeasurementResult, type UsePrintLayoutOptions, type UseRowAnimationOptions, type UseRowDragOptions, type UseRowDragReturn, type UseTablePersistenceOptions, type UseTablePersistenceReturn, type UseTableRowHeightsOptions, type UseThemeOptions, type UseTooltipOptions, type UseVirtualizationOptions, type UseVirtualizationResult, type VirtualColumn, type VirtualRow, type YableDefaults, YableProvider, actionsColumn, expandColumn, getMeasureRecipeForCellType, getRegisteredCellTypes, mergeEditChanges, resolveMeasureRecipe, rowNumberColumn, selectColumn, useAutoMeasurements, useCellFlash, useClipboard, useColumnVirtualization, useContextMenu, useFillHandle, useKeyboardNavigation, usePretextMeasurement, usePrintLayout, useRowAnimation, useRowDrag, useTable, useTableContext, useTablePersistence, useTableRowHeights, useTheme, useTooltip, useVirtualization, useYableDefaults };
|