@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
package/fesm5/datorama-core.js
CHANGED
|
@@ -12624,15 +12624,18 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12624
12624
|
var _this = this;
|
|
12625
12625
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12626
12626
|
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12627
|
+
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12627
12628
|
this.colField = getColField(this.colDef);
|
|
12629
|
+
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12628
12630
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12629
12631
|
if (filtersConfig.sections) {
|
|
12630
12632
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12631
12633
|
}
|
|
12632
12634
|
this.keepPredefinedListOriginalOrder =
|
|
12633
12635
|
filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
|
|
12634
|
-
var
|
|
12635
|
-
|
|
12636
|
+
var colFilter = filter || colDef.filter;
|
|
12637
|
+
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12638
|
+
this.filterType = filterOptions ? colFilter : DatoGridFilterTypes.String;
|
|
12636
12639
|
this.listLabelType = this.filterType.toLowerCase();
|
|
12637
12640
|
this.listSortByKey = this.filterType === DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12638
12641
|
this.gridQuery = gridQuery;
|
|
@@ -14712,27 +14715,14 @@ var GridService = /** @class */ (function () {
|
|
|
14712
14715
|
/**
|
|
14713
14716
|
* When pivoting,
|
|
14714
14717
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14715
|
-
* @private
|
|
14716
14718
|
*/
|
|
14717
14719
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14718
14720
|
var _this = this;
|
|
14719
14721
|
var gridOptions = _a.gridOptions;
|
|
14720
14722
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14721
|
-
var
|
|
14722
|
-
if (
|
|
14723
|
-
|
|
14724
|
-
var originalColDef = valueColumns
|
|
14725
|
-
.map(function (_a) {
|
|
14726
|
-
var userProvidedColDef = _a.userProvidedColDef;
|
|
14727
|
-
return userProvidedColDef;
|
|
14728
|
-
})
|
|
14729
|
-
.find(function (_a) {
|
|
14730
|
-
var colId = _a.colId;
|
|
14731
|
-
return colId === colDef.pivotValueColumn.getColId();
|
|
14732
|
-
});
|
|
14733
|
-
if (originalColDef) {
|
|
14734
|
-
colDef.filter = originalColDef.filter;
|
|
14735
|
-
}
|
|
14723
|
+
var userProvidedColDef = colDef.pivotValueColumn.getUserProvidedColDef();
|
|
14724
|
+
if (userProvidedColDef) {
|
|
14725
|
+
colDef.filter = userProvidedColDef.filter;
|
|
14736
14726
|
}
|
|
14737
14727
|
if (colDef.pivotKeys) {
|
|
14738
14728
|
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|