@adaptabletools/adaptable 18.0.0-canary.26 → 18.0.0-canary.28
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/base.css.map +1 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +7 -19
- package/src/AdaptableOptions/MenuOptions.js +1 -96
- package/src/Api/Implementation/ColumnApiImpl.js +6 -6
- package/src/Api/Implementation/ExpressionApiImpl.js +12 -12
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -9
- package/src/Api/Implementation/LayoutApiImpl.js +0 -4
- package/src/Api/Implementation/ScopeApiImpl.js +4 -4
- package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +5 -3
- package/src/Api/Internal/GridFilterInternalApi.d.ts +2 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- 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/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.js +22 -20
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +3 -3
- 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 +4 -4
- 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 +3 -3
- package/src/Strategy/Interface/IModule.d.ts +3 -3
- package/src/Strategy/LayoutModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.js +47 -72
- 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 +17 -15
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +4 -2
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +2 -1
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/AgGridMenuAdapter.d.ts +19 -8
- package/src/agGrid/AgGridMenuAdapter.js +319 -50
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +4 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +4 -0
- package/src/components/icons/index.js +10 -0
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +4 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +4 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +1218 -55
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +1 -3
- package/src/parser/src/types.js +1 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -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
|
}
|
|
@@ -2,12 +2,12 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
2
2
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
3
|
export class GridInfoModule extends AdaptableModuleBase {
|
|
4
4
|
constructor(api) {
|
|
5
|
-
super(ModuleConstants.GridInfoModuleId, ModuleConstants.GridInfoFriendlyName, '
|
|
5
|
+
super(ModuleConstants.GridInfoModuleId, ModuleConstants.GridInfoFriendlyName, 'grid-info', 'GridInfoPopup', 'Display information about the Grid, the Options selected and all columns', api);
|
|
6
6
|
}
|
|
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,65 +146,53 @@ 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, 'edit-table', {
|
|
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', 'Select Column (Preserve Selection)', 'select-fwd', () => {
|
|
175
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
176
|
+
}));
|
|
177
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Select Column (Reset Selection)', 'tab-unselected', () => {
|
|
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', 'Select Column', 'tab-unselected', () => {
|
|
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-grid-select', 'Select Grid', 'select-all', () => {
|
|
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
|
-
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup,
|
|
195
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, 'edit-table', {
|
|
208
196
|
action: 'Edit',
|
|
209
197
|
source: 'ColumnMenu',
|
|
210
198
|
}));
|
|
@@ -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', 'select-off', () => {
|
|
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 Grid', 'select-all', () => {
|
|
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()) {
|
|
@@ -80,7 +80,8 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
const icon = this.getGlyphForStyledColumn(styledColumn);
|
|
83
|
-
const
|
|
83
|
+
const typeLabel = this.getTypeLabel(styledColumn);
|
|
84
|
+
const label = `Edit ${typeLabel}`;
|
|
84
85
|
const name = this.getTypeName(styledColumn);
|
|
85
86
|
returnColumnMenuItems.push(this.createMenuItemShowPopup(name, label, this.moduleInfo.Popup, icon, popupParam));
|
|
86
87
|
}
|
|
@@ -93,7 +94,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
93
94
|
value: newStyledColumn,
|
|
94
95
|
config: {},
|
|
95
96
|
};
|
|
96
|
-
const badgeLabel =
|
|
97
|
+
const badgeLabel = 'Create Badge Style';
|
|
97
98
|
const newBadgeButton = this.createMenuItemShowPopup('styled-column-badge-add', badgeLabel, this.moduleInfo.Popup, 'badge', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { BadgeStyle: {
|
|
98
99
|
Badges: [ObjectFactory.CreateDefaultStyledColumnBadge()],
|
|
99
100
|
} }), config: {
|
|
@@ -106,24 +107,25 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
106
107
|
const emptyRanges = this.api.scopeApi.createCellColorRangesForScope({
|
|
107
108
|
ColumnIds: [column.columnId],
|
|
108
109
|
});
|
|
109
|
-
const newGrandientButton = this.createMenuItemShowPopup('styled-column-gradient-add', 'Gradient', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
110
|
+
const newGrandientButton = this.createMenuItemShowPopup('styled-column-gradient-add', 'Create Gradient Column', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
110
111
|
CellRanges: emptyRanges,
|
|
111
112
|
} }), config: {
|
|
112
113
|
defaultCurrentSectionName: 'Style',
|
|
113
114
|
} }));
|
|
114
|
-
const
|
|
115
|
+
const newPercentBarButton = this.createMenuItemShowPopup('styled-column-percent-bar-add', 'Create Percent Bar', this.moduleInfo.Popup, 'percent', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { PercentBarStyle: {
|
|
115
116
|
CellRanges: emptyRanges,
|
|
116
117
|
} }), config: {
|
|
117
118
|
defaultCurrentSectionName: 'Style',
|
|
118
119
|
} }));
|
|
119
|
-
returnColumnMenuItems.push({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
});
|
|
120
|
+
// returnColumnMenuItems.push({
|
|
121
|
+
// name: 'styled-column-parent',
|
|
122
|
+
// label: 'Create Styled Column',
|
|
123
|
+
// module: this.moduleInfo.ModuleName,
|
|
124
|
+
// isVisible: true,
|
|
125
|
+
// icon: { name: this.moduleInfo.Glyph },
|
|
126
|
+
// subItems: [newGrandientButton, newPercentBarButton, newBadgeButton],
|
|
127
|
+
// });
|
|
128
|
+
returnColumnMenuItems.push(...[newGrandientButton, newPercentBarButton, newBadgeButton]);
|
|
127
129
|
break;
|
|
128
130
|
case 'String':
|
|
129
131
|
returnColumnMenuItems.push(newBadgeButton);
|
|
@@ -222,7 +224,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
222
224
|
getTypeLabel(styledColumn) {
|
|
223
225
|
let type = null;
|
|
224
226
|
if (styledColumn.GradientStyle) {
|
|
225
|
-
type = 'Gradient';
|
|
227
|
+
type = 'Gradient Column';
|
|
226
228
|
}
|
|
227
229
|
else if (styledColumn.PercentBarStyle) {
|
|
228
230
|
type = 'Percent Bar';
|
|
@@ -231,7 +233,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
231
233
|
type = 'Spark Line';
|
|
232
234
|
}
|
|
233
235
|
else if (styledColumn.BadgeStyle) {
|
|
234
|
-
type = 'Badge';
|
|
236
|
+
type = 'Badge Style';
|
|
235
237
|
}
|
|
236
238
|
return type;
|
|
237
239
|
}
|
|
@@ -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
|
}
|