@tanstack/table-core 8.0.0-alpha.53 → 8.0.0-alpha.57
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 +9 -384
- package/build/cjs/core.js.map +1 -1
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/Cells.js +122 -0
- package/build/cjs/features/Cells.js.map +1 -0
- package/build/cjs/features/ColumnSizing.js +90 -37
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Columns.js +216 -0
- package/build/cjs/features/Columns.js.map +1 -0
- package/build/cjs/features/Expanding.js +1 -1
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Filters.js +1 -1
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +1 -1
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Headers.js +78 -153
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/cjs/features/Ordering.js +2 -2
- package/build/cjs/features/Ordering.js.map +1 -1
- package/build/cjs/features/Pagination.js +1 -1
- package/build/cjs/features/Pagination.js.map +1 -1
- package/build/cjs/features/Pinning.js +172 -2
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/RowSelection.js +1 -1
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Rows.js +99 -0
- package/build/cjs/features/Rows.js.map +1 -0
- package/build/cjs/features/Sorting.js +1 -1
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js +51 -17
- 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 +879 -693
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +420 -318
- package/build/types/core.d.ts +5 -82
- package/build/types/createTable.d.ts +4 -4
- package/build/types/features/Cells.d.ts +14 -0
- package/build/types/features/ColumnSizing.d.ts +31 -23
- package/build/types/features/Columns.d.ts +54 -0
- 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 +5 -13
- package/build/types/features/Ordering.d.ts +5 -5
- package/build/types/features/Pagination.d.ts +5 -5
- package/build/types/features/Pinning.d.ts +21 -7
- package/build/types/features/RowSelection.d.ts +8 -8
- package/build/types/features/Rows.d.ts +29 -0
- package/build/types/features/Sorting.d.ts +12 -12
- package/build/types/features/Visibility.d.ts +11 -6
- package/build/types/filterFns.d.ts +10 -10
- package/build/types/sortingFns.d.ts +7 -7
- package/build/types/types.d.ts +37 -33
- 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/types/utils.d.ts +0 -1
- package/build/umd/index.development.js +857 -671
- 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 +32 -554
- package/src/createTable.ts +12 -5
- package/src/features/Cells.ts +156 -0
- package/src/features/ColumnSizing.ts +109 -58
- package/src/features/Columns.ts +290 -0
- 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 +51 -142
- package/src/features/Ordering.ts +8 -7
- package/src/features/Pagination.ts +5 -6
- package/src/features/Pinning.ts +198 -8
- package/src/features/RowSelection.ts +9 -10
- package/src/features/Rows.ts +151 -0
- package/src/features/Sorting.ts +12 -13
- package/src/features/Visibility.ts +73 -27
- package/src/filterFns.ts +10 -10
- package/src/sortingFns.ts +7 -7
- package/src/types.ts +47 -65
- 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 +3 -5
package/build/types/core.d.ts
CHANGED
|
@@ -1,113 +1,36 @@
|
|
|
1
1
|
import { RequiredKeys } from './utils';
|
|
2
|
-
import { Updater,
|
|
2
|
+
import { Updater, Options, TableState, TableProps, TableBodyProps, PropGetter, TableInstance, Renderable, UseRenderer, TableFeature, TableGenerics } from './types';
|
|
3
3
|
export declare type CoreTableState = {
|
|
4
4
|
coreProgress: number;
|
|
5
5
|
};
|
|
6
|
-
export declare type CoreOptions<TGenerics extends
|
|
6
|
+
export declare type CoreOptions<TGenerics extends TableGenerics> = {
|
|
7
7
|
data: TGenerics['Row'][];
|
|
8
|
-
columns: ColumnDef<TGenerics>[];
|
|
9
8
|
state: Partial<TableState>;
|
|
10
9
|
onStateChange: (updater: Updater<TableState>) => void;
|
|
11
10
|
render: TGenerics['Render'];
|
|
12
|
-
getCoreRowModel: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
13
11
|
debugAll?: boolean;
|
|
14
12
|
debugTable?: boolean;
|
|
15
13
|
debugHeaders?: boolean;
|
|
16
14
|
debugColumns?: boolean;
|
|
17
15
|
debugRows?: boolean;
|
|
18
|
-
defaultColumn?: Partial<ColumnDef<TGenerics>>;
|
|
19
16
|
initialState?: Partial<TableState>;
|
|
20
|
-
getSubRows?: (originalRow: TGenerics['Row'], index: number) => TGenerics['Row'][];
|
|
21
|
-
getRowId?: (originalRow: TGenerics['Row'], index: number, parent?: Row<TGenerics>) => string;
|
|
22
17
|
autoResetAll?: boolean;
|
|
23
18
|
mergeOptions?: (defaultOptions: TableFeature, options: Partial<Options<TGenerics>>) => Options<TGenerics>;
|
|
24
19
|
meta?: TGenerics['TableMeta'];
|
|
25
20
|
};
|
|
26
|
-
export declare type TableCore<TGenerics extends
|
|
21
|
+
export declare type TableCore<TGenerics extends TableGenerics> = {
|
|
27
22
|
initialState: TableState;
|
|
28
23
|
reset: () => void;
|
|
29
24
|
options: RequiredKeys<Options<TGenerics>, 'state'>;
|
|
30
25
|
setOptions: (newOptions: Updater<Options<TGenerics>>) => void;
|
|
31
26
|
queue: (cb: () => void) => void;
|
|
32
27
|
willUpdate: () => void;
|
|
33
|
-
getRowId: (_: TGenerics['Row'], index: number, parent?: Row<TGenerics>) => string;
|
|
34
28
|
getState: () => TableState;
|
|
35
29
|
setState: (updater: Updater<TableState>) => void;
|
|
36
|
-
getDefaultColumn: () => Partial<ColumnDef<TGenerics>>;
|
|
37
|
-
getColumnDefs: () => ColumnDef<TGenerics>[];
|
|
38
|
-
createColumn: (columnDef: ColumnDef<TGenerics>, depth: number, parent?: Column<TGenerics>) => Column<TGenerics>;
|
|
39
|
-
getAllColumns: () => Column<TGenerics>[];
|
|
40
|
-
getAllFlatColumns: () => Column<TGenerics>[];
|
|
41
|
-
getAllFlatColumnsById: () => Record<string, Column<TGenerics>>;
|
|
42
|
-
getAllLeafColumns: () => Column<TGenerics>[];
|
|
43
|
-
getColumn: (columnId: string) => Column<TGenerics>;
|
|
44
|
-
getTotalWidth: () => number;
|
|
45
|
-
createCell: (row: Row<TGenerics>, column: Column<TGenerics>, value: any) => Cell<TGenerics>;
|
|
46
|
-
createRow: (id: string, original: TGenerics['Row'] | undefined, rowIndex: number, depth: number, values: Record<string, any>) => Row<TGenerics>;
|
|
47
|
-
getCoreRowModel: () => RowModel<TGenerics>;
|
|
48
|
-
_getCoreRowModel?: () => RowModel<TGenerics>;
|
|
49
|
-
getRowModel: () => RowModel<TGenerics>;
|
|
50
|
-
getRow: (id: string) => Row<TGenerics>;
|
|
51
|
-
getCell: (rowId: string, columnId: string) => Cell<TGenerics>;
|
|
52
30
|
getTableProps: PropGetter<TableProps>;
|
|
53
31
|
getTableBodyProps: PropGetter<TableBodyProps>;
|
|
54
|
-
getRowProps: <TGetter extends Getter<RowProps>>(rowId: string, userProps?: TGetter) => undefined | PropGetterValue<RowProps, TGetter>;
|
|
55
|
-
getCellProps: <TGetter extends Getter<CellProps>>(rowId: string, columnId: string, userProps?: TGetter) => undefined | PropGetterValue<CellProps, TGetter>;
|
|
56
|
-
getTableWidth: () => number;
|
|
57
|
-
getLeftTableWidth: () => number;
|
|
58
|
-
getCenterTableWidth: () => number;
|
|
59
|
-
getRightTableWidth: () => number;
|
|
60
32
|
render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | ReturnType<UseRenderer<TGenerics>>;
|
|
61
33
|
getOverallProgress: () => number;
|
|
34
|
+
_features: readonly TableFeature[];
|
|
62
35
|
};
|
|
63
|
-
export declare
|
|
64
|
-
id: string;
|
|
65
|
-
index: number;
|
|
66
|
-
original?: TGenerics['Row'];
|
|
67
|
-
depth: number;
|
|
68
|
-
values: RowValues;
|
|
69
|
-
subRows: Row<TGenerics>[];
|
|
70
|
-
getLeafRows: () => Row<TGenerics>[];
|
|
71
|
-
getRowProps: PropGetter<RowProps>;
|
|
72
|
-
originalSubRows?: TGenerics['Row'][];
|
|
73
|
-
getAllCells: () => Cell<TGenerics>[];
|
|
74
|
-
getAllCellsByColumnId: () => Record<string, Cell<TGenerics>>;
|
|
75
|
-
};
|
|
76
|
-
export declare type CoreColumnDef<TGenerics extends AnyGenerics> = {
|
|
77
|
-
id: string;
|
|
78
|
-
accessorKey?: string & keyof TGenerics['Row'];
|
|
79
|
-
accessorFn?: AccessorFn<TGenerics['Row']>;
|
|
80
|
-
columns?: ColumnDef<TGenerics>[];
|
|
81
|
-
header?: Renderable<TGenerics, {
|
|
82
|
-
instance: TableInstance<TGenerics>;
|
|
83
|
-
header: Header<TGenerics>;
|
|
84
|
-
column: Column<TGenerics>;
|
|
85
|
-
}>;
|
|
86
|
-
footer?: Renderable<TGenerics, {
|
|
87
|
-
instance: TableInstance<TGenerics>;
|
|
88
|
-
header: Header<TGenerics>;
|
|
89
|
-
column: Column<TGenerics>;
|
|
90
|
-
}>;
|
|
91
|
-
cell?: Renderable<TGenerics, {
|
|
92
|
-
instance: TableInstance<TGenerics>;
|
|
93
|
-
row: Row<TGenerics>;
|
|
94
|
-
column: Column<TGenerics>;
|
|
95
|
-
cell: Cell<TGenerics>;
|
|
96
|
-
value: TGenerics['Value'];
|
|
97
|
-
}>;
|
|
98
|
-
meta?: TGenerics['ColumnMeta'];
|
|
99
|
-
};
|
|
100
|
-
export declare type CoreColumnDefType = 'data' | 'display' | 'group';
|
|
101
|
-
export declare type CoreColumn<TGenerics extends AnyGenerics> = {
|
|
102
|
-
id: string;
|
|
103
|
-
depth: number;
|
|
104
|
-
accessorFn?: AccessorFn<TGenerics['Row']>;
|
|
105
|
-
columnDef: ColumnDef<TGenerics>;
|
|
106
|
-
columnDefType: CoreColumnDefType;
|
|
107
|
-
getWidth: () => number;
|
|
108
|
-
columns: Column<TGenerics>[];
|
|
109
|
-
parent?: Column<TGenerics>;
|
|
110
|
-
getFlatColumns: () => Column<TGenerics>[];
|
|
111
|
-
getLeafColumns: () => Column<TGenerics>[];
|
|
112
|
-
};
|
|
113
|
-
export declare function createTableInstance<TGenerics extends AnyGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>;
|
|
36
|
+
export declare function createTableInstance<TGenerics extends TableGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { CustomFilterFns, FilterFn } from './features/Filters';
|
|
2
2
|
import { AggregationFn, CustomAggregationFns } from './features/Grouping';
|
|
3
3
|
import { CustomSortingFns, SortingFn } from './features/Sorting';
|
|
4
|
-
import { ColumnDef, AccessorFn, AnyRender,
|
|
4
|
+
import { ColumnDef, AccessorFn, AnyRender, TableGenerics, Options } from './types';
|
|
5
5
|
import { IfDefined, Overwrite, PartialKeys } from './utils';
|
|
6
|
-
export declare type TableFactory<TGenerics extends
|
|
7
|
-
export declare type CreateTableOptions<TRender extends AnyRender, TFilterFns extends CustomFilterFns<any>, TSortingFns extends CustomSortingFns<any>, TAggregationFns extends CustomAggregationFns<any>, TGenerics extends
|
|
6
|
+
export declare type TableFactory<TGenerics extends TableGenerics> = () => Table<TGenerics>;
|
|
7
|
+
export declare type CreateTableOptions<TRender extends AnyRender, TFilterFns extends CustomFilterFns<any>, TSortingFns extends CustomSortingFns<any>, TAggregationFns extends CustomAggregationFns<any>, TGenerics extends TableGenerics> = Partial<{
|
|
8
8
|
render?: TRender;
|
|
9
9
|
filterFns?: TFilterFns;
|
|
10
10
|
sortingFns?: TSortingFns;
|
|
11
11
|
aggregationFns?: TAggregationFns;
|
|
12
12
|
} & Omit<Options<TGenerics>, 'filterFns' | 'sortingFns' | 'aggregationFns'>>;
|
|
13
|
-
export declare type Table<TGenerics extends
|
|
13
|
+
export declare type Table<TGenerics extends TableGenerics> = {
|
|
14
14
|
generics: TGenerics;
|
|
15
15
|
options: Partial<Options<TGenerics>>;
|
|
16
16
|
setRowType: <TRow>() => Table<Overwrite<TGenerics, {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Cell, TableGenerics, TableInstance, Row, Column, Getter, CellProps, PropGetterValue } from '../types';
|
|
2
|
+
export declare type CellsRow<TGenerics extends TableGenerics> = {
|
|
3
|
+
getAllCells: () => Cell<TGenerics>[];
|
|
4
|
+
getAllCellsByColumnId: () => Record<string, Cell<TGenerics>>;
|
|
5
|
+
};
|
|
6
|
+
export declare type CellsInstance<TGenerics extends TableGenerics> = {
|
|
7
|
+
createCell: (row: Row<TGenerics>, column: Column<TGenerics>, value: any) => Cell<TGenerics>;
|
|
8
|
+
getCell: (rowId: string, columnId: string) => Cell<TGenerics>;
|
|
9
|
+
getCellProps: <TGetter extends Getter<CellProps>>(rowId: string, columnId: string, userProps?: TGetter) => undefined | PropGetterValue<CellProps, TGetter>;
|
|
10
|
+
};
|
|
11
|
+
export declare const Cells: {
|
|
12
|
+
createRow: <TGenerics extends TableGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>) => CellsRow<TGenerics>;
|
|
13
|
+
createInstance: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => CellsInstance<TGenerics_1>;
|
|
14
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { Column, Getter, Header, OnChangeFn,
|
|
2
|
-
|
|
1
|
+
import { Column, Getter, Header, OnChangeFn, TableGenerics, PropGetterValue, TableInstance, Updater } from '../types';
|
|
2
|
+
import { ColumnPinningPosition } from './Pinning';
|
|
3
|
+
export declare type ColumnSizingTableState = {
|
|
4
|
+
columnSizing: ColumnSizingState;
|
|
5
|
+
columnSizingInfo: ColumnSizingInfoState;
|
|
6
|
+
};
|
|
7
|
+
export declare type ColumnSizingState = Record<string, number>;
|
|
3
8
|
export declare type ColumnSizingInfoState = {
|
|
4
9
|
startOffset: null | number;
|
|
5
10
|
startSize: null | number;
|
|
@@ -8,20 +13,16 @@ export declare type ColumnSizingInfoState = {
|
|
|
8
13
|
isResizingColumn: false | string;
|
|
9
14
|
columnSizingStart: [string, number][];
|
|
10
15
|
};
|
|
11
|
-
export declare type ColumnSizingTableState = {
|
|
12
|
-
columnSizing: ColumnSizing;
|
|
13
|
-
columnSizingInfo: ColumnSizingInfoState;
|
|
14
|
-
};
|
|
15
16
|
export declare type ColumnResizeMode = 'onChange' | 'onEnd';
|
|
16
17
|
export declare type ColumnSizingOptions = {
|
|
17
18
|
enableColumnResizing?: boolean;
|
|
18
19
|
columnResizeMode?: ColumnResizeMode;
|
|
19
|
-
onColumnSizingChange?: OnChangeFn<
|
|
20
|
+
onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
|
|
20
21
|
onColumnSizingInfoChange?: OnChangeFn<ColumnSizingInfoState>;
|
|
21
22
|
};
|
|
22
23
|
export declare type ColumnSizingDefaultOptions = {
|
|
23
24
|
columnResizeMode: ColumnResizeMode;
|
|
24
|
-
onColumnSizingChange: OnChangeFn<
|
|
25
|
+
onColumnSizingChange: OnChangeFn<ColumnSizingState>;
|
|
25
26
|
onColumnSizingInfoChange: OnChangeFn<ColumnSizingInfoState>;
|
|
26
27
|
};
|
|
27
28
|
export declare type ColumnResizerProps = {
|
|
@@ -31,9 +32,10 @@ export declare type ColumnResizerProps = {
|
|
|
31
32
|
draggable?: boolean;
|
|
32
33
|
role?: string;
|
|
33
34
|
};
|
|
34
|
-
export declare type ColumnSizingInstance<TGenerics extends
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
export declare type ColumnSizingInstance<TGenerics extends TableGenerics> = {
|
|
36
|
+
getColumnSize: (columnId: string) => number;
|
|
37
|
+
getColumnStart: (columnId: string, position?: ColumnPinningPosition) => number;
|
|
38
|
+
setColumnSizing: (updater: Updater<ColumnSizingState>) => void;
|
|
37
39
|
setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void;
|
|
38
40
|
resetColumnSizing: () => void;
|
|
39
41
|
resetColumnSize: (columnId: string) => void;
|
|
@@ -44,36 +46,42 @@ export declare type ColumnSizingInstance<TGenerics extends AnyGenerics> = {
|
|
|
44
46
|
getHeaderResizerProps: <TGetter extends Getter<ColumnResizerProps>>(headerId: string, userProps?: TGetter) => undefined | PropGetterValue<ColumnResizerProps, TGetter>;
|
|
45
47
|
getColumnIsResizing: (columnId: string) => boolean;
|
|
46
48
|
getHeaderIsResizing: (headerId: string) => boolean;
|
|
49
|
+
getTotalSize: () => number;
|
|
50
|
+
getLeftTotalSize: () => number;
|
|
51
|
+
getCenterTotalSize: () => number;
|
|
52
|
+
getRightTotalSize: () => number;
|
|
47
53
|
};
|
|
48
54
|
export declare type ColumnSizingColumnDef = {
|
|
49
55
|
enableResizing?: boolean;
|
|
50
56
|
defaultCanResize?: boolean;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
size?: number;
|
|
58
|
+
minSize?: number;
|
|
59
|
+
maxSize?: number;
|
|
54
60
|
};
|
|
55
|
-
export declare type ColumnSizingColumn<TGenerics extends
|
|
61
|
+
export declare type ColumnSizingColumn<TGenerics extends TableGenerics> = {
|
|
62
|
+
getSize: () => number;
|
|
63
|
+
getStart: (position?: ColumnPinningPosition) => number;
|
|
56
64
|
getCanResize: () => boolean;
|
|
57
65
|
getIsResizing: () => boolean;
|
|
58
66
|
resetSize: () => void;
|
|
59
67
|
};
|
|
60
|
-
export declare type ColumnSizingHeader<TGenerics extends
|
|
68
|
+
export declare type ColumnSizingHeader<TGenerics extends TableGenerics> = {
|
|
61
69
|
getCanResize: () => boolean;
|
|
62
70
|
getIsResizing: () => boolean;
|
|
63
71
|
getResizerProps: <TGetter extends Getter<ColumnResizerProps>>(userProps?: TGetter) => undefined | PropGetterValue<ColumnResizerProps, TGetter>;
|
|
64
72
|
resetSize: () => void;
|
|
65
73
|
};
|
|
66
74
|
export declare const defaultColumnSizing: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
size: number;
|
|
76
|
+
minSize: number;
|
|
77
|
+
maxSize: number;
|
|
70
78
|
};
|
|
71
79
|
export declare const ColumnSizing: {
|
|
72
80
|
getDefaultColumn: () => ColumnSizingColumnDef;
|
|
73
81
|
getInitialState: () => ColumnSizingTableState;
|
|
74
|
-
getDefaultOptions: <TGenerics extends
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
getDefaultOptions: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => ColumnSizingDefaultOptions;
|
|
83
|
+
createColumn: <TGenerics_1 extends TableGenerics>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => ColumnSizingColumn<TGenerics_1>;
|
|
84
|
+
createHeader: <TGenerics_2 extends TableGenerics>(header: Header<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ColumnSizingHeader<TGenerics_2>;
|
|
85
|
+
createInstance: <TGenerics_3 extends TableGenerics>(instance: TableInstance<TGenerics_3>) => ColumnSizingInstance<TGenerics_3>;
|
|
78
86
|
};
|
|
79
87
|
export declare function passiveEventSupported(): boolean;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Cell, Column, Header, TableGenerics, TableInstance, Row, AccessorFn, ColumnDef, Renderable } from '../types';
|
|
2
|
+
export declare type CoreColumnDefType = 'data' | 'display' | 'group';
|
|
3
|
+
export declare type CoreColumnDef<TGenerics extends TableGenerics> = {
|
|
4
|
+
id: string;
|
|
5
|
+
accessorKey?: string & keyof TGenerics['Row'];
|
|
6
|
+
accessorFn?: AccessorFn<TGenerics['Row']>;
|
|
7
|
+
columns?: ColumnDef<TGenerics>[];
|
|
8
|
+
header?: Renderable<TGenerics, {
|
|
9
|
+
instance: TableInstance<TGenerics>;
|
|
10
|
+
header: Header<TGenerics>;
|
|
11
|
+
column: Column<TGenerics>;
|
|
12
|
+
}>;
|
|
13
|
+
footer?: Renderable<TGenerics, {
|
|
14
|
+
instance: TableInstance<TGenerics>;
|
|
15
|
+
header: Header<TGenerics>;
|
|
16
|
+
column: Column<TGenerics>;
|
|
17
|
+
}>;
|
|
18
|
+
cell?: Renderable<TGenerics, {
|
|
19
|
+
instance: TableInstance<TGenerics>;
|
|
20
|
+
row: Row<TGenerics>;
|
|
21
|
+
column: Column<TGenerics>;
|
|
22
|
+
cell: Cell<TGenerics>;
|
|
23
|
+
value: TGenerics['Value'];
|
|
24
|
+
}>;
|
|
25
|
+
meta?: TGenerics['ColumnMeta'];
|
|
26
|
+
};
|
|
27
|
+
export declare type CoreColumn<TGenerics extends TableGenerics> = {
|
|
28
|
+
id: string;
|
|
29
|
+
depth: number;
|
|
30
|
+
accessorFn?: AccessorFn<TGenerics['Row']>;
|
|
31
|
+
columnDef: ColumnDef<TGenerics>;
|
|
32
|
+
columnDefType: CoreColumnDefType;
|
|
33
|
+
columns: Column<TGenerics>[];
|
|
34
|
+
parent?: Column<TGenerics>;
|
|
35
|
+
getFlatColumns: () => Column<TGenerics>[];
|
|
36
|
+
getLeafColumns: () => Column<TGenerics>[];
|
|
37
|
+
};
|
|
38
|
+
export declare type ColumnsOptions<TGenerics extends TableGenerics> = {
|
|
39
|
+
columns: ColumnDef<TGenerics>[];
|
|
40
|
+
defaultColumn?: Partial<ColumnDef<TGenerics>>;
|
|
41
|
+
};
|
|
42
|
+
export declare type ColumnsInstance<TGenerics extends TableGenerics> = {
|
|
43
|
+
getDefaultColumn: () => Partial<ColumnDef<TGenerics>>;
|
|
44
|
+
getColumnDefs: () => ColumnDef<TGenerics>[];
|
|
45
|
+
createColumn: (columnDef: ColumnDef<TGenerics>, depth: number, parent?: Column<TGenerics>) => Column<TGenerics>;
|
|
46
|
+
getAllColumns: () => Column<TGenerics>[];
|
|
47
|
+
getAllFlatColumns: () => Column<TGenerics>[];
|
|
48
|
+
getAllFlatColumnsById: () => Record<string, Column<TGenerics>>;
|
|
49
|
+
getAllLeafColumns: () => Column<TGenerics>[];
|
|
50
|
+
getColumn: (columnId: string) => Column<TGenerics>;
|
|
51
|
+
};
|
|
52
|
+
export declare const Columns: {
|
|
53
|
+
createInstance: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => ColumnsInstance<TGenerics>;
|
|
54
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RowModel } from '..';
|
|
2
|
-
import { Getter, OnChangeFn,
|
|
2
|
+
import { Getter, OnChangeFn, TableGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
|
|
3
3
|
export declare type ExpandedStateList = Record<string, boolean>;
|
|
4
4
|
export declare type ExpandedState = true | Record<string, boolean>;
|
|
5
5
|
export declare type ExpandedTableState = {
|
|
@@ -11,7 +11,7 @@ export declare type ExpandedRow = {
|
|
|
11
11
|
getCanExpand: () => boolean;
|
|
12
12
|
getToggleExpandedProps: <TGetter extends Getter<ToggleExpandedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleExpandedProps, TGetter>;
|
|
13
13
|
};
|
|
14
|
-
export declare type ExpandedOptions<TGenerics extends
|
|
14
|
+
export declare type ExpandedOptions<TGenerics extends TableGenerics> = {
|
|
15
15
|
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
16
16
|
autoResetExpanded?: boolean;
|
|
17
17
|
enableExpanded?: boolean;
|
|
@@ -26,7 +26,7 @@ export declare type ToggleExpandedProps = {
|
|
|
26
26
|
title?: string;
|
|
27
27
|
onClick?: (event: unknown) => void;
|
|
28
28
|
};
|
|
29
|
-
export declare type ExpandedInstance<TGenerics extends
|
|
29
|
+
export declare type ExpandedInstance<TGenerics extends TableGenerics> = {
|
|
30
30
|
queueResetExpanded: () => void;
|
|
31
31
|
setExpanded: (updater: Updater<ExpandedState>) => void;
|
|
32
32
|
toggleRowExpanded: (rowId: string, expanded?: boolean) => void;
|
|
@@ -46,7 +46,7 @@ export declare type ExpandedInstance<TGenerics extends AnyGenerics> = {
|
|
|
46
46
|
};
|
|
47
47
|
export declare const Expanding: {
|
|
48
48
|
getInitialState: () => ExpandedTableState;
|
|
49
|
-
getDefaultOptions: <TGenerics extends
|
|
50
|
-
|
|
51
|
-
createRow: <TGenerics_2 extends
|
|
49
|
+
getDefaultOptions: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => ExpandedOptions<TGenerics>;
|
|
50
|
+
createInstance: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => ExpandedInstance<TGenerics_1>;
|
|
51
|
+
createRow: <TGenerics_2 extends TableGenerics>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ExpandedRow;
|
|
52
52
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowModel } from '..';
|
|
2
2
|
import { BuiltInFilterFn } from '../filterFns';
|
|
3
|
-
import { Column, OnChangeFn,
|
|
3
|
+
import { Column, OnChangeFn, TableGenerics, TableInstance, Row, Updater } from '../types';
|
|
4
4
|
import { Overwrite } from '../utils';
|
|
5
5
|
export declare type FiltersTableState = {
|
|
6
6
|
columnFilters: ColumnFiltersState;
|
|
@@ -13,14 +13,14 @@ export declare type ColumnFilter = {
|
|
|
13
13
|
id: string;
|
|
14
14
|
value: unknown;
|
|
15
15
|
};
|
|
16
|
-
export declare type FilterFn<TGenerics extends
|
|
16
|
+
export declare type FilterFn<TGenerics extends TableGenerics> = {
|
|
17
17
|
(rows: Row<TGenerics>[], columnIds: string[], filterValue: any): any;
|
|
18
18
|
autoRemove?: ColumnFilterAutoRemoveTestFn<TGenerics>;
|
|
19
19
|
};
|
|
20
|
-
export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends
|
|
21
|
-
export declare type CustomFilterFns<TGenerics extends
|
|
22
|
-
export declare type FilterFnOption<TGenerics extends
|
|
23
|
-
export declare type FiltersColumnDef<TGenerics extends
|
|
20
|
+
export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends TableGenerics> = (value: unknown, column?: Column<TGenerics>) => boolean;
|
|
21
|
+
export declare type CustomFilterFns<TGenerics extends TableGenerics> = Record<string, FilterFn<TGenerics>>;
|
|
22
|
+
export declare type FilterFnOption<TGenerics extends TableGenerics> = 'auto' | BuiltInFilterFn | keyof TGenerics['FilterFns'] | FilterFn<TGenerics>;
|
|
23
|
+
export declare type FiltersColumnDef<TGenerics extends TableGenerics> = {
|
|
24
24
|
filterFn?: FilterFnOption<Overwrite<TGenerics, {
|
|
25
25
|
Value: any;
|
|
26
26
|
}>>;
|
|
@@ -31,7 +31,7 @@ export declare type FiltersColumnDef<TGenerics extends AnyGenerics> = {
|
|
|
31
31
|
defaultCanColumnFilter?: boolean;
|
|
32
32
|
defaultCanGlobalFilter?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export declare type FiltersColumn<TGenerics extends
|
|
34
|
+
export declare type FiltersColumn<TGenerics extends TableGenerics> = {
|
|
35
35
|
filterFn: FilterFnOption<Overwrite<TGenerics, {
|
|
36
36
|
Value: any;
|
|
37
37
|
}>>;
|
|
@@ -45,7 +45,7 @@ export declare type FiltersColumn<TGenerics extends AnyGenerics> = {
|
|
|
45
45
|
getPreFilteredUniqueValues: () => Map<any, number>;
|
|
46
46
|
getPreFilteredMinMaxValues: () => [any, any];
|
|
47
47
|
};
|
|
48
|
-
export declare type FiltersOptions<TGenerics extends
|
|
48
|
+
export declare type FiltersOptions<TGenerics extends TableGenerics> = {
|
|
49
49
|
filterFromLeafRows?: boolean;
|
|
50
50
|
filterFns?: TGenerics['FilterFns'];
|
|
51
51
|
enableFilters?: boolean;
|
|
@@ -60,7 +60,7 @@ export declare type FiltersOptions<TGenerics extends AnyGenerics> = {
|
|
|
60
60
|
getGlobalFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
61
61
|
getColumnCanGlobalFilterFn?: (column: Column<TGenerics>) => boolean;
|
|
62
62
|
};
|
|
63
|
-
export declare type FiltersInstance<TGenerics extends
|
|
63
|
+
export declare type FiltersInstance<TGenerics extends TableGenerics> = {
|
|
64
64
|
queueResetFilters: () => void;
|
|
65
65
|
getColumnAutoFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
|
|
66
66
|
getColumnFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
|
|
@@ -84,10 +84,10 @@ export declare type FiltersInstance<TGenerics extends AnyGenerics> = {
|
|
|
84
84
|
_getGlobalFilteredRowModel?: () => RowModel<TGenerics>;
|
|
85
85
|
};
|
|
86
86
|
export declare const Filters: {
|
|
87
|
-
getDefaultColumn: <TGenerics extends
|
|
87
|
+
getDefaultColumn: <TGenerics extends TableGenerics>() => FiltersColumnDef<TGenerics>;
|
|
88
88
|
getInitialState: () => FiltersTableState;
|
|
89
|
-
getDefaultOptions: <TGenerics_1 extends
|
|
90
|
-
createColumn: <TGenerics_2 extends
|
|
91
|
-
|
|
89
|
+
getDefaultOptions: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => FiltersOptions<TGenerics_1>;
|
|
90
|
+
createColumn: <TGenerics_2 extends TableGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => FiltersColumn<TGenerics_2>;
|
|
91
|
+
createInstance: <TGenerics_3 extends TableGenerics>(instance: TableInstance<TGenerics_3>) => FiltersInstance<TGenerics_3>;
|
|
92
92
|
};
|
|
93
|
-
export declare function shouldAutoRemoveFilter<TGenerics extends
|
|
93
|
+
export declare function shouldAutoRemoveFilter<TGenerics extends TableGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { RowModel } from '..';
|
|
2
2
|
import { BuiltInAggregationFn } from '../aggregationFns';
|
|
3
|
-
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, Renderable, UseRenderer,
|
|
3
|
+
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, Renderable, UseRenderer, TableGenerics } from '../types';
|
|
4
4
|
import { Overwrite } from '../utils';
|
|
5
5
|
export declare type GroupingState = string[];
|
|
6
|
-
export declare type AggregationFn<TGenerics extends
|
|
7
|
-
export declare type CustomAggregationFns<TGenerics extends
|
|
8
|
-
export declare type AggregationFnOption<TGenerics extends
|
|
6
|
+
export declare type AggregationFn<TGenerics extends TableGenerics> = (getLeafValues: () => TGenerics['Row'][], getChildValues: () => TGenerics['Row'][]) => any;
|
|
7
|
+
export declare type CustomAggregationFns<TGenerics extends TableGenerics> = Record<string, AggregationFn<TGenerics>>;
|
|
8
|
+
export declare type AggregationFnOption<TGenerics extends TableGenerics> = 'auto' | BuiltInAggregationFn | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>;
|
|
9
9
|
export declare type GroupingTableState = {
|
|
10
10
|
grouping: GroupingState;
|
|
11
11
|
};
|
|
12
|
-
export declare type GroupingColumnDef<TGenerics extends
|
|
12
|
+
export declare type GroupingColumnDef<TGenerics extends TableGenerics> = {
|
|
13
13
|
aggregationFn?: AggregationFnOption<Overwrite<TGenerics, {
|
|
14
14
|
Value: any;
|
|
15
15
|
}>>;
|
|
@@ -24,7 +24,7 @@ export declare type GroupingColumnDef<TGenerics extends AnyGenerics> = {
|
|
|
24
24
|
enableGrouping?: boolean;
|
|
25
25
|
defaultCanGroup?: boolean;
|
|
26
26
|
};
|
|
27
|
-
export declare type GroupingColumn<TGenerics extends
|
|
27
|
+
export declare type GroupingColumn<TGenerics extends TableGenerics> = {
|
|
28
28
|
aggregationFn?: AggregationFnOption<Overwrite<TGenerics, {
|
|
29
29
|
Value: any;
|
|
30
30
|
}>>;
|
|
@@ -39,7 +39,7 @@ export declare type GroupingRow = {
|
|
|
39
39
|
groupingValue?: any;
|
|
40
40
|
getIsGrouped: () => boolean;
|
|
41
41
|
};
|
|
42
|
-
export declare type GroupingCell<TGenerics extends
|
|
42
|
+
export declare type GroupingCell<TGenerics extends TableGenerics> = {
|
|
43
43
|
getIsGrouped: () => boolean;
|
|
44
44
|
getIsPlaceholder: () => boolean;
|
|
45
45
|
getIsAggregated: () => boolean;
|
|
@@ -50,7 +50,7 @@ export declare type ColumnDefaultOptions = {
|
|
|
50
50
|
autoResetGrouping: boolean;
|
|
51
51
|
enableGrouping: boolean;
|
|
52
52
|
};
|
|
53
|
-
export declare type GroupingOptions<TGenerics extends
|
|
53
|
+
export declare type GroupingOptions<TGenerics extends TableGenerics> = {
|
|
54
54
|
aggregationFns?: TGenerics['AggregationFns'];
|
|
55
55
|
onGroupingChange?: OnChangeFn<GroupingState>;
|
|
56
56
|
autoResetGrouping?: boolean;
|
|
@@ -64,7 +64,7 @@ export declare type ToggleGroupingProps = {
|
|
|
64
64
|
title?: string;
|
|
65
65
|
onClick?: (event: unknown) => void;
|
|
66
66
|
};
|
|
67
|
-
export declare type GroupingInstance<TGenerics extends
|
|
67
|
+
export declare type GroupingInstance<TGenerics extends TableGenerics> = {
|
|
68
68
|
queueResetGrouping: () => void;
|
|
69
69
|
getColumnAutoAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
70
70
|
getColumnAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
@@ -81,12 +81,12 @@ export declare type GroupingInstance<TGenerics extends AnyGenerics> = {
|
|
|
81
81
|
_getGroupedRowModel?: () => RowModel<TGenerics>;
|
|
82
82
|
};
|
|
83
83
|
export declare const Grouping: {
|
|
84
|
-
getDefaultColumn: <TGenerics extends
|
|
84
|
+
getDefaultColumn: <TGenerics extends TableGenerics>() => GroupingColumnDef<TGenerics>;
|
|
85
85
|
getInitialState: () => GroupingTableState;
|
|
86
|
-
getDefaultOptions: <TGenerics_1 extends
|
|
87
|
-
createColumn: <TGenerics_2 extends
|
|
88
|
-
|
|
89
|
-
createRow: <TGenerics_4 extends
|
|
90
|
-
createCell: <TGenerics_5 extends
|
|
91
|
-
orderColumns: <TGenerics_6 extends
|
|
86
|
+
getDefaultOptions: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => GroupingOptions<TGenerics_1>;
|
|
87
|
+
createColumn: <TGenerics_2 extends TableGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => GroupingColumn<TGenerics_2>;
|
|
88
|
+
createInstance: <TGenerics_3 extends TableGenerics>(instance: TableInstance<TGenerics_3>) => GroupingInstance<TGenerics_3>;
|
|
89
|
+
createRow: <TGenerics_4 extends TableGenerics>(row: Row<TGenerics_4>, instance: TableInstance<TGenerics_4>) => GroupingRow;
|
|
90
|
+
createCell: <TGenerics_5 extends TableGenerics>(cell: Cell<TGenerics_5>, column: Column<TGenerics_5>, row: Row<TGenerics_5>, instance: TableInstance<TGenerics_5>) => GroupingCell<TGenerics_5>;
|
|
91
|
+
orderColumns: <TGenerics_6 extends TableGenerics>(leafColumns: Column<TGenerics_6>[], grouping: string[], groupedColumnMode?: GroupingColumnMode) => Column<TGenerics_6>[];
|
|
92
92
|
};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type
|
|
3
|
-
_getAllVisibleCells: () => Cell<TGenerics>[];
|
|
4
|
-
getVisibleCells: () => Cell<TGenerics>[];
|
|
5
|
-
getLeftVisibleCells: () => Cell<TGenerics>[];
|
|
6
|
-
getCenterVisibleCells: () => Cell<TGenerics>[];
|
|
7
|
-
getRightVisibleCells: () => Cell<TGenerics>[];
|
|
8
|
-
};
|
|
9
|
-
export declare type HeadersInstance<TGenerics extends AnyGenerics> = {
|
|
1
|
+
import { Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, TableGenerics, PropGetterValue, TableInstance } from '../types';
|
|
2
|
+
export declare type HeadersInstance<TGenerics extends TableGenerics> = {
|
|
10
3
|
createHeader: (column: Column<TGenerics>, options: {
|
|
11
4
|
id?: string;
|
|
12
5
|
isPlaceholder?: boolean;
|
|
13
6
|
placeholderId?: string;
|
|
7
|
+
index: number;
|
|
14
8
|
depth: number;
|
|
15
9
|
}) => Header<TGenerics>;
|
|
16
10
|
getHeaderGroups: () => HeaderGroup<TGenerics>[];
|
|
@@ -34,10 +28,8 @@ export declare type HeadersInstance<TGenerics extends AnyGenerics> = {
|
|
|
34
28
|
getFooterGroupProps: <TGetter extends Getter<FooterGroupProps>>(id: string, userProps?: TGetter) => undefined | PropGetterValue<FooterGroupProps, TGetter>;
|
|
35
29
|
getHeaderProps: <TGetter extends Getter<HeaderProps>>(headerId: string, userProps?: TGetter) => undefined | PropGetterValue<HeaderProps, TGetter>;
|
|
36
30
|
getFooterProps: <TGetter extends Getter<FooterProps>>(headerId: string, userProps?: TGetter) => undefined | PropGetterValue<FooterProps, TGetter>;
|
|
37
|
-
getTotalWidth: () => number;
|
|
38
31
|
};
|
|
39
32
|
export declare const Headers: {
|
|
40
|
-
|
|
41
|
-
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => HeadersInstance<TGenerics_1>;
|
|
33
|
+
createInstance: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => HeadersInstance<TGenerics>;
|
|
42
34
|
};
|
|
43
|
-
export declare function buildHeaderGroups<TGenerics extends
|
|
35
|
+
export declare function buildHeaderGroups<TGenerics extends TableGenerics>(allColumns: Column<TGenerics>[], columnsToGroup: Column<TGenerics>[], instance: TableInstance<TGenerics>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TGenerics>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableInstance, OnChangeFn, Updater, Column,
|
|
1
|
+
import { TableInstance, OnChangeFn, Updater, Column, TableGenerics } from '../types';
|
|
2
2
|
export declare type ColumnOrderTableState = {
|
|
3
3
|
columnOrder: ColumnOrderState;
|
|
4
4
|
};
|
|
@@ -9,13 +9,13 @@ export declare type ColumnOrderOptions = {
|
|
|
9
9
|
export declare type ColumnOrderDefaultOptions = {
|
|
10
10
|
onColumnOrderChange: OnChangeFn<ColumnOrderState>;
|
|
11
11
|
};
|
|
12
|
-
export declare type ColumnOrderInstance<TGenerics extends
|
|
12
|
+
export declare type ColumnOrderInstance<TGenerics extends TableGenerics> = {
|
|
13
13
|
setColumnOrder: (updater: Updater<ColumnOrderState>) => void;
|
|
14
14
|
resetColumnOrder: () => void;
|
|
15
|
-
|
|
15
|
+
_getOrderColumnsFn: () => (columns: Column<TGenerics>[]) => Column<TGenerics>[];
|
|
16
16
|
};
|
|
17
17
|
export declare const Ordering: {
|
|
18
18
|
getInitialState: () => ColumnOrderTableState;
|
|
19
|
-
getDefaultOptions: <TGenerics extends
|
|
20
|
-
|
|
19
|
+
getDefaultOptions: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => ColumnOrderDefaultOptions;
|
|
20
|
+
createInstance: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => ColumnOrderInstance<TGenerics_1>;
|
|
21
21
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChangeFn,
|
|
1
|
+
import { OnChangeFn, TableGenerics, TableInstance, RowModel, Updater } from '../types';
|
|
2
2
|
export declare type PaginationState = {
|
|
3
3
|
pageIndex: number;
|
|
4
4
|
pageSize: number;
|
|
@@ -7,7 +7,7 @@ export declare type PaginationState = {
|
|
|
7
7
|
export declare type PaginationTableState = {
|
|
8
8
|
pagination: PaginationState;
|
|
9
9
|
};
|
|
10
|
-
export declare type PaginationOptions<TGenerics extends
|
|
10
|
+
export declare type PaginationOptions<TGenerics extends TableGenerics> = {
|
|
11
11
|
onPaginationChange?: OnChangeFn<PaginationState>;
|
|
12
12
|
autoResetPageIndex?: boolean;
|
|
13
13
|
getPaginationRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -16,7 +16,7 @@ export declare type PaginationDefaultOptions = {
|
|
|
16
16
|
onPaginationChange: OnChangeFn<PaginationState>;
|
|
17
17
|
autoResetPageIndex: boolean;
|
|
18
18
|
};
|
|
19
|
-
export declare type PaginationInstance<TGenerics extends
|
|
19
|
+
export declare type PaginationInstance<TGenerics extends TableGenerics> = {
|
|
20
20
|
queueResetPageIndex: () => void;
|
|
21
21
|
setPagination: (updater: Updater<PaginationState>) => void;
|
|
22
22
|
resetPagination: () => void;
|
|
@@ -37,6 +37,6 @@ export declare type PaginationInstance<TGenerics extends AnyGenerics> = {
|
|
|
37
37
|
};
|
|
38
38
|
export declare const Pagination: {
|
|
39
39
|
getInitialState: () => PaginationTableState;
|
|
40
|
-
getDefaultOptions: <TGenerics extends
|
|
41
|
-
|
|
40
|
+
getDefaultOptions: <TGenerics extends TableGenerics>(instance: TableInstance<TGenerics>) => PaginationDefaultOptions;
|
|
41
|
+
createInstance: <TGenerics_1 extends TableGenerics>(instance: TableInstance<TGenerics_1>) => PaginationInstance<TGenerics_1>;
|
|
42
42
|
};
|