@adaptabletools/adaptable-cjs 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 +0 -98
- 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.cjs.tsbuildinfo +1 -1
|
@@ -4,7 +4,6 @@ exports.ColumnFilterModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
8
7
|
const LayoutRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/LayoutRedux"));
|
|
9
8
|
const SystemRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/SystemRedux"));
|
|
10
9
|
const FilterStatusBarSubPanelPopover_1 = require("../View/Filter/FilterStatusBarSubPanelPopover");
|
|
@@ -43,8 +42,8 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
let
|
|
45
|
+
createColumnMenuItems(column) {
|
|
46
|
+
let columnFilterMenuItems = [];
|
|
48
47
|
if (column &&
|
|
49
48
|
column.filterable &&
|
|
50
49
|
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
@@ -52,35 +51,22 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
52
51
|
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
53
52
|
if (this.isModuleEditable() &&
|
|
54
53
|
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
55
|
-
|
|
54
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
56
55
|
? SystemRedux.SystemQuickFilterBarHide()
|
|
57
56
|
: SystemRedux.SystemQuickFilterBarShow()));
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
61
60
|
if (existingColumnFilter) {
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
62
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
64
63
|
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
65
64
|
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
66
65
|
}
|
|
67
|
-
|
|
68
|
-
return [
|
|
69
|
-
{
|
|
70
|
-
name: 'column-filter-parent',
|
|
71
|
-
label: this.moduleInfo.FriendlyName,
|
|
72
|
-
isVisible: true,
|
|
73
|
-
module: this.moduleInfo.ModuleName,
|
|
74
|
-
icon: {
|
|
75
|
-
name: this.moduleInfo.Glyph,
|
|
76
|
-
},
|
|
77
|
-
subItems: filterSubMenuItems,
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
}
|
|
66
|
+
return columnFilterMenuItems;
|
|
81
67
|
}
|
|
82
68
|
}
|
|
83
|
-
|
|
69
|
+
createContextMenuItems(menuContext) {
|
|
84
70
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
85
71
|
if (menuContext.adaptableColumn &&
|
|
86
72
|
menuContext.adaptableColumn.filterable &&
|
|
@@ -102,28 +88,17 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
102
88
|
];
|
|
103
89
|
}
|
|
104
90
|
else {
|
|
105
|
-
let filterSubMenuItems = [];
|
|
106
|
-
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
107
|
-
filterSubMenuItems.push(this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
108
|
-
? 'column-filter-unsuspend'
|
|
109
|
-
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
110
|
-
? () => {
|
|
111
|
-
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
112
|
-
}
|
|
113
|
-
: () => {
|
|
114
|
-
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
115
|
-
}));
|
|
116
91
|
return [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
92
|
+
this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)),
|
|
93
|
+
this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
94
|
+
? 'column-filter-unsuspend'
|
|
95
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
96
|
+
? () => {
|
|
97
|
+
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
98
|
+
}
|
|
99
|
+
: () => {
|
|
100
|
+
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
101
|
+
}),
|
|
127
102
|
];
|
|
128
103
|
}
|
|
129
104
|
}
|
|
@@ -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
|
}
|
|
@@ -11,7 +11,7 @@ class ColumnInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
11
11
|
getViewAccessLevel() {
|
|
12
12
|
return 'Full';
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
createColumnMenuItems(column) {
|
|
15
15
|
if (this.isModuleAvailable()) {
|
|
16
16
|
const columnPopUpParams = {
|
|
17
17
|
source: 'ColumnMenu',
|
|
@@ -28,7 +28,7 @@ class ColumnInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
createContextMenuItems(menuContext) {
|
|
32
32
|
if (this.isModuleAvailable()) {
|
|
33
33
|
const columnPopUpParams = {
|
|
34
34
|
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
|
}
|
|
@@ -28,49 +28,48 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
28
28
|
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, (0, ObjectFactory_1.createBaseContext)(this.api)));
|
|
29
29
|
this.api.commentApi.setGridComments(commentThreads);
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
var _a, _b;
|
|
31
|
+
createContextMenuItems(menuContext) {
|
|
32
|
+
var _a, _b, _c, _d, _e;
|
|
33
33
|
if (!this.isModuleAvailable()) {
|
|
34
|
-
return
|
|
34
|
+
return;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (!isCellCommentable ||
|
|
39
|
-
isCellCommentable(Object.assign({ gridCell: menuContext.gridCell }, (0, ObjectFactory_1.createBaseContext)(this.api)))) {
|
|
40
|
-
items.push(...this.getAddRemoveCommentsMenuItems(menuContext));
|
|
36
|
+
if (!this.api.commentApi.internalApi.areCommentsSupported()) {
|
|
37
|
+
return;
|
|
41
38
|
}
|
|
42
|
-
return items;
|
|
43
|
-
}
|
|
44
|
-
getAddRemoveCommentsMenuItems(menuContext) {
|
|
45
|
-
var _a;
|
|
46
39
|
const items = [];
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
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'
|
|
41
|
+
? (_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 }, (0, ObjectFactory_1.createBaseContext)(this.api)))
|
|
42
|
+
: true;
|
|
43
|
+
if (!isCellCommentable) {
|
|
44
|
+
return;
|
|
49
45
|
}
|
|
50
46
|
const cellAddress = {
|
|
51
47
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
52
48
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
53
49
|
};
|
|
54
|
-
const cellComments = (
|
|
50
|
+
const cellComments = (_e = this.api.commentApi.getCommentThread(cellAddress)) === null || _e === void 0 ? void 0 : _e.Comments;
|
|
55
51
|
if (cellComments) {
|
|
56
|
-
|
|
57
|
-
this.
|
|
58
|
-
|
|
52
|
+
return [
|
|
53
|
+
this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
54
|
+
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
55
|
+
}),
|
|
56
|
+
];
|
|
59
57
|
}
|
|
60
58
|
else {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
return [
|
|
60
|
+
this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
61
|
+
// add an empty one
|
|
62
|
+
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
63
|
+
requestAnimationFrame(() => {
|
|
64
|
+
this.api.internalApi.getCellPopupService().showPopup({
|
|
65
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
66
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
67
|
+
}, true);
|
|
68
|
+
this.api.internalApi.getCellPopupService().editFocusedEntity('Comment');
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
];
|
|
72
72
|
}
|
|
73
|
-
return items;
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
exports.CommentModule = CommentModule;
|
|
@@ -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[];
|
|
@@ -22,7 +22,7 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
hasNamedQueryReferences() {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
createColumnMenuItems(column) {
|
|
26
26
|
if (column && this.isModuleEditable() && column.sortable) {
|
|
27
27
|
let customSort = this.api.customSortApi
|
|
28
28
|
.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
|
}
|
|
@@ -21,10 +21,10 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
21
21
|
this.api.dashboardApi.internalApi.fireDashboardChangedEvent('ADAPTABLE_READY', null, this.api.dashboardApi.getDashboardState());
|
|
22
22
|
}, 20);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
createColumnMenuItems() {
|
|
25
25
|
return this.buildMenuItems();
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
createContextMenuItems(menuContext) {
|
|
28
28
|
return this.buildMenuItems();
|
|
29
29
|
}
|
|
30
30
|
buildMenuItems() {
|
|
@@ -51,18 +51,7 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
51
51
|
else {
|
|
52
52
|
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
53
53
|
}
|
|
54
|
-
return
|
|
55
|
-
{
|
|
56
|
-
name: 'dashboard-parent',
|
|
57
|
-
label: this.moduleInfo.FriendlyName,
|
|
58
|
-
isVisible: true,
|
|
59
|
-
module: this.moduleInfo.ModuleName,
|
|
60
|
-
icon: {
|
|
61
|
-
name: 'dashboard',
|
|
62
|
-
},
|
|
63
|
-
subItems: menuItems,
|
|
64
|
-
},
|
|
65
|
-
];
|
|
54
|
+
return menuItems;
|
|
66
55
|
}
|
|
67
56
|
}
|
|
68
57
|
}
|
|
@@ -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
|
}
|
|
@@ -8,18 +8,18 @@ class DataImportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
8
8
|
constructor(api) {
|
|
9
9
|
super(ModuleConstants.DataImportModuleId, ModuleConstants.DataImportFriendyName, 'import', 'DataImportPopup', 'Import Data', api);
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
createModuleMenuItem(source) {
|
|
12
12
|
if (this.isModuleAvailable()) {
|
|
13
13
|
return this.createDataImportMenuItem(source);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
createContextMenuItems() {
|
|
17
17
|
if (this.isModuleAvailable()) {
|
|
18
18
|
return [this.createDataImportMenuItem('ContextMenu')];
|
|
19
19
|
}
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
createColumnMenuItems() {
|
|
23
23
|
if (this.isModuleAvailable()) {
|
|
24
24
|
return [this.createDataImportMenuItem('ColumnMenu')];
|
|
25
25
|
}
|
|
@@ -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;
|
|
@@ -44,14 +44,12 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
44
44
|
}
|
|
45
45
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(report.Query.BooleanExpression);
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
createContextMenuItems(menuContext) {
|
|
48
48
|
const canExport = !menuContext.isRowGroupColumn && this.isModuleAvailable();
|
|
49
49
|
if (!canExport) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
let returnMenuItems = [];
|
|
53
|
-
let selectedCellmenuItems = [];
|
|
54
|
-
let selectedRowmenuItems = [];
|
|
55
53
|
const canExportCells = menuContext.selectedCellInfo &&
|
|
56
54
|
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
57
55
|
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
@@ -62,63 +60,36 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
62
60
|
menuContext.isSelectedRow;
|
|
63
61
|
if (canExportCells) {
|
|
64
62
|
const selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
|
|
65
|
-
|
|
63
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedCellReport, 'cells'));
|
|
66
64
|
}
|
|
67
65
|
if (canExportRows) {
|
|
68
66
|
const selectedRowReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_ROWS_REPORT);
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
// if only selected cells then just do one level
|
|
72
|
-
if (canExportCells && !canExportRows) {
|
|
73
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Cells', selectedCellmenuItems));
|
|
74
|
-
// if only selected Rows then just do one level
|
|
75
|
-
}
|
|
76
|
-
else if (canExportRows && !canExportCells) {
|
|
77
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Rows', selectedRowmenuItems));
|
|
78
|
-
}
|
|
79
|
-
// if both selected Cells and Rows then add a new level
|
|
80
|
-
else if (canExportRows && canExportCells) {
|
|
81
|
-
const exportSelectedCellsMenuItem = this.buildExportMenuItem('Cells', selectedCellmenuItems);
|
|
82
|
-
const exportSelectedRowsMenuItem = this.buildExportMenuItem('Rows', selectedRowmenuItems);
|
|
83
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected', [
|
|
84
|
-
exportSelectedCellsMenuItem,
|
|
85
|
-
exportSelectedRowsMenuItem,
|
|
86
|
-
]));
|
|
67
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedRowReport, 'rows'));
|
|
87
68
|
}
|
|
88
69
|
return returnMenuItems;
|
|
89
70
|
}
|
|
90
|
-
buildReportMenuItems(report) {
|
|
71
|
+
buildReportMenuItems(report, selectionType) {
|
|
91
72
|
const menuItems = [];
|
|
92
73
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
93
|
-
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
74
|
+
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination, selectionType), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
94
75
|
}
|
|
95
76
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
96
|
-
menuItems.push(this.createMenuItemClickFunction(
|
|
77
|
+
menuItems.push(this.createMenuItemClickFunction(`export-${selectionType}-custom-destination`, customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
97
78
|
}
|
|
98
79
|
return menuItems;
|
|
99
80
|
}
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
name: 'export-parent',
|
|
103
|
-
label: label,
|
|
104
|
-
module: this.moduleInfo.ModuleName,
|
|
105
|
-
isVisible: true,
|
|
106
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
107
|
-
subItems: subItems,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
getMenuName(exportDestination) {
|
|
81
|
+
getMenuName(exportDestination, selectionType) {
|
|
111
82
|
switch (exportDestination) {
|
|
112
83
|
case Enums_1.ExportDestination.CSV:
|
|
113
|
-
return
|
|
84
|
+
return `export-${selectionType}-csv`;
|
|
114
85
|
case Enums_1.ExportDestination.Clipboard:
|
|
115
|
-
return
|
|
86
|
+
return `export-${selectionType}-clipboard`;
|
|
116
87
|
case Enums_1.ExportDestination.Excel:
|
|
117
|
-
return
|
|
88
|
+
return `export-${selectionType}-excel`;
|
|
118
89
|
case Enums_1.ExportDestination.JSON:
|
|
119
|
-
return
|
|
90
|
+
return `export-${selectionType}-json`;
|
|
120
91
|
case Enums_1.ExportDestination.Table:
|
|
121
|
-
return
|
|
92
|
+
return `export-${selectionType}-table`;
|
|
122
93
|
}
|
|
123
94
|
}
|
|
124
95
|
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;
|
|
@@ -8,7 +8,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
8
8
|
constructor(api) {
|
|
9
9
|
super(ModuleConstants.Fdc3ModuleId, ModuleConstants.Fdc3FriendlyName, 'fdc3', null, 'The FDC3 Module - handles the FDC3 integration', api);
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
createContextMenuItems(menuContext) {
|
|
12
12
|
if (!this.isModuleAvailable()) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -29,19 +29,6 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
29
29
|
contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig, currentRowNode));
|
|
30
30
|
});
|
|
31
31
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
32
|
-
if (contextMenuItems.length > 1) {
|
|
33
|
-
const groupMenuItem = {
|
|
34
|
-
name: 'fdc3-parent',
|
|
35
|
-
module: this.moduleInfo.ModuleName,
|
|
36
|
-
label: 'FDC3',
|
|
37
|
-
icon: {
|
|
38
|
-
name: 'fdc3',
|
|
39
|
-
},
|
|
40
|
-
isVisible: true,
|
|
41
|
-
subItems: contextMenuItems,
|
|
42
|
-
};
|
|
43
|
-
return [groupMenuItem];
|
|
44
|
-
}
|
|
45
32
|
return contextMenuItems;
|
|
46
33
|
}
|
|
47
34
|
}
|
|
@@ -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;
|
|
@@ -64,7 +64,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
}
|
|
65
65
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
createColumnMenuItems(column) {
|
|
68
68
|
if (column && this.isModuleEditable()) {
|
|
69
69
|
if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
|
|
70
70
|
const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
@@ -89,7 +89,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
createContextMenuItems(menuContext) {
|
|
93
93
|
const items = [];
|
|
94
94
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
95
95
|
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[];
|
|
@@ -14,7 +14,6 @@ const getFormatColumnStyleViewItems_1 = require("./Utilities/FormatColumn/getFor
|
|
|
14
14
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
15
15
|
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
16
16
|
const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
17
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
18
17
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'color-palette', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
@@ -41,56 +40,38 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
41
40
|
}
|
|
42
41
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
createColumnMenuItems(column) {
|
|
44
|
+
if (!column || !this.isModuleEditable() || column.isSparkline) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
45
47
|
let returnColumnMenuItems = [];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
let createPopupParam = {
|
|
49
|
+
column: column,
|
|
50
|
+
action: 'New',
|
|
51
|
+
source: 'ColumnMenu',
|
|
52
|
+
};
|
|
53
|
+
const createFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
54
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
55
|
+
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
56
|
+
if (formatColumnsForColumn.length === 1) {
|
|
57
|
+
let editPopupParam = {
|
|
48
58
|
column: column,
|
|
49
|
-
action: '
|
|
59
|
+
action: 'Edit',
|
|
60
|
+
value: formatColumnsForColumn[0],
|
|
50
61
|
source: 'ColumnMenu',
|
|
51
62
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
value: formatColumnsForColumn[0],
|
|
65
|
-
source: 'ColumnMenu',
|
|
66
|
-
};
|
|
67
|
-
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
68
|
-
returnColumnMenuItems.push({
|
|
69
|
-
name: 'format-column-parent',
|
|
70
|
-
label: 'Format Column',
|
|
71
|
-
module: this.moduleInfo.ModuleName,
|
|
72
|
-
isVisible: true,
|
|
73
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
74
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
75
|
-
});
|
|
76
|
-
// if more than one then display a Create and a Show
|
|
77
|
-
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
78
|
-
// or to filter the format columns ?
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const moduleInfo = this.api.internalApi
|
|
82
|
-
.getModuleService()
|
|
83
|
-
.getModuleInfoByModule('FormatColumn');
|
|
84
|
-
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
85
|
-
returnColumnMenuItems.push({
|
|
86
|
-
name: 'format-column-parent',
|
|
87
|
-
label: 'Format Column',
|
|
88
|
-
module: this.moduleInfo.ModuleName,
|
|
89
|
-
isVisible: true,
|
|
90
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
91
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
92
|
-
});
|
|
93
|
-
}
|
|
63
|
+
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
64
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
65
|
+
}
|
|
66
|
+
else if (formatColumnsForColumn.length > 1) {
|
|
67
|
+
// if more than one then display a Create and a Show
|
|
68
|
+
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
69
|
+
// or to filter the format columns ?
|
|
70
|
+
const moduleInfo = this.api.internalApi
|
|
71
|
+
.getModuleService()
|
|
72
|
+
.getModuleInfoByModule('FormatColumn');
|
|
73
|
+
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
74
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
94
75
|
}
|
|
95
76
|
return returnColumnMenuItems;
|
|
96
77
|
}
|
|
@@ -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[];
|
|
@@ -21,7 +21,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
21
21
|
hasNamedQueryReferences() {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
createColumnMenuItems(column) {
|
|
25
25
|
if (column && this.isModuleEditable()) {
|
|
26
26
|
if (this.api.freeTextColumnApi
|
|
27
27
|
.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
|
}
|