@tanstack/table-core
Advanced tools
Comparing version 8.5.19 to 8.5.20
@@ -15,6 +15,2 @@ /** | ||
// Is this type a tuple? | ||
// If this type is a tuple, what indices are allowed? | ||
/// | ||
@@ -21,0 +17,0 @@ |
@@ -13,3 +13,3 @@ { | ||
{ | ||
"uid": "eb6f-64", | ||
"uid": "2621-64", | ||
"name": "utils.ts" | ||
@@ -21,19 +21,19 @@ }, | ||
{ | ||
"uid": "eb6f-66", | ||
"uid": "2621-66", | ||
"name": "column.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-68", | ||
"uid": "2621-68", | ||
"name": "headers.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-96", | ||
"uid": "2621-96", | ||
"name": "table.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-98", | ||
"uid": "2621-98", | ||
"name": "cell.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-100", | ||
"uid": "2621-100", | ||
"name": "row.ts" | ||
@@ -47,39 +47,39 @@ } | ||
{ | ||
"uid": "eb6f-70", | ||
"uid": "2621-70", | ||
"name": "ColumnSizing.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-72", | ||
"uid": "2621-72", | ||
"name": "Expanding.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-76", | ||
"uid": "2621-76", | ||
"name": "Filters.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-80", | ||
"uid": "2621-80", | ||
"name": "Grouping.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-82", | ||
"uid": "2621-82", | ||
"name": "Ordering.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-84", | ||
"uid": "2621-84", | ||
"name": "Pagination.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-86", | ||
"uid": "2621-86", | ||
"name": "Pinning.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-88", | ||
"uid": "2621-88", | ||
"name": "RowSelection.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-92", | ||
"uid": "2621-92", | ||
"name": "Sorting.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-94", | ||
"uid": "2621-94", | ||
"name": "Visibility.ts" | ||
@@ -90,15 +90,15 @@ } | ||
{ | ||
"uid": "eb6f-74", | ||
"uid": "2621-74", | ||
"name": "filterFns.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-78", | ||
"uid": "2621-78", | ||
"name": "aggregationFns.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-90", | ||
"uid": "2621-90", | ||
"name": "sortingFns.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-102", | ||
"uid": "2621-102", | ||
"name": "columnHelper.ts" | ||
@@ -110,39 +110,39 @@ }, | ||
{ | ||
"uid": "eb6f-104", | ||
"uid": "2621-104", | ||
"name": "getCoreRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-106", | ||
"uid": "2621-106", | ||
"name": "filterRowsUtils.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-108", | ||
"uid": "2621-108", | ||
"name": "getFilteredRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-110", | ||
"uid": "2621-110", | ||
"name": "getFacetedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-112", | ||
"uid": "2621-112", | ||
"name": "getFacetedUniqueValues.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-114", | ||
"uid": "2621-114", | ||
"name": "getFacetedMinMaxValues.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-116", | ||
"uid": "2621-116", | ||
"name": "getSortedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-118", | ||
"uid": "2621-118", | ||
"name": "getGroupedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-120", | ||
"uid": "2621-120", | ||
"name": "getExpandedRowModel.ts" | ||
}, | ||
{ | ||
"uid": "eb6f-122", | ||
"uid": "2621-122", | ||
"name": "getPaginationRowModel.ts" | ||
@@ -153,3 +153,3 @@ } | ||
{ | ||
"uid": "eb6f-124", | ||
"uid": "2621-124", | ||
"name": "index.ts" | ||
@@ -165,194 +165,194 @@ } | ||
"nodeParts": { | ||
"eb6f-64": { | ||
"renderedLength": 2276, | ||
"gzipLength": 835, | ||
"2621-64": { | ||
"renderedLength": 2191, | ||
"gzipLength": 794, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-63" | ||
"mainUid": "2621-63" | ||
}, | ||
"eb6f-66": { | ||
"2621-66": { | ||
"renderedLength": 2315, | ||
"gzipLength": 789, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-65" | ||
"mainUid": "2621-65" | ||
}, | ||
"eb6f-68": { | ||
"2621-68": { | ||
"renderedLength": 12758, | ||
"gzipLength": 2299, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-67" | ||
"mainUid": "2621-67" | ||
}, | ||
"eb6f-70": { | ||
"2621-70": { | ||
"renderedLength": 9827, | ||
"gzipLength": 2131, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-69" | ||
"mainUid": "2621-69" | ||
}, | ||
"eb6f-72": { | ||
"2621-72": { | ||
"renderedLength": 5137, | ||
"gzipLength": 1235, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-71" | ||
"mainUid": "2621-71" | ||
}, | ||
"eb6f-74": { | ||
"2621-74": { | ||
"renderedLength": 3228, | ||
"gzipLength": 759, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-73" | ||
"mainUid": "2621-73" | ||
}, | ||
"eb6f-76": { | ||
"2621-76": { | ||
"renderedLength": 9342, | ||
"gzipLength": 1745, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-75" | ||
"mainUid": "2621-75" | ||
}, | ||
"eb6f-78": { | ||
"2621-78": { | ||
"renderedLength": 2432, | ||
"gzipLength": 653, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-77" | ||
"mainUid": "2621-77" | ||
}, | ||
"eb6f-80": { | ||
"2621-80": { | ||
"renderedLength": 4715, | ||
"gzipLength": 1240, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-79" | ||
"mainUid": "2621-79" | ||
}, | ||
"eb6f-82": { | ||
"2621-82": { | ||
"renderedLength": 2151, | ||
"gzipLength": 737, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-81" | ||
"mainUid": "2621-81" | ||
}, | ||
"eb6f-84": { | ||
"2621-84": { | ||
"renderedLength": 5418, | ||
"gzipLength": 1251, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-83" | ||
"mainUid": "2621-83" | ||
}, | ||
"eb6f-86": { | ||
"2621-86": { | ||
"renderedLength": 6528, | ||
"gzipLength": 1229, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-85" | ||
"mainUid": "2621-85" | ||
}, | ||
"eb6f-88": { | ||
"2621-88": { | ||
"renderedLength": 12344, | ||
"gzipLength": 2410, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-87" | ||
"mainUid": "2621-87" | ||
}, | ||
"eb6f-90": { | ||
"2621-90": { | ||
"renderedLength": 2933, | ||
"gzipLength": 929, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-89" | ||
"mainUid": "2621-89" | ||
}, | ||
"eb6f-92": { | ||
"2621-92": { | ||
"renderedLength": 8211, | ||
"gzipLength": 2005, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-91" | ||
"mainUid": "2621-91" | ||
}, | ||
"eb6f-94": { | ||
"2621-94": { | ||
"renderedLength": 4056, | ||
"gzipLength": 979, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-93" | ||
"mainUid": "2621-93" | ||
}, | ||
"eb6f-96": { | ||
"2621-96": { | ||
"renderedLength": 6382, | ||
"gzipLength": 1631, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-95" | ||
"mainUid": "2621-95" | ||
}, | ||
"eb6f-98": { | ||
"2621-98": { | ||
"renderedLength": 829, | ||
"gzipLength": 381, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-97" | ||
"mainUid": "2621-97" | ||
}, | ||
"eb6f-100": { | ||
"2621-100": { | ||
"renderedLength": 2324, | ||
"gzipLength": 679, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-99" | ||
"mainUid": "2621-99" | ||
}, | ||
"eb6f-102": { | ||
"2621-102": { | ||
"renderedLength": 1194, | ||
"gzipLength": 414, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-101" | ||
"mainUid": "2621-101" | ||
}, | ||
"eb6f-104": { | ||
"2621-104": { | ||
"renderedLength": 1836, | ||
"gzipLength": 729, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-103" | ||
"mainUid": "2621-103" | ||
}, | ||
"eb6f-106": { | ||
"2621-106": { | ||
"renderedLength": 2419, | ||
"gzipLength": 590, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-105" | ||
"mainUid": "2621-105" | ||
}, | ||
"eb6f-108": { | ||
"2621-108": { | ||
"renderedLength": 3766, | ||
"gzipLength": 1021, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-107" | ||
"mainUid": "2621-107" | ||
}, | ||
"eb6f-110": { | ||
"2621-110": { | ||
"renderedLength": 1060, | ||
"gzipLength": 469, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-109" | ||
"mainUid": "2621-109" | ||
}, | ||
"eb6f-112": { | ||
"2621-112": { | ||
"renderedLength": 849, | ||
"gzipLength": 364, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-111" | ||
"mainUid": "2621-111" | ||
}, | ||
"eb6f-114": { | ||
"2621-114": { | ||
"renderedLength": 1115, | ||
"gzipLength": 430, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-113" | ||
"mainUid": "2621-113" | ||
}, | ||
"eb6f-116": { | ||
"2621-116": { | ||
"renderedLength": 2906, | ||
"gzipLength": 955, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-115" | ||
"mainUid": "2621-115" | ||
}, | ||
"eb6f-118": { | ||
"2621-118": { | ||
"renderedLength": 5108, | ||
"gzipLength": 1426, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-117" | ||
"mainUid": "2621-117" | ||
}, | ||
"eb6f-120": { | ||
"2621-120": { | ||
"renderedLength": 1102, | ||
"gzipLength": 461, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-119" | ||
"mainUid": "2621-119" | ||
}, | ||
"eb6f-122": { | ||
"2621-122": { | ||
"renderedLength": 1330, | ||
"gzipLength": 454, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-121" | ||
"mainUid": "2621-121" | ||
}, | ||
"eb6f-124": { | ||
"2621-124": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "eb6f-123" | ||
"mainUid": "2621-123" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"eb6f-63": { | ||
"2621-63": { | ||
"id": "/packages/table-core/src/utils.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-64" | ||
"index.production.js": "2621-64" | ||
}, | ||
@@ -362,86 +362,86 @@ "imported": [], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
}, | ||
{ | ||
"uid": "eb6f-65" | ||
"uid": "2621-65" | ||
}, | ||
{ | ||
"uid": "eb6f-67" | ||
"uid": "2621-67" | ||
}, | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
}, | ||
{ | ||
"uid": "eb6f-97" | ||
"uid": "2621-97" | ||
}, | ||
{ | ||
"uid": "eb6f-69" | ||
"uid": "2621-69" | ||
}, | ||
{ | ||
"uid": "eb6f-71" | ||
"uid": "2621-71" | ||
}, | ||
{ | ||
"uid": "eb6f-75" | ||
"uid": "2621-75" | ||
}, | ||
{ | ||
"uid": "eb6f-79" | ||
"uid": "2621-79" | ||
}, | ||
{ | ||
"uid": "eb6f-81" | ||
"uid": "2621-81" | ||
}, | ||
{ | ||
"uid": "eb6f-83" | ||
"uid": "2621-83" | ||
}, | ||
{ | ||
"uid": "eb6f-85" | ||
"uid": "2621-85" | ||
}, | ||
{ | ||
"uid": "eb6f-87" | ||
"uid": "2621-87" | ||
}, | ||
{ | ||
"uid": "eb6f-91" | ||
"uid": "2621-91" | ||
}, | ||
{ | ||
"uid": "eb6f-93" | ||
"uid": "2621-93" | ||
}, | ||
{ | ||
"uid": "eb6f-103" | ||
"uid": "2621-103" | ||
}, | ||
{ | ||
"uid": "eb6f-107" | ||
"uid": "2621-107" | ||
}, | ||
{ | ||
"uid": "eb6f-109" | ||
"uid": "2621-109" | ||
}, | ||
{ | ||
"uid": "eb6f-111" | ||
"uid": "2621-111" | ||
}, | ||
{ | ||
"uid": "eb6f-113" | ||
"uid": "2621-113" | ||
}, | ||
{ | ||
"uid": "eb6f-115" | ||
"uid": "2621-115" | ||
}, | ||
{ | ||
"uid": "eb6f-117" | ||
"uid": "2621-117" | ||
}, | ||
{ | ||
"uid": "eb6f-119" | ||
"uid": "2621-119" | ||
}, | ||
{ | ||
"uid": "eb6f-121" | ||
"uid": "2621-121" | ||
} | ||
] | ||
}, | ||
"eb6f-65": { | ||
"2621-65": { | ||
"id": "/packages/table-core/src/core/column.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-66" | ||
"index.production.js": "2621-66" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -451,17 +451,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-67": { | ||
"2621-67": { | ||
"id": "/packages/table-core/src/core/headers.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-68" | ||
"index.production.js": "2621-68" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -471,17 +471,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-69": { | ||
"2621-69": { | ||
"id": "/packages/table-core/src/features/ColumnSizing.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-70" | ||
"index.production.js": "2621-70" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -491,17 +491,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-71": { | ||
"2621-71": { | ||
"id": "/packages/table-core/src/features/Expanding.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-72" | ||
"index.production.js": "2621-72" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -511,13 +511,13 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-73": { | ||
"2621-73": { | ||
"id": "/packages/table-core/src/filterFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-74" | ||
"index.production.js": "2621-74" | ||
}, | ||
@@ -527,20 +527,20 @@ "imported": [], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-75" | ||
"uid": "2621-75" | ||
} | ||
] | ||
}, | ||
"eb6f-75": { | ||
"2621-75": { | ||
"id": "/packages/table-core/src/features/Filters.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-76" | ||
"index.production.js": "2621-76" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-73" | ||
"uid": "2621-73" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -550,13 +550,13 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-77": { | ||
"2621-77": { | ||
"id": "/packages/table-core/src/aggregationFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-78" | ||
"index.production.js": "2621-78" | ||
}, | ||
@@ -566,20 +566,20 @@ "imported": [], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-79" | ||
"uid": "2621-79" | ||
} | ||
] | ||
}, | ||
"eb6f-79": { | ||
"2621-79": { | ||
"id": "/packages/table-core/src/features/Grouping.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-80" | ||
"index.production.js": "2621-80" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-77" | ||
"uid": "2621-77" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -589,23 +589,23 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
}, | ||
{ | ||
"uid": "eb6f-81" | ||
"uid": "2621-81" | ||
} | ||
] | ||
}, | ||
"eb6f-81": { | ||
"2621-81": { | ||
"id": "/packages/table-core/src/features/Ordering.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-82" | ||
"index.production.js": "2621-82" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-79" | ||
"uid": "2621-79" | ||
} | ||
@@ -615,17 +615,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-83": { | ||
"2621-83": { | ||
"id": "/packages/table-core/src/features/Pagination.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-84" | ||
"index.production.js": "2621-84" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -635,17 +635,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-85": { | ||
"2621-85": { | ||
"id": "/packages/table-core/src/features/Pinning.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-86" | ||
"index.production.js": "2621-86" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -655,17 +655,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-87": { | ||
"2621-87": { | ||
"id": "/packages/table-core/src/features/RowSelection.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-88" | ||
"index.production.js": "2621-88" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -675,13 +675,13 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-89": { | ||
"2621-89": { | ||
"id": "/packages/table-core/src/sortingFns.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-90" | ||
"index.production.js": "2621-90" | ||
}, | ||
@@ -691,20 +691,20 @@ "imported": [], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-91" | ||
"uid": "2621-91" | ||
} | ||
] | ||
}, | ||
"eb6f-91": { | ||
"2621-91": { | ||
"id": "/packages/table-core/src/features/Sorting.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-92" | ||
"index.production.js": "2621-92" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-89" | ||
"uid": "2621-89" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -714,17 +714,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-93": { | ||
"2621-93": { | ||
"id": "/packages/table-core/src/features/Visibility.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-94" | ||
"index.production.js": "2621-94" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -734,53 +734,53 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
} | ||
] | ||
}, | ||
"eb6f-95": { | ||
"2621-95": { | ||
"id": "/packages/table-core/src/core/table.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-96" | ||
"index.production.js": "2621-96" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-65" | ||
"uid": "2621-65" | ||
}, | ||
{ | ||
"uid": "eb6f-67" | ||
"uid": "2621-67" | ||
}, | ||
{ | ||
"uid": "eb6f-69" | ||
"uid": "2621-69" | ||
}, | ||
{ | ||
"uid": "eb6f-71" | ||
"uid": "2621-71" | ||
}, | ||
{ | ||
"uid": "eb6f-75" | ||
"uid": "2621-75" | ||
}, | ||
{ | ||
"uid": "eb6f-79" | ||
"uid": "2621-79" | ||
}, | ||
{ | ||
"uid": "eb6f-81" | ||
"uid": "2621-81" | ||
}, | ||
{ | ||
"uid": "eb6f-83" | ||
"uid": "2621-83" | ||
}, | ||
{ | ||
"uid": "eb6f-85" | ||
"uid": "2621-85" | ||
}, | ||
{ | ||
"uid": "eb6f-87" | ||
"uid": "2621-87" | ||
}, | ||
{ | ||
"uid": "eb6f-91" | ||
"uid": "2621-91" | ||
}, | ||
{ | ||
"uid": "eb6f-93" | ||
"uid": "2621-93" | ||
} | ||
@@ -790,14 +790,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-97": { | ||
"2621-97": { | ||
"id": "/packages/table-core/src/core/cell.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-98" | ||
"index.production.js": "2621-98" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -807,20 +807,20 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
} | ||
] | ||
}, | ||
"eb6f-99": { | ||
"2621-99": { | ||
"id": "/packages/table-core/src/core/row.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-100" | ||
"index.production.js": "2621-100" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-97" | ||
"uid": "2621-97" | ||
} | ||
@@ -830,19 +830,19 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-103" | ||
"uid": "2621-103" | ||
}, | ||
{ | ||
"uid": "eb6f-117" | ||
"uid": "2621-117" | ||
}, | ||
{ | ||
"uid": "eb6f-105" | ||
"uid": "2621-105" | ||
} | ||
] | ||
}, | ||
"eb6f-101": { | ||
"2621-101": { | ||
"id": "/packages/table-core/src/columnHelper.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-102" | ||
"index.production.js": "2621-102" | ||
}, | ||
@@ -852,17 +852,17 @@ "imported": [], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-103": { | ||
"2621-103": { | ||
"id": "/packages/table-core/src/utils/getCoreRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-104" | ||
"index.production.js": "2621-104" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -872,14 +872,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-105": { | ||
"2621-105": { | ||
"id": "/packages/table-core/src/utils/filterRowsUtils.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-106" | ||
"index.production.js": "2621-106" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
} | ||
@@ -889,20 +889,20 @@ ], | ||
{ | ||
"uid": "eb6f-107" | ||
"uid": "2621-107" | ||
}, | ||
{ | ||
"uid": "eb6f-109" | ||
"uid": "2621-109" | ||
} | ||
] | ||
}, | ||
"eb6f-107": { | ||
"2621-107": { | ||
"id": "/packages/table-core/src/utils/getFilteredRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-108" | ||
"index.production.js": "2621-108" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-105" | ||
"uid": "2621-105" | ||
} | ||
@@ -912,17 +912,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-109": { | ||
"2621-109": { | ||
"id": "/packages/table-core/src/utils/getFacetedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-110" | ||
"index.production.js": "2621-110" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-105" | ||
"uid": "2621-105" | ||
} | ||
@@ -932,14 +932,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-111": { | ||
"2621-111": { | ||
"id": "/packages/table-core/src/utils/getFacetedUniqueValues.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-112" | ||
"index.production.js": "2621-112" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -949,14 +949,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-113": { | ||
"2621-113": { | ||
"id": "/packages/table-core/src/utils/getFacetedMinMaxValues.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-114" | ||
"index.production.js": "2621-114" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -966,14 +966,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-115": { | ||
"2621-115": { | ||
"id": "/packages/table-core/src/utils/getSortedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-116" | ||
"index.production.js": "2621-116" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -983,17 +983,17 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-117": { | ||
"2621-117": { | ||
"id": "/packages/table-core/src/utils/getGroupedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-118" | ||
"index.production.js": "2621-118" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -1003,14 +1003,14 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-119": { | ||
"2621-119": { | ||
"id": "/packages/table-core/src/utils/getExpandedRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-120" | ||
"index.production.js": "2621-120" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
} | ||
@@ -1020,20 +1020,20 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
}, | ||
{ | ||
"uid": "eb6f-121" | ||
"uid": "2621-121" | ||
} | ||
] | ||
}, | ||
"eb6f-121": { | ||
"2621-121": { | ||
"id": "/packages/table-core/src/utils/getPaginationRowModel.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-122" | ||
"index.production.js": "2621-122" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-119" | ||
"uid": "2621-119" | ||
} | ||
@@ -1043,101 +1043,101 @@ ], | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
] | ||
}, | ||
"eb6f-123": { | ||
"2621-123": { | ||
"id": "/packages/table-core/src/index.ts", | ||
"moduleParts": { | ||
"index.production.js": "eb6f-124" | ||
"index.production.js": "2621-124" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "eb6f-95" | ||
"uid": "2621-95" | ||
}, | ||
{ | ||
"uid": "eb6f-125" | ||
"uid": "2621-125" | ||
}, | ||
{ | ||
"uid": "eb6f-65" | ||
"uid": "2621-65" | ||
}, | ||
{ | ||
"uid": "eb6f-67" | ||
"uid": "2621-67" | ||
}, | ||
{ | ||
"uid": "eb6f-99" | ||
"uid": "2621-99" | ||
}, | ||
{ | ||
"uid": "eb6f-97" | ||
"uid": "2621-97" | ||
}, | ||
{ | ||
"uid": "eb6f-69" | ||
"uid": "2621-69" | ||
}, | ||
{ | ||
"uid": "eb6f-71" | ||
"uid": "2621-71" | ||
}, | ||
{ | ||
"uid": "eb6f-75" | ||
"uid": "2621-75" | ||
}, | ||
{ | ||
"uid": "eb6f-79" | ||
"uid": "2621-79" | ||
}, | ||
{ | ||
"uid": "eb6f-81" | ||
"uid": "2621-81" | ||
}, | ||
{ | ||
"uid": "eb6f-83" | ||
"uid": "2621-83" | ||
}, | ||
{ | ||
"uid": "eb6f-85" | ||
"uid": "2621-85" | ||
}, | ||
{ | ||
"uid": "eb6f-87" | ||
"uid": "2621-87" | ||
}, | ||
{ | ||
"uid": "eb6f-91" | ||
"uid": "2621-91" | ||
}, | ||
{ | ||
"uid": "eb6f-93" | ||
"uid": "2621-93" | ||
}, | ||
{ | ||
"uid": "eb6f-73" | ||
"uid": "2621-73" | ||
}, | ||
{ | ||
"uid": "eb6f-89" | ||
"uid": "2621-89" | ||
}, | ||
{ | ||
"uid": "eb6f-77" | ||
"uid": "2621-77" | ||
}, | ||
{ | ||
"uid": "eb6f-101" | ||
"uid": "2621-101" | ||
}, | ||
{ | ||
"uid": "eb6f-63" | ||
"uid": "2621-63" | ||
}, | ||
{ | ||
"uid": "eb6f-103" | ||
"uid": "2621-103" | ||
}, | ||
{ | ||
"uid": "eb6f-107" | ||
"uid": "2621-107" | ||
}, | ||
{ | ||
"uid": "eb6f-109" | ||
"uid": "2621-109" | ||
}, | ||
{ | ||
"uid": "eb6f-111" | ||
"uid": "2621-111" | ||
}, | ||
{ | ||
"uid": "eb6f-113" | ||
"uid": "2621-113" | ||
}, | ||
{ | ||
"uid": "eb6f-115" | ||
"uid": "2621-115" | ||
}, | ||
{ | ||
"uid": "eb6f-117" | ||
"uid": "2621-117" | ||
}, | ||
{ | ||
"uid": "eb6f-119" | ||
"uid": "2621-119" | ||
}, | ||
{ | ||
"uid": "eb6f-121" | ||
"uid": "2621-121" | ||
} | ||
@@ -1148,3 +1148,3 @@ ], | ||
}, | ||
"eb6f-125": { | ||
"2621-125": { | ||
"id": "/packages/table-core/src/types.ts", | ||
@@ -1155,3 +1155,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "eb6f-123" | ||
"uid": "2621-123" | ||
} | ||
@@ -1158,0 +1158,0 @@ ] |
@@ -12,13 +12,13 @@ /** | ||
declare type VisibilityState = Record<string, boolean>; | ||
declare type VisibilityTableState = { | ||
interface VisibilityTableState { | ||
columnVisibility: VisibilityState; | ||
}; | ||
declare type VisibilityOptions = { | ||
} | ||
interface VisibilityOptions { | ||
onColumnVisibilityChange?: OnChangeFn<VisibilityState>; | ||
enableHiding?: boolean; | ||
}; | ||
declare type VisibilityDefaultOptions = { | ||
} | ||
interface VisibilityDefaultOptions { | ||
onColumnVisibilityChange: OnChangeFn<VisibilityState>; | ||
}; | ||
declare type VisibilityInstance<TData extends RowData> = { | ||
} | ||
interface VisibilityInstance<TData extends RowData> { | ||
getVisibleFlatColumns: () => Column<TData, unknown>[]; | ||
@@ -35,11 +35,11 @@ getVisibleLeafColumns: () => Column<TData, unknown>[]; | ||
getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void; | ||
}; | ||
declare type VisibilityColumnDef = { | ||
} | ||
interface VisibilityColumnDef { | ||
enableHiding?: boolean; | ||
}; | ||
declare type VisibilityRow<TData extends RowData> = { | ||
} | ||
interface VisibilityRow<TData extends RowData> { | ||
_getAllVisibleCells: () => Cell<TData, unknown>[]; | ||
getVisibleCells: () => Cell<TData, unknown>[]; | ||
}; | ||
declare type VisibilityColumn = { | ||
} | ||
interface VisibilityColumn { | ||
getCanHide: () => boolean; | ||
@@ -49,41 +49,41 @@ getIsVisible: () => boolean; | ||
getToggleVisibilityHandler: () => (event: unknown) => void; | ||
}; | ||
} | ||
declare const Visibility: TableFeature; | ||
declare type ColumnOrderTableState = { | ||
interface ColumnOrderTableState { | ||
columnOrder: ColumnOrderState; | ||
}; | ||
} | ||
declare type ColumnOrderState = string[]; | ||
declare type ColumnOrderOptions = { | ||
interface ColumnOrderOptions { | ||
onColumnOrderChange?: OnChangeFn<ColumnOrderState>; | ||
}; | ||
declare type ColumnOrderDefaultOptions = { | ||
} | ||
interface ColumnOrderDefaultOptions { | ||
onColumnOrderChange: OnChangeFn<ColumnOrderState>; | ||
}; | ||
declare type ColumnOrderInstance<TData extends RowData> = { | ||
} | ||
interface ColumnOrderInstance<TData extends RowData> { | ||
setColumnOrder: (updater: Updater<ColumnOrderState>) => void; | ||
resetColumnOrder: (defaultState?: boolean) => void; | ||
_getOrderColumnsFn: () => (columns: Column<TData, unknown>[]) => Column<TData, unknown>[]; | ||
}; | ||
} | ||
declare const Ordering: TableFeature; | ||
declare type ColumnPinningPosition = false | 'left' | 'right'; | ||
declare type ColumnPinningState = { | ||
interface ColumnPinningState { | ||
left?: string[]; | ||
right?: string[]; | ||
}; | ||
declare type ColumnPinningTableState = { | ||
} | ||
interface ColumnPinningTableState { | ||
columnPinning: ColumnPinningState; | ||
}; | ||
declare type ColumnPinningOptions = { | ||
} | ||
interface ColumnPinningOptions { | ||
onColumnPinningChange?: OnChangeFn<ColumnPinningState>; | ||
enablePinning?: boolean; | ||
}; | ||
declare type ColumnPinningDefaultOptions = { | ||
} | ||
interface ColumnPinningDefaultOptions { | ||
onColumnPinningChange: OnChangeFn<ColumnPinningState>; | ||
}; | ||
declare type ColumnPinningColumnDef = { | ||
} | ||
interface ColumnPinningColumnDef { | ||
enablePinning?: boolean; | ||
}; | ||
declare type ColumnPinningColumn = { | ||
} | ||
interface ColumnPinningColumn { | ||
getCanPin: () => boolean; | ||
@@ -93,9 +93,9 @@ getPinnedIndex: () => number; | ||
pin: (position: ColumnPinningPosition) => void; | ||
}; | ||
declare type ColumnPinningRow<TData extends RowData> = { | ||
} | ||
interface ColumnPinningRow<TData extends RowData> { | ||
getLeftVisibleCells: () => Cell<TData, unknown>[]; | ||
getCenterVisibleCells: () => Cell<TData, unknown>[]; | ||
getRightVisibleCells: () => Cell<TData, unknown>[]; | ||
}; | ||
declare type ColumnPinningInstance<TData extends RowData> = { | ||
} | ||
interface ColumnPinningInstance<TData extends RowData> { | ||
setColumnPinning: (updater: Updater<ColumnPinningState>) => void; | ||
@@ -107,16 +107,16 @@ resetColumnPinning: (defaultState?: boolean) => void; | ||
getCenterLeafColumns: () => Column<TData, unknown>[]; | ||
}; | ||
} | ||
declare const Pinning: TableFeature; | ||
declare type CoreHeaderGroup<TData extends RowData> = { | ||
interface CoreHeaderGroup<TData extends RowData> { | ||
id: string; | ||
depth: number; | ||
headers: Header<TData, unknown>[]; | ||
}; | ||
declare type HeaderContext<TData, TValue> = { | ||
} | ||
interface HeaderContext<TData, TValue> { | ||
table: Table<TData>; | ||
header: Header<TData, TValue>; | ||
column: Column<TData, TValue>; | ||
}; | ||
declare type CoreHeader<TData extends RowData, TValue> = { | ||
} | ||
interface CoreHeader<TData extends RowData, TValue> { | ||
id: string; | ||
@@ -134,4 +134,4 @@ index: number; | ||
getContext: () => HeaderContext<TData, TValue>; | ||
}; | ||
declare type HeadersInstance<TData extends RowData> = { | ||
} | ||
interface HeadersInstance<TData extends RowData> { | ||
getHeaderGroups: () => HeaderGroup<TData>[]; | ||
@@ -153,3 +153,3 @@ getLeftHeaderGroups: () => HeaderGroup<TData>[]; | ||
getRightLeafHeaders: () => Header<TData, unknown>[]; | ||
}; | ||
} | ||
declare const Headers: TableFeature; | ||
@@ -171,21 +171,21 @@ declare function buildHeaderGroups<TData extends RowData>(allColumns: Column<TData, unknown>[], columnsToGroup: Column<TData, unknown>[], table: Table<TData>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TData>[]; | ||
declare type FiltersTableState = { | ||
interface FiltersTableState { | ||
columnFilters: ColumnFiltersState; | ||
globalFilter: any; | ||
}; | ||
} | ||
declare type ColumnFiltersState = ColumnFilter[]; | ||
declare type ColumnFilter = { | ||
interface ColumnFilter { | ||
id: string; | ||
value: unknown; | ||
}; | ||
declare type ResolvedColumnFilter<TData extends RowData> = { | ||
} | ||
interface ResolvedColumnFilter<TData extends RowData> { | ||
id: string; | ||
resolvedValue: unknown; | ||
filterFn: FilterFn<TData>; | ||
}; | ||
declare type FilterFn<TData extends RowData> = { | ||
} | ||
interface FilterFn<TData extends RowData> { | ||
(row: Row<TData>, columnId: string, filterValue: any, addMeta: (meta: FilterMeta) => void): boolean; | ||
resolveFilterValue?: TransformFilterValueFn<TData>; | ||
autoRemove?: ColumnFilterAutoRemoveTestFn<TData>; | ||
}; | ||
} | ||
declare type TransformFilterValueFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => unknown; | ||
@@ -195,8 +195,8 @@ declare type ColumnFilterAutoRemoveTestFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => boolean; | ||
declare type FilterFnOption<TData extends RowData> = 'auto' | BuiltInFilterFn | keyof FilterFns | FilterFn<TData>; | ||
declare type FiltersColumnDef<TData extends RowData> = { | ||
interface FiltersColumnDef<TData extends RowData> { | ||
filterFn?: FilterFnOption<TData>; | ||
enableColumnFilter?: boolean; | ||
enableGlobalFilter?: boolean; | ||
}; | ||
declare type FiltersColumn<TData extends RowData> = { | ||
} | ||
interface FiltersColumn<TData extends RowData> { | ||
getAutoFilterFn: () => FilterFn<TData> | undefined; | ||
@@ -216,8 +216,8 @@ getFilterFn: () => FilterFn<TData> | undefined; | ||
_getFacetedMinMaxValues?: () => undefined | [number, number]; | ||
}; | ||
declare type FiltersRow<TData extends RowData> = { | ||
} | ||
interface FiltersRow<TData extends RowData> { | ||
columnFilters: Record<string, boolean>; | ||
columnFiltersMeta: Record<string, FilterMeta>; | ||
}; | ||
declare type FiltersOptions<TData extends RowData> = { | ||
} | ||
interface FiltersOptionsBase<TData extends RowData> { | ||
enableFilters?: boolean; | ||
@@ -236,8 +236,11 @@ manualFiltering?: boolean; | ||
getFacetedMinMaxValues?: (table: Table<TData>, columnId: string) => () => undefined | [number, number]; | ||
} & (keyof FilterFns extends never ? { | ||
} | ||
declare type ResolvedFilterFns = keyof FilterFns extends never ? { | ||
filterFns?: Record<string, FilterFn<any>>; | ||
} : { | ||
filterFns: Record<keyof FilterFns, FilterFn<any>>; | ||
}); | ||
declare type FiltersInstance<TData extends RowData> = { | ||
}; | ||
interface FiltersOptions<TData extends RowData> extends FiltersOptionsBase<TData>, ResolvedFilterFns { | ||
} | ||
interface FiltersInstance<TData extends RowData> { | ||
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void; | ||
@@ -258,3 +261,3 @@ resetColumnFilters: (defaultState?: boolean) => void; | ||
_getGlobalFacetedMinMaxValues?: () => undefined | [number, number]; | ||
}; | ||
} | ||
declare const Filters: TableFeature; | ||
@@ -275,16 +278,16 @@ declare function shouldAutoRemoveFilter<TData extends RowData>(filterFn?: FilterFn<TData>, value?: any, column?: Column<TData, unknown>): boolean; | ||
declare type SortDirection = 'asc' | 'desc'; | ||
declare type ColumnSort = { | ||
interface ColumnSort { | ||
id: string; | ||
desc: boolean; | ||
}; | ||
} | ||
declare type SortingState = ColumnSort[]; | ||
declare type SortingTableState = { | ||
interface SortingTableState { | ||
sorting: SortingState; | ||
}; | ||
declare type SortingFn<TData extends RowData> = { | ||
} | ||
interface SortingFn<TData extends RowData> { | ||
(rowA: Row<TData>, rowB: Row<TData>, columnId: string): number; | ||
}; | ||
} | ||
declare type CustomSortingFns<TData extends RowData> = Record<string, SortingFn<TData>>; | ||
declare type SortingFnOption<TData extends RowData> = 'auto' | keyof SortingFns | BuiltInSortingFn | SortingFn<TData>; | ||
declare type SortingColumnDef<TData extends RowData> = { | ||
interface SortingColumnDef<TData extends RowData> { | ||
sortingFn?: SortingFnOption<TData>; | ||
@@ -296,4 +299,4 @@ sortDescFirst?: boolean; | ||
sortUndefined?: false | -1 | 1; | ||
}; | ||
declare type SortingColumn<TData extends RowData> = { | ||
} | ||
interface SortingColumn<TData extends RowData> { | ||
getAutoSortingFn: () => SortingFn<TData>; | ||
@@ -311,4 +314,4 @@ getAutoSortDir: () => SortDirection; | ||
getToggleSortingHandler: () => undefined | ((event: unknown) => void); | ||
}; | ||
declare type SortingOptions<TData extends RowData> = { | ||
} | ||
interface SortingOptionsBase { | ||
manualSorting?: boolean; | ||
@@ -324,8 +327,11 @@ onSortingChange?: OnChangeFn<SortingState>; | ||
isMultiSortEvent?: (e: unknown) => boolean; | ||
} & (keyof SortingFns extends never ? { | ||
} | ||
declare type ResolvedSortingFns = keyof SortingFns extends never ? { | ||
sortingFns?: Record<string, SortingFn<any>>; | ||
} : { | ||
sortingFns: Record<keyof SortingFns, SortingFn<any>>; | ||
}); | ||
declare type SortingInstance<TData extends RowData> = { | ||
}; | ||
interface SortingOptions<TData extends RowData> extends SortingOptionsBase, ResolvedSortingFns { | ||
} | ||
interface SortingInstance<TData extends RowData> { | ||
setSorting: (updater: Updater<SortingState>) => void; | ||
@@ -336,3 +342,3 @@ resetSorting: (defaultState?: boolean) => void; | ||
_getSortedRowModel?: () => RowModel<TData>; | ||
}; | ||
} | ||
declare const Sorting: TableFeature; | ||
@@ -354,14 +360,14 @@ | ||
declare type GroupingState = string[]; | ||
declare type GroupingTableState = { | ||
interface GroupingTableState { | ||
grouping: GroupingState; | ||
}; | ||
} | ||
declare type AggregationFn<TData extends RowData> = (columnId: string, leafRows: Row<TData>[], childRows: Row<TData>[]) => any; | ||
declare type CustomAggregationFns = Record<string, AggregationFn<any>>; | ||
declare type AggregationFnOption<TData extends RowData> = 'auto' | keyof AggregationFns | BuiltInAggregationFn | AggregationFn<TData>; | ||
declare type GroupingColumnDef<TData extends RowData, TValue> = { | ||
interface GroupingColumnDef<TData extends RowData, TValue> { | ||
aggregationFn?: AggregationFnOption<TData>; | ||
aggregatedCell?: ColumnDefTemplate<ReturnType<Cell<TData, TValue>['getContext']>>; | ||
enableGrouping?: boolean; | ||
}; | ||
declare type GroupingColumn<TData extends RowData> = { | ||
} | ||
interface GroupingColumn<TData extends RowData> { | ||
getCanGroup: () => boolean; | ||
@@ -374,4 +380,4 @@ getIsGrouped: () => boolean; | ||
getAggregationFn: () => AggregationFn<TData> | undefined; | ||
}; | ||
declare type GroupingRow = { | ||
} | ||
interface GroupingRow { | ||
groupingColumnId?: string; | ||
@@ -381,13 +387,13 @@ groupingValue?: unknown; | ||
_groupingValuesCache: Record<string, any>; | ||
}; | ||
declare type GroupingCell = { | ||
} | ||
interface GroupingCell { | ||
getIsGrouped: () => boolean; | ||
getIsPlaceholder: () => boolean; | ||
getIsAggregated: () => boolean; | ||
}; | ||
declare type ColumnDefaultOptions = { | ||
} | ||
interface ColumnDefaultOptions { | ||
onGroupingChange: OnChangeFn<GroupingState>; | ||
enableGrouping: boolean; | ||
}; | ||
declare type GroupingOptions = { | ||
} | ||
interface GroupingOptionsBase { | ||
manualGrouping?: boolean; | ||
@@ -398,9 +404,12 @@ onGroupingChange?: OnChangeFn<GroupingState>; | ||
groupedColumnMode?: false | 'reorder' | 'remove'; | ||
} & (keyof AggregationFns extends never ? { | ||
} | ||
declare type ResolvedAggregationFns = keyof AggregationFns extends never ? { | ||
aggregationFns?: Record<string, AggregationFn<any>>; | ||
} : { | ||
aggregationFns: Record<keyof AggregationFns, AggregationFn<any>>; | ||
}); | ||
}; | ||
interface GroupingOptions extends GroupingOptionsBase, ResolvedAggregationFns { | ||
} | ||
declare type GroupingColumnMode = false | 'reorder' | 'remove'; | ||
declare type GroupingInstance<TData extends RowData> = { | ||
interface GroupingInstance<TData extends RowData> { | ||
setGrouping: (updater: Updater<GroupingState>) => void; | ||
@@ -411,3 +420,3 @@ resetGrouping: (defaultState?: boolean) => void; | ||
_getGroupedRowModel?: () => RowModel<TData>; | ||
}; | ||
} | ||
declare const Grouping: TableFeature; | ||
@@ -418,6 +427,6 @@ declare function orderColumns<TData extends RowData>(leafColumns: Column<TData, unknown>[], grouping: string[], groupedColumnMode?: GroupingColumnMode): Column<TData, unknown>[]; | ||
declare type ExpandedState = true | Record<string, boolean>; | ||
declare type ExpandedTableState = { | ||
interface ExpandedTableState { | ||
expanded: ExpandedState; | ||
}; | ||
declare type ExpandedRow = { | ||
} | ||
interface ExpandedRow { | ||
toggleExpanded: (expanded?: boolean) => void; | ||
@@ -427,4 +436,4 @@ getIsExpanded: () => boolean; | ||
getToggleExpandedHandler: () => () => void; | ||
}; | ||
declare type ExpandedOptions<TData extends RowData> = { | ||
} | ||
interface ExpandedOptions<TData extends RowData> { | ||
manualExpanding?: boolean; | ||
@@ -438,4 +447,4 @@ onExpandedChange?: OnChangeFn<ExpandedState>; | ||
paginateExpandedRows?: boolean; | ||
}; | ||
declare type ExpandedInstance<TData extends RowData> = { | ||
} | ||
interface ExpandedInstance<TData extends RowData> { | ||
_autoResetExpanded: () => void; | ||
@@ -453,11 +462,11 @@ setExpanded: (updater: Updater<ExpandedState>) => void; | ||
getPreExpandedRowModel: () => RowModel<TData>; | ||
}; | ||
} | ||
declare const Expanding: TableFeature; | ||
declare type ColumnSizingTableState = { | ||
interface ColumnSizingTableState { | ||
columnSizing: ColumnSizingState; | ||
columnSizingInfo: ColumnSizingInfoState; | ||
}; | ||
} | ||
declare type ColumnSizingState = Record<string, number>; | ||
declare type ColumnSizingInfoState = { | ||
interface ColumnSizingInfoState { | ||
startOffset: null | number; | ||
@@ -469,5 +478,5 @@ startSize: null | number; | ||
columnSizingStart: [string, number][]; | ||
}; | ||
} | ||
declare type ColumnResizeMode = 'onChange' | 'onEnd'; | ||
declare type ColumnSizingOptions = { | ||
interface ColumnSizingOptions { | ||
enableColumnResizing?: boolean; | ||
@@ -477,9 +486,9 @@ columnResizeMode?: ColumnResizeMode; | ||
onColumnSizingInfoChange?: OnChangeFn<ColumnSizingInfoState>; | ||
}; | ||
declare type ColumnSizingDefaultOptions = { | ||
} | ||
interface ColumnSizingDefaultOptions { | ||
columnResizeMode: ColumnResizeMode; | ||
onColumnSizingChange: OnChangeFn<ColumnSizingState>; | ||
onColumnSizingInfoChange: OnChangeFn<ColumnSizingInfoState>; | ||
}; | ||
declare type ColumnSizingInstance = { | ||
} | ||
interface ColumnSizingInstance { | ||
setColumnSizing: (updater: Updater<ColumnSizingState>) => void; | ||
@@ -493,4 +502,4 @@ setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void; | ||
getRightTotalSize: () => number; | ||
}; | ||
declare type ColumnSizingColumnDef = { | ||
} | ||
interface ColumnSizingColumnDef { | ||
enableResizing?: boolean; | ||
@@ -500,4 +509,4 @@ size?: number; | ||
maxSize?: number; | ||
}; | ||
declare type ColumnSizingColumn = { | ||
} | ||
interface ColumnSizingColumn { | ||
getSize: () => number; | ||
@@ -508,8 +517,8 @@ getStart: (position?: ColumnPinningPosition) => number; | ||
resetSize: () => void; | ||
}; | ||
declare type ColumnSizingHeader = { | ||
} | ||
interface ColumnSizingHeader { | ||
getSize: () => number; | ||
getStart: (position?: ColumnPinningPosition) => number; | ||
getResizeHandler: () => (event: unknown) => void; | ||
}; | ||
} | ||
declare const defaultColumnSizing: { | ||
@@ -523,13 +532,13 @@ size: number; | ||
declare type PaginationState = { | ||
interface PaginationState { | ||
pageIndex: number; | ||
pageSize: number; | ||
}; | ||
declare type PaginationTableState = { | ||
} | ||
interface PaginationTableState { | ||
pagination: PaginationState; | ||
}; | ||
declare type PaginationInitialTableState = { | ||
} | ||
interface PaginationInitialTableState { | ||
pagination?: Partial<PaginationState>; | ||
}; | ||
declare type PaginationOptions = { | ||
} | ||
interface PaginationOptions { | ||
pageCount?: number; | ||
@@ -540,7 +549,7 @@ manualPagination?: boolean; | ||
getPaginationRowModel?: (table: Table<any>) => () => RowModel<any>; | ||
}; | ||
declare type PaginationDefaultOptions = { | ||
} | ||
interface PaginationDefaultOptions { | ||
onPaginationChange: OnChangeFn<PaginationState>; | ||
}; | ||
declare type PaginationInstance<TData extends RowData> = { | ||
} | ||
interface PaginationInstance<TData extends RowData> { | ||
_autoResetPageIndex: () => void; | ||
@@ -563,10 +572,10 @@ setPagination: (updater: Updater<PaginationState>) => void; | ||
getPageCount: () => number; | ||
}; | ||
} | ||
declare const Pagination: TableFeature; | ||
declare type RowSelectionState = Record<string, boolean>; | ||
declare type RowSelectionTableState = { | ||
interface RowSelectionTableState { | ||
rowSelection: RowSelectionState; | ||
}; | ||
declare type RowSelectionOptions<TData extends RowData> = { | ||
} | ||
interface RowSelectionOptions<TData extends RowData> { | ||
enableRowSelection?: boolean | ((row: Row<TData>) => boolean); | ||
@@ -576,4 +585,4 @@ enableMultiRowSelection?: boolean | ((row: Row<TData>) => boolean); | ||
onRowSelectionChange?: OnChangeFn<RowSelectionState>; | ||
}; | ||
declare type RowSelectionRow = { | ||
} | ||
interface RowSelectionRow { | ||
getIsSelected: () => boolean; | ||
@@ -587,4 +596,4 @@ getIsSomeSelected: () => boolean; | ||
getToggleSelectedHandler: () => (event: unknown) => void; | ||
}; | ||
declare type RowSelectionInstance<TData extends RowData> = { | ||
} | ||
interface RowSelectionInstance<TData extends RowData> { | ||
getToggleAllRowsSelectedHandler: () => (event: unknown) => void; | ||
@@ -604,3 +613,3 @@ getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void; | ||
getGroupedSelectedRowModel: () => RowModel<TData>; | ||
}; | ||
} | ||
declare const RowSelection: TableFeature; | ||
@@ -611,3 +620,3 @@ declare function selectRowsFn<TData extends RowData>(table: Table<TData>, rowModel: RowModel<TData>): RowModel<TData>; | ||
declare type CoreRow<TData extends RowData> = { | ||
interface CoreRow<TData extends RowData> { | ||
id: string; | ||
@@ -627,6 +636,6 @@ index: number; | ||
_getAllCellsByColumnId: () => Record<string, Cell<TData, unknown>>; | ||
}; | ||
} | ||
declare const createRow: <TData extends unknown>(table: Table<TData>, id: string, original: TData, rowIndex: number, depth: number, subRows?: Row<TData>[] | undefined) => Row<TData>; | ||
declare type CellContext<TData extends RowData, TValue> = { | ||
interface CellContext<TData extends RowData, TValue> { | ||
table: Table<TData>; | ||
@@ -638,4 +647,4 @@ column: Column<TData, TValue>; | ||
renderValue: Getter<TValue | null>; | ||
}; | ||
declare type CoreCell<TData extends RowData, TValue> = { | ||
} | ||
interface CoreCell<TData extends RowData, TValue> { | ||
id: string; | ||
@@ -647,6 +656,6 @@ getValue: CellContext<TData, TValue>['getValue']; | ||
getContext: () => CellContext<TData, TValue>; | ||
}; | ||
} | ||
declare function createCell<TData extends RowData, TValue>(table: Table<TData>, row: Row<TData>, column: Column<TData, TValue>, columnId: string): Cell<TData, TValue>; | ||
declare type CoreColumn<TData extends RowData, TValue> = { | ||
interface CoreColumn<TData extends RowData, TValue> { | ||
id: string; | ||
@@ -660,3 +669,3 @@ depth: number; | ||
getLeafColumns: () => Column<TData, TValue>[]; | ||
}; | ||
} | ||
declare function createColumn<TData extends RowData, TValue>(table: Table<TData>, columnDef: ColumnDef<TData, TValue>, depth: number, parent?: Column<TData, TValue>): Column<TData, TValue>; | ||
@@ -680,26 +689,37 @@ | ||
declare type AnyRender = (Comp: any, props: any) => any; | ||
declare type Table<TData extends RowData> = CoreInstance<TData> & HeadersInstance<TData> & VisibilityInstance<TData> & ColumnOrderInstance<TData> & ColumnPinningInstance<TData> & FiltersInstance<TData> & SortingInstance<TData> & GroupingInstance<TData> & ColumnSizingInstance & ExpandedInstance<TData> & PaginationInstance<TData> & RowSelectionInstance<TData>; | ||
declare type TableOptionsResolved<TData extends RowData> = CoreOptions<TData> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TData> & SortingOptions<TData> & GroupingOptions & ExpandedOptions<TData> & ColumnSizingOptions & PaginationOptions & RowSelectionOptions<TData>; | ||
declare type TableOptions<TData extends RowData> = PartialKeys<TableOptionsResolved<TData>, 'state' | 'onStateChange' | 'renderFallbackValue'>; | ||
declare type TableState = CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState; | ||
declare type InitialTableState = Partial<CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationInitialTableState & RowSelectionTableState>; | ||
declare type Row<TData extends RowData> = CoreRow<TData> & VisibilityRow<TData> & ColumnPinningRow<TData> & FiltersRow<TData> & GroupingRow & RowSelectionRow & ExpandedRow; | ||
declare type RowModel<TData extends RowData> = { | ||
interface Table<TData extends RowData> extends CoreInstance<TData>, HeadersInstance<TData>, VisibilityInstance<TData>, ColumnOrderInstance<TData>, ColumnPinningInstance<TData>, FiltersInstance<TData>, SortingInstance<TData>, GroupingInstance<TData>, ColumnSizingInstance, ExpandedInstance<TData>, PaginationInstance<TData>, RowSelectionInstance<TData> { | ||
} | ||
interface FeatureOptions<TData extends RowData> extends VisibilityOptions, ColumnOrderOptions, ColumnPinningOptions, FiltersOptions<TData>, SortingOptions<TData>, GroupingOptions, ExpandedOptions<TData>, ColumnSizingOptions, PaginationOptions, RowSelectionOptions<TData> { | ||
} | ||
declare type TableOptionsResolved<TData extends RowData> = CoreOptions<TData> & FeatureOptions<TData>; | ||
interface TableOptions<TData extends RowData> extends PartialKeys<TableOptionsResolved<TData>, 'state' | 'onStateChange' | 'renderFallbackValue'> { | ||
} | ||
interface TableState extends CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, FiltersTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationTableState, RowSelectionTableState { | ||
} | ||
interface CompleteInitialTableState extends CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, FiltersTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationInitialTableState, RowSelectionTableState { | ||
} | ||
interface InitialTableState extends Partial<CompleteInitialTableState> { | ||
} | ||
interface Row<TData extends RowData> extends CoreRow<TData>, VisibilityRow<TData>, ColumnPinningRow<TData>, FiltersRow<TData>, GroupingRow, RowSelectionRow, ExpandedRow { | ||
} | ||
interface RowModel<TData extends RowData> { | ||
rows: Row<TData>[]; | ||
flatRows: Row<TData>[]; | ||
rowsById: Record<string, Row<TData>>; | ||
}; | ||
} | ||
declare type AccessorFn<TData extends RowData, TValue = unknown> = (originalRow: TData, index: number) => TValue; | ||
declare type ColumnDefTemplate<TProps extends object> = string | ((props: TProps) => any); | ||
declare type StringOrTemplateHeader<TData, TValue> = string | ColumnDefTemplate<HeaderContext<TData, TValue>>; | ||
declare type StringHeaderIdentifier = { | ||
interface StringHeaderIdentifier { | ||
header: string; | ||
id?: string; | ||
}; | ||
declare type IdIdentifier<TData extends RowData, TValue> = { | ||
} | ||
interface IdIdentifier<TData extends RowData, TValue> { | ||
id: string; | ||
header?: StringOrTemplateHeader<TData, TValue>; | ||
}; | ||
} | ||
declare type ColumnIdentifiers<TData extends RowData, TValue> = IdIdentifier<TData, TValue> | StringHeaderIdentifier; | ||
declare type ColumnDefBase<TData extends RowData, TValue = unknown> = { | ||
interface ColumnDefExtensions<TData extends RowData, TValue = unknown> extends VisibilityColumnDef, ColumnPinningColumnDef, FiltersColumnDef<TData>, SortingColumnDef<TData>, GroupingColumnDef<TData, TValue>, ColumnSizingColumnDef { | ||
} | ||
interface ColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefExtensions<TData, TValue> { | ||
getUniqueValues?: AccessorFn<TData, unknown[]>; | ||
@@ -709,19 +729,21 @@ footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>; | ||
meta?: ColumnMeta<TData, TValue>; | ||
} & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TData> & SortingColumnDef<TData> & GroupingColumnDef<TData, TValue> & ColumnSizingColumnDef; | ||
declare type IdentifiedColumnDef<TData extends RowData, TValue = unknown> = ColumnDefBase<TData, TValue> & { | ||
} | ||
interface IdentifiedColumnDef<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> { | ||
id?: string; | ||
header?: StringOrTemplateHeader<TData, TValue>; | ||
}; | ||
} | ||
declare type DisplayColumnDef<TData extends RowData, TValue = unknown> = ColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>; | ||
declare type GroupColumnDef<TData extends RowData, TValue = unknown> = ColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue> & { | ||
interface GroupColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> { | ||
columns?: ColumnDef<TData, any>[]; | ||
}; | ||
declare type AccessorFnColumnDef<TData extends RowData, TValue = unknown> = ColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue> & { | ||
} | ||
declare type GroupColumnDef<TData extends RowData, TValue = unknown> = GroupColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>; | ||
interface AccessorFnColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> { | ||
accessorFn: AccessorFn<TData, TValue>; | ||
}; | ||
declare type AccessorKeyColumnDef<TData extends RowData, TValue = unknown> = { | ||
} | ||
declare type AccessorFnColumnDef<TData extends RowData, TValue = unknown> = AccessorFnColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>; | ||
interface AccessorKeyColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> { | ||
id?: string; | ||
} & Partial<ColumnIdentifiers<TData, TValue>> & ColumnDefBase<TData, TValue> & { | ||
accessorKey: string | keyof TData; | ||
}; | ||
} | ||
declare type AccessorKeyColumnDef<TData extends RowData, TValue = unknown> = AccessorKeyColumnDefBase<TData, TValue> & Partial<ColumnIdentifiers<TData, TValue>>; | ||
declare type AccessorColumnDef<TData extends RowData, TValue = unknown> = AccessorKeyColumnDef<TData, TValue> | AccessorFnColumnDef<TData, TValue>; | ||
@@ -732,9 +754,15 @@ declare type ColumnDef<TData extends RowData, TValue = unknown> = DisplayColumnDef<TData, TValue> | GroupColumnDef<TData, TValue> | AccessorColumnDef<TData, TValue>; | ||
}; | ||
declare type Column<TData extends RowData, TValue = unknown> = CoreColumn<TData, TValue> & VisibilityColumn & ColumnPinningColumn & FiltersColumn<TData> & SortingColumn<TData> & GroupingColumn<TData> & ColumnSizingColumn; | ||
declare type Cell<TData extends RowData, TValue> = CoreCell<TData, TValue> & GroupingCell; | ||
declare type Header<TData extends RowData, TValue> = CoreHeader<TData, TValue> & ColumnSizingHeader; | ||
declare type HeaderGroup<TData extends RowData> = CoreHeaderGroup<TData>; | ||
interface Column<TData extends RowData, TValue = unknown> extends CoreColumn<TData, TValue>, VisibilityColumn, ColumnPinningColumn, FiltersColumn<TData>, SortingColumn<TData>, GroupingColumn<TData>, ColumnSizingColumn { | ||
} | ||
interface Cell<TData extends RowData, TValue> extends CoreCell<TData, TValue>, GroupingCell { | ||
} | ||
interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader { | ||
} | ||
interface HeaderGroup<TData extends RowData> extends CoreHeaderGroup<TData> { | ||
} | ||
declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>; | ||
declare type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>; | ||
declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<T>; | ||
declare type RequiredKeys<T, K extends keyof T> = T & { | ||
[P in K]-?: T[P]; | ||
}; | ||
declare type Overwrite<T, U extends { | ||
@@ -746,11 +774,34 @@ [TKey in keyof T]?: any; | ||
declare type IsKnown<T, Y, N> = unknown extends T ? N : Y; | ||
declare type ComputeRange<N extends number, Result extends Array<unknown> = []> = Result['length'] extends N ? Result : ComputeRange<N, [...Result, Result['length']]>; | ||
declare type Index40 = ComputeRange<40>[number]; | ||
declare type IsTuple<T> = T extends readonly any[] & { | ||
length: infer Length; | ||
} ? Length extends Index40 ? T : never : never; | ||
declare type AllowedIndexes<Tuple extends ReadonlyArray<any>, Keys extends number = never> = Tuple extends readonly [] ? Keys : Tuple extends readonly [infer _, ...infer Tail] ? AllowedIndexes<Tail, Keys | Tail['length']> : Keys; | ||
declare type DeepKeys<T> = unknown extends T ? keyof T : object extends T ? string : T extends readonly any[] & IsTuple<T> ? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>> : T extends any[] ? never & 'Dynamic length array indexing is not supported' : T extends Date ? never : T extends object ? (keyof T & string) | DeepKeysPrefix<T, keyof T> : never; | ||
declare type DeepKeysPrefix<T, TPrefix> = TPrefix extends keyof T & (number | string) ? `${TPrefix}.${DeepKeys<T[TPrefix]> & string}` : never; | ||
declare type DeepValue<T, TProp> = T extends Record<string | number, any> ? TProp extends `${infer TBranch}.${infer TDeepProp}` ? DeepValue<T[TBranch], TDeepProp> : T[TProp & string] : never; | ||
declare type IndexableData = Record<string | number, any>; | ||
declare type DeepValue<T, TProp> = T extends IndexableData ? TProp extends `${infer TBranch}.${infer TDeepProp}` ? DeepValue<T[TBranch], TDeepProp> : TProp extends keyof T ? T[TProp] : never : never; | ||
declare type Join<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never; | ||
declare type Prev = [ | ||
never, | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9, | ||
10, | ||
11, | ||
12, | ||
13, | ||
14, | ||
15, | ||
16, | ||
17, | ||
18, | ||
19, | ||
20, | ||
...0[] | ||
]; | ||
declare type ExplicitLeaves = Date | Number | BigInt | String | Set<unknown> | Map<unknown, unknown> | WeakSet<object> | WeakMap<object, unknown>; | ||
declare type DeepKeys<T, D extends number = 10> = [D] extends [never] ? never : T extends ExplicitLeaves ? never : T extends object ? { | ||
[K in keyof T]-?: K extends string | number ? `${K}` | Join<K, DeepKeys<T[K], Prev[D]>> : never; | ||
}[keyof T] : ''; | ||
declare type NoInfer<T> = [T][T extends any ? 0 : never]; | ||
@@ -770,3 +821,3 @@ declare type Getter<TValue> = <TTValue = TValue>() => NoInfer<TTValue>; | ||
declare type TableFeature = { | ||
interface TableFeature { | ||
getDefaultOptions?: (table: any) => any; | ||
@@ -780,5 +831,6 @@ getInitialState?: (initialState?: InitialTableState) => any; | ||
createRow?: (row: any, table: any) => any; | ||
}; | ||
declare type CoreTableState = {}; | ||
declare type CoreOptions<TData extends RowData> = { | ||
} | ||
interface CoreTableState { | ||
} | ||
interface CoreOptions<TData extends RowData> { | ||
data: TData[]; | ||
@@ -802,4 +854,4 @@ state: Partial<TableState>; | ||
renderFallbackValue: any; | ||
}; | ||
declare type CoreInstance<TData extends RowData> = { | ||
} | ||
interface CoreInstance<TData extends RowData> { | ||
initialState: TableState; | ||
@@ -825,10 +877,12 @@ reset: () => void; | ||
getColumn: (columnId: string) => Column<TData, unknown>; | ||
}; | ||
} | ||
declare function createTable<TData extends RowData>(options: TableOptionsResolved<TData>): Table<TData>; | ||
declare type ColumnHelper<TData extends RowData> = { | ||
accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TData, TValue> : IdentifiedColumnDef<TData, TValue>) => ColumnDef<TData, TValue>; | ||
display: (column: DisplayColumnDef<TData>) => ColumnDef<TData, unknown>; | ||
group: (column: GroupColumnDef<TData>) => ColumnDef<TData, unknown>; | ||
}; | ||
declare type AccessorType<TData, TAccessor> = TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : DeepValue<TData, TAccessor>; | ||
declare type Accessor<TData extends RowData> = <TAccessor extends AccessorFn<TData> | string, TValue extends AccessorType<TData, TAccessor>>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TData, TValue> : IdentifiedColumnDef<TData, TValue>) => TValue extends never ? never : AccessorColumnDef<TData, AccessorType<TData, TAccessor>>; | ||
interface ColumnHelper<TData extends RowData> { | ||
accessor: Accessor<TData>; | ||
display: (column: DisplayColumnDef<TData>) => DisplayColumnDef<TData>; | ||
group: (column: GroupColumnDef<TData>) => GroupColumnDef<TData>; | ||
} | ||
declare function createColumnHelper<TData extends RowData>(): ColumnHelper<TData>; | ||
@@ -835,0 +889,0 @@ |
{ | ||
"name": "@tanstack/table-core", | ||
"author": "Tanner Linsley", | ||
"version": "8.5.19", | ||
"version": "8.5.20", | ||
"description": "Headless UI for building powerful tables & datagrids for TS/JS.", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
import { | ||
AccessorColumnDef, | ||
AccessorFn, | ||
ColumnDef, | ||
DisplayColumnDef, | ||
@@ -9,3 +9,3 @@ GroupColumnDef, | ||
} from './types' | ||
import { DeepKeys, DeepValue, RequiredKeys } from './utils' | ||
import { DeepValue } from './utils' | ||
@@ -53,18 +53,25 @@ // type Person = { | ||
export type ColumnHelper<TData extends RowData> = { | ||
accessor: < | ||
TAccessor extends AccessorFn<TData> | DeepKeys<TData>, | ||
TValue extends TAccessor extends AccessorFn<TData, infer TReturn> | ||
? TReturn | ||
: TAccessor extends DeepKeys<TData> | ||
? DeepValue<TData, TAccessor> | ||
: never | ||
>( | ||
accessor: TAccessor, | ||
column: TAccessor extends AccessorFn<TData> | ||
? DisplayColumnDef<TData, TValue> | ||
: IdentifiedColumnDef<TData, TValue> | ||
) => ColumnDef<TData, TValue> | ||
display: (column: DisplayColumnDef<TData>) => ColumnDef<TData, unknown> | ||
group: (column: GroupColumnDef<TData>) => ColumnDef<TData, unknown> | ||
type AccessorType<TData, TAccessor> = TAccessor extends AccessorFn< | ||
TData, | ||
infer TReturn | ||
> | ||
? TReturn | ||
: DeepValue<TData, TAccessor> | ||
type Accessor<TData extends RowData> = < | ||
TAccessor extends AccessorFn<TData> | string, | ||
TValue extends AccessorType<TData, TAccessor> | ||
>( | ||
accessor: TAccessor, | ||
column: TAccessor extends AccessorFn<TData> | ||
? DisplayColumnDef<TData, TValue> | ||
: IdentifiedColumnDef<TData, TValue> | ||
) => TValue extends never | ||
? never | ||
: AccessorColumnDef<TData, AccessorType<TData, TAccessor>> | ||
export interface ColumnHelper<TData extends RowData> { | ||
accessor: Accessor<TData> | ||
display: (column: DisplayColumnDef<TData>) => DisplayColumnDef<TData> | ||
group: (column: GroupColumnDef<TData>) => GroupColumnDef<TData> | ||
} | ||
@@ -87,5 +94,5 @@ | ||
}, | ||
display: column => column as ColumnDef<TData, unknown>, | ||
group: column => column as ColumnDef<TData, unknown>, | ||
display: column => column as DisplayColumnDef<TData>, | ||
group: column => column as GroupColumnDef<TData>, | ||
} | ||
} |
import { RowData, Cell, Column, Row, Table } from '../types' | ||
import { Getter, memo } from '../utils' | ||
export type CellContext<TData extends RowData, TValue> = { | ||
export interface CellContext<TData extends RowData, TValue> { | ||
table: Table<TData> | ||
@@ -13,3 +13,3 @@ column: Column<TData, TValue> | ||
export type CoreCell<TData extends RowData, TValue> = { | ||
export interface CoreCell<TData extends RowData, TValue> { | ||
id: string | ||
@@ -28,3 +28,3 @@ getValue: CellContext<TData, TValue>['getValue'] | ||
columnId: string | ||
) { | ||
): Cell<TData, TValue> { | ||
const getRenderValue = () => | ||
@@ -31,0 +31,0 @@ cell.getValue() ?? table.options.renderFallbackValue |
@@ -1,2 +0,1 @@ | ||
import { TaggedTemplateExpression } from '@babel/types' | ||
import { | ||
@@ -7,5 +6,3 @@ Column, | ||
ColumnDef, | ||
ColumnDefTemplate, | ||
RowData, | ||
ColumnMeta, | ||
ColumnDefResolved, | ||
@@ -15,3 +12,3 @@ } from '../types' | ||
export type CoreColumn<TData extends RowData, TValue> = { | ||
export interface CoreColumn<TData extends RowData, TValue> { | ||
id: string | ||
@@ -32,3 +29,3 @@ depth: number | ||
parent?: Column<TData, TValue> | ||
) { | ||
): Column<TData, TValue> { | ||
const defaultColumn = table._getDefaultColumnDef() | ||
@@ -35,0 +32,0 @@ |
@@ -5,3 +5,3 @@ import { RowData, Column, Header, HeaderGroup, Table } from '../types' | ||
export type CoreHeaderGroup<TData extends RowData> = { | ||
export interface CoreHeaderGroup<TData extends RowData> { | ||
id: string | ||
@@ -12,3 +12,3 @@ depth: number | ||
export type HeaderContext<TData, TValue> = { | ||
export interface HeaderContext<TData, TValue> { | ||
table: Table<TData> | ||
@@ -19,3 +19,3 @@ header: Header<TData, TValue> | ||
export type CoreHeader<TData extends RowData, TValue> = { | ||
export interface CoreHeader<TData extends RowData, TValue> { | ||
id: string | ||
@@ -35,3 +35,3 @@ index: number | ||
export type HeadersInstance<TData extends RowData> = { | ||
export interface HeadersInstance<TData extends RowData> { | ||
getHeaderGroups: () => HeaderGroup<TData>[] | ||
@@ -70,3 +70,3 @@ getLeftHeaderGroups: () => HeaderGroup<TData>[] | ||
} | ||
) { | ||
): Header<TData, TValue> { | ||
const id = options.id ?? column.id | ||
@@ -73,0 +73,0 @@ |
@@ -5,3 +5,3 @@ import { RowData, Cell, Row, Table } from '../types' | ||
export type CoreRow<TData extends RowData> = { | ||
export interface CoreRow<TData extends RowData> { | ||
id: string | ||
@@ -8,0 +8,0 @@ index: number |
@@ -1,2 +0,2 @@ | ||
import { flattenBy, functionalUpdate, memo, RequiredKeys } from '../utils' | ||
import { functionalUpdate, memo, RequiredKeys } from '../utils' | ||
@@ -8,3 +8,2 @@ import { | ||
Table, | ||
ColumnDefTemplate, | ||
InitialTableState, | ||
@@ -30,3 +29,3 @@ Row, | ||
import { Filters } from '../features/Filters' | ||
import { Grouping, GroupingColumnDef } from '../features/Grouping' | ||
import { Grouping } from '../features/Grouping' | ||
import { Ordering } from '../features/Ordering' | ||
@@ -39,3 +38,3 @@ import { Pagination } from '../features/Pagination' | ||
export type TableFeature = { | ||
export interface TableFeature { | ||
getDefaultOptions?: (table: any) => any | ||
@@ -67,5 +66,5 @@ getInitialState?: (initialState?: InitialTableState) => any | ||
export type CoreTableState = {} | ||
export interface CoreTableState {} | ||
export type CoreOptions<TData extends RowData> = { | ||
export interface CoreOptions<TData extends RowData> { | ||
data: TData[] | ||
@@ -94,3 +93,3 @@ state: Partial<TableState> | ||
export type CoreInstance<TData extends RowData> = { | ||
export interface CoreInstance<TData extends RowData> { | ||
initialState: TableState | ||
@@ -97,0 +96,0 @@ reset: () => void |
@@ -8,3 +8,3 @@ import { TableFeature } from '../core/table' | ||
export type ColumnSizingTableState = { | ||
export interface ColumnSizingTableState { | ||
columnSizing: ColumnSizingState | ||
@@ -16,3 +16,3 @@ columnSizingInfo: ColumnSizingInfoState | ||
export type ColumnSizingInfoState = { | ||
export interface ColumnSizingInfoState { | ||
startOffset: null | number | ||
@@ -28,3 +28,3 @@ startSize: null | number | ||
export type ColumnSizingOptions = { | ||
export interface ColumnSizingOptions { | ||
enableColumnResizing?: boolean | ||
@@ -36,3 +36,3 @@ columnResizeMode?: ColumnResizeMode | ||
export type ColumnSizingDefaultOptions = { | ||
export interface ColumnSizingDefaultOptions { | ||
columnResizeMode: ColumnResizeMode | ||
@@ -43,3 +43,3 @@ onColumnSizingChange: OnChangeFn<ColumnSizingState> | ||
export type ColumnSizingInstance = { | ||
export interface ColumnSizingInstance { | ||
setColumnSizing: (updater: Updater<ColumnSizingState>) => void | ||
@@ -55,3 +55,3 @@ setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void | ||
export type ColumnSizingColumnDef = { | ||
export interface ColumnSizingColumnDef { | ||
enableResizing?: boolean | ||
@@ -63,3 +63,3 @@ size?: number | ||
export type ColumnSizingColumn = { | ||
export interface ColumnSizingColumn { | ||
getSize: () => number | ||
@@ -72,3 +72,3 @@ getStart: (position?: ColumnPinningPosition) => number | ||
export type ColumnSizingHeader = { | ||
export interface ColumnSizingHeader { | ||
getSize: () => number | ||
@@ -75,0 +75,0 @@ getStart: (position?: ColumnPinningPosition) => number |
@@ -8,7 +8,7 @@ import { RowModel } from '..' | ||
export type ExpandedState = true | Record<string, boolean> | ||
export type ExpandedTableState = { | ||
export interface ExpandedTableState { | ||
expanded: ExpandedState | ||
} | ||
export type ExpandedRow = { | ||
export interface ExpandedRow { | ||
toggleExpanded: (expanded?: boolean) => void | ||
@@ -20,3 +20,3 @@ getIsExpanded: () => boolean | ||
export type ExpandedOptions<TData extends RowData> = { | ||
export interface ExpandedOptions<TData extends RowData> { | ||
manualExpanding?: boolean | ||
@@ -32,3 +32,3 @@ onExpandedChange?: OnChangeFn<ExpandedState> | ||
export type ExpandedInstance<TData extends RowData> = { | ||
export interface ExpandedInstance<TData extends RowData> { | ||
_autoResetExpanded: () => void | ||
@@ -35,0 +35,0 @@ setExpanded: (updater: Updater<ExpandedState>) => void |
@@ -16,3 +16,3 @@ import { RowModel } from '..' | ||
export type FiltersTableState = { | ||
export interface FiltersTableState { | ||
columnFilters: ColumnFiltersState | ||
@@ -24,3 +24,3 @@ globalFilter: any | ||
export type ColumnFilter = { | ||
export interface ColumnFilter { | ||
id: string | ||
@@ -30,3 +30,3 @@ value: unknown | ||
export type ResolvedColumnFilter<TData extends RowData> = { | ||
export interface ResolvedColumnFilter<TData extends RowData> { | ||
id: string | ||
@@ -37,3 +37,3 @@ resolvedValue: unknown | ||
export type FilterFn<TData extends RowData> = { | ||
export interface FilterFn<TData extends RowData> { | ||
( | ||
@@ -71,3 +71,3 @@ row: Row<TData>, | ||
export type FiltersColumnDef<TData extends RowData> = { | ||
export interface FiltersColumnDef<TData extends RowData> { | ||
filterFn?: FilterFnOption<TData> | ||
@@ -78,3 +78,3 @@ enableColumnFilter?: boolean | ||
export type FiltersColumn<TData extends RowData> = { | ||
export interface FiltersColumn<TData extends RowData> { | ||
getAutoFilterFn: () => FilterFn<TData> | undefined | ||
@@ -96,3 +96,3 @@ getFilterFn: () => FilterFn<TData> | undefined | ||
export type FiltersRow<TData extends RowData> = { | ||
export interface FiltersRow<TData extends RowData> { | ||
columnFilters: Record<string, boolean> | ||
@@ -102,3 +102,3 @@ columnFiltersMeta: Record<string, FilterMeta> | ||
export type FiltersOptions<TData extends RowData> = { | ||
interface FiltersOptionsBase<TData extends RowData> { | ||
enableFilters?: boolean | ||
@@ -132,3 +132,5 @@ manualFiltering?: boolean | ||
) => () => undefined | [number, number] | ||
} & (keyof FilterFns extends never | ||
} | ||
type ResolvedFilterFns = keyof FilterFns extends never | ||
? { | ||
@@ -139,5 +141,9 @@ filterFns?: Record<string, FilterFn<any>> | ||
filterFns: Record<keyof FilterFns, FilterFn<any>> | ||
}) | ||
} | ||
export type FiltersInstance<TData extends RowData> = { | ||
export interface FiltersOptions<TData extends RowData> | ||
extends FiltersOptionsBase<TData>, | ||
ResolvedFilterFns {} | ||
export interface FiltersInstance<TData extends RowData> { | ||
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void | ||
@@ -144,0 +150,0 @@ |
@@ -19,3 +19,3 @@ import { RowModel } from '..' | ||
export type GroupingTableState = { | ||
export interface GroupingTableState { | ||
grouping: GroupingState | ||
@@ -38,3 +38,3 @@ } | ||
export type GroupingColumnDef<TData extends RowData, TValue> = { | ||
export interface GroupingColumnDef<TData extends RowData, TValue> { | ||
aggregationFn?: AggregationFnOption<TData> | ||
@@ -47,3 +47,3 @@ aggregatedCell?: ColumnDefTemplate< | ||
export type GroupingColumn<TData extends RowData> = { | ||
export interface GroupingColumn<TData extends RowData> { | ||
getCanGroup: () => boolean | ||
@@ -58,3 +58,3 @@ getIsGrouped: () => boolean | ||
export type GroupingRow = { | ||
export interface GroupingRow { | ||
groupingColumnId?: string | ||
@@ -66,3 +66,3 @@ groupingValue?: unknown | ||
export type GroupingCell = { | ||
export interface GroupingCell { | ||
getIsGrouped: () => boolean | ||
@@ -73,3 +73,3 @@ getIsPlaceholder: () => boolean | ||
export type ColumnDefaultOptions = { | ||
export interface ColumnDefaultOptions { | ||
// Column | ||
@@ -80,3 +80,3 @@ onGroupingChange: OnChangeFn<GroupingState> | ||
export type GroupingOptions = { | ||
interface GroupingOptionsBase { | ||
manualGrouping?: boolean | ||
@@ -87,3 +87,5 @@ onGroupingChange?: OnChangeFn<GroupingState> | ||
groupedColumnMode?: false | 'reorder' | 'remove' | ||
} & (keyof AggregationFns extends never | ||
} | ||
type ResolvedAggregationFns = keyof AggregationFns extends never | ||
? { | ||
@@ -94,7 +96,11 @@ aggregationFns?: Record<string, AggregationFn<any>> | ||
aggregationFns: Record<keyof AggregationFns, AggregationFn<any>> | ||
}) | ||
} | ||
export interface GroupingOptions | ||
extends GroupingOptionsBase, | ||
ResolvedAggregationFns {} | ||
export type GroupingColumnMode = false | 'reorder' | 'remove' | ||
export type GroupingInstance<TData extends RowData> = { | ||
export interface GroupingInstance<TData extends RowData> { | ||
setGrouping: (updater: Updater<GroupingState>) => void | ||
@@ -101,0 +107,0 @@ resetGrouping: (defaultState?: boolean) => void |
@@ -5,6 +5,6 @@ import { makeStateUpdater, memo } from '../utils' | ||
import { Grouping, orderColumns } from './Grouping' | ||
import { orderColumns } from './Grouping' | ||
import { TableFeature } from '../core/table' | ||
export type ColumnOrderTableState = { | ||
export interface ColumnOrderTableState { | ||
columnOrder: ColumnOrderState | ||
@@ -15,11 +15,11 @@ } | ||
export type ColumnOrderOptions = { | ||
export interface ColumnOrderOptions { | ||
onColumnOrderChange?: OnChangeFn<ColumnOrderState> | ||
} | ||
export type ColumnOrderDefaultOptions = { | ||
export interface ColumnOrderDefaultOptions { | ||
onColumnOrderChange: OnChangeFn<ColumnOrderState> | ||
} | ||
export type ColumnOrderInstance<TData extends RowData> = { | ||
export interface ColumnOrderInstance<TData extends RowData> { | ||
setColumnOrder: (updater: Updater<ColumnOrderState>) => void | ||
@@ -26,0 +26,0 @@ resetColumnOrder: (defaultState?: boolean) => void |
@@ -5,3 +5,3 @@ import { TableFeature } from '../core/table' | ||
export type PaginationState = { | ||
export interface PaginationState { | ||
pageIndex: number | ||
@@ -11,11 +11,11 @@ pageSize: number | ||
export type PaginationTableState = { | ||
export interface PaginationTableState { | ||
pagination: PaginationState | ||
} | ||
export type PaginationInitialTableState = { | ||
export interface PaginationInitialTableState { | ||
pagination?: Partial<PaginationState> | ||
} | ||
export type PaginationOptions = { | ||
export interface PaginationOptions { | ||
pageCount?: number | ||
@@ -28,7 +28,7 @@ manualPagination?: boolean | ||
export type PaginationDefaultOptions = { | ||
export interface PaginationDefaultOptions { | ||
onPaginationChange: OnChangeFn<PaginationState> | ||
} | ||
export type PaginationInstance<TData extends RowData> = { | ||
export interface PaginationInstance<TData extends RowData> { | ||
_autoResetPageIndex: () => void | ||
@@ -35,0 +35,0 @@ setPagination: (updater: Updater<PaginationState>) => void |
@@ -15,3 +15,3 @@ import { TableFeature } from '../core/table' | ||
export type ColumnPinningState = { | ||
export interface ColumnPinningState { | ||
left?: string[] | ||
@@ -21,7 +21,7 @@ right?: string[] | ||
export type ColumnPinningTableState = { | ||
export interface ColumnPinningTableState { | ||
columnPinning: ColumnPinningState | ||
} | ||
export type ColumnPinningOptions = { | ||
export interface ColumnPinningOptions { | ||
onColumnPinningChange?: OnChangeFn<ColumnPinningState> | ||
@@ -31,11 +31,11 @@ enablePinning?: boolean | ||
export type ColumnPinningDefaultOptions = { | ||
export interface ColumnPinningDefaultOptions { | ||
onColumnPinningChange: OnChangeFn<ColumnPinningState> | ||
} | ||
export type ColumnPinningColumnDef = { | ||
export interface ColumnPinningColumnDef { | ||
enablePinning?: boolean | ||
} | ||
export type ColumnPinningColumn = { | ||
export interface ColumnPinningColumn { | ||
getCanPin: () => boolean | ||
@@ -47,3 +47,3 @@ getPinnedIndex: () => number | ||
export type ColumnPinningRow<TData extends RowData> = { | ||
export interface ColumnPinningRow<TData extends RowData> { | ||
getLeftVisibleCells: () => Cell<TData, unknown>[] | ||
@@ -54,3 +54,3 @@ getCenterVisibleCells: () => Cell<TData, unknown>[] | ||
export type ColumnPinningInstance<TData extends RowData> = { | ||
export interface ColumnPinningInstance<TData extends RowData> { | ||
setColumnPinning: (updater: Updater<ColumnPinningState>) => void | ||
@@ -57,0 +57,0 @@ resetColumnPinning: (defaultState?: boolean) => void |
@@ -7,7 +7,7 @@ import { TableFeature } from '../core/table' | ||
export type RowSelectionTableState = { | ||
export interface RowSelectionTableState { | ||
rowSelection: RowSelectionState | ||
} | ||
export type RowSelectionOptions<TData extends RowData> = { | ||
export interface RowSelectionOptions<TData extends RowData> { | ||
enableRowSelection?: boolean | ((row: Row<TData>) => boolean) | ||
@@ -30,3 +30,3 @@ enableMultiRowSelection?: boolean | ((row: Row<TData>) => boolean) | ||
export type RowSelectionRow = { | ||
export interface RowSelectionRow { | ||
getIsSelected: () => boolean | ||
@@ -42,3 +42,3 @@ getIsSomeSelected: () => boolean | ||
export type RowSelectionInstance<TData extends RowData> = { | ||
export interface RowSelectionInstance<TData extends RowData> { | ||
getToggleAllRowsSelectedHandler: () => (event: unknown) => void | ||
@@ -45,0 +45,0 @@ getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void |
@@ -23,3 +23,3 @@ import { RowModel } from '..' | ||
export type ColumnSort = { | ||
export interface ColumnSort { | ||
id: string | ||
@@ -31,7 +31,7 @@ desc: boolean | ||
export type SortingTableState = { | ||
export interface SortingTableState { | ||
sorting: SortingState | ||
} | ||
export type SortingFn<TData extends RowData> = { | ||
export interface SortingFn<TData extends RowData> { | ||
(rowA: Row<TData>, rowB: Row<TData>, columnId: string): number | ||
@@ -51,3 +51,3 @@ } | ||
export type SortingColumnDef<TData extends RowData> = { | ||
export interface SortingColumnDef<TData extends RowData> { | ||
sortingFn?: SortingFnOption<TData> | ||
@@ -61,3 +61,3 @@ sortDescFirst?: boolean | ||
export type SortingColumn<TData extends RowData> = { | ||
export interface SortingColumn<TData extends RowData> { | ||
getAutoSortingFn: () => SortingFn<TData> | ||
@@ -77,3 +77,3 @@ getAutoSortDir: () => SortDirection | ||
export type SortingOptions<TData extends RowData> = { | ||
interface SortingOptionsBase { | ||
manualSorting?: boolean | ||
@@ -89,3 +89,5 @@ onSortingChange?: OnChangeFn<SortingState> | ||
isMultiSortEvent?: (e: unknown) => boolean | ||
} & (keyof SortingFns extends never | ||
} | ||
type ResolvedSortingFns = keyof SortingFns extends never | ||
? { | ||
@@ -96,5 +98,9 @@ sortingFns?: Record<string, SortingFn<any>> | ||
sortingFns: Record<keyof SortingFns, SortingFn<any>> | ||
}) | ||
} | ||
export type SortingInstance<TData extends RowData> = { | ||
export interface SortingOptions<TData extends RowData> | ||
extends SortingOptionsBase, | ||
ResolvedSortingFns {} | ||
export interface SortingInstance<TData extends RowData> { | ||
setSorting: (updater: Updater<SortingState>) => void | ||
@@ -101,0 +107,0 @@ resetSorting: (defaultState?: boolean) => void |
@@ -15,7 +15,7 @@ import { TableFeature } from '../core/table' | ||
export type VisibilityTableState = { | ||
export interface VisibilityTableState { | ||
columnVisibility: VisibilityState | ||
} | ||
export type VisibilityOptions = { | ||
export interface VisibilityOptions { | ||
onColumnVisibilityChange?: OnChangeFn<VisibilityState> | ||
@@ -25,7 +25,7 @@ enableHiding?: boolean | ||
export type VisibilityDefaultOptions = { | ||
export interface VisibilityDefaultOptions { | ||
onColumnVisibilityChange: OnChangeFn<VisibilityState> | ||
} | ||
export type VisibilityInstance<TData extends RowData> = { | ||
export interface VisibilityInstance<TData extends RowData> { | ||
getVisibleFlatColumns: () => Column<TData, unknown>[] | ||
@@ -44,7 +44,7 @@ getVisibleLeafColumns: () => Column<TData, unknown>[] | ||
export type VisibilityColumnDef = { | ||
export interface VisibilityColumnDef { | ||
enableHiding?: boolean | ||
} | ||
export type VisibilityRow<TData extends RowData> = { | ||
export interface VisibilityRow<TData extends RowData> { | ||
_getAllVisibleCells: () => Cell<TData, unknown>[] | ||
@@ -54,3 +54,3 @@ getVisibleCells: () => Cell<TData, unknown>[] | ||
export type VisibilityColumn = { | ||
export interface VisibilityColumn { | ||
getCanHide: () => boolean | ||
@@ -57,0 +57,0 @@ getIsVisible: () => boolean |
227
src/types.ts
@@ -30,3 +30,2 @@ import { CoreOptions, CoreTableState, CoreInstance } from './core/table' | ||
import { | ||
FilterFn, | ||
FiltersColumn, | ||
@@ -47,3 +46,2 @@ FiltersColumnDef, | ||
import { | ||
CustomAggregationFns, | ||
GroupingCell, | ||
@@ -84,3 +82,3 @@ GroupingColumn, | ||
import { CoreRow } from './core/row' | ||
import { DeepKeys, PartialKeys, UnionToIntersection } from './utils' | ||
import { PartialKeys, UnionToIntersection } from './utils' | ||
import { CellContext, CoreCell } from './core/cell' | ||
@@ -90,6 +88,11 @@ import { CoreColumn } from './core/column' | ||
export interface TableMeta<TData extends RowData> {} | ||
export interface ColumnMeta<TData extends RowData, TValue> {} | ||
export interface FilterMeta {} | ||
export interface FilterFns {} | ||
export interface SortingFns {} | ||
export interface AggregationFns {} | ||
@@ -104,67 +107,75 @@ | ||
export type Table<TData extends RowData> = CoreInstance<TData> & | ||
HeadersInstance<TData> & | ||
VisibilityInstance<TData> & | ||
ColumnOrderInstance<TData> & | ||
ColumnPinningInstance<TData> & | ||
FiltersInstance<TData> & | ||
SortingInstance<TData> & | ||
GroupingInstance<TData> & | ||
ColumnSizingInstance & | ||
ExpandedInstance<TData> & | ||
PaginationInstance<TData> & | ||
RowSelectionInstance<TData> | ||
export interface Table<TData extends RowData> | ||
extends CoreInstance<TData>, | ||
HeadersInstance<TData>, | ||
VisibilityInstance<TData>, | ||
ColumnOrderInstance<TData>, | ||
ColumnPinningInstance<TData>, | ||
FiltersInstance<TData>, | ||
SortingInstance<TData>, | ||
GroupingInstance<TData>, | ||
ColumnSizingInstance, | ||
ExpandedInstance<TData>, | ||
PaginationInstance<TData>, | ||
RowSelectionInstance<TData> {} | ||
interface FeatureOptions<TData extends RowData> | ||
extends VisibilityOptions, | ||
ColumnOrderOptions, | ||
ColumnPinningOptions, | ||
FiltersOptions<TData>, | ||
SortingOptions<TData>, | ||
GroupingOptions, | ||
ExpandedOptions<TData>, | ||
ColumnSizingOptions, | ||
PaginationOptions, | ||
RowSelectionOptions<TData> {} | ||
export type TableOptionsResolved<TData extends RowData> = CoreOptions<TData> & | ||
VisibilityOptions & | ||
ColumnOrderOptions & | ||
ColumnPinningOptions & | ||
FiltersOptions<TData> & | ||
SortingOptions<TData> & | ||
GroupingOptions & | ||
ExpandedOptions<TData> & | ||
ColumnSizingOptions & | ||
PaginationOptions & | ||
RowSelectionOptions<TData> | ||
FeatureOptions<TData> | ||
export type TableOptions<TData extends RowData> = PartialKeys< | ||
TableOptionsResolved<TData>, | ||
'state' | 'onStateChange' | 'renderFallbackValue' | ||
> | ||
export interface TableOptions<TData extends RowData> | ||
extends PartialKeys< | ||
TableOptionsResolved<TData>, | ||
'state' | 'onStateChange' | 'renderFallbackValue' | ||
> {} | ||
export type TableState = CoreTableState & | ||
VisibilityTableState & | ||
ColumnOrderTableState & | ||
ColumnPinningTableState & | ||
FiltersTableState & | ||
SortingTableState & | ||
ExpandedTableState & | ||
GroupingTableState & | ||
ColumnSizingTableState & | ||
PaginationTableState & | ||
RowSelectionTableState | ||
export interface TableState | ||
extends CoreTableState, | ||
VisibilityTableState, | ||
ColumnOrderTableState, | ||
ColumnPinningTableState, | ||
FiltersTableState, | ||
SortingTableState, | ||
ExpandedTableState, | ||
GroupingTableState, | ||
ColumnSizingTableState, | ||
PaginationTableState, | ||
RowSelectionTableState {} | ||
export type InitialTableState = Partial< | ||
CoreTableState & | ||
VisibilityTableState & | ||
ColumnOrderTableState & | ||
ColumnPinningTableState & | ||
FiltersTableState & | ||
SortingTableState & | ||
ExpandedTableState & | ||
GroupingTableState & | ||
ColumnSizingTableState & | ||
PaginationInitialTableState & | ||
RowSelectionTableState | ||
> | ||
interface CompleteInitialTableState | ||
extends CoreTableState, | ||
VisibilityTableState, | ||
ColumnOrderTableState, | ||
ColumnPinningTableState, | ||
FiltersTableState, | ||
SortingTableState, | ||
ExpandedTableState, | ||
GroupingTableState, | ||
ColumnSizingTableState, | ||
PaginationInitialTableState, | ||
RowSelectionTableState {} | ||
export type Row<TData extends RowData> = CoreRow<TData> & | ||
VisibilityRow<TData> & | ||
ColumnPinningRow<TData> & | ||
FiltersRow<TData> & | ||
GroupingRow & | ||
RowSelectionRow & | ||
ExpandedRow | ||
export interface InitialTableState extends Partial<CompleteInitialTableState> {} | ||
export type RowModel<TData extends RowData> = { | ||
export interface Row<TData extends RowData> | ||
extends CoreRow<TData>, | ||
VisibilityRow<TData>, | ||
ColumnPinningRow<TData>, | ||
FiltersRow<TData>, | ||
GroupingRow, | ||
RowSelectionRow, | ||
ExpandedRow {} | ||
export interface RowModel<TData extends RowData> { | ||
rows: Row<TData>[] | ||
@@ -188,3 +199,3 @@ flatRows: Row<TData>[] | ||
type StringHeaderIdentifier = { | ||
interface StringHeaderIdentifier { | ||
header: string | ||
@@ -194,3 +205,3 @@ id?: string | ||
type IdIdentifier<TData extends RowData, TValue> = { | ||
interface IdIdentifier<TData extends RowData, TValue> { | ||
id: string | ||
@@ -206,3 +217,12 @@ header?: StringOrTemplateHeader<TData, TValue> | ||
export type ColumnDefBase<TData extends RowData, TValue = unknown> = { | ||
interface ColumnDefExtensions<TData extends RowData, TValue = unknown> | ||
extends VisibilityColumnDef, | ||
ColumnPinningColumnDef, | ||
FiltersColumnDef<TData>, | ||
SortingColumnDef<TData>, | ||
GroupingColumnDef<TData, TValue>, | ||
ColumnSizingColumnDef {} | ||
export interface ColumnDefBase<TData extends RowData, TValue = unknown> | ||
extends ColumnDefExtensions<TData, TValue> { | ||
getUniqueValues?: AccessorFn<TData, unknown[]> | ||
@@ -212,15 +232,8 @@ footer?: ColumnDefTemplate<HeaderContext<TData, TValue>> | ||
meta?: ColumnMeta<TData, TValue> | ||
} & VisibilityColumnDef & | ||
ColumnPinningColumnDef & | ||
FiltersColumnDef<TData> & | ||
SortingColumnDef<TData> & | ||
GroupingColumnDef<TData, TValue> & | ||
ColumnSizingColumnDef | ||
} | ||
// | ||
export type IdentifiedColumnDef< | ||
TData extends RowData, | ||
TValue = unknown | ||
> = ColumnDefBase<TData, TValue> & { | ||
export interface IdentifiedColumnDef<TData extends RowData, TValue = unknown> | ||
extends ColumnDefBase<TData, TValue> { | ||
id?: string | ||
@@ -235,25 +248,34 @@ header?: StringOrTemplateHeader<TData, TValue> | ||
interface GroupColumnDefBase<TData extends RowData, TValue = unknown> | ||
extends ColumnDefBase<TData, TValue> { | ||
columns?: ColumnDef<TData, any>[] | ||
} | ||
export type GroupColumnDef< | ||
TData extends RowData, | ||
TValue = unknown | ||
> = ColumnDefBase<TData, TValue> & | ||
ColumnIdentifiers<TData, TValue> & { | ||
columns?: ColumnDef<TData, any>[] | ||
} | ||
> = GroupColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue> | ||
interface AccessorFnColumnDefBase<TData extends RowData, TValue = unknown> | ||
extends ColumnDefBase<TData, TValue> { | ||
accessorFn: AccessorFn<TData, TValue> | ||
} | ||
export type AccessorFnColumnDef< | ||
TData extends RowData, | ||
TValue = unknown | ||
> = ColumnDefBase<TData, TValue> & | ||
ColumnIdentifiers<TData, TValue> & { | ||
accessorFn: AccessorFn<TData, TValue> | ||
} | ||
> = AccessorFnColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue> | ||
export type AccessorKeyColumnDef<TData extends RowData, TValue = unknown> = { | ||
interface AccessorKeyColumnDefBase<TData extends RowData, TValue = unknown> | ||
extends ColumnDefBase<TData, TValue> { | ||
id?: string | ||
} & Partial<ColumnIdentifiers<TData, TValue>> & | ||
ColumnDefBase<TData, TValue> & { | ||
accessorKey: string | keyof TData | ||
} | ||
accessorKey: string | keyof TData | ||
} | ||
export type AccessorKeyColumnDef< | ||
TData extends RowData, | ||
TValue = unknown | ||
> = AccessorKeyColumnDefBase<TData, TValue> & | ||
Partial<ColumnIdentifiers<TData, TValue>> | ||
export type AccessorColumnDef<TData extends RowData, TValue = unknown> = | ||
@@ -277,19 +299,20 @@ | AccessorKeyColumnDef<TData, TValue> | ||
export type Column<TData extends RowData, TValue = unknown> = CoreColumn< | ||
TData, | ||
TValue | ||
> & | ||
ColumnVisibilityColumn & | ||
ColumnPinningColumn & | ||
FiltersColumn<TData> & | ||
SortingColumn<TData> & | ||
GroupingColumn<TData> & | ||
ColumnSizingColumn | ||
export interface Column<TData extends RowData, TValue = unknown> | ||
extends CoreColumn<TData, TValue>, | ||
ColumnVisibilityColumn, | ||
ColumnPinningColumn, | ||
FiltersColumn<TData>, | ||
SortingColumn<TData>, | ||
GroupingColumn<TData>, | ||
ColumnSizingColumn {} | ||
export type Cell<TData extends RowData, TValue> = CoreCell<TData, TValue> & | ||
GroupingCell | ||
export interface Cell<TData extends RowData, TValue> | ||
extends CoreCell<TData, TValue>, | ||
GroupingCell {} | ||
export type Header<TData extends RowData, TValue> = CoreHeader<TData, TValue> & | ||
ColumnSizingHeader | ||
export interface Header<TData extends RowData, TValue> | ||
extends CoreHeader<TData, TValue>, | ||
ColumnSizingHeader {} | ||
export type HeaderGroup<TData extends RowData> = CoreHeaderGroup<TData> | ||
export interface HeaderGroup<TData extends RowData> | ||
extends CoreHeaderGroup<TData> {} |
101
src/utils.ts
import { TableState, Updater } from './types' | ||
export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>> | ||
export type RequiredKeys<T, K extends keyof T> = Omit<T, K> & | ||
Required<Pick<T, K>> | ||
export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<T> | ||
export type RequiredKeys<T, K extends keyof T> = T & { [P in K]-?: T[P] } | ||
export type Overwrite<T, U extends { [TKey in keyof T]?: any }> = Omit< | ||
@@ -21,51 +20,65 @@ T, | ||
type ComputeRange< | ||
N extends number, | ||
Result extends Array<unknown> = [] | ||
> = Result['length'] extends N | ||
? Result | ||
: ComputeRange<N, [...Result, Result['length']]> | ||
type Index40 = ComputeRange<40>[number] | ||
type IndexableData = Record<string | number, any> | ||
export type DeepValue<T, TProp> = T extends IndexableData | ||
? TProp extends `${infer TBranch}.${infer TDeepProp}` | ||
? DeepValue<T[TBranch], TDeepProp> | ||
: TProp extends keyof T | ||
? T[TProp] | ||
: never | ||
: never | ||
// Is this type a tuple? | ||
type IsTuple<T> = T extends readonly any[] & { length: infer Length } | ||
? Length extends Index40 | ||
? T | ||
type Join<K, P> = K extends string | number | ||
? P extends string | number | ||
? `${K}${'' extends P ? '' : '.'}${P}` | ||
: never | ||
: never | ||
// If this type is a tuple, what indices are allowed? | ||
type AllowedIndexes< | ||
Tuple extends ReadonlyArray<any>, | ||
Keys extends number = never | ||
> = Tuple extends readonly [] | ||
? Keys | ||
: Tuple extends readonly [infer _, ...infer Tail] | ||
? AllowedIndexes<Tail, Keys | Tail['length']> | ||
: Keys | ||
type Prev = [ | ||
never, | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9, | ||
10, | ||
11, | ||
12, | ||
13, | ||
14, | ||
15, | ||
16, | ||
17, | ||
18, | ||
19, | ||
20, | ||
...0[] | ||
] | ||
export type DeepKeys<T> = unknown extends T | ||
? keyof T | ||
: object extends T | ||
? string | ||
: T extends readonly any[] & IsTuple<T> | ||
? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>> | ||
: T extends any[] | ||
? never & 'Dynamic length array indexing is not supported' | ||
: T extends Date | ||
type ExplicitLeaves = | ||
| Date | ||
| Number | ||
| BigInt | ||
| String | ||
| Set<unknown> | ||
| Map<unknown, unknown> | ||
| WeakSet<object> | ||
| WeakMap<object, unknown> | ||
export type DeepKeys<T, D extends number = 10> = [D] extends [never] | ||
? never | ||
: T extends ExplicitLeaves | ||
? never | ||
: T extends object | ||
? (keyof T & string) | DeepKeysPrefix<T, keyof T> | ||
: never | ||
? { | ||
[K in keyof T]-?: K extends string | number | ||
? `${K}` | Join<K, DeepKeys<T[K], Prev[D]>> | ||
: never | ||
}[keyof T] | ||
: '' | ||
type DeepKeysPrefix<T, TPrefix> = TPrefix extends keyof T & (number | string) | ||
? `${TPrefix}.${DeepKeys<T[TPrefix]> & string}` | ||
: never | ||
export type DeepValue<T, TProp> = T extends Record<string | number, any> | ||
? TProp extends `${infer TBranch}.${infer TDeepProp}` | ||
? DeepValue<T[TBranch], TDeepProp> | ||
: T[TProp & string] | ||
: never | ||
export type NoInfer<T> = [T][T extends any ? 0 : never] | ||
@@ -72,0 +85,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2047528
17938