@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
package/fesm5/datorama-core.js
CHANGED
|
@@ -14215,18 +14215,14 @@ var GridService = /** @class */ (function () {
|
|
|
14215
14215
|
if (params.gridOptions.usePivotGridStyle) {
|
|
14216
14216
|
var rowHeight_1 = 30;
|
|
14217
14217
|
params.gridOptions.rowHeight = rowHeight_1;
|
|
14218
|
-
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), {
|
|
14219
|
-
// cellClass: this.getPivotCellClass.bind(this),
|
|
14220
|
-
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14218
|
+
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14221
14219
|
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14222
14220
|
if (params.colDef.type === DatoGridColumnTypes.Number) {
|
|
14223
14221
|
style.textAlign = 'end';
|
|
14224
14222
|
}
|
|
14225
14223
|
return style;
|
|
14226
14224
|
} });
|
|
14227
|
-
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14228
|
-
// cellClass: this.getPivotCellClass.bind(this),
|
|
14229
|
-
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14225
|
+
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14230
14226
|
}
|
|
14231
14227
|
return params.gridOptions;
|
|
14232
14228
|
};
|
|
@@ -14243,40 +14239,6 @@ var GridService = /** @class */ (function () {
|
|
|
14243
14239
|
}
|
|
14244
14240
|
return cellClass;
|
|
14245
14241
|
};
|
|
14246
|
-
GridService.prototype.getPivotCellClass = function (params) {
|
|
14247
|
-
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
14248
|
-
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
14249
|
-
var cellClass = "";
|
|
14250
|
-
if (gridQuery && gridQuery.api) {
|
|
14251
|
-
var columns = gridQuery.api.columns;
|
|
14252
|
-
var originalColumns = columns.getAllColumns();
|
|
14253
|
-
var originalColumn = originalColumns.find(function (col) {
|
|
14254
|
-
var _a = params.colDef, cellColumnGroupId = _a.showRowGroup, pivotValueColumn = _a.pivotValueColumn, colId = _a.colId;
|
|
14255
|
-
var cellPivotColumnId = pivotValueColumn && pivotValueColumn.getColId();
|
|
14256
|
-
var cellColumnId = cellColumnGroupId || cellPivotColumnId || colId;
|
|
14257
|
-
return col.getColId() === cellColumnId;
|
|
14258
|
-
});
|
|
14259
|
-
var allDisplayedColumns = columns.getAllDisplayedColumns();
|
|
14260
|
-
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
14261
|
-
var colIndex = allDisplayedColumns.indexOf(displayedColumn);
|
|
14262
|
-
var originalCellClass = originalColumn.getColDef().cellClass;
|
|
14263
|
-
if (originalCellClass && typeof originalCellClass === 'string') {
|
|
14264
|
-
cellClass += originalCellClass + " ";
|
|
14265
|
-
}
|
|
14266
|
-
if (rowGroupIndex <= colIndex) {
|
|
14267
|
-
if (leafGroup) {
|
|
14268
|
-
if (childIndex % 2 === 0) {
|
|
14269
|
-
/** If row is even */
|
|
14270
|
-
cellClass += 'primary-0-background-color';
|
|
14271
|
-
}
|
|
14272
|
-
}
|
|
14273
|
-
else {
|
|
14274
|
-
cellClass += 'primary-100-background-color pointer dato-simple-bold';
|
|
14275
|
-
}
|
|
14276
|
-
}
|
|
14277
|
-
}
|
|
14278
|
-
return cellClass;
|
|
14279
|
-
};
|
|
14280
14242
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
14281
14243
|
var _this = this;
|
|
14282
14244
|
if (gridOptions === void 0) { gridOptions = null; }
|
|
@@ -15127,7 +15089,9 @@ var GridService = /** @class */ (function () {
|
|
|
15127
15089
|
});
|
|
15128
15090
|
this.api.grid.setRowData(convertedData);
|
|
15129
15091
|
};
|
|
15130
|
-
|
|
15092
|
+
/** No declared interface in current grid version yet.
|
|
15093
|
+
* Refer docs - https://www.ag-grid.com/angular-data-grid/cell-styles/#cell-class-rules */
|
|
15094
|
+
GridService.prototype.getPivotModeCellClassRules = function () {
|
|
15131
15095
|
return {
|
|
15132
15096
|
'primary-0-background-color': this.isLeafGroupEvenCell.bind(this),
|
|
15133
15097
|
'primary-100-background-color pointer dato-simple-bold': this.isRowGroupValuedCell.bind(this)
|
|
@@ -15136,12 +15100,12 @@ var GridService = /** @class */ (function () {
|
|
|
15136
15100
|
GridService.prototype.isLeafGroupEvenCell = function (params) {
|
|
15137
15101
|
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
15138
15102
|
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15139
|
-
return
|
|
15103
|
+
return rowGroupIndex <= colIndex && leafGroup && childIndex % 2 === 0;
|
|
15140
15104
|
};
|
|
15141
15105
|
GridService.prototype.isRowGroupValuedCell = function (params) {
|
|
15142
15106
|
var _a = params.node, leafGroup = _a.leafGroup, rowGroupIndex = _a.rowGroupIndex;
|
|
15143
15107
|
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15144
|
-
return
|
|
15108
|
+
return rowGroupIndex <= colIndex && !leafGroup;
|
|
15145
15109
|
};
|
|
15146
15110
|
GridService.prototype.getCellClassRuleColIndex = function (params) {
|
|
15147
15111
|
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
@@ -15151,7 +15115,7 @@ var GridService = /** @class */ (function () {
|
|
|
15151
15115
|
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
15152
15116
|
return allDisplayedColumns.indexOf(displayedColumn);
|
|
15153
15117
|
}
|
|
15154
|
-
return
|
|
15118
|
+
return -1;
|
|
15155
15119
|
};
|
|
15156
15120
|
GridService.ctorParameters = function () { return [
|
|
15157
15121
|
{ type: GridStore },
|
|
@@ -24967,7 +24931,7 @@ var DatoProgressBarComponent = /** @class */ (function () {
|
|
|
24967
24931
|
DatoProgressBarComponent = __decorate([
|
|
24968
24932
|
Component({
|
|
24969
24933
|
selector: 'dato-progress-bar',
|
|
24970
|
-
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",
|
|
24934
|
+
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",
|
|
24971
24935
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24972
24936
|
encapsulation: ViewEncapsulation.None,
|
|
24973
24937
|
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%}"]
|
|
@@ -25524,7 +25488,7 @@ function fixNgLeaks() {
|
|
|
25524
25488
|
};
|
|
25525
25489
|
}
|
|
25526
25490
|
|
|
25527
|
-
window.coreVersion = '22.12.
|
|
25491
|
+
window.coreVersion = '22.12.6';
|
|
25528
25492
|
|
|
25529
25493
|
/**
|
|
25530
25494
|
* @license
|