@adaptabletools/adaptable 14.0.2 → 14.0.4

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 (216) hide show
  1. package/base.css +7 -1
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +170 -169
  4. package/index.css +76 -62
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableOptions/ActionOptions.d.ts +3 -0
  10. package/src/AdaptableOptions/AdaptablePlugin.d.ts +3 -0
  11. package/src/AdaptableOptions/AdaptablePlugin.js +3 -0
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +6 -5
  13. package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +26 -26
  15. package/src/AdaptableOptions/ExportOptions.d.ts +17 -3
  16. package/src/AdaptableOptions/ExpressionOptions.d.ts +18 -18
  17. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -3
  19. package/src/Api/ActionApi.d.ts +2 -2
  20. package/src/Api/CalculatedColumnApi.d.ts +9 -0
  21. package/src/Api/ChartingApi.d.ts +41 -14
  22. package/src/Api/ColumnApi.d.ts +4 -0
  23. package/src/Api/DataSetApi.d.ts +2 -2
  24. package/src/Api/EventApi.d.ts +15 -1
  25. package/src/Api/Events/ChartStateChangeInfo.d.ts +5 -0
  26. package/src/Api/Events/ChartStateChangeInfo.js +2 -0
  27. package/src/Api/ExportApi.d.ts +5 -0
  28. package/src/Api/FilterApi.d.ts +10 -8
  29. package/src/Api/Implementation/ActionApiImpl.d.ts +1 -1
  30. package/src/Api/Implementation/ActionApiImpl.js +3 -3
  31. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +2 -0
  32. package/src/Api/Implementation/CalculatedColumnApiImpl.js +24 -0
  33. package/src/Api/Implementation/ChartingApiImpl.d.ts +16 -2
  34. package/src/Api/Implementation/ChartingApiImpl.js +54 -2
  35. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  36. package/src/Api/Implementation/ColumnApiImpl.js +3 -0
  37. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -0
  38. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  39. package/src/Api/Implementation/FilterApiImpl.js +0 -2
  40. package/src/Api/Implementation/PredicateApiImpl.d.ts +6 -4
  41. package/src/Api/Implementation/PredicateApiImpl.js +20 -1
  42. package/src/Api/Implementation/QueryApiImpl.js +8 -2
  43. package/src/Api/Internal/AdaptableInternalApi.d.ts +7 -1
  44. package/src/Api/Internal/AdaptableInternalApi.js +2 -1
  45. package/src/Api/Internal/AlertInternalApi.js +1 -1
  46. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  47. package/src/Api/Internal/CalculatedColumnInternalApi.js +9 -0
  48. package/src/Api/Internal/ChartingInternalApi.d.ts +6 -0
  49. package/src/Api/Internal/ChartingInternalApi.js +24 -0
  50. package/src/Api/Internal/FormatColumnInternalApi.d.ts +5 -0
  51. package/src/Api/Internal/FormatColumnInternalApi.js +25 -1
  52. package/src/Api/PredicateApi.d.ts +17 -1
  53. package/src/PredefinedConfig/AlertState.d.ts +5 -2
  54. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +6 -0
  55. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +15 -11
  56. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +6 -0
  57. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  58. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +6 -0
  59. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +15 -0
  60. package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
  61. package/src/PredefinedConfig/Common/Enums.js +1 -0
  62. package/src/PredefinedConfig/Common/FDC3Context.d.ts +3 -0
  63. package/src/PredefinedConfig/Common/Types.d.ts +21 -6
  64. package/src/PredefinedConfig/Common/Types.js +1 -3
  65. package/src/PredefinedConfig/ExportState.d.ts +2 -2
  66. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
  67. package/src/PredefinedConfig/FormatColumnState.d.ts +3 -2
  68. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
  70. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  71. package/src/PredefinedConfig/ThemeState.d.ts +0 -4
  72. package/src/Redux/ActionsReducers/PopupRedux.d.ts +2 -0
  73. package/src/Redux/ActionsReducers/PopupRedux.js +2 -0
  74. package/src/Redux/ActionsReducers/StatusBarRedux.d.ts +2 -2
  75. package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -4
  76. package/src/Redux/Store/AdaptableStore.js +1 -11
  77. package/src/Strategy/AlertModule.js +7 -3
  78. package/src/Strategy/ChartingModule.js +5 -3
  79. package/src/Strategy/ExportModule.d.ts +1 -0
  80. package/src/Strategy/ExportModule.js +43 -0
  81. package/src/Strategy/FlashingCellModule.js +1 -1
  82. package/src/Strategy/FormatColumnModule.js +7 -2
  83. package/src/Strategy/Interface/IModule.d.ts +1 -1
  84. package/src/Strategy/LayoutModule.js +8 -1
  85. package/src/Strategy/StyledColumnModule.js +5 -0
  86. package/src/Strategy/ThemeModule.js +8 -2
  87. package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +2 -2
  88. package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.d.ts +5 -0
  89. package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.js +13 -0
  90. package/src/Strategy/Utilities/getObjectTagsViewItems.js +3 -3
  91. package/src/Utilities/Constants/ModuleConstants.d.ts +0 -3
  92. package/src/Utilities/Constants/ModuleConstants.js +2 -5
  93. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  94. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
  95. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
  96. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
  97. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +64 -3
  98. package/src/Utilities/Interface/MessagePopups.d.ts +1 -0
  99. package/src/Utilities/Services/AggregatedScalarLiveValue.js +13 -0
  100. package/src/Utilities/Services/ChartingService.d.ts +8 -0
  101. package/src/Utilities/Services/ChartingService.js +15 -0
  102. package/src/Utilities/Services/ReportService.js +1 -1
  103. package/src/View/AdaptableViewFactory.js +1 -1
  104. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +5 -4
  105. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +1 -1
  106. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +6 -5
  107. package/src/View/Alert/Utilities/getAlertType.d.ts +15 -0
  108. package/src/View/Alert/Utilities/getAlertType.js +58 -0
  109. package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +3 -0
  110. package/src/View/Alert/Utilities/getAvailablePredicates.js +19 -0
  111. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +37 -0
  112. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +32 -0
  113. package/src/View/Alert/Utilities/mapAlertDefinition.d.ts +2 -0
  114. package/src/View/Alert/Utilities/mapAlertDefinition.js +38 -0
  115. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -2
  116. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +18 -11
  117. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -0
  118. package/src/View/Alert/Wizard/AlertButtonsEditor.js +15 -6
  119. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +10 -0
  120. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +57 -0
  121. package/src/View/Alert/Wizard/{AlertDisplayWizardSection.d.ts → AlertNotificationWizardSection.d.ts} +7 -5
  122. package/src/View/Alert/Wizard/{AlertDisplayWizardSection.js → AlertNotificationWizardSection.js} +12 -50
  123. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +7 -4
  124. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +66 -6
  125. package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -0
  126. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +41 -2
  127. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +9 -0
  128. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +27 -0
  129. package/src/View/Alert/Wizard/AlertWizard.js +53 -98
  130. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +1 -6
  131. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -39
  132. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  133. package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.d.ts +0 -0
  134. package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.js +2 -2
  135. package/src/View/{Components/Charting → Charting}/ChartingViewPanel.d.ts +1 -1
  136. package/src/View/{Components/Charting → Charting}/ChartingViewPanel.js +0 -0
  137. package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.d.ts +2 -2
  138. package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.js +12 -2
  139. package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.d.ts +1 -1
  140. package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.js +2 -2
  141. package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.d.ts +1 -1
  142. package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.js +4 -4
  143. package/src/View/{Components/Charting → Charting}/DeleteChartButton.d.ts +1 -1
  144. package/src/View/{Components/Charting → Charting}/DeleteChartButton.js +3 -3
  145. package/src/View/{Components/Charting → Charting}/EditChartButton.d.ts +1 -1
  146. package/src/View/{Components/Charting → Charting}/EditChartButton.js +3 -3
  147. package/src/View/{Components/Charting → Charting}/ShowChartButton.d.ts +1 -1
  148. package/src/View/{Components/Charting → Charting}/ShowChartButton.js +5 -5
  149. package/src/View/{Components/Charting → Charting}/useChartState.d.ts +1 -1
  150. package/src/View/{Components/Charting → Charting}/useChartState.js +5 -5
  151. package/src/View/{Components/Charting → Charting}/useChartingElements.d.ts +1 -1
  152. package/src/View/{Components/Charting → Charting}/useChartingElements.js +6 -6
  153. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.d.ts +12 -0
  154. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +85 -0
  155. package/src/View/Components/EntityRulesEditor/{PredicatesEditor.d.ts → EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts} +6 -4
  156. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +87 -0
  157. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.d.ts +1 -0
  158. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.js +5 -0
  159. package/src/View/Components/EntityRulesEditor/Utilities.js +7 -1
  160. package/src/View/Components/EntityRulesEditor/index.d.ts +4 -2
  161. package/src/View/Components/EntityRulesEditor/index.js +27 -10
  162. package/src/View/Components/FilterForm/FilterForm.js +6 -7
  163. package/src/View/Components/FilterForm/QuickFilterForm.js +13 -9
  164. package/src/View/Components/NewScopeComponent.d.ts +9 -5
  165. package/src/View/Components/NewScopeComponent.js +19 -10
  166. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +2 -2
  167. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  168. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  169. package/src/View/Components/PredicateEditor/PredicateEditor.js +16 -5
  170. package/src/View/Components/PreviewResultsPanel.js +30 -3
  171. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  172. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -0
  173. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
  174. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  175. package/src/View/Export/ExportTablePopup.d.ts +3 -0
  176. package/src/View/Export/ExportTablePopup.js +59 -0
  177. package/src/View/Export/Wizard/NewReportWizard.js +1 -1
  178. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
  179. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
  180. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
  181. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
  182. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
  183. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  184. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
  185. package/src/View/GridInfo/GridInfoPopup.js +4 -4
  186. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +1 -1
  187. package/src/View/Query/Wizard/NamedQueryWizard.js +1 -1
  188. package/src/View/Schedule/Wizard/ScheduleWizard.js +1 -1
  189. package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
  190. package/src/View/StatusBar/StatusBarPanel.d.ts +3 -4
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +7 -4
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +5 -5
  193. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  194. package/src/View/Theme/ThemeStatusPanelPopover.js +10 -2
  195. package/src/View/Wizard/TypeRadio.d.ts +7 -0
  196. package/src/View/Wizard/TypeRadio.js +12 -0
  197. package/src/agGrid/Adaptable.d.ts +3 -1
  198. package/src/agGrid/Adaptable.js +28 -4
  199. package/src/agGrid/agGridHelper.d.ts +1 -0
  200. package/src/agGrid/agGridHelper.js +15 -0
  201. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -0
  202. package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.js +5 -0
  203. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
  204. package/src/components/icons/index.js +4 -0
  205. package/src/components/icons/visibility-off.d.ts +3 -0
  206. package/src/components/icons/visibility-off.js +7 -0
  207. package/src/components/icons/visibility.d.ts +3 -0
  208. package/src/components/icons/visibility.js +8 -0
  209. package/src/metamodel/adaptable.metamodel.d.ts +139 -0
  210. package/src/metamodel/adaptable.metamodel.js +1 -1
  211. package/src/types.d.ts +4 -4
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +0 -9
  215. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +0 -30
  216. package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +0 -86
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ConditionalStyleFriendlyName = exports.ConditionalStyleModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
4
- exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = void 0;
3
+ exports.SmartEditFriendlyName = exports.SmartEditModuleId = exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
4
+ exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = void 0;
5
5
  exports.AlertModuleId = 'Alert';
6
6
  exports.AlertModuleFriendlyName = 'Alert';
7
7
  exports.FlashingCellModuleId = 'FlashingCell';
@@ -14,8 +14,6 @@ exports.CellSummaryModuleId = 'CellSummary';
14
14
  exports.CellSummaryFriendlyName = 'Cell Summary';
15
15
  exports.ChartingModuleId = 'Charting';
16
16
  exports.ChartingFriendlyName = 'Charts';
17
- exports.ConditionalStyleModuleId = 'ConditionalStyle';
18
- exports.ConditionalStyleFriendlyName = 'Conditional Style';
19
17
  exports.CustomSortModuleId = 'CustomSort';
20
18
  exports.CustomSortFriendlyName = 'Custom Sort';
21
19
  exports.DashboardModuleId = 'Dashboard';
@@ -77,7 +75,6 @@ exports.ADAPTABLE_MODULE_MAP = {
77
75
  [exports.CalculatedColumnModuleId]: exports.CalculatedColumnFriendlyName,
78
76
  [exports.CellSummaryModuleId]: exports.CellSummaryFriendlyName,
79
77
  [exports.ChartingModuleId]: exports.ChartingFriendlyName,
80
- [exports.ConditionalStyleModuleId]: exports.ConditionalStyleFriendlyName,
81
78
  [exports.CustomSortModuleId]: exports.CustomSortFriendlyName,
82
79
  [exports.DashboardModuleId]: exports.DashboardFriendlyName,
83
80
  [exports.DataChangeHistoryModuleId]: exports.DataChangeHistoryFriendlyName,
@@ -135,6 +135,7 @@ exports.DefaultAdaptableOptions = {
135
135
  Enums_1.ExportDestination.CSV,
136
136
  Enums_1.ExportDestination.Clipboard,
137
137
  Enums_1.ExportDestination.JSON,
138
+ Enums_1.ExportDestination.Table,
138
139
  ],
139
140
  systemReportNames: [
140
141
  GeneralConstants.ALL_DATA_REPORT,
@@ -252,7 +253,7 @@ exports.DefaultAdaptableOptions = {
252
253
  editLookUpItems: undefined,
253
254
  customDisplayFormatters: undefined,
254
255
  showDocumentationLinks: true,
255
- gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjectsSummary'],
256
+ gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjects'],
256
257
  showAdapTableVersion: true,
257
258
  },
258
259
  toolPanelOptions: {
@@ -5,7 +5,7 @@ import { AggregatedScalarExpressionEvaluation } from './aggregatedScalarExpressi
5
5
  * List of all the Aggregation Functions available in AdaptableQL
6
6
  */
7
7
  export declare type AggregatedBooleanFunctionName = 'WHERE' | 'COL' | 'GROUP_BY' | 'WEIGHT' | AggregationFunction | ComparisonFunction;
8
- declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG';
8
+ declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG' | 'COUNT';
9
9
  declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
10
10
  export interface BooleanAggregationParameter extends BaseParameter<'aggregationBoolean', AggregationFunction> {
11
11
  scalarAggregation: ScalarAggregationOperand;
@@ -7,12 +7,13 @@ const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluati
7
7
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
8
8
  const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
9
9
  const TypeExtensions_1 = require("../Extensions/TypeExtensions");
10
- const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG'];
10
+ const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG', 'COUNT'];
11
11
  const aggregationScalarOperandMap = {
12
12
  SUM: ['string', 'number'],
13
13
  MIN: ['string', 'number'],
14
14
  MAX: ['string', 'number'],
15
15
  AVG: ['string', 'number'],
16
+ COUNT: ['string', 'number'],
16
17
  };
17
18
  // 0. optional non-capturing block of empty spaces
18
19
  // 1. block containing a numeric value (any digits) (required)
@@ -35,6 +36,7 @@ exports.aggregatedBooleanExpressionFunctions = {
35
36
  MAX: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['MAX'],
36
37
  AVG: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['AVG'],
37
38
  WEIGHT: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['WEIGHT'],
39
+ COUNT: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['COUNT'],
38
40
  GROUP_BY: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['GROUP_BY'],
39
41
  EQ: {
40
42
  handler(args, context) {
@@ -6,7 +6,7 @@ import { AggregateParams } from './scalarAggregationHelper';
6
6
  * List of all the AggregatedScalar Functions available in AdaptableQL
7
7
  */
8
8
  export declare type AggregatedScalarFunctionName = ScalarAggregationFunction | OperandFunction;
9
- export declare type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'AVG' | 'MIN' | 'MAX' | 'CUMUL';
9
+ export declare type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL';
10
10
  declare type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY' | 'WEIGHT';
11
11
  export interface ScalarAggregationParameter extends BaseParameter<'aggregationScalar', ScalarAggregationFunction> {
12
12
  value: AggregatedScalarExpressionEvaluation;
@@ -12,6 +12,7 @@ exports.cumulativeAggregatedExpressionFunctions = [
12
12
  'MIN',
13
13
  'MAX',
14
14
  'AVG',
15
+ 'COUNT',
15
16
  'WEIGHT',
16
17
  'COL',
17
18
  'GROUP_BY',
@@ -23,6 +24,7 @@ exports.aggregatedExpressionFunctions = [
23
24
  'MAX',
24
25
  'QUANT',
25
26
  'AVG',
27
+ 'COUNT',
26
28
  'WEIGHT',
27
29
  'COL',
28
30
  'GROUP_BY',
@@ -30,7 +32,7 @@ exports.aggregatedExpressionFunctions = [
30
32
  exports.aggregatedScalarExpressionFunctions = {
31
33
  CUMUL: {
32
34
  handler(args, context) {
33
- const aggregationParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'aggregationScalar', ['SUM', 'PERCENTAGE', 'AVG', 'MIN', 'MAX'], args);
35
+ const aggregationParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'aggregationScalar', ['SUM', 'PERCENTAGE', 'AVG', 'MIN', 'MAX', 'COUNT'], args);
34
36
  const overColumnParameter = (0, expressionFunctionUtils_1.extractParameter)('CUMUL', 'operand', ['OVER'], args);
35
37
  const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('MAX', 'operand', ['GROUP_BY'], args, {
36
38
  isOptional: true,
@@ -474,6 +476,49 @@ exports.aggregatedScalarExpressionFunctions = {
474
476
  ],
475
477
  category: 'aggregation',
476
478
  },
479
+ COUNT: {
480
+ handler(args, context) {
481
+ const countColumnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('COUNT', args);
482
+ const countColumnName = countColumnParameter.value;
483
+ const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('COUNT', 'operand', ['GROUP_BY'], args, {
484
+ isOptional: true,
485
+ });
486
+ const aggregationExpressionEvaluation = {
487
+ aggregationParams: {
488
+ reducers: {
489
+ COUNT: {
490
+ name: 'COUNT',
491
+ field: countColumnName,
492
+ initialValue: 0,
493
+ reducer: (totalSum, rowValue) => {
494
+ if (isUndefinedValue(rowValue)) {
495
+ return totalSum;
496
+ }
497
+ return totalSum + 1;
498
+ },
499
+ },
500
+ },
501
+ },
502
+ rowFilterFn: context.filterFn,
503
+ };
504
+ addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
505
+ const result = {
506
+ name: 'COUNT',
507
+ type: 'aggregationScalar',
508
+ value: aggregationExpressionEvaluation,
509
+ };
510
+ return result;
511
+ },
512
+ description: 'Counts the number of non-null (i.e. not empty) values in a given column.\nOptionally the aggregation may be computed within provided individual groups',
513
+ signatures: [
514
+ 'COUNT( [colName] )',
515
+ 'COUNT( COL(name: string))',
516
+ 'COUNT( [colNameA], GROUP_BY( [colNameB] ))',
517
+ 'COUNT( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
518
+ ],
519
+ examples: ['COUNT([colA])', 'COUNT([colA], GROUP_BY([colB]))'],
520
+ category: 'aggregation',
521
+ },
477
522
  OVER: {
478
523
  handler(args, context) {
479
524
  const columnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('OVER', args);
@@ -641,7 +686,23 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
641
686
  return cumulationBag;
642
687
  },
643
688
  }
644
- : null;
689
+ : aggregationParameter.name === 'COUNT'
690
+ ? {
691
+ name: 'CUMUL_COUNT',
692
+ field: aggregationReducer.field,
693
+ initialValue: {
694
+ currentValue: aggregationReducer.initialValue,
695
+ cumulatedValues: {},
696
+ },
697
+ reducer: (cumulationBag, rowValue, rowNode) => {
698
+ if (isDefinedValue(rowValue)) {
699
+ cumulationBag.currentValue = cumulationBag.currentValue + 1;
700
+ }
701
+ cumulationBag.cumulatedValues[rowNode.id] = cumulationBag.currentValue;
702
+ return cumulationBag;
703
+ },
704
+ }
705
+ : null;
645
706
  const rowValueGetter = aggregationParameter.name === 'PERCENTAGE'
646
707
  ? (rowNode, cumulationBag) => {
647
708
  const cumulatedSum = cumulationBag.cumulatedValues[rowNode.id];
@@ -674,7 +735,7 @@ const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
674
735
  }
675
736
  };
676
737
  const isUndefinedValue = (input) => {
677
- return input == undefined || input === '';
738
+ return input == undefined || (typeof input === 'string' && input.trim() === '');
678
739
  };
679
740
  const isDefinedValue = (input) => {
680
741
  return !isUndefinedValue(input);
@@ -63,6 +63,7 @@ export interface WindowPopup {
63
63
  * - used to identify the 'Component' name, to know what to instantiate
64
64
  */
65
65
  Id: string;
66
+ FactoryId: string;
66
67
  Title: string;
67
68
  PopupProps?: any;
68
69
  Icon?: string;
@@ -2,6 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AggregatedScalarLiveValue = void 0;
4
4
  const scalarAggregationHelper_1 = require("../ExpressionFunctions/scalarAggregationHelper");
5
+ const LoggingHelper_1 = require("../Helpers/LoggingHelper");
6
+ const doOnceFlags = {};
7
+ const logOnce = (message) => {
8
+ if (doOnceFlags[message]) {
9
+ return;
10
+ }
11
+ (0, LoggingHelper_1.LogAdaptableWarning)(message);
12
+ doOnceFlags[message] = true;
13
+ };
5
14
  class AggregatedScalarLiveValue {
6
15
  constructor(source, requestingModule, adaptableApi) {
7
16
  this.source = source;
@@ -32,6 +41,10 @@ class AggregatedScalarLiveValue {
32
41
  }
33
42
  getAggregatedValueForRow(rowNode) {
34
43
  const aggregationValue = this.getAggregationValue(rowNode);
44
+ if (aggregationValue == undefined) {
45
+ logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`);
46
+ return;
47
+ }
35
48
  if (this.expressionEvaluation.rowValueGetter) {
36
49
  return this.expressionEvaluation.rowValueGetter(rowNode, aggregationValue);
37
50
  }
@@ -5,6 +5,14 @@ export declare class ChartingService implements IChartingService {
5
5
  private api;
6
6
  constructor(api: AdaptableApi);
7
7
  onChartModelChange(models: ChartModel[], eventType: string, params: any): void;
8
+ /**
9
+ * Emit events only for adaptable charting definition changes
10
+ * - an adaptable chart opens
11
+ * - an adaptable chart closes
12
+ * - an adaptable chart is created
13
+ * - an adaptable chart is deleted
14
+ */
15
+ emitAdaptableChartDefinitonChange(): void;
8
16
  saveNewChart(chartModel: ChartModel): void;
9
17
  destroy(): void;
10
18
  }
@@ -35,6 +35,21 @@ class ChartingService {
35
35
  break;
36
36
  }
37
37
  this.api.internalApi.dispatchReduxAction(SystemRedux.SystemChartingSetCurrentChartModels(models));
38
+ this.emitAdaptableChartDefinitonChange();
39
+ }
40
+ /**
41
+ * Emit events only for adaptable charting definition changes
42
+ * - an adaptable chart opens
43
+ * - an adaptable chart closes
44
+ * - an adaptable chart is created
45
+ * - an adaptable chart is deleted
46
+ */
47
+ emitAdaptableChartDefinitonChange() {
48
+ const chartingOpenState = this.api.chartingApi.getChartingOpenState();
49
+ this.api.eventApi.emit('ChartsChanged', {
50
+ chartingOpenState,
51
+ adaptableApi: this.api,
52
+ });
38
53
  }
39
54
  saveNewChart(chartModel) {
40
55
  var _a, _b;
@@ -188,7 +188,7 @@ class ReportService {
188
188
  }
189
189
  GetReportColumnsForReport(report, includePrimaryKey = false) {
190
190
  let reportColumns = [];
191
- let gridColumns = this.adaptableApi.columnApi.getColumns();
191
+ let gridColumns = this.adaptableApi.columnApi.getExportableColumns();
192
192
  if (this.adaptableApi.exportApi.isServerReport(report)) {
193
193
  return reportColumns;
194
194
  }
@@ -30,7 +30,7 @@ const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryP
30
30
  const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
31
31
  const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
32
32
  const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
33
- const ChartingViewPanel_1 = require("./Components/Charting/ChartingViewPanel");
33
+ const ChartingViewPanel_1 = require("./Charting/ChartingViewPanel");
34
34
  exports.AdaptableViewFactory = {
35
35
  BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
36
36
  DashboardPopup: DashboardPopup_1.DashboardPopup,
@@ -11,8 +11,8 @@ const GridOptionsForm_1 = tslib_1.__importDefault(require("./GridOptionsForm"));
11
11
  const EntitlementsForm_1 = tslib_1.__importDefault(require("./EntitlementsForm"));
12
12
  const UiOptionsForm_1 = require("./UIOptions/UiOptionsForm");
13
13
  const FinanceForm_1 = require("./FinanceForm");
14
- const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
15
14
  const AdaptableOptionsForm_1 = require("./AdaptableOptionsForm");
15
+ const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
16
16
  const ConfigurationWizard = (props) => {
17
17
  var _a, _b;
18
18
  const [isPrimaryKeySelected, setIsValid] = React.useState(true);
@@ -23,7 +23,8 @@ const ConfigurationWizard = (props) => {
23
23
  toolPanels: ['columns', 'filters', 'adaptable'],
24
24
  },
25
25
  };
26
- return Object.assign(Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions), props.adaptableOptions), { gridOptions: Object.assign(Object.assign({}, gridOptionDefaults), (_a = props === null || props === void 0 ? void 0 : props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) });
26
+ const preparedAdaptableOptions = Object.assign(Object.assign({}, props.adaptableOptions), { gridOptions: Object.assign(Object.assign({}, gridOptionDefaults), (_a = props === null || props === void 0 ? void 0 : props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) });
27
+ return AdaptableHelper_1.default.assignAdaptableOptions(preparedAdaptableOptions);
27
28
  });
28
29
  const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
29
30
  return props.adaptableOptions.gridOptions.columnDefs.reduce((acc, col) => {
@@ -75,13 +76,13 @@ const ConfigurationWizard = (props) => {
75
76
  render: () => (React.createElement(ConfigurationWizardColumnsStep_1.ConfigurationWizardColumnsStep, { adaptableOptions: adaptableOptions, setPrimaryKeyIsNotSelected: handlePrimaryKeyColumnIsNotSelected, onChange: setAdaptableOptions, selectedColumns: selectedColumns, onSelectionChange: handleColumnSelectionChange, onColumnChange: handleColumnsChange, columnsHandle: columnsHandle })),
76
77
  },
77
78
  {
78
- title: 'Adaptable Options',
79
+ title: 'AdapTable Options',
79
80
  details: 'Configure Adaptable Options',
80
81
  isValid: () => (adaptableOptions.adaptableId ? true : 'Adaptable ID is required'),
81
82
  render: () => (React.createElement(AdaptableOptionsForm_1.AdaptableOptionsForm, { adaptableOptions: adaptableOptions, onChangeadAptableOptions: setAdaptableOptions })),
82
83
  },
83
84
  {
84
- title: 'Grid Options',
85
+ title: 'AG Grid Options',
85
86
  details: 'Configure AG Grid Options',
86
87
  render: () => (React.createElement(GridOptionsForm_1.default, { adaptableOptions: adaptableOptions, onChangeadAptableOptions: setAdaptableOptions })),
87
88
  },
@@ -29,7 +29,7 @@ const UIOptionsActionColumnsForm = (props) => {
29
29
  props.onChange(Object.assign(Object.assign({}, props.abOptions), { actionOptions: Object.assign(Object.assign({}, (_a = props.abOptions) === null || _a === void 0 ? void 0 : _a.actionOptions), { actionRowButtons: newActionRowButtons }) }));
30
30
  };
31
31
  return (React.createElement(rebass_1.Box, null,
32
- React.createElement(HelpBlock_1.default, null, "Row Action Buttons"),
32
+ React.createElement(HelpBlock_1.default, null, "Action Row Buttons"),
33
33
  React.createElement(rebass_1.Flex, { width: "100%", m: 2 }, options.map((option) => (React.createElement(CheckBox_1.CheckBox, { mr: 3, key: option.value, checked: actionRowButtons.some((buttonName) => buttonName === option.value), onChange: (check) => handleCheckChange(option.value, check) }, option.label))))));
34
34
  };
35
35
  exports.UIOptionsActionColumnsForm = UIOptionsActionColumnsForm;
@@ -12,14 +12,15 @@ const UIElementsForm = (props) => {
12
12
  let abOptions = props.adaptableOptions;
13
13
  return (React.createElement(rebass_1.Box, { p: 2 },
14
14
  React.createElement(Tabs_1.Tabs, null,
15
+ React.createElement(Tabs_1.Tabs.Tab, null, "Tool Panel"),
16
+ React.createElement(Tabs_1.Tabs.Tab, null, "Status Bar"),
15
17
  React.createElement(Tabs_1.Tabs.Tab, null, "Action Rows"),
16
- React.createElement(Tabs_1.Tabs.Tab, null, "Sidebar"),
17
- React.createElement(Tabs_1.Tabs.Tab, null, "Statusbar"),
18
- React.createElement(Tabs_1.Tabs.Content, null,
19
- React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })),
20
18
  React.createElement(Tabs_1.Tabs.Content, null,
21
19
  React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })),
22
20
  React.createElement(Tabs_1.Tabs.Content, null,
23
- React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })))));
21
+ React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })),
22
+ ' ',
23
+ React.createElement(Tabs_1.Tabs.Content, null,
24
+ React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })))));
24
25
  };
25
26
  exports.UIElementsForm = UIElementsForm;
@@ -0,0 +1,15 @@
1
+ import { AlertDefinition } from '../../../types';
2
+ export declare enum AlertType {
3
+ DataChange = "DataChange",
4
+ RowChange = "RowChange",
5
+ Aggregation = "Aggregation",
6
+ Observable = "Observable"
7
+ }
8
+ /**
9
+ * Based on alert shape the type is derived.
10
+ * In the future the alert will get a type property.
11
+ *
12
+ * @param alert
13
+ */
14
+ export declare const getAlertType: (alert: AlertDefinition) => AlertType | null;
15
+ export declare const getAlertTypeText: (alertType: AlertType) => string;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAlertTypeText = exports.getAlertType = exports.AlertType = void 0;
4
+ var AlertType;
5
+ (function (AlertType) {
6
+ AlertType["DataChange"] = "DataChange";
7
+ AlertType["RowChange"] = "RowChange";
8
+ AlertType["Aggregation"] = "Aggregation";
9
+ AlertType["Observable"] = "Observable";
10
+ })(AlertType = exports.AlertType || (exports.AlertType = {}));
11
+ /**
12
+ * Based on alert shape the type is derived.
13
+ * In the future the alert will get a type property.
14
+ *
15
+ * @param alert
16
+ */
17
+ const getAlertType = (alert) => {
18
+ if (alert.Rule.ObservableExpression) {
19
+ return AlertType.Observable;
20
+ }
21
+ if (alert.Rule.AggregatedBooleanExpression) {
22
+ return AlertType.Aggregation;
23
+ }
24
+ if (alert.Rule.BooleanExpression) {
25
+ return AlertType.DataChange;
26
+ }
27
+ const predicates = alert.Rule.Predicates;
28
+ if (predicates) {
29
+ if (predicates.some((predicate) => ['AddedRow', 'RemovedRow'].includes(predicate.PredicateId))) {
30
+ return AlertType.RowChange;
31
+ }
32
+ else {
33
+ return AlertType.DataChange;
34
+ }
35
+ }
36
+ // the object is not a valid alert
37
+ return null;
38
+ };
39
+ exports.getAlertType = getAlertType;
40
+ const getAlertTypeText = (alertType) => {
41
+ let text = '';
42
+ switch (alertType) {
43
+ case AlertType.DataChange:
44
+ text = 'Data Change';
45
+ break;
46
+ case AlertType.RowChange:
47
+ text = 'Row Change';
48
+ break;
49
+ case AlertType.Aggregation:
50
+ text = 'Aggregation';
51
+ break;
52
+ case AlertType.Observable:
53
+ text = 'Observable';
54
+ break;
55
+ }
56
+ return text;
57
+ };
58
+ exports.getAlertTypeText = getAlertTypeText;
@@ -0,0 +1,3 @@
1
+ import { AdaptableApi, AdaptablePredicateDef, AdaptableScope } from '../../../types';
2
+ import { AlertType } from './getAlertType';
3
+ export declare const getAvailablePredicateDefinitions: (api: AdaptableApi, scope: AdaptableScope, alertType: AlertType) => AdaptablePredicateDef[];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAvailablePredicateDefinitions = void 0;
4
+ const getAvailablePredicateDefinitions = (api, scope, alertType) => {
5
+ let predicateDefs = [];
6
+ if (alertType === 'DataChange') {
7
+ predicateDefs = api.alertApi.internalApi
8
+ .getAlertPredicateDefsForScope(scope)
9
+ .filter((predicateDef) => !['AddedRow', 'RemovedRow'].includes(predicateDef.id));
10
+ predicateDefs = [...predicateDefs].sort((a, b) => a.id === 'Any' ? -1 : b.id === 'Any' ? 1 : 0);
11
+ }
12
+ else if (alertType === 'RowChange') {
13
+ predicateDefs = api.alertApi.internalApi
14
+ .getAlertPredicateDefsForScope(scope)
15
+ .filter((predicateDef) => ['AddedRow', 'RemovedRow'].includes(predicateDef.id));
16
+ }
17
+ return predicateDefs;
18
+ };
19
+ exports.getAvailablePredicateDefinitions = getAvailablePredicateDefinitions;
@@ -0,0 +1,37 @@
1
+ import { AlertDefinition } from '../../../types';
2
+ import { AlertType } from './getAlertType';
3
+ /**
4
+ * This logic should be moved into Object factory once we have types on alert definitions
5
+ * @param type AlertType
6
+ */
7
+ export declare const getDefaultAlertDefinition: (alertDefinition: AlertDefinition, type: AlertType) => {
8
+ Uuid: string;
9
+ Scope: import("../../../types").AdaptableScope<import("../../../PredefinedConfig/Common/AdaptableScope").ScopeDataType>;
10
+ Rule: ({
11
+ Predicates?: never;
12
+ } & (({
13
+ BooleanExpression?: never;
14
+ } & (({
15
+ ObservableExpression?: never;
16
+ } & import("../../../types").AdaptableAggregatedBooleanQuery) | ({
17
+ AggregatedBooleanExpression?: never;
18
+ } & import("../../../types").AdaptableObservableQuery))) | ({
19
+ AggregatedBooleanExpression?: never;
20
+ ObservableExpression?: never;
21
+ } & import("../../../types").AdaptableBooleanQuery))) | ({
22
+ AggregatedBooleanExpression?: never;
23
+ ObservableExpression?: never;
24
+ BooleanExpression?: never;
25
+ } & {
26
+ Predicates: import("../../../types").AlertDefinitionPredicate[];
27
+ });
28
+ MessageType: import("../../../types").AdaptableMessageType;
29
+ MessageHeader?: string;
30
+ MessageText?: string;
31
+ AlertProperties?: import("../../../types").AlertProperties;
32
+ AlertForm?: string | import("../../../types").AlertButtonForm;
33
+ IsSuspended?: boolean;
34
+ Source?: "Config" | "User";
35
+ IsReadOnly?: boolean;
36
+ Tags?: string[];
37
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultAlertDefinition = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
6
+ const getAlertType_1 = require("./getAlertType");
7
+ /**
8
+ * This logic should be moved into Object factory once we have types on alert definitions
9
+ * @param type AlertType
10
+ */
11
+ const getDefaultAlertDefinition = (alertDefinition, type) => {
12
+ const newAlert = Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyAlertDefinition()), { Uuid: alertDefinition.Uuid });
13
+ // can only be all
14
+ if (type === getAlertType_1.AlertType.Observable ||
15
+ type === getAlertType_1.AlertType.Aggregation ||
16
+ type === getAlertType_1.AlertType.RowChange) {
17
+ newAlert.Scope = {
18
+ All: true,
19
+ };
20
+ }
21
+ if (type === getAlertType_1.AlertType.RowChange) {
22
+ newAlert.Rule = {
23
+ Predicates: [
24
+ {
25
+ PredicateId: 'AddedRow',
26
+ },
27
+ ],
28
+ };
29
+ }
30
+ return newAlert;
31
+ };
32
+ exports.getDefaultAlertDefinition = getDefaultAlertDefinition;
@@ -0,0 +1,2 @@
1
+ import { AdaptableApi, AlertDefinition } from '../../../types';
2
+ export declare const mapAlertDefinition: (api: AdaptableApi, alertDefinition: AlertDefinition) => AlertDefinition;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapAlertDefinition = void 0;
4
+ const mapAlertDefinition = (api, alertDefinition) => {
5
+ var _a;
6
+ const isRemovedRowChangeAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
7
+ const mapValidButtonActions = (alertAction) => {
8
+ if (isRemovedRowChangeAlert) {
9
+ if (alertAction === 'highlight-row' || alertAction === 'jump-to-row') {
10
+ return null;
11
+ }
12
+ return alertAction;
13
+ }
14
+ };
15
+ // the only case needed is when changing from AddedRow to RemovedRow
16
+ // map FormButton Actions
17
+ if (alertDefinition.AlertForm && typeof alertDefinition.AlertForm !== 'string') {
18
+ const alertButtons = (_a = alertDefinition.AlertForm) === null || _a === void 0 ? void 0 : _a.Buttons;
19
+ alertButtons === null || alertButtons === void 0 ? void 0 : alertButtons.forEach((alertButton) => {
20
+ const alertAction = alertButton.Action;
21
+ if (Array.isArray(alertAction)) {
22
+ alertButton.Action = alertAction
23
+ .map(mapValidButtonActions)
24
+ .filter(Boolean);
25
+ }
26
+ else {
27
+ alertButton.Action = mapValidButtonActions(alertAction);
28
+ }
29
+ });
30
+ }
31
+ // behaviours
32
+ if (isRemovedRowChangeAlert) {
33
+ delete alertDefinition.AlertProperties.HighlightRow;
34
+ delete alertDefinition.AlertProperties.JumpToRow;
35
+ }
36
+ return alertDefinition;
37
+ };
38
+ exports.mapAlertDefinition = mapAlertDefinition;
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
3
3
  import { AdaptableApi } from '../../../types';
4
+ import { AlertType } from '../Utilities/getAlertType';
5
+ export declare const renderAlertBehaviourWizardSummary: (alertDefinition: AlertDefinition) => JSX.Element;
6
+ export declare const renderAlertBehaviourSummary: (alert: AlertDefinition, api: AdaptableApi, allowWrap?: boolean) => JSX.Element;
4
7
  declare type AlertBehaviourWizardSectionProps = {
5
8
  onChange: (data: AlertDefinition) => void;
9
+ alertType: AlertType;
6
10
  };
7
- export declare const renderAlertBehaviourWizardSummary: (alertDefinition: AlertDefinition) => JSX.Element;
8
- export declare const renderAlertBehaviourSummary: (alert: AlertDefinition, api: AdaptableApi, allowWrap?: boolean) => JSX.Element;
9
11
  export declare const AlertBehaviourWizardSection: (props: AlertBehaviourWizardSectionProps) => JSX.Element;
10
12
  export {};