@adaptabletools/adaptable 11.1.15 → 11.2.0

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 (196) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +98 -98
  3. package/index.css +3 -0
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
  8. package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
  9. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
  12. package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
  14. package/src/Api/AdaptableApi.d.ts +10 -0
  15. package/src/Api/AlertApi.d.ts +3 -1
  16. package/src/Api/ConditionalStyleApi.d.ts +3 -1
  17. package/src/Api/ConfigApi.d.ts +3 -3
  18. package/src/Api/CustomSortApi.d.ts +3 -1
  19. package/src/Api/EventApi.d.ts +14 -0
  20. package/src/Api/Events/LayoutChanged.d.ts +1 -1
  21. package/src/Api/ExportApi.d.ts +16 -0
  22. package/src/Api/FinanceApi.d.ts +104 -3
  23. package/src/Api/FlashingCellApi.d.ts +3 -1
  24. package/src/Api/FormatColumnApi.d.ts +3 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
  27. package/src/Api/Implementation/AlertApiImpl.d.ts +3 -1
  28. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  29. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  30. package/src/Api/Implementation/ApiBase.js +5 -2
  31. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +3 -1
  32. package/src/Api/Implementation/ConditionalStyleApiImpl.js +5 -4
  33. package/src/Api/Implementation/ConfigApiImpl.js +5 -1
  34. package/src/Api/Implementation/CustomSortApiImpl.d.ts +3 -1
  35. package/src/Api/Implementation/CustomSortApiImpl.js +6 -5
  36. package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/EventApiImpl.js +4 -0
  38. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
  39. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  40. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -1
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
  42. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
  43. package/src/Api/Implementation/FormatColumnApiImpl.js +7 -6
  44. package/src/Api/Implementation/InternalApiImpl.d.ts +14 -5
  45. package/src/Api/Implementation/InternalApiImpl.js +75 -3
  46. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +3 -1
  47. package/src/Api/Implementation/PlusMinusApiImpl.js +6 -8
  48. package/src/Api/Implementation/ScheduleApiImpl.d.ts +17 -6
  49. package/src/Api/Implementation/ScheduleApiImpl.js +25 -12
  50. package/src/Api/Implementation/ShortcutApiImpl.d.ts +3 -1
  51. package/src/Api/Implementation/ShortcutApiImpl.js +5 -4
  52. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +1 -2
  53. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  54. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  55. package/src/Api/InternalApi.d.ts +14 -7
  56. package/src/Api/LayoutApi.d.ts +4 -6
  57. package/src/Api/PlusMinusApi.d.ts +3 -1
  58. package/src/Api/ScheduleApi.d.ts +20 -6
  59. package/src/Api/ShortcutApi.d.ts +3 -1
  60. package/src/Api/ToolPanelApi.d.ts +1 -2
  61. package/src/PredefinedConfig/AlertState.d.ts +3 -3
  62. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
  63. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -1
  64. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
  65. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
  66. package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
  67. package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
  68. package/src/PredefinedConfig/Common/BaseContext.js +2 -0
  69. package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
  70. package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
  71. package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
  72. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
  73. package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
  74. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  75. package/src/PredefinedConfig/SystemState.d.ts +1 -0
  76. package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
  77. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  78. package/src/Redux/ActionsReducers/SystemRedux.js +11 -1
  79. package/src/Redux/Store/AdaptableStore.d.ts +1 -0
  80. package/src/Redux/Store/AdaptableStore.js +6 -1
  81. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  82. package/src/Strategy/AdaptableModuleBase.d.ts +5 -0
  83. package/src/Strategy/AdaptableModuleBase.js +9 -0
  84. package/src/Strategy/AlertModule.d.ts +4 -1
  85. package/src/Strategy/AlertModule.js +12 -4
  86. package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
  87. package/src/Strategy/CalculatedColumnModule.js +2 -0
  88. package/src/Strategy/ConditionalStyleModule.d.ts +4 -1
  89. package/src/Strategy/ConditionalStyleModule.js +12 -4
  90. package/src/Strategy/CustomSortModule.d.ts +4 -1
  91. package/src/Strategy/CustomSortModule.js +10 -3
  92. package/src/Strategy/DataSourceModule.js +2 -0
  93. package/src/Strategy/ExportModule.d.ts +5 -3
  94. package/src/Strategy/ExportModule.js +10 -0
  95. package/src/Strategy/FlashingCellModule.d.ts +4 -1
  96. package/src/Strategy/FlashingCellModule.js +10 -5
  97. package/src/Strategy/FormatColumnModule.d.ts +4 -1
  98. package/src/Strategy/FormatColumnModule.js +10 -3
  99. package/src/Strategy/FreeTextColumnModule.js +2 -0
  100. package/src/Strategy/Interface/IModule.d.ts +6 -3
  101. package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
  102. package/src/Strategy/LayoutModule.d.ts +2 -1
  103. package/src/Strategy/LayoutModule.js +35 -2
  104. package/src/Strategy/PlusMinusModule.d.ts +4 -1
  105. package/src/Strategy/PlusMinusModule.js +15 -7
  106. package/src/Strategy/QueryModule.d.ts +2 -8
  107. package/src/Strategy/QueryModule.js +2 -0
  108. package/src/Strategy/ScheduleModule.d.ts +8 -4
  109. package/src/Strategy/ScheduleModule.js +16 -9
  110. package/src/Strategy/ShortcutModule.d.ts +4 -1
  111. package/src/Strategy/ShortcutModule.js +14 -4
  112. package/src/Strategy/StatusBarModule.d.ts +2 -1
  113. package/src/Strategy/StatusBarModule.js +2 -3
  114. package/src/Strategy/Utilities/getAlertBehaviourViewItems.d.ts +2 -2
  115. package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +2 -2
  116. package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
  117. package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
  118. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  119. package/src/Utilities/Emitter.d.ts +1 -0
  120. package/src/Utilities/Emitter.js +14 -0
  121. package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
  122. package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
  123. package/src/Utilities/ObjectFactory.d.ts +2 -2
  124. package/src/Utilities/Services/AlertService.js +1 -1
  125. package/src/Utilities/Services/DataService.js +1 -1
  126. package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
  127. package/src/Utilities/Services/ModuleService.d.ts +1 -1
  128. package/src/Utilities/Services/ModuleService.js +1 -0
  129. package/src/View/Alert/AlertStatusSubPanel.js +2 -1
  130. package/src/View/Alert/Wizard/AlertWizard.js +9 -0
  131. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -4
  132. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
  133. package/src/View/ColorPicker.d.ts +1 -1
  134. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  135. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  136. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
  137. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  138. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  139. package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
  140. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  141. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  142. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  143. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +22 -0
  144. package/src/View/Components/Popups/AdaptableToaster.js +12 -1
  145. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
  146. package/src/View/Components/TagValueSelector/index.d.ts +13 -0
  147. package/src/View/Components/TagValueSelector/index.js +22 -0
  148. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -2
  149. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
  150. package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
  151. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
  152. package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
  153. package/src/View/Export/ExportSelector.d.ts +4 -0
  154. package/src/View/Export/ExportSelector.js +75 -0
  155. package/src/View/Export/ExportViewPanel.js +6 -7
  156. package/src/View/Export/ReportExportDropdown.d.ts +2 -5
  157. package/src/View/Export/Wizard/NewReportWizard.js +9 -0
  158. package/src/View/Export/constants.d.ts +2 -0
  159. package/src/View/Export/constants.js +5 -0
  160. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
  161. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  162. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
  163. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
  164. package/src/View/GridInfo/GridOptionsComponent.js +0 -1
  165. package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
  166. package/src/View/Layout/LayoutCloneButton.js +15 -0
  167. package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
  168. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  169. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
  170. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  171. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
  172. package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
  173. package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
  174. package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
  175. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  176. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  177. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
  178. package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
  179. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  180. package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
  181. package/src/agGrid/Adaptable.d.ts +14 -1
  182. package/src/agGrid/Adaptable.js +103 -68
  183. package/src/agGrid/agGridHelper.js +2 -1
  184. package/src/agGrid/createAgStatusPanelComponent.js +1 -0
  185. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
  186. package/src/components/Datepicker/index.d.ts +1 -1
  187. package/src/components/ExpressionEditor/index.js +5 -2
  188. package/src/components/Input/index.d.ts +1 -1
  189. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  190. package/src/components/PopupWithFooter.d.ts +1 -1
  191. package/src/components/Textarea/index.d.ts +1 -1
  192. package/src/metamodel/adaptable.metamodel.d.ts +44 -2
  193. package/src/metamodel/adaptable.metamodel.js +235 -21
  194. package/src/types.d.ts +6 -5
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
@@ -13,7 +13,9 @@ export interface FormatColumnApi {
13
13
  * Retrieves all Format Columns in Adaptable State
14
14
  * @returns format columns
15
15
  */
16
- getAllFormatColumn(): FormatColumn[];
16
+ getAllFormatColumn(config?: {
17
+ includeLayoutNotAssociatedObjects?: boolean;
18
+ }): FormatColumn[];
17
19
  /**
18
20
  * Retrieves Format Column by Id
19
21
  * @param id Format Column id
@@ -79,9 +79,15 @@ export declare class AdaptableApiImpl implements AdaptableApi {
79
79
  dataChangeHistoryApi: DataChangeHistoryApi;
80
80
  chartingApi: ChartingApi;
81
81
  statusBarApi: StatusBarApi;
82
+ private destroyed;
82
83
  constructor(adaptable: IAdaptable);
84
+ /**
85
+ * This is only meant to be called by the Adaptable instance.
86
+ */
87
+ internalDestroySelf(): void;
83
88
  destroy(config?: {
84
89
  unmount: boolean;
85
90
  destroyApi?: boolean;
86
91
  }): void;
92
+ isDestroyed(): boolean;
87
93
  }
@@ -43,6 +43,7 @@ const SettingsPanelApiImpl_1 = require("./SettingsPanelApiImpl");
43
43
  class AdaptableApiImpl {
44
44
  constructor(adaptable) {
45
45
  this.adaptable = adaptable;
46
+ this.destroyed = false;
46
47
  this.adaptable = adaptable;
47
48
  this.applicationApi = new ApplicationApiImpl_1.ApplicationApiImpl(adaptable);
48
49
  this.alertApi = new AlertApiImpl_1.AlertApiImpl(adaptable);
@@ -84,8 +85,60 @@ class AdaptableApiImpl {
84
85
  this.statusBarApi = new StatusBarApiImpl_1.StatusBarApiImpl(adaptable);
85
86
  this.internalApi = new InternalApiImpl_1.InternalApiImpl(adaptable);
86
87
  }
88
+ /**
89
+ * This is only meant to be called by the Adaptable instance.
90
+ */
91
+ internalDestroySelf() {
92
+ if (this.destroyed) {
93
+ return;
94
+ }
95
+ this.destroyed = true;
96
+ this.eventApi.destroy();
97
+ this.alertApi = null;
98
+ this.applicationApi = null;
99
+ this.bulkUpdateApi = null;
100
+ this.calculatedColumnApi = null;
101
+ this.cellSummaryApi = null;
102
+ this.chartingApi = null;
103
+ this.columnApi = null;
104
+ this.conditionalStyleApi = null;
105
+ this.configApi = null;
106
+ this.customSortApi = null;
107
+ this.dashboardApi = null;
108
+ this.dataChangeHistoryApi = null;
109
+ this.dataSourceApi = null;
110
+ this.eventApi = null;
111
+ this.exportApi = null;
112
+ this.filterApi = null;
113
+ this.flashingCellApi = null;
114
+ this.formatColumnApi = null;
115
+ this.freeTextColumnApi = null;
116
+ this.gridApi = null;
117
+ this.internalApi = null;
118
+ this.layoutApi = null;
119
+ this.pluginsApi = null;
120
+ this.plusMinusApi = null;
121
+ this.predicateApi = null;
122
+ this.queryApi = null;
123
+ this.queryLanguageApi = null;
124
+ this.quickSearchApi = null;
125
+ this.scheduleApi = null;
126
+ this.scopeApi = null;
127
+ this.settingsPanelApi = null;
128
+ this.shortcutApi = null;
129
+ this.smartEditApi = null;
130
+ this.statusBarApi = null;
131
+ this.systemStatusApi = null;
132
+ this.teamSharingApi = null;
133
+ this.themeApi = null;
134
+ this.toolPanelApi = null;
135
+ this.userInterfaceApi = null;
136
+ }
87
137
  destroy(config) {
88
138
  this.adaptable.destroy(config);
89
139
  }
140
+ isDestroyed() {
141
+ return this.destroyed;
142
+ }
90
143
  }
91
144
  exports.AdaptableApiImpl = AdaptableApiImpl;
@@ -12,7 +12,9 @@ import { GridDataChangedInfo } from '../Events/GridDataChanged';
12
12
  export declare class AlertApiImpl extends ApiBase implements AlertApi {
13
13
  getAlertState(): AlertState;
14
14
  getAdaptableFormByName(name: string): AdaptableForm<AlertButtonContext> | undefined;
15
- getAlertDefinitions(): AlertDefinition[];
15
+ getAlertDefinitions(config?: {
16
+ includeLayoutNotAssociatedObjects?: boolean;
17
+ }): AlertDefinition[];
16
18
  getAlertDefinitionById(id: AlertDefinition['Uuid']): AlertDefinition;
17
19
  getNonReactiveAlertDefinitions(): AlertDefinition[];
18
20
  getActiveNonReactiveAlertDefinitions(): AlertDefinition[];
@@ -20,21 +20,22 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
20
20
  const alertForms = this.getAlertOptions().alertForms || [];
21
21
  return (_a = alertForms.find((f) => f.name === name)) === null || _a === void 0 ? void 0 : _a.form;
22
22
  }
23
- getAlertDefinitions() {
24
- return this.getAlertState().AlertDefinitions;
23
+ getAlertDefinitions(config) {
24
+ var _a, _b;
25
+ return ((_b = (_a = this.getAlertState().AlertDefinitions) === null || _a === void 0 ? void 0 : _a.filter((alertDefinition) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
26
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(alertDefinition, 'Alert'))) !== null && _b !== void 0 ? _b : []);
25
27
  }
26
28
  getAlertDefinitionById(id) {
27
- var _a;
28
- return (_a = this.getAlertDefinitions()) === null || _a === void 0 ? void 0 : _a.find((alert) => (alert === null || alert === void 0 ? void 0 : alert.Uuid) === id);
29
+ return this.getAlertDefinitions().find((alert) => (alert === null || alert === void 0 ? void 0 : alert.Uuid) === id);
29
30
  }
30
31
  getNonReactiveAlertDefinitions() {
31
- return this.getAlertState().AlertDefinitions.filter((alertDef) => !AdaptableQuery_1.isReactiveQuery(alertDef.Rule));
32
+ return this.getAlertDefinitions().filter((alertDef) => !AdaptableQuery_1.isReactiveQuery(alertDef.Rule));
32
33
  }
33
34
  getActiveNonReactiveAlertDefinitions() {
34
35
  return this.getNonReactiveAlertDefinitions().filter((alertDef) => !alertDef.IsSuspended);
35
36
  }
36
37
  getReactiveAlertDefinitions() {
37
- return this.getAlertState().AlertDefinitions.filter((alertDef) => AdaptableQuery_1.isReactiveQuery(alertDef.Rule));
38
+ return this.getAlertDefinitions().filter((alertDef) => AdaptableQuery_1.isReactiveQuery(alertDef.Rule));
38
39
  }
39
40
  getActiveReactiveAlertDefinitions() {
40
41
  return this.getReactiveAlertDefinitions().filter((alertDef) => !alertDef.IsSuspended);
@@ -43,7 +43,7 @@ export declare abstract class ApiBase {
43
43
  getAdaptableState(): AdaptableState;
44
44
  protected addUidToAdaptableObject(adaptableObject: AdaptableObject): void;
45
45
  protected getModuleInfoByModuleId(module: AdaptableModule): ModuleInfo;
46
- protected showModulePopup(module: AdaptableModule, popupParams?: ModuleParams): void;
46
+ protected showModulePopup(module: AdaptableModule, moduleParams?: ModuleParams): void;
47
47
  protected getOptions(): AdaptableOptions;
48
48
  protected getContainerOptions(): ContainerOptions;
49
49
  protected getNotificationsOptions(): NotificationsOptions;
@@ -42,6 +42,9 @@ class ApiBase {
42
42
  * @param action the Redux Action to be dispatched
43
43
  */
44
44
  dispatchAction(action) {
45
+ if (this.adaptable.isDestroyed) {
46
+ return;
47
+ }
45
48
  this.adaptable.adaptableStore.TheStore.dispatch(action);
46
49
  }
47
50
  /**
@@ -62,10 +65,10 @@ class ApiBase {
62
65
  getModuleInfoByModuleId(module) {
63
66
  return this.adaptable.ModuleService.getModuleInfoByModule(module);
64
67
  }
65
- showModulePopup(module, popupParams) {
68
+ showModulePopup(module, moduleParams) {
66
69
  let moduleInfo = this.getModuleInfoByModuleId(module);
67
70
  if (moduleInfo) {
68
- this.adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, popupParams);
71
+ this.adaptable.api.internalApi.showPopupScreen(moduleInfo.ModuleName, moduleInfo.Popup, moduleParams);
69
72
  }
70
73
  }
71
74
  getOptions() {
@@ -5,7 +5,9 @@ import { AdaptableColumn, AdaptableScope } from '../../types';
5
5
  import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
6
6
  export declare class ConditionalStyleApiImpl extends ApiBase implements ConditionalStyleApi {
7
7
  getConditionalStyleState(): ConditionalStyleState;
8
- getAllConditionalStyle(): ConditionalStyle[];
8
+ getAllConditionalStyle(config?: {
9
+ includeLayoutNotAssociatedObjects?: boolean;
10
+ }): ConditionalStyle[];
9
11
  getAllActiveConditionalStyle(): ConditionalStyle[];
10
12
  getConditionalStyleById(id: ConditionalStyle['Uuid']): ConditionalStyle;
11
13
  getAllSuspendedConditionalStyle(): ConditionalStyle[];
@@ -9,15 +9,16 @@ class ConditionalStyleApiImpl extends ApiBase_1.ApiBase {
9
9
  getConditionalStyleState() {
10
10
  return this.getAdaptableState().ConditionalStyle;
11
11
  }
12
- getAllConditionalStyle() {
13
- return this.getConditionalStyleState().ConditionalStyles;
12
+ getAllConditionalStyle(config) {
13
+ var _a, _b;
14
+ return ((_b = (_a = this.getConditionalStyleState().ConditionalStyles) === null || _a === void 0 ? void 0 : _a.filter((conditionalStyle) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(conditionalStyle, 'ConditionalStyle'))) !== null && _b !== void 0 ? _b : []);
14
16
  }
15
17
  getAllActiveConditionalStyle() {
16
18
  return this.getAllConditionalStyle().filter((style) => !style.IsSuspended);
17
19
  }
18
20
  getConditionalStyleById(id) {
19
- var _a;
20
- return (_a = this.getAllConditionalStyle()) === null || _a === void 0 ? void 0 : _a.find((conditionalStyle) => (conditionalStyle === null || conditionalStyle === void 0 ? void 0 : conditionalStyle.Uuid) === id);
21
+ return this.getAllConditionalStyle().find((conditionalStyle) => (conditionalStyle === null || conditionalStyle === void 0 ? void 0 : conditionalStyle.Uuid) === id);
21
22
  }
22
23
  getAllSuspendedConditionalStyle() {
23
24
  return this.getAllConditionalStyle().filter((style) => style.IsSuspended);
@@ -79,7 +79,11 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
79
79
  return Object.values(this.getPersistedState());
80
80
  }
81
81
  loadUserState(state) {
82
- this.reloadPredefinedConfig(state);
82
+ const adaptableOptions = this.adaptable.adaptableOptions;
83
+ this.setAdaptableStateKey(adaptableOptions.adaptableStateKey, {
84
+ predefinedConfig: state || adaptableOptions.predefinedConfig,
85
+ flushCurrentState: false,
86
+ });
83
87
  }
84
88
  getAdaptableSearchState() {
85
89
  const currentQuery = this.adaptable.api.queryApi.getCurrentQuery();
@@ -3,7 +3,9 @@ import { CustomSortApi } from '../CustomSortApi';
3
3
  import { CustomSortState, CustomSort } from '../../PredefinedConfig/CustomSortState';
4
4
  export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi {
5
5
  getCustomSortState(): CustomSortState;
6
- getAllCustomSort(): CustomSort[];
6
+ getAllCustomSort(config?: {
7
+ includeLayoutNotAssociatedObjects?: boolean;
8
+ }): CustomSort[];
7
9
  getCustomSortById(id: CustomSort['Uuid']): CustomSort;
8
10
  getAllActiveCustomSort(): CustomSort[];
9
11
  getAllSuspendedCustomSort(): CustomSort[];
@@ -9,12 +9,13 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
9
9
  getCustomSortState() {
10
10
  return this.getAdaptableState().CustomSort;
11
11
  }
12
- getAllCustomSort() {
13
- return this.getAdaptableState().CustomSort.CustomSorts;
12
+ getAllCustomSort(config) {
13
+ var _a, _b;
14
+ return ((_b = (_a = this.getCustomSortState().CustomSorts) === null || _a === void 0 ? void 0 : _a.filter((customSort) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(customSort, 'CustomSort'))) !== null && _b !== void 0 ? _b : []);
14
16
  }
15
17
  getCustomSortById(id) {
16
- var _a;
17
- return (_a = this.getAllCustomSort()) === null || _a === void 0 ? void 0 : _a.find((customSort) => customSort.Uuid === id);
18
+ return this.getAllCustomSort().find((customSort) => customSort.Uuid === id);
18
19
  }
19
20
  getAllActiveCustomSort() {
20
21
  return this.getAllCustomSort().filter((customSort) => !customSort.IsSuspended);
@@ -23,7 +24,7 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
23
24
  return this.getAllCustomSort().filter((customSort) => customSort.IsSuspended);
24
25
  }
25
26
  getCustomSortByColumn(column) {
26
- return this.getAdaptableState().CustomSort.CustomSorts.find((cs) => cs.ColumnId == column);
27
+ return this.getAllCustomSort().find((cs) => cs.ColumnId == column);
27
28
  }
28
29
  addCustomSort(customSort) {
29
30
  this.addUidToAdaptableObject(customSort);
@@ -5,6 +5,7 @@ import { EmitterCallback } from '../../Utilities/Emitter';
5
5
  export declare class EventApiImpl extends ApiBase implements EventApi {
6
6
  private emitter;
7
7
  constructor(adaptable: IAdaptable);
8
+ destroy(): void;
8
9
  on: (eventName: string, callback: EmitterCallback) => (() => void);
9
10
  off: (eventName: string, callback: EmitterCallback) => void;
10
11
  emit: (eventName: string, data?: any) => Promise<any>;
@@ -23,5 +23,9 @@ class EventApiImpl extends ApiBase_1.ApiBase {
23
23
  this.emitSync = (eventName, data) => this.emitter.emitSync(eventName, data);
24
24
  this.emitter = new Emitter_1.default();
25
25
  }
26
+ destroy() {
27
+ this.emitSync('AdaptableDestroy');
28
+ this.emitter.destroy();
29
+ }
26
30
  }
27
31
  exports.EventApiImpl = EventApiImpl;
@@ -12,11 +12,14 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
12
12
  getReportByName(reportName: string): Report | undefined;
13
13
  getReportById(id: Report['Uuid']): Report;
14
14
  getDestinationByName(destinationName: ExportDestination | string): ExportDestination | CustomDestination | undefined;
15
+ getCurrentDestination(): ExportDestination | CustomDestination;
15
16
  getAvailableSystemReports(): SystemReportNames;
16
17
  getAvailableExportDestinations(): ExportDestination[];
17
18
  getAllReports(): Report[];
18
19
  getReportSchedules(): ReportSchedule[];
19
20
  sendReport(reportName: string, destination: 'Excel' | 'CSV' | 'Clipboard' | 'JSON' | string): void;
21
+ selectReport(reportName: string): void;
22
+ selectDestination(destinationName: string): void;
20
23
  getAllCustomDestination(): CustomDestination[];
21
24
  isExportDestinationCustom(destinationName: string): boolean;
22
25
  getExportDestinationForm(destinationName: string): AdaptableForm<ExportButtonContext> | undefined;
@@ -37,6 +37,10 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
37
37
  }
38
38
  return this.getAllCustomDestination().find((destination) => destination.name === destinationName);
39
39
  }
40
+ getCurrentDestination() {
41
+ const currentDestination = this.getExportState().CurrentDestination;
42
+ return currentDestination && this.getDestinationByName(currentDestination);
43
+ }
40
44
  getAvailableSystemReports() {
41
45
  return this.getExportOptions().systemReportNames.filter((s) => this.adaptable.api.internalApi.getReportService().IsSystemReportActive(s));
42
46
  }
@@ -65,6 +69,12 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
65
69
  this.dispatchAction(ExportRedux.ExportApply(report, destination));
66
70
  }
67
71
  }
72
+ selectReport(reportName) {
73
+ this.dispatchAction(ExportRedux.ReportSelect(reportName));
74
+ }
75
+ selectDestination(destinationName) {
76
+ this.dispatchAction(ExportRedux.DestinationSelect(destinationName));
77
+ }
68
78
  getAllCustomDestination() {
69
79
  var _a;
70
80
  return (_a = this.getExportOptions().customDestinations) !== null && _a !== void 0 ? _a : [];
@@ -6,8 +6,10 @@ import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePr
6
6
  import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
7
7
  export declare class FlashingCellApiImpl extends ApiBase implements FlashingCellApi {
8
8
  getFlashingCellState(): FlashingCellState;
9
+ getFlashingCellDefinitions(config?: {
10
+ includeLayoutNotAssociatedObjects?: boolean;
11
+ }): FlashingCellDefinition[];
9
12
  mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
10
- getFlashingCellDefinitions(): FlashingCellDefinition[];
11
13
  getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid']): FlashingCellDefinition;
12
14
  getActiveFlashingCellDefinitions(): FlashingCellDefinition[];
13
15
  getFlashingCellFlashTarget(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition['FlashTarget'];
@@ -9,6 +9,14 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
9
9
  getFlashingCellState() {
10
10
  return this.getAdaptableState().FlashingCell;
11
11
  }
12
+ getFlashingCellDefinitions(config) {
13
+ var _a, _b;
14
+ const flashingCellDefinitions = (_b = (_a = this.getFlashingCellState().FlashingCellDefinitions) === null || _a === void 0 ? void 0 : _a.filter((flashingCellDefinition) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(flashingCellDefinition, 'FlashingCell'))) !== null && _b !== void 0 ? _b : [];
16
+ return flashingCellDefinitions.map((flashingCellDefinition) => {
17
+ return this.mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition);
18
+ });
19
+ }
12
20
  mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition) {
13
21
  const flashingDefaults = this.adaptable.adaptableOptions.flashingCellOptions;
14
22
  if (!flashingDefaults) {
@@ -31,12 +39,6 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
31
39
  }
32
40
  return flashingCellDefinition;
33
41
  }
34
- getFlashingCellDefinitions() {
35
- const flashingCellDefinitions = this.getFlashingCellState().FlashingCellDefinitions;
36
- return flashingCellDefinitions.map((flashingCellDefinition) => {
37
- return this.mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition);
38
- });
39
- }
40
42
  getFlashingCellDefinitionById(id) {
41
43
  var _a;
42
44
  return (_a = this.getFlashingCellDefinitions()) === null || _a === void 0 ? void 0 : _a.find((fc) => (fc === null || fc === void 0 ? void 0 : fc.Uuid) === id);
@@ -6,7 +6,9 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
6
6
  import { RowNode } from '@ag-grid-community/all-modules';
7
7
  export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
8
8
  getFormatColumnState(): FormatColumnState;
9
- getAllFormatColumn(): FormatColumn[];
9
+ getAllFormatColumn(config?: {
10
+ includeLayoutNotAssociatedObjects?: boolean;
11
+ }): FormatColumn[];
10
12
  getFormatColumnById(id: FormatColumn['Uuid']): FormatColumn;
11
13
  getAllActiveFormatColumn(): FormatColumn[];
12
14
  getAllSuspendedFormatColumn(): FormatColumn[];
@@ -12,12 +12,13 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
12
12
  getFormatColumnState() {
13
13
  return this.getAdaptableState().FormatColumn;
14
14
  }
15
- getAllFormatColumn() {
16
- return this.getAdaptableState().FormatColumn.FormatColumns;
15
+ getAllFormatColumn(config) {
16
+ var _a, _b;
17
+ return ((_b = (_a = this.getFormatColumnState().FormatColumns) === null || _a === void 0 ? void 0 : _a.filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
18
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(formatColumn, 'FormatColumn'))) !== null && _b !== void 0 ? _b : []);
17
19
  }
18
20
  getFormatColumnById(id) {
19
- var _a;
20
- return (_a = this.getAllFormatColumn()) === null || _a === void 0 ? void 0 : _a.find((formatColumn) => formatColumn.Uuid === id);
21
+ return this.getAllFormatColumn().find((formatColumn) => formatColumn.Uuid === id);
21
22
  }
22
23
  getAllActiveFormatColumn() {
23
24
  return this.getAllFormatColumn().filter((formatColumn) => !formatColumn.IsSuspended);
@@ -57,10 +58,10 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
57
58
  return returnValues;
58
59
  }
59
60
  getAllFormatColumnWithDisplayFormat() {
60
- return this.getAdaptableState().FormatColumn.FormatColumns.filter((fc) => fc.DisplayFormat != null);
61
+ return this.getAllFormatColumn().filter((fc) => fc.DisplayFormat != null);
61
62
  }
62
63
  getAllFormatColumnWithCellAlignment() {
63
- return this.getAdaptableState().FormatColumn.FormatColumns.filter((fc) => fc.CellAlignment != null);
64
+ return this.getAllFormatColumn().filter((fc) => fc.CellAlignment != null);
64
65
  }
65
66
  addFormatColumn(formatColumn) {
66
67
  this.addUidToAdaptableObject(formatColumn);
@@ -11,7 +11,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
11
11
  import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
12
12
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
13
13
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
- import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, Layout, SystemStatusMessageInfo } from '../../types';
14
+ import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo } from '../../types';
15
15
  import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
16
16
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
17
17
  import { IReportService } from '../../Utilities/Services/Interface/IReportService';
@@ -27,13 +27,14 @@ import { RowNode } from '@ag-grid-community/all-modules';
27
27
  import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
28
28
  import { ColumnValuesComparer } from '../../AdaptableOptions/GeneralOptions';
29
29
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
30
- import { AdaptableButton, ButtonContext } from '../../PredefinedConfig/Common/AdaptableButton';
30
+ import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
31
31
  import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
32
32
  import { AlertButtonForm, AlertDefinition } from '../../PredefinedConfig/AlertState';
33
33
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
34
34
  import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFrameworkComponent';
35
35
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
36
36
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
37
+ import { AdaptableObjectTag } from '../../PredefinedConfig/Common/AdaptableObject';
37
38
  export declare class InternalApiImpl extends ApiBase implements InternalApi {
38
39
  getSystemState(): SystemState;
39
40
  getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<AlertButtonContext>, 'buttons'> & {
@@ -107,9 +108,9 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
107
108
  clearGradientColumnState(): void;
108
109
  clearPercentBarState(): void;
109
110
  getCustomSortComparer(column: AdaptableColumn): ColumnValuesComparer | undefined;
110
- getLabelForButton(button: AdaptableButton<ButtonContext>, context: ButtonContext): string | undefined;
111
- getTooltipForButton(button: AdaptableButton<ButtonContext>, context: ButtonContext): string | undefined;
112
- getStyleForButton(button: AdaptableButton<ButtonContext>, context: ButtonContext): ButtonStyle | undefined;
111
+ getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
112
+ getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
113
+ getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
113
114
  isDocumentationLinksDisplayed(): boolean;
114
115
  getQueryPreviewData(): any;
115
116
  waitForTeamSharingImportEnd(): Promise<boolean>;
@@ -121,5 +122,13 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
121
122
  executeWithProgressIndicator(label: string, executeFn: () => void): void;
122
123
  hideProgressIndicator(): void;
123
124
  getCorrectEnglishVariant(wordToSpell: string): string;
125
+ hasLayoutSpecificObjects(): boolean;
126
+ isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule): boolean;
127
+ showLayoutNotAssociatedObjects(): boolean;
128
+ shouldDisplayTagSections(): boolean;
129
+ getAvailableTags(): AdaptableObjectTag[] | undefined;
130
+ private getObjectTags;
131
+ private getLayoutTags;
124
132
  dispatchReduxAction(action: Action): void;
133
+ showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
125
134
  }
@@ -117,10 +117,14 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
117
117
  const { AdaptableFlashingCells: AdaptableFlashingAlerts, AdaptableFlashingCellsMap: AdaptableFlashingAlertsMap, } = this.getSystemState();
118
118
  const forPrimaryKey = (_a = AdaptableFlashingAlerts[primaryKey]) !== null && _a !== void 0 ? _a : {};
119
119
  const toFlashingAlert = (uuid) => { var _a; return uuid ? (_a = AdaptableFlashingAlertsMap[uuid]) !== null && _a !== void 0 ? _a : null : null; };
120
- if (!columnId) {
121
- return toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_CELL_ROW_KEY]);
120
+ const adaptableFlashingCell = columnId
121
+ ? toFlashingAlert(forPrimaryKey[columnId])
122
+ : toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_CELL_ROW_KEY]);
123
+ if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
124
+ !this.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell')) {
125
+ return;
122
126
  }
123
- return toFlashingAlert(forPrimaryKey[columnId]);
127
+ return adaptableFlashingCell;
124
128
  }
125
129
  addSystemStatusMessageInfo(systemStatusMessageInfo) {
126
130
  const maxMessagesInStore = this.getNotificationsOptions().maxSystemMessagesInStore;
@@ -465,9 +469,77 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
465
469
  }
466
470
  return wordToSpell;
467
471
  }
472
+ hasLayoutSpecificObjects() {
473
+ return (typeof this.adaptable.adaptableOptions.layoutOptions.isObjectAvailableInLayout === 'function');
474
+ }
475
+ isObjectAvailableInLayout(object, module) {
476
+ if (!this.hasLayoutSpecificObjects()) {
477
+ return true;
478
+ }
479
+ const context = {
480
+ abObject: object,
481
+ module,
482
+ layout: this.adaptable.api.layoutApi.getCurrentLayout(),
483
+ adaptableApi: this.adaptable.api,
484
+ };
485
+ return this.adaptable.adaptableOptions.layoutOptions.isObjectAvailableInLayout(context);
486
+ }
487
+ showLayoutNotAssociatedObjects() {
488
+ return this.getAdaptableState().System.ShowLayoutNotAssociatedObjects;
489
+ }
490
+ shouldDisplayTagSections() {
491
+ return this.getAvailableTags() != undefined;
492
+ }
493
+ getAvailableTags() {
494
+ const layoutTags = this.getLayoutTags();
495
+ const objectTags = this.getObjectTags();
496
+ if (!layoutTags && !objectTags) {
497
+ return;
498
+ }
499
+ return [...(layoutTags || []), ...(objectTags || [])];
500
+ }
501
+ getObjectTags() {
502
+ if (!this.adaptable.adaptableOptions.userInterfaceOptions.objectTags) {
503
+ return;
504
+ }
505
+ if (Array.isArray(this.adaptable.adaptableOptions.userInterfaceOptions.objectTags)) {
506
+ return this.adaptable.adaptableOptions.userInterfaceOptions.objectTags;
507
+ }
508
+ if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
509
+ // sanitize the provided tags, just to be sure that the user does NOT break the UI
510
+ return this.adaptable.adaptableOptions.userInterfaceOptions
511
+ .objectTags(this.adaptable.api)
512
+ .filter((tag) => (tag === null || tag === void 0 ? void 0 : tag.value) != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined);
513
+ }
514
+ }
515
+ getLayoutTags() {
516
+ if (!this.adaptable.adaptableOptions.layoutOptions.autoGenerateTagsForLayouts) {
517
+ return;
518
+ }
519
+ if (this.adaptable.adaptableOptions.layoutOptions.autoGenerateTagsForLayouts === true) {
520
+ return this.adaptable.api.layoutApi.getAllLayout().map((layout) => {
521
+ return {
522
+ label: layout.Name,
523
+ value: layout.Name,
524
+ };
525
+ });
526
+ }
527
+ if (typeof this.adaptable.adaptableOptions.layoutOptions.autoGenerateTagsForLayouts === 'function') {
528
+ const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.autoGenerateTagsForLayouts({
529
+ layouts: this.adaptable.api.layoutApi.getAllLayout(),
530
+ adaptableApi: this.adaptable.api,
531
+ });
532
+ // sanitize the provided tags, just to be sure that the user does NOT break the UI
533
+ return customGeneratedTags.filter((tag) => (tag === null || tag === void 0 ? void 0 : tag.value) != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined);
534
+ }
535
+ }
468
536
  // General way to get to store from inside Adaptable...
469
537
  dispatchReduxAction(action) {
470
538
  this.dispatchAction(action);
471
539
  }
540
+ // doing it this way to avoid having to expose Module Params which is internal
541
+ showSettingsPanel(module, moduleParams) {
542
+ this.showModulePopup(module, moduleParams);
543
+ }
472
544
  }
473
545
  exports.InternalApiImpl = InternalApiImpl;
@@ -4,7 +4,9 @@ import { PlusMinusApi } from '../PlusMinusApi';
4
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
5
  export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
6
6
  getPlusMinusState(): PlusMinusState;
7
- getAllPlusMinus(): PlusMinusNudge[];
7
+ getAllPlusMinus(config?: {
8
+ includeLayoutNotAssociatedObjects?: boolean;
9
+ }): PlusMinusNudge[];
8
10
  getPlusMinusById(id: PlusMinusNudge['Uuid']): PlusMinusNudge;
9
11
  getAllActivePlusMinus(): PlusMinusNudge[];
10
12
  getAllSuspendedPlusMinus(): PlusMinusNudge[];
@@ -9,16 +9,14 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
9
9
  getPlusMinusState() {
10
10
  return this.getAdaptableState().PlusMinus;
11
11
  }
12
- getAllPlusMinus() {
13
- let returnvalue = [];
14
- // get with expressions
15
- returnvalue.push(...this.getPlusMinusState().PlusMinusNudges.filter((p) => { var _a; return ((_a = p.Rule) === null || _a === void 0 ? void 0 : _a.BooleanExpression) != undefined; }));
16
- returnvalue.push(...this.getPlusMinusState().PlusMinusNudges.filter((p) => p.Rule == undefined));
17
- return returnvalue;
12
+ getAllPlusMinus(config) {
13
+ var _a, _b;
14
+ const layoutSpecificPlusMinusNudges = (_b = (_a = this.getPlusMinusState().PlusMinusNudges) === null || _a === void 0 ? void 0 : _a.filter((plusMinusNudge) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
15
+ this.adaptable.api.internalApi.isObjectAvailableInLayout(plusMinusNudge, 'PlusMinus'))) !== null && _b !== void 0 ? _b : [];
16
+ return layoutSpecificPlusMinusNudges.filter((plusMinusNudge) => plusMinusNudge.Rule == undefined || plusMinusNudge.Rule.BooleanExpression != undefined);
18
17
  }
19
18
  getPlusMinusById(id) {
20
- var _a;
21
- return (_a = this.getAllPlusMinus()) === null || _a === void 0 ? void 0 : _a.find((plusMinus) => (plusMinus === null || plusMinus === void 0 ? void 0 : plusMinus.Uuid) === id);
19
+ return this.getAllPlusMinus().find((plusMinus) => (plusMinus === null || plusMinus === void 0 ? void 0 : plusMinus.Uuid) === id);
22
20
  }
23
21
  getAllActivePlusMinus() {
24
22
  return this.getAllPlusMinus().filter((plusMinusNudge) => !plusMinusNudge.IsSuspended);