@datorama/core 22.12.5-beta.1 → 22.12.5-beta.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/bundles/datorama-core.umd.js +32 -2
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +25 -25
- 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 +33 -3
- package/esm5/lib/grid-v2/grid-store/grid.service.js +33 -3
- package/fesm2015/datorama-core.js +32 -2
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +32 -2
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +4 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -14215,14 +14215,18 @@ 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), {
|
|
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) {
|
|
14219
14221
|
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14220
14222
|
if (params.colDef.type === DatoGridColumnTypes.Number) {
|
|
14221
14223
|
style.textAlign = 'end';
|
|
14222
14224
|
}
|
|
14223
14225
|
return style;
|
|
14224
14226
|
} });
|
|
14225
|
-
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14227
|
+
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14228
|
+
// cellClass: this.getPivotCellClass.bind(this),
|
|
14229
|
+
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14226
14230
|
}
|
|
14227
14231
|
return params.gridOptions;
|
|
14228
14232
|
};
|
|
@@ -15123,6 +15127,32 @@ var GridService = /** @class */ (function () {
|
|
|
15123
15127
|
});
|
|
15124
15128
|
this.api.grid.setRowData(convertedData);
|
|
15125
15129
|
};
|
|
15130
|
+
GridService.prototype.getCellClassRules = function () {
|
|
15131
|
+
return {
|
|
15132
|
+
'primary-0-background-color': this.isLeafGroupEvenCell.bind(this),
|
|
15133
|
+
'primary-100-background-color pointer dato-simple-bold': this.isRowGroupValuedCell.bind(this)
|
|
15134
|
+
};
|
|
15135
|
+
};
|
|
15136
|
+
GridService.prototype.isLeafGroupEvenCell = function (params) {
|
|
15137
|
+
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
15138
|
+
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15139
|
+
return !isNil(colIndex) && rowGroupIndex <= colIndex && leafGroup && childIndex % 2 === 0;
|
|
15140
|
+
};
|
|
15141
|
+
GridService.prototype.isRowGroupValuedCell = function (params) {
|
|
15142
|
+
var _a = params.node, leafGroup = _a.leafGroup, rowGroupIndex = _a.rowGroupIndex;
|
|
15143
|
+
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15144
|
+
return !isNil(colIndex) && rowGroupIndex <= colIndex && !leafGroup;
|
|
15145
|
+
};
|
|
15146
|
+
GridService.prototype.getCellClassRuleColIndex = function (params) {
|
|
15147
|
+
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
15148
|
+
if (gridQuery && gridQuery.api) {
|
|
15149
|
+
var columns = gridQuery.api.columns;
|
|
15150
|
+
var allDisplayedColumns = columns.getAllDisplayedColumns();
|
|
15151
|
+
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
15152
|
+
return allDisplayedColumns.indexOf(displayedColumn);
|
|
15153
|
+
}
|
|
15154
|
+
return null;
|
|
15155
|
+
};
|
|
15126
15156
|
GridService.ctorParameters = function () { return [
|
|
15127
15157
|
{ type: GridStore },
|
|
15128
15158
|
{ type: GridQuery },
|