Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/table-core

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/table-core - npm Package Compare versions

Comparing version 8.0.0-alpha.13 to 8.0.0-alpha.14

23

build/cjs/core.js

@@ -34,3 +34,3 @@ /**

if (options.debugAll || options.debugTable) {
console.info('Creating React Table Instance...');
console.info('Creating Table Instance...');
}

@@ -63,2 +63,13 @@

},
render: function render(template, props) {
if (typeof instance.options.render === 'function') {
return instance.options.render(template, props);
}
if (typeof template === 'function') {
return template(props);
}
return template;
},
getRowId: function getRowId(_, index, parent) {

@@ -256,3 +267,3 @@ return "" + (parent ? [parent.id, index].join('.') : index);

if (process.env.NODE_ENV !== 'production') {
console.warn("[React Table] Column with id " + columnId + " does not exist.");
console.warn("[Table] Column with id " + columnId + " does not exist.");
}

@@ -289,3 +300,3 @@

renderCell: function renderCell() {
return utils.flexRender(column.cell, {
return column.cell ? instance.render(column.cell, {
instance: instance,

@@ -296,3 +307,3 @@ column: column,

value: value
});
}) : null;
}

@@ -463,3 +474,3 @@ };

if (process.env.NODE_ENV !== 'production') {
throw new Error("[React Table] could not find row with id " + rowId);
throw new Error("[Table] could not find row with id " + rowId);
}

@@ -474,3 +485,3 @@

if (process.env.NODE_ENV !== 'production') {
throw new Error("[React Table] could not find cell " + columnId + " in row " + rowId);
throw new Error("[Table] could not find cell " + columnId + " in row " + rowId);
}

@@ -477,0 +488,0 @@

@@ -17,14 +17,23 @@ /**

function createTableFactory(opts) {
return function () {
return _createTable(undefined, undefined, opts);
//
function init(opts) {
return {
createTableFactory: function createTableFactory(options) {
return function () {
return _createTable(undefined, undefined, _rollupPluginBabelHelpers["extends"]({}, options, opts));
};
},
createTable: function createTable() {
return _createTable(undefined, undefined, opts);
}
};
}
function createTable() {
return _createTable();
}
function _createTable(_, __, __options) {
return {
__options: __options || {},
__options: __options != null ? __options : {
render: function render() {
throw new Error();
}
},
createColumns: function createColumns(columns) {

@@ -64,4 +73,3 @@ return columns;

exports.createTable = createTable;
exports.createTableFactory = createTableFactory;
exports.init = init;
//# sourceMappingURL=createTable.js.map

@@ -241,7 +241,7 @@ /**

onMouseDown: function onMouseDown(e) {
e.persist();
e.persist == null ? void 0 : e.persist();
onResizeStart(e);
},
onTouchStart: function onTouchStart(e) {
e.persist();
e.persist == null ? void 0 : e.persist();
onResizeStart(e);

@@ -248,0 +248,0 @@ }

@@ -110,3 +110,3 @@ /**

if (process.env.NODE_ENV !== 'production') {
console.warn("[ReactTable] getIsRowExpanded: no row found with id " + rowId);
console.warn("[Table] getIsRowExpanded: no row found with id " + rowId);
}

@@ -127,3 +127,3 @@

if (process.env.NODE_ENV !== 'production') {
console.warn("[ReactTable] getRowCanExpand: no row found with id " + rowId);
console.warn("[Table] getRowCanExpand: no row found with id " + rowId);
}

@@ -130,0 +130,0 @@

@@ -270,3 +270,3 @@ /**

if (process.env.NODE_ENV !== 'production') {
console.warn("React-Table: Could not find a column with id: " + columnId);
console.warn("Table: Could not find a column with id: " + columnId);
}

@@ -273,0 +273,0 @@

@@ -147,3 +147,2 @@ /**

onClick: canGroup ? function (e) {
e.persist();
column.toggleGrouping == null ? void 0 : column.toggleGrouping();

@@ -190,3 +189,3 @@ } : undefined

},
createCell: function createCell(cell, column, row, _instance) {
createCell: function createCell(cell, column, row, instance) {
return {

@@ -203,2 +202,14 @@ getIsGrouped: function getIsGrouped() {

return !cell.getIsGrouped() && !cell.getIsPlaceholder() && ((_row$subRows = row.subRows) == null ? void 0 : _row$subRows.length) > 1;
},
renderAggregatedCell: function renderAggregatedCell() {
var _column$aggregatedCel;
var template = (_column$aggregatedCel = column.aggregatedCell) != null ? _column$aggregatedCel : column.cell;
return template ? instance.render(template, {
instance: instance,
column: column,
row: row,
cell: cell,
value: cell.value
}) : null;
}

@@ -205,0 +216,0 @@ };

@@ -155,14 +155,14 @@ /**

renderHeader: function renderHeader() {
return utils.flexRender(column.header, {
return column.header ? instance.render(column.header, {
instance: instance,
header: header,
column: column
});
}) : null;
},
renderFooter: function renderFooter() {
return utils.flexRender(column.footer, {
return column.footer ? instance.render(column.footer, {
instance: instance,
header: header,
column: column
});
}) : null;
}

@@ -169,0 +169,0 @@ }; // Yes, we have to convert instance to unknown, because we know more than the compiler here.

@@ -41,4 +41,3 @@ /**

exports.Please_use_the_create_table_column_utilities_to_define_columns = types.Please_use_the_create_table_column_utilities_to_define_columns;
exports.createTable = createTable.createTable;
exports.createTableFactory = createTable.createTableFactory;
exports.init = createTable.init;
exports.ColumnSizing = ColumnSizing.ColumnSizing;

@@ -63,3 +62,2 @@ exports.defaultColumnSizing = ColumnSizing.defaultColumnSizing;

exports.flattenBy = utils.flattenBy;
exports.flexRender = utils.flexRender;
exports.functionalUpdate = utils.functionalUpdate;

@@ -66,0 +64,0 @@ exports.isFunction = utils.isFunction;

@@ -15,5 +15,2 @@ /**

// declare global {
// const process.env.NODE_ENV !== 'production': boolean
// }
//

@@ -20,0 +17,0 @@ var Please_use_the_create_table_column_utilities_to_define_columns = Symbol();

@@ -16,8 +16,3 @@ /**

var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
function functionalUpdate(updater, input) {

@@ -125,20 +120,2 @@ return typeof updater === 'function' ? updater(input) : updater;

};
}
function flexRender(Comp, props) {
return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React__default["default"].createElement(Comp, props) : Comp;
}
function isReactComponent(component) {
return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);
}
function isClassComponent(component) {
return typeof component === 'function' && function () {
var proto = Object.getPrototypeOf(component);
return proto.prototype && proto.prototype.isReactComponent;
}();
}
function isExoticComponent(component) {
return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);
} // export function hashString(str: string, seed = 0): string {

@@ -162,3 +139,2 @@ // let h1 = 0xdeadbeef ^ seed,

exports.flattenBy = flattenBy;
exports.flexRender = flexRender;
exports.functionalUpdate = functionalUpdate;

@@ -165,0 +141,0 @@ exports.isFunction = isFunction;

@@ -30,3 +30,3 @@ /**

if (process.env.NODE_ENV !== 'production') {
console.warn("React-Table: Could not find a column with id: " + columnId);
console.warn("Table: Could not find a column with id: " + columnId);
}

@@ -33,0 +33,0 @@

@@ -57,3 +57,3 @@ /**

});
throw new Error(process.env.NODE_ENV !== 'production' ? "React Table: Invalid column.aggregateType option for column listed above" : '');
throw new Error(process.env.NODE_ENV !== 'production' ? "Table: Invalid column.aggregateType option for column listed above" : '');
} else {

@@ -60,0 +60,0 @@ values[column.id] = null;

@@ -10,3 +10,3 @@ {

{
"uid": "5035-54",
"uid": "6958-53",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -18,7 +18,7 @@ },

{
"uid": "5035-56",
"uid": "6958-55",
"name": "utils.tsx"
},
{
"uid": "5035-58",
"uid": "6958-57",
"name": "types.ts"

@@ -30,43 +30,43 @@ },

{
"uid": "5035-60",
"uid": "6958-59",
"name": "Visibility.ts"
},
{
"uid": "5035-64",
"uid": "6958-63",
"name": "Grouping.ts"
},
{
"uid": "5035-66",
"uid": "6958-65",
"name": "Ordering.ts"
},
{
"uid": "5035-68",
"uid": "6958-67",
"name": "Pinning.ts"
},
{
"uid": "5035-70",
"uid": "6958-69",
"name": "ColumnSizing.ts"
},
{
"uid": "5035-72",
"uid": "6958-71",
"name": "Headers.ts"
},
{
"uid": "5035-76",
"uid": "6958-75",
"name": "Filters.ts"
},
{
"uid": "5035-80",
"uid": "6958-79",
"name": "Sorting.ts"
},
{
"uid": "5035-82",
"uid": "6958-81",
"name": "Expanding.ts"
},
{
"uid": "5035-84",
"uid": "6958-83",
"name": "Pagination.ts"
},
{
"uid": "5035-86",
"uid": "6958-85",
"name": "RowSelection.ts"

@@ -77,19 +77,19 @@ }

{
"uid": "5035-62",
"uid": "6958-61",
"name": "aggregationTypes.ts"
},
{
"uid": "5035-74",
"uid": "6958-73",
"name": "filterTypes.ts"
},
{
"uid": "5035-78",
"uid": "6958-77",
"name": "sortTypes.ts"
},
{
"uid": "5035-88",
"uid": "6958-87",
"name": "core.tsx"
},
{
"uid": "5035-90",
"uid": "6958-89",
"name": "createTable.tsx"

@@ -101,23 +101,23 @@ },

{
"uid": "5035-92",
"uid": "6958-91",
"name": "columnFilterRowsFn.ts"
},
{
"uid": "5035-94",
"uid": "6958-93",
"name": "globalFilterRowsFn.ts"
},
{
"uid": "5035-96",
"uid": "6958-95",
"name": "sortRowsFn.ts"
},
{
"uid": "5035-98",
"uid": "6958-97",
"name": "groupRowsFn.ts"
},
{
"uid": "5035-100",
"uid": "6958-99",
"name": "expandRowsFn.ts"
},
{
"uid": "5035-102",
"uid": "6958-101",
"name": "paginateRowsFn.ts"

@@ -128,3 +128,3 @@ }

{
"uid": "5035-104",
"uid": "6958-103",
"name": "index.tsx"

@@ -140,164 +140,164 @@ }

"nodeParts": {
"5035-54": {
"6958-53": {
"renderedLength": 2695,
"gzipLength": 1065,
"brotliLength": 0,
"mainUid": "5035-53"
"mainUid": "6958-52"
},
"5035-56": {
"renderedLength": 4669,
"gzipLength": 1600,
"6958-55": {
"renderedLength": 3906,
"gzipLength": 1358,
"brotliLength": 0,
"mainUid": "5035-55"
"mainUid": "6958-54"
},
"5035-58": {
"renderedLength": 166,
"gzipLength": 144,
"6958-57": {
"renderedLength": 85,
"gzipLength": 95,
"brotliLength": 0,
"mainUid": "5035-57"
"mainUid": "6958-56"
},
"5035-60": {
"6958-59": {
"renderedLength": 6367,
"gzipLength": 1219,
"brotliLength": 0,
"mainUid": "5035-59"
"mainUid": "6958-58"
},
"5035-62": {
"6958-61": {
"renderedLength": 2520,
"gzipLength": 755,
"brotliLength": 0,
"mainUid": "5035-61"
"mainUid": "6958-60"
},
"5035-64": {
"renderedLength": 7933,
"gzipLength": 1720,
"6958-63": {
"renderedLength": 8351,
"gzipLength": 1807,
"brotliLength": 0,
"mainUid": "5035-63"
"mainUid": "6958-62"
},
"5035-66": {
"6958-65": {
"renderedLength": 2639,
"gzipLength": 799,
"brotliLength": 0,
"mainUid": "5035-65"
"mainUid": "6958-64"
},
"5035-68": {
"6958-67": {
"renderedLength": 5479,
"gzipLength": 1030,
"brotliLength": 0,
"mainUid": "5035-67"
"mainUid": "6958-66"
},
"5035-70": {
"renderedLength": 10861,
"gzipLength": 2159,
"6958-69": {
"renderedLength": 10919,
"gzipLength": 2166,
"brotliLength": 0,
"mainUid": "5035-69"
"mainUid": "6958-68"
},
"5035-72": {
"renderedLength": 23599,
"gzipLength": 3363,
"6958-71": {
"renderedLength": 23655,
"gzipLength": 3372,
"brotliLength": 0,
"mainUid": "5035-71"
"mainUid": "6958-70"
},
"5035-74": {
"6958-73": {
"renderedLength": 4437,
"gzipLength": 786,
"brotliLength": 0,
"mainUid": "5035-73"
"mainUid": "6958-72"
},
"5035-76": {
"6958-75": {
"renderedLength": 16477,
"gzipLength": 2909,
"brotliLength": 0,
"mainUid": "5035-75"
"mainUid": "6958-74"
},
"5035-78": {
"6958-77": {
"renderedLength": 2752,
"gzipLength": 846,
"brotliLength": 0,
"mainUid": "5035-77"
"mainUid": "6958-76"
},
"5035-80": {
"6958-79": {
"renderedLength": 12092,
"gzipLength": 2589,
"brotliLength": 0,
"mainUid": "5035-79"
"mainUid": "6958-78"
},
"5035-82": {
"6958-81": {
"renderedLength": 7896,
"gzipLength": 1718,
"brotliLength": 0,
"mainUid": "5035-81"
"mainUid": "6958-80"
},
"5035-84": {
"6958-83": {
"renderedLength": 6386,
"gzipLength": 1279,
"brotliLength": 0,
"mainUid": "5035-83"
"mainUid": "6958-82"
},
"5035-86": {
"6958-85": {
"renderedLength": 18164,
"gzipLength": 3123,
"brotliLength": 0,
"mainUid": "5035-85"
"mainUid": "6958-84"
},
"5035-88": {
"renderedLength": 17695,
"gzipLength": 3452,
"6958-87": {
"renderedLength": 18020,
"gzipLength": 3510,
"brotliLength": 0,
"mainUid": "5035-87"
"mainUid": "6958-86"
},
"5035-90": {
"renderedLength": 1145,
"gzipLength": 364,
"6958-89": {
"renderedLength": 1417,
"gzipLength": 402,
"brotliLength": 0,
"mainUid": "5035-89"
"mainUid": "6958-88"
},
"5035-92": {
"6958-91": {
"renderedLength": 3174,
"gzipLength": 863,
"brotliLength": 0,
"mainUid": "5035-91"
"mainUid": "6958-90"
},
"5035-94": {
"6958-93": {
"renderedLength": 2540,
"gzipLength": 721,
"brotliLength": 0,
"mainUid": "5035-93"
"mainUid": "6958-92"
},
"5035-96": {
"6958-95": {
"renderedLength": 2436,
"gzipLength": 818,
"brotliLength": 0,
"mainUid": "5035-95"
"mainUid": "6958-94"
},
"5035-98": {
"6958-97": {
"renderedLength": 4814,
"gzipLength": 1358,
"brotliLength": 0,
"mainUid": "5035-97"
"mainUid": "6958-96"
},
"5035-100": {
"6958-99": {
"renderedLength": 595,
"gzipLength": 266,
"brotliLength": 0,
"mainUid": "5035-99"
"mainUid": "6958-98"
},
"5035-102": {
"6958-101": {
"renderedLength": 720,
"gzipLength": 281,
"brotliLength": 0,
"mainUid": "5035-101"
"mainUid": "6958-100"
},
"5035-104": {
"6958-103": {
"renderedLength": 0,
"gzipLength": 0,
"brotliLength": 0,
"mainUid": "5035-103"
"mainUid": "6958-102"
}
},
"nodeMetas": {
"5035-53": {
"6958-52": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "5035-54"
"index.production.js": "6958-53"
},

@@ -307,44 +307,41 @@ "imported": [],

{
"uid": "5035-87"
"uid": "6958-86"
},
{
"uid": "5035-89"
"uid": "6958-88"
},
{
"uid": "5035-69"
"uid": "6958-68"
},
{
"uid": "5035-81"
"uid": "6958-80"
},
{
"uid": "5035-83"
"uid": "6958-82"
},
{
"uid": "5035-85"
"uid": "6958-84"
},
{
"uid": "5035-79"
"uid": "6958-78"
},
{
"uid": "5035-59"
"uid": "6958-58"
},
{
"uid": "5035-55"
"uid": "6958-54"
},
{
"uid": "5035-61"
"uid": "6958-60"
}
]
},
"5035-55": {
"6958-54": {
"id": "/packages/table-core/src/utils.tsx",
"moduleParts": {
"index.production.js": "5035-56"
"index.production.js": "6958-55"
},
"imported": [
{
"uid": "5035-53"
},
{
"uid": "5035-105"
"uid": "6958-52"
}

@@ -354,49 +351,49 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
},
{
"uid": "5035-69"
"uid": "6958-68"
},
{
"uid": "5035-81"
"uid": "6958-80"
},
{
"uid": "5035-75"
"uid": "6958-74"
},
{
"uid": "5035-63"
"uid": "6958-62"
},
{
"uid": "5035-71"
"uid": "6958-70"
},
{
"uid": "5035-65"
"uid": "6958-64"
},
{
"uid": "5035-83"
"uid": "6958-82"
},
{
"uid": "5035-67"
"uid": "6958-66"
},
{
"uid": "5035-85"
"uid": "6958-84"
},
{
"uid": "5035-79"
"uid": "6958-78"
},
{
"uid": "5035-59"
"uid": "6958-58"
},
{
"uid": "5035-97"
"uid": "6958-96"
}
]
},
"5035-57": {
"6958-56": {
"id": "/packages/table-core/src/types.ts",
"moduleParts": {
"index.production.js": "5035-58"
"index.production.js": "6958-57"
},

@@ -406,20 +403,20 @@ "imported": [],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-59": {
"6958-58": {
"id": "/packages/table-core/src/features/Visibility.ts",
"moduleParts": {
"index.production.js": "5035-60"
"index.production.js": "6958-59"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -429,17 +426,17 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-61": {
"6958-60": {
"id": "/packages/table-core/src/aggregationTypes.ts",
"moduleParts": {
"index.production.js": "5035-62"
"index.production.js": "6958-61"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
}

@@ -449,17 +446,17 @@ ],

{
"uid": "5035-63"
"uid": "6958-62"
}
]
},
"5035-63": {
"6958-62": {
"id": "/packages/table-core/src/features/Grouping.ts",
"moduleParts": {
"index.production.js": "5035-64"
"index.production.js": "6958-63"
},
"imported": [
{
"uid": "5035-61"
"uid": "6958-60"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -469,23 +466,23 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
},
{
"uid": "5035-65"
"uid": "6958-64"
}
]
},
"5035-65": {
"6958-64": {
"id": "/packages/table-core/src/features/Ordering.ts",
"moduleParts": {
"index.production.js": "5035-66"
"index.production.js": "6958-65"
},
"imported": [
{
"uid": "5035-55"
"uid": "6958-54"
},
{
"uid": "5035-63"
"uid": "6958-62"
}

@@ -495,17 +492,17 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-67": {
"6958-66": {
"id": "/packages/table-core/src/features/Pinning.ts",
"moduleParts": {
"index.production.js": "5035-68"
"index.production.js": "6958-67"
},
"imported": [
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -515,20 +512,20 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-69": {
"6958-68": {
"id": "/packages/table-core/src/features/ColumnSizing.ts",
"moduleParts": {
"index.production.js": "5035-70"
"index.production.js": "6958-69"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -538,23 +535,23 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
},
{
"uid": "5035-71"
"uid": "6958-70"
}
]
},
"5035-71": {
"6958-70": {
"id": "/packages/table-core/src/features/Headers.ts",
"moduleParts": {
"index.production.js": "5035-72"
"index.production.js": "6958-71"
},
"imported": [
{
"uid": "5035-55"
"uid": "6958-54"
},
{
"uid": "5035-69"
"uid": "6958-68"
}

@@ -564,13 +561,13 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-73": {
"6958-72": {
"id": "/packages/table-core/src/filterTypes.ts",
"moduleParts": {
"index.production.js": "5035-74"
"index.production.js": "6958-73"
},

@@ -580,17 +577,17 @@ "imported": [],

{
"uid": "5035-75"
"uid": "6958-74"
}
]
},
"5035-75": {
"6958-74": {
"id": "/packages/table-core/src/features/Filters.ts",
"moduleParts": {
"index.production.js": "5035-76"
"index.production.js": "6958-75"
},
"imported": [
{
"uid": "5035-73"
"uid": "6958-72"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -600,13 +597,13 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-77": {
"6958-76": {
"id": "/packages/table-core/src/sortTypes.ts",
"moduleParts": {
"index.production.js": "5035-78"
"index.production.js": "6958-77"
},

@@ -616,20 +613,20 @@ "imported": [],

{
"uid": "5035-79"
"uid": "6958-78"
}
]
},
"5035-79": {
"6958-78": {
"id": "/packages/table-core/src/features/Sorting.ts",
"moduleParts": {
"index.production.js": "5035-80"
"index.production.js": "6958-79"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-77"
"uid": "6958-76"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -639,20 +636,20 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-81": {
"6958-80": {
"id": "/packages/table-core/src/features/Expanding.ts",
"moduleParts": {
"index.production.js": "5035-82"
"index.production.js": "6958-81"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -662,20 +659,20 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-83": {
"6958-82": {
"id": "/packages/table-core/src/features/Pagination.ts",
"moduleParts": {
"index.production.js": "5035-84"
"index.production.js": "6958-83"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -685,20 +682,20 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-85": {
"6958-84": {
"id": "/packages/table-core/src/features/RowSelection.ts",
"moduleParts": {
"index.production.js": "5035-86"
"index.production.js": "6958-85"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -708,56 +705,56 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-87"
"uid": "6958-86"
}
]
},
"5035-87": {
"6958-86": {
"id": "/packages/table-core/src/core.tsx",
"moduleParts": {
"index.production.js": "5035-88"
"index.production.js": "6958-87"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
},
{
"uid": "5035-55"
"uid": "6958-54"
},
{
"uid": "5035-57"
"uid": "6958-56"
},
{
"uid": "5035-59"
"uid": "6958-58"
},
{
"uid": "5035-65"
"uid": "6958-64"
},
{
"uid": "5035-67"
"uid": "6958-66"
},
{
"uid": "5035-71"
"uid": "6958-70"
},
{
"uid": "5035-75"
"uid": "6958-74"
},
{
"uid": "5035-79"
"uid": "6958-78"
},
{
"uid": "5035-63"
"uid": "6958-62"
},
{
"uid": "5035-81"
"uid": "6958-80"
},
{
"uid": "5035-69"
"uid": "6958-68"
},
{
"uid": "5035-83"
"uid": "6958-82"
},
{
"uid": "5035-85"
"uid": "6958-84"
}

@@ -767,14 +764,14 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-89": {
"6958-88": {
"id": "/packages/table-core/src/createTable.tsx",
"moduleParts": {
"index.production.js": "5035-90"
"index.production.js": "6958-89"
},
"imported": [
{
"uid": "5035-53"
"uid": "6958-52"
}

@@ -784,10 +781,10 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-91": {
"6958-90": {
"id": "/packages/table-core/src/utils/columnFilterRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-92"
"index.production.js": "6958-91"
},

@@ -797,10 +794,10 @@ "imported": [],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-93": {
"6958-92": {
"id": "/packages/table-core/src/utils/globalFilterRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-94"
"index.production.js": "6958-93"
},

@@ -810,10 +807,10 @@ "imported": [],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-95": {
"6958-94": {
"id": "/packages/table-core/src/utils/sortRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-96"
"index.production.js": "6958-95"
},

@@ -823,14 +820,14 @@ "imported": [],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-97": {
"6958-96": {
"id": "/packages/table-core/src/utils/groupRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-98"
"index.production.js": "6958-97"
},
"imported": [
{
"uid": "5035-55"
"uid": "6958-54"
}

@@ -840,10 +837,10 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-99": {
"6958-98": {
"id": "/packages/table-core/src/utils/expandRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-100"
"index.production.js": "6958-99"
},

@@ -853,17 +850,17 @@ "imported": [],

{
"uid": "5035-103"
"uid": "6958-102"
},
{
"uid": "5035-101"
"uid": "6958-100"
}
]
},
"5035-101": {
"6958-100": {
"id": "/packages/table-core/src/utils/paginateRowsFn.ts",
"moduleParts": {
"index.production.js": "5035-102"
"index.production.js": "6958-101"
},
"imported": [
{
"uid": "5035-99"
"uid": "6958-98"
}

@@ -873,74 +870,74 @@ ],

{
"uid": "5035-103"
"uid": "6958-102"
}
]
},
"5035-103": {
"6958-102": {
"id": "/packages/table-core/src/index.tsx",
"moduleParts": {
"index.production.js": "5035-104"
"index.production.js": "6958-103"
},
"imported": [
{
"uid": "5035-87"
"uid": "6958-86"
},
{
"uid": "5035-57"
"uid": "6958-56"
},
{
"uid": "5035-89"
"uid": "6958-88"
},
{
"uid": "5035-69"
"uid": "6958-68"
},
{
"uid": "5035-81"
"uid": "6958-80"
},
{
"uid": "5035-75"
"uid": "6958-74"
},
{
"uid": "5035-63"
"uid": "6958-62"
},
{
"uid": "5035-71"
"uid": "6958-70"
},
{
"uid": "5035-65"
"uid": "6958-64"
},
{
"uid": "5035-83"
"uid": "6958-82"
},
{
"uid": "5035-67"
"uid": "6958-66"
},
{
"uid": "5035-85"
"uid": "6958-84"
},
{
"uid": "5035-79"
"uid": "6958-78"
},
{
"uid": "5035-59"
"uid": "6958-58"
},
{
"uid": "5035-55"
"uid": "6958-54"
},
{
"uid": "5035-91"
"uid": "6958-90"
},
{
"uid": "5035-93"
"uid": "6958-92"
},
{
"uid": "5035-95"
"uid": "6958-94"
},
{
"uid": "5035-97"
"uid": "6958-96"
},
{
"uid": "5035-99"
"uid": "6958-98"
},
{
"uid": "5035-101"
"uid": "6958-100"
}

@@ -950,13 +947,2 @@ ],

"isEntry": true
},
"5035-105": {
"id": "react",
"moduleParts": {},
"imported": [],
"importedBy": [
{
"uid": "5035-55"
}
],
"isExternal": true
}

@@ -963,0 +949,0 @@ },

import { RequiredKeys } from './utils';
import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, Renderable, Please_use_the_create_table_column_utilities_to_define_columns, PartialGenerics } from './types';
import { Updater, PropGetterValue, Options, TableState, ColumnDef, Row, Column, Cell, Header, AccessorFn, TableProps, TableBodyProps, PropGetter, Getter, RowProps, CellProps, TableInstance, RowValues, Please_use_the_create_table_column_utilities_to_define_columns, PartialGenerics, Renderable, UseRenderer } from './types';
import { RowModel } from '.';

@@ -9,2 +9,3 @@ export declare type CoreOptions<TGenerics extends PartialGenerics> = {

onStateChange: (updater: Updater<TableState>) => void;
render: TGenerics['Render'];
debugAll?: boolean;

@@ -53,2 +54,3 @@ debugTable?: boolean;

getRightTableWidth: () => number;
render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | ReturnType<UseRenderer<TGenerics>>;
};

@@ -72,7 +74,2 @@ export declare type CoreRow<TGenerics extends PartialGenerics> = {

accessorFn?: AccessorFn<TGenerics['Row']>;
header?: string | Renderable<{
instance: TableInstance<TGenerics>;
header: Header<TGenerics>;
column: Column<TGenerics>;
}>;
width?: number;

@@ -82,3 +79,3 @@ minWidth?: number;

columns?: ColumnDef<TGenerics>[];
footer?: Renderable<{
header?: Renderable<TGenerics, {
instance: TableInstance<TGenerics>;

@@ -88,4 +85,9 @@ header: Header<TGenerics>;

}>;
cell?: Renderable<{
footer?: Renderable<TGenerics, {
instance: TableInstance<TGenerics>;
header: Header<TGenerics>;
column: Column<TGenerics>;
}>;
cell?: Renderable<TGenerics, {
instance: TableInstance<TGenerics>;
row: Row<TGenerics>;

@@ -96,3 +98,3 @@ column: Column<TGenerics>;

}>;
defaultIsVisible?: boolean;
meta?: TGenerics['ColumnMeta'];
[Please_use_the_create_table_column_utilities_to_define_columns]: true;

@@ -99,0 +101,0 @@ };

import { CustomFilterTypes } from './features/Filters';
import { CustomAggregationTypes } from './features/Grouping';
import { CustomSortingTypes } from './features/Sorting';
import { ColumnDef, AccessorFn, DefaultGenerics, PartialGenerics, _NonGenerated } from './types';
import { ColumnDef, AccessorFn, PartialGenerics, _NonGenerated, AnyRender } from './types';
import { Overwrite, PartialKeys } from './utils';
export declare type CreatTableFactory<TGenerics extends Partial<DefaultGenerics>> = <TRow>() => TableFactory<Overwrite<TGenerics, {
Row: TRow;
export declare type CreateTableFactory<TGenerics extends PartialGenerics> = <TSubGenerics extends {
Row: any;
ColumnMeta?: object;
}>() => Table<Overwrite<TGenerics, {
Row: TSubGenerics['Row'];
ColumnMeta: TSubGenerics['ColumnMeta'];
}>>;
export declare type CreateTableFactoryOptions<TFilterFns extends CustomFilterTypes<any>, TSortingFns extends CustomSortingTypes<any>, TAggregationFns extends CustomAggregationTypes<any>> = {
export declare type CreateTableFactoryOptions<TRender extends AnyRender, TFilterFns extends CustomFilterTypes<any>, TSortingFns extends CustomSortingTypes<any>, TAggregationFns extends CustomAggregationTypes<any>> = {
render: TRender;
filterFns?: TFilterFns;

@@ -14,9 +19,4 @@ sortingFns?: TSortingFns;

};
export declare function createTableFactory<TFilterFns extends CustomFilterTypes<any>, TSortingFns extends CustomSortingTypes<any>, TAggregationFns extends CustomAggregationTypes<any>>(opts: CreateTableFactoryOptions<TFilterFns, TSortingFns, TAggregationFns>): CreatTableFactory<Overwrite<PartialGenerics, {
FilterFns: TFilterFns;
SortingFns: TSortingFns;
AggregationFns: TAggregationFns;
}>>;
export declare type TableFactory<TGenerics extends Partial<DefaultGenerics>> = {
__options: CreateTableFactoryOptions<any, any, any>;
export declare type Table<TGenerics extends PartialGenerics> = {
__options: CreateTableFactoryOptions<any, any, any, any>;
createColumns: (columns: ColumnDef<TGenerics>[]) => ColumnDef<TGenerics>[];

@@ -32,2 +32,3 @@ createGroup: (column: Overwrite<Overwrite<_NonGenerated<ColumnDef<TGenerics>>, {

accessorKey?: never;
columns?: ColumnDef<any>[];
}>) => ColumnDef<TGenerics>;

@@ -48,4 +49,13 @@ createDisplayColumn: (column: PartialKeys<_NonGenerated<ColumnDef<TGenerics>>, 'accessorFn' | 'accessorKey'>) => ColumnDef<TGenerics>;

};
export declare function createTable<TRow>(): TableFactory<Overwrite<Partial<DefaultGenerics>, {
Row: TRow;
}>>;
declare type InitTable<TRender extends AnyRender> = {
createTableFactory: <TGenerics extends PartialGenerics>(options?: CreateTableFactoryOptions<TRender, any, any, any>) => CreateTableFactory<Overwrite<TGenerics, {
Render: TRender;
}>>;
createTable: CreateTableFactory<Overwrite<PartialGenerics, {
Render: TRender;
}>>;
};
export declare function init<TRender extends AnyRender>(opts: {
render: TRender;
}): InitTable<TRender>;
export {};

@@ -1,2 +0,1 @@

import { MouseEvent as ReactMouseEvent, TouchEvent as ReactTouchEvent } from 'react';
import { Column, Getter, Header, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types';

@@ -30,4 +29,4 @@ export declare type ColumnSizing = Record<string, number>;

title?: string;
onMouseDown?: (e: ReactMouseEvent) => void;
onTouchStart?: (e: ReactTouchEvent) => void;
onMouseDown?: (e: MouseEvent) => void;
onTouchStart?: (e: TouchEvent) => void;
draggable?: boolean;

@@ -34,0 +33,0 @@ role?: string;

@@ -1,5 +0,4 @@

import React, { MouseEvent, TouchEvent } from 'react';
import { RowModel } from '..';
import { BuiltInAggregationType } from '../aggregationTypes';
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, PartialGenerics } from '../types';
import { Cell, Column, Getter, OnChangeFn, PropGetterValue, TableInstance, Row, Updater, PartialGenerics, Renderable, UseRenderer } from '../types';
import { Overwrite } from '../utils';

@@ -18,3 +17,9 @@ export declare type GroupingState = string[];

aggregateValue?: (columnValue: unknown) => any;
renderAggregatedCell?: () => React.ReactNode;
aggregatedCell?: Renderable<TGenerics, {
instance: TableInstance<TGenerics>;
row: Row<TGenerics>;
column: Column<TGenerics>;
cell: Cell<TGenerics>;
value: TGenerics['Value'];
}>;
enableGrouping?: boolean;

@@ -38,6 +43,7 @@ defaultCanGroup?: boolean;

};
export declare type GroupingCell = {
export declare type GroupingCell<TGenerics extends PartialGenerics> = {
getIsGrouped: () => boolean;
getIsPlaceholder: () => boolean;
getIsAggregated: () => boolean;
renderAggregatedCell: () => string | null | ReturnType<UseRenderer<TGenerics>>;
};

@@ -85,4 +91,4 @@ export declare type ColumnDefaultOptions = {

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> & GroupingCell, column: Column<TGenerics_5>, row: Row<TGenerics_5>, _instance: TableInstance<TGenerics_5>) => GroupingCell;
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>[];
};

@@ -1,3 +0,2 @@

import { MouseEvent, TouchEvent } from 'react';
import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater } from '../types';
import { Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Row, RowModel, Updater, AnyGenerics } from '../types';
export declare type RowSelectionState = Record<string, boolean>;

@@ -58,4 +57,4 @@ export declare type RowSelectionTableState = {

};
export declare function selectRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
export declare function selectRowsFn<TGenerics extends AnyGenerics>(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 {};

@@ -30,2 +30,3 @@ import { Cell, Column, Getter, OnChangeFn, PartialGenerics, PropGetterValue, TableInstance, Updater } from '../types';

defaultCanHide?: boolean;
defaultIsVisible?: boolean;
};

@@ -32,0 +33,0 @@ export declare type VisibilityRow<TGenerics extends PartialGenerics> = {

@@ -1,2 +0,1 @@

import React from 'react';
import { CoreColumn, CoreColumnDef, CoreOptions, CoreRow, TableCore } from './core';

@@ -9,3 +8,3 @@ import { VisibilityInstance, VisibilityTableState, VisibilityColumn as ColumnVisibilityColumn, VisibilityOptions, VisibilityColumnDef, VisibilityRow } from './features/Visibility';

import { SortingColumn, SortingColumnDef, SortingInstance, SortingOptions, SortingTableState } from './features/Sorting';
import { GroupingColumn, GroupingColumnDef, GroupingInstance, GroupingOptions, GroupingRow, GroupingTableState } from './features/Grouping';
import { GroupingCell, GroupingColumn, GroupingColumnDef, GroupingInstance, GroupingOptions, GroupingRow, GroupingTableState } from './features/Grouping';
import { ExpandedInstance, ExpandedOptions, ExpandedTableState, ExpandedRow } from './features/Expanding';

@@ -22,6 +21,12 @@ import { Overwrite } from './utils';

AggregationFns: object;
Render: unknown;
ColumnMeta: object;
};
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 PartialGenerics = Partial<DefaultGenerics>;
export declare type AnyGenerics = {
[TKey in keyof PartialGenerics]: any;
};
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 Renderable<TProps> = React.ReactNode | React.FunctionComponent<TProps> | React.Component<TProps>;
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>;

@@ -45,5 +50,7 @@ export declare type Updater<T> = T | ((old: T) => T);

}>;
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> = {
export declare type Cell<TGenerics extends PartialGenerics> = CoreCell<TGenerics> & GroupingCell<TGenerics>;
export declare type CoreCell<TGenerics extends PartialGenerics> = {
id: string;

@@ -56,3 +63,3 @@ rowId: string;

getCellProps: PropGetter<CellProps>;
renderCell: () => React.ReactNode;
renderCell: () => string | null | ReturnType<UseRenderer<TGenerics>>;
};

@@ -75,6 +82,6 @@ export declare type Header<TGenerics extends PartialGenerics> = CoreHeader<TGenerics> & ColumnSizingHeader<TGenerics>;

renderPlaceholder?: boolean;
}) => React.ReactNode;
}) => string | null | ReturnType<UseRenderer<TGenerics>>;
renderFooter: (options?: {
renderPlaceholder?: boolean;
}) => React.ReactNode;
}) => string | null | ReturnType<UseRenderer<TGenerics>>;
};

@@ -81,0 +88,0 @@ export declare type HeaderGroup<TGenerics extends PartialGenerics> = {

@@ -1,7 +0,8 @@

import React from 'react';
import { Getter, NoInfer, PropGetterValue, Renderable, TableState, Updater } from './types';
import { Getter, NoInfer, PropGetterValue, TableState, Updater } from './types';
export declare type IsAny<T> = 0 extends 1 & T ? true : false;
export declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export declare type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export declare type Overwrite<T, U> = Omit<T, keyof U> & U;
export declare type Overwrite<T, U extends {
[TKey in keyof T]?: any;
}> = Omit<T, keyof U> & U;
export declare type DataUpdateFunction<T> = (input: T) => T;

@@ -21,4 +22,2 @@ export declare function functionalUpdate<T>(updater: Updater<T>, input: T): T;

}): () => TResult;
export declare type Render = typeof flexRender;
export declare function flexRender<TProps extends {}>(Comp: Renderable<TProps>, props: TProps): React.ReactNode;
export {};

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function columnFilterRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { AnyGenerics, TableInstance, RowModel } from '../types';
export declare function columnFilterRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function expandRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, sortedRowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { TableInstance, RowModel, AnyGenerics } from '../types';
export declare function expandRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, sortedRowModel: RowModel<TGenerics>): RowModel<TGenerics>;

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function globalFilterRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { TableInstance, RowModel, AnyGenerics } from '../types';
export declare function globalFilterRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function groupRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, sortedRowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { TableInstance, RowModel, AnyGenerics } from '../types';
export declare function groupRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, sortedRowModel: RowModel<TGenerics>): RowModel<TGenerics>;

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function paginateRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { TableInstance, RowModel, AnyGenerics } from '../types';
export declare function paginateRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;

@@ -1,2 +0,2 @@

import { PartialGenerics, TableInstance, RowModel } from '../types';
export declare function sortRowsFn<TGenerics extends PartialGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
import { TableInstance, RowModel, AnyGenerics } from '../types';
export declare function sortRowsFn<TGenerics extends AnyGenerics>(instance: TableInstance<TGenerics>, rowModel: RowModel<TGenerics>): RowModel<TGenerics>;
{
"name": "@tanstack/table-core",
"author": "Tanner Linsley",
"version": "8.0.0-alpha.13",
"version": "8.0.0-alpha.14",
"description": "Hooks for building lightweight, fast and extendable datagrids for React",

@@ -6,0 +6,0 @@ "license": "MIT",

import {
MouseEvent as ReactMouseEvent,
TouchEvent as ReactTouchEvent,
} from 'react'
import {
Column,

@@ -52,4 +48,4 @@ Getter,

title?: string
onMouseDown?: (e: ReactMouseEvent) => void
onTouchStart?: (e: ReactTouchEvent) => void
onMouseDown?: (e: MouseEvent) => void
onTouchStart?: (e: TouchEvent) => void
draggable?: boolean

@@ -211,3 +207,3 @@ role?: string

const onResizeStart = (e: ReactMouseEvent | ReactTouchEvent) => {
const onResizeStart = (e: MouseEvent | TouchEvent) => {
if (isTouchStartEvent(e)) {

@@ -365,8 +361,8 @@ // lets not respond to multiple touches (e.g. 2 or 3 fingers)

role: 'separator',
onMouseDown: (e: ReactMouseEvent) => {
e.persist()
onMouseDown: (e: MouseEvent & { persist?: () => void }) => {
e.persist?.()
onResizeStart(e)
},
onTouchStart: (e: ReactTouchEvent) => {
e.persist()
onTouchStart: (e: TouchEvent & { persist?: () => void }) => {
e.persist?.()
onResizeStart(e)

@@ -431,6 +427,4 @@ },

function isTouchStartEvent(
e: ReactTouchEvent | ReactMouseEvent
): e is ReactTouchEvent {
function isTouchStartEvent(e: TouchEvent | MouseEvent): e is TouchEvent {
return e.type === 'touchstart'
}

@@ -168,3 +168,3 @@ import { MouseEvent, TouchEvent } from 'react'

console.warn(
`[ReactTable] getIsRowExpanded: no row found with id ${rowId}`
`[Table] getIsRowExpanded: no row found with id ${rowId}`
)

@@ -188,3 +188,3 @@ }

console.warn(
`[ReactTable] getRowCanExpand: no row found with id ${rowId}`
`[Table] getRowCanExpand: no row found with id ${rowId}`
)

@@ -191,0 +191,0 @@ }

@@ -412,3 +412,3 @@ import { RowModel } from '..'

console.warn(
`React-Table: Could not find a column with id: ${columnId}`
`Table: Could not find a column with id: ${columnId}`
)

@@ -415,0 +415,0 @@ }

@@ -1,2 +0,1 @@

import React, { MouseEvent, TouchEvent } from 'react'
import { RowModel } from '..'

@@ -14,2 +13,4 @@ import { BuiltInAggregationType, aggregationTypes } from '../aggregationTypes'

PartialGenerics,
Renderable,
UseRenderer,
} from '../types'

@@ -50,3 +51,12 @@ import {

aggregateValue?: (columnValue: unknown) => any
renderAggregatedCell?: () => React.ReactNode
aggregatedCell?: Renderable<
TGenerics,
{
instance: TableInstance<TGenerics>
row: Row<TGenerics>
column: Column<TGenerics>
cell: Cell<TGenerics>
value: TGenerics['Value']
}
>
enableGrouping?: boolean

@@ -73,6 +83,7 @@ defaultCanGroup?: boolean

export type GroupingCell = {
export type GroupingCell<TGenerics extends PartialGenerics> = {
getIsGrouped: () => boolean
getIsPlaceholder: () => boolean
getIsAggregated: () => boolean
renderAggregatedCell: () => string | null | ReturnType<UseRenderer<TGenerics>>
}

@@ -283,3 +294,2 @@

? (e: MouseEvent | TouchEvent) => {
e.persist()
column.toggleGrouping?.()

@@ -328,7 +338,7 @@ }

createCell: <TGenerics extends PartialGenerics>(
cell: Cell<TGenerics> & GroupingCell,
cell: Cell<TGenerics>,
column: Column<TGenerics>,
row: Row<TGenerics>,
_instance: TableInstance<TGenerics>
): GroupingCell => {
instance: TableInstance<TGenerics>
): GroupingCell<TGenerics> => {
return {

@@ -342,2 +352,15 @@ getIsGrouped: () =>

row.subRows?.length > 1,
renderAggregatedCell: () => {
const template = column.aggregatedCell ?? column.cell
return template
? instance.render(template, {
instance,
column,
row,
cell,
value: cell.value,
})
: null
},
}

@@ -344,0 +367,0 @@ },

@@ -17,3 +17,3 @@ import {

} from '../types'
import { propGetter, memo, flexRender } from '../utils'
import { propGetter, memo } from '../utils'
import { ColumnSizing } from './ColumnSizing'

@@ -228,5 +228,17 @@

renderHeader: () =>
flexRender(column.header, { instance, header, column }),
column.header
? instance.render(column.header, {
instance,
header: header as Header<TGenerics>,
column,
})
: null,
renderFooter: () =>
flexRender(column.footer, { instance, header, column }),
column.footer
? instance.render(column.footer, {
instance,
header: header as Header<TGenerics>,
column,
})
: null,
}

@@ -233,0 +245,0 @@

@@ -1,2 +0,1 @@

import React, { MouseEvent, TouchEvent } from 'react'
import {

@@ -11,2 +10,3 @@ Getter,

Updater,
AnyGenerics,
} from '../types'

@@ -585,3 +585,3 @@ import { functionalUpdate, makeStateUpdater, memo, propGetter } from '../utils'

export function selectRowsFn<TGenerics extends PartialGenerics>(
export function selectRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -588,0 +588,0 @@ rowModel: RowModel<TGenerics>

@@ -51,2 +51,3 @@ import {

defaultCanHide?: boolean
defaultIsVisible?: boolean
}

@@ -53,0 +54,0 @@

@@ -1,2 +0,1 @@

import React from 'react'
import {

@@ -45,2 +44,3 @@ CoreColumn,

import {
GroupingCell,
GroupingColumn,

@@ -59,3 +59,3 @@ GroupingColumnDef,

} from './features/Expanding'
import { Overwrite } from './utils'
import { Overwrite, PartialKeys } from './utils'
import {

@@ -81,6 +81,2 @@ ColumnSizingColumn,

// declare global {
// const process.env.NODE_ENV !== 'production': boolean
// }
export type DefaultGenerics = {

@@ -92,6 +88,17 @@ Row: unknown

AggregationFns: object
Render: unknown
ColumnMeta: object
}
export type AnyRender = (Comp: any, props: any) => any
export type UseRenderer<TGenerics extends PartialGenerics> =
TGenerics['Render'] extends (...args: any) => any ? TGenerics['Render'] : any
export type PartialGenerics = Partial<DefaultGenerics>
export type AnyGenerics = {
[TKey in keyof PartialGenerics]: any
}
export type TableInstance<TGenerics extends PartialGenerics> =

@@ -111,7 +118,2 @@ TableCore<TGenerics> &

export type Renderable<TProps> =
| React.ReactNode
| React.FunctionComponent<TProps>
| React.Component<TProps>
//

@@ -175,2 +177,6 @@

export type Renderable<TGenerics extends PartialGenerics, TProps> =
| string
| ((props: TProps) => ReturnType<UseRenderer<TGenerics>>)
export type ColumnDef<TGenerics extends PartialGenerics> =

@@ -194,3 +200,6 @@ CoreColumnDef<TGenerics> &

export type Cell<TGenerics extends PartialGenerics> = {
export type Cell<TGenerics extends PartialGenerics> = CoreCell<TGenerics> &
GroupingCell<TGenerics>
export type CoreCell<TGenerics extends PartialGenerics> = {
id: string

@@ -203,3 +212,3 @@ rowId: string

getCellProps: PropGetter<CellProps>
renderCell: () => React.ReactNode
renderCell: () => string | null | ReturnType<UseRenderer<TGenerics>>
}

@@ -223,4 +232,8 @@

placeholderId?: string
renderHeader: (options?: { renderPlaceholder?: boolean }) => React.ReactNode
renderFooter: (options?: { renderPlaceholder?: boolean }) => React.ReactNode
renderHeader: (options?: {
renderPlaceholder?: boolean
}) => string | null | ReturnType<UseRenderer<TGenerics>>
renderFooter: (options?: {
renderPlaceholder?: boolean
}) => string | null | ReturnType<UseRenderer<TGenerics>>
}

@@ -227,0 +240,0 @@

@@ -1,4 +0,4 @@

import { PartialGenerics, TableInstance, Row, RowModel } from '../types'
import { AnyGenerics, TableInstance, Row, RowModel } from '../types'
export function columnFilterRowsFn<TGenerics extends PartialGenerics>(
export function columnFilterRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -21,5 +21,3 @@ rowModel: RowModel<TGenerics>

if (process.env.NODE_ENV !== 'production') {
console.warn(
`React-Table: Could not find a column with id: ${columnId}`
)
console.warn(`Table: Could not find a column with id: ${columnId}`)
}

@@ -26,0 +24,0 @@ throw new Error()

@@ -1,4 +0,4 @@

import { PartialGenerics, TableInstance, Row, RowModel } from '../types'
import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
export function expandRowsFn<TGenerics extends PartialGenerics>(
export function expandRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -5,0 +5,0 @@ sortedRowModel: RowModel<TGenerics>

@@ -1,4 +0,4 @@

import { PartialGenerics, TableInstance, Row, RowModel } from '../types'
import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
export function globalFilterRowsFn<TGenerics extends PartialGenerics>(
export function globalFilterRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -5,0 +5,0 @@ rowModel: RowModel<TGenerics>

@@ -1,5 +0,5 @@

import { PartialGenerics, TableInstance, Row, RowModel } from '../types'
import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
import { flattenBy } from '../utils'
export function groupRowsFn<TGenerics extends PartialGenerics>(
export function groupRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -55,3 +55,3 @@ sortedRowModel: RowModel<TGenerics>

process.env.NODE_ENV !== 'production'
? `React Table: Invalid column.aggregateType option for column listed above`
? `Table: Invalid column.aggregateType option for column listed above`
: ''

@@ -155,3 +155,3 @@ )

function groupBy<TGenerics extends PartialGenerics>(
function groupBy<TGenerics extends AnyGenerics>(
rows: Row<TGenerics>[],

@@ -158,0 +158,0 @@ columnId: string

@@ -1,5 +0,5 @@

import { PartialGenerics, TableInstance, RowModel } from '../types'
import { TableInstance, RowModel, AnyGenerics } from '../types'
import { expandRowsFn } from './expandRowsFn'
export function paginateRowsFn<TGenerics extends PartialGenerics>(
export function paginateRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -6,0 +6,0 @@ rowModel: RowModel<TGenerics>

@@ -1,5 +0,5 @@

import { PartialGenerics, TableInstance, Row, RowModel } from '../types'
import { TableInstance, Row, RowModel, AnyGenerics } from '../types'
import { SortingFn } from '../features/Sorting'
export function sortRowsFn<TGenerics extends PartialGenerics>(
export function sortRowsFn<TGenerics extends AnyGenerics>(
instance: TableInstance<TGenerics>,

@@ -6,0 +6,0 @@ rowModel: RowModel<TGenerics>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is 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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc