@rozie-ui/data-table-solid 0.7.1 → 0.7.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.
package/dist/index.d.cts CHANGED
@@ -1,57 +1,126 @@
1
1
  import { JSX } from "solid-js";
2
+ import { Column as Column$1, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/table-core";
2
3
 
3
4
  //#region src/DataTable.d.ts
5
+ /** A cell position as integers over the visible (display-order) model. */
6
+ interface DataTableCellPosition {
7
+ rowIndex: number;
8
+ colIndex: number;
9
+ }
10
+ /** The active (roving-focus) cell. A header cell reports `rowIndex: null` and `isHeader: true`. */
11
+ interface DataTableActiveCell {
12
+ rowIndex: number | null;
13
+ colIndex: number;
14
+ isHeader: boolean;
15
+ }
16
+ /** The rectangular cell-range selection. Both corners are `null` when there is no range. */
17
+ interface DataTableRange {
18
+ anchor: DataTableCellPosition | null;
19
+ focus: DataTableCellPosition | null;
20
+ }
21
+ /** One data column offered to the `#groupBar` slot. */
22
+ interface DataTableGroupableColumn {
23
+ id: string;
24
+ label: string;
25
+ }
26
+ /** One changed cell inside a row edit commit. */
27
+ interface DataTableCellChange {
28
+ columnId: string;
29
+ oldValue: any;
30
+ newValue: any;
31
+ }
32
+ /** The `activecell-change` payload. `isHeader` is set when the move landed on or left a header cell. */
33
+ interface DataTableActiveCellChangePayload {
34
+ rowIndex: number | null;
35
+ colIndex: number;
36
+ isHeader?: boolean;
37
+ }
38
+ /** The `cell-edit-commit` payload: one committed cell. */
39
+ interface DataTableCellEditCommitPayload {
40
+ rowId: string;
41
+ columnId: string;
42
+ oldValue: any;
43
+ newValue: any;
44
+ }
45
+ /** The `row-edit-commit` payload: the row and every cell the save changed. */
46
+ interface DataTableRowEditCommitPayload {
47
+ rowId: string;
48
+ changes: DataTableCellChange[];
49
+ }
50
+ /** The `filter-change` payload: `globalFilter` for the search box, `columnFilters` for a per-column filter. Exactly one key is set. */
51
+ interface DataTableFilterChangePayload {
52
+ globalFilter?: string;
53
+ columnFilters?: ColumnFiltersState;
54
+ }
55
+ /** The `history-change` payload: undo/redo availability. */
56
+ interface DataTableHistoryChangePayload {
57
+ canUndo: boolean;
58
+ canRedo: boolean;
59
+ }
60
+ /** The `range-change` payload: the new range corners (both `null` when the range cleared). */
61
+ type DataTableRangeChangePayload = DataTableRange;
62
+ /** The `row-activate` payload. `row` is the original data object and `index` its position in the rendered model. */
63
+ interface DataTableRowActivatePayload {
64
+ row: any;
65
+ index: number;
66
+ trigger: 'keyboard' | 'click';
67
+ }
68
+ /** The `visible-range-change` payload: the rendered row window, `end` exclusive. */
69
+ interface DataTableVisibleRangeChangePayload {
70
+ start: number;
71
+ end: number;
72
+ }
4
73
  interface GroupBarSlotCtx {
5
- grouping: any;
6
- groupableColumns: any;
7
- applyGrouping: any;
8
- clearGrouping: any;
74
+ grouping: string[];
75
+ groupableColumns: DataTableGroupableColumn[];
76
+ applyGrouping: (cols: string[]) => void;
77
+ clearGrouping: () => void;
9
78
  }
10
79
  interface SelectAllSlotCtx {
11
- checked: any;
12
- indeterminate: any;
13
- toggle: any;
80
+ checked: boolean;
81
+ indeterminate: boolean;
82
+ toggle: (event: any) => void;
14
83
  }
15
84
  interface PlaceholderSlotCtx {
16
- index: any;
17
- columnId: any;
85
+ index: number;
86
+ columnId: string;
18
87
  }
19
88
  interface SelectCellSlotCtx {
20
89
  row: any;
21
- checked: any;
22
- toggle: any;
90
+ checked: boolean;
91
+ toggle: (event: any) => void;
23
92
  }
24
93
  interface DetailSlotCtx {
25
94
  row: any;
26
95
  }
27
96
  interface ColHeaderSlotCtx {
28
- columnId: any;
29
- column: any;
30
- label: any;
97
+ columnId: string;
98
+ column: Column$1<any, unknown>;
99
+ label: string;
31
100
  }
32
101
  interface FilterSlotCtx {
33
- columnId: any;
102
+ columnId: string;
34
103
  value: any;
35
- uniqueValues: any;
36
- minMax: any;
37
- columnLabel: any;
38
- setFilter: any;
104
+ uniqueValues: any[];
105
+ minMax: [number, number] | null;
106
+ columnLabel: string;
107
+ setFilter: (columnId: string, value: any) => void;
39
108
  }
40
109
  interface CellSlotCtx {
41
- columnId: any;
42
- column: any;
110
+ columnId: string;
111
+ column: Column$1<any, unknown>;
43
112
  row: any;
44
113
  value: any;
45
114
  }
46
115
  interface EditorSlotCtx {
47
- columnId: any;
48
- column: any;
116
+ columnId: string;
117
+ column: Column$1<any, unknown>;
49
118
  row: any;
50
119
  value: any;
51
- commit: any;
52
- cancel: any;
53
- columnLabel: any;
54
- autofocus: any;
120
+ commit: (value: any) => void;
121
+ cancel: () => void;
122
+ columnLabel: string;
123
+ autofocus: boolean;
55
124
  }
56
125
  interface DataTableProps {
57
126
  /**
@@ -200,23 +269,23 @@ interface DataTableProps {
200
269
  * A CSS length string bounding the `rdt-scroll` container when `virtual` is on (e.g. `'400px'`). Mirrored to the `--rozie-data-table-max-height` custom property; the prop wins, the token is the fallback.
201
270
  */
202
271
  maxHeight?: string;
203
- onSortChange?: (...args: any[]) => void;
204
- onExpandChange?: (...args: any[]) => void;
205
- onGroupChange?: (...args: any[]) => void;
206
- onFilterChange?: (...args: any[]) => void;
207
- onPageChange?: (...args: any[]) => void;
208
- onSelectionChange?: (...args: any[]) => void;
209
- onVisibilityChange?: (...args: any[]) => void;
210
- onResizeChange?: (...args: any[]) => void;
211
- onReorderChange?: (...args: any[]) => void;
212
- onPinChange?: (...args: any[]) => void;
213
- onHistoryChange?: (...args: any[]) => void;
214
- onVisibleRangeChange?: (...args: any[]) => void;
215
- onActivecellChange?: (...args: any[]) => void;
216
- onRowActivate?: (...args: any[]) => void;
217
- onRangeChange?: (...args: any[]) => void;
218
- onCellEditCommit?: (...args: any[]) => void;
219
- onRowEditCommit?: (...args: any[]) => void;
272
+ onActivecellChange?: (payload: DataTableActiveCellChangePayload) => void;
273
+ onCellEditCommit?: (payload: DataTableCellEditCommitPayload) => void;
274
+ onExpandChange?: (payload: ExpandedState) => void;
275
+ onFilterChange?: (payload: DataTableFilterChangePayload) => void;
276
+ onGroupChange?: (payload: GroupingState) => void;
277
+ onHistoryChange?: (payload: DataTableHistoryChangePayload) => void;
278
+ onPageChange?: (payload: PaginationState) => void;
279
+ onPinChange?: (payload: ColumnPinningState) => void;
280
+ onRangeChange?: (payload: DataTableRangeChangePayload) => void;
281
+ onReorderChange?: (payload: ColumnOrderState) => void;
282
+ onResizeChange?: (payload: ColumnSizingState) => void;
283
+ onRowActivate?: (payload: DataTableRowActivatePayload) => void;
284
+ onRowEditCommit?: (payload: DataTableRowEditCommitPayload) => void;
285
+ onSelectionChange?: (payload: RowSelectionState) => void;
286
+ onSortChange?: (payload: SortingState) => void;
287
+ onVisibilityChange?: (payload: VisibilityState) => void;
288
+ onVisibleRangeChange?: (payload: DataTableVisibleRangeChangePayload) => void;
220
289
  children?: JSX.Element;
221
290
  groupBarSlot?: (ctx: GroupBarSlotCtx) => JSX.Element;
222
291
  selectAllSlot?: (ctx: SelectAllSlotCtx) => JSX.Element;
@@ -229,78 +298,78 @@ interface DataTableProps {
229
298
  editorSlot?: (ctx: EditorSlotCtx) => JSX.Element;
230
299
  slots?: {
231
300
  [key: `colHeader-${string}`]: ((ctx: {
232
- columnId: any;
233
- column: any;
234
- label: any;
301
+ columnId: string;
302
+ column: Column$1<any, unknown>;
303
+ label: string;
235
304
  }) => JSX.Element) | undefined;
236
305
  [key: `filter-${string}`]: ((ctx: {
237
- columnId: any;
306
+ columnId: string;
238
307
  value: any;
239
- uniqueValues: any;
240
- minMax: any;
241
- columnLabel: any;
242
- setFilter: any;
308
+ uniqueValues: any[];
309
+ minMax: [number, number] | null;
310
+ columnLabel: string;
311
+ setFilter: (columnId: string, value: any) => void;
243
312
  }) => JSX.Element) | undefined;
244
313
  [key: `cell-${string}`]: ((ctx: {
245
- columnId: any;
246
- column: any;
314
+ columnId: string;
315
+ column: Column$1<any, unknown>;
247
316
  row: any;
248
317
  value: any;
249
318
  }) => JSX.Element) | undefined;
250
319
  [key: `editor-${string}`]: ((ctx: {
251
- columnId: any;
252
- column: any;
320
+ columnId: string;
321
+ column: Column$1<any, unknown>;
253
322
  row: any;
254
323
  value: any;
255
- commit: any;
256
- cancel: any;
257
- columnLabel: any;
258
- autofocus: any;
324
+ commit: (value: any) => void;
325
+ cancel: () => void;
326
+ columnLabel: string;
327
+ autofocus: boolean;
259
328
  }) => JSX.Element) | undefined;
260
329
  [key: string]: ((...args: any[]) => JSX.Element) | undefined;
261
330
  };
262
331
  ref?: (h: DataTableHandle) => void;
263
332
  }
264
333
  interface DataTableHandle {
265
- sortColumn: (...args: any[]) => any;
266
- clearSorting: (...args: any[]) => any;
267
- toggleRowExpanded: (...args: any[]) => any;
268
- expandAll: (...args: any[]) => any;
269
- collapseAll: (...args: any[]) => any;
270
- getExpandedRows: (...args: any[]) => any;
271
- applyGrouping: (...args: any[]) => any;
272
- clearGrouping: (...args: any[]) => any;
273
- getFacetedUniqueValues: (...args: any[]) => any;
274
- getFacetedMinMaxValues: (...args: any[]) => any;
275
- getColumnDefs: (...args: any[]) => any;
276
- toggleAllRows: (...args: any[]) => any;
277
- clearSelection: (...args: any[]) => any;
278
- getSelectedRows: (...args: any[]) => any;
279
- setPage: (...args: any[]) => any;
280
- setRowsPerPage: (...args: any[]) => any;
281
- toggleColumnVisibility: (...args: any[]) => any;
282
- applyColumnOrder: (...args: any[]) => any;
283
- resetColumnSizing: (...args: any[]) => any;
284
- pinColumn: (...args: any[]) => any;
285
- focusCell: (...args: any[]) => any;
286
- getActiveCell: (...args: any[]) => any;
287
- clearActiveCell: (...args: any[]) => any;
334
+ sortColumn: (colId: string, desc?: boolean) => void;
335
+ clearSorting: () => void;
336
+ toggleRowExpanded: (rowId: string | number) => void;
337
+ expandAll: () => void;
338
+ collapseAll: () => void;
339
+ getExpandedRows: () => any[];
340
+ applyGrouping: (cols: string[]) => void;
341
+ clearGrouping: () => void;
342
+ getFacetedUniqueValues: (colId: string) => any[];
343
+ getFacetedMinMaxValues: (colId: string) => [number, number] | null;
344
+ getColumnDefs: () => ColumnDef<any, any>[];
345
+ toggleAllRows: (value?: boolean) => void;
346
+ clearSelection: () => void;
347
+ getSelectedRows: () => any[];
348
+ setPage: (idx: number) => void;
349
+ setRowsPerPage: (size: number) => void;
350
+ toggleColumnVisibility: (colId: string) => void;
351
+ applyColumnOrder: (order: string[]) => void;
352
+ resetColumnSizing: () => void;
353
+ pinColumn: (colId: string, side: 'left' | 'right' | false) => void;
354
+ focusCell: (rowIndex: number, colIndex: number) => void;
355
+ getActiveCell: () => DataTableActiveCell;
356
+ clearActiveCell: () => void;
288
357
  scrollToRow(index: any, options?: {
289
358
  align?: 'start' | 'center' | 'end' | 'auto';
290
359
  behavior?: 'auto' | 'smooth' | 'instant';
291
360
  }): void;
292
- getScrollElement(): any;
293
- getRowIndexRelativeToPage: (...args: any[]) => any;
294
- editCell: (...args: any[]) => any;
295
- commitEditing: (...args: any[]) => any;
296
- editRow: (...args: any[]) => any;
297
- getSelectedRange: (...args: any[]) => any;
298
- cut: (...args: any[]) => any;
299
- undo: (...args: any[]) => any;
300
- redo: (...args: any[]) => any;
301
- canUndo: (...args: any[]) => any;
302
- canRedo: (...args: any[]) => any;
303
- clearHistory: (...args: any[]) => any;
361
+ getScrollElement: () => HTMLElement | null;
362
+ getRowIndexRelativeToPage: (absRow?: number) => number;
363
+ editCell: (rowIndex: number, colIndex: number) => void;
364
+ commitEditing: () => void;
365
+ editRow: (rowIndex: number) => void;
366
+ getSelectedRange: () => DataTableRange;
367
+ cut: () => void;
368
+ undo: () => void;
369
+ redo: () => void;
370
+ canUndo: () => boolean;
371
+ canRedo: () => boolean;
372
+ clearHistory: () => void;
304
373
  }
305
374
  declare function DataTable(_props: DataTableProps): JSX.Element;
306
375
  //#endregion
@@ -669,4 +738,4 @@ interface DetailPanelProps {
669
738
  }
670
739
  declare function DetailPanel(_props: DetailPanelProps): JSX.Element;
671
740
  //#endregion
672
- export { Column, DataTable, DataTable as default, type DataTableHandle, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar };
741
+ export { Column, DataTable, DataTable as default, DataTableActiveCell, DataTableActiveCellChangePayload, DataTableCellChange, DataTableCellEditCommitPayload, DataTableCellPosition, DataTableFilterChangePayload, DataTableGroupableColumn, type DataTableHandle, DataTableHistoryChangePayload, DataTableRange, DataTableRangeChangePayload, DataTableRowActivatePayload, DataTableRowEditCommitPayload, DataTableVisibleRangeChangePayload, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar };
package/dist/index.d.mts CHANGED
@@ -1,57 +1,126 @@
1
1
  import { JSX } from "solid-js";
2
+ import { Column as Column$1, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/table-core";
2
3
 
3
4
  //#region src/DataTable.d.ts
5
+ /** A cell position as integers over the visible (display-order) model. */
6
+ interface DataTableCellPosition {
7
+ rowIndex: number;
8
+ colIndex: number;
9
+ }
10
+ /** The active (roving-focus) cell. A header cell reports `rowIndex: null` and `isHeader: true`. */
11
+ interface DataTableActiveCell {
12
+ rowIndex: number | null;
13
+ colIndex: number;
14
+ isHeader: boolean;
15
+ }
16
+ /** The rectangular cell-range selection. Both corners are `null` when there is no range. */
17
+ interface DataTableRange {
18
+ anchor: DataTableCellPosition | null;
19
+ focus: DataTableCellPosition | null;
20
+ }
21
+ /** One data column offered to the `#groupBar` slot. */
22
+ interface DataTableGroupableColumn {
23
+ id: string;
24
+ label: string;
25
+ }
26
+ /** One changed cell inside a row edit commit. */
27
+ interface DataTableCellChange {
28
+ columnId: string;
29
+ oldValue: any;
30
+ newValue: any;
31
+ }
32
+ /** The `activecell-change` payload. `isHeader` is set when the move landed on or left a header cell. */
33
+ interface DataTableActiveCellChangePayload {
34
+ rowIndex: number | null;
35
+ colIndex: number;
36
+ isHeader?: boolean;
37
+ }
38
+ /** The `cell-edit-commit` payload: one committed cell. */
39
+ interface DataTableCellEditCommitPayload {
40
+ rowId: string;
41
+ columnId: string;
42
+ oldValue: any;
43
+ newValue: any;
44
+ }
45
+ /** The `row-edit-commit` payload: the row and every cell the save changed. */
46
+ interface DataTableRowEditCommitPayload {
47
+ rowId: string;
48
+ changes: DataTableCellChange[];
49
+ }
50
+ /** The `filter-change` payload: `globalFilter` for the search box, `columnFilters` for a per-column filter. Exactly one key is set. */
51
+ interface DataTableFilterChangePayload {
52
+ globalFilter?: string;
53
+ columnFilters?: ColumnFiltersState;
54
+ }
55
+ /** The `history-change` payload: undo/redo availability. */
56
+ interface DataTableHistoryChangePayload {
57
+ canUndo: boolean;
58
+ canRedo: boolean;
59
+ }
60
+ /** The `range-change` payload: the new range corners (both `null` when the range cleared). */
61
+ type DataTableRangeChangePayload = DataTableRange;
62
+ /** The `row-activate` payload. `row` is the original data object and `index` its position in the rendered model. */
63
+ interface DataTableRowActivatePayload {
64
+ row: any;
65
+ index: number;
66
+ trigger: 'keyboard' | 'click';
67
+ }
68
+ /** The `visible-range-change` payload: the rendered row window, `end` exclusive. */
69
+ interface DataTableVisibleRangeChangePayload {
70
+ start: number;
71
+ end: number;
72
+ }
4
73
  interface GroupBarSlotCtx {
5
- grouping: any;
6
- groupableColumns: any;
7
- applyGrouping: any;
8
- clearGrouping: any;
74
+ grouping: string[];
75
+ groupableColumns: DataTableGroupableColumn[];
76
+ applyGrouping: (cols: string[]) => void;
77
+ clearGrouping: () => void;
9
78
  }
10
79
  interface SelectAllSlotCtx {
11
- checked: any;
12
- indeterminate: any;
13
- toggle: any;
80
+ checked: boolean;
81
+ indeterminate: boolean;
82
+ toggle: (event: any) => void;
14
83
  }
15
84
  interface PlaceholderSlotCtx {
16
- index: any;
17
- columnId: any;
85
+ index: number;
86
+ columnId: string;
18
87
  }
19
88
  interface SelectCellSlotCtx {
20
89
  row: any;
21
- checked: any;
22
- toggle: any;
90
+ checked: boolean;
91
+ toggle: (event: any) => void;
23
92
  }
24
93
  interface DetailSlotCtx {
25
94
  row: any;
26
95
  }
27
96
  interface ColHeaderSlotCtx {
28
- columnId: any;
29
- column: any;
30
- label: any;
97
+ columnId: string;
98
+ column: Column$1<any, unknown>;
99
+ label: string;
31
100
  }
32
101
  interface FilterSlotCtx {
33
- columnId: any;
102
+ columnId: string;
34
103
  value: any;
35
- uniqueValues: any;
36
- minMax: any;
37
- columnLabel: any;
38
- setFilter: any;
104
+ uniqueValues: any[];
105
+ minMax: [number, number] | null;
106
+ columnLabel: string;
107
+ setFilter: (columnId: string, value: any) => void;
39
108
  }
40
109
  interface CellSlotCtx {
41
- columnId: any;
42
- column: any;
110
+ columnId: string;
111
+ column: Column$1<any, unknown>;
43
112
  row: any;
44
113
  value: any;
45
114
  }
46
115
  interface EditorSlotCtx {
47
- columnId: any;
48
- column: any;
116
+ columnId: string;
117
+ column: Column$1<any, unknown>;
49
118
  row: any;
50
119
  value: any;
51
- commit: any;
52
- cancel: any;
53
- columnLabel: any;
54
- autofocus: any;
120
+ commit: (value: any) => void;
121
+ cancel: () => void;
122
+ columnLabel: string;
123
+ autofocus: boolean;
55
124
  }
56
125
  interface DataTableProps {
57
126
  /**
@@ -200,23 +269,23 @@ interface DataTableProps {
200
269
  * A CSS length string bounding the `rdt-scroll` container when `virtual` is on (e.g. `'400px'`). Mirrored to the `--rozie-data-table-max-height` custom property; the prop wins, the token is the fallback.
201
270
  */
202
271
  maxHeight?: string;
203
- onSortChange?: (...args: any[]) => void;
204
- onExpandChange?: (...args: any[]) => void;
205
- onGroupChange?: (...args: any[]) => void;
206
- onFilterChange?: (...args: any[]) => void;
207
- onPageChange?: (...args: any[]) => void;
208
- onSelectionChange?: (...args: any[]) => void;
209
- onVisibilityChange?: (...args: any[]) => void;
210
- onResizeChange?: (...args: any[]) => void;
211
- onReorderChange?: (...args: any[]) => void;
212
- onPinChange?: (...args: any[]) => void;
213
- onHistoryChange?: (...args: any[]) => void;
214
- onVisibleRangeChange?: (...args: any[]) => void;
215
- onActivecellChange?: (...args: any[]) => void;
216
- onRowActivate?: (...args: any[]) => void;
217
- onRangeChange?: (...args: any[]) => void;
218
- onCellEditCommit?: (...args: any[]) => void;
219
- onRowEditCommit?: (...args: any[]) => void;
272
+ onActivecellChange?: (payload: DataTableActiveCellChangePayload) => void;
273
+ onCellEditCommit?: (payload: DataTableCellEditCommitPayload) => void;
274
+ onExpandChange?: (payload: ExpandedState) => void;
275
+ onFilterChange?: (payload: DataTableFilterChangePayload) => void;
276
+ onGroupChange?: (payload: GroupingState) => void;
277
+ onHistoryChange?: (payload: DataTableHistoryChangePayload) => void;
278
+ onPageChange?: (payload: PaginationState) => void;
279
+ onPinChange?: (payload: ColumnPinningState) => void;
280
+ onRangeChange?: (payload: DataTableRangeChangePayload) => void;
281
+ onReorderChange?: (payload: ColumnOrderState) => void;
282
+ onResizeChange?: (payload: ColumnSizingState) => void;
283
+ onRowActivate?: (payload: DataTableRowActivatePayload) => void;
284
+ onRowEditCommit?: (payload: DataTableRowEditCommitPayload) => void;
285
+ onSelectionChange?: (payload: RowSelectionState) => void;
286
+ onSortChange?: (payload: SortingState) => void;
287
+ onVisibilityChange?: (payload: VisibilityState) => void;
288
+ onVisibleRangeChange?: (payload: DataTableVisibleRangeChangePayload) => void;
220
289
  children?: JSX.Element;
221
290
  groupBarSlot?: (ctx: GroupBarSlotCtx) => JSX.Element;
222
291
  selectAllSlot?: (ctx: SelectAllSlotCtx) => JSX.Element;
@@ -229,78 +298,78 @@ interface DataTableProps {
229
298
  editorSlot?: (ctx: EditorSlotCtx) => JSX.Element;
230
299
  slots?: {
231
300
  [key: `colHeader-${string}`]: ((ctx: {
232
- columnId: any;
233
- column: any;
234
- label: any;
301
+ columnId: string;
302
+ column: Column$1<any, unknown>;
303
+ label: string;
235
304
  }) => JSX.Element) | undefined;
236
305
  [key: `filter-${string}`]: ((ctx: {
237
- columnId: any;
306
+ columnId: string;
238
307
  value: any;
239
- uniqueValues: any;
240
- minMax: any;
241
- columnLabel: any;
242
- setFilter: any;
308
+ uniqueValues: any[];
309
+ minMax: [number, number] | null;
310
+ columnLabel: string;
311
+ setFilter: (columnId: string, value: any) => void;
243
312
  }) => JSX.Element) | undefined;
244
313
  [key: `cell-${string}`]: ((ctx: {
245
- columnId: any;
246
- column: any;
314
+ columnId: string;
315
+ column: Column$1<any, unknown>;
247
316
  row: any;
248
317
  value: any;
249
318
  }) => JSX.Element) | undefined;
250
319
  [key: `editor-${string}`]: ((ctx: {
251
- columnId: any;
252
- column: any;
320
+ columnId: string;
321
+ column: Column$1<any, unknown>;
253
322
  row: any;
254
323
  value: any;
255
- commit: any;
256
- cancel: any;
257
- columnLabel: any;
258
- autofocus: any;
324
+ commit: (value: any) => void;
325
+ cancel: () => void;
326
+ columnLabel: string;
327
+ autofocus: boolean;
259
328
  }) => JSX.Element) | undefined;
260
329
  [key: string]: ((...args: any[]) => JSX.Element) | undefined;
261
330
  };
262
331
  ref?: (h: DataTableHandle) => void;
263
332
  }
264
333
  interface DataTableHandle {
265
- sortColumn: (...args: any[]) => any;
266
- clearSorting: (...args: any[]) => any;
267
- toggleRowExpanded: (...args: any[]) => any;
268
- expandAll: (...args: any[]) => any;
269
- collapseAll: (...args: any[]) => any;
270
- getExpandedRows: (...args: any[]) => any;
271
- applyGrouping: (...args: any[]) => any;
272
- clearGrouping: (...args: any[]) => any;
273
- getFacetedUniqueValues: (...args: any[]) => any;
274
- getFacetedMinMaxValues: (...args: any[]) => any;
275
- getColumnDefs: (...args: any[]) => any;
276
- toggleAllRows: (...args: any[]) => any;
277
- clearSelection: (...args: any[]) => any;
278
- getSelectedRows: (...args: any[]) => any;
279
- setPage: (...args: any[]) => any;
280
- setRowsPerPage: (...args: any[]) => any;
281
- toggleColumnVisibility: (...args: any[]) => any;
282
- applyColumnOrder: (...args: any[]) => any;
283
- resetColumnSizing: (...args: any[]) => any;
284
- pinColumn: (...args: any[]) => any;
285
- focusCell: (...args: any[]) => any;
286
- getActiveCell: (...args: any[]) => any;
287
- clearActiveCell: (...args: any[]) => any;
334
+ sortColumn: (colId: string, desc?: boolean) => void;
335
+ clearSorting: () => void;
336
+ toggleRowExpanded: (rowId: string | number) => void;
337
+ expandAll: () => void;
338
+ collapseAll: () => void;
339
+ getExpandedRows: () => any[];
340
+ applyGrouping: (cols: string[]) => void;
341
+ clearGrouping: () => void;
342
+ getFacetedUniqueValues: (colId: string) => any[];
343
+ getFacetedMinMaxValues: (colId: string) => [number, number] | null;
344
+ getColumnDefs: () => ColumnDef<any, any>[];
345
+ toggleAllRows: (value?: boolean) => void;
346
+ clearSelection: () => void;
347
+ getSelectedRows: () => any[];
348
+ setPage: (idx: number) => void;
349
+ setRowsPerPage: (size: number) => void;
350
+ toggleColumnVisibility: (colId: string) => void;
351
+ applyColumnOrder: (order: string[]) => void;
352
+ resetColumnSizing: () => void;
353
+ pinColumn: (colId: string, side: 'left' | 'right' | false) => void;
354
+ focusCell: (rowIndex: number, colIndex: number) => void;
355
+ getActiveCell: () => DataTableActiveCell;
356
+ clearActiveCell: () => void;
288
357
  scrollToRow(index: any, options?: {
289
358
  align?: 'start' | 'center' | 'end' | 'auto';
290
359
  behavior?: 'auto' | 'smooth' | 'instant';
291
360
  }): void;
292
- getScrollElement(): any;
293
- getRowIndexRelativeToPage: (...args: any[]) => any;
294
- editCell: (...args: any[]) => any;
295
- commitEditing: (...args: any[]) => any;
296
- editRow: (...args: any[]) => any;
297
- getSelectedRange: (...args: any[]) => any;
298
- cut: (...args: any[]) => any;
299
- undo: (...args: any[]) => any;
300
- redo: (...args: any[]) => any;
301
- canUndo: (...args: any[]) => any;
302
- canRedo: (...args: any[]) => any;
303
- clearHistory: (...args: any[]) => any;
361
+ getScrollElement: () => HTMLElement | null;
362
+ getRowIndexRelativeToPage: (absRow?: number) => number;
363
+ editCell: (rowIndex: number, colIndex: number) => void;
364
+ commitEditing: () => void;
365
+ editRow: (rowIndex: number) => void;
366
+ getSelectedRange: () => DataTableRange;
367
+ cut: () => void;
368
+ undo: () => void;
369
+ redo: () => void;
370
+ canUndo: () => boolean;
371
+ canRedo: () => boolean;
372
+ clearHistory: () => void;
304
373
  }
305
374
  declare function DataTable(_props: DataTableProps): JSX.Element;
306
375
  //#endregion
@@ -669,4 +738,4 @@ interface DetailPanelProps {
669
738
  }
670
739
  declare function DetailPanel(_props: DetailPanelProps): JSX.Element;
671
740
  //#endregion
672
- export { Column, DataTable, DataTable as default, type DataTableHandle, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar };
741
+ export { Column, DataTable, DataTable as default, DataTableActiveCell, DataTableActiveCellChangePayload, DataTableCellChange, DataTableCellEditCommitPayload, DataTableCellPosition, DataTableFilterChangePayload, DataTableGroupableColumn, type DataTableHandle, DataTableHistoryChangePayload, DataTableRange, DataTableRangeChangePayload, DataTableRowActivatePayload, DataTableRowEditCommitPayload, DataTableVisibleRangeChangePayload, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar };