@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
|
@@ -11,7 +11,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
11
11
|
getViewAccessLevel() {
|
|
12
12
|
return 'Full';
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
createColumnMenuItems(column) {
|
|
15
15
|
if (this.isModuleAvailable()) {
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
@@ -23,7 +23,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
createContextMenuItems(menuContext) {
|
|
27
27
|
if (this.isModuleAvailable()) {
|
|
28
28
|
return [
|
|
29
29
|
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(): {
|
|
@@ -40,9 +40,9 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
40
40
|
requestAnimationFrame(() => {
|
|
41
41
|
this.api.layoutApi.internalApi.fireLayoutChangedEvent('ADAPTABLE_READY', null, this.api.layoutApi.getLayoutState());
|
|
42
42
|
});
|
|
43
|
-
this.
|
|
43
|
+
this.rowSummariesSubscriptions();
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
rowSummariesSubscriptions() {
|
|
46
46
|
if (this.api.isDestroyed()) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -150,62 +150,50 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
150
150
|
hasNamedQueryReferences() {
|
|
151
151
|
return true;
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
createColumnMenuItems(column) {
|
|
154
154
|
var _a, _b;
|
|
155
|
+
if (!this.isModuleEditable()) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
155
158
|
let returnColumnMenuItems = [];
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
160
|
+
if (!isReadOnlyLayout) {
|
|
161
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
162
|
+
action: 'Edit',
|
|
163
|
+
source: 'ColumnMenu',
|
|
164
|
+
value: this.api.layoutApi.getCurrentLayout(),
|
|
165
|
+
}));
|
|
166
|
+
if (column) {
|
|
167
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (column) {
|
|
171
|
+
if (column.hideable) {
|
|
172
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
173
|
+
this.api.columnApi.hideColumn(column.columnId);
|
|
163
174
|
}));
|
|
164
175
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
176
|
+
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
177
|
+
if (hasExistingSelection) {
|
|
178
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
179
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
180
|
+
}));
|
|
181
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
182
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
183
|
+
}));
|
|
174
184
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
180
|
-
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
181
|
-
}));
|
|
182
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
183
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
184
|
-
}));
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
188
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
185
|
+
else {
|
|
186
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
187
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
188
|
+
}));
|
|
191
189
|
}
|
|
192
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
193
|
-
this.api.gridApi.selectAll();
|
|
194
|
-
}));
|
|
195
|
-
returnColumnMenuItems.push({
|
|
196
|
-
name: 'layout-select-parent',
|
|
197
|
-
label: 'Select',
|
|
198
|
-
isVisible: true,
|
|
199
|
-
module: this.moduleInfo.ModuleName,
|
|
200
|
-
icon: {
|
|
201
|
-
name: 'tab-unselected',
|
|
202
|
-
},
|
|
203
|
-
subItems: selectMenuItems,
|
|
204
|
-
});
|
|
205
190
|
}
|
|
191
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
192
|
+
this.api.gridApi.selectAll();
|
|
193
|
+
}));
|
|
206
194
|
return returnColumnMenuItems;
|
|
207
195
|
}
|
|
208
|
-
|
|
196
|
+
createContextMenuItems(menuContext) {
|
|
209
197
|
let returnColumnMenuItems = [];
|
|
210
198
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
211
199
|
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
@@ -217,36 +205,23 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
217
205
|
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns)) ||
|
|
218
206
|
(menuContext.selectedRowInfo &&
|
|
219
207
|
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedRowInfo.gridRows))) {
|
|
220
|
-
|
|
208
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', () => {
|
|
221
209
|
this.api.gridApi.deselectAll();
|
|
222
|
-
};
|
|
223
|
-
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
224
|
-
if (this.isModuleAvailable()) {
|
|
225
|
-
let gridMenuItems = [];
|
|
226
|
-
let autoSizeFunction = () => {
|
|
227
|
-
this.api.columnApi.autosizeAllColumns();
|
|
228
|
-
};
|
|
229
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
230
|
-
let clickFunction = () => {
|
|
231
|
-
this.api.gridApi.selectAll();
|
|
232
|
-
};
|
|
233
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
234
|
-
returnColumnMenuItems.push({
|
|
235
|
-
name: 'layout-grid-parent',
|
|
236
|
-
label: 'Grid',
|
|
237
|
-
module: this.moduleInfo.ModuleName,
|
|
238
|
-
isVisible: true,
|
|
239
|
-
icon: { name: 'align-justify' },
|
|
240
|
-
subItems: gridMenuItems,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
210
|
+
}));
|
|
243
211
|
}
|
|
212
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', () => {
|
|
213
|
+
this.api.gridApi.selectAll();
|
|
214
|
+
}));
|
|
215
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', () => {
|
|
216
|
+
this.api.columnApi.autosizeAllColumns();
|
|
217
|
+
}));
|
|
244
218
|
const viewPivotItemsMenuItem = this.createViewPivotItemsMenuItem(menuContext);
|
|
245
219
|
if (viewPivotItemsMenuItem) {
|
|
246
220
|
returnColumnMenuItems.push(viewPivotItemsMenuItem);
|
|
247
221
|
}
|
|
248
222
|
return returnColumnMenuItems;
|
|
249
223
|
}
|
|
224
|
+
// TODO next time this method is touched, it should be extracted in an internal Api
|
|
250
225
|
createViewPivotItemsMenuItem(menuContext) {
|
|
251
226
|
// current group => menuContext.rowNode.field;
|
|
252
227
|
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
|
}
|
|
@@ -14,49 +14,47 @@ class NoteModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
14
14
|
// Note module doesn't support autogenerated primary keys
|
|
15
15
|
return super.isModuleAvailable() && !this.api.optionsApi.getAutogeneratePrimaryKey();
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
var _a, _b;
|
|
17
|
+
createContextMenuItems(menuContext) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
19
|
if (!this.isModuleAvailable()) {
|
|
20
|
-
return
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!this.api.noteApi.internalApi.areNotesSupported()) {
|
|
23
|
+
return;
|
|
21
24
|
}
|
|
22
25
|
const isReadOnly = this.adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName) === 'ReadOnly';
|
|
23
26
|
if (isReadOnly) {
|
|
24
27
|
return undefined;
|
|
25
28
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return items;
|
|
32
|
-
}
|
|
33
|
-
getAddRemoveNoteMenuItems(menuContext) {
|
|
34
|
-
var _a;
|
|
35
|
-
const items = [];
|
|
36
|
-
if (!this.api.noteApi.internalApi.areNotesAvailable()) {
|
|
37
|
-
return items;
|
|
29
|
+
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'
|
|
30
|
+
? this.adaptable.api.optionsApi.getNoteOptions().isCellNotable(Object.assign({ gridCell: menuContext.gridCell }, (0, ObjectFactory_1.createBaseContext)(this.api)))
|
|
31
|
+
: true;
|
|
32
|
+
if (!isCellNotable) {
|
|
33
|
+
return;
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
const [note] = (_a = this.adaptable.api.noteApi.getNotesForCell({
|
|
35
|
+
const [note] = (_c = this.adaptable.api.noteApi.getNotesForCell({
|
|
41
36
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
42
37
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
43
|
-
})) !== null &&
|
|
38
|
+
})) !== null && _c !== void 0 ? _c : [];
|
|
44
39
|
if (note) {
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
|
|
40
|
+
return [
|
|
41
|
+
this.createMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
|
|
42
|
+
this.api.noteApi.deleteNote(note);
|
|
43
|
+
}),
|
|
44
|
+
];
|
|
48
45
|
}
|
|
49
46
|
else {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
return [
|
|
48
|
+
this.createMenuItemClickFunction('note-add', 'Add Note', this.moduleInfo.Glyph, () => {
|
|
49
|
+
// add an empty one
|
|
50
|
+
this.api.noteApi.addNote('', menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
51
|
+
this.api.internalApi.getCellPopupService().showPopup({
|
|
52
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
53
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
54
|
+
}, true);
|
|
55
|
+
}),
|
|
56
|
+
];
|
|
58
57
|
}
|
|
59
|
-
return items;
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
exports.NoteModule = NoteModule;
|
|
@@ -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;
|
|
@@ -56,7 +56,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
56
56
|
}
|
|
57
57
|
this.shouldHandleKeyDown = newShouldHandleKeyDown;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
createColumnMenuItems(column) {
|
|
60
60
|
if (column && this.isModuleEditable() && column.dataType == 'Number') {
|
|
61
61
|
let popupParam = {
|
|
62
62
|
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
|
}
|
|
@@ -10,18 +10,18 @@ class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
10
10
|
const friendlyName = api.optionsApi.getSettingsPanelOptions().title;
|
|
11
11
|
super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
createColumnMenuItems(column) {
|
|
14
14
|
return [
|
|
15
15
|
// To do : get the icon and name from settings in case they have changed?
|
|
16
16
|
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
createContextMenuItems(menuContext) {
|
|
20
20
|
return [
|
|
21
21
|
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
createModuleMenuItem(source) {
|
|
25
25
|
if (this.isModuleAvailable()) {
|
|
26
26
|
return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
27
27
|
}
|
|
@@ -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;
|
|
@@ -15,7 +15,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
15
15
|
getViewAccessLevel() {
|
|
16
16
|
return 'Full';
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
createContextMenuItems(menuContext) {
|
|
19
19
|
// not sure if this is right but logic is that
|
|
20
20
|
// if the context cell is one of a selection taht can have smart edit applied
|
|
21
21
|
// then open the smart edit screen
|
|
@@ -31,7 +31,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
let popUpParams = {
|
|
32
32
|
source: 'ContextMenu',
|
|
33
33
|
};
|
|
34
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
34
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
35
|
+
Name: 'smart-edit-apply',
|
|
35
36
|
Label: 'Apply Smart Edit',
|
|
36
37
|
ComponentName: this.moduleInfo.Popup,
|
|
37
38
|
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;
|
|
@@ -29,7 +29,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
29
29
|
hasNamedQueryReferences() {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
createColumnMenuItems(column) {
|
|
33
33
|
let returnColumnMenuItems = [];
|
|
34
34
|
// Need a Column and an editable Module
|
|
35
35
|
if (column && this.isModuleEditable()) {
|
|
@@ -120,14 +120,15 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
120
120
|
} }), config: {
|
|
121
121
|
defaultCurrentSectionName: 'Style',
|
|
122
122
|
} }));
|
|
123
|
-
returnColumnMenuItems.push({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
});
|
|
123
|
+
// returnColumnMenuItems.push({
|
|
124
|
+
// name: 'styled-column-parent',
|
|
125
|
+
// label: 'Create Styled Column',
|
|
126
|
+
// module: this.moduleInfo.ModuleName,
|
|
127
|
+
// isVisible: true,
|
|
128
|
+
// icon: { name: this.moduleInfo.Glyph },
|
|
129
|
+
// subItems: [newGrandientButton, newPrecentBarButton, newBadgeButton],
|
|
130
|
+
// });
|
|
131
|
+
returnColumnMenuItems.push(...[newGrandientButton, newPrecentBarButton, newBadgeButton]);
|
|
131
132
|
break;
|
|
132
133
|
case 'String':
|
|
133
134
|
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
|
}
|
|
@@ -9,20 +9,21 @@ class SystemStatusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
9
9
|
constructor(api) {
|
|
10
10
|
super(ModuleConstants.SystemStatusModuleId, ModuleConstants.SystemStatusFriendlyName, 'traffic-lights', 'SystemStatusPopup', 'Provide messages about the Status of your application', api);
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
createColumnMenuItems(column) {
|
|
13
13
|
if (this.isModuleAvailable()) {
|
|
14
14
|
return [
|
|
15
15
|
this.createMenuItemShowPopup('system-status-show', 'Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
16
16
|
];
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
createContextMenuItems(menuContext) {
|
|
20
20
|
if (this.isModuleAvailable()) {
|
|
21
21
|
let popUpParams = {
|
|
22
22
|
source: 'ContextMenu',
|
|
23
23
|
};
|
|
24
24
|
return [
|
|
25
|
-
this.createMainMenuItemShowPopup({
|
|
25
|
+
this.createMainMenuItemShowPopup({
|
|
26
|
+
Name: 'system-status-show',
|
|
26
27
|
Label: 'Show System Status',
|
|
27
28
|
ComponentName: this.moduleInfo.Popup,
|
|
28
29
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -14,13 +14,13 @@ class ModuleService {
|
|
|
14
14
|
const settingsPanelMenuItems = [];
|
|
15
15
|
const buttonMenuItems = [];
|
|
16
16
|
this.getModuleCollection().forEach((module) => {
|
|
17
|
-
const settingsPanelMenuItem = module.
|
|
17
|
+
const settingsPanelMenuItem = module.createModuleMenuItem('ModuleMenu');
|
|
18
18
|
if (Helper_1.default.objectExists(settingsPanelMenuItem)) {
|
|
19
19
|
if (settingsPanelMenuItems.findIndex((m) => m.module == settingsPanelMenuItem.module) == -1) {
|
|
20
20
|
settingsPanelMenuItems.push(settingsPanelMenuItem);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const buttonMenuItem = module.
|
|
23
|
+
const buttonMenuItem = module.createModuleMenuItem('ModuleButton');
|
|
24
24
|
if (Helper_1.default.objectExists(buttonMenuItem)) {
|
|
25
25
|
if (buttonMenuItems.findIndex((m) => m.module == buttonMenuItem.module) == -1) {
|
|
26
26
|
buttonMenuItems.push(buttonMenuItem);
|
|
@@ -574,7 +574,7 @@ class AgGridColumnAdapter {
|
|
|
574
574
|
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Note')) {
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
|
-
if (!this.adaptableApi.noteApi.internalApi.
|
|
577
|
+
if (!this.adaptableApi.noteApi.internalApi.areNotesSupported()) {
|
|
578
578
|
return;
|
|
579
579
|
}
|
|
580
580
|
const cellPosition = {
|
|
@@ -591,7 +591,7 @@ class AgGridColumnAdapter {
|
|
|
591
591
|
if (!this.adaptableApi.internalApi.getModuleService().isModuleAvailable('Comment')) {
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
594
|
-
if (!this.adaptableApi.commentApi.internalApi.
|
|
594
|
+
if (!this.adaptableApi.commentApi.internalApi.areCommentsSupported()) {
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
597
597
|
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
|
}
|