@tanstack/table-core 8.0.0-alpha.53 → 8.0.0-alpha.54

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 (94) hide show
  1. package/build/cjs/core.js +2 -2
  2. package/build/cjs/core.js.map +1 -1
  3. package/build/cjs/createTable.js.map +1 -1
  4. package/build/cjs/features/ColumnSizing.js.map +1 -1
  5. package/build/cjs/features/Expanding.js.map +1 -1
  6. package/build/cjs/features/Filters.js.map +1 -1
  7. package/build/cjs/features/Grouping.js.map +1 -1
  8. package/build/cjs/features/Headers.js.map +1 -1
  9. package/build/cjs/features/Ordering.js +1 -1
  10. package/build/cjs/features/Ordering.js.map +1 -1
  11. package/build/cjs/features/Pagination.js.map +1 -1
  12. package/build/cjs/features/Pinning.js.map +1 -1
  13. package/build/cjs/features/RowSelection.js.map +1 -1
  14. package/build/cjs/features/Sorting.js.map +1 -1
  15. package/build/cjs/features/Visibility.js.map +1 -1
  16. package/build/cjs/filterFns.js.map +1 -1
  17. package/build/cjs/sortingFns.js.map +1 -1
  18. package/build/cjs/utils/filterRowsUtils.js.map +1 -1
  19. package/build/cjs/utils/getColumnFilteredRowModelSync.js.map +1 -1
  20. package/build/cjs/utils/getCoreRowModelAsync.js.map +1 -1
  21. package/build/cjs/utils/getCoreRowModelSync.js.map +1 -1
  22. package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
  23. package/build/cjs/utils/getGlobalFilteredRowModelSync.js.map +1 -1
  24. package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
  25. package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
  26. package/build/cjs/utils/getSortedRowModelSync.js.map +1 -1
  27. package/build/cjs/utils.js +2 -2
  28. package/build/cjs/utils.js.map +1 -1
  29. package/build/esm/index.js +5 -5
  30. package/build/esm/index.js.map +1 -1
  31. package/build/stats-html.html +1 -1
  32. package/build/stats-react.json +295 -295
  33. package/build/types/core.d.ts +7 -7
  34. package/build/types/createTable.d.ts +4 -4
  35. package/build/types/features/ColumnSizing.d.ts +8 -8
  36. package/build/types/features/Expanding.d.ts +6 -6
  37. package/build/types/features/Filters.d.ts +14 -14
  38. package/build/types/features/Grouping.d.ts +16 -16
  39. package/build/types/features/Headers.d.ts +6 -6
  40. package/build/types/features/Ordering.d.ts +5 -5
  41. package/build/types/features/Pagination.d.ts +5 -5
  42. package/build/types/features/Pinning.d.ts +5 -5
  43. package/build/types/features/RowSelection.d.ts +8 -8
  44. package/build/types/features/Sorting.d.ts +12 -12
  45. package/build/types/features/Visibility.d.ts +6 -6
  46. package/build/types/filterFns.d.ts +10 -10
  47. package/build/types/sortingFns.d.ts +7 -7
  48. package/build/types/types.d.ts +22 -26
  49. package/build/types/utils/filterRowsUtils.d.ts +3 -3
  50. package/build/types/utils/getColumnFilteredRowModelAsync.d.ts +2 -2
  51. package/build/types/utils/getColumnFilteredRowModelSync.d.ts +2 -2
  52. package/build/types/utils/getCoreRowModelAsync.d.ts +2 -2
  53. package/build/types/utils/getCoreRowModelSync.d.ts +2 -2
  54. package/build/types/utils/getExpandedRowModel.d.ts +3 -3
  55. package/build/types/utils/getGlobalFilteredRowModelAsync.d.ts +2 -2
  56. package/build/types/utils/getGlobalFilteredRowModelSync.d.ts +2 -2
  57. package/build/types/utils/getGroupedRowModel.d.ts +2 -2
  58. package/build/types/utils/getPaginationRowModel.d.ts +2 -2
  59. package/build/types/utils/getSortedRowModelAsync.d.ts +4 -4
  60. package/build/types/utils/getSortedRowModelSync.d.ts +2 -2
  61. package/build/umd/index.development.js +5 -5
  62. package/build/umd/index.development.js.map +1 -1
  63. package/build/umd/index.production.js +1 -1
  64. package/build/umd/index.production.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/core.ts +9 -9
  67. package/src/createTable.ts +12 -5
  68. package/src/features/ColumnSizing.ts +9 -10
  69. package/src/features/Expanding.ts +6 -7
  70. package/src/features/Filters.ts +14 -15
  71. package/src/features/Grouping.ts +16 -17
  72. package/src/features/Headers.ts +6 -7
  73. package/src/features/Ordering.ts +8 -7
  74. package/src/features/Pagination.ts +5 -6
  75. package/src/features/Pinning.ts +5 -6
  76. package/src/features/RowSelection.ts +9 -10
  77. package/src/features/Sorting.ts +12 -13
  78. package/src/features/Visibility.ts +7 -8
  79. package/src/filterFns.ts +10 -10
  80. package/src/sortingFns.ts +7 -7
  81. package/src/types.ts +23 -29
  82. package/src/utils/filterRowsUtils.ts +3 -3
  83. package/src/utils/getColumnFilteredRowModelAsync.ts +2 -2
  84. package/src/utils/getColumnFilteredRowModelSync.ts +2 -2
  85. package/src/utils/getCoreRowModelAsync.ts +2 -2
  86. package/src/utils/getCoreRowModelSync.ts +2 -2
  87. package/src/utils/getExpandedRowModel.ts +3 -3
  88. package/src/utils/getGlobalFilteredRowModelAsync.ts +2 -2
  89. package/src/utils/getGlobalFilteredRowModelSync.ts +2 -2
  90. package/src/utils/getGroupedRowModel.ts +3 -3
  91. package/src/utils/getPaginationRowModel.ts +2 -2
  92. package/src/utils/getSortedRowModelAsync.ts +4 -4
  93. package/src/utils/getSortedRowModelSync.ts +2 -2
  94. package/src/utils.ts +2 -2
@@ -1,4 +1,4 @@
1
- import { TableInstance, RowModel, AnyGenerics, Row } from '../types'
1
+ import { TableInstance, RowModel, TableGenerics, Row } from '../types'
2
2
  import { memo } from '../utils'
3
3
  import {
4
4
  filterRowModelFromLeafs,
@@ -6,7 +6,7 @@ import {
6
6
  } from './filterRowsUtils'
7
7
 
8
8
  export function getGlobalFilteredRowModelSync<
9
- TGenerics extends AnyGenerics
9
+ TGenerics extends TableGenerics
10
10
  >(): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics> {
11
11
  return instance =>
12
12
  memo(
@@ -1,7 +1,7 @@
1
- import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
1
+ import { TableInstance, Row, RowModel, TableGenerics } from '../types'
2
2
  import { flattenBy, memo } from '../utils'
3
3
 
4
- export function getGroupedRowModelSync<TGenerics extends AnyGenerics>(): (
4
+ export function getGroupedRowModelSync<TGenerics extends TableGenerics>(): (
5
5
  instance: TableInstance<TGenerics>
6
6
  ) => () => RowModel<TGenerics> {
7
7
  return instance =>
@@ -172,7 +172,7 @@ export function getGroupedRowModelSync<TGenerics extends AnyGenerics>(): (
172
172
  )
173
173
  }
174
174
 
175
- function groupBy<TGenerics extends AnyGenerics>(
175
+ function groupBy<TGenerics extends TableGenerics>(
176
176
  rows: Row<TGenerics>[],
177
177
  columnId: string
178
178
  ) {
@@ -1,8 +1,8 @@
1
- import { TableInstance, RowModel, AnyGenerics } from '../types'
1
+ import { TableInstance, RowModel, TableGenerics } from '../types'
2
2
  import { memo } from '../utils'
3
3
  import { expandRows } from './getExpandedRowModel'
4
4
 
5
- export function getPaginationRowModel<TGenerics extends AnyGenerics>(opts?: {
5
+ export function getPaginationRowModel<TGenerics extends TableGenerics>(opts?: {
6
6
  initialSync: boolean
7
7
  }): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics> {
8
8
  return instance =>
@@ -1,8 +1,8 @@
1
- import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
1
+ import { TableInstance, Row, RowModel, TableGenerics } from '../types'
2
2
  import { SortingFn } from '../features/Sorting'
3
3
  import { incrementalMemo, memo } from '../utils'
4
4
 
5
- export function getSortedRowModelSync<TGenerics extends AnyGenerics>(opts?: {
5
+ export function getSortedRowModelSync<TGenerics extends TableGenerics>(opts?: {
6
6
  initialSync?: boolean
7
7
  }): (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics> {
8
8
  return instance =>
@@ -91,7 +91,7 @@ export function getSortedRowModelSync<TGenerics extends AnyGenerics>(opts?: {
91
91
  )
92
92
  }
93
93
 
94
- type Sorter<TGenerics extends AnyGenerics> = {
94
+ type Sorter<TGenerics extends TableGenerics> = {
95
95
  id: string
96
96
  compare: (a: Row<TGenerics>, b: Row<TGenerics>) => number
97
97
  desc?: boolean
@@ -99,7 +99,7 @@ type Sorter<TGenerics extends AnyGenerics> = {
99
99
  invertSorting?: boolean
100
100
  }
101
101
 
102
- export function quicksort<TGenerics extends AnyGenerics>(
102
+ export function quicksort<TGenerics extends TableGenerics>(
103
103
  rows: Row<TGenerics>[],
104
104
  sorters: Sorter<TGenerics>[]
105
105
  ): Row<TGenerics>[] {
@@ -1,8 +1,8 @@
1
- import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
1
+ import { TableInstance, Row, RowModel, TableGenerics } from '../types'
2
2
  import { SortingFn } from '../features/Sorting'
3
3
  import { memo } from '../utils'
4
4
 
5
- export function getSortedRowModelSync<TGenerics extends AnyGenerics>(): (
5
+ export function getSortedRowModelSync<TGenerics extends TableGenerics>(): (
6
6
  instance: TableInstance<TGenerics>
7
7
  ) => () => RowModel<TGenerics> {
8
8
  return instance =>
package/src/utils.ts CHANGED
@@ -12,11 +12,11 @@ export type Overwrite<T, U extends { [TKey in keyof T]?: any }> = Omit<
12
12
 
13
13
  export type IfDefined<T, N> = 0 extends 1 & T ? N : T extends {} ? T : N
14
14
 
15
- // export type DefinedGenericKeys<T extends AnyGenerics> = {
15
+ // export type DefinedGenericKeys<T extends TableGenerics> = {
16
16
  // [K in keyof T]: 0 extends 1 & T[K] ? never : T[K] extends {} ? K : never
17
17
  // }[keyof T]
18
18
 
19
- // export type DefinedGenerics<T extends AnyGenerics> = Pick<
19
+ // export type DefinedGenerics<T extends TableGenerics> = Pick<
20
20
  // T,
21
21
  // DefinedGenericKeys<T>
22
22
  // >