@datorama/core 21.4.0-rc.9 → 22.1.1-rc.1
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/bundle.scss +2 -2
- package/bundles/datorama-core.umd.js +113 -65
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +5 -5
- 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 +4 -1
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +9 -9
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +28 -16
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +11 -8
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +27 -14
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -2
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +4 -1
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +12 -9
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +28 -16
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +15 -12
- package/esm5/lib/grid-v2/grid-store/grid.service.js +48 -29
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -2
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +85 -46
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +113 -65
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +3 -2
- package/lib/grid-v2/grid-filter/filter-validator.d.ts +4 -3
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +3 -2
- package/lib/grid-v2/grid-store/grid.query.d.ts +3 -2
- package/lib/grid-v2/grid-store/grid.service.d.ts +4 -3
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11377,15 +11377,14 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11377
11377
|
};
|
|
11378
11378
|
GridQuery.prototype.getSort = function () {
|
|
11379
11379
|
if (this.gridRef.gridOptions.pivotMode) {
|
|
11380
|
-
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort,
|
|
11381
|
-
var column = this.api.columns.getColumn(
|
|
11382
|
-
var
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
var
|
|
11386
|
-
var secondaryColumn = secondaryColumns.find(function (col) { return col.getColId() === pivotedColumn_1.getColId(); });
|
|
11380
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11381
|
+
var column = this.api.columns.getColumn(colId);
|
|
11382
|
+
var pivotedColumn = this.getSecondaryColumn(colId);
|
|
11383
|
+
if (pivotedColumn) {
|
|
11384
|
+
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11385
|
+
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11387
11386
|
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11388
|
-
return { colId: getColField(
|
|
11387
|
+
return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11389
11388
|
}
|
|
11390
11389
|
else if (column) {
|
|
11391
11390
|
return { colId: getColField(column.getColDef()), sort: sort };
|
|
@@ -11420,9 +11419,9 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11420
11419
|
GridQuery.prototype.filterChanged = function () {
|
|
11421
11420
|
return this.selectFilter().pipe(map$1(function (filter) {
|
|
11422
11421
|
return Object.keys(filter).reduce(function (filters, field) {
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
filters.push({ field: field, filter:
|
|
11422
|
+
var datoFilter = filter[field];
|
|
11423
|
+
if (datoFilter) {
|
|
11424
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11426
11425
|
}
|
|
11427
11426
|
return filters;
|
|
11428
11427
|
}, []);
|
|
@@ -11488,6 +11487,10 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11488
11487
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11489
11488
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11490
11489
|
};
|
|
11490
|
+
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11491
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11492
|
+
return secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11493
|
+
};
|
|
11491
11494
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11492
11495
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
11493
11496
|
};
|
|
@@ -11600,9 +11603,10 @@ function validateStringCondition(rowValue, _a) {
|
|
|
11600
11603
|
return !isEmpty(valueLowerCase);
|
|
11601
11604
|
}
|
|
11602
11605
|
}
|
|
11603
|
-
function validateNumberCondition(unparsedRowValue, _a) {
|
|
11606
|
+
function validateNumberCondition(unparsedRowValue, _a, filterKey) {
|
|
11604
11607
|
var condition = _a.condition, value = _a.value, rangeEnd = _a.rangeEnd;
|
|
11605
|
-
|
|
11608
|
+
if (filterKey === void 0) { filterKey = ''; }
|
|
11609
|
+
var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue[filterKey] || unparsedRowValue) : null;
|
|
11606
11610
|
var filterValue = parseFloat(value);
|
|
11607
11611
|
switch (condition) {
|
|
11608
11612
|
case DatoFilterConditions.EQUALS:
|
|
@@ -11650,14 +11654,14 @@ function validateDateCondition(rowValue, _a) {
|
|
|
11650
11654
|
}
|
|
11651
11655
|
}
|
|
11652
11656
|
function validateCondition(_a) {
|
|
11653
|
-
var rowValue = _a.rowValue,
|
|
11657
|
+
var rowValue = _a.rowValue, condition = _a.condition, type = _a.type, filterKey = _a.filterKey;
|
|
11654
11658
|
switch (type) {
|
|
11655
11659
|
case DatoGridFilterTypes.Date:
|
|
11656
|
-
return validateDateCondition(rowValue,
|
|
11660
|
+
return validateDateCondition(rowValue, condition);
|
|
11657
11661
|
case DatoGridFilterTypes.Number:
|
|
11658
|
-
return validateNumberCondition(rowValue,
|
|
11662
|
+
return validateNumberCondition(rowValue, condition, filterKey);
|
|
11659
11663
|
default:
|
|
11660
|
-
return validateStringCondition(rowValue,
|
|
11664
|
+
return validateStringCondition(rowValue, condition);
|
|
11661
11665
|
}
|
|
11662
11666
|
}
|
|
11663
11667
|
function validateFilter(_a, activeFilters) {
|
|
@@ -11668,7 +11672,7 @@ function validateFilter(_a, activeFilters) {
|
|
|
11668
11672
|
var _loop_1 = function (filter) {
|
|
11669
11673
|
var filterPasses = true;
|
|
11670
11674
|
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
|
|
11671
|
-
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11675
|
+
var currentRowPivotKeys = (row.parent && row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped)) || [];
|
|
11672
11676
|
var rowValue = api.getValue(filter, row);
|
|
11673
11677
|
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11674
11678
|
if (pivotKeys && pivotKeys.length > 0 && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
@@ -11677,7 +11681,9 @@ function validateFilter(_a, activeFilters) {
|
|
|
11677
11681
|
if (conditional) {
|
|
11678
11682
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11679
11683
|
var conditionsRelation = operator === OperatorTypes.AND ? 'every' : 'some';
|
|
11680
|
-
filterPasses = conditions[conditionsRelation](function (
|
|
11684
|
+
filterPasses = conditions[conditionsRelation](function (condition) {
|
|
11685
|
+
return validateCondition({ rowValue: rowValue, condition: condition, type: type_1, filterKey: filter });
|
|
11686
|
+
});
|
|
11681
11687
|
}
|
|
11682
11688
|
if (filterPasses && byValue) {
|
|
11683
11689
|
var includesValue = byValue.values.includes(rowValue);
|
|
@@ -12477,12 +12483,12 @@ var mapToValue = function (_a) {
|
|
|
12477
12483
|
var ɵ0$1 = mapToValue;
|
|
12478
12484
|
var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
|
|
12479
12485
|
var ɵ1$1 = mapToListItem;
|
|
12480
|
-
var mapToListItemWithFormatted = function (_a) {
|
|
12486
|
+
var mapToListItemWithFormatted = function (_a, key) {
|
|
12481
12487
|
var value = _a.value, formattedValue = _a.formattedValue;
|
|
12482
12488
|
return ({
|
|
12483
|
-
id: value,
|
|
12484
|
-
label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
|
|
12485
|
-
value: value
|
|
12489
|
+
id: key && value ? value[key] : value,
|
|
12490
|
+
label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
|
|
12491
|
+
value: key && value ? value[key] : value
|
|
12486
12492
|
});
|
|
12487
12493
|
};
|
|
12488
12494
|
var ɵ2$1 = mapToListItemWithFormatted;
|
|
@@ -12621,15 +12627,18 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12621
12627
|
var _this = this;
|
|
12622
12628
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12623
12629
|
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12630
|
+
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12624
12631
|
this.colField = getColField(this.colDef);
|
|
12632
|
+
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12633
|
+
var colFilter = filter || colDef.filter;
|
|
12634
|
+
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12625
12635
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12626
12636
|
if (filtersConfig.sections) {
|
|
12627
12637
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12628
12638
|
}
|
|
12629
12639
|
this.keepPredefinedListOriginalOrder =
|
|
12630
12640
|
filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
|
|
12631
|
-
|
|
12632
|
-
this.filterType = filterOptions ? filter : DatoGridFilterTypes.String;
|
|
12641
|
+
this.filterType = filterOptions ? colFilter : DatoGridFilterTypes.String;
|
|
12633
12642
|
this.listLabelType = this.filterType.toLowerCase();
|
|
12634
12643
|
this.listSortByKey = this.filterType === DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12635
12644
|
this.gridQuery = gridQuery;
|
|
@@ -12664,9 +12673,11 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12664
12673
|
var columnValues = this.getColumnValues();
|
|
12665
12674
|
this.columnValues = columnValues.map(function (_a) {
|
|
12666
12675
|
var value = _a.value;
|
|
12667
|
-
return value;
|
|
12676
|
+
return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
|
|
12677
|
+
});
|
|
12678
|
+
this.listOptions = columnValues.map(function (colValue) {
|
|
12679
|
+
return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
|
|
12668
12680
|
});
|
|
12669
|
-
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12670
12681
|
}
|
|
12671
12682
|
}
|
|
12672
12683
|
else {
|
|
@@ -12704,6 +12715,7 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12704
12715
|
isEmpty(filter)
|
|
12705
12716
|
? this.gridService.clearColumnFilter(this.colField)
|
|
12706
12717
|
: this.gridService.setColumnFilter(column, filter);
|
|
12718
|
+
this.gridService.notifyFilterUpdate();
|
|
12707
12719
|
}
|
|
12708
12720
|
};
|
|
12709
12721
|
DatoGridFilterComponent.prototype.clearFilters = function () {
|
|
@@ -12757,19 +12769,25 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12757
12769
|
var _this = this;
|
|
12758
12770
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12759
12771
|
var filter = {};
|
|
12760
|
-
filter.pivotKeys = this.pivotKeys;
|
|
12761
|
-
if (this.pivotColumn) {
|
|
12762
|
-
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12763
|
-
fieldMap[field] = _this.pivotKeys[index];
|
|
12764
|
-
return fieldMap;
|
|
12765
|
-
}, {});
|
|
12766
|
-
}
|
|
12767
12772
|
if (this.filterSections.Conditional) {
|
|
12768
12773
|
this.setConditionalFilter(filter, conditional);
|
|
12769
12774
|
}
|
|
12770
12775
|
if (this.filterSections.By_Value) {
|
|
12771
12776
|
this.setByValueFilter(filter, byValue);
|
|
12772
12777
|
}
|
|
12778
|
+
/** If filters applied, add the extra properties to be used by pivot mode */
|
|
12779
|
+
if (filter.byValue || filter.conditional) {
|
|
12780
|
+
filter.colId = this.colDef.colId;
|
|
12781
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12782
|
+
if (this.pivotColumn) {
|
|
12783
|
+
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12784
|
+
if (_this.pivotKeys[index]) {
|
|
12785
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12786
|
+
}
|
|
12787
|
+
return fieldMap;
|
|
12788
|
+
}, {});
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12773
12791
|
return filter;
|
|
12774
12792
|
};
|
|
12775
12793
|
DatoGridFilterComponent.prototype.initForm = function () {
|
|
@@ -14151,12 +14169,45 @@ var GridService = /** @class */ (function () {
|
|
|
14151
14169
|
});
|
|
14152
14170
|
this.notifyFilterUpdate();
|
|
14153
14171
|
};
|
|
14154
|
-
GridService.prototype.setColumnFilter = function (column, filter) {
|
|
14172
|
+
GridService.prototype.setColumnFilter = function (column, filter, notifyGrid) {
|
|
14173
|
+
if (notifyGrid === void 0) { notifyGrid = true; }
|
|
14155
14174
|
this._logEvent("Grids - Filter Applied" /* GRID_FILTER_APPLIED */, {
|
|
14156
14175
|
column: column.getColId(),
|
|
14157
14176
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14158
14177
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14159
14178
|
});
|
|
14179
|
+
this.updateFilter(column, filter);
|
|
14180
|
+
if (notifyGrid) {
|
|
14181
|
+
this.notifyFilterUpdate();
|
|
14182
|
+
}
|
|
14183
|
+
};
|
|
14184
|
+
GridService.prototype.setGridFilters = function (filters) {
|
|
14185
|
+
var e_2, _a;
|
|
14186
|
+
if (this.api) {
|
|
14187
|
+
try {
|
|
14188
|
+
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14189
|
+
var filter = filters_1_1.value.filter;
|
|
14190
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14191
|
+
if (column) {
|
|
14192
|
+
this.setColumnFilter(column, filter);
|
|
14193
|
+
}
|
|
14194
|
+
else {
|
|
14195
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14196
|
+
this.setColumnFilter(pivotColumn, filter);
|
|
14197
|
+
}
|
|
14198
|
+
}
|
|
14199
|
+
}
|
|
14200
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
14201
|
+
finally {
|
|
14202
|
+
try {
|
|
14203
|
+
if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
|
|
14204
|
+
}
|
|
14205
|
+
finally { if (e_2) throw e_2.error; }
|
|
14206
|
+
}
|
|
14207
|
+
this.notifyFilterUpdate();
|
|
14208
|
+
}
|
|
14209
|
+
};
|
|
14210
|
+
GridService.prototype.updateFilter = function (column, filter) {
|
|
14160
14211
|
var colField = getColField(column.getColDef());
|
|
14161
14212
|
this.store.update(function (state) {
|
|
14162
14213
|
var _a;
|
|
@@ -14164,7 +14215,6 @@ var GridService = /** @class */ (function () {
|
|
|
14164
14215
|
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14165
14216
|
};
|
|
14166
14217
|
});
|
|
14167
|
-
this.notifyFilterUpdate();
|
|
14168
14218
|
};
|
|
14169
14219
|
GridService.prototype.setSearchTerm = function (searchTerm) {
|
|
14170
14220
|
this.store.update(function (state) {
|
|
@@ -14457,7 +14507,7 @@ var GridService = /** @class */ (function () {
|
|
|
14457
14507
|
this.api.grid.onFilterChanged();
|
|
14458
14508
|
};
|
|
14459
14509
|
GridService.prototype.buildServerRequestFilters = function (filter) {
|
|
14460
|
-
var
|
|
14510
|
+
var e_3, _a;
|
|
14461
14511
|
var columnsFilters = {};
|
|
14462
14512
|
try {
|
|
14463
14513
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14493,12 +14543,12 @@ var GridService = /** @class */ (function () {
|
|
|
14493
14543
|
}
|
|
14494
14544
|
}
|
|
14495
14545
|
}
|
|
14496
|
-
catch (
|
|
14546
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
14497
14547
|
finally {
|
|
14498
14548
|
try {
|
|
14499
14549
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14500
14550
|
}
|
|
14501
|
-
finally { if (
|
|
14551
|
+
finally { if (e_3) throw e_3.error; }
|
|
14502
14552
|
}
|
|
14503
14553
|
return columnsFilters;
|
|
14504
14554
|
};
|
|
@@ -14551,7 +14601,7 @@ var GridService = /** @class */ (function () {
|
|
|
14551
14601
|
return { operator: OperatorTypes.AND, filters: [columnFilter, searchFilter] };
|
|
14552
14602
|
};
|
|
14553
14603
|
GridService.prototype.buildServerColumnFilters_v2_1 = function (filter) {
|
|
14554
|
-
var
|
|
14604
|
+
var e_4, _a;
|
|
14555
14605
|
var columnFilters = [];
|
|
14556
14606
|
try {
|
|
14557
14607
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14576,12 +14626,12 @@ var GridService = /** @class */ (function () {
|
|
|
14576
14626
|
columnFilters.push(columnFilter);
|
|
14577
14627
|
}
|
|
14578
14628
|
}
|
|
14579
|
-
catch (
|
|
14629
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14580
14630
|
finally {
|
|
14581
14631
|
try {
|
|
14582
14632
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14583
14633
|
}
|
|
14584
|
-
finally { if (
|
|
14634
|
+
finally { if (e_4) throw e_4.error; }
|
|
14585
14635
|
}
|
|
14586
14636
|
return columnFilters;
|
|
14587
14637
|
};
|
|
@@ -14674,27 +14724,14 @@ var GridService = /** @class */ (function () {
|
|
|
14674
14724
|
/**
|
|
14675
14725
|
* When pivoting,
|
|
14676
14726
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14677
|
-
* @private
|
|
14678
14727
|
*/
|
|
14679
14728
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14680
14729
|
var _this = this;
|
|
14681
14730
|
var gridOptions = _a.gridOptions;
|
|
14682
14731
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14683
|
-
var
|
|
14684
|
-
if (
|
|
14685
|
-
|
|
14686
|
-
var originalColDef = valueColumns
|
|
14687
|
-
.map(function (_a) {
|
|
14688
|
-
var userProvidedColDef = _a.userProvidedColDef;
|
|
14689
|
-
return userProvidedColDef;
|
|
14690
|
-
})
|
|
14691
|
-
.find(function (_a) {
|
|
14692
|
-
var colId = _a.colId;
|
|
14693
|
-
return colId === colDef.pivotValueColumn.getColId();
|
|
14694
|
-
});
|
|
14695
|
-
if (originalColDef) {
|
|
14696
|
-
colDef.filter = originalColDef.filter;
|
|
14697
|
-
}
|
|
14732
|
+
var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
|
|
14733
|
+
if (userProvidedColDef) {
|
|
14734
|
+
colDef.filter = userProvidedColDef.filter;
|
|
14698
14735
|
}
|
|
14699
14736
|
if (colDef.pivotKeys) {
|
|
14700
14737
|
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|
|
@@ -14710,7 +14747,7 @@ var GridService = /** @class */ (function () {
|
|
|
14710
14747
|
var field = parsedValue.field, value = parsedValue.value;
|
|
14711
14748
|
colGroupDef.headerClass = [field];
|
|
14712
14749
|
colGroupDef.headerName = value;
|
|
14713
|
-
if (colGroupDef.children && colGroupDef.children.length >
|
|
14750
|
+
if (colGroupDef.children && colGroupDef.children.length > 0) {
|
|
14714
14751
|
colGroupDef.headerClass.push('group-pivot-cell');
|
|
14715
14752
|
}
|
|
14716
14753
|
}
|
|
@@ -14737,7 +14774,7 @@ var GridService = /** @class */ (function () {
|
|
|
14737
14774
|
GridService.prototype.setPivotModeRows = function (data) {
|
|
14738
14775
|
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14739
14776
|
var convertedData = data.map(function (currentValue, index) {
|
|
14740
|
-
var
|
|
14777
|
+
var e_5, _a;
|
|
14741
14778
|
var mappedValues = __assign({}, currentValue);
|
|
14742
14779
|
try {
|
|
14743
14780
|
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
@@ -14747,12 +14784,12 @@ var GridService = /** @class */ (function () {
|
|
|
14747
14784
|
mappedValues[field] = JSON.stringify(pivotValue);
|
|
14748
14785
|
}
|
|
14749
14786
|
}
|
|
14750
|
-
catch (
|
|
14787
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
14751
14788
|
finally {
|
|
14752
14789
|
try {
|
|
14753
14790
|
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14754
14791
|
}
|
|
14755
|
-
finally { if (
|
|
14792
|
+
finally { if (e_5) throw e_5.error; }
|
|
14756
14793
|
}
|
|
14757
14794
|
return mappedValues;
|
|
14758
14795
|
});
|
|
@@ -15271,6 +15308,9 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15271
15308
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15272
15309
|
this.gridService.setRows(data);
|
|
15273
15310
|
};
|
|
15311
|
+
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15312
|
+
this.gridService.setGridFilters(filters);
|
|
15313
|
+
};
|
|
15274
15314
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15275
15315
|
return this.gridQuery.filterChanged();
|
|
15276
15316
|
};
|
|
@@ -16184,6 +16224,9 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
16184
16224
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16185
16225
|
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16186
16226
|
this.isExpanded = !this.isExpanded;
|
|
16227
|
+
// this.gridApi.forEachNode((node: RowNode) => {
|
|
16228
|
+
// node.setExpanded(this.isExpanded);
|
|
16229
|
+
// });
|
|
16187
16230
|
};
|
|
16188
16231
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16189
16232
|
this.gridService.fitGrid(type);
|
|
@@ -16276,7 +16319,7 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
16276
16319
|
Component({
|
|
16277
16320
|
selector: 'dato-grid-pagination-v2',
|
|
16278
16321
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16279
|
-
template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"toggleGroupsState()\" data-auto-id=\"pagiantion-
|
|
16322
|
+
template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"toggleGroupsState()\" data-auto-id=\"pagiantion-expand-collapse\"\n [datoTooltipV2]=\"isExpanded ? 'core.collapse-rows' : 'core.expand-rows'\">\n </dato-icon-button>\n\n <dato-icon-button class=\"mx-4\" icon=\"maximize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('content')\" [datoTooltipV2]=\"'core.fit-to-content'\"\n data-auto-id=\"pagiantion-fit-to-content\">\n </dato-icon-button>\n\n <dato-icon-button icon=\"minimize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('container')\" [datoTooltipV2]=\"'core.fit-to-container'\"\n data-auto-id=\"pagiantion-fit-to-container\">\n </dato-icon-button>\n </div>\n</div>\n",
|
|
16280
16323
|
providers: [DecimalPipe],
|
|
16281
16324
|
styles: [":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]
|
|
16282
16325
|
}),
|
|
@@ -16390,6 +16433,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
16390
16433
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16391
16434
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16392
16435
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16436
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16393
16437
|
this.openMenus = {
|
|
16394
16438
|
group: false,
|
|
16395
16439
|
settings: false
|
|
@@ -16809,10 +16853,14 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
16809
16853
|
Input(),
|
|
16810
16854
|
__metadata("design:type", Number)
|
|
16811
16855
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
16856
|
+
__decorate([
|
|
16857
|
+
Input(),
|
|
16858
|
+
__metadata("design:type", Object)
|
|
16859
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
16812
16860
|
DatoGridV2ToolbarComponent = __decorate([
|
|
16813
16861
|
Component({
|
|
16814
16862
|
selector: 'dato-grid-toolbar-v2',
|
|
16815
|
-
template: "<section *ngIf=\"gridController.gridQuery.gridReady$ | async\" class=\"d-flex mb-20 justify-between items-center main-container\" [class.mx-30]=\"enableBackground\">\n\n <section [ngClass]=\"{ 'd-flex items-center right-section': enableV2_1 }\">\n <!-- Dynamic content for the left area -->\n <div data-auto-id=\"grid-toolbar-dynamic-left\">\n <ng-content select=\"[toolbarLeftArea]\"></ng-content>\n </div>\n\n <div class=\"d-flex items-center\">\n <dato-grid-search-bar *ngIf=\"enableSearch\" [searchPlaceholder]=\"searchPlaceholder\"></dato-grid-search-bar>\n <ng-container *ngIf=\"enableV2_1 && selectedRowsCount > 0\">\n <div class=\"d-flex items-center\">\n <div class=\"chip align-center d-flex dato-note px-9 nowrap ml-16\">\n <span data-auto-id=\"grid-selected-items-text\">{{ (allPageRowsSelected ? 'core.all-items-in-page-selected' : 'core.selected-items') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType=\"primary\" datoIcon=\"close\" datoSize=\"md\" class=\"ml-6 pointer\" (click)=\"clearSelectedRows()\"\n data-auto-id=\"grid-clear-selected-rows\"></dato-icon>\n </div>\n <dato-link *ngIf=\"allPageRowsSelected\" (click)=\"selectAllPages()\" datoSize=\"sm\" class=\"ml-10\"\n data-auto-id=\"grid-select-all-pages\">\n <span>{{'core.select-all-items' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf=\"hasRowActions\" class=\"separator\"></div>\n </ng-container>\n </div>\n\n <!-- Row Actions-->\n <div class=\"d-flex items-center\" *ngIf=\"isRowActionsVisible\">\n\n <ng-container *ngFor=\"let rowAction of rowActions.mainList; index as i; last as isLast\">\n\n <div *ngIf=\"!isRowActionHidden(rowAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + rowAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-action-' + i\"\n [class.disabled-action]=\"isActionDisabled(rowAction)\">\n <ng-container [ngTemplateOutlet]=\"rowAction.template || defaultButton\"\n [ngTemplateOutletContext]=\"{disabled: isActionDisabled(rowAction)}\"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)=\"onActionClick(rowAction)\">\n <dato-grid-toolbar-button [icon]=\"rowAction.icon\"\n [disabled]=\"isActionDisabled(rowAction)\"\n [label]=\"rowAction.label\"\n [shortLabel]=\"rowAction.shortLabel\"\n [tooltip]=\"rowAction.tooltip\"\n [getMenu]=\"rowAction.getMenu\"\n [enableV2_1]=\"enableV2_1\"\n [isLast]=\"isLast\"\n [widthToHideLabel]=\"widthToHideActionsLabels\">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf=\"rowActions.moreMenu.length > 0\" class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"rowActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"true\">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n <!-- General Actions -->\n <div class=\"d-flex items-center\">\n <!-- Dynamic content for the right area -->\n <div #customActions data-auto-id=\"grid-toolbar-dynamic-right\">\n <ng-content select=\"[toolbarRightArea]\"></ng-content>\n </div>\n <div *ngIf=\"customActions.childNodes.length\" class=\"separator\"></div>\n <!-- Group buttons -->\n <div *ngIf=\"groupsAllowed\" class=\"d-flex grouping-section opacity-0 invisible\" [class.open]=\"openMenus.group || hasGroups\">\n <dato-icon-button [class.active]=\"openMenus.group\" (click)=\"executeTableAction('Group from Toolbar')\"\n data-auto-id=\"grid-toolbar-open-groups\"\n removeIconPadding datoSize=\"md\" datoType=\"none\" icon=\"group\" iconWidth=\"17px\"\n datoTooltip=\"core.row-grouping\" #groupTrigger\n class=\"mr-10 pointer\"></dato-icon-button>\n <dato-icon-button data-auto-id=\"grid-toolbar-toggle-expand\" datoSize=\"md\" datoType=\"none\"\n (click)=\"executeTableAction('Collapse Expand')\"\n [icon]=\"rowGroupsCollapsed ? 'expand' : 'collapse'\"\n [disabled]=\"!hasGroups\"\n [datoTooltip]=\"'core.' + (rowGroupsCollapsed ? 'expand' : 'collapse') + '-rows'\"\n class=\"pointer\"></dato-icon-button>\n <div class=\"separator\"></div>\n </div>\n\n <!-- Settings and export -->\n <ng-container *ngIf=\"createAction\">\n <dato-button datoSize=\"sm\" class=\"pointer primary-300-color\" (click)=\"onActionClick(createAction)\"\n [datoTooltip]=\"createAction.tooltip\" [attr.data-auto-id]=\"'grid-toolbar-action-' + createAction.key\">\n <dato-icon *ngIf=\"createAction.icon\" [icon]=\"createAction.icon\" class=\"mr-5\"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class=\"separator\"></div>\n </ng-container>\n <ng-container *ngFor=\"let gridAction of gridActions.mainList; index as i\">\n <div *ngIf=\"gridAction.getMenu else button\" [datoMenuTriggerFor]=\"gridAction.getMenu()\">\n <ng-container [ngTemplateOutlet]=\"button\"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize=\"sm\" (click)=\"onActionClick(gridAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + gridAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-general-action-' + i\"\n [icon]=\"gridAction.icon\" class=\"pointer primary-300-color\"\n [class.mr-16]=\"!gridAction.separator\"\n [datoTooltip]=\"gridAction.tooltip || gridAction.label\">\n </dato-icon>\n </ng-template>\n <div *ngIf=\"gridAction.separator\" class=\"separator\"></div>\n </ng-container>\n\n <dato-icon data-auto-id=\"grid-toolbar-export\" datoSize=\"sm\"\n (click)=\"executeTableAction('Export')\" *ngIf=\"displayExport && !isTreeMode\"\n icon=\"export\" class=\"pointer mr-16 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n <dato-icon [class.active]=\"openMenus.settings\" (click)=\"openMenus.settings = true\"\n data-auto-id=\"grid-toolbar-settings\" datoSize=\"sm\"\n icon=\"account\" class=\"pointer primary-300-color\" datoTooltip=\"core.table-settings\"\n #settingsTrigger\n [datoMenuTriggerFor]=\"settingsMenu\"></dato-icon>\n\n <ng-container *ngIf=\"gridActions.moreMenu.length > 0\">\n <div class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"gridActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"false\">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n\n <dato-menu #settingsMenu=\"datoMenu\" menuClass=\"grid-settings-menu\" placement=\"bottom-end\"\n (menuClosed)=\"openMenus.settings = false\">\n <ng-template datoMenuContent>\n <button data-auto-id=\"grid-toolbar-settings-autofit-page\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Page')\">\n <dato-icon datoSize=\"sm\" icon=\"maximize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitPage' | translate }}</button>\n <button data-auto-id=\"grid-toolbar-settings-autofit-content\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Content')\">\n <dato-icon datoSize=\"sm\" icon=\"minimize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitContent' | translate }}</button>\n <ng-container *ngIf=\"groupsAllowed\">\n <button data-auto-id=\"grid-toolbar-settings-group\" datoMenuItem (click)=\"executeTableAction('Group from Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"group\" class=\"mr-4 primary-300-color\"></dato-icon>\n {{ 'core.group' | translate }}\n </button>\n </ng-container>\n <button data-auto-id=\"grid-toolbar-settings-toggle-columns\" datoMenuItem (click)=\"executeTableAction('Show Hide Column')\">\n <dato-icon datoSize=\"sm\" icon=\"hide\" class=\"mr-8 primary-300-color\"></dato-icon>\n <span>{{ 'core.hideShowColumns' | translate }}<span\n class=\"dato-simple-italic ml-5 primary-200-color\">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-settings\" datoMenuItem\n (click)=\"executeTableAction('Reset Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-table\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetTableSettings' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-filters\" datoMenuItem\n (click)=\"executeTableAction('Reset Filters')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-filters\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetAllFilters' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-export\" datoMenuItem\n (click)=\"executeTableAction('Export')\" *ngIf=\"this.displayExport && isTreeMode\">\n <dato-icon datoSize=\"sm\"\n icon=\"export\" class=\"pointer mr-5 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n {{ 'core.export-table' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n",
|
|
16863
|
+
template: "<section *ngIf=\"gridController.gridQuery.gridReady$ | async\" class=\"d-flex mb-20 justify-between items-center main-container\" [class.mx-30]=\"enableBackground\">\n\n <section [ngClass]=\"{ 'd-flex items-center right-section': enableV2_1 }\">\n <!-- Dynamic content for the left area -->\n <div data-auto-id=\"grid-toolbar-dynamic-left\">\n <ng-content select=\"[toolbarLeftArea]\"></ng-content>\n </div>\n\n <div class=\"d-flex items-center\">\n <dato-grid-search-bar *ngIf=\"enableSearch\" [searchPlaceholder]=\"searchPlaceholder\"></dato-grid-search-bar>\n <ng-container *ngIf=\"enableV2_1 && selectedRowsCount > 0\">\n <div class=\"d-flex items-center\">\n <div class=\"chip align-center d-flex dato-note px-9 nowrap ml-16\">\n <span data-auto-id=\"grid-selected-items-text\">{{ (allPageRowsSelected ? 'core.all-items-in-page-selected' : 'core.selected-items') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType=\"primary\" datoIcon=\"close\" datoSize=\"md\" class=\"ml-6 pointer\" (click)=\"clearSelectedRows()\"\n data-auto-id=\"grid-clear-selected-rows\"></dato-icon>\n </div>\n <dato-link *ngIf=\"allPageRowsSelected\" (click)=\"selectAllPages()\" datoSize=\"sm\" class=\"ml-10\"\n data-auto-id=\"grid-select-all-pages\">\n <span>{{'core.select-all-items' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf=\"hasRowActions\" class=\"separator\"></div>\n </ng-container>\n </div>\n\n <!-- Row Actions-->\n <div class=\"d-flex items-center\" *ngIf=\"isRowActionsVisible\">\n\n <ng-container *ngFor=\"let rowAction of rowActions.mainList; index as i; last as isLast\">\n\n <div *ngIf=\"!isRowActionHidden(rowAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + rowAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-action-' + i\"\n [class.disabled-action]=\"isActionDisabled(rowAction)\">\n <ng-container [ngTemplateOutlet]=\"rowAction.template || defaultButton\"\n [ngTemplateOutletContext]=\"{disabled: isActionDisabled(rowAction)}\"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)=\"onActionClick(rowAction)\">\n <dato-grid-toolbar-button [icon]=\"rowAction.icon\"\n [disabled]=\"isActionDisabled(rowAction)\"\n [label]=\"rowAction.label\"\n [shortLabel]=\"rowAction.shortLabel\"\n [tooltip]=\"rowAction.tooltip\"\n [getMenu]=\"rowAction.getMenu\"\n [enableV2_1]=\"enableV2_1\"\n [isLast]=\"isLast\"\n [widthToHideLabel]=\"widthToHideActionsLabels\">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf=\"rowActions.moreMenu.length > 0\" class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"rowActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"true\">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n <!-- General Actions -->\n <div class=\"d-flex items-center\">\n <!-- Create action -->\n <ng-container *ngIf=\"createAction\">\n <dato-button datoSize=\"sm\" class=\"pointer primary-300-color\" (click)=\"onActionClick(createAction)\"\n [datoTooltip]=\"createAction.tooltip\" [attr.data-auto-id]=\"'grid-toolbar-action-' + createAction.key\">\n <dato-icon *ngIf=\"createAction.icon\" [icon]=\"createAction.icon\" class=\"mr-5\"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class=\"separator\"></div>\n </ng-container>\n\n <!-- Dynamic content for the right area -->\n <div #customActions data-auto-id=\"grid-toolbar-dynamic-right\">\n <ng-content select=\"[toolbarRightArea]\"></ng-content>\n </div>\n <div *ngIf=\"customActions.childNodes.length && displayCustomGridActionsSeparator\" class=\"separator\"></div>\n\n <!-- Group buttons -->\n <div *ngIf=\"groupsAllowed\" class=\"d-flex grouping-section opacity-0 invisible\" [class.open]=\"openMenus.group || hasGroups\">\n <dato-icon-button [class.active]=\"openMenus.group\" (click)=\"executeTableAction('Group from Toolbar')\"\n data-auto-id=\"grid-toolbar-open-groups\"\n removeIconPadding datoSize=\"md\" datoType=\"none\" icon=\"group\" iconWidth=\"17px\"\n datoTooltip=\"core.row-grouping\" #groupTrigger\n class=\"mr-10 pointer\"></dato-icon-button>\n <dato-icon-button data-auto-id=\"grid-toolbar-toggle-expand\" datoSize=\"md\" datoType=\"none\"\n (click)=\"executeTableAction('Collapse Expand')\"\n [icon]=\"rowGroupsCollapsed ? 'expand' : 'collapse'\"\n [disabled]=\"!hasGroups\"\n [datoTooltip]=\"'core.' + (rowGroupsCollapsed ? 'expand' : 'collapse') + '-rows'\"\n class=\"pointer\"></dato-icon-button>\n <div class=\"separator\"></div>\n </div>\n\n <!-- Grid Actions -->\n <ng-container *ngFor=\"let gridAction of gridActions.mainList; index as i\">\n <div *ngIf=\"gridAction.getMenu else button\" [datoMenuTriggerFor]=\"gridAction.getMenu()\">\n <ng-container [ngTemplateOutlet]=\"button\"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize=\"sm\" (click)=\"onActionClick(gridAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + gridAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-general-action-' + i\"\n [icon]=\"gridAction.icon\" class=\"pointer primary-300-color\"\n [class.mr-16]=\"!gridAction.separator\"\n [datoTooltip]=\"gridAction.tooltip || gridAction.label\">\n </dato-icon>\n </ng-template>\n <div *ngIf=\"gridAction.separator\" class=\"separator\"></div>\n </ng-container>\n\n <!-- Export -->\n <dato-icon data-auto-id=\"grid-toolbar-export\" datoSize=\"sm\"\n (click)=\"executeTableAction('Export')\" *ngIf=\"displayExport && !isTreeMode\"\n icon=\"export\" class=\"pointer mr-16 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n\n <!-- Settings -->\n <dato-icon [class.active]=\"openMenus.settings\" (click)=\"openMenus.settings = true\"\n data-auto-id=\"grid-toolbar-settings\" datoSize=\"sm\"\n icon=\"account\" class=\"pointer primary-300-color\" datoTooltip=\"core.table-settings\"\n #settingsTrigger\n [datoMenuTriggerFor]=\"settingsMenu\"></dato-icon>\n\n <!-- More actions menu -->\n <ng-container *ngIf=\"gridActions.moreMenu.length > 0\">\n <div class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"gridActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"false\">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu=\"datoMenu\" menuClass=\"grid-settings-menu\" placement=\"bottom-end\"\n (menuClosed)=\"openMenus.settings = false\">\n <ng-template datoMenuContent>\n <button data-auto-id=\"grid-toolbar-settings-autofit-page\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Page')\">\n <dato-icon datoSize=\"sm\" icon=\"maximize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitPage' | translate }}</button>\n <button data-auto-id=\"grid-toolbar-settings-autofit-content\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Content')\">\n <dato-icon datoSize=\"sm\" icon=\"minimize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitContent' | translate }}</button>\n <ng-container *ngIf=\"groupsAllowed\">\n <button data-auto-id=\"grid-toolbar-settings-group\" datoMenuItem (click)=\"executeTableAction('Group from Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"group\" class=\"mr-4 primary-300-color\"></dato-icon>\n {{ 'core.group' | translate }}\n </button>\n </ng-container>\n <button data-auto-id=\"grid-toolbar-settings-toggle-columns\" datoMenuItem (click)=\"executeTableAction('Show Hide Column')\">\n <dato-icon datoSize=\"sm\" icon=\"hide\" class=\"mr-8 primary-300-color\"></dato-icon>\n <span>{{ 'core.hideShowColumns' | translate }}<span\n class=\"dato-simple-italic ml-5 primary-200-color\">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-settings\" datoMenuItem\n (click)=\"executeTableAction('Reset Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-table\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetTableSettings' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-filters\" datoMenuItem\n (click)=\"executeTableAction('Reset Filters')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-filters\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetAllFilters' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-export\" datoMenuItem\n (click)=\"executeTableAction('Export')\" *ngIf=\"this.displayExport && isTreeMode\">\n <dato-icon datoSize=\"sm\"\n icon=\"export\" class=\"pointer mr-5 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n {{ 'core.export-table' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n",
|
|
16816
16864
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16817
16865
|
styles: [".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]
|
|
16818
16866
|
}),
|
|
@@ -25102,7 +25150,7 @@ function fixNgLeaks() {
|
|
|
25102
25150
|
};
|
|
25103
25151
|
}
|
|
25104
25152
|
|
|
25105
|
-
window.coreVersion = '
|
|
25153
|
+
window.coreVersion = '22.1.1-rc.';
|
|
25106
25154
|
|
|
25107
25155
|
/**
|
|
25108
25156
|
* @license
|