@adaptabletools/adaptable 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 +61 -35
- 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.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
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
|
}
|
|
@@ -16,4 +16,10 @@ export class GridFilterInternalApi extends ApiBase {
|
|
|
16
16
|
adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Compares to Grid Filters to see if they are identical
|
|
21
|
+
*/
|
|
22
|
+
isGridFilterDifferent(oldFilter, newFilter) {
|
|
23
|
+
return (oldFilter === null || oldFilter === void 0 ? void 0 : oldFilter.Expression) === (newFilter === null || newFilter === void 0 ? void 0 : newFilter.Expression);
|
|
24
|
+
}
|
|
19
25
|
}
|
|
@@ -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,17 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* List of Shipped Adaptable Menu Items
|
|
2
|
+
* List of Shipped Adaptable Column Menu Items
|
|
3
3
|
*/
|
|
4
|
-
export const
|
|
4
|
+
export const ADAPTABLE_COLUMN_MENU_ITEMS = [
|
|
5
|
+
'calculated-column-edit',
|
|
6
|
+
'cell-summary-show',
|
|
7
|
+
'column-filter-bar-hide',
|
|
8
|
+
'column-filter-bar-show',
|
|
9
|
+
'column-filter-clear',
|
|
10
|
+
'column-filter-on-cell-value',
|
|
11
|
+
'column-filter-suspend',
|
|
12
|
+
'column-filter-unsuspend',
|
|
13
|
+
'column-info-show',
|
|
14
|
+
'custom-sort-add',
|
|
15
|
+
'custom-sort-edit',
|
|
16
|
+
'dashboard-collapse',
|
|
17
|
+
'dashboard-configure',
|
|
18
|
+
'dashboard-dock',
|
|
19
|
+
'dashboard-expand',
|
|
20
|
+
'dashboard-float',
|
|
21
|
+
'dashboard-hide',
|
|
22
|
+
'dashboard-show',
|
|
23
|
+
'data-import',
|
|
24
|
+
'flashing-cell-add',
|
|
25
|
+
'flashing-cell-delete',
|
|
26
|
+
'format-column-add',
|
|
27
|
+
'format-column-edit',
|
|
28
|
+
'free-text-column-edit',
|
|
29
|
+
'grid-info-show',
|
|
30
|
+
'layout-column-caption-change',
|
|
31
|
+
'layout-column-hide',
|
|
32
|
+
'layout-column-select',
|
|
33
|
+
'layout-column-select-preserve',
|
|
34
|
+
'layout-column-select-reset',
|
|
35
|
+
'layout-edit',
|
|
36
|
+
'layout-grid-parent',
|
|
37
|
+
'layout-select-parent',
|
|
38
|
+
'layout-select-all',
|
|
39
|
+
'plus-minus-add',
|
|
40
|
+
'settings-panel-open',
|
|
41
|
+
'styled-column-badge-add',
|
|
42
|
+
'styled-column-badge-edit',
|
|
43
|
+
'styled-column-gradient-add',
|
|
44
|
+
'styled-column-gradient-edit',
|
|
45
|
+
'styled-column-percent-bar-add',
|
|
46
|
+
'styled-column-percent-bar-edit',
|
|
47
|
+
'styled-column-sparkline-add',
|
|
48
|
+
'styled-column-sparkline-edit',
|
|
49
|
+
'system-status-show',
|
|
50
|
+
'internal',
|
|
51
|
+
'parent',
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* List of Shipped Adaptable Context Menu Items
|
|
55
|
+
*/
|
|
56
|
+
export const ADAPTABLE_CONTEXT_MENU_ITEMS = [
|
|
5
57
|
'alert-clear',
|
|
6
58
|
'bulk-update-apply',
|
|
7
59
|
'calculated-column-edit',
|
|
8
60
|
'cell-summary-show',
|
|
9
|
-
'column-
|
|
61
|
+
'column-filter-on-cell-value',
|
|
62
|
+
'column-filter-clear',
|
|
63
|
+
'column-filter-suspend',
|
|
64
|
+
'column-filter-unsuspend',
|
|
65
|
+
'column-info-show',
|
|
10
66
|
'comment-add',
|
|
11
67
|
'comment-remove',
|
|
12
|
-
'custom-sort-add',
|
|
13
|
-
'custom-sort-edit',
|
|
14
|
-
'dashboard',
|
|
15
68
|
'dashboard-collapse',
|
|
16
69
|
'dashboard-configure',
|
|
17
70
|
'dashboard-dock',
|
|
@@ -20,52 +73,25 @@ export const ADAPTABLE_MENU_ITEMS = [
|
|
|
20
73
|
'dashboard-hide',
|
|
21
74
|
'dashboard-show',
|
|
22
75
|
'data-import',
|
|
23
|
-
'export',
|
|
24
76
|
'export-clipboard',
|
|
25
77
|
'export-csv',
|
|
26
78
|
'export-excel',
|
|
27
79
|
'export-json',
|
|
28
80
|
'export-table',
|
|
29
81
|
'export-custom-destination',
|
|
30
|
-
'fdc3',
|
|
31
82
|
'fdc3-broadcast',
|
|
32
83
|
'fdc3-raise-intent',
|
|
33
|
-
'filter',
|
|
34
|
-
'filter-bar-visbility',
|
|
35
|
-
'filter-clear',
|
|
36
|
-
'filter-suspend',
|
|
37
|
-
'filter-cell-value',
|
|
38
|
-
'flashing-cell-add',
|
|
39
84
|
'flashing-cell-clear',
|
|
40
|
-
'flashing-cell-delete',
|
|
41
85
|
'flashing-row-clear',
|
|
42
|
-
'
|
|
43
|
-
'format-column-add',
|
|
44
|
-
'format-column-edit',
|
|
45
|
-
'free-text-column-edit',
|
|
46
|
-
'grid-info',
|
|
86
|
+
'grid-info-show',
|
|
47
87
|
'layout-aggregated-view',
|
|
48
88
|
'layout-auto-size',
|
|
49
89
|
'layout-clear-selection',
|
|
50
|
-
'layout-column-caption-change',
|
|
51
|
-
'layout-column-hide',
|
|
52
|
-
'layout-column-select',
|
|
53
|
-
'layout-column-select-preserve',
|
|
54
|
-
'layout-column-select-reset',
|
|
55
90
|
'layout-edit',
|
|
56
|
-
'layout-grid',
|
|
57
|
-
'layout-select',
|
|
58
91
|
'layout-select-all',
|
|
59
92
|
'note-add',
|
|
60
93
|
'note-remove',
|
|
61
|
-
'plus-minus-add',
|
|
62
|
-
'smart-edit-apply',
|
|
63
94
|
'settings-panel-open',
|
|
64
|
-
'
|
|
65
|
-
'styled-column',
|
|
66
|
-
'styled-column-gradient',
|
|
67
|
-
'styled-column-percent-bar',
|
|
68
|
-
'styled-column-sparkline',
|
|
95
|
+
'smart-edit-apply',
|
|
69
96
|
'system-status-show',
|
|
70
|
-
'internal' // used by AdapTable in Settings Panel
|
|
71
97
|
];
|
|
@@ -262,7 +262,7 @@ export class AdaptableStore {
|
|
|
262
262
|
const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
263
263
|
return function (next) {
|
|
264
264
|
return function (action) {
|
|
265
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
265
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
266
266
|
switch (action.type) {
|
|
267
267
|
/*******************
|
|
268
268
|
* NAMED QUERY ACTIONS
|
|
@@ -770,7 +770,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
770
770
|
draftLayoutAction = GridRedux.LayoutDraftColumnFilterUnsuspendAll();
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
773
|
-
// GRID FILTER
|
|
774
773
|
returnAction = next(draftLayoutAction);
|
|
775
774
|
}
|
|
776
775
|
setTimeout(() => {
|
|
@@ -800,7 +799,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
800
799
|
returnAction = action;
|
|
801
800
|
}
|
|
802
801
|
else {
|
|
803
|
-
//
|
|
802
|
+
// This is different to what we do with column filters?
|
|
804
803
|
switch (action.type) {
|
|
805
804
|
case LayoutRedux.LAYOUT_GRID_FILTER_SET:
|
|
806
805
|
returnAction = GridRedux.LayoutDraftGridFilterSet(Object.assign(Object.assign({}, currentLayout.GridFilter), { Expression: action.gridFilter }));
|
|
@@ -1011,12 +1010,18 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1011
1010
|
let returnAction = next(action);
|
|
1012
1011
|
const newLayoutState = middlewareAPI.getState().Layout;
|
|
1013
1012
|
adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
|
|
1013
|
+
// Tell Grid to apply column filtering if filters have been changed in a loaded Layout
|
|
1014
1014
|
const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
|
|
1015
1015
|
const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
|
|
1016
|
-
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1017
1016
|
if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
|
|
1018
1017
|
adaptable.applyColumnFiltering();
|
|
1019
1018
|
}
|
|
1019
|
+
// Tell Grid to apply filtering if filters have been changed in a loaded Layout
|
|
1020
|
+
const oldGridFilter = (_m = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _m === void 0 ? void 0 : _m.GridFilter;
|
|
1021
|
+
const newGridFilter = (_o = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _o === void 0 ? void 0 : _o.GridFilter;
|
|
1022
|
+
if (adaptable.api.gridFilterApi.internalApi.isGridFilterDifferent(oldGridFilter, newGridFilter)) {
|
|
1023
|
+
adaptable.applyGridFiltering();
|
|
1024
|
+
}
|
|
1020
1025
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
1021
1026
|
returnAction.type == LayoutRedux.LAYOUT_DELETE ||
|
|
1022
1027
|
returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
|
|
@@ -1029,7 +1034,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1029
1034
|
// tell grid the layout has been selected
|
|
1030
1035
|
adaptable.setLayout(currentLayout);
|
|
1031
1036
|
}
|
|
1032
|
-
if (!((
|
|
1037
|
+
if (!((_p = adaptable.adaptableOptions.layoutOptions) === null || _p === void 0 ? void 0 : _p.autoSaveLayouts)) {
|
|
1033
1038
|
middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
|
|
1034
1039
|
}
|
|
1035
1040
|
}
|
|
@@ -1037,7 +1042,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
1037
1042
|
returnAction.type == LayoutRedux.LAYOUT_SAVE) {
|
|
1038
1043
|
const actionTyped = action;
|
|
1039
1044
|
// if autosave is false
|
|
1040
|
-
if (!((
|
|
1045
|
+
if (!((_q = adaptable.adaptableOptions.layoutOptions) === null || _q === void 0 ? void 0 : _q.autoSaveLayouts)) {
|
|
1041
1046
|
// and the current layout is saved, make sure we also update the draft
|
|
1042
1047
|
if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
|
|
1043
1048
|
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[];
|
|
@@ -103,15 +103,15 @@ export class AdaptableModuleBase {
|
|
|
103
103
|
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
104
104
|
}
|
|
105
105
|
// creates a menu item for the column menu to perform a function
|
|
106
|
-
|
|
106
|
+
createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
107
107
|
return new MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
108
108
|
}
|
|
109
109
|
// creates a menu item for the column menu to enact a Redux action
|
|
110
|
-
|
|
110
|
+
createMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
111
111
|
return new MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
112
112
|
}
|
|
113
113
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
114
|
-
|
|
114
|
+
createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
115
115
|
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
116
116
|
}
|
|
117
117
|
getTeamSharingAction() {
|
|
@@ -83,7 +83,7 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
83
83
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
84
84
|
}
|
|
85
85
|
if (relevantAlert) {
|
|
86
|
-
items.push(this.
|
|
86
|
+
items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -57,7 +57,7 @@ export class CalculatedColumnModule extends AdaptableModuleBase {
|
|
|
57
57
|
source: 'ColumnMenu',
|
|
58
58
|
};
|
|
59
59
|
return [
|
|
60
|
-
this.
|
|
60
|
+
this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
63
|
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;
|
|
@@ -39,6 +39,43 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
addColumnMenuItems(column) {
|
|
43
|
+
let filterSubMenuItems = [];
|
|
44
|
+
if (column &&
|
|
45
|
+
column.filterable &&
|
|
46
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
47
|
+
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
48
|
+
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
49
|
+
if (this.isModuleEditable() &&
|
|
50
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
51
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
52
|
+
? SystemRedux.SystemQuickFilterBarHide()
|
|
53
|
+
: SystemRedux.SystemQuickFilterBarShow()));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
57
|
+
if (existingColumnFilter) {
|
|
58
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
59
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
60
|
+
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
61
|
+
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
62
|
+
}
|
|
63
|
+
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
name: 'parent',
|
|
67
|
+
label: this.moduleInfo.FriendlyName,
|
|
68
|
+
isVisible: true,
|
|
69
|
+
module: this.moduleInfo.ModuleName,
|
|
70
|
+
icon: {
|
|
71
|
+
name: this.moduleInfo.Glyph,
|
|
72
|
+
},
|
|
73
|
+
subItems: filterSubMenuItems,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
42
79
|
addContextMenuItems(menuContext) {
|
|
43
80
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
44
81
|
if (menuContext.adaptableColumn &&
|
|
@@ -57,13 +94,15 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
57
94
|
this.api.columnFilterApi.internalApi.createEqualityColumnFilterForCell(menuContext.selectedCellInfo.gridCells[0]);
|
|
58
95
|
};
|
|
59
96
|
return [
|
|
60
|
-
this.
|
|
97
|
+
this.createMenuItemClickFunction('column-filter-on-cell-value', isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
61
98
|
];
|
|
62
99
|
}
|
|
63
100
|
else {
|
|
64
101
|
let filterSubMenuItems = [];
|
|
65
|
-
filterSubMenuItems.push(this.
|
|
66
|
-
filterSubMenuItems.push(this.
|
|
102
|
+
filterSubMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
103
|
+
filterSubMenuItems.push(this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
104
|
+
? 'column-filter-unsuspend'
|
|
105
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
67
106
|
? () => {
|
|
68
107
|
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
69
108
|
}
|
|
@@ -71,7 +110,8 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
71
110
|
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
72
111
|
}));
|
|
73
112
|
return [
|
|
74
|
-
{
|
|
113
|
+
{
|
|
114
|
+
name: 'parent',
|
|
75
115
|
label: this.moduleInfo.FriendlyName,
|
|
76
116
|
isVisible: true,
|
|
77
117
|
module: this.moduleInfo.ModuleName,
|
|
@@ -85,43 +125,6 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
85
125
|
}
|
|
86
126
|
}
|
|
87
127
|
}
|
|
88
|
-
addColumnMenuItems(column) {
|
|
89
|
-
let filterSubMenuItems = [];
|
|
90
|
-
if (column &&
|
|
91
|
-
column.filterable &&
|
|
92
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
93
|
-
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
94
|
-
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
95
|
-
if (this.isModuleEditable() &&
|
|
96
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
97
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-bar-visbility', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
98
|
-
? SystemRedux.SystemQuickFilterBarHide()
|
|
99
|
-
: SystemRedux.SystemQuickFilterBarShow()));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
103
|
-
if (existingColumnFilter) {
|
|
104
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
105
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
106
|
-
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
107
|
-
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
108
|
-
}
|
|
109
|
-
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
110
|
-
return [
|
|
111
|
-
{
|
|
112
|
-
name: 'filter',
|
|
113
|
-
label: this.moduleInfo.FriendlyName,
|
|
114
|
-
isVisible: true,
|
|
115
|
-
module: this.moduleInfo.ModuleName,
|
|
116
|
-
icon: {
|
|
117
|
-
name: this.moduleInfo.Glyph,
|
|
118
|
-
},
|
|
119
|
-
subItems: filterSubMenuItems,
|
|
120
|
-
},
|
|
121
|
-
];
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
128
|
getExistingColumnFilter(column) {
|
|
126
129
|
return this.api.columnFilterApi.getColumnFilters().find((x) => x.ColumnId == column.columnId);
|
|
127
130
|
}
|
|
@@ -15,7 +15,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
15
15
|
};
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
-
Name: 'column-info',
|
|
18
|
+
Name: 'column-info-show',
|
|
19
19
|
Label: 'Column Info',
|
|
20
20
|
ComponentName: this.moduleInfo.Popup,
|
|
21
21
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -32,7 +32,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
32
32
|
};
|
|
33
33
|
return [
|
|
34
34
|
this.createMainMenuItemShowPopup({
|
|
35
|
-
Name: 'column-info',
|
|
35
|
+
Name: 'column-info-show',
|
|
36
36
|
Label: 'Column Info',
|
|
37
37
|
ComponentName: this.moduleInfo.Popup,
|
|
38
38
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -58,12 +58,12 @@ export class CommentModule extends AdaptableModuleBase {
|
|
|
58
58
|
return items;
|
|
59
59
|
}
|
|
60
60
|
if (comments) {
|
|
61
|
-
items.push(this.
|
|
61
|
+
items.push(this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
62
62
|
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
items.push(this.
|
|
66
|
+
items.push(this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
67
67
|
// add an empty one
|
|
68
68
|
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
69
69
|
requestAnimationFrame(() => {
|
|
@@ -36,7 +36,7 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
36
36
|
};
|
|
37
37
|
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
38
38
|
return [
|
|
39
|
-
this.
|
|
39
|
+
this.createMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
40
40
|
];
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -27,29 +27,29 @@ export class DashboardModule extends AdaptableModuleBase {
|
|
|
27
27
|
if (this.isModuleAvailable()) {
|
|
28
28
|
let menuItems = [];
|
|
29
29
|
if (this.isModuleEditable()) {
|
|
30
|
-
menuItems.push(this.
|
|
30
|
+
menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
31
31
|
}
|
|
32
32
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
33
|
-
menuItems.push(this.
|
|
33
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
menuItems.push(this.
|
|
36
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
37
37
|
}
|
|
38
38
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
39
|
-
menuItems.push(this.
|
|
39
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
40
40
|
}
|
|
41
41
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
42
|
-
menuItems.push(this.
|
|
42
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
43
43
|
}
|
|
44
44
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
45
|
-
menuItems.push(this.
|
|
45
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
menuItems.push(this.
|
|
48
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
49
49
|
}
|
|
50
50
|
return [
|
|
51
51
|
{
|
|
52
|
-
name: '
|
|
52
|
+
name: 'parent',
|
|
53
53
|
label: this.moduleInfo.FriendlyName,
|
|
54
54
|
isVisible: true,
|
|
55
55
|
module: this.moduleInfo.ModuleName,
|
|
@@ -26,6 +26,6 @@ export class DataImportModule extends AdaptableModuleBase {
|
|
|
26
26
|
source: source,
|
|
27
27
|
maxWidth: this.getPopupMaxWidth(),
|
|
28
28
|
};
|
|
29
|
-
return this.
|
|
29
|
+
return this.createMenuItemShowPopup('data-import', 'Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -86,16 +86,16 @@ export class ExportModule extends AdaptableModuleBase {
|
|
|
86
86
|
buildReportMenuItems(report) {
|
|
87
87
|
const menuItems = [];
|
|
88
88
|
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
89
|
-
menuItems.push(this.
|
|
89
|
+
menuItems.push(this.createMenuItemClickFunction(this.getMenuName(destination), destination, this.moduleInfo.Glyph, () => this.export(report, destination)));
|
|
90
90
|
}
|
|
91
91
|
for (const customDestination of this.api.exportApi.getCustomDestinations()) {
|
|
92
|
-
menuItems.push(this.
|
|
92
|
+
menuItems.push(this.createMenuItemClickFunction('export-custom-destination', customDestination.name, this.moduleInfo.Glyph, () => this.export(report, customDestination.name)));
|
|
93
93
|
}
|
|
94
94
|
return menuItems;
|
|
95
95
|
}
|
|
96
96
|
buildExportMenuItem(label, subItems) {
|
|
97
97
|
return {
|
|
98
|
-
name: '
|
|
98
|
+
name: 'parent',
|
|
99
99
|
label: label,
|
|
100
100
|
module: this.moduleInfo.ModuleName,
|
|
101
101
|
isVisible: true,
|
|
@@ -27,7 +27,7 @@ export class Fdc3Module extends AdaptableModuleBase {
|
|
|
27
27
|
contextMenuItems.sort((a, b) => a.label.localeCompare(b.label));
|
|
28
28
|
if (contextMenuItems.length > 1) {
|
|
29
29
|
const groupMenuItem = {
|
|
30
|
-
name: '
|
|
30
|
+
name: 'parent',
|
|
31
31
|
module: this.moduleInfo.ModuleName,
|
|
32
32
|
label: 'FDC3',
|
|
33
33
|
icon: {
|
|
@@ -69,11 +69,11 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
69
69
|
});
|
|
70
70
|
if (flashingCellForCurrentColumn) {
|
|
71
71
|
return [
|
|
72
|
-
this.
|
|
72
|
+
this.createMenuItemReduxAction('flashing-cell-delete', 'Delete Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionDelete(flashingCellForCurrentColumn)),
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
75
|
return [
|
|
76
|
-
this.
|
|
76
|
+
this.createMenuItemReduxAction('flashing-cell-add', 'Add Flashing Cell', this.moduleInfo.Glyph, FlashingCellRedux.FlashingCellDefinitionAdd({
|
|
77
77
|
Scope: {
|
|
78
78
|
ColumnIds: [column.columnId],
|
|
79
79
|
},
|
|
@@ -95,11 +95,11 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
95
95
|
if (flashingCellForRow.flashTarget === 'row' ||
|
|
96
96
|
(Array.isArray(flashingCellForRow === null || flashingCellForRow === void 0 ? void 0 : flashingCellForRow.flashTarget) &&
|
|
97
97
|
flashingCellForRow.flashTarget.includes('row'))) {
|
|
98
|
-
items.push(this.
|
|
98
|
+
items.push(this.createMenuItemReduxAction('flashing-row-clear', 'Clear Flashing Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForRow)));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
else if (flashingCellForCell && flashingCellForCell.flashTarget === 'cell') {
|
|
102
|
-
items.push(this.
|
|
102
|
+
items.push(this.createMenuItemReduxAction('flashing-cell-clear', 'Clear Flashing Cell', this.moduleInfo.Glyph, SystemRedux.SystemFlashingCellDelete(flashingCellForCell)));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|