@tanstack/react-table 8.0.0-alpha.6 → 8.0.0-alpha.9
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 +66 -73
- package/build/cjs/core.js.map +1 -1
- package/build/cjs/createTable.js +47 -33
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/ColumnSizing.js +23 -22
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Expanding.js +10 -22
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Filters.js +27 -58
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +10 -27
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Headers.js +108 -28
- 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 +24 -29
- package/build/cjs/features/Pagination.js.map +1 -1
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/RowSelection.js +23 -38
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Sorting.js +10 -22
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js +10 -2
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/filterTypes.js.map +1 -1
- package/build/cjs/index.js +12 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/sortTypes.js.map +1 -1
- package/build/cjs/types.js +22 -0
- package/build/cjs/types.js.map +1 -0
- package/build/cjs/utils/columnFilterRowsFn.js.map +1 -1
- package/build/cjs/utils/expandRowsFn.js.map +1 -1
- package/build/cjs/utils/globalFilterRowsFn.js.map +1 -1
- package/build/cjs/utils/groupRowsFn.js.map +1 -1
- package/build/cjs/utils/paginateRowsFn.js.map +1 -1
- package/build/cjs/utils/sortRowsFn.js.map +1 -1
- package/build/cjs/utils.js +44 -18
- package/build/cjs/utils.js.map +1 -1
- package/build/esm/index.js +1388 -1355
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +337 -307
- package/build/types/core.d.ts +63 -67
- package/build/types/createTable.d.ts +34 -44
- package/build/types/features/ColumnSizing.d.ts +13 -7
- package/build/types/features/Expanding.d.ts +11 -16
- package/build/types/features/Filters.d.ts +39 -47
- package/build/types/features/Grouping.d.ts +28 -27
- package/build/types/features/Headers.d.ts +30 -30
- package/build/types/features/Ordering.d.ts +5 -5
- package/build/types/features/Pagination.d.ts +11 -16
- package/build/types/features/Pinning.d.ts +5 -5
- package/build/types/features/RowSelection.d.ts +15 -23
- package/build/types/features/Sorting.d.ts +26 -25
- package/build/types/features/Visibility.d.ts +9 -9
- package/build/types/filterTypes.d.ts +10 -10
- package/build/types/index.d.ts +1 -0
- package/build/types/sortTypes.d.ts +7 -7
- package/build/types/types.d.ts +34 -23
- package/build/types/utils/columnFilterRowsFn.d.ts +2 -2
- package/build/types/utils/expandRowsFn.d.ts +2 -2
- package/build/types/utils/globalFilterRowsFn.d.ts +2 -2
- package/build/types/utils/groupRowsFn.d.ts +2 -2
- package/build/types/utils/paginateRowsFn.d.ts +2 -2
- package/build/types/utils/sortRowsFn.d.ts +2 -2
- package/build/types/utils.d.ts +5 -6
- package/build/umd/index.development.js +1397 -1354
- 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.tsx +192 -520
- package/src/createTable.tsx +137 -192
- package/src/features/ColumnSizing.ts +48 -77
- package/src/features/Expanding.ts +25 -113
- package/src/features/Filters.ts +91 -293
- package/src/features/Grouping.ts +60 -165
- package/src/features/Headers.ts +148 -331
- package/src/features/Ordering.ts +19 -42
- package/src/features/Pagination.ts +35 -110
- package/src/features/Pinning.ts +16 -40
- package/src/features/RowSelection.ts +47 -227
- package/src/features/Sorting.ts +49 -143
- package/src/features/Visibility.ts +23 -64
- package/src/filterTypes.ts +19 -82
- package/src/index.tsx +1 -0
- package/src/sortTypes.ts +19 -31
- package/src/types.ts +80 -100
- package/src/utils/columnFilterRowsFn.ts +11 -53
- package/src/utils/expandRowsFn.ts +7 -27
- package/src/utils/globalFilterRowsFn.ts +10 -43
- package/src/utils/groupRowsFn.ts +13 -37
- package/src/utils/paginateRowsFn.ts +5 -11
- package/src/utils/sortRowsFn.ts +8 -28
- package/src/utils.tsx +61 -35
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import React, { MouseEvent, TouchEvent } from 'react';
|
|
2
2
|
import { RowModel } from '..';
|
|
3
3
|
import { BuiltInAggregationType } from '../aggregationTypes';
|
|
4
|
-
import { Cell, Column, Getter, OnChangeFn, PropGetterValue,
|
|
4
|
+
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, PartialGenerics } from '../types';
|
|
5
|
+
import { Overwrite } from '../utils';
|
|
5
6
|
export declare type GroupingState = string[];
|
|
6
|
-
export declare type AggregationFn = (leafValues:
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type AggregationFn<TGenerics extends PartialGenerics> = (leafValues: TGenerics['Row'][], childValues: TGenerics['Row'][]) => any;
|
|
8
|
+
export declare type CustomAggregationTypes<TGenerics extends PartialGenerics> = Record<string, AggregationFn<TGenerics>>;
|
|
9
|
+
export declare type AggregationType<TGenerics extends PartialGenerics> = 'auto' | BuiltInAggregationType | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>;
|
|
8
10
|
export declare type GroupingTableState = {
|
|
9
11
|
grouping: GroupingState;
|
|
10
12
|
};
|
|
11
|
-
export declare type GroupingColumnDef<
|
|
12
|
-
aggregationType?: AggregationType<
|
|
13
|
+
export declare type GroupingColumnDef<TGenerics extends PartialGenerics> = {
|
|
14
|
+
aggregationType?: AggregationType<Overwrite<TGenerics, {
|
|
15
|
+
Value: any;
|
|
16
|
+
}>>;
|
|
13
17
|
aggregateValue?: (columnValue: unknown) => any;
|
|
14
18
|
renderAggregatedCell?: () => React.ReactNode;
|
|
15
19
|
enableGrouping?: boolean;
|
|
16
20
|
defaultCanGroup?: boolean;
|
|
17
21
|
};
|
|
18
|
-
export declare type GroupingColumn<
|
|
19
|
-
aggregationType?: AggregationType<
|
|
22
|
+
export declare type GroupingColumn<TGenerics extends PartialGenerics> = {
|
|
23
|
+
aggregationType?: AggregationType<Overwrite<TGenerics, {
|
|
24
|
+
Value: any;
|
|
25
|
+
}>>;
|
|
20
26
|
getCanGroup: () => boolean;
|
|
21
27
|
getIsGrouped: () => boolean;
|
|
22
28
|
getGroupedIndex: () => number;
|
|
@@ -38,13 +44,13 @@ export declare type ColumnDefaultOptions = {
|
|
|
38
44
|
autoResetGrouping: boolean;
|
|
39
45
|
enableGrouping: boolean;
|
|
40
46
|
};
|
|
41
|
-
export declare type GroupingOptions<
|
|
42
|
-
aggregationTypes?:
|
|
47
|
+
export declare type GroupingOptions<TGenerics extends PartialGenerics> = {
|
|
48
|
+
aggregationTypes?: TGenerics['AggregationFns'];
|
|
43
49
|
onGroupingChange?: OnChangeFn<GroupingState>;
|
|
44
50
|
autoResetGrouping?: boolean;
|
|
45
51
|
enableGrouping?: boolean;
|
|
46
52
|
enableGroupingRemoval?: boolean;
|
|
47
|
-
groupRowsFn?: (instance:
|
|
53
|
+
groupRowsFn?: (instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>) => RowModel<TGenerics>;
|
|
48
54
|
groupedColumnMode?: false | 'reorder' | 'remove';
|
|
49
55
|
};
|
|
50
56
|
export declare type GroupingColumnMode = false | 'reorder' | 'remove';
|
|
@@ -52,10 +58,10 @@ export declare type ToggleGroupingProps = {
|
|
|
52
58
|
title?: string;
|
|
53
59
|
onClick?: (event: MouseEvent | TouchEvent) => void;
|
|
54
60
|
};
|
|
55
|
-
export declare type GroupingInstance<
|
|
61
|
+
export declare type GroupingInstance<TGenerics extends PartialGenerics> = {
|
|
56
62
|
_notifyGroupingReset: () => void;
|
|
57
|
-
getColumnAutoAggregationFn: (columnId: string) => AggregationFn | undefined;
|
|
58
|
-
getColumnAggregationFn: (columnId: string) => AggregationFn | undefined;
|
|
63
|
+
getColumnAutoAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
64
|
+
getColumnAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
|
|
59
65
|
setGrouping: (updater: Updater<GroupingState>) => void;
|
|
60
66
|
resetGrouping: () => void;
|
|
61
67
|
toggleColumnGrouping: (columnId: string) => void;
|
|
@@ -64,19 +70,14 @@ export declare type GroupingInstance<TData, TValue, TFilterFns, TSortingFns, TAg
|
|
|
64
70
|
getColumnGroupedIndex: (columnId: string) => number;
|
|
65
71
|
getToggleGroupingProps: <TGetter extends Getter<ToggleGroupingProps>>(columnId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleGroupingProps, TGetter>;
|
|
66
72
|
getRowIsGrouped: (rowId: string) => boolean;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
getPreGroupedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
70
|
-
getPreGroupedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
71
|
-
getGroupedRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
72
|
-
getGroupedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
73
|
-
getGroupedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
73
|
+
getPreGroupedRowModel: () => RowModel<TGenerics>;
|
|
74
|
+
getGroupedRowModel: () => RowModel<TGenerics>;
|
|
74
75
|
};
|
|
75
|
-
export declare function getDefaultColumn<
|
|
76
|
+
export declare function getDefaultColumn<TGenerics extends PartialGenerics>(): GroupingColumnDef<TGenerics>;
|
|
76
77
|
export declare function getInitialState(): GroupingTableState;
|
|
77
|
-
export declare function getDefaultOptions<
|
|
78
|
-
export declare function createColumn<
|
|
79
|
-
export declare function getInstance<
|
|
80
|
-
export declare function createRow<
|
|
81
|
-
export declare function createCell<
|
|
82
|
-
export declare function orderColumns<
|
|
78
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): GroupingOptions<TGenerics>;
|
|
79
|
+
export declare function createColumn<TGenerics extends PartialGenerics>(column: Column<TGenerics>, instance: TableInstance<TGenerics>): GroupingColumn<TGenerics>;
|
|
80
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): GroupingInstance<TGenerics>;
|
|
81
|
+
export declare function createRow<TGenerics extends PartialGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>): GroupingRow;
|
|
82
|
+
export declare function createCell<TGenerics extends PartialGenerics>(cell: Cell<TGenerics> & GroupingCell, column: Column<TGenerics>, row: Row<TGenerics>, _instance: TableInstance<TGenerics>): GroupingCell;
|
|
83
|
+
export declare function orderColumns<TGenerics extends PartialGenerics>(leafColumns: Column<TGenerics>[], grouping: string[], groupedColumnMode?: GroupingColumnMode): Column<TGenerics>[];
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Cell, Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, PropGetterValue,
|
|
2
|
-
export declare type HeadersRow<
|
|
3
|
-
_getAllVisibleCells: () => Cell<
|
|
4
|
-
getVisibleCells: () => Cell<
|
|
5
|
-
getLeftVisibleCells: () => Cell<
|
|
6
|
-
getCenterVisibleCells: () => Cell<
|
|
7
|
-
getRightVisibleCells: () => Cell<
|
|
1
|
+
import { Cell, Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, PartialGenerics, PropGetterValue, TableInstance, Row } from '../types';
|
|
2
|
+
export declare type HeadersRow<TGenerics extends PartialGenerics> = {
|
|
3
|
+
_getAllVisibleCells: () => Cell<TGenerics>[];
|
|
4
|
+
getVisibleCells: () => Cell<TGenerics>[];
|
|
5
|
+
getLeftVisibleCells: () => Cell<TGenerics>[];
|
|
6
|
+
getCenterVisibleCells: () => Cell<TGenerics>[];
|
|
7
|
+
getRightVisibleCells: () => Cell<TGenerics>[];
|
|
8
8
|
};
|
|
9
|
-
export declare type HeadersInstance<
|
|
10
|
-
createHeader: (column: Column<
|
|
9
|
+
export declare type HeadersInstance<TGenerics extends PartialGenerics> = {
|
|
10
|
+
createHeader: (column: Column<TGenerics>, options: {
|
|
11
11
|
id?: string;
|
|
12
12
|
isPlaceholder?: boolean;
|
|
13
13
|
placeholderId?: string;
|
|
14
14
|
depth: number;
|
|
15
|
-
}) => Header<
|
|
16
|
-
getHeaderGroups: () => HeaderGroup<
|
|
17
|
-
getLeftHeaderGroups: () => HeaderGroup<
|
|
18
|
-
getCenterHeaderGroups: () => HeaderGroup<
|
|
19
|
-
getRightHeaderGroups: () => HeaderGroup<
|
|
20
|
-
getFooterGroups: () => HeaderGroup<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
getRightFooterGroups: () => HeaderGroup<
|
|
24
|
-
getFlatHeaders: () => Header<
|
|
25
|
-
getLeftFlatHeaders: () => Header<
|
|
26
|
-
getCenterFlatHeaders: () => Header<
|
|
27
|
-
getRightFlatHeaders: () => Header<
|
|
28
|
-
getLeafHeaders: () => Header<
|
|
29
|
-
getLeftLeafHeaders: () => Header<
|
|
30
|
-
getCenterLeafHeaders: () => Header<
|
|
31
|
-
getRightLeafHeaders: () => Header<
|
|
32
|
-
getHeader: (id: string) => Header<
|
|
15
|
+
}) => Header<TGenerics>;
|
|
16
|
+
getHeaderGroups: () => HeaderGroup<TGenerics>[];
|
|
17
|
+
getLeftHeaderGroups: () => HeaderGroup<TGenerics>[];
|
|
18
|
+
getCenterHeaderGroups: () => HeaderGroup<TGenerics>[];
|
|
19
|
+
getRightHeaderGroups: () => HeaderGroup<TGenerics>[];
|
|
20
|
+
getFooterGroups: () => HeaderGroup<TGenerics>[];
|
|
21
|
+
getLeftFooterGroups: () => HeaderGroup<TGenerics>[];
|
|
22
|
+
getCenterFooterGroups: () => HeaderGroup<TGenerics>[];
|
|
23
|
+
getRightFooterGroups: () => HeaderGroup<TGenerics>[];
|
|
24
|
+
getFlatHeaders: () => Header<TGenerics>[];
|
|
25
|
+
getLeftFlatHeaders: () => Header<TGenerics>[];
|
|
26
|
+
getCenterFlatHeaders: () => Header<TGenerics>[];
|
|
27
|
+
getRightFlatHeaders: () => Header<TGenerics>[];
|
|
28
|
+
getLeafHeaders: () => Header<TGenerics>[];
|
|
29
|
+
getLeftLeafHeaders: () => Header<TGenerics>[];
|
|
30
|
+
getCenterLeafHeaders: () => Header<TGenerics>[];
|
|
31
|
+
getRightLeafHeaders: () => Header<TGenerics>[];
|
|
32
|
+
getHeader: (id: string) => Header<TGenerics>;
|
|
33
33
|
getHeaderGroupProps: <TGetter extends Getter<HeaderGroupProps>>(id: string, userProps?: TGetter) => undefined | PropGetterValue<HeaderGroupProps, TGetter>;
|
|
34
34
|
getFooterGroupProps: <TGetter extends Getter<FooterGroupProps>>(id: string, userProps?: TGetter) => undefined | PropGetterValue<FooterGroupProps, TGetter>;
|
|
35
35
|
getHeaderProps: <TGetter extends Getter<HeaderProps>>(headerId: string, userProps?: TGetter) => undefined | PropGetterValue<HeaderProps, TGetter>;
|
|
36
36
|
getFooterProps: <TGetter extends Getter<FooterProps>>(headerId: string, userProps?: TGetter) => undefined | PropGetterValue<FooterProps, TGetter>;
|
|
37
37
|
getTotalWidth: () => number;
|
|
38
38
|
};
|
|
39
|
-
export declare function createRow<
|
|
40
|
-
export declare function getInstance<
|
|
41
|
-
export declare function buildHeaderGroups<
|
|
39
|
+
export declare function createRow<TGenerics extends PartialGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>): HeadersRow<TGenerics>;
|
|
40
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): HeadersInstance<TGenerics>;
|
|
41
|
+
export declare function buildHeaderGroups<TGenerics extends PartialGenerics>(allColumns: Column<TGenerics>[], columnsToGroup: Column<TGenerics>[], instance: TableInstance<TGenerics>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TGenerics>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableInstance, OnChangeFn, Updater, Column, PartialGenerics } from '../types';
|
|
2
2
|
export declare type ColumnOrderState = string[];
|
|
3
3
|
export declare type ColumnOrderTableState = {
|
|
4
4
|
columnOrder: ColumnOrderState;
|
|
@@ -9,11 +9,11 @@ export declare type ColumnOrderOptions = {
|
|
|
9
9
|
export declare type ColumnOrderDefaultOptions = {
|
|
10
10
|
onColumnOrderChange: OnChangeFn<ColumnOrderState>;
|
|
11
11
|
};
|
|
12
|
-
export declare type ColumnOrderInstance<
|
|
12
|
+
export declare type ColumnOrderInstance<TGenerics extends PartialGenerics> = {
|
|
13
13
|
setColumnOrder: (updater: Updater<ColumnOrderState>) => void;
|
|
14
14
|
resetColumnOrder: () => void;
|
|
15
|
-
getOrderColumnsFn: () => (columns: Column<
|
|
15
|
+
getOrderColumnsFn: () => (columns: Column<TGenerics>[]) => Column<TGenerics>[];
|
|
16
16
|
};
|
|
17
17
|
export declare function getInitialState(): ColumnOrderTableState;
|
|
18
|
-
export declare function getDefaultOptions<
|
|
19
|
-
export declare function getInstance<
|
|
18
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): ColumnOrderDefaultOptions;
|
|
19
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): ColumnOrderInstance<TGenerics>;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { OnChangeFn,
|
|
2
|
-
export declare type PageCount = undefined | null | number;
|
|
1
|
+
import { OnChangeFn, PartialGenerics, TableInstance, RowModel, Updater } from '../types';
|
|
3
2
|
export declare type PaginationState = {
|
|
4
3
|
pageIndex: number;
|
|
5
4
|
pageSize: number;
|
|
6
|
-
pageCount
|
|
5
|
+
pageCount: number;
|
|
7
6
|
};
|
|
8
7
|
export declare type PaginationTableState = {
|
|
9
8
|
pagination: PaginationState;
|
|
10
9
|
};
|
|
11
|
-
export declare type PaginationOptions<
|
|
10
|
+
export declare type PaginationOptions<TGenerics extends PartialGenerics> = {
|
|
12
11
|
onPaginationChange?: OnChangeFn<PaginationState>;
|
|
13
12
|
autoResetPageIndex?: boolean;
|
|
14
|
-
paginateRowsFn?: (instance:
|
|
13
|
+
paginateRowsFn?: (instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>) => RowModel<TGenerics>;
|
|
15
14
|
};
|
|
16
15
|
export declare type PaginationDefaultOptions = {
|
|
17
16
|
onPaginationChange: OnChangeFn<PaginationState>;
|
|
18
17
|
autoResetPageIndex: boolean;
|
|
19
18
|
};
|
|
20
|
-
export declare type PaginationInstance<
|
|
19
|
+
export declare type PaginationInstance<TGenerics extends PartialGenerics> = {
|
|
21
20
|
_notifyPageIndexReset: () => void;
|
|
22
21
|
setPagination: (updater: Updater<PaginationState>) => void;
|
|
23
22
|
resetPagination: () => void;
|
|
@@ -25,20 +24,16 @@ export declare type PaginationInstance<TData, TValue, TFilterFns, TSortingFns, T
|
|
|
25
24
|
resetPageIndex: () => void;
|
|
26
25
|
setPageSize: (updater: Updater<number>) => void;
|
|
27
26
|
resetPageSize: () => void;
|
|
28
|
-
setPageCount: (updater: Updater<
|
|
27
|
+
setPageCount: (updater: Updater<number>) => void;
|
|
29
28
|
getPageOptions: () => number[];
|
|
30
29
|
getCanPreviousPage: () => boolean;
|
|
31
30
|
getCanNextPage: () => boolean;
|
|
32
31
|
previousPage: () => void;
|
|
33
32
|
nextPage: () => void;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
getPrePaginationRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
38
|
-
getPaginationRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
39
|
-
getPaginationFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
40
|
-
getPaginationRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
33
|
+
getPrePaginationRowModel: () => RowModel<TGenerics>;
|
|
34
|
+
getPaginationRowModel: () => RowModel<TGenerics>;
|
|
35
|
+
getPageCount: () => number;
|
|
41
36
|
};
|
|
42
37
|
export declare function getInitialState(): PaginationTableState;
|
|
43
|
-
export declare function getDefaultOptions<
|
|
44
|
-
export declare function getInstance<
|
|
38
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): PaginationDefaultOptions;
|
|
39
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): PaginationInstance<TGenerics>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChangeFn, Updater,
|
|
1
|
+
import { OnChangeFn, Updater, TableInstance, Column, PartialGenerics } from '../types';
|
|
2
2
|
declare type ColumnPinningPosition = false | 'left' | 'right';
|
|
3
3
|
export declare type ColumnPinningState = {
|
|
4
4
|
left?: string[];
|
|
@@ -24,7 +24,7 @@ export declare type ColumnPinningColumn = {
|
|
|
24
24
|
getIsPinned: () => ColumnPinningPosition;
|
|
25
25
|
pin: (position: ColumnPinningPosition) => void;
|
|
26
26
|
};
|
|
27
|
-
export declare type ColumnPinningInstance<
|
|
27
|
+
export declare type ColumnPinningInstance<TGenerics extends PartialGenerics> = {
|
|
28
28
|
setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
29
29
|
resetColumnPinning: () => void;
|
|
30
30
|
pinColumn: (columnId: string, position: ColumnPinningPosition) => void;
|
|
@@ -33,7 +33,7 @@ export declare type ColumnPinningInstance<_TData, _TValue, _TFilterFns, _TSortin
|
|
|
33
33
|
getColumnPinnedIndex: (columnId: string) => number;
|
|
34
34
|
};
|
|
35
35
|
export declare function getInitialState(): ColumnPinningTableState;
|
|
36
|
-
export declare function getDefaultOptions<
|
|
37
|
-
export declare function createColumn<
|
|
38
|
-
export declare function getInstance<
|
|
36
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): ColumnPinningDefaultOptions;
|
|
37
|
+
export declare function createColumn<TGenerics extends PartialGenerics>(column: Column<TGenerics>, instance: TableInstance<TGenerics>): ColumnPinningColumn;
|
|
38
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): ColumnPinningInstance<TGenerics>;
|
|
39
39
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { MouseEvent, TouchEvent } from 'react';
|
|
2
|
-
import { Getter, OnChangeFn, PropGetterValue,
|
|
2
|
+
import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types';
|
|
3
3
|
export declare type RowSelectionState = Record<string, boolean>;
|
|
4
4
|
export declare type RowSelectionTableState = {
|
|
5
5
|
rowSelection: RowSelectionState;
|
|
6
6
|
};
|
|
7
|
-
export declare type RowSelectionOptions<
|
|
7
|
+
export declare type RowSelectionOptions<TGenerics extends PartialGenerics> = {
|
|
8
8
|
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
9
9
|
autoResetRowSelection?: boolean;
|
|
10
|
-
enableRowSelection?: boolean | ((row: Row<
|
|
11
|
-
enableMultiRowSelection?: boolean | ((row: Row<
|
|
12
|
-
enableSubRowSelection?: boolean | ((row: Row<
|
|
10
|
+
enableRowSelection?: boolean | ((row: Row<TGenerics>) => boolean);
|
|
11
|
+
enableMultiRowSelection?: boolean | ((row: Row<TGenerics>) => boolean);
|
|
12
|
+
enableSubRowSelection?: boolean | ((row: Row<TGenerics>) => boolean);
|
|
13
13
|
};
|
|
14
14
|
declare type ToggleRowSelectedProps = {
|
|
15
15
|
onChange?: (e: MouseEvent | TouchEvent) => void;
|
|
@@ -25,7 +25,7 @@ export declare type RowSelectionRow = {
|
|
|
25
25
|
toggleSelected: (value?: boolean) => void;
|
|
26
26
|
getToggleSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
|
|
27
27
|
};
|
|
28
|
-
export declare type RowSelectionInstance<
|
|
28
|
+
export declare type RowSelectionInstance<TGenerics extends PartialGenerics> = {
|
|
29
29
|
_notifyRowSelectionReset: () => void;
|
|
30
30
|
getToggleRowSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(rowId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
|
|
31
31
|
getToggleAllRowsSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
|
|
@@ -44,23 +44,15 @@ export declare type RowSelectionInstance<TData, TValue, TFilterFns, TSortingFns,
|
|
|
44
44
|
getIsSomePageRowsSelected: () => boolean;
|
|
45
45
|
toggleAllRowsSelected: (value: boolean) => void;
|
|
46
46
|
toggleAllPageRowsSelected: (value: boolean) => void;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
getFilteredSelectedRowModel: () => RowModel<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
|
|
52
|
-
getFilteredSelectedRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
53
|
-
getFilteredSelectedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
54
|
-
getFilteredSelectedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
55
|
-
getGroupedSelectedRowModel: () => RowModel<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
|
|
56
|
-
getGroupedSelectedRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
57
|
-
getGroupedSelectedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
58
|
-
getGroupedSelectedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
47
|
+
getPreSelectedRowModel: () => RowModel<TGenerics>;
|
|
48
|
+
getSelectedRowModel: () => RowModel<TGenerics>;
|
|
49
|
+
getFilteredSelectedRowModel: () => RowModel<TGenerics>;
|
|
50
|
+
getGroupedSelectedRowModel: () => RowModel<TGenerics>;
|
|
59
51
|
};
|
|
60
52
|
export declare function getInitialState(): RowSelectionTableState;
|
|
61
|
-
export declare function getDefaultOptions<
|
|
62
|
-
export declare function getInstance<
|
|
63
|
-
export declare function createRow<
|
|
64
|
-
export declare function selectRowsFn<
|
|
65
|
-
export declare function isRowSelected<
|
|
53
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): RowSelectionOptions<TGenerics>;
|
|
54
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): RowSelectionInstance<TGenerics>;
|
|
55
|
+
export declare function createRow<TGenerics extends PartialGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>): RowSelectionRow;
|
|
56
|
+
export declare function selectRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
|
|
57
|
+
export declare function isRowSelected<TGenerics extends PartialGenerics>(row: Row<TGenerics>, selection: Record<string, boolean>, instance: TableInstance<TGenerics>): boolean | 'some';
|
|
66
58
|
export {};
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { MouseEvent, TouchEvent } from 'react';
|
|
2
2
|
import { RowModel } from '..';
|
|
3
3
|
import { BuiltInSortType } from '../sortTypes';
|
|
4
|
-
import { Column, Getter, OnChangeFn, PropGetterValue,
|
|
4
|
+
import { Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
|
|
5
|
+
import { Overwrite } from '../utils';
|
|
5
6
|
export declare type SortDirection = 'asc' | 'desc';
|
|
6
7
|
export declare type ColumnSort = {
|
|
7
8
|
id: string;
|
|
8
9
|
desc: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare type SortingState = ColumnSort[];
|
|
11
|
-
export declare type SortingFn<
|
|
12
|
-
(rowA: Row<
|
|
12
|
+
export declare type SortingFn<TGenerics extends PartialGenerics> = {
|
|
13
|
+
(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
|
|
13
14
|
};
|
|
15
|
+
export declare type CustomSortingTypes<TGenerics extends PartialGenerics> = Record<string, SortingFn<TGenerics>>;
|
|
14
16
|
export declare type SortingTableState = {
|
|
15
17
|
sorting: SortingState;
|
|
16
18
|
};
|
|
17
|
-
export declare type SortType<
|
|
18
|
-
export declare type SortingColumnDef<
|
|
19
|
-
sortType?: SortType<
|
|
19
|
+
export declare type SortType<TGenerics extends PartialGenerics> = 'auto' | BuiltInSortType | keyof TGenerics['SortingFns'] | SortingFn<TGenerics>;
|
|
20
|
+
export declare type SortingColumnDef<TGenerics extends PartialGenerics> = {
|
|
21
|
+
sortType?: SortType<Overwrite<TGenerics, {
|
|
22
|
+
Value: any;
|
|
23
|
+
}>>;
|
|
20
24
|
sortDescFirst?: boolean;
|
|
21
25
|
enableSorting?: boolean;
|
|
22
26
|
enableMultiSort?: boolean;
|
|
@@ -24,8 +28,10 @@ export declare type SortingColumnDef<TFilterFns> = {
|
|
|
24
28
|
invertSorting?: boolean;
|
|
25
29
|
sortUndefined?: false | -1 | 1;
|
|
26
30
|
};
|
|
27
|
-
export declare type SortingColumn<
|
|
28
|
-
sortType: SortType<
|
|
31
|
+
export declare type SortingColumn<TGenerics extends PartialGenerics> = {
|
|
32
|
+
sortType: SortType<Overwrite<TGenerics, {
|
|
33
|
+
Value: any;
|
|
34
|
+
}>>;
|
|
29
35
|
getCanSort: () => boolean;
|
|
30
36
|
getCanMultiSort: () => boolean;
|
|
31
37
|
getSortIndex: () => number;
|
|
@@ -33,8 +39,8 @@ export declare type SortingColumn<_TData, _TValue, TFilterFns, _TSortingFns, _TA
|
|
|
33
39
|
toggleSorting: (desc?: boolean, isMulti?: boolean) => void;
|
|
34
40
|
getToggleSortingProps: <TGetter extends Getter<ToggleSortingProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleSortingProps, TGetter>;
|
|
35
41
|
};
|
|
36
|
-
export declare type SortingOptions<
|
|
37
|
-
sortTypes?:
|
|
42
|
+
export declare type SortingOptions<TGenerics extends PartialGenerics> = {
|
|
43
|
+
sortTypes?: TGenerics['SortingFns'];
|
|
38
44
|
onSortingChange?: OnChangeFn<SortingState>;
|
|
39
45
|
autoResetSorting?: boolean;
|
|
40
46
|
enableSorting?: boolean;
|
|
@@ -42,7 +48,7 @@ export declare type SortingOptions<TData, TValue, TFilterFns, TSortingFns, TAggr
|
|
|
42
48
|
enableMultiRemove?: boolean;
|
|
43
49
|
enableMultiSort?: boolean;
|
|
44
50
|
sortDescFirst?: boolean;
|
|
45
|
-
sortRowsFn?: (instance:
|
|
51
|
+
sortRowsFn?: (instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>) => RowModel<TGenerics>;
|
|
46
52
|
maxMultiSortColCount?: number;
|
|
47
53
|
isMultiSortEvent?: (e: MouseEvent | TouchEvent) => boolean;
|
|
48
54
|
};
|
|
@@ -50,11 +56,11 @@ export declare type ToggleSortingProps = {
|
|
|
50
56
|
title?: string;
|
|
51
57
|
onClick?: (event: MouseEvent | TouchEvent) => void;
|
|
52
58
|
};
|
|
53
|
-
export declare type SortingInstance<
|
|
59
|
+
export declare type SortingInstance<TGenerics extends PartialGenerics> = {
|
|
54
60
|
_notifySortingReset: () => void;
|
|
55
|
-
getColumnAutoSortingFn: (columnId: string) => SortingFn<
|
|
61
|
+
getColumnAutoSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined;
|
|
56
62
|
getColumnAutoSortDir: (columnId: string) => SortDirection;
|
|
57
|
-
getColumnSortingFn: (columnId: string) => SortingFn<
|
|
63
|
+
getColumnSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined;
|
|
58
64
|
setSorting: (updater: Updater<SortingState>) => void;
|
|
59
65
|
toggleColumnSorting: (columnId: string, desc?: boolean, multi?: boolean) => void;
|
|
60
66
|
resetSorting: () => void;
|
|
@@ -63,16 +69,11 @@ export declare type SortingInstance<TData, TValue, TFilterFns, TSortingFns, TAgg
|
|
|
63
69
|
getColumnIsSorted: (columnId: string) => false | 'asc' | 'desc';
|
|
64
70
|
getColumnSortIndex: (columnId: string) => number;
|
|
65
71
|
getToggleSortingProps: <TGetter extends Getter<ToggleSortingProps>>(columnId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleSortingProps, TGetter>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
getPreSortedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
69
|
-
getPreSortedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
70
|
-
getSortedRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
71
|
-
getSortedFlatRows: () => Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>[];
|
|
72
|
-
getSortedRowsById: () => Record<string, Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>>;
|
|
72
|
+
getPreSortedRowModel: () => RowModel<TGenerics>;
|
|
73
|
+
getSortedRowModel: () => RowModel<TGenerics>;
|
|
73
74
|
};
|
|
74
|
-
export declare function getDefaultColumn<
|
|
75
|
+
export declare function getDefaultColumn<TGenerics extends PartialGenerics>(): SortingColumnDef<TGenerics>;
|
|
75
76
|
export declare function getInitialState(): SortingTableState;
|
|
76
|
-
export declare function getDefaultOptions<
|
|
77
|
-
export declare function createColumn<
|
|
78
|
-
export declare function getInstance<
|
|
77
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): SortingOptions<TGenerics>;
|
|
78
|
+
export declare function createColumn<TGenerics extends PartialGenerics>(column: Column<TGenerics>, instance: TableInstance<TGenerics>): SortingColumn<TGenerics>;
|
|
79
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): SortingInstance<TGenerics>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cell, Column, Getter, OnChangeFn, PropGetterValue,
|
|
1
|
+
import { Cell, Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types';
|
|
2
2
|
export declare type VisibilityOptions = {
|
|
3
3
|
onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
|
|
4
4
|
enableHiding?: boolean;
|
|
@@ -10,9 +10,9 @@ export declare type VisibilityState = Record<string, boolean>;
|
|
|
10
10
|
export declare type VisibilityTableState = {
|
|
11
11
|
columnVisibility: VisibilityState;
|
|
12
12
|
};
|
|
13
|
-
export declare type VisibilityInstance<
|
|
14
|
-
getVisibleFlatColumns: () => Column<
|
|
15
|
-
getVisibleLeafColumns: () => Column<
|
|
13
|
+
export declare type VisibilityInstance<TGenerics extends PartialGenerics> = {
|
|
14
|
+
getVisibleFlatColumns: () => Column<TGenerics>[];
|
|
15
|
+
getVisibleLeafColumns: () => Column<TGenerics>[];
|
|
16
16
|
setColumnVisibility: (updater: Updater<VisibilityState>) => void;
|
|
17
17
|
toggleColumnVisibility: (columnId: string, value?: boolean) => void;
|
|
18
18
|
toggleAllColumnsVisible: (value?: boolean) => void;
|
|
@@ -28,8 +28,8 @@ export declare type VisibilityColumnDef = {
|
|
|
28
28
|
enableHiding?: boolean;
|
|
29
29
|
defaultCanHide?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare type VisibilityRow<
|
|
32
|
-
getVisibleCells: () => Cell<
|
|
31
|
+
export declare type VisibilityRow<TGenerics extends PartialGenerics> = {
|
|
32
|
+
getVisibleCells: () => Cell<TGenerics>[];
|
|
33
33
|
};
|
|
34
34
|
export declare type VisibilityColumn = {
|
|
35
35
|
getCanHide: () => boolean;
|
|
@@ -38,10 +38,10 @@ export declare type VisibilityColumn = {
|
|
|
38
38
|
getToggleVisibilityProps: <TGetter extends Getter<ToggleVisibilityProps>>(userProps?: TGetter) => PropGetterValue<ToggleVisibilityProps, TGetter>;
|
|
39
39
|
};
|
|
40
40
|
export declare function getInitialState(): VisibilityTableState;
|
|
41
|
-
export declare function getDefaultOptions<
|
|
41
|
+
export declare function getDefaultOptions<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): VisibilityDefaultOptions;
|
|
42
42
|
export declare function getDefaultColumn(): {
|
|
43
43
|
defaultIsVisible: boolean;
|
|
44
44
|
};
|
|
45
|
-
export declare function createColumn<
|
|
46
|
-
export declare function getInstance<
|
|
45
|
+
export declare function createColumn<TGenerics extends PartialGenerics>(column: Column<TGenerics>, instance: TableInstance<TGenerics>): VisibilityColumn;
|
|
46
|
+
export declare function getInstance<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>): VisibilityInstance<TGenerics>;
|
|
47
47
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PartialGenerics, Row } from './types';
|
|
2
2
|
export declare const filterTypes: {
|
|
3
3
|
includesString: typeof includesString;
|
|
4
4
|
includesStringSensitive: typeof includesStringSensitive;
|
|
@@ -11,39 +11,39 @@ export declare const filterTypes: {
|
|
|
11
11
|
betweenNumberRange: typeof betweenNumberRange;
|
|
12
12
|
};
|
|
13
13
|
export declare type BuiltInFilterType = keyof typeof filterTypes;
|
|
14
|
-
declare function includesString<
|
|
14
|
+
declare function includesString<TGenerics extends PartialGenerics>(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<
|
|
18
|
+
declare function includesStringSensitive<TGenerics extends PartialGenerics>(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<
|
|
22
|
+
declare function equalsString<TGenerics extends PartialGenerics>(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<
|
|
26
|
+
declare function equalsStringSensitive<TGenerics extends PartialGenerics>(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<
|
|
30
|
+
declare function arrIncludes<TGenerics extends PartialGenerics>(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<
|
|
34
|
+
declare function arrIncludesAll<TGenerics extends PartialGenerics>(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<
|
|
38
|
+
declare function equals<TGenerics extends PartialGenerics>(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<
|
|
42
|
+
declare function weakEquals<TGenerics extends PartialGenerics>(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<
|
|
46
|
+
declare function betweenNumberRange<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: [unknown, unknown]): Row<TGenerics>[];
|
|
47
47
|
declare namespace betweenNumberRange {
|
|
48
48
|
var autoRemove: (val: any) => boolean;
|
|
49
49
|
}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Row } from './types';
|
|
1
|
+
import { PartialGenerics, Row } from './types';
|
|
2
2
|
export declare const reSplitAlphaNumeric: RegExp;
|
|
3
3
|
export declare const sortTypes: {
|
|
4
4
|
alphanumeric: typeof alphanumeric;
|
|
@@ -9,10 +9,10 @@ export declare const sortTypes: {
|
|
|
9
9
|
basic: typeof basic;
|
|
10
10
|
};
|
|
11
11
|
export declare type BuiltInSortType = keyof typeof sortTypes;
|
|
12
|
-
declare function alphanumeric<
|
|
13
|
-
declare function alphanumericCaseSensitive<
|
|
14
|
-
declare function text<
|
|
15
|
-
declare function textCaseSensitive<
|
|
16
|
-
declare function datetime<
|
|
17
|
-
declare function basic<
|
|
12
|
+
declare function alphanumeric<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
|
|
13
|
+
declare function alphanumericCaseSensitive<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
|
|
14
|
+
declare function text<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 1 | 0 | -1;
|
|
15
|
+
declare function textCaseSensitive<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 1 | 0 | -1;
|
|
16
|
+
declare function datetime<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 1 | 0 | -1;
|
|
17
|
+
declare function basic<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 1 | 0 | -1;
|
|
18
18
|
export {};
|