@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
|
@@ -7,7 +7,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
7
7
|
getViewAccessLevel() {
|
|
8
8
|
return 'Full';
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
createColumnMenuItems(column) {
|
|
11
11
|
if (this.isModuleAvailable()) {
|
|
12
12
|
return [
|
|
13
13
|
this.createMainMenuItemShowPopup({
|
|
@@ -19,7 +19,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
19
19
|
];
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
createContextMenuItems(menuContext) {
|
|
23
23
|
if (this.isModuleAvailable()) {
|
|
24
24
|
return [
|
|
25
25
|
this.createMainMenuItemShowPopup({
|
|
@@ -141,9 +141,9 @@ export interface AdaptableModuleView {
|
|
|
141
141
|
export interface IModule {
|
|
142
142
|
moduleInfo: ModuleInfo;
|
|
143
143
|
AccessLevel: AccessLevel;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
createModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
145
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
146
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
147
147
|
setModuleEntitlement(): void;
|
|
148
148
|
isModuleAvailable(): boolean;
|
|
149
149
|
isModuleEditable(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
-
import {
|
|
3
|
+
import { Layout, LayoutState } from '../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
6
6
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
@@ -13,13 +13,13 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
|
|
|
13
13
|
protected LayoutState: LayoutState;
|
|
14
14
|
constructor(api: AdaptableApi);
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
|
|
16
|
+
rowSummariesSubscriptions(): void;
|
|
17
17
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
18
18
|
getExplicitlyReferencedColumnIds(layout: Layout): string[];
|
|
19
19
|
getTeamSharingReferences(adaptableObject: AdaptableObject): TeamSharingReferences;
|
|
20
20
|
hasNamedQueryReferences(): boolean;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
22
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
23
23
|
private createViewPivotItemsMenuItem;
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<Layout>;
|
|
25
25
|
toViewAll(): {
|
|
@@ -36,9 +36,9 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
36
36
|
requestAnimationFrame(() => {
|
|
37
37
|
this.api.layoutApi.internalApi.fireLayoutChangedEvent('ADAPTABLE_READY', null, this.api.layoutApi.getLayoutState());
|
|
38
38
|
});
|
|
39
|
-
this.
|
|
39
|
+
this.rowSummariesSubscriptions();
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
rowSummariesSubscriptions() {
|
|
42
42
|
if (this.api.isDestroyed()) {
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
@@ -146,62 +146,50 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
146
146
|
hasNamedQueryReferences() {
|
|
147
147
|
return true;
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
createColumnMenuItems(column) {
|
|
150
150
|
var _a, _b;
|
|
151
|
+
if (!this.isModuleEditable()) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
151
154
|
let returnColumnMenuItems = [];
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
156
|
+
if (!isReadOnlyLayout) {
|
|
157
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
158
|
+
action: 'Edit',
|
|
159
|
+
source: 'ColumnMenu',
|
|
160
|
+
value: this.api.layoutApi.getCurrentLayout(),
|
|
161
|
+
}));
|
|
162
|
+
if (column) {
|
|
163
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (column) {
|
|
167
|
+
if (column.hideable) {
|
|
168
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
169
|
+
this.api.columnApi.hideColumn(column.columnId);
|
|
159
170
|
}));
|
|
160
171
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
172
|
+
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
173
|
+
if (hasExistingSelection) {
|
|
174
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
175
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
176
|
+
}));
|
|
177
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
178
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
179
|
+
}));
|
|
170
180
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
176
|
-
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
177
|
-
}));
|
|
178
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
179
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
180
|
-
}));
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
184
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
185
|
-
}));
|
|
186
|
-
}
|
|
181
|
+
else {
|
|
182
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
183
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
184
|
+
}));
|
|
187
185
|
}
|
|
188
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
189
|
-
this.api.gridApi.selectAll();
|
|
190
|
-
}));
|
|
191
|
-
returnColumnMenuItems.push({
|
|
192
|
-
name: 'layout-select-parent',
|
|
193
|
-
label: 'Select',
|
|
194
|
-
isVisible: true,
|
|
195
|
-
module: this.moduleInfo.ModuleName,
|
|
196
|
-
icon: {
|
|
197
|
-
name: 'tab-unselected',
|
|
198
|
-
},
|
|
199
|
-
subItems: selectMenuItems,
|
|
200
|
-
});
|
|
201
186
|
}
|
|
187
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
188
|
+
this.api.gridApi.selectAll();
|
|
189
|
+
}));
|
|
202
190
|
return returnColumnMenuItems;
|
|
203
191
|
}
|
|
204
|
-
|
|
192
|
+
createContextMenuItems(menuContext) {
|
|
205
193
|
let returnColumnMenuItems = [];
|
|
206
194
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
207
195
|
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
@@ -213,36 +201,23 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
213
201
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns)) ||
|
|
214
202
|
(menuContext.selectedRowInfo &&
|
|
215
203
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedRowInfo.gridRows))) {
|
|
216
|
-
|
|
204
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', () => {
|
|
217
205
|
this.api.gridApi.deselectAll();
|
|
218
|
-
};
|
|
219
|
-
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
220
|
-
if (this.isModuleAvailable()) {
|
|
221
|
-
let gridMenuItems = [];
|
|
222
|
-
let autoSizeFunction = () => {
|
|
223
|
-
this.api.columnApi.autosizeAllColumns();
|
|
224
|
-
};
|
|
225
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
226
|
-
let clickFunction = () => {
|
|
227
|
-
this.api.gridApi.selectAll();
|
|
228
|
-
};
|
|
229
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
230
|
-
returnColumnMenuItems.push({
|
|
231
|
-
name: 'layout-grid-parent',
|
|
232
|
-
label: 'Grid',
|
|
233
|
-
module: this.moduleInfo.ModuleName,
|
|
234
|
-
isVisible: true,
|
|
235
|
-
icon: { name: 'align-justify' },
|
|
236
|
-
subItems: gridMenuItems,
|
|
237
|
-
});
|
|
238
|
-
}
|
|
206
|
+
}));
|
|
239
207
|
}
|
|
208
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', () => {
|
|
209
|
+
this.api.gridApi.selectAll();
|
|
210
|
+
}));
|
|
211
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', () => {
|
|
212
|
+
this.api.columnApi.autosizeAllColumns();
|
|
213
|
+
}));
|
|
240
214
|
const viewPivotItemsMenuItem = this.createViewPivotItemsMenuItem(menuContext);
|
|
241
215
|
if (viewPivotItemsMenuItem) {
|
|
242
216
|
returnColumnMenuItems.push(viewPivotItemsMenuItem);
|
|
243
217
|
}
|
|
244
218
|
return returnColumnMenuItems;
|
|
245
219
|
}
|
|
220
|
+
// TODO next time this method is touched, it should be extracted in an internal Api
|
|
246
221
|
createViewPivotItemsMenuItem(menuContext) {
|
|
247
222
|
// current group => menuContext.rowNode.field;
|
|
248
223
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -6,6 +6,5 @@ export declare class NoteModule extends AdaptableModuleBase implements IModule {
|
|
|
6
6
|
private adaptable;
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
isModuleAvailable(): boolean;
|
|
9
|
-
|
|
10
|
-
private getAddRemoveNoteMenuItems;
|
|
9
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
11
10
|
}
|
|
@@ -10,48 +10,46 @@ export class NoteModule extends AdaptableModuleBase {
|
|
|
10
10
|
// Note module doesn't support autogenerated primary keys
|
|
11
11
|
return super.isModuleAvailable() && !this.api.optionsApi.getAutogeneratePrimaryKey();
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
var _a, _b;
|
|
13
|
+
createContextMenuItems(menuContext) {
|
|
14
|
+
var _a, _b, _c;
|
|
15
15
|
if (!this.isModuleAvailable()) {
|
|
16
|
-
return
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (!this.api.noteApi.internalApi.areNotesSupported()) {
|
|
19
|
+
return;
|
|
17
20
|
}
|
|
18
21
|
const isReadOnly = this.adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName) === 'ReadOnly';
|
|
19
22
|
if (isReadOnly) {
|
|
20
23
|
return undefined;
|
|
21
24
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return items;
|
|
28
|
-
}
|
|
29
|
-
getAddRemoveNoteMenuItems(menuContext) {
|
|
30
|
-
var _a;
|
|
31
|
-
const items = [];
|
|
32
|
-
if (!this.api.noteApi.internalApi.areNotesAvailable()) {
|
|
33
|
-
return items;
|
|
25
|
+
const isCellNotable = typeof ((_b = (_a = this.adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions()) === null || _b === void 0 ? void 0 : _b.isCellNotable) === 'function'
|
|
26
|
+
? this.adaptable.api.optionsApi.getNoteOptions().isCellNotable(Object.assign({ gridCell: menuContext.gridCell }, createBaseContext(this.api)))
|
|
27
|
+
: true;
|
|
28
|
+
if (!isCellNotable) {
|
|
29
|
+
return;
|
|
34
30
|
}
|
|
35
|
-
|
|
36
|
-
const [note] = (_a = this.adaptable.api.noteApi.getNotesForCell({
|
|
31
|
+
const [note] = (_c = this.adaptable.api.noteApi.getNotesForCell({
|
|
37
32
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
38
33
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
39
|
-
})) !== null &&
|
|
34
|
+
})) !== null && _c !== void 0 ? _c : [];
|
|
40
35
|
if (note) {
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
36
|
+
return [
|
|
37
|
+
this.createMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
|
|
38
|
+
this.api.noteApi.deleteNote(note);
|
|
39
|
+
}),
|
|
40
|
+
];
|
|
44
41
|
}
|
|
45
42
|
else {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
return [
|
|
44
|
+
this.createMenuItemClickFunction('note-add', 'Add Note', this.moduleInfo.Glyph, () => {
|
|
45
|
+
// add an empty one
|
|
46
|
+
this.api.noteApi.addNote('', menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
47
|
+
this.api.internalApi.getCellPopupService().showPopup({
|
|
48
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
49
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
50
|
+
}, true);
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
54
53
|
}
|
|
55
|
-
return items;
|
|
56
54
|
}
|
|
57
55
|
}
|
|
@@ -19,7 +19,7 @@ export declare class PlusMinusModule extends AdaptableModuleBase implements IPlu
|
|
|
19
19
|
getReferencedNamedQueryNames(plusMinusNudge: PlusMinusNudge): string[];
|
|
20
20
|
onAdaptableReady(): void;
|
|
21
21
|
checkListenToKeyDown(): void;
|
|
22
|
-
|
|
22
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
23
23
|
private handleKeyDown;
|
|
24
24
|
applyPlusMinus(plusMinusNudges: PlusMinusNudge[], cellsToUpdate: GridCell[], direction: 'up' | 'down'): boolean;
|
|
25
25
|
isPlusMinusNudgeApplied(plusMinusNudge: PlusMinusNudge, gridCell: GridCell): boolean;
|
|
@@ -52,7 +52,7 @@ export class PlusMinusModule extends AdaptableModuleBase {
|
|
|
52
52
|
}
|
|
53
53
|
this.shouldHandleKeyDown = newShouldHandleKeyDown;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
createColumnMenuItems(column) {
|
|
56
56
|
if (column && this.isModuleEditable() && column.dataType == 'Number') {
|
|
57
57
|
let popupParam = {
|
|
58
58
|
column: column,
|
|
@@ -5,7 +5,7 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
5
5
|
import { IModule } from './Interface/IModule';
|
|
6
6
|
export declare class SettingsPanelModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
9
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
10
|
+
createModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
11
11
|
}
|
|
@@ -6,18 +6,18 @@ export class SettingsPanelModule extends AdaptableModuleBase {
|
|
|
6
6
|
const friendlyName = api.optionsApi.getSettingsPanelOptions().title;
|
|
7
7
|
super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api);
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
createColumnMenuItems(column) {
|
|
10
10
|
return [
|
|
11
11
|
// To do : get the icon and name from settings in case they have changed?
|
|
12
12
|
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
13
13
|
];
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
createContextMenuItems(menuContext) {
|
|
16
16
|
return [
|
|
17
17
|
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
createModuleMenuItem(source) {
|
|
21
21
|
if (this.isModuleAvailable()) {
|
|
22
22
|
return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
23
23
|
}
|
|
@@ -10,7 +10,7 @@ import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
|
|
|
10
10
|
export declare class SmartEditModule extends AdaptableModuleBase implements ISmartEditModule {
|
|
11
11
|
constructor(api: AdaptableApi);
|
|
12
12
|
getViewAccessLevel(): AccessLevel;
|
|
13
|
-
|
|
13
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
14
14
|
ApplySmartEdit(cellUpdateRequests: CellUpdateRequest[]): void;
|
|
15
15
|
CheckCorrectCellSelection(): IModuleActionReturn<boolean>;
|
|
16
16
|
BuildPreviewValues(smartEditValue: number, smartEditOperation: SmartEditOperation): PreviewInfo;
|
|
@@ -11,7 +11,7 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
11
11
|
getViewAccessLevel() {
|
|
12
12
|
return 'Full';
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
createContextMenuItems(menuContext) {
|
|
15
15
|
// not sure if this is right but logic is that
|
|
16
16
|
// if the context cell is one of a selection taht can have smart edit applied
|
|
17
17
|
// then open the smart edit screen
|
|
@@ -27,7 +27,8 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
27
27
|
let popUpParams = {
|
|
28
28
|
source: 'ContextMenu',
|
|
29
29
|
};
|
|
30
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
30
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
31
|
+
Name: 'smart-edit-apply',
|
|
31
32
|
Label: 'Apply Smart Edit',
|
|
32
33
|
ComponentName: this.moduleInfo.Popup,
|
|
33
34
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -14,7 +14,7 @@ export declare class StyledColumnModule extends AdaptableModuleBase implements I
|
|
|
14
14
|
}): AdaptableObject[];
|
|
15
15
|
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
16
16
|
hasNamedQueryReferences(): boolean;
|
|
17
|
-
|
|
17
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
18
18
|
private getGlyphForStyledColumn;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<StyledColumn>;
|
|
20
20
|
toView(styledColumn: StyledColumn): AdaptableObjectView;
|
|
@@ -25,7 +25,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
25
25
|
hasNamedQueryReferences() {
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
createColumnMenuItems(column) {
|
|
29
29
|
let returnColumnMenuItems = [];
|
|
30
30
|
// Need a Column and an editable Module
|
|
31
31
|
if (column && this.isModuleEditable()) {
|
|
@@ -116,14 +116,15 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
116
116
|
} }), config: {
|
|
117
117
|
defaultCurrentSectionName: 'Style',
|
|
118
118
|
} }));
|
|
119
|
-
returnColumnMenuItems.push({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
});
|
|
119
|
+
// returnColumnMenuItems.push({
|
|
120
|
+
// name: 'styled-column-parent',
|
|
121
|
+
// label: 'Create Styled Column',
|
|
122
|
+
// module: this.moduleInfo.ModuleName,
|
|
123
|
+
// isVisible: true,
|
|
124
|
+
// icon: { name: this.moduleInfo.Glyph },
|
|
125
|
+
// subItems: [newGrandientButton, newPrecentBarButton, newBadgeButton],
|
|
126
|
+
// });
|
|
127
|
+
returnColumnMenuItems.push(...[newGrandientButton, newPrecentBarButton, newBadgeButton]);
|
|
127
128
|
break;
|
|
128
129
|
case 'String':
|
|
129
130
|
returnColumnMenuItems.push(newBadgeButton);
|
|
@@ -5,7 +5,7 @@ import { AdaptableModuleView, IModule } from './Interface/IModule';
|
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
6
6
|
export declare class SystemStatusModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
9
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
10
10
|
getViewProperties(): AdaptableModuleView;
|
|
11
11
|
}
|
|
@@ -5,20 +5,21 @@ export class SystemStatusModule extends AdaptableModuleBase {
|
|
|
5
5
|
constructor(api) {
|
|
6
6
|
super(ModuleConstants.SystemStatusModuleId, ModuleConstants.SystemStatusFriendlyName, 'traffic-lights', 'SystemStatusPopup', 'Provide messages about the Status of your application', api);
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
createColumnMenuItems(column) {
|
|
9
9
|
if (this.isModuleAvailable()) {
|
|
10
10
|
return [
|
|
11
11
|
this.createMenuItemShowPopup('system-status-show', 'Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
12
12
|
];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
createContextMenuItems(menuContext) {
|
|
16
16
|
if (this.isModuleAvailable()) {
|
|
17
17
|
let popUpParams = {
|
|
18
18
|
source: 'ContextMenu',
|
|
19
19
|
};
|
|
20
20
|
return [
|
|
21
|
-
this.createMainMenuItemShowPopup({
|
|
21
|
+
this.createMainMenuItemShowPopup({
|
|
22
|
+
Name: 'system-status-show',
|
|
22
23
|
Label: 'Show System Status',
|
|
23
24
|
ComponentName: this.moduleInfo.Popup,
|
|
24
25
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -10,13 +10,13 @@ export class ModuleService {
|
|
|
10
10
|
const settingsPanelMenuItems = [];
|
|
11
11
|
const buttonMenuItems = [];
|
|
12
12
|
this.getModuleCollection().forEach((module) => {
|
|
13
|
-
const settingsPanelMenuItem = module.
|
|
13
|
+
const settingsPanelMenuItem = module.createModuleMenuItem('ModuleMenu');
|
|
14
14
|
if (Helper.objectExists(settingsPanelMenuItem)) {
|
|
15
15
|
if (settingsPanelMenuItems.findIndex((m) => m.module == settingsPanelMenuItem.module) == -1) {
|
|
16
16
|
settingsPanelMenuItems.push(settingsPanelMenuItem);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const buttonMenuItem = module.
|
|
19
|
+
const buttonMenuItem = module.createModuleMenuItem('ModuleButton');
|
|
20
20
|
if (Helper.objectExists(buttonMenuItem)) {
|
|
21
21
|
if (buttonMenuItems.findIndex((m) => m.module == buttonMenuItem.module) == -1) {
|
|
22
22
|
buttonMenuItems.push(buttonMenuItem);
|
|
@@ -570,7 +570,7 @@ export class AgGridColumnAdapter {
|
|
|
570
570
|
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Note')) {
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
|
-
if (!this.adaptableApi.noteApi.internalApi.
|
|
573
|
+
if (!this.adaptableApi.noteApi.internalApi.areNotesSupported()) {
|
|
574
574
|
return;
|
|
575
575
|
}
|
|
576
576
|
const cellPosition = {
|
|
@@ -587,7 +587,7 @@ export class AgGridColumnAdapter {
|
|
|
587
587
|
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Comment')) {
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
if (!this.adaptableApi.commentApi.internalApi.
|
|
590
|
+
if (!this.adaptableApi.commentApi.internalApi.areCommentsSupported()) {
|
|
591
591
|
return;
|
|
592
592
|
}
|
|
593
593
|
const position = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
-
import {
|
|
2
|
+
import { GetContextMenuItems, GetContextMenuItemsParams, GetMainMenuItems, GetMainMenuItemsParams, MenuItemDef } from '@ag-grid-community/core';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
-
import { AdaptableMenuItem
|
|
4
|
+
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
export declare class AgGridMenuAdapter {
|
|
6
6
|
private adaptableInstance;
|
|
7
7
|
constructor(adaptableInstance: AdaptableAgGrid);
|
|
@@ -9,20 +9,30 @@ export declare class AgGridMenuAdapter {
|
|
|
9
9
|
private get adaptableApi();
|
|
10
10
|
destroy(): void;
|
|
11
11
|
buildColumnMenu(params: GetMainMenuItemsParams, originalGetMainMenuItems: GetMainMenuItems): (string | MenuItemDef)[];
|
|
12
|
-
buildStructuredAdaptableColumnItems(menuContext: ColumnMenuContext): {
|
|
13
|
-
adaptableMenuItems: AdaptableMenuItem[];
|
|
14
|
-
structuredAdaptableMenuItems: AdaptableMenuItem[];
|
|
15
|
-
};
|
|
16
12
|
buildContextMenu(params: GetContextMenuItemsParams, originalGetContextMenuItems: GetContextMenuItems): (string | MenuItemDef)[];
|
|
17
|
-
createColumnMenuContextObject
|
|
13
|
+
private createColumnMenuContextObject;
|
|
18
14
|
private createAdaptableContextMenuItems;
|
|
19
15
|
private createContextMenuContextObject;
|
|
20
16
|
private mapAdaptableMenuItemToAgGridMenuDefinition;
|
|
21
17
|
private mapCustomMenuItemToAgGridMenuDefinition;
|
|
22
18
|
private mapUserMenuItemToAgGridMenuDefinition;
|
|
23
|
-
private
|
|
19
|
+
private buildContextMenuDefaultStructure;
|
|
20
|
+
/**
|
|
21
|
+
* Default strategy for menu items: return as is if there is only one item, otherwise group them under a parent item
|
|
22
|
+
*/
|
|
23
|
+
private getModuleSpecificStructure;
|
|
24
|
+
private getExportContextMenuStructure;
|
|
25
|
+
private getLayoutContextMenuStructure;
|
|
26
|
+
private buildMenuGroupParent;
|
|
27
|
+
private buildColumnMenuDefaultStructure;
|
|
28
|
+
private getLayoutColumnMenuStructure;
|
|
29
|
+
private getStyledColumnColumnMenuStructure;
|
|
24
30
|
private mapAdaptableMenuItemToSystemMenuItems;
|
|
25
31
|
private createAdaptableColumnMenuItems;
|
|
26
32
|
private mapAdaptableIconToAgGridIcon;
|
|
33
|
+
/**
|
|
34
|
+
* The output of this function is used to build the column header menu if the AG Grid Menu Module is NOT present
|
|
35
|
+
* This is controlled by the AdaptableAgGrid.embedColumnMenu property
|
|
36
|
+
*/
|
|
27
37
|
buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
|
|
28
38
|
}
|