@adaptabletools/adaptable-cjs 20.0.7-canary.1 → 20.0.7-canary.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/agGrid.d.ts +37 -0
- package/agGrid.js +39 -1
- package/base.css +19 -3
- package/base.css.map +1 -1
- package/index.css +17 -3
- package/index.css.map +1 -1
- package/package.json +3 -3
- package/src/AdaptableOptions/LayoutOptions.d.ts +3 -6
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +14 -5
- package/src/AdaptableState/Common/AdaptableColumn.js +28 -1
- package/src/AdaptableState/Common/AggregationColumns.d.ts +10 -0
- package/src/AdaptableState/Common/AggregationColumns.js +13 -1
- package/src/AdaptableState/LayoutState.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +36 -3
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +9 -10
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +26 -25
- package/src/View/Components/ColumnFilter/ColumnFilter.js +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +6 -3
- package/src/View/Components/NewScopeComponent.js +2 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +16 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +2 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +223 -47
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +9 -1
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +9 -0
- package/src/components/Select/Select.js +15 -3
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +4 -4
- package/src/layout-manager/src/index.d.ts +1 -1
- package/src/layout-manager/src/index.js +41 -21
- package/src/layout-manager/src/isPivotAggTotalColumn.d.ts +2 -0
- package/src/layout-manager/src/isPivotAggTotalColumn.js +7 -0
- package/src/layout-manager/src/isPivotGrandTotalColumn.d.ts +2 -0
- package/src/layout-manager/src/isPivotGrandTotalColumn.js +7 -0
- package/src/layout-manager/src/isPivotGroupTotalColumn.d.ts +1 -2
- package/src/layout-manager/src/isPivotGroupTotalColumn.js +2 -2
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -3
- package/src/layout-manager/src/simplifyLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +13 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/layout-manager/src/isPivotTotalColumn.d.ts +0 -2
- package/src/layout-manager/src/isPivotTotalColumn.js +0 -7
|
@@ -3317,13 +3317,21 @@ You need to define at least one Layout!`);
|
|
|
3317
3317
|
}
|
|
3318
3318
|
return prevRowGroupedColumns.join(',') !== currentRowGroupedColumns.join(',');
|
|
3319
3319
|
}
|
|
3320
|
+
hasPivotTotalsInLayout(one, other) {
|
|
3321
|
+
const prevAggregationColumns = one.PivotAggregationColumns || [];
|
|
3322
|
+
const currentAggregationColumns = other.PivotAggregationColumns || [];
|
|
3323
|
+
const prevHasPivotTotals = prevAggregationColumns.some((col) => !!col.TotalColumn);
|
|
3324
|
+
const currentHasPivotTotals = currentAggregationColumns.some((col) => !!col.TotalColumn);
|
|
3325
|
+
return prevHasPivotTotals || currentHasPivotTotals;
|
|
3326
|
+
}
|
|
3320
3327
|
onLayoutChange(layout) {
|
|
3321
3328
|
this.logger.info('onLayoutChange()');
|
|
3322
3329
|
const prevOnChangeLayout = this.__prevLayoutForOnChange || this.api.layoutApi.getCurrentLayout();
|
|
3323
3330
|
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
3324
3331
|
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevOnChangeLayout, layout);
|
|
3332
|
+
const hasPivotTotalsInLayout = this.hasPivotTotalsInLayout(prevOnChangeLayout, layout);
|
|
3325
3333
|
const pivotColsChanged = JSON.stringify(layout.PivotColumns) !== JSON.stringify(prevOnChangeLayout.PivotColumns);
|
|
3326
|
-
if (rowGroupsChanged || pivotColsChanged) {
|
|
3334
|
+
if (rowGroupsChanged || pivotColsChanged || hasPivotTotalsInLayout) {
|
|
3327
3335
|
this.updateColumnModelAndRefreshGrid();
|
|
3328
3336
|
}
|
|
3329
3337
|
else {
|
|
@@ -10,6 +10,9 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensio
|
|
|
10
10
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
11
11
|
const agGridModules_1 = require("./agGridModules");
|
|
12
12
|
const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
|
|
13
|
+
const ColumnApiImpl_1 = require("../Api/Implementation/ColumnApiImpl");
|
|
14
|
+
const isPivotGroupTotalColumn_1 = require("../layout-manager/src/isPivotGroupTotalColumn");
|
|
15
|
+
const isPivotAggTotalColumn_1 = require("../layout-manager/src/isPivotAggTotalColumn");
|
|
13
16
|
// AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
|
|
14
17
|
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
15
18
|
const getColumnApiModule = () => ag_grid_enterprise_1.ColumnApiModule;
|
|
@@ -436,6 +439,7 @@ class AgGridAdapter {
|
|
|
436
439
|
isCalculatedColumn: this.isCalculatedColumn(colDef),
|
|
437
440
|
isFreeTextColumn: this.isFreeTextColumn(colDef),
|
|
438
441
|
isActionColumn: this.isActionColumn(colDef),
|
|
442
|
+
isPivotTotalColumn: this.isPivotTotalColumn(colDef),
|
|
439
443
|
};
|
|
440
444
|
abColumn.queryable = this.isColumnQueryable(abColumn);
|
|
441
445
|
abColumn.exportable = this.isColumnExportable(abColumn);
|
|
@@ -609,6 +613,11 @@ class AgGridAdapter {
|
|
|
609
613
|
isActionColumn(colDef) {
|
|
610
614
|
return this.adaptableApi.actionColumnApi.getActionColumnForColumnId(colDef.colId) != null;
|
|
611
615
|
}
|
|
616
|
+
isPivotTotalColumn(colDef) {
|
|
617
|
+
return ((0, ColumnApiImpl_1.isPivotGrandTotalColumn)(colDef.colId) ||
|
|
618
|
+
(0, isPivotGroupTotalColumn_1.isPivotGroupTotalColumn)(colDef.colId) ||
|
|
619
|
+
(0, isPivotAggTotalColumn_1.isPivotAggTotalColumn)(colDef));
|
|
620
|
+
}
|
|
612
621
|
isColumnFilterable(colDef) {
|
|
613
622
|
// follow agGrid logic which is that ONLY filterable if explicitly set
|
|
614
623
|
if (this.adaptableApi.entitlementApi.getEntitlementAccessLevelForModule(ModuleConstants.ColumnFilterModuleId) == 'Hidden') {
|
|
@@ -32,8 +32,10 @@ const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
|
32
32
|
},
|
|
33
33
|
resizable: false,
|
|
34
34
|
defaultSortable: false,
|
|
35
|
-
renderSelectionCheckBox:
|
|
36
|
-
|
|
35
|
+
renderSelectionCheckBox: true,
|
|
36
|
+
className: 'ab-Select-CheckboxColumn',
|
|
37
|
+
renderValue: ({ renderBag }) => {
|
|
38
|
+
return React.createElement("div", { className: "InfiniteCell_content_value" }, renderBag.value);
|
|
37
39
|
},
|
|
38
40
|
renderHeader: (headerParams) => {
|
|
39
41
|
return (React.createElement(React.Fragment, null,
|
|
@@ -78,8 +80,15 @@ const doesOptionMatchValue = function (value) {
|
|
|
78
80
|
};
|
|
79
81
|
};
|
|
80
82
|
const Select = function (props) {
|
|
83
|
+
let maxLabelLength = 0;
|
|
81
84
|
const ref = React.useRef(null);
|
|
82
|
-
const valueToOptionMap = new Map((props.options || []).map((opt) =>
|
|
85
|
+
const valueToOptionMap = new Map((props.options || []).map((opt) => {
|
|
86
|
+
let label = opt.label;
|
|
87
|
+
if (typeof label === 'string' || typeof label === 'number' || typeof label === 'boolean') {
|
|
88
|
+
maxLabelLength = Math.max(maxLabelLength, `${label}`.length);
|
|
89
|
+
}
|
|
90
|
+
return [opt.value, opt];
|
|
91
|
+
}));
|
|
83
92
|
const findOptionByValue = (value) => {
|
|
84
93
|
const option = valueToOptionMap.get(value);
|
|
85
94
|
if (option) {
|
|
@@ -420,7 +429,10 @@ const Select = function (props) {
|
|
|
420
429
|
zIndex: 999999,
|
|
421
430
|
boxShadow: 'var(--ab-cmp-select-menu__box-shadow)',
|
|
422
431
|
minWidth: `var(--ab-cmp-select-menu__min-width)`,
|
|
432
|
+
width: `${Math.max(maxLabelLength, 10)}ch`,
|
|
423
433
|
'--ab-cmp-select-menu__min-height': `min(${(props.options || []).length + (showHeaderSelectionCheckbox ? 1 : 0)} * var(--ab-grid-row-height), 20rem)`,
|
|
434
|
+
maxHeight: 'var(--ab-cmp-select-menu__max-height)',
|
|
435
|
+
maxWidth: 'var(--ab-cmp-select-menu__max-width)',
|
|
424
436
|
...commonStyles(state),
|
|
425
437
|
...props.menuStyle,
|
|
426
438
|
};
|
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.7-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1745852659007 || Date.now(),
|
|
6
|
+
VERSION: "20.0.7-canary.3" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -57,6 +57,10 @@ export interface BaseLayoutModel {
|
|
|
57
57
|
ColumnPinning?: {
|
|
58
58
|
[columnId: string]: 'left' | 'right';
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Display Grand Total Row at the top or bottom of the Pivot Table
|
|
62
|
+
*/
|
|
63
|
+
GrandTotalRow?: 'top' | 'bottom' | boolean;
|
|
60
64
|
}
|
|
61
65
|
export type ColumnAggregationModel = {
|
|
62
66
|
aggFunc: string | true;
|
|
@@ -109,10 +113,6 @@ export interface PivotLayoutModel extends BaseLayoutModel {
|
|
|
109
113
|
*/
|
|
110
114
|
PivotGroupedColumns?: string[];
|
|
111
115
|
RowGroupedColumns?: never;
|
|
112
|
-
/**
|
|
113
|
-
* Display Grand Total Row at the top or bottom of the Pivot Table
|
|
114
|
-
*/
|
|
115
|
-
GrandTotalRow?: 'top' | 'bottom' | boolean;
|
|
116
116
|
/**
|
|
117
117
|
* Display Total of all Pivot Columns before or after the Pivot Columns
|
|
118
118
|
*/
|
|
@@ -72,8 +72,8 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
72
72
|
applyPivotTotals(layout: PivotLayoutModel): void;
|
|
73
73
|
applyPivotExpandLevel(layout: PivotLayoutModel): void;
|
|
74
74
|
private withSuppressColumnAnimation;
|
|
75
|
+
private patchColDefType;
|
|
75
76
|
private setupPivotTotals;
|
|
76
|
-
private isPivotRowTotalColDef;
|
|
77
77
|
private patchPivotTotalColumn;
|
|
78
78
|
private getPivotTotalColumnConfig;
|
|
79
79
|
}
|
|
@@ -9,7 +9,9 @@ const isLayoutEqual_1 = require("./isLayoutEqual");
|
|
|
9
9
|
const simplifyLayoutModel_1 = require("./simplifyLayoutModel");
|
|
10
10
|
const sortColumnIdsByOrder_1 = require("./sortColumnIdsByOrder");
|
|
11
11
|
const destructurePivotColumnId_1 = require("./destructurePivotColumnId");
|
|
12
|
-
const
|
|
12
|
+
const isPivotAggTotalColumn_1 = require("./isPivotAggTotalColumn");
|
|
13
|
+
const isPivotGrandTotalColumn_1 = require("./isPivotGrandTotalColumn");
|
|
14
|
+
const isPivotGroupTotalColumn_1 = require("./isPivotGroupTotalColumn");
|
|
13
15
|
function flattenColDefs(colDefs) {
|
|
14
16
|
const res = [];
|
|
15
17
|
const iteration = (c) => {
|
|
@@ -259,12 +261,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
259
261
|
RowGroupValues: layout.RowGroupValues,
|
|
260
262
|
PivotGroupedColumns: layout.RowGroupedColumns,
|
|
261
263
|
PivotAggregationColumns: layout.TableAggregationColumns,
|
|
264
|
+
GrandTotalRow: layout.GrandTotalRow,
|
|
262
265
|
PivotExpandLevel: prevLayout?.PivotExpandLevel ?? -1,
|
|
263
266
|
};
|
|
264
|
-
const grandTotalRow = this.gridApi.getGridOption('grandTotalRow');
|
|
265
|
-
if (grandTotalRow) {
|
|
266
|
-
pivotLayout.GrandTotalRow = grandTotalRow;
|
|
267
|
-
}
|
|
268
267
|
const grandTotalColumn = this.gridApi.getGridOption('pivotRowTotals');
|
|
269
268
|
if (grandTotalColumn) {
|
|
270
269
|
pivotLayout.GrandTotalColumn = grandTotalColumn;
|
|
@@ -446,6 +445,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
446
445
|
}
|
|
447
446
|
}
|
|
448
447
|
}
|
|
448
|
+
const grandTotalRow = this.gridApi.getGridOption('grandTotalRow');
|
|
449
449
|
const layout = (0, simplifyLayoutModel_1.simplifyTableLayoutModel)({
|
|
450
450
|
TableColumns: TableColumns,
|
|
451
451
|
ColumnVisibility,
|
|
@@ -455,6 +455,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
455
455
|
TableAggregationColumns,
|
|
456
456
|
ColumnPinning: ColumnPinning,
|
|
457
457
|
RowGroupValues,
|
|
458
|
+
GrandTotalRow: grandTotalRow,
|
|
458
459
|
});
|
|
459
460
|
return layout;
|
|
460
461
|
}
|
|
@@ -693,6 +694,17 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
693
694
|
// @ts-ignore
|
|
694
695
|
this.gridApi.setGridOption('suppressAggFuncInHeader', layout.SuppressAggFuncInHeader);
|
|
695
696
|
}
|
|
697
|
+
if (layout.GrandTotalRow) {
|
|
698
|
+
const grandTotalRow = layout.GrandTotalRow === true || layout.GrandTotalRow === 'top'
|
|
699
|
+
? 'top'
|
|
700
|
+
: layout.GrandTotalRow === 'bottom'
|
|
701
|
+
? 'bottom'
|
|
702
|
+
: null;
|
|
703
|
+
this.gridApi.setGridOption('grandTotalRow', grandTotalRow);
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
this.gridApi.setGridOption('grandTotalRow', null);
|
|
707
|
+
}
|
|
696
708
|
if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layout)) {
|
|
697
709
|
try {
|
|
698
710
|
const perfApplyPivot = this.beginPerf('applyLayout:pivot');
|
|
@@ -1036,17 +1048,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1036
1048
|
/**
|
|
1037
1049
|
* GrandTotalRow
|
|
1038
1050
|
*/
|
|
1039
|
-
|
|
1040
|
-
const grandTotalRow = layout.GrandTotalRow === true || layout.GrandTotalRow === 'top'
|
|
1041
|
-
? 'top'
|
|
1042
|
-
: layout.GrandTotalRow === 'bottom'
|
|
1043
|
-
? 'bottom'
|
|
1044
|
-
: null;
|
|
1045
|
-
this.gridApi.setGridOption('grandTotalRow', grandTotalRow);
|
|
1046
|
-
}
|
|
1047
|
-
else {
|
|
1048
|
-
this.gridApi.setGridOption('grandTotalRow', null);
|
|
1049
|
-
}
|
|
1051
|
+
// is common to both Table and Pivot and is applied in applyLayout()
|
|
1050
1052
|
/**
|
|
1051
1053
|
* GrandTotalColumn
|
|
1052
1054
|
*/
|
|
@@ -1111,8 +1113,28 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1111
1113
|
}
|
|
1112
1114
|
return res;
|
|
1113
1115
|
}
|
|
1116
|
+
patchColDefType(colDef, colTypes) {
|
|
1117
|
+
const originalTypes = colDef.type == undefined ? [] : Array.isArray(colDef.type) ? colDef.type : [colDef.type];
|
|
1118
|
+
const columnTypes = new Set(originalTypes);
|
|
1119
|
+
colTypes.forEach((colType) => {
|
|
1120
|
+
columnTypes.add(colType);
|
|
1121
|
+
});
|
|
1122
|
+
colDef.type = Array.from(columnTypes);
|
|
1123
|
+
}
|
|
1114
1124
|
setupPivotTotals() {
|
|
1115
1125
|
const _original_processPivotResultColDef = this.gridApi.getGridOption('processPivotResultColDef');
|
|
1126
|
+
this.gridApi.setGridOption('processPivotResultColDef', (colDef) => {
|
|
1127
|
+
_original_processPivotResultColDef?.(colDef);
|
|
1128
|
+
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout)) {
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
if ((0, isPivotGrandTotalColumn_1.isPivotGrandTotalColumn)(colDef)) {
|
|
1132
|
+
this.patchColDefType(colDef, ['pivotTotalColumn', 'pivotGrandTotalColumn']);
|
|
1133
|
+
}
|
|
1134
|
+
if ((0, isPivotGroupTotalColumn_1.isPivotGroupTotalColumn)(colDef.colId)) {
|
|
1135
|
+
this.patchColDefType(colDef, ['pivotTotalColumn', 'pivotGroupTotalColumn']);
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1116
1138
|
const _original_processPivotResultColGroupDef = this.gridApi.getGridOption('processPivotResultColGroupDef');
|
|
1117
1139
|
this.gridApi.setGridOption('processPivotResultColGroupDef', (colGroupDef) => {
|
|
1118
1140
|
_original_processPivotResultColGroupDef?.(colGroupDef);
|
|
@@ -1122,9 +1144,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1122
1144
|
this.patchPivotTotalColumn(colGroupDef);
|
|
1123
1145
|
});
|
|
1124
1146
|
}
|
|
1125
|
-
isPivotRowTotalColDef(colDef) {
|
|
1126
|
-
return colDef.colId?.startsWith('PivotRowTotal_');
|
|
1127
|
-
}
|
|
1128
1147
|
patchPivotTotalColumn(colGroupDef) {
|
|
1129
1148
|
const hasPivotTotalCols = (pivotLayout) => {
|
|
1130
1149
|
return pivotLayout.PivotAggregationColumns?.some((aggCol) => !!aggCol.TotalColumn);
|
|
@@ -1138,7 +1157,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1138
1157
|
const pivotTotalColDefsAfter = [];
|
|
1139
1158
|
const normalColDefs = [];
|
|
1140
1159
|
colGroupDef.children.forEach((colDef) => {
|
|
1141
|
-
if (
|
|
1160
|
+
if ((0, isPivotGrandTotalColumn_1.isPivotGrandTotalColumn)(colDef)) {
|
|
1142
1161
|
if (this.gridApi.getGridOption('pivotRowTotals') === 'after') {
|
|
1143
1162
|
pivotRowTotalColDefsAfter.push(colDef);
|
|
1144
1163
|
}
|
|
@@ -1147,11 +1166,12 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1147
1166
|
}
|
|
1148
1167
|
return;
|
|
1149
1168
|
}
|
|
1150
|
-
if ((0,
|
|
1169
|
+
if ((0, isPivotAggTotalColumn_1.isPivotAggTotalColumn)(colDef)) {
|
|
1151
1170
|
if (!colDef.colId.startsWith('pivot_')) {
|
|
1152
1171
|
this.warn(`Pivot total column ${colDef.colId} is not prefixed with 'pivot_', skipping...`);
|
|
1153
1172
|
return;
|
|
1154
1173
|
}
|
|
1174
|
+
this.patchColDefType(colDef, ['pivotTotalColumn', 'pivotAggregationTotalColumn']);
|
|
1155
1175
|
// we do this for all total cols, but we will hide the ones that are not visible
|
|
1156
1176
|
colDef.columnGroupShow = undefined;
|
|
1157
1177
|
const totalColConfig = this.getPivotTotalColumnConfig(colDef, this.currentLayout);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPivotAggTotalColumn = void 0;
|
|
4
|
+
function isPivotAggTotalColumn(colDef) {
|
|
5
|
+
return !!colDef.pivotTotalColumnIds?.length;
|
|
6
|
+
}
|
|
7
|
+
exports.isPivotAggTotalColumn = isPivotAggTotalColumn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPivotGrandTotalColumn = void 0;
|
|
4
|
+
function isPivotGrandTotalColumn(colDef) {
|
|
5
|
+
return colDef?.colId?.startsWith('PivotRowTotal_pivot_');
|
|
6
|
+
}
|
|
7
|
+
exports.isPivotGrandTotalColumn = isPivotGrandTotalColumn;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function isPivotGroupTotalColumn(colDef: ColDef): boolean;
|
|
1
|
+
export declare function isPivotGroupTotalColumn(colId: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isPivotGroupTotalColumn = void 0;
|
|
4
|
-
function isPivotGroupTotalColumn(
|
|
4
|
+
function isPivotGroupTotalColumn(colId) {
|
|
5
5
|
// pivot group total are spanning cross all aggregations
|
|
6
6
|
// therefore the last part of the colId is empty (hence the "dangling" underscore)
|
|
7
|
-
return
|
|
7
|
+
return colId?.startsWith('pivot_') && colId?.endsWith('_');
|
|
8
8
|
}
|
|
9
9
|
exports.isPivotGroupTotalColumn = isPivotGroupTotalColumn;
|
|
@@ -144,9 +144,6 @@ function normalizePivotLayoutModel(layout) {
|
|
|
144
144
|
// make it an own property
|
|
145
145
|
layout.SuppressAggFuncInHeader = undefined;
|
|
146
146
|
}
|
|
147
|
-
if (!layout.GrandTotalRow) {
|
|
148
|
-
layout.GrandTotalRow = false;
|
|
149
|
-
}
|
|
150
147
|
return layout;
|
|
151
148
|
}
|
|
152
149
|
exports.normalizePivotLayoutModel = normalizePivotLayoutModel;
|
|
@@ -314,6 +314,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
314
314
|
isOpt: boolean;
|
|
315
315
|
}[];
|
|
316
316
|
};
|
|
317
|
+
AdaptableColumnType: {
|
|
318
|
+
name: string;
|
|
319
|
+
kind: string;
|
|
320
|
+
desc: string;
|
|
321
|
+
};
|
|
317
322
|
AdaptableComment: {
|
|
318
323
|
name: string;
|
|
319
324
|
kind: string;
|
|
@@ -920,11 +925,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
920
925
|
desc: string;
|
|
921
926
|
}[];
|
|
922
927
|
};
|
|
923
|
-
AdaptableSpecialColumnType: {
|
|
924
|
-
name: string;
|
|
925
|
-
kind: string;
|
|
926
|
-
desc: string;
|
|
927
|
-
};
|
|
928
928
|
AdaptableState: {
|
|
929
929
|
name: string;
|
|
930
930
|
kind: string;
|
|
@@ -4056,13 +4056,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4056
4056
|
name: string;
|
|
4057
4057
|
kind: string;
|
|
4058
4058
|
desc: string;
|
|
4059
|
-
props: {
|
|
4059
|
+
props: ({
|
|
4060
4060
|
name: string;
|
|
4061
4061
|
kind: string;
|
|
4062
4062
|
desc: string;
|
|
4063
4063
|
isOpt: boolean;
|
|
4064
4064
|
defVal: string;
|
|
4065
|
-
}
|
|
4065
|
+
} | {
|
|
4066
|
+
name: string;
|
|
4067
|
+
kind: string;
|
|
4068
|
+
desc: string;
|
|
4069
|
+
isOpt: boolean;
|
|
4070
|
+
defVal?: undefined;
|
|
4071
|
+
})[];
|
|
4066
4072
|
};
|
|
4067
4073
|
LayoutViewOptions: {
|
|
4068
4074
|
name: string;
|