@tanstack/table-core 8.0.0-alpha.9 → 8.0.0-beta.0
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 +120 -0
- package/build/cjs/aggregationFns.js.map +1 -0
- package/build/cjs/core/cell.js +40 -0
- package/build/cjs/core/cell.js.map +1 -0
- package/build/cjs/core/column.js +88 -0
- package/build/cjs/core/column.js.map +1 -0
- package/build/cjs/core/headers.js +403 -0
- package/build/cjs/core/headers.js.map +1 -0
- package/build/cjs/core/instance.js +255 -0
- package/build/cjs/core/instance.js.map +1 -0
- package/build/cjs/core/row.js +77 -0
- package/build/cjs/core/row.js.map +1 -0
- package/build/cjs/createTable.js +36 -29
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/ColumnSizing.js +157 -189
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Expanding.js +103 -155
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Filters.js +155 -304
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +97 -157
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Ordering.js +30 -41
- package/build/cjs/features/Ordering.js.map +1 -1
- package/build/cjs/features/Pagination.js +102 -105
- package/build/cjs/features/Pagination.js.map +1 -1
- package/build/cjs/features/Pinning.js +131 -89
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/RowSelection.js +138 -267
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Sorting.js +82 -167
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js +69 -115
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/filterFns.js +107 -0
- package/build/cjs/filterFns.js.map +1 -0
- package/build/cjs/index.js +36 -23
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/sortingFns.js +124 -0
- package/build/cjs/sortingFns.js.map +1 -0
- package/build/cjs/utils/filterRowsUtils.js +117 -0
- package/build/cjs/utils/filterRowsUtils.js.map +1 -0
- package/build/cjs/utils/getCoreRowModel.js +79 -0
- package/build/cjs/utils/getCoreRowModel.js.map +1 -0
- package/build/cjs/utils/getExpandedRowModel.js +57 -0
- package/build/cjs/utils/getExpandedRowModel.js.map +1 -0
- package/build/cjs/utils/getFacetedMinMaxValues.js +54 -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 +139 -0
- package/build/cjs/utils/getFilteredRowModel.js.map +1 -0
- package/build/cjs/utils/getGroupedRowModel.js +161 -0
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -0
- package/build/cjs/utils/getPaginationRowModel.js +61 -0
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -0
- package/build/cjs/utils/getSortedRowModel.js +110 -0
- package/build/cjs/utils/getSortedRowModel.js.map +1 -0
- package/build/cjs/utils.js +38 -107
- package/build/cjs/utils.js.map +1 -1
- package/build/esm/index.js +2976 -3853
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +586 -408
- package/build/types/aggregationFns.d.ts +13 -0
- package/build/types/core/cell.d.ts +9 -0
- package/build/types/core/column.d.ts +40 -0
- package/build/types/core/headers.d.ts +46 -0
- package/build/types/core/instance.d.ts +57 -0
- package/build/types/core/row.d.ts +15 -0
- package/build/types/createTable.d.ts +47 -26
- package/build/types/features/ColumnSizing.d.ts +32 -44
- package/build/types/features/Expanding.d.ts +15 -26
- package/build/types/features/Filters.d.ts +64 -63
- package/build/types/features/Grouping.d.ts +32 -46
- package/build/types/features/Ordering.d.ts +7 -10
- package/build/types/features/Pagination.d.ts +16 -15
- package/build/types/features/Pinning.d.ts +16 -17
- package/build/types/features/RowSelection.d.ts +13 -33
- package/build/types/features/Sorting.d.ts +25 -44
- package/build/types/features/Visibility.d.ts +16 -25
- package/build/types/filterFns.d.ts +13 -0
- package/build/types/index.d.ts +16 -10
- package/build/types/sortingFns.d.ts +11 -0
- package/build/types/types.d.ts +37 -122
- package/build/types/utils/filterRowsUtils.d.ts +4 -0
- package/build/types/utils/getCoreRowModel.d.ts +2 -0
- package/build/types/utils/getExpandedRowModel.d.ts +7 -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/getFilteredRowModel.d.ts +2 -0
- package/build/types/utils/getGroupedRowModel.d.ts +2 -0
- package/build/types/utils/getPaginationRowModel.d.ts +4 -0
- package/build/types/utils/getSortedRowModel.d.ts +2 -0
- package/build/types/utils.d.ts +7 -11
- package/build/umd/index.development.js +3024 -3893
- 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 +9 -10
- package/src/.DS_Store +0 -0
- package/src/aggregationFns.ts +123 -0
- package/src/core/cell.ts +48 -0
- package/src/core/column.ts +147 -0
- package/src/core/headers.ts +575 -0
- package/src/core/instance.ts +361 -0
- package/src/core/row.ts +85 -0
- package/src/createTable.ts +188 -0
- package/src/features/ColumnSizing.ts +170 -185
- package/src/features/Expanding.ts +122 -194
- package/src/features/Filters.ts +301 -381
- package/src/features/Grouping.ts +160 -220
- package/src/features/Ordering.ts +24 -25
- package/src/features/Pagination.ts +90 -73
- package/src/features/Pinning.ts +186 -63
- package/src/features/RowSelection.ts +107 -245
- package/src/features/Sorting.ts +127 -225
- package/src/features/Visibility.ts +116 -132
- package/src/filterFns.ts +135 -0
- package/src/index.ts +29 -0
- package/src/{sortTypes.ts → sortingFns.ts} +63 -85
- package/src/types.ts +62 -168
- package/src/utils/filterRowsUtils.ts +112 -0
- package/src/utils/getCoreRowModel.ts +84 -0
- package/src/utils/getExpandedRowModel.ts +54 -0
- package/src/utils/getFacetedMinMaxValues.ts +40 -0
- package/src/utils/getFacetedRowModel.ts +50 -0
- package/src/utils/getFacetedUniqueValues.ts +37 -0
- package/src/utils/getFilteredRowModel.ts +159 -0
- package/src/utils/getGroupedRowModel.ts +175 -0
- package/src/utils/getPaginationRowModel.ts +48 -0
- package/src/utils/getSortedRowModel.ts +116 -0
- package/src/utils.ts +126 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -112
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/build/cjs/aggregationTypes.js +0 -130
- package/build/cjs/aggregationTypes.js.map +0 -1
- package/build/cjs/core.js +0 -545
- package/build/cjs/core.js.map +0 -1
- package/build/cjs/features/Headers.js +0 -630
- package/build/cjs/features/Headers.js.map +0 -1
- package/build/cjs/filterTypes.js +0 -172
- package/build/cjs/filterTypes.js.map +0 -1
- package/build/cjs/sortTypes.js +0 -122
- package/build/cjs/sortTypes.js.map +0 -1
- package/build/cjs/types.js +0 -22
- package/build/cjs/types.js.map +0 -1
- package/build/cjs/utils/columnFilterRowsFn.js +0 -131
- package/build/cjs/utils/columnFilterRowsFn.js.map +0 -1
- package/build/cjs/utils/expandRowsFn.js +0 -38
- package/build/cjs/utils/expandRowsFn.js.map +0 -1
- package/build/cjs/utils/globalFilterRowsFn.js +0 -101
- package/build/cjs/utils/globalFilterRowsFn.js.map +0 -1
- package/build/cjs/utils/groupRowsFn.js +0 -155
- package/build/cjs/utils/groupRowsFn.js.map +0 -1
- package/build/cjs/utils/paginateRowsFn.js +0 -44
- package/build/cjs/utils/paginateRowsFn.js.map +0 -1
- package/build/cjs/utils/sortRowsFn.js +0 -94
- package/build/cjs/utils/sortRowsFn.js.map +0 -1
- package/build/types/aggregationTypes.d.ts +0 -22
- package/build/types/core.d.ts +0 -105
- package/build/types/features/Headers.d.ts +0 -43
- package/build/types/filterTypes.d.ts +0 -50
- package/build/types/sortTypes.d.ts +0 -18
- package/build/types/utils/columnFilterRowsFn.d.ts +0 -2
- package/build/types/utils/expandRowsFn.d.ts +0 -2
- package/build/types/utils/globalFilterRowsFn.d.ts +0 -2
- package/build/types/utils/groupRowsFn.d.ts +0 -2
- package/build/types/utils/paginateRowsFn.d.ts +0 -2
- package/build/types/utils/sortRowsFn.d.ts +0 -2
- package/src/aggregationTypes.ts +0 -115
- package/src/core.tsx +0 -763
- package/src/createTable.tsx +0 -137
- package/src/features/Headers.ts +0 -747
- package/src/filterTypes.ts +0 -188
- package/src/index.tsx +0 -23
- package/src/utils/columnFilterRowsFn.ts +0 -113
- package/src/utils/expandRowsFn.ts +0 -30
- package/src/utils/globalFilterRowsFn.ts +0 -89
- package/src/utils/groupRowsFn.ts +0 -170
- package/src/utils/paginateRowsFn.ts +0 -28
- package/src/utils/sortRowsFn.ts +0 -95
- package/src/utils.tsx +0 -221
package/build/types/types.d.ts
CHANGED
|
@@ -1,138 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CoreColumn, CoreColumnDef
|
|
1
|
+
import { CoreOptions, CoreTableState, CoreInstance } from './core/instance';
|
|
2
|
+
import { CoreColumn, CoreColumnDef } from './core/column';
|
|
3
3
|
import { VisibilityInstance, VisibilityTableState, VisibilityColumn as ColumnVisibilityColumn, VisibilityOptions, VisibilityColumnDef, VisibilityRow } from './features/Visibility';
|
|
4
4
|
import { ColumnOrderInstance, ColumnOrderOptions, ColumnOrderTableState } from './features/Ordering';
|
|
5
|
-
import { ColumnPinningColumn, ColumnPinningColumnDef, ColumnPinningInstance, ColumnPinningOptions, ColumnPinningTableState } from './features/Pinning';
|
|
6
|
-
import {
|
|
7
|
-
import { FiltersColumn, FiltersColumnDef, FiltersInstance, FiltersOptions, FiltersTableState } from './features/Filters';
|
|
5
|
+
import { ColumnPinningColumn, ColumnPinningColumnDef, ColumnPinningInstance, ColumnPinningOptions, ColumnPinningRow, ColumnPinningTableState } from './features/Pinning';
|
|
6
|
+
import { CoreHeader, CoreHeaderGroup, HeadersInstance } from './core/headers';
|
|
7
|
+
import { FiltersColumn, FiltersColumnDef, FiltersInstance, FiltersOptions, FiltersRow, FiltersTableState } from './features/Filters';
|
|
8
8
|
import { SortingColumn, SortingColumnDef, SortingInstance, SortingOptions, SortingTableState } from './features/Sorting';
|
|
9
|
-
import { GroupingColumn, GroupingColumnDef, GroupingInstance, GroupingOptions, GroupingRow, GroupingTableState } from './features/Grouping';
|
|
9
|
+
import { GroupingCell, GroupingColumn, GroupingColumnDef, GroupingInstance, GroupingOptions, GroupingRow, GroupingTableState } from './features/Grouping';
|
|
10
10
|
import { ExpandedInstance, ExpandedOptions, ExpandedTableState, ExpandedRow } from './features/Expanding';
|
|
11
|
-
import { Overwrite } from './utils';
|
|
12
11
|
import { ColumnSizingColumn, ColumnSizingColumnDef, ColumnSizingHeader, ColumnSizingInstance, ColumnSizingOptions, ColumnSizingTableState } from './features/ColumnSizing';
|
|
13
|
-
import { PaginationInstance, PaginationOptions, PaginationTableState } from './features/Pagination';
|
|
12
|
+
import { PaginationInitialTableState, PaginationInstance, PaginationOptions, PaginationTableState } from './features/Pagination';
|
|
14
13
|
import { RowSelectionInstance, RowSelectionOptions, RowSelectionRow, RowSelectionTableState } from './features/RowSelection';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
FilterFns: object;
|
|
19
|
-
SortingFns: object;
|
|
20
|
-
AggregationFns: object;
|
|
21
|
-
};
|
|
22
|
-
export declare type PartialGenerics = Partial<DefaultGenerics>;
|
|
23
|
-
export declare type TableInstance<TGenerics extends PartialGenerics> = TableCore<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & HeadersInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>;
|
|
24
|
-
export declare type Renderable<TProps> = React.ReactNode | React.FunctionComponent<TProps> | React.Component<TProps>;
|
|
25
|
-
export declare type Options<TGenerics extends PartialGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>;
|
|
14
|
+
import { CoreRow } from './core/row';
|
|
15
|
+
import { PartialKeys } from './utils';
|
|
16
|
+
import { CoreCell } from './core/cell';
|
|
26
17
|
export declare type Updater<T> = T | ((old: T) => T);
|
|
27
|
-
export declare type OnChangeFn<T> = (updaterOrValue: Updater<T
|
|
28
|
-
export declare type
|
|
29
|
-
|
|
18
|
+
export declare type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void;
|
|
19
|
+
export declare type TableGenerics = {
|
|
20
|
+
Row?: any;
|
|
21
|
+
Value?: any;
|
|
22
|
+
FilterFns?: any;
|
|
23
|
+
SortingFns?: any;
|
|
24
|
+
AggregationFns?: any;
|
|
25
|
+
Renderer?: any;
|
|
26
|
+
Rendered?: any;
|
|
27
|
+
ColumnMeta?: any;
|
|
28
|
+
TableMeta?: any;
|
|
29
|
+
FilterMeta?: any;
|
|
30
|
+
};
|
|
31
|
+
export declare type AnyRender = (Comp: any, props: any) => any;
|
|
32
|
+
export declare type TableInstance<TGenerics extends TableGenerics> = CoreInstance<TGenerics> & HeadersInstance<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>;
|
|
33
|
+
export declare type TableOptionsResolved<TGenerics extends TableGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>;
|
|
34
|
+
export declare type TableOptions<TGenerics extends TableGenerics> = Omit<PartialKeys<TableOptionsResolved<TGenerics>, 'state' | 'onStateChange'>, 'render'>;
|
|
35
|
+
export declare type TableState = CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState;
|
|
36
|
+
export declare type InitialTableState = Partial<CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationInitialTableState & RowSelectionTableState>;
|
|
37
|
+
export declare type Row<TGenerics extends TableGenerics> = CoreRow<TGenerics> & VisibilityRow<TGenerics> & ColumnPinningRow<TGenerics> & FiltersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow;
|
|
30
38
|
export declare type RowValues = {
|
|
31
39
|
[key: string]: any;
|
|
32
40
|
};
|
|
33
|
-
export declare type RowModel<TGenerics extends
|
|
41
|
+
export declare type RowModel<TGenerics extends TableGenerics> = {
|
|
34
42
|
rows: Row<TGenerics>[];
|
|
35
43
|
flatRows: Row<TGenerics>[];
|
|
36
44
|
rowsById: Record<string, Row<TGenerics>>;
|
|
37
45
|
};
|
|
38
46
|
export declare type AccessorFn<TData> = (originalRow: TData, index: number) => any;
|
|
39
|
-
export declare
|
|
40
|
-
export declare type
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export declare type
|
|
44
|
-
export declare type
|
|
45
|
-
export declare type Cell<TGenerics extends PartialGenerics> = {
|
|
46
|
-
id: string;
|
|
47
|
-
rowId: string;
|
|
48
|
-
columnId: string;
|
|
49
|
-
value: TGenerics['Value'];
|
|
50
|
-
row: Row<TGenerics>;
|
|
51
|
-
column: Column<TGenerics>;
|
|
52
|
-
getCellProps: PropGetter<CellProps>;
|
|
53
|
-
renderCell: () => React.ReactNode;
|
|
54
|
-
};
|
|
55
|
-
export declare type Header<TGenerics extends PartialGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>;
|
|
56
|
-
export declare type CoreHeader<TGenerics extends PartialGenerics> = {
|
|
57
|
-
id: string;
|
|
58
|
-
depth: number;
|
|
59
|
-
column: Column<TGenerics>;
|
|
60
|
-
getWidth: () => number;
|
|
61
|
-
subHeaders: Header<TGenerics>[];
|
|
62
|
-
colSpan?: number;
|
|
63
|
-
rowSpan?: number;
|
|
64
|
-
getHeaderProps: PropGetter<HeaderProps>;
|
|
65
|
-
getFooterProps: PropGetter<HeaderProps>;
|
|
66
|
-
getLeafHeaders: () => Header<TGenerics>[];
|
|
67
|
-
isPlaceholder?: boolean;
|
|
68
|
-
placeholderId?: string;
|
|
69
|
-
renderHeader: (options?: {
|
|
70
|
-
renderPlaceholder?: boolean;
|
|
71
|
-
}) => React.ReactNode;
|
|
72
|
-
renderFooter: (options?: {
|
|
73
|
-
renderPlaceholder?: boolean;
|
|
74
|
-
}) => React.ReactNode;
|
|
75
|
-
};
|
|
76
|
-
export declare type HeaderGroup<TGenerics extends PartialGenerics> = {
|
|
77
|
-
id: string;
|
|
78
|
-
depth: number;
|
|
79
|
-
headers: Header<TGenerics>[];
|
|
80
|
-
getHeaderGroupProps: PropGetter<HeaderGroupProps>;
|
|
81
|
-
getFooterGroupProps: PropGetter<FooterGroupProps>;
|
|
82
|
-
};
|
|
83
|
-
export declare type HeaderRenderProps<THeader> = {
|
|
84
|
-
header: THeader;
|
|
85
|
-
};
|
|
86
|
-
export declare type FooterRenderProps<THeader> = {
|
|
87
|
-
header: THeader;
|
|
88
|
-
};
|
|
89
|
-
export declare type CellRenderProps<TCell, TRow> = {
|
|
90
|
-
cell: TCell;
|
|
91
|
-
row: TRow;
|
|
92
|
-
};
|
|
93
|
-
export declare type TableProps = {
|
|
94
|
-
role: string;
|
|
95
|
-
};
|
|
96
|
-
export declare type TableBodyProps = {
|
|
97
|
-
role: string;
|
|
98
|
-
};
|
|
99
|
-
export declare type TableHeadProps = {
|
|
100
|
-
key: string;
|
|
101
|
-
role: string;
|
|
102
|
-
};
|
|
103
|
-
export declare type TableFooterProps = {
|
|
104
|
-
key: string;
|
|
105
|
-
role: string;
|
|
106
|
-
};
|
|
107
|
-
export declare type HeaderGroupProps = {
|
|
108
|
-
key: string;
|
|
109
|
-
role: string;
|
|
110
|
-
};
|
|
111
|
-
export declare type FooterGroupProps = {
|
|
112
|
-
key: string;
|
|
113
|
-
role: string;
|
|
114
|
-
};
|
|
115
|
-
export declare type HeaderProps = {
|
|
116
|
-
key: string;
|
|
117
|
-
role: string;
|
|
118
|
-
colSpan?: number;
|
|
119
|
-
rowSpan?: number;
|
|
120
|
-
};
|
|
121
|
-
export declare type FooterProps = {
|
|
122
|
-
key: string;
|
|
123
|
-
role: string;
|
|
124
|
-
colSpan?: number;
|
|
125
|
-
rowSpan?: number;
|
|
126
|
-
};
|
|
127
|
-
export declare type RowProps = {
|
|
128
|
-
key: string;
|
|
129
|
-
role: string;
|
|
130
|
-
};
|
|
131
|
-
export declare type CellProps = {
|
|
132
|
-
key: string;
|
|
133
|
-
role: string;
|
|
134
|
-
};
|
|
135
|
-
export declare type PropGetter<TBase> = <TGetter extends Getter<TBase>>(userProps?: TGetter) => PropGetterValue<TBase, TGetter>;
|
|
136
|
-
export declare type Getter<TInitial> = ((initial: TInitial) => object) | object | undefined;
|
|
137
|
-
export declare type PropGetterValue<TBase, TGetter> = TGetter extends undefined ? TBase : TGetter extends (...args: any[]) => infer TReturn ? Overwrite<TBase, TReturn> : TGetter extends object ? Overwrite<TBase, TGetter> : never;
|
|
47
|
+
export declare type Renderable<TGenerics extends TableGenerics, TProps> = string | ((props: TProps) => TGenerics['Rendered']);
|
|
48
|
+
export declare type ColumnDef<TGenerics extends TableGenerics> = CoreColumnDef<TGenerics> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TGenerics> & SortingColumnDef<TGenerics> & GroupingColumnDef<TGenerics> & ColumnSizingColumnDef;
|
|
49
|
+
export declare type Column<TGenerics extends TableGenerics> = CoreColumn<TGenerics> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TGenerics> & SortingColumn<TGenerics> & GroupingColumn<TGenerics> & ColumnSizingColumn<TGenerics>;
|
|
50
|
+
export declare type Cell<TGenerics extends TableGenerics> = CoreCell<TGenerics> & GroupingCell<TGenerics>;
|
|
51
|
+
export declare type Header<TGenerics extends TableGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>;
|
|
52
|
+
export declare type HeaderGroup<TGenerics extends TableGenerics> = CoreHeaderGroup<TGenerics>;
|
|
138
53
|
export declare type NoInfer<A extends any> = [A][A extends any ? 0 : never];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableGenerics, Row, RowModel, TableInstance } from '../types';
|
|
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>;
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
rows: Row<TGenerics>[];
|
|
5
|
+
flatRows: Row<TGenerics>[];
|
|
6
|
+
rowsById: Record<string, Row<TGenerics>>;
|
|
7
|
+
};
|
package/build/types/utils.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Getter, NoInfer, PropGetterValue, Renderable, TableState, Updater } from './types';
|
|
3
|
-
export declare type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
1
|
+
import { NoInfer, TableState, Updater } from './types';
|
|
4
2
|
export declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
5
3
|
export declare type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
6
|
-
export declare type Overwrite<T, U
|
|
7
|
-
|
|
4
|
+
export declare type Overwrite<T, U extends {
|
|
5
|
+
[TKey in keyof T]?: any;
|
|
6
|
+
}> = Omit<T, keyof U> & U;
|
|
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
10
|
export declare function makeStateUpdater(key: keyof TableState, instance: unknown): (updater: Updater<any>) => void;
|
|
11
11
|
declare type AnyFunction = (...args: any) => any;
|
|
12
12
|
export declare function isFunction<T extends AnyFunction>(d: any): d is T;
|
|
13
13
|
export declare function flattenBy<TNode>(arr: TNode[], getChildren: (item: TNode) => TNode[]): TNode[];
|
|
14
|
-
declare type PropGetterImpl = <TBaseProps, TGetter extends Getter<TBaseProps>>(initial: TBaseProps, userProps?: TGetter) => PropGetterValue<TBaseProps, TGetter>;
|
|
15
|
-
export declare const propGetter: PropGetterImpl;
|
|
16
14
|
export declare function memo<TDeps extends readonly any[], TResult>(getDeps: () => [...TDeps], fn: (...args: NoInfer<[...TDeps]>) => TResult, opts: {
|
|
17
|
-
key:
|
|
15
|
+
key: any;
|
|
18
16
|
debug?: () => any;
|
|
19
|
-
onChange?: (result: TResult
|
|
17
|
+
onChange?: (result: TResult) => void;
|
|
20
18
|
}): () => TResult;
|
|
21
|
-
export declare type Render = typeof flexRender;
|
|
22
|
-
export declare function flexRender<TProps extends {}>(Comp: Renderable<TProps>, props: TProps): React.ReactNode;
|
|
23
19
|
export {};
|