@tanstack/table-core 8.14.0 → 8.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/columnHelper.d.ts +4 -4
- package/build/lib/columnHelper.js.map +1 -1
- package/build/lib/core/row.d.ts +1 -1
- package/build/lib/core/table.js +5 -2
- package/build/lib/core/table.js.map +1 -1
- package/build/lib/features/ColumnFaceting.d.ts +6 -6
- package/build/lib/features/ColumnFaceting.js.map +1 -1
- package/build/lib/features/ColumnFiltering.d.ts +48 -48
- package/build/lib/features/ColumnFiltering.js.map +1 -1
- package/build/lib/features/GlobalFaceting.d.ts +26 -0
- package/build/lib/features/GlobalFaceting.js +42 -0
- package/build/lib/features/GlobalFaceting.js.map +1 -0
- package/build/lib/features/GlobalFiltering.d.ts +21 -42
- package/build/lib/features/GlobalFiltering.js +1 -23
- package/build/lib/features/GlobalFiltering.js.map +1 -1
- package/build/lib/index.d.ts +1 -0
- package/build/lib/index.esm.js +34 -26
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.js +2 -0
- package/build/lib/index.js.map +1 -1
- package/build/lib/index.mjs +34 -26
- package/build/lib/index.mjs.map +1 -1
- package/build/lib/types.d.ts +3 -2
- package/build/umd/index.development.js +34 -25
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/columnHelper.ts +9 -6
- package/src/core/table.ts +3 -1
- package/src/features/ColumnFaceting.ts +6 -6
- package/src/features/ColumnFiltering.ts +48 -48
- package/src/features/GlobalFaceting.ts +66 -0
- package/src/features/GlobalFiltering.ts +22 -78
- package/src/index.ts +1 -0
- package/src/types.ts +6 -2
package/build/lib/index.js
CHANGED
|
@@ -23,6 +23,7 @@ var ColumnOrdering = require('./features/ColumnOrdering.js');
|
|
|
23
23
|
var ColumnPinning = require('./features/ColumnPinning.js');
|
|
24
24
|
var ColumnSizing = require('./features/ColumnSizing.js');
|
|
25
25
|
var ColumnVisibility = require('./features/ColumnVisibility.js');
|
|
26
|
+
var GlobalFaceting = require('./features/GlobalFaceting.js');
|
|
26
27
|
var GlobalFiltering = require('./features/GlobalFiltering.js');
|
|
27
28
|
var RowExpanding = require('./features/RowExpanding.js');
|
|
28
29
|
var RowPagination = require('./features/RowPagination.js');
|
|
@@ -64,6 +65,7 @@ exports.defaultColumnSizing = ColumnSizing.defaultColumnSizing;
|
|
|
64
65
|
exports.passiveEventSupported = ColumnSizing.passiveEventSupported;
|
|
65
66
|
exports.ColumnVisibility = ColumnVisibility.ColumnVisibility;
|
|
66
67
|
exports._getVisibleLeafColumns = ColumnVisibility._getVisibleLeafColumns;
|
|
68
|
+
exports.GlobalFaceting = GlobalFaceting.GlobalFaceting;
|
|
67
69
|
exports.GlobalFiltering = GlobalFiltering.GlobalFiltering;
|
|
68
70
|
exports.RowExpanding = RowExpanding.RowExpanding;
|
|
69
71
|
exports.RowPagination = RowPagination.RowPagination;
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/lib/index.mjs
CHANGED
|
@@ -1544,6 +1544,34 @@ function _getVisibleLeafColumns(table, position) {
|
|
|
1544
1544
|
|
|
1545
1545
|
//
|
|
1546
1546
|
|
|
1547
|
+
const GlobalFaceting = {
|
|
1548
|
+
createTable: table => {
|
|
1549
|
+
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
|
|
1550
|
+
table.getGlobalFacetedRowModel = () => {
|
|
1551
|
+
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
|
|
1552
|
+
return table.getPreFilteredRowModel();
|
|
1553
|
+
}
|
|
1554
|
+
return table._getGlobalFacetedRowModel();
|
|
1555
|
+
};
|
|
1556
|
+
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');
|
|
1557
|
+
table.getGlobalFacetedUniqueValues = () => {
|
|
1558
|
+
if (!table._getGlobalFacetedUniqueValues) {
|
|
1559
|
+
return new Map();
|
|
1560
|
+
}
|
|
1561
|
+
return table._getGlobalFacetedUniqueValues();
|
|
1562
|
+
};
|
|
1563
|
+
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');
|
|
1564
|
+
table.getGlobalFacetedMinMaxValues = () => {
|
|
1565
|
+
if (!table._getGlobalFacetedMinMaxValues) {
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
return table._getGlobalFacetedMinMaxValues();
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
//
|
|
1574
|
+
|
|
1547
1575
|
const GlobalFiltering = {
|
|
1548
1576
|
getInitialState: state => {
|
|
1549
1577
|
return {
|
|
@@ -1577,8 +1605,7 @@ const GlobalFiltering = {
|
|
|
1577
1605
|
const {
|
|
1578
1606
|
globalFilterFn: globalFilterFn
|
|
1579
1607
|
} = table.options;
|
|
1580
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() :
|
|
1581
|
-
(_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
|
|
1608
|
+
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
|
|
1582
1609
|
};
|
|
1583
1610
|
table.setGlobalFilter = updater => {
|
|
1584
1611
|
table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);
|
|
@@ -1586,27 +1613,6 @@ const GlobalFiltering = {
|
|
|
1586
1613
|
table.resetGlobalFilter = defaultState => {
|
|
1587
1614
|
table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
|
|
1588
1615
|
};
|
|
1589
|
-
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
|
|
1590
|
-
table.getGlobalFacetedRowModel = () => {
|
|
1591
|
-
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
|
|
1592
|
-
return table.getPreFilteredRowModel();
|
|
1593
|
-
}
|
|
1594
|
-
return table._getGlobalFacetedRowModel();
|
|
1595
|
-
};
|
|
1596
|
-
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');
|
|
1597
|
-
table.getGlobalFacetedUniqueValues = () => {
|
|
1598
|
-
if (!table._getGlobalFacetedUniqueValues) {
|
|
1599
|
-
return new Map();
|
|
1600
|
-
}
|
|
1601
|
-
return table._getGlobalFacetedUniqueValues();
|
|
1602
|
-
};
|
|
1603
|
-
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');
|
|
1604
|
-
table.getGlobalFacetedMinMaxValues = () => {
|
|
1605
|
-
if (!table._getGlobalFacetedMinMaxValues) {
|
|
1606
|
-
return;
|
|
1607
|
-
}
|
|
1608
|
-
return table._getGlobalFacetedMinMaxValues();
|
|
1609
|
-
};
|
|
1610
1616
|
}
|
|
1611
1617
|
};
|
|
1612
1618
|
|
|
@@ -2735,8 +2741,10 @@ const RowSorting = {
|
|
|
2735
2741
|
}
|
|
2736
2742
|
};
|
|
2737
2743
|
|
|
2738
|
-
const builtInFeatures = [Headers, ColumnVisibility, ColumnOrdering, ColumnPinning, ColumnFaceting, ColumnFiltering,
|
|
2739
|
-
//depends on
|
|
2744
|
+
const builtInFeatures = [Headers, ColumnVisibility, ColumnOrdering, ColumnPinning, ColumnFaceting, ColumnFiltering, GlobalFaceting,
|
|
2745
|
+
//depends on ColumnFaceting
|
|
2746
|
+
GlobalFiltering,
|
|
2747
|
+
//depends on ColumnFiltering
|
|
2740
2748
|
RowSorting, ColumnGrouping,
|
|
2741
2749
|
//depends on RowSorting
|
|
2742
2750
|
RowExpanding, RowPagination, RowPinning, RowSelection, ColumnSizing];
|
|
@@ -3507,5 +3515,5 @@ function getSortedRowModel() {
|
|
|
3507
3515
|
}, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
|
|
3508
3516
|
}
|
|
3509
3517
|
|
|
3510
|
-
export { ColumnFaceting, ColumnFiltering, ColumnGrouping, ColumnOrdering, ColumnPinning, ColumnSizing, ColumnVisibility, GlobalFiltering, Headers, RowExpanding, RowPagination, RowPinning, RowSelection, RowSorting, _getVisibleLeafColumns, aggregationFns, buildHeaderGroups, createCell, createColumn, createColumnHelper, createRow, createTable, defaultColumnSizing, expandRows, filterFns, flattenBy, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getMemoOptions, getPaginationRowModel, getSortedRowModel, isFunction, isNumberArray, isRowSelected, isSubRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, selectRowsFn, shouldAutoRemoveFilter, sortingFns };
|
|
3518
|
+
export { ColumnFaceting, ColumnFiltering, ColumnGrouping, ColumnOrdering, ColumnPinning, ColumnSizing, ColumnVisibility, GlobalFaceting, GlobalFiltering, Headers, RowExpanding, RowPagination, RowPinning, RowSelection, RowSorting, _getVisibleLeafColumns, aggregationFns, buildHeaderGroups, createCell, createColumn, createColumnHelper, createRow, createTable, defaultColumnSizing, expandRows, filterFns, flattenBy, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getMemoOptions, getPaginationRowModel, getSortedRowModel, isFunction, isNumberArray, isRowSelected, isSubRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, selectRowsFn, shouldAutoRemoveFilter, sortingFns };
|
|
3511
3519
|
//# sourceMappingURL=index.mjs.map
|