@tanstack/table-core 8.0.0-alpha.64 → 8.0.0-alpha.68
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/build/cjs/aggregationFns.js +25 -37
- package/build/cjs/aggregationFns.js.map +1 -1
- package/build/cjs/core.js +167 -47
- package/build/cjs/core.js.map +1 -1
- package/build/cjs/createTable.js +24 -40
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/Cells.js +29 -35
- package/build/cjs/features/Cells.js.map +1 -1
- package/build/cjs/features/ColumnSizing.js +126 -218
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Columns.js +59 -86
- package/build/cjs/features/Columns.js.map +1 -1
- package/build/cjs/features/Expanding.js +78 -125
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Filters.js +143 -218
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +70 -116
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Headers.js +125 -205
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/cjs/features/Ordering.js +31 -43
- package/build/cjs/features/Ordering.js.map +1 -1
- package/build/cjs/features/Pagination.js +64 -72
- package/build/cjs/features/Pagination.js.map +1 -1
- package/build/cjs/features/Pinning.js +96 -177
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/RowSelection.js +134 -205
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Rows.js +32 -22
- package/build/cjs/features/Rows.js.map +1 -1
- package/build/cjs/features/Sorting.js +62 -131
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js +53 -120
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/filterFns.js +52 -133
- package/build/cjs/filterFns.js.map +1 -1
- package/build/cjs/index.js +13 -13
- package/build/cjs/sortingFns.js +21 -21
- package/build/cjs/sortingFns.js.map +1 -1
- package/build/cjs/utils/filterRowsUtils.js +56 -41
- package/build/cjs/utils/filterRowsUtils.js.map +1 -1
- package/build/cjs/utils/getCoreRowModel.js +98 -0
- package/build/cjs/utils/getCoreRowModel.js.map +1 -0
- package/build/cjs/utils/getExpandedRowModel.js +18 -22
- package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
- package/build/cjs/utils/getFacetedMinMaxValues.js +48 -0
- package/build/cjs/utils/getFacetedMinMaxValues.js.map +1 -0
- package/build/cjs/utils/getFacetedRowModel.js +50 -0
- package/build/cjs/utils/getFacetedRowModel.js.map +1 -0
- package/build/cjs/utils/getFacetedUniqueValues.js +48 -0
- package/build/cjs/utils/getFacetedUniqueValues.js.map +1 -0
- package/build/cjs/utils/getFilteredRowModel.js +130 -0
- package/build/cjs/utils/getFilteredRowModel.js.map +1 -0
- package/build/cjs/utils/getGroupedRowModel.js +126 -136
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/cjs/utils/getPaginationRowModel.js +39 -39
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
- package/build/cjs/utils/getSortedRowModel.js +112 -0
- package/build/cjs/utils/getSortedRowModel.js.map +1 -0
- package/build/cjs/utils.js +36 -211
- package/build/cjs/utils.js.map +1 -1
- package/build/esm/index.js +1970 -2956
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +390 -482
- package/build/types/core.d.ts +3 -5
- package/build/types/features/Cells.d.ts +1 -1
- package/build/types/features/ColumnSizing.d.ts +2 -13
- package/build/types/features/Columns.d.ts +1 -1
- package/build/types/features/Expanding.d.ts +1 -6
- package/build/types/features/Filters.d.ts +42 -30
- package/build/types/features/Grouping.d.ts +4 -10
- package/build/types/features/Pinning.d.ts +0 -4
- package/build/types/features/RowSelection.d.ts +1 -7
- package/build/types/features/Rows.d.ts +4 -3
- package/build/types/features/Sorting.d.ts +3 -14
- package/build/types/features/Visibility.d.ts +0 -4
- package/build/types/filterFns.d.ts +10 -52
- package/build/types/index.d.ts +6 -5
- package/build/types/types.d.ts +5 -17
- package/build/types/utils/filterRowsUtils.d.ts +3 -2
- package/build/types/utils/getCoreRowModel.d.ts +2 -0
- package/build/types/utils/getFacetedMinMaxValues.d.ts +2 -0
- package/build/types/utils/getFacetedRowModel.d.ts +2 -0
- package/build/types/utils/getFacetedUniqueValues.d.ts +2 -0
- package/build/types/utils/{getCoreRowModelSync.d.ts → getFilteredRowModel.d.ts} +1 -1
- package/build/types/utils/getGroupedRowModel.d.ts +1 -1
- package/build/types/utils/getSortedRowModel.d.ts +2 -0
- package/build/types/utils.d.ts +2 -18
- package/build/umd/index.development.js +1948 -2935
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -1
- package/src/core.ts +197 -46
- package/src/features/Cells.ts +10 -12
- package/src/features/ColumnSizing.ts +72 -129
- package/src/features/Columns.ts +16 -15
- package/src/features/Expanding.ts +58 -105
- package/src/features/Filters.ts +223 -226
- package/src/features/Grouping.ts +51 -79
- package/src/features/Headers.ts +18 -40
- package/src/features/Ordering.ts +1 -1
- package/src/features/Pagination.ts +1 -1
- package/src/features/Pinning.ts +73 -92
- package/src/features/RowSelection.ts +71 -120
- package/src/features/Rows.ts +21 -6
- package/src/features/Sorting.ts +39 -99
- package/src/features/Visibility.ts +21 -50
- package/src/filterFns.ts +74 -147
- package/src/index.ts +12 -5
- package/src/sortingFns.ts +11 -11
- package/src/types.ts +5 -18
- package/src/utils/filterRowsUtils.ts +59 -56
- package/src/utils/{getCoreRowModelSync.ts → getCoreRowModel.ts} +3 -9
- package/src/utils/getExpandedRowModel.ts +2 -2
- package/src/utils/getFacetedMinMaxValues.ts +37 -0
- package/src/utils/getFacetedRowModel.ts +50 -0
- package/src/utils/getFacetedUniqueValues.ts +37 -0
- package/src/utils/getFilteredRowModel.ts +150 -0
- package/src/utils/getGroupedRowModel.ts +53 -62
- package/src/utils/getPaginationRowModel.ts +1 -1
- package/src/utils/{getSortedRowModelSync.ts → getSortedRowModel.ts} +7 -7
- package/src/utils.ts +29 -239
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -112
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/build/cjs/utils/getColumnFilteredRowModelSync.js +0 -115
- package/build/cjs/utils/getColumnFilteredRowModelSync.js.map +0 -1
- package/build/cjs/utils/getCoreRowModelAsync.js +0 -125
- package/build/cjs/utils/getCoreRowModelAsync.js.map +0 -1
- package/build/cjs/utils/getCoreRowModelSync.js +0 -102
- package/build/cjs/utils/getCoreRowModelSync.js.map +0 -1
- package/build/cjs/utils/getGlobalFilteredRowModelSync.js +0 -91
- package/build/cjs/utils/getGlobalFilteredRowModelSync.js.map +0 -1
- package/build/cjs/utils/getSortedRowModelSync.js +0 -118
- package/build/cjs/utils/getSortedRowModelSync.js.map +0 -1
- package/build/types/utils/getColumnFilteredRowModelAsync.d.ts +0 -4
- package/build/types/utils/getColumnFilteredRowModelSync.d.ts +0 -2
- package/build/types/utils/getCoreRowModelAsync.d.ts +0 -4
- package/build/types/utils/getGlobalFilteredRowModelAsync.d.ts +0 -4
- package/build/types/utils/getGlobalFilteredRowModelSync.d.ts +0 -2
- package/build/types/utils/getSortedRowModelAsync.d.ts +0 -13
- package/build/types/utils/getSortedRowModelSync.d.ts +0 -2
- package/src/utils/getColumnFilteredRowModelAsync.ts +0 -118
- package/src/utils/getColumnFilteredRowModelSync.ts +0 -102
- package/src/utils/getCoreRowModelAsync.ts +0 -104
- package/src/utils/getGlobalFilteredRowModelAsync.ts +0 -96
- package/src/utils/getGlobalFilteredRowModelSync.ts +0 -79
- package/src/utils/getSortedRowModelAsync.ts +0 -200
package/build/types/core.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { RequiredKeys } from './utils';
|
|
2
2
|
import { Updater, TableOptions, TableState, TableInstance, Renderable, TableFeature, TableGenerics, InitialTableState } from './types';
|
|
3
|
-
export declare type CoreTableState = {
|
|
4
|
-
coreProgress: number;
|
|
5
|
-
};
|
|
3
|
+
export declare type CoreTableState = {};
|
|
6
4
|
export declare type CoreOptions<TGenerics extends TableGenerics> = {
|
|
7
5
|
data: TGenerics['Row'][];
|
|
8
6
|
state: Partial<TableState>;
|
|
@@ -16,9 +14,10 @@ export declare type CoreOptions<TGenerics extends TableGenerics> = {
|
|
|
16
14
|
initialState?: InitialTableState;
|
|
17
15
|
autoResetAll?: boolean;
|
|
18
16
|
mergeOptions?: <T>(defaultOptions: T, options: Partial<T>) => T;
|
|
17
|
+
keepPreviousData?: boolean;
|
|
19
18
|
meta?: TGenerics['TableMeta'];
|
|
20
19
|
};
|
|
21
|
-
export declare type
|
|
20
|
+
export declare type CoreInstance<TGenerics extends TableGenerics> = {
|
|
22
21
|
initialState: TableState;
|
|
23
22
|
reset: () => void;
|
|
24
23
|
options: RequiredKeys<TableOptions<TGenerics>, 'state'>;
|
|
@@ -27,7 +26,6 @@ export declare type TableCore<TGenerics extends TableGenerics> = {
|
|
|
27
26
|
getState: () => TableState;
|
|
28
27
|
setState: (updater: Updater<TableState>) => void;
|
|
29
28
|
render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | TGenerics['Rendered'];
|
|
30
|
-
getOverallProgress: () => number;
|
|
31
29
|
_features: readonly TableFeature[];
|
|
32
30
|
};
|
|
33
31
|
export declare function createTableInstance<TGenerics extends TableGenerics>(options: TableOptions<TGenerics>): TableInstance<TGenerics>;
|
|
@@ -4,7 +4,7 @@ export declare type CellsRow<TGenerics extends TableGenerics> = {
|
|
|
4
4
|
getAllCellsByColumnId: () => Record<string, Cell<TGenerics>>;
|
|
5
5
|
};
|
|
6
6
|
export declare type CellsInstance<TGenerics extends TableGenerics> = {
|
|
7
|
-
createCell: (row: Row<TGenerics>, column: Column<TGenerics>,
|
|
7
|
+
createCell: (row: Row<TGenerics>, column: Column<TGenerics>, columnId: string) => Cell<TGenerics>;
|
|
8
8
|
getCell: (rowId: string, columnId: string) => Cell<TGenerics>;
|
|
9
9
|
};
|
|
10
10
|
export declare const Cells: {
|
|
@@ -26,19 +26,10 @@ export declare type ColumnSizingDefaultOptions = {
|
|
|
26
26
|
onColumnSizingInfoChange: OnChangeFn<ColumnSizingInfoState>;
|
|
27
27
|
};
|
|
28
28
|
export declare type ColumnSizingInstance<TGenerics extends TableGenerics> = {
|
|
29
|
-
getColumnSize: (columnId: string) => number;
|
|
30
|
-
getColumnStart: (columnId: string, position?: ColumnPinningPosition) => number;
|
|
31
29
|
setColumnSizing: (updater: Updater<ColumnSizingState>) => void;
|
|
32
30
|
setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void;
|
|
33
31
|
resetColumnSizing: () => void;
|
|
34
|
-
resetColumnSize: (columnId: string) => void;
|
|
35
|
-
resetHeaderSize: (headerId: string) => void;
|
|
36
32
|
resetHeaderSizeInfo: () => void;
|
|
37
|
-
getColumnCanResize: (columnId: string) => boolean;
|
|
38
|
-
getHeaderCanResize: (headerId: string) => boolean;
|
|
39
|
-
getResizeHandler: (headerId: string) => (event: unknown) => void;
|
|
40
|
-
getColumnIsResizing: (columnId: string) => boolean;
|
|
41
|
-
getHeaderIsResizing: (headerId: string) => boolean;
|
|
42
33
|
getTotalSize: () => number;
|
|
43
34
|
getLeftTotalSize: () => number;
|
|
44
35
|
getCenterTotalSize: () => number;
|
|
@@ -46,7 +37,6 @@ export declare type ColumnSizingInstance<TGenerics extends TableGenerics> = {
|
|
|
46
37
|
};
|
|
47
38
|
export declare type ColumnSizingColumnDef = {
|
|
48
39
|
enableResizing?: boolean;
|
|
49
|
-
defaultCanResize?: boolean;
|
|
50
40
|
size?: number;
|
|
51
41
|
minSize?: number;
|
|
52
42
|
maxSize?: number;
|
|
@@ -59,10 +49,9 @@ export declare type ColumnSizingColumn<TGenerics extends TableGenerics> = {
|
|
|
59
49
|
resetSize: () => void;
|
|
60
50
|
};
|
|
61
51
|
export declare type ColumnSizingHeader<TGenerics extends TableGenerics> = {
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
getSize: () => number;
|
|
53
|
+
getStart: (position?: ColumnPinningPosition) => number;
|
|
64
54
|
getResizeHandler: () => (event: unknown) => void;
|
|
65
|
-
resetSize: () => void;
|
|
66
55
|
};
|
|
67
56
|
export declare const defaultColumnSizing: {
|
|
68
57
|
size: number;
|
|
@@ -20,7 +20,7 @@ export declare type CoreColumnDef<TGenerics extends TableGenerics> = {
|
|
|
20
20
|
row: Row<TGenerics>;
|
|
21
21
|
column: Column<TGenerics>;
|
|
22
22
|
cell: Cell<TGenerics>;
|
|
23
|
-
|
|
23
|
+
getValue: () => TGenerics['Value'];
|
|
24
24
|
}>;
|
|
25
25
|
meta?: TGenerics['ColumnMeta'];
|
|
26
26
|
};
|
|
@@ -15,10 +15,9 @@ export declare type ExpandedOptions<TGenerics extends TableGenerics> = {
|
|
|
15
15
|
manualExpanding?: boolean;
|
|
16
16
|
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
17
17
|
autoResetExpanded?: boolean;
|
|
18
|
-
|
|
18
|
+
enableExpanding?: boolean;
|
|
19
19
|
getExpandedRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
20
20
|
expandSubRows?: boolean;
|
|
21
|
-
defaultCanExpand?: boolean;
|
|
22
21
|
getIsRowExpanded?: (row: Row<TGenerics>) => boolean;
|
|
23
22
|
getRowCanExpand?: (row: Row<TGenerics>) => boolean;
|
|
24
23
|
paginateExpandedRows?: boolean;
|
|
@@ -26,13 +25,9 @@ export declare type ExpandedOptions<TGenerics extends TableGenerics> = {
|
|
|
26
25
|
export declare type ExpandedInstance<TGenerics extends TableGenerics> = {
|
|
27
26
|
_autoResetExpanded: () => void;
|
|
28
27
|
setExpanded: (updater: Updater<ExpandedState>) => void;
|
|
29
|
-
toggleRowExpanded: (rowId: string, expanded?: boolean) => void;
|
|
30
28
|
toggleAllRowsExpanded: (expanded?: boolean) => void;
|
|
31
29
|
resetExpanded: () => void;
|
|
32
|
-
getRowCanExpand: (rowId: string) => boolean;
|
|
33
30
|
getCanSomeRowsExpand: () => boolean;
|
|
34
|
-
getIsRowExpanded: (rowId: string) => boolean;
|
|
35
|
-
getToggleExpandedHandler: (rowId: string) => undefined | (() => void);
|
|
36
31
|
getToggleAllRowsExpandedHandler: () => (event: unknown) => void;
|
|
37
32
|
getIsSomeRowsExpanded: () => boolean;
|
|
38
33
|
getIsAllRowsExpanded: () => boolean;
|
|
@@ -5,19 +5,24 @@ import { Overwrite } from '../utils';
|
|
|
5
5
|
export declare type FiltersTableState = {
|
|
6
6
|
columnFilters: ColumnFiltersState;
|
|
7
7
|
globalFilter: any;
|
|
8
|
-
columnFiltersProgress: number;
|
|
9
|
-
globalFilterProgress: number;
|
|
10
8
|
};
|
|
11
9
|
export declare type ColumnFiltersState = ColumnFilter[];
|
|
12
10
|
export declare type ColumnFilter = {
|
|
13
11
|
id: string;
|
|
14
12
|
value: unknown;
|
|
15
13
|
};
|
|
14
|
+
export declare type ResolvedColumnFilter<TGenerics extends TableGenerics> = {
|
|
15
|
+
id: string;
|
|
16
|
+
resolvedValue: unknown;
|
|
17
|
+
filterFn: FilterFn<TGenerics>;
|
|
18
|
+
};
|
|
16
19
|
export declare type FilterFn<TGenerics extends TableGenerics> = {
|
|
17
|
-
(
|
|
20
|
+
(row: Row<TGenerics>, columnId: string, filterValue: any): boolean;
|
|
21
|
+
resolveFilterValue?: TransformFilterValueFn<TGenerics>;
|
|
18
22
|
autoRemove?: ColumnFilterAutoRemoveTestFn<TGenerics>;
|
|
19
23
|
};
|
|
20
|
-
export declare type
|
|
24
|
+
export declare type TransformFilterValueFn<TGenerics extends TableGenerics> = (value: any, column?: Column<TGenerics>) => unknown;
|
|
25
|
+
export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends TableGenerics> = (value: any, column?: Column<TGenerics>) => boolean;
|
|
21
26
|
export declare type CustomFilterFns<TGenerics extends TableGenerics> = Record<string, FilterFn<TGenerics>>;
|
|
22
27
|
export declare type FilterFnOption<TGenerics extends TableGenerics> = 'auto' | BuiltInFilterFn | keyof TGenerics['FilterFns'] | FilterFn<TGenerics>;
|
|
23
28
|
export declare type FiltersColumnDef<TGenerics extends TableGenerics> = {
|
|
@@ -26,56 +31,63 @@ export declare type FiltersColumnDef<TGenerics extends TableGenerics> = {
|
|
|
26
31
|
}>>;
|
|
27
32
|
enableColumnFilter?: boolean;
|
|
28
33
|
enableGlobalFilter?: boolean;
|
|
34
|
+
enableFaceting?: boolean;
|
|
29
35
|
};
|
|
30
36
|
export declare type FiltersColumn<TGenerics extends TableGenerics> = {
|
|
31
37
|
filterFn: FilterFnOption<Overwrite<TGenerics, {
|
|
32
38
|
Value: any;
|
|
33
39
|
}>>;
|
|
34
|
-
|
|
40
|
+
getAutoFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
41
|
+
getFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
42
|
+
setFilterValue: (updater: Updater<any>) => void;
|
|
43
|
+
getCanFilter: () => boolean;
|
|
35
44
|
getCanGlobalFilter: () => boolean;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
getFacetedRowModel: () => RowModel<TGenerics>;
|
|
46
|
+
_getFacetedRowModel?: () => RowModel<TGenerics>;
|
|
47
|
+
getIsFiltered: () => boolean;
|
|
48
|
+
getFilterValue: () => unknown;
|
|
49
|
+
getFilterIndex: () => number;
|
|
50
|
+
getFacetedUniqueValues: () => Map<any, number>;
|
|
51
|
+
_getFacetedUniqueValues?: () => Map<any, number>;
|
|
52
|
+
getFacetedMinMaxValues: () => [any, any];
|
|
53
|
+
_getFacetedMinMaxValues?: () => [any, any];
|
|
54
|
+
};
|
|
55
|
+
export declare type FiltersRow<TGenerics extends TableGenerics> = {
|
|
56
|
+
columnFilterMap: Record<string, boolean>;
|
|
57
|
+
subRowsByFacetId: Record<string, Row<TGenerics>[]>;
|
|
43
58
|
};
|
|
44
59
|
export declare type FiltersOptions<TGenerics extends TableGenerics> = {
|
|
60
|
+
enableFilters?: boolean;
|
|
61
|
+
manualFiltering?: boolean;
|
|
45
62
|
filterFromLeafRows?: boolean;
|
|
46
63
|
filterFns?: TGenerics['FilterFns'];
|
|
47
|
-
|
|
64
|
+
getFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
48
65
|
onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
|
|
49
66
|
enableColumnFilters?: boolean;
|
|
50
|
-
getColumnFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
51
|
-
manualGlobalFiltering?: boolean;
|
|
52
67
|
globalFilterFn?: FilterFnOption<TGenerics>;
|
|
53
68
|
onGlobalFilterChange?: OnChangeFn<any>;
|
|
54
69
|
enableGlobalFilter?: boolean;
|
|
55
|
-
getGlobalFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
56
70
|
getColumnCanGlobalFilter?: (column: Column<TGenerics>) => boolean;
|
|
71
|
+
getFacetedRowModel?: (instance: TableInstance<TGenerics>, columnId: string) => () => RowModel<TGenerics>;
|
|
72
|
+
getFacetedUniqueValues?: (instance: TableInstance<TGenerics>, columnId: string) => () => Map<any, number>;
|
|
73
|
+
getFacetedMinMaxValues?: (instance: TableInstance<TGenerics>, columnId: string) => () => [number, number];
|
|
57
74
|
};
|
|
58
75
|
export declare type FiltersInstance<TGenerics extends TableGenerics> = {
|
|
59
|
-
getColumnAutoFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
|
|
60
|
-
getColumnFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
|
|
61
76
|
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void;
|
|
62
|
-
setColumnFilterValue: (columnId: string, updater: Updater<any>) => void;
|
|
63
77
|
resetColumnFilters: () => void;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
getColumnFilterIndex: (columnId: string) => number;
|
|
68
|
-
getPreColumnFilteredRowModel: () => RowModel<TGenerics>;
|
|
69
|
-
getColumnFilteredRowModel: () => RowModel<TGenerics>;
|
|
70
|
-
_getColumnFilteredRowModel?: () => RowModel<TGenerics>;
|
|
78
|
+
getPreFilteredRowModel: () => RowModel<TGenerics>;
|
|
79
|
+
getFilteredRowModel: () => RowModel<TGenerics>;
|
|
80
|
+
_getFilteredRowModel?: () => RowModel<TGenerics>;
|
|
71
81
|
setGlobalFilter: (updater: Updater<any>) => void;
|
|
72
82
|
resetGlobalFilter: () => void;
|
|
73
83
|
getGlobalAutoFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
74
84
|
getGlobalFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
getGlobalFacetedRowModel: () => RowModel<TGenerics>;
|
|
86
|
+
_getGlobalFacetedRowModel?: () => RowModel<TGenerics>;
|
|
87
|
+
getGlobalFacetedUniqueValues: () => Map<any, number>;
|
|
88
|
+
_getGlobalFacetedUniqueValues?: () => Map<any, number>;
|
|
89
|
+
getGlobalFacetedMinMaxValues: () => [number, number];
|
|
90
|
+
_getGlobalFacetedMinMaxValues?: () => [number, number];
|
|
79
91
|
};
|
|
80
92
|
export declare const Filters: TableFeature;
|
|
81
93
|
export declare function shouldAutoRemoveFilter<TGenerics extends TableGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean;
|
|
@@ -19,10 +19,9 @@ export declare type GroupingColumnDef<TGenerics extends TableGenerics> = {
|
|
|
19
19
|
row: Row<TGenerics>;
|
|
20
20
|
column: Column<TGenerics>;
|
|
21
21
|
cell: Cell<TGenerics>;
|
|
22
|
-
|
|
22
|
+
getValue: () => TGenerics['Value'];
|
|
23
23
|
}>;
|
|
24
24
|
enableGrouping?: boolean;
|
|
25
|
-
defaultCanGroup?: boolean;
|
|
26
25
|
};
|
|
27
26
|
export declare type GroupingColumn<TGenerics extends TableGenerics> = {
|
|
28
27
|
aggregationFn?: AggregationFnOption<Overwrite<TGenerics, {
|
|
@@ -33,11 +32,14 @@ export declare type GroupingColumn<TGenerics extends TableGenerics> = {
|
|
|
33
32
|
getGroupedIndex: () => number;
|
|
34
33
|
toggleGrouping: () => void;
|
|
35
34
|
getToggleGroupingHandler: () => () => void;
|
|
35
|
+
getColumnAutoAggregationFn: () => AggregationFn<TGenerics> | undefined;
|
|
36
|
+
getColumnAggregationFn: () => AggregationFn<TGenerics> | undefined;
|
|
36
37
|
};
|
|
37
38
|
export declare type GroupingRow = {
|
|
38
39
|
groupingColumnId?: string;
|
|
39
40
|
groupingValue?: any;
|
|
40
41
|
getIsGrouped: () => boolean;
|
|
42
|
+
groupingValuesCache: Record<string, any>;
|
|
41
43
|
};
|
|
42
44
|
export declare type GroupingCell<TGenerics extends TableGenerics> = {
|
|
43
45
|
getIsGrouped: () => boolean;
|
|
@@ -60,16 +62,8 @@ export declare type GroupingOptions<TGenerics extends TableGenerics> = {
|
|
|
60
62
|
};
|
|
61
63
|
export declare type GroupingColumnMode = false | 'reorder' | 'remove';
|
|
62
64
|
export declare type GroupingInstance<TGenerics extends TableGenerics> = {
|
|
63
|
-
getColumnAutoAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
64
|
-
getColumnAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
65
65
|
setGrouping: (updater: Updater<GroupingState>) => void;
|
|
66
66
|
resetGrouping: () => void;
|
|
67
|
-
toggleColumnGrouping: (columnId: string) => void;
|
|
68
|
-
getColumnCanGroup: (columnId: string) => boolean;
|
|
69
|
-
getColumnIsGrouped: (columnId: string) => boolean;
|
|
70
|
-
getColumnGroupedIndex: (columnId: string) => number;
|
|
71
|
-
getToggleGroupingHandler: (columnId: string) => undefined | (() => void);
|
|
72
|
-
getRowIsGrouped: (rowId: string) => boolean;
|
|
73
67
|
getPreGroupedRowModel: () => RowModel<TGenerics>;
|
|
74
68
|
getGroupedRowModel: () => RowModel<TGenerics>;
|
|
75
69
|
_getGroupedRowModel?: () => RowModel<TGenerics>;
|
|
@@ -31,10 +31,6 @@ export declare type ColumnPinningRow<TGenerics extends TableGenerics> = {
|
|
|
31
31
|
export declare type ColumnPinningInstance<TGenerics extends TableGenerics> = {
|
|
32
32
|
setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
33
33
|
resetColumnPinning: () => void;
|
|
34
|
-
pinColumn: (columnId: string, position: ColumnPinningPosition) => void;
|
|
35
|
-
getColumnCanPin: (columnId: string) => boolean;
|
|
36
|
-
getColumnIsPinned: (columnId: string) => ColumnPinningPosition;
|
|
37
|
-
getColumnPinnedIndex: (columnId: string) => number;
|
|
38
34
|
getIsSomeColumnsPinned: () => boolean;
|
|
39
35
|
getLeftLeafColumns: () => Column<TGenerics>[];
|
|
40
36
|
getRightLeafColumns: () => Column<TGenerics>[];
|
|
@@ -14,21 +14,15 @@ export declare type RowSelectionRow = {
|
|
|
14
14
|
getIsSomeSelected: () => boolean;
|
|
15
15
|
getCanSelect: () => boolean;
|
|
16
16
|
getCanMultiSelect: () => boolean;
|
|
17
|
+
getCanSelectSubRows: () => boolean;
|
|
17
18
|
toggleSelected: (value?: boolean) => void;
|
|
18
19
|
getToggleSelectedHandler: () => (event: unknown) => void;
|
|
19
20
|
};
|
|
20
21
|
export declare type RowSelectionInstance<TGenerics extends TableGenerics> = {
|
|
21
|
-
getToggleRowSelectedHandler: (rowId: string) => undefined | ((e: unknown) => void);
|
|
22
22
|
getToggleAllRowsSelectedHandler: () => (event: unknown) => void;
|
|
23
23
|
getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void;
|
|
24
24
|
setRowSelection: (updater: Updater<RowSelectionState>) => void;
|
|
25
25
|
resetRowSelection: () => void;
|
|
26
|
-
toggleRowSelected: (rowId: string, value?: boolean) => void;
|
|
27
|
-
getRowCanSelect: (rowId: string) => boolean;
|
|
28
|
-
getRowCanSelectSubRows: (rowId: string) => boolean;
|
|
29
|
-
getRowCanMultiSelect: (rowId: string) => boolean;
|
|
30
|
-
getRowIsSelected: (rowId: string) => boolean;
|
|
31
|
-
getRowIsSomeSelected: (rowId: string) => boolean;
|
|
32
26
|
getIsAllRowsSelected: () => boolean;
|
|
33
27
|
getIsAllPageRowsSelected: () => boolean;
|
|
34
28
|
getIsSomeRowsSelected: () => boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { TableGenerics, TableInstance, Row, RowModel
|
|
1
|
+
import { TableGenerics, TableInstance, Row, RowModel } from '../types';
|
|
2
2
|
export declare type CoreRow<TGenerics extends TableGenerics> = {
|
|
3
3
|
id: string;
|
|
4
4
|
index: number;
|
|
5
5
|
original?: TGenerics['Row'];
|
|
6
6
|
depth: number;
|
|
7
|
-
|
|
7
|
+
valuesCache: Record<string, any>;
|
|
8
|
+
getValue: (columnId: string) => any;
|
|
8
9
|
subRows: Row<TGenerics>[];
|
|
9
10
|
getLeafRows: () => Row<TGenerics>[];
|
|
10
11
|
originalSubRows?: TGenerics['Row'][];
|
|
@@ -16,7 +17,7 @@ export declare type RowsOptions<TGenerics extends TableGenerics> = {
|
|
|
16
17
|
};
|
|
17
18
|
export declare type RowsInstance<TGenerics extends TableGenerics> = {
|
|
18
19
|
getRowId: (_: TGenerics['Row'], index: number, parent?: Row<TGenerics>) => string;
|
|
19
|
-
createRow: (id: string, original: TGenerics['Row'] | undefined, rowIndex: number, depth: number,
|
|
20
|
+
createRow: (id: string, original: TGenerics['Row'] | undefined, rowIndex: number, depth: number, subRows?: Row<TGenerics>[]) => Row<TGenerics>;
|
|
20
21
|
getCoreRowModel: () => RowModel<TGenerics>;
|
|
21
22
|
_getCoreRowModel?: () => RowModel<TGenerics>;
|
|
22
23
|
getRowModel: () => RowModel<TGenerics>;
|
|
@@ -23,14 +23,13 @@ export declare type SortingColumnDef<TGenerics extends TableGenerics> = {
|
|
|
23
23
|
sortDescFirst?: boolean;
|
|
24
24
|
enableSorting?: boolean;
|
|
25
25
|
enableMultiSort?: boolean;
|
|
26
|
-
defaultCanSort?: boolean;
|
|
27
26
|
invertSorting?: boolean;
|
|
28
27
|
sortUndefined?: false | -1 | 1;
|
|
29
28
|
};
|
|
30
29
|
export declare type SortingColumn<TGenerics extends TableGenerics> = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
getAutoSortingFn: () => SortingFn<TGenerics>;
|
|
31
|
+
getAutoSortDir: () => SortDirection;
|
|
32
|
+
getSortingFn: () => SortingFn<TGenerics>;
|
|
34
33
|
getCanSort: () => boolean;
|
|
35
34
|
getCanMultiSort: () => boolean;
|
|
36
35
|
getSortIndex: () => number;
|
|
@@ -53,17 +52,7 @@ export declare type SortingOptions<TGenerics extends TableGenerics> = {
|
|
|
53
52
|
isMultiSortEvent?: (e: unknown) => boolean;
|
|
54
53
|
};
|
|
55
54
|
export declare type SortingInstance<TGenerics extends TableGenerics> = {
|
|
56
|
-
getColumnAutoSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined;
|
|
57
|
-
getColumnAutoSortDir: (columnId: string) => SortDirection;
|
|
58
|
-
getColumnSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined;
|
|
59
55
|
setSorting: (updater: Updater<SortingState>) => void;
|
|
60
|
-
toggleColumnSorting: (columnId: string, desc?: boolean, multi?: boolean) => void;
|
|
61
|
-
resetSorting: (columnId?: string) => void;
|
|
62
|
-
getColumnCanSort: (columnId: string) => boolean;
|
|
63
|
-
getColumnCanMultiSort: (columnId: string) => boolean;
|
|
64
|
-
getColumnIsSorted: (columnId: string) => false | 'asc' | 'desc';
|
|
65
|
-
getColumnSortIndex: (columnId: string) => number;
|
|
66
|
-
getToggleSortingHandler: (columnId: string) => undefined | ((event: unknown) => void);
|
|
67
56
|
getPreSortedRowModel: () => RowModel<TGenerics>;
|
|
68
57
|
getSortedRowModel: () => RowModel<TGenerics>;
|
|
69
58
|
_getSortedRowModel?: () => RowModel<TGenerics>;
|
|
@@ -17,17 +17,13 @@ export declare type VisibilityInstance<TGenerics extends TableGenerics> = {
|
|
|
17
17
|
getRightVisibleLeafColumns: () => Column<TGenerics>[];
|
|
18
18
|
getCenterVisibleLeafColumns: () => Column<TGenerics>[];
|
|
19
19
|
setColumnVisibility: (updater: Updater<VisibilityState>) => void;
|
|
20
|
-
toggleColumnVisibility: (columnId: string, value?: boolean) => void;
|
|
21
20
|
toggleAllColumnsVisible: (value?: boolean) => void;
|
|
22
|
-
getColumnIsVisible: (columId: string) => boolean;
|
|
23
|
-
getColumnCanHide: (columnId: string) => boolean;
|
|
24
21
|
getIsAllColumnsVisible: () => boolean;
|
|
25
22
|
getIsSomeColumnsVisible: () => boolean;
|
|
26
23
|
getToggleAllColumnsVisibilityHandler: () => undefined | ((event: unknown) => void);
|
|
27
24
|
};
|
|
28
25
|
export declare type VisibilityColumnDef = {
|
|
29
26
|
enableHiding?: boolean;
|
|
30
|
-
defaultCanHide?: boolean;
|
|
31
27
|
defaultIsVisible?: boolean;
|
|
32
28
|
};
|
|
33
29
|
export declare type VisibilityRow<TGenerics extends TableGenerics> = {
|
|
@@ -1,55 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterFn } from './features/Filters';
|
|
2
2
|
export declare const filterFns: {
|
|
3
|
-
includesString:
|
|
4
|
-
includesStringSensitive:
|
|
5
|
-
equalsString:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
betweenNumberRange: typeof betweenNumberRange;
|
|
3
|
+
includesString: FilterFn<any>;
|
|
4
|
+
includesStringSensitive: FilterFn<any>;
|
|
5
|
+
equalsString: FilterFn<any>;
|
|
6
|
+
arrIncludes: FilterFn<any>;
|
|
7
|
+
arrIncludesAll: FilterFn<any>;
|
|
8
|
+
arrIncludesSome: FilterFn<any>;
|
|
9
|
+
equals: FilterFn<any>;
|
|
10
|
+
weakEquals: FilterFn<any>;
|
|
11
|
+
inNumberRange: FilterFn<any>;
|
|
13
12
|
};
|
|
14
13
|
export declare type BuiltInFilterFn = keyof typeof filterFns;
|
|
15
|
-
declare function includesString<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
16
|
-
declare namespace includesString {
|
|
17
|
-
var autoRemove: (val: any) => boolean;
|
|
18
|
-
}
|
|
19
|
-
declare function includesStringSensitive<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
20
|
-
declare namespace includesStringSensitive {
|
|
21
|
-
var autoRemove: (val: any) => boolean;
|
|
22
|
-
}
|
|
23
|
-
declare function equalsString<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
24
|
-
declare namespace equalsString {
|
|
25
|
-
var autoRemove: (val: any) => boolean;
|
|
26
|
-
}
|
|
27
|
-
declare function equalsStringSensitive<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
28
|
-
declare namespace equalsStringSensitive {
|
|
29
|
-
var autoRemove: (val: any) => boolean;
|
|
30
|
-
}
|
|
31
|
-
declare function arrIncludes<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
32
|
-
declare namespace arrIncludes {
|
|
33
|
-
var autoRemove: (val: any) => boolean;
|
|
34
|
-
}
|
|
35
|
-
declare function arrIncludesAll<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown[]): Row<TGenerics>[];
|
|
36
|
-
declare namespace arrIncludesAll {
|
|
37
|
-
var autoRemove: (val: any) => boolean;
|
|
38
|
-
}
|
|
39
|
-
declare function arrIncludesSome<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown[]): Row<TGenerics>[];
|
|
40
|
-
declare namespace arrIncludesSome {
|
|
41
|
-
var autoRemove: (val: any) => boolean;
|
|
42
|
-
}
|
|
43
|
-
declare function equals<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
44
|
-
declare namespace equals {
|
|
45
|
-
var autoRemove: (val: any) => boolean;
|
|
46
|
-
}
|
|
47
|
-
declare function weakEquals<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
48
|
-
declare namespace weakEquals {
|
|
49
|
-
var autoRemove: (val: any) => boolean;
|
|
50
|
-
}
|
|
51
|
-
declare function betweenNumberRange<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: [unknown, unknown]): Row<TGenerics>[];
|
|
52
|
-
declare namespace betweenNumberRange {
|
|
53
|
-
var autoRemove: (val: any) => boolean;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
package/build/types/index.d.ts
CHANGED
|
@@ -15,11 +15,12 @@ export * from './features/Sorting';
|
|
|
15
15
|
export * from './features/Visibility';
|
|
16
16
|
export * from './features/Expanding';
|
|
17
17
|
export * from './utils';
|
|
18
|
-
export * from './utils/
|
|
19
|
-
export * from './utils/
|
|
20
|
-
export * from './utils/
|
|
21
|
-
export * from './utils/
|
|
22
|
-
export * from './utils/
|
|
18
|
+
export * from './utils/getCoreRowModel';
|
|
19
|
+
export * from './utils/getFilteredRowModel';
|
|
20
|
+
export * from './utils/getFacetedRowModel';
|
|
21
|
+
export * from './utils/getFacetedUniqueValues';
|
|
22
|
+
export * from './utils/getFacetedMinMaxValues';
|
|
23
|
+
export * from './utils/getSortedRowModel';
|
|
23
24
|
export * from './utils/getGroupedRowModel';
|
|
24
25
|
export * from './utils/getExpandedRowModel';
|
|
25
26
|
export * from './utils/getPaginationRowModel';
|
package/build/types/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CoreOptions, CoreTableState,
|
|
1
|
+
import { CoreOptions, CoreTableState, CoreInstance } from './core';
|
|
2
2
|
import { ColumnsOptions, CoreColumn, CoreColumnDef } from './features/Columns';
|
|
3
3
|
import { VisibilityInstance, VisibilityTableState, VisibilityColumn as ColumnVisibilityColumn, VisibilityOptions, VisibilityColumnDef, VisibilityRow } from './features/Visibility';
|
|
4
4
|
import { ColumnOrderInstance, ColumnOrderOptions, ColumnOrderTableState } from './features/Ordering';
|
|
5
5
|
import { ColumnPinningColumn, ColumnPinningColumnDef, ColumnPinningInstance, ColumnPinningOptions, ColumnPinningRow, ColumnPinningTableState } from './features/Pinning';
|
|
6
6
|
import { HeadersInstance } from './features/Headers';
|
|
7
|
-
import { FiltersColumn, FiltersColumnDef, FiltersInstance, FiltersOptions, FiltersTableState } from './features/Filters';
|
|
7
|
+
import { FiltersColumn, FiltersColumnDef, FiltersInstance, FiltersOptions, FiltersRow, FiltersTableState } from './features/Filters';
|
|
8
8
|
import { SortingColumn, SortingColumnDef, SortingInstance, SortingOptions, SortingTableState } from './features/Sorting';
|
|
9
9
|
import { GroupingCell, GroupingColumn, GroupingColumnDef, GroupingInstance, GroupingOptions, GroupingRow, GroupingTableState } from './features/Grouping';
|
|
10
10
|
import { ExpandedInstance, ExpandedOptions, ExpandedTableState, ExpandedRow } from './features/Expanding';
|
|
@@ -38,11 +38,11 @@ export declare type TableFeature = {
|
|
|
38
38
|
createCell?: (cell: any, column: any, row: any, instance: any) => any;
|
|
39
39
|
createRow?: (row: any, instance: any) => any;
|
|
40
40
|
};
|
|
41
|
-
export declare type TableInstance<TGenerics extends TableGenerics> =
|
|
41
|
+
export declare type TableInstance<TGenerics extends TableGenerics> = CoreInstance<TGenerics> & ColumnsInstance<TGenerics> & RowsInstance<TGenerics> & CellsInstance<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & HeadersInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>;
|
|
42
42
|
export declare type TableOptions<TGenerics extends TableGenerics> = CoreOptions<TGenerics> & ColumnsOptions<TGenerics> & RowsOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>;
|
|
43
43
|
export declare type TableState = CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState;
|
|
44
44
|
export declare type InitialTableState = Partial<CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationInitialTableState & RowSelectionTableState>;
|
|
45
|
-
export declare type Row<TGenerics extends TableGenerics> = CoreRow<TGenerics> & CellsRow<TGenerics> & VisibilityRow<TGenerics> & ColumnPinningRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow;
|
|
45
|
+
export declare type Row<TGenerics extends TableGenerics> = CoreRow<TGenerics> & CellsRow<TGenerics> & VisibilityRow<TGenerics> & ColumnPinningRow<TGenerics> & FiltersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow;
|
|
46
46
|
export declare type RowValues = {
|
|
47
47
|
[key: string]: any;
|
|
48
48
|
};
|
|
@@ -60,7 +60,7 @@ export declare type CoreCell<TGenerics extends TableGenerics> = {
|
|
|
60
60
|
id: string;
|
|
61
61
|
rowId: string;
|
|
62
62
|
columnId: string;
|
|
63
|
-
|
|
63
|
+
getValue: () => TGenerics['Value'];
|
|
64
64
|
row: Row<TGenerics>;
|
|
65
65
|
column: Column<TGenerics>;
|
|
66
66
|
renderCell: () => string | null | TGenerics['Rendered'];
|
|
@@ -71,8 +71,6 @@ export declare type CoreHeader<TGenerics extends TableGenerics> = {
|
|
|
71
71
|
index: number;
|
|
72
72
|
depth: number;
|
|
73
73
|
column: Column<TGenerics>;
|
|
74
|
-
getStart: () => number;
|
|
75
|
-
getSize: () => number;
|
|
76
74
|
headerGroup: HeaderGroup<TGenerics>;
|
|
77
75
|
subHeaders: Header<TGenerics>[];
|
|
78
76
|
colSpan?: number;
|
|
@@ -92,14 +90,4 @@ export declare type HeaderGroup<TGenerics extends TableGenerics> = {
|
|
|
92
90
|
depth: number;
|
|
93
91
|
headers: Header<TGenerics>[];
|
|
94
92
|
};
|
|
95
|
-
export declare type HeaderRenderProps<THeader> = {
|
|
96
|
-
header: THeader;
|
|
97
|
-
};
|
|
98
|
-
export declare type FooterRenderProps<THeader> = {
|
|
99
|
-
header: THeader;
|
|
100
|
-
};
|
|
101
|
-
export declare type CellRenderProps<TCell, TRow> = {
|
|
102
|
-
cell: TCell;
|
|
103
|
-
row: TRow;
|
|
104
|
-
};
|
|
105
93
|
export declare type NoInfer<A extends any> = [A][A extends any ? 0 : never];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { TableGenerics, Row, RowModel, TableInstance } from '../types';
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
2
|
+
export declare function filterRows<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], filterRowImpl: (row: Row<TGenerics>) => any, instance: TableInstance<TGenerics>): RowModel<TGenerics>;
|
|
3
|
+
export declare function filterRowModelFromLeafs<TGenerics extends TableGenerics>(rowsToFilter: Row<TGenerics>[], filterRow: (row: Row<TGenerics>) => Row<TGenerics>[], instance: TableInstance<TGenerics>): RowModel<TGenerics>;
|
|
4
|
+
export declare function filterRowModelFromRoot<TGenerics extends TableGenerics>(rowsToFilter: Row<TGenerics>[], filterRow: (row: Row<TGenerics>) => any, instance: TableInstance<TGenerics>): RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getFilteredRowModel<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getGroupedRowModel<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
package/build/types/utils.d.ts
CHANGED
|
@@ -7,29 +7,13 @@ export declare type Overwrite<T, U extends {
|
|
|
7
7
|
export declare type IfDefined<T, N> = 0 extends 1 & T ? N : T extends {} ? T : N;
|
|
8
8
|
export declare function functionalUpdate<T>(updater: Updater<T>, input: T): T;
|
|
9
9
|
export declare function noop(): void;
|
|
10
|
-
export declare function getBatchGroups<T>(arr: T[], count: number): {
|
|
11
|
-
start: number;
|
|
12
|
-
end: number;
|
|
13
|
-
items: T[];
|
|
14
|
-
}[];
|
|
15
10
|
export declare function makeStateUpdater(key: keyof TableState, instance: unknown): (updater: Updater<any>) => void;
|
|
16
11
|
declare type AnyFunction = (...args: any) => any;
|
|
17
12
|
export declare function isFunction<T extends AnyFunction>(d: any): d is T;
|
|
18
13
|
export declare function flattenBy<TNode>(arr: TNode[], getChildren: (item: TNode) => TNode[]): TNode[];
|
|
19
14
|
export declare function memo<TDeps extends readonly any[], TResult>(getDeps: () => [...TDeps], fn: (...args: NoInfer<[...TDeps]>) => TResult, opts: {
|
|
20
|
-
key:
|
|
21
|
-
debug?: () => any;
|
|
22
|
-
onChange?: (result: TResult, previousResult?: TResult) => void;
|
|
23
|
-
}): () => TResult;
|
|
24
|
-
declare type WorkFn = () => void;
|
|
25
|
-
export declare function incrementalMemo<TDeps extends readonly any[], TResult>(getDeps: () => [...TDeps], getInitialValue: (...args: NoInfer<[...TDeps]>) => TResult, schedule: (...args: NoInfer<[...TDeps]>) => (resultRef: {
|
|
26
|
-
current: TResult;
|
|
27
|
-
}) => (scheduler: (workFn: WorkFn) => void) => void, opts: {
|
|
28
|
-
key: string;
|
|
29
|
-
onProgress: (progress: number, nextResult: TResult, result?: TResult) => void;
|
|
30
|
-
onChange: (result: TResult, previousResult?: TResult) => void;
|
|
31
|
-
initialSync?: boolean;
|
|
32
|
-
timeout?: number;
|
|
15
|
+
key: any;
|
|
33
16
|
debug?: () => any;
|
|
17
|
+
onChange?: (result: TResult) => void;
|
|
34
18
|
}): () => TResult;
|
|
35
19
|
export {};
|