@bsol-oss/react-datatable5 12.0.0-beta.88 → 12.0.0-beta.89
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.ts +11 -3
- package/dist/index.js +250 -99
- package/dist/index.mjs +250 -100
- package/dist/types/components/DataTable/controls/DensityFeature.d.ts +3 -3
- package/dist/types/components/DataTable/controls/SelectAllRowsToggle.d.ts +1 -1
- package/dist/types/components/DataTable/display/TableBody.d.ts +1 -1
- package/dist/types/components/DataTable/display/TableCards.d.ts +3 -3
- package/dist/types/components/DataTable/display/TableHeader.d.ts +1 -1
- package/dist/types/components/DataTable/utils/selectors.d.ts +53 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { OnChangeFn, Row, RowSelectionState, Table } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* Custom selector utilities to replace TanStack table selector primitives.
|
|
4
|
+
* These work directly with rowSelection state instead of using table's built-in selectors.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Get all selected rows from the table based on rowSelection state
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSelectedRows<TData>(table: Table<TData>, rowSelection: RowSelectionState): Row<TData>[];
|
|
10
|
+
/**
|
|
11
|
+
* Get the count of selected rows
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSelectedRowCount<TData>(table: Table<TData>, rowSelection: RowSelectionState): number;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a specific row is selected
|
|
16
|
+
*/
|
|
17
|
+
export declare function isRowSelected(rowId: string, rowSelection: RowSelectionState): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Check if all rows in the table are selected
|
|
20
|
+
*/
|
|
21
|
+
export declare function areAllRowsSelected<TData>(table: Table<TData>, rowSelection: RowSelectionState): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Check if all rows on the current page are selected
|
|
24
|
+
*/
|
|
25
|
+
export declare function areAllPageRowsSelected<TData>(table: Table<TData>, rowSelection: RowSelectionState): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if some (but not all) rows are selected
|
|
28
|
+
*/
|
|
29
|
+
export declare function areSomeRowsSelected<TData>(table: Table<TData>, rowSelection: RowSelectionState): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Check if some (but not all) page rows are selected
|
|
32
|
+
*/
|
|
33
|
+
export declare function areSomePageRowsSelected<TData>(table: Table<TData>, rowSelection: RowSelectionState): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Create a toggle handler for a specific row
|
|
36
|
+
*/
|
|
37
|
+
export declare function createRowToggleHandler<TData>(row: Row<TData>, rowSelection: RowSelectionState, setRowSelection: OnChangeFn<RowSelectionState>): () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Create a toggle handler for all rows
|
|
40
|
+
*/
|
|
41
|
+
export declare function createToggleAllRowsHandler<TData>(table: Table<TData>, rowSelection: RowSelectionState, setRowSelection: OnChangeFn<RowSelectionState>): () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Create a toggle handler for all page rows
|
|
44
|
+
*/
|
|
45
|
+
export declare function createToggleAllPageRowsHandler<TData>(table: Table<TData>, rowSelection: RowSelectionState, setRowSelection: OnChangeFn<RowSelectionState>): () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Reset row selection (clear all selections)
|
|
48
|
+
*/
|
|
49
|
+
export declare function resetRowSelection(setRowSelection: OnChangeFn<RowSelectionState>): void;
|
|
50
|
+
/**
|
|
51
|
+
* Check if a row can be selected (always true for now, can be extended)
|
|
52
|
+
*/
|
|
53
|
+
export declare function canRowSelect<TData>(row: Row<TData>): boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export * from './components/DataTable/controls/ViewDialog';
|
|
|
92
92
|
export * from './components/DataTable/controls/ReloadButton';
|
|
93
93
|
export * from './components/Filter/GlobalFilter';
|
|
94
94
|
export * from './components/DataTable/controls/TableSelector';
|
|
95
|
+
export * from './components/DataTable/controls/SelectAllRowsToggle';
|
|
95
96
|
export * from './components/DataTable/controls/TableSorter';
|
|
96
97
|
export * from './components/DataTable/controls/TableViewer';
|
|
97
98
|
export * from './components/DataTable/controls/TableControls';
|