@tanstack/table-core 8.0.0-alpha.22 → 8.0.0-alpha.25

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.
Files changed (85) hide show
  1. package/build/cjs/aggregationTypes.js +21 -19
  2. package/build/cjs/aggregationTypes.js.map +1 -1
  3. package/build/cjs/core.js +17 -29
  4. package/build/cjs/core.js.map +1 -1
  5. package/build/cjs/createTable.js +2 -2
  6. package/build/cjs/createTable.js.map +1 -1
  7. package/build/cjs/features/ColumnSizing.js +23 -8
  8. package/build/cjs/features/ColumnSizing.js.map +1 -1
  9. package/build/cjs/features/Expanding.js +1 -8
  10. package/build/cjs/features/Expanding.js.map +1 -1
  11. package/build/cjs/features/Filters.js +1 -1
  12. package/build/cjs/features/Filters.js.map +1 -1
  13. package/build/cjs/features/Grouping.js +1 -1
  14. package/build/cjs/features/Grouping.js.map +1 -1
  15. package/build/cjs/features/Headers.js.map +1 -1
  16. package/build/cjs/features/Ordering.js.map +1 -1
  17. package/build/cjs/features/Pagination.js.map +1 -1
  18. package/build/cjs/features/Pinning.js.map +1 -1
  19. package/build/cjs/features/RowSelection.js +3 -3
  20. package/build/cjs/features/RowSelection.js.map +1 -1
  21. package/build/cjs/features/Sorting.js.map +1 -1
  22. package/build/cjs/features/Visibility.js.map +1 -1
  23. package/build/cjs/filterTypes.js.map +1 -1
  24. package/build/cjs/sortTypes.js.map +1 -1
  25. package/build/cjs/utils/columnFilterRowsFn.js +20 -78
  26. package/build/cjs/utils/columnFilterRowsFn.js.map +1 -1
  27. package/build/cjs/utils/filterRowsUtils.js +100 -0
  28. package/build/cjs/utils/filterRowsUtils.js.map +1 -0
  29. package/build/cjs/utils/globalFilterRowsFn.js +10 -62
  30. package/build/cjs/utils/globalFilterRowsFn.js.map +1 -1
  31. package/build/cjs/utils/groupRowsFn.js +15 -15
  32. package/build/cjs/utils/groupRowsFn.js.map +1 -1
  33. package/build/cjs/utils/sortRowsFn.js +1 -1
  34. package/build/cjs/utils/sortRowsFn.js.map +1 -1
  35. package/build/esm/index.js +2587 -2620
  36. package/build/esm/index.js.map +1 -1
  37. package/build/stats-html.html +1 -1
  38. package/build/stats-react.json +368 -335
  39. package/build/types/aggregationTypes.d.ts +9 -9
  40. package/build/types/core.d.ts +8 -13
  41. package/build/types/createTable.d.ts +4 -4
  42. package/build/types/features/ColumnSizing.d.ts +13 -8
  43. package/build/types/features/Expanding.d.ts +6 -6
  44. package/build/types/features/Filters.d.ts +15 -15
  45. package/build/types/features/Grouping.d.ts +16 -16
  46. package/build/types/features/Headers.d.ts +6 -6
  47. package/build/types/features/Ordering.d.ts +4 -4
  48. package/build/types/features/Pagination.d.ts +5 -5
  49. package/build/types/features/Pinning.d.ts +5 -5
  50. package/build/types/features/RowSelection.d.ts +8 -8
  51. package/build/types/features/Sorting.d.ts +12 -12
  52. package/build/types/features/Visibility.d.ts +6 -6
  53. package/build/types/filterTypes.d.ts +10 -10
  54. package/build/types/sortTypes.d.ts +7 -7
  55. package/build/types/types.d.ts +22 -13
  56. package/build/types/utils/filterRowsUtils.d.ts +3 -0
  57. package/build/types/utils/sortRowsQuicksortFn.d.ts +11 -0
  58. package/build/umd/index.development.js +2587 -2620
  59. package/build/umd/index.development.js.map +1 -1
  60. package/build/umd/index.production.js +1 -1
  61. package/build/umd/index.production.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/aggregationTypes.ts +23 -19
  64. package/src/core.tsx +29 -55
  65. package/src/createTable.tsx +17 -11
  66. package/src/features/ColumnSizing.ts +31 -7
  67. package/src/features/Expanding.ts +7 -15
  68. package/src/features/Filters.ts +15 -15
  69. package/src/features/Grouping.ts +19 -19
  70. package/src/features/Headers.ts +5 -5
  71. package/src/features/Ordering.ts +3 -3
  72. package/src/features/Pagination.ts +4 -4
  73. package/src/features/Pinning.ts +4 -4
  74. package/src/features/RowSelection.ts +9 -11
  75. package/src/features/Sorting.ts +11 -11
  76. package/src/features/Visibility.ts +5 -5
  77. package/src/filterTypes.ts +9 -9
  78. package/src/sortTypes.ts +6 -6
  79. package/src/types.ts +34 -25
  80. package/src/utils/columnFilterRowsFn.ts +12 -73
  81. package/src/utils/filterRowsUtils.ts +107 -0
  82. package/src/utils/globalFilterRowsFn.ts +10 -66
  83. package/src/utils/groupRowsFn.ts +15 -17
  84. package/src/utils/sortRowsFn.ts +6 -8
  85. package/src/utils/sortRowsQuicksortFn.ts +174 -0
@@ -10,13 +10,13 @@ export declare const aggregationTypes: {
10
10
  count: typeof count;
11
11
  };
12
12
  export declare type BuiltInAggregationType = keyof typeof aggregationTypes;
13
- declare function sum(_leafValues: unknown[], childValues: unknown[]): number;
14
- declare function min(_leafValues: unknown[], childValues: unknown[]): number | undefined;
15
- declare function max(_leafValues: unknown[], childValues: unknown[]): number | undefined;
16
- declare function extent(_leafValues: unknown[], childValues: unknown[]): (number | undefined)[];
17
- declare function mean(leafValues: unknown[]): number | undefined;
18
- declare function median(values: unknown[]): number | undefined;
19
- declare function unique<T>(values: T[]): T[];
20
- declare function uniqueCount(values: unknown[]): number;
21
- declare function count(values: unknown[]): number;
13
+ declare function sum(_getLeafValues: () => unknown[], getChildValues: () => unknown[]): number;
14
+ declare function min(_getLeafValues: () => unknown[], getChildValues: () => unknown[]): number | undefined;
15
+ declare function max(_getLeafValues: () => unknown[], getChildValues: () => unknown[]): number | undefined;
16
+ declare function extent(_getLeafValues: () => unknown[], getChildValues: () => unknown[]): (number | undefined)[];
17
+ declare function mean(getLeafValues: () => unknown[]): number | undefined;
18
+ declare function median(getLeafValues: () => unknown[]): number | undefined;
19
+ declare function unique<T>(getLeafValues: () => T[]): T[];
20
+ declare function uniqueCount(getLeafValues: () => unknown[]): number;
21
+ declare function count(getLeafValues: () => unknown[]): number;
22
22
  export {};
@@ -1,7 +1,6 @@
1
1
  import { RequiredKeys } from './utils';
2
- import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, PartialGenerics, Renderable, UseRenderer } from './types';
3
- import { RowModel } from '.';
4
- export declare type CoreOptions<TGenerics extends PartialGenerics> = {
2
+ import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, Renderable, UseRenderer, RowModel, AnyGenerics } from './types';
3
+ export declare type CoreOptions<TGenerics extends AnyGenerics> = {
5
4
  data: TGenerics['Row'][];
6
5
  columns: ColumnDef<TGenerics>[];
7
6
  state: Partial<TableState>;
@@ -18,7 +17,7 @@ export declare type CoreOptions<TGenerics extends PartialGenerics> = {
18
17
  getRowId?: (originalRow: TGenerics['Row'], index: number, parent?: Row<TGenerics>) => string;
19
18
  autoResetAll?: boolean;
20
19
  };
21
- export declare type TableCore<TGenerics extends PartialGenerics> = {
20
+ export declare type TableCore<TGenerics extends AnyGenerics> = {
22
21
  initialState: TableState;
23
22
  reset: () => void;
24
23
  options: RequiredKeys<Options<TGenerics>, 'state'>;
@@ -34,7 +33,6 @@ export declare type TableCore<TGenerics extends PartialGenerics> = {
34
33
  getAllFlatColumnsById: () => Record<string, Column<TGenerics>>;
35
34
  getAllLeafColumns: () => Column<TGenerics>[];
36
35
  getColumn: (columnId: string) => Column<TGenerics>;
37
- getColumnWidth: (columnId: string) => number;
38
36
  getTotalWidth: () => number;
39
37
  createCell: (row: Row<TGenerics>, column: Column<TGenerics>, value: any) => Cell<TGenerics>;
40
38
  createRow: (id: string, original: TGenerics['Row'] | undefined, rowIndex: number, depth: number, values: Record<string, any>) => Row<TGenerics>;
@@ -52,26 +50,23 @@ export declare type TableCore<TGenerics extends PartialGenerics> = {
52
50
  getRightTableWidth: () => number;
53
51
  render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | ReturnType<UseRenderer<TGenerics>>;
54
52
  };
55
- export declare type CoreRow<TGenerics extends PartialGenerics> = {
53
+ export declare type CoreRow<TGenerics extends AnyGenerics> = {
56
54
  id: string;
57
55
  index: number;
58
56
  original?: TGenerics['Row'];
59
57
  depth: number;
60
58
  values: RowValues;
61
- leafRows: Row<TGenerics>[];
62
59
  subRows: Row<TGenerics>[];
60
+ getLeafRows: () => Row<TGenerics>[];
63
61
  getRowProps: PropGetter<RowProps>;
64
62
  originalSubRows?: TGenerics['Row'][];
65
63
  getAllCells: () => Cell<TGenerics>[];
66
64
  getAllCellsByColumnId: () => Record<string, Cell<TGenerics>>;
67
65
  };
68
- export declare type CoreColumnDef<TGenerics extends PartialGenerics> = {
66
+ export declare type CoreColumnDef<TGenerics extends AnyGenerics> = {
69
67
  id: string;
70
68
  accessorKey?: string & keyof TGenerics['Row'];
71
69
  accessorFn?: AccessorFn<TGenerics['Row']>;
72
- width?: number;
73
- minWidth?: number;
74
- maxWidth?: number;
75
70
  columns?: ColumnDef<TGenerics>[];
76
71
  header?: Renderable<TGenerics, {
77
72
  instance: TableInstance<TGenerics>;
@@ -92,7 +87,7 @@ export declare type CoreColumnDef<TGenerics extends PartialGenerics> = {
92
87
  }>;
93
88
  meta?: TGenerics['ColumnMeta'];
94
89
  };
95
- export declare type CoreColumn<TGenerics extends PartialGenerics> = {
90
+ export declare type CoreColumn<TGenerics extends AnyGenerics> = {
96
91
  id: string;
97
92
  depth: number;
98
93
  accessorFn?: AccessorFn<TGenerics['Row']>;
@@ -103,4 +98,4 @@ export declare type CoreColumn<TGenerics extends PartialGenerics> = {
103
98
  getFlatColumns: () => Column<TGenerics>[];
104
99
  getLeafColumns: () => Column<TGenerics>[];
105
100
  };
106
- export declare function createTableInstance<TGenerics extends PartialGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>;
101
+ export declare function createTableInstance<TGenerics extends AnyGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>;
@@ -1,9 +1,9 @@
1
1
  import { CustomFilterTypes } from './features/Filters';
2
2
  import { CustomAggregationTypes } from './features/Grouping';
3
3
  import { CustomSortingTypes } from './features/Sorting';
4
- import { ColumnDef, AccessorFn, PartialGenerics, AnyRender } from './types';
4
+ import { ColumnDef, AccessorFn, PartialGenerics, AnyRender, AnyGenerics } from './types';
5
5
  import { Overwrite, PartialKeys } from './utils';
6
- export declare type CreateTableFactory<TGenerics extends PartialGenerics> = <TSubGenerics extends {
6
+ export declare type CreateTableFactory<TGenerics extends AnyGenerics> = <TSubGenerics extends {
7
7
  Row: any;
8
8
  ColumnMeta?: object;
9
9
  }>() => Table<Overwrite<TGenerics, {
@@ -16,7 +16,7 @@ export declare type CreateTableFactoryOptions<TRender extends AnyRender, TFilter
16
16
  sortingFns?: TSortingFns;
17
17
  aggregationFns?: TAggregationFns;
18
18
  };
19
- export declare type Table<TGenerics extends PartialGenerics> = {
19
+ export declare type Table<TGenerics extends AnyGenerics> = {
20
20
  generics: TGenerics;
21
21
  __options: CreateTableFactoryOptions<any, any, any, any>;
22
22
  createColumns: <TColumnDef extends ColumnDef<any>>(columns: TColumnDef[]) => TColumnDef[];
@@ -47,7 +47,7 @@ export declare type Table<TGenerics extends PartialGenerics> = {
47
47
  }>) => ColumnDef<TGenerics>;
48
48
  };
49
49
  declare type InitTable<TRender extends AnyRender> = {
50
- createTableFactory: <TGenerics extends PartialGenerics>(options?: CreateTableFactoryOptions<TRender, any, any, any>) => CreateTableFactory<Overwrite<TGenerics, {
50
+ createTableFactory: <TGenerics extends AnyGenerics>(options: CreateTableFactoryOptions<TRender, any, any, any>) => CreateTableFactory<Overwrite<TGenerics, {
51
51
  Render: TRender;
52
52
  }>>;
53
53
  createTable: CreateTableFactory<Overwrite<PartialGenerics, {
@@ -1,4 +1,4 @@
1
- import { Column, Getter, Header, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types';
1
+ import { Column, Getter, Header, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Updater } from '../types';
2
2
  export declare type ColumnSizing = Record<string, number>;
3
3
  export declare type ColumnSizingInfoState = {
4
4
  startOffset: null | number;
@@ -31,7 +31,8 @@ export declare type ColumnResizerProps = {
31
31
  draggable?: boolean;
32
32
  role?: string;
33
33
  };
34
- export declare type ColumnSizingInstance<TGenerics extends PartialGenerics> = {
34
+ export declare type ColumnSizingInstance<TGenerics extends AnyGenerics> = {
35
+ getColumnWidth: (columnId: string) => number;
35
36
  setColumnSizing: (updater: Updater<ColumnSizing>) => void;
36
37
  setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void;
37
38
  resetColumnSizing: () => void;
@@ -47,13 +48,16 @@ export declare type ColumnSizingInstance<TGenerics extends PartialGenerics> = {
47
48
  export declare type ColumnSizingColumnDef = {
48
49
  enableResizing?: boolean;
49
50
  defaultCanResize?: boolean;
51
+ width?: number;
52
+ minWidth?: number;
53
+ maxWidth?: number;
50
54
  };
51
- export declare type ColumnSizingColumn<TGenerics extends PartialGenerics> = {
55
+ export declare type ColumnSizingColumn<TGenerics extends AnyGenerics> = {
52
56
  getCanResize: () => boolean;
53
57
  getIsResizing: () => boolean;
54
58
  resetSize: () => void;
55
59
  };
56
- export declare type ColumnSizingHeader<TGenerics extends PartialGenerics> = {
60
+ export declare type ColumnSizingHeader<TGenerics extends AnyGenerics> = {
57
61
  getCanResize: () => boolean;
58
62
  getIsResizing: () => boolean;
59
63
  getResizerProps: <TGetter extends Getter<ColumnResizerProps>>(userProps?: TGetter) => undefined | PropGetterValue<ColumnResizerProps, TGetter>;
@@ -65,10 +69,11 @@ export declare const defaultColumnSizing: {
65
69
  maxWidth: number;
66
70
  };
67
71
  export declare const ColumnSizing: {
72
+ getDefaultColumn: () => ColumnSizingColumnDef;
68
73
  getInitialState: () => ColumnSizingTableState;
69
- getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnSizingDefaultOptions;
70
- getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ColumnSizingInstance<TGenerics_1>;
71
- createColumn: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ColumnSizingColumn<TGenerics_2>;
72
- createHeader: <TGenerics_3 extends Partial<import("../types").DefaultGenerics>>(header: Header<TGenerics_3>, instance: TableInstance<TGenerics_3>) => ColumnSizingHeader<TGenerics_3>;
74
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnSizingDefaultOptions;
75
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ColumnSizingInstance<TGenerics_1>;
76
+ createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ColumnSizingColumn<TGenerics_2>;
77
+ createHeader: <TGenerics_3 extends AnyGenerics>(header: Header<TGenerics_3>, instance: TableInstance<TGenerics_3>) => ColumnSizingHeader<TGenerics_3>;
73
78
  };
74
79
  export declare function passiveEventSupported(): boolean;
@@ -1,6 +1,6 @@
1
1
  import { MouseEvent, TouchEvent } from 'react';
2
2
  import { RowModel } from '..';
3
- import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
3
+ import { Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
4
4
  export declare type ExpandedStateList = Record<string, boolean>;
5
5
  export declare type ExpandedState = true | Record<string, boolean>;
6
6
  export declare type ExpandedTableState = {
@@ -12,7 +12,7 @@ export declare type ExpandedRow = {
12
12
  getCanExpand: () => boolean;
13
13
  getToggleExpandedProps: <TGetter extends Getter<ToggleExpandedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleExpandedProps, TGetter>;
14
14
  };
15
- export declare type ExpandedOptions<TGenerics extends PartialGenerics> = {
15
+ export declare type ExpandedOptions<TGenerics extends AnyGenerics> = {
16
16
  onExpandedChange?: OnChangeFn<ExpandedState>;
17
17
  autoResetExpanded?: boolean;
18
18
  enableExpanded?: boolean;
@@ -27,7 +27,7 @@ export declare type ToggleExpandedProps = {
27
27
  title?: string;
28
28
  onClick?: (event: MouseEvent | TouchEvent) => void;
29
29
  };
30
- export declare type ExpandedInstance<TGenerics extends PartialGenerics> = {
30
+ export declare type ExpandedInstance<TGenerics extends AnyGenerics> = {
31
31
  _notifyExpandedReset: () => void;
32
32
  setExpanded: (updater: Updater<ExpandedState>) => void;
33
33
  toggleRowExpanded: (rowId: string, expanded?: boolean) => void;
@@ -45,7 +45,7 @@ export declare type ExpandedInstance<TGenerics extends PartialGenerics> = {
45
45
  };
46
46
  export declare const Expanding: {
47
47
  getInitialState: () => ExpandedTableState;
48
- getDefaultOptions: <TGenerics extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ExpandedOptions<TGenerics>;
49
- getInstance: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ExpandedInstance<TGenerics_1>;
50
- createRow: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ExpandedRow;
48
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ExpandedOptions<TGenerics>;
49
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ExpandedInstance<TGenerics_1>;
50
+ createRow: <TGenerics_2 extends AnyGenerics>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ExpandedRow;
51
51
  };
@@ -1,24 +1,24 @@
1
1
  import { RowModel } from '..';
2
2
  import { BuiltInFilterType } from '../filterTypes';
3
- import { Column, OnChangeFn, PartialGenerics, TableInstance, Row, Updater } from '../types';
3
+ import { Column, OnChangeFn, AnyGenerics, TableInstance, Row, Updater } from '../types';
4
4
  import { Overwrite } from '../utils';
5
5
  export declare type ColumnFilter = {
6
6
  id: string;
7
7
  value: unknown;
8
8
  };
9
9
  export declare type ColumnFiltersState = ColumnFilter[];
10
- export declare type FilterFn<TGenerics extends PartialGenerics> = {
10
+ export declare type FilterFn<TGenerics extends AnyGenerics> = {
11
11
  (rows: Row<TGenerics>[], columnIds: string[], filterValue: any): any;
12
12
  autoRemove?: ColumnFilterAutoRemoveTestFn<TGenerics>;
13
13
  };
14
- export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends PartialGenerics> = (value: unknown, column?: Column<TGenerics>) => boolean;
15
- export declare type CustomFilterTypes<TGenerics extends PartialGenerics> = Record<string, FilterFn<TGenerics>>;
14
+ export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends AnyGenerics> = (value: unknown, column?: Column<TGenerics>) => boolean;
15
+ export declare type CustomFilterTypes<TGenerics extends AnyGenerics> = Record<string, FilterFn<TGenerics>>;
16
16
  export declare type FiltersTableState = {
17
17
  columnFilters: ColumnFiltersState;
18
18
  globalFilter: any;
19
19
  };
20
- export declare type FilterType<TGenerics extends PartialGenerics> = 'auto' | BuiltInFilterType | TGenerics['FilterFns'] | FilterFn<TGenerics>;
21
- export declare type FiltersColumnDef<TGenerics extends PartialGenerics> = {
20
+ export declare type FilterType<TGenerics extends AnyGenerics> = 'auto' | BuiltInFilterType | TGenerics['FilterFns'] | FilterFn<TGenerics>;
21
+ export declare type FiltersColumnDef<TGenerics extends AnyGenerics> = {
22
22
  filterType?: FilterType<Overwrite<TGenerics, {
23
23
  Value: any;
24
24
  }>>;
@@ -29,7 +29,7 @@ export declare type FiltersColumnDef<TGenerics extends PartialGenerics> = {
29
29
  defaultCanColumnFilter?: boolean;
30
30
  defaultCanGlobalFilter?: boolean;
31
31
  };
32
- export declare type FiltersColumn<TGenerics extends PartialGenerics> = {
32
+ export declare type FiltersColumn<TGenerics extends AnyGenerics> = {
33
33
  filterType: FilterType<Overwrite<TGenerics, {
34
34
  Value: any;
35
35
  }>>;
@@ -43,8 +43,8 @@ export declare type FiltersColumn<TGenerics extends PartialGenerics> = {
43
43
  getPreFilteredUniqueValues: () => Map<any, number>;
44
44
  getPreFilteredMinMaxValues: () => [any, any];
45
45
  };
46
- export declare type FiltersOptions<TGenerics extends PartialGenerics> = {
47
- filterFromChildrenUp?: boolean;
46
+ export declare type FiltersOptions<TGenerics extends AnyGenerics> = {
47
+ filterFromLeafRows?: boolean;
48
48
  filterTypes?: TGenerics['FilterFns'];
49
49
  enableFilters?: boolean;
50
50
  onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
@@ -59,7 +59,7 @@ export declare type FiltersOptions<TGenerics extends PartialGenerics> = {
59
59
  globalFilterRowsFn?: (instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>) => RowModel<TGenerics>;
60
60
  getColumnCanGlobalFilterFn?: (column: Column<TGenerics>) => boolean;
61
61
  };
62
- export declare type FiltersInstance<TGenerics extends PartialGenerics> = {
62
+ export declare type FiltersInstance<TGenerics extends AnyGenerics> = {
63
63
  _notifyFiltersReset: () => void;
64
64
  getColumnAutoFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
65
65
  getColumnFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined;
@@ -83,10 +83,10 @@ export declare type FiltersInstance<TGenerics extends PartialGenerics> = {
83
83
  getGlobalFilteredRowModel: () => RowModel<TGenerics>;
84
84
  };
85
85
  export declare const Filters: {
86
- getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => FiltersColumnDef<TGenerics>;
86
+ getDefaultColumn: <TGenerics extends AnyGenerics>() => FiltersColumnDef<TGenerics>;
87
87
  getInitialState: () => FiltersTableState;
88
- getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => FiltersOptions<TGenerics_1>;
89
- createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => FiltersColumn<TGenerics_2>;
90
- getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => FiltersInstance<TGenerics_3>;
88
+ getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => FiltersOptions<TGenerics_1>;
89
+ createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => FiltersColumn<TGenerics_2>;
90
+ getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => FiltersInstance<TGenerics_3>;
91
91
  };
92
- export declare function shouldAutoRemoveFilter<TGenerics extends PartialGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean;
92
+ export declare function shouldAutoRemoveFilter<TGenerics extends AnyGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean;
@@ -1,15 +1,15 @@
1
1
  import { RowModel } from '..';
2
2
  import { BuiltInAggregationType } from '../aggregationTypes';
3
- import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, PartialGenerics, Renderable, UseRenderer } from '../types';
3
+ import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, Renderable, UseRenderer, AnyGenerics } from '../types';
4
4
  import { Overwrite } from '../utils';
5
5
  export declare type GroupingState = string[];
6
- export declare type AggregationFn<TGenerics extends PartialGenerics> = (leafValues: TGenerics['Row'][], childValues: TGenerics['Row'][]) => any;
7
- export declare type CustomAggregationTypes<TGenerics extends PartialGenerics> = Record<string, AggregationFn<TGenerics>>;
8
- export declare type AggregationType<TGenerics extends PartialGenerics> = 'auto' | BuiltInAggregationType | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>;
6
+ export declare type AggregationFn<TGenerics extends AnyGenerics> = (getLeafValues: () => TGenerics['Row'][], getChildValues: () => TGenerics['Row'][]) => any;
7
+ export declare type CustomAggregationTypes<TGenerics extends AnyGenerics> = Record<string, AggregationFn<TGenerics>>;
8
+ export declare type AggregationType<TGenerics extends AnyGenerics> = 'auto' | BuiltInAggregationType | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>;
9
9
  export declare type GroupingTableState = {
10
10
  grouping: GroupingState;
11
11
  };
12
- export declare type GroupingColumnDef<TGenerics extends PartialGenerics> = {
12
+ export declare type GroupingColumnDef<TGenerics extends AnyGenerics> = {
13
13
  aggregationType?: AggregationType<Overwrite<TGenerics, {
14
14
  Value: any;
15
15
  }>>;
@@ -24,7 +24,7 @@ export declare type GroupingColumnDef<TGenerics extends PartialGenerics> = {
24
24
  enableGrouping?: boolean;
25
25
  defaultCanGroup?: boolean;
26
26
  };
27
- export declare type GroupingColumn<TGenerics extends PartialGenerics> = {
27
+ export declare type GroupingColumn<TGenerics extends AnyGenerics> = {
28
28
  aggregationType?: AggregationType<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 PartialGenerics> = {
42
+ export declare type GroupingCell<TGenerics extends AnyGenerics> = {
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 PartialGenerics> = {
53
+ export declare type GroupingOptions<TGenerics extends AnyGenerics> = {
54
54
  aggregationTypes?: 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: MouseEvent | TouchEvent) => void;
66
66
  };
67
- export declare type GroupingInstance<TGenerics extends PartialGenerics> = {
67
+ export declare type GroupingInstance<TGenerics extends AnyGenerics> = {
68
68
  _notifyGroupingReset: () => void;
69
69
  getColumnAutoAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
70
70
  getColumnAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined;
@@ -80,12 +80,12 @@ export declare type GroupingInstance<TGenerics extends PartialGenerics> = {
80
80
  getGroupedRowModel: () => RowModel<TGenerics>;
81
81
  };
82
82
  export declare const Grouping: {
83
- getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => GroupingColumnDef<TGenerics>;
83
+ getDefaultColumn: <TGenerics extends AnyGenerics>() => GroupingColumnDef<TGenerics>;
84
84
  getInitialState: () => GroupingTableState;
85
- getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => GroupingOptions<TGenerics_1>;
86
- createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => GroupingColumn<TGenerics_2>;
87
- getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => GroupingInstance<TGenerics_3>;
88
- createRow: <TGenerics_4 extends Partial<import("..").DefaultGenerics>>(row: Row<TGenerics_4>, instance: TableInstance<TGenerics_4>) => GroupingRow;
89
- createCell: <TGenerics_5 extends Partial<import("..").DefaultGenerics>>(cell: Cell<TGenerics_5>, column: Column<TGenerics_5>, row: Row<TGenerics_5>, instance: TableInstance<TGenerics_5>) => GroupingCell<TGenerics_5>;
90
- orderColumns: <TGenerics_6 extends Partial<import("..").DefaultGenerics>>(leafColumns: Column<TGenerics_6>[], grouping: string[], groupedColumnMode?: GroupingColumnMode | undefined) => Column<TGenerics_6>[];
85
+ getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => GroupingOptions<TGenerics_1>;
86
+ createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => GroupingColumn<TGenerics_2>;
87
+ getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => GroupingInstance<TGenerics_3>;
88
+ createRow: <TGenerics_4 extends AnyGenerics>(row: Row<TGenerics_4>, instance: TableInstance<TGenerics_4>) => GroupingRow;
89
+ createCell: <TGenerics_5 extends AnyGenerics>(cell: Cell<TGenerics_5>, column: Column<TGenerics_5>, row: Row<TGenerics_5>, instance: TableInstance<TGenerics_5>) => GroupingCell<TGenerics_5>;
90
+ orderColumns: <TGenerics_6 extends AnyGenerics>(leafColumns: Column<TGenerics_6>[], grouping: string[], groupedColumnMode?: GroupingColumnMode | undefined) => Column<TGenerics_6>[];
91
91
  };
@@ -1,12 +1,12 @@
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> = {
1
+ import { Cell, Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, AnyGenerics, PropGetterValue, TableInstance, Row } from '../types';
2
+ export declare type HeadersRow<TGenerics extends AnyGenerics> = {
3
3
  _getAllVisibleCells: () => Cell<TGenerics>[];
4
4
  getVisibleCells: () => Cell<TGenerics>[];
5
5
  getLeftVisibleCells: () => Cell<TGenerics>[];
6
6
  getCenterVisibleCells: () => Cell<TGenerics>[];
7
7
  getRightVisibleCells: () => Cell<TGenerics>[];
8
8
  };
9
- export declare type HeadersInstance<TGenerics extends PartialGenerics> = {
9
+ export declare type HeadersInstance<TGenerics extends AnyGenerics> = {
10
10
  createHeader: (column: Column<TGenerics>, options: {
11
11
  id?: string;
12
12
  isPlaceholder?: boolean;
@@ -37,7 +37,7 @@ export declare type HeadersInstance<TGenerics extends PartialGenerics> = {
37
37
  getTotalWidth: () => number;
38
38
  };
39
39
  export declare const Headers: {
40
- createRow: <TGenerics extends Partial<import("../types").DefaultGenerics>>(row: Row<TGenerics>, instance: TableInstance<TGenerics>) => HeadersRow<TGenerics>;
41
- getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => HeadersInstance<TGenerics_1>;
40
+ createRow: <TGenerics extends AnyGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>) => HeadersRow<TGenerics>;
41
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => HeadersInstance<TGenerics_1>;
42
42
  };
43
- export declare function buildHeaderGroups<TGenerics extends PartialGenerics>(allColumns: Column<TGenerics>[], columnsToGroup: Column<TGenerics>[], instance: TableInstance<TGenerics>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TGenerics>[];
43
+ export declare function buildHeaderGroups<TGenerics extends AnyGenerics>(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, PartialGenerics } from '../types';
1
+ import { TableInstance, OnChangeFn, Updater, Column, AnyGenerics } from '../types';
2
2
  export declare type ColumnOrderState = string[];
3
3
  export declare type ColumnOrderTableState = {
4
4
  columnOrder: ColumnOrderState;
@@ -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 PartialGenerics> = {
12
+ export declare type ColumnOrderInstance<TGenerics extends AnyGenerics> = {
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 Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnOrderDefaultOptions;
20
- getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ColumnOrderInstance<TGenerics_1>;
19
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnOrderDefaultOptions;
20
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ColumnOrderInstance<TGenerics_1>;
21
21
  };
@@ -1,4 +1,4 @@
1
- import { OnChangeFn, PartialGenerics, TableInstance, RowModel, Updater } from '../types';
1
+ import { OnChangeFn, AnyGenerics, 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 PartialGenerics> = {
10
+ export declare type PaginationOptions<TGenerics extends AnyGenerics> = {
11
11
  onPaginationChange?: OnChangeFn<PaginationState>;
12
12
  autoResetPageIndex?: boolean;
13
13
  paginateRowsFn?: (instance: TableInstance<TGenerics>, rowModel: RowModel<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 PartialGenerics> = {
19
+ export declare type PaginationInstance<TGenerics extends AnyGenerics> = {
20
20
  _notifyPageIndexReset: () => void;
21
21
  setPagination: (updater: Updater<PaginationState>) => void;
22
22
  resetPagination: () => void;
@@ -36,6 +36,6 @@ export declare type PaginationInstance<TGenerics extends PartialGenerics> = {
36
36
  };
37
37
  export declare const Pagination: {
38
38
  getInitialState: () => PaginationTableState;
39
- getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => PaginationDefaultOptions;
40
- getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => PaginationInstance<TGenerics_1>;
39
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => PaginationDefaultOptions;
40
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => PaginationInstance<TGenerics_1>;
41
41
  };
@@ -1,4 +1,4 @@
1
- import { OnChangeFn, Updater, TableInstance, Column, PartialGenerics } from '../types';
1
+ import { OnChangeFn, Updater, TableInstance, Column, AnyGenerics } 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<TGenerics extends PartialGenerics> = {
27
+ export declare type ColumnPinningInstance<TGenerics extends AnyGenerics> = {
28
28
  setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
29
29
  resetColumnPinning: () => void;
30
30
  pinColumn: (columnId: string, position: ColumnPinningPosition) => void;
@@ -35,8 +35,8 @@ export declare type ColumnPinningInstance<TGenerics extends PartialGenerics> = {
35
35
  };
36
36
  export declare const Pinning: {
37
37
  getInitialState: () => ColumnPinningTableState;
38
- getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnPinningDefaultOptions;
39
- createColumn: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => ColumnPinningColumn;
40
- getInstance: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_2>) => ColumnPinningInstance<TGenerics_2>;
38
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnPinningDefaultOptions;
39
+ createColumn: <TGenerics_1 extends AnyGenerics>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => ColumnPinningColumn;
40
+ getInstance: <TGenerics_2 extends AnyGenerics>(instance: TableInstance<TGenerics_2>) => ColumnPinningInstance<TGenerics_2>;
41
41
  };
42
42
  export {};
@@ -1,9 +1,9 @@
1
- import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types';
1
+ import { Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types';
2
2
  export declare type RowSelectionState = Record<string, boolean>;
3
3
  export declare type RowSelectionTableState = {
4
4
  rowSelection: RowSelectionState;
5
5
  };
6
- export declare type RowSelectionOptions<TGenerics extends PartialGenerics> = {
6
+ export declare type RowSelectionOptions<TGenerics extends AnyGenerics> = {
7
7
  onRowSelectionChange?: OnChangeFn<RowSelectionState>;
8
8
  autoResetRowSelection?: boolean;
9
9
  enableRowSelection?: boolean | ((row: Row<TGenerics>) => boolean);
@@ -24,7 +24,7 @@ export declare type RowSelectionRow = {
24
24
  toggleSelected: (value?: boolean) => void;
25
25
  getToggleSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
26
26
  };
27
- export declare type RowSelectionInstance<TGenerics extends PartialGenerics> = {
27
+ export declare type RowSelectionInstance<TGenerics extends AnyGenerics> = {
28
28
  _notifyRowSelectionReset: () => void;
29
29
  getToggleRowSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(rowId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
30
30
  getToggleAllRowsSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>;
@@ -50,10 +50,10 @@ export declare type RowSelectionInstance<TGenerics extends PartialGenerics> = {
50
50
  };
51
51
  export declare const RowSelection: {
52
52
  getInitialState: () => RowSelectionTableState;
53
- getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => RowSelectionOptions<TGenerics>;
54
- getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => RowSelectionInstance<TGenerics_1>;
55
- createRow: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => RowSelectionRow;
53
+ getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => RowSelectionOptions<TGenerics>;
54
+ getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => RowSelectionInstance<TGenerics_1>;
55
+ createRow: <TGenerics_2 extends AnyGenerics>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => RowSelectionRow;
56
56
  };
57
- export declare function selectRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
58
- export declare function isRowSelected<TGenerics extends PartialGenerics>(row: Row<TGenerics>, selection: Record<string, boolean>, instance: TableInstance<TGenerics>): boolean | 'some';
57
+ export declare function selectRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
58
+ export declare function isRowSelected<TGenerics extends AnyGenerics>(row: Row<TGenerics>, selection: Record<string, boolean>, instance: TableInstance<TGenerics>): boolean | 'some';
59
59
  export {};
@@ -1,7 +1,7 @@
1
1
  import { MouseEvent, TouchEvent } from 'react';
2
2
  import { RowModel } from '..';
3
3
  import { BuiltInSortType } from '../sortTypes';
4
- import { Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
4
+ import { Column, Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types';
5
5
  import { Overwrite } from '../utils';
6
6
  export declare type SortDirection = 'asc' | 'desc';
7
7
  export declare type ColumnSort = {
@@ -9,15 +9,15 @@ export declare type ColumnSort = {
9
9
  desc: boolean;
10
10
  };
11
11
  export declare type SortingState = ColumnSort[];
12
- export declare type SortingFn<TGenerics extends PartialGenerics> = {
12
+ export declare type SortingFn<TGenerics extends AnyGenerics> = {
13
13
  (rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number;
14
14
  };
15
- export declare type CustomSortingTypes<TGenerics extends PartialGenerics> = Record<string, SortingFn<TGenerics>>;
15
+ export declare type CustomSortingTypes<TGenerics extends AnyGenerics> = Record<string, SortingFn<TGenerics>>;
16
16
  export declare type SortingTableState = {
17
17
  sorting: SortingState;
18
18
  };
19
- export declare type SortType<TGenerics extends PartialGenerics> = 'auto' | BuiltInSortType | keyof TGenerics['SortingFns'] | SortingFn<TGenerics>;
20
- export declare type SortingColumnDef<TGenerics extends PartialGenerics> = {
19
+ export declare type SortType<TGenerics extends AnyGenerics> = 'auto' | BuiltInSortType | keyof TGenerics['SortingFns'] | SortingFn<TGenerics>;
20
+ export declare type SortingColumnDef<TGenerics extends AnyGenerics> = {
21
21
  sortType?: SortType<Overwrite<TGenerics, {
22
22
  Value: any;
23
23
  }>>;
@@ -28,7 +28,7 @@ export declare type SortingColumnDef<TGenerics extends PartialGenerics> = {
28
28
  invertSorting?: boolean;
29
29
  sortUndefined?: false | -1 | 1;
30
30
  };
31
- export declare type SortingColumn<TGenerics extends PartialGenerics> = {
31
+ export declare type SortingColumn<TGenerics extends AnyGenerics> = {
32
32
  sortType: SortType<Overwrite<TGenerics, {
33
33
  Value: any;
34
34
  }>>;
@@ -40,7 +40,7 @@ export declare type SortingColumn<TGenerics extends PartialGenerics> = {
40
40
  toggleSorting: (desc?: boolean, isMulti?: boolean) => void;
41
41
  getToggleSortingProps: <TGetter extends Getter<ToggleSortingProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleSortingProps, TGetter>;
42
42
  };
43
- export declare type SortingOptions<TGenerics extends PartialGenerics> = {
43
+ export declare type SortingOptions<TGenerics extends AnyGenerics> = {
44
44
  sortTypes?: TGenerics['SortingFns'];
45
45
  onSortingChange?: OnChangeFn<SortingState>;
46
46
  autoResetSorting?: boolean;
@@ -57,7 +57,7 @@ export declare type ToggleSortingProps = {
57
57
  title?: string;
58
58
  onClick?: (event: MouseEvent | TouchEvent) => void;
59
59
  };
60
- export declare type SortingInstance<TGenerics extends PartialGenerics> = {
60
+ export declare type SortingInstance<TGenerics extends AnyGenerics> = {
61
61
  _notifySortingReset: () => void;
62
62
  getColumnAutoSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined;
63
63
  getColumnAutoSortDir: (columnId: string) => SortDirection;
@@ -74,9 +74,9 @@ export declare type SortingInstance<TGenerics extends PartialGenerics> = {
74
74
  getSortedRowModel: () => RowModel<TGenerics>;
75
75
  };
76
76
  export declare const Sorting: {
77
- getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => SortingColumnDef<TGenerics>;
77
+ getDefaultColumn: <TGenerics extends AnyGenerics>() => SortingColumnDef<TGenerics>;
78
78
  getInitialState: () => SortingTableState;
79
- getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => SortingOptions<TGenerics_1>;
80
- createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => SortingColumn<TGenerics_2>;
81
- getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => SortingInstance<TGenerics_3>;
79
+ getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => SortingOptions<TGenerics_1>;
80
+ createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => SortingColumn<TGenerics_2>;
81
+ getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => SortingInstance<TGenerics_3>;
82
82
  };