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