@adaptabletools/adaptable 18.0.0-canary.15 → 18.0.0-canary.17
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 +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +5 -1
- package/src/AdaptableOptions/MenuOptions.js +71 -70
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -3
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +10 -1
- package/src/PredefinedConfig/Common/Menu.js +71 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +12 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -5
- package/src/Strategy/AdaptableModuleBase.js +9 -8
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +7 -6
- package/src/Strategy/CellSummaryModule.js +37 -12
- package/src/Strategy/ColumnFilterModule.js +8 -7
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/CommentModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -1
- package/src/Strategy/DashboardModule.js +8 -7
- package/src/Strategy/DataImportModule.d.ts +1 -1
- package/src/Strategy/DataImportModule.js +5 -5
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/LayoutModule.js +32 -23
- package/src/Strategy/NoteModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.js +23 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +124 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +42 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +26 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +26 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +14 -14
- package/src/agGrid/AgGridMenuAdapter.js +7 -5
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +6 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -12
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
-
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
4
|
-
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
5
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
7
|
-
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
8
|
-
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
9
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
5
|
+
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
6
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
|
+
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
8
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
9
|
+
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
10
10
|
export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
|
|
11
11
|
cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
|
|
12
12
|
constructor(api: AdaptableApi);
|
|
@@ -15,6 +15,7 @@ export declare class CellSummaryModule extends AdaptableModuleBase implements IC
|
|
|
15
15
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
private createCellSummaryMenuItem;
|
|
17
17
|
createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
|
|
18
|
+
private getWeightedAverageCellSummary;
|
|
18
19
|
getViewProperties(): {
|
|
19
20
|
getStatusBarPanelProps(): {
|
|
20
21
|
view: () => JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
1
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
2
|
import { ArrayExtensions } from '../Utilities/Extensions/ArrayExtensions';
|
|
4
3
|
import { Helper } from '../Utilities/Helpers/Helper';
|
|
4
|
+
import { AggregatedScalarLiveValue } from '../Utilities/Services/AggregatedScalarLiveValue';
|
|
5
5
|
import { CellSummaryStatusPanel } from '../View/CellSummary/CellSummaryStatusPanel';
|
|
6
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
6
7
|
export class CellSummaryModule extends AdaptableModuleBase {
|
|
7
8
|
constructor(api) {
|
|
8
9
|
super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of cells using multiple summary operations', api);
|
|
@@ -36,6 +37,7 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
36
37
|
}
|
|
37
38
|
createCellSummaryMenuItem(popUpParams) {
|
|
38
39
|
return this.createMainMenuItemShowPopup({
|
|
40
|
+
Name: 'cell-summary-show',
|
|
39
41
|
Label: 'See Cell Summary',
|
|
40
42
|
ComponentName: this.moduleInfo.Popup,
|
|
41
43
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -88,17 +90,17 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
88
90
|
Only: '',
|
|
89
91
|
};
|
|
90
92
|
}
|
|
93
|
+
const columnId = selectedCellInfo.columns[0].columnId;
|
|
94
|
+
const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
|
|
91
95
|
const handleExpression = (functionName) => {
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
getRowNodes: () => rowNodes,
|
|
101
|
-
}, ModuleConstants.CellSummaryModuleId);
|
|
96
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
97
|
+
aggregatedScalarExpression: `${functionName}([${columnId}])`,
|
|
98
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
99
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
100
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
101
|
+
value = Helper.roundNumber(value, 2);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
102
104
|
};
|
|
103
105
|
const sumValue = hasNumericColumns ? handleExpression('SUM') : null;
|
|
104
106
|
const avgValue = hasNumericColumns ? Helper.roundNumber(handleExpression('AVG'), 2) : null;
|
|
@@ -123,8 +125,11 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
123
125
|
Only: distinctValue == 1 ? JSON.stringify(allValues[0]) : '',
|
|
124
126
|
};
|
|
125
127
|
numericValues = [...newNumericValues];
|
|
128
|
+
const weightedAverage = this.getWeightedAverageCellSummary(columnId, rowNodes);
|
|
129
|
+
if (weightedAverage !== null) {
|
|
130
|
+
selectedCellSummary.Weighted_Average = weightedAverage;
|
|
131
|
+
}
|
|
126
132
|
const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
127
|
-
const api = this.api;
|
|
128
133
|
operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
|
|
129
134
|
if (operation.operationFunction) {
|
|
130
135
|
const cellSummaryOperationContext = {
|
|
@@ -144,6 +149,26 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
144
149
|
this.cachedCellSummary.set(selectedCellInfo, selectedCellSummary);
|
|
145
150
|
return selectedCellSummary;
|
|
146
151
|
}
|
|
152
|
+
getWeightedAverageCellSummary(columnId, rowNodes) {
|
|
153
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
154
|
+
if (currentLayout.AggregationColumns == undefined) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
const weightedAverageConfig = Object.entries(currentLayout.AggregationColumns).find(([colId, aggCol]) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage' && colId === columnId);
|
|
158
|
+
if (!weightedAverageConfig) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const { weightedColumnId } = weightedAverageConfig[1];
|
|
162
|
+
const expression = `AVG([${columnId}], WEIGHT([${weightedColumnId}]))`;
|
|
163
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
164
|
+
aggregatedScalarExpression: expression,
|
|
165
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
166
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
167
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
168
|
+
value = Helper.roundNumber(value, 2);
|
|
169
|
+
}
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
147
172
|
getViewProperties() {
|
|
148
173
|
return {
|
|
149
174
|
getStatusBarPanelProps() {
|
|
@@ -57,13 +57,13 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
57
57
|
this.api.columnFilterApi.internalApi.createEqualityColumnFilterForCell(menuContext.selectedCellInfo.gridCells[0]);
|
|
58
58
|
};
|
|
59
59
|
return [
|
|
60
|
-
this.createColumnMenuItemClickFunction(isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
60
|
+
this.createColumnMenuItemClickFunction('filter-cell-value', isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
let filterSubMenuItems = [];
|
|
65
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
66
|
-
filterSubMenuItems.push(this.createColumnMenuItemClickFunction(existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
65
|
+
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
66
|
+
filterSubMenuItems.push(this.createColumnMenuItemClickFunction('filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
67
67
|
? () => {
|
|
68
68
|
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
69
69
|
}
|
|
@@ -71,7 +71,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
71
71
|
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
72
72
|
}));
|
|
73
73
|
return [
|
|
74
|
-
{
|
|
74
|
+
{ name: 'filter',
|
|
75
75
|
label: this.moduleInfo.FriendlyName,
|
|
76
76
|
isVisible: true,
|
|
77
77
|
module: this.moduleInfo.ModuleName,
|
|
@@ -94,21 +94,22 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
94
94
|
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
95
95
|
if (this.isModuleEditable() &&
|
|
96
96
|
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
97
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
97
|
+
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-bar-visbility', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
98
98
|
? SystemRedux.SystemQuickFilterBarHide()
|
|
99
99
|
: SystemRedux.SystemQuickFilterBarShow()));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
103
103
|
if (existingColumnFilter) {
|
|
104
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
105
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
104
|
+
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
105
|
+
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
106
106
|
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
107
107
|
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
108
108
|
}
|
|
109
109
|
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
110
110
|
return [
|
|
111
111
|
{
|
|
112
|
+
name: 'filter',
|
|
112
113
|
label: this.moduleInfo.FriendlyName,
|
|
113
114
|
isVisible: true,
|
|
114
115
|
module: this.moduleInfo.ModuleName,
|
|
@@ -15,6 +15,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
15
15
|
};
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
+
Name: 'column-info',
|
|
18
19
|
Label: 'Column Info',
|
|
19
20
|
ComponentName: this.moduleInfo.Popup,
|
|
20
21
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -31,6 +32,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
31
32
|
};
|
|
32
33
|
return [
|
|
33
34
|
this.createMainMenuItemShowPopup({
|
|
35
|
+
Name: 'column-info',
|
|
34
36
|
Label: 'Column Info',
|
|
35
37
|
ComponentName: this.moduleInfo.Popup,
|
|
36
38
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -58,12 +58,12 @@ export class CommentModule extends AdaptableModuleBase {
|
|
|
58
58
|
return items;
|
|
59
59
|
}
|
|
60
60
|
if (comments) {
|
|
61
|
-
items.push(this.createColumnMenuItemClickFunction('Remove
|
|
61
|
+
items.push(this.createColumnMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
62
62
|
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
items.push(this.createColumnMenuItemClickFunction('Add Comment', this.moduleInfo.Glyph, () => {
|
|
66
|
+
items.push(this.createColumnMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
67
67
|
// add an empty one
|
|
68
68
|
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
69
69
|
requestAnimationFrame(() => {
|
|
@@ -34,8 +34,9 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
34
34
|
action: customSort ? 'Edit' : 'New',
|
|
35
35
|
source: 'ColumnMenu',
|
|
36
36
|
};
|
|
37
|
+
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
37
38
|
return [
|
|
38
|
-
this.createColumnMenuItemShowPopup(label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
39
|
+
this.createColumnMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
39
40
|
];
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -27,28 +27,29 @@ export class DashboardModule extends AdaptableModuleBase {
|
|
|
27
27
|
if (this.isModuleAvailable()) {
|
|
28
28
|
let menuItems = [];
|
|
29
29
|
if (this.isModuleEditable()) {
|
|
30
|
-
menuItems.push(this.createColumnMenuItemClickFunction('Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
30
|
+
menuItems.push(this.createColumnMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
31
31
|
}
|
|
32
32
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
33
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
33
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
36
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
37
37
|
}
|
|
38
38
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
39
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
39
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
40
40
|
}
|
|
41
41
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
42
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
42
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
43
43
|
}
|
|
44
44
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
45
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
45
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
48
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
49
49
|
}
|
|
50
50
|
return [
|
|
51
51
|
{
|
|
52
|
+
name: 'dashboard',
|
|
52
53
|
label: this.moduleInfo.FriendlyName,
|
|
53
54
|
isVisible: true,
|
|
54
55
|
module: this.moduleInfo.ModuleName,
|
|
@@ -7,5 +7,5 @@ export declare class DataImportModule extends AdaptableModuleBase implements IMo
|
|
|
7
7
|
addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
8
8
|
addContextMenuItems(): AdaptableMenuItem[] | undefined;
|
|
9
9
|
addColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
10
|
-
private
|
|
10
|
+
private createDataImportMenuItem;
|
|
11
11
|
}
|
|
@@ -6,26 +6,26 @@ export class DataImportModule extends AdaptableModuleBase {
|
|
|
6
6
|
}
|
|
7
7
|
addModuleMenuItem(source) {
|
|
8
8
|
if (this.isModuleAvailable()) {
|
|
9
|
-
return this.
|
|
9
|
+
return this.createDataImportMenuItem(source);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
addContextMenuItems() {
|
|
13
13
|
if (this.isModuleAvailable()) {
|
|
14
|
-
return [this.
|
|
14
|
+
return [this.createDataImportMenuItem('ContextMenu')];
|
|
15
15
|
}
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
18
|
addColumnMenuItems() {
|
|
19
19
|
if (this.isModuleAvailable()) {
|
|
20
|
-
return [this.
|
|
20
|
+
return [this.createDataImportMenuItem('ColumnMenu')];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
createDataImportMenuItem(source) {
|
|
24
24
|
const moduleParams = {
|
|
25
25
|
action: 'New',
|
|
26
26
|
source: source,
|
|
27
27
|
maxWidth: this.getPopupMaxWidth(),
|
|
28
28
|
};
|
|
29
|
-
return this.createColumnMenuItemShowPopup('Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
29
|
+
return this.createColumnMenuItemShowPopup('data-import', 'Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,6 +15,7 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
15
15
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
private buildReportMenuItems;
|
|
17
17
|
private buildExportMenuItem;
|
|
18
|
+
private getMenuName;
|
|
18
19
|
export(report: Report, exportDestination: ExportDestination | string): Promise<void>;
|
|
19
20
|
private preProcessExport;
|
|
20
21
|
private isCustomDestination;
|
|
@@ -86,15 +86,16 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
86
86
|
buildReportMenuItems(report) {
|
|
87
87
|
const menuItems = [];
|
|
88
88
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
89
|
-
menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
89
|
+
menuItems.push(this.createColumnMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
90
90
|
}
|
|
91
91
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
92
|
-
menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
92
|
+
menuItems.push(this.createColumnMenuItemClickFunction('export-custom-destination', customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
93
93
|
}
|
|
94
94
|
return menuItems;
|
|
95
95
|
}
|
|
96
96
|
buildExportMenuItem(label, subItems) {
|
|
97
97
|
return {
|
|
98
|
+
name: 'export',
|
|
98
99
|
label: label,
|
|
99
100
|
module: this.moduleInfo.ModuleName,
|
|
100
101
|
isVisible: true,
|
|
@@ -102,6 +103,20 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
102
103
|
subItems: subItems,
|
|
103
104
|
};
|
|
104
105
|
}
|
|
106
|
+
getMenuName(exportDestination) {
|
|
107
|
+
switch (exportDestination) {
|
|
108
|
+
case ExportDestination.CSV:
|
|
109
|
+
return 'export-csv';
|
|
110
|
+
case ExportDestination.Clipboard:
|
|
111
|
+
return 'export-clipboard';
|
|
112
|
+
case ExportDestination.Excel:
|
|
113
|
+
return 'export-excel';
|
|
114
|
+
case ExportDestination.JSON:
|
|
115
|
+
return 'export-json';
|
|
116
|
+
case ExportDestination.Table:
|
|
117
|
+
return 'export-table';
|
|
118
|
+
}
|
|
119
|
+
}
|
|
105
120
|
async export(report, exportDestination) {
|
|
106
121
|
var _a;
|
|
107
122
|
const cleanupExportProcess = () => {
|
|
@@ -27,6 +27,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
27
27
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
28
28
|
if (contextMenuItems.length > 1) {
|
|
29
29
|
const groupMenuItem = {
|
|
30
|
+
name: 'fdc3',
|
|
30
31
|
module: this.moduleInfo.ModuleName,
|
|
31
32
|
label: 'FDC3',
|
|
32
33
|
icon: {
|
|
@@ -44,6 +45,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
44
45
|
var _a, _b, _c;
|
|
45
46
|
const { intentType, contextType } = intentConfig;
|
|
46
47
|
const menuItem = {
|
|
48
|
+
name: 'fdc3-raise-intent',
|
|
47
49
|
label: `Raise ${intentType}`,
|
|
48
50
|
onClick: () => {
|
|
49
51
|
this.getFdc3Api().raiseIntentFromRow(rowNode, intentType, contextType);
|
|
@@ -63,6 +65,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
63
65
|
var _a, _b, _c;
|
|
64
66
|
const { contextType } = contextConfig;
|
|
65
67
|
const menuItem = {
|
|
68
|
+
name: 'fdc3-broadcast',
|
|
66
69
|
label: `Broadcast ${this.getFdc3Api().getContextLabel(contextType)}`,
|
|
67
70
|
onClick: () => {
|
|
68
71
|
this.getFdc3Api().broadcastFromRow(rowNode, contextType);
|
|
@@ -69,11 +69,11 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
69
69
|
});
|
|
70
70
|
if (flashingCellForCurrentColumn) {
|
|
71
71
|
return [
|
|
72
|
-
this.createColumnMenuItemReduxAction('
|
|
72
|
+
this.createColumnMenuItemReduxAction('flashing-cell-delete', 'Delete Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionDelete(flashingCellForCurrentColumn)),
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
75
|
return [
|
|
76
|
-
this.createColumnMenuItemReduxAction('Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
76
|
+
this.createColumnMenuItemReduxAction('flashing-cell-add', 'Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
77
77
|
Scope: {
|
|
78
78
|
ColumnIds: [column.columnId],
|
|
79
79
|
},
|
|
@@ -95,11 +95,11 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
95
95
|
if (flashingCellForRow.flashTarget === 'row' ||
|
|
96
96
|
(Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
|
|
97
97
|
flashingCellForRow.flashTarget.includes('row'))) {
|
|
98
|
-
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
98
|
+
items.push(this.createColumnMenuItemReduxAction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
|
|
102
|
-
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
102
|
+
items.push(this.createColumnMenuItemReduxAction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -45,12 +45,12 @@ export class FormatColumnModule extends AdaptableModuleBase {
|
|
|
45
45
|
action: 'New',
|
|
46
46
|
source: 'ColumnMenu',
|
|
47
47
|
};
|
|
48
|
-
const createFormatColumnMenuItem = this.createColumnMenuItemShowPopup('Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
48
|
+
const createFormatColumnMenuItem = this.createColumnMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
49
49
|
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
50
50
|
// .filter((fc) => this.api.scopeApi.isSingleColumnScope(fc.Scope));
|
|
51
51
|
// if no formats then just show Create
|
|
52
52
|
if (ArrayExtensions.IsNullOrEmpty(formatColumnsForColumn)) {
|
|
53
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
53
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
54
54
|
// if 1 format then show a Create and an Edit
|
|
55
55
|
}
|
|
56
56
|
else if (formatColumnsForColumn.length == 1) {
|
|
@@ -60,8 +60,9 @@ export class FormatColumnModule extends AdaptableModuleBase {
|
|
|
60
60
|
value: formatColumnsForColumn[0],
|
|
61
61
|
source: 'ColumnMenu',
|
|
62
62
|
};
|
|
63
|
-
const editFormatColumnMenuItem = this.createColumnMenuItemShowPopup('Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
63
|
+
const editFormatColumnMenuItem = this.createColumnMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
64
64
|
returnColumnMenuItems.push({
|
|
65
|
+
name: 'format-column',
|
|
65
66
|
label: 'Format Column',
|
|
66
67
|
module: this.moduleInfo.ModuleName,
|
|
67
68
|
isVisible: true,
|
|
@@ -76,8 +77,9 @@ export class FormatColumnModule extends AdaptableModuleBase {
|
|
|
76
77
|
const moduleInfo = this.api.internalApi
|
|
77
78
|
.getModuleService()
|
|
78
79
|
.getModuleInfoByModule('FormatColumn');
|
|
79
|
-
const editFormatColumnMenuItem = this.createColumnMenuItemReduxAction('Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
80
|
+
const editFormatColumnMenuItem = this.createColumnMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
80
81
|
returnColumnMenuItems.push({
|
|
82
|
+
name: 'format-column',
|
|
81
83
|
label: 'Format Column',
|
|
82
84
|
module: this.moduleInfo.ModuleName,
|
|
83
85
|
isVisible: true,
|
|
@@ -28,7 +28,7 @@ export class FreeTextColumnModule extends AdaptableModuleBase {
|
|
|
28
28
|
source: 'ColumnMenu',
|
|
29
29
|
};
|
|
30
30
|
return [
|
|
31
|
-
this.createColumnMenuItemShowPopup('Edit Free Text Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
31
|
+
this.createColumnMenuItemShowPopup('free-text-column-edit', 'Edit Free Text Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -11,6 +11,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
11
11
|
if (this.isModuleAvailable()) {
|
|
12
12
|
return [
|
|
13
13
|
this.createMainMenuItemShowPopup({
|
|
14
|
+
Name: 'grid-info',
|
|
14
15
|
Label: 'Grid Info',
|
|
15
16
|
ComponentName: this.moduleInfo.Popup,
|
|
16
17
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -22,6 +23,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
22
23
|
if (this.isModuleAvailable()) {
|
|
23
24
|
return [
|
|
24
25
|
this.createMainMenuItemShowPopup({
|
|
26
|
+
Name: 'grid-info',
|
|
25
27
|
Label: 'Grid Info',
|
|
26
28
|
ComponentName: this.moduleInfo.Popup,
|
|
27
29
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -15,8 +15,9 @@ import { SHOW_PIVOT_COLUMN_DETAILS } from '../View/Components/Popups/WindowPopup
|
|
|
15
15
|
import flattenDeep from 'lodash/flattenDeep';
|
|
16
16
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
17
17
|
import { getGridFilterViewItems } from '../View/Layout/Wizard/getGridFilterPreview';
|
|
18
|
+
import { AggregatedScalarLiveValue } from '../Utilities/Services/AggregatedScalarLiveValue';
|
|
18
19
|
import { SystemRowSummartSet } from '../Redux/ActionsReducers/SystemRedux';
|
|
19
|
-
import { ROW_SUMMARY_ROW_ID } from '../PredefinedConfig/Common/RowSummary';
|
|
20
|
+
import { ROW_SUMMARY_ROW_ID, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } from '../PredefinedConfig/Common/RowSummary';
|
|
20
21
|
import Helper from '../Utilities/Helpers/Helper';
|
|
21
22
|
export class LayoutModule extends AdaptableModuleBase {
|
|
22
23
|
constructor(api) {
|
|
@@ -144,7 +145,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
144
145
|
if (this.isModuleEditable()) {
|
|
145
146
|
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
146
147
|
if (!isReadOnlyLayout) {
|
|
147
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
148
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
148
149
|
action: 'Edit',
|
|
149
150
|
source: 'ColumnMenu',
|
|
150
151
|
value: this.api.layoutApi.getCurrentLayout(),
|
|
@@ -152,10 +153,10 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
152
153
|
}
|
|
153
154
|
if (column) {
|
|
154
155
|
if (!isReadOnlyLayout) {
|
|
155
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
156
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
156
157
|
}
|
|
157
158
|
if (column.hideable) {
|
|
158
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'visibility-off-bold', () => {
|
|
159
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
159
160
|
this.api.columnApi.hideColumn(column.columnId);
|
|
160
161
|
}));
|
|
161
162
|
}
|
|
@@ -164,23 +165,24 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
164
165
|
if (column) {
|
|
165
166
|
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
166
167
|
if (hasExistingSelection) {
|
|
167
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column (Preserve Selection)', 'column-add', () => {
|
|
168
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
168
169
|
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
169
170
|
}));
|
|
170
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column (Reset Selection)', 'columns', () => {
|
|
171
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
171
172
|
this.api.columnApi.selectColumn(column.columnId);
|
|
172
173
|
}));
|
|
173
174
|
}
|
|
174
175
|
else {
|
|
175
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column', 'columns', () => {
|
|
176
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
176
177
|
this.api.columnApi.selectColumn(column.columnId);
|
|
177
178
|
}));
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Whole Grid', this.moduleInfo.Glyph, () => {
|
|
181
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
181
182
|
this.api.gridApi.selectAll();
|
|
182
183
|
}));
|
|
183
184
|
returnColumnMenuItems.push({
|
|
185
|
+
name: 'layout-select',
|
|
184
186
|
label: 'Select',
|
|
185
187
|
isVisible: true,
|
|
186
188
|
module: this.moduleInfo.ModuleName,
|
|
@@ -195,7 +197,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
195
197
|
addContextMenuItems(menuContext) {
|
|
196
198
|
let returnColumnMenuItems = [];
|
|
197
199
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
198
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
200
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
199
201
|
action: 'Edit',
|
|
200
202
|
source: 'ColumnMenu',
|
|
201
203
|
}));
|
|
@@ -207,18 +209,19 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
207
209
|
let clickFunction = () => {
|
|
208
210
|
this.api.gridApi.deselectAll();
|
|
209
211
|
};
|
|
210
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Clear Selected Cells', 'undo', clickFunction));
|
|
212
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
211
213
|
if (this.isModuleAvailable()) {
|
|
212
214
|
let gridMenuItems = [];
|
|
213
215
|
let autoSizeFunction = () => {
|
|
214
216
|
this.api.columnApi.autosizeAllColumns();
|
|
215
217
|
};
|
|
216
|
-
gridMenuItems.push(this.createColumnMenuItemClickFunction('Auto Size', 'arrow-expand', autoSizeFunction));
|
|
218
|
+
gridMenuItems.push(this.createColumnMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
217
219
|
let clickFunction = () => {
|
|
218
220
|
this.api.gridApi.selectAll();
|
|
219
221
|
};
|
|
220
|
-
gridMenuItems.push(this.createColumnMenuItemClickFunction('Select', 'tab-unselected', clickFunction));
|
|
222
|
+
gridMenuItems.push(this.createColumnMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
221
223
|
returnColumnMenuItems.push({
|
|
224
|
+
name: 'layout-grid',
|
|
222
225
|
label: 'Grid',
|
|
223
226
|
module: this.moduleInfo.ModuleName,
|
|
224
227
|
isVisible: true,
|
|
@@ -290,6 +293,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
290
293
|
pivotColumnId,
|
|
291
294
|
};
|
|
292
295
|
return {
|
|
296
|
+
name: 'layout-aggregated-view',
|
|
293
297
|
module: this.moduleInfo.ModuleName,
|
|
294
298
|
isVisible: true,
|
|
295
299
|
label: 'Expand Aggregated Value',
|
|
@@ -464,6 +468,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
464
468
|
*/
|
|
465
469
|
evaluateRowSummary(reason) {
|
|
466
470
|
var _a;
|
|
471
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
467
472
|
const rowSummaries = (_a = this.api.layoutApi.getCurrentLayout().RowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
468
473
|
const rowSummariesResults = rowSummaries.map(({ ColumnsMap, Position }) => {
|
|
469
474
|
return {
|
|
@@ -482,17 +487,21 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
482
487
|
}
|
|
483
488
|
if (!expressionLiveValue) {
|
|
484
489
|
try {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
.
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
490
|
+
let aggregatedScalarExpression = `${expression}([${columnId}])`;
|
|
491
|
+
if (aggregatedScalarExpression.includes(WEIGHTED_AVERAGE_AGGREATED_FUNCTION) &&
|
|
492
|
+
currentLayout.AggregationColumns[columnId] &&
|
|
493
|
+
typeof currentLayout.AggregationColumns[columnId] === 'object') {
|
|
494
|
+
const weight = currentLayout.AggregationColumns[columnId]
|
|
495
|
+
.weightedColumnId;
|
|
496
|
+
if (weight) {
|
|
497
|
+
aggregatedScalarExpression = `AVG([${columnId}], WEIGHT([${weight}]))`;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
expressionLiveValue = new AggregatedScalarLiveValue({
|
|
501
|
+
aggregatedScalarExpression,
|
|
502
|
+
}, ModuleConstants.LayoutModuleId, this.api, () => {
|
|
503
|
+
return this.api.gridApi.getVisibleRowNodes();
|
|
504
|
+
});
|
|
496
505
|
}
|
|
497
506
|
catch (e) {
|
|
498
507
|
this.api.logError('Error evaluating row summary', e);
|
|
@@ -41,12 +41,12 @@ export class NoteModule extends AdaptableModuleBase {
|
|
|
41
41
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
42
42
|
})) !== null && _a !== void 0 ? _a : [];
|
|
43
43
|
if (note) {
|
|
44
|
-
items.push(this.createColumnMenuItemClickFunction('Remove Note', this.moduleInfo.Glyph, () => {
|
|
44
|
+
items.push(this.createColumnMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
|
|
45
45
|
this.api.noteApi.deleteNote(note);
|
|
46
46
|
}));
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
-
items.push(this.createColumnMenuItemClickFunction('Add Note', this.moduleInfo.Glyph, () => {
|
|
49
|
+
items.push(this.createColumnMenuItemClickFunction('note-add', 'Add Note', this.moduleInfo.Glyph, () => {
|
|
50
50
|
// add an empty one
|
|
51
51
|
this.api.noteApi.addNote('', menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
52
52
|
this.api.internalApi.getCellPopupService().showPopup({
|
|
@@ -60,7 +60,7 @@ export class PlusMinusModule extends AdaptableModuleBase {
|
|
|
60
60
|
source: 'ColumnMenu',
|
|
61
61
|
};
|
|
62
62
|
return [
|
|
63
|
-
this.createColumnMenuItemShowPopup('Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
63
|
+
this.createColumnMenuItemShowPopup('plus-minus-add', 'Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
64
64
|
];
|
|
65
65
|
}
|
|
66
66
|
}
|