@adaptabletools/adaptable 20.1.6 → 20.1.7
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.1.
|
|
3
|
+
"version": "20.1.7",
|
|
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.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1748599416526 || Date.now(),
|
|
4
|
+
VERSION: "20.1.7" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -927,14 +927,15 @@ export class LayoutManager extends LMEmitter {
|
|
|
927
927
|
return columnState;
|
|
928
928
|
}
|
|
929
929
|
computePivotAggregations(layout, columnState) {
|
|
930
|
-
const
|
|
930
|
+
const PivotAggregationColumns = layout.PivotAggregationColumns || [];
|
|
931
|
+
const pivotAggsToIndexes = PivotAggregationColumns.reduce((acc, { ColumnId }, index) => {
|
|
931
932
|
acc[ColumnId] = index;
|
|
932
933
|
return acc;
|
|
933
934
|
}, {});
|
|
934
935
|
columnState.state = columnState.state.map((colState) => {
|
|
935
936
|
const columnId = colState.colId;
|
|
936
937
|
const aggIndex = pivotAggsToIndexes[columnId];
|
|
937
|
-
const aggFunc = aggIndex != null ?
|
|
938
|
+
const aggFunc = aggIndex != null ? PivotAggregationColumns[aggIndex].AggFunc.aggFunc : null;
|
|
938
939
|
return {
|
|
939
940
|
...colState,
|
|
940
941
|
aggFunc: aggIndex != null ? (aggFunc === true ? DEFAULT_AGG_FUNC : aggFunc) : null,
|
|
@@ -1109,7 +1110,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1109
1110
|
// fourth: ...etc
|
|
1110
1111
|
// so we apply the states for all aggregations except the last one
|
|
1111
1112
|
//
|
|
1112
|
-
const aggregationsMapForOrder = layout.PivotAggregationColumns.map((_, index) => layout.PivotAggregationColumns.slice(0, index));
|
|
1113
|
+
const aggregationsMapForOrder = (layout.PivotAggregationColumns || []).map((_, index) => layout.PivotAggregationColumns.slice(0, index));
|
|
1113
1114
|
aggregationsMapForOrder.forEach((agg) => {
|
|
1114
1115
|
// we're mutating the columnState here
|
|
1115
1116
|
this.computePivotAggregations({ ...layout, PivotAggregationColumns: agg }, columnState);
|
|
@@ -1304,7 +1305,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1304
1305
|
};
|
|
1305
1306
|
const colIdInfo = destructurePivotColumnId(colDef, {
|
|
1306
1307
|
pivotColIds: this.currentLayout.PivotColumns,
|
|
1307
|
-
aggColIds: this.currentLayout.PivotAggregationColumns.map((col) => col.ColumnId),
|
|
1308
|
+
aggColIds: (this.currentLayout.PivotAggregationColumns || []).map((col) => col.ColumnId),
|
|
1308
1309
|
}, (message) => this.warn(message));
|
|
1309
1310
|
if (colIdInfo === '!unknown!') {
|
|
1310
1311
|
return defaultHiddenConfig;
|