@gooddata/sdk-ui-dashboard 11.45.0-alpha.1 → 11.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/NOTICE +3 -3
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.d.ts.map +1 -1
  4. package/esm/__version.js +1 -1
  5. package/esm/index.d.ts +2 -2
  6. package/esm/index.d.ts.map +1 -1
  7. package/esm/index.js +2 -2
  8. package/esm/kdaDialog/composition/KeyDriversPanel.d.ts.map +1 -1
  9. package/esm/kdaDialog/composition/KeyDriversPanel.js +3 -1
  10. package/esm/model/commandHandlers/dashboard/common/loadAutomationsData.js +1 -1
  11. package/esm/model/commandHandlers/dashboard/common/loadNotificationChannelsCount.d.ts.map +1 -1
  12. package/esm/model/commandHandlers/dashboard/common/loadNotificationChannelsCount.js +19 -25
  13. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.d.ts +1 -2
  14. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.d.ts.map +1 -1
  15. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.js +18 -7
  16. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  17. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +3 -6
  18. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  19. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +2 -5
  20. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.d.ts +1 -1
  21. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.d.ts.map +1 -1
  22. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.js +3 -5
  23. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.d.ts.map +1 -1
  24. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.js +4 -8
  25. package/esm/model/queryServices/queryWidgetFilters.d.ts.map +1 -1
  26. package/esm/model/queryServices/queryWidgetFilters.js +1 -5
  27. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts +3 -3
  28. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts.map +1 -1
  29. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js +2 -4
  30. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts +3 -3
  31. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts.map +1 -1
  32. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js +21 -27
  33. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts.map +1 -1
  34. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js +1 -4
  35. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts +3 -4
  36. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts.map +1 -1
  37. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.js +13 -49
  38. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts +1 -7
  39. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts.map +1 -1
  40. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.js +9 -42
  41. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts +2 -2
  42. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts.map +1 -1
  43. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.js +20 -28
  44. package/esm/model/react/useDashboardAlerting/useDashboardAlertsData.d.ts.map +1 -1
  45. package/esm/model/react/useDashboardAlerting/useDashboardAlertsData.js +1 -4
  46. package/esm/model/react/useDashboardAlerting/useDashboardAlertsDialog.d.ts.map +1 -1
  47. package/esm/model/react/useDashboardAlerting/useDashboardAlertsDialog.js +3 -10
  48. package/esm/model/react/useDashboardAlerting/useDashboardAlertsManagementDialog.d.ts.map +1 -1
  49. package/esm/model/react/useDashboardAlerting/useDashboardAlertsManagementDialog.js +3 -10
  50. package/esm/model/react/useDashboardAutomations/useDashboardAutomations.d.ts.map +1 -1
  51. package/esm/model/react/useDashboardAutomations/useDashboardAutomations.js +5 -12
  52. package/esm/model/store/config/configSelectors.d.ts +6 -54
  53. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  54. package/esm/model/store/config/configSelectors.js +8 -76
  55. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +1 -10
  56. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
  57. package/esm/model/store/tabs/parameters/parametersHelpers.js +1 -25
  58. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
  59. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
  60. package/esm/model/store/tabs/parameters/parametersSelectors.js +16 -0
  61. package/esm/model/store/topBar/topBarSelectors.d.ts +0 -4
  62. package/esm/model/store/topBar/topBarSelectors.d.ts.map +1 -1
  63. package/esm/model/store/topBar/topBarSelectors.js +5 -13
  64. package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
  65. package/esm/model/store/widgetDrills/widgetDrillSelectors.js +5 -6
  66. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  67. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +21 -52
  68. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts +1 -2
  69. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +1 -1
  70. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.js +2 -3
  71. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.d.ts +18 -0
  72. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.d.ts.map +1 -0
  73. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.js +48 -0
  74. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts +28 -0
  75. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts.map +1 -0
  76. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.js +43 -0
  77. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts +1 -1
  78. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +1 -1
  79. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.js +2 -2
  80. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +0 -2
  81. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
  82. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +7 -23
  83. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts +1 -2
  84. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts.map +1 -1
  85. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.js +2 -3
  86. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.d.ts +12 -0
  87. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.d.ts.map +1 -0
  88. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/{DefaultAlertingManagementDialogContentEnhanced.js → DefaultAlertingManagementDialogContent.js} +3 -3
  89. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts +1 -1
  90. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +1 -1
  91. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.js +5 -33
  92. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +1 -1
  93. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.js +2 -2
  94. package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.d.ts.map +1 -1
  95. package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.js +2 -2
  96. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  97. package/esm/presentation/automations/connectors/AlertingConnector.js +2 -40
  98. package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -1
  99. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  100. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +2 -39
  101. package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -1
  102. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts +11 -0
  103. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map +1 -0
  104. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.js +40 -0
  105. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  106. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +5 -14
  107. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +1 -6
  108. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +1 -3
  109. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  110. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  111. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +7 -8
  112. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts +2 -1
  113. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -1
  114. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js +8 -5
  115. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts +2 -1
  116. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -1
  117. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js +8 -5
  118. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts +15 -0
  119. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts.map +1 -0
  120. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.js +16 -0
  121. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts +1 -1
  122. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts.map +1 -1
  123. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js +5 -17
  124. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/{DefaultScheduledEmailManagementDialogContentEnhanced.d.ts → DefaultScheduledEmailManagementDialogContent.d.ts} +3 -3
  125. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -0
  126. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/{DefaultScheduledEmailManagementDialogContentEnhanced.js → DefaultScheduledEmailManagementDialogContent.js} +3 -2
  127. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +1 -3
  128. package/esm/presentation/automations/shared/utils/automationUtils.d.ts +2 -1
  129. package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
  130. package/esm/presentation/automations/shared/utils/automationUtils.js +1 -0
  131. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
  132. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +2 -3
  133. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts +1 -2
  134. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts.map +1 -1
  135. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.js +2 -2
  136. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts +1 -1
  137. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts.map +1 -1
  138. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.js +8 -5
  139. package/esm/presentation/dashboard/DashboardSidebar/InsightPickerPanel.d.ts.map +1 -1
  140. package/esm/presentation/dashboard/DashboardSidebar/InsightPickerPanel.js +1 -1
  141. package/esm/presentation/deleteDialog/DefaultDeleteDialog.d.ts +1 -1
  142. package/esm/presentation/deleteDialog/DefaultDeleteDialog.d.ts.map +1 -1
  143. package/esm/presentation/deleteDialog/DefaultDeleteDialog.js +3 -8
  144. package/esm/presentation/deleteDialog/types.d.ts +0 -2
  145. package/esm/presentation/deleteDialog/types.d.ts.map +1 -1
  146. package/esm/presentation/deleteDialog/types.js +1 -1
  147. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
  148. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +4 -9
  149. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  150. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +11 -20
  151. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -1
  152. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +2 -3
  153. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
  154. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +2 -3
  155. package/esm/presentation/insightList/InsightList.d.ts.map +1 -1
  156. package/esm/presentation/insightList/InsightList.js +62 -9
  157. package/esm/presentation/insightList/InsightListDivider.d.ts +5 -0
  158. package/esm/presentation/insightList/InsightListDivider.d.ts.map +1 -0
  159. package/esm/presentation/insightList/InsightListDivider.js +12 -0
  160. package/esm/presentation/insightList/types.d.ts +3 -2
  161. package/esm/presentation/insightList/types.d.ts.map +1 -1
  162. package/esm/presentation/insightList/types.js +1 -0
  163. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -12
  164. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  165. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -12
  166. package/esm/presentation/topBar/menuButton/useDefaultMenuItems.d.ts.map +1 -1
  167. package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +5 -28
  168. package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.d.ts.map +1 -1
  169. package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.js +2 -3
  170. package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.d.ts.map +1 -1
  171. package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.js +1 -3
  172. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
  173. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +2 -3
  174. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +1 -3
  175. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
  176. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
  177. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +1 -3
  178. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
  179. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +4 -4
  180. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.d.ts.map +1 -1
  181. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +2 -3
  182. package/esm/presentation/widget/insight/configuration/InsightConfiguration.d.ts.map +1 -1
  183. package/esm/presentation/widget/insight/configuration/InsightConfiguration.js +3 -5
  184. package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts.map +1 -1
  185. package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js +2 -3
  186. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.d.ts.map +1 -1
  187. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.js +8 -21
  188. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.d.ts +0 -1
  189. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.d.ts.map +1 -1
  190. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.js +1 -1
  191. package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
  192. package/esm/presentation/widget/richText/EditModeDashboardRichText.js +4 -13
  193. package/esm/presentation/widget/richText/ViewModeDashboardRichText.d.ts.map +1 -1
  194. package/esm/presentation/widget/richText/ViewModeDashboardRichText.js +2 -3
  195. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  196. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +7 -7
  197. package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +7 -5
  198. package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.d.ts.map +1 -1
  199. package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.js +2 -5
  200. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.d.ts.map +1 -1
  201. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js +1 -5
  202. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts.map +1 -1
  203. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js +0 -3
  204. package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.d.ts.map +1 -1
  205. package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.js +2 -5
  206. package/esm/sdk-ui-dashboard.d.ts +7 -77
  207. package/package.json +21 -20
  208. package/styles/css/main.css +12 -0
  209. package/styles/css/main.css.map +1 -1
  210. package/styles/css/sidebar.css +12 -0
  211. package/styles/css/sidebar.css.map +1 -1
  212. package/styles/scss/sidebar.scss +12 -0
  213. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts +0 -15
  214. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts.map +0 -1
  215. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.js +0 -33
  216. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts +0 -12
  217. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts.map +0 -1
  218. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts +0 -12
  219. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts.map +0 -1
  220. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.js +0 -43
  221. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.d.ts +0 -13
  222. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.d.ts.map +0 -1
  223. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.js +0 -33
  224. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentEnhanced.d.ts.map +0 -1
  225. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts +0 -13
  226. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts.map +0 -1
  227. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js +0 -42
  228. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts +0 -43
  229. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts.map +0 -1
  230. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +0 -303
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA2BxD,wBAAgB,sBAAsB,CAAC,EACnC,WAAW,EACX,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,EAChB,EAAE,oBAAoB,2CAulBtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,2CAahE"}
1
+ {"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AA0CA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA4BxD,wBAAgB,sBAAsB,CAAC,EACnC,WAAW,EACX,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,EAChB,EAAE,oBAAoB,2CA6iBtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,2CAahE"}
@@ -1,9 +1,8 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2019-2026 GoodData Corporation
3
3
  import { useEffect, useMemo, useRef, useState } from "react";
4
- import cx from "classnames";
5
4
  import { FormattedMessage, defineMessage, useIntl } from "react-intl";
6
- import { ValidationContextStore, convertError, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
5
+ import { ValidationContextStore, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
7
6
  import { Button, ConfirmDialogBase, ContentDivider, Hyperlink, Message, Overlay, OverlayController, OverlayControllerProvider, ScrollablePanel, UiIcon, UiIconButton, UiTooltip, useId, } from "@gooddata/sdk-ui-kit";
8
7
  import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
9
8
  import { IntlWrapper } from "../../../localization/IntlWrapper.js";
@@ -30,8 +29,9 @@ import { AlertTriggerIntervalSelect } from "./components/AlertTriggerIntervalSel
30
29
  import { AlertTriggerModeSelect } from "./components/AlertTriggerModeSelect.js";
31
30
  import { ALERTING_DIALOG_ID } from "./constants.js";
32
31
  import { DefaultLoadingAlertingDialog } from "./DefaultLoadingAlertingDialog.js";
32
+ import { useAlertSubmit } from "./hooks/useAlertSubmit.js";
33
33
  import { useEditAlert } from "./hooks/useEditAlert.js";
34
- import { getDescription, getValueSuffix } from "./utils/getters.js";
34
+ import { getValueSuffix } from "./utils/getters.js";
35
35
  import { isAnomalyDetection, isChangeOrDifferenceOperator } from "./utils/guards.js";
36
36
  import { isMobileView } from "./utils/responsive.js";
37
37
  const OVERLAY_POSITION_TYPE = "sameAsTarget";
@@ -40,8 +40,8 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
40
40
  export function AlertingDialogRenderer({ alertToEdit, users, usersError, notificationChannels, insight, widget, onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess, }) {
41
41
  const intl = useIntl();
42
42
  const dialogTitleRef = useRef(null);
43
- const { isWhiteLabeled, isSecondaryTitleVisible, externalRecipient: externalRecipientOverride, features: { enableAlertOncePerInterval, enableAnomalyDetectionAlert, enableAutomationManagement, canUseAiAssistant: enableAiAssistant, }, } = useAutomationsContext();
44
- const { widgetTitle, createAlert, saveAlert } = useAlertingDialogContext();
43
+ const { isWhiteLabeled, isSecondaryTitleVisible, externalRecipient: externalRecipientOverride, features: { enableAlertOncePerInterval, enableAnomalyDetectionAlert, canUseAiAssistant: enableAiAssistant, }, } = useAutomationsContext();
44
+ const { widgetTitle } = useAlertingDialogContext();
45
45
  const [alertToDelete, setAlertToDelete] = useState(null);
46
46
  const handleAlertDeleteSuccess = (alert) => {
47
47
  onDeleteSuccess?.(alert);
@@ -52,7 +52,7 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
52
52
  automationToEdit: alertToEdit,
53
53
  widget,
54
54
  });
55
- const { onTitleChange, onRecipientsChange, onFiltersChange, onApplyCurrentFilters, dropStaleParameters, automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, onMeasureChange, getAttributeValues, onAttributeChange, onComparisonOperatorChange, onRelativeOperatorChange, onAnomalyDetectionChange, onChange, onBlur, onComparisonTypeChange, onDestinationChange, onTriggerModeChange, onTriggerIntervalChange, selectedMeasure, canChangeMeasure, supportedMeasures, canManageAttributes, selectedAttribute, selectedValue, supportedAttributes, catalogAttributes, catalogDateDatasets, isResultLoading, selectedComparisonOperator, selectedRelativeOperator, selectedAiOperator, value, selectedComparator, selectedSensitivity, onSensitivityChange, selectedGranularity, onGranularityChange, canManageComparison, separators, defaultUser, originalAutomation, editedAutomation, allowOnlyLoggedUserRecipients, allowExternalRecipients, warningMessage, validationErrorMessage, isInvalidConnectionToInsight, isSubmitDisabled, isParentValid, thresholdErrorMessage, allowHourlyRecurrence, } = useEditAlert({
55
+ const { onTitleChange, onRecipientsChange, onFiltersChange, onApplyCurrentFilters, dropStaleParameters, automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, onMeasureChange, getAttributeValues, onAttributeChange, onComparisonOperatorChange, onRelativeOperatorChange, onAnomalyDetectionChange, onChange, onBlur, onComparisonTypeChange, onDestinationChange, onTriggerModeChange, onTriggerIntervalChange, selectedMeasure, canChangeMeasure, supportedMeasures, selectedAttribute, selectedValue, supportedAttributes, catalogAttributes, catalogDateDatasets, isResultLoading, selectedComparisonOperator, selectedRelativeOperator, selectedAiOperator, value, selectedComparator, selectedSensitivity, onSensitivityChange, selectedGranularity, onGranularityChange, separators, defaultUser, originalAutomation, editedAutomation, allowOnlyLoggedUserRecipients, allowExternalRecipients, warningMessage, validationErrorMessage, isInvalidConnectionToInsight, isSubmitDisabled, isParentValid, thresholdErrorMessage, allowHourlyRecurrence, } = useEditAlert({
56
56
  insight,
57
57
  widget,
58
58
  alertToEdit,
@@ -71,41 +71,16 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
71
71
  insight,
72
72
  });
73
73
  const [isApplyCurrentFiltersDialogOpen, setIsApplyCurrentFiltersDialogOpen] = useState(!isValid);
74
- const [isSavingAlert, setIsSavingAlert] = useState(false);
75
- const handleSaveAlert = async () => {
76
- if (!editedAutomation || isSavingAlert) {
77
- return;
78
- }
79
- const title = getDescription(intl, supportedMeasures, editedAutomation, separators);
80
- const sanitizedAutomation = editedAutomation.title
81
- ? editedAutomation
82
- : {
83
- ...editedAutomation,
84
- title,
85
- };
86
- setIsSavingAlert(true);
87
- try {
88
- if (alertToEdit) {
89
- const saved = await saveAlert(sanitizedAutomation);
90
- onSaveSuccess?.(saved);
91
- }
92
- else {
93
- const created = await createAlert(sanitizedAutomation);
94
- onSuccess?.(created);
95
- }
96
- }
97
- catch (err) {
98
- if (alertToEdit) {
99
- onSaveError?.(convertError(err));
100
- }
101
- else {
102
- onError?.(convertError(err));
103
- }
104
- }
105
- finally {
106
- setIsSavingAlert(false);
107
- }
108
- };
74
+ const { isSaving, submit } = useAlertSubmit({
75
+ editedAutomation,
76
+ supportedMeasures,
77
+ separators,
78
+ alertToEdit,
79
+ onSuccess,
80
+ onError,
81
+ onSaveSuccess,
82
+ onSaveError,
83
+ });
109
84
  const validationContextValue = useValidationContextValue(createInvalidNode({ id: "AlertingDialog" }));
110
85
  const { setInvalidDatapoints, getInvalidDatapoints } = validationContextValue;
111
86
  const invalidDatapoints = getInvalidDatapoints();
@@ -144,9 +119,7 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
144
119
  } }));
145
120
  }
146
121
  return (_jsxs(_Fragment, { children: [
147
- _jsx(Overlay, { className: "gd-notifications-channels-dialog-overlay", isModal: true, positionType: "fixed", ensureVisibility: true, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ValidationContextStore, { value: validationContextValue, children: _jsxs(ConfirmDialogBase, { className: cx("gd-notifications-channels-dialog s-gd-notifications-channels-dialog", {
148
- "gd-dialog--wide gd-notifications-channels-dialog--wide": enableAutomationManagement,
149
- }), isPositive: true, cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: alertToEdit
122
+ _jsx(Overlay, { className: "gd-notifications-channels-dialog-overlay", isModal: true, positionType: "fixed", ensureVisibility: true, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ValidationContextStore, { value: validationContextValue, children: _jsxs(ConfirmDialogBase, { className: "gd-notifications-channels-dialog s-gd-notifications-channels-dialog gd-dialog--wide gd-notifications-channels-dialog--wide", isPositive: true, cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: alertToEdit
150
123
  ? intl.formatMessage({ id: `save` })
151
124
  : intl.formatMessage({ id: `create` }), accessibilityConfig: {
152
125
  closeButton: {
@@ -154,24 +127,20 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
154
127
  },
155
128
  titleElementId,
156
129
  dialogId: ALERTING_DIALOG_ID,
157
- }, showProgressIndicator: isSavingAlert, returnFocusAfterClose: !enableAutomationManagement, footerLeftRenderer: () => (_jsx(AlertingDialogFooter, { isWhiteLabeled: isWhiteLabeled, helpTextId: helpTextId, alertToEdit: alertToEdit, isSavingAlert: isSavingAlert, onDeleteClick: () => setAlertToDelete(alertToEdit) })), isSubmitDisabled: isSubmitDisabled || isSavingAlert || isExecutionTimestampMode, submitButtonTooltipText: isExecutionTimestampMode
130
+ }, showProgressIndicator: isSaving, returnFocusAfterClose: false, footerLeftRenderer: () => (_jsx(AlertingDialogFooter, { isWhiteLabeled: isWhiteLabeled, helpTextId: helpTextId, alertToEdit: alertToEdit, isSavingAlert: isSaving, onDeleteClick: () => setAlertToDelete(alertToEdit) })), isSubmitDisabled: isSubmitDisabled || isSaving || isExecutionTimestampMode, submitButtonTooltipText: isExecutionTimestampMode
158
131
  ? intl.formatMessage({
159
132
  id: "dialogs.alert.save.executionTimestampMode",
160
133
  })
161
- : undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: () => {
162
- void handleSaveAlert();
163
- }, headline: undefined, headerLeftButtonRenderer: () => (_jsx(AlertingDialogHeader, { title: editedAutomation?.title ?? "", onChange: onTitleChange, onCancel: onCancel, placeholder: intl.formatMessage({
134
+ : undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: () => void submit(), headline: undefined, headerLeftButtonRenderer: () => (_jsx(AlertingDialogHeader, { title: editedAutomation?.title ?? "", onChange: onTitleChange, onCancel: onCancel, placeholder: intl.formatMessage({
164
135
  id: "dialogs.alert.title.placeholder",
165
136
  }), ref: dialogTitleRef, secondaryTitle: secondaryTitle, secondaryTitleIcon: secondaryTitleIcon, isSecondaryTitleVisible: isSecondaryTitleVisible ? isParentValid : undefined })), children: [
166
137
  _jsx("h2", { className: "sr-only", id: titleElementId, children: intl.formatMessage({ id: "dialogs.alert.accessibility.label.title" }) }), _jsxs(ScrollablePanel, { className: "gd-notifications-channel-dialog-content-wrapper gd-notification-channel-dialog-with-automation-filters", children: [
167
138
  _jsx("div", { className: "gd-divider-with-margin" }), _jsxs(_Fragment, { children: [
168
139
  _jsx(AutomationFiltersSelect, { availableFilters: availableFilters, selectedFilters: editedAutomationFilters, onFiltersChange: onFiltersChange, storeFilters: true, onStoreFiltersChange: () => { }, isDashboardAutomation: false, overlayPositionType: OVERLAY_POSITION_TYPE, disableDateFilters: isAnomalyDetection(editedAutomation?.alert), parameters: automationParameters, onParameterChange: onParameterChange, onParameterDelete: onParameterDelete, availableParameters: availableParameters, onParameterAdd: onParameterAdd }), _jsx(ContentDivider, { className: "gd-divider-with-margin" })
169
140
  ] }), _jsxs(FormFieldGroup, { label: _jsx(FormattedMessage, { id: "insightAlert.config.when" }), children: [
170
- _jsx(FormField, { label: intl.formatMessage({ id: "insightAlert.config.metric" }), htmlFor: "alert.measure", children: _jsx(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: onMeasureChange, measures: supportedMeasures, disabled: !canChangeMeasure, overlayPositionType: OVERLAY_POSITION_TYPE, id: "alert.measure", closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), Boolean(canManageAttributes) &&
171
- supportedAttributes.filter((a) => a.type === "attribute").length >
172
- 0 && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.for" }), htmlFor: "alert.attribute", children: _jsx(AlertAttributeSelect, { id: "alert.attribute", disabled: !canChangeMeasure, selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: onAttributeChange, attributes: supportedAttributes, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, getAttributeValues: getAttributeValues, isResultLoading: isResultLoading, showLabel: false, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })), _jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.condition" }), htmlFor: "alert.condition", children: _jsx(AlertComparisonOperatorSelect, { id: "alert.condition", measure: selectedMeasure, enableAnomalyDetectionAlert: enableAnomalyDetectionAlert ? enableAiAssistant : false, selectedComparisonOperator: selectedComparisonOperator, selectedRelativeOperator: selectedRelativeOperator, selectedAiOperator: selectedAiOperator, onAnomalyDetectionChange: onAnomalyDetectionChange, onComparisonOperatorChange: onComparisonOperatorChange, onRelativeOperatorChange: onRelativeOperatorChange, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), !isAnomalyDetection(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.threshold" }), htmlFor: "alert.value", children: _jsx(AlertThresholdInput, { id: "alert.value", value: value, onChange: onChange, onBlur: onBlur, suffix: getValueSuffix(editedAutomation?.alert), errorMessage: thresholdErrorMessage }) })), isChangeOrDifferenceOperator(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.comparison" }), htmlFor: "alert.comparison", children: _jsx(AlertComparisonPeriodSelect, { id: "alert.comparison", measure: selectedMeasure, alert: editedAutomation, selectedComparison: selectedComparator?.comparator, selectedGranularity: selectedComparator?.granularity, onComparisonChange: (comparisonType, granularity) => {
141
+ _jsx(FormField, { label: intl.formatMessage({ id: "insightAlert.config.metric" }), htmlFor: "alert.measure", children: _jsx(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: onMeasureChange, measures: supportedMeasures, disabled: !canChangeMeasure, overlayPositionType: OVERLAY_POSITION_TYPE, id: "alert.measure", closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), supportedAttributes.filter((a) => a.type === "attribute").length > 0 && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.for" }), htmlFor: "alert.attribute", children: _jsx(AlertAttributeSelect, { id: "alert.attribute", disabled: !canChangeMeasure, selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: onAttributeChange, attributes: supportedAttributes, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, getAttributeValues: getAttributeValues, isResultLoading: isResultLoading, showLabel: false, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })), _jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.condition" }), htmlFor: "alert.condition", children: _jsx(AlertComparisonOperatorSelect, { id: "alert.condition", measure: selectedMeasure, enableAnomalyDetectionAlert: enableAnomalyDetectionAlert ? enableAiAssistant : false, selectedComparisonOperator: selectedComparisonOperator, selectedRelativeOperator: selectedRelativeOperator, selectedAiOperator: selectedAiOperator, onAnomalyDetectionChange: onAnomalyDetectionChange, onComparisonOperatorChange: onComparisonOperatorChange, onRelativeOperatorChange: onRelativeOperatorChange, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), !isAnomalyDetection(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.threshold" }), htmlFor: "alert.value", children: _jsx(AlertThresholdInput, { id: "alert.value", value: value, onChange: onChange, onBlur: onBlur, suffix: getValueSuffix(editedAutomation?.alert), errorMessage: thresholdErrorMessage }) })), isChangeOrDifferenceOperator(editedAutomation?.alert) && (_jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.comparison" }), htmlFor: "alert.comparison", children: _jsx(AlertComparisonPeriodSelect, { id: "alert.comparison", measure: selectedMeasure, alert: editedAutomation, selectedComparison: selectedComparator?.comparator, selectedGranularity: selectedComparator?.granularity, onComparisonChange: (comparisonType, granularity) => {
173
142
  onComparisonTypeChange(selectedMeasure, selectedRelativeOperator, comparisonType, granularity);
174
- }, overlayPositionType: OVERLAY_POSITION_TYPE, canManageComparison: canManageComparison, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })), isAnomalyDetection(editedAutomation?.alert) && (_jsxs(_Fragment, { children: [
143
+ }, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) })), isAnomalyDetection(editedAutomation?.alert) && (_jsxs(_Fragment, { children: [
175
144
  _jsx(FormField, { label: _jsx(FormattedMessage, { id: "insightAlert.config.sensitivity" }), htmlFor: "alert.sensitivity", children: _jsx(AlertSensitivitySelect, { id: "alert.sensitivity", selectedSensitivity: selectedSensitivity, onSensitivityChange: onSensitivityChange, overlayPositionType: OVERLAY_POSITION_TYPE, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL }) }), _jsx(FormField, { label: _jsxs("div", { className: "gd-dashboard-alerting-dialog-form-field__content-container-tooltip", children: [
176
145
  _jsx(FormattedMessage, { id: "insightAlert.config.granularity" }), _jsx(UiTooltip, { anchor: _jsx(UiIconButton, { icon: "question", variant: "tertiary", size: "xsmall", accessibilityConfig: {
177
146
  ariaLabel: intl.formatMessage({
@@ -8,9 +8,8 @@ export interface IAlertComparisonPeriodSelectProps {
8
8
  selectedComparison?: AlertMetricComparatorType;
9
9
  selectedGranularity?: DateAttributeGranularity;
10
10
  onComparisonChange: (comparison: AlertMetricComparatorType, granularity?: DateAttributeGranularity) => void;
11
- canManageComparison: boolean;
12
11
  id: string;
13
12
  closeOnParentScroll?: boolean;
14
13
  }
15
- export declare function AlertComparisonPeriodSelect({ alert, measure, overlayPositionType, selectedComparison, selectedGranularity, canManageComparison, onComparisonChange, id, closeOnParentScroll }: IAlertComparisonPeriodSelectProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export declare function AlertComparisonPeriodSelect({ alert, measure, overlayPositionType, selectedComparison, selectedGranularity, onComparisonChange, id, closeOnParentScroll }: IAlertComparisonPeriodSelectProps): import("react/jsx-runtime").JSX.Element | null;
16
15
  //# sourceMappingURL=AlertComparisonPeriodSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlertComparisonPeriodSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAA8B,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAIzG,MAAM,WAAW,iCAAiC;IAC9C,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,kBAAkB,EAAE,CAChB,UAAU,EAAE,yBAAyB,EACrC,WAAW,CAAC,EAAE,wBAAwB,KACrC,IAAI,CAAC;IACV,mBAAmB,EAAE,OAAO,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CAAC,EACxC,KAAK,EACL,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,EAAE,EACF,mBAAmB,EACtB,EAAE,iCAAiC,kDAsKnC"}
1
+ {"version":3,"file":"AlertComparisonPeriodSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAA8B,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAIzG,MAAM,WAAW,iCAAiC;IAC9C,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,kBAAkB,EAAE,CAChB,UAAU,EAAE,yBAAyB,EACrC,WAAW,CAAC,EAAE,wBAAwB,KACrC,IAAI,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CAAC,EACxC,KAAK,EACL,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,EAAE,EACF,mBAAmB,EACtB,EAAE,iCAAiC,kDAqKnC"}
@@ -8,7 +8,7 @@ import { Dropdown, DropdownButton, SingleSelectListItem, UiListbox, } from "@goo
8
8
  import { AlertMetricComparatorType } from "../../types.js";
9
9
  import { translateGranularity } from "../utils/granularity.js";
10
10
  import { isChangeOrDifferenceOperator } from "../utils/guards.js";
11
- export function AlertComparisonPeriodSelect({ alert, measure, overlayPositionType, selectedComparison, selectedGranularity, canManageComparison, onComparisonChange, id, closeOnParentScroll, }) {
11
+ export function AlertComparisonPeriodSelect({ alert, measure, overlayPositionType, selectedComparison, selectedGranularity, onComparisonChange, id, closeOnParentScroll, }) {
12
12
  const intl = useIntl();
13
13
  const selectedOperator = useMemo(() => {
14
14
  return measure?.comparators.find((a) => a.comparator === selectedComparison &&
@@ -77,8 +77,7 @@ export function AlertComparisonPeriodSelect({ alert, measure, overlayPositionTyp
77
77
  }
78
78
  // If the measure has only one comparator, return the label with possibility to
79
79
  // select the comparison period
80
- // If feature flag is not enabled, return the label with the selected comparison period
81
- if (measure?.comparators.length === 1 || !canManageComparison) {
80
+ if (measure?.comparators.length === 1) {
82
81
  return _jsx("div", { className: "gd-edit-alert__measure-info", children: getButtonValue(selectedOperator, intl) });
83
82
  }
84
83
  return (_jsx(Dropdown, { closeOnParentScroll: closeOnParentScroll, overlayPositionType: overlayPositionType, autofocusOnOpen: true, renderButton: ({ isOpen, toggleDropdown, buttonRef, dropdownId }) => {
@@ -0,0 +1,18 @@
1
+ import { type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type ISeparators } from "@gooddata/sdk-model";
2
+ import { type GoodDataSdkError } from "@gooddata/sdk-ui";
3
+ import { type AlertMetric } from "../../types.js";
4
+ export interface IUseAlertSubmitProps {
5
+ editedAutomation: IAutomationMetadataObjectDefinition | undefined;
6
+ supportedMeasures: AlertMetric[];
7
+ separators?: ISeparators;
8
+ alertToEdit?: IAutomationMetadataObject;
9
+ onSuccess?: (alert: IAutomationMetadataObject) => void;
10
+ onError?: (error: GoodDataSdkError) => void;
11
+ onSaveSuccess?: (alert: IAutomationMetadataObject) => void;
12
+ onSaveError?: (error: GoodDataSdkError) => void;
13
+ }
14
+ export declare function useAlertSubmit({ editedAutomation, supportedMeasures, separators, alertToEdit, onSuccess, onError, onSaveSuccess, onSaveError }: IUseAlertSubmitProps): {
15
+ isSaving: boolean;
16
+ submit: () => Promise<void>;
17
+ };
18
+ //# sourceMappingURL=useAlertSubmit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertSubmit.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,kBAAkB,CAAC;AAGvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,oBAAoB;IACjC,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,cAAc,CAAC,EAC3B,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,EACb,WAAW,EACd,EAAE,oBAAoB,GAAG;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B,CA4CA"}
@@ -0,0 +1,48 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useRef, useState } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import { convertError } from "@gooddata/sdk-ui";
5
+ import { useAlertingDialogContext } from "../../../contexts/AlertingDialogContext.js";
6
+ import { getDescription } from "../utils/getters.js";
7
+ export function useAlertSubmit({ editedAutomation, supportedMeasures, separators, alertToEdit, onSuccess, onError, onSaveSuccess, onSaveError, }) {
8
+ const intl = useIntl();
9
+ const { createAlert, saveAlert } = useAlertingDialogContext();
10
+ const [isSaving, setIsSaving] = useState(false);
11
+ const submitInFlight = useRef(false);
12
+ const submit = async () => {
13
+ if (!editedAutomation || submitInFlight.current) {
14
+ return;
15
+ }
16
+ submitInFlight.current = true;
17
+ setIsSaving(true);
18
+ try {
19
+ const sanitizedAutomation = editedAutomation.title
20
+ ? editedAutomation
21
+ : {
22
+ ...editedAutomation,
23
+ title: getDescription(intl, supportedMeasures, editedAutomation, separators),
24
+ };
25
+ if (alertToEdit) {
26
+ const saved = await saveAlert(sanitizedAutomation);
27
+ onSaveSuccess?.(saved);
28
+ }
29
+ else {
30
+ const created = await createAlert(sanitizedAutomation);
31
+ onSuccess?.(created);
32
+ }
33
+ }
34
+ catch (err) {
35
+ if (alertToEdit) {
36
+ onSaveError?.(convertError(err));
37
+ }
38
+ else {
39
+ onError?.(convertError(err));
40
+ }
41
+ }
42
+ finally {
43
+ submitInFlight.current = false;
44
+ setIsSaving(false);
45
+ }
46
+ };
47
+ return { isSaving, submit };
48
+ }
@@ -0,0 +1,28 @@
1
+ import { type IAutomationMetadataObject, type IInsight, type IWidget } from "@gooddata/sdk-model";
2
+ import { type AlertAttribute, type AlertMetric } from "../../types.js";
3
+ import { type IMeasureFormatMap } from "../utils/getters.js";
4
+ import { useAttributeValuesFromExecResults } from "./useAttributeValuesFromExecResults.js";
5
+ export interface IUseAlertSupportedMetricsProps {
6
+ insight?: IInsight;
7
+ widget?: IWidget;
8
+ alertToEdit?: IAutomationMetadataObject;
9
+ }
10
+ /**
11
+ * Extracts the supported-metrics derivation cluster from useEditAlert into a focused hook.
12
+ *
13
+ * Reads `locale`, `catalogDateDatasets`, `catalogAttributes` from `useAutomationsContext()`, and
14
+ * `executionResultByRef` from `useAlertingDialogContext()`.
15
+ *
16
+ * `execResult` and `effectiveInsight` are internal — not returned.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function useAlertSupportedMetrics({ insight, widget, alertToEdit }: IUseAlertSupportedMetricsProps): {
21
+ measureFormatMap: IMeasureFormatMap;
22
+ supportedMeasures: AlertMetric[];
23
+ supportedAttributes: AlertAttribute[];
24
+ isResultLoading: boolean;
25
+ getAttributeValues: ReturnType<typeof useAttributeValuesFromExecResults>["getAttributeValues"];
26
+ getMetricValue: ReturnType<typeof useAttributeValuesFromExecResults>["getMetricValue"];
27
+ };
28
+ //# sourceMappingURL=useAlertSupportedMetrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertSupportedMetrics.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKlG,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,KAAK,iBAAiB,EAAkC,MAAM,qBAAqB,CAAC;AAM7F,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAE3F,MAAM,WAAW,8BAA8B;IAC3C,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,yBAAyB,CAAC;CAC3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,8BAA8B,GAAG;IACxG,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC/F,cAAc,EAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,gBAAgB,CAAC,CAAC;CAC1F,CA8CA"}
@@ -0,0 +1,43 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useEffect, useMemo, useState } from "react";
3
+ import { fillMissingTitles } from "@gooddata/sdk-ui";
4
+ import { useAlertingDialogContext } from "../../../contexts/AlertingDialogContext.js";
5
+ import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
6
+ import { getMeasureFormatsFromExecution } from "../utils/getters.js";
7
+ import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../utils/items.js";
8
+ import { useAttributeValuesFromExecResults } from "./useAttributeValuesFromExecResults.js";
9
+ /**
10
+ * Extracts the supported-metrics derivation cluster from useEditAlert into a focused hook.
11
+ *
12
+ * Reads `locale`, `catalogDateDatasets`, `catalogAttributes` from `useAutomationsContext()`, and
13
+ * `executionResultByRef` from `useAlertingDialogContext()`.
14
+ *
15
+ * `execResult` and `effectiveInsight` are internal — not returned.
16
+ *
17
+ * @internal
18
+ */
19
+ export function useAlertSupportedMetrics({ insight, widget, alertToEdit }) {
20
+ const { locale, catalogDateDatasets, catalogAttributes } = useAutomationsContext();
21
+ const { executionResultByRef } = useAlertingDialogContext();
22
+ const execResult = executionResultByRef(widget?.ref);
23
+ const [effectiveInsight, setEffectiveInsight] = useState(insight);
24
+ useEffect(() => {
25
+ if (insight) {
26
+ void fillMissingTitles(insight, locale, 9999).then(setEffectiveInsight);
27
+ }
28
+ }, [insight, locale]);
29
+ const measureFormatMap = useMemo(() => {
30
+ return getMeasureFormatsFromExecution(execResult?.executionResult);
31
+ }, [execResult?.executionResult]);
32
+ const supportedMeasures = useMemo(() => getSupportedInsightMeasuresByInsight(effectiveInsight, catalogDateDatasets, alertToEdit), [effectiveInsight, catalogDateDatasets, alertToEdit]);
33
+ const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight, catalogAttributes, catalogDateDatasets, alertToEdit), [insight, catalogDateDatasets, catalogAttributes, alertToEdit]);
34
+ const { isResultLoading, getAttributeValues, getMetricValue } = useAttributeValuesFromExecResults(execResult);
35
+ return {
36
+ measureFormatMap,
37
+ supportedMeasures,
38
+ supportedAttributes,
39
+ isResultLoading,
40
+ getAttributeValues,
41
+ getMetricValue,
42
+ };
43
+ }
@@ -1,6 +1,6 @@
1
1
  import type { IAutomationMetadataObject, ICatalogDateDataset, IInsight, IWidget } from "@gooddata/sdk-model";
2
2
  export type AlertInvalidityReason = "missingMetric" | "missingWidget";
3
- export declare function useAlertValidation(alert: IAutomationMetadataObject | undefined, widget: IWidget | undefined, insight: IInsight | undefined, catalogDateDatasets: ICatalogDateDataset[], isNewAlert?: boolean, canManageComparison?: boolean): {
3
+ export declare function useAlertValidation(alert: IAutomationMetadataObject | undefined, widget: IWidget | undefined, insight: IInsight | undefined, catalogDateDatasets: ICatalogDateDataset[], isNewAlert?: boolean): {
4
4
  isValid: boolean;
5
5
  invalidityReason: AlertInvalidityReason | undefined;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK7G,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEtE,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,yBAAyB,GAAG,SAAS,EAC5C,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,UAAU,CAAC,EAAE,OAAO,EACpB,mBAAmB,GAAE,OAAe,GACrC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,qBAAqB,GAAG,SAAS,CAAA;CAAE,CAmB3E"}
1
+ {"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK7G,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEtE,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,yBAAyB,GAAG,SAAS,EAC5C,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,UAAU,CAAC,EAAE,OAAO,GACrB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,qBAAqB,GAAG,SAAS,CAAA;CAAE,CAc3E"}
@@ -1,8 +1,8 @@
1
1
  // (C) 2024-2026 GoodData Corporation
2
2
  import { getAlertMeasure } from "../utils/getters.js";
3
3
  import { getSupportedInsightMeasuresByInsight } from "../utils/items.js";
4
- export function useAlertValidation(alert, widget, insight, catalogDateDatasets, isNewAlert, canManageComparison = false) {
5
- const supportedMeasures = getSupportedInsightMeasuresByInsight(insight, catalogDateDatasets, canManageComparison, alert);
4
+ export function useAlertValidation(alert, widget, insight, catalogDateDatasets, isNewAlert) {
5
+ const supportedMeasures = getSupportedInsightMeasuresByInsight(insight, catalogDateDatasets, alert);
6
6
  const selectedMeasureExists = alert ? getAlertMeasure(supportedMeasures, alert.alert) : undefined;
7
7
  const isValid = isNewAlert || Boolean(!!widget && selectedMeasureExists);
8
8
  let invalidityReason = undefined;
@@ -45,7 +45,6 @@ export declare function useEditAlert({ alertToEdit, notificationChannels, insigh
45
45
  selectedMeasure: AlertMetric | undefined;
46
46
  canChangeMeasure: boolean;
47
47
  supportedMeasures: AlertMetric[];
48
- canManageAttributes: boolean;
49
48
  selectedAttribute: AlertAttribute | undefined;
50
49
  selectedValue: string | null | undefined;
51
50
  supportedAttributes: AlertAttribute[];
@@ -60,7 +59,6 @@ export declare function useEditAlert({ alertToEdit, notificationChannels, insigh
60
59
  selectedRelativeOperator: [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined;
61
60
  value: number | undefined;
62
61
  selectedComparator: import("../../types.js").AlertMetricComparator | undefined;
63
- canManageComparison: boolean;
64
62
  separators: import("@gooddata/sdk-model").ISeparators;
65
63
  warningMessage: string | undefined;
66
64
  defaultUser: IWorkspaceUser;
@@ -1 +1 @@
1
- {"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EAItB,MAAM,qBAAqB,CAAC;AAkB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAkCvG,MAAM,WAAW,kBAAkB;IAC/B,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAE9C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,YAAY,CAAC,EACzB,WAAW,EACX,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,KAAK,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EAC5B,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAioBpB"}
1
+ {"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EAItB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AA6BvG,MAAM,WAAW,kBAAkB;IAC/B,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAE9C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,YAAY,CAAC,EACzB,WAAW,EACX,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,KAAK,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EAC5B,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0lBpB"}
@@ -1,9 +1,8 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { useCallback, useEffect, useMemo, useState } from "react";
2
+ import { useCallback, useState } from "react";
3
3
  import { isEqual } from "lodash-es";
4
4
  import { useIntl } from "react-intl";
5
5
  import { isAutomationExternalUserRecipient, isAutomationUnknownUserRecipient, isAutomationUserRecipient, } from "@gooddata/sdk-model";
6
- import { fillMissingTitles } from "@gooddata/sdk-ui";
7
6
  import { useAlertingDialogContext } from "../../../contexts/AlertingDialogContext.js";
8
7
  import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
9
8
  import { isEmail } from "../../../scheduledEmail/utils/validate.js";
@@ -12,35 +11,22 @@ import { useAutomationAlertParameters } from "../../../shared/automationFilters/
12
11
  import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveMvfDimensionalityLocalRefs, } from "../../../shared/automationFilters/utils.js";
13
12
  import { convertCurrentUserToAutomationRecipient, convertCurrentUserToWorkspaceUser, convertExternalRecipientToAutomationRecipient, } from "../../../shared/utils/automationUtils.js";
14
13
  import { createDefaultAlert } from "../utils/convertors.js";
15
- import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, getMeasureFormatsFromExecution, } from "../utils/getters.js";
14
+ import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, } from "../utils/getters.js";
16
15
  import { isAlertValueDefined } from "../utils/guards.js";
17
- import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../utils/items.js";
18
16
  import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, transformAlertByValue, } from "../utils/transformation.js";
17
+ import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
19
18
  import { useAlertValidation } from "./useAlertValidation.js";
20
- import { useAttributeValuesFromExecResults } from "./useAttributeValuesFromExecResults.js";
21
19
  import { useThresholdValue } from "./useThresholdValue.js";
22
20
  export function useEditAlert({ alertToEdit, notificationChannels, insight, widget, users, editedAutomationFilters, maxAutomationsRecipients, setEditedAutomationFilters, availableFiltersAsVisibleFilters, filtersForNewAutomation, externalRecipientOverride, }) {
23
21
  const intl = useIntl();
24
- const { locale, catalogDateDatasets, catalogAttributes, currentUser, separators, weekStart, timezone, settings, allowHourlyRecurrence, features: { enableComparisonInAlerting: canManageComparison, enableAlertAttributes: canManageAttributes, enableAlertOncePerInterval, }, } = useAutomationsContext();
22
+ const { catalogDateDatasets, catalogAttributes, currentUser, separators, weekStart, timezone, settings, allowHourlyRecurrence, features: { enableAlertOncePerInterval }, } = useAutomationsContext();
25
23
  const isInvalidConnectionToInsight = alertToEdit?.metadata?.widget && !insight;
26
- const { executionResultByRef, dashboardId, hiddenFilters: dashboardHiddenFilters, commonDateFilterId, dashboardEvaluationFrequency, widgetLocalIdToTabIdMap: widgetTabMap, parameterValues, } = useAlertingDialogContext();
27
- const execResult = executionResultByRef(widget?.ref);
24
+ const { dashboardId, hiddenFilters: dashboardHiddenFilters, commonDateFilterId, dashboardEvaluationFrequency, widgetLocalIdToTabIdMap: widgetTabMap, parameterValues, } = useAlertingDialogContext();
28
25
  // Determine target tab ID if widget is present
29
26
  const targetTabIdentifier = widget?.localIdentifier ? widgetTabMap[widget.localIdentifier] : undefined;
30
27
  // Computed values
31
28
  const isNewAlert = !alertToEdit;
32
- const [effectiveInsight, setEffectiveInsight] = useState(insight);
33
- useEffect(() => {
34
- if (insight) {
35
- void fillMissingTitles(insight, locale, 9999).then(setEffectiveInsight);
36
- }
37
- }, [insight, locale]);
38
- const measureFormatMap = useMemo(() => {
39
- return getMeasureFormatsFromExecution(execResult?.executionResult);
40
- }, [execResult?.executionResult]);
41
- const supportedMeasures = useMemo(() => getSupportedInsightMeasuresByInsight(effectiveInsight, catalogDateDatasets, canManageComparison, alertToEdit), [effectiveInsight, catalogDateDatasets, canManageComparison, alertToEdit]);
42
- const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight, catalogAttributes, catalogDateDatasets, alertToEdit), [insight, catalogDateDatasets, catalogAttributes, alertToEdit]);
43
- const { isResultLoading, getAttributeValues, getMetricValue } = useAttributeValuesFromExecResults(execResult);
29
+ const { measureFormatMap, supportedMeasures, supportedAttributes, isResultLoading, getAttributeValues, getMetricValue, } = useAlertSupportedMetrics({ insight, widget, alertToEdit });
44
30
  // Default values
45
31
  const defaultMeasure = supportedMeasures[0];
46
32
  const defaultUser = convertCurrentUserToWorkspaceUser(users ?? [], currentUser);
@@ -105,7 +91,7 @@ export function useEditAlert({ alertToEdit, notificationChannels, insight, widge
105
91
  const selectedNotificationChannel = notificationChannels.find((channel) => channel.id === editedAutomation?.notificationChannel);
106
92
  const allowExternalRecipients = selectedNotificationChannel?.allowedRecipients === "external";
107
93
  const allowOnlyLoggedUserRecipients = selectedNotificationChannel?.allowedRecipients === "creator";
108
- const { isValid: isOriginalAutomationValid, invalidityReason } = useAlertValidation(originalAutomation, widget, insight, catalogDateDatasets, undefined, canManageComparison);
94
+ const { isValid: isOriginalAutomationValid, invalidityReason } = useAlertValidation(originalAutomation, widget, insight, catalogDateDatasets, undefined);
109
95
  const isParentValid = invalidityReason !== "missingWidget";
110
96
  //
111
97
  // Handlers
@@ -320,7 +306,6 @@ export function useEditAlert({ alertToEdit, notificationChannels, insight, widge
320
306
  selectedMeasure,
321
307
  canChangeMeasure: !!insight,
322
308
  supportedMeasures,
323
- canManageAttributes,
324
309
  selectedAttribute,
325
310
  selectedValue,
326
311
  supportedAttributes,
@@ -335,7 +320,6 @@ export function useEditAlert({ alertToEdit, notificationChannels, insight, widge
335
320
  selectedRelativeOperator,
336
321
  value,
337
322
  selectedComparator,
338
- canManageComparison,
339
323
  separators,
340
324
  warningMessage,
341
325
  defaultUser,
@@ -4,10 +4,9 @@ import { type AlertAttribute, type AlertMetric } from "../../types.js";
4
4
  * Get supported insight measures by insight
5
5
  * @param insight - insight to get supported measures for
6
6
  * @param dateDatasets - date datasets to filter out date attributes
7
- * @param canManageComparison - flag if user can manage comparison
8
7
  * @param alert - alert to get supported measures for
9
8
  */
10
- export declare function getSupportedInsightMeasuresByInsight(insight: IInsight | null | undefined, dateDatasets?: ICatalogDateDataset[], canManageComparison?: boolean, alert?: IAutomationMetadataObject): AlertMetric[];
9
+ export declare function getSupportedInsightMeasuresByInsight(insight: IInsight | null | undefined, dateDatasets?: ICatalogDateDataset[], alert?: IAutomationMetadataObject): AlertMetric[];
11
10
  /**
12
11
  * Get supported insight attributes by insight
13
12
  * @param insight - insight to get supported attributes for
@@ -1 +1 @@
1
- {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/utils/items.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,yBAAyB,EAE9B,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EAqBhB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAA6B,MAAM,gBAAgB,CAAC;AAgElG;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAChD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,GAAE,mBAAmB,EAAO,EACxC,mBAAmB,GAAE,OAAe,EACpC,KAAK,CAAC,EAAE,yBAAyB,GAClC,WAAW,EAAE,CAoCf;AA4BD;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAClD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,UAAU,EAAE,iBAAiB,EAAE,EAC/B,YAAY,GAAE,mBAAmB,EAAO,EACxC,KAAK,CAAC,EAAE,yBAAyB,GAClC,cAAc,EAAE,CAMlB"}
1
+ {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/utils/items.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,yBAAyB,EAE9B,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EAqBhB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAA6B,MAAM,gBAAgB,CAAC;AAgElG;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAChD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,GAAE,mBAAmB,EAAO,EACxC,KAAK,CAAC,EAAE,yBAAyB,GAClC,WAAW,EAAE,CAoCf;AA4BD;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAClD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,UAAU,EAAE,iBAAiB,EAAE,EAC/B,YAAY,GAAE,mBAAmB,EAAO,EACxC,KAAK,CAAC,EAAE,yBAAyB,GAClC,cAAc,EAAE,CAMlB"}
@@ -41,17 +41,16 @@ const ValidGranularities = [
41
41
  * Get supported insight measures by insight
42
42
  * @param insight - insight to get supported measures for
43
43
  * @param dateDatasets - date datasets to filter out date attributes
44
- * @param canManageComparison - flag if user can manage comparison
45
44
  * @param alert - alert to get supported measures for
46
45
  */
47
- export function getSupportedInsightMeasuresByInsight(insight, dateDatasets = [], canManageComparison = false, alert) {
46
+ export function getSupportedInsightMeasuresByInsight(insight, dateDatasets = [], alert) {
48
47
  const insightType = insight ? insightVisualizationType(insight) : null;
49
48
  const { primaries, others } = collectAllMetric(insight, alert);
50
49
  const simpleMetrics = [
51
50
  ...primaries.map(mapMeasure(true)).filter(Boolean),
52
51
  ...others.map(mapMeasure(false)).filter(Boolean),
53
52
  ];
54
- const validComparisonBuckets = canManageComparison ? getSupportedBucketsForComparison(insightType) : null;
53
+ const validComparisonBuckets = getSupportedBucketsForComparison(insightType);
55
54
  const validComparisonType = insightType === "headline" || validComparisonBuckets || !insight;
56
55
  // If insight is supported for comparison, we need to add comparators
57
56
  if (validComparisonType) {
@@ -0,0 +1,12 @@
1
+ import { type IAutomationMetadataObject } from "@gooddata/sdk-model";
2
+ interface IDefaultAlertingManagementDialogContentProps {
3
+ onAdd?: () => void;
4
+ onClose?: () => void;
5
+ onEdit: (alert: IAutomationMetadataObject) => void;
6
+ }
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare function DefaultAlertingManagementDialogContent({ onAdd, onClose, onEdit }: IDefaultAlertingManagementDialogContentProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=DefaultAlertingManagementDialogContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultAlertingManagementDialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AA6BrE,UAAU,4CAA4C;IAClD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACtD;AAED;;GAEG;AACH,wBAAgB,sCAAsC,CAAC,EACnD,KAAK,EACL,OAAO,EACP,MAAM,EACT,EAAE,4CAA4C,2CAmJ9C"}
@@ -11,6 +11,7 @@ import { AUTOMATIONS_COLUMN_CONFIG, AUTOMATIONS_MAX_HEIGHT } from "../../../cons
11
11
  import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
12
12
  import { useAlertingManagementDialogContext } from "../../contexts/AlertingManagementDialogContext.js";
13
13
  import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
14
+ import { computeUseHostRoute } from "../../shared/utils/automationUtils.js";
14
15
  import { ALERTING_DIALOG_ID } from "../DefaultAlertingDialog/constants.js";
15
16
  import { isMobileView } from "../DefaultAlertingDialog/utils/responsive.js";
16
17
  import { useAlertingDialogAccessibility } from "../hooks/useAlertingDialogAccessibility.js";
@@ -19,7 +20,7 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
19
20
  /**
20
21
  * @internal
21
22
  */
22
- export function DefaultAlertingManagementDialogContentEnhanced({ onAdd, onClose, onEdit, }) {
23
+ export function DefaultAlertingManagementDialogContent({ onAdd, onClose, onEdit, }) {
23
24
  const intl = useIntl();
24
25
  const workspace = useWorkspace();
25
26
  const backend = useBackend();
@@ -28,8 +29,7 @@ export function DefaultAlertingManagementDialogContentEnhanced({ onAdd, onClose,
28
29
  const timezone = useAutomationsContext().timezone;
29
30
  const enableBulkActions = !enableAccessibilityMode;
30
31
  const { returnFocusTo } = useAlertingDialogAccessibility();
31
- const settings = useAutomationsContext().settings;
32
- const useHostRoute = Boolean(settings?.enableShellApplication) && Boolean(settings?.enableShellApplication_dashboards);
32
+ const useHostRoute = computeUseHostRoute(useAutomationsContext().settings);
33
33
  const isMobile = isMobileView();
34
34
  // Check if widget has metrics for alert creation
35
35
  const widget = getWidgetByRef(managementDialogContext.widgetRef);
@@ -2,5 +2,5 @@ import { type IAlertingManagementDialogProps } from "../types.js";
2
2
  /**
3
3
  * @alpha
4
4
  */
5
- export declare function DefaultAlertingManagementDialogNew({ onPauseSuccess, onPauseError, onEdit, onAdd, onDeleteSuccess, onDeleteError, onClose, isLoadingAlertingData, automations }: IAlertingManagementDialogProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DefaultAlertingManagementDialogNew({ onEdit, onAdd, onClose }: IAlertingManagementDialogProps): import("react/jsx-runtime").JSX.Element;
6
6
  //# sourceMappingURL=DefaultAlertingManagementDialogNew.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultAlertingManagementDialogNew.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAOlE;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,EAC/C,cAAc,EACd,YAAY,EACZ,MAAM,EACN,KAAK,EACL,eAAe,EACf,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,WAAW,EACd,EAAE,8BAA8B,2CAuFhC"}
1
+ {"version":3,"file":"DefaultAlertingManagementDialogNew.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAIlE;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,EAC/C,MAAM,EACN,KAAK,EACL,OAAO,EACV,EAAE,8BAA8B,2CAWhC"}