@adaptabletools/adaptable-cjs 18.0.0-canary.17 → 18.0.0-canary.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +2 -2
- package/src/AdaptableOptions/CommentOptions.d.ts +9 -6
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
- package/src/AdaptableOptions/NoteOptions.d.ts +4 -4
- package/src/Api/Events/GridDataChanged.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +12 -0
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
- package/src/PredefinedConfig/Common/Menu.d.ts +9 -4
- package/src/PredefinedConfig/Common/Menu.js +62 -36
- package/src/PredefinedConfig/NoteState.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.js +25 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +5 -5
- package/src/Strategy/AdaptableModuleBase.js +3 -3
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +44 -41
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.js +7 -16
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +8 -8
- package/src/Strategy/DataImportModule.js +1 -1
- package/src/Strategy/ExportModule.js +3 -3
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/LayoutModule.js +13 -13
- package/src/Strategy/NoteModule.js +8 -11
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/StyledColumnModule.js +13 -10
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Utilities/MenuItem.d.ts +7 -7
- package/src/View/Comments/CommentsEditor.js +7 -6
- package/src/View/Comments/CommentsPopup.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Note/NotePopup.js +5 -3
- package/src/agGrid/AdaptableAgGrid.js +0 -20
- package/src/agGrid/defaultAdaptableOptions.js +0 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +13 -16
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -43,6 +43,43 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
addColumnMenuItems(column) {
|
|
47
|
+
let filterSubMenuItems = [];
|
|
48
|
+
if (column &&
|
|
49
|
+
column.filterable &&
|
|
50
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
51
|
+
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
52
|
+
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
53
|
+
if (this.isModuleEditable() &&
|
|
54
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
55
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
56
|
+
? SystemRedux.SystemQuickFilterBarHide()
|
|
57
|
+
: SystemRedux.SystemQuickFilterBarShow()));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
61
|
+
if (existingColumnFilter) {
|
|
62
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
63
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
64
|
+
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
65
|
+
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
66
|
+
}
|
|
67
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
name: 'parent',
|
|
71
|
+
label: this.moduleInfo.FriendlyName,
|
|
72
|
+
isVisible: true,
|
|
73
|
+
module: this.moduleInfo.ModuleName,
|
|
74
|
+
icon: {
|
|
75
|
+
name: this.moduleInfo.Glyph,
|
|
76
|
+
},
|
|
77
|
+
subItems: filterSubMenuItems,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
46
83
|
addContextMenuItems(menuContext) {
|
|
47
84
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
48
85
|
if (menuContext.adaptableColumn &&
|
|
@@ -61,13 +98,15 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
61
98
|
this.api.columnFilterApi.internalApi.createEqualityColumnFilterForCell(menuContext.selectedCellInfo.gridCells[0]);
|
|
62
99
|
};
|
|
63
100
|
return [
|
|
64
|
-
this.
|
|
101
|
+
this.createMenuItemClickFunction('column-filter-on-cell-value', isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
65
102
|
];
|
|
66
103
|
}
|
|
67
104
|
else {
|
|
68
105
|
let filterSubMenuItems = [];
|
|
69
|
-
filterSubMenuItems.push(this.
|
|
70
|
-
filterSubMenuItems.push(this.
|
|
106
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
107
|
+
filterSubMenuItems.push(this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
108
|
+
? 'column-filter-unsuspend'
|
|
109
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
71
110
|
? () => {
|
|
72
111
|
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
73
112
|
}
|
|
@@ -75,7 +114,8 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
75
114
|
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
76
115
|
}));
|
|
77
116
|
return [
|
|
78
|
-
{
|
|
117
|
+
{
|
|
118
|
+
name: 'parent',
|
|
79
119
|
label: this.moduleInfo.FriendlyName,
|
|
80
120
|
isVisible: true,
|
|
81
121
|
module: this.moduleInfo.ModuleName,
|
|
@@ -89,43 +129,6 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
89
129
|
}
|
|
90
130
|
}
|
|
91
131
|
}
|
|
92
|
-
addColumnMenuItems(column) {
|
|
93
|
-
let filterSubMenuItems = [];
|
|
94
|
-
if (column &&
|
|
95
|
-
column.filterable &&
|
|
96
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
97
|
-
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
98
|
-
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
99
|
-
if (this.isModuleEditable() &&
|
|
100
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
101
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-bar-visbility', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
102
|
-
? SystemRedux.SystemQuickFilterBarHide()
|
|
103
|
-
: SystemRedux.SystemQuickFilterBarShow()));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
107
|
-
if (existingColumnFilter) {
|
|
108
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
109
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
110
|
-
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
111
|
-
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
112
|
-
}
|
|
113
|
-
if (ArrayExtensions_1.default.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
114
|
-
return [
|
|
115
|
-
{
|
|
116
|
-
name: 'filter',
|
|
117
|
-
label: this.moduleInfo.FriendlyName,
|
|
118
|
-
isVisible: true,
|
|
119
|
-
module: this.moduleInfo.ModuleName,
|
|
120
|
-
icon: {
|
|
121
|
-
name: this.moduleInfo.Glyph,
|
|
122
|
-
},
|
|
123
|
-
subItems: filterSubMenuItems,
|
|
124
|
-
},
|
|
125
|
-
];
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
132
|
getExistingColumnFilter(column) {
|
|
130
133
|
return this.api.columnFilterApi.getColumnFilters().find((x) => x.ColumnId == column.columnId);
|
|
131
134
|
}
|
|
@@ -19,7 +19,7 @@ class ColumnInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
19
19
|
};
|
|
20
20
|
return [
|
|
21
21
|
this.createMainMenuItemShowPopup({
|
|
22
|
-
Name: 'column-info',
|
|
22
|
+
Name: 'column-info-show',
|
|
23
23
|
Label: 'Column Info',
|
|
24
24
|
ComponentName: this.moduleInfo.Popup,
|
|
25
25
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -36,7 +36,7 @@ class ColumnInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
36
36
|
};
|
|
37
37
|
return [
|
|
38
38
|
this.createMainMenuItemShowPopup({
|
|
39
|
-
Name: 'column-info',
|
|
39
|
+
Name: 'column-info-show',
|
|
40
40
|
Label: 'Column Info',
|
|
41
41
|
ComponentName: this.moduleInfo.Popup,
|
|
42
42
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -8,13 +8,12 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
8
8
|
class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
9
9
|
constructor(api) {
|
|
10
10
|
super(ModuleConstants.CommentModuleId, ModuleConstants.CommentFriendlyName, 'comments', 'CommentsPopup', 'comments', api);
|
|
11
|
-
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
12
11
|
}
|
|
13
12
|
onAdaptableReady() {
|
|
14
13
|
this.loadComments();
|
|
15
14
|
}
|
|
16
15
|
isModuleAvailable() {
|
|
17
|
-
const options = this.
|
|
16
|
+
const options = this.api.optionsApi.getCommentOptions();
|
|
18
17
|
if (!options || !options.persistCommentThreads || !options.loadCommentThreads) {
|
|
19
18
|
return false;
|
|
20
19
|
}
|
|
@@ -26,7 +25,7 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
26
25
|
async loadComments() {
|
|
27
26
|
var _a, _b;
|
|
28
27
|
const commentThreads = await ((_b = (_a = this.api.optionsApi
|
|
29
|
-
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, (0, ObjectFactory_1.createBaseContext)(this.
|
|
28
|
+
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, (0, ObjectFactory_1.createBaseContext)(this.api)));
|
|
30
29
|
this.api.commentApi.loadCommentThreads(commentThreads);
|
|
31
30
|
}
|
|
32
31
|
addContextMenuItems(menuContext) {
|
|
@@ -35,17 +34,9 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
35
34
|
return undefined;
|
|
36
35
|
}
|
|
37
36
|
const items = [];
|
|
38
|
-
const isCellCommentable = (_b = (_a = this.
|
|
37
|
+
const isCellCommentable = (_b = (_a = this.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getCommentOptions()) === null || _b === void 0 ? void 0 : _b.isCellCommentable;
|
|
39
38
|
if (!isCellCommentable ||
|
|
40
|
-
isCellCommentable({
|
|
41
|
-
adaptableApi: this.adaptable.api,
|
|
42
|
-
cellAddress: {
|
|
43
|
-
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
44
|
-
ColumnId: menuContext.adaptableColumn.columnId,
|
|
45
|
-
},
|
|
46
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
47
|
-
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
48
|
-
})) {
|
|
39
|
+
isCellCommentable(Object.assign({ gridCell: menuContext.gridCell }, (0, ObjectFactory_1.createBaseContext)(this.api)))) {
|
|
49
40
|
items.push(...this.getAddRemoveCommentsMenuItems(menuContext));
|
|
50
41
|
}
|
|
51
42
|
return items;
|
|
@@ -57,17 +48,17 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
57
48
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
58
49
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
59
50
|
};
|
|
60
|
-
const comments = this.
|
|
51
|
+
const comments = this.api.commentApi.getComments(cellAddress);
|
|
61
52
|
if (!this.api.commentApi.internalApi.areCommentsAvailable()) {
|
|
62
53
|
return items;
|
|
63
54
|
}
|
|
64
55
|
if (comments) {
|
|
65
|
-
items.push(this.
|
|
56
|
+
items.push(this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
66
57
|
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
67
58
|
}));
|
|
68
59
|
}
|
|
69
60
|
else {
|
|
70
|
-
items.push(this.
|
|
61
|
+
items.push(this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
71
62
|
// add an empty one
|
|
72
63
|
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
73
64
|
requestAnimationFrame(() => {
|
|
@@ -40,7 +40,7 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
40
40
|
};
|
|
41
41
|
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
42
42
|
return [
|
|
43
|
-
this.
|
|
43
|
+
this.createMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
44
44
|
];
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -31,29 +31,29 @@ class DashboardModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
if (this.isModuleAvailable()) {
|
|
32
32
|
let menuItems = [];
|
|
33
33
|
if (this.isModuleEditable()) {
|
|
34
|
-
menuItems.push(this.
|
|
34
|
+
menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
35
35
|
}
|
|
36
36
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
37
|
-
menuItems.push(this.
|
|
37
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
menuItems.push(this.
|
|
40
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
41
41
|
}
|
|
42
42
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
43
|
-
menuItems.push(this.
|
|
43
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
44
44
|
}
|
|
45
45
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
46
|
-
menuItems.push(this.
|
|
46
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
47
47
|
}
|
|
48
48
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
49
|
-
menuItems.push(this.
|
|
49
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
menuItems.push(this.
|
|
52
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
53
53
|
}
|
|
54
54
|
return [
|
|
55
55
|
{
|
|
56
|
-
name: '
|
|
56
|
+
name: 'parent',
|
|
57
57
|
label: this.moduleInfo.FriendlyName,
|
|
58
58
|
isVisible: true,
|
|
59
59
|
module: this.moduleInfo.ModuleName,
|
|
@@ -30,7 +30,7 @@ class DataImportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
30
30
|
source: source,
|
|
31
31
|
maxWidth: this.getPopupMaxWidth(),
|
|
32
32
|
};
|
|
33
|
-
return this.
|
|
33
|
+
return this.createMenuItemShowPopup('data-import', 'Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.DataImportModule = DataImportModule;
|
|
@@ -90,16 +90,16 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
90
90
|
buildReportMenuItems(report) {
|
|
91
91
|
const menuItems = [];
|
|
92
92
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
93
|
-
menuItems.push(this.
|
|
93
|
+
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
94
94
|
}
|
|
95
95
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
96
|
-
menuItems.push(this.
|
|
96
|
+
menuItems.push(this.createMenuItemClickFunction('export-custom-destination', customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
97
97
|
}
|
|
98
98
|
return menuItems;
|
|
99
99
|
}
|
|
100
100
|
buildExportMenuItem(label, subItems) {
|
|
101
101
|
return {
|
|
102
|
-
name: '
|
|
102
|
+
name: 'parent',
|
|
103
103
|
label: label,
|
|
104
104
|
module: this.moduleInfo.ModuleName,
|
|
105
105
|
isVisible: true,
|
|
@@ -31,7 +31,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
32
32
|
if (contextMenuItems.length > 1) {
|
|
33
33
|
const groupMenuItem = {
|
|
34
|
-
name: '
|
|
34
|
+
name: 'parent',
|
|
35
35
|
module: this.moduleInfo.ModuleName,
|
|
36
36
|
label: 'FDC3',
|
|
37
37
|
icon: {
|
|
@@ -73,11 +73,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
});
|
|
74
74
|
if (flashingCellForCurrentColumn) {
|
|
75
75
|
return [
|
|
76
|
-
this.
|
|
76
|
+
this.createMenuItemReduxAction('flashing-cell-delete', 'Delete Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionDelete(flashingCellForCurrentColumn)),
|
|
77
77
|
];
|
|
78
78
|
}
|
|
79
79
|
return [
|
|
80
|
-
this.
|
|
80
|
+
this.createMenuItemReduxAction('flashing-cell-add', 'Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
81
81
|
Scope: {
|
|
82
82
|
ColumnIds: [column.columnId],
|
|
83
83
|
},
|
|
@@ -99,11 +99,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
99
99
|
if (flashingCellForRow.flashTarget === 'row' ||
|
|
100
100
|
(Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
|
|
101
101
|
flashingCellForRow.flashTarget.includes('row'))) {
|
|
102
|
-
items.push(this.
|
|
102
|
+
items.push(this.createMenuItemReduxAction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
|
|
106
|
-
items.push(this.
|
|
106
|
+
items.push(this.createMenuItemReduxAction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -49,12 +49,12 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
49
49
|
action: 'New',
|
|
50
50
|
source: 'ColumnMenu',
|
|
51
51
|
};
|
|
52
|
-
const createFormatColumnMenuItem = this.
|
|
52
|
+
const createFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-add', 'Create', this.moduleInfo.Popup, 'plus', createPopupParam);
|
|
53
53
|
const formatColumnsForColumn = this.api.formatColumnApi.getFormatColumnsForColumnId(column.columnId);
|
|
54
54
|
// .filter((fc) => this.api.scopeApi.isSingleColumnScope(fc.Scope));
|
|
55
55
|
// if no formats then just show Create
|
|
56
56
|
if (ArrayExtensions_1.default.IsNullOrEmpty(formatColumnsForColumn)) {
|
|
57
|
-
returnColumnMenuItems.push(this.
|
|
57
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('format-column-add', 'Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, createPopupParam));
|
|
58
58
|
// if 1 format then show a Create and an Edit
|
|
59
59
|
}
|
|
60
60
|
else if (formatColumnsForColumn.length == 1) {
|
|
@@ -64,9 +64,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
value: formatColumnsForColumn[0],
|
|
65
65
|
source: 'ColumnMenu',
|
|
66
66
|
};
|
|
67
|
-
const editFormatColumnMenuItem = this.
|
|
67
|
+
const editFormatColumnMenuItem = this.createMenuItemShowPopup('format-column-edit', 'Edit', this.moduleInfo.Popup, 'edit', editPopupParam);
|
|
68
68
|
returnColumnMenuItems.push({
|
|
69
|
-
name: '
|
|
69
|
+
name: 'parent',
|
|
70
70
|
label: 'Format Column',
|
|
71
71
|
module: this.moduleInfo.ModuleName,
|
|
72
72
|
isVisible: true,
|
|
@@ -81,9 +81,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
81
81
|
const moduleInfo = this.api.internalApi
|
|
82
82
|
.getModuleService()
|
|
83
83
|
.getModuleInfoByModule('FormatColumn');
|
|
84
|
-
const editFormatColumnMenuItem = this.
|
|
84
|
+
const editFormatColumnMenuItem = this.createMenuItemReduxAction('format-column-edit', 'Show Current', this.moduleInfo.Glyph, PopupRedux.PopupShowScreen('FormatColumn', moduleInfo.Popup));
|
|
85
85
|
returnColumnMenuItems.push({
|
|
86
|
-
name: '
|
|
86
|
+
name: 'parent',
|
|
87
87
|
label: 'Format Column',
|
|
88
88
|
module: this.moduleInfo.ModuleName,
|
|
89
89
|
isVisible: true,
|
|
@@ -32,7 +32,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
32
32
|
source: 'ColumnMenu',
|
|
33
33
|
};
|
|
34
34
|
return [
|
|
35
|
-
this.
|
|
35
|
+
this.createMenuItemShowPopup('free-text-column-edit', 'Edit Free Text Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -15,7 +15,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
15
15
|
if (this.isModuleAvailable()) {
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
-
Name: 'grid-info',
|
|
18
|
+
Name: 'grid-info-show',
|
|
19
19
|
Label: 'Grid Info',
|
|
20
20
|
ComponentName: this.moduleInfo.Popup,
|
|
21
21
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -27,7 +27,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
27
27
|
if (this.isModuleAvailable()) {
|
|
28
28
|
return [
|
|
29
29
|
this.createMainMenuItemShowPopup({
|
|
30
|
-
Name: 'grid-info',
|
|
30
|
+
Name: 'grid-info-show',
|
|
31
31
|
Label: 'Grid Info',
|
|
32
32
|
ComponentName: this.moduleInfo.Popup,
|
|
33
33
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -149,7 +149,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
149
149
|
if (this.isModuleEditable()) {
|
|
150
150
|
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
151
151
|
if (!isReadOnlyLayout) {
|
|
152
|
-
returnColumnMenuItems.push(this.
|
|
152
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
153
153
|
action: 'Edit',
|
|
154
154
|
source: 'ColumnMenu',
|
|
155
155
|
value: this.api.layoutApi.getCurrentLayout(),
|
|
@@ -157,10 +157,10 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
157
157
|
}
|
|
158
158
|
if (column) {
|
|
159
159
|
if (!isReadOnlyLayout) {
|
|
160
|
-
returnColumnMenuItems.push(this.
|
|
160
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-caption-change', 'Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
161
161
|
}
|
|
162
162
|
if (column.hideable) {
|
|
163
|
-
returnColumnMenuItems.push(this.
|
|
163
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-hide', 'Hide Column', 'visibility-off-bold', () => {
|
|
164
164
|
this.api.columnApi.hideColumn(column.columnId);
|
|
165
165
|
}));
|
|
166
166
|
}
|
|
@@ -169,24 +169,24 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
169
169
|
if (column) {
|
|
170
170
|
const hasExistingSelection = (_b = (_a = this.api.gridApi.getSelectedCellInfo()) === null || _a === void 0 ? void 0 : _a.gridCells) === null || _b === void 0 ? void 0 : _b.length;
|
|
171
171
|
if (hasExistingSelection) {
|
|
172
|
-
selectMenuItems.push(this.
|
|
172
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Column (Preserve Selection)', 'column-add', () => {
|
|
173
173
|
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
174
174
|
}));
|
|
175
|
-
selectMenuItems.push(this.
|
|
175
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Column (Reset Selection)', 'columns', () => {
|
|
176
176
|
this.api.columnApi.selectColumn(column.columnId);
|
|
177
177
|
}));
|
|
178
178
|
}
|
|
179
179
|
else {
|
|
180
|
-
selectMenuItems.push(this.
|
|
180
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Column', 'columns', () => {
|
|
181
181
|
this.api.columnApi.selectColumn(column.columnId);
|
|
182
182
|
}));
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
selectMenuItems.push(this.
|
|
185
|
+
selectMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Whole Grid', this.moduleInfo.Glyph, () => {
|
|
186
186
|
this.api.gridApi.selectAll();
|
|
187
187
|
}));
|
|
188
188
|
returnColumnMenuItems.push({
|
|
189
|
-
name: 'layout-select',
|
|
189
|
+
name: 'layout-select-parent',
|
|
190
190
|
label: 'Select',
|
|
191
191
|
isVisible: true,
|
|
192
192
|
module: this.moduleInfo.ModuleName,
|
|
@@ -201,7 +201,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
201
201
|
addContextMenuItems(menuContext) {
|
|
202
202
|
let returnColumnMenuItems = [];
|
|
203
203
|
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
204
|
-
returnColumnMenuItems.push(this.
|
|
204
|
+
returnColumnMenuItems.push(this.createMenuItemShowPopup('layout-edit', 'Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
205
205
|
action: 'Edit',
|
|
206
206
|
source: 'ColumnMenu',
|
|
207
207
|
}));
|
|
@@ -213,19 +213,19 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
213
213
|
let clickFunction = () => {
|
|
214
214
|
this.api.gridApi.deselectAll();
|
|
215
215
|
};
|
|
216
|
-
returnColumnMenuItems.push(this.
|
|
216
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-clear-selection', 'Clear Selected Cells', 'undo', clickFunction));
|
|
217
217
|
if (this.isModuleAvailable()) {
|
|
218
218
|
let gridMenuItems = [];
|
|
219
219
|
let autoSizeFunction = () => {
|
|
220
220
|
this.api.columnApi.autosizeAllColumns();
|
|
221
221
|
};
|
|
222
|
-
gridMenuItems.push(this.
|
|
222
|
+
gridMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', autoSizeFunction));
|
|
223
223
|
let clickFunction = () => {
|
|
224
224
|
this.api.gridApi.selectAll();
|
|
225
225
|
};
|
|
226
|
-
gridMenuItems.push(this.
|
|
226
|
+
gridMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select', 'tab-unselected', clickFunction));
|
|
227
227
|
returnColumnMenuItems.push({
|
|
228
|
-
name: 'layout-grid',
|
|
228
|
+
name: 'layout-grid-parent',
|
|
229
229
|
label: 'Grid',
|
|
230
230
|
module: this.moduleInfo.ModuleName,
|
|
231
231
|
isVisible: true,
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NoteModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
const ObjectFactory_1 = require("../Utilities/ObjectFactory");
|
|
6
7
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
7
8
|
class NoteModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
9
|
constructor(api) {
|
|
@@ -18,18 +19,14 @@ class NoteModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
19
|
if (!this.isModuleAvailable()) {
|
|
19
20
|
return undefined;
|
|
20
21
|
}
|
|
22
|
+
const isReadOnly = this.adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName) === 'ReadOnly';
|
|
23
|
+
if (isReadOnly) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
21
26
|
const items = [];
|
|
22
27
|
const isCellNotable = (_b = (_a = this.adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions()) === null || _b === void 0 ? void 0 : _b.isCellNotable;
|
|
23
28
|
if (!isCellNotable ||
|
|
24
|
-
isCellNotable({
|
|
25
|
-
adaptableApi: this.adaptable.api,
|
|
26
|
-
address: {
|
|
27
|
-
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
28
|
-
ColumnId: menuContext.adaptableColumn.columnId,
|
|
29
|
-
},
|
|
30
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
31
|
-
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
32
|
-
}))
|
|
29
|
+
isCellNotable(Object.assign({ gridCell: menuContext.gridCell }, (0, ObjectFactory_1.createBaseContext)(this.api))))
|
|
33
30
|
items.push(...this.getAddRemoveNoteMenuItems(menuContext));
|
|
34
31
|
return items;
|
|
35
32
|
}
|
|
@@ -45,12 +42,12 @@ class NoteModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
45
42
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
46
43
|
})) !== null && _a !== void 0 ? _a : [];
|
|
47
44
|
if (note) {
|
|
48
|
-
items.push(this.
|
|
45
|
+
items.push(this.createMenuItemClickFunction('note-remove', 'Remove Note', this.moduleInfo.Glyph, () => {
|
|
49
46
|
this.api.noteApi.deleteNote(note);
|
|
50
47
|
}));
|
|
51
48
|
}
|
|
52
49
|
else {
|
|
53
|
-
items.push(this.
|
|
50
|
+
items.push(this.createMenuItemClickFunction('note-add', 'Add Note', this.moduleInfo.Glyph, () => {
|
|
54
51
|
// add an empty one
|
|
55
52
|
this.api.noteApi.addNote('', menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
56
53
|
this.api.internalApi.getCellPopupService().showPopup({
|
|
@@ -64,7 +64,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
64
64
|
source: 'ColumnMenu',
|
|
65
65
|
};
|
|
66
66
|
return [
|
|
67
|
-
this.
|
|
67
|
+
this.createMenuItemShowPopup('plus-minus-add', 'Create Plus/Minus Rule', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -13,17 +13,17 @@ class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
13
13
|
addColumnMenuItems(column) {
|
|
14
14
|
return [
|
|
15
15
|
// To do : get the icon and name from settings in case they have changed?
|
|
16
|
-
this.
|
|
16
|
+
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
19
|
addContextMenuItems(menuContext) {
|
|
20
20
|
return [
|
|
21
|
-
this.
|
|
21
|
+
this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
24
|
addModuleMenuItem(source) {
|
|
25
25
|
if (this.isModuleAvailable()) {
|
|
26
|
-
return this.
|
|
26
|
+
return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|