@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/bundle.scss
CHANGED
|
@@ -5206,7 +5206,7 @@ dato-list-v2 .checkmark {
|
|
|
5206
5206
|
line-height: 19px;
|
|
5207
5207
|
}
|
|
5208
5208
|
|
|
5209
|
-
.simple-bold {
|
|
5209
|
+
.simple-bold, dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label span {
|
|
5210
5210
|
font-size: 14px;
|
|
5211
5211
|
font-weight: 600;
|
|
5212
5212
|
line-height: 19px;
|
|
@@ -11265,7 +11265,7 @@ dato-button-group.is-round-edges dato-button:last-of-type button {
|
|
|
11265
11265
|
line-height: 19px;
|
|
11266
11266
|
}
|
|
11267
11267
|
|
|
11268
|
-
.simple-bold {
|
|
11268
|
+
.simple-bold, dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label span {
|
|
11269
11269
|
font-size: 14px;
|
|
11270
11270
|
font-weight: 600;
|
|
11271
11271
|
line-height: 19px;
|
|
@@ -14325,6 +14325,83 @@ dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indet
|
|
|
14325
14325
|
background-color: themify(primary-200) !important;
|
|
14326
14326
|
}
|
|
14327
14327
|
|
|
14328
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group {
|
|
14329
|
+
border-bottom: none;
|
|
14330
|
+
}
|
|
14331
|
+
|
|
14332
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group span {
|
|
14333
|
+
color: themify(primary-500) !important;
|
|
14334
|
+
}
|
|
14335
|
+
|
|
14336
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group.ag-row-group-contracted:not(.ag-row-level-0) {
|
|
14337
|
+
background-color: themify(primary-50) !important;
|
|
14338
|
+
}
|
|
14339
|
+
|
|
14340
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group.ag-row-group-contracted:not(.ag-row-level-0) span {
|
|
14341
|
+
font-weight: 400;
|
|
14342
|
+
}
|
|
14343
|
+
|
|
14344
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom {
|
|
14345
|
+
border: none;
|
|
14346
|
+
}
|
|
14347
|
+
|
|
14348
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row {
|
|
14349
|
+
background-color: themify(primary-0);
|
|
14350
|
+
border: 1px solid themify(primary-200);
|
|
14351
|
+
}
|
|
14352
|
+
|
|
14353
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row .ag-cell {
|
|
14354
|
+
border-right: none;
|
|
14355
|
+
}
|
|
14356
|
+
|
|
14357
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-ltr .ag-row-group-leaf-indent {
|
|
14358
|
+
margin-left: 0;
|
|
14359
|
+
}
|
|
14360
|
+
|
|
14361
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-cell {
|
|
14362
|
+
color: themify(primary-500);
|
|
14363
|
+
}
|
|
14364
|
+
|
|
14365
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell {
|
|
14366
|
+
border: none;
|
|
14367
|
+
}
|
|
14368
|
+
|
|
14369
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell dato-grid-column-header {
|
|
14370
|
+
display: block;
|
|
14371
|
+
height: 100%;
|
|
14372
|
+
}
|
|
14373
|
+
|
|
14374
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell dato-grid-column-header > div {
|
|
14375
|
+
height: inherit;
|
|
14376
|
+
}
|
|
14377
|
+
|
|
14378
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell dato-grid-column-header > div span {
|
|
14379
|
+
color: themify(primary-500);
|
|
14380
|
+
}
|
|
14381
|
+
|
|
14382
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-cell-resize {
|
|
14383
|
+
height: 100%;
|
|
14384
|
+
border: none;
|
|
14385
|
+
}
|
|
14386
|
+
|
|
14387
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label {
|
|
14388
|
+
align-items: center;
|
|
14389
|
+
justify-content: center;
|
|
14390
|
+
}
|
|
14391
|
+
|
|
14392
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag-header-group-cell-label span {
|
|
14393
|
+
height: auto;
|
|
14394
|
+
color: themify(primary-500);
|
|
14395
|
+
}
|
|
14396
|
+
|
|
14397
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group {
|
|
14398
|
+
border-bottom: 1px solid themify(primary-200);
|
|
14399
|
+
}
|
|
14400
|
+
|
|
14401
|
+
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group:not(:last-child) {
|
|
14402
|
+
border-right: 1px solid themify(primary-200);
|
|
14403
|
+
}
|
|
14404
|
+
|
|
14328
14405
|
.ag-dnd-ghost {
|
|
14329
14406
|
box-shadow: 0 0 10px -1px themify(primary-700, 0.3);
|
|
14330
14407
|
background-color: themify(primary-100) !important;
|
|
@@ -14504,6 +14581,14 @@ dato-grid-pagination-v2 {
|
|
|
14504
14581
|
border-top: solid 1px themify(primary-100);
|
|
14505
14582
|
}
|
|
14506
14583
|
|
|
14584
|
+
dato-grid-pagination-v2 .grid-controls dato-button[datoType='secondary'] dato-icon {
|
|
14585
|
+
padding: 4px !important;
|
|
14586
|
+
}
|
|
14587
|
+
|
|
14588
|
+
dato-grid-pagination-v2 .grid-controls dato-button[datoType='secondary'] dato-icon svg {
|
|
14589
|
+
fill: themify(primary-500);
|
|
14590
|
+
}
|
|
14591
|
+
|
|
14507
14592
|
dato-grid-on-hover .actions dato-button[datoType='none'] button {
|
|
14508
14593
|
color: themify(primary-400);
|
|
14509
14594
|
}
|
|
@@ -1383,6 +1383,17 @@
|
|
|
1383
1383
|
if (n === void 0) { n = 1; }
|
|
1384
1384
|
return array.filter(function (e, index) { return index >= n; });
|
|
1385
1385
|
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Compares 2 array and return whether their inner values are the same,
|
|
1388
|
+
* without considering their order
|
|
1389
|
+
*/
|
|
1390
|
+
function isArrayValuesEqual(arrA, arrB) {
|
|
1391
|
+
if (arrA === void 0) { arrA = []; }
|
|
1392
|
+
if (arrB === void 0) { arrB = []; }
|
|
1393
|
+
var aInb = arrA.every(function (valA) { return arrB.find(function (valB) { return valB === valA; }); });
|
|
1394
|
+
var bIna = arrB.every(function (valB) { return arrA.find(function (valA) { return valA === valB; }); });
|
|
1395
|
+
return aInb && bIna && arrA.length === arrB.length;
|
|
1396
|
+
}
|
|
1386
1397
|
|
|
1387
1398
|
function toBoolean(value, includeZero) {
|
|
1388
1399
|
if (includeZero === void 0) { includeZero = false; }
|
|
@@ -11446,6 +11457,15 @@
|
|
|
11446
11457
|
return sizeMap;
|
|
11447
11458
|
}, {});
|
|
11448
11459
|
}
|
|
11460
|
+
/**
|
|
11461
|
+
* Take pivoted value field if pivot column,
|
|
11462
|
+
* or field of the colDef,
|
|
11463
|
+
* or group field form showRowGroup if its agg column
|
|
11464
|
+
*/
|
|
11465
|
+
function getColField(colDef) {
|
|
11466
|
+
var field = colDef.field, showRowGroup = colDef.showRowGroup, pivotValueColumn = colDef.pivotValueColumn;
|
|
11467
|
+
return pivotValueColumn ? pivotValueColumn.getColId() : field || showRowGroup;
|
|
11468
|
+
}
|
|
11449
11469
|
|
|
11450
11470
|
var GridQuery = /** @class */ (function (_super) {
|
|
11451
11471
|
__extends(GridQuery, _super);
|
|
@@ -11520,7 +11540,7 @@
|
|
|
11520
11540
|
};
|
|
11521
11541
|
GridQuery.prototype.getCurrentGridSettings = function () {
|
|
11522
11542
|
var toColId = function (column) { return column.getColId(); };
|
|
11523
|
-
var
|
|
11543
|
+
var columns = this.api.columns;
|
|
11524
11544
|
var groupedColumns = columns.getRowGroupColumns();
|
|
11525
11545
|
var columnsOrder = columns.getAllColumns();
|
|
11526
11546
|
var allGridColumns = columns.getAllGridColumns();
|
|
@@ -11530,7 +11550,7 @@
|
|
|
11530
11550
|
var storeSettings = this.getValue().settings;
|
|
11531
11551
|
var settings = {
|
|
11532
11552
|
gridAlignment: storeSettings.gridAlignment,
|
|
11533
|
-
sort:
|
|
11553
|
+
sort: this.getSort(),
|
|
11534
11554
|
hiddenColumns: hiddenColumns,
|
|
11535
11555
|
groupedColumns: groupedColumns.map(toColId),
|
|
11536
11556
|
filter: this.getFilter(),
|
|
@@ -11544,6 +11564,19 @@
|
|
|
11544
11564
|
}
|
|
11545
11565
|
return settings;
|
|
11546
11566
|
};
|
|
11567
|
+
GridQuery.prototype.getSort = function () {
|
|
11568
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11569
|
+
var column = this.api.columns.getColumn(colId);
|
|
11570
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11571
|
+
var pivotedColumn = secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11572
|
+
var sortColumn = column || pivotedColumn;
|
|
11573
|
+
var sortField = sortColumn && getColField(sortColumn.getColDef());
|
|
11574
|
+
var pivotColIndex = secondaryColumns && pivotedColumn && secondaryColumns.indexOf(pivotedColumn);
|
|
11575
|
+
return { colId: sortField, sort: sort, pivotColIndex: pivotColIndex };
|
|
11576
|
+
};
|
|
11577
|
+
GridQuery.prototype.selectSort = function () {
|
|
11578
|
+
return this.select(function (state) { return state.settings.sort; });
|
|
11579
|
+
};
|
|
11547
11580
|
/* @internal */
|
|
11548
11581
|
GridQuery.prototype._setApi = function (api, gridRef) {
|
|
11549
11582
|
this.api = api;
|
|
@@ -11560,6 +11593,9 @@
|
|
|
11560
11593
|
GridQuery.prototype.getFilter = function () {
|
|
11561
11594
|
return this.getValue().settings.filter;
|
|
11562
11595
|
};
|
|
11596
|
+
GridQuery.prototype.selectFilter = function () {
|
|
11597
|
+
return this.select(function (state) { return state.settings.filter; });
|
|
11598
|
+
};
|
|
11563
11599
|
GridQuery.prototype.getSearchTerm = function () {
|
|
11564
11600
|
return this.getValue().settings.searchTerm;
|
|
11565
11601
|
};
|
|
@@ -11614,6 +11650,9 @@
|
|
|
11614
11650
|
GridQuery.prototype.getAllDisplayedColumns = function () {
|
|
11615
11651
|
return this.filterCheckboxSelectionColumn(this.api.columns.getAllDisplayedColumns());
|
|
11616
11652
|
};
|
|
11653
|
+
GridQuery.prototype.getAllPivotColumns = function () {
|
|
11654
|
+
return this.getAllColumns().filter(function (column) { return column.isPivotActive(); });
|
|
11655
|
+
};
|
|
11617
11656
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11618
11657
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11619
11658
|
};
|
|
@@ -11796,8 +11835,13 @@
|
|
|
11796
11835
|
var orderedFilters = Object.keys(activeFilters);
|
|
11797
11836
|
var _loop_1 = function (filter) {
|
|
11798
11837
|
var filterPasses = true;
|
|
11799
|
-
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional;
|
|
11838
|
+
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
|
|
11839
|
+
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11800
11840
|
var rowValue = api.getValue(filter, row);
|
|
11841
|
+
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11842
|
+
if (pivotKeys && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
11843
|
+
return { value: true };
|
|
11844
|
+
}
|
|
11801
11845
|
if (conditional) {
|
|
11802
11846
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11803
11847
|
var conditionsRelation = operator === exports.OperatorTypes.AND ? 'every' : 'some';
|
|
@@ -11829,6 +11873,26 @@
|
|
|
11829
11873
|
}
|
|
11830
11874
|
return true;
|
|
11831
11875
|
}
|
|
11876
|
+
/**
|
|
11877
|
+
* Get pivot keys from a row parent
|
|
11878
|
+
*/
|
|
11879
|
+
function getRowPivotKeys(childrenMapped, keys) {
|
|
11880
|
+
if (keys === void 0) { keys = []; }
|
|
11881
|
+
var key = Object.keys(childrenMapped)[0];
|
|
11882
|
+
var parsedKey;
|
|
11883
|
+
try {
|
|
11884
|
+
parsedKey = JSON.parse(key);
|
|
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
|
+
}
|
|
11893
|
+
}
|
|
11894
|
+
return keys;
|
|
11895
|
+
}
|
|
11832
11896
|
|
|
11833
11897
|
|
|
11834
11898
|
(function (GridActionType) {
|
|
@@ -12708,7 +12772,8 @@
|
|
|
12708
12772
|
});
|
|
12709
12773
|
Object.defineProperty(DatoGridFilterComponent.prototype, "colFilter", {
|
|
12710
12774
|
get: function () {
|
|
12711
|
-
|
|
12775
|
+
var filter = this.gridQuery.getFilter()[this.colField];
|
|
12776
|
+
return filter && isArrayValuesEqual(this.pivotKeys, filter.pivotKeys) ? filter : null;
|
|
12712
12777
|
},
|
|
12713
12778
|
enumerable: true,
|
|
12714
12779
|
configurable: true
|
|
@@ -12720,12 +12785,20 @@
|
|
|
12720
12785
|
enumerable: true,
|
|
12721
12786
|
configurable: true
|
|
12722
12787
|
});
|
|
12788
|
+
Object.defineProperty(DatoGridFilterComponent.prototype, "pivotKeys", {
|
|
12789
|
+
get: function () {
|
|
12790
|
+
return this.colDef.pivotKeys || [];
|
|
12791
|
+
},
|
|
12792
|
+
enumerable: true,
|
|
12793
|
+
configurable: true
|
|
12794
|
+
});
|
|
12723
12795
|
DatoGridFilterComponent.prototype.ngOnInit = function () {
|
|
12724
12796
|
var _a;
|
|
12725
12797
|
var _this = this;
|
|
12726
12798
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12727
|
-
var _c = this.colDef,
|
|
12728
|
-
this.colField =
|
|
12799
|
+
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12800
|
+
this.colField = getColField(this.colDef);
|
|
12801
|
+
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12729
12802
|
if (filtersConfig.sections) {
|
|
12730
12803
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12731
12804
|
}
|
|
@@ -12737,7 +12810,11 @@
|
|
|
12737
12810
|
this.listSortByKey = this.filterType === exports.DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12738
12811
|
this.gridQuery = gridQuery;
|
|
12739
12812
|
this.gridService = gridService;
|
|
12740
|
-
this.hasFilter$ = this.gridQuery
|
|
12813
|
+
this.hasFilter$ = this.gridQuery
|
|
12814
|
+
.select(function (state) { return state.settings.filter[_this.colField]; })
|
|
12815
|
+
.pipe(operators.map(function (filter) {
|
|
12816
|
+
return !isNil(filter) && isArrayValuesEqual(filter.pivotKeys, _this.pivotKeys);
|
|
12817
|
+
}));
|
|
12741
12818
|
if (this.filterSections.Conditional) {
|
|
12742
12819
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12743
12820
|
if (filtersConfig.showEmptyConditions) {
|
|
@@ -12855,6 +12932,10 @@
|
|
|
12855
12932
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12856
12933
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12857
12934
|
var filter = {};
|
|
12935
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12936
|
+
if (this.pivotColumn) {
|
|
12937
|
+
filter.pivotFields = this.getPivotFields(this.pivotColumn.getParent());
|
|
12938
|
+
}
|
|
12858
12939
|
if (this.filterSections.Conditional) {
|
|
12859
12940
|
this.setConditionalFilter(filter, conditional);
|
|
12860
12941
|
}
|
|
@@ -13183,6 +13264,18 @@
|
|
|
13183
13264
|
var _this = this;
|
|
13184
13265
|
return data.filter(function (v) { return !_this.excludedValues.has(v); });
|
|
13185
13266
|
};
|
|
13267
|
+
/**
|
|
13268
|
+
* Get pivot dimensions as defined in the parent group column header class.
|
|
13269
|
+
*/
|
|
13270
|
+
DatoGridFilterComponent.prototype.getPivotFields = function (parent, fields) {
|
|
13271
|
+
if (fields === void 0) { fields = []; }
|
|
13272
|
+
var grandParent = parent.getParent();
|
|
13273
|
+
if (grandParent) {
|
|
13274
|
+
this.getPivotFields(grandParent, fields);
|
|
13275
|
+
}
|
|
13276
|
+
fields.push(parent.getOriginalColumnGroup().getColGroupDef().headerClass);
|
|
13277
|
+
return fields;
|
|
13278
|
+
};
|
|
13186
13279
|
DatoGridFilterComponent.ctorParameters = function () { return [
|
|
13187
13280
|
{ type: core.ElementRef },
|
|
13188
13281
|
{ type: PopoverRef },
|
|
@@ -13271,10 +13364,9 @@
|
|
|
13271
13364
|
var colDef = params.column.getColDef();
|
|
13272
13365
|
this.headerInfo = colDef.info;
|
|
13273
13366
|
this.headerName = colDef.headerName;
|
|
13274
|
-
this.aggColumn = this.column.getColId().indexOf('ag-Grid-AutoColumn') !== -1;
|
|
13275
13367
|
this.showFilter = colDef.filter !== exports.DatoGridFilterTypes.None;
|
|
13276
13368
|
this.showMoreMenu = isNil(colDef.moreMenuActions) || colDef.moreMenuActions.length > 0;
|
|
13277
|
-
this.field =
|
|
13369
|
+
this.field = getColField(colDef);
|
|
13278
13370
|
this.context = {
|
|
13279
13371
|
api: {
|
|
13280
13372
|
grid: params.api,
|
|
@@ -13286,7 +13378,10 @@
|
|
|
13286
13378
|
this.customTemplates = gridService.getCustomHeader(this.field);
|
|
13287
13379
|
this.filterActive$ = gridQuery
|
|
13288
13380
|
.select(function (state) { return state.settings.filter[_this.field]; })
|
|
13289
|
-
.pipe(operators.map(function (filter) {
|
|
13381
|
+
.pipe(operators.map(function (filter) {
|
|
13382
|
+
var isPivotColumnMatchFilter = filter && isArrayValuesEqual(filter.pivotKeys, colDef.pivotKeys);
|
|
13383
|
+
return size(filter) > 0 && isPivotColumnMatchFilter;
|
|
13384
|
+
}));
|
|
13290
13385
|
if (this.params.enableSorting) {
|
|
13291
13386
|
rxjs.fromEvent(this.host.nativeElement, 'click')
|
|
13292
13387
|
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
@@ -13348,13 +13443,6 @@
|
|
|
13348
13443
|
});
|
|
13349
13444
|
};
|
|
13350
13445
|
DatoGridColumnHeaderComponent.prototype.ngOnDestroy = function () { };
|
|
13351
|
-
Object.defineProperty(DatoGridColumnHeaderComponent.prototype, "groupField", {
|
|
13352
|
-
get: function () {
|
|
13353
|
-
return this.column.getColDef().showRowGroup;
|
|
13354
|
-
},
|
|
13355
|
-
enumerable: true,
|
|
13356
|
-
configurable: true
|
|
13357
|
-
});
|
|
13358
13446
|
DatoGridColumnHeaderComponent.ctorParameters = function () { return [
|
|
13359
13447
|
{ type: core.ViewContainerRef },
|
|
13360
13448
|
{ type: CustomHeaderControllerService },
|
|
@@ -13853,8 +13941,8 @@
|
|
|
13853
13941
|
this.svgRegistry = svgRegistry;
|
|
13854
13942
|
this.storageAPI = storageAPI;
|
|
13855
13943
|
this.logger = logger;
|
|
13856
|
-
this.pageNumberToReturnAfterRefresh = -1;
|
|
13857
13944
|
this.treeConfig = defaultGridTreeLabel;
|
|
13945
|
+
this.pageNumberToReturnAfterRefresh = -1;
|
|
13858
13946
|
this.CHECKBOX_SELECTION_COL_ID = 'grid-checkbox-selection';
|
|
13859
13947
|
}
|
|
13860
13948
|
Object.defineProperty(GridService.prototype, "treeData", {
|
|
@@ -13920,6 +14008,9 @@
|
|
|
13920
14008
|
var treeDate = convertToTreeData(data, _this.treeConfig);
|
|
13921
14009
|
_this.api.grid.setRowData(treeDate);
|
|
13922
14010
|
}
|
|
14011
|
+
else if (_this.isPivotMode) {
|
|
14012
|
+
_this.setPivotModeRows(data);
|
|
14013
|
+
}
|
|
13923
14014
|
else {
|
|
13924
14015
|
_this.api.grid.setRowData(data);
|
|
13925
14016
|
}
|
|
@@ -14040,6 +14131,12 @@
|
|
|
14040
14131
|
params.gridOptions.saveSettings = saveSettings !== false && !isNil(gridName);
|
|
14041
14132
|
/** Server Side Pagination for select all option */
|
|
14042
14133
|
this.initOnRowSelectedForServerSidePagination(params);
|
|
14134
|
+
/** Add pivot specific required settings */
|
|
14135
|
+
if (params.gridOptions.pivotMode) {
|
|
14136
|
+
this.initPivotSecondaryColsProcess(params);
|
|
14137
|
+
params.gridOptions.enableV2_1 = true;
|
|
14138
|
+
params.gridOptions.saveSettings = false;
|
|
14139
|
+
}
|
|
14043
14140
|
return params.gridOptions;
|
|
14044
14141
|
};
|
|
14045
14142
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
@@ -14231,10 +14328,11 @@
|
|
|
14231
14328
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14232
14329
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14233
14330
|
});
|
|
14331
|
+
var colField = getColField(column.getColDef());
|
|
14234
14332
|
this.store.update(function (state) {
|
|
14235
14333
|
var _a;
|
|
14236
14334
|
return {
|
|
14237
|
-
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[
|
|
14335
|
+
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14238
14336
|
};
|
|
14239
14337
|
});
|
|
14240
14338
|
this.notifyFilterUpdate();
|
|
@@ -14744,6 +14842,68 @@
|
|
|
14744
14842
|
this.setServerSidePagination({ selectAllRowsEnabled: false, excludedFromSelectAll: [] });
|
|
14745
14843
|
}
|
|
14746
14844
|
};
|
|
14845
|
+
/**
|
|
14846
|
+
* When pivoting,
|
|
14847
|
+
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14848
|
+
* @private
|
|
14849
|
+
*/
|
|
14850
|
+
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14851
|
+
var gridOptions = _a.gridOptions;
|
|
14852
|
+
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14853
|
+
var api = colDef.headerComponentParams.gridQuery.api;
|
|
14854
|
+
if (api) {
|
|
14855
|
+
var valueColumns = colDef.headerComponentParams.gridQuery.api.columns.getValueColumns();
|
|
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
|
+
}
|
|
14868
|
+
}
|
|
14869
|
+
if (colDef.pivotKeys) {
|
|
14870
|
+
colDef.pivotKeys = colDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14871
|
+
}
|
|
14872
|
+
};
|
|
14873
|
+
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
14874
|
+
if (colGroupDef.headerName) {
|
|
14875
|
+
var _a = JSON.parse(colGroupDef.headerName), field = _a.field, value = _a.value;
|
|
14876
|
+
colGroupDef.headerClass = field;
|
|
14877
|
+
colGroupDef.headerName = value;
|
|
14878
|
+
}
|
|
14879
|
+
if (colGroupDef.pivotKeys) {
|
|
14880
|
+
colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14881
|
+
}
|
|
14882
|
+
};
|
|
14883
|
+
};
|
|
14884
|
+
GridService.prototype.setPivotModeRows = function (data) {
|
|
14885
|
+
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14886
|
+
var convertedData = data.map(function (currentValue, index) {
|
|
14887
|
+
var e_4, _a;
|
|
14888
|
+
var mappedValues = __assign({}, currentValue);
|
|
14889
|
+
try {
|
|
14890
|
+
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
14891
|
+
var col = pivotColumns_1_1.value;
|
|
14892
|
+
var field = col.getColDef().field;
|
|
14893
|
+
mappedValues[field] = JSON.stringify({ field: field, value: currentValue[field] });
|
|
14894
|
+
}
|
|
14895
|
+
}
|
|
14896
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14897
|
+
finally {
|
|
14898
|
+
try {
|
|
14899
|
+
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14900
|
+
}
|
|
14901
|
+
finally { if (e_4) throw e_4.error; }
|
|
14902
|
+
}
|
|
14903
|
+
return mappedValues;
|
|
14904
|
+
});
|
|
14905
|
+
this.api.grid.setRowData(convertedData);
|
|
14906
|
+
};
|
|
14747
14907
|
GridService.ctorParameters = function () { return [
|
|
14748
14908
|
{ type: GridStore },
|
|
14749
14909
|
{ type: GridQuery },
|
|
@@ -15178,6 +15338,7 @@
|
|
|
15178
15338
|
set: function (gridOptions) {
|
|
15179
15339
|
this._gridOptions = gridOptions;
|
|
15180
15340
|
this.gridService.treeData = gridOptions.treeData;
|
|
15341
|
+
this.gridService.isPivotMode = gridOptions.pivotMode;
|
|
15181
15342
|
if (this.agGridEl) {
|
|
15182
15343
|
if (gridOptions.treeData) {
|
|
15183
15344
|
!this.agGridEl.classList.contains(this.treeGridClass) && this.agGridEl.classList.add(this.treeGridClass);
|
|
@@ -15253,6 +15414,15 @@
|
|
|
15253
15414
|
var defaults = __assign(__assign(__assign({}, defaultGridOptions), (this.gridOptions.treeData ? defaultTreeOptions : {})), { icons: this.getGridIcons() });
|
|
15254
15415
|
return deepmerge(defaults, normalized);
|
|
15255
15416
|
};
|
|
15417
|
+
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15418
|
+
this.gridService.setRows(data);
|
|
15419
|
+
};
|
|
15420
|
+
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15421
|
+
return this.gridQuery.selectFilter();
|
|
15422
|
+
};
|
|
15423
|
+
DatoGridControllerComponent.prototype.onSortChanged = function () {
|
|
15424
|
+
return this.gridQuery.selectSort();
|
|
15425
|
+
};
|
|
15256
15426
|
DatoGridControllerComponent.prototype.getGridIcons = function () {
|
|
15257
15427
|
var moveColumnIcon = "<span class=\"da-grid-icon pointer d-flex column-move\">" + this.iconRegistry.getSvg('move-column') + "</span>";
|
|
15258
15428
|
return {
|
|
@@ -15662,6 +15832,13 @@
|
|
|
15662
15832
|
enumerable: true,
|
|
15663
15833
|
configurable: true
|
|
15664
15834
|
});
|
|
15835
|
+
Object.defineProperty(DatoGridV2Component.prototype, "isPivotMode", {
|
|
15836
|
+
get: function () {
|
|
15837
|
+
return this.gridOptions ? this.gridOptions.pivotMode : false;
|
|
15838
|
+
},
|
|
15839
|
+
enumerable: true,
|
|
15840
|
+
configurable: true
|
|
15841
|
+
});
|
|
15665
15842
|
DatoGridV2Component.ctorParameters = function () { return [
|
|
15666
15843
|
{ type: DatoGridControllerComponent },
|
|
15667
15844
|
{ type: core.ElementRef }
|
|
@@ -15674,7 +15851,7 @@
|
|
|
15674
15851
|
DatoGridV2Component = __decorate([
|
|
15675
15852
|
core.Component({
|
|
15676
15853
|
selector: 'dato-grid-v2',
|
|
15677
|
-
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",
|
|
15854
|
+
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",
|
|
15678
15855
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
15679
15856
|
encapsulation: core.ViewEncapsulation.None,
|
|
15680
15857
|
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}"]
|
|
@@ -15975,6 +16152,9 @@
|
|
|
15975
16152
|
showFirstEllipsis: false,
|
|
15976
16153
|
showLastPage: false
|
|
15977
16154
|
};
|
|
16155
|
+
// Show fit cell content and collapse/expand row groups controls
|
|
16156
|
+
this.showBottomControls = false;
|
|
16157
|
+
this.isExpanded = true;
|
|
15978
16158
|
this.isServerSidePagination = false;
|
|
15979
16159
|
// The number of pages displayed in the navigation panel for each view as defined by product.
|
|
15980
16160
|
this.MINI_DISPLAY_LENGTH = 2;
|
|
@@ -16022,7 +16202,10 @@
|
|
|
16022
16202
|
_this.initPagination();
|
|
16023
16203
|
});
|
|
16024
16204
|
this.gridQuery.gridReady$
|
|
16025
|
-
.pipe(operators.tap(function () {
|
|
16205
|
+
.pipe(operators.tap(function () {
|
|
16206
|
+
_this.gridApi = _this.gridQuery.api.grid;
|
|
16207
|
+
_this.showBottomControls = _this.gridQuery.getGridOptions().showBottomControls;
|
|
16208
|
+
}), operators.switchMap(function () {
|
|
16026
16209
|
_this.isServerSidePagination = _this.gridQuery.isServerSide;
|
|
16027
16210
|
return _this.isServerSidePagination ? _this.gridQuery.serverDataLoaded$ : _this.gridQuery.rowDataChanged$;
|
|
16028
16211
|
}), operators.throttleTime(100), tapOnce(function () { return _this.initPagination(); }), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
@@ -16144,6 +16327,13 @@
|
|
|
16144
16327
|
DatoGridPaginationV2Component.prototype.trackByPage = function (index, page) {
|
|
16145
16328
|
return page;
|
|
16146
16329
|
};
|
|
16330
|
+
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16331
|
+
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16332
|
+
this.isExpanded = !this.isExpanded;
|
|
16333
|
+
};
|
|
16334
|
+
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16335
|
+
this.gridService.fitGrid(type);
|
|
16336
|
+
};
|
|
16147
16337
|
DatoGridPaginationV2Component.prototype.ngOnDestroy = function () { };
|
|
16148
16338
|
/**
|
|
16149
16339
|
* Sets the rows display string
|
|
@@ -16232,7 +16422,7 @@
|
|
|
16232
16422
|
core.Component({
|
|
16233
16423
|
selector: 'dato-grid-pagination-v2',
|
|
16234
16424
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
16235
|
-
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",
|
|
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-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",
|
|
16236
16426
|
providers: [common.DecimalPipe],
|
|
16237
16427
|
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}"]
|
|
16238
16428
|
}),
|
|
@@ -24422,7 +24612,7 @@
|
|
|
24422
24612
|
];
|
|
24423
24613
|
}
|
|
24424
24614
|
else if (this.parts &&
|
|
24425
|
-
this.parts.every(function (part) { return
|
|
24615
|
+
this.parts.every(function (part) { return part.weight >= 0; }) &&
|
|
24426
24616
|
!this.parts.every(function (part) { return !!part.percent; })) {
|
|
24427
24617
|
this.initPartsPercent();
|
|
24428
24618
|
}
|
|
@@ -25387,6 +25577,7 @@
|
|
|
25387
25577
|
exports.inView = inView;
|
|
25388
25578
|
exports.intersection = intersection;
|
|
25389
25579
|
exports.invert = invert;
|
|
25580
|
+
exports.isArrayValuesEqual = isArrayValuesEqual;
|
|
25390
25581
|
exports.isArrowUpDown = isArrowUpDown;
|
|
25391
25582
|
exports.isBoolean = isBoolean;
|
|
25392
25583
|
exports.isEmpty = isEmpty;
|