@tanstack/svelte-table 8.3.6 → 8.5.1
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/cjs/table-core/build/esm/index.js +19 -6
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +19 -6
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +48 -48
- package/build/umd/index.development.js +19 -6
- 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 +2 -2
package/build/esm/index.js
CHANGED
|
@@ -1158,7 +1158,9 @@ const Filters = {
|
|
|
1158
1158
|
return filterFns.weakEquals;
|
|
1159
1159
|
},
|
|
1160
1160
|
getFilterFn: () => {
|
|
1161
|
-
|
|
1161
|
+
var _table$options$filter, _table$options$filter2;
|
|
1162
|
+
|
|
1163
|
+
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];
|
|
1162
1164
|
},
|
|
1163
1165
|
getCanFilter: () => {
|
|
1164
1166
|
var _column$columnDef$ena, _table$options$enable, _table$options$enable2;
|
|
@@ -1257,10 +1259,12 @@ const Filters = {
|
|
|
1257
1259
|
return filterFns.includesString;
|
|
1258
1260
|
},
|
|
1259
1261
|
getGlobalFilterFn: () => {
|
|
1262
|
+
var _table$options$filter3, _table$options$filter4;
|
|
1263
|
+
|
|
1260
1264
|
const {
|
|
1261
1265
|
globalFilterFn: globalFilterFn
|
|
1262
1266
|
} = table.options;
|
|
1263
|
-
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : filterFns[globalFilterFn];
|
|
1267
|
+
return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : (_table$options$filter3 = (_table$options$filter4 = table.options.filterFns) == null ? void 0 : _table$options$filter4[globalFilterFn]) != null ? _table$options$filter3 : filterFns[globalFilterFn];
|
|
1264
1268
|
},
|
|
1265
1269
|
setColumnFilters: updater => {
|
|
1266
1270
|
const leafColumns = table.getAllLeafColumns();
|
|
@@ -1297,8 +1301,11 @@ const Filters = {
|
|
|
1297
1301
|
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
1298
1302
|
},
|
|
1299
1303
|
getPreFilteredRowModel: () => table.getCoreRowModel(),
|
|
1300
|
-
_getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
|
|
1301
1304
|
getFilteredRowModel: () => {
|
|
1305
|
+
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
|
|
1306
|
+
table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1302
1309
|
if (table.options.manualFiltering || !table._getFilteredRowModel) {
|
|
1303
1310
|
return table.getPreFilteredRowModel();
|
|
1304
1311
|
}
|
|
@@ -1514,11 +1521,13 @@ const Grouping = {
|
|
|
1514
1521
|
}
|
|
1515
1522
|
},
|
|
1516
1523
|
getAggregationFn: () => {
|
|
1524
|
+
var _table$options$aggreg, _table$options$aggreg2;
|
|
1525
|
+
|
|
1517
1526
|
if (!column) {
|
|
1518
1527
|
throw new Error();
|
|
1519
1528
|
}
|
|
1520
1529
|
|
|
1521
|
-
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : aggregationFns[column.columnDef.aggregationFn];
|
|
1530
|
+
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];
|
|
1522
1531
|
}
|
|
1523
1532
|
};
|
|
1524
1533
|
},
|
|
@@ -2535,11 +2544,13 @@ const Sorting = {
|
|
|
2535
2544
|
return 'desc';
|
|
2536
2545
|
},
|
|
2537
2546
|
getSortingFn: () => {
|
|
2547
|
+
var _table$options$sortin, _table$options$sortin2;
|
|
2548
|
+
|
|
2538
2549
|
if (!column) {
|
|
2539
2550
|
throw new Error();
|
|
2540
2551
|
}
|
|
2541
2552
|
|
|
2542
|
-
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : sortingFns[column.columnDef.sortingFn];
|
|
2553
|
+
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];
|
|
2543
2554
|
},
|
|
2544
2555
|
toggleSorting: (desc, multi) => {
|
|
2545
2556
|
// if (column.columns.length) {
|
|
@@ -3162,7 +3173,9 @@ function createColumnHelper() {
|
|
|
3162
3173
|
} : { ...column,
|
|
3163
3174
|
accessorKey: accessor
|
|
3164
3175
|
};
|
|
3165
|
-
}
|
|
3176
|
+
},
|
|
3177
|
+
display: column => column,
|
|
3178
|
+
group: column => column
|
|
3166
3179
|
};
|
|
3167
3180
|
}
|
|
3168
3181
|
|