@datorama/core 21.4.0-rc.14 → 21.4.0-rc.15
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 +8 -18
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +1 -1
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +6 -3
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +4 -11
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +6 -3
- package/esm5/lib/grid-v2/grid-store/grid.service.js +4 -17
- package/fesm2015/datorama-core.js +8 -12
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +8 -18
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +0 -1
- package/package.json +1 -1
|
@@ -12823,15 +12823,18 @@
|
|
|
12823
12823
|
var _this = this;
|
|
12824
12824
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12825
12825
|
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12826
|
+
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12826
12827
|
this.colField = getColField(this.colDef);
|
|
12828
|
+
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12827
12829
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12828
12830
|
if (filtersConfig.sections) {
|
|
12829
12831
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12830
12832
|
}
|
|
12831
12833
|
this.keepPredefinedListOriginalOrder =
|
|
12832
12834
|
filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
|
|
12833
|
-
var
|
|
12834
|
-
|
|
12835
|
+
var colFilter = filter || colDef.filter;
|
|
12836
|
+
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12837
|
+
this.filterType = filterOptions ? colFilter : exports.DatoGridFilterTypes.String;
|
|
12835
12838
|
this.listLabelType = this.filterType.toLowerCase();
|
|
12836
12839
|
this.listSortByKey = this.filterType === exports.DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12837
12840
|
this.gridQuery = gridQuery;
|
|
@@ -14911,27 +14914,14 @@
|
|
|
14911
14914
|
/**
|
|
14912
14915
|
* When pivoting,
|
|
14913
14916
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14914
|
-
* @private
|
|
14915
14917
|
*/
|
|
14916
14918
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14917
14919
|
var _this = this;
|
|
14918
14920
|
var gridOptions = _a.gridOptions;
|
|
14919
14921
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14920
|
-
var
|
|
14921
|
-
if (
|
|
14922
|
-
|
|
14923
|
-
var originalColDef = valueColumns
|
|
14924
|
-
.map(function (_a) {
|
|
14925
|
-
var userProvidedColDef = _a.userProvidedColDef;
|
|
14926
|
-
return userProvidedColDef;
|
|
14927
|
-
})
|
|
14928
|
-
.find(function (_a) {
|
|
14929
|
-
var colId = _a.colId;
|
|
14930
|
-
return colId === colDef.pivotValueColumn.getColId();
|
|
14931
|
-
});
|
|
14932
|
-
if (originalColDef) {
|
|
14933
|
-
colDef.filter = originalColDef.filter;
|
|
14934
|
-
}
|
|
14922
|
+
var userProvidedColDef = colDef.pivotValueColumn.getUserProvidedColDef();
|
|
14923
|
+
if (userProvidedColDef) {
|
|
14924
|
+
colDef.filter = userProvidedColDef.filter;
|
|
14935
14925
|
}
|
|
14936
14926
|
if (colDef.pivotKeys) {
|
|
14937
14927
|
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|