@adaptabletools/adaptable-cjs 20.0.4-canary.0 → 20.0.4-canary.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "20.0.4-canary.
|
|
3
|
+
"version": "20.0.4-canary.1",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.0.4-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1744398214592 || Date.now(),
|
|
6
|
+
VERSION: "20.0.4-canary.1" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -73,6 +73,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
73
73
|
applyPivotExpandLevel(layout: PivotLayoutModel): void;
|
|
74
74
|
private withSuppressColumnAnimation;
|
|
75
75
|
private setupPivotTotals;
|
|
76
|
+
private isPivotRowTotalColDef;
|
|
76
77
|
private patchGrandTotalColumn;
|
|
77
78
|
private patchPivotTotalColumn;
|
|
78
79
|
private getPivotTotalColumnConfig;
|
|
@@ -1115,11 +1115,14 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1115
1115
|
this.patchPivotTotalColumn(colGroupDef);
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
+
isPivotRowTotalColDef(colDef) {
|
|
1119
|
+
return colDef.colId?.startsWith('PivotRowTotal_');
|
|
1120
|
+
}
|
|
1118
1121
|
patchGrandTotalColumn(resultColDef) {
|
|
1119
1122
|
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout) || !this.currentLayout.GrandTotalColumn) {
|
|
1120
1123
|
return;
|
|
1121
1124
|
}
|
|
1122
|
-
if (
|
|
1125
|
+
if (this.isPivotRowTotalColDef(resultColDef)) {
|
|
1123
1126
|
resultColDef.headerName = `Grand Total ${resultColDef.headerName}`;
|
|
1124
1127
|
}
|
|
1125
1128
|
}
|
|
@@ -1133,10 +1136,20 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1133
1136
|
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout) || !hasPivotTotalCols(this.currentLayout)) {
|
|
1134
1137
|
return;
|
|
1135
1138
|
}
|
|
1139
|
+
const pivotRowTotalColDefsBefore = [];
|
|
1140
|
+
const pivotRowTotalColDefsAfter = [];
|
|
1136
1141
|
const pivotTotalColDefsBefore = [];
|
|
1137
1142
|
const pivotTotalColDefsAfter = [];
|
|
1138
1143
|
const normalColDefs = [];
|
|
1139
1144
|
colGroupDef.children.forEach((colDef) => {
|
|
1145
|
+
if (this.isPivotRowTotalColDef(colDef)) {
|
|
1146
|
+
if (this.gridApi.getGridOption('pivotRowTotals') === 'after') {
|
|
1147
|
+
pivotRowTotalColDefsAfter.push(colDef);
|
|
1148
|
+
}
|
|
1149
|
+
else {
|
|
1150
|
+
pivotRowTotalColDefsBefore.push(colDef);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1140
1153
|
if (isPivotTotalColDef(colDef)) {
|
|
1141
1154
|
if (!colDef.colId.startsWith('pivot_')) {
|
|
1142
1155
|
this.warn(`Pivot total column ${colDef.colId} is not prefixed with 'pivot_', skipping...`);
|
|
@@ -1163,9 +1176,11 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1163
1176
|
}
|
|
1164
1177
|
});
|
|
1165
1178
|
colGroupDef.children = [
|
|
1179
|
+
...pivotRowTotalColDefsBefore,
|
|
1166
1180
|
...pivotTotalColDefsBefore,
|
|
1167
1181
|
...normalColDefs,
|
|
1168
1182
|
...pivotTotalColDefsAfter,
|
|
1183
|
+
...pivotRowTotalColDefsAfter,
|
|
1169
1184
|
];
|
|
1170
1185
|
}
|
|
1171
1186
|
getPivotTotalColumnConfig(colDef, currentPivotLayout) {
|