@datorama/core 21.3.1-rc.4 → 21.4.0-rc.2
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 +87 -2
- package/bundles/datorama-core.umd.js +214 -23
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +54 -54
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid/grid-v2.component.js +5 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-column-header.component.js +8 -7
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +11 -1
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +27 -2
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +31 -6
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +16 -3
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +23 -4
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +58 -4
- package/esm2015/lib/grid-v2/grid-store/util.js +10 -1
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm2015/lib/utils/array.js +10 -1
- package/esm5/lib/grid-v2/grid/grid-v2.component.js +9 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-column-header.component.js +8 -11
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +11 -1
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +29 -3
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +36 -6
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +16 -3
- package/esm5/lib/grid-v2/grid-store/grid.query.js +23 -4
- package/esm5/lib/grid-v2/grid-store/grid.service.js +76 -4
- package/esm5/lib/grid-v2/grid-store/util.js +10 -1
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm5/lib/utils/array.js +12 -1
- package/fesm2015/datorama-core.js +184 -20
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +214 -24
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.component.d.ts +1 -0
- package/lib/grid-v2/grid/grid-v2.types.d.ts +2 -0
- package/lib/grid-v2/grid-column-header/grid-column-header.component.d.ts +0 -2
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +5 -1
- package/lib/grid-v2/grid-filter/grid-filter.component.d.ts +6 -0
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +2 -0
- package/lib/grid-v2/grid-pagination/grid-pagination.component.d.ts +4 -0
- package/lib/grid-v2/grid-store/grid.query.d.ts +5 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +9 -1
- package/lib/grid-v2/grid-store/util.d.ts +7 -1
- package/lib/utils/array.d.ts +5 -0
- package/package.json +2 -2
package/fesm5/datorama-core.js
CHANGED
|
@@ -1184,6 +1184,17 @@ function a(array, n) {
|
|
|
1184
1184
|
if (n === void 0) { n = 1; }
|
|
1185
1185
|
return array.filter(function (e, index) { return index >= n; });
|
|
1186
1186
|
}
|
|
1187
|
+
/**
|
|
1188
|
+
* Compares 2 array and return whether their inner values are the same,
|
|
1189
|
+
* without considering their order
|
|
1190
|
+
*/
|
|
1191
|
+
function isArrayValuesEqual(arrA, arrB) {
|
|
1192
|
+
if (arrA === void 0) { arrA = []; }
|
|
1193
|
+
if (arrB === void 0) { arrB = []; }
|
|
1194
|
+
var aInb = arrA.every(function (valA) { return arrB.find(function (valB) { return valB === valA; }); });
|
|
1195
|
+
var bIna = arrB.every(function (valB) { return arrA.find(function (valA) { return valA === valB; }); });
|
|
1196
|
+
return aInb && bIna && arrA.length === arrB.length;
|
|
1197
|
+
}
|
|
1187
1198
|
|
|
1188
1199
|
function toBoolean(value, includeZero) {
|
|
1189
1200
|
if (includeZero === void 0) { includeZero = false; }
|
|
@@ -11247,6 +11258,15 @@ function getColumnsSizes(columns, original) {
|
|
|
11247
11258
|
return sizeMap;
|
|
11248
11259
|
}, {});
|
|
11249
11260
|
}
|
|
11261
|
+
/**
|
|
11262
|
+
* Take pivoted value field if pivot column,
|
|
11263
|
+
* or field of the colDef,
|
|
11264
|
+
* or group field form showRowGroup if its agg column
|
|
11265
|
+
*/
|
|
11266
|
+
function getColField(colDef) {
|
|
11267
|
+
var field = colDef.field, showRowGroup = colDef.showRowGroup, pivotValueColumn = colDef.pivotValueColumn;
|
|
11268
|
+
return pivotValueColumn ? pivotValueColumn.getColId() : field || showRowGroup;
|
|
11269
|
+
}
|
|
11250
11270
|
|
|
11251
11271
|
var GridQuery = /** @class */ (function (_super) {
|
|
11252
11272
|
__extends(GridQuery, _super);
|
|
@@ -11321,7 +11341,7 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11321
11341
|
};
|
|
11322
11342
|
GridQuery.prototype.getCurrentGridSettings = function () {
|
|
11323
11343
|
var toColId = function (column) { return column.getColId(); };
|
|
11324
|
-
var
|
|
11344
|
+
var columns = this.api.columns;
|
|
11325
11345
|
var groupedColumns = columns.getRowGroupColumns();
|
|
11326
11346
|
var columnsOrder = columns.getAllColumns();
|
|
11327
11347
|
var allGridColumns = columns.getAllGridColumns();
|
|
@@ -11331,7 +11351,7 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11331
11351
|
var storeSettings = this.getValue().settings;
|
|
11332
11352
|
var settings = {
|
|
11333
11353
|
gridAlignment: storeSettings.gridAlignment,
|
|
11334
|
-
sort:
|
|
11354
|
+
sort: this.getSort(),
|
|
11335
11355
|
hiddenColumns: hiddenColumns,
|
|
11336
11356
|
groupedColumns: groupedColumns.map(toColId),
|
|
11337
11357
|
filter: this.getFilter(),
|
|
@@ -11345,6 +11365,19 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11345
11365
|
}
|
|
11346
11366
|
return settings;
|
|
11347
11367
|
};
|
|
11368
|
+
GridQuery.prototype.getSort = function () {
|
|
11369
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11370
|
+
var column = this.api.columns.getColumn(colId);
|
|
11371
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11372
|
+
var pivotedColumn = secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11373
|
+
var sortColumn = column || pivotedColumn;
|
|
11374
|
+
var sortField = sortColumn && getColField(sortColumn.getColDef());
|
|
11375
|
+
var pivotColIndex = secondaryColumns && pivotedColumn && secondaryColumns.indexOf(pivotedColumn);
|
|
11376
|
+
return { colId: sortField, sort: sort, pivotColIndex: pivotColIndex };
|
|
11377
|
+
};
|
|
11378
|
+
GridQuery.prototype.selectSort = function () {
|
|
11379
|
+
return this.select(function (state) { return state.settings.sort; });
|
|
11380
|
+
};
|
|
11348
11381
|
/* @internal */
|
|
11349
11382
|
GridQuery.prototype._setApi = function (api, gridRef) {
|
|
11350
11383
|
this.api = api;
|
|
@@ -11361,6 +11394,9 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11361
11394
|
GridQuery.prototype.getFilter = function () {
|
|
11362
11395
|
return this.getValue().settings.filter;
|
|
11363
11396
|
};
|
|
11397
|
+
GridQuery.prototype.selectFilter = function () {
|
|
11398
|
+
return this.select(function (state) { return state.settings.filter; });
|
|
11399
|
+
};
|
|
11364
11400
|
GridQuery.prototype.getSearchTerm = function () {
|
|
11365
11401
|
return this.getValue().settings.searchTerm;
|
|
11366
11402
|
};
|
|
@@ -11415,6 +11451,9 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11415
11451
|
GridQuery.prototype.getAllDisplayedColumns = function () {
|
|
11416
11452
|
return this.filterCheckboxSelectionColumn(this.api.columns.getAllDisplayedColumns());
|
|
11417
11453
|
};
|
|
11454
|
+
GridQuery.prototype.getAllPivotColumns = function () {
|
|
11455
|
+
return this.getAllColumns().filter(function (column) { return column.isPivotActive(); });
|
|
11456
|
+
};
|
|
11418
11457
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11419
11458
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11420
11459
|
};
|
|
@@ -11597,8 +11636,13 @@ function validateFilter(_a, activeFilters) {
|
|
|
11597
11636
|
var orderedFilters = Object.keys(activeFilters);
|
|
11598
11637
|
var _loop_1 = function (filter) {
|
|
11599
11638
|
var filterPasses = true;
|
|
11600
|
-
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional;
|
|
11639
|
+
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
|
|
11640
|
+
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11601
11641
|
var rowValue = api.getValue(filter, row);
|
|
11642
|
+
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11643
|
+
if (pivotKeys && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
11644
|
+
return { value: true };
|
|
11645
|
+
}
|
|
11602
11646
|
if (conditional) {
|
|
11603
11647
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11604
11648
|
var conditionsRelation = operator === OperatorTypes.AND ? 'every' : 'some';
|
|
@@ -11630,6 +11674,26 @@ function validateFilter(_a, activeFilters) {
|
|
|
11630
11674
|
}
|
|
11631
11675
|
return true;
|
|
11632
11676
|
}
|
|
11677
|
+
/**
|
|
11678
|
+
* Get pivot keys from a row parent
|
|
11679
|
+
*/
|
|
11680
|
+
function getRowPivotKeys(childrenMapped, keys) {
|
|
11681
|
+
if (keys === void 0) { keys = []; }
|
|
11682
|
+
var key = Object.keys(childrenMapped)[0];
|
|
11683
|
+
var parsedKey;
|
|
11684
|
+
try {
|
|
11685
|
+
parsedKey = JSON.parse(key);
|
|
11686
|
+
}
|
|
11687
|
+
catch (e) {
|
|
11688
|
+
console.error("Can't parse " + key + " from JSON");
|
|
11689
|
+
}
|
|
11690
|
+
finally {
|
|
11691
|
+
if (parsedKey) {
|
|
11692
|
+
keys = getRowPivotKeys(childrenMapped[key], __spread(keys, [parsedKey.value]));
|
|
11693
|
+
}
|
|
11694
|
+
}
|
|
11695
|
+
return keys;
|
|
11696
|
+
}
|
|
11633
11697
|
|
|
11634
11698
|
var GridActionType;
|
|
11635
11699
|
(function (GridActionType) {
|
|
@@ -12509,7 +12573,8 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12509
12573
|
});
|
|
12510
12574
|
Object.defineProperty(DatoGridFilterComponent.prototype, "colFilter", {
|
|
12511
12575
|
get: function () {
|
|
12512
|
-
|
|
12576
|
+
var filter = this.gridQuery.getFilter()[this.colField];
|
|
12577
|
+
return filter && isArrayValuesEqual(this.pivotKeys, filter.pivotKeys) ? filter : null;
|
|
12513
12578
|
},
|
|
12514
12579
|
enumerable: true,
|
|
12515
12580
|
configurable: true
|
|
@@ -12521,12 +12586,20 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12521
12586
|
enumerable: true,
|
|
12522
12587
|
configurable: true
|
|
12523
12588
|
});
|
|
12589
|
+
Object.defineProperty(DatoGridFilterComponent.prototype, "pivotKeys", {
|
|
12590
|
+
get: function () {
|
|
12591
|
+
return this.colDef.pivotKeys || [];
|
|
12592
|
+
},
|
|
12593
|
+
enumerable: true,
|
|
12594
|
+
configurable: true
|
|
12595
|
+
});
|
|
12524
12596
|
DatoGridFilterComponent.prototype.ngOnInit = function () {
|
|
12525
12597
|
var _a;
|
|
12526
12598
|
var _this = this;
|
|
12527
12599
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12528
|
-
var _c = this.colDef,
|
|
12529
|
-
this.colField =
|
|
12600
|
+
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12601
|
+
this.colField = getColField(this.colDef);
|
|
12602
|
+
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12530
12603
|
if (filtersConfig.sections) {
|
|
12531
12604
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12532
12605
|
}
|
|
@@ -12538,7 +12611,11 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12538
12611
|
this.listSortByKey = this.filterType === DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12539
12612
|
this.gridQuery = gridQuery;
|
|
12540
12613
|
this.gridService = gridService;
|
|
12541
|
-
this.hasFilter$ = this.gridQuery
|
|
12614
|
+
this.hasFilter$ = this.gridQuery
|
|
12615
|
+
.select(function (state) { return state.settings.filter[_this.colField]; })
|
|
12616
|
+
.pipe(map$1(function (filter) {
|
|
12617
|
+
return !isNil(filter) && isArrayValuesEqual(filter.pivotKeys, _this.pivotKeys);
|
|
12618
|
+
}));
|
|
12542
12619
|
if (this.filterSections.Conditional) {
|
|
12543
12620
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12544
12621
|
if (filtersConfig.showEmptyConditions) {
|
|
@@ -12656,6 +12733,10 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12656
12733
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12657
12734
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12658
12735
|
var filter = {};
|
|
12736
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12737
|
+
if (this.pivotColumn) {
|
|
12738
|
+
filter.pivotFields = this.getPivotFields(this.pivotColumn.getParent());
|
|
12739
|
+
}
|
|
12659
12740
|
if (this.filterSections.Conditional) {
|
|
12660
12741
|
this.setConditionalFilter(filter, conditional);
|
|
12661
12742
|
}
|
|
@@ -12984,6 +13065,18 @@ var DatoGridFilterComponent = /** @class */ (function () {
|
|
|
12984
13065
|
var _this = this;
|
|
12985
13066
|
return data.filter(function (v) { return !_this.excludedValues.has(v); });
|
|
12986
13067
|
};
|
|
13068
|
+
/**
|
|
13069
|
+
* Get pivot dimensions as defined in the parent group column header class.
|
|
13070
|
+
*/
|
|
13071
|
+
DatoGridFilterComponent.prototype.getPivotFields = function (parent, fields) {
|
|
13072
|
+
if (fields === void 0) { fields = []; }
|
|
13073
|
+
var grandParent = parent.getParent();
|
|
13074
|
+
if (grandParent) {
|
|
13075
|
+
this.getPivotFields(grandParent, fields);
|
|
13076
|
+
}
|
|
13077
|
+
fields.push(parent.getOriginalColumnGroup().getColGroupDef().headerClass);
|
|
13078
|
+
return fields;
|
|
13079
|
+
};
|
|
12987
13080
|
DatoGridFilterComponent.ctorParameters = function () { return [
|
|
12988
13081
|
{ type: ElementRef },
|
|
12989
13082
|
{ type: PopoverRef },
|
|
@@ -13072,10 +13165,9 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13072
13165
|
var colDef = params.column.getColDef();
|
|
13073
13166
|
this.headerInfo = colDef.info;
|
|
13074
13167
|
this.headerName = colDef.headerName;
|
|
13075
|
-
this.aggColumn = this.column.getColId().indexOf('ag-Grid-AutoColumn') !== -1;
|
|
13076
13168
|
this.showFilter = colDef.filter !== DatoGridFilterTypes.None;
|
|
13077
13169
|
this.showMoreMenu = isNil(colDef.moreMenuActions) || colDef.moreMenuActions.length > 0;
|
|
13078
|
-
this.field =
|
|
13170
|
+
this.field = getColField(colDef);
|
|
13079
13171
|
this.context = {
|
|
13080
13172
|
api: {
|
|
13081
13173
|
grid: params.api,
|
|
@@ -13087,7 +13179,10 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13087
13179
|
this.customTemplates = gridService.getCustomHeader(this.field);
|
|
13088
13180
|
this.filterActive$ = gridQuery
|
|
13089
13181
|
.select(function (state) { return state.settings.filter[_this.field]; })
|
|
13090
|
-
.pipe(map$1(function (filter) {
|
|
13182
|
+
.pipe(map$1(function (filter) {
|
|
13183
|
+
var isPivotColumnMatchFilter = filter && isArrayValuesEqual(filter.pivotKeys, colDef.pivotKeys);
|
|
13184
|
+
return size(filter) > 0 && isPivotColumnMatchFilter;
|
|
13185
|
+
}));
|
|
13091
13186
|
if (this.params.enableSorting) {
|
|
13092
13187
|
fromEvent(this.host.nativeElement, 'click')
|
|
13093
13188
|
.pipe(untilDestroyed(this))
|
|
@@ -13149,13 +13244,6 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13149
13244
|
});
|
|
13150
13245
|
};
|
|
13151
13246
|
DatoGridColumnHeaderComponent.prototype.ngOnDestroy = function () { };
|
|
13152
|
-
Object.defineProperty(DatoGridColumnHeaderComponent.prototype, "groupField", {
|
|
13153
|
-
get: function () {
|
|
13154
|
-
return this.column.getColDef().showRowGroup;
|
|
13155
|
-
},
|
|
13156
|
-
enumerable: true,
|
|
13157
|
-
configurable: true
|
|
13158
|
-
});
|
|
13159
13247
|
DatoGridColumnHeaderComponent.ctorParameters = function () { return [
|
|
13160
13248
|
{ type: ViewContainerRef },
|
|
13161
13249
|
{ type: CustomHeaderControllerService },
|
|
@@ -13654,8 +13742,8 @@ var GridService = /** @class */ (function () {
|
|
|
13654
13742
|
this.svgRegistry = svgRegistry;
|
|
13655
13743
|
this.storageAPI = storageAPI;
|
|
13656
13744
|
this.logger = logger;
|
|
13657
|
-
this.pageNumberToReturnAfterRefresh = -1;
|
|
13658
13745
|
this.treeConfig = defaultGridTreeLabel;
|
|
13746
|
+
this.pageNumberToReturnAfterRefresh = -1;
|
|
13659
13747
|
this.CHECKBOX_SELECTION_COL_ID = 'grid-checkbox-selection';
|
|
13660
13748
|
}
|
|
13661
13749
|
Object.defineProperty(GridService.prototype, "treeData", {
|
|
@@ -13721,6 +13809,9 @@ var GridService = /** @class */ (function () {
|
|
|
13721
13809
|
var treeDate = convertToTreeData(data, _this.treeConfig);
|
|
13722
13810
|
_this.api.grid.setRowData(treeDate);
|
|
13723
13811
|
}
|
|
13812
|
+
else if (_this.isPivotMode) {
|
|
13813
|
+
_this.setPivotModeRows(data);
|
|
13814
|
+
}
|
|
13724
13815
|
else {
|
|
13725
13816
|
_this.api.grid.setRowData(data);
|
|
13726
13817
|
}
|
|
@@ -13841,6 +13932,12 @@ var GridService = /** @class */ (function () {
|
|
|
13841
13932
|
params.gridOptions.saveSettings = saveSettings !== false && !isNil(gridName);
|
|
13842
13933
|
/** Server Side Pagination for select all option */
|
|
13843
13934
|
this.initOnRowSelectedForServerSidePagination(params);
|
|
13935
|
+
/** Add pivot specific required settings */
|
|
13936
|
+
if (params.gridOptions.pivotMode) {
|
|
13937
|
+
this.initPivotSecondaryColsProcess(params);
|
|
13938
|
+
params.gridOptions.enableV2_1 = true;
|
|
13939
|
+
params.gridOptions.saveSettings = false;
|
|
13940
|
+
}
|
|
13844
13941
|
return params.gridOptions;
|
|
13845
13942
|
};
|
|
13846
13943
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
@@ -14032,10 +14129,11 @@ var GridService = /** @class */ (function () {
|
|
|
14032
14129
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14033
14130
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14034
14131
|
});
|
|
14132
|
+
var colField = getColField(column.getColDef());
|
|
14035
14133
|
this.store.update(function (state) {
|
|
14036
14134
|
var _a;
|
|
14037
14135
|
return {
|
|
14038
|
-
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[
|
|
14136
|
+
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14039
14137
|
};
|
|
14040
14138
|
});
|
|
14041
14139
|
this.notifyFilterUpdate();
|
|
@@ -14545,6 +14643,68 @@ var GridService = /** @class */ (function () {
|
|
|
14545
14643
|
this.setServerSidePagination({ selectAllRowsEnabled: false, excludedFromSelectAll: [] });
|
|
14546
14644
|
}
|
|
14547
14645
|
};
|
|
14646
|
+
/**
|
|
14647
|
+
* When pivoting,
|
|
14648
|
+
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14649
|
+
* @private
|
|
14650
|
+
*/
|
|
14651
|
+
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14652
|
+
var gridOptions = _a.gridOptions;
|
|
14653
|
+
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14654
|
+
var api = colDef.headerComponentParams.gridQuery.api;
|
|
14655
|
+
if (api) {
|
|
14656
|
+
var valueColumns = colDef.headerComponentParams.gridQuery.api.columns.getValueColumns();
|
|
14657
|
+
var originalColDef = valueColumns
|
|
14658
|
+
.map(function (_a) {
|
|
14659
|
+
var userProvidedColDef = _a.userProvidedColDef;
|
|
14660
|
+
return userProvidedColDef;
|
|
14661
|
+
})
|
|
14662
|
+
.find(function (_a) {
|
|
14663
|
+
var colId = _a.colId;
|
|
14664
|
+
return colId === colDef.pivotValueColumn.getColId();
|
|
14665
|
+
});
|
|
14666
|
+
if (originalColDef) {
|
|
14667
|
+
colDef.filter = originalColDef.filter;
|
|
14668
|
+
}
|
|
14669
|
+
}
|
|
14670
|
+
if (colDef.pivotKeys) {
|
|
14671
|
+
colDef.pivotKeys = colDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14672
|
+
}
|
|
14673
|
+
};
|
|
14674
|
+
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
14675
|
+
if (colGroupDef.headerName) {
|
|
14676
|
+
var _a = JSON.parse(colGroupDef.headerName), field = _a.field, value = _a.value;
|
|
14677
|
+
colGroupDef.headerClass = field;
|
|
14678
|
+
colGroupDef.headerName = value;
|
|
14679
|
+
}
|
|
14680
|
+
if (colGroupDef.pivotKeys) {
|
|
14681
|
+
colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14682
|
+
}
|
|
14683
|
+
};
|
|
14684
|
+
};
|
|
14685
|
+
GridService.prototype.setPivotModeRows = function (data) {
|
|
14686
|
+
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14687
|
+
var convertedData = data.map(function (currentValue, index) {
|
|
14688
|
+
var e_4, _a;
|
|
14689
|
+
var mappedValues = __assign({}, currentValue);
|
|
14690
|
+
try {
|
|
14691
|
+
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
14692
|
+
var col = pivotColumns_1_1.value;
|
|
14693
|
+
var field = col.getColDef().field;
|
|
14694
|
+
mappedValues[field] = JSON.stringify({ field: field, value: currentValue[field] });
|
|
14695
|
+
}
|
|
14696
|
+
}
|
|
14697
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14698
|
+
finally {
|
|
14699
|
+
try {
|
|
14700
|
+
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14701
|
+
}
|
|
14702
|
+
finally { if (e_4) throw e_4.error; }
|
|
14703
|
+
}
|
|
14704
|
+
return mappedValues;
|
|
14705
|
+
});
|
|
14706
|
+
this.api.grid.setRowData(convertedData);
|
|
14707
|
+
};
|
|
14548
14708
|
GridService.ctorParameters = function () { return [
|
|
14549
14709
|
{ type: GridStore },
|
|
14550
14710
|
{ type: GridQuery },
|
|
@@ -14979,6 +15139,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
14979
15139
|
set: function (gridOptions) {
|
|
14980
15140
|
this._gridOptions = gridOptions;
|
|
14981
15141
|
this.gridService.treeData = gridOptions.treeData;
|
|
15142
|
+
this.gridService.isPivotMode = gridOptions.pivotMode;
|
|
14982
15143
|
if (this.agGridEl) {
|
|
14983
15144
|
if (gridOptions.treeData) {
|
|
14984
15145
|
!this.agGridEl.classList.contains(this.treeGridClass) && this.agGridEl.classList.add(this.treeGridClass);
|
|
@@ -15054,6 +15215,15 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15054
15215
|
var defaults = __assign(__assign(__assign({}, defaultGridOptions), (this.gridOptions.treeData ? defaultTreeOptions : {})), { icons: this.getGridIcons() });
|
|
15055
15216
|
return deepmerge(defaults, normalized);
|
|
15056
15217
|
};
|
|
15218
|
+
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15219
|
+
this.gridService.setRows(data);
|
|
15220
|
+
};
|
|
15221
|
+
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15222
|
+
return this.gridQuery.selectFilter();
|
|
15223
|
+
};
|
|
15224
|
+
DatoGridControllerComponent.prototype.onSortChanged = function () {
|
|
15225
|
+
return this.gridQuery.selectSort();
|
|
15226
|
+
};
|
|
15057
15227
|
DatoGridControllerComponent.prototype.getGridIcons = function () {
|
|
15058
15228
|
var moveColumnIcon = "<span class=\"da-grid-icon pointer d-flex column-move\">" + this.iconRegistry.getSvg('move-column') + "</span>";
|
|
15059
15229
|
return {
|
|
@@ -15463,6 +15633,13 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
15463
15633
|
enumerable: true,
|
|
15464
15634
|
configurable: true
|
|
15465
15635
|
});
|
|
15636
|
+
Object.defineProperty(DatoGridV2Component.prototype, "isPivotMode", {
|
|
15637
|
+
get: function () {
|
|
15638
|
+
return this.gridOptions ? this.gridOptions.pivotMode : false;
|
|
15639
|
+
},
|
|
15640
|
+
enumerable: true,
|
|
15641
|
+
configurable: true
|
|
15642
|
+
});
|
|
15466
15643
|
DatoGridV2Component.ctorParameters = function () { return [
|
|
15467
15644
|
{ type: DatoGridControllerComponent },
|
|
15468
15645
|
{ type: ElementRef }
|
|
@@ -15475,7 +15652,7 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
15475
15652
|
DatoGridV2Component = __decorate([
|
|
15476
15653
|
Component({
|
|
15477
15654
|
selector: 'dato-grid-v2',
|
|
15478
|
-
template: "<ag-grid-angular data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
|
|
15655
|
+
template: "<ag-grid-angular data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\" [class.pivot-mode]=\"isPivotMode\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
|
|
15479
15656
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15480
15657
|
encapsulation: ViewEncapsulation.None,
|
|
15481
15658
|
styles: ["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]
|
|
@@ -15776,6 +15953,9 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
15776
15953
|
showFirstEllipsis: false,
|
|
15777
15954
|
showLastPage: false
|
|
15778
15955
|
};
|
|
15956
|
+
// Show fit cell content and collapse/expand row groups controls
|
|
15957
|
+
this.showBottomControls = false;
|
|
15958
|
+
this.isExpanded = true;
|
|
15779
15959
|
this.isServerSidePagination = false;
|
|
15780
15960
|
// The number of pages displayed in the navigation panel for each view as defined by product.
|
|
15781
15961
|
this.MINI_DISPLAY_LENGTH = 2;
|
|
@@ -15823,7 +16003,10 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
15823
16003
|
_this.initPagination();
|
|
15824
16004
|
});
|
|
15825
16005
|
this.gridQuery.gridReady$
|
|
15826
|
-
.pipe(tap(function () {
|
|
16006
|
+
.pipe(tap(function () {
|
|
16007
|
+
_this.gridApi = _this.gridQuery.api.grid;
|
|
16008
|
+
_this.showBottomControls = _this.gridQuery.getGridOptions().showBottomControls;
|
|
16009
|
+
}), switchMap(function () {
|
|
15827
16010
|
_this.isServerSidePagination = _this.gridQuery.isServerSide;
|
|
15828
16011
|
return _this.isServerSidePagination ? _this.gridQuery.serverDataLoaded$ : _this.gridQuery.rowDataChanged$;
|
|
15829
16012
|
}), throttleTime(100), tapOnce(function () { return _this.initPagination(); }), untilDestroyed(this))
|
|
@@ -15945,6 +16128,13 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
15945
16128
|
DatoGridPaginationV2Component.prototype.trackByPage = function (index, page) {
|
|
15946
16129
|
return page;
|
|
15947
16130
|
};
|
|
16131
|
+
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16132
|
+
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16133
|
+
this.isExpanded = !this.isExpanded;
|
|
16134
|
+
};
|
|
16135
|
+
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16136
|
+
this.gridService.fitGrid(type);
|
|
16137
|
+
};
|
|
15948
16138
|
DatoGridPaginationV2Component.prototype.ngOnDestroy = function () { };
|
|
15949
16139
|
/**
|
|
15950
16140
|
* Sets the rows display string
|
|
@@ -16033,7 +16223,7 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
|
|
|
16033
16223
|
Component({
|
|
16034
16224
|
selector: 'dato-grid-pagination-v2',
|
|
16035
16225
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16036
|
-
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>\n",
|
|
16226
|
+
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-next-page\">\n </dato-icon-button>\n\n <dato-icon-button class=\"mx-4\" icon=\"maximize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('container')\" data-auto-id=\"pagiantion-next-page\">\n </dato-icon-button>\n\n <dato-icon-button icon=\"minimize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('content')\" data-auto-id=\"pagiantion-next-page\">\n </dato-icon-button>\n </div>\n</div>\n",
|
|
16037
16227
|
providers: [DecimalPipe],
|
|
16038
16228
|
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}"]
|
|
16039
16229
|
}),
|
|
@@ -24223,7 +24413,7 @@ var DatoProgressBarComponent = /** @class */ (function () {
|
|
|
24223
24413
|
];
|
|
24224
24414
|
}
|
|
24225
24415
|
else if (this.parts &&
|
|
24226
|
-
this.parts.every(function (part) { return
|
|
24416
|
+
this.parts.every(function (part) { return part.weight >= 0; }) &&
|
|
24227
24417
|
!this.parts.every(function (part) { return !!part.percent; })) {
|
|
24228
24418
|
this.initPartsPercent();
|
|
24229
24419
|
}
|
|
@@ -24873,5 +25063,5 @@ window.coreVersion = '21.4.0-rc.';
|
|
|
24873
25063
|
* Generated bundle index. Do not edit.
|
|
24874
25064
|
*/
|
|
24875
25065
|
|
|
24876
|
-
export { APP_TRANSLATE, AceService, BaseCustomControl, COMPARE_RESULT, CUSTOM_RANGE_ID, ColorPalette, ConfirmationType, ContentRef, ContentType, CustomHeaderControllerService, DATE_PICKER_CONFIG, DATE_PICKER_POPOVER_ID, DATO_CORE_LOGGER, DATO_FORM_ERRORS, DATO_GRID_STORAGE_API, DEFAULT_FORMAT, DEFAULT_GRID_SEARCH_DEBOUNCE_TIME, DatePickerConfig, DatePickerMonthComponent, DateType, DatoAccordionComponent, DatoAccordionContentComponent, DatoAccordionGroupComponent, DatoAccordionHeaderComponent, DatoAccordionModule, DatoAceDirective, DatoAceDraggableDirective, DatoAceModule, DatoActionType, DatoAutoCompleteContentDirective, DatoAutoFocusDirective, DatoAutocompleteComponent, DatoAutocompleteDirective, DatoAutocompleteModule, DatoBreadcrumbsComponent, DatoBreadcrumbsModule, DatoButtonComponent, DatoButtonGroupComponent, DatoButtonGroupModule, DatoButtonModule, DatoCamelCasePipe, DatoCarouselComponent, DatoCarouselItemDirective, DatoCarouselItemElement, DatoCarouselModule, DatoCheckboxComponent, DatoCheckboxModule, DatoClipboardDirective, DatoColorDirective, DatoConfirmationDialogComponent, DatoControlErrorComponent, DatoControlErrorContainerDirective, DatoControlErrorsDirective, DatoCoreError, DatoCoreModule, DatoCustomHeaderTemplateComponent, DatoCustomHeaderTemplateDirective, DatoCustomMoreMenuTemplateDirective, DatoDatePickerContainerComponent, DatoDatePickerModule, DatoDatePickerRangeComponent, DatoDatePickerSingleComponent, DatoDialog, DatoDialogCloseDirective, DatoDialogComponent, DatoDialogContentComponent, DatoDialogDismissDirective, DatoDialogFooterComponent, DatoDialogHeaderComponent, DatoDialogModule, DatoDialogRef, DatoDirectivesModule, DatoDisableControlDirective, DatoDraggableDirective, DatoDynamicContentComponent, DatoDynamicContentModule, DatoEditableHeaderComponent, DatoEditableHeaderModule, DatoFileInputComponent, DatoFileInputDefaultComponent, DatoFileInputModule, DatoFilterConditions, DatoFontDirective, DatoFontIconComponent, DatoFontIconModule, DatoFormSubmitDirective, DatoFormValidationModule, DatoGrid, DatoGridAPI, DatoGridAvatarCellComponent, DatoGridColumnDisplayMenuComponent, DatoGridColumnHeaderComponent, DatoGridColumnHeaderMoreMenuComponent, DatoGridColumnTypes, DatoGridComponent, DatoGridControllerComponent, DatoGridDateFilterOptions, DatoGridFilterComponent, DatoGridFilterOptionsMap, DatoGridFilterSections, DatoGridFilterTypes, DatoGridGroupsMenuComponent, DatoGridHeaderComponent, DatoGridHeaderV2Component, DatoGridInitialsCellComponent, DatoGridItemsCellComponent, DatoGridModule, DatoGridMoreMenuActions, DatoGridNumberFilterOptions, DatoGridOnHoverComponent, DatoGridPaginationComponent, DatoGridPaginationV2Component, DatoGridStatusCellComponent, DatoGridStringFilterOptions, DatoGridToolbarComponent, DatoGridToolbarItemDirective, DatoGridToolbarItemElementDirective, DatoGridV2Component, DatoGridV2LoaderComponent, DatoGridV2Module, DatoGridV2NoDataOverlayComponent, DatoGridV2ToolbarButtonComponent, DatoGridV2ToolbarComponent, DatoGroupComponent, DatoHighlightPipe, DatoHotkeys, DatoHotkeysDirective, DatoHotkeysHelpComponent, DatoHotkeysModule, DatoIconButtonComponent, DatoIconButtonModule, DatoIconComponent, DatoIconModule, DatoInfiniteScrollComponent, DatoInfiniteScrollModule, DatoInputComponent, DatoInputModule, DatoInputNumberComponent, DatoInputNumberDirective, DatoInputNumberModule, DatoKebabCasePipe, DatoLinkButtonComponent, DatoLinkButtonModule, DatoListComponent, DatoListModule, DatoListNoDataComponent, DatoListNoResultComponent, DatoListV2Component, DatoListV2Module, DatoLoaderComponent, DatoLoadersModule, DatoMenuComponent, DatoMenuContentDirective, DatoMenuItemDirective, DatoMenuModule, DatoMenuTriggerForDirective, DatoMultiOptionComponent, DatoMultiOptionV2Component, DatoOperatorTogglerComponent, DatoOperatorTogglerModule, DatoOptionComponent, DatoOptionV2Component, DatoOptionsModule, DatoOriginDirective, DatoOverlay, DatoPageLoaderComponent, DatoPanel, DatoPanelComponent, DatoPanelContentComponent, DatoPanelFooterComponent, DatoPanelHeaderComponent, DatoPanelInternalConfig, DatoPanelModule, DatoPanelRef, DatoPillsComponent, DatoPillsModule, DatoPipesModule, DatoPopover, DatoPopoverComponent, DatoPopoverModule, DatoProgressBarComponent, DatoProgressBarModule, DatoRadioComponent, DatoRadioModule, DatoRichTextDirective, DatoRichTextModule, DatoSearchResultsGroupSortPipe, DatoSearchResultsSortPipe, DatoSearchableContainerComponent, DatoSearchableDirective, DatoSearchableHighlightDirective, DatoSearchableModule, DatoSelectActiveDirective, DatoSelectComponent, DatoSelectEmptyComponent, DatoSelectModule, DatoSliderComponent, DatoSliderModule, DatoSnackbar, DatoSnackbarComponent, DatoSnackbarModule, DatoSortableComponent, DatoSortableHandleDirective, DatoSortableModule, DatoStaticImageSrcDirective, DatoStaticImagesSrcModule, DatoSubscribeContext, DatoSubscribeDirective, DatoTab, DatoTabContent, DatoTabTitle, DatoTabsModule, DatoTabset, DatoTemplatePortal, DatoTextModule, DatoThemesModule, DatoToast, DatoToastComponent, DatoToastModule, DatoTogglerComponent, DatoTogglerModule, DatoTooltipDirective, DatoTooltipV2Directive, DatoTrackByPropPipe, DatoTranslateService, DatoTreePipe, DatoTriggerMulti, DatoTriggerSingle, DialogConfig, DialogResultStatus, Dimensions, EventModifiersPlugin, GridActionType, GridMinWidths, GridRowSelectionType, GridToolbarService, ISO_FORMAT, IconRegistry, KeyCodes, KeyboardEventKeys, ListValueTypes, MockService, OperatorTypes, POPPER_BOUNDARY, PaletteDirective, PanelResultCloseTrigger, PillType, PopoverCloseDirective, PopoverContentDirective, PopoverRef, PopoverTrigger, ROOT_NODE_ID, RelativeDateType, RenderMethod, RowSelectionType, RowSelectionTypeV2, SELECT_MAX_HEIGHT, SUPPORTED_LOCALES, SelectType, SnackbarRef, SnackbarType, Store, SvgRegistry, ToolbarActionType, ToolbarArea, ToolbarConfirmation, ToolbarDeleteConfirmation, ToolbarHandler, TranslatePipe, Types, _valueChanges, a, addClass, addJSObjectCompletor, allowedFileTypes, alphabeticalGroupSort, alphabeticalSort, appendChild, appendScript, appendStyle, appendToBody, assertString, camelCase, capitalize, cloneDeep, closest, coerceArray, coerceElement, compareWith, compose, convertFromTreeData, convertToTreeData, copyToClipboard, createComponent, createElement, createGUID, createHTMLCompletor, curry, dateCompare, daysOfTheMonth, debounce, declarations$2 as declarations, deepEqual, deepmerge, defaultActions$1 as defaultActions, defaultConfig, defaultEditableColumnRenderer, defaultGridOptions, defaultGridTreeLabel, defaultOptionsDisplayLimit, defaultTreeOptions, dialogSizePreset, diff, difference, differenceBy, dimensionsChanges, directives, drop, editableCellRendererWithSearchHighlight, escape, escapeRegExp, filter, filterByControlValue, filterByTerm, filterDialogDismissed, filterDialogSuccess, filterGroupByControlValue, filterGroupByTerm, filterKey, find, findIndex, findKey, fixNgLeaks, forEach, formatKeys, generateMonths, get, getAttr, getCustomRange, getDateISOString, getDefaultConfirmationOptions, getDefaultOptions, getDefaultsToastOptions, getElementCoords, getFunctionName, getGridConfiguration, getGridModel, getInitials, getLocalizedFormat, getMultiTemplate, getOptionTemplate, getPopperDefaults, getUTCDate, getVisibleActions, gridTreeFilePathKey, groupBy, groupSortOrder, has, inView, intersection, invert, isArrowUpDown, isBoolean, isEmpty, isEmptyString, isEnter, isEqual, isEscape, isFraction, isFunction, isMacintosh, isNil, isNumber, isObject, isRangeCondition, isRangeCustom, isString, isTestEnv, isValidMediaLink, kebabCase, keyBy, keysSymbols, last, map, mapKeys, mapValues, maxFileSize, merge, minBy, mockInDev, mocks, ngContentResolver, noop, normalizeData, omit, omitBy, optionalDebounce, pallete, parseDateString, partial, polling, prependChild, publicApi$1 as publicApi, query, queryAll, random, rawDiff, reject, relativeDateTypes, removeClass, resolveRange, round, searchHighlightCellRenderer, searchResultsGroupSort, searchResultsSort, setAttr, setAttribute, setDimensions, setEmptyFolderClass, setGridConfiguration, setGridModel, setMaxDimensions, setMinDimensions, setStyle, setStyles, size, sortBy, stubs, supportedLocales, tapLog, tapOnce, throttle, toBoolean, toFormData, toNumber, toResponseBody, toString, toggleClass, toolbarActionToContextAction, unescape, union, uniq, uniqBy, uploadProgress, validBase64Image, validUrl, validateCondition, validateDate, validateDateCondition, validateFilter, validateNumberCondition, validateRange, validateStringCondition, values, workerMap, zoneStable, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2, DATO_CORE_CONFIG as ɵb, DatoGridHelper as ɵc, Popper as ɵd, GridQuery as ɵe, GridStore as ɵf, GridService as ɵg, DatoDateRangesFilterPipe as ɵh, ListStore as ɵi, DatoListSelectAllComponent as ɵj, DatoGridMultiSelectColumnHeaderComponent as ɵk, DatoGridItemsCountCellComponent as ɵl, DatoGridV2ToolbarMoreMenuComponent as ɵm, DatoGridSearchBarComponent as ɵn, RichTextService as ɵo };
|
|
25066
|
+
export { APP_TRANSLATE, AceService, BaseCustomControl, COMPARE_RESULT, CUSTOM_RANGE_ID, ColorPalette, ConfirmationType, ContentRef, ContentType, CustomHeaderControllerService, DATE_PICKER_CONFIG, DATE_PICKER_POPOVER_ID, DATO_CORE_LOGGER, DATO_FORM_ERRORS, DATO_GRID_STORAGE_API, DEFAULT_FORMAT, DEFAULT_GRID_SEARCH_DEBOUNCE_TIME, DatePickerConfig, DatePickerMonthComponent, DateType, DatoAccordionComponent, DatoAccordionContentComponent, DatoAccordionGroupComponent, DatoAccordionHeaderComponent, DatoAccordionModule, DatoAceDirective, DatoAceDraggableDirective, DatoAceModule, DatoActionType, DatoAutoCompleteContentDirective, DatoAutoFocusDirective, DatoAutocompleteComponent, DatoAutocompleteDirective, DatoAutocompleteModule, DatoBreadcrumbsComponent, DatoBreadcrumbsModule, DatoButtonComponent, DatoButtonGroupComponent, DatoButtonGroupModule, DatoButtonModule, DatoCamelCasePipe, DatoCarouselComponent, DatoCarouselItemDirective, DatoCarouselItemElement, DatoCarouselModule, DatoCheckboxComponent, DatoCheckboxModule, DatoClipboardDirective, DatoColorDirective, DatoConfirmationDialogComponent, DatoControlErrorComponent, DatoControlErrorContainerDirective, DatoControlErrorsDirective, DatoCoreError, DatoCoreModule, DatoCustomHeaderTemplateComponent, DatoCustomHeaderTemplateDirective, DatoCustomMoreMenuTemplateDirective, DatoDatePickerContainerComponent, DatoDatePickerModule, DatoDatePickerRangeComponent, DatoDatePickerSingleComponent, DatoDialog, DatoDialogCloseDirective, DatoDialogComponent, DatoDialogContentComponent, DatoDialogDismissDirective, DatoDialogFooterComponent, DatoDialogHeaderComponent, DatoDialogModule, DatoDialogRef, DatoDirectivesModule, DatoDisableControlDirective, DatoDraggableDirective, DatoDynamicContentComponent, DatoDynamicContentModule, DatoEditableHeaderComponent, DatoEditableHeaderModule, DatoFileInputComponent, DatoFileInputDefaultComponent, DatoFileInputModule, DatoFilterConditions, DatoFontDirective, DatoFontIconComponent, DatoFontIconModule, DatoFormSubmitDirective, DatoFormValidationModule, DatoGrid, DatoGridAPI, DatoGridAvatarCellComponent, DatoGridColumnDisplayMenuComponent, DatoGridColumnHeaderComponent, DatoGridColumnHeaderMoreMenuComponent, DatoGridColumnTypes, DatoGridComponent, DatoGridControllerComponent, DatoGridDateFilterOptions, DatoGridFilterComponent, DatoGridFilterOptionsMap, DatoGridFilterSections, DatoGridFilterTypes, DatoGridGroupsMenuComponent, DatoGridHeaderComponent, DatoGridHeaderV2Component, DatoGridInitialsCellComponent, DatoGridItemsCellComponent, DatoGridModule, DatoGridMoreMenuActions, DatoGridNumberFilterOptions, DatoGridOnHoverComponent, DatoGridPaginationComponent, DatoGridPaginationV2Component, DatoGridStatusCellComponent, DatoGridStringFilterOptions, DatoGridToolbarComponent, DatoGridToolbarItemDirective, DatoGridToolbarItemElementDirective, DatoGridV2Component, DatoGridV2LoaderComponent, DatoGridV2Module, DatoGridV2NoDataOverlayComponent, DatoGridV2ToolbarButtonComponent, DatoGridV2ToolbarComponent, DatoGroupComponent, DatoHighlightPipe, DatoHotkeys, DatoHotkeysDirective, DatoHotkeysHelpComponent, DatoHotkeysModule, DatoIconButtonComponent, DatoIconButtonModule, DatoIconComponent, DatoIconModule, DatoInfiniteScrollComponent, DatoInfiniteScrollModule, DatoInputComponent, DatoInputModule, DatoInputNumberComponent, DatoInputNumberDirective, DatoInputNumberModule, DatoKebabCasePipe, DatoLinkButtonComponent, DatoLinkButtonModule, DatoListComponent, DatoListModule, DatoListNoDataComponent, DatoListNoResultComponent, DatoListV2Component, DatoListV2Module, DatoLoaderComponent, DatoLoadersModule, DatoMenuComponent, DatoMenuContentDirective, DatoMenuItemDirective, DatoMenuModule, DatoMenuTriggerForDirective, DatoMultiOptionComponent, DatoMultiOptionV2Component, DatoOperatorTogglerComponent, DatoOperatorTogglerModule, DatoOptionComponent, DatoOptionV2Component, DatoOptionsModule, DatoOriginDirective, DatoOverlay, DatoPageLoaderComponent, DatoPanel, DatoPanelComponent, DatoPanelContentComponent, DatoPanelFooterComponent, DatoPanelHeaderComponent, DatoPanelInternalConfig, DatoPanelModule, DatoPanelRef, DatoPillsComponent, DatoPillsModule, DatoPipesModule, DatoPopover, DatoPopoverComponent, DatoPopoverModule, DatoProgressBarComponent, DatoProgressBarModule, DatoRadioComponent, DatoRadioModule, DatoRichTextDirective, DatoRichTextModule, DatoSearchResultsGroupSortPipe, DatoSearchResultsSortPipe, DatoSearchableContainerComponent, DatoSearchableDirective, DatoSearchableHighlightDirective, DatoSearchableModule, DatoSelectActiveDirective, DatoSelectComponent, DatoSelectEmptyComponent, DatoSelectModule, DatoSliderComponent, DatoSliderModule, DatoSnackbar, DatoSnackbarComponent, DatoSnackbarModule, DatoSortableComponent, DatoSortableHandleDirective, DatoSortableModule, DatoStaticImageSrcDirective, DatoStaticImagesSrcModule, DatoSubscribeContext, DatoSubscribeDirective, DatoTab, DatoTabContent, DatoTabTitle, DatoTabsModule, DatoTabset, DatoTemplatePortal, DatoTextModule, DatoThemesModule, DatoToast, DatoToastComponent, DatoToastModule, DatoTogglerComponent, DatoTogglerModule, DatoTooltipDirective, DatoTooltipV2Directive, DatoTrackByPropPipe, DatoTranslateService, DatoTreePipe, DatoTriggerMulti, DatoTriggerSingle, DialogConfig, DialogResultStatus, Dimensions, EventModifiersPlugin, GridActionType, GridMinWidths, GridRowSelectionType, GridToolbarService, ISO_FORMAT, IconRegistry, KeyCodes, KeyboardEventKeys, ListValueTypes, MockService, OperatorTypes, POPPER_BOUNDARY, PaletteDirective, PanelResultCloseTrigger, PillType, PopoverCloseDirective, PopoverContentDirective, PopoverRef, PopoverTrigger, ROOT_NODE_ID, RelativeDateType, RenderMethod, RowSelectionType, RowSelectionTypeV2, SELECT_MAX_HEIGHT, SUPPORTED_LOCALES, SelectType, SnackbarRef, SnackbarType, Store, SvgRegistry, ToolbarActionType, ToolbarArea, ToolbarConfirmation, ToolbarDeleteConfirmation, ToolbarHandler, TranslatePipe, Types, _valueChanges, a, addClass, addJSObjectCompletor, allowedFileTypes, alphabeticalGroupSort, alphabeticalSort, appendChild, appendScript, appendStyle, appendToBody, assertString, camelCase, capitalize, cloneDeep, closest, coerceArray, coerceElement, compareWith, compose, convertFromTreeData, convertToTreeData, copyToClipboard, createComponent, createElement, createGUID, createHTMLCompletor, curry, dateCompare, daysOfTheMonth, debounce, declarations$2 as declarations, deepEqual, deepmerge, defaultActions$1 as defaultActions, defaultConfig, defaultEditableColumnRenderer, defaultGridOptions, defaultGridTreeLabel, defaultOptionsDisplayLimit, defaultTreeOptions, dialogSizePreset, diff, difference, differenceBy, dimensionsChanges, directives, drop, editableCellRendererWithSearchHighlight, escape, escapeRegExp, filter, filterByControlValue, filterByTerm, filterDialogDismissed, filterDialogSuccess, filterGroupByControlValue, filterGroupByTerm, filterKey, find, findIndex, findKey, fixNgLeaks, forEach, formatKeys, generateMonths, get, getAttr, getCustomRange, getDateISOString, getDefaultConfirmationOptions, getDefaultOptions, getDefaultsToastOptions, getElementCoords, getFunctionName, getGridConfiguration, getGridModel, getInitials, getLocalizedFormat, getMultiTemplate, getOptionTemplate, getPopperDefaults, getUTCDate, getVisibleActions, gridTreeFilePathKey, groupBy, groupSortOrder, has, inView, intersection, invert, isArrayValuesEqual, isArrowUpDown, isBoolean, isEmpty, isEmptyString, isEnter, isEqual, isEscape, isFraction, isFunction, isMacintosh, isNil, isNumber, isObject, isRangeCondition, isRangeCustom, isString, isTestEnv, isValidMediaLink, kebabCase, keyBy, keysSymbols, last, map, mapKeys, mapValues, maxFileSize, merge, minBy, mockInDev, mocks, ngContentResolver, noop, normalizeData, omit, omitBy, optionalDebounce, pallete, parseDateString, partial, polling, prependChild, publicApi$1 as publicApi, query, queryAll, random, rawDiff, reject, relativeDateTypes, removeClass, resolveRange, round, searchHighlightCellRenderer, searchResultsGroupSort, searchResultsSort, setAttr, setAttribute, setDimensions, setEmptyFolderClass, setGridConfiguration, setGridModel, setMaxDimensions, setMinDimensions, setStyle, setStyles, size, sortBy, stubs, supportedLocales, tapLog, tapOnce, throttle, toBoolean, toFormData, toNumber, toResponseBody, toString, toggleClass, toolbarActionToContextAction, unescape, union, uniq, uniqBy, uploadProgress, validBase64Image, validUrl, validateCondition, validateDate, validateDateCondition, validateFilter, validateNumberCondition, validateRange, validateStringCondition, values, workerMap, zoneStable, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2, DATO_CORE_CONFIG as ɵb, DatoGridHelper as ɵc, Popper as ɵd, GridQuery as ɵe, GridStore as ɵf, GridService as ɵg, DatoDateRangesFilterPipe as ɵh, ListStore as ɵi, DatoListSelectAllComponent as ɵj, DatoGridMultiSelectColumnHeaderComponent as ɵk, DatoGridItemsCountCellComponent as ɵl, DatoGridV2ToolbarMoreMenuComponent as ɵm, DatoGridSearchBarComponent as ɵn, RichTextService as ɵo };
|
|
24877
25067
|
//# sourceMappingURL=datorama-core.js.map
|