@tanstack/vue-table 8.15.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.
|
@@ -1559,6 +1559,34 @@
|
|
|
1559
1559
|
|
|
1560
1560
|
//
|
|
1561
1561
|
|
|
1562
|
+
const GlobalFaceting = {
|
|
1563
|
+
createTable: table => {
|
|
1564
|
+
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
|
|
1565
|
+
table.getGlobalFacetedRowModel = () => {
|
|
1566
|
+
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
|
|
1567
|
+
return table.getPreFilteredRowModel();
|
|
1568
|
+
}
|
|
1569
|
+
return table._getGlobalFacetedRowModel();
|
|
1570
|
+
};
|
|
1571
|
+
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');
|
|
1572
|
+
table.getGlobalFacetedUniqueValues = () => {
|
|
1573
|
+
if (!table._getGlobalFacetedUniqueValues) {
|
|
1574
|
+
return new Map();
|
|
1575
|
+
}
|
|
1576
|
+
return table._getGlobalFacetedUniqueValues();
|
|
1577
|
+
};
|
|
1578
|
+
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');
|
|
1579
|
+
table.getGlobalFacetedMinMaxValues = () => {
|
|
1580
|
+
if (!table._getGlobalFacetedMinMaxValues) {
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
return table._getGlobalFacetedMinMaxValues();
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
//
|
|
1589
|
+
|
|
1562
1590
|
const GlobalFiltering = {
|
|
1563
1591
|
getInitialState: state => {
|
|
1564
1592
|
return {
|
|
@@ -1592,8 +1620,7 @@
|
|
|
1592
1620
|
const {
|
|
1593
1621
|
globalFilterFn: globalFilterFn
|
|
1594
1622
|
} = table.options;
|
|
1595
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() :
|
|
1596
|
-
(_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[globalFilterFn]) != null ? _table$options$filter : filterFns[globalFilterFn];
|
|
1623
|
+
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];
|
|
1597
1624
|
};
|
|
1598
1625
|
table.setGlobalFilter = updater => {
|
|
1599
1626
|
table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);
|
|
@@ -1601,27 +1628,6 @@
|
|
|
1601
1628
|
table.resetGlobalFilter = defaultState => {
|
|
1602
1629
|
table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);
|
|
1603
1630
|
};
|
|
1604
|
-
table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
|
|
1605
|
-
table.getGlobalFacetedRowModel = () => {
|
|
1606
|
-
if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
|
|
1607
|
-
return table.getPreFilteredRowModel();
|
|
1608
|
-
}
|
|
1609
|
-
return table._getGlobalFacetedRowModel();
|
|
1610
|
-
};
|
|
1611
|
-
table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');
|
|
1612
|
-
table.getGlobalFacetedUniqueValues = () => {
|
|
1613
|
-
if (!table._getGlobalFacetedUniqueValues) {
|
|
1614
|
-
return new Map();
|
|
1615
|
-
}
|
|
1616
|
-
return table._getGlobalFacetedUniqueValues();
|
|
1617
|
-
};
|
|
1618
|
-
table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');
|
|
1619
|
-
table.getGlobalFacetedMinMaxValues = () => {
|
|
1620
|
-
if (!table._getGlobalFacetedMinMaxValues) {
|
|
1621
|
-
return;
|
|
1622
|
-
}
|
|
1623
|
-
return table._getGlobalFacetedMinMaxValues();
|
|
1624
|
-
};
|
|
1625
1631
|
}
|
|
1626
1632
|
};
|
|
1627
1633
|
|
|
@@ -2750,8 +2756,10 @@
|
|
|
2750
2756
|
}
|
|
2751
2757
|
};
|
|
2752
2758
|
|
|
2753
|
-
const builtInFeatures = [Headers, ColumnVisibility, ColumnOrdering, ColumnPinning, ColumnFaceting, ColumnFiltering,
|
|
2754
|
-
//depends on
|
|
2759
|
+
const builtInFeatures = [Headers, ColumnVisibility, ColumnOrdering, ColumnPinning, ColumnFaceting, ColumnFiltering, GlobalFaceting,
|
|
2760
|
+
//depends on ColumnFaceting
|
|
2761
|
+
GlobalFiltering,
|
|
2762
|
+
//depends on ColumnFiltering
|
|
2755
2763
|
RowSorting, ColumnGrouping,
|
|
2756
2764
|
//depends on RowSorting
|
|
2757
2765
|
RowExpanding, RowPagination, RowPinning, RowSelection, ColumnSizing];
|
|
@@ -3640,6 +3648,7 @@
|
|
|
3640
3648
|
exports.ColumnSizing = ColumnSizing;
|
|
3641
3649
|
exports.ColumnVisibility = ColumnVisibility;
|
|
3642
3650
|
exports.FlexRender = FlexRender;
|
|
3651
|
+
exports.GlobalFaceting = GlobalFaceting;
|
|
3643
3652
|
exports.GlobalFiltering = GlobalFiltering;
|
|
3644
3653
|
exports.Headers = Headers;
|
|
3645
3654
|
exports.RowExpanding = RowExpanding;
|