@adaptabletools/adaptable-cjs 20.0.11 → 20.0.12
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 +3 -3
- 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 +10 -9
- package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -1
- package/src/AdaptableState/LayoutState.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +7 -7
- package/src/Api/Implementation/LayoutHelpers.js +17 -31
- package/src/Api/Internal/ColumnInternalApi.js +4 -4
- 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 +29 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +21 -21
- package/src/agGrid/AdaptableAgGrid.js +3 -3
- package/src/agGrid/AgGridAdapter.js +3 -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 +46 -3
- package/src/layout-manager/src/isPivotColumnTotal.d.ts +1 -0
- package/src/layout-manager/src/{isPivotGroupTotalColumn.js → isPivotColumnTotal.js} +3 -3
- package/src/layout-manager/src/isPivotGrandTotal.d.ts +2 -0
- package/src/layout-manager/src/isPivotGrandTotal.js +7 -0
- package/src/layout-manager/src/normalizeLayoutModel.js +24 -0
- package/src/layout-manager/src/simplifyLayoutModel.js +10 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/layout-manager/src/isPivotGrandTotalColumn.d.ts +0 -2
- package/src/layout-manager/src/isPivotGrandTotalColumn.js +0 -7
- package/src/layout-manager/src/isPivotGroupTotalColumn.d.ts +0 -1
|
@@ -5,7 +5,7 @@ import { AdaptableModuleView, IModule } from './Interface/IModule';
|
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
6
6
|
export declare class SystemStatusModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
|
-
createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "chart-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar"
|
|
8
|
+
createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemShowPopup<"separator" | "calculated-column-edit" | "cell-summary-show" | "chart-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar">[];
|
|
9
9
|
createContextMenuItems(menuContext: ContextMenuContext): import("../Utilities/MenuItem").MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-all-data" | "export-all-data-excel-download" | "export-all-data-visualexcel-download" | "export-all-data-csv" | "export-all-data-csv-download" | "export-all-data-csv-clipboard" | "export-all-data-json" | "export-all-data-json-download" | "export-all-data-json-clipboard" | "export-current-layout" | "export-current-layout-excel-download" | "export-current-layout-visualexcel-download" | "export-current-layout-csv" | "export-current-layout-csv-download" | "export-current-layout-csv-clipboard" | "export-current-layout-json" | "export-current-layout-json-download" | "export-current-layout-json-clipboard" | "export-selected-data" | "export-selected-data-excel-download" | "export-selected-data-visualexcel-download" | "export-selected-data-csv" | "export-selected-data-csv-download" | "export-selected-data-csv-clipboard" | "export-selected-data-json" | "export-selected-data-json-download" | "export-selected-data-json-clipboard" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
|
|
10
10
|
getViewProperties(): AdaptableModuleView;
|
|
11
11
|
}
|
|
@@ -4,6 +4,7 @@ import { AccessLevel } from '../../AdaptableState/Common/Entitlement';
|
|
|
4
4
|
export declare function addUuidsToInitialState(initialState: InitialState): InitialState;
|
|
5
5
|
export declare function getAccessLevelForObject(adaptableObject: AdaptableObject, moduleAccessLevel: AccessLevel): AccessLevel;
|
|
6
6
|
export declare function addAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
7
|
+
export declare function removeAdaptableObjectPrimitivesInlineDeep(target: any): any;
|
|
7
8
|
export declare function removeAdaptableObjectPrimitivesInline(target: any): any;
|
|
8
9
|
export declare function removeAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
9
10
|
export declare function isAdaptableObject(object: unknown): object is AdaptableObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.removeAdaptableObjectPrimitivesInline = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.addUuidsToInitialState = void 0;
|
|
3
|
+
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.removeAdaptableObjectPrimitivesInline = exports.removeAdaptableObjectPrimitivesInlineDeep = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.addUuidsToInitialState = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
|
|
6
6
|
const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
|
|
@@ -50,8 +50,35 @@ function addAdaptableObjectPrimitives(adaptableObject) {
|
|
|
50
50
|
return adaptableObject;
|
|
51
51
|
}
|
|
52
52
|
exports.addAdaptableObjectPrimitives = addAdaptableObjectPrimitives;
|
|
53
|
+
function removeAdaptableObjectPrimitivesInlineDeep(target) {
|
|
54
|
+
if (!target) {
|
|
55
|
+
return target;
|
|
56
|
+
}
|
|
57
|
+
if (Array.isArray(target)) {
|
|
58
|
+
target.forEach(removeAdaptableObjectPrimitivesInlineDeep);
|
|
59
|
+
return target;
|
|
60
|
+
}
|
|
61
|
+
if (typeof target !== 'object') {
|
|
62
|
+
return target;
|
|
63
|
+
}
|
|
64
|
+
delete target.Source;
|
|
65
|
+
delete target.Uuid;
|
|
66
|
+
delete target.AdaptableVersion;
|
|
67
|
+
for (const key in target) {
|
|
68
|
+
removeAdaptableObjectPrimitivesInlineDeep(target[key]);
|
|
69
|
+
}
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
exports.removeAdaptableObjectPrimitivesInlineDeep = removeAdaptableObjectPrimitivesInlineDeep;
|
|
53
73
|
function removeAdaptableObjectPrimitivesInline(target) {
|
|
54
|
-
if (!target
|
|
74
|
+
if (!target) {
|
|
75
|
+
return target;
|
|
76
|
+
}
|
|
77
|
+
if (Array.isArray(target)) {
|
|
78
|
+
target.forEach(removeAdaptableObjectPrimitivesInline);
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
if (typeof target !== 'object') {
|
|
55
82
|
return target;
|
|
56
83
|
}
|
|
57
84
|
delete target.Source;
|
|
@@ -128,7 +128,7 @@ const PivotColumnRow = (props) => {
|
|
|
128
128
|
}
|
|
129
129
|
return {
|
|
130
130
|
...aggCol,
|
|
131
|
-
|
|
131
|
+
Total: updatedTotalColumn,
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
return aggCol;
|
|
@@ -138,18 +138,18 @@ const PivotColumnRow = (props) => {
|
|
|
138
138
|
};
|
|
139
139
|
});
|
|
140
140
|
const currentAggCol = props.layout.PivotAggregationColumns?.find((aggCol) => aggCol.ColumnId === props.column.columnId);
|
|
141
|
-
const currentTotal = currentAggCol?.
|
|
142
|
-
? currentAggCol.
|
|
141
|
+
const currentTotal = currentAggCol?.Total
|
|
142
|
+
? currentAggCol.Total === true || currentAggCol.Total === 'before'
|
|
143
143
|
? 'Before'
|
|
144
|
-
: currentAggCol.
|
|
144
|
+
: currentAggCol.Total === 'after'
|
|
145
145
|
? 'After'
|
|
146
|
-
: Array.isArray(currentAggCol.
|
|
146
|
+
: Array.isArray(currentAggCol.Total)
|
|
147
147
|
? 'Pivot Specific'
|
|
148
148
|
: 'Off'
|
|
149
149
|
: 'Off';
|
|
150
|
-
const hasPivotSpecificTotals = Array.isArray(currentAggCol?.
|
|
151
|
-
const pivotSpecificTotals = Array.isArray(currentAggCol?.
|
|
152
|
-
? currentAggCol.
|
|
150
|
+
const hasPivotSpecificTotals = Array.isArray(currentAggCol?.Total);
|
|
151
|
+
const pivotSpecificTotals = Array.isArray(currentAggCol?.Total)
|
|
152
|
+
? currentAggCol.Total
|
|
153
153
|
: props.layout.PivotColumns?.map((pivotColId) => ({
|
|
154
154
|
PivotColumnId: pivotColId,
|
|
155
155
|
ShowTotal: false,
|
|
@@ -163,7 +163,7 @@ const PivotColumnRow = (props) => {
|
|
|
163
163
|
}
|
|
164
164
|
return total;
|
|
165
165
|
});
|
|
166
|
-
return { ...aggCol,
|
|
166
|
+
return { ...aggCol, Total: updatedTotals };
|
|
167
167
|
}
|
|
168
168
|
return aggCol;
|
|
169
169
|
});
|
|
@@ -257,7 +257,7 @@ const PivotAggregationsSection = (props) => {
|
|
|
257
257
|
ColumnId: colId,
|
|
258
258
|
AggFunc: currentAggColumns.find((x) => x.ColumnId === colId)?.AggFunc ??
|
|
259
259
|
adaptable.api.columnApi.getDefaultAggFunc(colId),
|
|
260
|
-
TotalColumn: currentAggColumns.find((x) => x.ColumnId === colId)?.
|
|
260
|
+
TotalColumn: currentAggColumns.find((x) => x.ColumnId === colId)?.Total,
|
|
261
261
|
};
|
|
262
262
|
});
|
|
263
263
|
props.onChange({
|
|
@@ -266,9 +266,9 @@ const PivotAggregationsSection = (props) => {
|
|
|
266
266
|
});
|
|
267
267
|
}, [layout]);
|
|
268
268
|
const handleAggregationChange = React.useCallback((pivotAggregationColumns) => {
|
|
269
|
-
if (pivotAggregationColumns.some((aggCol) => aggCol.
|
|
269
|
+
if (pivotAggregationColumns.some((aggCol) => aggCol.Total !== false || aggCol.Total !== null)) {
|
|
270
270
|
// if any Aggregation Column has a Total Column, we need to disable the Pivot Group Total Column
|
|
271
|
-
delete layout['
|
|
271
|
+
delete layout['PivotColumnTotal'];
|
|
272
272
|
}
|
|
273
273
|
props.onChange({
|
|
274
274
|
...layout,
|
|
@@ -302,7 +302,7 @@ const PivotAggregationsSection = (props) => {
|
|
|
302
302
|
SuppressAggFuncInHeader: checked,
|
|
303
303
|
});
|
|
304
304
|
};
|
|
305
|
-
const
|
|
305
|
+
const checkIfPivotColumnTotalEnabled = () => {
|
|
306
306
|
// check that all AggregationColumns have identical AggFuncs
|
|
307
307
|
const aggregationColumns = layout.PivotAggregationColumns;
|
|
308
308
|
if (!aggregationColumns || aggregationColumns.length === 0) {
|
|
@@ -313,13 +313,13 @@ const PivotAggregationsSection = (props) => {
|
|
|
313
313
|
return 'Requires identical aggregation on all columns';
|
|
314
314
|
}
|
|
315
315
|
// check that no Aggregation Total Column is enabled
|
|
316
|
-
const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.
|
|
316
|
+
const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null);
|
|
317
317
|
if (hasAggregationTotalColumn) {
|
|
318
318
|
return 'Can only be enabled when no Aggregation Total Column is present';
|
|
319
319
|
}
|
|
320
320
|
return true;
|
|
321
321
|
};
|
|
322
|
-
const
|
|
322
|
+
const isPivotColumnTotalEnabled = checkIfPivotColumnTotalEnabled();
|
|
323
323
|
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
324
324
|
React.createElement(Tabs_1.Tabs.Tab, null, "Column Aggregations"),
|
|
325
325
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -345,23 +345,23 @@ const PivotAggregationsSection = (props) => {
|
|
|
345
345
|
label: StringExtensions_1.default.CapitaliseFirstLetter(position),
|
|
346
346
|
value: position,
|
|
347
347
|
};
|
|
348
|
-
}), placeholder: "Off", value: layout.
|
|
348
|
+
}), placeholder: "Off", value: layout.PivotGrandTotal, onChange: (value) => {
|
|
349
349
|
props.onChange({
|
|
350
350
|
...layout,
|
|
351
|
-
|
|
351
|
+
PivotGrandTotal: value,
|
|
352
352
|
});
|
|
353
353
|
}, isClearable: true })),
|
|
354
|
-
React.createElement(FormLayout_1.FormRow, { label: 'Pivot Group Total Column' },
|
|
354
|
+
React.createElement(FormLayout_1.FormRow, { label: 'Pivot Group Total Column' }, isPivotColumnTotalEnabled === true ? (React.createElement(Select_1.Select, { style: { width: 120 }, options: ['before', 'after'].map((position) => {
|
|
355
355
|
return {
|
|
356
356
|
label: StringExtensions_1.default.CapitaliseFirstLetter(position),
|
|
357
357
|
value: position,
|
|
358
358
|
};
|
|
359
|
-
}), placeholder: "Off", value: layout.
|
|
359
|
+
}), placeholder: "Off", value: layout.PivotColumnTotal, onChange: (value) => {
|
|
360
360
|
props.onChange({
|
|
361
361
|
...layout,
|
|
362
|
-
|
|
362
|
+
PivotColumnTotal: value,
|
|
363
363
|
});
|
|
364
|
-
}, isClearable: true })) : (React.createElement(rebass_1.Text, { marginLeft: 1, style: { fontStyle: 'italic' } },
|
|
364
|
+
}, isClearable: true })) : (React.createElement(rebass_1.Text, { marginLeft: 1, style: { fontStyle: 'italic' } }, isPivotColumnTotalEnabled))))),
|
|
365
365
|
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (column) => (React.createElement(PivotColumnRow, { onChangeAggFunction: handleAggregationChange, layout: layout, column: column, aggregationColumnsMap: aggregationColumnsMap, numberColumns: numberColumns })), options: sortedAggregableColumns, value: (layout.PivotAggregationColumns || []).map((col) => col.ColumnId), allowReorder: true, xSelectedLabel: () => {
|
|
366
366
|
return `Active aggregations:`;
|
|
367
367
|
}, onChange: handleColumnsSelectionChange }))));
|
|
@@ -3338,14 +3338,14 @@ You need to define at least one Layout!`);
|
|
|
3338
3338
|
if (!(0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
3339
3339
|
return false;
|
|
3340
3340
|
}
|
|
3341
|
-
if (layout.
|
|
3341
|
+
if (layout.PivotGrandTotal) {
|
|
3342
3342
|
return true;
|
|
3343
3343
|
}
|
|
3344
|
-
if (layout.
|
|
3344
|
+
if (layout.PivotColumnTotal) {
|
|
3345
3345
|
return true;
|
|
3346
3346
|
}
|
|
3347
3347
|
if (layout.PivotAggregationColumns) {
|
|
3348
|
-
return layout.PivotAggregationColumns.some((col) => !!col.
|
|
3348
|
+
return layout.PivotAggregationColumns.some((col) => !!col.Total);
|
|
3349
3349
|
}
|
|
3350
3350
|
};
|
|
3351
3351
|
return hasPivotTotals(one) || hasPivotTotals(other);
|
|
@@ -11,7 +11,7 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
|
|
|
11
11
|
const agGridModules_1 = require("./agGridModules");
|
|
12
12
|
const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
|
|
13
13
|
const ColumnApiImpl_1 = require("../Api/Implementation/ColumnApiImpl");
|
|
14
|
-
const
|
|
14
|
+
const isPivotColumnTotal_1 = require("../layout-manager/src/isPivotColumnTotal");
|
|
15
15
|
const isPivotAggTotalColumn_1 = require("../layout-manager/src/isPivotAggTotalColumn");
|
|
16
16
|
// AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
|
|
17
17
|
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
@@ -614,8 +614,8 @@ class AgGridAdapter {
|
|
|
614
614
|
return this.adaptableApi.actionColumnApi.getActionColumnForColumnId(colDef.colId) != null;
|
|
615
615
|
}
|
|
616
616
|
isPivotTotalColumn(colDef) {
|
|
617
|
-
return ((0, ColumnApiImpl_1.
|
|
618
|
-
(0,
|
|
617
|
+
return ((0, ColumnApiImpl_1.isPivotGrandTotal)(colDef.colId) ||
|
|
618
|
+
(0, isPivotColumnTotal_1.isPivotColumnTotal)(colDef.colId) ||
|
|
619
619
|
(0, isPivotAggTotalColumn_1.isPivotAggTotalColumn)(colDef));
|
|
620
620
|
}
|
|
621
621
|
isColumnFilterable(colDef) {
|
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.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1746136595919 || Date.now(),
|
|
6
|
+
VERSION: "20.0.12" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -72,7 +72,7 @@ export type AggregationColumnsModelItem = {
|
|
|
72
72
|
};
|
|
73
73
|
export type AggregationColumnsModel = AggregationColumnsModelItem[];
|
|
74
74
|
export type PivotAggregationColumnsModel = (AggregationColumnsModelItem & {
|
|
75
|
-
|
|
75
|
+
Total?: boolean | 'before' | 'after' | {
|
|
76
76
|
PivotColumnId: string;
|
|
77
77
|
ShowTotal?: boolean | 'before' | 'after';
|
|
78
78
|
}[];
|
|
@@ -116,10 +116,10 @@ export interface PivotLayoutModel extends BaseLayoutModel {
|
|
|
116
116
|
/**
|
|
117
117
|
* Display Total of all Pivot Columns before or after the Pivot Columns
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
PivotGrandTotal?: 'before' | 'after' | boolean;
|
|
120
120
|
/**
|
|
121
121
|
* Display automatically calculated Totals within EACH Pivot Column Group, in the position specified
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
PivotColumnTotal?: 'before' | 'after' | boolean;
|
|
124
124
|
}
|
|
125
125
|
export type LayoutModel = TableLayoutModel | PivotLayoutModel;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
|
|
2
2
|
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
|
|
3
3
|
import { LMEmitter } from './LMEmitter';
|
|
4
|
+
export declare const PIVOT_ANY_TOTAL_COL_TYPE = "pivotAnyTotal";
|
|
5
|
+
export declare const PIVOT_GRAND_TOTAL_COL_TYPE = "pivotGrandTotal";
|
|
6
|
+
export declare const PIVOT_COLUMN_TOTAL_COL_TYPE = "pivotColumnTotal";
|
|
7
|
+
export declare const PIVOT_AGGREGATION_TOTAL_COL_TYPE = "pivotAggregationTotal";
|
|
4
8
|
export type LayoutManagerOptions = {
|
|
5
9
|
gridApi: GridApi;
|
|
6
10
|
debugId: string;
|
|
@@ -74,7 +78,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
74
78
|
private withSuppressColumnAnimation;
|
|
75
79
|
private patchColDefType;
|
|
76
80
|
private setupPivotTotals;
|
|
77
|
-
private
|
|
81
|
+
private patchPivotAggregationTotal;
|
|
78
82
|
private getPivotTotalColumnConfig;
|
|
79
83
|
}
|
|
80
84
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutManager = void 0;
|
|
3
|
+
exports.LayoutManager = exports.PIVOT_AGGREGATION_TOTAL_COL_TYPE = exports.PIVOT_COLUMN_TOTAL_COL_TYPE = exports.PIVOT_GRAND_TOTAL_COL_TYPE = exports.PIVOT_ANY_TOTAL_COL_TYPE = void 0;
|
|
4
4
|
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
5
5
|
const isPivotLayoutModel_1 = require("./isPivotLayoutModel");
|
|
6
6
|
const LMEmitter_1 = require("./LMEmitter");
|
|
@@ -10,8 +10,12 @@ const simplifyLayoutModel_1 = require("./simplifyLayoutModel");
|
|
|
10
10
|
const sortColumnIdsByOrder_1 = require("./sortColumnIdsByOrder");
|
|
11
11
|
const destructurePivotColumnId_1 = require("./destructurePivotColumnId");
|
|
12
12
|
const isPivotAggTotalColumn_1 = require("./isPivotAggTotalColumn");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const isPivotGrandTotal_1 = require("./isPivotGrandTotal");
|
|
14
|
+
const isPivotColumnTotal_1 = require("./isPivotColumnTotal");
|
|
15
|
+
exports.PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
|
|
16
|
+
exports.PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
|
|
17
|
+
exports.PIVOT_COLUMN_TOTAL_COL_TYPE = 'pivotColumnTotal';
|
|
18
|
+
exports.PIVOT_AGGREGATION_TOTAL_COL_TYPE = 'pivotAggregationTotal';
|
|
15
19
|
function flattenColDefs(colDefs) {
|
|
16
20
|
const res = [];
|
|
17
21
|
const iteration = (c) => {
|
|
@@ -227,7 +231,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
227
231
|
// emit an event that the layout has changed from the grid
|
|
228
232
|
this.emitSync('gridLayoutChanged', layout);
|
|
229
233
|
const log = this.debugger.extend('gridLayoutChanged');
|
|
230
|
-
log('current grid layout:', JSON.stringify(layout, null, 2), '\nprev layout:\n', prevLayout ? JSON.stringify(prevLayout, null, 2) : 'no prev layout');
|
|
234
|
+
log('current grid layout:', JSON.stringify(layout, null, 2), '\nprev layout:\n', prevLayout ? JSON.stringify(prevLayout, null, 2) : 'no prev layout', '\nchanges from prev to current:\n', (0, isLayoutEqual_1.getChanges)(prevLayout, layout));
|
|
231
235
|
}
|
|
232
236
|
onChange(fn) {
|
|
233
237
|
return this.on('gridLayoutChanged', fn);
|
|
@@ -267,13 +271,13 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
267
271
|
if (layout.SuppressAggFuncInHeader) {
|
|
268
272
|
pivotLayout.SuppressAggFuncInHeader = layout.SuppressAggFuncInHeader;
|
|
269
273
|
}
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
272
|
-
pivotLayout.
|
|
274
|
+
const pivotGrandTotal = this.gridApi.getGridOption('pivotRowTotals');
|
|
275
|
+
if (pivotGrandTotal) {
|
|
276
|
+
pivotLayout.PivotGrandTotal = pivotGrandTotal;
|
|
273
277
|
}
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
276
|
-
pivotLayout.
|
|
278
|
+
const pivotColumnTotal = this.gridApi.getGridOption('pivotColumnGroupTotals');
|
|
279
|
+
if (pivotColumnTotal) {
|
|
280
|
+
pivotLayout.PivotColumnTotal = pivotColumnTotal;
|
|
277
281
|
}
|
|
278
282
|
return (0, simplifyLayoutModel_1.simplifyPivotLayoutModel)(pivotLayout);
|
|
279
283
|
}
|
|
@@ -1051,29 +1055,29 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1051
1055
|
*/
|
|
1052
1056
|
// is common to both Table and Pivot and is applied in applyLayout()
|
|
1053
1057
|
/**
|
|
1054
|
-
*
|
|
1058
|
+
* PivotGrandTotal
|
|
1055
1059
|
*/
|
|
1056
|
-
if (layout.
|
|
1057
|
-
const
|
|
1060
|
+
if (layout.PivotGrandTotal) {
|
|
1061
|
+
const pivotGrandTotal = layout.PivotGrandTotal === true || layout.PivotGrandTotal === 'before'
|
|
1058
1062
|
? 'before'
|
|
1059
|
-
: layout.
|
|
1063
|
+
: layout.PivotGrandTotal === 'after'
|
|
1060
1064
|
? 'after'
|
|
1061
1065
|
: null;
|
|
1062
|
-
this.gridApi.setGridOption('pivotRowTotals',
|
|
1066
|
+
this.gridApi.setGridOption('pivotRowTotals', pivotGrandTotal);
|
|
1063
1067
|
}
|
|
1064
1068
|
else {
|
|
1065
1069
|
this.gridApi.setGridOption('pivotRowTotals', null);
|
|
1066
1070
|
}
|
|
1067
1071
|
/**
|
|
1068
|
-
*
|
|
1072
|
+
* PivotColumnTotal
|
|
1069
1073
|
*/
|
|
1070
|
-
if (layout.
|
|
1071
|
-
const
|
|
1074
|
+
if (layout.PivotColumnTotal) {
|
|
1075
|
+
const pivotColumnTotal = layout.PivotColumnTotal === true || layout.PivotColumnTotal === 'before'
|
|
1072
1076
|
? 'before'
|
|
1073
|
-
: layout.
|
|
1077
|
+
: layout.PivotColumnTotal === 'after'
|
|
1074
1078
|
? 'after'
|
|
1075
1079
|
: null;
|
|
1076
|
-
this.gridApi.setGridOption('pivotColumnGroupTotals',
|
|
1080
|
+
this.gridApi.setGridOption('pivotColumnGroupTotals', pivotColumnTotal);
|
|
1077
1081
|
}
|
|
1078
1082
|
else {
|
|
1079
1083
|
this.gridApi.setGridOption('pivotColumnGroupTotals', null);
|
|
@@ -1129,11 +1133,11 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1129
1133
|
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout)) {
|
|
1130
1134
|
return;
|
|
1131
1135
|
}
|
|
1132
|
-
if ((0,
|
|
1133
|
-
this.patchColDefType(colDef, [
|
|
1136
|
+
if ((0, isPivotGrandTotal_1.isPivotGrandTotal)(colDef)) {
|
|
1137
|
+
this.patchColDefType(colDef, [exports.PIVOT_ANY_TOTAL_COL_TYPE, exports.PIVOT_GRAND_TOTAL_COL_TYPE]);
|
|
1134
1138
|
}
|
|
1135
|
-
if ((0,
|
|
1136
|
-
this.patchColDefType(colDef, [
|
|
1139
|
+
if ((0, isPivotColumnTotal_1.isPivotColumnTotal)(colDef.colId)) {
|
|
1140
|
+
this.patchColDefType(colDef, [exports.PIVOT_ANY_TOTAL_COL_TYPE, exports.PIVOT_COLUMN_TOTAL_COL_TYPE]);
|
|
1137
1141
|
}
|
|
1138
1142
|
});
|
|
1139
1143
|
const _original_processPivotResultColGroupDef = this.gridApi.getGridOption('processPivotResultColGroupDef');
|
|
@@ -1142,28 +1146,28 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1142
1146
|
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout)) {
|
|
1143
1147
|
return;
|
|
1144
1148
|
}
|
|
1145
|
-
this.
|
|
1149
|
+
this.patchPivotAggregationTotal(colGroupDef);
|
|
1146
1150
|
});
|
|
1147
1151
|
}
|
|
1148
|
-
|
|
1149
|
-
const
|
|
1150
|
-
return pivotLayout.PivotAggregationColumns?.some((aggCol) => !!aggCol.
|
|
1152
|
+
patchPivotAggregationTotal(colGroupDef) {
|
|
1153
|
+
const hasPivotAggTotals = (pivotLayout) => {
|
|
1154
|
+
return pivotLayout.PivotAggregationColumns?.some((aggCol) => !!aggCol.Total);
|
|
1151
1155
|
};
|
|
1152
|
-
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout) || !
|
|
1156
|
+
if (!(0, isPivotLayoutModel_1.isPivotLayoutModel)(this.currentLayout) || !hasPivotAggTotals(this.currentLayout)) {
|
|
1153
1157
|
return;
|
|
1154
1158
|
}
|
|
1155
|
-
const
|
|
1156
|
-
const
|
|
1157
|
-
const
|
|
1158
|
-
const
|
|
1159
|
+
const pivotGrandTotalsBefore = [];
|
|
1160
|
+
const pivotGrandTotalsAfter = [];
|
|
1161
|
+
const pivotAggTotalsBefore = [];
|
|
1162
|
+
const pivotAggTotalsAfter = [];
|
|
1159
1163
|
const normalColDefs = [];
|
|
1160
1164
|
colGroupDef.children.forEach((colDef) => {
|
|
1161
|
-
if ((0,
|
|
1165
|
+
if ((0, isPivotGrandTotal_1.isPivotGrandTotal)(colDef)) {
|
|
1162
1166
|
if (this.gridApi.getGridOption('pivotRowTotals') === 'after') {
|
|
1163
|
-
|
|
1167
|
+
pivotGrandTotalsAfter.push(colDef);
|
|
1164
1168
|
}
|
|
1165
1169
|
else {
|
|
1166
|
-
|
|
1170
|
+
pivotGrandTotalsBefore.push(colDef);
|
|
1167
1171
|
}
|
|
1168
1172
|
return;
|
|
1169
1173
|
}
|
|
@@ -1172,7 +1176,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1172
1176
|
this.warn(`Pivot total column ${colDef.colId} is not prefixed with 'pivot_', skipping...`);
|
|
1173
1177
|
return;
|
|
1174
1178
|
}
|
|
1175
|
-
this.patchColDefType(colDef, [
|
|
1179
|
+
this.patchColDefType(colDef, [exports.PIVOT_ANY_TOTAL_COL_TYPE, exports.PIVOT_AGGREGATION_TOTAL_COL_TYPE]);
|
|
1176
1180
|
// we do this for all total cols, but we will hide the ones that are not visible
|
|
1177
1181
|
colDef.columnGroupShow = undefined;
|
|
1178
1182
|
const totalColConfig = this.getPivotTotalColumnConfig(colDef, this.currentLayout);
|
|
@@ -1181,10 +1185,10 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1181
1185
|
}
|
|
1182
1186
|
else {
|
|
1183
1187
|
if (totalColConfig.position === 'after') {
|
|
1184
|
-
|
|
1188
|
+
pivotAggTotalsAfter.push(colDef);
|
|
1185
1189
|
}
|
|
1186
1190
|
else {
|
|
1187
|
-
|
|
1191
|
+
pivotAggTotalsBefore.push(colDef);
|
|
1188
1192
|
}
|
|
1189
1193
|
}
|
|
1190
1194
|
}
|
|
@@ -1193,11 +1197,11 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1193
1197
|
}
|
|
1194
1198
|
});
|
|
1195
1199
|
colGroupDef.children = [
|
|
1196
|
-
...
|
|
1197
|
-
...
|
|
1200
|
+
...pivotGrandTotalsBefore,
|
|
1201
|
+
...pivotAggTotalsBefore,
|
|
1198
1202
|
...normalColDefs,
|
|
1199
|
-
...
|
|
1200
|
-
...
|
|
1203
|
+
...pivotAggTotalsAfter,
|
|
1204
|
+
...pivotGrandTotalsAfter,
|
|
1201
1205
|
];
|
|
1202
1206
|
}
|
|
1203
1207
|
getPivotTotalColumnConfig(colDef, currentPivotLayout) {
|
|
@@ -1217,7 +1221,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1217
1221
|
this.warn(`Pivot Totals: could NOT find aggregation(value) column with id ${aggregationColumnId}`);
|
|
1218
1222
|
return defaultHiddenConfig;
|
|
1219
1223
|
}
|
|
1220
|
-
const layoutPivotTotalColumn = layoutAggCol.
|
|
1224
|
+
const layoutPivotTotalColumn = layoutAggCol.Total;
|
|
1221
1225
|
if (!layoutPivotTotalColumn) {
|
|
1222
1226
|
return defaultHiddenConfig;
|
|
1223
1227
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
|
|
2
|
+
declare const logger: import("@infinite-table/infinite-react").DebugLogger;
|
|
3
|
+
export declare const getChanges: (l1: any, l2: any) => {
|
|
4
|
+
key: string;
|
|
5
|
+
value1: any;
|
|
6
|
+
value2: any;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const logChanges: (l1: any, l2: any, log?: typeof logger) => void;
|
|
2
9
|
export declare function isTableLayoutEqual(l1: TableLayoutModel, l2: TableLayoutModel): boolean;
|
|
3
10
|
export declare function isPivotLayoutEqual(l1: PivotLayoutModel, l2: PivotLayoutModel): boolean;
|
|
4
11
|
export declare function isLayoutEqual(l1: TableLayoutModel | PivotLayoutModel, l2: TableLayoutModel | PivotLayoutModel): boolean;
|
|
12
|
+
export {};
|
|
@@ -1,20 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLayoutEqual = exports.isPivotLayoutEqual = exports.isTableLayoutEqual = void 0;
|
|
3
|
+
exports.isLayoutEqual = exports.isPivotLayoutEqual = exports.isTableLayoutEqual = exports.logChanges = exports.getChanges = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
6
|
+
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
6
7
|
const isPivotLayoutModel_1 = require("./isPivotLayoutModel");
|
|
7
8
|
const normalizeLayoutModel_1 = require("./normalizeLayoutModel");
|
|
9
|
+
const logger = (0, infinite_react_1.debug)(`LayoutManager:Diffing`);
|
|
10
|
+
const getChanges = (l1, l2) => {
|
|
11
|
+
if (!l1 || typeof l1 !== 'object' || !l2 || typeof l2 !== 'object') {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
key: 'missing',
|
|
15
|
+
value1: l1,
|
|
16
|
+
value2: l2,
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
const k1 = Object.keys(l1);
|
|
21
|
+
const k2 = Object.keys(l2);
|
|
22
|
+
const allKeys = new Set([...k1, ...k2]);
|
|
23
|
+
const changes = [];
|
|
24
|
+
for (const key of allKeys) {
|
|
25
|
+
if (!(0, isEqual_1.default)(l1[key], l2[key])) {
|
|
26
|
+
changes.push({ key, value1: l1[key], value2: l2[key] });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return changes;
|
|
30
|
+
};
|
|
31
|
+
exports.getChanges = getChanges;
|
|
32
|
+
const logChanges = (l1, l2, log) => {
|
|
33
|
+
log = log || logger;
|
|
34
|
+
const changes = (0, exports.getChanges)(l1, l2);
|
|
35
|
+
log('---');
|
|
36
|
+
log('Layouts are not equal.');
|
|
37
|
+
log('Layout 1', l1);
|
|
38
|
+
log('Layout 2', l2);
|
|
39
|
+
log('Differences:', changes);
|
|
40
|
+
log('---');
|
|
41
|
+
};
|
|
42
|
+
exports.logChanges = logChanges;
|
|
8
43
|
function isTableLayoutEqual(l1, l2) {
|
|
9
44
|
l1 = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(l1);
|
|
10
45
|
l2 = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(l2);
|
|
11
|
-
|
|
46
|
+
const res = (0, isEqual_1.default)(l1, l2);
|
|
47
|
+
if (!res) {
|
|
48
|
+
(0, exports.logChanges)(l1, l2);
|
|
49
|
+
}
|
|
50
|
+
return res;
|
|
12
51
|
}
|
|
13
52
|
exports.isTableLayoutEqual = isTableLayoutEqual;
|
|
14
53
|
function isPivotLayoutEqual(l1, l2) {
|
|
15
54
|
l1 = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(l1);
|
|
16
55
|
l2 = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(l2);
|
|
17
|
-
|
|
56
|
+
const res = (0, isEqual_1.default)(l1, l2);
|
|
57
|
+
if (!res) {
|
|
58
|
+
(0, exports.logChanges)(l1, l2);
|
|
59
|
+
}
|
|
60
|
+
return res;
|
|
18
61
|
}
|
|
19
62
|
exports.isPivotLayoutEqual = isPivotLayoutEqual;
|
|
20
63
|
function isLayoutEqual(l1, l2) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPivotColumnTotal(colId: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.isPivotColumnTotal = void 0;
|
|
4
|
+
function isPivotColumnTotal(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
7
|
return colId?.startsWith('pivot_') && colId?.endsWith('_');
|
|
8
8
|
}
|
|
9
|
-
exports.
|
|
9
|
+
exports.isPivotColumnTotal = isPivotColumnTotal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPivotGrandTotal = void 0;
|
|
4
|
+
function isPivotGrandTotal(colDef) {
|
|
5
|
+
return colDef?.colId?.startsWith('PivotRowTotal_pivot_');
|
|
6
|
+
}
|
|
7
|
+
exports.isPivotGrandTotal = isPivotGrandTotal;
|
|
@@ -29,6 +29,14 @@ function normalizeTableLayoutModel(layout, options) {
|
|
|
29
29
|
if (!layout.RowGroupedColumns) {
|
|
30
30
|
layout.RowGroupedColumns = [];
|
|
31
31
|
}
|
|
32
|
+
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
33
|
+
// make it an own property
|
|
34
|
+
layout.SuppressAggFuncInHeader = undefined;
|
|
35
|
+
}
|
|
36
|
+
if (!('GrandTotalRow' in layout)) {
|
|
37
|
+
// make it an own property
|
|
38
|
+
layout.GrandTotalRow = undefined;
|
|
39
|
+
}
|
|
32
40
|
const ColumnOrderSet = new Set(layout.TableColumns);
|
|
33
41
|
if (layout.RowGroupedColumns && layout.RowGroupedColumns.length && layout.TableColumns) {
|
|
34
42
|
// the layout.TableColumns might not include the group columns
|
|
@@ -136,6 +144,22 @@ function normalizePivotLayoutModel(layout) {
|
|
|
136
144
|
RowGroupDisplay: 'always-collapsed',
|
|
137
145
|
};
|
|
138
146
|
}
|
|
147
|
+
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
148
|
+
// make it an own property
|
|
149
|
+
layout.SuppressAggFuncInHeader = undefined;
|
|
150
|
+
}
|
|
151
|
+
if (!('GrandTotalRow' in layout)) {
|
|
152
|
+
// make it an own property
|
|
153
|
+
layout.GrandTotalRow = undefined;
|
|
154
|
+
}
|
|
155
|
+
if (!('PivotGrandTotal' in layout)) {
|
|
156
|
+
// make it an own property
|
|
157
|
+
layout.PivotGrandTotal = undefined;
|
|
158
|
+
}
|
|
159
|
+
if (!('PivotColumnTotal' in layout)) {
|
|
160
|
+
// make it an own property
|
|
161
|
+
layout.PivotColumnTotal = undefined;
|
|
162
|
+
}
|
|
139
163
|
return layout;
|
|
140
164
|
}
|
|
141
165
|
exports.normalizePivotLayoutModel = normalizePivotLayoutModel;
|