@gooddata/sdk-ui-dashboard 11.45.0-alpha.0 → 11.45.0-alpha.2

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 (229) hide show
  1. package/NOTICE +3 -3
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +2 -2
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +2 -2
  7. package/esm/kdaDialog/composition/KeyDriversPanel.d.ts.map +1 -1
  8. package/esm/kdaDialog/composition/KeyDriversPanel.js +3 -1
  9. package/esm/model/commandHandlers/dashboard/common/loadAutomationsData.js +1 -1
  10. package/esm/model/commandHandlers/dashboard/common/loadNotificationChannelsCount.d.ts.map +1 -1
  11. package/esm/model/commandHandlers/dashboard/common/loadNotificationChannelsCount.js +19 -25
  12. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.d.ts +1 -2
  13. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.d.ts.map +1 -1
  14. package/esm/model/commandHandlers/dashboard/common/loadWorkspaceAutomationsCount.js +18 -7
  15. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  16. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +3 -6
  17. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  18. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +2 -5
  19. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.d.ts +1 -1
  20. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.d.ts.map +1 -1
  21. package/esm/model/commandHandlers/scheduledEmail/loadNotificationChannels.js +3 -5
  22. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.d.ts.map +1 -1
  23. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.js +4 -8
  24. package/esm/model/queryServices/queryWidgetFilters.d.ts.map +1 -1
  25. package/esm/model/queryServices/queryWidgetFilters.js +1 -5
  26. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts +3 -3
  27. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts.map +1 -1
  28. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js +2 -4
  29. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts +3 -3
  30. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts.map +1 -1
  31. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js +21 -27
  32. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts.map +1 -1
  33. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js +1 -4
  34. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts +3 -4
  35. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.d.ts.map +1 -1
  36. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsDialog.js +13 -49
  37. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts +1 -7
  38. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.d.ts.map +1 -1
  39. package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsManagementDialog.js +9 -42
  40. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts +2 -2
  41. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts.map +1 -1
  42. package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.js +20 -28
  43. package/esm/model/react/useDashboardAlerting/useDashboardAlertsData.d.ts.map +1 -1
  44. package/esm/model/react/useDashboardAlerting/useDashboardAlertsData.js +1 -4
  45. package/esm/model/react/useDashboardAlerting/useDashboardAlertsDialog.d.ts.map +1 -1
  46. package/esm/model/react/useDashboardAlerting/useDashboardAlertsDialog.js +3 -10
  47. package/esm/model/react/useDashboardAlerting/useDashboardAlertsManagementDialog.d.ts.map +1 -1
  48. package/esm/model/react/useDashboardAlerting/useDashboardAlertsManagementDialog.js +3 -10
  49. package/esm/model/react/useDashboardAutomations/useDashboardAutomations.d.ts.map +1 -1
  50. package/esm/model/react/useDashboardAutomations/useDashboardAutomations.js +5 -12
  51. package/esm/model/store/config/configSelectors.d.ts +6 -54
  52. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  53. package/esm/model/store/config/configSelectors.js +8 -76
  54. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +1 -10
  55. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
  56. package/esm/model/store/tabs/parameters/parametersHelpers.js +1 -25
  57. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
  58. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
  59. package/esm/model/store/tabs/parameters/parametersSelectors.js +16 -0
  60. package/esm/model/store/topBar/topBarSelectors.d.ts +0 -4
  61. package/esm/model/store/topBar/topBarSelectors.d.ts.map +1 -1
  62. package/esm/model/store/topBar/topBarSelectors.js +5 -13
  63. package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
  64. package/esm/model/store/widgetDrills/widgetDrillSelectors.js +5 -6
  65. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  66. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +21 -52
  67. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts +1 -2
  68. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +1 -1
  69. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.js +2 -3
  70. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.d.ts +18 -0
  71. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.d.ts.map +1 -0
  72. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSubmit.js +48 -0
  73. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts +28 -0
  74. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts.map +1 -0
  75. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.js +43 -0
  76. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts +1 -1
  77. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +1 -1
  78. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.js +2 -2
  79. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +0 -2
  80. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
  81. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +7 -23
  82. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts +1 -2
  83. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts.map +1 -1
  84. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.js +2 -3
  85. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.d.ts +12 -0
  86. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.d.ts.map +1 -0
  87. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/{DefaultAlertingManagementDialogContentEnhanced.js → DefaultAlertingManagementDialogContent.js} +3 -3
  88. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts +1 -1
  89. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +1 -1
  90. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.js +5 -33
  91. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +1 -1
  92. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.js +2 -2
  93. package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.d.ts.map +1 -1
  94. package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.js +2 -2
  95. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  96. package/esm/presentation/automations/connectors/AlertingConnector.js +2 -40
  97. package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -1
  98. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  99. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +2 -39
  100. package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -1
  101. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts +11 -0
  102. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map +1 -0
  103. package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.js +40 -0
  104. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  105. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +5 -14
  106. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +1 -6
  107. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +1 -3
  108. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  109. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  110. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +7 -8
  111. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts +2 -1
  112. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -1
  113. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js +8 -5
  114. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts +2 -1
  115. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -1
  116. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js +8 -5
  117. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts +15 -0
  118. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts.map +1 -0
  119. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.js +16 -0
  120. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts +1 -1
  121. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts.map +1 -1
  122. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js +5 -17
  123. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/{DefaultScheduledEmailManagementDialogContentEnhanced.d.ts → DefaultScheduledEmailManagementDialogContent.d.ts} +3 -3
  124. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -0
  125. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/{DefaultScheduledEmailManagementDialogContentEnhanced.js → DefaultScheduledEmailManagementDialogContent.js} +3 -2
  126. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +1 -3
  127. package/esm/presentation/automations/shared/utils/automationUtils.d.ts +2 -1
  128. package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
  129. package/esm/presentation/automations/shared/utils/automationUtils.js +1 -0
  130. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
  131. package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +2 -3
  132. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts +1 -2
  133. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts.map +1 -1
  134. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.js +2 -2
  135. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts +1 -1
  136. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts.map +1 -1
  137. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.js +8 -5
  138. package/esm/presentation/dashboard/DashboardSidebar/InsightPickerPanel.d.ts.map +1 -1
  139. package/esm/presentation/dashboard/DashboardSidebar/InsightPickerPanel.js +1 -1
  140. package/esm/presentation/deleteDialog/DefaultDeleteDialog.d.ts +1 -1
  141. package/esm/presentation/deleteDialog/DefaultDeleteDialog.d.ts.map +1 -1
  142. package/esm/presentation/deleteDialog/DefaultDeleteDialog.js +3 -8
  143. package/esm/presentation/deleteDialog/types.d.ts +0 -2
  144. package/esm/presentation/deleteDialog/types.d.ts.map +1 -1
  145. package/esm/presentation/deleteDialog/types.js +1 -1
  146. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
  147. package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +4 -9
  148. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
  149. package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +11 -20
  150. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -1
  151. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +2 -3
  152. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
  153. package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +2 -3
  154. package/esm/presentation/insightList/InsightList.d.ts.map +1 -1
  155. package/esm/presentation/insightList/InsightList.js +62 -9
  156. package/esm/presentation/insightList/InsightListDivider.d.ts +5 -0
  157. package/esm/presentation/insightList/InsightListDivider.d.ts.map +1 -0
  158. package/esm/presentation/insightList/InsightListDivider.js +12 -0
  159. package/esm/presentation/insightList/types.d.ts +3 -2
  160. package/esm/presentation/insightList/types.d.ts.map +1 -1
  161. package/esm/presentation/insightList/types.js +1 -0
  162. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -12
  163. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  164. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -12
  165. package/esm/presentation/topBar/menuButton/useDefaultMenuItems.d.ts.map +1 -1
  166. package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +5 -28
  167. package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.d.ts.map +1 -1
  168. package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.js +2 -3
  169. package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.d.ts.map +1 -1
  170. package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.js +1 -3
  171. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
  172. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +2 -3
  173. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +1 -3
  174. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
  175. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
  176. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +1 -3
  177. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
  178. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +4 -4
  179. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.d.ts.map +1 -1
  180. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +2 -3
  181. package/esm/presentation/widget/insight/configuration/InsightConfiguration.d.ts.map +1 -1
  182. package/esm/presentation/widget/insight/configuration/InsightConfiguration.js +3 -5
  183. package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts.map +1 -1
  184. package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js +2 -3
  185. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.d.ts.map +1 -1
  186. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.js +8 -21
  187. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.d.ts +0 -1
  188. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.d.ts.map +1 -1
  189. package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/types.js +1 -1
  190. package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
  191. package/esm/presentation/widget/richText/EditModeDashboardRichText.js +4 -13
  192. package/esm/presentation/widget/richText/ViewModeDashboardRichText.d.ts.map +1 -1
  193. package/esm/presentation/widget/richText/ViewModeDashboardRichText.js +2 -3
  194. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  195. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +7 -7
  196. package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +7 -5
  197. package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.d.ts.map +1 -1
  198. package/esm/presentation/widget/widget/InsightWidget/useAlertingAndScheduling.js +2 -5
  199. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.d.ts.map +1 -1
  200. package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js +1 -5
  201. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts.map +1 -1
  202. package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js +0 -3
  203. package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.d.ts.map +1 -1
  204. package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.js +2 -5
  205. package/esm/sdk-ui-dashboard.d.ts +7 -77
  206. package/package.json +21 -20
  207. package/styles/css/main.css +12 -0
  208. package/styles/css/main.css.map +1 -1
  209. package/styles/css/sidebar.css +12 -0
  210. package/styles/css/sidebar.css.map +1 -1
  211. package/styles/scss/sidebar.scss +12 -0
  212. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts +0 -15
  213. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts.map +0 -1
  214. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.js +0 -33
  215. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts +0 -12
  216. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts.map +0 -1
  217. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts +0 -12
  218. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts.map +0 -1
  219. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.js +0 -43
  220. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.d.ts +0 -13
  221. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.d.ts.map +0 -1
  222. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.js +0 -33
  223. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentEnhanced.d.ts.map +0 -1
  224. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts +0 -13
  225. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts.map +0 -1
  226. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js +0 -42
  227. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts +0 -43
  228. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts.map +0 -1
  229. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +0 -303
@@ -1,303 +0,0 @@
1
- // (C) 2022-2026 GoodData Corporation
2
- import { useCallback, useEffect, useMemo, useState } from "react";
3
- import { v4 as uuidv4 } from "uuid";
4
- import { fillMissingTitles, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
5
- import { useToastMessage } from "@gooddata/sdk-ui-kit";
6
- import { refreshAutomations } from "../../../../../../model/commands/scheduledEmail.js";
7
- import { useDashboardDispatch, useDashboardSelector, } from "../../../../../../model/react/DashboardStoreProvider.js";
8
- import { DEFAULT_MAX_AUTOMATIONS } from "../../../../../../model/react/useDashboardAutomations/constants.js";
9
- import { useDashboardUserInteraction } from "../../../../../../model/react/useDashboardUserInteraction.js";
10
- import { useWorkspaceUsers } from "../../../../../../model/react/useWorkspaceUsers.js";
11
- import { dispatchAndWaitFor } from "../../../../../../model/store/_infra/dispatchAndWaitFor.js";
12
- import { selectAllAutomationsCount, selectDashboardUserAutomationAlertsInContext, } from "../../../../../../model/store/automations/automationsSelectors.js";
13
- import { selectCatalogAttributes, selectCatalogDateDatasets, } from "../../../../../../model/store/catalog/catalogSelectors.js";
14
- import { selectEnableAlertAttributes, selectEnableComparisonInAlerting, selectLocale, selectSeparators, selectSettings, } from "../../../../../../model/store/config/configSelectors.js";
15
- import { selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, selectMaxAutomationRecipients, } from "../../../../../../model/store/entitlements/entitlementsSelectors.js";
16
- import { selectExecutionResultByRef } from "../../../../../../model/store/executionResults/executionResultsSelectors.js";
17
- import { selectInsightByWidgetRef } from "../../../../../../model/store/insights/insightsSelectors.js";
18
- import { selectDashboardDescriptor, selectDashboardId, } from "../../../../../../model/store/meta/metaSelectors.js";
19
- import { selectNotificationChannels } from "../../../../../../model/store/notificationChannels/notificationChannelsSelectors.js";
20
- import { selectCanCreateAutomation, selectCanManageWorkspace, } from "../../../../../../model/store/permissions/permissionsSelectors.js";
21
- import { selectExecutionTimestamp } from "../../../../../../model/store/ui/uiSelectors.js";
22
- import { selectCurrentUser } from "../../../../../../model/store/user/userSelectors.js";
23
- import { messages } from "../../../../../automations/alerting/DefaultAlertingDialog/messages.js";
24
- import { createDefaultAlert } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/convertors.js";
25
- import { getMeasureFormatsFromExecution } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/getters.js";
26
- import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../../../../../automations/alerting/DefaultAlertingDialog/utils/items.js";
27
- import { convertCurrentUserToAutomationRecipient } from "../../../../../automations/shared/utils/automationUtils.js";
28
- import { useSaveAlertToBackend } from "./useSaveAlertToBackend.js";
29
- import { useWidgetAutomationFilters } from "./useWidgetAutomationFilters.js";
30
- export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) => {
31
- const { addSuccess, addError } = useToastMessage();
32
- const { automationInteraction } = useDashboardUserInteraction();
33
- const dispatch = useDashboardDispatch();
34
- const effectiveBackend = useBackendStrict();
35
- const effectiveWorkspace = useWorkspaceStrict();
36
- const alerts = useDashboardSelector(selectDashboardUserAutomationAlertsInContext(widget?.localIdentifier));
37
- const { users, status: usersStatus } = useWorkspaceUsers();
38
- const isLoadingUsers = usersStatus === "pending" || usersStatus === "loading";
39
- const dashboard = useDashboardSelector(selectDashboardId);
40
- const insight = useDashboardSelector(selectInsightByWidgetRef(widget?.ref));
41
- const execResult = useDashboardSelector(selectExecutionResultByRef(widget?.ref));
42
- const isExecutionTimestampMode = !!useDashboardSelector(selectExecutionTimestamp);
43
- const separators = useDashboardSelector(selectSeparators);
44
- const descriptor = useDashboardSelector(selectDashboardDescriptor);
45
- const allAutomationsCount = useDashboardSelector(selectAllAutomationsCount);
46
- const maxAutomationsEntitlement = useDashboardSelector(selectEntitlementMaxAutomations);
47
- const unlimitedAutomationsEntitlement = useDashboardSelector(selectEntitlementUnlimitedAutomations);
48
- const maxAutomationsRecipients = useDashboardSelector(selectMaxAutomationRecipients);
49
- const canManageAttributes = useDashboardSelector(selectEnableAlertAttributes);
50
- const canManageComparison = useDashboardSelector(selectEnableComparisonInAlerting);
51
- const canCreateAutomation = useDashboardSelector(selectCanCreateAutomation);
52
- const catalogAttributes = useDashboardSelector(selectCatalogAttributes);
53
- const catalogDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
54
- const currentUser = useDashboardSelector(selectCurrentUser);
55
- const destinations = useDashboardSelector(selectNotificationChannels);
56
- const canManageAutomations = useDashboardSelector(selectCanManageWorkspace);
57
- const { handleCreateAlert, handleUpdateAlert, handlePauseAlert, handleResumeAlert, isSavingAlert } = useSaveAlertToBackend({
58
- onCreateSuccess: (alert) => {
59
- setViewMode("list");
60
- handleRefreshAutomations();
61
- addSuccess(messages.alertAddSuccess);
62
- const destinationType = destinations.find((channel) => channel.id === alert.notificationChannel)?.destinationType;
63
- automationInteraction({
64
- type: "alertCreated",
65
- destination_id: alert.notificationChannel,
66
- destination_type: destinationType,
67
- automation_id: alert.id,
68
- automation_name: alert.title,
69
- automation_visualization_type: insight?.insight.visualizationUrl,
70
- trigger_type: alert.alert?.trigger?.mode,
71
- });
72
- },
73
- onCreateError: () => {
74
- setViewMode("list");
75
- addError(messages.alertSaveError);
76
- },
77
- onUpdateSuccess: () => {
78
- cancelAlertEditing();
79
- handleRefreshAutomations();
80
- addSuccess(messages.alertUpdateSuccess);
81
- },
82
- onUpdateError: () => {
83
- cancelAlertEditing();
84
- addError(messages.alertSaveError);
85
- },
86
- onPauseSuccess: () => {
87
- handleRefreshAutomations();
88
- addSuccess(messages.alertPauseSuccess);
89
- },
90
- onPauseError: () => {
91
- addError(messages.alertSaveError);
92
- },
93
- onResumeSuccess: () => {
94
- handleRefreshAutomations();
95
- addSuccess(messages.alertResumeSuccess);
96
- },
97
- onResumeError: () => {
98
- addError(messages.alertSaveError);
99
- },
100
- });
101
- const { result: widgetFilters, status: widgetFiltersStatus } = useWidgetAutomationFilters(widget, insight);
102
- const locale = useDashboardSelector(selectLocale);
103
- const settings = useDashboardSelector(selectSettings);
104
- const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight, catalogAttributes, catalogDateDatasets), [insight, catalogAttributes, catalogDateDatasets]);
105
- const [effectiveInsight, setEffectiveInsight] = useState(insight);
106
- useEffect(() => {
107
- if (insight) {
108
- void fillMissingTitles(insight, locale, 9999).then(setEffectiveInsight);
109
- }
110
- }, [insight, locale]);
111
- const supportedMeasures = useMemo(() => getSupportedInsightMeasuresByInsight(effectiveInsight, catalogDateDatasets, canManageComparison), [effectiveInsight, catalogDateDatasets, canManageComparison]);
112
- const defaultMeasure = supportedMeasures[0];
113
- const defaultNotificationChannelId = destinations[0]?.id;
114
- const hasAlerts = alerts.length > 0;
115
- const maxAutomations = parseInt(maxAutomationsEntitlement?.value ?? DEFAULT_MAX_AUTOMATIONS, 10);
116
- const maxAutomationsReached = allAutomationsCount >= maxAutomations && !unlimitedAutomationsEntitlement;
117
- const [isRefreshingAutomations, setIsRefreshingAutomations] = useState(false);
118
- const [isDeletingAlert, setIsDeletingAlert] = useState(false);
119
- const isLoadingFilters = widgetFiltersStatus === "pending" || widgetFiltersStatus === "running";
120
- const [viewMode, setViewMode] = useState(alerts.length > 0 || !canCreateAutomation || isExecutionTimestampMode ? "list" : "create");
121
- const [defaultAlert, setDefaultAlert] = useState(null);
122
- const [editingAlert, setEditingAlert] = useState(null);
123
- const measureFormatMap = useMemo(() => {
124
- return getMeasureFormatsFromExecution(execResult?.executionResult);
125
- }, [execResult?.executionResult]);
126
- const [alertToDelete, setAlertToDelete] = useState(null);
127
- const startDeletingAlert = useCallback((alert) => {
128
- setAlertToDelete(alert);
129
- }, []);
130
- const cancelDeletingAlert = useCallback(() => {
131
- setAlertToDelete(null);
132
- }, []);
133
- // Handle async widget filters and catalog state
134
- useEffect(() => {
135
- if (widgetFiltersStatus === "success" &&
136
- usersStatus === "success" &&
137
- defaultMeasure &&
138
- defaultNotificationChannelId &&
139
- !defaultAlert) {
140
- const alert = createDefaultAlert(widgetFilters, supportedMeasures, defaultMeasure, defaultNotificationChannelId, convertCurrentUserToAutomationRecipient(users ?? [], currentUser), measureFormatMap, undefined, descriptor.evaluationFrequency
141
- ? {
142
- cron: descriptor.evaluationFrequency,
143
- timezone: settings.alertDefault?.defaultTimezone,
144
- }
145
- : undefined);
146
- if (alert) {
147
- setDefaultAlert(alert);
148
- }
149
- }
150
- else if ((widgetFiltersStatus === "error" || usersStatus === "error") && !defaultAlert) {
151
- closeInsightWidgetMenu();
152
- addError(messages.alertLoadingError);
153
- }
154
- }, [
155
- settings.alertDefault,
156
- descriptor.evaluationFrequency,
157
- closeInsightWidgetMenu,
158
- defaultAlert,
159
- defaultMeasure,
160
- defaultNotificationChannelId,
161
- supportedMeasures,
162
- widgetFilters,
163
- addError,
164
- currentUser,
165
- users,
166
- usersStatus,
167
- widgetFiltersStatus,
168
- measureFormatMap,
169
- ]);
170
- useEffect(() => {
171
- if (alerts.length === 0) {
172
- automationInteraction({
173
- type: "alertInitialized",
174
- automation_visualization_type: effectiveInsight?.insight.visualizationUrl,
175
- });
176
- }
177
- }, [alerts.length, automationInteraction, effectiveInsight?.insight.visualizationUrl]);
178
- const initiateAlertCreation = () => {
179
- setViewMode("create");
180
- automationInteraction({
181
- type: "alertInitialized",
182
- automation_visualization_type: effectiveInsight?.insight.visualizationUrl,
183
- });
184
- };
185
- const cancelAlertCreation = () => {
186
- if (hasAlerts) {
187
- setViewMode("list");
188
- }
189
- else {
190
- closeInsightWidgetMenu();
191
- }
192
- };
193
- const initiateAlertEditing = (alert) => {
194
- setEditingAlert(alert);
195
- setViewMode("edit");
196
- };
197
- const cancelAlertEditing = () => {
198
- setEditingAlert(null);
199
- setViewMode("list");
200
- };
201
- const saveNewAlert = (alert) => {
202
- const id = uuidv4();
203
- const alertToCreate = {
204
- ...alert,
205
- id,
206
- ref: { identifier: id, type: "automation" },
207
- uri: id,
208
- dashboard,
209
- metadata: {
210
- widget: widget?.localIdentifier,
211
- filters: alert?.metadata?.filters,
212
- },
213
- details: {
214
- ...alert.details,
215
- widgetName: widget?.title ?? "",
216
- },
217
- };
218
- handleCreateAlert(alertToCreate);
219
- };
220
- const updateExistingAlert = (alert) => {
221
- handleUpdateAlert(alert);
222
- };
223
- const pauseExistingAlert = (alert) => {
224
- const alertToPause = {
225
- ...alert,
226
- alert: { ...alert.alert, trigger: { ...alert.alert?.trigger, state: "PAUSED" } },
227
- };
228
- handlePauseAlert(alertToPause);
229
- };
230
- const resumeExistingAlert = (alert) => {
231
- const alertToResume = {
232
- ...alert,
233
- alert: { ...alert.alert, trigger: { ...alert.alert?.trigger, state: "ACTIVE" } },
234
- };
235
- handleResumeAlert(alertToResume);
236
- };
237
- const deleteExistingAlert = async (alert) => {
238
- setIsDeletingAlert(true);
239
- const alertCreatorId = alert.createdBy?.login;
240
- const currentUserId = currentUser?.login;
241
- const isAlertCreatedByCurrentUser = !!alertCreatorId && !!currentUserId && alertCreatorId === currentUserId;
242
- const automationService = effectiveBackend.workspace(effectiveWorkspace).automations();
243
- // If alert is created by current user, or user has permissions to manage automations, delete it, otherwise unsubscribe
244
- const deleteMethod = canManageAutomations || isAlertCreatedByCurrentUser
245
- ? automationService.deleteAutomation.bind(automationService)
246
- : automationService.unsubscribeAutomation.bind(automationService);
247
- try {
248
- setAlertToDelete(null);
249
- await deleteMethod(alert.id);
250
- addSuccess(messages.alertDeleteSuccess);
251
- setIsDeletingAlert(false);
252
- setViewMode(alerts.length === 1 ? "create" : "list");
253
- handleRefreshAutomations();
254
- }
255
- catch {
256
- addError(messages.alertDeleteError);
257
- setIsDeletingAlert(false);
258
- }
259
- };
260
- const handleRefreshAutomations = useCallback(() => {
261
- setIsRefreshingAutomations(true);
262
- dispatchAndWaitFor(dispatch, refreshAutomations())
263
- .then(() => {
264
- setIsRefreshingAutomations(false);
265
- })
266
- .catch(() => setIsRefreshingAutomations(false));
267
- }, [dispatch]);
268
- return {
269
- isLoading: isSavingAlert || isLoadingFilters || isRefreshingAutomations || isDeletingAlert || isLoadingUsers,
270
- destinations,
271
- users,
272
- alerts,
273
- viewMode,
274
- editingAlert,
275
- creatingAlert: defaultAlert,
276
- initiateAlertCreation,
277
- initiateAlertEditing,
278
- updateExistingAlert,
279
- saveNewAlert,
280
- pauseExistingAlert,
281
- resumeExistingAlert,
282
- alertToDelete,
283
- startDeletingAlert,
284
- cancelDeletingAlert,
285
- deleteExistingAlert,
286
- cancelAlertEditing,
287
- cancelAlertCreation,
288
- hasAlerts,
289
- execResult,
290
- separators,
291
- supportedMeasures,
292
- supportedAttributes,
293
- maxAutomationsReached,
294
- maxAutomationsRecipients,
295
- canManageAttributes,
296
- canManageComparison,
297
- canCreateAutomation,
298
- measureFormatMap,
299
- catalogAttributes: catalogAttributes ?? [],
300
- catalogDateDatasets: catalogDateDatasets ?? [],
301
- isExecutionTimestampMode,
302
- };
303
- };