@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
|
@@ -1,41 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2022-2026 GoodData Corporation
|
|
3
|
-
import { useCallback
|
|
4
|
-
import {
|
|
5
|
-
import { DeleteAlertConfirmDialog } from "./components/DeleteAlertConfirmDialog.js";
|
|
6
|
-
import { PauseAlertRunner } from "./components/PauseAlertRunner.js";
|
|
7
|
-
import { DefaultAlertingManagementDialogContentBasic } from "./DefaultAlertingManagementDialogContentBasic.js";
|
|
8
|
-
import { DefaultAlertingManagementDialogContentEnhanced } from "./DefaultAlertingManagementDialogContentEnhanced.js";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { DefaultAlertingManagementDialogContent } from "./DefaultAlertingManagementDialogContent.js";
|
|
9
5
|
/**
|
|
10
6
|
* @alpha
|
|
11
7
|
*/
|
|
12
|
-
export function DefaultAlertingManagementDialogNew({
|
|
13
|
-
const [alertToDelete, setAlertToDelete] = useState(null);
|
|
14
|
-
const [alertToPause, setAlertToPause] = useState(null);
|
|
15
|
-
const { features: { enableAutomationManagement }, } = useAutomationsContext();
|
|
16
|
-
const handleAlertDeleteOpen = useCallback((alert) => {
|
|
17
|
-
setAlertToDelete(alert);
|
|
18
|
-
}, []);
|
|
19
|
-
const handleAlertDeleteClose = useCallback(() => {
|
|
20
|
-
setAlertToDelete(null);
|
|
21
|
-
}, []);
|
|
8
|
+
export function DefaultAlertingManagementDialogNew({ onEdit, onAdd, onClose, }) {
|
|
22
9
|
const handleAlertEdit = useCallback((alert) => {
|
|
23
10
|
onEdit?.(alert);
|
|
24
11
|
}, [onEdit]);
|
|
25
|
-
|
|
26
|
-
setAlertToPause([alert, pause]);
|
|
27
|
-
}, []);
|
|
28
|
-
const handleAlertDeleteSuccess = useCallback((alert) => {
|
|
29
|
-
onDeleteSuccess?.(alert);
|
|
30
|
-
handleAlertDeleteClose();
|
|
31
|
-
}, [onDeleteSuccess, handleAlertDeleteClose]);
|
|
32
|
-
const handleAlertPauseSuccess = useCallback((alert, pause) => {
|
|
33
|
-
onPauseSuccess?.(alert, pause);
|
|
34
|
-
setAlertToPause(null);
|
|
35
|
-
}, [onPauseSuccess]);
|
|
36
|
-
const handleAlertPauseError = useCallback((err, pause) => {
|
|
37
|
-
onPauseError?.(err, pause);
|
|
38
|
-
setAlertToPause(null);
|
|
39
|
-
}, [onPauseError]);
|
|
40
|
-
return (_jsxs(_Fragment, { children: [enableAutomationManagement ? (_jsx(DefaultAlertingManagementDialogContentEnhanced, { onAdd: onAdd, onClose: onClose, onEdit: handleAlertEdit })) : (_jsx(DefaultAlertingManagementDialogContentBasic, { onClose: onClose, onDelete: handleAlertDeleteOpen, onEdit: handleAlertEdit, onPause: handleAlertPause, isLoadingAlertingData: isLoadingAlertingData, automations: automations })), alertToDelete ? (_jsx(DeleteAlertConfirmDialog, { alert: alertToDelete, onCancel: handleAlertDeleteClose, onSuccess: handleAlertDeleteSuccess, onError: onDeleteError })) : null, alertToPause ? (_jsx(PauseAlertRunner, { alert: alertToPause[0], pause: alertToPause[1], onSuccess: handleAlertPauseSuccess, onError: handleAlertPauseError })) : null] }));
|
|
12
|
+
return (_jsx(DefaultAlertingManagementDialogContent, { onAdd: onAdd, onClose: onClose, onEdit: handleAlertEdit }));
|
|
41
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,yBAAyB,EAAmB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAQH,kBAAkB,EAKrB,MAAM,sBAAsB,CAAC;AAS9B,UAAU,WAAW;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IACjC,aAAa,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,kBAAkB,CAAC;IAChE,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAkBD,wBAAgB,KAAK,CAAC,EAClB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,iBAAiB,EACpB,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,yBAAyB,EAAmB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAQH,kBAAkB,EAKrB,MAAM,sBAAsB,CAAC;AAS9B,UAAU,WAAW;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IACjC,aAAa,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,kBAAkB,CAAC;IAChE,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAkBD,wBAAgB,KAAK,CAAC,EAClB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,iBAAiB,EACpB,EAAE,WAAW,2CAgKb"}
|
package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.js
CHANGED
|
@@ -29,13 +29,13 @@ export function Alert({ alert, onDelete, onEdit, onTogglePause, focusedAction, i
|
|
|
29
29
|
const isPaused = alert.alert?.trigger.state === "PAUSED";
|
|
30
30
|
const editWidgetId = alert.metadata?.widget;
|
|
31
31
|
const editWidgetRef = editWidgetId ? { identifier: editWidgetId } : undefined;
|
|
32
|
-
const { separators, catalogDateDatasets
|
|
32
|
+
const { separators, catalogDateDatasets } = useAutomationsContext();
|
|
33
33
|
const { canManageWorkspace, currentUser, getWidgetByRef, getInsightByWidgetRef } = useAlertingManagementDialogContext();
|
|
34
34
|
const widget = getWidgetByRef(editWidgetRef);
|
|
35
35
|
const insight = getInsightByWidgetRef(widget?.ref);
|
|
36
36
|
const insightWidget = isInsightWidget(widget) ? widget : undefined;
|
|
37
37
|
const widgetName = insightWidget?.title ?? "";
|
|
38
|
-
const { isValid } = useAlertValidation(alert, widget, insight, catalogDateDatasets, undefined
|
|
38
|
+
const { isValid } = useAlertValidation(alert, widget, insight, catalogDateDatasets, undefined);
|
|
39
39
|
const iconColor = theme?.palette?.complementary?.c6 ?? gdColorStateBlank;
|
|
40
40
|
const iconColorError = theme?.palette?.error?.base ?? gdColorNegative;
|
|
41
41
|
const iconActive = _jsx(IconAlert, { color: iconColor });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetSupportedMeasures.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/hooks/useGetSupportedMeasures.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"useGetSupportedMeasures.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/hooks/useGetSupportedMeasures.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kDAYnC,CAAC"}
|
|
@@ -11,12 +11,12 @@ import { getSupportedInsightMeasuresByInsight } from "../DefaultAlertingDialog/u
|
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
13
|
export const useGetSupportedMeasures = (insight) => {
|
|
14
|
-
const { catalogDateDatasets, locale
|
|
14
|
+
const { catalogDateDatasets, locale } = useAutomationsContext();
|
|
15
15
|
const [effectiveInsight, setEffectiveInsight] = useState(undefined);
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
if (insight) {
|
|
18
18
|
void fillMissingTitles(insight, locale, 9999).then(setEffectiveInsight);
|
|
19
19
|
}
|
|
20
20
|
}, [insight, locale]);
|
|
21
|
-
return useMemo(() => getSupportedInsightMeasuresByInsight(effectiveInsight, catalogDateDatasets
|
|
21
|
+
return useMemo(() => getSupportedInsightMeasuresByInsight(effectiveInsight, catalogDateDatasets), [effectiveInsight, catalogDateDatasets]);
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/AlertingConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"AlertingConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/AlertingConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB1D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAG/F;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,GAAG,IAAI,CAMvD"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useCallback } from "react";
|
|
4
2
|
import { isWidget } from "@gooddata/sdk-model";
|
|
5
|
-
import { buildAutomationUrl, navigate, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
6
|
-
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
7
3
|
import { useDashboardAlerts } from "../../../model/react/useDashboardAlerting/useDashboardAlerts.js";
|
|
8
4
|
import { useWorkspaceUsers } from "../../../model/react/useWorkspaceUsers.js";
|
|
9
|
-
import { selectEnableAutomationManagement, selectExternalRecipient, selectIsEmbedded, selectSettings, } from "../../../model/store/config/configSelectors.js";
|
|
10
|
-
import { selectDashboardId } from "../../../model/store/meta/metaSelectors.js";
|
|
11
5
|
import { AlertingDialog } from "../alerting/AlertingDialog.js";
|
|
12
6
|
import { AlertingManagementDialog } from "../alerting/AlertingManagementDialog.js";
|
|
13
7
|
import { AlertingDialogContextProvider } from "../contexts/AlertingDialogContext.js";
|
|
14
8
|
import { AlertingManagementDialogContextProvider } from "../contexts/AlertingManagementDialogContext.js";
|
|
15
9
|
import { AutomationsContextProvider } from "../contexts/AutomationsContext.js";
|
|
10
|
+
import { useAutomationManagementEditRouting } from "./hooks/useAutomationManagementEditRouting.js";
|
|
16
11
|
import { useBuildAlertingDialogContext } from "./hooks/useBuildAlertingDialogContext.js";
|
|
17
12
|
import { useBuildAlertingManagementDialogContext } from "./hooks/useBuildAlertingManagementDialogContext.js";
|
|
18
13
|
import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.js";
|
|
@@ -69,40 +64,7 @@ function AlertingConnectorWithData({ alerts }) {
|
|
|
69
64
|
isAlertDialogOpen, onAlertingCancel, onAlertingCreateSuccess, onAlertingCreateError, onAlertingSaveSuccess, onAlertingSaveError,
|
|
70
65
|
// Management / List Dialog
|
|
71
66
|
isAlertManagementDialogOpen, onAlertingManagementClose, onAlertingManagementAdd, onAlertingManagementEdit, onAlertingManagementDeleteSuccess, onAlertingManagementDeleteError, onAlertingManagementPauseSuccess, onAlertingManagementPauseError, widget, insight, } = alerts;
|
|
72
|
-
const
|
|
73
|
-
const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
|
|
74
|
-
const dashboardId = useDashboardSelector(selectDashboardId);
|
|
75
|
-
const isEmbedded = useDashboardSelector(selectIsEmbedded);
|
|
76
|
-
const externalRecipientOverride = useDashboardSelector(selectExternalRecipient);
|
|
77
|
-
const settings = useDashboardSelector(selectSettings);
|
|
78
|
-
const useHostRoute = Boolean(settings?.enableShellApplication) && Boolean(settings?.enableShellApplication_dashboards);
|
|
79
|
-
// Cross-dashboard edit routing lives in the connector (which may read router + store).
|
|
80
|
-
// The management dialog only invokes this injected callback.
|
|
81
|
-
const handleManagementEdit = useCallback((alert) => {
|
|
82
|
-
const targetDashboardId = alert.dashboard?.id;
|
|
83
|
-
if (enableAutomationManagement && targetDashboardId && targetDashboardId !== dashboardId) {
|
|
84
|
-
navigate(buildAutomationUrl({
|
|
85
|
-
workspaceId: workspace,
|
|
86
|
-
dashboardId: targetDashboardId,
|
|
87
|
-
automationId: alert.id,
|
|
88
|
-
isEmbedded,
|
|
89
|
-
useHostRoute,
|
|
90
|
-
queryParams: externalRecipientOverride
|
|
91
|
-
? { recipient: externalRecipientOverride }
|
|
92
|
-
: undefined,
|
|
93
|
-
}));
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
onAlertingManagementEdit(alert);
|
|
97
|
-
}, [
|
|
98
|
-
onAlertingManagementEdit,
|
|
99
|
-
enableAutomationManagement,
|
|
100
|
-
dashboardId,
|
|
101
|
-
workspace,
|
|
102
|
-
isEmbedded,
|
|
103
|
-
useHostRoute,
|
|
104
|
-
externalRecipientOverride,
|
|
105
|
-
]);
|
|
67
|
+
const handleManagementEdit = useAutomationManagementEditRouting(onAlertingManagementEdit);
|
|
106
68
|
const insightWidget = isWidget(widget) ? widget : undefined;
|
|
107
69
|
const alertingCtx = useBuildAlertingDialogContext({
|
|
108
70
|
mode: alertToEdit ? "edit" : "create",
|
|
@@ -57,7 +57,6 @@ vi.mock("../../../model/react/useWorkspaceUsers.js", () => ({
|
|
|
57
57
|
useWorkspaceUsers: () => ({ users: [], status: "success", usersError: undefined }),
|
|
58
58
|
}));
|
|
59
59
|
vi.mock("../../../model/store/config/configSelectors.js", () => ({
|
|
60
|
-
selectEnableAutomationManagement: () => true,
|
|
61
60
|
selectExternalRecipient: () => "recipient@example.com",
|
|
62
61
|
selectIsEmbedded: () => false,
|
|
63
62
|
selectSettings: () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/ScheduledEmailConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"ScheduledEmailConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/ScheduledEmailConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA+B1D;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAGrG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,YAAY,GAAG,IAAI,CAM7D"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useCallback } from "react";
|
|
4
2
|
import { isWidget } from "@gooddata/sdk-model";
|
|
5
|
-
import { buildAutomationUrl, navigate, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
6
3
|
import { getAutomationDashboardFilters, getAutomationVisualizationFilters, } from "../../../_staging/automation/index.js";
|
|
7
4
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
8
5
|
import { useDashboardScheduledEmails } from "../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js";
|
|
9
6
|
import { useWorkspaceUsers } from "../../../model/react/useWorkspaceUsers.js";
|
|
10
|
-
import { selectEnableAutomationManagement, selectExternalRecipient, selectIsEmbedded, selectSettings, } from "../../../model/store/config/configSelectors.js";
|
|
11
7
|
import { selectAutomationDefaultSelectedFilters, selectDashboardHiddenFilters, } from "../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
12
|
-
import { selectDashboardId } from "../../../model/store/meta/metaSelectors.js";
|
|
13
8
|
import { AutomationsContextProvider } from "../contexts/AutomationsContext.js";
|
|
14
9
|
import { ScheduledEmailDialogContextProvider } from "../contexts/ScheduledEmailDialogContext.js";
|
|
15
10
|
import { ScheduledEmailManagementDialogContextProvider } from "../contexts/ScheduledEmailManagementDialogContext.js";
|
|
16
11
|
import { ScheduledEmailDialog } from "../scheduledEmail/ScheduledEmailDialog.js";
|
|
17
12
|
import { ScheduledEmailManagementDialog } from "../scheduledEmail/ScheduledEmailManagementDialog.js";
|
|
18
13
|
import { getAppliedDashboardFilters } from "../scheduledEmail/utils/filters.js";
|
|
14
|
+
import { useAutomationManagementEditRouting } from "./hooks/useAutomationManagementEditRouting.js";
|
|
19
15
|
import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.js";
|
|
20
16
|
import { useBuildScheduledEmailDialogContext } from "./hooks/useBuildScheduledEmailDialogContext.js";
|
|
21
17
|
import { useBuildScheduledEmailManagementDialogContext } from "./hooks/useBuildScheduledEmailManagementDialogContext.js";
|
|
@@ -71,40 +67,7 @@ function ScheduledEmailConnectorWithData({ se }) {
|
|
|
71
67
|
isScheduleEmailingDialogOpen, onScheduleEmailingCancel, onScheduleEmailingBack, onScheduleEmailingCreateSuccess, onScheduleEmailingCreateError, onScheduleEmailingSaveSuccess, onScheduleEmailingSaveError,
|
|
72
68
|
// Management / List Dialog
|
|
73
69
|
isScheduleEmailingManagementDialogOpen, onScheduleEmailingManagementClose, onScheduleEmailingManagementAdd, onScheduleEmailingManagementEdit, onScheduleEmailingManagementDeleteSuccess, onScheduleEmailingManagementDeleteError, widget, insight, } = se;
|
|
74
|
-
const
|
|
75
|
-
const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
|
|
76
|
-
const dashboardId = useDashboardSelector(selectDashboardId);
|
|
77
|
-
const isEmbedded = useDashboardSelector(selectIsEmbedded);
|
|
78
|
-
const externalRecipientOverride = useDashboardSelector(selectExternalRecipient);
|
|
79
|
-
const settings = useDashboardSelector(selectSettings);
|
|
80
|
-
const useHostRoute = Boolean(settings?.enableShellApplication) && Boolean(settings?.enableShellApplication_dashboards);
|
|
81
|
-
// Cross-dashboard edit routing lives in the connector (which may read router + store).
|
|
82
|
-
// The management dialog only invokes this injected callback.
|
|
83
|
-
const handleManagementEdit = useCallback((scheduledEmail) => {
|
|
84
|
-
const targetDashboardId = scheduledEmail.dashboard?.id;
|
|
85
|
-
if (enableAutomationManagement && targetDashboardId && targetDashboardId !== dashboardId) {
|
|
86
|
-
navigate(buildAutomationUrl({
|
|
87
|
-
workspaceId: workspace,
|
|
88
|
-
dashboardId: targetDashboardId,
|
|
89
|
-
automationId: scheduledEmail.id,
|
|
90
|
-
isEmbedded,
|
|
91
|
-
useHostRoute,
|
|
92
|
-
queryParams: externalRecipientOverride
|
|
93
|
-
? { recipient: externalRecipientOverride }
|
|
94
|
-
: undefined,
|
|
95
|
-
}));
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
onScheduleEmailingManagementEdit(scheduledEmail);
|
|
99
|
-
}, [
|
|
100
|
-
onScheduleEmailingManagementEdit,
|
|
101
|
-
enableAutomationManagement,
|
|
102
|
-
dashboardId,
|
|
103
|
-
workspace,
|
|
104
|
-
isEmbedded,
|
|
105
|
-
useHostRoute,
|
|
106
|
-
externalRecipientOverride,
|
|
107
|
-
]);
|
|
70
|
+
const handleManagementEdit = useAutomationManagementEditRouting(onScheduleEmailingManagementEdit);
|
|
108
71
|
// Filter computation — moved verbatim from ScheduledEmailDialogProvider
|
|
109
72
|
const automationDefaultSelectedFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
|
|
110
73
|
const dashboardHiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
|
|
@@ -56,7 +56,6 @@ vi.mock("../../../model/react/useWorkspaceUsers.js", () => ({
|
|
|
56
56
|
useWorkspaceUsers: () => ({ users: [], status: "success", usersError: undefined }),
|
|
57
57
|
}));
|
|
58
58
|
vi.mock("../../../model/store/config/configSelectors.js", () => ({
|
|
59
|
-
selectEnableAutomationManagement: () => true,
|
|
60
59
|
selectExternalRecipient: () => "recipient@example.com",
|
|
61
60
|
selectIsEmbedded: () => false,
|
|
62
61
|
selectSettings: () => ({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
+
/**
|
|
3
|
+
* Handles cross-dashboard edit routing for automation management dialogs.
|
|
4
|
+
*
|
|
5
|
+
* When the automation belongs to a different dashboard, navigates there directly.
|
|
6
|
+
* Otherwise falls back to `onLocalEdit`.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function useAutomationManagementEditRouting(onLocalEdit: (automation: IAutomationMetadataObject) => void): (automation: IAutomationMetadataObject) => void;
|
|
11
|
+
//# sourceMappingURL=useAutomationManagementEditRouting.d.ts.map
|
package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutomationManagementEditRouting.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAYrE;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAC9C,WAAW,EAAE,CAAC,UAAU,EAAE,yBAAyB,KAAK,IAAI,GAC7D,CAAC,UAAU,EAAE,yBAAyB,KAAK,IAAI,CA+BjD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { buildAutomationUrl, navigate, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
4
|
+
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
5
|
+
import { selectExternalRecipient, selectIsEmbedded, selectSettings, } from "../../../../model/store/config/configSelectors.js";
|
|
6
|
+
import { selectDashboardId } from "../../../../model/store/meta/metaSelectors.js";
|
|
7
|
+
import { computeUseHostRoute } from "../../shared/utils/automationUtils.js";
|
|
8
|
+
/**
|
|
9
|
+
* Handles cross-dashboard edit routing for automation management dialogs.
|
|
10
|
+
*
|
|
11
|
+
* When the automation belongs to a different dashboard, navigates there directly.
|
|
12
|
+
* Otherwise falls back to `onLocalEdit`.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export function useAutomationManagementEditRouting(onLocalEdit) {
|
|
17
|
+
const workspace = useWorkspaceStrict();
|
|
18
|
+
const dashboardId = useDashboardSelector(selectDashboardId);
|
|
19
|
+
const isEmbedded = useDashboardSelector(selectIsEmbedded);
|
|
20
|
+
const externalRecipientOverride = useDashboardSelector(selectExternalRecipient);
|
|
21
|
+
const settings = useDashboardSelector(selectSettings);
|
|
22
|
+
const useHostRoute = computeUseHostRoute(settings);
|
|
23
|
+
return useCallback((automation) => {
|
|
24
|
+
const targetDashboardId = automation.dashboard?.id;
|
|
25
|
+
if (targetDashboardId && targetDashboardId !== dashboardId) {
|
|
26
|
+
navigate(buildAutomationUrl({
|
|
27
|
+
workspaceId: workspace,
|
|
28
|
+
dashboardId: targetDashboardId,
|
|
29
|
+
automationId: automation.id,
|
|
30
|
+
isEmbedded,
|
|
31
|
+
useHostRoute,
|
|
32
|
+
queryParams: externalRecipientOverride
|
|
33
|
+
? { recipient: externalRecipientOverride }
|
|
34
|
+
: undefined,
|
|
35
|
+
}));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
onLocalEdit(automation);
|
|
39
|
+
}, [onLocalEdit, dashboardId, workspace, isEmbedded, useHostRoute, externalRecipientOverride]);
|
|
40
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildAutomationsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAutomationsContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBuildAutomationsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAutomationsContext.ts"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EACR,wBAAwB,EAE3B,MAAM,sCAAsC,CAAC;AAI9C,wBAAgB,0BAA0B,IAAI,wBAAwB,CAqMrE"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
4
4
|
import { selectAllCatalogAttributesMap, selectAllCatalogDisplayFormsMap, selectCatalogAttributes, selectCatalogDateDatasets, selectCatalogMeasures, } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
5
|
-
import {
|
|
5
|
+
import { selectEnableAlertOncePerInterval, selectEnableAnomalyDetectionAlert, selectEnableAutomationEvaluationMode, selectEnableCustomizableCsvDelimiter, selectEnableNewScheduledExport, selectEnableSlideshowExports, selectExternalRecipient, selectIsWhiteLabeled, selectLocale, selectSeparators, selectSettings, selectTimezone, selectWeekStart, } from "../../../../model/store/config/configSelectors.js";
|
|
6
6
|
import { selectEntitlementMinimumRecurrenceMinutes, selectMaxAutomationRecipients, } from "../../../../model/store/entitlements/entitlementsSelectors.js";
|
|
7
7
|
import { selectAutomationAvailableDashboardFilters, selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectAutomationFiltersByTab, selectDashboardFiltersWithoutCrossFiltering, selectDashboardHiddenFilters, selectDashboardLockedFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
8
8
|
import { selectPersistedDashboardFilterContextDateFilterConfig } from "../../../../model/store/meta/metaSelectors.js";
|
|
@@ -13,7 +13,6 @@ import { selectDateFilterConfigsOverrides, selectDateFilterConfigsOverridesByTab
|
|
|
13
13
|
import { selectAttributeFilterDisplayFormsMap } from "../../../../model/store/tabs/filterContext/filterContextSelectors.js";
|
|
14
14
|
import { selectWidgetsMap } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
15
15
|
import { selectMeasureValueFilterConfigsOverrides, selectMeasureValueFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/measureValueFilterConfigs/measureValueFilterConfigsSelectors.js";
|
|
16
|
-
import { selectIsAutomationDialogSecondaryTitleVisible } from "../../../../model/store/topBar/topBarSelectors.js";
|
|
17
16
|
import { selectExecutionTimestamp, selectScheduleEmailDialogReturnFocusTo, } from "../../../../model/store/ui/uiSelectors.js";
|
|
18
17
|
import { selectCurrentUser } from "../../../../model/store/user/userSelectors.js";
|
|
19
18
|
const DEFAULT_MIN_RECURRENCE_MINUTES = "60";
|
|
@@ -53,17 +52,14 @@ export function useBuildAutomationsContext() {
|
|
|
53
52
|
const weekStart = useDashboardSelector(selectWeekStart);
|
|
54
53
|
const timezone = useDashboardSelector(selectTimezone);
|
|
55
54
|
const isWhiteLabeled = useDashboardSelector(selectIsWhiteLabeled);
|
|
56
|
-
const isSecondaryTitleVisible = useDashboardSelector(selectIsAutomationDialogSecondaryTitleVisible);
|
|
57
55
|
const externalRecipient = useDashboardSelector(selectExternalRecipient);
|
|
58
56
|
const enableAlertOncePerInterval = useDashboardSelector(selectEnableAlertOncePerInterval);
|
|
59
57
|
const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
|
|
60
|
-
const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
|
|
61
58
|
const canCreateAutomation = useDashboardSelector(selectCanCreateAutomation);
|
|
62
59
|
const canUseAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
|
|
63
60
|
const canManageWorkspace = useDashboardSelector(selectCanManageWorkspace);
|
|
64
|
-
const enableComparisonInAlerting = useDashboardSelector(selectEnableComparisonInAlerting);
|
|
65
|
-
const enableAlertAttributes = useDashboardSelector(selectEnableAlertAttributes);
|
|
66
61
|
const enableCustomizableCsvDelimiter = useDashboardSelector(selectEnableCustomizableCsvDelimiter);
|
|
62
|
+
const enableSlideshowExports = useDashboardSelector(selectEnableSlideshowExports);
|
|
67
63
|
const enableAutomationEvaluationMode = useDashboardSelector(selectEnableAutomationEvaluationMode);
|
|
68
64
|
const maxAutomationsRecipients = useDashboardSelector(selectMaxAutomationRecipients);
|
|
69
65
|
const minimumRecurrenceMinutesEntitlement = useDashboardSelector(selectEntitlementMinimumRecurrenceMinutes);
|
|
@@ -85,23 +81,19 @@ export function useBuildAutomationsContext() {
|
|
|
85
81
|
canCreateAutomation,
|
|
86
82
|
enableAlertOncePerInterval,
|
|
87
83
|
enableAnomalyDetectionAlert,
|
|
88
|
-
enableAutomationManagement,
|
|
89
84
|
canUseAiAssistant,
|
|
90
|
-
enableComparisonInAlerting,
|
|
91
|
-
enableAlertAttributes,
|
|
92
85
|
canManageWorkspace,
|
|
93
86
|
enableCustomizableCsvDelimiter,
|
|
87
|
+
enableSlideshowExports,
|
|
94
88
|
enableAutomationEvaluationMode,
|
|
95
89
|
}), [
|
|
96
90
|
canCreateAutomation,
|
|
97
91
|
enableAlertOncePerInterval,
|
|
98
92
|
enableAnomalyDetectionAlert,
|
|
99
|
-
enableAutomationManagement,
|
|
100
93
|
canUseAiAssistant,
|
|
101
|
-
enableComparisonInAlerting,
|
|
102
|
-
enableAlertAttributes,
|
|
103
94
|
canManageWorkspace,
|
|
104
95
|
enableCustomizableCsvDelimiter,
|
|
96
|
+
enableSlideshowExports,
|
|
105
97
|
enableAutomationEvaluationMode,
|
|
106
98
|
]);
|
|
107
99
|
return useMemo(() => ({
|
|
@@ -137,7 +129,7 @@ export function useBuildAutomationsContext() {
|
|
|
137
129
|
weekStart,
|
|
138
130
|
timezone,
|
|
139
131
|
isWhiteLabeled,
|
|
140
|
-
isSecondaryTitleVisible,
|
|
132
|
+
isSecondaryTitleVisible: true,
|
|
141
133
|
externalRecipient,
|
|
142
134
|
features,
|
|
143
135
|
getCatalogAttributeByRef,
|
|
@@ -177,7 +169,6 @@ export function useBuildAutomationsContext() {
|
|
|
177
169
|
weekStart,
|
|
178
170
|
timezone,
|
|
179
171
|
isWhiteLabeled,
|
|
180
|
-
isSecondaryTitleVisible,
|
|
181
172
|
externalRecipient,
|
|
182
173
|
features,
|
|
183
174
|
getCatalogAttributeByRef,
|
|
@@ -45,14 +45,12 @@ vi.mock("../../../../model/store/catalog/catalogSelectors.js", () => ({
|
|
|
45
45
|
}));
|
|
46
46
|
vi.mock("../../../../model/store/config/configSelectors.js", () => ({
|
|
47
47
|
selectDateFormat: () => "MM/dd/yyyy",
|
|
48
|
-
selectEnableAlertAttributes: () => false,
|
|
49
48
|
selectEnableAlertOncePerInterval: () => false,
|
|
50
49
|
selectEnableAnomalyDetectionAlert: () => false,
|
|
51
50
|
selectEnableAutomationEvaluationMode: () => false,
|
|
52
|
-
selectEnableAutomationManagement: () => false,
|
|
53
|
-
selectEnableComparisonInAlerting: () => false,
|
|
54
51
|
selectEnableCustomizableCsvDelimiter: () => false,
|
|
55
52
|
selectEnableNewScheduledExport: () => false,
|
|
53
|
+
selectEnableSlideshowExports: () => false,
|
|
56
54
|
selectExternalRecipient: () => undefined,
|
|
57
55
|
selectIsWhiteLabeled: () => false,
|
|
58
56
|
selectLocale: () => "en-US",
|
|
@@ -72,9 +70,6 @@ vi.mock("../../../../model/store/permissions/permissionsSelectors.js", () => ({
|
|
|
72
70
|
selectCanManageWorkspace: () => false,
|
|
73
71
|
selectCanUseAiAssistant: () => false,
|
|
74
72
|
}));
|
|
75
|
-
vi.mock("../../../../model/store/topBar/topBarSelectors.js", () => ({
|
|
76
|
-
selectIsAutomationDialogSecondaryTitleVisible: () => false,
|
|
77
|
-
}));
|
|
78
73
|
vi.mock("../../../../model/store/user/userSelectors.js", () => ({
|
|
79
74
|
selectCurrentUser: () => ({ login: "test@example.com", ref: { identifier: "test" } }),
|
|
80
75
|
}));
|
|
@@ -55,12 +55,10 @@ export interface IAutomationsContextValue {
|
|
|
55
55
|
canCreateAutomation: boolean;
|
|
56
56
|
enableAlertOncePerInterval: boolean;
|
|
57
57
|
enableAnomalyDetectionAlert: boolean;
|
|
58
|
-
enableAutomationManagement: boolean;
|
|
59
58
|
canUseAiAssistant: boolean;
|
|
60
|
-
enableComparisonInAlerting: boolean;
|
|
61
|
-
enableAlertAttributes: boolean;
|
|
62
59
|
canManageWorkspace: boolean;
|
|
63
60
|
enableCustomizableCsvDelimiter: boolean;
|
|
61
|
+
enableSlideshowExports: boolean;
|
|
64
62
|
enableAutomationEvaluationMode: boolean;
|
|
65
63
|
};
|
|
66
64
|
getCatalogAttributeByRef: (ref: ObjRef) => ICatalogAttribute | ICatalogDateAttribute | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA8D9D,wBAAgB,2BAA2B,CAAC,EACxC,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA8D9D,wBAAgB,2BAA2B,CAAC,EACxC,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,2CAukB5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,2CAW5E"}
|
|
@@ -47,7 +47,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
47
47
|
const [scheduledEmailToDelete, setScheduledEmailToDelete] = useState(null);
|
|
48
48
|
const [selectedTabId, setSelectedTabId] = useState("general");
|
|
49
49
|
const [tabContentHeight, setTabContentHeight] = useState(undefined);
|
|
50
|
-
const { isWhiteLabeled, externalRecipient: externalRecipientOverride, isSecondaryTitleVisible,
|
|
50
|
+
const { isWhiteLabeled, externalRecipient: externalRecipientOverride, isSecondaryTitleVisible, } = useAutomationsContext();
|
|
51
51
|
const { exportTemplates, widgetTitle, hasMultipleTabs } = useScheduledEmailDialogContext();
|
|
52
52
|
const handleScheduleDeleteSuccess = () => {
|
|
53
53
|
onDeleteSuccess?.();
|
|
@@ -59,7 +59,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
59
59
|
automationToEdit: scheduledExportToEdit,
|
|
60
60
|
widget,
|
|
61
61
|
});
|
|
62
|
-
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, enableNewScheduledExport, enableCustomizableCsvDelimiter, defaultPdfPageSize, } = useDefaultScheduledEmailDialogData();
|
|
62
|
+
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, enableNewScheduledExport, enableCustomizableCsvDelimiter, isSlidesExportEnabled, defaultPdfPageSize, } = useDefaultScheduledEmailDialogData();
|
|
63
63
|
const { defaultUser, editedAutomation, originalAutomation, isSubmitDisabled, xlsxSettings, pdfSettings, csvSettings, csvRawSettings, startDate, allowExternalRecipients, allowOnlyLoggedUserRecipients, validationErrorMessage, selectedAttachments, isParentValid, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, slidesTemplateIds, onSlidesTemplateIdChange, onDestinationChange, onMessageChange, onRecipientsChange, onRecurrenceChange, onEvaluationModeChange, onSubjectChange, onTitleChange, onFiltersChange, onApplyCurrentFilters, onStoreFiltersChange, onFiltersByTabChange, setParametersWire, enableAutomationEvaluationMode, } = useEditScheduledEmail({
|
|
64
64
|
notificationChannels,
|
|
65
65
|
insight,
|
|
@@ -179,9 +179,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
179
179
|
const selectedChannel = notificationChannels.find((channel) => channel.id === editedAutomation.notificationChannel);
|
|
180
180
|
const isInPlatformChannel = selectedChannel?.destinationType === "inPlatform";
|
|
181
181
|
return (_jsxs(_Fragment, { children: [
|
|
182
|
-
_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:
|
|
183
|
-
"gd-dialog--wide gd-notifications-channels-dialog--wide": enableAutomationManagement,
|
|
184
|
-
}), isPositive: true, cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: scheduledExportToEdit
|
|
182
|
+
_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: scheduledExportToEdit
|
|
185
183
|
? intl.formatMessage({ id: `dialogs.schedule.email.save` })
|
|
186
184
|
: intl.formatMessage({ id: `dialogs.schedule.email.create` }), accessibilityConfig: {
|
|
187
185
|
closeButton: {
|
|
@@ -191,7 +189,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
191
189
|
},
|
|
192
190
|
titleElementId,
|
|
193
191
|
dialogId: SCHEDULED_EMAIL_DIALOG_ID,
|
|
194
|
-
}, showProgressIndicator: isSavingScheduledEmail, returnFocusTo: returnFocusTo, returnFocusAfterClose:
|
|
192
|
+
}, showProgressIndicator: isSavingScheduledEmail, returnFocusTo: returnFocusTo, returnFocusAfterClose: false, footerLeftRenderer: () => (_jsx(ScheduledEmailDialogFooter, { isWhiteLabeled: isWhiteLabeled, helpTextId: helpTextId, scheduledExportToEdit: scheduledExportToEdit, isSavingScheduledEmail: isSavingScheduledEmail, onDeleteClick: () => setScheduledEmailToDelete(editedAutomation) })), isSubmitDisabled: submitDisabled, submitButtonTooltipText: isExecutionTimestampMode
|
|
195
193
|
? intl.formatMessage({
|
|
196
194
|
id: "dialogs.schedule.email.save.executionTimestampMode",
|
|
197
195
|
})
|
|
@@ -216,7 +214,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
216
214
|
getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone: editedAutomation.schedule?.timezone ??
|
|
217
215
|
TIMEZONE_DEFAULT.identifier, dateFormat: dateFormat ?? "MM/dd/yyyy", locale: locale, weekStart: weekStart, onChange: onRecurrenceChange, allowHourlyRecurrence: allowHourlyRecurrence, isWhiteLabeled: isWhiteLabeled, closeDropdownsOnParentScroll: CLOSE_ON_PARENT_SCROLL, onKeyDownSubmit: handleSubmitForm }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(DestinationSelect, { notificationChannels: notificationChannels, selectedItemId: editedAutomation.notificationChannel, onChange: onDestinationChange, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL, overlayPositionType: OVERLAY_POSITION_TYPE }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(RecipientsSelect, { id: "schedule.email.recipients", loggedUser: defaultUser, users: users, usersError: usersError, value: editedAutomation.recipients ?? [], originalValue: originalAutomation.recipients || [], onChange: onRecipientsChange, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, notificationChannels: notificationChannels, notificationChannelId: editedAutomation.notificationChannel, onKeyDownSubmit: handleSubmitForm, externalRecipientOverride: externalRecipientOverride }), isInPlatformChannel ? null : (_jsxs(_Fragment, { children: [
|
|
218
216
|
_jsx(SubjectForm, { dashboardTitle: dashboardTitle, editedAutomation: editedAutomation, onChange: onSubjectChange, onKeyDownSubmit: handleSaveScheduledEmail, isSubmitDisabled: isSubmitDisabled }), _jsx(MessageForm, { onChange: onMessageChange, value: editedAutomation.details?.message ?? "" })
|
|
219
|
-
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isCsvSettingsEnabled: enableCustomizableCsvDelimiter, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
217
|
+
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isCsvSettingsEnabled: enableCustomizableCsvDelimiter, isSlidesExportEnabled: isSlidesExportEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
220
218
|
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
221
219
|
}), children: errorMessage })) : null, getInvalidDatapoints()
|
|
222
220
|
.filter((invalidDatapoint) => invalidDatapoint.severity === "error")
|
|
@@ -240,7 +238,7 @@ function DefaultScheduledEmailDialogBody(props) {
|
|
|
240
238
|
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(ScheduledMailDialogRenderer, { ...props }) }));
|
|
241
239
|
}
|
|
242
240
|
function useDefaultScheduledEmailDialogData() {
|
|
243
|
-
const { locale, settings, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isExecutionTimestampMode, enableNewScheduledExport, features: { enableCustomizableCsvDelimiter }, } = useAutomationsContext();
|
|
241
|
+
const { locale, settings, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isExecutionTimestampMode, enableNewScheduledExport, features: { enableCustomizableCsvDelimiter, enableSlideshowExports }, } = useAutomationsContext();
|
|
244
242
|
const { dashboardTitle, dateFormat, isCrossFiltering } = useScheduledEmailDialogContext();
|
|
245
243
|
const formatLocale = settings?.formatLocale;
|
|
246
244
|
const defaultPdfPageSize = getDefaultPdfPageSize(formatLocale);
|
|
@@ -255,6 +253,7 @@ function useDefaultScheduledEmailDialogData() {
|
|
|
255
253
|
isExecutionTimestampMode,
|
|
256
254
|
enableNewScheduledExport,
|
|
257
255
|
enableCustomizableCsvDelimiter,
|
|
256
|
+
isSlidesExportEnabled: enableSlideshowExports,
|
|
258
257
|
defaultPdfPageSize,
|
|
259
258
|
};
|
|
260
259
|
}
|
|
@@ -6,6 +6,7 @@ export interface IDashboardAttachmentsProps {
|
|
|
6
6
|
onDashboardAttachmentsChange: (formats: DashboardAttachmentType[], filters?: FilterContextItem[]) => void;
|
|
7
7
|
xlsxSettings: IExportDefinitionVisualizationObjectSettings;
|
|
8
8
|
onXlsxSettingsChange: (settings: IExportDefinitionVisualizationObjectSettings) => void;
|
|
9
|
+
isSlidesExportEnabled: boolean;
|
|
9
10
|
defaultPdfPageSize?: IExportDefinitionVisualizationObjectSettings["pageSize"];
|
|
10
11
|
exportTemplates?: IExportTemplate[];
|
|
11
12
|
slidesTemplateIds?: {
|
|
@@ -15,5 +16,5 @@ export interface IDashboardAttachmentsProps {
|
|
|
15
16
|
};
|
|
16
17
|
onSlidesTemplateIdChange?: (templateId: string | undefined, format: "PPTX" | "PDF_SLIDES" | "PDF") => void;
|
|
17
18
|
}
|
|
18
|
-
export declare function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDashboardAttachmentsChange, selectedAttachments, xlsxSettings, onXlsxSettingsChange, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange }: IDashboardAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDashboardAttachmentsChange, selectedAttachments, xlsxSettings, onXlsxSettingsChange, isSlidesExportEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange }: IDashboardAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
//# sourceMappingURL=DashboardAttachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACvB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACvB,MAAM,qBAAqB,CAAC;AAa7B,MAAM,WAAW,0BAA0B;IACvC,mBAAmB,EAAE,uBAAuB,EAAE,CAAC;IAC/C,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4BAA4B,EAAE,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAC1G,YAAY,EAAE,4CAA4C,CAAC;IAC3D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACvF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,wBAAwB,CAAC,EAAE,CACvB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,KACpC,IAAI,CAAC;CACb;AAED,wBAAgB,oBAAoB,CAAC,EACjC,gBAAgB,EAChB,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EAC3B,EAAE,0BAA0B,2CA8H5B"}
|
|
@@ -4,12 +4,15 @@ import { useCallback, useRef, useState } from "react";
|
|
|
4
4
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
5
5
|
import { Message } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { AUTOMATION_ATTACHMENTS_GROUP_LABEL_ID } from "../../../../../constants/automations.js";
|
|
7
|
+
import { partitionAttachments } from "./attachmentFormats.js";
|
|
7
8
|
import { AttachmentsList } from "./AttachmentsList.js";
|
|
8
9
|
import { AttachmentsSelect } from "./AttachmentsSelect.js";
|
|
9
10
|
import { AttachmentsWrapper } from "./AttachmentsWrapper.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const ALL_DASHBOARD_ATTACHMENTS = ["PDF", "PDF_SLIDES", "PPTX", "XLSX"];
|
|
12
|
+
const SLIDE_DASHBOARD_ATTACHMENTS = ["PDF_SLIDES", "PPTX"];
|
|
13
|
+
export function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDashboardAttachmentsChange, selectedAttachments, xlsxSettings, onXlsxSettingsChange, isSlidesExportEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange, }) {
|
|
12
14
|
const intl = useIntl();
|
|
15
|
+
const { available: availableAttachments, visibleSelected: visibleSelectedAttachments, hiddenSelected: hiddenSelectedFormats, } = partitionAttachments(ALL_DASHBOARD_ATTACHMENTS, SLIDE_DASHBOARD_ATTACHMENTS, selectedAttachments, isSlidesExportEnabled);
|
|
13
16
|
const attachmentListRef = useRef(null);
|
|
14
17
|
const addButtonRef = useRef(null);
|
|
15
18
|
const [announcement, setAnnouncement] = useState("");
|
|
@@ -49,9 +52,9 @@ export function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDas
|
|
|
49
52
|
};
|
|
50
53
|
const handleChange = (attachments) => {
|
|
51
54
|
const formats = attachments
|
|
52
|
-
.filter((attachment) => attachment.selected &&
|
|
55
|
+
.filter((attachment) => attachment.selected && availableAttachments.includes(attachment.type))
|
|
53
56
|
.map((attachment) => attachment.type);
|
|
54
|
-
handleDashboardAttachmentSelectionSave(formats);
|
|
57
|
+
handleDashboardAttachmentSelectionSave([...formats, ...hiddenSelectedFormats]);
|
|
55
58
|
// Focus add button after state update causes remount (returnFocusTo ref becomes stale)
|
|
56
59
|
requestAnimationFrame(() => {
|
|
57
60
|
addButtonRef.current?.focus();
|
|
@@ -64,7 +67,7 @@ export function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDas
|
|
|
64
67
|
};
|
|
65
68
|
return (_jsxs(_Fragment, { children: [
|
|
66
69
|
_jsx(AttachmentsWrapper, { children: _jsxs("div", { className: "gd-attachment-list", role: "group", "aria-labelledby": AUTOMATION_ATTACHMENTS_GROUP_LABEL_ID, ref: attachmentListRef, onBlur: makeAttachmentGroupUnfocusable, children: [
|
|
67
|
-
_jsx(AttachmentsList, { attachments:
|
|
70
|
+
_jsx(AttachmentsList, { attachments: visibleSelectedAttachments, onDelete: handleDelete, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, defaultPdfPageSize: defaultPdfPageSize, mode: "dashboard", exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange }), _jsx(AttachmentsSelect, { attachments: availableAttachments.map((format) => ({
|
|
68
71
|
type: format,
|
|
69
72
|
selected: selectedAttachments.includes(format),
|
|
70
73
|
})), onChange: handleChange, mode: "dashboard", onAddButtonRef: (ref) => {
|