@datorama/core 21.3.1-rc.5 → 21.4.0-rc.3
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 +223 -22
- 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 +34 -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/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 +34 -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/utils/array.js +12 -1
- package/fesm2015/datorama-core.js +193 -19
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +223 -23
- 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,29 @@
|
|
|
11544
11564
|
}
|
|
11545
11565
|
return settings;
|
|
11546
11566
|
};
|
|
11567
|
+
GridQuery.prototype.getSort = function () {
|
|
11568
|
+
if (this.gridRef.gridOptions.pivotMode) {
|
|
11569
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId_1 = _a.colId;
|
|
11570
|
+
var column = this.api.columns.getColumn(colId_1);
|
|
11571
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11572
|
+
var pivotedColumn_1 = secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId_1; });
|
|
11573
|
+
if (pivotedColumn_1) {
|
|
11574
|
+
var uniquePivotParents = uniq(secondaryColumns.map(function (column) { return column.getParent(); }));
|
|
11575
|
+
var secondaryColumn = secondaryColumns.find(function (col) { return col.getColId() === pivotedColumn_1.getColId(); });
|
|
11576
|
+
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11577
|
+
return { colId: getColField(pivotedColumn_1.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11578
|
+
}
|
|
11579
|
+
else if (column) {
|
|
11580
|
+
return { colId: getColField(column.getColDef()), sort: sort };
|
|
11581
|
+
}
|
|
11582
|
+
}
|
|
11583
|
+
else {
|
|
11584
|
+
return this.api.grid.getSortModel().pop();
|
|
11585
|
+
}
|
|
11586
|
+
};
|
|
11587
|
+
GridQuery.prototype.selectSort = function () {
|
|
11588
|
+
return this.select(function (state) { return state.settings.sort; });
|
|
11589
|
+
};
|
|
11547
11590
|
/* @internal */
|
|
11548
11591
|
GridQuery.prototype._setApi = function (api, gridRef) {
|
|
11549
11592
|
this.api = api;
|
|
@@ -11560,6 +11603,9 @@
|
|
|
11560
11603
|
GridQuery.prototype.getFilter = function () {
|
|
11561
11604
|
return this.getValue().settings.filter;
|
|
11562
11605
|
};
|
|
11606
|
+
GridQuery.prototype.selectFilter = function () {
|
|
11607
|
+
return this.select(function (state) { return state.settings.filter; });
|
|
11608
|
+
};
|
|
11563
11609
|
GridQuery.prototype.getSearchTerm = function () {
|
|
11564
11610
|
return this.getValue().settings.searchTerm;
|
|
11565
11611
|
};
|
|
@@ -11614,6 +11660,9 @@
|
|
|
11614
11660
|
GridQuery.prototype.getAllDisplayedColumns = function () {
|
|
11615
11661
|
return this.filterCheckboxSelectionColumn(this.api.columns.getAllDisplayedColumns());
|
|
11616
11662
|
};
|
|
11663
|
+
GridQuery.prototype.getAllPivotColumns = function () {
|
|
11664
|
+
return this.getAllColumns().filter(function (column) { return column.isPivotActive(); });
|
|
11665
|
+
};
|
|
11617
11666
|
GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
|
|
11618
11667
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11619
11668
|
};
|
|
@@ -11796,8 +11845,13 @@
|
|
|
11796
11845
|
var orderedFilters = Object.keys(activeFilters);
|
|
11797
11846
|
var _loop_1 = function (filter) {
|
|
11798
11847
|
var filterPasses = true;
|
|
11799
|
-
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional;
|
|
11848
|
+
var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
|
|
11849
|
+
var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
|
|
11800
11850
|
var rowValue = api.getValue(filter, row);
|
|
11851
|
+
/** If value is under a pivoted column but doesn't match the filter pivot */
|
|
11852
|
+
if (pivotKeys && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
|
|
11853
|
+
return { value: true };
|
|
11854
|
+
}
|
|
11801
11855
|
if (conditional) {
|
|
11802
11856
|
var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
|
|
11803
11857
|
var conditionsRelation = operator === exports.OperatorTypes.AND ? 'every' : 'some';
|
|
@@ -11829,6 +11883,26 @@
|
|
|
11829
11883
|
}
|
|
11830
11884
|
return true;
|
|
11831
11885
|
}
|
|
11886
|
+
/**
|
|
11887
|
+
* Get pivot keys from a row parent
|
|
11888
|
+
*/
|
|
11889
|
+
function getRowPivotKeys(childrenMapped, keys) {
|
|
11890
|
+
if (keys === void 0) { keys = []; }
|
|
11891
|
+
var key = Object.keys(childrenMapped)[0];
|
|
11892
|
+
var parsedKey;
|
|
11893
|
+
try {
|
|
11894
|
+
parsedKey = JSON.parse(key);
|
|
11895
|
+
}
|
|
11896
|
+
catch (e) {
|
|
11897
|
+
console.error("Can't parse " + key + " from JSON");
|
|
11898
|
+
}
|
|
11899
|
+
finally {
|
|
11900
|
+
if (parsedKey) {
|
|
11901
|
+
keys = getRowPivotKeys(childrenMapped[key], __spread(keys, [parsedKey.value]));
|
|
11902
|
+
}
|
|
11903
|
+
}
|
|
11904
|
+
return keys;
|
|
11905
|
+
}
|
|
11832
11906
|
|
|
11833
11907
|
|
|
11834
11908
|
(function (GridActionType) {
|
|
@@ -12708,7 +12782,8 @@
|
|
|
12708
12782
|
});
|
|
12709
12783
|
Object.defineProperty(DatoGridFilterComponent.prototype, "colFilter", {
|
|
12710
12784
|
get: function () {
|
|
12711
|
-
|
|
12785
|
+
var filter = this.gridQuery.getFilter()[this.colField];
|
|
12786
|
+
return filter && isArrayValuesEqual(this.pivotKeys, filter.pivotKeys) ? filter : null;
|
|
12712
12787
|
},
|
|
12713
12788
|
enumerable: true,
|
|
12714
12789
|
configurable: true
|
|
@@ -12720,12 +12795,20 @@
|
|
|
12720
12795
|
enumerable: true,
|
|
12721
12796
|
configurable: true
|
|
12722
12797
|
});
|
|
12798
|
+
Object.defineProperty(DatoGridFilterComponent.prototype, "pivotKeys", {
|
|
12799
|
+
get: function () {
|
|
12800
|
+
return this.colDef.pivotKeys || [];
|
|
12801
|
+
},
|
|
12802
|
+
enumerable: true,
|
|
12803
|
+
configurable: true
|
|
12804
|
+
});
|
|
12723
12805
|
DatoGridFilterComponent.prototype.ngOnInit = function () {
|
|
12724
12806
|
var _a;
|
|
12725
12807
|
var _this = this;
|
|
12726
12808
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12727
|
-
var _c = this.colDef,
|
|
12728
|
-
this.colField =
|
|
12809
|
+
var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12810
|
+
this.colField = getColField(this.colDef);
|
|
12811
|
+
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12729
12812
|
if (filtersConfig.sections) {
|
|
12730
12813
|
this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
|
|
12731
12814
|
}
|
|
@@ -12737,7 +12820,11 @@
|
|
|
12737
12820
|
this.listSortByKey = this.filterType === exports.DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
|
|
12738
12821
|
this.gridQuery = gridQuery;
|
|
12739
12822
|
this.gridService = gridService;
|
|
12740
|
-
this.hasFilter$ = this.gridQuery
|
|
12823
|
+
this.hasFilter$ = this.gridQuery
|
|
12824
|
+
.select(function (state) { return state.settings.filter[_this.colField]; })
|
|
12825
|
+
.pipe(operators.map(function (filter) {
|
|
12826
|
+
return !isNil(filter) && isArrayValuesEqual(filter.pivotKeys, _this.pivotKeys);
|
|
12827
|
+
}));
|
|
12741
12828
|
if (this.filterSections.Conditional) {
|
|
12742
12829
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12743
12830
|
if (filtersConfig.showEmptyConditions) {
|
|
@@ -12855,6 +12942,10 @@
|
|
|
12855
12942
|
DatoGridFilterComponent.prototype.buildFilter = function () {
|
|
12856
12943
|
var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
|
|
12857
12944
|
var filter = {};
|
|
12945
|
+
filter.pivotKeys = this.pivotKeys;
|
|
12946
|
+
if (this.pivotColumn) {
|
|
12947
|
+
filter.pivotFields = this.getPivotFields(this.pivotColumn.getParent());
|
|
12948
|
+
}
|
|
12858
12949
|
if (this.filterSections.Conditional) {
|
|
12859
12950
|
this.setConditionalFilter(filter, conditional);
|
|
12860
12951
|
}
|
|
@@ -13183,6 +13274,18 @@
|
|
|
13183
13274
|
var _this = this;
|
|
13184
13275
|
return data.filter(function (v) { return !_this.excludedValues.has(v); });
|
|
13185
13276
|
};
|
|
13277
|
+
/**
|
|
13278
|
+
* Get pivot dimensions as defined in the parent group column header class.
|
|
13279
|
+
*/
|
|
13280
|
+
DatoGridFilterComponent.prototype.getPivotFields = function (parent, fields) {
|
|
13281
|
+
if (fields === void 0) { fields = []; }
|
|
13282
|
+
var grandParent = parent.getParent();
|
|
13283
|
+
if (grandParent) {
|
|
13284
|
+
this.getPivotFields(grandParent, fields);
|
|
13285
|
+
}
|
|
13286
|
+
fields.push(parent.getOriginalColumnGroup().getColGroupDef().headerClass);
|
|
13287
|
+
return fields;
|
|
13288
|
+
};
|
|
13186
13289
|
DatoGridFilterComponent.ctorParameters = function () { return [
|
|
13187
13290
|
{ type: core.ElementRef },
|
|
13188
13291
|
{ type: PopoverRef },
|
|
@@ -13271,10 +13374,9 @@
|
|
|
13271
13374
|
var colDef = params.column.getColDef();
|
|
13272
13375
|
this.headerInfo = colDef.info;
|
|
13273
13376
|
this.headerName = colDef.headerName;
|
|
13274
|
-
this.aggColumn = this.column.getColId().indexOf('ag-Grid-AutoColumn') !== -1;
|
|
13275
13377
|
this.showFilter = colDef.filter !== exports.DatoGridFilterTypes.None;
|
|
13276
13378
|
this.showMoreMenu = isNil(colDef.moreMenuActions) || colDef.moreMenuActions.length > 0;
|
|
13277
|
-
this.field =
|
|
13379
|
+
this.field = getColField(colDef);
|
|
13278
13380
|
this.context = {
|
|
13279
13381
|
api: {
|
|
13280
13382
|
grid: params.api,
|
|
@@ -13286,7 +13388,10 @@
|
|
|
13286
13388
|
this.customTemplates = gridService.getCustomHeader(this.field);
|
|
13287
13389
|
this.filterActive$ = gridQuery
|
|
13288
13390
|
.select(function (state) { return state.settings.filter[_this.field]; })
|
|
13289
|
-
.pipe(operators.map(function (filter) {
|
|
13391
|
+
.pipe(operators.map(function (filter) {
|
|
13392
|
+
var isPivotColumnMatchFilter = filter && isArrayValuesEqual(filter.pivotKeys, colDef.pivotKeys);
|
|
13393
|
+
return size(filter) > 0 && isPivotColumnMatchFilter;
|
|
13394
|
+
}));
|
|
13290
13395
|
if (this.params.enableSorting) {
|
|
13291
13396
|
rxjs.fromEvent(this.host.nativeElement, 'click')
|
|
13292
13397
|
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
@@ -13348,13 +13453,6 @@
|
|
|
13348
13453
|
});
|
|
13349
13454
|
};
|
|
13350
13455
|
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
13456
|
DatoGridColumnHeaderComponent.ctorParameters = function () { return [
|
|
13359
13457
|
{ type: core.ViewContainerRef },
|
|
13360
13458
|
{ type: CustomHeaderControllerService },
|
|
@@ -13853,8 +13951,8 @@
|
|
|
13853
13951
|
this.svgRegistry = svgRegistry;
|
|
13854
13952
|
this.storageAPI = storageAPI;
|
|
13855
13953
|
this.logger = logger;
|
|
13856
|
-
this.pageNumberToReturnAfterRefresh = -1;
|
|
13857
13954
|
this.treeConfig = defaultGridTreeLabel;
|
|
13955
|
+
this.pageNumberToReturnAfterRefresh = -1;
|
|
13858
13956
|
this.CHECKBOX_SELECTION_COL_ID = 'grid-checkbox-selection';
|
|
13859
13957
|
}
|
|
13860
13958
|
Object.defineProperty(GridService.prototype, "treeData", {
|
|
@@ -13920,6 +14018,9 @@
|
|
|
13920
14018
|
var treeDate = convertToTreeData(data, _this.treeConfig);
|
|
13921
14019
|
_this.api.grid.setRowData(treeDate);
|
|
13922
14020
|
}
|
|
14021
|
+
else if (_this.isPivotMode) {
|
|
14022
|
+
_this.setPivotModeRows(data);
|
|
14023
|
+
}
|
|
13923
14024
|
else {
|
|
13924
14025
|
_this.api.grid.setRowData(data);
|
|
13925
14026
|
}
|
|
@@ -14040,6 +14141,12 @@
|
|
|
14040
14141
|
params.gridOptions.saveSettings = saveSettings !== false && !isNil(gridName);
|
|
14041
14142
|
/** Server Side Pagination for select all option */
|
|
14042
14143
|
this.initOnRowSelectedForServerSidePagination(params);
|
|
14144
|
+
/** Add pivot specific required settings */
|
|
14145
|
+
if (params.gridOptions.pivotMode) {
|
|
14146
|
+
this.initPivotSecondaryColsProcess(params);
|
|
14147
|
+
params.gridOptions.enableV2_1 = true;
|
|
14148
|
+
params.gridOptions.saveSettings = false;
|
|
14149
|
+
}
|
|
14043
14150
|
return params.gridOptions;
|
|
14044
14151
|
};
|
|
14045
14152
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
@@ -14231,10 +14338,11 @@
|
|
|
14231
14338
|
numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
|
|
14232
14339
|
byValue: !!filter.byValue ? 'Yes' : 'No'
|
|
14233
14340
|
});
|
|
14341
|
+
var colField = getColField(column.getColDef());
|
|
14234
14342
|
this.store.update(function (state) {
|
|
14235
14343
|
var _a;
|
|
14236
14344
|
return {
|
|
14237
|
-
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[
|
|
14345
|
+
settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
|
|
14238
14346
|
};
|
|
14239
14347
|
});
|
|
14240
14348
|
this.notifyFilterUpdate();
|
|
@@ -14744,6 +14852,68 @@
|
|
|
14744
14852
|
this.setServerSidePagination({ selectAllRowsEnabled: false, excludedFromSelectAll: [] });
|
|
14745
14853
|
}
|
|
14746
14854
|
};
|
|
14855
|
+
/**
|
|
14856
|
+
* When pivoting,
|
|
14857
|
+
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
14858
|
+
* @private
|
|
14859
|
+
*/
|
|
14860
|
+
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
14861
|
+
var gridOptions = _a.gridOptions;
|
|
14862
|
+
gridOptions.processSecondaryColDef = function (colDef) {
|
|
14863
|
+
var api = colDef.headerComponentParams.gridQuery.api;
|
|
14864
|
+
if (api) {
|
|
14865
|
+
var valueColumns = colDef.headerComponentParams.gridQuery.api.columns.getValueColumns();
|
|
14866
|
+
var originalColDef = valueColumns
|
|
14867
|
+
.map(function (_a) {
|
|
14868
|
+
var userProvidedColDef = _a.userProvidedColDef;
|
|
14869
|
+
return userProvidedColDef;
|
|
14870
|
+
})
|
|
14871
|
+
.find(function (_a) {
|
|
14872
|
+
var colId = _a.colId;
|
|
14873
|
+
return colId === colDef.pivotValueColumn.getColId();
|
|
14874
|
+
});
|
|
14875
|
+
if (originalColDef) {
|
|
14876
|
+
colDef.filter = originalColDef.filter;
|
|
14877
|
+
}
|
|
14878
|
+
}
|
|
14879
|
+
if (colDef.pivotKeys) {
|
|
14880
|
+
colDef.pivotKeys = colDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14881
|
+
}
|
|
14882
|
+
};
|
|
14883
|
+
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
14884
|
+
if (colGroupDef.headerName) {
|
|
14885
|
+
var _a = JSON.parse(colGroupDef.headerName), field = _a.field, value = _a.value;
|
|
14886
|
+
colGroupDef.headerClass = field;
|
|
14887
|
+
colGroupDef.headerName = value;
|
|
14888
|
+
}
|
|
14889
|
+
if (colGroupDef.pivotKeys) {
|
|
14890
|
+
colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(function (key) { return JSON.parse(key).value; });
|
|
14891
|
+
}
|
|
14892
|
+
};
|
|
14893
|
+
};
|
|
14894
|
+
GridService.prototype.setPivotModeRows = function (data) {
|
|
14895
|
+
var pivotColumns = this.gridQuery.getAllPivotColumns();
|
|
14896
|
+
var convertedData = data.map(function (currentValue, index) {
|
|
14897
|
+
var e_4, _a;
|
|
14898
|
+
var mappedValues = __assign({}, currentValue);
|
|
14899
|
+
try {
|
|
14900
|
+
for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
|
|
14901
|
+
var col = pivotColumns_1_1.value;
|
|
14902
|
+
var field = col.getColDef().field;
|
|
14903
|
+
mappedValues[field] = JSON.stringify({ field: field, value: currentValue[field] });
|
|
14904
|
+
}
|
|
14905
|
+
}
|
|
14906
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
14907
|
+
finally {
|
|
14908
|
+
try {
|
|
14909
|
+
if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
|
|
14910
|
+
}
|
|
14911
|
+
finally { if (e_4) throw e_4.error; }
|
|
14912
|
+
}
|
|
14913
|
+
return mappedValues;
|
|
14914
|
+
});
|
|
14915
|
+
this.api.grid.setRowData(convertedData);
|
|
14916
|
+
};
|
|
14747
14917
|
GridService.ctorParameters = function () { return [
|
|
14748
14918
|
{ type: GridStore },
|
|
14749
14919
|
{ type: GridQuery },
|
|
@@ -15178,6 +15348,7 @@
|
|
|
15178
15348
|
set: function (gridOptions) {
|
|
15179
15349
|
this._gridOptions = gridOptions;
|
|
15180
15350
|
this.gridService.treeData = gridOptions.treeData;
|
|
15351
|
+
this.gridService.isPivotMode = gridOptions.pivotMode;
|
|
15181
15352
|
if (this.agGridEl) {
|
|
15182
15353
|
if (gridOptions.treeData) {
|
|
15183
15354
|
!this.agGridEl.classList.contains(this.treeGridClass) && this.agGridEl.classList.add(this.treeGridClass);
|
|
@@ -15253,6 +15424,15 @@
|
|
|
15253
15424
|
var defaults = __assign(__assign(__assign({}, defaultGridOptions), (this.gridOptions.treeData ? defaultTreeOptions : {})), { icons: this.getGridIcons() });
|
|
15254
15425
|
return deepmerge(defaults, normalized);
|
|
15255
15426
|
};
|
|
15427
|
+
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
15428
|
+
this.gridService.setRows(data);
|
|
15429
|
+
};
|
|
15430
|
+
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15431
|
+
return this.gridQuery.selectFilter();
|
|
15432
|
+
};
|
|
15433
|
+
DatoGridControllerComponent.prototype.onSortChanged = function () {
|
|
15434
|
+
return this.gridQuery.selectSort();
|
|
15435
|
+
};
|
|
15256
15436
|
DatoGridControllerComponent.prototype.getGridIcons = function () {
|
|
15257
15437
|
var moveColumnIcon = "<span class=\"da-grid-icon pointer d-flex column-move\">" + this.iconRegistry.getSvg('move-column') + "</span>";
|
|
15258
15438
|
return {
|
|
@@ -15662,6 +15842,13 @@
|
|
|
15662
15842
|
enumerable: true,
|
|
15663
15843
|
configurable: true
|
|
15664
15844
|
});
|
|
15845
|
+
Object.defineProperty(DatoGridV2Component.prototype, "isPivotMode", {
|
|
15846
|
+
get: function () {
|
|
15847
|
+
return this.gridOptions ? this.gridOptions.pivotMode : false;
|
|
15848
|
+
},
|
|
15849
|
+
enumerable: true,
|
|
15850
|
+
configurable: true
|
|
15851
|
+
});
|
|
15665
15852
|
DatoGridV2Component.ctorParameters = function () { return [
|
|
15666
15853
|
{ type: DatoGridControllerComponent },
|
|
15667
15854
|
{ type: core.ElementRef }
|
|
@@ -15674,7 +15861,7 @@
|
|
|
15674
15861
|
DatoGridV2Component = __decorate([
|
|
15675
15862
|
core.Component({
|
|
15676
15863
|
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",
|
|
15864
|
+
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
15865
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
15679
15866
|
encapsulation: core.ViewEncapsulation.None,
|
|
15680
15867
|
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 +16162,9 @@
|
|
|
15975
16162
|
showFirstEllipsis: false,
|
|
15976
16163
|
showLastPage: false
|
|
15977
16164
|
};
|
|
16165
|
+
// Show fit cell content and collapse/expand row groups controls
|
|
16166
|
+
this.showBottomControls = false;
|
|
16167
|
+
this.isExpanded = true;
|
|
15978
16168
|
this.isServerSidePagination = false;
|
|
15979
16169
|
// The number of pages displayed in the navigation panel for each view as defined by product.
|
|
15980
16170
|
this.MINI_DISPLAY_LENGTH = 2;
|
|
@@ -16022,7 +16212,10 @@
|
|
|
16022
16212
|
_this.initPagination();
|
|
16023
16213
|
});
|
|
16024
16214
|
this.gridQuery.gridReady$
|
|
16025
|
-
.pipe(operators.tap(function () {
|
|
16215
|
+
.pipe(operators.tap(function () {
|
|
16216
|
+
_this.gridApi = _this.gridQuery.api.grid;
|
|
16217
|
+
_this.showBottomControls = _this.gridQuery.getGridOptions().showBottomControls;
|
|
16218
|
+
}), operators.switchMap(function () {
|
|
16026
16219
|
_this.isServerSidePagination = _this.gridQuery.isServerSide;
|
|
16027
16220
|
return _this.isServerSidePagination ? _this.gridQuery.serverDataLoaded$ : _this.gridQuery.rowDataChanged$;
|
|
16028
16221
|
}), operators.throttleTime(100), tapOnce(function () { return _this.initPagination(); }), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
@@ -16144,6 +16337,13 @@
|
|
|
16144
16337
|
DatoGridPaginationV2Component.prototype.trackByPage = function (index, page) {
|
|
16145
16338
|
return page;
|
|
16146
16339
|
};
|
|
16340
|
+
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16341
|
+
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16342
|
+
this.isExpanded = !this.isExpanded;
|
|
16343
|
+
};
|
|
16344
|
+
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16345
|
+
this.gridService.fitGrid(type);
|
|
16346
|
+
};
|
|
16147
16347
|
DatoGridPaginationV2Component.prototype.ngOnDestroy = function () { };
|
|
16148
16348
|
/**
|
|
16149
16349
|
* Sets the rows display string
|
|
@@ -16232,7 +16432,7 @@
|
|
|
16232
16432
|
core.Component({
|
|
16233
16433
|
selector: 'dato-grid-pagination-v2',
|
|
16234
16434
|
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",
|
|
16435
|
+
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
16436
|
providers: [common.DecimalPipe],
|
|
16237
16437
|
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
16438
|
}),
|
|
@@ -25387,6 +25587,7 @@
|
|
|
25387
25587
|
exports.inView = inView;
|
|
25388
25588
|
exports.intersection = intersection;
|
|
25389
25589
|
exports.invert = invert;
|
|
25590
|
+
exports.isArrayValuesEqual = isArrayValuesEqual;
|
|
25390
25591
|
exports.isArrowUpDown = isArrowUpDown;
|
|
25391
25592
|
exports.isBoolean = isBoolean;
|
|
25392
25593
|
exports.isEmpty = isEmpty;
|