@adaptabletools/adaptable 18.0.0-canary.26 → 18.0.0-canary.27
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/AdaptableOptions/MenuOptions.d.ts +7 -19
- package/src/AdaptableOptions/MenuOptions.js +1 -96
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -9
- package/src/Api/Implementation/LayoutApiImpl.js +0 -4
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +1 -1
- package/src/Api/Internal/NoteInternalApi.d.ts +1 -1
- package/src/Api/Internal/NoteInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +0 -12
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.js +17 -18
- package/src/Strategy/AdaptableModuleBase.d.ts +3 -4
- package/src/Strategy/AdaptableModuleBase.js +5 -9
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +3 -2
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +2 -2
- package/src/Strategy/ColumnFilterModule.d.ts +2 -2
- package/src/Strategy/ColumnFilterModule.js +17 -42
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -2
- package/src/Strategy/CommentModule.js +29 -30
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DashboardModule.js +3 -14
- package/src/Strategy/DataImportModule.d.ts +3 -3
- package/src/Strategy/DataImportModule.js +3 -3
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +12 -41
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +1 -14
- package/src/Strategy/FlashingCellModule.d.ts +2 -2
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +28 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -3
- package/src/Strategy/LayoutModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.js +46 -71
- package/src/Strategy/NoteModule.d.ts +1 -2
- package/src/Strategy/NoteModule.js +28 -30
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +3 -2
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.js +10 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/AgGridMenuAdapter.d.ts +18 -8
- package/src/agGrid/AgGridMenuAdapter.js +240 -51
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
|
-
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
3
|
import * as LayoutRedux from '../Redux/ActionsReducers/LayoutRedux';
|
|
5
4
|
import * as SystemRedux from '../Redux/ActionsReducers/SystemRedux';
|
|
6
5
|
import { FilterStatusBarSubPanelPopover } from '../View/Filter/FilterStatusBarSubPanelPopover';
|
|
@@ -39,8 +38,8 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
39
38
|
}
|
|
40
39
|
});
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
let
|
|
41
|
+
createColumnMenuItems(column) {
|
|
42
|
+
let columnFilterMenuItems = [];
|
|
44
43
|
if (column &&
|
|
45
44
|
column.filterable &&
|
|
46
45
|
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
@@ -48,35 +47,22 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
48
47
|
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
49
48
|
if (this.isModuleEditable() &&
|
|
50
49
|
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
51
|
-
|
|
50
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
52
51
|
? SystemRedux.SystemQuickFilterBarHide()
|
|
53
52
|
: SystemRedux.SystemQuickFilterBarShow()));
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
57
56
|
if (existingColumnFilter) {
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
58
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
60
59
|
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
61
60
|
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
return [
|
|
65
|
-
{
|
|
66
|
-
name: 'column-filter-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
|
-
}
|
|
62
|
+
return columnFilterMenuItems;
|
|
77
63
|
}
|
|
78
64
|
}
|
|
79
|
-
|
|
65
|
+
createContextMenuItems(menuContext) {
|
|
80
66
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
81
67
|
if (menuContext.adaptableColumn &&
|
|
82
68
|
menuContext.adaptableColumn.filterable &&
|
|
@@ -98,28 +84,17 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
98
84
|
];
|
|
99
85
|
}
|
|
100
86
|
else {
|
|
101
|
-
let filterSubMenuItems = [];
|
|
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
|
|
106
|
-
? () => {
|
|
107
|
-
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
108
|
-
}
|
|
109
|
-
: () => {
|
|
110
|
-
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
111
|
-
}));
|
|
112
87
|
return [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
88
|
+
this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)),
|
|
89
|
+
this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
90
|
+
? 'column-filter-unsuspend'
|
|
91
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
92
|
+
? () => {
|
|
93
|
+
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
94
|
+
}
|
|
95
|
+
: () => {
|
|
96
|
+
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
97
|
+
}),
|
|
123
98
|
];
|
|
124
99
|
}
|
|
125
100
|
}
|
|
@@ -6,6 +6,6 @@ import { AdaptableColumn, AdaptableMenuItem, ContextMenuContext } from '../types
|
|
|
6
6
|
export declare class ColumnInfoModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
getViewAccessLevel(): AccessLevel;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
10
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
11
11
|
}
|
|
@@ -7,7 +7,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
7
7
|
getViewAccessLevel() {
|
|
8
8
|
return 'Full';
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
createColumnMenuItems(column) {
|
|
11
11
|
if (this.isModuleAvailable()) {
|
|
12
12
|
const columnPopUpParams = {
|
|
13
13
|
source: 'ColumnMenu',
|
|
@@ -24,7 +24,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
createContextMenuItems(menuContext) {
|
|
28
28
|
if (this.isModuleAvailable()) {
|
|
29
29
|
const columnPopUpParams = {
|
|
30
30
|
source: 'ColumnMenu',
|
|
@@ -7,6 +7,5 @@ export declare class CommentModule extends AdaptableModuleBase implements IModul
|
|
|
7
7
|
onAdaptableReady(): void;
|
|
8
8
|
isModuleAvailable(): boolean;
|
|
9
9
|
private loadComments;
|
|
10
|
-
|
|
11
|
-
private getAddRemoveCommentsMenuItems;
|
|
10
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
11
|
}
|
|
@@ -24,48 +24,47 @@ export class CommentModule extends AdaptableModuleBase {
|
|
|
24
24
|
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, createBaseContext(this.api)));
|
|
25
25
|
this.api.commentApi.setGridComments(commentThreads);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
var _a, _b;
|
|
27
|
+
createContextMenuItems(menuContext) {
|
|
28
|
+
var _a, _b, _c, _d, _e;
|
|
29
29
|
if (!this.isModuleAvailable()) {
|
|
30
|
-
return
|
|
30
|
+
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!isCellCommentable ||
|
|
35
|
-
isCellCommentable(Object.assign({ gridCell: menuContext.gridCell }, createBaseContext(this.api)))) {
|
|
36
|
-
items.push(...this.getAddRemoveCommentsMenuItems(menuContext));
|
|
32
|
+
if (!this.api.commentApi.internalApi.areCommentsSupported()) {
|
|
33
|
+
return;
|
|
37
34
|
}
|
|
38
|
-
return items;
|
|
39
|
-
}
|
|
40
|
-
getAddRemoveCommentsMenuItems(menuContext) {
|
|
41
|
-
var _a;
|
|
42
35
|
const items = [];
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
const isCellCommentable = typeof ((_b = (_a = this.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getCommentOptions()) === null || _b === void 0 ? void 0 : _b.isCellCommentable) === 'function'
|
|
37
|
+
? (_d = (_c = this.api.optionsApi) === null || _c === void 0 ? void 0 : _c.getCommentOptions()) === null || _d === void 0 ? void 0 : _d.isCellCommentable(Object.assign({ gridCell: menuContext.gridCell }, createBaseContext(this.api)))
|
|
38
|
+
: true;
|
|
39
|
+
if (!isCellCommentable) {
|
|
40
|
+
return;
|
|
45
41
|
}
|
|
46
42
|
const cellAddress = {
|
|
47
43
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
48
44
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
49
45
|
};
|
|
50
|
-
const cellComments = (
|
|
46
|
+
const cellComments = (_e = this.api.commentApi.getCommentThread(cellAddress)) === null || _e === void 0 ? void 0 : _e.Comments;
|
|
51
47
|
if (cellComments) {
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
|
|
48
|
+
return [
|
|
49
|
+
this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
50
|
+
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
55
53
|
}
|
|
56
54
|
else {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
return [
|
|
56
|
+
this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
57
|
+
// add an empty one
|
|
58
|
+
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
59
|
+
requestAnimationFrame(() => {
|
|
60
|
+
this.api.internalApi.getCellPopupService().showPopup({
|
|
61
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
62
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
63
|
+
}, true);
|
|
64
|
+
this.api.internalApi.getCellPopupService().editFocusedEntity('Comment');
|
|
65
|
+
});
|
|
66
|
+
}),
|
|
67
|
+
];
|
|
68
68
|
}
|
|
69
|
-
return items;
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -15,7 +15,7 @@ export declare class CustomSortModule extends AdaptableModuleBase implements IMo
|
|
|
15
15
|
}): AdaptableObject[];
|
|
16
16
|
getExplicitlyReferencedColumnIds(customSort: CustomSort): string[];
|
|
17
17
|
hasNamedQueryReferences(): boolean;
|
|
18
|
-
|
|
18
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<CustomSort>;
|
|
20
20
|
toView(customSort: CustomSort): AdaptableObjectView;
|
|
21
21
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -18,7 +18,7 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
18
18
|
hasNamedQueryReferences() {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
createColumnMenuItems(column) {
|
|
22
22
|
if (column && this.isModuleEditable() && column.sortable) {
|
|
23
23
|
let customSort = this.api.customSortApi
|
|
24
24
|
.getCustomSorts()
|
|
@@ -5,7 +5,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
|
|
|
5
5
|
export declare class DashboardModule extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
7
|
onAdaptableReady(): void;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
createColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
9
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
10
10
|
private buildMenuItems;
|
|
11
11
|
}
|
|
@@ -17,10 +17,10 @@ export class DashboardModule extends AdaptableModuleBase {
|
|
|
17
17
|
this.api.dashboardApi.internalApi.fireDashboardChangedEvent('ADAPTABLE_READY', null, this.api.dashboardApi.getDashboardState());
|
|
18
18
|
}, 20);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
createColumnMenuItems() {
|
|
21
21
|
return this.buildMenuItems();
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
createContextMenuItems(menuContext) {
|
|
24
24
|
return this.buildMenuItems();
|
|
25
25
|
}
|
|
26
26
|
buildMenuItems() {
|
|
@@ -47,18 +47,7 @@ export class DashboardModule extends AdaptableModuleBase {
|
|
|
47
47
|
else {
|
|
48
48
|
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
49
49
|
}
|
|
50
|
-
return
|
|
51
|
-
{
|
|
52
|
-
name: 'dashboard-parent',
|
|
53
|
-
label: this.moduleInfo.FriendlyName,
|
|
54
|
-
isVisible: true,
|
|
55
|
-
module: this.moduleInfo.ModuleName,
|
|
56
|
-
icon: {
|
|
57
|
-
name: 'dashboard',
|
|
58
|
-
},
|
|
59
|
-
subItems: menuItems,
|
|
60
|
-
},
|
|
61
|
-
];
|
|
50
|
+
return menuItems;
|
|
62
51
|
}
|
|
63
52
|
}
|
|
64
53
|
}
|
|
@@ -4,8 +4,8 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
4
4
|
import { IModule } from './Interface/IModule';
|
|
5
5
|
export declare class DataImportModule extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
createModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
8
|
+
createContextMenuItems(): AdaptableMenuItem[] | undefined;
|
|
9
|
+
createColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
10
10
|
private createDataImportMenuItem;
|
|
11
11
|
}
|
|
@@ -4,18 +4,18 @@ export class DataImportModule extends AdaptableModuleBase {
|
|
|
4
4
|
constructor(api) {
|
|
5
5
|
super(ModuleConstants.DataImportModuleId, ModuleConstants.DataImportFriendyName, 'import', 'DataImportPopup', 'Import Data', api);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
createModuleMenuItem(source) {
|
|
8
8
|
if (this.isModuleAvailable()) {
|
|
9
9
|
return this.createDataImportMenuItem(source);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
createContextMenuItems() {
|
|
13
13
|
if (this.isModuleAvailable()) {
|
|
14
14
|
return [this.createDataImportMenuItem('ContextMenu')];
|
|
15
15
|
}
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
createColumnMenuItems() {
|
|
19
19
|
if (this.isModuleAvailable()) {
|
|
20
20
|
return [this.createDataImportMenuItem('ColumnMenu')];
|
|
21
21
|
}
|
|
@@ -12,9 +12,8 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
12
12
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
13
13
|
getExplicitlyReferencedColumnIds(report: Report): string[];
|
|
14
14
|
getReferencedNamedQueryNames(report: Report): string[];
|
|
15
|
-
|
|
15
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
private buildReportMenuItems;
|
|
17
|
-
private buildExportMenuItem;
|
|
18
17
|
private getMenuName;
|
|
19
18
|
export(report: Report, exportDestination: ExportDestination | string): Promise<void>;
|
|
20
19
|
private preProcessExport;
|
|
@@ -40,14 +40,12 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
40
40
|
}
|
|
41
41
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(report.Query.BooleanExpression);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
createContextMenuItems(menuContext) {
|
|
44
44
|
const canExport = !menuContext.isRowGroupColumn && this.isModuleAvailable();
|
|
45
45
|
if (!canExport) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
let returnMenuItems = [];
|
|
49
|
-
let selectedCellmenuItems = [];
|
|
50
|
-
let selectedRowmenuItems = [];
|
|
51
49
|
const canExportCells = menuContext.selectedCellInfo &&
|
|
52
50
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
53
51
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
@@ -58,63 +56,36 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
58
56
|
menuContext.isSelectedRow;
|
|
59
57
|
if (canExportCells) {
|
|
60
58
|
const selectedCellReport = this.api.exportApi.getReportByName(SELECTED_CELLS_REPORT);
|
|
61
|
-
|
|
59
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedCellReport, 'cells'));
|
|
62
60
|
}
|
|
63
61
|
if (canExportRows) {
|
|
64
62
|
const selectedRowReport = this.api.exportApi.getReportByName(SELECTED_ROWS_REPORT);
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
// if only selected cells then just do one level
|
|
68
|
-
if (canExportCells && !canExportRows) {
|
|
69
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Cells', selectedCellmenuItems));
|
|
70
|
-
// if only selected Rows then just do one level
|
|
71
|
-
}
|
|
72
|
-
else if (canExportRows && !canExportCells) {
|
|
73
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Rows', selectedRowmenuItems));
|
|
74
|
-
}
|
|
75
|
-
// if both selected Cells and Rows then add a new level
|
|
76
|
-
else if (canExportRows && canExportCells) {
|
|
77
|
-
const exportSelectedCellsMenuItem = this.buildExportMenuItem('Cells', selectedCellmenuItems);
|
|
78
|
-
const exportSelectedRowsMenuItem = this.buildExportMenuItem('Rows', selectedRowmenuItems);
|
|
79
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected', [
|
|
80
|
-
exportSelectedCellsMenuItem,
|
|
81
|
-
exportSelectedRowsMenuItem,
|
|
82
|
-
]));
|
|
63
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedRowReport, 'rows'));
|
|
83
64
|
}
|
|
84
65
|
return returnMenuItems;
|
|
85
66
|
}
|
|
86
|
-
buildReportMenuItems(report) {
|
|
67
|
+
buildReportMenuItems(report, selectionType) {
|
|
87
68
|
const menuItems = [];
|
|
88
69
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
89
|
-
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
70
|
+
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination, selectionType), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
90
71
|
}
|
|
91
72
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
92
|
-
menuItems.push(this.createMenuItemClickFunction(
|
|
73
|
+
menuItems.push(this.createMenuItemClickFunction(`export-${selectionType}-custom-destination`, customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
93
74
|
}
|
|
94
75
|
return menuItems;
|
|
95
76
|
}
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
name: 'export-parent',
|
|
99
|
-
label: label,
|
|
100
|
-
module: this.moduleInfo.ModuleName,
|
|
101
|
-
isVisible: true,
|
|
102
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
103
|
-
subItems: subItems,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
getMenuName(exportDestination) {
|
|
77
|
+
getMenuName(exportDestination, selectionType) {
|
|
107
78
|
switch (exportDestination) {
|
|
108
79
|
case ExportDestination.CSV:
|
|
109
|
-
return
|
|
80
|
+
return `export-${selectionType}-csv`;
|
|
110
81
|
case ExportDestination.Clipboard:
|
|
111
|
-
return
|
|
82
|
+
return `export-${selectionType}-clipboard`;
|
|
112
83
|
case ExportDestination.Excel:
|
|
113
|
-
return
|
|
84
|
+
return `export-${selectionType}-excel`;
|
|
114
85
|
case ExportDestination.JSON:
|
|
115
|
-
return
|
|
86
|
+
return `export-${selectionType}-json`;
|
|
116
87
|
case ExportDestination.Table:
|
|
117
|
-
return
|
|
88
|
+
return `export-${selectionType}-table`;
|
|
118
89
|
}
|
|
119
90
|
}
|
|
120
91
|
async export(report, exportDestination) {
|
|
@@ -4,7 +4,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
|
|
|
4
4
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
export declare class Fdc3Module extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
|
-
|
|
7
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
8
8
|
private buildRaiseIntentMenuItem;
|
|
9
9
|
private buildBroadcastMenuItem;
|
|
10
10
|
private getFdc3Api;
|
|
@@ -4,7 +4,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
4
4
|
constructor(api) {
|
|
5
5
|
super(ModuleConstants.Fdc3ModuleId, ModuleConstants.Fdc3FriendlyName, 'fdc3', null, 'The FDC3 Module - handles the FDC3 integration', api);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
createContextMenuItems(menuContext) {
|
|
8
8
|
if (!this.isModuleAvailable()) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -25,19 +25,6 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
25
25
|
contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig, currentRowNode));
|
|
26
26
|
});
|
|
27
27
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
28
|
-
if (contextMenuItems.length > 1) {
|
|
29
|
-
const groupMenuItem = {
|
|
30
|
-
name: 'fdc3-parent',
|
|
31
|
-
module: this.moduleInfo.ModuleName,
|
|
32
|
-
label: 'FDC3',
|
|
33
|
-
icon: {
|
|
34
|
-
name: 'fdc3',
|
|
35
|
-
},
|
|
36
|
-
isVisible: true,
|
|
37
|
-
subItems: contextMenuItems,
|
|
38
|
-
};
|
|
39
|
-
return [groupMenuItem];
|
|
40
|
-
}
|
|
41
28
|
return contextMenuItems;
|
|
42
29
|
}
|
|
43
30
|
}
|
|
@@ -15,8 +15,8 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
|
|
|
15
15
|
}): AdaptableObject[];
|
|
16
16
|
getExplicitlyReferencedColumnIds(alertDefinition: FlashingCellDefinition): string[];
|
|
17
17
|
getReferencedNamedQueryNames(alertDefinition: FlashingCellDefinition): string[];
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
19
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
20
20
|
protected handleCellDataChanged(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
21
21
|
private showFlashingCellsForDefinitions;
|
|
22
22
|
private isFlashingTargetOnlyAggChange;
|
|
@@ -60,7 +60,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
60
60
|
}
|
|
61
61
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
createColumnMenuItems(column) {
|
|
64
64
|
if (column && this.isModuleEditable()) {
|
|
65
65
|
if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
|
|
66
66
|
const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
@@ -85,7 +85,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
createContextMenuItems(menuContext) {
|
|
89
89
|
const items = [];
|
|
90
90
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
91
91
|
if (menuContext.adaptableColumn && menuContext.rowNode) {
|
|
@@ -13,7 +13,7 @@ export declare class FormatColumnModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
}): AdaptableObject[];
|
|
14
14
|
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
15
15
|
getReferencedNamedQueryNames(formatColumn: FormatColumn): string[];
|
|
16
|
-
|
|
16
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
17
|
getTeamSharingAction(): TeamSharingImportInfo<FormatColumn>;
|
|
18
18
|
toView(formatColumn: FormatColumn): AdaptableObjectView;
|
|
19
19
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -10,7 +10,6 @@ import { getFormatColumnStyleViewItems } from './Utilities/FormatColumn/getForma
|
|
|
10
10
|
import { getObjectTagsViewItems } from './Utilities/getObjectTagsViewItems';
|
|
11
11
|
import { getRuleViewItems } from './Utilities/getRuleViewItems';
|
|
12
12
|
import { MoveFormatColumn } from '../View/FormatColumn/MoveFormatColumn';
|
|
13
|
-
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
14
13
|
export class FormatColumnModule extends AdaptableModuleBase {
|
|
15
14
|
constructor(api) {
|
|
16
15
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'color-palette', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
@@ -37,56 +36,38 @@ export class FormatColumnModule extends AdaptableModuleBase {
|
|
|
37
36
|
}
|
|
38
37
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
39
38
|
}
|
|
40
|
-
|
|
39
|
+
createColumnMenuItems(column) {
|
|
40
|
+
if (!column || !this.isModuleEditable() || column.isSparkline) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
41
43
|
let returnColumnMenuItems = [];
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
let createPopupParam = {
|
|
45
|
+
column: column,
|
|
46
|
+
action: 'New',
|
|
47
|
+
source: 'ColumnMenu',
|
|
48
|
+
};
|
|
49
|
+
const createFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
50
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
51
|
+
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
52
|
+
if (formatColumnsForColumn.length === 1) {
|
|
53
|
+
let editPopupParam = {
|
|
44
54
|
column: column,
|
|
45
|
-
action: '
|
|
55
|
+
action: 'Edit',
|
|
56
|
+
value: formatColumnsForColumn[0],
|
|
46
57
|
source: 'ColumnMenu',
|
|
47
58
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
value: formatColumnsForColumn[0],
|
|
61
|
-
source: 'ColumnMenu',
|
|
62
|
-
};
|
|
63
|
-
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
64
|
-
returnColumnMenuItems.push({
|
|
65
|
-
name: 'format-column-parent',
|
|
66
|
-
label: 'Format Column',
|
|
67
|
-
module: this.moduleInfo.ModuleName,
|
|
68
|
-
isVisible: true,
|
|
69
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
70
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
71
|
-
});
|
|
72
|
-
// if more than one then display a Create and a Show
|
|
73
|
-
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
74
|
-
// or to filter the format columns ?
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
const moduleInfo = this.api.internalApi
|
|
78
|
-
.getModuleService()
|
|
79
|
-
.getModuleInfoByModule('FormatColumn');
|
|
80
|
-
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
81
|
-
returnColumnMenuItems.push({
|
|
82
|
-
name: 'format-column-parent',
|
|
83
|
-
label: 'Format Column',
|
|
84
|
-
module: this.moduleInfo.ModuleName,
|
|
85
|
-
isVisible: true,
|
|
86
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
87
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
88
|
-
});
|
|
89
|
-
}
|
|
59
|
+
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
60
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
61
|
+
}
|
|
62
|
+
else if (formatColumnsForColumn.length > 1) {
|
|
63
|
+
// if more than one then display a Create and a Show
|
|
64
|
+
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
65
|
+
// or to filter the format columns ?
|
|
66
|
+
const moduleInfo = this.api.internalApi
|
|
67
|
+
.getModuleService()
|
|
68
|
+
.getModuleInfoByModule('FormatColumn');
|
|
69
|
+
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
70
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
90
71
|
}
|
|
91
72
|
return returnColumnMenuItems;
|
|
92
73
|
}
|
|
@@ -12,7 +12,7 @@ export declare class FreeTextColumnModule extends AdaptableModuleBase implements
|
|
|
12
12
|
isModuleAvailable(): boolean;
|
|
13
13
|
getModuleAdaptableObjects(): FreeTextColumn[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
|
-
|
|
15
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
16
16
|
getTeamSharingAction(): TeamSharingImportInfo<FreeTextColumn>;
|
|
17
17
|
toView(freeTextColumn: FreeTextColumn): AdaptableObjectView;
|
|
18
18
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -17,7 +17,7 @@ export class FreeTextColumnModule extends AdaptableModuleBase {
|
|
|
17
17
|
hasNamedQueryReferences() {
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
createColumnMenuItems(column) {
|
|
21
21
|
if (column && this.isModuleEditable()) {
|
|
22
22
|
if (this.api.freeTextColumnApi
|
|
23
23
|
.getFreeTextColumns()
|
|
@@ -7,6 +7,6 @@ import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
|
7
7
|
export declare class GridInfoModule extends AdaptableModuleBase implements IModule {
|
|
8
8
|
constructor(api: AdaptableApi);
|
|
9
9
|
getViewAccessLevel(): AccessLevel;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
11
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
12
|
}
|