@vuu-ui/vuu-data-local 0.8.22-debug → 0.8.23-debug
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/cjs/index.js +17 -3
- package/cjs/index.js.map +2 -2
- package/esm/index.js +17 -3
- package/esm/index.js.map +2 -2
- package/package.json +6 -6
- package/types/array-data-source/array-data-source.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -3173,6 +3173,8 @@ function filterPredicate(columnMap, filter) {
|
|
|
3173
3173
|
return testLT(columnMap, filter);
|
|
3174
3174
|
case "<=":
|
|
3175
3175
|
return testLE(columnMap, filter);
|
|
3176
|
+
case "ends":
|
|
3177
|
+
return testEW(columnMap, filter);
|
|
3176
3178
|
case "starts":
|
|
3177
3179
|
return testSW(columnMap, filter);
|
|
3178
3180
|
case "and":
|
|
@@ -3202,6 +3204,19 @@ var testLT = (columnMap, filter) => {
|
|
|
3202
3204
|
var testLE = (columnMap, filter) => {
|
|
3203
3205
|
return (row) => row[columnMap[filter.column]] <= filter.value;
|
|
3204
3206
|
};
|
|
3207
|
+
var testEW = (columnMap, filter) => {
|
|
3208
|
+
const filterValue = filter.value;
|
|
3209
|
+
if (typeof filterValue !== "string") {
|
|
3210
|
+
throw Error("string filter applied to value of wrong type");
|
|
3211
|
+
}
|
|
3212
|
+
return (row) => {
|
|
3213
|
+
const rowValue = row[columnMap[filter.column]];
|
|
3214
|
+
if (typeof rowValue !== "string") {
|
|
3215
|
+
throw Error("string filter applied to value of wrong type");
|
|
3216
|
+
}
|
|
3217
|
+
return rowValue.toLowerCase().endsWith(filterValue.toLowerCase());
|
|
3218
|
+
};
|
|
3219
|
+
};
|
|
3205
3220
|
var testSW = (columnMap, filter) => {
|
|
3206
3221
|
const filterValue = filter.value;
|
|
3207
3222
|
if (typeof filterValue !== "string") {
|
|
@@ -3229,7 +3244,6 @@ var import_vuu_utils4 = require("@vuu-ui/vuu-utils");
|
|
|
3229
3244
|
|
|
3230
3245
|
// src/array-data-source/aggregate-utils.ts
|
|
3231
3246
|
var aggregateData = (aggregations, targetData, groupBy, leafData, columnMap, groupMap) => {
|
|
3232
|
-
const aggColumn = getAggColumn(columnMap, aggregations);
|
|
3233
3247
|
const aggType = aggregations[aggregations.length - 1].aggType;
|
|
3234
3248
|
const groupIndices = groupBy.map((column) => columnMap[column]);
|
|
3235
3249
|
switch (aggType) {
|
|
@@ -4075,8 +4089,8 @@ var ArrayDataSource = class extends import_vuu_utils4.EventEmitter {
|
|
|
4075
4089
|
setRange(range, forceFullRefresh = false) {
|
|
4076
4090
|
if (range.from !== __privateGet(this, _range).from || range.to !== __privateGet(this, _range).to) {
|
|
4077
4091
|
__privateSet(this, _range, range);
|
|
4078
|
-
this.keys.reset(range);
|
|
4079
|
-
this.sendRowsToClient(forceFullRefresh);
|
|
4092
|
+
const keysResequenced = this.keys.reset(range);
|
|
4093
|
+
this.sendRowsToClient(forceFullRefresh || keysResequenced);
|
|
4080
4094
|
} else if (forceFullRefresh) {
|
|
4081
4095
|
this.sendRowsToClient(forceFullRefresh);
|
|
4082
4096
|
}
|