@adaptabletools/adaptable 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",
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "20.0.4-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1744398186764 || Date.now(),
|
|
4
|
+
VERSION: "20.0.4-canary.1" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -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;
|
|
@@ -1112,11 +1112,14 @@ export class LayoutManager extends LMEmitter {
|
|
|
1112
1112
|
this.patchPivotTotalColumn(colGroupDef);
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
|
+
isPivotRowTotalColDef(colDef) {
|
|
1116
|
+
return colDef.colId?.startsWith('PivotRowTotal_');
|
|
1117
|
+
}
|
|
1115
1118
|
patchGrandTotalColumn(resultColDef) {
|
|
1116
1119
|
if (!isPivotLayoutModel(this.currentLayout) || !this.currentLayout.GrandTotalColumn) {
|
|
1117
1120
|
return;
|
|
1118
1121
|
}
|
|
1119
|
-
if (
|
|
1122
|
+
if (this.isPivotRowTotalColDef(resultColDef)) {
|
|
1120
1123
|
resultColDef.headerName = `Grand Total ${resultColDef.headerName}`;
|
|
1121
1124
|
}
|
|
1122
1125
|
}
|
|
@@ -1130,10 +1133,20 @@ export class LayoutManager extends LMEmitter {
|
|
|
1130
1133
|
if (!isPivotLayoutModel(this.currentLayout) || !hasPivotTotalCols(this.currentLayout)) {
|
|
1131
1134
|
return;
|
|
1132
1135
|
}
|
|
1136
|
+
const pivotRowTotalColDefsBefore = [];
|
|
1137
|
+
const pivotRowTotalColDefsAfter = [];
|
|
1133
1138
|
const pivotTotalColDefsBefore = [];
|
|
1134
1139
|
const pivotTotalColDefsAfter = [];
|
|
1135
1140
|
const normalColDefs = [];
|
|
1136
1141
|
colGroupDef.children.forEach((colDef) => {
|
|
1142
|
+
if (this.isPivotRowTotalColDef(colDef)) {
|
|
1143
|
+
if (this.gridApi.getGridOption('pivotRowTotals') === 'after') {
|
|
1144
|
+
pivotRowTotalColDefsAfter.push(colDef);
|
|
1145
|
+
}
|
|
1146
|
+
else {
|
|
1147
|
+
pivotRowTotalColDefsBefore.push(colDef);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1137
1150
|
if (isPivotTotalColDef(colDef)) {
|
|
1138
1151
|
if (!colDef.colId.startsWith('pivot_')) {
|
|
1139
1152
|
this.warn(`Pivot total column ${colDef.colId} is not prefixed with 'pivot_', skipping...`);
|
|
@@ -1160,9 +1173,11 @@ export class LayoutManager extends LMEmitter {
|
|
|
1160
1173
|
}
|
|
1161
1174
|
});
|
|
1162
1175
|
colGroupDef.children = [
|
|
1176
|
+
...pivotRowTotalColDefsBefore,
|
|
1163
1177
|
...pivotTotalColDefsBefore,
|
|
1164
1178
|
...normalColDefs,
|
|
1165
1179
|
...pivotTotalColDefsAfter,
|
|
1180
|
+
...pivotRowTotalColDefsAfter,
|
|
1166
1181
|
];
|
|
1167
1182
|
}
|
|
1168
1183
|
getPivotTotalColumnConfig(colDef, currentPivotLayout) {
|