@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/esm/index.js
CHANGED
|
@@ -3151,6 +3151,8 @@ function filterPredicate(columnMap, filter) {
|
|
|
3151
3151
|
return testLT(columnMap, filter);
|
|
3152
3152
|
case "<=":
|
|
3153
3153
|
return testLE(columnMap, filter);
|
|
3154
|
+
case "ends":
|
|
3155
|
+
return testEW(columnMap, filter);
|
|
3154
3156
|
case "starts":
|
|
3155
3157
|
return testSW(columnMap, filter);
|
|
3156
3158
|
case "and":
|
|
@@ -3180,6 +3182,19 @@ var testLT = (columnMap, filter) => {
|
|
|
3180
3182
|
var testLE = (columnMap, filter) => {
|
|
3181
3183
|
return (row) => row[columnMap[filter.column]] <= filter.value;
|
|
3182
3184
|
};
|
|
3185
|
+
var testEW = (columnMap, filter) => {
|
|
3186
|
+
const filterValue = filter.value;
|
|
3187
|
+
if (typeof filterValue !== "string") {
|
|
3188
|
+
throw Error("string filter applied to value of wrong type");
|
|
3189
|
+
}
|
|
3190
|
+
return (row) => {
|
|
3191
|
+
const rowValue = row[columnMap[filter.column]];
|
|
3192
|
+
if (typeof rowValue !== "string") {
|
|
3193
|
+
throw Error("string filter applied to value of wrong type");
|
|
3194
|
+
}
|
|
3195
|
+
return rowValue.toLowerCase().endsWith(filterValue.toLowerCase());
|
|
3196
|
+
};
|
|
3197
|
+
};
|
|
3183
3198
|
var testSW = (columnMap, filter) => {
|
|
3184
3199
|
const filterValue = filter.value;
|
|
3185
3200
|
if (typeof filterValue !== "string") {
|
|
@@ -3226,7 +3241,6 @@ import {
|
|
|
3226
3241
|
|
|
3227
3242
|
// src/array-data-source/aggregate-utils.ts
|
|
3228
3243
|
var aggregateData = (aggregations, targetData, groupBy, leafData, columnMap, groupMap) => {
|
|
3229
|
-
const aggColumn = getAggColumn(columnMap, aggregations);
|
|
3230
3244
|
const aggType = aggregations[aggregations.length - 1].aggType;
|
|
3231
3245
|
const groupIndices = groupBy.map((column) => columnMap[column]);
|
|
3232
3246
|
switch (aggType) {
|
|
@@ -4075,8 +4089,8 @@ var ArrayDataSource = class extends 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
|
}
|