@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
package/fesm5/datorama-core.js
CHANGED
|
@@ -11419,8 +11419,9 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11419
11419
|
GridQuery.prototype.filterChanged = function () {
|
|
11420
11420
|
return this.selectFilter().pipe(map$1(function (filter) {
|
|
11421
11421
|
return Object.keys(filter).reduce(function (filters, field) {
|
|
11422
|
-
|
|
11423
|
-
|
|
11422
|
+
var datoFilter = filter[field];
|
|
11423
|
+
if (datoFilter) {
|
|
11424
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11424
11425
|
}
|
|
11425
11426
|
return filters;
|
|
11426
11427
|
}, []);
|
|
@@ -12666,7 +12667,7 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12666
12667
|
var columnValues = this.getColumnValues();
|
|
12667
12668
|
this.columnValues = columnValues.map(function (_a) {
|
|
12668
12669
|
var value = _a.value;
|
|
12669
|
-
return value;
|
|
12670
|
+
return _this.pivotColumn && value ? value[_this.colField] : value;
|
|
12670
12671
|
});
|
|
12671
12672
|
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12672
12673
|
}
|
|
@@ -12759,11 +12760,13 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12759
12760
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12760
12761
|
var _this = this;
|
|
12761
12762
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12762
|
-
var filter = {};
|
|
12763
|
+
var filter = { colId: this.colDef.colId };
|
|
12763
12764
|
filter.pivotKeys = this.pivotKeys;
|
|
12764
12765
|
if (this.pivotColumn) {
|
|
12765
12766
|
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12766
|
-
|
|
12767
|
+
if (_this.pivotKeys[index]) {
|
|
12768
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12769
|
+
}
|
|
12767
12770
|
return fieldMap;
|
|
12768
12771
|
}, {});
|
|
12769
12772
|
}
|
|
@@ -14166,17 +14169,17 @@ var GridService = /** @class */ (function () {
|
|
|
14166
14169
|
this.notifyFilterUpdate();
|
|
14167
14170
|
}
|
|
14168
14171
|
};
|
|
14169
|
-
GridService.prototype.
|
|
14172
|
+
GridService.prototype.setGridFilters = function (filters) {
|
|
14170
14173
|
var e_2, _a;
|
|
14171
14174
|
try {
|
|
14172
14175
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14173
|
-
var
|
|
14174
|
-
var column = this.api.columns.getColumn(colId);
|
|
14176
|
+
var filter = filters_1_1.value.filter;
|
|
14177
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14175
14178
|
if (column) {
|
|
14176
14179
|
this.setColumnFilter(column, filter);
|
|
14177
14180
|
}
|
|
14178
14181
|
else {
|
|
14179
|
-
var pivotColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14182
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14180
14183
|
this.setColumnFilter(pivotColumn, filter);
|
|
14181
14184
|
}
|
|
14182
14185
|
}
|
|
@@ -15304,8 +15307,8 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15304
15307
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15305
15308
|
this.gridService.setRows(data);
|
|
15306
15309
|
};
|
|
15307
|
-
DatoGridControllerComponent.prototype.
|
|
15308
|
-
this.gridService.
|
|
15310
|
+
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15311
|
+
this.gridService.setGridFilters(filters);
|
|
15309
15312
|
};
|
|
15310
15313
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15311
15314
|
return this.gridQuery.filterChanged();
|