@gooddata/sdk-ui-dashboard 11.52.0-alpha.5 → 11.52.0-alpha.7

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 (186) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/index.d.ts +8 -7
  4. package/esm/index.d.ts.map +1 -1
  5. package/esm/index.js +8 -7
  6. package/esm/kdaDialog/composition/hooks/usePeriodChangeHandler.js +5 -0
  7. package/esm/model/commandHandlers/index.d.ts.map +1 -1
  8. package/esm/model/commandHandlers/index.js +2 -0
  9. package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.d.ts +6 -0
  10. package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.d.ts.map +1 -0
  11. package/esm/model/commandHandlers/widgets/changeVisualizationSwitcherActiveVisualizationHandler.js +12 -0
  12. package/esm/model/commands/base.d.ts +1 -1
  13. package/esm/model/commands/base.d.ts.map +1 -1
  14. package/esm/model/commands/index.d.ts +2 -2
  15. package/esm/model/commands/index.d.ts.map +1 -1
  16. package/esm/model/commands/visualizationSwitcher.d.ts +33 -0
  17. package/esm/model/commands/visualizationSwitcher.d.ts.map +1 -1
  18. package/esm/model/commands/visualizationSwitcher.js +21 -0
  19. package/esm/model/events/base.d.ts +1 -1
  20. package/esm/model/events/base.d.ts.map +1 -1
  21. package/esm/model/events/index.d.ts +2 -2
  22. package/esm/model/events/index.d.ts.map +1 -1
  23. package/esm/model/events/visualizationSwitcher.d.ts +34 -0
  24. package/esm/model/events/visualizationSwitcher.d.ts.map +1 -1
  25. package/esm/model/events/visualizationSwitcher.js +21 -0
  26. package/esm/model/react/useDashboardCommand.d.ts +1 -0
  27. package/esm/model/react/useDashboardCommand.d.ts.map +1 -1
  28. package/esm/model/react/useDashboardCommandProcessing.d.ts +4 -0
  29. package/esm/model/react/useDashboardCommandProcessing.d.ts.map +1 -1
  30. package/esm/model/store/config/configSelectors.d.ts +6 -0
  31. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  32. package/esm/model/store/config/configSelectors.js +8 -0
  33. package/esm/model/store/keyDriverAnalysis/const.d.ts +6 -6
  34. package/esm/model/store/keyDriverAnalysis/const.d.ts.map +1 -1
  35. package/esm/model/store/keyDriverAnalysis/const.js +12 -26
  36. package/esm/model/store/ui/index.d.ts +4 -0
  37. package/esm/model/store/ui/index.d.ts.map +1 -1
  38. package/esm/model/store/ui/uiReducers.d.ts +7 -0
  39. package/esm/model/store/ui/uiReducers.d.ts.map +1 -1
  40. package/esm/model/store/ui/uiReducers.js +6 -0
  41. package/esm/model/store/ui/uiSelectors.d.ts +8 -0
  42. package/esm/model/store/ui/uiSelectors.d.ts.map +1 -1
  43. package/esm/model/store/ui/uiSelectors.js +10 -0
  44. package/esm/model/store/ui/uiState.d.ts +6 -0
  45. package/esm/model/store/ui/uiState.d.ts.map +1 -1
  46. package/esm/model/store/ui/uiState.js +1 -0
  47. package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
  48. package/esm/model/store/widgetDrills/widgetDrillSelectors.js +5 -5
  49. package/esm/presentation/automations/alerting/AlertingDialog.d.ts +3 -0
  50. package/esm/presentation/automations/alerting/AlertingDialog.d.ts.map +1 -1
  51. package/esm/presentation/automations/alerting/AlertingDialog.js +5 -1
  52. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +10 -7
  53. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
  54. package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +36 -16
  55. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts +9 -0
  56. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.d.ts.map +1 -1
  57. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertThreshold.js +9 -0
  58. package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts +23 -0
  59. package/esm/presentation/automations/alerting/state/AlertActionsContext.d.ts.map +1 -0
  60. package/esm/presentation/automations/alerting/state/AlertActionsContext.js +19 -0
  61. package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts +24 -0
  62. package/esm/presentation/automations/alerting/state/AlertDataContext.d.ts.map +1 -0
  63. package/esm/presentation/automations/alerting/state/AlertDataContext.js +19 -0
  64. package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts +24 -0
  65. package/esm/presentation/automations/alerting/state/AlertDraftContext.d.ts.map +1 -0
  66. package/esm/presentation/automations/alerting/state/AlertDraftContext.js +19 -0
  67. package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts +26 -0
  68. package/esm/presentation/automations/alerting/state/AlertFiltersContext.d.ts.map +1 -0
  69. package/esm/presentation/automations/alerting/state/AlertFiltersContext.js +19 -0
  70. package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts +25 -0
  71. package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts.map +1 -0
  72. package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.js +172 -0
  73. package/esm/presentation/automations/alerting/state/missingAlertStateProvider.d.ts +7 -0
  74. package/esm/presentation/automations/alerting/state/missingAlertStateProvider.d.ts.map +1 -0
  75. package/esm/presentation/automations/alerting/state/missingAlertStateProvider.js +9 -0
  76. package/esm/presentation/automations/alerting/state/useAlertDialogValidity.d.ts +15 -0
  77. package/esm/presentation/automations/alerting/state/useAlertDialogValidity.d.ts.map +1 -0
  78. package/esm/presentation/automations/alerting/state/useAlertDialogValidity.js +45 -0
  79. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFiltersModel.d.ts +2 -2
  80. package/esm/presentation/automations/alerting/state/useAlertFiltersModel.d.ts.map +1 -0
  81. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFiltersModel.js +3 -3
  82. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormState.d.ts +4 -4
  83. package/esm/presentation/automations/alerting/state/useAlertFormState.d.ts.map +1 -0
  84. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormState.js +8 -8
  85. package/esm/presentation/automations/alerting/state/useAlertFormValidation.d.ts.map +1 -0
  86. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormValidation.js +3 -3
  87. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSelectedValues.d.ts +17 -7
  88. package/esm/presentation/automations/alerting/state/useAlertSelectedValues.d.ts.map +1 -0
  89. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSelectedValues.js +27 -4
  90. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSupportedMetrics.d.ts +3 -3
  91. package/esm/presentation/automations/alerting/state/useAlertSupportedMetrics.d.ts.map +1 -0
  92. package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertSupportedMetrics.js +5 -5
  93. package/esm/presentation/automations/alerting/types.d.ts +15 -1
  94. package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
  95. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +26 -0
  96. package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
  97. package/esm/presentation/automations/contexts/AlertingDialogContext.js +26 -0
  98. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +10 -1
  99. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
  100. package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +9 -0
  101. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +1 -1
  102. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
  103. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +19 -17
  104. package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts +3 -0
  105. package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts.map +1 -1
  106. package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.js +5 -1
  107. package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts +22 -0
  108. package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map +1 -0
  109. package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js +150 -0
  110. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts +28 -0
  111. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map +1 -0
  112. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.js +20 -0
  113. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts +25 -0
  114. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.d.ts.map +1 -0
  115. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDataContext.js +20 -0
  116. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts +25 -0
  117. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map +1 -0
  118. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.js +20 -0
  119. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts +26 -0
  120. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.d.ts.map +1 -0
  121. package/esm/presentation/automations/scheduledEmail/state/ScheduledExportFiltersContext.js +20 -0
  122. package/esm/presentation/automations/scheduledEmail/state/exportDefinitions.d.ts.map +1 -0
  123. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/utils → state}/exportDefinitions.js +1 -1
  124. package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.d.ts +7 -0
  125. package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.d.ts.map +1 -0
  126. package/esm/presentation/automations/scheduledEmail/state/missingScheduledExportStateProvider.js +9 -0
  127. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailEffectiveFilters.d.ts +2 -2
  128. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailEffectiveFilters.d.ts.map +1 -0
  129. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailEffectiveFilters.js +4 -4
  130. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailExportSettings.d.ts +12 -25
  131. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map +1 -0
  132. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailExportSettings.js +38 -86
  133. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts → state/useScheduledEmailFiltersModel.d.ts} +7 -7
  134. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFiltersModel.d.ts.map +1 -0
  135. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js → state/useScheduledEmailFiltersModel.js} +26 -9
  136. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map +1 -0
  137. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormState.js +25 -25
  138. package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts.map +1 -0
  139. package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormValidity.js +3 -3
  140. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.d.ts +39 -0
  141. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.d.ts.map +1 -0
  142. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportAttachments.js +102 -0
  143. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts +13 -0
  144. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts.map +1 -0
  145. package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.js +34 -0
  146. package/esm/presentation/automations/scheduledEmail/types.d.ts +15 -1
  147. package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
  148. package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts.map +1 -1
  149. package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.js +2 -1
  150. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts +2 -1
  151. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
  152. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +6 -2
  153. package/esm/presentation/drill/utils/kdaUtils.d.ts +1 -1
  154. package/esm/presentation/drill/utils/kdaUtils.d.ts.map +1 -1
  155. package/esm/presentation/drill/utils/kdaUtils.js +6 -5
  156. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts +1 -1
  157. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
  158. package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +2 -2
  159. package/esm/presentation/filterBar/dateFilter/types.d.ts +8 -1
  160. package/esm/presentation/filterBar/dateFilter/types.d.ts.map +1 -1
  161. package/esm/presentation/filterBar/dateFilter/types.js +1 -1
  162. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
  163. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +11 -2
  164. package/esm/sdk-ui-dashboard.d.ts +240 -28
  165. package/package.json +21 -21
  166. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFiltersModel.d.ts.map +0 -1
  167. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map +0 -1
  168. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormValidation.d.ts.map +0 -1
  169. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.d.ts.map +0 -1
  170. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSupportedMetrics.d.ts.map +0 -1
  171. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +0 -69
  172. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +0 -1
  173. package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +0 -145
  174. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +0 -89
  175. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +0 -1
  176. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +0 -131
  177. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.d.ts.map +0 -1
  178. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailExportSettings.d.ts.map +0 -1
  179. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts.map +0 -1
  180. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts.map +0 -1
  181. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormValidity.d.ts.map +0 -1
  182. package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/utils/exportDefinitions.d.ts.map +0 -1
  183. /package/esm/presentation/automations/alerting/{DefaultAlertingDialog/hooks → state}/useAlertFormValidation.d.ts +0 -0
  184. /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/utils → state}/exportDefinitions.d.ts +0 -0
  185. /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormState.d.ts +0 -0
  186. /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog/hooks → state}/useScheduledEmailFormValidity.d.ts +0 -0
@@ -0,0 +1,172 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useMemo } from "react";
4
+ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
5
+ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
6
+ import { useAutomationFiltersSelect } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
7
+ import { AlertActionsContextProvider } from "./AlertActionsContext.js";
8
+ import { AlertDataContextProvider } from "./AlertDataContext.js";
9
+ import { AlertDraftContextProvider } from "./AlertDraftContext.js";
10
+ import { AlertFiltersContextProvider } from "./AlertFiltersContext.js";
11
+ import { useAlertFiltersModel } from "./useAlertFiltersModel.js";
12
+ import { useAlertFormState } from "./useAlertFormState.js";
13
+ import { getAlertSelectedValues } from "./useAlertSelectedValues.js";
14
+ import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
15
+ /**
16
+ * Publishes the alerting create/edit dialog's state as the four alert state contexts once the
17
+ * dialog's data has loaded.
18
+ *
19
+ * Mounts above the resolved `AlertingDialogComponent`, so the default dialog, a shell of blocks
20
+ * and a wholesale replacement all read the same state with no extra wiring. Defers mounting the
21
+ * state model itself until `useAlertingDialogContext().isLoading` is false, because the state
22
+ * model seeds its draft from the dialog's loaded data in `useState` initializers that never
23
+ * re-run — mounting earlier would freeze that seed against not-yet-loaded data.
24
+ *
25
+ * Runs `useIntl`-calling hooks, so an `IntlProvider` must sit above it. Inside a `Dashboard` the
26
+ * ambient wrapper in `DashboardInner` supplies one with the same locale; a mount site without one
27
+ * throws in react-intl.
28
+ *
29
+ * A custom `AlertingDialogComponent` that decorates the dialog context (re-provides
30
+ * `AlertingDialogContextProvider` with an adjusted value) must remount this provider beneath the
31
+ * decorated context, so the state is derived from the decorated value rather than the ambient one.
32
+ *
33
+ * @alpha
34
+ */
35
+ export function AlertingDialogStateProvider({ children }) {
36
+ const { isLoading } = useAlertingDialogContext();
37
+ return isLoading ? _jsx(_Fragment, { children: children }) : _jsx(LoadedAlertingDialogState, { children: children });
38
+ }
39
+ function LoadedAlertingDialogState({ children }) {
40
+ const { weekStart, timezone, externalRecipient } = useAutomationsContext();
41
+ const { hiddenFilters: dashboardHiddenFilters, commonDateFilterId, alertToEdit, notificationChannels, widget, insight, } = useAlertingDialogContext();
42
+ const { editedAutomationFilters, setEditedAutomationFilters, availableFilters, availableFiltersAsVisibleFilters, filtersForNewAutomation, } = useAutomationFiltersSelect({ automationToEdit: alertToEdit, widget });
43
+ const { measureFormatMap, supportedMeasures, supportedAttributes, isResultLoading, getAttributeValues, getMetricValue, } = useAlertSupportedMetrics({ insight, widget, alertToEdit });
44
+ const formState = useAlertFormState({
45
+ alertToEdit,
46
+ insight,
47
+ widget,
48
+ notificationChannels,
49
+ editedAutomationFilters,
50
+ availableFiltersAsVisibleFilters,
51
+ externalRecipientOverride: externalRecipient,
52
+ supportedMeasures,
53
+ supportedAttributes,
54
+ measureFormatMap,
55
+ });
56
+ const { selectedMeasure, selectedAttribute, selectedValue } = getAlertSelectedValues({
57
+ editedAutomation: formState.editedAutomation,
58
+ supportedMeasures,
59
+ supportedAttributes,
60
+ notificationChannels,
61
+ });
62
+ const filtersModel = useAlertFiltersModel({
63
+ setEditedAutomation: formState.setEditedAutomation,
64
+ alertToEdit,
65
+ editedAutomationFilters,
66
+ setEditedAutomationFilters,
67
+ availableFilters,
68
+ filtersForNewAutomation,
69
+ availableFiltersAsVisibleFilters,
70
+ dashboardHiddenFilters,
71
+ commonDateFilterId,
72
+ widget,
73
+ insight,
74
+ supportedMeasures,
75
+ supportedAttributes,
76
+ measureFormatMap,
77
+ selectedMeasure,
78
+ selectedAttribute,
79
+ selectedValue,
80
+ weekStart,
81
+ timezone,
82
+ });
83
+ const draft = useMemo(() => ({
84
+ editedAutomation: formState.editedAutomation,
85
+ originalAutomation: formState.originalAutomation,
86
+ warningMessage: formState.warningMessage,
87
+ isTitleValid: formState.isTitleValid,
88
+ }), [
89
+ formState.editedAutomation,
90
+ formState.originalAutomation,
91
+ formState.warningMessage,
92
+ formState.isTitleValid,
93
+ ]);
94
+ const actions = useMemo(() => ({
95
+ setEditedAutomation: formState.setEditedAutomation,
96
+ onTitleChange: formState.onTitleChange,
97
+ onMeasureChange: formState.onMeasureChange,
98
+ onAttributeChange: formState.onAttributeChange,
99
+ onComparisonOperatorChange: formState.onComparisonOperatorChange,
100
+ onRelativeOperatorChange: formState.onRelativeOperatorChange,
101
+ onAnomalyDetectionChange: formState.onAnomalyDetectionChange,
102
+ onComparisonTypeChange: formState.onComparisonTypeChange,
103
+ onSensitivityChange: formState.onSensitivityChange,
104
+ onTriggerIntervalChange: formState.onTriggerIntervalChange,
105
+ onGranularityChange: formState.onGranularityChange,
106
+ onDestinationChange: formState.onDestinationChange,
107
+ onTriggerModeChange: formState.onTriggerModeChange,
108
+ onRecipientsChange: formState.onRecipientsChange,
109
+ }), [
110
+ formState.setEditedAutomation,
111
+ formState.onTitleChange,
112
+ formState.onMeasureChange,
113
+ formState.onAttributeChange,
114
+ formState.onComparisonOperatorChange,
115
+ formState.onRelativeOperatorChange,
116
+ formState.onAnomalyDetectionChange,
117
+ formState.onComparisonTypeChange,
118
+ formState.onSensitivityChange,
119
+ formState.onTriggerIntervalChange,
120
+ formState.onGranularityChange,
121
+ formState.onDestinationChange,
122
+ formState.onTriggerModeChange,
123
+ formState.onRecipientsChange,
124
+ ]);
125
+ const data = useMemo(() => ({
126
+ supportedMeasures,
127
+ supportedAttributes,
128
+ measureFormatMap,
129
+ isResultLoading,
130
+ getAttributeValues,
131
+ getMetricValue,
132
+ defaultUser: formState.defaultUser,
133
+ defaultRecipient: formState.defaultRecipient,
134
+ }), [
135
+ supportedMeasures,
136
+ supportedAttributes,
137
+ measureFormatMap,
138
+ isResultLoading,
139
+ getAttributeValues,
140
+ getMetricValue,
141
+ formState.defaultUser,
142
+ formState.defaultRecipient,
143
+ ]);
144
+ const filters = useMemo(() => ({
145
+ selectedFilters: filtersModel.selectedFilters,
146
+ availableFilters: filtersModel.availableFilters,
147
+ onFiltersChange: filtersModel.onFiltersChange,
148
+ onApplyCurrentFilters: filtersModel.onApplyCurrentFilters,
149
+ automationIsValid: filtersModel.automationIsValid,
150
+ filtersAreStale: filtersModel.filtersAreStale,
151
+ automationParameters: formState.automationParameters,
152
+ availableParameters: formState.availableParameters,
153
+ onParameterChange: formState.onParameterChange,
154
+ onParameterDelete: formState.onParameterDelete,
155
+ onParameterAdd: formState.onParameterAdd,
156
+ dropStaleParameters: formState.dropStaleParameters,
157
+ }), [
158
+ filtersModel.selectedFilters,
159
+ filtersModel.availableFilters,
160
+ filtersModel.onFiltersChange,
161
+ filtersModel.onApplyCurrentFilters,
162
+ filtersModel.automationIsValid,
163
+ filtersModel.filtersAreStale,
164
+ formState.automationParameters,
165
+ formState.availableParameters,
166
+ formState.onParameterChange,
167
+ formState.onParameterDelete,
168
+ formState.onParameterAdd,
169
+ formState.dropStaleParameters,
170
+ ]);
171
+ return (_jsx(AlertDraftContextProvider, { value: draft, children: _jsx(AlertActionsContextProvider, { value: actions, children: _jsx(AlertDataContextProvider, { value: data, children: _jsx(AlertFiltersContextProvider, { value: filters, children: children }) }) }) }));
172
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The single error every alerting dialog state accessor throws when no provider is above it.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare function missingAlertStateProvider(accessor: string): never;
7
+ //# sourceMappingURL=missingAlertStateProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"missingAlertStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/missingAlertStateProvider.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAIjE"}
@@ -0,0 +1,9 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /**
3
+ * The single error every alerting dialog state accessor throws when no provider is above it.
4
+ *
5
+ * @internal
6
+ */
7
+ export function missingAlertStateProvider(accessor) {
8
+ throw new Error(`${accessor} must be used within AlertingDialogStateProvider. The provider mounts only once the dialog's data has loaded, so check useAlertingDialogContext().isLoading before reading alerting dialog state.`);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Reads the alerting dialog's validity: whether submit is enabled, the validation message to show,
3
+ * whether the parent widget is still valid, whether the measure may be changed, and whether the
4
+ * saved alert points at a widget whose insight is gone.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare function useAlertDialogValidity(): {
9
+ isSubmitDisabled: boolean;
10
+ validationErrorMessage: string | undefined;
11
+ isParentValid: boolean;
12
+ canChangeMeasure: boolean;
13
+ isInvalidConnectionToInsight: boolean;
14
+ };
15
+ //# sourceMappingURL=useAlertDialogValidity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertDialogValidity.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertDialogValidity.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI;IACtC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4BAA4B,EAAE,OAAO,CAAC;CACzC,CAkCA"}
@@ -0,0 +1,45 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
3
+ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
4
+ import { useAlertData } from "./AlertDataContext.js";
5
+ import { useAlertDraft } from "./AlertDraftContext.js";
6
+ import { useAlertFormValidation } from "./useAlertFormValidation.js";
7
+ import { useAlertSelectedValues } from "./useAlertSelectedValues.js";
8
+ /**
9
+ * Reads the alerting dialog's validity: whether submit is enabled, the validation message to show,
10
+ * whether the parent widget is still valid, whether the measure may be changed, and whether the
11
+ * saved alert points at a widget whose insight is gone.
12
+ *
13
+ * @internal
14
+ */
15
+ export function useAlertDialogValidity() {
16
+ const { catalogDateDatasets, maxAutomationsRecipients } = useAutomationsContext();
17
+ const { alertToEdit, widget, insight } = useAlertingDialogContext();
18
+ const { editedAutomation, originalAutomation, isTitleValid } = useAlertDraft();
19
+ const { defaultRecipient } = useAlertData();
20
+ const { selectedNotificationChannel, allowExternalRecipients, allowOnlyLoggedUserRecipients } = useAlertSelectedValues();
21
+ const canChangeMeasure = !!insight;
22
+ const isInvalidConnectionToInsight = !!alertToEdit?.metadata?.widget && !insight;
23
+ const { isSubmitDisabled, validationErrorMessage, isParentValid } = useAlertFormValidation({
24
+ editedAutomation,
25
+ originalAutomation,
26
+ alertToEdit,
27
+ widget,
28
+ insight,
29
+ catalogDateDatasets,
30
+ isInvalidConnectionToInsight,
31
+ selectedNotificationChannel,
32
+ allowExternalRecipients,
33
+ allowOnlyLoggedUserRecipients,
34
+ maxAutomationsRecipients,
35
+ defaultRecipient,
36
+ isTitleValid,
37
+ });
38
+ return {
39
+ isSubmitDisabled,
40
+ validationErrorMessage,
41
+ isParentValid,
42
+ canChangeMeasure,
43
+ isInvalidConnectionToInsight,
44
+ };
45
+ }
@@ -1,7 +1,7 @@
1
1
  import { type Dispatch, type SetStateAction } from "react";
2
2
  import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationVisibleFilter, type IInsight, type IWidget, type WeekStart } from "@gooddata/sdk-model";
3
- import { type AlertAttribute, type AlertMetric } from "../../types.js";
4
- import { type IMeasureFormatMap } from "../utils/getters.js";
3
+ import { type IMeasureFormatMap } from "../DefaultAlertingDialog/utils/getters.js";
4
+ import { type AlertAttribute, type AlertMetric } from "../types.js";
5
5
  /**
6
6
  * Props for {@link useAlertFiltersModel}.
7
7
  * @internal
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertFiltersModel.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertFiltersModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAC;AAExE,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EACjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAKnF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACvC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,mBAAmB,EACnB,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,QAAQ,EACX,EAAE,0BAA0B,GAAG;IAC5B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAClD,eAAe,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACxD,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC5B,CAsGA"}
@@ -1,8 +1,8 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { useCallback } from "react";
3
- import { useValidateExistingAutomationFilters } from "../../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
4
- import { getAppliedWidgetFilters, getVisibleFiltersByFilters } from "../../../shared/filters/index.js";
5
- import { transformAlertByAttribute, transformAlertByMetric } from "../utils/transformation.js";
3
+ import { useValidateExistingAutomationFilters } from "../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
4
+ import { getAppliedWidgetFilters, getVisibleFiltersByFilters } from "../../shared/filters/index.js";
5
+ import { transformAlertByAttribute, transformAlertByMetric, } from "../DefaultAlertingDialog/utils/transformation.js";
6
6
  /**
7
7
  * Owns the alerting dialog's single filter model: the current selection and available filters,
8
8
  * `onFiltersChange`/`onApplyCurrentFilters` to mutate the edited filters and mirror the result into
@@ -1,6 +1,6 @@
1
1
  import { type DateAttributeGranularity, type FilterContextItem, type IAlertAnomalyDetectionGranularity, type IAlertAnomalyDetectionSensitivity, type IAlertComparisonOperator, type IAlertRelativeArithmeticOperator, type IAlertRelativeOperator, type IAlertTriggerInterval, type IAlertTriggerMode, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IAutomationVisibleFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
2
- import { type AlertAttribute, type AlertMetric, type AlertMetricComparatorType } from "../../types.js";
3
- import { type IMeasureFormatMap } from "../utils/getters.js";
2
+ import { type IMeasureFormatMap } from "../DefaultAlertingDialog/utils/getters.js";
3
+ import { type AlertAttribute, type AlertMetric, type AlertMetricComparatorType } from "../types.js";
4
4
  /**
5
5
  * Props for {@link useAlertFormState}.
6
6
  * @internal
@@ -34,8 +34,8 @@ export declare function useAlertFormState({ alertToEdit, insight, widget, notifi
34
34
  originalAutomation: IAutomationMetadataObjectDefinition | undefined;
35
35
  defaultUser: IAutomationRecipient;
36
36
  defaultRecipient: IAutomationRecipient;
37
- automationParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
38
- availableParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
37
+ automationParameters: import("../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
38
+ availableParameters: import("../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
39
39
  onParameterChange: (ref: import("@gooddata/sdk-model").IdentifierRef, value: string | number) => void;
40
40
  onParameterDelete: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
41
41
  onParameterAdd: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertFormState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertFormState.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAWnF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAEpG;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9C,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,gBAAgB,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,WAAW,EACX,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACnB,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwZzB"}
@@ -1,14 +1,14 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { useCallback, useMemo, useState } from "react";
3
3
  import { useIntl } from "react-intl";
4
- import { useAlertingDialogContext } from "../../../contexts/AlertingDialogContext.js";
5
- import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
6
- import { setAlertExecutionParameters } from "../../../shared/automationFilters/automationParameters.js";
7
- import { useAutomationAlertParameters } from "../../../shared/automationFilters/useAutomationAlertParameters.js";
8
- import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveMvfDimensionalityLocalRefs, } from "../../../shared/filters/index.js";
9
- import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../../shared/utils/automationUtils.js";
10
- import { createDefaultAlert } from "../utils/convertors.js";
11
- import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, } from "../utils/transformation.js";
4
+ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
5
+ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
6
+ import { setAlertExecutionParameters } from "../../shared/automationFilters/automationParameters.js";
7
+ import { useAutomationAlertParameters } from "../../shared/automationFilters/useAutomationAlertParameters.js";
8
+ import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveMvfDimensionalityLocalRefs, } from "../../shared/filters/index.js";
9
+ import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../shared/utils/automationUtils.js";
10
+ import { createDefaultAlert } from "../DefaultAlertingDialog/utils/convertors.js";
11
+ import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, } from "../DefaultAlertingDialog/utils/transformation.js";
12
12
  /**
13
13
  * Owns the alerting dialog's editable state: the `editedAutomation` draft (initialized either
14
14
  * from `alertToEdit` or via `createDefaultAlert`), its `originalAutomation` baseline, the
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertFormValidation.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertFormValidation.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EAIf,MAAM,qBAAqB,CAAC;AAM7B,MAAM,WAAW,4BAA4B;IACzC,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,kBAAkB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IACpE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,4BAA4B,EAAE,OAAO,CAAC;IACtC,2BAA2B,EACrB,8BAA8B,GAC9B,kCAAkC,GAClC,SAAS,CAAC;IAChB,uBAAuB,EAAE,OAAO,CAAC;IACjC,6BAA6B,EAAE,OAAO,CAAC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,GAAG;IACzE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,aAAa,EAAE,OAAO,CAAC;CAC1B,CA4EA"}
@@ -2,9 +2,9 @@
2
2
  import { isEqual } from "lodash-es";
3
3
  import { useIntl } from "react-intl";
4
4
  import { isAutomationExternalUserRecipient, isAutomationUnknownUserRecipient, isAutomationUserRecipient, } from "@gooddata/sdk-model";
5
- import { isEmail } from "../../../scheduledEmail/utils/validate.js";
6
- import { isAlertValueDefined } from "../utils/guards.js";
7
- import { useAlertValidation } from "./useAlertValidation.js";
5
+ import { isEmail } from "../../scheduledEmail/utils/validate.js";
6
+ import { useAlertValidation } from "../DefaultAlertingDialog/hooks/useAlertValidation.js";
7
+ import { isAlertValueDefined } from "../DefaultAlertingDialog/utils/guards.js";
8
8
  export function useAlertFormValidation(props) {
9
9
  const { editedAutomation, originalAutomation, alertToEdit, widget, insight, catalogDateDatasets, isInvalidConnectionToInsight, selectedNotificationChannel, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxAutomationsRecipients, defaultRecipient, isTitleValid, } = props;
10
10
  const intl = useIntl();
@@ -1,10 +1,10 @@
1
1
  import { type IAutomationMetadataObjectDefinition, type INotificationChannelIdentifier, type INotificationChannelMetadataObject } from "@gooddata/sdk-model";
2
- import { type AlertAttribute, type AlertMetric } from "../../types.js";
2
+ import { type AlertAttribute, type AlertMetric } from "../types.js";
3
3
  /**
4
- * Props for {@link useAlertSelectedValues}.
4
+ * Props for {@link getAlertSelectedValues}.
5
5
  * @internal
6
6
  */
7
- export interface IUseAlertSelectedValuesProps {
7
+ export interface IGetAlertSelectedValuesProps {
8
8
  editedAutomation: IAutomationMetadataObjectDefinition | undefined;
9
9
  supportedMeasures: AlertMetric[];
10
10
  supportedAttributes: AlertAttribute[];
@@ -15,17 +15,17 @@ export interface IUseAlertSelectedValuesProps {
15
15
  *
16
16
  * Deliberately unmemoized. The returned objects flow into `useCallback` dependency arrays and
17
17
  * `useThresholdValue` arguments, so recomputing them every render is what keeps those consumers
18
- * behaving correctly — memoizing here would be a behaviour change, not an optimisation. The hook
19
- * therefore calls no React hooks of its own.
18
+ * behaving correctly — memoizing here would be a behaviour change, not an optimisation. The
19
+ * function therefore calls no React hooks of its own.
20
20
  *
21
21
  * @internal
22
22
  */
23
- export declare function useAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels }: IUseAlertSelectedValuesProps): {
23
+ export declare function getAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels }: IGetAlertSelectedValuesProps): {
24
24
  selectedMeasure: AlertMetric | undefined;
25
25
  selectedComparisonOperator: import("@gooddata/sdk-model").IAlertComparisonOperator | undefined;
26
26
  selectedRelativeOperator: [import("@gooddata/sdk-model").IAlertRelativeOperator, import("@gooddata/sdk-model").IAlertRelativeArithmeticOperator] | undefined;
27
27
  selectedAiOperator: "AI.ANOMALY_DETECTION" | undefined;
28
- selectedComparator: import("../../types.js").AlertMetricComparator | undefined;
28
+ selectedComparator: import("../types.js").AlertMetricComparator | undefined;
29
29
  selectedSensitivity: import("@gooddata/sdk-model").IAlertAnomalyDetectionSensitivity | undefined;
30
30
  selectedGranularity: import("@gooddata/sdk-model").IAlertAnomalyDetectionGranularity | undefined;
31
31
  selectedAttribute: AlertAttribute | undefined;
@@ -34,4 +34,14 @@ export declare function useAlertSelectedValues({ editedAutomation, supportedMeas
34
34
  allowExternalRecipients: boolean;
35
35
  allowOnlyLoggedUserRecipients: boolean;
36
36
  };
37
+ /**
38
+ * Reads the currently-selected form values for the alerting dialog.
39
+ *
40
+ * Derived per consumer rather than published on a context: the returned objects flow into
41
+ * `useCallback` dependency arrays and `useAlertThreshold` arguments, so recomputing them every
42
+ * render is what keeps those consumers behaving correctly.
43
+ *
44
+ * @internal
45
+ */
46
+ export declare function useAlertSelectedValues(): ReturnType<typeof getAlertSelectedValues>;
37
47
  //# sourceMappingURL=useAlertSelectedValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertSelectedValues.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertSelectedValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAKpE;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IACzC,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;CACjG;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACvB,EAAE,4BAA4B;;;;;;;;;;;;;EA+B9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAWlF"}
@@ -1,16 +1,19 @@
1
1
  // (C) 2026 GoodData Corporation
2
- import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, } from "../utils/getters.js";
2
+ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
3
+ import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, } from "../DefaultAlertingDialog/utils/getters.js";
4
+ import { useAlertData } from "./AlertDataContext.js";
5
+ import { useAlertDraft } from "./AlertDraftContext.js";
3
6
  /**
4
7
  * Derives the currently-selected form values from the edited alert draft.
5
8
  *
6
9
  * Deliberately unmemoized. The returned objects flow into `useCallback` dependency arrays and
7
10
  * `useThresholdValue` arguments, so recomputing them every render is what keeps those consumers
8
- * behaving correctly — memoizing here would be a behaviour change, not an optimisation. The hook
9
- * therefore calls no React hooks of its own.
11
+ * behaving correctly — memoizing here would be a behaviour change, not an optimisation. The
12
+ * function therefore calls no React hooks of its own.
10
13
  *
11
14
  * @internal
12
15
  */
13
- export function useAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels, }) {
16
+ export function getAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels, }) {
14
17
  const selectedMeasure = getAlertMeasure(supportedMeasures, editedAutomation?.alert);
15
18
  const selectedComparisonOperator = getAlertCompareOperator(editedAutomation?.alert);
16
19
  const selectedRelativeOperator = getAlertRelativeOperator(editedAutomation?.alert);
@@ -37,3 +40,23 @@ export function useAlertSelectedValues({ editedAutomation, supportedMeasures, su
37
40
  allowOnlyLoggedUserRecipients,
38
41
  };
39
42
  }
43
+ /**
44
+ * Reads the currently-selected form values for the alerting dialog.
45
+ *
46
+ * Derived per consumer rather than published on a context: the returned objects flow into
47
+ * `useCallback` dependency arrays and `useAlertThreshold` arguments, so recomputing them every
48
+ * render is what keeps those consumers behaving correctly.
49
+ *
50
+ * @internal
51
+ */
52
+ export function useAlertSelectedValues() {
53
+ const { editedAutomation } = useAlertDraft();
54
+ const { supportedMeasures, supportedAttributes } = useAlertData();
55
+ const { notificationChannels } = useAlertingDialogContext();
56
+ return getAlertSelectedValues({
57
+ editedAutomation,
58
+ supportedMeasures,
59
+ supportedAttributes,
60
+ notificationChannels,
61
+ });
62
+ }
@@ -1,7 +1,7 @@
1
1
  import { type IAutomationMetadataObject, type IInsight, type IWidget } from "@gooddata/sdk-model";
2
- import { type AlertAttribute, type AlertMetric } from "../../types.js";
3
- import { type IMeasureFormatMap } from "../utils/getters.js";
4
- import { useAttributeValuesFromExecResults } from "./useAttributeValuesFromExecResults.js";
2
+ import { useAttributeValuesFromExecResults } from "../DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.js";
3
+ import { type IMeasureFormatMap } from "../DefaultAlertingDialog/utils/getters.js";
4
+ import { type AlertAttribute, type AlertMetric } from "../types.js";
5
5
  export interface IUseAlertSupportedMetricsProps {
6
6
  insight?: IInsight;
7
7
  widget?: IWidget;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlertSupportedMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertSupportedMetrics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKlG,OAAO,EAAE,iCAAiC,EAAE,MAAM,qEAAqE,CAAC;AACxH,OAAO,EACH,KAAK,iBAAiB,EAEzB,MAAM,2CAA2C,CAAC;AAKnD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,WAAW,8BAA8B;IAC3C,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,yBAAyB,CAAC;CAC3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,8BAA8B,GAAG;IACxG,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC/F,cAAc,EAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,gBAAgB,CAAC,CAAC;CAC1F,CA8CA"}
@@ -1,11 +1,11 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { fillMissingTitles } from "@gooddata/sdk-ui";
4
- import { useAlertingDialogContext } from "../../../contexts/AlertingDialogContext.js";
5
- import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
6
- import { getMeasureFormatsFromExecution } from "../utils/getters.js";
7
- import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../utils/items.js";
8
- import { useAttributeValuesFromExecResults } from "./useAttributeValuesFromExecResults.js";
4
+ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
5
+ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
6
+ import { useAttributeValuesFromExecResults } from "../DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.js";
7
+ import { getMeasureFormatsFromExecution, } from "../DefaultAlertingDialog/utils/getters.js";
8
+ import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../DefaultAlertingDialog/utils/items.js";
9
9
  /**
10
10
  * Derives which measures and attributes the alerting dialog may offer for the current widget: it
11
11
  * resolves the effective insight and its execution result, then narrows the catalog down to the
@@ -1,4 +1,4 @@
1
- import { type ComponentType } from "react";
1
+ import { type ComponentType, type ReactNode } from "react";
2
2
  import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
3
3
  import { type GoodDataSdkError } from "@gooddata/sdk-ui";
4
4
  /**
@@ -43,6 +43,20 @@ export interface IAlertingDialogProps {
43
43
  * @deprecated read `isLoading` from `useAlertingDialogContext()` instead. Prop will be removed.
44
44
  */
45
45
  isLoading?: boolean;
46
+ /**
47
+ * Custom content rendered as the first child of the dialog content area, above the default form.
48
+ *
49
+ * @remarks
50
+ * Use this to surface an application-specific banner or warning without replacing the whole dialog.
51
+ */
52
+ topContent?: ReactNode;
53
+ /**
54
+ * Custom content rendered as the last child of the dialog content area, below the default form.
55
+ *
56
+ * @remarks
57
+ * Use this to surface an application-specific note or disclaimer without replacing the whole dialog.
58
+ */
59
+ bottomContent?: ReactNode;
46
60
  /**
47
61
  * Callback to be called, when user closes the alert dialog.
48
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAMzD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,yBAAyB,CAAC;IAExC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,eAAe,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAEjE;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;OAKG;IACH,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAElD;;;;OAIG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3E;;;;OAIG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAMD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,aAAa,CAAC,8BAA8B,CAAC,CAAC;AAEpG;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAMD;;GAEG;AACH,oBAAY,yBAAyB;IACjC,cAAc,IAAA;IACd,sBAAsB,IAAA;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,yBAAyB,CAAC;IAEtC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,SAAS,EAAE,UAAU,CAAC;IACtB,IAAI,EAAE,eAAe,GAAG,WAAW,CAAC;CACvC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAMzD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,yBAAyB,CAAC;IAExC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,eAAe,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAEjE;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;OAKG;IACH,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAElD;;;;OAIG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3E;;;;OAIG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAMD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,aAAa,CAAC,8BAA8B,CAAC,CAAC;AAEpG;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAMD;;GAEG;AACH,oBAAY,yBAAyB;IACjC,cAAc,IAAA;IACd,sBAAsB,IAAA;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,yBAAyB,CAAC;IAEtC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,SAAS,EAAE,UAAU,CAAC;IACtB,IAAI,EAAE,eAAe,GAAG,WAAW,CAAC;CACvC,CAAC"}
@@ -40,6 +40,32 @@ export interface IAlertingDialogContextValue {
40
40
  /** True while the dialog's initial data (automations) is still loading. */
41
41
  isLoading: boolean;
42
42
  }
43
+ /**
44
+ * Provider for {@link IAlertingDialogContextValue}.
45
+ *
46
+ * Besides the connector's own use, a custom `AlertingDialogComponent` can decorate the context for the
47
+ * default dialog: read the value via {@link useAlertingDialogContext}, adjust it (e.g. swap the
48
+ * `insight`), and re-provide it around `DefaultAlertingDialog`.
49
+ *
50
+ * The default dialog renders from the alert state contexts, which are initialized from this context
51
+ * **above** the resolved dialog component. A decorator that changes data members must therefore also
52
+ * remount `AlertingDialogStateProvider` beneath the re-provided context, so the state is derived from
53
+ * the decorated value (the nested state shadows the ambient one):
54
+ *
55
+ * ```tsx
56
+ * const ctx = useAlertingDialogContext();
57
+ * const value = useMemo(() => ({ ...ctx, insight: decoratedInsight }), [ctx, decoratedInsight]);
58
+ * return (
59
+ * <AlertingDialogContextProvider value={value}>
60
+ * <AlertingDialogStateProvider>
61
+ * <DefaultAlertingDialog {...props} />
62
+ * </AlertingDialogStateProvider>
63
+ * </AlertingDialogContextProvider>
64
+ * );
65
+ * ```
66
+ *
67
+ * @alpha
68
+ */
43
69
  export declare const AlertingDialogContextProvider: import("react").Provider<IAlertingDialogContextValue | undefined>;
44
70
  /**
45
71
  * Reads the alerting create/edit dialog context.
@@ -1 +1 @@
1
- {"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,mBAAmB,EACnB,QAAQ,EACR,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,MAAM,EACT,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK;QAAE,eAAe,CAAC,EAAE,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;IACtG,+HAA+H;IAC/H,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,KAAK,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5F,SAAS,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iEAAiE;IACjE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,6DAA6D;IAC7D,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,6BAA6B,mEAAiC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,2BAA2B,CAMtE"}
1
+ {"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,mBAAmB,EACnB,QAAQ,EACR,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,MAAM,EACT,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK;QAAE,eAAe,CAAC,EAAE,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;IACtG,+HAA+H;IAC/H,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,KAAK,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5F,SAAS,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iEAAiE;IACjE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,6DAA6D;IAC7D,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,6BAA6B,mEAAiC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,2BAA2B,CAMtE"}
@@ -1,6 +1,32 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { createContext, useContext } from "react";
3
3
  const AlertingDialogContext = createContext(undefined);
4
+ /**
5
+ * Provider for {@link IAlertingDialogContextValue}.
6
+ *
7
+ * Besides the connector's own use, a custom `AlertingDialogComponent` can decorate the context for the
8
+ * default dialog: read the value via {@link useAlertingDialogContext}, adjust it (e.g. swap the
9
+ * `insight`), and re-provide it around `DefaultAlertingDialog`.
10
+ *
11
+ * The default dialog renders from the alert state contexts, which are initialized from this context
12
+ * **above** the resolved dialog component. A decorator that changes data members must therefore also
13
+ * remount `AlertingDialogStateProvider` beneath the re-provided context, so the state is derived from
14
+ * the decorated value (the nested state shadows the ambient one):
15
+ *
16
+ * ```tsx
17
+ * const ctx = useAlertingDialogContext();
18
+ * const value = useMemo(() => ({ ...ctx, insight: decoratedInsight }), [ctx, decoratedInsight]);
19
+ * return (
20
+ * <AlertingDialogContextProvider value={value}>
21
+ * <AlertingDialogStateProvider>
22
+ * <DefaultAlertingDialog {...props} />
23
+ * </AlertingDialogStateProvider>
24
+ * </AlertingDialogContextProvider>
25
+ * );
26
+ * ```
27
+ *
28
+ * @alpha
29
+ */
4
30
  export const AlertingDialogContextProvider = AlertingDialogContext.Provider;
5
31
  /**
6
32
  * Reads the alerting create/edit dialog context.