@datorama/core 21.4.0-rc.2 → 21.4.0-rc.20
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 +8 -1
- package/bundles/datorama-core.umd.js +179 -78
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +49 -49
- 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 +5 -2
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +14 -21
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +30 -14
- 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 -3
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +34 -9
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +57 -20
- package/esm2015/lib/grid-v2/grid-store/grid.store.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/public_api.js +2 -0
- package/esm2015/lib/grid-v2/grid-store/util.js +11 -1
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -2
- package/esm2015/lib/grid-v2/public_api.js +2 -2
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +16 -21
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +31 -14
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +6 -3
- package/esm5/lib/grid-v2/grid-store/grid.query.js +34 -9
- package/esm5/lib/grid-v2/grid-store/grid.service.js +79 -35
- package/esm5/lib/grid-v2/grid-store/grid.store.types.js +1 -1
- package/esm5/lib/grid-v2/grid-store/public_api.js +2 -0
- package/esm5/lib/grid-v2/grid-store/util.js +11 -1
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -2
- package/esm5/lib/grid-v2/public_api.js +2 -2
- package/fesm2015/datorama-core.js +153 -64
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +179 -79
- package/fesm5/datorama-core.js.map +1 -1
- package/i18n/locale-en_US.json +2 -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 +7 -1
- package/lib/grid-v2/grid-store/grid.query.d.ts +3 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +4 -3
- package/lib/grid-v2/grid-store/grid.store.types.d.ts +4 -0
- package/lib/grid-v2/grid-store/public_api.d.ts +2 -0
- package/lib/grid-v2/grid-store/util.d.ts +2 -0
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -0
- package/lib/grid-v2/public_api.d.ts +1 -2
- package/package.json +1 -1
package/bundle.scss
CHANGED
|
@@ -14386,7 +14386,6 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag
|
|
|
14386
14386
|
|
|
14387
14387
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label {
|
|
14388
14388
|
align-items: center;
|
|
14389
|
-
justify-content: center;
|
|
14390
14389
|
}
|
|
14391
14390
|
|
|
14392
14391
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label span {
|
|
@@ -14402,6 +14401,14 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-
|
|
|
14402
14401
|
border-right: 1px solid themify(primary-200);
|
|
14403
14402
|
}
|
|
14404
14403
|
|
|
14404
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group.empty-pivot-header {
|
|
14405
|
+
display: none;
|
|
14406
|
+
}
|
|
14407
|
+
|
|
14408
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group.group-pivot-cell .ag-header-group-cell-label {
|
|
14409
|
+
justify-content: center;
|
|
14410
|
+
}
|
|
14411
|
+
|
|
14405
14412
|
.ag-dnd-ghost {
|
|
14406
14413
|
box-shadow: 0 0 10px -1px themify(primary-700, 0.3);
|
|
14407
14414
|
background-color: themify(primary-100) !important;
|
|
@@ -11466,6 +11466,16 @@
|
|
|
11466
11466
|
var field = colDef.field, showRowGroup = colDef.showRowGroup, pivotValueColumn = colDef.pivotValueColumn;
|
|
11467
11467
|
return pivotValueColumn ? pivotValueColumn.getColId() : field || showRowGroup;
|
|
11468
11468
|
}
|
|
11469
|
+
function tryParsePivotValue(str) {
|
|
11470
|
+
var value;
|
|
11471
|
+
try {
|
|
11472
|
+
value = JSON.parse(str);
|
|
11473
|
+
}
|
|
11474
|
+
catch (e) {
|
|
11475
|
+
// Do nothing
|
|
11476
|
+
}
|
|
11477
|
+
return value;
|
|
11478
|
+
}
|
|
11469
11479
|
|
|
11470
11480
|
var GridQuery = /** @class */ (function (_super) {
|
|
11471
11481
|
__extends(GridQuery, _super);
|
|
@@ -11565,14 +11575,23 @@
|
|
|
11565
11575
|
return settings;
|
|
11566
11576
|
};
|
|
11567
11577
|
GridQuery.prototype.getSort = function () {
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11578
|
+
if (this.gridRef.gridOptions.pivotMode) {
|
|
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());
|
|
11585
|
+
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11586
|
+
return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11587
|
+
}
|
|
11588
|
+
else if (column) {
|
|
11589
|
+
return { colId: getColField(column.getColDef()), sort: sort };
|
|
11590
|
+
}
|
|
11591
|
+
}
|
|
11592
|
+
else {
|
|
11593
|
+
return this.api.grid.getSortModel().pop();
|
|
11594
|
+
}
|
|
11576
11595
|
};
|
|
11577
11596
|
GridQuery.prototype.selectSort = function () {
|
|
11578
11597
|
return this.select(function (state) { return state.settings.sort; });
|
|
@@ -11596,6 +11615,17 @@
|
|
|
11596
11615
|
GridQuery.prototype.selectFilter = function () {
|
|
11597
11616
|
return this.select(function (state) { return state.settings.filter; });
|
|
11598
11617
|
};
|
|
11618
|
+
GridQuery.prototype.filterChanged = function () {
|
|
11619
|
+
return this.selectFilter().pipe(operators.map(function (filter) {
|
|
11620
|
+
return Object.keys(filter).reduce(function (filters, field) {
|
|
11621
|
+
var datoFilter = filter[field];
|
|
11622
|
+
if (datoFilter) {
|
|
11623
|
+
filters.push({ field: field, filter: datoFilter });
|
|
11624
|
+
}
|
|
11625
|
+
return filters;
|
|
11626
|
+
}, []);
|
|
11627
|
+
}));
|
|
11628
|
+
};
|
|
11599
11629
|
GridQuery.prototype.getSearchTerm = function () {
|
|
11600
11630
|
return this.getValue().settings.searchTerm;
|
|
11601
11631
|
};
|
|
@@ -11656,6 +11686,10 @@
|
|
|
11656
11686
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11657
11687
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11658
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
|
+
};
|
|
11659
11693
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11660
11694
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
11661
11695
|
};
|
|
@@ -11748,7 +11782,7 @@
|
|
|
11748
11782
|
function validateStringCondition(rowValue, _a) {
|
|
11749
11783
|
var condition = _a.condition, filterValue = _a.value;
|
|
11750
11784
|
var filterTextLowerCase = filterValue ? filterValue.toLowerCase() : '';
|
|
11751
|
-
var valueLowerCase = rowValue ? rowValue.toLowerCase() : '';
|
|
11785
|
+
var valueLowerCase = rowValue ? ("" + rowValue).toLowerCase() : '';
|
|
11752
11786
|
switch (condition) {
|
|
11753
11787
|
case exports.DatoFilterConditions.EQUALS:
|
|
11754
11788
|
return valueLowerCase === filterTextLowerCase;
|
|
@@ -11768,9 +11802,9 @@
|
|
|
11768
11802
|
return !isEmpty(valueLowerCase);
|
|
11769
11803
|
}
|
|
11770
11804
|
}
|
|
11771
|
-
function validateNumberCondition(unparsedRowValue, _a) {
|
|
11805
|
+
function validateNumberCondition(unparsedRowValue, _a, filterKey) {
|
|
11772
11806
|
var condition = _a.condition, value = _a.value, rangeEnd = _a.rangeEnd;
|
|
11773
|
-
var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue) : null;
|
|
11807
|
+
var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue[filterKey] || unparsedRowValue) : null;
|
|
11774
11808
|
var filterValue = parseFloat(value);
|
|
11775
11809
|
switch (condition) {
|
|
11776
11810
|
case exports.DatoFilterConditions.EQUALS:
|
|
@@ -11818,14 +11852,14 @@
|
|
|
11818
11852
|
}
|
|
11819
11853
|
}
|
|
11820
11854
|
function validateCondition(_a) {
|
|
11821
|
-
var rowValue = _a.rowValue,
|
|
11855
|
+
var rowValue = _a.rowValue, condition = _a.condition, type = _a.type, filterKey = _a.filterKey;
|
|
11822
11856
|
switch (type) {
|
|
11823
11857
|
case exports.DatoGridFilterTypes.Date:
|
|
11824
|
-
return validateDateCondition(rowValue,
|
|
11858
|
+
return validateDateCondition(rowValue, condition);
|
|
11825
11859
|
case exports.DatoGridFilterTypes.Number:
|
|
11826
|
-
return validateNumberCondition(rowValue,
|
|
11860
|
+
return validateNumberCondition(rowValue, condition, filterKey);
|
|
11827
11861
|
default:
|
|
11828
|
-
return validateStringCondition(rowValue,
|
|
11862
|
+
return validateStringCondition(rowValue, condition);
|
|
11829
11863
|
}
|
|
11830
11864
|
}
|
|
11831
11865
|
function validateFilter(_a, activeFilters) {
|
|
@@ -11839,13 +11873,15 @@
|
|
|
11839
11873
|
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11840
11874
|
var rowValue = api.getValue(filter, row);
|
|
11841
11875
|
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11842
|
-
if (pivotKeys && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
11876
|
+
if (pivotKeys && pivotKeys.length > 0 && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
11843
11877
|
return { value: true };
|
|
11844
11878
|
}
|
|
11845
11879
|
if (conditional) {
|
|
11846
11880
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11847
11881
|
var conditionsRelation = operator === exports.OperatorTypes.AND ? 'every' : 'some';
|
|
11848
|
-
filterPasses = conditions[conditionsRelation](function (
|
|
11882
|
+
filterPasses = conditions[conditionsRelation](function (condition) {
|
|
11883
|
+
return validateCondition({ rowValue: rowValue, condition: condition, type: type_1, filterKey: filter });
|
|
11884
|
+
});
|
|
11849
11885
|
}
|
|
11850
11886
|
if (filterPasses && byValue) {
|
|
11851
11887
|
var includesValue = byValue.values.includes(rowValue);
|
|
@@ -11879,17 +11915,9 @@
|
|
|
11879
11915
|
function getRowPivotKeys(childrenMapped, keys) {
|
|
11880
11916
|
if (keys === void 0) { keys = []; }
|
|
11881
11917
|
var key = Object.keys(childrenMapped)[0];
|
|
11882
|
-
var parsedKey;
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
}
|
|
11886
|
-
catch (e) {
|
|
11887
|
-
console.error("Can't parse " + key + " from JSON");
|
|
11888
|
-
}
|
|
11889
|
-
finally {
|
|
11890
|
-
if (parsedKey) {
|
|
11891
|
-
keys = getRowPivotKeys(childrenMapped[key], __spread(keys, [parsedKey.value]));
|
|
11892
|
-
}
|
|
11918
|
+
var parsedKey = tryParsePivotValue(key);
|
|
11919
|
+
if (parsedKey) {
|
|
11920
|
+
keys = getRowPivotKeys(childrenMapped[key], __spread(keys, [parsedKey.value]));
|
|
11893
11921
|
}
|
|
11894
11922
|
return keys;
|
|
11895
11923
|
}
|
|
@@ -12653,12 +12681,12 @@
|
|
|
12653
12681
|
var ɵ0$1 = mapToValue;
|
|
12654
12682
|
var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
|
|
12655
12683
|
var ɵ1$1 = mapToListItem;
|
|
12656
|
-
var mapToListItemWithFormatted = function (_a) {
|
|
12684
|
+
var mapToListItemWithFormatted = function (_a, key) {
|
|
12657
12685
|
var value = _a.value, formattedValue = _a.formattedValue;
|
|
12658
12686
|
return ({
|
|
12659
|
-
id: value,
|
|
12660
|
-
label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
|
|
12661
|
-
value: value
|
|
12687
|
+
id: key && value ? value[key] : value,
|
|
12688
|
+
label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
|
|
12689
|
+
value: key && value ? value[key] : value
|
|
12662
12690
|
});
|
|
12663
12691
|
};
|
|
12664
12692
|
var ɵ2$1 = mapToListItemWithFormatted;
|
|
@@ -12797,15 +12825,18 @@
|
|
|
12797
12825
|
var _this = this;
|
|
12798
12826
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12799
12827
|
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12828
|
+
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12800
12829
|
this.colField = getColField(this.colDef);
|
|
12830
|
+
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12831
|
+
var colFilter = filter || colDef.filter;
|
|
12832
|
+
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12801
12833
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12802
12834
|
if (filtersConfig.sections) {
|
|
12803
12835
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12804
12836
|
}
|
|
12805
12837
|
this.keepPredefinedListOriginalOrder =
|
|
12806
12838
|
filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
|
|
12807
|
-
|
|
12808
|
-
this.filterType = filterOptions ? filter : exports.DatoGridFilterTypes.String;
|
|
12839
|
+
this.filterType = filterOptions ? colFilter : exports.DatoGridFilterTypes.String;
|
|
12809
12840
|
this.listLabelType = this.filterType.toLowerCase();
|
|
12810
12841
|
this.listSortByKey = this.filterType === exports.DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12811
12842
|
this.gridQuery = gridQuery;
|
|
@@ -12840,9 +12871,11 @@
|
|
|
12840
12871
|
var columnValues = this.getColumnValues();
|
|
12841
12872
|
this.columnValues = columnValues.map(function (_a) {
|
|
12842
12873
|
var value = _a.value;
|
|
12843
|
-
return value;
|
|
12874
|
+
return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
|
|
12875
|
+
});
|
|
12876
|
+
this.listOptions = columnValues.map(function (colValue) {
|
|
12877
|
+
return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
|
|
12844
12878
|
});
|
|
12845
|
-
this.listOptions = columnValues.map(mapToListItemWithFormatted);
|
|
12846
12879
|
}
|
|
12847
12880
|
}
|
|
12848
12881
|
else {
|
|
@@ -12880,6 +12913,7 @@
|
|
|
12880
12913
|
isEmpty(filter)
|
|
12881
12914
|
? this.gridService.clearColumnFilter(this.colField)
|
|
12882
12915
|
: this.gridService.setColumnFilter(column, filter);
|
|
12916
|
+
this.gridService.notifyFilterUpdate();
|
|
12883
12917
|
}
|
|
12884
12918
|
};
|
|
12885
12919
|
DatoGridFilterComponent.prototype.clearFilters = function () {
|
|
@@ -12930,18 +12964,28 @@
|
|
|
12930
12964
|
return this.columnValues.filter(function (value) { return !includedSet.has(value); });
|
|
12931
12965
|
};
|
|
12932
12966
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12967
|
+
var _this = this;
|
|
12933
12968
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12934
12969
|
var filter = {};
|
|
12935
|
-
filter.pivotKeys = this.pivotKeys;
|
|
12936
|
-
if (this.pivotColumn) {
|
|
12937
|
-
filter.pivotFields = this.getPivotFields(this.pivotColumn.getParent());
|
|
12938
|
-
}
|
|
12939
12970
|
if (this.filterSections.Conditional) {
|
|
12940
12971
|
this.setConditionalFilter(filter, conditional);
|
|
12941
12972
|
}
|
|
12942
12973
|
if (this.filterSections.By_Value) {
|
|
12943
12974
|
this.setByValueFilter(filter, byValue);
|
|
12944
12975
|
}
|
|
12976
|
+
/** If filters applied, add the extra properties to be used by pivot mode */
|
|
12977
|
+
if (filter.byValue || filter.conditional) {
|
|
12978
|
+
filter.colId = this.colDef.colId;
|
|
12979
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12980
|
+
if (this.pivotColumn) {
|
|
12981
|
+
filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
|
|
12982
|
+
if (_this.pivotKeys[index]) {
|
|
12983
|
+
fieldMap[field] = _this.pivotKeys[index];
|
|
12984
|
+
}
|
|
12985
|
+
return fieldMap;
|
|
12986
|
+
}, {});
|
|
12987
|
+
}
|
|
12988
|
+
}
|
|
12945
12989
|
return filter;
|
|
12946
12990
|
};
|
|
12947
12991
|
DatoGridFilterComponent.prototype.initForm = function () {
|
|
@@ -13270,10 +13314,11 @@
|
|
|
13270
13314
|
DatoGridFilterComponent.prototype.getPivotFields = function (parent, fields) {
|
|
13271
13315
|
if (fields === void 0) { fields = []; }
|
|
13272
13316
|
var grandParent = parent.getParent();
|
|
13317
|
+
var headerClass = parent.getOriginalColumnGroup().getColGroupDef().headerClass;
|
|
13273
13318
|
if (grandParent) {
|
|
13274
13319
|
this.getPivotFields(grandParent, fields);
|
|
13275
13320
|
}
|
|
13276
|
-
fields.push(
|
|
13321
|
+
headerClass && fields.push(headerClass[0]);
|
|
13277
13322
|
return fields;
|
|
13278
13323
|
};
|
|
13279
13324
|
DatoGridFilterComponent.ctorParameters = function () { return [
|
|
@@ -14322,12 +14367,45 @@
|
|
|
14322
14367
|
});
|
|
14323
14368
|
this.notifyFilterUpdate();
|
|
14324
14369
|
};
|
|
14325
|
-
GridService.prototype.setColumnFilter = function (column, filter) {
|
|
14370
|
+
GridService.prototype.setColumnFilter = function (column, filter, notifyGrid) {
|
|
14371
|
+
if (notifyGrid === void 0) { notifyGrid = true; }
|
|
14326
14372
|
this._logEvent("Grids - Filter Applied" /* GRID_FILTER_APPLIED */, {
|
|
14327
14373
|
column: column.getColId(),
|
|
14328
14374
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14329
14375
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14330
14376
|
});
|
|
14377
|
+
this.updateFilter(column, filter);
|
|
14378
|
+
if (notifyGrid) {
|
|
14379
|
+
this.notifyFilterUpdate();
|
|
14380
|
+
}
|
|
14381
|
+
};
|
|
14382
|
+
GridService.prototype.setGridFilters = function (filters) {
|
|
14383
|
+
var e_2, _a;
|
|
14384
|
+
if (this.api) {
|
|
14385
|
+
try {
|
|
14386
|
+
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14387
|
+
var filter = filters_1_1.value.filter;
|
|
14388
|
+
var column = this.api.columns.getColumn(filter.colId);
|
|
14389
|
+
if (column) {
|
|
14390
|
+
this.setColumnFilter(column, filter);
|
|
14391
|
+
}
|
|
14392
|
+
else {
|
|
14393
|
+
var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14394
|
+
this.setColumnFilter(pivotColumn, filter);
|
|
14395
|
+
}
|
|
14396
|
+
}
|
|
14397
|
+
}
|
|
14398
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
14399
|
+
finally {
|
|
14400
|
+
try {
|
|
14401
|
+
if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
|
|
14402
|
+
}
|
|
14403
|
+
finally { if (e_2) throw e_2.error; }
|
|
14404
|
+
}
|
|
14405
|
+
this.notifyFilterUpdate();
|
|
14406
|
+
}
|
|
14407
|
+
};
|
|
14408
|
+
GridService.prototype.updateFilter = function (column, filter) {
|
|
14331
14409
|
var colField = getColField(column.getColDef());
|
|
14332
14410
|
this.store.update(function (state) {
|
|
14333
14411
|
var _a;
|
|
@@ -14335,7 +14413,6 @@
|
|
|
14335
14413
|
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14336
14414
|
};
|
|
14337
14415
|
});
|
|
14338
|
-
this.notifyFilterUpdate();
|
|
14339
14416
|
};
|
|
14340
14417
|
GridService.prototype.setSearchTerm = function (searchTerm) {
|
|
14341
14418
|
this.store.update(function (state) {
|
|
@@ -14628,7 +14705,7 @@
|
|
|
14628
14705
|
this.api.grid.onFilterChanged();
|
|
14629
14706
|
};
|
|
14630
14707
|
GridService.prototype.buildServerRequestFilters = function (filter) {
|
|
14631
|
-
var
|
|
14708
|
+
var e_3, _a;
|
|
14632
14709
|
var columnsFilters = {};
|
|
14633
14710
|
try {
|
|
14634
14711
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14664,12 +14741,12 @@
|
|
|
14664
14741
|
}
|
|
14665
14742
|
}
|
|
14666
14743
|
}
|
|
14667
|
-
catch (
|
|
14744
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
14668
14745
|
finally {
|
|
14669
14746
|
try {
|
|
14670
14747
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14671
14748
|
}
|
|
14672
|
-
finally { if (
|
|
14749
|
+
finally { if (e_3) throw e_3.error; }
|
|
14673
14750
|
}
|
|
14674
14751
|
return columnsFilters;
|
|
14675
14752
|
};
|
|
@@ -14722,7 +14799,7 @@
|
|
|
14722
14799
|
return { operator: exports.OperatorTypes.AND, filters: [columnFilter, searchFilter] };
|
|
14723
14800
|
};
|
|
14724
14801
|
GridService.prototype.buildServerColumnFilters_v2_1 = function (filter) {
|
|
14725
|
-
var
|
|
14802
|
+
var e_4, _a;
|
|
14726
14803
|
var columnFilters = [];
|
|
14727
14804
|
try {
|
|
14728
14805
|
for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -14747,12 +14824,12 @@
|
|
|
14747
14824
|
columnFilters.push(columnFilter);
|
|
14748
14825
|
}
|
|
14749
14826
|
}
|
|
14750
|
-
catch (
|
|
14827
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14751
14828
|
finally {
|
|
14752
14829
|
try {
|
|
14753
14830
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
14754
14831
|
}
|
|
14755
|
-
finally { if (
|
|
14832
|
+
finally { if (e_4) throw e_4.error; }
|
|
14756
14833
|
}
|
|
14757
14834
|
return columnFilters;
|
|
14758
14835
|
};
|
|
@@ -14845,60 +14922,72 @@
|
|
|
14845
14922
|
/**
|
|
14846
14923
|
* When pivoting,
|
|
14847
14924
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14848
|
-
* @private
|
|
14849
14925
|
*/
|
|
14850
14926
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14927
|
+
var _this = this;
|
|
14851
14928
|
var gridOptions = _a.gridOptions;
|
|
14852
14929
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14853
|
-
var
|
|
14854
|
-
if (
|
|
14855
|
-
|
|
14856
|
-
var originalColDef = valueColumns
|
|
14857
|
-
.map(function (_a) {
|
|
14858
|
-
var userProvidedColDef = _a.userProvidedColDef;
|
|
14859
|
-
return userProvidedColDef;
|
|
14860
|
-
})
|
|
14861
|
-
.find(function (_a) {
|
|
14862
|
-
var colId = _a.colId;
|
|
14863
|
-
return colId === colDef.pivotValueColumn.getColId();
|
|
14864
|
-
});
|
|
14865
|
-
if (originalColDef) {
|
|
14866
|
-
colDef.filter = originalColDef.filter;
|
|
14867
|
-
}
|
|
14930
|
+
var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
|
|
14931
|
+
if (userProvidedColDef) {
|
|
14932
|
+
colDef.filter = userProvidedColDef.filter;
|
|
14868
14933
|
}
|
|
14869
14934
|
if (colDef.pivotKeys) {
|
|
14870
|
-
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|
|
14935
|
+
colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
|
|
14936
|
+
var parsedKey = tryParsePivotValue(key);
|
|
14937
|
+
return (parsedKey && parsedKey.value) || '';
|
|
14938
|
+
});
|
|
14871
14939
|
}
|
|
14872
14940
|
};
|
|
14873
14941
|
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
14874
14942
|
if (colGroupDef.headerName) {
|
|
14875
|
-
var
|
|
14876
|
-
|
|
14877
|
-
|
|
14943
|
+
var parsedValue = tryParsePivotValue(colGroupDef.headerName);
|
|
14944
|
+
if (parsedValue) {
|
|
14945
|
+
var field = parsedValue.field, value = parsedValue.value;
|
|
14946
|
+
colGroupDef.headerClass = [field];
|
|
14947
|
+
colGroupDef.headerName = value;
|
|
14948
|
+
if (colGroupDef.children && colGroupDef.children.length > 0) {
|
|
14949
|
+
colGroupDef.headerClass.push('group-pivot-cell');
|
|
14950
|
+
}
|
|
14951
|
+
}
|
|
14952
|
+
}
|
|
14953
|
+
else if (colGroupDef.children) {
|
|
14954
|
+
var _a = __read(colGroupDef.children, 1), colChild = _a[0];
|
|
14955
|
+
var pivotTotalColumnIds = colChild && colChild.pivotTotalColumnIds;
|
|
14956
|
+
if (pivotTotalColumnIds && pivotTotalColumnIds.length > 0) {
|
|
14957
|
+
colGroupDef.headerClass = ['total-pivot-cell'];
|
|
14958
|
+
colGroupDef.headerName = _this.translate.transform('core.total');
|
|
14959
|
+
}
|
|
14960
|
+
}
|
|
14961
|
+
else {
|
|
14962
|
+
colGroupDef.headerClass = ['empty-pivot-header'];
|
|
14878
14963
|
}
|
|
14879
14964
|
if (colGroupDef.pivotKeys) {
|
|
14880
|
-
colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(function (key) {
|
|
14965
|
+
colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(function (key) {
|
|
14966
|
+
var parsedKey = tryParsePivotValue(key);
|
|
14967
|
+
return (parsedKey && parsedKey.value) || '';
|
|
14968
|
+
});
|
|
14881
14969
|
}
|
|
14882
14970
|
};
|
|
14883
14971
|
};
|
|
14884
14972
|
GridService.prototype.setPivotModeRows = function (data) {
|
|
14885
14973
|
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14886
14974
|
var convertedData = data.map(function (currentValue, index) {
|
|
14887
|
-
var
|
|
14975
|
+
var e_5, _a;
|
|
14888
14976
|
var mappedValues = __assign({}, currentValue);
|
|
14889
14977
|
try {
|
|
14890
14978
|
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
14891
14979
|
var col = pivotColumns_1_1.value;
|
|
14892
14980
|
var field = col.getColDef().field;
|
|
14893
|
-
|
|
14981
|
+
var pivotValue = { field: field, value: currentValue[field] };
|
|
14982
|
+
mappedValues[field] = JSON.stringify(pivotValue);
|
|
14894
14983
|
}
|
|
14895
14984
|
}
|
|
14896
|
-
catch (
|
|
14985
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
14897
14986
|
finally {
|
|
14898
14987
|
try {
|
|
14899
14988
|
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14900
14989
|
}
|
|
14901
|
-
finally { if (
|
|
14990
|
+
finally { if (e_5) throw e_5.error; }
|
|
14902
14991
|
}
|
|
14903
14992
|
return mappedValues;
|
|
14904
14993
|
});
|
|
@@ -15417,8 +15506,11 @@
|
|
|
15417
15506
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15418
15507
|
this.gridService.setRows(data);
|
|
15419
15508
|
};
|
|
15509
|
+
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15510
|
+
this.gridService.setGridFilters(filters);
|
|
15511
|
+
};
|
|
15420
15512
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15421
|
-
return this.gridQuery.
|
|
15513
|
+
return this.gridQuery.filterChanged();
|
|
15422
15514
|
};
|
|
15423
15515
|
DatoGridControllerComponent.prototype.onSortChanged = function () {
|
|
15424
15516
|
return this.gridQuery.selectSort();
|
|
@@ -16328,8 +16420,11 @@
|
|
|
16328
16420
|
return page;
|
|
16329
16421
|
};
|
|
16330
16422
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16331
|
-
|
|
16423
|
+
var _this = this;
|
|
16332
16424
|
this.isExpanded = !this.isExpanded;
|
|
16425
|
+
this.gridApi.getRenderedNodes().forEach(function (node) {
|
|
16426
|
+
node.setExpanded(_this.isExpanded);
|
|
16427
|
+
});
|
|
16333
16428
|
};
|
|
16334
16429
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16335
16430
|
this.gridService.fitGrid(type);
|
|
@@ -16422,7 +16517,7 @@
|
|
|
16422
16517
|
core.Component({
|
|
16423
16518
|
selector: 'dato-grid-pagination-v2',
|
|
16424
16519
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
16425
|
-
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-
|
|
16520
|
+
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-fir-to-container\">\n </dato-icon-button>\n </div>\n</div>\n",
|
|
16426
16521
|
providers: [common.DecimalPipe],
|
|
16427
16522
|
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}"]
|
|
16428
16523
|
}),
|
|
@@ -16536,6 +16631,7 @@
|
|
|
16536
16631
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16537
16632
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16538
16633
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16634
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16539
16635
|
this.openMenus = {
|
|
16540
16636
|
group: false,
|
|
16541
16637
|
settings: false
|
|
@@ -16955,10 +17051,14 @@
|
|
|
16955
17051
|
core.Input(),
|
|
16956
17052
|
__metadata("design:type", Number)
|
|
16957
17053
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17054
|
+
__decorate([
|
|
17055
|
+
core.Input(),
|
|
17056
|
+
__metadata("design:type", Object)
|
|
17057
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
16958
17058
|
DatoGridV2ToolbarComponent = __decorate([
|
|
16959
17059
|
core.Component({
|
|
16960
17060
|
selector: 'dato-grid-toolbar-v2',
|
|
16961
|
-
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",
|
|
17061
|
+
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",
|
|
16962
17062
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
16963
17063
|
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}"]
|
|
16964
17064
|
}),
|
|
@@ -25656,6 +25756,7 @@
|
|
|
25656
25756
|
exports.toString = toString;
|
|
25657
25757
|
exports.toggleClass = toggleClass;
|
|
25658
25758
|
exports.toolbarActionToContextAction = toolbarActionToContextAction;
|
|
25759
|
+
exports.tryParsePivotValue = tryParsePivotValue;
|
|
25659
25760
|
exports.unescape = unescape;
|
|
25660
25761
|
exports.union = union;
|
|
25661
25762
|
exports.uniq = uniq;
|