@adaptabletools/adaptable-cjs 18.0.0-canary.16 → 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 +4 -3
- 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 +72 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +17 -1
- 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.js +1 -1
- 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 +31 -22
- 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 +125 -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/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +25 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +29 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +7 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Datepicker/index.js +3 -1
- 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.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -15
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -21
|
@@ -31,28 +31,29 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
if (this.isModuleAvailable()) {
|
|
32
32
|
let menuItems = [];
|
|
33
33
|
if (this.isModuleEditable()) {
|
|
34
|
-
menuItems.push(this.createColumnMenuItemClickFunction('Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
34
|
+
menuItems.push(this.createColumnMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
35
35
|
}
|
|
36
36
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
37
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
37
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
40
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
41
41
|
}
|
|
42
42
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
43
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
43
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
44
44
|
}
|
|
45
45
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
46
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
46
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
47
47
|
}
|
|
48
48
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
49
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
49
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
menuItems.push(this.createColumnMenuItemReduxAction('Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
52
|
+
menuItems.push(this.createColumnMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
53
53
|
}
|
|
54
54
|
return [
|
|
55
55
|
{
|
|
56
|
+
name: 'dashboard',
|
|
56
57
|
label: this.moduleInfo.FriendlyName,
|
|
57
58
|
isVisible: true,
|
|
58
59
|
module: this.moduleInfo.ModuleName,
|
|
@@ -30,7 +30,7 @@ class DataImportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
30
30
|
source: source,
|
|
31
31
|
maxWidth: this.getPopupMaxWidth(),
|
|
32
32
|
};
|
|
33
|
-
return this.createColumnMenuItemShowPopup('Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
33
|
+
return this.createColumnMenuItemShowPopup('data-import', 'Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.DataImportModule = DataImportModule;
|
|
@@ -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;
|
|
@@ -90,15 +90,16 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
90
90
|
buildReportMenuItems(report) {
|
|
91
91
|
const menuItems = [];
|
|
92
92
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
93
|
-
menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
93
|
+
menuItems.push(this.createColumnMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
94
94
|
}
|
|
95
95
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
96
|
-
menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
96
|
+
menuItems.push(this.createColumnMenuItemClickFunction('export-custom-destination', customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
97
97
|
}
|
|
98
98
|
return menuItems;
|
|
99
99
|
}
|
|
100
100
|
buildExportMenuItem(label, subItems) {
|
|
101
101
|
return {
|
|
102
|
+
name: 'export',
|
|
102
103
|
label: label,
|
|
103
104
|
module: this.moduleInfo.ModuleName,
|
|
104
105
|
isVisible: true,
|
|
@@ -106,6 +107,20 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
106
107
|
subItems: subItems,
|
|
107
108
|
};
|
|
108
109
|
}
|
|
110
|
+
getMenuName(exportDestination) {
|
|
111
|
+
switch (exportDestination) {
|
|
112
|
+
case Enums_1.ExportDestination.CSV:
|
|
113
|
+
return 'export-csv';
|
|
114
|
+
case Enums_1.ExportDestination.Clipboard:
|
|
115
|
+
return 'export-clipboard';
|
|
116
|
+
case Enums_1.ExportDestination.Excel:
|
|
117
|
+
return 'export-excel';
|
|
118
|
+
case Enums_1.ExportDestination.JSON:
|
|
119
|
+
return 'export-json';
|
|
120
|
+
case Enums_1.ExportDestination.Table:
|
|
121
|
+
return 'export-table';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
109
124
|
async export(report, exportDestination) {
|
|
110
125
|
var _a;
|
|
111
126
|
const cleanupExportProcess = () => {
|
|
@@ -31,6 +31,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
32
32
|
if (contextMenuItems.length > 1) {
|
|
33
33
|
const groupMenuItem = {
|
|
34
|
+
name: 'fdc3',
|
|
34
35
|
module: this.moduleInfo.ModuleName,
|
|
35
36
|
label: 'FDC3',
|
|
36
37
|
icon: {
|
|
@@ -48,6 +49,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
48
49
|
var _a, _b, _c;
|
|
49
50
|
const { intentType, contextType } = intentConfig;
|
|
50
51
|
const menuItem = {
|
|
52
|
+
name: 'fdc3-raise-intent',
|
|
51
53
|
label: `Raise ${intentType}`,
|
|
52
54
|
onClick: () => {
|
|
53
55
|
this.getFdc3Api().raiseIntentFromRow(rowNode, intentType, contextType);
|
|
@@ -67,6 +69,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
67
69
|
var _a, _b, _c;
|
|
68
70
|
const { contextType } = contextConfig;
|
|
69
71
|
const menuItem = {
|
|
72
|
+
name: 'fdc3-broadcast',
|
|
70
73
|
label: `Broadcast ${this.getFdc3Api().getContextLabel(contextType)}`,
|
|
71
74
|
onClick: () => {
|
|
72
75
|
this.getFdc3Api().broadcastFromRow(rowNode, contextType);
|
|
@@ -73,11 +73,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
});
|
|
74
74
|
if (flashingCellForCurrentColumn) {
|
|
75
75
|
return [
|
|
76
|
-
this.createColumnMenuItemReduxAction('
|
|
76
|
+
this.createColumnMenuItemReduxAction('flashing-cell-delete', 'Delete Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionDelete(flashingCellForCurrentColumn)),
|
|
77
77
|
];
|
|
78
78
|
}
|
|
79
79
|
return [
|
|
80
|
-
this.createColumnMenuItemReduxAction('Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
80
|
+
this.createColumnMenuItemReduxAction('flashing-cell-add', 'Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
81
81
|
Scope: {
|
|
82
82
|
ColumnIds: [column.columnId],
|
|
83
83
|
},
|
|
@@ -99,11 +99,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
99
99
|
if (flashingCellForRow.flashTarget === 'row' ||
|
|
100
100
|
(Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
|
|
101
101
|
flashingCellForRow.flashTarget.includes('row'))) {
|
|
102
|
-
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
102
|
+
items.push(this.createColumnMenuItemReduxAction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
|
|
106
|
-
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
106
|
+
items.push(this.createColumnMenuItemReduxAction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -49,12 +49,12 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
49
49
|
action: 'New',
|
|
50
50
|
source: 'ColumnMenu',
|
|
51
51
|
};
|
|
52
|
-
const createFormatColumnMenuItem = this.createColumnMenuItemShowPopup('Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
52
|
+
const createFormatColumnMenuItem = this.createColumnMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
53
53
|
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
54
54
|
// .filter((fc) => this.api.scopeApi.isSingleColumnScope(fc.Scope));
|
|
55
55
|
// if no formats then just show Create
|
|
56
56
|
if (ArrayExtensions_1.default.IsNullOrEmpty(formatColumnsForColumn)) {
|
|
57
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
57
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
58
58
|
// if 1 format then show a Create and an Edit
|
|
59
59
|
}
|
|
60
60
|
else if (formatColumnsForColumn.length == 1) {
|
|
@@ -64,8 +64,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
value: formatColumnsForColumn[0],
|
|
65
65
|
source: 'ColumnMenu',
|
|
66
66
|
};
|
|
67
|
-
const editFormatColumnMenuItem = this.createColumnMenuItemShowPopup('Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
67
|
+
const editFormatColumnMenuItem = this.createColumnMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
68
68
|
returnColumnMenuItems.push({
|
|
69
|
+
name: 'format-column',
|
|
69
70
|
label: 'Format Column',
|
|
70
71
|
module: this.moduleInfo.ModuleName,
|
|
71
72
|
isVisible: true,
|
|
@@ -80,8 +81,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
80
81
|
const moduleInfo = this.api.internalApi
|
|
81
82
|
.getModuleService()
|
|
82
83
|
.getModuleInfoByModule('FormatColumn');
|
|
83
|
-
const editFormatColumnMenuItem = this.createColumnMenuItemReduxAction('Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
84
|
+
const editFormatColumnMenuItem = this.createColumnMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
84
85
|
returnColumnMenuItems.push({
|
|
86
|
+
name: 'format-column',
|
|
85
87
|
label: 'Format Column',
|
|
86
88
|
module: this.moduleInfo.ModuleName,
|
|
87
89
|
isVisible: true,
|
|
@@ -32,7 +32,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
32
32
|
source: 'ColumnMenu',
|
|
33
33
|
};
|
|
34
34
|
return [
|
|
35
|
-
this.createColumnMenuItemShowPopup('Edit Free Text Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
35
|
+
this.createColumnMenuItemShowPopup('free-text-column-edit', 'Edit Free Text Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -15,6 +15,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
15
15
|
if (this.isModuleAvailable()) {
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
+
Name: 'grid-info',
|
|
18
19
|
Label: 'Grid Info',
|
|
19
20
|
ComponentName: this.moduleInfo.Popup,
|
|
20
21
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -26,6 +27,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
26
27
|
if (this.isModuleAvailable()) {
|
|
27
28
|
return [
|
|
28
29
|
this.createMainMenuItemShowPopup({
|
|
30
|
+
Name: 'grid-info',
|
|
29
31
|
Label: 'Grid Info',
|
|
30
32
|
ComponentName: this.moduleInfo.Popup,
|
|
31
33
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -19,6 +19,7 @@ const windowFactory_1 = require("../View/Components/Popups/WindowPopups/windowFa
|
|
|
19
19
|
const flattenDeep_1 = tslib_1.__importDefault(require("lodash/flattenDeep"));
|
|
20
20
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
21
21
|
const getGridFilterPreview_1 = require("../View/Layout/Wizard/getGridFilterPreview");
|
|
22
|
+
const AggregatedScalarLiveValue_1 = require("../Utilities/Services/AggregatedScalarLiveValue");
|
|
22
23
|
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
23
24
|
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
24
25
|
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
@@ -148,7 +149,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
148
149
|
if (this.isModuleEditable()) {
|
|
149
150
|
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
150
151
|
if (!isReadOnlyLayout) {
|
|
151
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
152
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
152
153
|
action: 'Edit',
|
|
153
154
|
source: 'ColumnMenu',
|
|
154
155
|
value: this.api.layoutApi.getCurrentLayout(),
|
|
@@ -156,10 +157,10 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
156
157
|
}
|
|
157
158
|
if (column) {
|
|
158
159
|
if (!isReadOnlyLayout) {
|
|
159
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
160
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
160
161
|
}
|
|
161
162
|
if (column.hideable) {
|
|
162
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'visibility-off-bold', () => {
|
|
163
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
163
164
|
this.api.columnApi.hideColumn(column.columnId);
|
|
164
165
|
}));
|
|
165
166
|
}
|
|
@@ -168,23 +169,24 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
168
169
|
if (column) {
|
|
169
170
|
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
170
171
|
if (hasExistingSelection) {
|
|
171
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column (Preserve Selection)', 'column-add', () => {
|
|
172
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
172
173
|
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
173
174
|
}));
|
|
174
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column (Reset Selection)', 'columns', () => {
|
|
175
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
175
176
|
this.api.columnApi.selectColumn(column.columnId);
|
|
176
177
|
}));
|
|
177
178
|
}
|
|
178
179
|
else {
|
|
179
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column', 'columns', () => {
|
|
180
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
180
181
|
this.api.columnApi.selectColumn(column.columnId);
|
|
181
182
|
}));
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
selectMenuItems.push(this.createColumnMenuItemClickFunction('Whole Grid', this.moduleInfo.Glyph, () => {
|
|
185
|
+
selectMenuItems.push(this.createColumnMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
185
186
|
this.api.gridApi.selectAll();
|
|
186
187
|
}));
|
|
187
188
|
returnColumnMenuItems.push({
|
|
189
|
+
name: 'layout-select',
|
|
188
190
|
label: 'Select',
|
|
189
191
|
isVisible: true,
|
|
190
192
|
module: this.moduleInfo.ModuleName,
|
|
@@ -199,7 +201,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
199
201
|
addContextMenuItems(menuContext) {
|
|
200
202
|
let returnColumnMenuItems = [];
|
|
201
203
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
202
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
204
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
203
205
|
action: 'Edit',
|
|
204
206
|
source: 'ColumnMenu',
|
|
205
207
|
}));
|
|
@@ -211,18 +213,19 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
211
213
|
let clickFunction = () => {
|
|
212
214
|
this.api.gridApi.deselectAll();
|
|
213
215
|
};
|
|
214
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Clear Selected Cells', 'undo', clickFunction));
|
|
216
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
215
217
|
if (this.isModuleAvailable()) {
|
|
216
218
|
let gridMenuItems = [];
|
|
217
219
|
let autoSizeFunction = () => {
|
|
218
220
|
this.api.columnApi.autosizeAllColumns();
|
|
219
221
|
};
|
|
220
|
-
gridMenuItems.push(this.createColumnMenuItemClickFunction('Auto Size', 'arrow-expand', autoSizeFunction));
|
|
222
|
+
gridMenuItems.push(this.createColumnMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
221
223
|
let clickFunction = () => {
|
|
222
224
|
this.api.gridApi.selectAll();
|
|
223
225
|
};
|
|
224
|
-
gridMenuItems.push(this.createColumnMenuItemClickFunction('Select', 'tab-unselected', clickFunction));
|
|
226
|
+
gridMenuItems.push(this.createColumnMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
225
227
|
returnColumnMenuItems.push({
|
|
228
|
+
name: 'layout-grid',
|
|
226
229
|
label: 'Grid',
|
|
227
230
|
module: this.moduleInfo.ModuleName,
|
|
228
231
|
isVisible: true,
|
|
@@ -294,6 +297,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
294
297
|
pivotColumnId,
|
|
295
298
|
};
|
|
296
299
|
return {
|
|
300
|
+
name: 'layout-aggregated-view',
|
|
297
301
|
module: this.moduleInfo.ModuleName,
|
|
298
302
|
isVisible: true,
|
|
299
303
|
label: 'Expand Aggregated Value',
|
|
@@ -468,6 +472,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
468
472
|
*/
|
|
469
473
|
evaluateRowSummary(reason) {
|
|
470
474
|
var _a;
|
|
475
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
471
476
|
const rowSummaries = (_a = this.api.layoutApi.getCurrentLayout().RowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
472
477
|
const rowSummariesResults = rowSummaries.map(({ ColumnsMap, Position }) => {
|
|
473
478
|
return {
|
|
@@ -486,17 +491,21 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
486
491
|
}
|
|
487
492
|
if (!expressionLiveValue) {
|
|
488
493
|
try {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
494
|
+
let aggregatedScalarExpression = `${expression}([${columnId}])`;
|
|
495
|
+
if (aggregatedScalarExpression.includes(RowSummary_1.WEIGHTED_AVERAGE_AGGREATED_FUNCTION) &&
|
|
496
|
+
currentLayout.AggregationColumns[columnId] &&
|
|
497
|
+
typeof currentLayout.AggregationColumns[columnId] === 'object') {
|
|
498
|
+
const weight = currentLayout.AggregationColumns[columnId]
|
|
499
|
+
.weightedColumnId;
|
|
500
|
+
if (weight) {
|
|
501
|
+
aggregatedScalarExpression = `AVG([${columnId}], WEIGHT([${weight}]))`;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
expressionLiveValue = new AggregatedScalarLiveValue_1.AggregatedScalarLiveValue({
|
|
505
|
+
aggregatedScalarExpression,
|
|
506
|
+
}, ModuleConstants.LayoutModuleId, this.api, () => {
|
|
507
|
+
return this.api.gridApi.getVisibleRowNodes();
|
|
508
|
+
});
|
|
500
509
|
}
|
|
501
510
|
catch (e) {
|
|
502
511
|
this.api.logError('Error evaluating row summary', e);
|
|
@@ -45,12 +45,12 @@ class NoteModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
45
45
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
46
46
|
})) !== null && _a !== void 0 ? _a : [];
|
|
47
47
|
if (note) {
|
|
48
|
-
items.push(this.createColumnMenuItemClickFunction('Remove Note', this.moduleInfo.Glyph, () => {
|
|
48
|
+
items.push(this.createColumnMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
|
|
49
49
|
this.api.noteApi.deleteNote(note);
|
|
50
50
|
}));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
items.push(this.createColumnMenuItemClickFunction('Add Note', this.moduleInfo.Glyph, () => {
|
|
53
|
+
items.push(this.createColumnMenuItemClickFunction('note-add', 'Add Note', this.moduleInfo.Glyph, () => {
|
|
54
54
|
// add an empty one
|
|
55
55
|
this.api.noteApi.addNote('', menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
56
56
|
this.api.internalApi.getCellPopupService().showPopup({
|
|
@@ -64,7 +64,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
source: 'ColumnMenu',
|
|
65
65
|
};
|
|
66
66
|
return [
|
|
67
|
-
this.createColumnMenuItemShowPopup('Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
67
|
+
this.createColumnMenuItemShowPopup('plus-minus-add', 'Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -13,17 +13,17 @@ class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
13
13
|
addColumnMenuItems(column) {
|
|
14
14
|
return [
|
|
15
15
|
// To do : get the icon and name from settings in case they have changed?
|
|
16
|
-
this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
16
|
+
this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
19
|
addContextMenuItems(menuContext) {
|
|
20
20
|
return [
|
|
21
|
-
this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
21
|
+
this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
24
|
addModuleMenuItem(source) {
|
|
25
25
|
if (this.isModuleAvailable()) {
|
|
26
|
-
return this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
26
|
+
return this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -31,7 +31,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
let popUpParams = {
|
|
32
32
|
source: 'ContextMenu',
|
|
33
33
|
};
|
|
34
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
34
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'smart-edit-apply',
|
|
35
35
|
Label: 'Apply Smart Edit',
|
|
36
36
|
ComponentName: this.moduleInfo.Popup,
|
|
37
37
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -57,7 +57,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
57
57
|
defaultCurrentSectionName: 'Settings',
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Sparkline Column', this.moduleInfo.Popup, this.getGlyphForStyledColumn(styledColumn), popupParam));
|
|
60
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('styled-column-sparkline', label + 'Sparkline Column', this.moduleInfo.Popup, this.getGlyphForStyledColumn(styledColumn), popupParam));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
// Next do non sparkline
|
|
@@ -82,7 +82,8 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
82
82
|
};
|
|
83
83
|
const icon = this.getGlyphForStyledColumn(styledColumn);
|
|
84
84
|
const label = `Edit ${this.getTypeLabel(styledColumn)} Style`;
|
|
85
|
-
|
|
85
|
+
const name = this.getTypeName(styledColumn);
|
|
86
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(name, label, this.moduleInfo.Popup, icon, popupParam));
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
@@ -94,7 +95,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
94
95
|
config: {},
|
|
95
96
|
};
|
|
96
97
|
const badgeLabel = column.dataType === 'Number' ? 'Badge' : 'Create Badge Style';
|
|
97
|
-
const newBadgeButton = this.createColumnMenuItemShowPopup(badgeLabel, this.moduleInfo.Popup, 'badge', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { BadgeStyle: {
|
|
98
|
+
const newBadgeButton = this.createColumnMenuItemShowPopup('styled-column-badge', badgeLabel, this.moduleInfo.Popup, 'badge', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { BadgeStyle: {
|
|
98
99
|
Badges: [ObjectFactory_1.default.CreateDefaultStyledColumnBadge()],
|
|
99
100
|
} }), config: {
|
|
100
101
|
defaultCurrentSectionName: 'Badges',
|
|
@@ -106,17 +107,18 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
106
107
|
const emptyRanges = this.api.scopeApi.createCellColorRangesForScope({
|
|
107
108
|
ColumnIds: [column.columnId],
|
|
108
109
|
});
|
|
109
|
-
const newGrandientButton = this.createColumnMenuItemShowPopup('Gradient', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
110
|
+
const newGrandientButton = this.createColumnMenuItemShowPopup('styled-column-gradient', 'Gradient', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
110
111
|
CellRanges: emptyRanges,
|
|
111
112
|
} }), config: {
|
|
112
113
|
defaultCurrentSectionName: 'Style',
|
|
113
114
|
} }));
|
|
114
|
-
const newPrecentBarButton = this.createColumnMenuItemShowPopup('Percent Bar', this.moduleInfo.Popup, 'percent', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { PercentBarStyle: {
|
|
115
|
+
const newPrecentBarButton = this.createColumnMenuItemShowPopup('styled-column-percent-bar', 'Percent Bar', this.moduleInfo.Popup, 'percent', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { PercentBarStyle: {
|
|
115
116
|
CellRanges: emptyRanges,
|
|
116
117
|
} }), config: {
|
|
117
118
|
defaultCurrentSectionName: 'Style',
|
|
118
119
|
} }));
|
|
119
120
|
returnColumnMenuItems.push({
|
|
121
|
+
name: 'styled-column',
|
|
120
122
|
label: 'Create Styled Column',
|
|
121
123
|
module: this.moduleInfo.ModuleName,
|
|
122
124
|
isVisible: true,
|
|
@@ -234,5 +236,21 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
234
236
|
}
|
|
235
237
|
return type;
|
|
236
238
|
}
|
|
239
|
+
getTypeName(styledColumn) {
|
|
240
|
+
let type = null;
|
|
241
|
+
if (styledColumn.GradientStyle) {
|
|
242
|
+
type = 'styled-column-gradient';
|
|
243
|
+
}
|
|
244
|
+
else if (styledColumn.PercentBarStyle) {
|
|
245
|
+
type = 'styled-column-percent-bar';
|
|
246
|
+
}
|
|
247
|
+
else if (styledColumn.SparkLineStyle) {
|
|
248
|
+
type = 'styled-column-sparkline';
|
|
249
|
+
}
|
|
250
|
+
else if (styledColumn.BadgeStyle) {
|
|
251
|
+
type = 'styled-column-badge';
|
|
252
|
+
}
|
|
253
|
+
return type;
|
|
254
|
+
}
|
|
237
255
|
}
|
|
238
256
|
exports.StyledColumnModule = StyledColumnModule;
|
|
@@ -12,7 +12,7 @@ class SystemStatusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
12
12
|
addColumnMenuItems(column) {
|
|
13
13
|
if (this.isModuleAvailable()) {
|
|
14
14
|
return [
|
|
15
|
-
this.createColumnMenuItemShowPopup('Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
15
|
+
this.createColumnMenuItemShowPopup('system-status-show', 'Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
16
16
|
];
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -22,7 +22,7 @@ class SystemStatusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
source: 'ContextMenu',
|
|
23
23
|
};
|
|
24
24
|
return [
|
|
25
|
-
this.createMainMenuItemShowPopup({
|
|
25
|
+
this.createMainMenuItemShowPopup({ Name: 'system-status-show',
|
|
26
26
|
Label: 'Show System Status',
|
|
27
27
|
ComponentName: this.moduleInfo.Popup,
|
|
28
28
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { IRowNode } from '@ag-grid-community/core';
|
|
1
2
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
3
|
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
|
-
import { IRowNode } from '@ag-grid-community/core';
|
|
4
4
|
import { AggregateParams } from './scalarAggregationHelper';
|
|
5
5
|
/**
|
|
6
6
|
* List of all the AggregatedScalar Functions available in AdaptableQL
|
|
7
7
|
*/
|
|
8
8
|
export type AggregatedScalarFunctionName = ScalarAggregationFunction | OperandFunction;
|
|
9
|
-
export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL' | 'MEDIAN' | 'MODE' | 'DISTINCT' | 'ONLY' | 'STD_DEVIATION';
|
|
9
|
+
export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL' | 'MEDIAN' | 'MODE' | 'DISTINCT' | 'ONLY' | 'STD_DEVIATION' | 'OLDEST' | 'YOUNGEST';
|
|
10
10
|
type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY' | 'WEIGHT';
|
|
11
11
|
export interface ScalarAggregationParameter extends BaseParameter<'aggregationScalar', ScalarAggregationFunction> {
|
|
12
12
|
value: AggregatedScalarExpressionEvaluation;
|