@datorama/core 22.12.5-beta.2 → 22.12.6
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/bundles/datorama-core.umd.js +10 -46
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +3 -3
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +9 -45
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +9 -45
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +10 -46
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +10 -46
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +3 -2
- package/package.json +1 -1
|
@@ -14414,18 +14414,14 @@
|
|
|
14414
14414
|
if (params.gridOptions.usePivotGridStyle) {
|
|
14415
14415
|
var rowHeight_1 = 30;
|
|
14416
14416
|
params.gridOptions.rowHeight = rowHeight_1;
|
|
14417
|
-
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), {
|
|
14418
|
-
// cellClass: this.getPivotCellClass.bind(this),
|
|
14419
|
-
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14417
|
+
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14420
14418
|
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14421
14419
|
if (params.colDef.type === exports.DatoGridColumnTypes.Number) {
|
|
14422
14420
|
style.textAlign = 'end';
|
|
14423
14421
|
}
|
|
14424
14422
|
return style;
|
|
14425
14423
|
} });
|
|
14426
|
-
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14427
|
-
// cellClass: this.getPivotCellClass.bind(this),
|
|
14428
|
-
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14424
|
+
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14429
14425
|
}
|
|
14430
14426
|
return params.gridOptions;
|
|
14431
14427
|
};
|
|
@@ -14442,40 +14438,6 @@
|
|
|
14442
14438
|
}
|
|
14443
14439
|
return cellClass;
|
|
14444
14440
|
};
|
|
14445
|
-
GridService.prototype.getPivotCellClass = function (params) {
|
|
14446
|
-
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
14447
|
-
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
14448
|
-
var cellClass = "";
|
|
14449
|
-
if (gridQuery && gridQuery.api) {
|
|
14450
|
-
var columns = gridQuery.api.columns;
|
|
14451
|
-
var originalColumns = columns.getAllColumns();
|
|
14452
|
-
var originalColumn = originalColumns.find(function (col) {
|
|
14453
|
-
var _a = params.colDef, cellColumnGroupId = _a.showRowGroup, pivotValueColumn = _a.pivotValueColumn, colId = _a.colId;
|
|
14454
|
-
var cellPivotColumnId = pivotValueColumn && pivotValueColumn.getColId();
|
|
14455
|
-
var cellColumnId = cellColumnGroupId || cellPivotColumnId || colId;
|
|
14456
|
-
return col.getColId() === cellColumnId;
|
|
14457
|
-
});
|
|
14458
|
-
var allDisplayedColumns = columns.getAllDisplayedColumns();
|
|
14459
|
-
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
14460
|
-
var colIndex = allDisplayedColumns.indexOf(displayedColumn);
|
|
14461
|
-
var originalCellClass = originalColumn.getColDef().cellClass;
|
|
14462
|
-
if (originalCellClass && typeof originalCellClass === 'string') {
|
|
14463
|
-
cellClass += originalCellClass + " ";
|
|
14464
|
-
}
|
|
14465
|
-
if (rowGroupIndex <= colIndex) {
|
|
14466
|
-
if (leafGroup) {
|
|
14467
|
-
if (childIndex % 2 === 0) {
|
|
14468
|
-
/** If row is even */
|
|
14469
|
-
cellClass += 'primary-0-background-color';
|
|
14470
|
-
}
|
|
14471
|
-
}
|
|
14472
|
-
else {
|
|
14473
|
-
cellClass += 'primary-100-background-color pointer dato-simple-bold';
|
|
14474
|
-
}
|
|
14475
|
-
}
|
|
14476
|
-
}
|
|
14477
|
-
return cellClass;
|
|
14478
|
-
};
|
|
14479
14441
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
14480
14442
|
var _this = this;
|
|
14481
14443
|
if (gridOptions === void 0) { gridOptions = null; }
|
|
@@ -15326,7 +15288,9 @@
|
|
|
15326
15288
|
});
|
|
15327
15289
|
this.api.grid.setRowData(convertedData);
|
|
15328
15290
|
};
|
|
15329
|
-
|
|
15291
|
+
/** No declared interface in current grid version yet.
|
|
15292
|
+
* Refer docs - https://www.ag-grid.com/angular-data-grid/cell-styles/#cell-class-rules */
|
|
15293
|
+
GridService.prototype.getPivotModeCellClassRules = function () {
|
|
15330
15294
|
return {
|
|
15331
15295
|
'primary-0-background-color': this.isLeafGroupEvenCell.bind(this),
|
|
15332
15296
|
'primary-100-background-color pointer dato-simple-bold': this.isRowGroupValuedCell.bind(this)
|
|
@@ -15335,12 +15299,12 @@
|
|
|
15335
15299
|
GridService.prototype.isLeafGroupEvenCell = function (params) {
|
|
15336
15300
|
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
15337
15301
|
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15338
|
-
return
|
|
15302
|
+
return rowGroupIndex <= colIndex && leafGroup && childIndex % 2 === 0;
|
|
15339
15303
|
};
|
|
15340
15304
|
GridService.prototype.isRowGroupValuedCell = function (params) {
|
|
15341
15305
|
var _a = params.node, leafGroup = _a.leafGroup, rowGroupIndex = _a.rowGroupIndex;
|
|
15342
15306
|
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15343
|
-
return
|
|
15307
|
+
return rowGroupIndex <= colIndex && !leafGroup;
|
|
15344
15308
|
};
|
|
15345
15309
|
GridService.prototype.getCellClassRuleColIndex = function (params) {
|
|
15346
15310
|
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
@@ -15350,7 +15314,7 @@
|
|
|
15350
15314
|
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
15351
15315
|
return allDisplayedColumns.indexOf(displayedColumn);
|
|
15352
15316
|
}
|
|
15353
|
-
return
|
|
15317
|
+
return -1;
|
|
15354
15318
|
};
|
|
15355
15319
|
GridService.ctorParameters = function () { return [
|
|
15356
15320
|
{ type: GridStore },
|
|
@@ -25166,7 +25130,7 @@
|
|
|
25166
25130
|
DatoProgressBarComponent = __decorate([
|
|
25167
25131
|
core.Component({
|
|
25168
25132
|
selector: 'dato-progress-bar',
|
|
25169
|
-
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div class=\"d-flex items-center dato-note primary-400-color\">\n <div class=\"legend-color mr-4\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class=\"primary-300-color ml-3\" *ngIf=\"part.legendSecondaryLabel\">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n",
|
|
25133
|
+
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div *ngIf=\"part.legendLabel || part.tooltip\" class=\"d-flex items-center dato-note primary-400-color\">\n <div class=\"legend-color mr-4\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class=\"primary-300-color ml-3\" *ngIf=\"part.legendSecondaryLabel\">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n",
|
|
25170
25134
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
25171
25135
|
encapsulation: core.ViewEncapsulation.None,
|
|
25172
25136
|
styles: ["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]
|
|
@@ -25723,7 +25687,7 @@
|
|
|
25723
25687
|
};
|
|
25724
25688
|
}
|
|
25725
25689
|
|
|
25726
|
-
window.coreVersion = '22.12.
|
|
25690
|
+
window.coreVersion = '22.12.6';
|
|
25727
25691
|
|
|
25728
25692
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25729
25693
|
exports.AceService = AceService;
|