@datorama/core 21.4.0-rc.10 → 21.4.0-rc.13
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 +14 -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/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +3 -3
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +8 -4
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +4 -3
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +5 -5
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +3 -3
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +6 -4
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +4 -3
- package/esm5/lib/grid-v2/grid-store/grid.service.js +5 -5
- package/fesm2015/datorama-core.js +16 -11
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +14 -11
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -1
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +1 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -11618,8 +11618,9 @@
|
|
|
11618
11618
|
GridQuery.prototype.filterChanged = function () {
|
|
11619
11619
|
return this.selectFilter().pipe(operators.map(function (filter) {
|
|
11620
11620
|
return Object.keys(filter).reduce(function (filters, field) {
|
|
11621
|
-
|
|
11622
|
-
|
|
11621
|
+
var datoFilter = filter[field];
|
|
11622
|
+
if (datoFilter) {
|
|
11623
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11623
11624
|
}
|
|
11624
11625
|
return filters;
|
|
11625
11626
|
}, []);
|
|
@@ -12865,7 +12866,7 @@
|
|
|
12865
12866
|
var columnValues = this.getColumnValues();
|
|
12866
12867
|
this.columnValues = columnValues.map(function (_a) {
|
|
12867
12868
|
var value = _a.value;
|
|
12868
|
-
return value;
|
|
12869
|
+
return _this.pivotColumn && value ? value[_this.colField] : value;
|
|
12869
12870
|
});
|
|
12870
12871
|
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12871
12872
|
}
|
|
@@ -12958,11 +12959,13 @@
|
|
|
12958
12959
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12959
12960
|
var _this = this;
|
|
12960
12961
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12961
|
-
var filter = {};
|
|
12962
|
+
var filter = { colId: this.colDef.colId };
|
|
12962
12963
|
filter.pivotKeys = this.pivotKeys;
|
|
12963
12964
|
if (this.pivotColumn) {
|
|
12964
12965
|
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12965
|
-
|
|
12966
|
+
if (_this.pivotKeys[index]) {
|
|
12967
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12968
|
+
}
|
|
12966
12969
|
return fieldMap;
|
|
12967
12970
|
}, {});
|
|
12968
12971
|
}
|
|
@@ -14365,17 +14368,17 @@
|
|
|
14365
14368
|
this.notifyFilterUpdate();
|
|
14366
14369
|
}
|
|
14367
14370
|
};
|
|
14368
|
-
GridService.prototype.
|
|
14371
|
+
GridService.prototype.setGridFilters = function (filters) {
|
|
14369
14372
|
var e_2, _a;
|
|
14370
14373
|
try {
|
|
14371
14374
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14372
|
-
var
|
|
14373
|
-
var column = this.api.columns.getColumn(colId);
|
|
14375
|
+
var filter = filters_1_1.value.filter;
|
|
14376
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14374
14377
|
if (column) {
|
|
14375
14378
|
this.setColumnFilter(column, filter);
|
|
14376
14379
|
}
|
|
14377
14380
|
else {
|
|
14378
|
-
var pivotColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14381
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14379
14382
|
this.setColumnFilter(pivotColumn, filter);
|
|
14380
14383
|
}
|
|
14381
14384
|
}
|
|
@@ -15503,8 +15506,8 @@
|
|
|
15503
15506
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15504
15507
|
this.gridService.setRows(data);
|
|
15505
15508
|
};
|
|
15506
|
-
DatoGridControllerComponent.prototype.
|
|
15507
|
-
this.gridService.
|
|
15509
|
+
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15510
|
+
this.gridService.setGridFilters(filters);
|
|
15508
15511
|
};
|
|
15509
15512
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15510
15513
|
return this.gridQuery.filterChanged();
|