@datorama/core 21.4.0-rc.11 → 21.4.0-rc.14
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/bundles/datorama-core.umd.js +15 -11
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +2 -2
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +12 -8
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +4 -4
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +12 -8
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +4 -4
- package/fesm2015/datorama-core.js +15 -11
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +15 -11
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -11620,7 +11620,7 @@
|
|
|
11620
11620
|
return Object.keys(filter).reduce(function (filters, field) {
|
|
11621
11621
|
var datoFilter = filter[field];
|
|
11622
11622
|
if (datoFilter) {
|
|
11623
|
-
filters.push({
|
|
11623
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11624
11624
|
}
|
|
11625
11625
|
return filters;
|
|
11626
11626
|
}, []);
|
|
@@ -12679,12 +12679,12 @@
|
|
|
12679
12679
|
var ɵ0$1 = mapToValue;
|
|
12680
12680
|
var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
|
|
12681
12681
|
var ɵ1$1 = mapToListItem;
|
|
12682
|
-
var mapToListItemWithFormatted = function (_a) {
|
|
12682
|
+
var mapToListItemWithFormatted = function (_a, key) {
|
|
12683
12683
|
var value = _a.value, formattedValue = _a.formattedValue;
|
|
12684
12684
|
return ({
|
|
12685
|
-
id: value,
|
|
12686
|
-
label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
|
|
12687
|
-
value: value
|
|
12685
|
+
id: key && value ? value[key] : value,
|
|
12686
|
+
label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
|
|
12687
|
+
value: key && value ? value[key] : value
|
|
12688
12688
|
});
|
|
12689
12689
|
};
|
|
12690
12690
|
var ɵ2$1 = mapToListItemWithFormatted;
|
|
@@ -12866,9 +12866,11 @@
|
|
|
12866
12866
|
var columnValues = this.getColumnValues();
|
|
12867
12867
|
this.columnValues = columnValues.map(function (_a) {
|
|
12868
12868
|
var value = _a.value;
|
|
12869
|
-
return value;
|
|
12869
|
+
return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
|
|
12870
|
+
});
|
|
12871
|
+
this.listOptions = columnValues.map(function (colValue) {
|
|
12872
|
+
return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
|
|
12870
12873
|
});
|
|
12871
|
-
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12872
12874
|
}
|
|
12873
12875
|
}
|
|
12874
12876
|
else {
|
|
@@ -12963,7 +12965,9 @@
|
|
|
12963
12965
|
filter.pivotKeys = this.pivotKeys;
|
|
12964
12966
|
if (this.pivotColumn) {
|
|
12965
12967
|
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12966
|
-
|
|
12968
|
+
if (_this.pivotKeys[index]) {
|
|
12969
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12970
|
+
}
|
|
12967
12971
|
return fieldMap;
|
|
12968
12972
|
}, {});
|
|
12969
12973
|
}
|
|
@@ -14370,13 +14374,13 @@
|
|
|
14370
14374
|
var e_2, _a;
|
|
14371
14375
|
try {
|
|
14372
14376
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14373
|
-
var
|
|
14374
|
-
var column = this.api.columns.getColumn(colId);
|
|
14377
|
+
var filter = filters_1_1.value.filter;
|
|
14378
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14375
14379
|
if (column) {
|
|
14376
14380
|
this.setColumnFilter(column, filter);
|
|
14377
14381
|
}
|
|
14378
14382
|
else {
|
|
14379
|
-
var pivotColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14383
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14380
14384
|
this.setColumnFilter(pivotColumn, filter);
|
|
14381
14385
|
}
|
|
14382
14386
|
}
|