@adaptabletools/adaptable-cjs 23.0.0-canary.3 → 23.0.0-canary.5

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 (277) hide show
  1. package/index.css +116 -61
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
  4. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
  6. package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
  7. package/src/AdaptableState/Common/AdaptableForm.js +34 -0
  8. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  9. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  10. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
  11. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  12. package/src/AdaptableState/Common/Enums.d.ts +5 -10
  13. package/src/AdaptableState/Common/Enums.js +5 -11
  14. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  15. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  16. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  17. package/src/AdaptableState/ThemeState.d.ts +33 -28
  18. package/src/Api/EventApi.d.ts +14 -1
  19. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  20. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  21. package/src/Api/Events/ThemeSelected.js +2 -0
  22. package/src/Api/Implementation/EventApiImpl.js +4 -0
  23. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  24. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  25. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  26. package/src/Api/Implementation/LayoutHelpers.js +31 -8
  27. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  28. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  29. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  30. package/src/Api/Internal/EventInternalApi.js +8 -1
  31. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  32. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  33. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  34. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  35. package/src/Api/LayoutApi.d.ts +1 -8
  36. package/src/Api/ThemeApi.d.ts +6 -2
  37. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  38. package/src/Strategy/CalculatedColumnModule.js +3 -1
  39. package/src/Strategy/FormatColumnModule.js +12 -5
  40. package/src/Strategy/LayoutModule.js +13 -8
  41. package/src/Strategy/StyledColumnModule.js +58 -30
  42. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  43. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  44. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  45. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  46. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  47. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  48. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  49. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  50. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  51. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  52. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  53. package/src/Utilities/ObjectFactory.d.ts +1 -3
  54. package/src/Utilities/ObjectFactory.js +0 -9
  55. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  56. package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
  57. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
  58. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
  59. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
  60. package/src/Utilities/Services/ThemeService.js +1 -1
  61. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  62. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  63. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  64. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  65. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  66. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  67. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  68. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  69. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  70. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  73. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  74. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  75. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  76. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +35 -52
  77. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  78. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  79. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  80. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  81. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  82. package/src/View/Comments/CommentsEditor.js +1 -1
  83. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  84. package/src/View/Components/ModuleProfile.js +1 -1
  85. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  86. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  87. package/src/View/Components/RangesComponent.d.ts +7 -2
  88. package/src/View/Components/RangesComponent.js +94 -22
  89. package/src/View/Components/Selectors/ColumnSelector.js +5 -0
  90. package/src/View/Components/StyleComponent.d.ts +1 -0
  91. package/src/View/Components/StyleComponent.js +1 -1
  92. package/src/View/Components/ValueSelector/index.js +70 -57
  93. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  94. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  95. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  96. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  97. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  98. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  99. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  100. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  101. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  102. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  103. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  104. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  105. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  106. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  107. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +22 -21
  108. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  109. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  110. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  111. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  112. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  113. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  114. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  115. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  116. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  117. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  118. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  119. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  120. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  121. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  122. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  123. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  124. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  125. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  126. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  127. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  128. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  129. package/src/View/Layout/LayoutViewPanel.js +23 -21
  130. package/src/View/Layout/TransposedPopup.js +2 -2
  131. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  132. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  133. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  134. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  135. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  136. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  137. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  138. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  139. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  140. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  141. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  142. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  143. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  144. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  145. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  146. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  147. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  148. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  149. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  150. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  151. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  152. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  153. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  154. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  155. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  156. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  157. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  158. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  159. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  160. package/src/View/Shortcut/shortcutOperations.js +32 -1
  161. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  162. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  163. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  164. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  165. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  166. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  167. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  168. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  169. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  198. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  199. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  200. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  201. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  202. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  203. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  204. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  205. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  209. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  210. package/src/View/Theme/ThemePopup.d.ts +2 -14
  211. package/src/View/Theme/ThemePopup.js +1 -36
  212. package/src/View/UIHelper.js +1 -1
  213. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  214. package/src/View/renderWithAdaptableContext.js +1 -2
  215. package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
  216. package/src/agGrid/AdaptableAgGrid.js +36 -41
  217. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  218. package/src/agGrid/AgGridAdapter.js +27 -17
  219. package/src/agGrid/AgGridColumnAdapter.js +10 -19
  220. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  221. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  222. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  223. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  224. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  225. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  226. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  227. package/src/agGrid/createAgGridIcon.js +19 -0
  228. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
  229. package/src/components/Combobox/VirtualizedList.js +5 -5
  230. package/src/components/Combobox/comboboxUtils.d.ts +4 -1
  231. package/src/components/Combobox/comboboxUtils.js +2 -0
  232. package/src/components/Combobox/index.d.ts +1 -0
  233. package/src/components/Combobox/index.js +36 -16
  234. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  235. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  236. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  237. package/src/components/Input/NumberInput.js +1 -1
  238. package/src/components/Panel/index.js +1 -1
  239. package/src/components/SimpleButton/index.js +4 -4
  240. package/src/components/Toggle/Toggle.js +1 -1
  241. package/src/components/Toggle/ToggleGroup.js +1 -1
  242. package/src/components/Tree/TreeDropdown/index.js +1 -5
  243. package/src/env.js +2 -2
  244. package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
  245. package/src/layout-manager/src/index.js +2 -9
  246. package/src/metamodel/adaptable.metamodel.d.ts +39 -46
  247. package/src/metamodel/adaptable.metamodel.js +1 -1
  248. package/src/types.d.ts +5 -5
  249. package/themes/dark.css +1 -68
  250. package/themes/light.css +1 -5
  251. package/tsconfig.cjs.tsbuildinfo +1 -1
  252. package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
  253. package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
  254. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  255. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  256. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  257. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  258. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  259. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  260. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  261. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  262. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  263. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  264. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  265. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  266. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  267. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  268. package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
  269. package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
  270. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  271. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  274. package/src/View/Theme/VariantSelector.d.ts +0 -8
  275. package/src/View/Theme/VariantSelector.js +0 -25
  276. package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
  277. package/src/components/Select/CSSNumericVariableWatch.js +0 -51
@@ -11,4 +11,5 @@ export interface ICalculatedColumnExpressionService extends IAdaptableService {
11
11
  destroyAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
12
12
  listentoCellDataChange(cellDataChangedInfo: CellDataChangedInfo): void;
13
13
  listentoRowDataChange(rowDataChangedInfo: RowDataChangedInfo): void;
14
+ buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo: CellDataChangedInfo): CellDataChangedInfo[];
14
15
  }
@@ -23,7 +23,7 @@ class ThemeService {
23
23
  document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
24
24
  }
25
25
  subscribe() {
26
- const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
26
+ const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.onThemeChanged);
27
27
  const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
28
28
  this.unsubscribe = () => {
29
29
  themeChangedUnsubscribe();
@@ -4,7 +4,6 @@ exports.AlertBehaviourWizardSection = exports.renderAlertBehaviourSummary = expo
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
7
- const Tabs_1 = require("../../../components/Tabs");
8
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
8
  const CheckBox_1 = require("../../../components/CheckBox");
10
9
  const CodeBlock_1 = require("../../../components/CodeBlock");
@@ -17,6 +16,7 @@ const getAlertType_1 = require("../Utilities/getAlertType");
17
16
  const Flex_1 = require("../../../components/Flex");
18
17
  const Tag_1 = require("../../../components/Tag/Tag");
19
18
  const NewSelect_1 = require("../../../components/NewSelect");
19
+ const Card_1 = require("../../../components/Card");
20
20
  const HighlightStyle = (props) => {
21
21
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
22
22
  const options = [
@@ -90,6 +90,7 @@ const renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
90
90
  exports.renderAlertBehaviourSummary = renderAlertBehaviourSummary;
91
91
  const AlertBehaviourWizardSection = (props) => {
92
92
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
93
+ const behaviourSpellingVariant = api.internalApi.getCorrectEnglishVariant('Behaviour');
93
94
  const presentationProperties = data.AlertProperties ?? {};
94
95
  const ruleProperties = (0, ScheduledAlertHelper_1.isRuleBasedAlertDefinition)(data)
95
96
  ? (data.AlertProperties ?? {})
@@ -113,20 +114,20 @@ const AlertBehaviourWizardSection = (props) => {
113
114
  },
114
115
  });
115
116
  };
116
- return ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: api.internalApi.getCorrectEnglishVariant('Behaviour') }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { className: "twa:flex twa:flex-col twa:gap-1", children: [hasPreventCellEdit && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: ruleProperties.PreventEdit, disabled: true, children: ["Prevent Cell Edit", (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-1", children: "(automatically undo data change which triggered Alert)" })] })), hasHighlightCell && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-cell", highlight: ruleProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
117
- onChange({ HighlightCell });
118
- } })), hasHighlightRow && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-row", highlight: ruleProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
119
- onChange({ HighlightRow });
120
- } })), hasJumpToCell && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: ruleProperties.JumpToCell, onChange: (JumpToCell) => {
121
- onChange({ JumpToCell });
122
- }, children: "Jump To Cell" })), hasJumpToRow && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: ruleProperties.JumpToRow, onChange: (JumpToRow) => {
123
- onChange({ JumpToRow });
124
- }, children: "Jump To Row" })), showInSeparateDiv && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: presentationProperties.ShowInDiv, onChange: (ShowInDiv) => {
125
- onChange({ ShowInDiv });
126
- }, children: ["Show in separate ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: `<div />` }), " element"] })), logToConsole && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: presentationProperties.LogToConsole, onChange: (LogToConsole) => {
127
- onChange({ LogToConsole });
128
- }, children: "Log To Console" })), showSystemStatusMessage && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "system-status-message", checked: presentationProperties.DisplaySystemStatusMessage, onChange: (DisplaySystemStatusMessage) => {
129
- onChange({ DisplaySystemStatusMessage });
130
- }, children: "Show as System Status Message" }))] })] }));
117
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: behaviourSpellingVariant }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Configure ", behaviourSpellingVariant.toLowerCase(), "s for the Alert when it fires"] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:gap-1", children: [hasPreventCellEdit && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: ruleProperties.PreventEdit, disabled: true, children: ["Prevent Cell Edit", (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-1", children: "(automatically undo data change which triggered Alert)" })] })), hasHighlightCell && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-cell", highlight: ruleProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
118
+ onChange({ HighlightCell });
119
+ } })), hasHighlightRow && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-row", highlight: ruleProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
120
+ onChange({ HighlightRow });
121
+ } })), hasJumpToCell && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: ruleProperties.JumpToCell, onChange: (JumpToCell) => {
122
+ onChange({ JumpToCell });
123
+ }, children: "Jump To Cell" })), hasJumpToRow && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: ruleProperties.JumpToRow, onChange: (JumpToRow) => {
124
+ onChange({ JumpToRow });
125
+ }, children: "Jump To Row" })), showInSeparateDiv && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: presentationProperties.ShowInDiv, onChange: (ShowInDiv) => {
126
+ onChange({ ShowInDiv });
127
+ }, children: ["Show in separate ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: `<div />` }), " element"] })), logToConsole && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: presentationProperties.LogToConsole, onChange: (LogToConsole) => {
128
+ onChange({ LogToConsole });
129
+ }, children: "Log To Console" })), showSystemStatusMessage && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "system-status-message", checked: presentationProperties.DisplaySystemStatusMessage, onChange: (DisplaySystemStatusMessage) => {
130
+ onChange({ DisplaySystemStatusMessage });
131
+ }, children: "Show as System Status Message" }))] })] }) }));
131
132
  };
132
133
  exports.AlertBehaviourWizardSection = AlertBehaviourWizardSection;
@@ -13,6 +13,7 @@ const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector"
13
13
  const Flex_1 = require("../../../components/Flex");
14
14
  const sentenceCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/sentenceCase"));
15
15
  const NewSelect_1 = require("../../../components/NewSelect");
16
+ const Card_1 = require("../../../components/Card");
16
17
  const TONE_OPTIONS = [
17
18
  {
18
19
  label: 'Tone: Use Alert Tone',
@@ -25,6 +26,14 @@ const TONE_OPTIONS = [
25
26
  };
26
27
  }),
27
28
  ];
29
+ const AlertButtonPreview = ({ button, messageType }) => {
30
+ const buttonStyle = button.ButtonStyle ?? {};
31
+ const variant = (buttonStyle.variant ?? 'raised');
32
+ const tone = (buttonStyle.tone ??
33
+ messageType.toLowerCase());
34
+ const icon = button.icon && 'name' in button.icon && button.icon.name ? button.icon : undefined;
35
+ return ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { variant: variant, tone: tone, icon: icon, className: "twa:cursor-default twa:pointer-events-none", tabIndex: -1, children: button.Label || 'Untitled' }));
36
+ };
28
37
  function renderTone(option) {
29
38
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:mr-2 twa:w-[10px] twa:h-[10px] twa:line-height-0 twa:rounded-[100%] twa:bg-current", tone: option.value, variant: "text" }), option.label] }));
30
39
  }
@@ -34,6 +43,7 @@ const AlertButtonsEditor = (props) => {
34
43
  props.onChange(newButtons);
35
44
  };
36
45
  const alertDefinition = adaptableAlert.alertDefinition;
46
+ const messageType = alertDefinition?.MessageType ?? 'Info';
37
47
  // const rowAddedAlert =
38
48
  // api.alertApi.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition);
39
49
  const isRowRemovedAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
@@ -75,7 +85,7 @@ const AlertButtonsEditor = (props) => {
75
85
  buttonCommands.push(ch.name);
76
86
  });
77
87
  }
78
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-3 twa:mb-2", children: "Add Buttons to the Alert Notification, and set Actions to perform when the Button is clicked" }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "plus", onClick: () => {
88
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between", className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:max-w-[520px]", children: "Add buttons to the notification and set actions to perform when clicked" }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "plus", onClick: () => {
79
89
  onChange([
80
90
  ...(AlertButtons || []),
81
91
  {
@@ -85,110 +95,111 @@ const AlertButtonsEditor = (props) => {
85
95
  },
86
96
  },
87
97
  ]);
88
- }, children: "Add" })] }), AlertButtons.map((button, index) => {
89
- let buttonStyle = button.ButtonStyle;
90
- let buttonLabel = button.Label;
91
- let btnCommands = [];
92
- if (button.Command && typeof button.Command === 'string') {
93
- btnCommands = [button.Command];
94
- }
95
- else if (button.Command && Array.isArray(button.Command)) {
96
- btnCommands = button.Command;
97
- }
98
- // filter out the adaptable standard commands
99
- const btnUserFunctions = btnCommands.filter((command) => !buttonCommands.includes(command));
100
- const setVariant = (variant) => {
101
- onChange(AlertButtons.map((btn, i) => {
102
- if (i === index) {
103
- const buttonStyle = { ...btn.ButtonStyle };
104
- buttonStyle.variant = variant;
105
- return {
106
- ...btn,
107
- ButtonStyle: buttonStyle,
108
- };
109
- }
110
- return btn;
111
- }));
112
- };
113
- const setTone = (tone) => {
114
- onChange(AlertButtons.map((btn, i) => {
115
- if (i === index) {
116
- const buttonStyle = { ...btn.ButtonStyle };
117
- if (tone == null) {
118
- delete buttonStyle.tone;
98
+ }, children: "Add" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3", children: AlertButtons.map((button, index) => {
99
+ let buttonStyle = button.ButtonStyle;
100
+ let buttonLabel = button.Label;
101
+ let btnCommands = [];
102
+ if (button.Command && typeof button.Command === 'string') {
103
+ btnCommands = [button.Command];
104
+ }
105
+ else if (button.Command && Array.isArray(button.Command)) {
106
+ btnCommands = button.Command;
107
+ }
108
+ // filter out the adaptable standard commands
109
+ const btnUserFunctions = btnCommands.filter((command) => !buttonCommands.includes(command));
110
+ const setVariant = (variant) => {
111
+ onChange(AlertButtons.map((btn, i) => {
112
+ if (i === index) {
113
+ const buttonStyle = { ...btn.ButtonStyle };
114
+ buttonStyle.variant = variant;
115
+ return {
116
+ ...btn,
117
+ ButtonStyle: buttonStyle,
118
+ };
119
119
  }
120
- else {
121
- buttonStyle.tone = tone;
120
+ return btn;
121
+ }));
122
+ };
123
+ const setTone = (tone) => {
124
+ onChange(AlertButtons.map((btn, i) => {
125
+ if (i === index) {
126
+ const buttonStyle = { ...btn.ButtonStyle };
127
+ if (tone == null) {
128
+ delete buttonStyle.tone;
129
+ }
130
+ else {
131
+ buttonStyle.tone = tone;
132
+ }
133
+ return {
134
+ ...btn,
135
+ ButtonStyle: buttonStyle,
136
+ };
122
137
  }
123
- return {
124
- ...btn,
125
- ButtonStyle: buttonStyle,
126
- };
138
+ return btn;
139
+ }));
140
+ };
141
+ const handleCommandChange = (checked, commandName) => {
142
+ let commands = btnCommands;
143
+ if (!checked) {
144
+ // remove current Command
145
+ commands = commands.filter((a) => a !== commandName);
127
146
  }
128
- return btn;
129
- }));
130
- };
131
- const handleCommandChange = (checked, commandName) => {
132
- let commands = btnCommands;
133
- if (!checked) {
134
- // remove current Command
135
- commands = commands.filter((a) => a !== commandName);
136
- }
137
- else {
138
- commands = [...commands, commandName];
139
- }
140
- onChange(AlertButtons.map((btn, i) => {
141
- if (i === index) {
142
- return {
143
- ...btn,
144
- Command: commands.length ? commands : undefined,
145
- };
147
+ else {
148
+ commands = [...commands, commandName];
146
149
  }
147
- return btn;
148
- }));
149
- };
150
- let iconSelector = null;
151
- if (!button.icon || (button.icon && 'name' in button.icon)) {
152
- iconSelector = ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? button?.icon?.name : '', onChange: (iconName) => {
153
- onChange(AlertButtons.map((btn) => {
154
- if (btn === button) {
155
- return {
156
- ...btn,
157
- icon: {
158
- name: iconName,
159
- },
160
- };
161
- }
162
- return btn;
163
- }));
164
- } }));
165
- }
166
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:ml-3 ${index ? 'twa:border-t twa:border-dashed twa:border-input-border' : ''}`, children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { className: "twa:mb-2 twa:pt-2", children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:whitespace-nowrap", children: "Button Text" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Input_1.default, { value: buttonLabel, className: "twa:mr-2 twa:w-[80px]", onChange: (e) => {
167
- onChange(AlertButtons.map((btn, i) => {
168
- if (i === index) {
169
- return { ...btn, Label: e.target.value };
170
- }
171
- return btn;
172
- }));
173
- } }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: ['text', 'outlined', 'raised'].map((variant) => {
174
- return {
175
- label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
176
- value: variant,
177
- };
178
- }), renderValue: (option) => `Variant: ${option.label}`, value: buttonStyle?.variant, onValueChange: (value) => {
179
- setVariant(value);
180
- } }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:ml-2", items: TONE_OPTIONS, onValueChange: (value) => {
181
- if (value === 'text') {
182
- setTone(null);
183
- return;
184
- }
185
- setTone(value);
186
- }, value: buttonStyle?.tone ?? 'text' }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "close", tone: "error", disabled: AlertButtons.length <= 1, className: "twa:ml-1", variant: "text", tooltip: AlertButtons.length <= 1 ? 'Cannot remove last button' : 'Remove button', onClick: () => {
187
- onChange(AlertButtons.filter((btn) => btn !== button));
188
- } })] }) }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Actions" }), children: [buttonCommands.map((commandName) => {
189
- return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:mr-3", onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
190
- (Array.isArray(button.Command) && button.Command.includes(commandName)), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: (0, sentenceCase_1.default)(commandName) }) }, commandName));
191
- }), btnUserFunctions.length ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: true, disabled: true, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: ["User function", btnUserFunctions.length > 1 ? 's' : '', ":", ' ', btnUserFunctions.join(', ')] }) })) : null] }), iconSelector && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Icon" }), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: iconSelector }) }))] }) }, index));
192
- })] }));
150
+ onChange(AlertButtons.map((btn, i) => {
151
+ if (i === index) {
152
+ return {
153
+ ...btn,
154
+ Command: commands.length ? commands : undefined,
155
+ };
156
+ }
157
+ return btn;
158
+ }));
159
+ };
160
+ let iconSelector = null;
161
+ if (!button.icon || (button.icon && 'name' in button.icon)) {
162
+ iconSelector = ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? button?.icon?.name : '', onChange: (iconName) => {
163
+ onChange(AlertButtons.map((btn) => {
164
+ if (btn === button) {
165
+ return {
166
+ ...btn,
167
+ icon: {
168
+ name: iconName,
169
+ },
170
+ };
171
+ }
172
+ return btn;
173
+ }));
174
+ } }));
175
+ }
176
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { className: "twa:justify-between twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:font-medium twa:shrink-0", children: ["Button ", index + 1] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { justifyContent: "center", className: "twa:flex-1 twa:min-w-0", children: (0, jsx_runtime_1.jsx)(AlertButtonPreview, { button: button, messageType: messageType }) }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "close", tone: "error", disabled: AlertButtons.length <= 1, variant: "text", tooltip: AlertButtons.length <= 1 ? 'Cannot remove last button' : 'Remove button', onClick: () => {
177
+ onChange(AlertButtons.filter((btn) => btn !== button));
178
+ } })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Button Text" }), children: (0, jsx_runtime_1.jsx)(Input_1.default, { value: buttonLabel, className: "twa:max-w-[200px]", onChange: (e) => {
179
+ onChange(AlertButtons.map((btn, i) => {
180
+ if (i === index) {
181
+ return { ...btn, Label: e.target.value };
182
+ }
183
+ return btn;
184
+ }));
185
+ } }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Style" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-2 twa:flex-wrap", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: ['text', 'outlined', 'raised'].map((variant) => {
186
+ return {
187
+ label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
188
+ value: variant,
189
+ };
190
+ }), renderValue: (option) => `Variant: ${option.label}`, value: buttonStyle?.variant, onValueChange: (value) => {
191
+ setVariant(value);
192
+ } }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: TONE_OPTIONS, onValueChange: (value) => {
193
+ if (value === 'text') {
194
+ setTone(null);
195
+ return;
196
+ }
197
+ setTone(value);
198
+ }, value: buttonStyle?.tone ?? 'text' })] }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Actions" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-3 twa:flex-wrap", children: [buttonCommands.map((commandName) => {
199
+ return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
200
+ (Array.isArray(button.Command) &&
201
+ button.Command.includes(commandName)), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: (0, sentenceCase_1.default)(commandName) }) }, commandName));
202
+ }), btnUserFunctions.length ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: true, disabled: true, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: ["User function", btnUserFunctions.length > 1 ? 's' : '', ":", ' ', btnUserFunctions.join(', ')] }) })) : null] }) }), iconSelector && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Icon" }), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: iconSelector }) }))] }) })] }, index));
203
+ }) })] }));
193
204
  };
194
205
  exports.AlertButtonsEditor = AlertButtonsEditor;
@@ -3,21 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlertMessageWizardSection = exports.renderAlertMessageSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const Tabs_1 = require("../../../components/Tabs");
7
6
  const Radio_1 = tslib_1.__importStar(require("../../../components/Radio"));
8
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
8
  const Tag_1 = require("../../../components/Tag");
10
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
11
9
  const getAlertType_1 = require("../Utilities/getAlertType");
12
10
  const ButtonInfo_1 = require("../../Components/Buttons/ButtonInfo");
13
11
  const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
14
12
  const Textarea_1 = tslib_1.__importDefault(require("../../../components/Textarea"));
15
13
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
16
14
  const Flex_1 = require("../../../components/Flex");
15
+ const Card_1 = require("../../../components/Card");
17
16
  const renderAlertMessageSummary = (alertType) => {
18
17
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
19
18
  if (alertType === getAlertType_1.AlertType.Scheduled) {
20
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Message Type: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageType })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Header: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageHeader || 'Not specified' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Message: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageText || 'Not specified' })] })] }));
19
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Message Type: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageType })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Header: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageHeader || 'Not specified' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Body: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageText || 'Not specified' })] })] }));
21
20
  }
22
21
  return ((0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Message Type: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageType })] }));
23
22
  };
@@ -45,15 +44,15 @@ const AlertMessageWizardSection = (props) => {
45
44
  MessageHeader: value,
46
45
  });
47
46
  };
48
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { "data-name": "message-type", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Message Type" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Radio_1.RadioGroup, { value: messageType, name: "messageType", orientation: "horizontal", onRadioChange: (MessageType) => {
49
- props.onChange({
50
- ...data,
51
- MessageType,
52
- });
53
- }, children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-1", value: "Info", children: "Info" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Success", children: "Success" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Warning", children: "Warning" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Error", children: "Error" })] }) })] }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { "data-name": "message-text", className: "twa:mt-2 twa:mb-3", autoFocus: false, children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Message Text" }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-3 twa:mb-2", children: isScheduled
54
- ? 'Enter the header and message shown when this scheduled alert fires.'
55
- : 'Text to display as the Alert Message (leave blank to show automated Message based on Alert Type)' }), (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Header", children: (0, jsx_runtime_1.jsx)(Textarea_1.default, { className: "twa:min-w-[300px] twa:mt-2", rows: 3, placeholder: isScheduled ? 'Enter header (required)' : '(Use Default Header Message)', type: 'text', autoFocus: false, value: messageHeader,
56
- // placeholder="defaults to column name"
57
- onChange: (e) => onMessageHeaderChange(e) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Message", children: (0, jsx_runtime_1.jsx)(Textarea_1.default, { className: "twa:min-w-[300px] twa:mt-2", rows: 3, type: 'text', autoFocus: false, placeholder: isScheduled ? 'Enter message (required)' : undefined, value: messageText, onChange: (e) => onMessageTextChange(e) }) })] }), showDocumentationLinks && !isScheduled && ((0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { "data-name": "alert-message-documentation", className: "twa:mt-3 twa:mb-2 twa:p-0 twa:text-3", children: [(0, jsx_runtime_1.jsx)(ButtonInfo_1.ButtonInfo, { className: "twa:mr-2", onClick: () => window.open(DocumentationLinkConstants_1.AlertMessageDocsLink, '_blank') }), "See how to create dynamic Alert Messages using placeholders"] }))] })] })] }));
47
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "message-type", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Message Type" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how the Alert message is styled" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Radio_1.RadioGroup, { value: messageType, name: "messageType", orientation: "horizontal", onRadioChange: (MessageType) => {
48
+ props.onChange({
49
+ ...data,
50
+ MessageType,
51
+ });
52
+ }, children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-1", value: "Info", children: "Info" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Success", children: "Success" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Warning", children: "Warning" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:ml-4", value: "Error", children: "Error" })] }) })] }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "message-header", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Header" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: isScheduled
53
+ ? 'Enter the header shown when this scheduled alert fires'
54
+ : 'Optional header text (leave blank to use the default)' })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Textarea_1.default, { className: "twa:min-w-[300px] twa:w-full twa:max-w-[500px]", rows: 3, placeholder: isScheduled ? 'Enter header (required)' : '(Use Default Header Message)', type: 'text', autoFocus: false, value: messageHeader, onChange: (e) => onMessageHeaderChange(e) }) })] }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "message-body", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Body" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: isScheduled
55
+ ? 'Enter the message body shown when this scheduled alert fires'
56
+ : 'Alert message body (leave blank to show automated message based on Alert Type)' })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:p-1", children: [(0, jsx_runtime_1.jsx)(Textarea_1.default, { className: "twa:min-w-[300px] twa:w-full twa:max-w-[500px]", rows: 3, type: 'text', autoFocus: false, placeholder: isScheduled ? 'Enter message (required)' : undefined, value: messageText, onChange: (e) => onMessageTextChange(e) }), showDocumentationLinks && !isScheduled && ((0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { "data-name": "alert-message-documentation", className: "twa:mt-3 twa:p-0 twa:text-3", children: [(0, jsx_runtime_1.jsx)(ButtonInfo_1.ButtonInfo, { className: "twa:mr-2", onClick: () => window.open(DocumentationLinkConstants_1.AlertMessageDocsLink, '_blank') }), "See how to create dynamic Alert Messages using placeholders"] }))] })] }) })] }));
58
57
  };
59
58
  exports.AlertMessageWizardSection = AlertMessageWizardSection;
@@ -4,7 +4,6 @@ exports.AlertNotificationWizardSection = exports.AlertPreview = exports.renderAl
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
- const Tabs_1 = require("../../../components/Tabs");
8
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
8
  const CheckBox_1 = require("../../../components/CheckBox");
10
9
  const AdaptablePopupAlert_1 = require("../../Components/Popups/AdaptablePopupAlert");
@@ -14,6 +13,7 @@ const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAler
14
13
  const alertFormHelper_1 = require("../../../Utilities/Helpers/alertFormHelper");
15
14
  const Flex_1 = require("../../../components/Flex");
16
15
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
16
+ const Card_1 = require("../../../components/Card");
17
17
  const renderAlertNotificationSummary = () => {
18
18
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
19
19
  if (!data.AlertProperties?.DisplayNotification) {
@@ -88,58 +88,58 @@ const AlertNotificationWizardSection = (props) => {
88
88
  },
89
89
  });
90
90
  };
91
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { "data-name": "display-options", className: "twa:mt-2 twa:mb-3", autoFocus: false, children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Notification Options" }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", alignItems: "flex-start", className: isScheduled ? 'twa:gap-4' : undefined, children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: isScheduled ? 'twa:my-0' : undefined, checked: data.AlertProperties?.DisplayNotification, onChange: (DisplayNotification) => {
92
- if (isScheduled && scheduledData) {
93
- updateScheduledProperties({ DisplayNotification });
94
- return;
95
- }
96
- const ruleData = data;
97
- const newAlertDefinition = {
98
- ...ruleData,
99
- AlertProperties: {
100
- ...ruleData.AlertProperties,
101
- DisplayNotification,
102
- },
103
- };
104
- if (!DisplayNotification && typeof newAlertDefinition.AlertForm === 'object') {
105
- delete newAlertDefinition.AlertForm.Buttons;
106
- }
107
- if (DisplayNotification) {
108
- newAlertDefinition.AlertForm =
109
- newAlertDefinition.AlertForm ??
110
- api.alertApi.internalApi.getDefaultAlertNotificationForm();
111
- }
112
- if (DisplayNotification &&
113
- typeof newAlertDefinition.AlertForm === 'object' &&
114
- (!newAlertDefinition.AlertForm?.Buttons ||
115
- newAlertDefinition.AlertForm?.Buttons?.length === 0)) {
116
- newAlertDefinition.AlertForm.Buttons = [
117
- api.alertApi.internalApi.getDefaultButton(),
118
- ];
119
- }
120
- props.onChange(newAlertDefinition);
121
- }, children: isScheduled
122
- ? 'Display a Notification when the Schedule is triggered'
123
- : 'Display a Notification when Alert is triggered (with action buttons)' }), isScheduled && scheduledData && data.AlertProperties?.DisplayNotification ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:my-0", checked: includeSuspendButton, onChange: (IncludeSuspendButton) => {
124
- updateScheduledProperties({ IncludeSuspendButton });
125
- }, children: "Include Suspend button on notification" })) : null] }), data.AlertProperties?.DisplayNotification && !isScheduled
126
- ? (() => {
127
- const ruleData = data;
128
- const alertForm = ruleData.AlertForm;
129
- if (typeof alertForm === 'string') {
130
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Alert buttons cannot be customized because form is dynamically driven" }));
131
- }
132
- return ((0, jsx_runtime_1.jsx)(AlertButtonsEditor_1.AlertButtonsEditor, { alertType: props.alertType, AlertButtons: alertForm?.Buttons, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
133
- props.onChange({
134
- ...ruleData,
135
- AlertForm: {
136
- ...(alertForm ?? { fields: [] }),
137
- Buttons: buttons,
138
- },
139
- });
140
- } }));
141
- })()
142
- : null] })] }), data.AlertProperties?.DisplayNotification ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { "data-name": "alert-preview", autoFocus: false, children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Alert Preview" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: !isScheduled &&
143
- typeof data.AlertForm === 'string' ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Preview not available because form is dynamically driven" })) : ((0, jsx_runtime_1.jsx)(exports.AlertPreview, { alertDefinition: data, api: api })) })] })) : null] }));
91
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "display-options", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Notification Options" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display a notification when the Alert fires" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", alignItems: "flex-start", className: isScheduled ? 'twa:gap-4' : undefined, children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: isScheduled ? 'twa:my-0' : undefined, checked: data.AlertProperties?.DisplayNotification, onChange: (DisplayNotification) => {
92
+ if (isScheduled && scheduledData) {
93
+ updateScheduledProperties({ DisplayNotification });
94
+ return;
95
+ }
96
+ const ruleData = data;
97
+ const newAlertDefinition = {
98
+ ...ruleData,
99
+ AlertProperties: {
100
+ ...ruleData.AlertProperties,
101
+ DisplayNotification,
102
+ },
103
+ };
104
+ if (!DisplayNotification && typeof newAlertDefinition.AlertForm === 'object') {
105
+ delete newAlertDefinition.AlertForm.Buttons;
106
+ }
107
+ if (DisplayNotification) {
108
+ newAlertDefinition.AlertForm =
109
+ newAlertDefinition.AlertForm ??
110
+ api.alertApi.internalApi.getDefaultAlertNotificationForm();
111
+ }
112
+ if (DisplayNotification &&
113
+ typeof newAlertDefinition.AlertForm === 'object' &&
114
+ (!newAlertDefinition.AlertForm?.Buttons ||
115
+ newAlertDefinition.AlertForm?.Buttons?.length === 0)) {
116
+ newAlertDefinition.AlertForm.Buttons = [
117
+ api.alertApi.internalApi.getDefaultButton(),
118
+ ];
119
+ }
120
+ props.onChange(newAlertDefinition);
121
+ }, children: isScheduled
122
+ ? 'Display a Notification when the Schedule is triggered'
123
+ : 'Display a Notification when Alert is triggered (with action buttons)' }), isScheduled && scheduledData && data.AlertProperties?.DisplayNotification ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:my-0", checked: includeSuspendButton, onChange: (IncludeSuspendButton) => {
124
+ updateScheduledProperties({ IncludeSuspendButton });
125
+ }, children: "Include Suspend button on notification" })) : null] }), data.AlertProperties?.DisplayNotification && !isScheduled
126
+ ? (() => {
127
+ const ruleData = data;
128
+ const alertForm = ruleData.AlertForm;
129
+ if (typeof alertForm === 'string') {
130
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-3", children: "Alert buttons cannot be customized because form is dynamically driven" }));
131
+ }
132
+ return ((0, jsx_runtime_1.jsx)(AlertButtonsEditor_1.AlertButtonsEditor, { alertType: props.alertType, AlertButtons: alertForm?.Buttons, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
133
+ props.onChange({
134
+ ...ruleData,
135
+ AlertForm: {
136
+ ...(alertForm ?? { fields: [] }),
137
+ Buttons: buttons,
138
+ },
139
+ });
140
+ } }));
141
+ })()
142
+ : null] })] }) }), data.AlertProperties?.DisplayNotification ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "alert-preview", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Alert Preview" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Preview how the notification will appear when triggered" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: !isScheduled &&
143
+ typeof data.AlertForm === 'string' ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Preview not available because form is dynamically driven" })) : ((0, jsx_runtime_1.jsx)(exports.AlertPreview, { alertDefinition: data, api: api })) })] }) })) : null] }));
144
144
  };
145
145
  exports.AlertNotificationWizardSection = AlertNotificationWizardSection;
@@ -8,10 +8,11 @@ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
8
8
  const Tag_1 = require("../../../components/Tag");
9
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
10
10
  const getAvailablePredicates_1 = require("../Utilities/getAvailablePredicates");
11
- const Tabs_1 = require("../../../components/Tabs");
12
11
  const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
13
- const GeneralConstants_1 = require("./../../../Utilities/Constants/GeneralConstants");
12
+ const Card_1 = require("../../../components/Card");
14
13
  const Flex_1 = require("../../../components/Flex");
14
+ const GeneralConstants_1 = require("./../../../Utilities/Constants/GeneralConstants");
15
+ const Flex_2 = require("../../../components/Flex");
15
16
  const getRuleStepDescription = (alertType) => {
16
17
  switch (alertType) {
17
18
  case 'DataChange':
@@ -56,7 +57,7 @@ const RowChangeEditor = (props) => {
56
57
  },
57
58
  });
58
59
  };
59
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Change" }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { onClick: () => handleRowAddedChange(), checked: expression?.includes(GeneralConstants_1.OBSERVABLE_EXPRESSION_ROW_ADDED), children: "Row Added" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { onClick: () => handleRowRemovedChange(), checked: expression?.includes(GeneralConstants_1.OBSERVABLE_EXPRESSION_ROW_REMOVED), children: "Row Removed" })] })] }) }));
60
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_2.Box, { className: "twa:font-medium", children: "Row Change" }), (0, jsx_runtime_1.jsx)(Flex_2.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which type of Row Change will trigger the Alert" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { onClick: () => handleRowAddedChange(), checked: expression?.includes(GeneralConstants_1.OBSERVABLE_EXPRESSION_ROW_ADDED), children: "Row Added" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { onClick: () => handleRowRemovedChange(), checked: expression?.includes(GeneralConstants_1.OBSERVABLE_EXPRESSION_ROW_REMOVED), children: "Row Removed" })] })] }) }));
60
61
  };
61
62
  const AlertRulesWizardSection = (props) => {
62
63
  const { data: alertData, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
@@ -33,6 +33,6 @@ const AlertScheduledWizardSection = (props) => {
33
33
  Schedule: scheduleData.Schedule,
34
34
  });
35
35
  };
36
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-3", children: (0, jsx_runtime_1.jsx)(ScheduleScheduleWizard_1.ScheduleBuilderWizard, { onChange: handleScheduleChange }) }));
36
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: (0, jsx_runtime_1.jsx)(ScheduleScheduleWizard_1.ScheduleBuilderWizard, { onChange: handleScheduleChange }) }));
37
37
  };
38
38
  exports.AlertScheduledWizardSection = AlertScheduledWizardSection;