@tanstack/table-core
Advanced tools
Comparing version 8.0.0-alpha.24 to 8.0.0-alpha.25
@@ -17,15 +17,15 @@ /** | ||
var utils = require('./utils.js'); | ||
var Visibility = require('./features/Visibility.js'); | ||
var Ordering = require('./features/Ordering.js'); | ||
var Pinning = require('./features/Pinning.js'); | ||
var Headers = require('./features/Headers.js'); | ||
var ColumnSizing = require('./features/ColumnSizing.js'); | ||
var Expanding = require('./features/Expanding.js'); | ||
var Filters = require('./features/Filters.js'); | ||
var Sorting = require('./features/Sorting.js'); | ||
var Grouping = require('./features/Grouping.js'); | ||
var Expanding = require('./features/Expanding.js'); | ||
var ColumnSizing = require('./features/ColumnSizing.js'); | ||
var Ordering = require('./features/Ordering.js'); | ||
var Pagination = require('./features/Pagination.js'); | ||
var Pinning = require('./features/Pinning.js'); | ||
var RowSelection = require('./features/RowSelection.js'); | ||
var Sorting = require('./features/Sorting.js'); | ||
var Visibility = require('./features/Visibility.js'); | ||
var Headers = require('./features/Headers.js'); | ||
var features = [Visibility.Visibility, Ordering.Ordering, Pinning.Pinning, Headers.Headers, Filters.Filters, Sorting.Sorting, Grouping.Grouping, Expanding.Expanding, ColumnSizing.ColumnSizing, Pagination.Pagination, RowSelection.RowSelection]; | ||
var features = [Headers.Headers, Visibility.Visibility, Ordering.Ordering, Pinning.Pinning, Filters.Filters, Sorting.Sorting, Grouping.Grouping, Expanding.Expanding, Pagination.Pagination, RowSelection.RowSelection, ColumnSizing.ColumnSizing]; | ||
function createTableInstance(options) { | ||
@@ -138,3 +138,3 @@ var _options$initialState; | ||
var column = _rollupPluginBabelHelpers["extends"]({}, ColumnSizing.defaultColumnSizing, defaultColumn, columnDef, { | ||
var column = _rollupPluginBabelHelpers["extends"]({}, defaultColumn, columnDef, { | ||
id: "" + id, | ||
@@ -275,14 +275,2 @@ accessorFn: accessorFn, | ||
}, | ||
getColumnWidth: function getColumnWidth(columnId) { | ||
var _column$minWidth, _ref3, _column$maxWidth; | ||
var column = instance.getColumn(columnId); | ||
if (!column) { | ||
throw new Error(); | ||
} | ||
var columnSize = instance.getState().columnSizing[column.id]; | ||
return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : ColumnSizing.defaultColumnSizing.minWidth, (_ref3 = columnSize != null ? columnSize : column.width) != null ? _ref3 : ColumnSizing.defaultColumnSizing.width), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : ColumnSizing.defaultColumnSizing.maxWidth); | ||
}, | ||
createCell: function createCell(row, column, value) { | ||
@@ -289,0 +277,0 @@ var cell = { |
@@ -20,5 +20,5 @@ /** | ||
return { | ||
createTableFactory: function createTableFactory(options) { | ||
createTableFactory: function createTableFactory(factoryOptions) { | ||
return function () { | ||
return _createTable(undefined, undefined, _rollupPluginBabelHelpers["extends"]({}, options, opts)); | ||
return _createTable(undefined, undefined, _rollupPluginBabelHelpers["extends"]({}, factoryOptions, opts)); | ||
}; | ||
@@ -25,0 +25,0 @@ }, |
@@ -25,2 +25,5 @@ /** | ||
var ColumnSizing = { | ||
getDefaultColumn: function getDefaultColumn() { | ||
return defaultColumnSizing; | ||
}, | ||
getInitialState: function getInitialState() { | ||
@@ -48,2 +51,14 @@ return { | ||
return { | ||
getColumnWidth: function getColumnWidth(columnId) { | ||
var _column$minWidth, _ref, _column$maxWidth; | ||
var column = instance.getColumn(columnId); | ||
if (!column) { | ||
throw new Error(); | ||
} | ||
var columnSize = instance.getState().columnSizing[column.id]; | ||
return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : defaultColumnSizing.minWidth, (_ref = columnSize != null ? columnSize : column.width) != null ? _ref : defaultColumnSizing.width), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : defaultColumnSizing.maxWidth); | ||
}, | ||
setColumnSizing: function setColumnSizing(updater) { | ||
@@ -66,5 +81,5 @@ return instance.options.onColumnSizingChange == null ? void 0 : instance.options.onColumnSizingChange(updater, utils.functionalUpdate(updater, instance.getState().columnSizing)); | ||
resetColumnSize: function resetColumnSize(columnId) { | ||
instance.setColumnSizing(function (_ref) { | ||
_ref[columnId]; | ||
var rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(_ref, [columnId].map(_rollupPluginBabelHelpers.toPropertyKey)); | ||
instance.setColumnSizing(function (_ref2) { | ||
_ref2[columnId]; | ||
var rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(_ref2, [columnId].map(_rollupPluginBabelHelpers.toPropertyKey)); | ||
@@ -88,3 +103,3 @@ return rest; | ||
getColumnCanResize: function getColumnCanResize(columnId) { | ||
var _ref2, _ref3, _column$enableResizin; | ||
var _ref3, _ref4, _column$enableResizin; | ||
@@ -97,3 +112,3 @@ var column = instance.getColumn(columnId); | ||
return (_ref2 = (_ref3 = (_column$enableResizin = column.enableResizing) != null ? _column$enableResizin : instance.options.enableColumnResizing) != null ? _ref3 : column.defaultCanResize) != null ? _ref2 : true; | ||
return (_ref3 = (_ref4 = (_column$enableResizin = column.enableResizing) != null ? _column$enableResizin : instance.options.enableColumnResizing) != null ? _ref4 : column.defaultCanResize) != null ? _ref3 : true; | ||
}, | ||
@@ -149,5 +164,5 @@ getColumnIsResizing: function getColumnIsResizing(columnId) { | ||
var deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999); | ||
old.columnSizingStart.forEach(function (_ref4) { | ||
var columnId = _ref4[0], | ||
headerWidth = _ref4[1]; | ||
old.columnSizingStart.forEach(function (_ref5) { | ||
var columnId = _ref5[0], | ||
headerWidth = _ref5[1]; | ||
newColumnSizing[columnId] = Math.round(Math.max(headerWidth + headerWidth * deltaPercentage, 0) * 100) / 100; | ||
@@ -154,0 +169,0 @@ }); |
@@ -10,3 +10,3 @@ { | ||
{ | ||
"uid": "5980-54", | ||
"uid": "d7a7-54", | ||
"name": "\u0000rollupPluginBabelHelpers.js" | ||
@@ -18,3 +18,3 @@ }, | ||
{ | ||
"uid": "5980-56", | ||
"uid": "d7a7-56", | ||
"name": "utils.tsx" | ||
@@ -26,44 +26,44 @@ }, | ||
{ | ||
"uid": "5980-58", | ||
"name": "Visibility.ts" | ||
"uid": "d7a7-58", | ||
"name": "ColumnSizing.ts" | ||
}, | ||
{ | ||
"uid": "5980-62", | ||
"name": "Grouping.ts" | ||
"uid": "d7a7-60", | ||
"name": "Expanding.ts" | ||
}, | ||
{ | ||
"uid": "5980-64", | ||
"name": "Ordering.ts" | ||
"uid": "d7a7-64", | ||
"name": "Filters.ts" | ||
}, | ||
{ | ||
"uid": "5980-66", | ||
"name": "Pinning.ts" | ||
"uid": "d7a7-68", | ||
"name": "Grouping.ts" | ||
}, | ||
{ | ||
"uid": "5980-68", | ||
"name": "ColumnSizing.ts" | ||
"uid": "d7a7-70", | ||
"name": "Ordering.ts" | ||
}, | ||
{ | ||
"uid": "5980-70", | ||
"name": "Headers.ts" | ||
"uid": "d7a7-72", | ||
"name": "Pagination.ts" | ||
}, | ||
{ | ||
"uid": "5980-74", | ||
"name": "Filters.ts" | ||
"uid": "d7a7-74", | ||
"name": "Pinning.ts" | ||
}, | ||
{ | ||
"uid": "5980-78", | ||
"name": "Sorting.ts" | ||
"uid": "d7a7-76", | ||
"name": "RowSelection.ts" | ||
}, | ||
{ | ||
"uid": "5980-80", | ||
"name": "Expanding.ts" | ||
"uid": "d7a7-80", | ||
"name": "Sorting.ts" | ||
}, | ||
{ | ||
"uid": "5980-82", | ||
"name": "Pagination.ts" | ||
"uid": "d7a7-82", | ||
"name": "Visibility.ts" | ||
}, | ||
{ | ||
"uid": "5980-84", | ||
"name": "RowSelection.ts" | ||
"uid": "d7a7-84", | ||
"name": "Headers.ts" | ||
} | ||
@@ -73,19 +73,19 @@ ] | ||
{ | ||
"uid": "5980-60", | ||
"name": "aggregationTypes.ts" | ||
"uid": "d7a7-62", | ||
"name": "filterTypes.ts" | ||
}, | ||
{ | ||
"uid": "5980-72", | ||
"name": "filterTypes.ts" | ||
"uid": "d7a7-66", | ||
"name": "aggregationTypes.ts" | ||
}, | ||
{ | ||
"uid": "5980-76", | ||
"uid": "d7a7-78", | ||
"name": "sortTypes.ts" | ||
}, | ||
{ | ||
"uid": "5980-86", | ||
"uid": "d7a7-86", | ||
"name": "core.tsx" | ||
}, | ||
{ | ||
"uid": "5980-88", | ||
"uid": "d7a7-88", | ||
"name": "createTable.tsx" | ||
@@ -97,27 +97,27 @@ }, | ||
{ | ||
"uid": "5980-90", | ||
"uid": "d7a7-90", | ||
"name": "filterRowsUtils.ts" | ||
}, | ||
{ | ||
"uid": "5980-92", | ||
"uid": "d7a7-92", | ||
"name": "columnFilterRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "5980-94", | ||
"uid": "d7a7-94", | ||
"name": "globalFilterRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "5980-96", | ||
"uid": "d7a7-96", | ||
"name": "sortRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "5980-98", | ||
"uid": "d7a7-98", | ||
"name": "groupRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "5980-100", | ||
"uid": "d7a7-100", | ||
"name": "expandRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "5980-102", | ||
"uid": "d7a7-102", | ||
"name": "paginateRowsFn.ts" | ||
@@ -128,3 +128,3 @@ } | ||
{ | ||
"uid": "5980-104", | ||
"uid": "d7a7-104", | ||
"name": "index.tsx" | ||
@@ -140,164 +140,164 @@ } | ||
"nodeParts": { | ||
"5980-54": { | ||
"d7a7-54": { | ||
"renderedLength": 2695, | ||
"gzipLength": 1065, | ||
"brotliLength": 0, | ||
"mainUid": "5980-53" | ||
"mainUid": "d7a7-53" | ||
}, | ||
"5980-56": { | ||
"d7a7-56": { | ||
"renderedLength": 3906, | ||
"gzipLength": 1358, | ||
"brotliLength": 0, | ||
"mainUid": "5980-55" | ||
"mainUid": "d7a7-55" | ||
}, | ||
"5980-58": { | ||
"renderedLength": 6367, | ||
"gzipLength": 1219, | ||
"d7a7-58": { | ||
"renderedLength": 11667, | ||
"gzipLength": 2272, | ||
"brotliLength": 0, | ||
"mainUid": "5980-57" | ||
"mainUid": "d7a7-57" | ||
}, | ||
"5980-60": { | ||
"d7a7-60": { | ||
"renderedLength": 7711, | ||
"gzipLength": 1694, | ||
"brotliLength": 0, | ||
"mainUid": "d7a7-59" | ||
}, | ||
"d7a7-62": { | ||
"renderedLength": 4437, | ||
"gzipLength": 786, | ||
"brotliLength": 0, | ||
"mainUid": "d7a7-61" | ||
}, | ||
"d7a7-64": { | ||
"renderedLength": 16504, | ||
"gzipLength": 2894, | ||
"brotliLength": 0, | ||
"mainUid": "d7a7-63" | ||
}, | ||
"d7a7-66": { | ||
"renderedLength": 2674, | ||
"gzipLength": 773, | ||
"brotliLength": 0, | ||
"mainUid": "5980-59" | ||
"mainUid": "d7a7-65" | ||
}, | ||
"5980-62": { | ||
"d7a7-68": { | ||
"renderedLength": 8356, | ||
"gzipLength": 1802, | ||
"brotliLength": 0, | ||
"mainUid": "5980-61" | ||
"mainUid": "d7a7-67" | ||
}, | ||
"5980-64": { | ||
"d7a7-70": { | ||
"renderedLength": 2639, | ||
"gzipLength": 799, | ||
"brotliLength": 0, | ||
"mainUid": "5980-63" | ||
"mainUid": "d7a7-69" | ||
}, | ||
"5980-66": { | ||
"d7a7-72": { | ||
"renderedLength": 6378, | ||
"gzipLength": 1280, | ||
"brotliLength": 0, | ||
"mainUid": "d7a7-71" | ||
}, | ||
"d7a7-74": { | ||
"renderedLength": 5842, | ||
"gzipLength": 1084, | ||
"brotliLength": 0, | ||
"mainUid": "5980-65" | ||
"mainUid": "d7a7-73" | ||
}, | ||
"5980-68": { | ||
"renderedLength": 10919, | ||
"gzipLength": 2166, | ||
"d7a7-76": { | ||
"renderedLength": 18035, | ||
"gzipLength": 3049, | ||
"brotliLength": 0, | ||
"mainUid": "5980-67" | ||
"mainUid": "d7a7-75" | ||
}, | ||
"5980-70": { | ||
"renderedLength": 23655, | ||
"gzipLength": 3372, | ||
"brotliLength": 0, | ||
"mainUid": "5980-69" | ||
}, | ||
"5980-72": { | ||
"renderedLength": 4437, | ||
"gzipLength": 786, | ||
"brotliLength": 0, | ||
"mainUid": "5980-71" | ||
}, | ||
"5980-74": { | ||
"renderedLength": 16504, | ||
"gzipLength": 2894, | ||
"brotliLength": 0, | ||
"mainUid": "5980-73" | ||
}, | ||
"5980-76": { | ||
"d7a7-78": { | ||
"renderedLength": 2752, | ||
"gzipLength": 846, | ||
"brotliLength": 0, | ||
"mainUid": "5980-75" | ||
"mainUid": "d7a7-77" | ||
}, | ||
"5980-78": { | ||
"d7a7-80": { | ||
"renderedLength": 12092, | ||
"gzipLength": 2589, | ||
"brotliLength": 0, | ||
"mainUid": "5980-77" | ||
"mainUid": "d7a7-79" | ||
}, | ||
"5980-80": { | ||
"renderedLength": 7711, | ||
"gzipLength": 1694, | ||
"d7a7-82": { | ||
"renderedLength": 6367, | ||
"gzipLength": 1219, | ||
"brotliLength": 0, | ||
"mainUid": "5980-79" | ||
"mainUid": "d7a7-81" | ||
}, | ||
"5980-82": { | ||
"renderedLength": 6378, | ||
"gzipLength": 1280, | ||
"d7a7-84": { | ||
"renderedLength": 23655, | ||
"gzipLength": 3372, | ||
"brotliLength": 0, | ||
"mainUid": "5980-81" | ||
"mainUid": "d7a7-83" | ||
}, | ||
"5980-84": { | ||
"renderedLength": 18035, | ||
"gzipLength": 3049, | ||
"d7a7-86": { | ||
"renderedLength": 17346, | ||
"gzipLength": 3370, | ||
"brotliLength": 0, | ||
"mainUid": "5980-83" | ||
"mainUid": "d7a7-85" | ||
}, | ||
"5980-86": { | ||
"renderedLength": 18004, | ||
"gzipLength": 3499, | ||
"d7a7-88": { | ||
"renderedLength": 1458, | ||
"gzipLength": 419, | ||
"brotliLength": 0, | ||
"mainUid": "5980-85" | ||
"mainUid": "d7a7-87" | ||
}, | ||
"5980-88": { | ||
"renderedLength": 1444, | ||
"gzipLength": 413, | ||
"brotliLength": 0, | ||
"mainUid": "5980-87" | ||
}, | ||
"5980-90": { | ||
"d7a7-90": { | ||
"renderedLength": 2457, | ||
"gzipLength": 568, | ||
"brotliLength": 0, | ||
"mainUid": "5980-89" | ||
"mainUid": "d7a7-89" | ||
}, | ||
"5980-92": { | ||
"d7a7-92": { | ||
"renderedLength": 1362, | ||
"gzipLength": 472, | ||
"brotliLength": 0, | ||
"mainUid": "5980-91" | ||
"mainUid": "d7a7-91" | ||
}, | ||
"5980-94": { | ||
"d7a7-94": { | ||
"renderedLength": 807, | ||
"gzipLength": 291, | ||
"brotliLength": 0, | ||
"mainUid": "5980-93" | ||
"mainUid": "d7a7-93" | ||
}, | ||
"5980-96": { | ||
"d7a7-96": { | ||
"renderedLength": 2482, | ||
"gzipLength": 823, | ||
"brotliLength": 0, | ||
"mainUid": "5980-95" | ||
"mainUid": "d7a7-95" | ||
}, | ||
"5980-98": { | ||
"d7a7-98": { | ||
"renderedLength": 4752, | ||
"gzipLength": 1344, | ||
"brotliLength": 0, | ||
"mainUid": "5980-97" | ||
"mainUid": "d7a7-97" | ||
}, | ||
"5980-100": { | ||
"d7a7-100": { | ||
"renderedLength": 556, | ||
"gzipLength": 265, | ||
"brotliLength": 0, | ||
"mainUid": "5980-99" | ||
"mainUid": "d7a7-99" | ||
}, | ||
"5980-102": { | ||
"d7a7-102": { | ||
"renderedLength": 720, | ||
"gzipLength": 281, | ||
"brotliLength": 0, | ||
"mainUid": "5980-101" | ||
"mainUid": "d7a7-101" | ||
}, | ||
"5980-104": { | ||
"d7a7-104": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "5980-103" | ||
"mainUid": "d7a7-103" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"5980-53": { | ||
"d7a7-53": { | ||
"id": "\u0000rollupPluginBabelHelpers.js", | ||
"moduleParts": { | ||
"index.production.js": "5980-54" | ||
"index.production.js": "d7a7-54" | ||
}, | ||
@@ -307,41 +307,41 @@ "imported": [], | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
}, | ||
{ | ||
"uid": "5980-87" | ||
"uid": "d7a7-87" | ||
}, | ||
{ | ||
"uid": "5980-67" | ||
"uid": "d7a7-57" | ||
}, | ||
{ | ||
"uid": "5980-79" | ||
"uid": "d7a7-59" | ||
}, | ||
{ | ||
"uid": "5980-81" | ||
"uid": "d7a7-71" | ||
}, | ||
{ | ||
"uid": "5980-83" | ||
"uid": "d7a7-75" | ||
}, | ||
{ | ||
"uid": "5980-77" | ||
"uid": "d7a7-79" | ||
}, | ||
{ | ||
"uid": "5980-57" | ||
"uid": "d7a7-81" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
}, | ||
{ | ||
"uid": "5980-59" | ||
"uid": "d7a7-65" | ||
} | ||
] | ||
}, | ||
"5980-55": { | ||
"d7a7-55": { | ||
"id": "/packages/table-core/src/utils.tsx", | ||
"moduleParts": { | ||
"index.production.js": "5980-56" | ||
"index.production.js": "d7a7-56" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
} | ||
@@ -351,56 +351,56 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
}, | ||
{ | ||
"uid": "5980-67" | ||
"uid": "d7a7-57" | ||
}, | ||
{ | ||
"uid": "5980-79" | ||
"uid": "d7a7-59" | ||
}, | ||
{ | ||
"uid": "5980-73" | ||
"uid": "d7a7-63" | ||
}, | ||
{ | ||
"uid": "5980-61" | ||
"uid": "d7a7-67" | ||
}, | ||
{ | ||
"uid": "5980-69" | ||
"uid": "d7a7-83" | ||
}, | ||
{ | ||
"uid": "5980-63" | ||
"uid": "d7a7-69" | ||
}, | ||
{ | ||
"uid": "5980-81" | ||
"uid": "d7a7-71" | ||
}, | ||
{ | ||
"uid": "5980-65" | ||
"uid": "d7a7-73" | ||
}, | ||
{ | ||
"uid": "5980-83" | ||
"uid": "d7a7-75" | ||
}, | ||
{ | ||
"uid": "5980-77" | ||
"uid": "d7a7-79" | ||
}, | ||
{ | ||
"uid": "5980-57" | ||
"uid": "d7a7-81" | ||
}, | ||
{ | ||
"uid": "5980-97" | ||
"uid": "d7a7-97" | ||
} | ||
] | ||
}, | ||
"5980-57": { | ||
"id": "/packages/table-core/src/features/Visibility.ts", | ||
"d7a7-57": { | ||
"id": "/packages/table-core/src/features/ColumnSizing.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-58" | ||
"index.production.js": "d7a7-58" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -410,17 +410,23 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
}, | ||
{ | ||
"uid": "d7a7-83" | ||
} | ||
] | ||
}, | ||
"5980-59": { | ||
"id": "/packages/table-core/src/aggregationTypes.ts", | ||
"d7a7-59": { | ||
"id": "/packages/table-core/src/features/Expanding.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-60" | ||
"index.production.js": "d7a7-60" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "d7a7-55" | ||
} | ||
@@ -430,17 +436,32 @@ ], | ||
{ | ||
"uid": "5980-61" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-61": { | ||
"id": "/packages/table-core/src/features/Grouping.ts", | ||
"d7a7-61": { | ||
"id": "/packages/table-core/src/filterTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-62" | ||
"index.production.js": "d7a7-62" | ||
}, | ||
"imported": [], | ||
"importedBy": [ | ||
{ | ||
"uid": "d7a7-63" | ||
} | ||
] | ||
}, | ||
"d7a7-63": { | ||
"id": "/packages/table-core/src/features/Filters.ts", | ||
"moduleParts": { | ||
"index.production.js": "d7a7-64" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-59" | ||
"uid": "d7a7-61" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -450,23 +471,17 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
}, | ||
{ | ||
"uid": "5980-63" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-63": { | ||
"id": "/packages/table-core/src/features/Ordering.ts", | ||
"d7a7-65": { | ||
"id": "/packages/table-core/src/aggregationTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-64" | ||
"index.production.js": "d7a7-66" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-55" | ||
}, | ||
{ | ||
"uid": "5980-61" | ||
"uid": "d7a7-53" | ||
} | ||
@@ -476,17 +491,17 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-67" | ||
} | ||
] | ||
}, | ||
"5980-65": { | ||
"id": "/packages/table-core/src/features/Pinning.ts", | ||
"d7a7-67": { | ||
"id": "/packages/table-core/src/features/Grouping.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-66" | ||
"index.production.js": "d7a7-68" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-65" | ||
}, | ||
{ | ||
"uid": "d7a7-55" | ||
} | ||
@@ -496,20 +511,23 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
}, | ||
{ | ||
"uid": "d7a7-69" | ||
} | ||
] | ||
}, | ||
"5980-67": { | ||
"id": "/packages/table-core/src/features/ColumnSizing.ts", | ||
"d7a7-69": { | ||
"id": "/packages/table-core/src/features/Ordering.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-68" | ||
"index.production.js": "d7a7-70" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-55" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-67" | ||
} | ||
@@ -519,23 +537,20 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
}, | ||
{ | ||
"uid": "5980-69" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-69": { | ||
"id": "/packages/table-core/src/features/Headers.ts", | ||
"d7a7-71": { | ||
"id": "/packages/table-core/src/features/Pagination.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-70" | ||
"index.production.js": "d7a7-72" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-67" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -545,32 +560,39 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-71": { | ||
"id": "/packages/table-core/src/filterTypes.ts", | ||
"d7a7-73": { | ||
"id": "/packages/table-core/src/features/Pinning.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-72" | ||
"index.production.js": "d7a7-74" | ||
}, | ||
"imported": [], | ||
"imported": [ | ||
{ | ||
"uid": "d7a7-55" | ||
} | ||
], | ||
"importedBy": [ | ||
{ | ||
"uid": "5980-73" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-73": { | ||
"id": "/packages/table-core/src/features/Filters.ts", | ||
"d7a7-75": { | ||
"id": "/packages/table-core/src/features/RowSelection.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-74" | ||
"index.production.js": "d7a7-76" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-71" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -580,13 +602,13 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-75": { | ||
"d7a7-77": { | ||
"id": "/packages/table-core/src/sortTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-76" | ||
"index.production.js": "d7a7-78" | ||
}, | ||
@@ -596,20 +618,20 @@ "imported": [], | ||
{ | ||
"uid": "5980-77" | ||
"uid": "d7a7-79" | ||
} | ||
] | ||
}, | ||
"5980-77": { | ||
"d7a7-79": { | ||
"id": "/packages/table-core/src/features/Sorting.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-78" | ||
"index.production.js": "d7a7-80" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-75" | ||
"uid": "d7a7-77" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -619,20 +641,20 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-79": { | ||
"id": "/packages/table-core/src/features/Expanding.ts", | ||
"d7a7-81": { | ||
"id": "/packages/table-core/src/features/Visibility.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-80" | ||
"index.production.js": "d7a7-82" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -642,20 +664,20 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-81": { | ||
"id": "/packages/table-core/src/features/Pagination.ts", | ||
"d7a7-83": { | ||
"id": "/packages/table-core/src/features/Headers.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-82" | ||
"index.production.js": "d7a7-84" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-55" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-57" | ||
} | ||
@@ -665,75 +687,53 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
} | ||
] | ||
}, | ||
"5980-83": { | ||
"id": "/packages/table-core/src/features/RowSelection.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-84" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
} | ||
], | ||
"importedBy": [ | ||
{ | ||
"uid": "5980-103" | ||
}, | ||
{ | ||
"uid": "5980-85" | ||
} | ||
] | ||
}, | ||
"5980-85": { | ||
"d7a7-85": { | ||
"id": "/packages/table-core/src/core.tsx", | ||
"moduleParts": { | ||
"index.production.js": "5980-86" | ||
"index.production.js": "d7a7-86" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
}, | ||
{ | ||
"uid": "5980-57" | ||
"uid": "d7a7-57" | ||
}, | ||
{ | ||
"uid": "5980-63" | ||
"uid": "d7a7-59" | ||
}, | ||
{ | ||
"uid": "5980-65" | ||
"uid": "d7a7-63" | ||
}, | ||
{ | ||
"uid": "5980-69" | ||
"uid": "d7a7-67" | ||
}, | ||
{ | ||
"uid": "5980-73" | ||
"uid": "d7a7-69" | ||
}, | ||
{ | ||
"uid": "5980-77" | ||
"uid": "d7a7-71" | ||
}, | ||
{ | ||
"uid": "5980-61" | ||
"uid": "d7a7-73" | ||
}, | ||
{ | ||
"uid": "5980-79" | ||
"uid": "d7a7-75" | ||
}, | ||
{ | ||
"uid": "5980-67" | ||
"uid": "d7a7-79" | ||
}, | ||
{ | ||
"uid": "5980-81" | ||
"uid": "d7a7-81" | ||
}, | ||
{ | ||
"uid": "5980-83" | ||
"uid": "d7a7-83" | ||
} | ||
@@ -743,14 +743,14 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-87": { | ||
"d7a7-87": { | ||
"id": "/packages/table-core/src/createTable.tsx", | ||
"moduleParts": { | ||
"index.production.js": "5980-88" | ||
"index.production.js": "d7a7-88" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-53" | ||
"uid": "d7a7-53" | ||
} | ||
@@ -760,10 +760,10 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-89": { | ||
"d7a7-89": { | ||
"id": "/packages/table-core/src/utils/filterRowsUtils.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-90" | ||
"index.production.js": "d7a7-90" | ||
}, | ||
@@ -773,17 +773,17 @@ "imported": [], | ||
{ | ||
"uid": "5980-91" | ||
"uid": "d7a7-91" | ||
}, | ||
{ | ||
"uid": "5980-93" | ||
"uid": "d7a7-93" | ||
} | ||
] | ||
}, | ||
"5980-91": { | ||
"d7a7-91": { | ||
"id": "/packages/table-core/src/utils/columnFilterRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-92" | ||
"index.production.js": "d7a7-92" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-89" | ||
"uid": "d7a7-89" | ||
} | ||
@@ -793,14 +793,14 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-93": { | ||
"d7a7-93": { | ||
"id": "/packages/table-core/src/utils/globalFilterRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-94" | ||
"index.production.js": "d7a7-94" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-89" | ||
"uid": "d7a7-89" | ||
} | ||
@@ -810,10 +810,10 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-95": { | ||
"d7a7-95": { | ||
"id": "/packages/table-core/src/utils/sortRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-96" | ||
"index.production.js": "d7a7-96" | ||
}, | ||
@@ -823,14 +823,14 @@ "imported": [], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-97": { | ||
"d7a7-97": { | ||
"id": "/packages/table-core/src/utils/groupRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-98" | ||
"index.production.js": "d7a7-98" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
} | ||
@@ -840,10 +840,10 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-99": { | ||
"d7a7-99": { | ||
"id": "/packages/table-core/src/utils/expandRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-100" | ||
"index.production.js": "d7a7-100" | ||
}, | ||
@@ -853,17 +853,17 @@ "imported": [], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
}, | ||
{ | ||
"uid": "5980-101" | ||
"uid": "d7a7-101" | ||
} | ||
] | ||
}, | ||
"5980-101": { | ||
"d7a7-101": { | ||
"id": "/packages/table-core/src/utils/paginateRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "5980-102" | ||
"index.production.js": "d7a7-102" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-99" | ||
"uid": "d7a7-99" | ||
} | ||
@@ -873,74 +873,74 @@ ], | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
] | ||
}, | ||
"5980-103": { | ||
"d7a7-103": { | ||
"id": "/packages/table-core/src/index.tsx", | ||
"moduleParts": { | ||
"index.production.js": "5980-104" | ||
"index.production.js": "d7a7-104" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5980-85" | ||
"uid": "d7a7-85" | ||
}, | ||
{ | ||
"uid": "5980-105" | ||
"uid": "d7a7-105" | ||
}, | ||
{ | ||
"uid": "5980-87" | ||
"uid": "d7a7-87" | ||
}, | ||
{ | ||
"uid": "5980-67" | ||
"uid": "d7a7-57" | ||
}, | ||
{ | ||
"uid": "5980-79" | ||
"uid": "d7a7-59" | ||
}, | ||
{ | ||
"uid": "5980-73" | ||
"uid": "d7a7-63" | ||
}, | ||
{ | ||
"uid": "5980-61" | ||
"uid": "d7a7-67" | ||
}, | ||
{ | ||
"uid": "5980-69" | ||
"uid": "d7a7-83" | ||
}, | ||
{ | ||
"uid": "5980-63" | ||
"uid": "d7a7-69" | ||
}, | ||
{ | ||
"uid": "5980-81" | ||
"uid": "d7a7-71" | ||
}, | ||
{ | ||
"uid": "5980-65" | ||
"uid": "d7a7-73" | ||
}, | ||
{ | ||
"uid": "5980-83" | ||
"uid": "d7a7-75" | ||
}, | ||
{ | ||
"uid": "5980-77" | ||
"uid": "d7a7-79" | ||
}, | ||
{ | ||
"uid": "5980-57" | ||
"uid": "d7a7-81" | ||
}, | ||
{ | ||
"uid": "5980-55" | ||
"uid": "d7a7-55" | ||
}, | ||
{ | ||
"uid": "5980-91" | ||
"uid": "d7a7-91" | ||
}, | ||
{ | ||
"uid": "5980-93" | ||
"uid": "d7a7-93" | ||
}, | ||
{ | ||
"uid": "5980-95" | ||
"uid": "d7a7-95" | ||
}, | ||
{ | ||
"uid": "5980-97" | ||
"uid": "d7a7-97" | ||
}, | ||
{ | ||
"uid": "5980-99" | ||
"uid": "d7a7-99" | ||
}, | ||
{ | ||
"uid": "5980-101" | ||
"uid": "d7a7-101" | ||
} | ||
@@ -951,3 +951,3 @@ ], | ||
}, | ||
"5980-105": { | ||
"d7a7-105": { | ||
"id": "/packages/table-core/src/types.ts", | ||
@@ -958,3 +958,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "5980-103" | ||
"uid": "d7a7-103" | ||
} | ||
@@ -961,0 +961,0 @@ ] |
import { RequiredKeys } from './utils'; | ||
import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, PartialGenerics, Renderable, UseRenderer } from './types'; | ||
import { RowModel } from '.'; | ||
export declare type CoreOptions<TGenerics extends PartialGenerics> = { | ||
import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, Renderable, UseRenderer, RowModel, AnyGenerics } from './types'; | ||
export declare type CoreOptions<TGenerics extends AnyGenerics> = { | ||
data: TGenerics['Row'][]; | ||
@@ -21,3 +20,3 @@ columns: ColumnDef<TGenerics>[]; | ||
}; | ||
export declare type TableCore<TGenerics extends PartialGenerics> = { | ||
export declare type TableCore<TGenerics extends AnyGenerics> = { | ||
initialState: TableState; | ||
@@ -38,3 +37,2 @@ reset: () => void; | ||
getColumn: (columnId: string) => Column<TGenerics>; | ||
getColumnWidth: (columnId: string) => number; | ||
getTotalWidth: () => number; | ||
@@ -57,3 +55,3 @@ createCell: (row: Row<TGenerics>, column: Column<TGenerics>, value: any) => Cell<TGenerics>; | ||
}; | ||
export declare type CoreRow<TGenerics extends PartialGenerics> = { | ||
export declare type CoreRow<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
@@ -71,9 +69,6 @@ index: number; | ||
}; | ||
export declare type CoreColumnDef<TGenerics extends PartialGenerics> = { | ||
export declare type CoreColumnDef<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
accessorKey?: string & keyof TGenerics['Row']; | ||
accessorFn?: AccessorFn<TGenerics['Row']>; | ||
width?: number; | ||
minWidth?: number; | ||
maxWidth?: number; | ||
columns?: ColumnDef<TGenerics>[]; | ||
@@ -99,3 +94,3 @@ header?: Renderable<TGenerics, { | ||
}; | ||
export declare type CoreColumn<TGenerics extends PartialGenerics> = { | ||
export declare type CoreColumn<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
@@ -111,2 +106,2 @@ depth: number; | ||
}; | ||
export declare function createTableInstance<TGenerics extends PartialGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>; | ||
export declare function createTableInstance<TGenerics extends AnyGenerics>(options: Options<TGenerics>): TableInstance<TGenerics>; |
import { CustomFilterTypes } from './features/Filters'; | ||
import { CustomAggregationTypes } from './features/Grouping'; | ||
import { CustomSortingTypes } from './features/Sorting'; | ||
import { ColumnDef, AccessorFn, PartialGenerics, AnyRender } from './types'; | ||
import { ColumnDef, AccessorFn, PartialGenerics, AnyRender, AnyGenerics } from './types'; | ||
import { Overwrite, PartialKeys } from './utils'; | ||
export declare type CreateTableFactory<TGenerics extends PartialGenerics> = <TSubGenerics extends { | ||
export declare type CreateTableFactory<TGenerics extends AnyGenerics> = <TSubGenerics extends { | ||
Row: any; | ||
@@ -19,3 +19,3 @@ ColumnMeta?: object; | ||
}; | ||
export declare type Table<TGenerics extends PartialGenerics> = { | ||
export declare type Table<TGenerics extends AnyGenerics> = { | ||
generics: TGenerics; | ||
@@ -51,3 +51,3 @@ __options: CreateTableFactoryOptions<any, any, any, any>; | ||
declare type InitTable<TRender extends AnyRender> = { | ||
createTableFactory: <TGenerics extends PartialGenerics>(options?: CreateTableFactoryOptions<TRender, any, any, any>) => CreateTableFactory<Overwrite<TGenerics, { | ||
createTableFactory: <TGenerics extends AnyGenerics>(options: CreateTableFactoryOptions<TRender, any, any, any>) => CreateTableFactory<Overwrite<TGenerics, { | ||
Render: TRender; | ||
@@ -54,0 +54,0 @@ }>>; |
@@ -1,2 +0,2 @@ | ||
import { Column, Getter, Header, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types'; | ||
import { Column, Getter, Header, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Updater } from '../types'; | ||
export declare type ColumnSizing = Record<string, number>; | ||
@@ -34,3 +34,4 @@ export declare type ColumnSizingInfoState = { | ||
}; | ||
export declare type ColumnSizingInstance<TGenerics extends PartialGenerics> = { | ||
export declare type ColumnSizingInstance<TGenerics extends AnyGenerics> = { | ||
getColumnWidth: (columnId: string) => number; | ||
setColumnSizing: (updater: Updater<ColumnSizing>) => void; | ||
@@ -51,4 +52,7 @@ setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void; | ||
defaultCanResize?: boolean; | ||
width?: number; | ||
minWidth?: number; | ||
maxWidth?: number; | ||
}; | ||
export declare type ColumnSizingColumn<TGenerics extends PartialGenerics> = { | ||
export declare type ColumnSizingColumn<TGenerics extends AnyGenerics> = { | ||
getCanResize: () => boolean; | ||
@@ -58,3 +62,3 @@ getIsResizing: () => boolean; | ||
}; | ||
export declare type ColumnSizingHeader<TGenerics extends PartialGenerics> = { | ||
export declare type ColumnSizingHeader<TGenerics extends AnyGenerics> = { | ||
getCanResize: () => boolean; | ||
@@ -71,8 +75,9 @@ getIsResizing: () => boolean; | ||
export declare const ColumnSizing: { | ||
getDefaultColumn: () => ColumnSizingColumnDef; | ||
getInitialState: () => ColumnSizingTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnSizingDefaultOptions; | ||
getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ColumnSizingInstance<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ColumnSizingColumn<TGenerics_2>; | ||
createHeader: <TGenerics_3 extends Partial<import("../types").DefaultGenerics>>(header: Header<TGenerics_3>, instance: TableInstance<TGenerics_3>) => ColumnSizingHeader<TGenerics_3>; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnSizingDefaultOptions; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ColumnSizingInstance<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ColumnSizingColumn<TGenerics_2>; | ||
createHeader: <TGenerics_3 extends AnyGenerics>(header: Header<TGenerics_3>, instance: TableInstance<TGenerics_3>) => ColumnSizingHeader<TGenerics_3>; | ||
}; | ||
export declare function passiveEventSupported(): boolean; |
import { MouseEvent, TouchEvent } from 'react'; | ||
import { RowModel } from '..'; | ||
import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types'; | ||
import { Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types'; | ||
export declare type ExpandedStateList = Record<string, boolean>; | ||
@@ -15,3 +15,3 @@ export declare type ExpandedState = true | Record<string, boolean>; | ||
}; | ||
export declare type ExpandedOptions<TGenerics extends PartialGenerics> = { | ||
export declare type ExpandedOptions<TGenerics extends AnyGenerics> = { | ||
onExpandedChange?: OnChangeFn<ExpandedState>; | ||
@@ -31,3 +31,3 @@ autoResetExpanded?: boolean; | ||
}; | ||
export declare type ExpandedInstance<TGenerics extends PartialGenerics> = { | ||
export declare type ExpandedInstance<TGenerics extends AnyGenerics> = { | ||
_notifyExpandedReset: () => void; | ||
@@ -50,5 +50,5 @@ setExpanded: (updater: Updater<ExpandedState>) => void; | ||
getInitialState: () => ExpandedTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ExpandedOptions<TGenerics>; | ||
getInstance: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ExpandedInstance<TGenerics_1>; | ||
createRow: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ExpandedRow; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ExpandedOptions<TGenerics>; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ExpandedInstance<TGenerics_1>; | ||
createRow: <TGenerics_2 extends AnyGenerics>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => ExpandedRow; | ||
}; |
import { RowModel } from '..'; | ||
import { BuiltInFilterType } from '../filterTypes'; | ||
import { Column, OnChangeFn, PartialGenerics, TableInstance, Row, Updater } from '../types'; | ||
import { Column, OnChangeFn, AnyGenerics, TableInstance, Row, Updater } from '../types'; | ||
import { Overwrite } from '../utils'; | ||
@@ -10,8 +10,8 @@ export declare type ColumnFilter = { | ||
export declare type ColumnFiltersState = ColumnFilter[]; | ||
export declare type FilterFn<TGenerics extends PartialGenerics> = { | ||
export declare type FilterFn<TGenerics extends AnyGenerics> = { | ||
(rows: Row<TGenerics>[], columnIds: string[], filterValue: any): any; | ||
autoRemove?: ColumnFilterAutoRemoveTestFn<TGenerics>; | ||
}; | ||
export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends PartialGenerics> = (value: unknown, column?: Column<TGenerics>) => boolean; | ||
export declare type CustomFilterTypes<TGenerics extends PartialGenerics> = Record<string, FilterFn<TGenerics>>; | ||
export declare type ColumnFilterAutoRemoveTestFn<TGenerics extends AnyGenerics> = (value: unknown, column?: Column<TGenerics>) => boolean; | ||
export declare type CustomFilterTypes<TGenerics extends AnyGenerics> = Record<string, FilterFn<TGenerics>>; | ||
export declare type FiltersTableState = { | ||
@@ -21,4 +21,4 @@ columnFilters: ColumnFiltersState; | ||
}; | ||
export declare type FilterType<TGenerics extends PartialGenerics> = 'auto' | BuiltInFilterType | TGenerics['FilterFns'] | FilterFn<TGenerics>; | ||
export declare type FiltersColumnDef<TGenerics extends PartialGenerics> = { | ||
export declare type FilterType<TGenerics extends AnyGenerics> = 'auto' | BuiltInFilterType | TGenerics['FilterFns'] | FilterFn<TGenerics>; | ||
export declare type FiltersColumnDef<TGenerics extends AnyGenerics> = { | ||
filterType?: FilterType<Overwrite<TGenerics, { | ||
@@ -34,3 +34,3 @@ Value: any; | ||
}; | ||
export declare type FiltersColumn<TGenerics extends PartialGenerics> = { | ||
export declare type FiltersColumn<TGenerics extends AnyGenerics> = { | ||
filterType: FilterType<Overwrite<TGenerics, { | ||
@@ -49,3 +49,3 @@ Value: any; | ||
}; | ||
export declare type FiltersOptions<TGenerics extends PartialGenerics> = { | ||
export declare type FiltersOptions<TGenerics extends AnyGenerics> = { | ||
filterFromLeafRows?: boolean; | ||
@@ -66,3 +66,3 @@ filterTypes?: TGenerics['FilterFns']; | ||
}; | ||
export declare type FiltersInstance<TGenerics extends PartialGenerics> = { | ||
export declare type FiltersInstance<TGenerics extends AnyGenerics> = { | ||
_notifyFiltersReset: () => void; | ||
@@ -91,8 +91,8 @@ getColumnAutoFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined; | ||
export declare const Filters: { | ||
getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => FiltersColumnDef<TGenerics>; | ||
getDefaultColumn: <TGenerics extends AnyGenerics>() => FiltersColumnDef<TGenerics>; | ||
getInitialState: () => FiltersTableState; | ||
getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => FiltersOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => FiltersColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => FiltersInstance<TGenerics_3>; | ||
getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => FiltersOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => FiltersColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => FiltersInstance<TGenerics_3>; | ||
}; | ||
export declare function shouldAutoRemoveFilter<TGenerics extends PartialGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean; | ||
export declare function shouldAutoRemoveFilter<TGenerics extends AnyGenerics>(filterFn?: FilterFn<TGenerics>, value?: any, column?: Column<TGenerics>): boolean; |
import { RowModel } from '..'; | ||
import { BuiltInAggregationType } from '../aggregationTypes'; | ||
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, PartialGenerics, Renderable, UseRenderer } from '../types'; | ||
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, Renderable, UseRenderer, AnyGenerics } from '../types'; | ||
import { Overwrite } from '../utils'; | ||
export declare type GroupingState = string[]; | ||
export declare type AggregationFn<TGenerics extends PartialGenerics> = (getLeafValues: () => TGenerics['Row'][], getChildValues: () => TGenerics['Row'][]) => any; | ||
export declare type CustomAggregationTypes<TGenerics extends PartialGenerics> = Record<string, AggregationFn<TGenerics>>; | ||
export declare type AggregationType<TGenerics extends PartialGenerics> = 'auto' | BuiltInAggregationType | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>; | ||
export declare type AggregationFn<TGenerics extends AnyGenerics> = (getLeafValues: () => TGenerics['Row'][], getChildValues: () => TGenerics['Row'][]) => any; | ||
export declare type CustomAggregationTypes<TGenerics extends AnyGenerics> = Record<string, AggregationFn<TGenerics>>; | ||
export declare type AggregationType<TGenerics extends AnyGenerics> = 'auto' | BuiltInAggregationType | keyof TGenerics['AggregationFns'] | AggregationFn<TGenerics>; | ||
export declare type GroupingTableState = { | ||
grouping: GroupingState; | ||
}; | ||
export declare type GroupingColumnDef<TGenerics extends PartialGenerics> = { | ||
export declare type GroupingColumnDef<TGenerics extends AnyGenerics> = { | ||
aggregationType?: AggregationType<Overwrite<TGenerics, { | ||
@@ -27,3 +27,3 @@ Value: any; | ||
}; | ||
export declare type GroupingColumn<TGenerics extends PartialGenerics> = { | ||
export declare type GroupingColumn<TGenerics extends AnyGenerics> = { | ||
aggregationType?: AggregationType<Overwrite<TGenerics, { | ||
@@ -43,3 +43,3 @@ Value: any; | ||
}; | ||
export declare type GroupingCell<TGenerics extends PartialGenerics> = { | ||
export declare type GroupingCell<TGenerics extends AnyGenerics> = { | ||
getIsGrouped: () => boolean; | ||
@@ -55,3 +55,3 @@ getIsPlaceholder: () => boolean; | ||
}; | ||
export declare type GroupingOptions<TGenerics extends PartialGenerics> = { | ||
export declare type GroupingOptions<TGenerics extends AnyGenerics> = { | ||
aggregationTypes?: TGenerics['AggregationFns']; | ||
@@ -70,3 +70,3 @@ onGroupingChange?: OnChangeFn<GroupingState>; | ||
}; | ||
export declare type GroupingInstance<TGenerics extends PartialGenerics> = { | ||
export declare type GroupingInstance<TGenerics extends AnyGenerics> = { | ||
_notifyGroupingReset: () => void; | ||
@@ -87,10 +87,10 @@ getColumnAutoAggregationFn: (columnId: string) => AggregationFn<TGenerics> | undefined; | ||
export declare const Grouping: { | ||
getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => GroupingColumnDef<TGenerics>; | ||
getDefaultColumn: <TGenerics extends AnyGenerics>() => GroupingColumnDef<TGenerics>; | ||
getInitialState: () => GroupingTableState; | ||
getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => GroupingOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => GroupingColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => GroupingInstance<TGenerics_3>; | ||
createRow: <TGenerics_4 extends Partial<import("..").DefaultGenerics>>(row: Row<TGenerics_4>, instance: TableInstance<TGenerics_4>) => GroupingRow; | ||
createCell: <TGenerics_5 extends Partial<import("..").DefaultGenerics>>(cell: Cell<TGenerics_5>, column: Column<TGenerics_5>, row: Row<TGenerics_5>, instance: TableInstance<TGenerics_5>) => GroupingCell<TGenerics_5>; | ||
orderColumns: <TGenerics_6 extends Partial<import("..").DefaultGenerics>>(leafColumns: Column<TGenerics_6>[], grouping: string[], groupedColumnMode?: GroupingColumnMode | undefined) => Column<TGenerics_6>[]; | ||
getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => GroupingOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => GroupingColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => GroupingInstance<TGenerics_3>; | ||
createRow: <TGenerics_4 extends AnyGenerics>(row: Row<TGenerics_4>, instance: TableInstance<TGenerics_4>) => GroupingRow; | ||
createCell: <TGenerics_5 extends AnyGenerics>(cell: Cell<TGenerics_5>, column: Column<TGenerics_5>, row: Row<TGenerics_5>, instance: TableInstance<TGenerics_5>) => GroupingCell<TGenerics_5>; | ||
orderColumns: <TGenerics_6 extends AnyGenerics>(leafColumns: Column<TGenerics_6>[], grouping: string[], groupedColumnMode?: GroupingColumnMode | undefined) => Column<TGenerics_6>[]; | ||
}; |
@@ -1,3 +0,3 @@ | ||
import { Cell, Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, PartialGenerics, PropGetterValue, TableInstance, Row } from '../types'; | ||
export declare type HeadersRow<TGenerics extends PartialGenerics> = { | ||
import { Cell, Column, FooterGroupProps, FooterProps, Getter, Header, HeaderGroup, HeaderGroupProps, HeaderProps, AnyGenerics, PropGetterValue, TableInstance, Row } from '../types'; | ||
export declare type HeadersRow<TGenerics extends AnyGenerics> = { | ||
_getAllVisibleCells: () => Cell<TGenerics>[]; | ||
@@ -9,3 +9,3 @@ getVisibleCells: () => Cell<TGenerics>[]; | ||
}; | ||
export declare type HeadersInstance<TGenerics extends PartialGenerics> = { | ||
export declare type HeadersInstance<TGenerics extends AnyGenerics> = { | ||
createHeader: (column: Column<TGenerics>, options: { | ||
@@ -41,5 +41,5 @@ id?: string; | ||
export declare const Headers: { | ||
createRow: <TGenerics extends Partial<import("../types").DefaultGenerics>>(row: Row<TGenerics>, instance: TableInstance<TGenerics>) => HeadersRow<TGenerics>; | ||
getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => HeadersInstance<TGenerics_1>; | ||
createRow: <TGenerics extends AnyGenerics>(row: Row<TGenerics>, instance: TableInstance<TGenerics>) => HeadersRow<TGenerics>; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => HeadersInstance<TGenerics_1>; | ||
}; | ||
export declare function buildHeaderGroups<TGenerics extends PartialGenerics>(allColumns: Column<TGenerics>[], columnsToGroup: Column<TGenerics>[], instance: TableInstance<TGenerics>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TGenerics>[]; | ||
export declare function buildHeaderGroups<TGenerics extends AnyGenerics>(allColumns: Column<TGenerics>[], columnsToGroup: Column<TGenerics>[], instance: TableInstance<TGenerics>, headerFamily?: 'center' | 'left' | 'right'): HeaderGroup<TGenerics>[]; |
@@ -1,2 +0,2 @@ | ||
import { TableInstance, OnChangeFn, Updater, Column, PartialGenerics } from '../types'; | ||
import { TableInstance, OnChangeFn, Updater, Column, AnyGenerics } from '../types'; | ||
export declare type ColumnOrderState = string[]; | ||
@@ -12,3 +12,3 @@ export declare type ColumnOrderTableState = { | ||
}; | ||
export declare type ColumnOrderInstance<TGenerics extends PartialGenerics> = { | ||
export declare type ColumnOrderInstance<TGenerics extends AnyGenerics> = { | ||
setColumnOrder: (updater: Updater<ColumnOrderState>) => void; | ||
@@ -20,4 +20,4 @@ resetColumnOrder: () => void; | ||
getInitialState: () => ColumnOrderTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnOrderDefaultOptions; | ||
getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => ColumnOrderInstance<TGenerics_1>; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnOrderDefaultOptions; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => ColumnOrderInstance<TGenerics_1>; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { OnChangeFn, PartialGenerics, TableInstance, RowModel, Updater } from '../types'; | ||
import { OnChangeFn, AnyGenerics, TableInstance, RowModel, Updater } from '../types'; | ||
export declare type PaginationState = { | ||
@@ -10,3 +10,3 @@ pageIndex: number; | ||
}; | ||
export declare type PaginationOptions<TGenerics extends PartialGenerics> = { | ||
export declare type PaginationOptions<TGenerics extends AnyGenerics> = { | ||
onPaginationChange?: OnChangeFn<PaginationState>; | ||
@@ -20,3 +20,3 @@ autoResetPageIndex?: boolean; | ||
}; | ||
export declare type PaginationInstance<TGenerics extends PartialGenerics> = { | ||
export declare type PaginationInstance<TGenerics extends AnyGenerics> = { | ||
_notifyPageIndexReset: () => void; | ||
@@ -41,4 +41,4 @@ setPagination: (updater: Updater<PaginationState>) => void; | ||
getInitialState: () => PaginationTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => PaginationDefaultOptions; | ||
getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => PaginationInstance<TGenerics_1>; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => PaginationDefaultOptions; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => PaginationInstance<TGenerics_1>; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { OnChangeFn, Updater, TableInstance, Column, PartialGenerics } from '../types'; | ||
import { OnChangeFn, Updater, TableInstance, Column, AnyGenerics } from '../types'; | ||
declare type ColumnPinningPosition = false | 'left' | 'right'; | ||
@@ -27,3 +27,3 @@ export declare type ColumnPinningState = { | ||
}; | ||
export declare type ColumnPinningInstance<TGenerics extends PartialGenerics> = { | ||
export declare type ColumnPinningInstance<TGenerics extends AnyGenerics> = { | ||
setColumnPinning: (updater: Updater<ColumnPinningState>) => void; | ||
@@ -39,6 +39,6 @@ resetColumnPinning: () => void; | ||
getInitialState: () => ColumnPinningTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => ColumnPinningDefaultOptions; | ||
createColumn: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => ColumnPinningColumn; | ||
getInstance: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_2>) => ColumnPinningInstance<TGenerics_2>; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => ColumnPinningDefaultOptions; | ||
createColumn: <TGenerics_1 extends AnyGenerics>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => ColumnPinningColumn; | ||
getInstance: <TGenerics_2 extends AnyGenerics>(instance: TableInstance<TGenerics_2>) => ColumnPinningInstance<TGenerics_2>; | ||
}; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types'; | ||
import { Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types'; | ||
export declare type RowSelectionState = Record<string, boolean>; | ||
@@ -6,3 +6,3 @@ export declare type RowSelectionTableState = { | ||
}; | ||
export declare type RowSelectionOptions<TGenerics extends PartialGenerics> = { | ||
export declare type RowSelectionOptions<TGenerics extends AnyGenerics> = { | ||
onRowSelectionChange?: OnChangeFn<RowSelectionState>; | ||
@@ -28,3 +28,3 @@ autoResetRowSelection?: boolean; | ||
}; | ||
export declare type RowSelectionInstance<TGenerics extends PartialGenerics> = { | ||
export declare type RowSelectionInstance<TGenerics extends AnyGenerics> = { | ||
_notifyRowSelectionReset: () => void; | ||
@@ -55,8 +55,8 @@ getToggleRowSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(rowId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>; | ||
getInitialState: () => RowSelectionTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => RowSelectionOptions<TGenerics>; | ||
getInstance: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => RowSelectionInstance<TGenerics_1>; | ||
createRow: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => RowSelectionRow; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => RowSelectionOptions<TGenerics>; | ||
getInstance: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => RowSelectionInstance<TGenerics_1>; | ||
createRow: <TGenerics_2 extends AnyGenerics>(row: Row<TGenerics_2>, instance: TableInstance<TGenerics_2>) => RowSelectionRow; | ||
}; | ||
export declare function selectRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>; | ||
export declare function isRowSelected<TGenerics extends PartialGenerics>(row: Row<TGenerics>, selection: Record<string, boolean>, instance: TableInstance<TGenerics>): boolean | 'some'; | ||
export declare function selectRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>; | ||
export declare function isRowSelected<TGenerics extends AnyGenerics>(row: Row<TGenerics>, selection: Record<string, boolean>, instance: TableInstance<TGenerics>): boolean | 'some'; | ||
export {}; |
import { MouseEvent, TouchEvent } from 'react'; | ||
import { RowModel } from '..'; | ||
import { BuiltInSortType } from '../sortTypes'; | ||
import { Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types'; | ||
import { Column, Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Row, Updater } from '../types'; | ||
import { Overwrite } from '../utils'; | ||
@@ -12,11 +12,11 @@ export declare type SortDirection = 'asc' | 'desc'; | ||
export declare type SortingState = ColumnSort[]; | ||
export declare type SortingFn<TGenerics extends PartialGenerics> = { | ||
export declare type SortingFn<TGenerics extends AnyGenerics> = { | ||
(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number; | ||
}; | ||
export declare type CustomSortingTypes<TGenerics extends PartialGenerics> = Record<string, SortingFn<TGenerics>>; | ||
export declare type CustomSortingTypes<TGenerics extends AnyGenerics> = Record<string, SortingFn<TGenerics>>; | ||
export declare type SortingTableState = { | ||
sorting: SortingState; | ||
}; | ||
export declare type SortType<TGenerics extends PartialGenerics> = 'auto' | BuiltInSortType | keyof TGenerics['SortingFns'] | SortingFn<TGenerics>; | ||
export declare type SortingColumnDef<TGenerics extends PartialGenerics> = { | ||
export declare type SortType<TGenerics extends AnyGenerics> = 'auto' | BuiltInSortType | keyof TGenerics['SortingFns'] | SortingFn<TGenerics>; | ||
export declare type SortingColumnDef<TGenerics extends AnyGenerics> = { | ||
sortType?: SortType<Overwrite<TGenerics, { | ||
@@ -32,3 +32,3 @@ Value: any; | ||
}; | ||
export declare type SortingColumn<TGenerics extends PartialGenerics> = { | ||
export declare type SortingColumn<TGenerics extends AnyGenerics> = { | ||
sortType: SortType<Overwrite<TGenerics, { | ||
@@ -45,3 +45,3 @@ Value: any; | ||
}; | ||
export declare type SortingOptions<TGenerics extends PartialGenerics> = { | ||
export declare type SortingOptions<TGenerics extends AnyGenerics> = { | ||
sortTypes?: TGenerics['SortingFns']; | ||
@@ -63,3 +63,3 @@ onSortingChange?: OnChangeFn<SortingState>; | ||
}; | ||
export declare type SortingInstance<TGenerics extends PartialGenerics> = { | ||
export declare type SortingInstance<TGenerics extends AnyGenerics> = { | ||
_notifySortingReset: () => void; | ||
@@ -81,7 +81,7 @@ getColumnAutoSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined; | ||
export declare const Sorting: { | ||
getDefaultColumn: <TGenerics extends Partial<import("..").DefaultGenerics>>() => SortingColumnDef<TGenerics>; | ||
getDefaultColumn: <TGenerics extends AnyGenerics>() => SortingColumnDef<TGenerics>; | ||
getInitialState: () => SortingTableState; | ||
getDefaultOptions: <TGenerics_1 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_1>) => SortingOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends Partial<import("..").DefaultGenerics>>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => SortingColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends Partial<import("..").DefaultGenerics>>(instance: TableInstance<TGenerics_3>) => SortingInstance<TGenerics_3>; | ||
getDefaultOptions: <TGenerics_1 extends AnyGenerics>(instance: TableInstance<TGenerics_1>) => SortingOptions<TGenerics_1>; | ||
createColumn: <TGenerics_2 extends AnyGenerics>(column: Column<TGenerics_2>, instance: TableInstance<TGenerics_2>) => SortingColumn<TGenerics_2>; | ||
getInstance: <TGenerics_3 extends AnyGenerics>(instance: TableInstance<TGenerics_3>) => SortingInstance<TGenerics_3>; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { Cell, Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types'; | ||
import { Cell, Column, Getter, OnChangeFn, AnyGenerics, PropGetterValue, TableInstance, Updater } from '../types'; | ||
export declare type VisibilityOptions = { | ||
@@ -13,3 +13,3 @@ onColumnVisibilityChange?: OnChangeFn<VisibilityState>; | ||
}; | ||
export declare type VisibilityInstance<TGenerics extends PartialGenerics> = { | ||
export declare type VisibilityInstance<TGenerics extends AnyGenerics> = { | ||
getVisibleFlatColumns: () => Column<TGenerics>[]; | ||
@@ -33,3 +33,3 @@ getVisibleLeafColumns: () => Column<TGenerics>[]; | ||
}; | ||
export declare type VisibilityRow<TGenerics extends PartialGenerics> = { | ||
export declare type VisibilityRow<TGenerics extends AnyGenerics> = { | ||
getVisibleCells: () => Cell<TGenerics>[]; | ||
@@ -45,9 +45,9 @@ }; | ||
getInitialState: () => VisibilityTableState; | ||
getDefaultOptions: <TGenerics extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics>) => VisibilityDefaultOptions; | ||
getDefaultOptions: <TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>) => VisibilityDefaultOptions; | ||
getDefaultColumn: () => { | ||
defaultIsVisible: boolean; | ||
}; | ||
createColumn: <TGenerics_1 extends Partial<import("../types").DefaultGenerics>>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => VisibilityColumn; | ||
getInstance: <TGenerics_2 extends Partial<import("../types").DefaultGenerics>>(instance: TableInstance<TGenerics_2>) => VisibilityInstance<TGenerics_2>; | ||
createColumn: <TGenerics_1 extends AnyGenerics>(column: Column<TGenerics_1>, instance: TableInstance<TGenerics_1>) => VisibilityColumn; | ||
getInstance: <TGenerics_2 extends AnyGenerics>(instance: TableInstance<TGenerics_2>) => VisibilityInstance<TGenerics_2>; | ||
}; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { PartialGenerics, Row } from './types'; | ||
import { AnyGenerics, Row } from './types'; | ||
export declare const filterTypes: { | ||
@@ -14,35 +14,35 @@ includesString: typeof includesString; | ||
export declare type BuiltInFilterType = keyof typeof filterTypes; | ||
declare function includesString<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function includesString<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace includesString { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function includesStringSensitive<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function includesStringSensitive<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace includesStringSensitive { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function equalsString<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function equalsString<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace equalsString { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function equalsStringSensitive<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function equalsStringSensitive<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace equalsStringSensitive { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function arrIncludes<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function arrIncludes<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace arrIncludes { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function arrIncludesAll<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown[]): Row<TGenerics>[]; | ||
declare function arrIncludesAll<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown[]): Row<TGenerics>[]; | ||
declare namespace arrIncludesAll { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function equals<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function equals<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace equals { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function weakEquals<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare function weakEquals<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: unknown): Row<TGenerics>[]; | ||
declare namespace weakEquals { | ||
var autoRemove: (val: any) => boolean; | ||
} | ||
declare function betweenNumberRange<TGenerics extends PartialGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: [unknown, unknown]): Row<TGenerics>[]; | ||
declare function betweenNumberRange<TGenerics extends AnyGenerics>(rows: Row<TGenerics>[], columnIds: string[], filterValue: [unknown, unknown]): Row<TGenerics>[]; | ||
declare namespace betweenNumberRange { | ||
@@ -49,0 +49,0 @@ var autoRemove: (val: any) => boolean; |
@@ -1,2 +0,2 @@ | ||
import { PartialGenerics, Row } from './types'; | ||
import { AnyGenerics, Row } from './types'; | ||
export declare const reSplitAlphaNumeric: RegExp; | ||
@@ -12,8 +12,8 @@ export declare const sortTypes: { | ||
export declare type BuiltInSortType = keyof typeof sortTypes; | ||
declare function alphanumeric<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number; | ||
declare function alphanumericCaseSensitive<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number; | ||
declare function text<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function textCaseSensitive<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function datetime<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function basic<TGenerics extends PartialGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function alphanumeric<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number; | ||
declare function alphanumericCaseSensitive<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number; | ||
declare function text<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function textCaseSensitive<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function datetime<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
declare function basic<TGenerics extends AnyGenerics>(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): 0 | 1 | -1; | ||
export {}; |
@@ -24,3 +24,3 @@ import { CoreColumn, CoreColumnDef, CoreOptions, CoreRow, TableCore } from './core'; | ||
export declare type AnyRender = (Comp: any, props: any) => any; | ||
export declare type UseRenderer<TGenerics extends PartialGenerics> = TGenerics['Render'] extends (...args: any) => any ? TGenerics['Render'] : any; | ||
export declare type UseRenderer<TGenerics extends AnyGenerics> = TGenerics['Render'] extends (...args: any) => any ? TGenerics['Render'] : any; | ||
export declare type PartialGenerics = Partial<DefaultGenerics>; | ||
@@ -30,12 +30,21 @@ export declare type AnyGenerics = { | ||
}; | ||
export declare type TableInstance<TGenerics extends PartialGenerics> = TableCore<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & HeadersInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>; | ||
export declare type Options<TGenerics extends PartialGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>; | ||
export declare type TableFeature = { | ||
getDefaultOptions?: (instance: any) => any; | ||
getInitialState?: () => any; | ||
getInstance?: (instance: any) => any; | ||
getDefaultColumn?: () => any; | ||
createColumn?: (column: any, instance: any) => any; | ||
createCell?: (cell: any, column: any, row: any, instance: any) => any; | ||
createRow?: (row: any, instance: any) => any; | ||
}; | ||
export declare type TableInstance<TGenerics extends AnyGenerics> = TableCore<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & HeadersInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>; | ||
export declare type Options<TGenerics extends AnyGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>; | ||
export declare type Updater<T> = T | ((old: T) => T); | ||
export declare type OnChangeFn<T> = (updaterOrValue: Updater<T>, value: T) => void; | ||
export declare type TableState = VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState; | ||
export declare type Row<TGenerics extends PartialGenerics> = CoreRow<TGenerics> & VisibilityRow<TGenerics> & HeadersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow; | ||
export declare type Row<TGenerics extends AnyGenerics> = CoreRow<TGenerics> & VisibilityRow<TGenerics> & HeadersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow; | ||
export declare type RowValues = { | ||
[key: string]: any; | ||
}; | ||
export declare type RowModel<TGenerics extends PartialGenerics> = { | ||
export declare type RowModel<TGenerics extends AnyGenerics> = { | ||
rows: Row<TGenerics>[]; | ||
@@ -46,7 +55,7 @@ flatRows: Row<TGenerics>[]; | ||
export declare type AccessorFn<TData> = (originalRow: TData, index: number) => any; | ||
export declare type Renderable<TGenerics extends PartialGenerics, TProps> = string | ((props: TProps) => ReturnType<UseRenderer<TGenerics>>); | ||
export declare type ColumnDef<TGenerics extends PartialGenerics> = CoreColumnDef<TGenerics> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TGenerics> & SortingColumnDef<TGenerics> & GroupingColumnDef<TGenerics> & ColumnSizingColumnDef; | ||
export declare type Column<TGenerics extends PartialGenerics> = ColumnDef<TGenerics> & CoreColumn<TGenerics> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TGenerics> & SortingColumn<TGenerics> & GroupingColumn<TGenerics> & ColumnSizingColumn<TGenerics>; | ||
export declare type Cell<TGenerics extends PartialGenerics> = CoreCell<TGenerics> & GroupingCell<TGenerics>; | ||
export declare type CoreCell<TGenerics extends PartialGenerics> = { | ||
export declare type Renderable<TGenerics extends AnyGenerics, TProps> = string | ((props: TProps) => ReturnType<UseRenderer<TGenerics>>); | ||
export declare type ColumnDef<TGenerics extends AnyGenerics> = CoreColumnDef<TGenerics> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TGenerics> & SortingColumnDef<TGenerics> & GroupingColumnDef<TGenerics> & ColumnSizingColumnDef; | ||
export declare type Column<TGenerics extends AnyGenerics> = ColumnDef<TGenerics> & CoreColumn<TGenerics> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TGenerics> & SortingColumn<TGenerics> & GroupingColumn<TGenerics> & ColumnSizingColumn<TGenerics>; | ||
export declare type Cell<TGenerics extends AnyGenerics> = CoreCell<TGenerics> & GroupingCell<TGenerics>; | ||
export declare type CoreCell<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
@@ -61,4 +70,4 @@ rowId: string; | ||
}; | ||
export declare type Header<TGenerics extends PartialGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>; | ||
export declare type CoreHeader<TGenerics extends PartialGenerics> = { | ||
export declare type Header<TGenerics extends AnyGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>; | ||
export declare type CoreHeader<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
@@ -83,3 +92,3 @@ depth: number; | ||
}; | ||
export declare type HeaderGroup<TGenerics extends PartialGenerics> = { | ||
export declare type HeaderGroup<TGenerics extends AnyGenerics> = { | ||
id: string; | ||
@@ -86,0 +95,0 @@ depth: number; |
{ | ||
"name": "@tanstack/table-core", | ||
"author": "Tanner Linsley", | ||
"version": "8.0.0-alpha.24", | ||
"version": "8.0.0-alpha.25", | ||
"description": "Hooks for building lightweight, fast and extendable datagrids for React", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -55,3 +55,4 @@ import { | ||
export type ColumnSizingInstance<TGenerics extends PartialGenerics> = { | ||
export type ColumnSizingInstance<TGenerics extends AnyGenerics> = { | ||
getColumnWidth: (columnId: string) => number | ||
setColumnSizing: (updater: Updater<ColumnSizing>) => void | ||
@@ -76,5 +77,8 @@ setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void | ||
defaultCanResize?: boolean | ||
width?: number | ||
minWidth?: number | ||
maxWidth?: number | ||
} | ||
export type ColumnSizingColumn<TGenerics extends PartialGenerics> = { | ||
export type ColumnSizingColumn<TGenerics extends AnyGenerics> = { | ||
getCanResize: () => boolean | ||
@@ -85,3 +89,3 @@ getIsResizing: () => boolean | ||
export type ColumnSizingHeader<TGenerics extends PartialGenerics> = { | ||
export type ColumnSizingHeader<TGenerics extends AnyGenerics> = { | ||
getCanResize: () => boolean | ||
@@ -104,2 +108,5 @@ getIsResizing: () => boolean | ||
export const ColumnSizing = { | ||
getDefaultColumn: (): ColumnSizingColumnDef => { | ||
return defaultColumnSizing | ||
}, | ||
getInitialState: (): ColumnSizingTableState => { | ||
@@ -119,3 +126,3 @@ return { | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -130,6 +137,23 @@ ): ColumnSizingDefaultOptions => { | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
): ColumnSizingInstance<TGenerics> => { | ||
return { | ||
getColumnWidth: (columnId: string) => { | ||
const column = instance.getColumn(columnId) | ||
if (!column) { | ||
throw new Error() | ||
} | ||
const columnSize = instance.getState().columnSizing[column.id] | ||
return Math.min( | ||
Math.max( | ||
column.minWidth ?? defaultColumnSizing.minWidth, | ||
columnSize ?? column.width ?? defaultColumnSizing.width | ||
), | ||
column.maxWidth ?? defaultColumnSizing.maxWidth | ||
) | ||
}, | ||
setColumnSizing: updater => | ||
@@ -382,3 +406,3 @@ instance.options.onColumnSizingChange?.( | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -394,3 +418,3 @@ instance: TableInstance<TGenerics> | ||
createHeader: <TGenerics extends PartialGenerics>( | ||
createHeader: <TGenerics extends AnyGenerics>( | ||
header: Header<TGenerics>, | ||
@@ -397,0 +421,0 @@ instance: TableInstance<TGenerics> |
@@ -30,3 +30,3 @@ import { MouseEvent, TouchEvent } from 'react' | ||
export type ExpandedOptions<TGenerics extends PartialGenerics> = { | ||
export type ExpandedOptions<TGenerics extends AnyGenerics> = { | ||
onExpandedChange?: OnChangeFn<ExpandedState> | ||
@@ -51,3 +51,3 @@ autoResetExpanded?: boolean | ||
export type ExpandedInstance<TGenerics extends PartialGenerics> = { | ||
export type ExpandedInstance<TGenerics extends AnyGenerics> = { | ||
_notifyExpandedReset: () => void | ||
@@ -83,3 +83,3 @@ setExpanded: (updater: Updater<ExpandedState>) => void | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -95,3 +95,3 @@ ): ExpandedOptions<TGenerics> => { | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -305,3 +305,3 @@ ): ExpandedInstance<TGenerics> => { | ||
createRow: <TGenerics extends PartialGenerics>( | ||
createRow: <TGenerics extends AnyGenerics>( | ||
row: Row<TGenerics>, | ||
@@ -308,0 +308,0 @@ instance: TableInstance<TGenerics> |
@@ -27,3 +27,3 @@ import { RowModel } from '..' | ||
export type FilterFn<TGenerics extends PartialGenerics> = { | ||
export type FilterFn<TGenerics extends AnyGenerics> = { | ||
(rows: Row<TGenerics>[], columnIds: string[], filterValue: any): any | ||
@@ -33,3 +33,3 @@ autoRemove?: ColumnFilterAutoRemoveTestFn<TGenerics> | ||
export type ColumnFilterAutoRemoveTestFn<TGenerics extends PartialGenerics> = ( | ||
export type ColumnFilterAutoRemoveTestFn<TGenerics extends AnyGenerics> = ( | ||
value: unknown, | ||
@@ -39,3 +39,3 @@ column?: Column<TGenerics> | ||
export type CustomFilterTypes<TGenerics extends PartialGenerics> = Record< | ||
export type CustomFilterTypes<TGenerics extends AnyGenerics> = Record< | ||
string, | ||
@@ -50,3 +50,3 @@ FilterFn<TGenerics> | ||
export type FilterType<TGenerics extends PartialGenerics> = | ||
export type FilterType<TGenerics extends AnyGenerics> = | ||
| 'auto' | ||
@@ -57,3 +57,3 @@ | BuiltInFilterType | ||
export type FiltersColumnDef<TGenerics extends PartialGenerics> = { | ||
export type FiltersColumnDef<TGenerics extends AnyGenerics> = { | ||
filterType?: FilterType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -68,3 +68,3 @@ enableAllFilters?: boolean | ||
export type FiltersColumn<TGenerics extends PartialGenerics> = { | ||
export type FiltersColumn<TGenerics extends AnyGenerics> = { | ||
filterType: FilterType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -82,3 +82,3 @@ getCanColumnFilter: () => boolean | ||
export type FiltersOptions<TGenerics extends PartialGenerics> = { | ||
export type FiltersOptions<TGenerics extends AnyGenerics> = { | ||
filterFromLeafRows?: boolean | ||
@@ -108,3 +108,3 @@ filterTypes?: TGenerics['FilterFns'] | ||
export type FiltersInstance<TGenerics extends PartialGenerics> = { | ||
export type FiltersInstance<TGenerics extends AnyGenerics> = { | ||
_notifyFiltersReset: () => void | ||
@@ -146,3 +146,3 @@ getColumnAutoFilterFn: (columnId: string) => FilterFn<TGenerics> | undefined | ||
getDefaultColumn: < | ||
TGenerics extends PartialGenerics | ||
TGenerics extends AnyGenerics | ||
>(): FiltersColumnDef<TGenerics> => { | ||
@@ -161,3 +161,3 @@ return { | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -182,3 +182,3 @@ ): FiltersOptions<TGenerics> => { | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -242,3 +242,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -568,3 +568,3 @@ ): FiltersInstance<TGenerics> => { | ||
export function shouldAutoRemoveFilter<TGenerics extends PartialGenerics>( | ||
export function shouldAutoRemoveFilter<TGenerics extends AnyGenerics>( | ||
filterFn?: FilterFn<TGenerics>, | ||
@@ -571,0 +571,0 @@ value?: any, |
@@ -15,2 +15,3 @@ import { RowModel } from '..' | ||
UseRenderer, | ||
AnyGenerics, | ||
} from '../types' | ||
@@ -28,3 +29,3 @@ import { | ||
export type AggregationFn<TGenerics extends PartialGenerics> = ( | ||
export type AggregationFn<TGenerics extends AnyGenerics> = ( | ||
getLeafValues: () => TGenerics['Row'][], | ||
@@ -34,3 +35,3 @@ getChildValues: () => TGenerics['Row'][] | ||
export type CustomAggregationTypes<TGenerics extends PartialGenerics> = Record< | ||
export type CustomAggregationTypes<TGenerics extends AnyGenerics> = Record< | ||
string, | ||
@@ -40,3 +41,3 @@ AggregationFn<TGenerics> | ||
export type AggregationType<TGenerics extends PartialGenerics> = | ||
export type AggregationType<TGenerics extends AnyGenerics> = | ||
| 'auto' | ||
@@ -51,3 +52,3 @@ | BuiltInAggregationType | ||
export type GroupingColumnDef<TGenerics extends PartialGenerics> = { | ||
export type GroupingColumnDef<TGenerics extends AnyGenerics> = { | ||
aggregationType?: AggregationType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -69,3 +70,3 @@ aggregateValue?: (columnValue: unknown) => any | ||
export type GroupingColumn<TGenerics extends PartialGenerics> = { | ||
export type GroupingColumn<TGenerics extends AnyGenerics> = { | ||
aggregationType?: AggregationType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -87,3 +88,3 @@ getCanGroup: () => boolean | ||
export type GroupingCell<TGenerics extends PartialGenerics> = { | ||
export type GroupingCell<TGenerics extends AnyGenerics> = { | ||
getIsGrouped: () => boolean | ||
@@ -102,3 +103,3 @@ getIsPlaceholder: () => boolean | ||
export type GroupingOptions<TGenerics extends PartialGenerics> = { | ||
export type GroupingOptions<TGenerics extends AnyGenerics> = { | ||
aggregationTypes?: TGenerics['AggregationFns'] | ||
@@ -124,3 +125,3 @@ onGroupingChange?: OnChangeFn<GroupingState> | ||
export type GroupingInstance<TGenerics extends PartialGenerics> = { | ||
export type GroupingInstance<TGenerics extends AnyGenerics> = { | ||
_notifyGroupingReset: () => void | ||
@@ -152,3 +153,3 @@ getColumnAutoAggregationFn: ( | ||
getDefaultColumn: < | ||
TGenerics extends PartialGenerics | ||
TGenerics extends AnyGenerics | ||
>(): GroupingColumnDef<TGenerics> => { | ||
@@ -166,3 +167,3 @@ return { | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -177,3 +178,3 @@ ): GroupingOptions<TGenerics> => { | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -193,3 +194,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -337,3 +338,3 @@ ): GroupingInstance<TGenerics> => { | ||
createRow: <TGenerics extends PartialGenerics>( | ||
createRow: <TGenerics extends AnyGenerics>( | ||
row: Row<TGenerics>, | ||
@@ -347,3 +348,3 @@ instance: TableInstance<TGenerics> | ||
createCell: <TGenerics extends PartialGenerics>( | ||
createCell: <TGenerics extends AnyGenerics>( | ||
cell: Cell<TGenerics>, | ||
@@ -378,3 +379,3 @@ column: Column<TGenerics>, | ||
orderColumns: <TGenerics extends PartialGenerics>( | ||
orderColumns: <TGenerics extends AnyGenerics>( | ||
leafColumns: Column<TGenerics>[], | ||
@@ -381,0 +382,0 @@ grouping: string[], |
@@ -21,3 +21,3 @@ import { | ||
export type HeadersRow<TGenerics extends PartialGenerics> = { | ||
export type HeadersRow<TGenerics extends AnyGenerics> = { | ||
_getAllVisibleCells: () => Cell<TGenerics>[] | ||
@@ -30,3 +30,3 @@ getVisibleCells: () => Cell<TGenerics>[] | ||
export type HeadersInstance<TGenerics extends PartialGenerics> = { | ||
export type HeadersInstance<TGenerics extends AnyGenerics> = { | ||
createHeader: ( | ||
@@ -85,3 +85,3 @@ column: Column<TGenerics>, | ||
export const Headers = { | ||
createRow: <TGenerics extends PartialGenerics>( | ||
createRow: <TGenerics extends AnyGenerics>( | ||
row: Row<TGenerics>, | ||
@@ -173,3 +173,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -614,3 +614,3 @@ ): HeadersInstance<TGenerics> => { | ||
export function buildHeaderGroups<TGenerics extends PartialGenerics>( | ||
export function buildHeaderGroups<TGenerics extends AnyGenerics>( | ||
allColumns: Column<TGenerics>[], | ||
@@ -617,0 +617,0 @@ columnsToGroup: Column<TGenerics>[], |
@@ -28,3 +28,3 @@ import { functionalUpdate, makeStateUpdater, memo } from '../utils' | ||
export type ColumnOrderInstance<TGenerics extends PartialGenerics> = { | ||
export type ColumnOrderInstance<TGenerics extends AnyGenerics> = { | ||
setColumnOrder: (updater: Updater<ColumnOrderState>) => void | ||
@@ -44,3 +44,3 @@ resetColumnOrder: () => void | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -53,3 +53,3 @@ ): ColumnOrderDefaultOptions => { | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -56,0 +56,0 @@ ): ColumnOrderInstance<TGenerics> => { |
@@ -21,3 +21,3 @@ import { | ||
export type PaginationOptions<TGenerics extends PartialGenerics> = { | ||
export type PaginationOptions<TGenerics extends AnyGenerics> = { | ||
onPaginationChange?: OnChangeFn<PaginationState> | ||
@@ -36,3 +36,3 @@ autoResetPageIndex?: boolean | ||
export type PaginationInstance<TGenerics extends PartialGenerics> = { | ||
export type PaginationInstance<TGenerics extends AnyGenerics> = { | ||
_notifyPageIndexReset: () => void | ||
@@ -69,3 +69,3 @@ setPagination: (updater: Updater<PaginationState>) => void | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -79,3 +79,3 @@ ): PaginationDefaultOptions => { | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -82,0 +82,0 @@ ): PaginationInstance<TGenerics> => { |
@@ -43,3 +43,3 @@ import { | ||
export type ColumnPinningInstance<TGenerics extends PartialGenerics> = { | ||
export type ColumnPinningInstance<TGenerics extends AnyGenerics> = { | ||
setColumnPinning: (updater: Updater<ColumnPinningState>) => void | ||
@@ -66,3 +66,3 @@ resetColumnPinning: () => void | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -75,3 +75,3 @@ ): ColumnPinningDefaultOptions => { | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -88,3 +88,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -91,0 +91,0 @@ ): ColumnPinningInstance<TGenerics> => { |
@@ -20,3 +20,3 @@ import { | ||
export type RowSelectionOptions<TGenerics extends PartialGenerics> = { | ||
export type RowSelectionOptions<TGenerics extends AnyGenerics> = { | ||
onRowSelectionChange?: OnChangeFn<RowSelectionState> | ||
@@ -64,3 +64,3 @@ autoResetRowSelection?: boolean | ||
export type RowSelectionInstance<TGenerics extends PartialGenerics> = { | ||
export type RowSelectionInstance<TGenerics extends AnyGenerics> = { | ||
_notifyRowSelectionReset: () => void | ||
@@ -111,3 +111,3 @@ getToggleRowSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>( | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -127,3 +127,3 @@ ): RowSelectionOptions<TGenerics> => { | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -542,3 +542,3 @@ ): RowSelectionInstance<TGenerics> => { | ||
createRow: <TGenerics extends PartialGenerics>( | ||
createRow: <TGenerics extends AnyGenerics>( | ||
row: Row<TGenerics>, | ||
@@ -559,3 +559,3 @@ instance: TableInstance<TGenerics> | ||
const mutateRowIsSelected = <TGenerics extends PartialGenerics>( | ||
const mutateRowIsSelected = <TGenerics extends AnyGenerics>( | ||
selectedRowIds: Record<string, boolean>, | ||
@@ -588,3 +588,3 @@ id: string, | ||
export function selectRowsFn<TGenerics extends PartialGenerics>( | ||
export function selectRowsFn<TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics>, | ||
@@ -630,3 +630,3 @@ rowModel: RowModel<TGenerics> | ||
export function isRowSelected<TGenerics extends PartialGenerics>( | ||
export function isRowSelected<TGenerics extends AnyGenerics>( | ||
row: Row<TGenerics>, | ||
@@ -633,0 +633,0 @@ selection: Record<string, boolean>, |
@@ -36,7 +36,7 @@ import { MouseEvent, TouchEvent } from 'react' | ||
export type SortingFn<TGenerics extends PartialGenerics> = { | ||
export type SortingFn<TGenerics extends AnyGenerics> = { | ||
(rowA: Row<TGenerics>, rowB: Row<TGenerics>, columnId: string): number | ||
} | ||
export type CustomSortingTypes<TGenerics extends PartialGenerics> = Record< | ||
export type CustomSortingTypes<TGenerics extends AnyGenerics> = Record< | ||
string, | ||
@@ -50,3 +50,3 @@ SortingFn<TGenerics> | ||
export type SortType<TGenerics extends PartialGenerics> = | ||
export type SortType<TGenerics extends AnyGenerics> = | ||
| 'auto' | ||
@@ -57,3 +57,3 @@ | BuiltInSortType | ||
export type SortingColumnDef<TGenerics extends PartialGenerics> = { | ||
export type SortingColumnDef<TGenerics extends AnyGenerics> = { | ||
sortType?: SortType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -68,3 +68,3 @@ sortDescFirst?: boolean | ||
export type SortingColumn<TGenerics extends PartialGenerics> = { | ||
export type SortingColumn<TGenerics extends AnyGenerics> = { | ||
sortType: SortType<Overwrite<TGenerics, { Value: any }>> | ||
@@ -82,3 +82,3 @@ getCanSort: () => boolean | ||
export type SortingOptions<TGenerics extends PartialGenerics> = { | ||
export type SortingOptions<TGenerics extends AnyGenerics> = { | ||
sortTypes?: TGenerics['SortingFns'] | ||
@@ -105,3 +105,3 @@ onSortingChange?: OnChangeFn<SortingState> | ||
export type SortingInstance<TGenerics extends PartialGenerics> = { | ||
export type SortingInstance<TGenerics extends AnyGenerics> = { | ||
_notifySortingReset: () => void | ||
@@ -136,3 +136,3 @@ getColumnAutoSortingFn: (columnId: string) => SortingFn<TGenerics> | undefined | ||
getDefaultColumn: < | ||
TGenerics extends PartialGenerics | ||
TGenerics extends AnyGenerics | ||
>(): SortingColumnDef<TGenerics> => { | ||
@@ -150,3 +150,3 @@ return { | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -163,3 +163,3 @@ ): SortingOptions<TGenerics> => { | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -182,3 +182,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -185,0 +185,0 @@ ): SortingInstance<TGenerics> => { |
@@ -29,3 +29,3 @@ import { | ||
export type VisibilityInstance<TGenerics extends PartialGenerics> = { | ||
export type VisibilityInstance<TGenerics extends AnyGenerics> = { | ||
getVisibleFlatColumns: () => Column<TGenerics>[] | ||
@@ -56,3 +56,3 @@ getVisibleLeafColumns: () => Column<TGenerics>[] | ||
export type VisibilityRow<TGenerics extends PartialGenerics> = { | ||
export type VisibilityRow<TGenerics extends AnyGenerics> = { | ||
getVisibleCells: () => Cell<TGenerics>[] | ||
@@ -79,3 +79,3 @@ } | ||
getDefaultOptions: <TGenerics extends PartialGenerics>( | ||
getDefaultOptions: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -94,3 +94,3 @@ ): VisibilityDefaultOptions => { | ||
createColumn: <TGenerics extends PartialGenerics>( | ||
createColumn: <TGenerics extends AnyGenerics>( | ||
column: Column<TGenerics>, | ||
@@ -119,3 +119,3 @@ instance: TableInstance<TGenerics> | ||
getInstance: <TGenerics extends PartialGenerics>( | ||
getInstance: <TGenerics extends AnyGenerics>( | ||
instance: TableInstance<TGenerics> | ||
@@ -122,0 +122,0 @@ ): VisibilityInstance<TGenerics> => { |
@@ -17,3 +17,3 @@ import { PartialGenerics, AnyGenerics, Row } from './types' | ||
function includesString<TGenerics extends PartialGenerics>( | ||
function includesString<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -35,3 +35,3 @@ columnIds: string[], | ||
function includesStringSensitive<TGenerics extends PartialGenerics>( | ||
function includesStringSensitive<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -53,3 +53,3 @@ columnIds: string[], | ||
function equalsString<TGenerics extends PartialGenerics>( | ||
function equalsString<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -73,3 +73,3 @@ columnIds: string[], | ||
function equalsStringSensitive<TGenerics extends PartialGenerics>( | ||
function equalsStringSensitive<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -90,3 +90,3 @@ columnIds: string[], | ||
function arrIncludes<TGenerics extends PartialGenerics>( | ||
function arrIncludes<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -106,3 +106,3 @@ columnIds: string[], | ||
function arrIncludesAll<TGenerics extends PartialGenerics>( | ||
function arrIncludesAll<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -126,3 +126,3 @@ columnIds: string[], | ||
function equals<TGenerics extends PartialGenerics>( | ||
function equals<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -142,3 +142,3 @@ columnIds: string[], | ||
function weakEquals<TGenerics extends PartialGenerics>( | ||
function weakEquals<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -159,3 +159,3 @@ columnIds: string[], | ||
function betweenNumberRange<TGenerics extends PartialGenerics>( | ||
function betweenNumberRange<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -162,0 +162,0 @@ columnIds: string[], |
@@ -16,3 +16,3 @@ import { PartialGenerics, AnyGenerics, Row } from './types' | ||
function alphanumeric<TGenerics extends PartialGenerics>( | ||
function alphanumeric<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -28,3 +28,3 @@ rowB: Row<TGenerics>, | ||
function alphanumericCaseSensitive<TGenerics extends PartialGenerics>( | ||
function alphanumericCaseSensitive<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -89,3 +89,3 @@ rowB: Row<TGenerics>, | ||
// but is much faster | ||
function text<TGenerics extends PartialGenerics>( | ||
function text<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -103,3 +103,3 @@ rowB: Row<TGenerics>, | ||
// but is much faster | ||
function textCaseSensitive<TGenerics extends PartialGenerics>( | ||
function textCaseSensitive<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -115,3 +115,3 @@ rowB: Row<TGenerics>, | ||
function datetime<TGenerics extends PartialGenerics>( | ||
function datetime<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -127,3 +127,3 @@ rowB: Row<TGenerics>, | ||
function basic<TGenerics extends PartialGenerics>( | ||
function basic<TGenerics extends AnyGenerics>( | ||
rowA: Row<TGenerics>, | ||
@@ -130,0 +130,0 @@ rowB: Row<TGenerics>, |
@@ -91,3 +91,3 @@ import { | ||
export type UseRenderer<TGenerics extends PartialGenerics> = | ||
export type UseRenderer<TGenerics extends AnyGenerics> = | ||
TGenerics['Render'] extends (...args: any) => any ? TGenerics['Render'] : any | ||
@@ -101,3 +101,13 @@ | ||
export type TableInstance<TGenerics extends PartialGenerics> = | ||
export type TableFeature = { | ||
getDefaultOptions?: (instance: any) => any | ||
getInitialState?: () => any | ||
getInstance?: (instance: any) => any | ||
getDefaultColumn?: () => any | ||
createColumn?: (column: any, instance: any) => any | ||
createCell?: (cell: any, column: any, row: any, instance: any) => any | ||
createRow?: (row: any, instance: any) => any | ||
} | ||
export type TableInstance<TGenerics extends AnyGenerics> = | ||
TableCore<TGenerics> & | ||
@@ -118,14 +128,13 @@ VisibilityInstance<TGenerics> & | ||
export type Options<TGenerics extends PartialGenerics> = | ||
CoreOptions<TGenerics> & | ||
VisibilityOptions & | ||
ColumnOrderOptions & | ||
ColumnPinningOptions & | ||
FiltersOptions<TGenerics> & | ||
SortingOptions<TGenerics> & | ||
GroupingOptions<TGenerics> & | ||
ExpandedOptions<TGenerics> & | ||
ColumnSizingOptions & | ||
PaginationOptions<TGenerics> & | ||
RowSelectionOptions<TGenerics> | ||
export type Options<TGenerics extends AnyGenerics> = CoreOptions<TGenerics> & | ||
VisibilityOptions & | ||
ColumnOrderOptions & | ||
ColumnPinningOptions & | ||
FiltersOptions<TGenerics> & | ||
SortingOptions<TGenerics> & | ||
GroupingOptions<TGenerics> & | ||
ExpandedOptions<TGenerics> & | ||
ColumnSizingOptions & | ||
PaginationOptions<TGenerics> & | ||
RowSelectionOptions<TGenerics> | ||
@@ -146,3 +155,3 @@ export type Updater<T> = T | ((old: T) => T) | ||
export type Row<TGenerics extends PartialGenerics> = CoreRow<TGenerics> & | ||
export type Row<TGenerics extends AnyGenerics> = CoreRow<TGenerics> & | ||
VisibilityRow<TGenerics> & | ||
@@ -158,3 +167,3 @@ HeadersRow<TGenerics> & | ||
export type RowModel<TGenerics extends PartialGenerics> = { | ||
export type RowModel<TGenerics extends AnyGenerics> = { | ||
rows: Row<TGenerics>[] | ||
@@ -167,3 +176,3 @@ flatRows: Row<TGenerics>[] | ||
// export type UserColumnDef<TGenerics extends PartialGenerics> = Overwrite< | ||
// export type UserColumnDef<TGenerics extends AnyGenerics> = Overwrite< | ||
// ColumnDef<TGenerics>, | ||
@@ -187,7 +196,7 @@ // GeneratedProperties<false> | ||
export type Renderable<TGenerics extends PartialGenerics, TProps> = | ||
export type Renderable<TGenerics extends AnyGenerics, TProps> = | ||
| string | ||
| ((props: TProps) => ReturnType<UseRenderer<TGenerics>>) | ||
export type ColumnDef<TGenerics extends PartialGenerics> = | ||
export type ColumnDef<TGenerics extends AnyGenerics> = | ||
CoreColumnDef<TGenerics> & | ||
@@ -201,3 +210,3 @@ VisibilityColumnDef & | ||
export type Column<TGenerics extends PartialGenerics> = ColumnDef<TGenerics> & | ||
export type Column<TGenerics extends AnyGenerics> = ColumnDef<TGenerics> & | ||
CoreColumn<TGenerics> & | ||
@@ -211,6 +220,6 @@ ColumnVisibilityColumn & | ||
export type Cell<TGenerics extends PartialGenerics> = CoreCell<TGenerics> & | ||
export type Cell<TGenerics extends AnyGenerics> = CoreCell<TGenerics> & | ||
GroupingCell<TGenerics> | ||
export type CoreCell<TGenerics extends PartialGenerics> = { | ||
export type CoreCell<TGenerics extends AnyGenerics> = { | ||
id: string | ||
@@ -226,6 +235,6 @@ rowId: string | ||
export type Header<TGenerics extends PartialGenerics> = CoreHeader<TGenerics> & | ||
export type Header<TGenerics extends AnyGenerics> = CoreHeader<TGenerics> & | ||
ColumnSizingHeader<TGenerics> | ||
export type CoreHeader<TGenerics extends PartialGenerics> = { | ||
export type CoreHeader<TGenerics extends AnyGenerics> = { | ||
id: string | ||
@@ -251,3 +260,3 @@ depth: number | ||
export type HeaderGroup<TGenerics extends PartialGenerics> = { | ||
export type HeaderGroup<TGenerics extends AnyGenerics> = { | ||
id: string | ||
@@ -254,0 +263,0 @@ depth: number |
@@ -158,3 +158,3 @@ import { | ||
function groupBy<TGenerics extends PartialGenerics>( | ||
function groupBy<TGenerics extends AnyGenerics>( | ||
rows: Row<TGenerics>[], | ||
@@ -161,0 +161,0 @@ columnId: string |
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 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 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
20988
2233553