@adaptabletools/adaptable-cjs 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 +0 -98
- 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 +7 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +7 -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 +7 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +7 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +7 -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.cjs.tsbuildinfo +1 -1
|
@@ -14,7 +14,6 @@ const getFormatColumnStyleViewItems_1 = require("./Utilities/FormatColumn/getFor
|
|
|
14
14
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
15
15
|
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
16
16
|
const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
17
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
18
17
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'color-palette', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
@@ -41,56 +40,38 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
41
40
|
}
|
|
42
41
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
createColumnMenuItems(column) {
|
|
44
|
+
if (!column || !this.isModuleEditable() || column.isSparkline) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
45
47
|
let returnColumnMenuItems = [];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
let createPopupParam = {
|
|
49
|
+
column: column,
|
|
50
|
+
action: 'New',
|
|
51
|
+
source: 'ColumnMenu',
|
|
52
|
+
};
|
|
53
|
+
const createFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
54
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
55
|
+
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
56
|
+
if (formatColumnsForColumn.length === 1) {
|
|
57
|
+
let editPopupParam = {
|
|
48
58
|
column: column,
|
|
49
|
-
action: '
|
|
59
|
+
action: 'Edit',
|
|
60
|
+
value: formatColumnsForColumn[0],
|
|
50
61
|
source: 'ColumnMenu',
|
|
51
62
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
value: formatColumnsForColumn[0],
|
|
65
|
-
source: 'ColumnMenu',
|
|
66
|
-
};
|
|
67
|
-
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
68
|
-
returnColumnMenuItems.push({
|
|
69
|
-
name: 'format-column-parent',
|
|
70
|
-
label: 'Format Column',
|
|
71
|
-
module: this.moduleInfo.ModuleName,
|
|
72
|
-
isVisible: true,
|
|
73
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
74
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
75
|
-
});
|
|
76
|
-
// if more than one then display a Create and a Show
|
|
77
|
-
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
78
|
-
// or to filter the format columns ?
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const moduleInfo = this.api.internalApi
|
|
82
|
-
.getModuleService()
|
|
83
|
-
.getModuleInfoByModule('FormatColumn');
|
|
84
|
-
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
85
|
-
returnColumnMenuItems.push({
|
|
86
|
-
name: 'format-column-parent',
|
|
87
|
-
label: 'Format Column',
|
|
88
|
-
module: this.moduleInfo.ModuleName,
|
|
89
|
-
isVisible: true,
|
|
90
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
91
|
-
subItems: [createFormatColumnMenuItem, editFormatColumnMenuItem],
|
|
92
|
-
});
|
|
93
|
-
}
|
|
63
|
+
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
64
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
65
|
+
}
|
|
66
|
+
else if (formatColumnsForColumn.length > 1) {
|
|
67
|
+
// if more than one then display a Create and a Show
|
|
68
|
+
// we should probably do the Show better - perhaps use Column Info in some way?
|
|
69
|
+
// or to filter the format columns ?
|
|
70
|
+
const moduleInfo = this.api.internalApi
|
|
71
|
+
.getModuleService()
|
|
72
|
+
.getModuleInfoByModule('FormatColumn');
|
|
73
|
+
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
74
|
+
returnColumnMenuItems.push(editFormatColumnMenuItem);
|
|
94
75
|
}
|
|
95
76
|
return returnColumnMenuItems;
|
|
96
77
|
}
|
|
@@ -12,7 +12,7 @@ export declare class FreeTextColumnModule extends AdaptableModuleBase implements
|
|
|
12
12
|
isModuleAvailable(): boolean;
|
|
13
13
|
getModuleAdaptableObjects(): FreeTextColumn[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
|
-
|
|
15
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
16
16
|
getTeamSharingAction(): TeamSharingImportInfo<FreeTextColumn>;
|
|
17
17
|
toView(freeTextColumn: FreeTextColumn): AdaptableObjectView;
|
|
18
18
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -21,7 +21,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
21
21
|
hasNamedQueryReferences() {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
createColumnMenuItems(column) {
|
|
25
25
|
if (column && this.isModuleEditable()) {
|
|
26
26
|
if (this.api.freeTextColumnApi
|
|
27
27
|
.getFreeTextColumns()
|
|
@@ -7,6 +7,6 @@ import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
|
7
7
|
export declare class GridInfoModule extends AdaptableModuleBase implements IModule {
|
|
8
8
|
constructor(api: AdaptableApi);
|
|
9
9
|
getViewAccessLevel(): AccessLevel;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
11
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
12
|
}
|
|
@@ -6,12 +6,12 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
8
|
constructor(api) {
|
|
9
|
-
super(ModuleConstants.GridInfoModuleId, ModuleConstants.GridInfoFriendlyName, '
|
|
9
|
+
super(ModuleConstants.GridInfoModuleId, ModuleConstants.GridInfoFriendlyName, 'grid-info', 'GridInfoPopup', 'Display information about the Grid, the Options selected and all columns', api);
|
|
10
10
|
}
|
|
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,65 +150,53 @@ 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, 'edit-table', {
|
|
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', 'Select Column (Preserve Selection)', 'select-fwd', () => {
|
|
179
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
180
|
+
}));
|
|
181
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Select Column (Reset Selection)', 'tab-unselected', () => {
|
|
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', 'Select Column', 'tab-unselected', () => {
|
|
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-grid-select', 'Select Grid', 'select-all', () => {
|
|
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
|
-
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup,
|
|
199
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, 'edit-table', {
|
|
212
200
|
action: 'Edit',
|
|
213
201
|
source: 'ColumnMenu',
|
|
214
202
|
}));
|
|
@@ -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', 'select-off', () => {
|
|
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 Grid', 'select-all', () => {
|
|
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()) {
|
|
@@ -84,7 +84,8 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
84
84
|
},
|
|
85
85
|
};
|
|
86
86
|
const icon = this.getGlyphForStyledColumn(styledColumn);
|
|
87
|
-
const
|
|
87
|
+
const typeLabel = this.getTypeLabel(styledColumn);
|
|
88
|
+
const label = `Edit ${typeLabel}`;
|
|
88
89
|
const name = this.getTypeName(styledColumn);
|
|
89
90
|
returnColumnMenuItems.push(this.createMenuItemShowPopup(name, label, this.moduleInfo.Popup, icon, popupParam));
|
|
90
91
|
}
|
|
@@ -97,7 +98,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
97
98
|
value: newStyledColumn,
|
|
98
99
|
config: {},
|
|
99
100
|
};
|
|
100
|
-
const badgeLabel =
|
|
101
|
+
const badgeLabel = 'Create Badge Style';
|
|
101
102
|
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: {
|
|
102
103
|
Badges: [ObjectFactory_1.default.CreateDefaultStyledColumnBadge()],
|
|
103
104
|
} }), config: {
|
|
@@ -110,24 +111,25 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
110
111
|
const emptyRanges = this.api.scopeApi.createCellColorRangesForScope({
|
|
111
112
|
ColumnIds: [column.columnId],
|
|
112
113
|
});
|
|
113
|
-
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: {
|
|
114
|
+
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: {
|
|
114
115
|
CellRanges: emptyRanges,
|
|
115
116
|
} }), config: {
|
|
116
117
|
defaultCurrentSectionName: 'Style',
|
|
117
118
|
} }));
|
|
118
|
-
const
|
|
119
|
+
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: {
|
|
119
120
|
CellRanges: emptyRanges,
|
|
120
121
|
} }), config: {
|
|
121
122
|
defaultCurrentSectionName: 'Style',
|
|
122
123
|
} }));
|
|
123
|
-
returnColumnMenuItems.push({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
});
|
|
124
|
+
// returnColumnMenuItems.push({
|
|
125
|
+
// name: 'styled-column-parent',
|
|
126
|
+
// label: 'Create Styled Column',
|
|
127
|
+
// module: this.moduleInfo.ModuleName,
|
|
128
|
+
// isVisible: true,
|
|
129
|
+
// icon: { name: this.moduleInfo.Glyph },
|
|
130
|
+
// subItems: [newGrandientButton, newPercentBarButton, newBadgeButton],
|
|
131
|
+
// });
|
|
132
|
+
returnColumnMenuItems.push(...[newGrandientButton, newPercentBarButton, newBadgeButton]);
|
|
131
133
|
break;
|
|
132
134
|
case 'String':
|
|
133
135
|
returnColumnMenuItems.push(newBadgeButton);
|
|
@@ -226,7 +228,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
226
228
|
getTypeLabel(styledColumn) {
|
|
227
229
|
let type = null;
|
|
228
230
|
if (styledColumn.GradientStyle) {
|
|
229
|
-
type = 'Gradient';
|
|
231
|
+
type = 'Gradient Column';
|
|
230
232
|
}
|
|
231
233
|
else if (styledColumn.PercentBarStyle) {
|
|
232
234
|
type = 'Percent Bar';
|
|
@@ -235,7 +237,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
235
237
|
type = 'Spark Line';
|
|
236
238
|
}
|
|
237
239
|
else if (styledColumn.BadgeStyle) {
|
|
238
|
-
type = 'Badge';
|
|
240
|
+
type = 'Badge Style';
|
|
239
241
|
}
|
|
240
242
|
return type;
|
|
241
243
|
}
|
|
@@ -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
|
}
|