@adaptabletools/adaptable 18.0.0-canary.16 → 18.0.0-canary.18
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/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +97 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/Redux/Store/AdaptableStore.js +11 -6
- 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.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +43 -39
- 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 +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 +26 -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/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 +26 -2
- 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 +7 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- 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 +3 -1
- package/src/env.js +2 -2
- 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
|
@@ -13,8 +13,8 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
17
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
private getExistingColumnFilter;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
20
20
|
toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;
|
|
@@ -39,6 +39,43 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
addColumnMenuItems(column) {
|
|
43
|
+
let filterSubMenuItems = [];
|
|
44
|
+
if (column &&
|
|
45
|
+
column.filterable &&
|
|
46
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
47
|
+
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
48
|
+
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
49
|
+
if (this.isModuleEditable() &&
|
|
50
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
51
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
52
|
+
? SystemRedux.SystemQuickFilterBarHide()
|
|
53
|
+
: SystemRedux.SystemQuickFilterBarShow()));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
57
|
+
if (existingColumnFilter) {
|
|
58
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
59
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
60
|
+
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
61
|
+
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
62
|
+
}
|
|
63
|
+
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
name: 'parent',
|
|
67
|
+
label: this.moduleInfo.FriendlyName,
|
|
68
|
+
isVisible: true,
|
|
69
|
+
module: this.moduleInfo.ModuleName,
|
|
70
|
+
icon: {
|
|
71
|
+
name: this.moduleInfo.Glyph,
|
|
72
|
+
},
|
|
73
|
+
subItems: filterSubMenuItems,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
42
79
|
addContextMenuItems(menuContext) {
|
|
43
80
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
44
81
|
if (menuContext.adaptableColumn &&
|
|
@@ -57,13 +94,15 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
57
94
|
this.api.columnFilterApi.internalApi.createEqualityColumnFilterForCell(menuContext.selectedCellInfo.gridCells[0]);
|
|
58
95
|
};
|
|
59
96
|
return [
|
|
60
|
-
this.
|
|
97
|
+
this.createMenuItemClickFunction('column-filter-on-cell-value', isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
61
98
|
];
|
|
62
99
|
}
|
|
63
100
|
else {
|
|
64
101
|
let filterSubMenuItems = [];
|
|
65
|
-
filterSubMenuItems.push(this.
|
|
66
|
-
filterSubMenuItems.push(this.
|
|
102
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
103
|
+
filterSubMenuItems.push(this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
104
|
+
? 'column-filter-unsuspend'
|
|
105
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
67
106
|
? () => {
|
|
68
107
|
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
69
108
|
}
|
|
@@ -72,6 +111,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
72
111
|
}));
|
|
73
112
|
return [
|
|
74
113
|
{
|
|
114
|
+
name: 'parent',
|
|
75
115
|
label: this.moduleInfo.FriendlyName,
|
|
76
116
|
isVisible: true,
|
|
77
117
|
module: this.moduleInfo.ModuleName,
|
|
@@ -85,42 +125,6 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
85
125
|
}
|
|
86
126
|
}
|
|
87
127
|
}
|
|
88
|
-
addColumnMenuItems(column) {
|
|
89
|
-
let filterSubMenuItems = [];
|
|
90
|
-
if (column &&
|
|
91
|
-
column.filterable &&
|
|
92
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
93
|
-
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
94
|
-
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
95
|
-
if (this.isModuleEditable() &&
|
|
96
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
97
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
98
|
-
? SystemRedux.SystemQuickFilterBarHide()
|
|
99
|
-
: SystemRedux.SystemQuickFilterBarShow()));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
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
|
|
106
|
-
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
107
|
-
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
108
|
-
}
|
|
109
|
-
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
110
|
-
return [
|
|
111
|
-
{
|
|
112
|
-
label: this.moduleInfo.FriendlyName,
|
|
113
|
-
isVisible: true,
|
|
114
|
-
module: this.moduleInfo.ModuleName,
|
|
115
|
-
icon: {
|
|
116
|
-
name: this.moduleInfo.Glyph,
|
|
117
|
-
},
|
|
118
|
-
subItems: filterSubMenuItems,
|
|
119
|
-
},
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
128
|
getExistingColumnFilter(column) {
|
|
125
129
|
return this.api.columnFilterApi.getColumnFilters().find((x) => x.ColumnId == column.columnId);
|
|
126
130
|
}
|
|
@@ -15,6 +15,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
15
15
|
};
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
+
Name: 'column-info-show',
|
|
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-show',
|
|
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.
|
|
61
|
+
items.push(this.createMenuItemClickFunction('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.
|
|
66
|
+
items.push(this.createMenuItemClickFunction('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.
|
|
39
|
+
this.createMenuItemShowPopup(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.
|
|
30
|
+
menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
31
31
|
}
|
|
32
32
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
33
|
-
menuItems.push(this.
|
|
33
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
menuItems.push(this.
|
|
36
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
37
37
|
}
|
|
38
38
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
39
|
-
menuItems.push(this.
|
|
39
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
40
40
|
}
|
|
41
41
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
42
|
-
menuItems.push(this.
|
|
42
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
43
43
|
}
|
|
44
44
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
45
|
-
menuItems.push(this.
|
|
45
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
menuItems.push(this.
|
|
48
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
49
49
|
}
|
|
50
50
|
return [
|
|
51
51
|
{
|
|
52
|
+
name: 'parent',
|
|
52
53
|
label: this.moduleInfo.FriendlyName,
|
|
53
54
|
isVisible: true,
|
|
54
55
|
module: this.moduleInfo.ModuleName,
|
|
@@ -26,6 +26,6 @@ export class DataImportModule extends AdaptableModuleBase {
|
|
|
26
26
|
source: source,
|
|
27
27
|
maxWidth: this.getPopupMaxWidth(),
|
|
28
28
|
};
|
|
29
|
-
return this.
|
|
29
|
+
return this.createMenuItemShowPopup('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.
|
|
89
|
+
menuItems.push(this.createMenuItemClickFunction(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.
|
|
92
|
+
menuItems.push(this.createMenuItemClickFunction('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: 'parent',
|
|
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: 'parent',
|
|
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.
|
|
72
|
+
this.createMenuItemReduxAction('flashing-cell-delete', 'Delete Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionDelete(flashingCellForCurrentColumn)),
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
75
|
return [
|
|
76
|
-
this.
|
|
76
|
+
this.createMenuItemReduxAction('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.
|
|
98
|
+
items.push(this.createMenuItemReduxAction('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.
|
|
102
|
+
items.push(this.createMenuItemReduxAction('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.
|
|
48
|
+
const createFormatColumnMenuItem = this.createMenuItemShowPopup('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.
|
|
53
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('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.
|
|
63
|
+
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
64
64
|
returnColumnMenuItems.push({
|
|
65
|
+
name: 'parent',
|
|
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.
|
|
80
|
+
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
80
81
|
returnColumnMenuItems.push({
|
|
82
|
+
name: 'parent',
|
|
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.
|
|
31
|
+
this.createMenuItemShowPopup('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-show',
|
|
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-show',
|
|
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.
|
|
148
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('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.
|
|
156
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
156
157
|
}
|
|
157
158
|
if (column.hideable) {
|
|
158
|
-
returnColumnMenuItems.push(this.
|
|
159
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('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.
|
|
168
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
168
169
|
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
169
170
|
}));
|
|
170
|
-
selectMenuItems.push(this.
|
|
171
|
+
selectMenuItems.push(this.createMenuItemClickFunction('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.
|
|
176
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
176
177
|
this.api.columnApi.selectColumn(column.columnId);
|
|
177
178
|
}));
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
|
-
selectMenuItems.push(this.
|
|
181
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
181
182
|
this.api.gridApi.selectAll();
|
|
182
183
|
}));
|
|
183
184
|
returnColumnMenuItems.push({
|
|
185
|
+
name: 'layout-select-parent',
|
|
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.
|
|
200
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('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.
|
|
212
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('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.
|
|
218
|
+
gridMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
217
219
|
let clickFunction = () => {
|
|
218
220
|
this.api.gridApi.selectAll();
|
|
219
221
|
};
|
|
220
|
-
gridMenuItems.push(this.
|
|
222
|
+
gridMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
221
223
|
returnColumnMenuItems.push({
|
|
224
|
+
name: 'layout-grid-parent',
|
|
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.
|
|
44
|
+
items.push(this.createMenuItemClickFunction('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.
|
|
49
|
+
items.push(this.createMenuItemClickFunction('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.
|
|
63
|
+
this.createMenuItemShowPopup('plus-minus-add', 'Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
64
64
|
];
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -9,17 +9,17 @@ export class SettingsPanelModule extends AdaptableModuleBase {
|
|
|
9
9
|
addColumnMenuItems(column) {
|
|
10
10
|
return [
|
|
11
11
|
// To do : get the icon and name from settings in case they have changed?
|
|
12
|
-
this.
|
|
12
|
+
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
13
13
|
];
|
|
14
14
|
}
|
|
15
15
|
addContextMenuItems(menuContext) {
|
|
16
16
|
return [
|
|
17
|
-
this.
|
|
17
|
+
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
addModuleMenuItem(source) {
|
|
21
21
|
if (this.isModuleAvailable()) {
|
|
22
|
-
return this.
|
|
22
|
+
return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -27,7 +27,7 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
27
27
|
let popUpParams = {
|
|
28
28
|
source: 'ContextMenu',
|
|
29
29
|
};
|
|
30
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
30
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'smart-edit-apply',
|
|
31
31
|
Label: 'Apply Smart Edit',
|
|
32
32
|
ComponentName: this.moduleInfo.Popup,
|
|
33
33
|
Icon: this.moduleInfo.Glyph,
|