@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/bundle.scss
CHANGED
|
@@ -14333,11 +14333,11 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group span {
|
|
|
14333
14333
|
color: themify(primary-500) !important;
|
|
14334
14334
|
}
|
|
14335
14335
|
|
|
14336
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group
|
|
14336
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group:not(.ag-row-level-0) {
|
|
14337
14337
|
background-color: themify(primary-50) !important;
|
|
14338
14338
|
}
|
|
14339
14339
|
|
|
14340
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group
|
|
14340
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group:not(.ag-row-level-0) span {
|
|
14341
14341
|
font-weight: 400;
|
|
14342
14342
|
}
|
|
14343
14343
|
|
|
@@ -11576,15 +11576,14 @@
|
|
|
11576
11576
|
};
|
|
11577
11577
|
GridQuery.prototype.getSort = function () {
|
|
11578
11578
|
if (this.gridRef.gridOptions.pivotMode) {
|
|
11579
|
-
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort,
|
|
11580
|
-
var column = this.api.columns.getColumn(
|
|
11581
|
-
var
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
var
|
|
11585
|
-
var secondaryColumn = secondaryColumns.find(function (col) { return col.getColId() === pivotedColumn_1.getColId(); });
|
|
11579
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11580
|
+
var column = this.api.columns.getColumn(colId);
|
|
11581
|
+
var pivotedColumn = this.getSecondaryColumn(colId);
|
|
11582
|
+
if (pivotedColumn) {
|
|
11583
|
+
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11584
|
+
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11586
11585
|
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11587
|
-
return { colId: getColField(
|
|
11586
|
+
return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11588
11587
|
}
|
|
11589
11588
|
else if (column) {
|
|
11590
11589
|
return { colId: getColField(column.getColDef()), sort: sort };
|
|
@@ -11619,9 +11618,9 @@
|
|
|
11619
11618
|
GridQuery.prototype.filterChanged = function () {
|
|
11620
11619
|
return this.selectFilter().pipe(operators.map(function (filter) {
|
|
11621
11620
|
return Object.keys(filter).reduce(function (filters, field) {
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
filters.push({ field: field, filter:
|
|
11621
|
+
var datoFilter = filter[field];
|
|
11622
|
+
if (datoFilter) {
|
|
11623
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11625
11624
|
}
|
|
11626
11625
|
return filters;
|
|
11627
11626
|
}, []);
|
|
@@ -11687,6 +11686,10 @@
|
|
|
11687
11686
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11688
11687
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11689
11688
|
};
|
|
11689
|
+
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11690
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11691
|
+
return secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11692
|
+
};
|
|
11690
11693
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11691
11694
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
11692
11695
|
};
|
|
@@ -11799,9 +11802,10 @@
|
|
|
11799
11802
|
return !isEmpty(valueLowerCase);
|
|
11800
11803
|
}
|
|
11801
11804
|
}
|
|
11802
|
-
function validateNumberCondition(unparsedRowValue, _a) {
|
|
11805
|
+
function validateNumberCondition(unparsedRowValue, _a, filterKey) {
|
|
11803
11806
|
var condition = _a.condition, value = _a.value, rangeEnd = _a.rangeEnd;
|
|
11804
|
-
|
|
11807
|
+
if (filterKey === void 0) { filterKey = ''; }
|
|
11808
|
+
var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue[filterKey] || unparsedRowValue) : null;
|
|
11805
11809
|
var filterValue = parseFloat(value);
|
|
11806
11810
|
switch (condition) {
|
|
11807
11811
|
case exports.DatoFilterConditions.EQUALS:
|
|
@@ -11849,14 +11853,14 @@
|
|
|
11849
11853
|
}
|
|
11850
11854
|
}
|
|
11851
11855
|
function validateCondition(_a) {
|
|
11852
|
-
var rowValue = _a.rowValue,
|
|
11856
|
+
var rowValue = _a.rowValue, condition = _a.condition, type = _a.type, filterKey = _a.filterKey;
|
|
11853
11857
|
switch (type) {
|
|
11854
11858
|
case exports.DatoGridFilterTypes.Date:
|
|
11855
|
-
return validateDateCondition(rowValue,
|
|
11859
|
+
return validateDateCondition(rowValue, condition);
|
|
11856
11860
|
case exports.DatoGridFilterTypes.Number:
|
|
11857
|
-
return validateNumberCondition(rowValue,
|
|
11861
|
+
return validateNumberCondition(rowValue, condition, filterKey);
|
|
11858
11862
|
default:
|
|
11859
|
-
return validateStringCondition(rowValue,
|
|
11863
|
+
return validateStringCondition(rowValue, condition);
|
|
11860
11864
|
}
|
|
11861
11865
|
}
|
|
11862
11866
|
function validateFilter(_a, activeFilters) {
|
|
@@ -11867,7 +11871,7 @@
|
|
|
11867
11871
|
var _loop_1 = function (filter) {
|
|
11868
11872
|
var filterPasses = true;
|
|
11869
11873
|
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
|
|
11870
|
-
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11874
|
+
var currentRowPivotKeys = (row.parent && row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped)) || [];
|
|
11871
11875
|
var rowValue = api.getValue(filter, row);
|
|
11872
11876
|
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11873
11877
|
if (pivotKeys && pivotKeys.length > 0 && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
@@ -11876,7 +11880,9 @@
|
|
|
11876
11880
|
if (conditional) {
|
|
11877
11881
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11878
11882
|
var conditionsRelation = operator === exports.OperatorTypes.AND ? 'every' : 'some';
|
|
11879
|
-
filterPasses = conditions[conditionsRelation](function (
|
|
11883
|
+
filterPasses = conditions[conditionsRelation](function (condition) {
|
|
11884
|
+
return validateCondition({ rowValue: rowValue, condition: condition, type: type_1, filterKey: filter });
|
|
11885
|
+
});
|
|
11880
11886
|
}
|
|
11881
11887
|
if (filterPasses && byValue) {
|
|
11882
11888
|
var includesValue = byValue.values.includes(rowValue);
|
|
@@ -12676,12 +12682,12 @@
|
|
|
12676
12682
|
var ɵ0$1 = mapToValue;
|
|
12677
12683
|
var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
|
|
12678
12684
|
var ɵ1$1 = mapToListItem;
|
|
12679
|
-
var mapToListItemWithFormatted = function (_a) {
|
|
12685
|
+
var mapToListItemWithFormatted = function (_a, key) {
|
|
12680
12686
|
var value = _a.value, formattedValue = _a.formattedValue;
|
|
12681
12687
|
return ({
|
|
12682
|
-
id: value,
|
|
12683
|
-
label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
|
|
12684
|
-
value: value
|
|
12688
|
+
id: key && value ? value[key] : value,
|
|
12689
|
+
label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
|
|
12690
|
+
value: key && value ? value[key] : value
|
|
12685
12691
|
});
|
|
12686
12692
|
};
|
|
12687
12693
|
var ɵ2$1 = mapToListItemWithFormatted;
|
|
@@ -12820,15 +12826,18 @@
|
|
|
12820
12826
|
var _this = this;
|
|
12821
12827
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12822
12828
|
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12829
|
+
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12823
12830
|
this.colField = getColField(this.colDef);
|
|
12831
|
+
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12832
|
+
var colFilter = filter || colDef.filter;
|
|
12833
|
+
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12824
12834
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12825
12835
|
if (filtersConfig.sections) {
|
|
12826
12836
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12827
12837
|
}
|
|
12828
12838
|
this.keepPredefinedListOriginalOrder =
|
|
12829
12839
|
filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
|
|
12830
|
-
|
|
12831
|
-
this.filterType = filterOptions ? filter : exports.DatoGridFilterTypes.String;
|
|
12840
|
+
this.filterType = filterOptions ? colFilter : exports.DatoGridFilterTypes.String;
|
|
12832
12841
|
this.listLabelType = this.filterType.toLowerCase();
|
|
12833
12842
|
this.listSortByKey = this.filterType === exports.DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12834
12843
|
this.gridQuery = gridQuery;
|
|
@@ -12863,9 +12872,11 @@
|
|
|
12863
12872
|
var columnValues = this.getColumnValues();
|
|
12864
12873
|
this.columnValues = columnValues.map(function (_a) {
|
|
12865
12874
|
var value = _a.value;
|
|
12866
|
-
return value;
|
|
12875
|
+
return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
|
|
12876
|
+
});
|
|
12877
|
+
this.listOptions = columnValues.map(function (colValue) {
|
|
12878
|
+
return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
|
|
12867
12879
|
});
|
|
12868
|
-
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12869
12880
|
}
|
|
12870
12881
|
}
|
|
12871
12882
|
else {
|
|
@@ -12903,6 +12914,7 @@
|
|
|
12903
12914
|
isEmpty(filter)
|
|
12904
12915
|
? this.gridService.clearColumnFilter(this.colField)
|
|
12905
12916
|
: this.gridService.setColumnFilter(column, filter);
|
|
12917
|
+
this.gridService.notifyFilterUpdate();
|
|
12906
12918
|
}
|
|
12907
12919
|
};
|
|
12908
12920
|
DatoGridFilterComponent.prototype.clearFilters = function () {
|
|
@@ -12956,19 +12968,25 @@
|
|
|
12956
12968
|
var _this = this;
|
|
12957
12969
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12958
12970
|
var filter = {};
|
|
12959
|
-
filter.pivotKeys = this.pivotKeys;
|
|
12960
|
-
if (this.pivotColumn) {
|
|
12961
|
-
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12962
|
-
fieldMap[field] = _this.pivotKeys[index];
|
|
12963
|
-
return fieldMap;
|
|
12964
|
-
}, {});
|
|
12965
|
-
}
|
|
12966
12971
|
if (this.filterSections.Conditional) {
|
|
12967
12972
|
this.setConditionalFilter(filter, conditional);
|
|
12968
12973
|
}
|
|
12969
12974
|
if (this.filterSections.By_Value) {
|
|
12970
12975
|
this.setByValueFilter(filter, byValue);
|
|
12971
12976
|
}
|
|
12977
|
+
/** If filters applied, add the extra properties to be used by pivot mode */
|
|
12978
|
+
if (filter.byValue || filter.conditional) {
|
|
12979
|
+
filter.colId = this.colDef.colId;
|
|
12980
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12981
|
+
if (this.pivotColumn) {
|
|
12982
|
+
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12983
|
+
if (_this.pivotKeys[index]) {
|
|
12984
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12985
|
+
}
|
|
12986
|
+
return fieldMap;
|
|
12987
|
+
}, {});
|
|
12988
|
+
}
|
|
12989
|
+
}
|
|
12972
12990
|
return filter;
|
|
12973
12991
|
};
|
|
12974
12992
|
DatoGridFilterComponent.prototype.initForm = function () {
|
|
@@ -14350,12 +14368,45 @@
|
|
|
14350
14368
|
});
|
|
14351
14369
|
this.notifyFilterUpdate();
|
|
14352
14370
|
};
|
|
14353
|
-
GridService.prototype.setColumnFilter = function (column, filter) {
|
|
14371
|
+
GridService.prototype.setColumnFilter = function (column, filter, notifyGrid) {
|
|
14372
|
+
if (notifyGrid === void 0) { notifyGrid = true; }
|
|
14354
14373
|
this._logEvent("Grids - Filter Applied" /* GRID_FILTER_APPLIED */, {
|
|
14355
14374
|
column: column.getColId(),
|
|
14356
14375
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14357
14376
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14358
14377
|
});
|
|
14378
|
+
this.updateFilter(column, filter);
|
|
14379
|
+
if (notifyGrid) {
|
|
14380
|
+
this.notifyFilterUpdate();
|
|
14381
|
+
}
|
|
14382
|
+
};
|
|
14383
|
+
GridService.prototype.setGridFilters = function (filters) {
|
|
14384
|
+
var e_2, _a;
|
|
14385
|
+
if (this.api) {
|
|
14386
|
+
try {
|
|
14387
|
+
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14388
|
+
var filter = filters_1_1.value.filter;
|
|
14389
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14390
|
+
if (column) {
|
|
14391
|
+
this.setColumnFilter(column, filter);
|
|
14392
|
+
}
|
|
14393
|
+
else {
|
|
14394
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14395
|
+
this.setColumnFilter(pivotColumn, filter);
|
|
14396
|
+
}
|
|
14397
|
+
}
|
|
14398
|
+
}
|
|
14399
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
14400
|
+
finally {
|
|
14401
|
+
try {
|
|
14402
|
+
if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
|
|
14403
|
+
}
|
|
14404
|
+
finally { if (e_2) throw e_2.error; }
|
|
14405
|
+
}
|
|
14406
|
+
this.notifyFilterUpdate();
|
|
14407
|
+
}
|
|
14408
|
+
};
|
|
14409
|
+
GridService.prototype.updateFilter = function (column, filter) {
|
|
14359
14410
|
var colField = getColField(column.getColDef());
|
|
14360
14411
|
this.store.update(function (state) {
|
|
14361
14412
|
var _a;
|
|
@@ -14363,7 +14414,6 @@
|
|
|
14363
14414
|
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14364
14415
|
};
|
|
14365
14416
|
});
|
|
14366
|
-
this.notifyFilterUpdate();
|
|
14367
14417
|
};
|
|
14368
14418
|
GridService.prototype.setSearchTerm = function (searchTerm) {
|
|
14369
14419
|
this.store.update(function (state) {
|
|
@@ -14656,7 +14706,7 @@
|
|
|
14656
14706
|
this.api.grid.onFilterChanged();
|
|
14657
14707
|
};
|
|
14658
14708
|
GridService.prototype.buildServerRequestFilters = function (filter) {
|
|
14659
|
-
var
|
|
14709
|
+
var e_3, _a;
|
|
14660
14710
|
var columnsFilters = {};
|
|
14661
14711
|
try {
|
|
14662
14712
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14692,12 +14742,12 @@
|
|
|
14692
14742
|
}
|
|
14693
14743
|
}
|
|
14694
14744
|
}
|
|
14695
|
-
catch (
|
|
14745
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
14696
14746
|
finally {
|
|
14697
14747
|
try {
|
|
14698
14748
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14699
14749
|
}
|
|
14700
|
-
finally { if (
|
|
14750
|
+
finally { if (e_3) throw e_3.error; }
|
|
14701
14751
|
}
|
|
14702
14752
|
return columnsFilters;
|
|
14703
14753
|
};
|
|
@@ -14750,7 +14800,7 @@
|
|
|
14750
14800
|
return { operator: exports.OperatorTypes.AND, filters: [columnFilter, searchFilter] };
|
|
14751
14801
|
};
|
|
14752
14802
|
GridService.prototype.buildServerColumnFilters_v2_1 = function (filter) {
|
|
14753
|
-
var
|
|
14803
|
+
var e_4, _a;
|
|
14754
14804
|
var columnFilters = [];
|
|
14755
14805
|
try {
|
|
14756
14806
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14775,12 +14825,12 @@
|
|
|
14775
14825
|
columnFilters.push(columnFilter);
|
|
14776
14826
|
}
|
|
14777
14827
|
}
|
|
14778
|
-
catch (
|
|
14828
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14779
14829
|
finally {
|
|
14780
14830
|
try {
|
|
14781
14831
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14782
14832
|
}
|
|
14783
|
-
finally { if (
|
|
14833
|
+
finally { if (e_4) throw e_4.error; }
|
|
14784
14834
|
}
|
|
14785
14835
|
return columnFilters;
|
|
14786
14836
|
};
|
|
@@ -14873,27 +14923,14 @@
|
|
|
14873
14923
|
/**
|
|
14874
14924
|
* When pivoting,
|
|
14875
14925
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14876
|
-
* @private
|
|
14877
14926
|
*/
|
|
14878
14927
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14879
14928
|
var _this = this;
|
|
14880
14929
|
var gridOptions = _a.gridOptions;
|
|
14881
14930
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14882
|
-
var
|
|
14883
|
-
if (
|
|
14884
|
-
|
|
14885
|
-
var originalColDef = valueColumns
|
|
14886
|
-
.map(function (_a) {
|
|
14887
|
-
var userProvidedColDef = _a.userProvidedColDef;
|
|
14888
|
-
return userProvidedColDef;
|
|
14889
|
-
})
|
|
14890
|
-
.find(function (_a) {
|
|
14891
|
-
var colId = _a.colId;
|
|
14892
|
-
return colId === colDef.pivotValueColumn.getColId();
|
|
14893
|
-
});
|
|
14894
|
-
if (originalColDef) {
|
|
14895
|
-
colDef.filter = originalColDef.filter;
|
|
14896
|
-
}
|
|
14931
|
+
var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
|
|
14932
|
+
if (userProvidedColDef) {
|
|
14933
|
+
colDef.filter = userProvidedColDef.filter;
|
|
14897
14934
|
}
|
|
14898
14935
|
if (colDef.pivotKeys) {
|
|
14899
14936
|
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|
|
@@ -14909,7 +14946,7 @@
|
|
|
14909
14946
|
var field = parsedValue.field, value = parsedValue.value;
|
|
14910
14947
|
colGroupDef.headerClass = [field];
|
|
14911
14948
|
colGroupDef.headerName = value;
|
|
14912
|
-
if (colGroupDef.children && colGroupDef.children.length >
|
|
14949
|
+
if (colGroupDef.children && colGroupDef.children.length > 0) {
|
|
14913
14950
|
colGroupDef.headerClass.push('group-pivot-cell');
|
|
14914
14951
|
}
|
|
14915
14952
|
}
|
|
@@ -14936,7 +14973,7 @@
|
|
|
14936
14973
|
GridService.prototype.setPivotModeRows = function (data) {
|
|
14937
14974
|
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14938
14975
|
var convertedData = data.map(function (currentValue, index) {
|
|
14939
|
-
var
|
|
14976
|
+
var e_5, _a;
|
|
14940
14977
|
var mappedValues = __assign({}, currentValue);
|
|
14941
14978
|
try {
|
|
14942
14979
|
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
@@ -14946,12 +14983,12 @@
|
|
|
14946
14983
|
mappedValues[field] = JSON.stringify(pivotValue);
|
|
14947
14984
|
}
|
|
14948
14985
|
}
|
|
14949
|
-
catch (
|
|
14986
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
14950
14987
|
finally {
|
|
14951
14988
|
try {
|
|
14952
14989
|
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14953
14990
|
}
|
|
14954
|
-
finally { if (
|
|
14991
|
+
finally { if (e_5) throw e_5.error; }
|
|
14955
14992
|
}
|
|
14956
14993
|
return mappedValues;
|
|
14957
14994
|
});
|
|
@@ -15470,6 +15507,9 @@
|
|
|
15470
15507
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15471
15508
|
this.gridService.setRows(data);
|
|
15472
15509
|
};
|
|
15510
|
+
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15511
|
+
this.gridService.setGridFilters(filters);
|
|
15512
|
+
};
|
|
15473
15513
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15474
15514
|
return this.gridQuery.filterChanged();
|
|
15475
15515
|
};
|
|
@@ -16383,6 +16423,9 @@
|
|
|
16383
16423
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16384
16424
|
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16385
16425
|
this.isExpanded = !this.isExpanded;
|
|
16426
|
+
// this.gridApi.forEachNode((node: RowNode) => {
|
|
16427
|
+
// node.setExpanded(this.isExpanded);
|
|
16428
|
+
// });
|
|
16386
16429
|
};
|
|
16387
16430
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16388
16431
|
this.gridService.fitGrid(type);
|
|
@@ -16475,7 +16518,7 @@
|
|
|
16475
16518
|
core.Component({
|
|
16476
16519
|
selector: 'dato-grid-pagination-v2',
|
|
16477
16520
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
16478
|
-
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-
|
|
16521
|
+
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",
|
|
16479
16522
|
providers: [common.DecimalPipe],
|
|
16480
16523
|
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}"]
|
|
16481
16524
|
}),
|
|
@@ -16589,6 +16632,7 @@
|
|
|
16589
16632
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16590
16633
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16591
16634
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16635
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16592
16636
|
this.openMenus = {
|
|
16593
16637
|
group: false,
|
|
16594
16638
|
settings: false
|
|
@@ -17008,10 +17052,14 @@
|
|
|
17008
17052
|
core.Input(),
|
|
17009
17053
|
__metadata("design:type", Number)
|
|
17010
17054
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17055
|
+
__decorate([
|
|
17056
|
+
core.Input(),
|
|
17057
|
+
__metadata("design:type", Object)
|
|
17058
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
17011
17059
|
DatoGridV2ToolbarComponent = __decorate([
|
|
17012
17060
|
core.Component({
|
|
17013
17061
|
selector: 'dato-grid-toolbar-v2',
|
|
17014
|
-
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",
|
|
17062
|
+
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",
|
|
17015
17063
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17016
17064
|
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}"]
|
|
17017
17065
|
}),
|
|
@@ -25301,7 +25349,7 @@
|
|
|
25301
25349
|
};
|
|
25302
25350
|
}
|
|
25303
25351
|
|
|
25304
|
-
window.coreVersion = '
|
|
25352
|
+
window.coreVersion = '22.1.1-rc.';
|
|
25305
25353
|
|
|
25306
25354
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25307
25355
|
exports.AceService = AceService;
|