@gooddata/sdk-ui-dashboard 11.43.0-alpha.2 → 11.43.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/NOTICE +4826 -13873
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +4 -4
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +3 -3
  7. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts +2 -2
  8. package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
  9. package/esm/model/commandHandlers/dashboard/common/filterViews.js +1 -5
  10. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +1 -1
  11. package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js +1 -1
  12. package/esm/model/queryServices/queryWidgetFilters.d.ts +1 -1
  13. package/esm/model/queryServices/queryWidgetFilters.d.ts.map +1 -1
  14. package/esm/model/queryServices/queryWidgetFilters.js +19 -36
  15. package/esm/model/react/useWidgetExecConfig.d.ts +5 -3
  16. package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
  17. package/esm/model/react/useWidgetExecConfig.js +8 -4
  18. package/esm/model/store/config/configSelectors.d.ts +0 -6
  19. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  20. package/esm/model/store/config/configSelectors.js +1 -9
  21. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +20 -1
  22. package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
  23. package/esm/model/store/tabs/parameters/parametersHelpers.js +48 -3
  24. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +19 -1
  25. package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
  26. package/esm/model/store/tabs/parameters/parametersSelectors.js +34 -33
  27. package/esm/model/store/topBar/topBarSelectors.d.ts.map +1 -1
  28. package/esm/model/store/topBar/topBarSelectors.js +4 -4
  29. package/esm/presentation/automations/_staging/alerting/AlertingManagementDialog.d.ts +1 -1
  30. package/esm/presentation/automations/_staging/alerting/AlertingManagementDialog.d.ts.map +1 -1
  31. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.js +1 -1
  32. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.js +3 -3
  33. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts +1 -1
  34. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +1 -1
  35. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/Alert.js +2 -2
  36. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts +1 -1
  37. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts.map +1 -1
  38. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.d.ts.map +1 -0
  39. package/esm/presentation/automations/_staging/alerting/{DefaultAlertingDialog → DefaultAlertingManagementDialog}/hooks/useAlertValidation.js +2 -2
  40. package/esm/presentation/automations/alerting/AlertingDialog.d.ts.map +1 -0
  41. package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingDialog.js +1 -1
  42. package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map +1 -0
  43. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +21 -0
  44. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -0
  45. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultAlertingDialog.js +58 -56
  46. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +1 -0
  47. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultLoadingAlertingDialog.js +1 -1
  48. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts.map +1 -0
  49. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts.map +1 -0
  50. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +1 -0
  51. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts.map +1 -0
  52. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts.map +1 -0
  53. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts.map +1 -0
  54. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts.map +1 -0
  55. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts.map +1 -0
  56. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertThresholdInput.d.ts.map +1 -0
  57. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts.map +1 -0
  58. package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts.map +1 -0
  59. package/esm/presentation/automations/alerting/DefaultAlertingDialog/constants.d.ts.map +1 -0
  60. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts +7 -0
  61. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +1 -0
  62. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.js +16 -0
  63. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts +6 -1
  64. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts.map +1 -0
  65. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.js +31 -5
  66. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useEditAlert.d.ts +7 -7
  67. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -0
  68. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useEditAlert.js +15 -45
  69. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useOperators.d.ts.map +1 -0
  70. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useThresholdValue.d.ts.map +1 -0
  71. package/esm/presentation/automations/alerting/DefaultAlertingDialog/messages.d.ts.map +1 -0
  72. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/convertors.d.ts.map +1 -0
  73. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/cron.d.ts.map +1 -0
  74. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/getters.d.ts.map +1 -0
  75. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/granularity.d.ts.map +1 -0
  76. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/guards.d.ts.map +1 -0
  77. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts.map +1 -0
  78. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/responsive.d.ts.map +1 -0
  79. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/threshold.d.ts.map +1 -0
  80. package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/transformation.d.ts.map +1 -0
  81. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts +11 -0
  82. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts.map +1 -0
  83. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js +35 -0
  84. package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.d.ts.map +1 -0
  85. package/esm/presentation/automations/{_staging/alerting → alerting}/hooks/useGetSupportedMeasures.js +2 -6
  86. package/esm/presentation/automations/{_staging/alerting → alerting}/types.d.ts +5 -3
  87. package/esm/presentation/automations/alerting/types.d.ts.map +1 -0
  88. package/esm/presentation/automations/connectors/AlertingConnector.d.ts +27 -0
  89. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -0
  90. package/esm/presentation/automations/connectors/AlertingConnector.js +72 -0
  91. package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.d.ts +15 -0
  92. package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.d.ts.map +1 -0
  93. package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.js +25 -0
  94. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +9 -0
  95. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -0
  96. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +128 -0
  97. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts +2 -0
  98. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts.map +1 -0
  99. package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +66 -0
  100. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  101. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +65 -1
  102. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +27 -0
  103. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +32 -0
  104. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -0
  105. package/esm/presentation/automations/contexts/AlertingDialogContext.js +11 -0
  106. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +20 -1
  107. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  108. package/esm/presentation/automations/contexts/AutomationsContext.js +4 -1
  109. package/esm/presentation/automations/contexts/AutomationsContext.test.js +1 -1
  110. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +1 -1
  111. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
  112. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +20 -14
  113. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts +1 -1
  114. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts.map +1 -1
  115. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.js +1 -1
  116. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js +1 -1
  117. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +19 -0
  118. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.d.ts.map +1 -1
  119. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.js +18 -4
  120. package/esm/presentation/dashboard/components/DashboardRenderer.js +1 -1
  121. package/esm/presentation/dashboard/types.d.ts +1 -1
  122. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  123. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +1 -1
  124. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  125. package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.d.ts.map +1 -1
  126. package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.js +3 -4
  127. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
  128. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +1 -1
  129. package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.d.ts +1 -1
  130. package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.d.ts.map +1 -1
  131. package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.js +6 -28
  132. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts +0 -3
  133. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts.map +1 -1
  134. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.js +16 -3
  135. package/esm/presentation/export/DefaultDashboardExportVariables.d.ts.map +1 -1
  136. package/esm/presentation/export/DefaultDashboardExportVariables.js +13 -8
  137. package/esm/presentation/export/DefaultDashboardExportVariables.test.d.ts +2 -0
  138. package/esm/presentation/export/DefaultDashboardExportVariables.test.d.ts.map +1 -0
  139. package/esm/presentation/export/DefaultDashboardExportVariables.test.js +58 -0
  140. package/esm/presentation/export/types.d.ts +2 -1
  141. package/esm/presentation/export/types.d.ts.map +1 -1
  142. package/esm/presentation/export/useExportData.d.ts.map +1 -1
  143. package/esm/presentation/export/useExportData.js +6 -0
  144. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
  145. package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +14 -5
  146. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -0
  147. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  148. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -0
  149. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +1 -1
  150. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +2 -2
  151. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +1 -1
  152. package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
  153. package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +9 -9
  154. package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.js +1 -1
  155. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +1 -1
  156. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.d.ts +1 -1
  157. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.d.ts.map +1 -1
  158. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.js +1 -1
  159. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +2 -2
  160. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
  161. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -2
  162. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
  163. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +23 -14
  164. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js +1 -1
  165. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +2 -2
  166. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
  167. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +4 -4
  168. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts +3 -3
  169. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +5 -5
  170. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts +0 -11
  171. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts.map +1 -1
  172. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.js +2 -17
  173. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +3 -3
  174. package/esm/sdk-ui-dashboard.d.ts +20 -9
  175. package/package.json +20 -20
  176. package/styles/css/dashboard.css +7 -7
  177. package/styles/css/drillSelect.css +0 -49
  178. package/styles/css/drillSelect.css.map +1 -1
  179. package/styles/css/main.css +10 -61
  180. package/styles/css/main.css.map +1 -1
  181. package/styles/css/notifications_channels_dialog.css +7 -7
  182. package/styles/css/topBar.css +3 -5
  183. package/styles/css/topBar.css.map +1 -1
  184. package/styles/scss/drillSelect.scss +0 -65
  185. package/styles/scss/notifications_channels_dialog.scss +1 -1
  186. package/styles/scss/topBar.scss +3 -9
  187. package/esm/presentation/automations/_staging/alerting/AlertingDialog.d.ts.map +0 -1
  188. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map +0 -1
  189. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +0 -7
  190. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +0 -1
  191. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +0 -1
  192. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts.map +0 -1
  193. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts.map +0 -1
  194. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +0 -1
  195. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts.map +0 -1
  196. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts.map +0 -1
  197. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts.map +0 -1
  198. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts.map +0 -1
  199. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts.map +0 -1
  200. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertThresholdInput.d.ts.map +0 -1
  201. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts.map +0 -1
  202. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts.map +0 -1
  203. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/constants.d.ts.map +0 -1
  204. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +0 -1
  205. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts.map +0 -1
  206. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +0 -1
  207. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useOperators.d.ts.map +0 -1
  208. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useThresholdValue.d.ts.map +0 -1
  209. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/messages.d.ts.map +0 -1
  210. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/convertors.d.ts.map +0 -1
  211. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/cron.d.ts.map +0 -1
  212. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/getters.d.ts.map +0 -1
  213. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/granularity.d.ts.map +0 -1
  214. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/guards.d.ts.map +0 -1
  215. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/items.d.ts.map +0 -1
  216. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/responsive.d.ts.map +0 -1
  217. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/threshold.d.ts.map +0 -1
  218. package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/transformation.d.ts.map +0 -1
  219. package/esm/presentation/automations/_staging/alerting/hooks/useGetSupportedMeasures.d.ts.map +0 -1
  220. package/esm/presentation/automations/_staging/alerting/types.d.ts.map +0 -1
  221. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.d.ts +0 -2
  222. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.d.ts.map +0 -1
  223. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.js +0 -28
  224. /package/esm/presentation/automations/_staging/alerting/{DefaultAlertingDialog → DefaultAlertingManagementDialog}/hooks/useAlertValidation.d.ts +0 -0
  225. /package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingDialog.d.ts +0 -0
  226. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/AlertingDialogHeader.d.ts +0 -0
  227. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/AlertingDialogHeader.js +0 -0
  228. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts +0 -0
  229. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts +0 -0
  230. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertAttributeSelect.js +0 -0
  231. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts +0 -0
  232. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.js +0 -0
  233. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts +0 -0
  234. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.js +0 -0
  235. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts +0 -0
  236. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDeleteDialog.js +0 -0
  237. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts +0 -0
  238. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDestinationSelect.js +0 -0
  239. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts +0 -0
  240. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertGranularitySelect.js +0 -0
  241. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts +0 -0
  242. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertMeasureSelect.js +0 -0
  243. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts +0 -0
  244. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertSensitivitySelect.js +0 -0
  245. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertThresholdInput.d.ts +0 -0
  246. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertThresholdInput.js +0 -0
  247. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts +0 -0
  248. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.js +0 -0
  249. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts +0 -0
  250. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerModeSelect.js +0 -0
  251. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/constants.d.ts +0 -0
  252. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/constants.js +0 -0
  253. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useOperators.d.ts +0 -0
  254. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useOperators.js +0 -0
  255. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useThresholdValue.d.ts +0 -0
  256. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useThresholdValue.js +0 -0
  257. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/messages.d.ts +0 -0
  258. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/messages.js +0 -0
  259. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/convertors.d.ts +0 -0
  260. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/convertors.js +0 -0
  261. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/cron.d.ts +0 -0
  262. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/cron.js +0 -0
  263. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/getters.d.ts +0 -0
  264. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/getters.js +0 -0
  265. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/granularity.d.ts +0 -0
  266. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/granularity.js +0 -0
  267. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/guards.d.ts +0 -0
  268. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/guards.js +0 -0
  269. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/items.d.ts +0 -0
  270. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/items.js +0 -0
  271. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/responsive.d.ts +0 -0
  272. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/responsive.js +0 -0
  273. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/threshold.d.ts +0 -0
  274. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/threshold.js +0 -0
  275. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/transformation.d.ts +0 -0
  276. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/transformation.js +0 -0
  277. /package/esm/presentation/automations/{_staging/alerting → alerting}/hooks/useGetSupportedMeasures.d.ts +0 -0
  278. /package/esm/presentation/automations/{_staging/alerting → alerting}/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteAlertConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,KAAK,gBAAgB,EAAsD,MAAM,kBAAkB,CAAC;AAK7G,UAAU,8BAA8B;IACpC,KAAK,EAAE,yBAAyB,CAAC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAgB,wBAAwB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACV,EAAE,8BAA8B,2CA2DhC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FormattedMessage, useIntl } from "react-intl";
3
+ import { convertError, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
4
+ import { ConfirmDialog } from "@gooddata/sdk-ui-kit";
5
+ import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
6
+ export function DeleteAlertConfirmDialog({ alert, onCancel, onSuccess, onError, }) {
7
+ const effectiveBackend = useBackendStrict();
8
+ const effectiveWorkspace = useWorkspaceStrict();
9
+ const intl = useIntl();
10
+ const { features: { canManageWorkspace: canManageAutomations }, currentUser, } = useAutomationsContext();
11
+ const handleDeleteAlert = async () => {
12
+ try {
13
+ const alertCreatorId = alert.createdBy?.login;
14
+ const currentUserId = currentUser?.login;
15
+ const isAlertCreatedByCurrentUser = !!alertCreatorId && !!currentUserId && alertCreatorId === currentUserId;
16
+ const automationService = effectiveBackend.workspace(effectiveWorkspace).automations();
17
+ // If alert is created by current user, or user has permissions to manage automations, delete it, otherwise unsubscribe
18
+ const deleteMethod = canManageAutomations || isAlertCreatedByCurrentUser
19
+ ? automationService.deleteAutomation.bind(automationService)
20
+ : automationService.unsubscribeAutomation.bind(automationService);
21
+ await deleteMethod(alert.id);
22
+ onSuccess?.(alert);
23
+ }
24
+ catch (err) {
25
+ onError?.(convertError(err));
26
+ }
27
+ };
28
+ return (_jsx(ConfirmDialog, { displayCloseButton: true, isPositive: false, headline: intl.formatMessage({ id: "dialogs.alerting.management.delete.dialog" }), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage({ id: "delete" }), onSubmit: () => {
29
+ void handleDeleteAlert();
30
+ }, onClose: onCancel, onCancel: onCancel, className: "gd-notifications-channel-delete-dialog s-alert-delete-dialog", containerClassName: "gd-notifications-channel-delete-dialog-overlay", children: _jsx("span", { className: "s-alert-delete-dialog-content", children: _jsx(FormattedMessage, { id: "dialogs.alerting.management.delete.dialog.confirm", values: {
31
+ b: (chunks) => (_jsxs("span", { className: "gd-notifications-channel-delete-dialog-text", children: [chunks, " ",
32
+ _jsx("strong", { children: alert.title })
33
+ ] })),
34
+ } }) }) }));
35
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetSupportedMeasures.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/hooks/useGetSupportedMeasures.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kDAiBnC,CAAC"}
@@ -1,9 +1,7 @@
1
1
  // (C) 2025-2026 GoodData Corporation
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { fillMissingTitles } from "@gooddata/sdk-ui";
4
- import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
5
- import { selectCatalogDateDatasets } from "../../../../../model/store/catalog/catalogSelectors.js";
6
- import { selectEnableComparisonInAlerting, selectLocale, } from "../../../../../model/store/config/configSelectors.js";
4
+ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
7
5
  import { getSupportedInsightMeasuresByInsight } from "../DefaultAlertingDialog/utils/items.js";
8
6
  /**
9
7
  * Hook that calculates supported alertable measures for an insight.
@@ -13,9 +11,7 @@ import { getSupportedInsightMeasuresByInsight } from "../DefaultAlertingDialog/u
13
11
  * @internal
14
12
  */
15
13
  export const useGetSupportedMeasures = (insight) => {
16
- const catalogDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
17
- const canManageComparison = useDashboardSelector(selectEnableComparisonInAlerting);
18
- const locale = useDashboardSelector(selectLocale);
14
+ const { catalogDateDatasets, locale, features: { enableComparisonInAlerting: canManageComparison }, } = useAutomationsContext();
19
15
  const [effectiveInsight, setEffectiveInsight] = useState(undefined);
20
16
  useEffect(() => {
21
17
  if (insight) {
@@ -1,7 +1,6 @@
1
1
  import { type ComponentType } from "react";
2
- import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWorkspaceUser } from "@gooddata/sdk-model";
2
+ import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget, type IWorkspaceUser } from "@gooddata/sdk-model";
3
3
  import { type GoodDataSdkError } from "@gooddata/sdk-ui";
4
- import type { ExtendedDashboardWidget } from "../../../../model/types/layoutTypes.js";
5
4
  /**
6
5
  * @alpha
7
6
  */
@@ -26,8 +25,11 @@ export interface IAlertingDialogProps {
26
25
  * Widget to be used for alert.
27
26
  *
28
27
  * Note: this is available only when alerting for widget, not dashboard.
28
+ * Typed as IWidget (not ExtendedDashboardWidget) because the dialog only
29
+ * supports insight widgets; custom widgets and nested layouts are not valid
30
+ * alert targets and were silently discarded at the connector boundary anyway.
29
31
  */
30
- widget?: ExtendedDashboardWidget;
32
+ widget?: IWidget;
31
33
  /**
32
34
  * Insight to be used for alert.
33
35
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,27 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ /**
3
+ * Provides AutomationsContext to its children, built from dashboard Redux state.
4
+ * Use this to wrap alerting dialog subtrees that need access to automation data
5
+ * (e.g. the management dialog bridge in AlertingDialogProvider).
6
+ *
7
+ * @internal
8
+ */
9
+ export declare function AlertingAutomationsProvider({ children }: {
10
+ children: ReactNode;
11
+ }): ReactElement;
12
+ /**
13
+ * Connector component that reads from the dashboard Redux store and wires up
14
+ * the alerting dialog tree via context providers.
15
+ *
16
+ * This is the primary bridge between dashboard store state and the alerting
17
+ * dialog tree. One transitive exception remains: useAutomationAlertParameters
18
+ * (in shared/automationFilters) still reads the store via useDashboardSelector,
19
+ * so alerting is not yet fully decoupled. That coupling is an explicit
20
+ * carve-out frozen in the `automationFilters` allowlist of .dependency-cruiser.js
21
+ * (see the GDP-3167 note there) and is tracked for a Phase 3 move behind this
22
+ * connector.
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function AlertingConnector(): ReactElement | null;
27
+ //# sourceMappingURL=AlertingConnector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertingConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/AlertingConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB1D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAG/F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,GAAG,IAAI,CAMvD"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isWidget } from "@gooddata/sdk-model";
3
+ import { useDashboardAlerts } from "../../../model/react/useDashboardAlerting/useDashboardAlerts.js";
4
+ import { useWorkspaceUsers } from "../../../model/react/useWorkspaceUsers.js";
5
+ import { AlertingDialog } from "../alerting/AlertingDialog.js";
6
+ import { AlertingDialogContextProvider } from "../contexts/AlertingDialogContext.js";
7
+ import { AutomationsContextProvider } from "../contexts/AutomationsContext.js";
8
+ import { useBuildAlertingDialogContext } from "./hooks/useBuildAlertingDialogContext.js";
9
+ import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.js";
10
+ /**
11
+ * Provides AutomationsContext to its children, built from dashboard Redux state.
12
+ * Use this to wrap alerting dialog subtrees that need access to automation data
13
+ * (e.g. the management dialog bridge in AlertingDialogProvider).
14
+ *
15
+ * @internal
16
+ */
17
+ export function AlertingAutomationsProvider({ children }) {
18
+ const automationsCtx = useBuildAutomationsContext();
19
+ return _jsx(AutomationsContextProvider, { value: automationsCtx, children: children });
20
+ }
21
+ /**
22
+ * Connector component that reads from the dashboard Redux store and wires up
23
+ * the alerting dialog tree via context providers.
24
+ *
25
+ * This is the primary bridge between dashboard store state and the alerting
26
+ * dialog tree. One transitive exception remains: useAutomationAlertParameters
27
+ * (in shared/automationFilters) still reads the store via useDashboardSelector,
28
+ * so alerting is not yet fully decoupled. That coupling is an explicit
29
+ * carve-out frozen in the `automationFilters` allowlist of .dependency-cruiser.js
30
+ * (see the GDP-3167 note there) and is tracked for a Phase 3 move behind this
31
+ * connector.
32
+ *
33
+ * @internal
34
+ */
35
+ export function AlertingConnector() {
36
+ const alerts = useDashboardAlerts();
37
+ if (!alerts.isInitialized) {
38
+ return null;
39
+ }
40
+ return _jsx(AlertingConnectorInitialized, { ...alerts });
41
+ }
42
+ function AlertingConnectorInitialized(alerts) {
43
+ if (!alerts.isAlertDialogOpen) {
44
+ return null;
45
+ }
46
+ return _jsx(AlertingConnectorWithData, { alerts: alerts });
47
+ }
48
+ function AlertingConnectorWithData({ alerts }) {
49
+ const { alertToEdit, automationsLoading, notificationChannels, isAlertDialogOpen, onAlertingCancel, onAlertingCreateSuccess, onAlertingCreateError, onAlertingSaveSuccess, onAlertingSaveError, onAlertingManagementDeleteSuccess, onAlertingManagementDeleteError, widget, insight, } = alerts;
50
+ const insightWidget = isWidget(widget) ? widget : undefined;
51
+ const alertingCtx = useBuildAlertingDialogContext({
52
+ mode: alertToEdit ? "edit" : "create",
53
+ widget: insightWidget,
54
+ insight,
55
+ });
56
+ return (_jsx(AlertingDialogContextProvider, { value: alertingCtx, children: isAlertDialogOpen ? (
57
+ // TODO(GDP-3167 phase3): notificationChannels, users, usersError, and isLoading
58
+ // are still prop-threaded here because DefaultAlertingDialog reads them from props,
59
+ // not from AutomationsContext. Once all dialog fields are migrated to read from
60
+ // context, remove these props and the corresponding prop types.
61
+ _jsx(AlertingDialogWithUsers, { alertToEdit: alertToEdit, notificationChannels: notificationChannels, widget: insightWidget, insight: insight, isLoading: automationsLoading, onCancel: onAlertingCancel, onError: onAlertingCreateError, onSuccess: onAlertingCreateSuccess, onSaveError: onAlertingSaveError, onSaveSuccess: onAlertingSaveSuccess, onDeleteSuccess: onAlertingManagementDeleteSuccess, onDeleteError: onAlertingManagementDeleteError })) : null }));
62
+ }
63
+ /**
64
+ * Loads workspace users only while the create/edit dialog is mounted. Keeping the
65
+ * `useWorkspaceUsers()` call in this child (rather than in AlertingConnectorWithData) means that
66
+ * opening only the management dialog — which does not consume users — never dispatches the
67
+ * workspace-users load, matching the pre-separation behavior.
68
+ */
69
+ function AlertingDialogWithUsers(props) {
70
+ const { users, status: usersStatus, usersError } = useWorkspaceUsers();
71
+ return (_jsx(AlertingDialog, { ...props, users: users ?? [], usersError: usersError, isLoading: props.isLoading || usersStatus === "pending" || usersStatus === "loading" }));
72
+ }
@@ -0,0 +1,15 @@
1
+ import { type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition } from "@gooddata/sdk-model";
2
+ /**
3
+ * Normalizes an automation before it is persisted. Drops the backend-derived
4
+ * `schedule.cronDescription` and strips noop (all-values) attribute filters from
5
+ * the alert execution.
6
+ *
7
+ * Shared by the create/edit save path and the management pause/resume path so
8
+ * every `saveAlert` dispatch sanitizes identically — pause/resume must not
9
+ * round-trip payloads that the normal save intentionally removes.
10
+ *
11
+ * @internal
12
+ */
13
+ export declare function sanitizeAutomationForSave(automation: IAutomationMetadataObject): IAutomationMetadataObject;
14
+ export declare function sanitizeAutomationForSave(automation: IAutomationMetadataObjectDefinition): IAutomationMetadataObjectDefinition;
15
+ //# sourceMappingURL=sanitizeAutomationForSave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitizeAutomationForSave.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/sanitizeAutomationForSave.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EAG3C,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,yBAAyB,GAAG,yBAAyB,CAAC;AAC5G,wBAAgB,yBAAyB,CACrC,UAAU,EAAE,mCAAmC,GAChD,mCAAmC,CAAC"}
@@ -0,0 +1,25 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { omit } from "lodash-es";
3
+ import { isAllValuesAttributeFilter, } from "@gooddata/sdk-model";
4
+ export function sanitizeAutomationForSave(automation) {
5
+ let sanitized = { ...automation };
6
+ if (sanitized.schedule) {
7
+ sanitized.schedule = omit(sanitized.schedule, ["cronDescription"]);
8
+ }
9
+ if (sanitized.alert?.execution?.filters) {
10
+ sanitized = {
11
+ ...sanitized,
12
+ alert: {
13
+ ...sanitized.alert,
14
+ execution: {
15
+ ...sanitized.alert.execution,
16
+ filters: removeNoopFiltersFromAlertFilters(sanitized.alert.execution.filters),
17
+ },
18
+ },
19
+ };
20
+ }
21
+ return sanitized;
22
+ }
23
+ function removeNoopFiltersFromAlertFilters(filters) {
24
+ return filters.filter((filter) => !isAllValuesAttributeFilter(filter));
25
+ }
@@ -0,0 +1,9 @@
1
+ import { type IInsight, type IWidget } from "@gooddata/sdk-model";
2
+ import type { IAlertingDialogContextValue } from "../../contexts/AlertingDialogContext.js";
3
+ export interface IUseBuildAlertingDialogContextOpts {
4
+ mode: "create" | "edit";
5
+ widget?: IWidget;
6
+ insight?: IInsight;
7
+ }
8
+ export declare function useBuildAlertingDialogContext(opts: IUseBuildAlertingDialogContextOpts): IAlertingDialogContextValue;
9
+ //# sourceMappingURL=useBuildAlertingDialogContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBuildAlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAGH,KAAK,QAAQ,EACb,KAAK,OAAO,EAEf,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAI3F,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACtB;AAED,wBAAgB,6BAA6B,CACzC,IAAI,EAAE,kCAAkC,GACzC,2BAA2B,CAqJ7B"}
@@ -0,0 +1,128 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useCallback, useMemo, useRef } from "react";
3
+ import { serializeObjRef, } from "@gooddata/sdk-model";
4
+ import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
5
+ import { createAlert, saveAlert } from "../../../../model/commands/alerts.js";
6
+ import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
7
+ import { useDashboardCommandProcessing } from "../../../../model/react/useDashboardCommandProcessing.js";
8
+ import { selectExecutionResultEntities } from "../../../../model/store/executionResults/executionResultsSelectors.js";
9
+ import { selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectDashboardHiddenFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
10
+ import { selectDashboardId, selectEvaluationFrequency } from "../../../../model/store/meta/metaSelectors.js";
11
+ import { selectWidgetLocalIdToTabIdMap } from "../../../../model/store/tabs/layout/layoutSelectors.js";
12
+ import { selectEffectiveParameterValuesForWidget } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
13
+ import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
14
+ import { sanitizeAutomationForSave } from "./sanitizeAutomationForSave.js";
15
+ export function useBuildAlertingDialogContext(opts) {
16
+ const { mode, widget, insight } = opts;
17
+ const backend = useBackendStrict();
18
+ const workspace = useWorkspaceStrict();
19
+ const dashboardFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
20
+ const hiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
21
+ const dashboardId = useDashboardSelector(selectDashboardId);
22
+ const widgetLocalIdToTabIdMap = useDashboardSelector(selectWidgetLocalIdToTabIdMap);
23
+ const executionResultEntities = useDashboardSelector(selectExecutionResultEntities);
24
+ const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
25
+ const dashboardEvaluationFrequency = useDashboardSelector(selectEvaluationFrequency);
26
+ const parameterValues = useDashboardSelector(selectEffectiveParameterValuesForWidget(widget?.ref));
27
+ const widgetTitle = useMemo(() => {
28
+ if (widget) {
29
+ return getWidgetTitle(widget);
30
+ }
31
+ return undefined;
32
+ }, [widget]);
33
+ // Keep a ref so the callback below is stable and doesn't cause alertingCtx to
34
+ // change on every execution result arrival (which would reset the Overlay alignment timer).
35
+ const executionResultEntitiesRef = useRef(executionResultEntities);
36
+ executionResultEntitiesRef.current = executionResultEntities;
37
+ const executionResultByRef = useCallback((ref) => {
38
+ if (!ref) {
39
+ return undefined;
40
+ }
41
+ const key = serializeObjRef(ref);
42
+ // Return the store envelope directly. Allocating a fresh wrapper object here
43
+ // would give a new reference on every render, making the consumer's
44
+ // useAttributeValuesFromExecResults useEffect([execResult]) re-fire each render
45
+ // (readAll -> setState -> re-render -> ...), an infinite loop that keeps the
46
+ // alerting dialog Overlay from ever stabilizing (it stays hidden).
47
+ return executionResultEntitiesRef.current[key];
48
+ }, []);
49
+ const createPendingRef = useRef(null);
50
+ const { run: runCreate } = useDashboardCommandProcessing({
51
+ commandCreator: createAlert,
52
+ errorEvent: "GDC.DASH/EVT.COMMAND.FAILED",
53
+ successEvent: "GDC.DASH/EVT.ALERT.CREATED",
54
+ onSuccess: (event) => {
55
+ createPendingRef.current?.resolve(event.payload.alert);
56
+ createPendingRef.current = null;
57
+ },
58
+ onError: (event) => {
59
+ const error = event.payload.error ?? new Error(event.payload.message);
60
+ createPendingRef.current?.reject(error);
61
+ createPendingRef.current = null;
62
+ },
63
+ });
64
+ const createAlertFn = useCallback((alert) => {
65
+ return new Promise((resolve, reject) => {
66
+ createPendingRef.current = { resolve, reject };
67
+ runCreate(sanitizeAutomationForSave(alert));
68
+ });
69
+ }, [runCreate]);
70
+ const savePendingRef = useRef(null);
71
+ const { run: runSave } = useDashboardCommandProcessing({
72
+ commandCreator: saveAlert,
73
+ errorEvent: "GDC.DASH/EVT.COMMAND.FAILED",
74
+ successEvent: "GDC.DASH/EVT.ALERT.SAVED",
75
+ onSuccess: (event) => {
76
+ savePendingRef.current?.resolve(event.payload.alert);
77
+ savePendingRef.current = null;
78
+ },
79
+ onError: (event) => {
80
+ const error = event.payload.error ?? new Error(event.payload.message);
81
+ savePendingRef.current?.reject(error);
82
+ savePendingRef.current = null;
83
+ },
84
+ });
85
+ const saveAlertFn = useCallback((alert) => {
86
+ return new Promise((resolve, reject) => {
87
+ savePendingRef.current = { resolve, reject };
88
+ runSave(sanitizeAutomationForSave(alert));
89
+ });
90
+ }, [runSave]);
91
+ const deleteAlertFn = useCallback(async (alert) => {
92
+ const automationService = backend.workspace(workspace).automations();
93
+ await automationService.deleteAutomation(alert.id);
94
+ }, [backend, workspace]);
95
+ return useMemo(() => ({
96
+ mode,
97
+ widget,
98
+ insight,
99
+ widgetTitle,
100
+ dashboardId,
101
+ dashboardFilters,
102
+ hiddenFilters,
103
+ widgetLocalIdToTabIdMap,
104
+ executionResultByRef,
105
+ parameterValues,
106
+ commonDateFilterId,
107
+ dashboardEvaluationFrequency,
108
+ createAlert: createAlertFn,
109
+ saveAlert: saveAlertFn,
110
+ deleteAlert: deleteAlertFn,
111
+ }), [
112
+ mode,
113
+ widget,
114
+ insight,
115
+ widgetTitle,
116
+ dashboardId,
117
+ dashboardFilters,
118
+ hiddenFilters,
119
+ widgetLocalIdToTabIdMap,
120
+ executionResultByRef,
121
+ parameterValues,
122
+ commonDateFilterId,
123
+ dashboardEvaluationFrequency,
124
+ createAlertFn,
125
+ saveAlertFn,
126
+ deleteAlertFn,
127
+ ]);
128
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useBuildAlertingDialogContext.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBuildAlertingDialogContext.test.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { renderHook } from "@testing-library/react";
3
+ import { describe, expect, it, vi } from "vitest";
4
+ import { idRef } from "@gooddata/sdk-model";
5
+ const fixtures = vi.hoisted(() => {
6
+ // A single, referentially stable execution-result envelope, simulating an
7
+ // unchanged normalized store entity across renders.
8
+ const stableExecutionResult = { readAll: () => Promise.resolve({}) };
9
+ const stableEnvelope = { isLoading: false, executionResult: stableExecutionResult };
10
+ // Any serialized ObjRef key resolves to the same stable envelope.
11
+ const entities = new Proxy({}, {
12
+ get: () => stableEnvelope,
13
+ });
14
+ return { stableEnvelope, entities };
15
+ });
16
+ vi.mock("@gooddata/sdk-ui", () => ({
17
+ useBackendStrict: vi.fn(() => ({ workspace: () => ({ automations: () => ({}) }) })),
18
+ useWorkspaceStrict: vi.fn(() => "workspace"),
19
+ }));
20
+ vi.mock("../../../../model/react/DashboardStoreProvider.js", () => ({
21
+ useDashboardSelector: vi.fn((selector) => selector()),
22
+ }));
23
+ vi.mock("../../../../model/react/useDashboardCommandProcessing.js", () => ({
24
+ useDashboardCommandProcessing: vi.fn(() => ({ run: vi.fn() })),
25
+ }));
26
+ vi.mock("../../../../model/commands/alerts.js", () => ({
27
+ createAlert: vi.fn(),
28
+ saveAlert: vi.fn(),
29
+ }));
30
+ vi.mock("../../../../model/store/executionResults/executionResultsSelectors.js", () => ({
31
+ selectExecutionResultEntities: () => fixtures.entities,
32
+ }));
33
+ vi.mock("../../../../model/store/filtering/dashboardFilterSelectors.js", () => ({
34
+ selectAutomationCommonDateFilterId: () => undefined,
35
+ selectAutomationDefaultSelectedFilters: () => [],
36
+ selectDashboardHiddenFilters: () => [],
37
+ }));
38
+ vi.mock("../../../../model/store/meta/metaSelectors.js", () => ({
39
+ selectDashboardId: () => "dashboard-1",
40
+ selectEvaluationFrequency: () => undefined,
41
+ }));
42
+ vi.mock("../../../../model/store/tabs/layout/layoutSelectors.js", () => ({
43
+ selectWidgetLocalIdToTabIdMap: () => ({}),
44
+ }));
45
+ vi.mock("../../../../model/store/tabs/parameters/parametersSelectors.js", () => ({
46
+ selectEffectiveParameterValuesForWidget: () => () => [],
47
+ }));
48
+ vi.mock("../../../../model/utils/dashboardItemUtils.js", () => ({
49
+ getWidgetTitle: () => "widget title",
50
+ }));
51
+ import { useBuildAlertingDialogContext } from "./useBuildAlertingDialogContext.js";
52
+ describe("useBuildAlertingDialogContext", () => {
53
+ it("returns a referentially stable execution-result envelope across renders (no render loop)", () => {
54
+ const ref = idRef("widget-1");
55
+ const { result, rerender } = renderHook(() => useBuildAlertingDialogContext({ mode: "create" }));
56
+ const first = result.current.executionResultByRef(ref);
57
+ rerender();
58
+ const second = result.current.executionResultByRef(ref);
59
+ // The envelope must keep the same identity when the underlying store entity
60
+ // is unchanged. A fresh object each call makes useAttributeValuesFromExecResults'
61
+ // useEffect([execResult]) re-fire every render -> infinite readAll() loop ->
62
+ // the alerting dialog Overlay never stabilizes and stays hidden.
63
+ expect(second).toBe(first);
64
+ expect(first?.executionResult).toBe(fixtures.stableEnvelope.executionResult);
65
+ });
66
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"useBuildAutomationsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAutomationsContext.ts"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EACR,wBAAwB,EAE3B,MAAM,sCAAsC,CAAC;AAE9C,wBAAgB,0BAA0B,IAAI,wBAAwB,CA2HrE"}
1
+ {"version":3,"file":"useBuildAutomationsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAutomationsContext.ts"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EACR,wBAAwB,EAE3B,MAAM,sCAAsC,CAAC;AAI9C,wBAAgB,0BAA0B,IAAI,wBAAwB,CA4LrE"}
@@ -2,14 +2,20 @@
2
2
  import { useCallback, useMemo } from "react";
3
3
  import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
4
4
  import { selectAllCatalogAttributesMap, selectAllCatalogDisplayFormsMap, selectCatalogAttributes, selectCatalogDateDatasets, selectCatalogMeasures, } from "../../../../model/store/catalog/catalogSelectors.js";
5
- import { selectEnableNewScheduledExport, selectLocale, selectSeparators, selectSettings, } from "../../../../model/store/config/configSelectors.js";
5
+ import { selectEnableAlertAttributes, selectEnableAlertOncePerInterval, selectEnableAnomalyDetectionAlert, selectEnableAutomationManagement, selectEnableComparisonInAlerting, selectEnableExternalRecipients, selectEnableNewScheduledExport, selectExternalRecipient, selectIsWhiteLabeled, selectLocale, selectSeparators, selectSettings, selectTimezone, selectWeekStart, } from "../../../../model/store/config/configSelectors.js";
6
+ import { selectEntitlementMinimumRecurrenceMinutes, selectMaxAutomationRecipients, } from "../../../../model/store/entitlements/entitlementsSelectors.js";
6
7
  import { selectAutomationAvailableDashboardFilters, selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectAutomationFiltersByTab, selectDashboardFiltersWithoutCrossFiltering, selectDashboardHiddenFilters, selectDashboardLockedFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
7
8
  import { selectPersistedDashboardFilterContextDateFilterConfig } from "../../../../model/store/meta/metaSelectors.js";
9
+ import { selectCanManageWorkspace, selectCanUseAiAssistant, } from "../../../../model/store/permissions/permissionsSelectors.js";
8
10
  import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, selectAttributeFilterConfigsSelectionTypeMap, selectAttributeFilterConfigsSelectionTypeMapByTab, } from "../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
9
11
  import { selectDateFilterConfigOverridesByTab, selectEffectiveDateFilterAvailableGranularities, selectEffectiveDateFilterGranularitiesPerTab, selectEffectiveDateFilterOptions, selectEffectiveDateFilterOptionsPerTab, } from "../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
10
12
  import { selectDateFilterConfigsOverrides, selectDateFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
11
13
  import { selectAttributeFilterDisplayFormsMap } from "../../../../model/store/tabs/filterContext/filterContextSelectors.js";
12
14
  import { selectMeasureValueFilterConfigsOverrides, selectMeasureValueFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/measureValueFilterConfigs/measureValueFilterConfigsSelectors.js";
15
+ import { selectIsAutomationDialogSecondaryTitleVisible } from "../../../../model/store/topBar/topBarSelectors.js";
16
+ import { selectExecutionTimestamp } from "../../../../model/store/ui/uiSelectors.js";
17
+ import { selectCurrentUser } from "../../../../model/store/user/userSelectors.js";
18
+ const DEFAULT_MIN_RECURRENCE_MINUTES = "60";
13
19
  export function useBuildAutomationsContext() {
14
20
  const locale = useDashboardSelector(selectLocale);
15
21
  const separators = useDashboardSelector(selectSeparators);
@@ -42,6 +48,25 @@ export function useBuildAutomationsContext() {
42
48
  const automationFiltersByTab = useDashboardSelector(selectAutomationFiltersByTab);
43
49
  const defaultSelectedFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
44
50
  const automationAvailableFilters = useDashboardSelector(selectAutomationAvailableDashboardFilters);
51
+ const currentUser = useDashboardSelector(selectCurrentUser);
52
+ const weekStart = useDashboardSelector(selectWeekStart);
53
+ const timezone = useDashboardSelector(selectTimezone);
54
+ const isWhiteLabeled = useDashboardSelector(selectIsWhiteLabeled);
55
+ const isSecondaryTitleVisible = useDashboardSelector(selectIsAutomationDialogSecondaryTitleVisible);
56
+ const externalRecipient = useDashboardSelector(selectExternalRecipient);
57
+ const enableAlertOncePerInterval = useDashboardSelector(selectEnableAlertOncePerInterval);
58
+ const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
59
+ const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
60
+ const canUseAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
61
+ const canManageWorkspace = useDashboardSelector(selectCanManageWorkspace);
62
+ const enableComparisonInAlerting = useDashboardSelector(selectEnableComparisonInAlerting);
63
+ const enableExternalRecipients = useDashboardSelector(selectEnableExternalRecipients);
64
+ const enableAlertAttributes = useDashboardSelector(selectEnableAlertAttributes);
65
+ const maxAutomationsRecipients = useDashboardSelector(selectMaxAutomationRecipients);
66
+ const minimumRecurrenceMinutesEntitlement = useDashboardSelector(selectEntitlementMinimumRecurrenceMinutes);
67
+ const allowHourlyRecurrence = parseInt(minimumRecurrenceMinutesEntitlement?.value ?? DEFAULT_MIN_RECURRENCE_MINUTES, 10) === 60;
68
+ const executionTimestamp = useDashboardSelector(selectExecutionTimestamp);
69
+ const isExecutionTimestampMode = !!executionTimestamp;
45
70
  const getCatalogAttributeByRef = useCallback((ref) => allCatalogAttributesMap.get(ref), [allCatalogAttributesMap]);
46
71
  const getAttributeFilterDisplayForm = useCallback((displayForm) => attrFilterDisplayFormsMap.get(displayForm) ?? catalogDisplayFormsMap.get(displayForm), [attrFilterDisplayFormsMap, catalogDisplayFormsMap]);
47
72
  const dateFilterConfig = useMemo(() => ({
@@ -50,11 +75,33 @@ export function useBuildAutomationsContext() {
50
75
  getGranularitiesForTab: (tabId) => granularitiesPerTab[tabId] ?? [],
51
76
  getOptionsForTab: (tabId) => optionsPerTab[tabId],
52
77
  }), [availableGranularities, dateFilterOptions, granularitiesPerTab, optionsPerTab]);
78
+ const features = useMemo(() => ({
79
+ enableAlertOncePerInterval,
80
+ enableAnomalyDetectionAlert,
81
+ enableAutomationManagement,
82
+ canUseAiAssistant,
83
+ enableComparisonInAlerting,
84
+ enableExternalRecipients,
85
+ enableAlertAttributes,
86
+ canManageWorkspace,
87
+ }), [
88
+ enableAlertOncePerInterval,
89
+ enableAnomalyDetectionAlert,
90
+ enableAutomationManagement,
91
+ canUseAiAssistant,
92
+ enableComparisonInAlerting,
93
+ enableExternalRecipients,
94
+ enableAlertAttributes,
95
+ canManageWorkspace,
96
+ ]);
53
97
  return useMemo(() => ({
54
98
  locale,
55
99
  separators,
56
100
  settings,
57
101
  enableNewScheduledExport,
102
+ maxAutomationsRecipients,
103
+ isExecutionTimestampMode,
104
+ allowHourlyRecurrence,
58
105
  catalogAttributes,
59
106
  catalogDateDatasets,
60
107
  dateFilterConfig,
@@ -76,6 +123,13 @@ export function useBuildAutomationsContext() {
76
123
  automationFiltersByTab,
77
124
  defaultSelectedFilters,
78
125
  automationAvailableFilters,
126
+ currentUser,
127
+ weekStart,
128
+ timezone,
129
+ isWhiteLabeled,
130
+ isSecondaryTitleVisible,
131
+ externalRecipient,
132
+ features,
79
133
  getCatalogAttributeByRef,
80
134
  getAttributeFilterDisplayForm,
81
135
  }), [
@@ -83,6 +137,9 @@ export function useBuildAutomationsContext() {
83
137
  separators,
84
138
  settings,
85
139
  enableNewScheduledExport,
140
+ maxAutomationsRecipients,
141
+ isExecutionTimestampMode,
142
+ allowHourlyRecurrence,
86
143
  catalogAttributes,
87
144
  catalogDateDatasets,
88
145
  dateFilterConfig,
@@ -104,6 +161,13 @@ export function useBuildAutomationsContext() {
104
161
  automationFiltersByTab,
105
162
  defaultSelectedFilters,
106
163
  automationAvailableFilters,
164
+ currentUser,
165
+ weekStart,
166
+ timezone,
167
+ isWhiteLabeled,
168
+ isSecondaryTitleVisible,
169
+ externalRecipient,
170
+ features,
107
171
  getCatalogAttributeByRef,
108
172
  getAttributeFilterDisplayForm,
109
173
  ]);