@adaptabletools/adaptable 20.0.11 → 20.0.13
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/agGrid.d.ts +3 -3
- package/agGrid.js +4 -4
- package/package.json +1 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableColumn.js +9 -8
- package/src/AdaptableState/Common/AggregationColumns.d.ts +3 -2
- package/src/AdaptableState/Common/AggregationColumns.js +0 -3
- package/src/AdaptableState/LayoutState.d.ts +6 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +5 -5
- package/src/Api/Implementation/LayoutHelpers.js +18 -32
- package/src/Api/Internal/ColumnInternalApi.js +5 -5
- package/src/Strategy/CalculatedColumnModule.d.ts +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnInfoModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +27 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +23 -23
- package/src/agGrid/AdaptableAgGrid.js +8 -4
- package/src/agGrid/AgGridAdapter.js +4 -4
- package/src/agGrid/AgGridColumnAdapter.js +21 -3
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +3 -3
- package/src/layout-manager/src/index.d.ts +5 -1
- package/src/layout-manager/src/index.js +48 -44
- package/src/layout-manager/src/isLayoutEqual.d.ts +8 -0
- package/src/layout-manager/src/isLayoutEqual.js +43 -2
- package/src/layout-manager/src/isPivotColumnTotal.d.ts +1 -0
- package/src/layout-manager/src/{isPivotGroupTotalColumn.js → isPivotColumnTotal.js} +1 -1
- package/src/layout-manager/src/isPivotGrandTotal.d.ts +2 -0
- package/src/layout-manager/src/{isPivotGrandTotalColumn.js → isPivotGrandTotal.js} +1 -1
- package/src/layout-manager/src/normalizeLayoutModel.js +24 -0
- package/src/layout-manager/src/simplifyLayoutModel.js +10 -1
- package/src/metamodel/adaptable.metamodel.d.ts +4 -4
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/layout-manager/src/isPivotGrandTotalColumn.d.ts +0 -2
- package/src/layout-manager/src/isPivotGroupTotalColumn.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function isPivotColumnTotal(colId) {
|
|
2
2
|
// pivot group total are spanning cross all aggregations
|
|
3
3
|
// therefore the last part of the colId is empty (hence the "dangling" underscore)
|
|
4
4
|
return colId?.startsWith('pivot_') && colId?.endsWith('_');
|
|
@@ -25,6 +25,14 @@ export function normalizeTableLayoutModel(layout, options) {
|
|
|
25
25
|
if (!layout.RowGroupedColumns) {
|
|
26
26
|
layout.RowGroupedColumns = [];
|
|
27
27
|
}
|
|
28
|
+
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
29
|
+
// make it an own property
|
|
30
|
+
layout.SuppressAggFuncInHeader = undefined;
|
|
31
|
+
}
|
|
32
|
+
if (!('GrandTotalRow' in layout)) {
|
|
33
|
+
// make it an own property
|
|
34
|
+
layout.GrandTotalRow = undefined;
|
|
35
|
+
}
|
|
28
36
|
const ColumnOrderSet = new Set(layout.TableColumns);
|
|
29
37
|
if (layout.RowGroupedColumns && layout.RowGroupedColumns.length && layout.TableColumns) {
|
|
30
38
|
// the layout.TableColumns might not include the group columns
|
|
@@ -131,6 +139,22 @@ export function normalizePivotLayoutModel(layout) {
|
|
|
131
139
|
RowGroupDisplay: 'always-collapsed',
|
|
132
140
|
};
|
|
133
141
|
}
|
|
142
|
+
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
143
|
+
// make it an own property
|
|
144
|
+
layout.SuppressAggFuncInHeader = undefined;
|
|
145
|
+
}
|
|
146
|
+
if (!('GrandTotalRow' in layout)) {
|
|
147
|
+
// make it an own property
|
|
148
|
+
layout.GrandTotalRow = undefined;
|
|
149
|
+
}
|
|
150
|
+
if (!('PivotGrandTotal' in layout)) {
|
|
151
|
+
// make it an own property
|
|
152
|
+
layout.PivotGrandTotal = undefined;
|
|
153
|
+
}
|
|
154
|
+
if (!('PivotColumnTotal' in layout)) {
|
|
155
|
+
// make it an own property
|
|
156
|
+
layout.PivotColumnTotal = undefined;
|
|
157
|
+
}
|
|
134
158
|
return layout;
|
|
135
159
|
}
|
|
136
160
|
export function normalizeLayoutModel(layout, options) {
|
|
@@ -53,7 +53,7 @@ export function simplifyTableLayoutModel(layout) {
|
|
|
53
53
|
});
|
|
54
54
|
layout.RowGroupDisplayType = displayType;
|
|
55
55
|
}
|
|
56
|
-
if (
|
|
56
|
+
if (layout.GrandTotalRow === undefined) {
|
|
57
57
|
delete layout.GrandTotalRow;
|
|
58
58
|
}
|
|
59
59
|
return layout;
|
|
@@ -75,6 +75,15 @@ export function simplifyPivotLayoutModel(layout) {
|
|
|
75
75
|
if (!layout.PivotGroupedColumns && layout.RowGroupValues) {
|
|
76
76
|
delete layout.RowGroupValues;
|
|
77
77
|
}
|
|
78
|
+
if (layout.GrandTotalRow === undefined) {
|
|
79
|
+
delete layout.GrandTotalRow;
|
|
80
|
+
}
|
|
81
|
+
if (layout.PivotColumnTotal === undefined) {
|
|
82
|
+
delete layout.PivotColumnTotal;
|
|
83
|
+
}
|
|
84
|
+
if (layout.PivotGrandTotal === undefined) {
|
|
85
|
+
delete layout.PivotGrandTotal;
|
|
86
|
+
}
|
|
78
87
|
return layout;
|
|
79
88
|
}
|
|
80
89
|
export function simplifyLayoutModel(layout) {
|
|
@@ -4382,18 +4382,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4382
4382
|
kind: string;
|
|
4383
4383
|
desc: string;
|
|
4384
4384
|
isOpt: boolean;
|
|
4385
|
-
ref
|
|
4385
|
+
ref: string;
|
|
4386
4386
|
} | {
|
|
4387
4387
|
name: string;
|
|
4388
4388
|
kind: string;
|
|
4389
4389
|
desc: string;
|
|
4390
|
-
isOpt
|
|
4391
|
-
ref
|
|
4390
|
+
isOpt?: undefined;
|
|
4391
|
+
ref?: undefined;
|
|
4392
4392
|
} | {
|
|
4393
4393
|
name: string;
|
|
4394
4394
|
kind: string;
|
|
4395
4395
|
desc: string;
|
|
4396
|
-
isOpt
|
|
4396
|
+
isOpt: boolean;
|
|
4397
4397
|
ref?: undefined;
|
|
4398
4398
|
})[];
|
|
4399
4399
|
};
|