@tanstack/table-core 8.0.0-alpha.52 → 8.0.0-alpha.55
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/core.js +2 -2
- package/build/cjs/core.js.map +1 -1
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/cjs/features/Ordering.js +1 -1
- package/build/cjs/features/Ordering.js.map +1 -1
- package/build/cjs/features/Pagination.js.map +1 -1
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/filterFns.js.map +1 -1
- package/build/cjs/sortingFns.js.map +1 -1
- package/build/cjs/utils/filterRowsUtils.js.map +1 -1
- package/build/cjs/utils/getColumnFilteredRowModelSync.js.map +1 -1
- package/build/cjs/utils/getCoreRowModelAsync.js.map +1 -1
- package/build/cjs/utils/getCoreRowModelSync.js.map +1 -1
- package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
- package/build/cjs/utils/getGlobalFilteredRowModelSync.js.map +1 -1
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
- package/build/cjs/utils/getSortedRowModelSync.js.map +1 -1
- package/build/cjs/utils.js +2 -2
- package/build/cjs/utils.js.map +1 -1
- package/build/esm/index.js +5 -5
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +295 -295
- package/build/types/core.d.ts +7 -7
- package/build/types/createTable.d.ts +4 -4
- package/build/types/features/ColumnSizing.d.ts +12 -12
- package/build/types/features/Expanding.d.ts +6 -6
- package/build/types/features/Filters.d.ts +14 -14
- package/build/types/features/Grouping.d.ts +16 -16
- package/build/types/features/Headers.d.ts +6 -6
- package/build/types/features/Ordering.d.ts +6 -6
- package/build/types/features/Pagination.d.ts +5 -5
- package/build/types/features/Pinning.d.ts +5 -5
- package/build/types/features/RowSelection.d.ts +8 -8
- package/build/types/features/Sorting.d.ts +12 -12
- package/build/types/features/Visibility.d.ts +6 -6
- package/build/types/filterFns.d.ts +10 -10
- package/build/types/sortingFns.d.ts +7 -7
- package/build/types/types.d.ts +22 -26
- package/build/types/utils/filterRowsUtils.d.ts +3 -3
- package/build/types/utils/getColumnFilteredRowModelAsync.d.ts +2 -2
- package/build/types/utils/getColumnFilteredRowModelSync.d.ts +2 -2
- package/build/types/utils/getCoreRowModelAsync.d.ts +2 -2
- package/build/types/utils/getCoreRowModelSync.d.ts +2 -2
- package/build/types/utils/getExpandedRowModel.d.ts +3 -3
- package/build/types/utils/getGlobalFilteredRowModelAsync.d.ts +2 -2
- package/build/types/utils/getGlobalFilteredRowModelSync.d.ts +2 -2
- package/build/types/utils/getGroupedRowModel.d.ts +2 -2
- package/build/types/utils/getPaginationRowModel.d.ts +2 -2
- package/build/types/utils/getSortedRowModelAsync.d.ts +4 -4
- package/build/types/utils/getSortedRowModelSync.d.ts +2 -2
- package/build/umd/index.development.js +5 -5
- 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 +1 -1
- package/src/core.ts +9 -9
- package/src/createTable.ts +12 -5
- package/src/features/ColumnSizing.ts +14 -15
- package/src/features/Expanding.ts +6 -7
- package/src/features/Filters.ts +14 -15
- package/src/features/Grouping.ts +16 -17
- package/src/features/Headers.ts +7 -8
- package/src/features/Ordering.ts +11 -10
- package/src/features/Pagination.ts +5 -6
- package/src/features/Pinning.ts +5 -6
- package/src/features/RowSelection.ts +9 -10
- package/src/features/Sorting.ts +12 -13
- package/src/features/Visibility.ts +7 -8
- package/src/filterFns.ts +10 -10
- package/src/sortingFns.ts +7 -7
- package/src/types.ts +23 -29
- package/src/utils/filterRowsUtils.ts +3 -3
- package/src/utils/getColumnFilteredRowModelAsync.ts +2 -2
- package/src/utils/getColumnFilteredRowModelSync.ts +2 -2
- package/src/utils/getCoreRowModelAsync.ts +2 -2
- package/src/utils/getCoreRowModelSync.ts +2 -2
- package/src/utils/getExpandedRowModel.ts +3 -3
- package/src/utils/getGlobalFilteredRowModelAsync.ts +2 -2
- package/src/utils/getGlobalFilteredRowModelSync.ts +2 -2
- package/src/utils/getGroupedRowModel.ts +3 -3
- package/src/utils/getPaginationRowModel.ts +2 -2
- package/src/utils/getSortedRowModelAsync.ts +4 -4
- package/src/utils/getSortedRowModelSync.ts +2 -2
- package/src/utils.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableGenerics, Row } from './types';
|
|
2
2
|
export declare const filterFns: {
|
|
3
3
|
includesString: typeof includesString;
|
|
4
4
|
includesStringSensitive: typeof includesStringSensitive;
|
|
@@ -11,39 +11,39 @@ export declare const filterFns: {
|
|
|
11
11
|
betweenNumberRange: typeof betweenNumberRange;
|
|
12
12
|
};
|
|
13
13
|
export declare type BuiltInFilterFn = keyof typeof filterFns;
|
|
14
|
-
declare function includesString<TGenerics extends
|
|
14
|
+
declare function includesString<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
15
15
|
declare namespace includesString {
|
|
16
16
|
var autoRemove: (val: any) => boolean;
|
|
17
17
|
}
|
|
18
|
-
declare function includesStringSensitive<TGenerics extends
|
|
18
|
+
declare function includesStringSensitive<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
19
19
|
declare namespace includesStringSensitive {
|
|
20
20
|
var autoRemove: (val: any) => boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function equalsString<TGenerics extends
|
|
22
|
+
declare function equalsString<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
23
23
|
declare namespace equalsString {
|
|
24
24
|
var autoRemove: (val: any) => boolean;
|
|
25
25
|
}
|
|
26
|
-
declare function equalsStringSensitive<TGenerics extends
|
|
26
|
+
declare function equalsStringSensitive<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
27
27
|
declare namespace equalsStringSensitive {
|
|
28
28
|
var autoRemove: (val: any) => boolean;
|
|
29
29
|
}
|
|
30
|
-
declare function arrIncludes<TGenerics extends
|
|
30
|
+
declare function arrIncludes<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
31
31
|
declare namespace arrIncludes {
|
|
32
32
|
var autoRemove: (val: any) => boolean;
|
|
33
33
|
}
|
|
34
|
-
declare function arrIncludesAll<TGenerics extends
|
|
34
|
+
declare function arrIncludesAll<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown[]): Row<TGenerics>[];
|
|
35
35
|
declare namespace arrIncludesAll {
|
|
36
36
|
var autoRemove: (val: any) => boolean;
|
|
37
37
|
}
|
|
38
|
-
declare function equals<TGenerics extends
|
|
38
|
+
declare function equals<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
39
39
|
declare namespace equals {
|
|
40
40
|
var autoRemove: (val: any) => boolean;
|
|
41
41
|
}
|
|
42
|
-
declare function weakEquals<TGenerics extends
|
|
42
|
+
declare function weakEquals<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[];
|
|
43
43
|
declare namespace weakEquals {
|
|
44
44
|
var autoRemove: (val: any) => boolean;
|
|
45
45
|
}
|
|
46
|
-
declare function betweenNumberRange<TGenerics extends
|
|
46
|
+
declare function betweenNumberRange<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: [unknown, unknown]): Row<TGenerics>[];
|
|
47
47
|
declare namespace betweenNumberRange {
|
|
48
48
|
var autoRemove: (val: any) => boolean;
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableGenerics, Row } from './types';
|
|
2
2
|
export declare const reSplitAlphaNumeric: RegExp;
|
|
3
3
|
export declare const sortingFns: {
|
|
4
4
|
alphanumeric: typeof alphanumeric;
|
|
@@ -9,10 +9,10 @@ export declare const sortingFns: {
|
|
|
9
9
|
basic: typeof basic;
|
|
10
10
|
};
|
|
11
11
|
export declare type BuiltInSortingFn = keyof typeof sortingFns;
|
|
12
|
-
declare function alphanumeric<TGenerics extends
|
|
13
|
-
declare function alphanumericCaseSensitive<TGenerics extends
|
|
14
|
-
declare function text<TGenerics extends
|
|
15
|
-
declare function textCaseSensitive<TGenerics extends
|
|
16
|
-
declare function datetime<TGenerics extends
|
|
17
|
-
declare function basic<TGenerics extends
|
|
12
|
+
declare function alphanumeric<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
|
|
13
|
+
declare function alphanumericCaseSensitive<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
|
|
14
|
+
declare function text<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1;
|
|
15
|
+
declare function textCaseSensitive<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1;
|
|
16
|
+
declare function datetime<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1;
|
|
17
|
+
declare function basic<TGenerics extends TableGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1;
|
|
18
18
|
export {};
|
package/build/types/types.d.ts
CHANGED
|
@@ -11,22 +11,18 @@ import { Overwrite } from './utils';
|
|
|
11
11
|
import { ColumnSizingColumn, ColumnSizingColumnDef, ColumnSizingHeader, ColumnSizingInstance, ColumnSizingOptions, ColumnSizingTableState } from './features/ColumnSizing';
|
|
12
12
|
import { PaginationInstance, PaginationOptions, PaginationTableState } from './features/Pagination';
|
|
13
13
|
import { RowSelectionInstance, RowSelectionOptions, RowSelectionRow, RowSelectionTableState } from './features/RowSelection';
|
|
14
|
-
export declare type
|
|
15
|
-
Row
|
|
16
|
-
Value
|
|
17
|
-
FilterFns
|
|
18
|
-
SortingFns
|
|
19
|
-
AggregationFns
|
|
20
|
-
Render
|
|
21
|
-
ColumnMeta
|
|
22
|
-
TableMeta
|
|
14
|
+
export declare type TableGenerics = {
|
|
15
|
+
Row?: any;
|
|
16
|
+
Value?: any;
|
|
17
|
+
FilterFns?: any;
|
|
18
|
+
SortingFns?: any;
|
|
19
|
+
AggregationFns?: any;
|
|
20
|
+
Render?: any;
|
|
21
|
+
ColumnMeta?: any;
|
|
22
|
+
TableMeta?: any;
|
|
23
23
|
};
|
|
24
24
|
export declare type AnyRender = (Comp: any, props: any) => any;
|
|
25
|
-
export declare type UseRenderer<TGenerics extends
|
|
26
|
-
export declare type PartialGenerics = Partial<DefaultGenerics>;
|
|
27
|
-
export declare type AnyGenerics = {
|
|
28
|
-
[TKey in keyof PartialGenerics]?: any;
|
|
29
|
-
};
|
|
25
|
+
export declare type UseRenderer<TGenerics extends TableGenerics> = TGenerics['Render'] extends (...args: any) => any ? TGenerics['Render'] : any;
|
|
30
26
|
export declare type TableFeature = {
|
|
31
27
|
getDefaultOptions?: (instance: any) => any;
|
|
32
28
|
getInitialState?: () => any;
|
|
@@ -36,26 +32,26 @@ export declare type TableFeature = {
|
|
|
36
32
|
createCell?: (cell: any, column: any, row: any, instance: any) => any;
|
|
37
33
|
createRow?: (row: any, instance: any) => any;
|
|
38
34
|
};
|
|
39
|
-
export declare type TableInstance<TGenerics extends
|
|
40
|
-
export declare type Options<TGenerics extends
|
|
35
|
+
export declare type TableInstance<TGenerics extends TableGenerics> = TableCore<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & HeadersInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>;
|
|
36
|
+
export declare type Options<TGenerics extends TableGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>;
|
|
41
37
|
export declare type Updater<T> = T | ((old: T) => T);
|
|
42
38
|
export declare type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void;
|
|
43
39
|
export declare type TableState = CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState;
|
|
44
|
-
export declare type Row<TGenerics extends
|
|
40
|
+
export declare type Row<TGenerics extends TableGenerics> = CoreRow<TGenerics> & VisibilityRow<TGenerics> & HeadersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow;
|
|
45
41
|
export declare type RowValues = {
|
|
46
42
|
[key: string]: any;
|
|
47
43
|
};
|
|
48
|
-
export declare type RowModel<TGenerics extends
|
|
44
|
+
export declare type RowModel<TGenerics extends TableGenerics> = {
|
|
49
45
|
rows: Row<TGenerics>[];
|
|
50
46
|
flatRows: Row<TGenerics>[];
|
|
51
47
|
rowsById: Record<string, Row<TGenerics>>;
|
|
52
48
|
};
|
|
53
49
|
export declare type AccessorFn<TData> = (originalRow: TData, index: number) => any;
|
|
54
|
-
export declare type Renderable<TGenerics extends
|
|
55
|
-
export declare type ColumnDef<TGenerics extends
|
|
56
|
-
export declare type Column<TGenerics extends
|
|
57
|
-
export declare type Cell<TGenerics extends
|
|
58
|
-
export declare type CoreCell<TGenerics extends
|
|
50
|
+
export declare type Renderable<TGenerics extends TableGenerics, TProps> = string | ((props: TProps) => ReturnType<UseRenderer<TGenerics>>);
|
|
51
|
+
export declare type ColumnDef<TGenerics extends TableGenerics> = CoreColumnDef<TGenerics> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TGenerics> & SortingColumnDef<TGenerics> & GroupingColumnDef<TGenerics> & ColumnSizingColumnDef;
|
|
52
|
+
export declare type Column<TGenerics extends TableGenerics> = ColumnDef<TGenerics> & CoreColumn<TGenerics> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TGenerics> & SortingColumn<TGenerics> & GroupingColumn<TGenerics> & ColumnSizingColumn<TGenerics>;
|
|
53
|
+
export declare type Cell<TGenerics extends TableGenerics> = CoreCell<TGenerics> & GroupingCell<TGenerics>;
|
|
54
|
+
export declare type CoreCell<TGenerics extends TableGenerics> = {
|
|
59
55
|
id: string;
|
|
60
56
|
rowId: string;
|
|
61
57
|
columnId: string;
|
|
@@ -65,8 +61,8 @@ export declare type CoreCell<TGenerics extends AnyGenerics> = {
|
|
|
65
61
|
getCellProps: PropGetter<CellProps>;
|
|
66
62
|
renderCell: () => string | null | ReturnType<UseRenderer<TGenerics>>;
|
|
67
63
|
};
|
|
68
|
-
export declare type Header<TGenerics extends
|
|
69
|
-
export declare type CoreHeader<TGenerics extends
|
|
64
|
+
export declare type Header<TGenerics extends TableGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>;
|
|
65
|
+
export declare type CoreHeader<TGenerics extends TableGenerics> = {
|
|
70
66
|
id: string;
|
|
71
67
|
depth: number;
|
|
72
68
|
column: Column<TGenerics>;
|
|
@@ -86,7 +82,7 @@ export declare type CoreHeader<TGenerics extends AnyGenerics> = {
|
|
|
86
82
|
renderPlaceholder?: boolean;
|
|
87
83
|
}) => string | null | ReturnType<UseRenderer<TGenerics>>;
|
|
88
84
|
};
|
|
89
|
-
export declare type HeaderGroup<TGenerics extends
|
|
85
|
+
export declare type HeaderGroup<TGenerics extends TableGenerics> = {
|
|
90
86
|
id: string;
|
|
91
87
|
depth: number;
|
|
92
88
|
headers: Header<TGenerics>[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function filterRowModelFromLeafs<TGenerics extends
|
|
3
|
-
export declare function filterRowModelFromRoot<TGenerics extends
|
|
1
|
+
import { TableGenerics, Row, RowModel, TableInstance } from '../types';
|
|
2
|
+
export declare function filterRowModelFromLeafs<TGenerics extends TableGenerics>(rowsToFilter: Row<TGenerics>[], filterRows: (rowsToFilter: Row<TGenerics>[], depth: number) => Row<TGenerics>[], instance: TableInstance<TGenerics>): RowModel<TGenerics>;
|
|
3
|
+
export declare function filterRowModelFromRoot<TGenerics extends TableGenerics>(rowsToFilter: Row<TGenerics>[], filterRows: (rowsToFilter: Row<TGenerics>[], depth: number) => Row<TGenerics>[], instance: TableInstance<TGenerics>): RowModel<TGenerics>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getColumnFilteredRowModelAsync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getColumnFilteredRowModelAsync<TGenerics extends TableGenerics>(opts?: {
|
|
3
3
|
initialSync?: boolean;
|
|
4
4
|
}): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getColumnFilteredRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getColumnFilteredRowModelSync<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getCoreRowModelAsync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getCoreRowModelAsync<TGenerics extends TableGenerics>(opts?: {
|
|
3
3
|
initialSync: boolean;
|
|
4
4
|
}): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getCoreRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getCoreRowModelSync<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TableInstance, Row, RowModel,
|
|
2
|
-
export declare function getExpandedRowModel<TGenerics extends
|
|
3
|
-
export declare function expandRows<TGenerics extends
|
|
1
|
+
import { TableInstance, Row, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getExpandedRowModel<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
3
|
+
export declare function expandRows<TGenerics extends TableGenerics>(rowModel: RowModel<TGenerics>, instance: TableInstance<TGenerics>): {
|
|
4
4
|
rows: Row<TGenerics>[];
|
|
5
5
|
flatRows: Row<TGenerics>[];
|
|
6
6
|
rowsById: Record<string, Row<TGenerics>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getGlobalFilteredRowModelAsync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getGlobalFilteredRowModelAsync<TGenerics extends TableGenerics>(opts?: {
|
|
3
3
|
initialSync?: boolean;
|
|
4
4
|
}): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getGlobalFilteredRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getGlobalFilteredRowModelSync<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getGroupedRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getGroupedRowModelSync<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getPaginationRowModel<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getPaginationRowModel<TGenerics extends TableGenerics>(opts?: {
|
|
3
3
|
initialSync: boolean;
|
|
4
4
|
}): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TableInstance, Row, RowModel,
|
|
2
|
-
export declare function getSortedRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, Row, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getSortedRowModelSync<TGenerics extends TableGenerics>(opts?: {
|
|
3
3
|
initialSync?: boolean;
|
|
4
4
|
}): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
5
|
-
declare type Sorter<TGenerics extends
|
|
5
|
+
declare type Sorter<TGenerics extends TableGenerics> = {
|
|
6
6
|
id: string;
|
|
7
7
|
compare: (a: Row<TGenerics>, b: Row<TGenerics>) => number;
|
|
8
8
|
desc?: boolean;
|
|
9
9
|
sortUndefined?: false | -1 | 1;
|
|
10
10
|
invertSorting?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare function quicksort<TGenerics extends
|
|
12
|
+
export declare function quicksort<TGenerics extends TableGenerics>(rows: Row<TGenerics>[], sorters: Sorter<TGenerics>[]): Row<TGenerics>[];
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableInstance, RowModel,
|
|
2
|
-
export declare function getSortedRowModelSync<TGenerics extends
|
|
1
|
+
import { TableInstance, RowModel, TableGenerics } from '../types';
|
|
2
|
+
export declare function getSortedRowModelSync<TGenerics extends TableGenerics>(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
return typeof key === "symbol" ? key : String(key);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// export type DefinedGenericKeys<T extends
|
|
107
|
+
// export type DefinedGenericKeys<T extends TableGenerics> = {
|
|
108
108
|
// [K in keyof T]: 0 extends 1 & T[K] ? never : T[K] extends {} ? K : never
|
|
109
109
|
// }[keyof T]
|
|
110
|
-
// export type DefinedGenerics<T extends
|
|
110
|
+
// export type DefinedGenerics<T extends TableGenerics> = Pick<
|
|
111
111
|
// T,
|
|
112
112
|
// DefinedGenericKeys<T>
|
|
113
113
|
// >
|
|
@@ -1729,7 +1729,7 @@
|
|
|
1729
1729
|
|
|
1730
1730
|
instance.setColumnOrder((_instance$initialStat = instance.initialState.columnOrder) != null ? _instance$initialStat : []);
|
|
1731
1731
|
},
|
|
1732
|
-
|
|
1732
|
+
_getOrderColumnsFn: memo(function () {
|
|
1733
1733
|
return [instance.getState().columnOrder, instance.getState().grouping, instance.options.groupedColumnMode];
|
|
1734
1734
|
}, function (columnOrder, grouping, groupedColumnMode) {
|
|
1735
1735
|
return function (columns) {
|
|
@@ -3919,7 +3919,7 @@
|
|
|
3919
3919
|
}
|
|
3920
3920
|
}),
|
|
3921
3921
|
getLeafColumns: memo(function () {
|
|
3922
|
-
return [instance.
|
|
3922
|
+
return [instance._getOrderColumnsFn()];
|
|
3923
3923
|
}, function (orderColumns) {
|
|
3924
3924
|
var _column$columns2;
|
|
3925
3925
|
|
|
@@ -4001,7 +4001,7 @@
|
|
|
4001
4001
|
}
|
|
4002
4002
|
}),
|
|
4003
4003
|
getAllLeafColumns: memo(function () {
|
|
4004
|
-
return [instance.getAllColumns(), instance.
|
|
4004
|
+
return [instance.getAllColumns(), instance._getOrderColumnsFn()];
|
|
4005
4005
|
}, function (allColumns, orderColumns) {
|
|
4006
4006
|
var leafColumns = allColumns.flatMap(function (column) {
|
|
4007
4007
|
return column.getLeafColumns();
|