@adaptabletools/adaptable-cjs 22.0.0-canary.6 → 22.0.0-canary.8

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.
Files changed (150) hide show
  1. package/index.css +63 -74
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
  5. package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
  6. package/src/AdaptableState/AdaptableState.d.ts +2 -0
  7. package/src/AdaptableState/AlertState.d.ts +1 -2
  8. package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
  9. package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
  10. package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
  11. package/src/AdaptableState/Common/AdaptableRowContext.js +2 -0
  12. package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
  13. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
  14. package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
  15. package/src/AdaptableState/Common/NamedObject.js +2 -0
  16. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  17. package/src/AdaptableState/Common/Schedule.d.ts +2 -2
  18. package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
  19. package/src/AdaptableState/Common/SuspendableObject.js +2 -0
  20. package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
  21. package/src/AdaptableState/CustomSortState.d.ts +1 -1
  22. package/src/AdaptableState/FormatColumnState.d.ts +1 -1
  23. package/src/AdaptableState/InitialState.d.ts +9 -0
  24. package/src/AdaptableState/LayoutState.d.ts +2 -3
  25. package/src/AdaptableState/PlusMinusState.d.ts +1 -1
  26. package/src/AdaptableState/ShortcutState.d.ts +1 -1
  27. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  28. package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
  29. package/src/AdaptableState/UserInterfaceState.js +2 -0
  30. package/src/Api/AlertApi.d.ts +6 -0
  31. package/src/Api/CustomSortApi.d.ts +6 -0
  32. package/src/Api/FlashingCellApi.d.ts +6 -0
  33. package/src/Api/FormatColumnApi.d.ts +10 -4
  34. package/src/Api/GridApi.d.ts +5 -9
  35. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  36. package/src/Api/Implementation/AlertApiImpl.js +5 -6
  37. package/src/Api/Implementation/ChartingApiImpl.js +2 -2
  38. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
  40. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
  42. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
  43. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
  44. package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
  45. package/src/Api/Implementation/GridApiImpl.js +9 -9
  46. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/LayoutApiImpl.js +4 -1
  48. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  49. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
  50. package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
  51. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
  52. package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
  53. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
  54. package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
  55. package/src/Api/Implementation/SystemStatusApiImpl.js +6 -9
  56. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
  57. package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
  58. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  59. package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
  60. package/src/Api/Internal/LayoutInternalApi.js +1 -1
  61. package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
  62. package/src/Api/LayoutApi.d.ts +6 -0
  63. package/src/Api/PlusMinusApi.d.ts +6 -0
  64. package/src/Api/ScheduleApi.d.ts +6 -0
  65. package/src/Api/ShortcutApi.d.ts +6 -0
  66. package/src/Api/UserInterfaceApi.d.ts +17 -0
  67. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
  68. package/src/Redux/ActionsReducers/FormatColumnRedux.js +17 -1
  69. package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
  70. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +26 -0
  71. package/src/Redux/Store/AdaptableStore.js +45 -16
  72. package/src/Strategy/BulkUpdateModule.js +8 -8
  73. package/src/Strategy/PlusMinusModule.js +1 -1
  74. package/src/Strategy/QuickSearchModule.js +1 -1
  75. package/src/Strategy/SettingsPanelModule.js +11 -7
  76. package/src/Strategy/SmartEditModule.js +10 -10
  77. package/src/Utilities/Services/DataService.js +1 -1
  78. package/src/Utilities/Services/Fdc3Service.js +4 -4
  79. package/src/Utilities/Services/ModuleService.js +1 -3
  80. package/src/Utilities/Services/ThemeService.js +2 -6
  81. package/src/Utilities/Services/ValidationService.js +1 -1
  82. package/src/Utilities/logDeprecation.js +3 -4
  83. package/src/Utilities/resolveContainerElement.d.ts +23 -0
  84. package/src/Utilities/resolveContainerElement.js +47 -0
  85. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  86. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
  87. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  88. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  89. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  90. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  91. package/src/View/Components/CellPopup/index.js +1 -1
  92. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  93. package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
  94. package/src/View/Components/NewScopeComponent.js +3 -3
  95. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
  96. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
  97. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
  98. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
  99. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
  100. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +35 -0
  101. package/src/View/Components/WizardSummaryPage.js +1 -1
  102. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  103. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  104. package/src/View/Dashboard/CustomToolbar.js +1 -1
  105. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  106. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  107. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  108. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
  109. package/src/View/Layout/LayoutViewPanel.js +1 -1
  110. package/src/View/Layout/TransposedPopup.js +144 -138
  111. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  112. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  113. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  114. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
  115. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  116. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  117. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
  118. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
  119. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
  120. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
  121. package/src/View/StateManagement/handleExportState.js +1 -1
  122. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  123. package/src/View/UIHelper.d.ts +2 -1
  124. package/src/View/UIHelper.js +8 -14
  125. package/src/agGrid/Adaptable.js +11 -11
  126. package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
  127. package/src/agGrid/AdaptableAgGrid.js +150 -82
  128. package/src/agGrid/AgGridAdapter.js +8 -8
  129. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  130. package/src/agGrid/AgGridExportAdapter.js +5 -5
  131. package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
  132. package/src/agGrid/AgGridMenuAdapter.js +9 -1
  133. package/src/agGrid/AgGridThemeAdapter.js +2 -2
  134. package/src/components/CheckBox/index.js +1 -1
  135. package/src/components/Dropdown/Arrows.js +1 -1
  136. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  137. package/src/components/FormLayout/index.js +1 -1
  138. package/src/components/OverlayTrigger/index.js +1 -1
  139. package/src/components/Select/Select.js +1 -1
  140. package/src/components/Tree/TreeDropdown/index.js +1 -1
  141. package/src/env.js +2 -2
  142. package/src/metamodel/adaptable.metamodel.d.ts +62 -0
  143. package/src/metamodel/adaptable.metamodel.js +1 -1
  144. package/src/migration/AdaptableUpgradeHelper.js +2 -2
  145. package/src/migration/VersionUpgrade17.js +4 -4
  146. package/src/migration/VersionUpgrade20.js +4 -4
  147. package/src/types.d.ts +5 -2
  148. package/themes/dark.css +30 -29
  149. package/themes/light.css +4 -2
  150. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -11,6 +11,7 @@ const react_1 = require("react");
11
11
  const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
13
  const SystemStatusInternalApi_1 = require("../Internal/SystemStatusInternalApi");
14
+ const resolveContainerElement_1 = require("../../Utilities/resolveContainerElement");
14
15
  class SystemStatusApiImpl extends ApiBase_1.ApiBase {
15
16
  systemStatusDiv;
16
17
  internalApi;
@@ -31,16 +32,16 @@ class SystemStatusApiImpl extends ApiBase_1.ApiBase {
31
32
  }
32
33
  switch (messageType) {
33
34
  case 'Success':
34
- alertApi.showAlertSuccess('System Status Success', fullMessage);
35
+ alertApi.showAlertSuccess('System Status', fullMessage);
35
36
  return;
36
37
  case 'Info':
37
- alertApi.showAlertInfo('System Status Info', fullMessage);
38
+ alertApi.showAlertInfo('System Status', fullMessage);
38
39
  return;
39
40
  case 'Warning':
40
- alertApi.showAlertWarning('System Status Warning', fullMessage);
41
+ alertApi.showAlertWarning('System Status', fullMessage);
41
42
  return;
42
43
  case 'Error':
43
- alertApi.showAlertError('System Status Error', fullMessage);
44
+ alertApi.showAlertError('System Status', fullMessage);
44
45
  return;
45
46
  }
46
47
  }
@@ -52,11 +53,7 @@ class SystemStatusApiImpl extends ApiBase_1.ApiBase {
52
53
  }
53
54
  displayMessageInDiv(statusMessage, statusFurtherInformation, messageType) {
54
55
  if (!this.systemStatusDiv) {
55
- let optionsDiv = this.getContainerOptions().systemStatusContainer;
56
- if (optionsDiv) {
57
- this.systemStatusDiv =
58
- typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
59
- }
56
+ this.systemStatusDiv = (0, resolveContainerElement_1.resolveContainerElement)(this.getContainerOptions().systemStatusContainer, this.getAdaptableInternalApi().buildBaseContext());
60
57
  }
61
58
  if (this.systemStatusDiv) {
62
59
  if (StringExtensions_1.default.IsNotNullOrEmpty(statusFurtherInformation)) {
@@ -6,6 +6,7 @@ import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
6
6
  import { UserInterfaceApi } from '../UserInterfaceApi';
7
7
  import { ProgressIndicatorConfig } from '../../AdaptableState/Common/ProgressIndicatorConfig';
8
8
  import { ApiBase } from './ApiBase';
9
+ import { UserInterfaceState } from '../../AdaptableState/UserInterfaceState';
9
10
  export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfaceApi {
10
11
  internalApi: UserInterfaceInternalApi;
11
12
  private showProgressIndicatorTimeout;
@@ -26,4 +27,8 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
26
27
  close: () => void;
27
28
  };
28
29
  closeCustomWindowPopup(windowId: string): void;
30
+ getUserInterfaceState(): UserInterfaceState;
31
+ isAdaptableUIVisible(): boolean;
32
+ hideAdaptableUI(): void;
33
+ showAdaptableUI(): void;
29
34
  }
@@ -8,6 +8,7 @@ const WindowPopups_1 = require("../../View/Components/Popups/WindowPopups/Window
8
8
  const UserInterfaceInternalApi_1 = require("../Internal/UserInterfaceInternalApi");
9
9
  const ApiBase_1 = require("./ApiBase");
10
10
  const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
11
+ const UserInterfaceRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/UserInterfaceRedux"));
11
12
  class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
12
13
  internalApi;
13
14
  showProgressIndicatorTimeout = null;
@@ -132,5 +133,17 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
132
133
  closeCustomWindowPopup(windowId) {
133
134
  this.dispatchAction(PopupRedux.PopupHideWindow(windowId));
134
135
  }
136
+ getUserInterfaceState() {
137
+ return this.getAdaptableState().UserInterface;
138
+ }
139
+ isAdaptableUIVisible() {
140
+ return !(this.getUserInterfaceState().HideAdaptableUI ?? false);
141
+ }
142
+ hideAdaptableUI() {
143
+ this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(true));
144
+ }
145
+ showAdaptableUI() {
146
+ this.dispatchAction(UserInterfaceRedux.UserInterfaceSetHideAdaptableUI(false));
147
+ }
135
148
  }
136
149
  exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
@@ -154,8 +154,8 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
154
154
  if (calculatedColumnReferences.length) {
155
155
  const alert = {
156
156
  alertType: 'generic',
157
- header: 'CalculatedColumn could not be deleted',
158
- message: `It is still referenced in the following modules: ${calculatedColumnReferences.join(', ')}`,
157
+ header: 'Calculated Column',
158
+ message: `This Calculated Column cannot be deleted. It is still referenced by: ${calculatedColumnReferences.join(', ')}.`,
159
159
  alertDefinition: (0, ObjectFactory_1.CreateInternalAlertDefinitionForMessages)('Error'),
160
160
  };
161
161
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -99,8 +99,8 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
99
99
  if (freeTextColumnReferences.length) {
100
100
  const alert = {
101
101
  alertType: 'generic',
102
- header: 'FreeTextColumn could not be deleted',
103
- message: `It is still referenced in the following modules: ${freeTextColumnReferences.join(', ')}`,
102
+ header: 'Free Text Column',
103
+ message: `This Free Text Column cannot be deleted. It is still referenced by: ${freeTextColumnReferences.join(', ')}.`,
104
104
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
105
105
  };
106
106
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -96,7 +96,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
96
96
  }
97
97
  setupRowSummaries() {
98
98
  if (!this._adaptable.agGridModulesAdapter.isAgGridModuleRegistered('PinnedRowModule')) {
99
- this.getAdaptableApi().consoleError(`Can NOT set Layout Row Summaries - missing required AG Grid module 'PinnedRowModule'`);
99
+ this.getAdaptableApi().consoleError('Layout Row Summaries require the AG Grid "PinnedRowModule". Please register this module.');
100
100
  return;
101
101
  }
102
102
  const rowSummaries = this.getAdaptableState().Internal?.RowSummary?.rowSummaries ?? [];
@@ -44,8 +44,8 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
44
44
  if (namedQueryReferences.length) {
45
45
  const alert = {
46
46
  alertType: 'generic',
47
- header: 'Named Query could not be deleted',
48
- message: `It is still referenced in the following modules: ${namedQueryReferences.join(', ')}`,
47
+ header: 'Named Query',
48
+ message: `This Named Query cannot be deleted. It is still referenced by: ${namedQueryReferences.join(', ')}.`,
49
49
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
50
50
  };
51
51
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -60,8 +60,8 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
60
60
  if (namedQueryReferences.length) {
61
61
  const alert = {
62
62
  alertType: 'generic',
63
- header: 'Named Query could not be renamed',
64
- message: `It is currently referenced in the following modules: ${namedQueryReferences.join(', ')}`,
63
+ header: 'Named Query',
64
+ message: `This Named Query cannot be renamed. It is currently referenced by: ${namedQueryReferences.join(', ')}.`,
65
65
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
66
66
  };
67
67
  this.getAlertApi().displayAdaptableAlertNotification(alert);
@@ -57,6 +57,12 @@ export interface LayoutApi {
57
57
  */
58
58
  getLayoutByName(layoutName: string): Layout | null;
59
59
  /**
60
+ * Sets (i.e. selects) the Extended Layout
61
+ * @param extendedLayout Extended Layout to set
62
+ */
63
+ setExtendedLayout(extendedLayout: ExtendedLayout): void;
64
+ /**
65
+ *
60
66
  * Retrieves Layout with the given name
61
67
  * @param layoutName Layout to retrieve
62
68
  * @returns layout
@@ -20,6 +20,12 @@ export interface PlusMinusApi {
20
20
  * @returns plus minus rule
21
21
  */
22
22
  getPlusMinusById(id: PlusMinusNudge['Uuid'], config?: LayoutExtendedConfig): PlusMinusNudge;
23
+ /**
24
+ * Retrieves a Plus Minus Nudge by its Name
25
+ * @param name Name of the Plus Minus Nudge
26
+ * @returns Plus Minus Nudge or undefined if not found
27
+ */
28
+ getPlusMinusNudgeByName(name: string): PlusMinusNudge | undefined;
23
29
  /**
24
30
  * Retrieves all active (not-suspended) Plus Minus Rules in Adaptable State with those with expressions first
25
31
  * @returns plus minus rules
@@ -23,6 +23,12 @@ export interface ScheduleApi {
23
23
  * @returns schedule
24
24
  */
25
25
  getScheduleById(id: BaseSchedule['Uuid'], config?: LayoutExtendedConfig): BaseSchedule;
26
+ /**
27
+ * Retrieves a Schedule by its Name
28
+ * @param name Name of the Schedule
29
+ * @returns Schedule or undefined if not found
30
+ */
31
+ getScheduleByName(name: string): BaseSchedule | undefined;
26
32
  /**
27
33
  * Retrieves all Reminder-based Schedules from Schedule State
28
34
  * @returns reminder schedules
@@ -19,6 +19,12 @@ export interface ShortcutApi {
19
19
  * @returns shortcut
20
20
  */
21
21
  getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;
22
+ /**
23
+ * Retrieves a Shortcut by its Name
24
+ * @param name Name of the Shortcut
25
+ * @returns Shortcut or undefined if not found
26
+ */
27
+ getShortcutByName(name: string): Shortcut | undefined;
22
28
  /**
23
29
  * Gets all active (not-suspended) Shortcuts in Adaptable State
24
30
  * @returns shortcuts
@@ -3,6 +3,7 @@ import { AdaptableObject, AdaptableObjectTag } from '../AdaptableState/Common/Ad
3
3
  import { AdaptableModule, CustomIcon } from '../types';
4
4
  import { CustomWindowConfig } from '../AdaptableState/Common/CustomWindowConfig';
5
5
  import { ProgressIndicatorConfig } from '../AdaptableState/Common/ProgressIndicatorConfig';
6
+ import { UserInterfaceState } from '../AdaptableState/UserInterfaceState';
6
7
  /**
7
8
  * Functions relating to User Interface section of Adaptable State
8
9
  */
@@ -78,4 +79,20 @@ export interface UserInterfaceApi {
78
79
  * @param windowId window popup id
79
80
  */
80
81
  closeCustomWindowPopup(windowId: string): void;
82
+ /**
83
+ * Retrieves the current User Interface State
84
+ */
85
+ getUserInterfaceState(): UserInterfaceState;
86
+ /**
87
+ * Returns whether the AdapTable UI is currently visible
88
+ */
89
+ isAdaptableUIVisible(): boolean;
90
+ /**
91
+ * Hides all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
92
+ */
93
+ hideAdaptableUI(): void;
94
+ /**
95
+ * Shows all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
96
+ */
97
+ showAdaptableUI(): void;
81
98
  }
@@ -1,5 +1,9 @@
1
1
  import { FormatColumnState, FormatColumn } from '../../AdaptableState/FormatColumnState';
2
2
  import * as Redux from 'redux';
3
+ /**
4
+ * @ReduxAction Many Format Columns have been added
5
+ */
6
+ export declare const FORMAT_COLUMN_ADD_BATCH = "FORMAT_COLUMN_ADD_BATCH";
3
7
  /**
4
8
  * @ReduxAction A Format Column has been added
5
9
  */
@@ -44,6 +48,9 @@ export declare const FORMAT_COLUMN_UNSUSPEND = "FORMAT_COLUMN_UNSUSPEND";
44
48
  * @ReduxAction FormatColumn Module is unsuspended, or activated
45
49
  */
46
50
  export declare const FORMAT_COLUMN_UNSUSPEND_ALL = "FORMAT_COLUMN_UNSUSPEND_ALL";
51
+ export interface FormatColumnAddBatchAction extends Redux.Action {
52
+ formatColumns: FormatColumn[];
53
+ }
47
54
  export interface FormatColumnAction extends Redux.Action {
48
55
  formatColumn: FormatColumn;
49
56
  }
@@ -70,6 +77,7 @@ export interface FormatColumnUnSuspendAllAction extends Redux.Action {
70
77
  export interface FormatColumnReadyAction extends Redux.Action {
71
78
  formatColumnState: FormatColumnState;
72
79
  }
80
+ export declare const FormatColumnsAdd: (formatColumns: FormatColumn[]) => FormatColumnAddBatchAction;
73
81
  export declare const FormatColumnAdd: (formatColumn: FormatColumn) => FormatColumnAddAction;
74
82
  export declare const FormatColumnEdit: (formatColumn: FormatColumn) => FormatColumnEditAction;
75
83
  export declare const FormatColumnDelete: (formatColumn: FormatColumn) => FormatColumnDeleteAction;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspendAll = exports.FormatColumnSuspendAll = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnMoveDown = exports.FormatColumnMoveUp = exports.FormatColumnDeleteAll = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FORMAT_COLUMN_UNSUSPEND_ALL = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND_ALL = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE_ALL = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_MOVE_DOWN = exports.FORMAT_COLUMN_MOVE_UP = exports.FORMAT_COLUMN_ADD = void 0;
3
+ exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspendAll = exports.FormatColumnSuspendAll = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnMoveDown = exports.FormatColumnMoveUp = exports.FormatColumnDeleteAll = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FormatColumnsAdd = exports.FORMAT_COLUMN_UNSUSPEND_ALL = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND_ALL = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE_ALL = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_MOVE_DOWN = exports.FORMAT_COLUMN_MOVE_UP = exports.FORMAT_COLUMN_ADD = exports.FORMAT_COLUMN_ADD_BATCH = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
6
6
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
7
7
  const utils_1 = require("./utils");
8
+ /**
9
+ * @ReduxAction Many Format Columns have been added
10
+ */
11
+ exports.FORMAT_COLUMN_ADD_BATCH = 'FORMAT_COLUMN_ADD_BATCH';
8
12
  /**
9
13
  * @ReduxAction A Format Column has been added
10
14
  */
@@ -49,6 +53,11 @@ exports.FORMAT_COLUMN_UNSUSPEND = 'FORMAT_COLUMN_UNSUSPEND';
49
53
  * @ReduxAction FormatColumn Module is unsuspended, or activated
50
54
  */
51
55
  exports.FORMAT_COLUMN_UNSUSPEND_ALL = 'FORMAT_COLUMN_UNSUSPEND_ALL';
56
+ const FormatColumnsAdd = (formatColumns) => ({
57
+ type: exports.FORMAT_COLUMN_ADD_BATCH,
58
+ formatColumns,
59
+ });
60
+ exports.FormatColumnsAdd = FormatColumnsAdd;
52
61
  const FormatColumnAdd = (formatColumn) => ({
53
62
  type: exports.FORMAT_COLUMN_ADD,
54
63
  formatColumn,
@@ -107,6 +116,13 @@ const initialState = {
107
116
  const FormatColumnReducer = (state = initialState, action) => {
108
117
  let formatColumns;
109
118
  switch (action.type) {
119
+ case exports.FORMAT_COLUMN_ADD_BATCH: {
120
+ const actionFormatColumns = action.formatColumns;
121
+ actionFormatColumns.forEach(AdaptableHelper_1.default.addAdaptableObjectPrimitives);
122
+ formatColumns = [].concat(state.FormatColumns);
123
+ formatColumns.push(...actionFormatColumns);
124
+ return { ...state, FormatColumns: formatColumns };
125
+ }
110
126
  case exports.FORMAT_COLUMN_ADD: {
111
127
  const actionFormatColumn = action.formatColumn;
112
128
  AdaptableHelper_1.default.addAdaptableObjectPrimitives(actionFormatColumn);
@@ -0,0 +1,11 @@
1
+ import * as Redux from 'redux';
2
+ import { UserInterfaceState } from '../../AdaptableState/UserInterfaceState';
3
+ /**
4
+ * @ReduxAction Sets whether all AdapTable UI elements are hidden
5
+ */
6
+ export declare const USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = "USER_INTERFACE_SET_HIDE_ADAPTABLE_UI";
7
+ export interface UserInterfaceSetHideAdaptableUIAction extends Redux.Action {
8
+ hideAdaptableUI: boolean;
9
+ }
10
+ export declare const UserInterfaceSetHideAdaptableUI: (hideAdaptableUI: boolean) => UserInterfaceSetHideAdaptableUIAction;
11
+ export declare const UserInterfaceReducer: Redux.Reducer<UserInterfaceState>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserInterfaceReducer = exports.UserInterfaceSetHideAdaptableUI = exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = void 0;
4
+ /**
5
+ * @ReduxAction Sets whether all AdapTable UI elements are hidden
6
+ */
7
+ exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI = 'USER_INTERFACE_SET_HIDE_ADAPTABLE_UI';
8
+ const UserInterfaceSetHideAdaptableUI = (hideAdaptableUI) => ({
9
+ type: exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI,
10
+ hideAdaptableUI,
11
+ });
12
+ exports.UserInterfaceSetHideAdaptableUI = UserInterfaceSetHideAdaptableUI;
13
+ const initialState = {
14
+ HideAdaptableUI: false,
15
+ };
16
+ const UserInterfaceReducer = (state = initialState, action) => {
17
+ switch (action.type) {
18
+ case exports.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI:
19
+ return Object.assign({}, state, {
20
+ HideAdaptableUI: action.hideAdaptableUI,
21
+ });
22
+ default:
23
+ return state;
24
+ }
25
+ };
26
+ exports.UserInterfaceReducer = UserInterfaceReducer;
@@ -42,6 +42,7 @@ const InternalRedux = tslib_1.__importStar(require("../ActionsReducers/InternalR
42
42
  const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSharingRedux"));
43
43
  const ThemeRedux = tslib_1.__importStar(require("../ActionsReducers/ThemeRedux"));
44
44
  const ToolPanelRedux = tslib_1.__importStar(require("../ActionsReducers/ToolPanelRedux"));
45
+ const UserInterfaceRedux = tslib_1.__importStar(require("../ActionsReducers/UserInterfaceRedux"));
45
46
  const devTools_1 = require("../../devTools");
46
47
  const TeamSharingState_1 = require("../../AdaptableState/TeamSharingState");
47
48
  const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
@@ -127,6 +128,7 @@ class AdaptableStore {
127
128
  TeamSharing: TeamSharingRedux.TeamSharingReducer,
128
129
  Theme: ThemeRedux.ThemeReducer,
129
130
  ToolPanel: ToolPanelRedux.ToolPanelReducer,
131
+ UserInterface: UserInterfaceRedux.UserInterfaceReducer,
130
132
  };
131
133
  // allow plugins to participate in the root reducer
132
134
  adaptable.forPlugins((plugin) => {
@@ -260,7 +262,7 @@ class AdaptableStore {
260
262
  // END STATE LOAD
261
263
  this.loadStorageInProgress = false;
262
264
  }, (e) => {
263
- adaptable.api.consoleError('Failed to load previous Adaptable State : ', e);
265
+ adaptable.api.consoleError('Failed to load saved Adaptable state.', e);
264
266
  //for now i'm still initializing Adaptable even if loading state has failed....
265
267
  //we may revisit that later
266
268
  this.TheStore.dispatch((0, exports.InitState)());
@@ -269,7 +271,7 @@ class AdaptableStore {
269
271
  this.TheStore.dispatch(PopupRedux.PopupShowAlert({
270
272
  alertType: 'generic',
271
273
  header: 'Configuration',
272
- message: 'Error loading your configuration:' + e,
274
+ message: 'Failed to load your configuration: ' + e,
273
275
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
274
276
  }));
275
277
  }));
@@ -588,6 +590,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
588
590
  * Action: We set up all columns again
589
591
  */
590
592
  case QuickSearchRedux.QUICK_SEARCH_SET_CELL_MATCHING_STYLE:
593
+ case FormatColumnRedux.FORMAT_COLUMN_ADD_BATCH:
591
594
  case FormatColumnRedux.FORMAT_COLUMN_ADD:
592
595
  case FormatColumnRedux.FORMAT_COLUMN_EDIT:
593
596
  case FormatColumnRedux.FORMAT_COLUMN_DELETE:
@@ -998,6 +1001,31 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
998
1001
  module.setUpScheduleJobs();
999
1002
  return returnAction;
1000
1003
  }
1004
+ /*******************
1005
+ * USER INTERFACE ACTIONS
1006
+ *******************/
1007
+ case UserInterfaceRedux.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI: {
1008
+ const returnAction = next(action);
1009
+ const { hideAdaptableUI } = action;
1010
+ // Hide or show Dashboard
1011
+ middlewareAPI.dispatch(DashboardRedux.DashboardSetIsHidden(hideAdaptableUI));
1012
+ // Hide or show Adaptable ToolPanel in the AG Grid sidebar
1013
+ if (hideAdaptableUI) {
1014
+ adaptable.hideAdaptableToolPanel();
1015
+ }
1016
+ else {
1017
+ adaptable.showAdaptableToolPanel();
1018
+ }
1019
+ // Hide or show Adaptable StatusBar panels
1020
+ if (hideAdaptableUI) {
1021
+ adaptable.hideAdaptableStatusBar();
1022
+ }
1023
+ else {
1024
+ adaptable.showAdaptableStatusBar();
1025
+ }
1026
+ // Column and Context Menus are handled in the AgGridMenuAdapter
1027
+ return returnAction;
1028
+ }
1001
1029
  /*******************
1002
1030
  * DASHBOARD ACTIONS
1003
1031
  *******************/
@@ -1320,7 +1348,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1320
1348
  const alert = {
1321
1349
  alertType: 'generic',
1322
1350
  header: 'Team Sharing',
1323
- message: "Couldn't get shared items: " + error.message,
1351
+ message: 'Failed to retrieve shared items: ' + error.message,
1324
1352
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1325
1353
  };
1326
1354
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1390,7 +1418,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1390
1418
  const alert = {
1391
1419
  alertType: 'generic',
1392
1420
  header: 'Team Sharing',
1393
- message: `Couldn't share ${adaptable.ModuleService.getModuleFriendlyName(Module)}, there is already an existing active share for it: ${existingActiveSharedEntity.Description}`,
1421
+ message: `Cannot share ${adaptable.ModuleService.getModuleFriendlyName(Module)} an active share already exists: ${existingActiveSharedEntity.Description}.`,
1394
1422
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1395
1423
  };
1396
1424
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1414,7 +1442,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1414
1442
  const alert = {
1415
1443
  alertType: 'generic',
1416
1444
  header: 'Team Sharing',
1417
- message: `${adaptable.ModuleService.getModuleFriendlyName(Module)} Shared Successfully`,
1445
+ message: `${adaptable.ModuleService.getModuleFriendlyName(Module)} shared successfully.`,
1418
1446
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
1419
1447
  };
1420
1448
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1425,7 +1453,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1425
1453
  const alert = {
1426
1454
  alertType: 'generic',
1427
1455
  header: 'Team Sharing',
1428
- message: "Couldn't share item: " + error.message,
1456
+ message: 'Failed to share item: ' + error.message,
1429
1457
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1430
1458
  };
1431
1459
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1450,10 +1478,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1450
1478
  if (sharedEntityDependants.length) {
1451
1479
  const alert = {
1452
1480
  alertType: 'generic',
1453
- header: `Cannot remove the shared item as it is referenced in:`,
1454
- message: sharedEntityDependants
1455
- .map((sharedEntity) => `${adaptable.ModuleService.getModuleFriendlyName(sharedEntity.Module)} ${sharedEntity.Description}`)
1456
- .join('\n'),
1481
+ header: 'Team Sharing',
1482
+ message: 'Cannot remove this shared item. It is referenced by: ' +
1483
+ sharedEntityDependants
1484
+ .map((sharedEntity) => `${adaptable.ModuleService.getModuleFriendlyName(sharedEntity.Module)} ${sharedEntity.Description}`)
1485
+ .join(', '),
1457
1486
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Warning'),
1458
1487
  };
1459
1488
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1470,7 +1499,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1470
1499
  const alert = {
1471
1500
  alertType: 'generic',
1472
1501
  header: 'Team Sharing',
1473
- message: "Couldn't remove item: " + error.message,
1502
+ message: 'Failed to remove shared item: ' + error.message,
1474
1503
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1475
1504
  };
1476
1505
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1492,8 +1521,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1492
1521
  !adaptable.api.optionsApi.getTeamSharingOptions().suppressOverrideConfigWarning) {
1493
1522
  let confirmation = {
1494
1523
  CancelButtonText: 'Cancel Import',
1495
- Header: 'Overwriting Existing Object',
1496
- Msg: 'This import will overwrite an existing object in your State. Do you wish to continue?',
1524
+ Header: 'Overwrite Existing Item',
1525
+ Msg: 'This import will overwrite an existing item in your configuration. Do you wish to continue?',
1497
1526
  ConfirmButtonText: 'Import',
1498
1527
  CancelAction: null,
1499
1528
  ConfirmAction: processImportAction,
@@ -1539,7 +1568,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1539
1568
  const alert = {
1540
1569
  alertType: 'generic',
1541
1570
  header: 'Team Sharing',
1542
- message: `Item Successfully Imported`,
1571
+ message: 'Item imported successfully.',
1543
1572
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Success'),
1544
1573
  };
1545
1574
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1579,7 +1608,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1579
1608
  const alert = {
1580
1609
  alertType: 'generic',
1581
1610
  header: 'Team Sharing',
1582
- message: "Couldn't update active item: " + error.message,
1611
+ message: 'Failed to update shared item: ' + error.message,
1583
1612
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1584
1613
  };
1585
1614
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -1600,7 +1629,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1600
1629
  const alert = {
1601
1630
  alertType: 'generic',
1602
1631
  header: 'Team Sharing',
1603
- message: "Couldn't check for updates: " + error.message,
1632
+ message: 'Failed to check for updates: ' + error.message,
1604
1633
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
1605
1634
  };
1606
1635
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
@@ -43,8 +43,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
43
43
  IsValid: false,
44
44
  Alert: {
45
45
  alertType: 'generic',
46
- header: 'Bulk Update Error',
47
- message: 'Cannot edit while Grid is in Pivot Mode.',
46
+ header: 'Bulk Update',
47
+ message: 'Editing is not available in Pivot Mode.',
48
48
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
49
49
  },
50
50
  };
@@ -54,8 +54,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
54
54
  IsValid: false,
55
55
  Alert: {
56
56
  alertType: 'generic',
57
- header: 'Bulk Update Error',
58
- message: 'No cells are selected.\nPlease select some cells.',
57
+ header: 'Bulk Update',
58
+ message: 'No cells selected. Please select one or more cells to continue.',
59
59
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
60
60
  },
61
61
  };
@@ -65,8 +65,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
65
65
  IsValid: false,
66
66
  Alert: {
67
67
  alertType: 'generic',
68
- header: 'Bulk Update Error',
69
- message: 'Bulk Update only supports single column edit.\nPlease adjust cell selection.',
68
+ header: 'Bulk Update',
69
+ message: 'Bulk Update supports editing a single column at a time. Please adjust your selection.',
70
70
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
71
71
  },
72
72
  };
@@ -78,8 +78,8 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
78
78
  IsValid: false,
79
79
  Alert: {
80
80
  alertType: 'generic',
81
- header: 'Bulk Update Error',
82
- message: 'Bulk Update is not permitted on readonly cells.\nPlease adjust the cell selection.',
81
+ header: 'Bulk Update',
82
+ message: 'Bulk Update is not available for read-only cells. Please adjust your selection.',
83
83
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
84
84
  },
85
85
  };
@@ -190,7 +190,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
190
190
  failedMessages.push(failedMessage);
191
191
  }
192
192
  });
193
- this.api.alertApi.showAlertError('Nudge(s) failed rule', failedMessages.toString());
193
+ this.api.alertApi.showAlertError('Plus/Minus', 'One or more nudge values were rejected by validation rules: ' + failedMessages.toString());
194
194
  }
195
195
  }
196
196
  getTeamSharingAction() {
@@ -28,7 +28,7 @@ class QuickSearchModule extends AdaptableModuleBase_1.AdaptableModuleBase {
28
28
  // Check for AG Grid QuickFilterModule if running Filter After Quick Search
29
29
  if (api.optionsApi.getQuickSearchOptions().filterGridAfterQuickSearch) {
30
30
  if (!api.internalApi.getAgGridModulesAdapter().isAgGridModuleRegistered('QuickFilterModule')) {
31
- api.consoleError('The AG Grid "GridFilter" Module is required if running Quick Search as Filter; Quick Search will run but no Filters will be applied');
31
+ api.consoleError('Quick Search with filterGridAfterQuickSearch requires the AG Grid "QuickFilterModule". Quick Search will run but grid filters will not be applied.');
32
32
  }
33
33
  }
34
34
  const isServerSideRowModel = agGridApi.getGridOption('rowModelType') === 'serverSide';
@@ -11,15 +11,19 @@ class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
11
11
  super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api);
12
12
  }
13
13
  createColumnMenuItems(column) {
14
- return [
15
- // To do : get the icon and name from settings in case they have changed?
16
- this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
17
- ];
14
+ if (this.isModuleVisible()) {
15
+ return [
16
+ // To do : get the icon and name from settings in case they have changed?
17
+ this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
18
+ ];
19
+ }
18
20
  }
19
21
  createContextMenuItems(menuContext) {
20
- return [
21
- this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
22
- ];
22
+ if (this.isModuleVisible()) {
23
+ return [
24
+ this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
25
+ ];
26
+ }
23
27
  }
24
28
  createModuleMenuItem(source) {
25
29
  if (this.isModuleVisible()) {