@adaptabletools/adaptable-cjs 18.0.0-canary.17 → 18.0.0-canary.18
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/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +9 -4
- package/src/PredefinedConfig/Common/Menu.js +62 -36
- package/src/Redux/Store/AdaptableStore.js +11 -6
- 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 +2 -2
- 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 +2 -2
- 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/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.18",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { GridFilter } from '../../types';
|
|
2
3
|
export declare class GridFilterInternalApi extends ApiBase {
|
|
3
4
|
fireGridFilterAppliedEvent(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Compares to Grid Filters to see if they are identical
|
|
7
|
+
*/
|
|
8
|
+
isGridFilterDifferent(oldFilter: GridFilter, newFilter: GridFilter): boolean;
|
|
4
9
|
}
|
|
@@ -19,5 +19,11 @@ class GridFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
19
19
|
adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Compares to Grid Filters to see if they are identical
|
|
24
|
+
*/
|
|
25
|
+
isGridFilterDifferent(oldFilter, newFilter) {
|
|
26
|
+
return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
exports.GridFilterInternalApi = GridFilterInternalApi;
|
|
@@ -5,11 +5,16 @@ import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
|
|
|
5
5
|
import { SelectedRowInfo } from '../Selection/SelectedRowInfo';
|
|
6
6
|
import { Column, IRowNode } from '@ag-grid-community/core';
|
|
7
7
|
import { AdaptableIcon, BaseContext } from '../../types';
|
|
8
|
+
export type AdaptableColumnMenuItemName = (typeof ADAPTABLE_COLUMN_MENU_ITEMS)[number];
|
|
9
|
+
export type AdaptableContextMenuItemName = (typeof ADAPTABLE_CONTEXT_MENU_ITEMS)[number];
|
|
8
10
|
/**
|
|
9
|
-
* List of Shipped Adaptable Menu Items
|
|
11
|
+
* List of Shipped Adaptable Column Menu Items
|
|
10
12
|
*/
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
+
export declare const ADAPTABLE_COLUMN_MENU_ITEMS: readonly ["calculated-column-edit", "cell-summary-show", "column-filter-bar-hide", "column-filter-bar-show", "column-filter-clear", "column-filter-on-cell-value", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "custom-sort-add", "custom-sort-edit", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "flashing-cell-add", "flashing-cell-delete", "format-column-add", "format-column-edit", "free-text-column-edit", "grid-info-show", "layout-column-caption-change", "layout-column-hide", "layout-column-select", "layout-column-select-preserve", "layout-column-select-reset", "layout-edit", "layout-grid-parent", "layout-select-parent", "layout-select-all", "plus-minus-add", "settings-panel-open", "styled-column-badge-add", "styled-column-badge-edit", "styled-column-gradient-add", "styled-column-gradient-edit", "styled-column-percent-bar-add", "styled-column-percent-bar-edit", "styled-column-sparkline-add", "styled-column-sparkline-edit", "system-status-show", "internal", "parent"];
|
|
14
|
+
/**
|
|
15
|
+
* List of Shipped Adaptable Context Menu Items
|
|
16
|
+
*/
|
|
17
|
+
export declare const ADAPTABLE_CONTEXT_MENU_ITEMS: readonly ["alert-clear", "bulk-update-apply", "calculated-column-edit", "cell-summary-show", "column-filter-on-cell-value", "column-filter-clear", "column-filter-suspend", "column-filter-unsuspend", "column-info-show", "comment-add", "comment-remove", "dashboard-collapse", "dashboard-configure", "dashboard-dock", "dashboard-expand", "dashboard-float", "dashboard-hide", "dashboard-show", "data-import", "export-clipboard", "export-csv", "export-excel", "export-json", "export-table", "export-custom-destination", "fdc3-broadcast", "fdc3-raise-intent", "flashing-cell-clear", "flashing-row-clear", "grid-info-show", "layout-aggregated-view", "layout-auto-size", "layout-clear-selection", "layout-edit", "layout-select-all", "note-add", "note-remove", "settings-panel-open", "smart-edit-apply", "system-status-show"];
|
|
13
18
|
/**
|
|
14
19
|
* Menu item used by Adaptable in both Column and Context Menus
|
|
15
20
|
*/
|
|
@@ -17,7 +22,7 @@ export interface AdaptableMenuItem {
|
|
|
17
22
|
/**
|
|
18
23
|
* Unique name for the Menu Item
|
|
19
24
|
*/
|
|
20
|
-
name:
|
|
25
|
+
name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
21
26
|
/**
|
|
22
27
|
* Text that appears in the menu
|
|
23
28
|
*/
|
|
@@ -1,20 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ADAPTABLE_CONTEXT_MENU_ITEMS = exports.ADAPTABLE_COLUMN_MENU_ITEMS = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* List of Shipped Adaptable Menu Items
|
|
5
|
+
* List of Shipped Adaptable Column Menu Items
|
|
6
6
|
*/
|
|
7
|
-
exports.
|
|
7
|
+
exports.ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
8
|
+
'calculated-column-edit',
|
|
9
|
+
'cell-summary-show',
|
|
10
|
+
'column-filter-bar-hide',
|
|
11
|
+
'column-filter-bar-show',
|
|
12
|
+
'column-filter-clear',
|
|
13
|
+
'column-filter-on-cell-value',
|
|
14
|
+
'column-filter-suspend',
|
|
15
|
+
'column-filter-unsuspend',
|
|
16
|
+
'column-info-show',
|
|
17
|
+
'custom-sort-add',
|
|
18
|
+
'custom-sort-edit',
|
|
19
|
+
'dashboard-collapse',
|
|
20
|
+
'dashboard-configure',
|
|
21
|
+
'dashboard-dock',
|
|
22
|
+
'dashboard-expand',
|
|
23
|
+
'dashboard-float',
|
|
24
|
+
'dashboard-hide',
|
|
25
|
+
'dashboard-show',
|
|
26
|
+
'data-import',
|
|
27
|
+
'flashing-cell-add',
|
|
28
|
+
'flashing-cell-delete',
|
|
29
|
+
'format-column-add',
|
|
30
|
+
'format-column-edit',
|
|
31
|
+
'free-text-column-edit',
|
|
32
|
+
'grid-info-show',
|
|
33
|
+
'layout-column-caption-change',
|
|
34
|
+
'layout-column-hide',
|
|
35
|
+
'layout-column-select',
|
|
36
|
+
'layout-column-select-preserve',
|
|
37
|
+
'layout-column-select-reset',
|
|
38
|
+
'layout-edit',
|
|
39
|
+
'layout-grid-parent',
|
|
40
|
+
'layout-select-parent',
|
|
41
|
+
'layout-select-all',
|
|
42
|
+
'plus-minus-add',
|
|
43
|
+
'settings-panel-open',
|
|
44
|
+
'styled-column-badge-add',
|
|
45
|
+
'styled-column-badge-edit',
|
|
46
|
+
'styled-column-gradient-add',
|
|
47
|
+
'styled-column-gradient-edit',
|
|
48
|
+
'styled-column-percent-bar-add',
|
|
49
|
+
'styled-column-percent-bar-edit',
|
|
50
|
+
'styled-column-sparkline-add',
|
|
51
|
+
'styled-column-sparkline-edit',
|
|
52
|
+
'system-status-show',
|
|
53
|
+
'internal',
|
|
54
|
+
'parent',
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* List of Shipped Adaptable Context Menu Items
|
|
58
|
+
*/
|
|
59
|
+
exports.ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
8
60
|
'alert-clear',
|
|
9
61
|
'bulk-update-apply',
|
|
10
62
|
'calculated-column-edit',
|
|
11
63
|
'cell-summary-show',
|
|
12
|
-
'column-
|
|
64
|
+
'column-filter-on-cell-value',
|
|
65
|
+
'column-filter-clear',
|
|
66
|
+
'column-filter-suspend',
|
|
67
|
+
'column-filter-unsuspend',
|
|
68
|
+
'column-info-show',
|
|
13
69
|
'comment-add',
|
|
14
70
|
'comment-remove',
|
|
15
|
-
'custom-sort-add',
|
|
16
|
-
'custom-sort-edit',
|
|
17
|
-
'dashboard',
|
|
18
71
|
'dashboard-collapse',
|
|
19
72
|
'dashboard-configure',
|
|
20
73
|
'dashboard-dock',
|
|
@@ -23,52 +76,25 @@ exports.ADAPTABLE_MENU_ITEMS = [
|
|
|
23
76
|
'dashboard-hide',
|
|
24
77
|
'dashboard-show',
|
|
25
78
|
'data-import',
|
|
26
|
-
'export',
|
|
27
79
|
'export-clipboard',
|
|
28
80
|
'export-csv',
|
|
29
81
|
'export-excel',
|
|
30
82
|
'export-json',
|
|
31
83
|
'export-table',
|
|
32
84
|
'export-custom-destination',
|
|
33
|
-
'fdc3',
|
|
34
85
|
'fdc3-broadcast',
|
|
35
86
|
'fdc3-raise-intent',
|
|
36
|
-
'filter',
|
|
37
|
-
'filter-bar-visbility',
|
|
38
|
-
'filter-clear',
|
|
39
|
-
'filter-suspend',
|
|
40
|
-
'filter-cell-value',
|
|
41
|
-
'flashing-cell-add',
|
|
42
87
|
'flashing-cell-clear',
|
|
43
|
-
'flashing-cell-delete',
|
|
44
88
|
'flashing-row-clear',
|
|
45
|
-
'
|
|
46
|
-
'format-column-add',
|
|
47
|
-
'format-column-edit',
|
|
48
|
-
'free-text-column-edit',
|
|
49
|
-
'grid-info',
|
|
89
|
+
'grid-info-show',
|
|
50
90
|
'layout-aggregated-view',
|
|
51
91
|
'layout-auto-size',
|
|
52
92
|
'layout-clear-selection',
|
|
53
|
-
'layout-column-caption-change',
|
|
54
|
-
'layout-column-hide',
|
|
55
|
-
'layout-column-select',
|
|
56
|
-
'layout-column-select-preserve',
|
|
57
|
-
'layout-column-select-reset',
|
|
58
93
|
'layout-edit',
|
|
59
|
-
'layout-grid',
|
|
60
|
-
'layout-select',
|
|
61
94
|
'layout-select-all',
|
|
62
95
|
'note-add',
|
|
63
96
|
'note-remove',
|
|
64
|
-
'plus-minus-add',
|
|
65
|
-
'smart-edit-apply',
|
|
66
97
|
'settings-panel-open',
|
|
67
|
-
'
|
|
68
|
-
'styled-column',
|
|
69
|
-
'styled-column-gradient',
|
|
70
|
-
'styled-column-percent-bar',
|
|
71
|
-
'styled-column-sparkline',
|
|
98
|
+
'smart-edit-apply',
|
|
72
99
|
'system-status-show',
|
|
73
|
-
'internal' // used by AdapTable in Settings Panel
|
|
74
100
|
];
|
|
@@ -269,7 +269,7 @@ exports.AdaptableStore = AdaptableStore;
|
|
|
269
269
|
const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
270
270
|
return function (next) {
|
|
271
271
|
return function (action) {
|
|
272
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
272
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
273
273
|
switch (action.type) {
|
|
274
274
|
/*******************
|
|
275
275
|
* NAMED QUERY ACTIONS
|
|
@@ -777,7 +777,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
777
777
|
draftLayoutAction = GridRedux.LayoutDraftColumnFilterUnsuspendAll();
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
|
-
// GRID FILTER
|
|
781
780
|
returnAction = next(draftLayoutAction);
|
|
782
781
|
}
|
|
783
782
|
setTimeout(() => {
|
|
@@ -807,7 +806,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
807
806
|
returnAction = action;
|
|
808
807
|
}
|
|
809
808
|
else {
|
|
810
|
-
//
|
|
809
|
+
// This is different to what we do with column filters?
|
|
811
810
|
switch (action.type) {
|
|
812
811
|
case LayoutRedux.LAYOUT_GRID_FILTER_SET:
|
|
813
812
|
returnAction = GridRedux.LayoutDraftGridFilterSet(Object.assign(Object.assign({}, currentLayout.GridFilter), { Expression: action.gridFilter }));
|
|
@@ -1018,12 +1017,18 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1018
1017
|
let returnAction = next(action);
|
|
1019
1018
|
const newLayoutState = middlewareAPI.getState().Layout;
|
|
1020
1019
|
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
|
|
1020
|
+
// Tell Grid to apply column filtering if filters have been changed in a loaded Layout
|
|
1021
1021
|
const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
|
|
1022
1022
|
const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
|
|
1023
|
-
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1024
1023
|
if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
|
|
1025
1024
|
adaptable.applyColumnFiltering();
|
|
1026
1025
|
}
|
|
1026
|
+
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1027
|
+
const oldGridFilter = (_m = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _m === void 0 ? void 0 : _m.GridFilter;
|
|
1028
|
+
const newGridFilter = (_o = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _o === void 0 ? void 0 : _o.GridFilter;
|
|
1029
|
+
if (adaptable.api.gridFilterApi.internalApi.isGridFilterDifferent(oldGridFilter, newGridFilter)) {
|
|
1030
|
+
adaptable.applyGridFiltering();
|
|
1031
|
+
}
|
|
1027
1032
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1028
1033
|
returnAction.type == LayoutRedux.LAYOUT_DELETE ||
|
|
1029
1034
|
returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
|
|
@@ -1036,7 +1041,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1036
1041
|
// tell grid the layout has been selected
|
|
1037
1042
|
adaptable.setLayout(currentLayout);
|
|
1038
1043
|
}
|
|
1039
|
-
if (!((
|
|
1044
|
+
if (!((_p = adaptable.adaptableOptions.layoutOptions) === null || _p === void 0 ? void 0 : _p.autoSaveLayouts)) {
|
|
1040
1045
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
1041
1046
|
}
|
|
1042
1047
|
}
|
|
@@ -1044,7 +1049,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1044
1049
|
returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
1045
1050
|
const actionTyped = action;
|
|
1046
1051
|
// if autosave is false
|
|
1047
|
-
if (!((
|
|
1052
|
+
if (!((_q = adaptable.adaptableOptions.layoutOptions) === null || _q === void 0 ? void 0 : _q.autoSaveLayouts)) {
|
|
1048
1053
|
// and the current layout is saved, make sure we also update the draft
|
|
1049
1054
|
if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
|
|
1050
1055
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
|
|
@@ -3,7 +3,7 @@ import { Action } from 'redux';
|
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
6
|
-
import { AdaptableMenuItem,
|
|
6
|
+
import { AdaptableMenuItem, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
9
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -41,15 +41,15 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
41
41
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
42
42
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
43
43
|
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
|
|
44
|
-
Name:
|
|
44
|
+
Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
45
45
|
Label: string;
|
|
46
46
|
ComponentName: string;
|
|
47
47
|
Icon: AdaptableSystemIconName;
|
|
48
48
|
PopupParams?: ModuleParams;
|
|
49
49
|
}): MenuItemShowPopup;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
51
|
+
createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
52
|
+
createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
53
53
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
54
54
|
getModuleNamedQueryReferences(): string[];
|
|
55
55
|
getModuleCalculatedColumnReferences(): CalculatedColumn[];
|
|
@@ -107,15 +107,15 @@ class AdaptableModuleBase {
|
|
|
107
107
|
return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
108
108
|
}
|
|
109
109
|
// creates a menu item for the column menu to perform a function
|
|
110
|
-
|
|
110
|
+
createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
111
111
|
return new MenuItem_1.MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
112
112
|
}
|
|
113
113
|
// creates a menu item for the column menu to enact a Redux action
|
|
114
|
-
|
|
114
|
+
createMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
115
115
|
return new MenuItem_1.MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
116
116
|
}
|
|
117
117
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
118
|
-
|
|
118
|
+
createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
119
119
|
return new MenuItem_1.MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
120
120
|
}
|
|
121
121
|
getTeamSharingAction() {
|
|
@@ -87,7 +87,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
87
87
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
88
88
|
}
|
|
89
89
|
if (relevantAlert) {
|
|
90
|
-
items.push(this.
|
|
90
|
+
items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -61,7 +61,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
61
61
|
source: 'ColumnMenu',
|
|
62
62
|
};
|
|
63
63
|
return [
|
|
64
|
-
this.
|
|
64
|
+
this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
65
65
|
];
|
|
66
66
|
}
|
|
67
67
|
getTeamSharingAction() {
|
|
@@ -13,8 +13,8 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
17
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
private getExistingColumnFilter;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
20
20
|
toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;
|
|
@@ -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,
|
|
@@ -62,12 +62,12 @@ class CommentModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
62
62
|
return items;
|
|
63
63
|
}
|
|
64
64
|
if (comments) {
|
|
65
|
-
items.push(this.
|
|
65
|
+
items.push(this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
66
66
|
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
items.push(this.
|
|
70
|
+
items.push(this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
71
71
|
// add an empty one
|
|
72
72
|
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
73
73
|
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
|
}
|