@adaptabletools/adaptable 18.0.0-canary.25 → 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/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +2 -2
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -23
- package/src/AdaptableOptions/MenuOptions.js +1 -96
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AlertApiImpl.js +5 -10
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.js +6 -6
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/CommentsApiImpl.js +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +11 -17
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +8 -13
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.js +11 -8
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -7
- package/src/Api/Implementation/LayoutApiImpl.js +0 -15
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +10 -10
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -13
- package/src/Api/Internal/ActionRowInternalApi.js +7 -45
- package/src/Api/Internal/AdaptableInternalApi.js +2 -12
- package/src/Api/Internal/AlertInternalApi.js +4 -17
- package/src/Api/Internal/CalculatedColumnInternalApi.js +7 -14
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.js +18 -36
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +1 -1
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +4 -10
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +2 -7
- package/src/Api/Internal/ExportInternalApi.js +4 -4
- package/src/Api/Internal/ExpressionInternalApi.js +2 -12
- package/src/Api/Internal/Fdc3InternalApi.js +1 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +11 -20
- package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridFilterInternalApi.js +2 -8
- package/src/Api/Internal/GridInternalApi.js +13 -40
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +10 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +1 -1
- package/src/Api/Internal/NoteInternalApi.js +1 -1
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.js +5 -5
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -7
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +0 -11
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -0
- package/src/PredefinedConfig/Common/Enums.js +2 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.js +17 -18
- package/src/PredefinedConfig/Common/RowSummary.d.ts +1 -1
- package/src/PredefinedConfig/Common/RowSummary.js +4 -4
- 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 +56 -96
- 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 +51 -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 +10 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +19 -19
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/ObjectFactory.js +2 -0
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +17 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -5
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +1 -1
- package/src/agGrid/AgGridAdapter.d.ts +1 -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.d.ts +8 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -4,8 +4,8 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
4
4
|
import { IModule } from './Interface/IModule';
|
|
5
5
|
export declare class DataImportModule extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
createModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
8
|
+
createContextMenuItems(): AdaptableMenuItem[] | undefined;
|
|
9
|
+
createColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
10
10
|
private createDataImportMenuItem;
|
|
11
11
|
}
|
|
@@ -4,18 +4,18 @@ export class DataImportModule extends AdaptableModuleBase {
|
|
|
4
4
|
constructor(api) {
|
|
5
5
|
super(ModuleConstants.DataImportModuleId, ModuleConstants.DataImportFriendyName, 'import', 'DataImportPopup', 'Import Data', api);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
createModuleMenuItem(source) {
|
|
8
8
|
if (this.isModuleAvailable()) {
|
|
9
9
|
return this.createDataImportMenuItem(source);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
createContextMenuItems() {
|
|
13
13
|
if (this.isModuleAvailable()) {
|
|
14
14
|
return [this.createDataImportMenuItem('ContextMenu')];
|
|
15
15
|
}
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
createColumnMenuItems() {
|
|
19
19
|
if (this.isModuleAvailable()) {
|
|
20
20
|
return [this.createDataImportMenuItem('ColumnMenu')];
|
|
21
21
|
}
|
|
@@ -12,9 +12,8 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
12
12
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
13
13
|
getExplicitlyReferencedColumnIds(report: Report): string[];
|
|
14
14
|
getReferencedNamedQueryNames(report: Report): string[];
|
|
15
|
-
|
|
15
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
private buildReportMenuItems;
|
|
17
|
-
private buildExportMenuItem;
|
|
18
17
|
private getMenuName;
|
|
19
18
|
export(report: Report, exportDestination: ExportDestination | string): Promise<void>;
|
|
20
19
|
private preProcessExport;
|
|
@@ -40,14 +40,12 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
40
40
|
}
|
|
41
41
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(report.Query.BooleanExpression);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
createContextMenuItems(menuContext) {
|
|
44
44
|
const canExport = !menuContext.isRowGroupColumn && this.isModuleAvailable();
|
|
45
45
|
if (!canExport) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
let returnMenuItems = [];
|
|
49
|
-
let selectedCellmenuItems = [];
|
|
50
|
-
let selectedRowmenuItems = [];
|
|
51
49
|
const canExportCells = menuContext.selectedCellInfo &&
|
|
52
50
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
53
51
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
@@ -58,63 +56,36 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
58
56
|
menuContext.isSelectedRow;
|
|
59
57
|
if (canExportCells) {
|
|
60
58
|
const selectedCellReport = this.api.exportApi.getReportByName(SELECTED_CELLS_REPORT);
|
|
61
|
-
|
|
59
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedCellReport, 'cells'));
|
|
62
60
|
}
|
|
63
61
|
if (canExportRows) {
|
|
64
62
|
const selectedRowReport = this.api.exportApi.getReportByName(SELECTED_ROWS_REPORT);
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
// if only selected cells then just do one level
|
|
68
|
-
if (canExportCells && !canExportRows) {
|
|
69
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Cells', selectedCellmenuItems));
|
|
70
|
-
// if only selected Rows then just do one level
|
|
71
|
-
}
|
|
72
|
-
else if (canExportRows && !canExportCells) {
|
|
73
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected Rows', selectedRowmenuItems));
|
|
74
|
-
}
|
|
75
|
-
// if both selected Cells and Rows then add a new level
|
|
76
|
-
else if (canExportRows && canExportCells) {
|
|
77
|
-
const exportSelectedCellsMenuItem = this.buildExportMenuItem('Cells', selectedCellmenuItems);
|
|
78
|
-
const exportSelectedRowsMenuItem = this.buildExportMenuItem('Rows', selectedRowmenuItems);
|
|
79
|
-
returnMenuItems.push(this.buildExportMenuItem('Export Selected', [
|
|
80
|
-
exportSelectedCellsMenuItem,
|
|
81
|
-
exportSelectedRowsMenuItem,
|
|
82
|
-
]));
|
|
63
|
+
returnMenuItems.push(...this.buildReportMenuItems(selectedRowReport, 'rows'));
|
|
83
64
|
}
|
|
84
65
|
return returnMenuItems;
|
|
85
66
|
}
|
|
86
|
-
buildReportMenuItems(report) {
|
|
67
|
+
buildReportMenuItems(report, selectionType) {
|
|
87
68
|
const menuItems = [];
|
|
88
69
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
89
|
-
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
70
|
+
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination, selectionType), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
90
71
|
}
|
|
91
72
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
92
|
-
menuItems.push(this.createMenuItemClickFunction(
|
|
73
|
+
menuItems.push(this.createMenuItemClickFunction(`export-${selectionType}-custom-destination`, customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
93
74
|
}
|
|
94
75
|
return menuItems;
|
|
95
76
|
}
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
name: 'export-parent',
|
|
99
|
-
label: label,
|
|
100
|
-
module: this.moduleInfo.ModuleName,
|
|
101
|
-
isVisible: true,
|
|
102
|
-
icon: { name: this.moduleInfo.Glyph },
|
|
103
|
-
subItems: subItems,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
getMenuName(exportDestination) {
|
|
77
|
+
getMenuName(exportDestination, selectionType) {
|
|
107
78
|
switch (exportDestination) {
|
|
108
79
|
case ExportDestination.CSV:
|
|
109
|
-
return
|
|
80
|
+
return `export-${selectionType}-csv`;
|
|
110
81
|
case ExportDestination.Clipboard:
|
|
111
|
-
return
|
|
82
|
+
return `export-${selectionType}-clipboard`;
|
|
112
83
|
case ExportDestination.Excel:
|
|
113
|
-
return
|
|
84
|
+
return `export-${selectionType}-excel`;
|
|
114
85
|
case ExportDestination.JSON:
|
|
115
|
-
return
|
|
86
|
+
return `export-${selectionType}-json`;
|
|
116
87
|
case ExportDestination.Table:
|
|
117
|
-
return
|
|
88
|
+
return `export-${selectionType}-table`;
|
|
118
89
|
}
|
|
119
90
|
}
|
|
120
91
|
async export(report, exportDestination) {
|
|
@@ -4,7 +4,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
|
|
|
4
4
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
export declare class Fdc3Module extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
|
-
|
|
7
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
8
8
|
private buildRaiseIntentMenuItem;
|
|
9
9
|
private buildBroadcastMenuItem;
|
|
10
10
|
private getFdc3Api;
|
|
@@ -4,7 +4,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
4
4
|
constructor(api) {
|
|
5
5
|
super(ModuleConstants.Fdc3ModuleId, ModuleConstants.Fdc3FriendlyName, 'fdc3', null, 'The FDC3 Module - handles the FDC3 integration', api);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
createContextMenuItems(menuContext) {
|
|
8
8
|
if (!this.isModuleAvailable()) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -25,19 +25,6 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
25
25
|
contextMenuItems.push(this.buildBroadcastMenuItem(broadcastConfig, currentRowNode));
|
|
26
26
|
});
|
|
27
27
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
28
|
-
if (contextMenuItems.length > 1) {
|
|
29
|
-
const groupMenuItem = {
|
|
30
|
-
name: 'fdc3-parent',
|
|
31
|
-
module: this.moduleInfo.ModuleName,
|
|
32
|
-
label: 'FDC3',
|
|
33
|
-
icon: {
|
|
34
|
-
name: 'fdc3',
|
|
35
|
-
},
|
|
36
|
-
isVisible: true,
|
|
37
|
-
subItems: contextMenuItems,
|
|
38
|
-
};
|
|
39
|
-
return [groupMenuItem];
|
|
40
|
-
}
|
|
41
28
|
return contextMenuItems;
|
|
42
29
|
}
|
|
43
30
|
}
|
|
@@ -15,8 +15,8 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
|
|
|
15
15
|
}): AdaptableObject[];
|
|
16
16
|
getExplicitlyReferencedColumnIds(alertDefinition: FlashingCellDefinition): string[];
|
|
17
17
|
getReferencedNamedQueryNames(alertDefinition: FlashingCellDefinition): string[];
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
19
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
20
20
|
protected handleCellDataChanged(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
21
21
|
private showFlashingCellsForDefinitions;
|
|
22
22
|
private isFlashingTargetOnlyAggChange;
|
|
@@ -60,7 +60,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
60
60
|
}
|
|
61
61
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
createColumnMenuItems(column) {
|
|
64
64
|
if (column && this.isModuleEditable()) {
|
|
65
65
|
if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
|
|
66
66
|
const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
@@ -85,7 +85,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
createContextMenuItems(menuContext) {
|
|
89
89
|
const items = [];
|
|
90
90
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
91
91
|
if (menuContext.adaptableColumn && menuContext.rowNode) {
|
|
@@ -13,7 +13,7 @@ export declare class FormatColumnModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
}): AdaptableObject[];
|
|
14
14
|
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
15
15
|
getReferencedNamedQueryNames(formatColumn: FormatColumn): string[];
|
|
16
|
-
|
|
16
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
17
|
getTeamSharingAction(): TeamSharingImportInfo<FormatColumn>;
|
|
18
18
|
toView(formatColumn: FormatColumn): AdaptableObjectView;
|
|
19
19
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -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
|
}
|
|
@@ -7,7 +7,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
7
7
|
getViewAccessLevel() {
|
|
8
8
|
return 'Full';
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
createColumnMenuItems(column) {
|
|
11
11
|
if (this.isModuleAvailable()) {
|
|
12
12
|
return [
|
|
13
13
|
this.createMainMenuItemShowPopup({
|
|
@@ -19,7 +19,7 @@ export class GridInfoModule extends AdaptableModuleBase {
|
|
|
19
19
|
];
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
createContextMenuItems(menuContext) {
|
|
23
23
|
if (this.isModuleAvailable()) {
|
|
24
24
|
return [
|
|
25
25
|
this.createMainMenuItemShowPopup({
|
|
@@ -141,9 +141,9 @@ export interface AdaptableModuleView {
|
|
|
141
141
|
export interface IModule {
|
|
142
142
|
moduleInfo: ModuleInfo;
|
|
143
143
|
AccessLevel: AccessLevel;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
createModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
145
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
146
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
147
147
|
setModuleEntitlement(): void;
|
|
148
148
|
isModuleAvailable(): boolean;
|
|
149
149
|
isModuleEditable(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
-
import {
|
|
3
|
+
import { Layout, LayoutState } from '../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
6
6
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
@@ -13,13 +13,13 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
|
|
|
13
13
|
protected LayoutState: LayoutState;
|
|
14
14
|
constructor(api: AdaptableApi);
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
|
|
16
|
+
rowSummariesSubscriptions(): void;
|
|
17
17
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
18
18
|
getExplicitlyReferencedColumnIds(layout: Layout): string[];
|
|
19
19
|
getTeamSharingReferences(adaptableObject: AdaptableObject): TeamSharingReferences;
|
|
20
20
|
hasNamedQueryReferences(): boolean;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
22
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
23
23
|
private createViewPivotItemsMenuItem;
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<Layout>;
|
|
25
25
|
toViewAll(): {
|
|
@@ -36,12 +36,16 @@ 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
|
}
|
|
45
|
+
// Currently not available for serverside model
|
|
46
|
+
if (!this.api.layoutApi.internalApi.getLayoutSupportedFeatures().RowSummaries) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
45
49
|
// ROW SUMMARY
|
|
46
50
|
this.evaluateRowSummary();
|
|
47
51
|
this.api.eventApi.on('AdaptableStateReloaded', () => {
|
|
@@ -142,62 +146,50 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
142
146
|
hasNamedQueryReferences() {
|
|
143
147
|
return true;
|
|
144
148
|
}
|
|
145
|
-
|
|
149
|
+
createColumnMenuItems(column) {
|
|
146
150
|
var _a, _b;
|
|
151
|
+
if (!this.isModuleEditable()) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
147
154
|
let returnColumnMenuItems = [];
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
156
|
+
if (!isReadOnlyLayout) {
|
|
157
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
158
|
+
action: 'Edit',
|
|
159
|
+
source: 'ColumnMenu',
|
|
160
|
+
value: this.api.layoutApi.getCurrentLayout(),
|
|
161
|
+
}));
|
|
162
|
+
if (column) {
|
|
163
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (column) {
|
|
167
|
+
if (column.hideable) {
|
|
168
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
169
|
+
this.api.columnApi.hideColumn(column.columnId);
|
|
155
170
|
}));
|
|
156
171
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
172
|
+
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
173
|
+
if (hasExistingSelection) {
|
|
174
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
175
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
176
|
+
}));
|
|
177
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
178
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
179
|
+
}));
|
|
166
180
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
172
|
-
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
173
|
-
}));
|
|
174
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
175
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
180
|
-
this.api.columnApi.selectColumn(column.columnId);
|
|
181
|
-
}));
|
|
182
|
-
}
|
|
181
|
+
else {
|
|
182
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
183
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
184
|
+
}));
|
|
183
185
|
}
|
|
184
|
-
selectMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
185
|
-
this.api.gridApi.selectAll();
|
|
186
|
-
}));
|
|
187
|
-
returnColumnMenuItems.push({
|
|
188
|
-
name: 'layout-select-parent',
|
|
189
|
-
label: 'Select',
|
|
190
|
-
isVisible: true,
|
|
191
|
-
module: this.moduleInfo.ModuleName,
|
|
192
|
-
icon: {
|
|
193
|
-
name: 'tab-unselected',
|
|
194
|
-
},
|
|
195
|
-
subItems: selectMenuItems,
|
|
196
|
-
});
|
|
197
186
|
}
|
|
187
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
188
|
+
this.api.gridApi.selectAll();
|
|
189
|
+
}));
|
|
198
190
|
return returnColumnMenuItems;
|
|
199
191
|
}
|
|
200
|
-
|
|
192
|
+
createContextMenuItems(menuContext) {
|
|
201
193
|
let returnColumnMenuItems = [];
|
|
202
194
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
203
195
|
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
@@ -209,36 +201,23 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
209
201
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns)) ||
|
|
210
202
|
(menuContext.selectedRowInfo &&
|
|
211
203
|
ArrayExtensions.IsNotNullOrEmpty(menuContext.selectedRowInfo.gridRows))) {
|
|
212
|
-
|
|
204
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', () => {
|
|
213
205
|
this.api.gridApi.deselectAll();
|
|
214
|
-
};
|
|
215
|
-
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
216
|
-
if (this.isModuleAvailable()) {
|
|
217
|
-
let gridMenuItems = [];
|
|
218
|
-
let autoSizeFunction = () => {
|
|
219
|
-
this.api.columnApi.autosizeAllColumns();
|
|
220
|
-
};
|
|
221
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
222
|
-
let clickFunction = () => {
|
|
223
|
-
this.api.gridApi.selectAll();
|
|
224
|
-
};
|
|
225
|
-
gridMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
226
|
-
returnColumnMenuItems.push({
|
|
227
|
-
name: 'layout-grid-parent',
|
|
228
|
-
label: 'Grid',
|
|
229
|
-
module: this.moduleInfo.ModuleName,
|
|
230
|
-
isVisible: true,
|
|
231
|
-
icon: { name: 'align-justify' },
|
|
232
|
-
subItems: gridMenuItems,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
206
|
+
}));
|
|
235
207
|
}
|
|
208
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', () => {
|
|
209
|
+
this.api.gridApi.selectAll();
|
|
210
|
+
}));
|
|
211
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', () => {
|
|
212
|
+
this.api.columnApi.autosizeAllColumns();
|
|
213
|
+
}));
|
|
236
214
|
const viewPivotItemsMenuItem = this.createViewPivotItemsMenuItem(menuContext);
|
|
237
215
|
if (viewPivotItemsMenuItem) {
|
|
238
216
|
returnColumnMenuItems.push(viewPivotItemsMenuItem);
|
|
239
217
|
}
|
|
240
218
|
return returnColumnMenuItems;
|
|
241
219
|
}
|
|
220
|
+
// TODO next time this method is touched, it should be extracted in an internal Api
|
|
242
221
|
createViewPivotItemsMenuItem(menuContext) {
|
|
243
222
|
// current group => menuContext.rowNode.field;
|
|
244
223
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -338,7 +317,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
338
317
|
const firstNColumns = columns
|
|
339
318
|
.slice(0, maxColumnsToDisplay)
|
|
340
319
|
.map((column) => columnIdToFriendlyName(column));
|
|
341
|
-
columns = [...firstNColumns, `and
|
|
320
|
+
columns = [...firstNColumns, `and ${extraColumns} more`];
|
|
342
321
|
}
|
|
343
322
|
else {
|
|
344
323
|
columns = columns.map((column) => columnIdToFriendlyName(column));
|
|
@@ -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
|
}
|