@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
|
@@ -14414,14 +14414,18 @@
|
|
|
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), {
|
|
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) {
|
|
14418
14420
|
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14419
14421
|
if (params.colDef.type === exports.DatoGridColumnTypes.Number) {
|
|
14420
14422
|
style.textAlign = 'end';
|
|
14421
14423
|
}
|
|
14422
14424
|
return style;
|
|
14423
14425
|
} });
|
|
14424
|
-
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14426
|
+
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), {
|
|
14427
|
+
// cellClass: this.getPivotCellClass.bind(this),
|
|
14428
|
+
cellClassRules: this.getCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14425
14429
|
}
|
|
14426
14430
|
return params.gridOptions;
|
|
14427
14431
|
};
|
|
@@ -15322,6 +15326,32 @@
|
|
|
15322
15326
|
});
|
|
15323
15327
|
this.api.grid.setRowData(convertedData);
|
|
15324
15328
|
};
|
|
15329
|
+
GridService.prototype.getCellClassRules = function () {
|
|
15330
|
+
return {
|
|
15331
|
+
'primary-0-background-color': this.isLeafGroupEvenCell.bind(this),
|
|
15332
|
+
'primary-100-background-color pointer dato-simple-bold': this.isRowGroupValuedCell.bind(this)
|
|
15333
|
+
};
|
|
15334
|
+
};
|
|
15335
|
+
GridService.prototype.isLeafGroupEvenCell = function (params) {
|
|
15336
|
+
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
15337
|
+
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15338
|
+
return !isNil(colIndex) && rowGroupIndex <= colIndex && leafGroup && childIndex % 2 === 0;
|
|
15339
|
+
};
|
|
15340
|
+
GridService.prototype.isRowGroupValuedCell = function (params) {
|
|
15341
|
+
var _a = params.node, leafGroup = _a.leafGroup, rowGroupIndex = _a.rowGroupIndex;
|
|
15342
|
+
var colIndex = this.getCellClassRuleColIndex(params);
|
|
15343
|
+
return !isNil(colIndex) && rowGroupIndex <= colIndex && !leafGroup;
|
|
15344
|
+
};
|
|
15345
|
+
GridService.prototype.getCellClassRuleColIndex = function (params) {
|
|
15346
|
+
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
15347
|
+
if (gridQuery && gridQuery.api) {
|
|
15348
|
+
var columns = gridQuery.api.columns;
|
|
15349
|
+
var allDisplayedColumns = columns.getAllDisplayedColumns();
|
|
15350
|
+
var displayedColumn = allDisplayedColumns.find(function (col) { return col.getColId() === params.colDef.colId; });
|
|
15351
|
+
return allDisplayedColumns.indexOf(displayedColumn);
|
|
15352
|
+
}
|
|
15353
|
+
return null;
|
|
15354
|
+
};
|
|
15325
15355
|
GridService.ctorParameters = function () { return [
|
|
15326
15356
|
{ type: GridStore },
|
|
15327
15357
|
{ type: GridQuery },
|