@datorama/core 22.15.2 → 22.15.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/bundles/datorama-core.umd.js +28 -1
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +2 -2
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm2015/lib/grid-v2/grid-store/util.js +27 -1
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm5/lib/grid-v2/grid-store/util.js +28 -1
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +28 -1
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +28 -1
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-store/grid.service.d.ts +1 -1
- package/lib/grid-v2/grid-store/util.d.ts +7 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11377,6 +11377,32 @@ function tryParsePivotValue(str) {
|
|
|
11377
11377
|
}
|
|
11378
11378
|
return value;
|
|
11379
11379
|
}
|
|
11380
|
+
/** ag-grid's colId prefix for pivotRowTotals columns (PivotColDefService.PIVOT_ROW_TOTAL_PREFIX, not exported) */
|
|
11381
|
+
var PIVOT_ROW_TOTAL_COL_ID_PREFIX = 'PivotRowTotal_';
|
|
11382
|
+
/**
|
|
11383
|
+
* ag-grid 22 nested each pivot row total column in one group per pivot level, and the innermost group gets the "Total" header,
|
|
11384
|
+
* but ag-grid 27 adds the column without groups.
|
|
11385
|
+
* Turn the column def into those groups in place, as processSecondaryColDef can't replace it in its parent's children.
|
|
11386
|
+
* This relies on ag-grid checking for children before it calls processSecondaryColDef, so re-check it when moving to processPivotResultColDef.
|
|
11387
|
+
*/
|
|
11388
|
+
function wrapPivotRowTotalColDef(colDef, headerName, pivotLevels) {
|
|
11389
|
+
if (!colDef.colId || !colDef.colId.startsWith(PIVOT_ROW_TOTAL_COL_ID_PREFIX)) {
|
|
11390
|
+
return;
|
|
11391
|
+
}
|
|
11392
|
+
var totalColDef = __assign({}, colDef);
|
|
11393
|
+
// A 'group_' prefix can't match a pivot column id, which starts with 'pivot_' or 'PivotRowTotal_'
|
|
11394
|
+
var groupDef = {
|
|
11395
|
+
groupId: "group_" + totalColDef.colId,
|
|
11396
|
+
headerName: headerName,
|
|
11397
|
+
headerClass: ['total-pivot-cell'],
|
|
11398
|
+
children: [totalColDef]
|
|
11399
|
+
};
|
|
11400
|
+
for (var level = 1; level < pivotLevels; level++) {
|
|
11401
|
+
groupDef = { groupId: "group_" + totalColDef.colId + "_" + level, children: [groupDef] };
|
|
11402
|
+
}
|
|
11403
|
+
Object.keys(colDef).forEach(function (key) { return delete colDef[key]; });
|
|
11404
|
+
Object.assign(colDef, groupDef);
|
|
11405
|
+
}
|
|
11380
11406
|
function isHtmlAllowedForCol(gridOptions, colDef) {
|
|
11381
11407
|
return (!gridOptions.disabledHTMLRenderingFields || !gridOptions.disabledHTMLRenderingFields.includes(getColField(colDef)));
|
|
11382
11408
|
}
|
|
@@ -15122,6 +15148,7 @@ var GridService = /** @class */ (function () {
|
|
|
15122
15148
|
return (parsedKey && parsedKey.value) || '';
|
|
15123
15149
|
});
|
|
15124
15150
|
}
|
|
15151
|
+
wrapPivotRowTotalColDef(colDef, _this.translate.transform('core.total'), _this.api ? _this.api.columns.getPivotColumns().length : 1);
|
|
15125
15152
|
};
|
|
15126
15153
|
/** Use processPivotResultColGroupDe from ver 28 */
|
|
15127
15154
|
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
@@ -25647,7 +25674,7 @@ function fixNgLeaks() {
|
|
|
25647
25674
|
};
|
|
25648
25675
|
}
|
|
25649
25676
|
|
|
25650
|
-
window.coreVersion = '22.15.
|
|
25677
|
+
window.coreVersion = '22.15.3';
|
|
25651
25678
|
|
|
25652
25679
|
/**
|
|
25653
25680
|
* @license
|