@gooddata/sdk-ui-dashboard 11.51.0-alpha.2 → 11.51.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/assets/timezone.svg +1 -0
- package/esm/index.d.ts +6 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +5 -2
- package/esm/model/react/useWidgetExecConfig.d.ts +9 -0
- package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
- package/esm/model/react/useWidgetExecConfig.js +21 -3
- package/esm/model/store/config/configSelectors.d.ts +6 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- package/esm/model/store/meta/metaSelectors.d.ts +12 -0
- package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.js +19 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFilters.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFilters.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.js +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +31 -33
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +91 -10
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts +8 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +12 -3
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +38 -8
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.d.ts +6 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.js +6 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.js +7 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +22 -3
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +3 -2
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts +9 -2
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.js +2 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultLoadingScheduledEmailDialog.d.ts +7 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultLoadingScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +9 -11
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +6 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +5 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js +1 -1
- 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 +2 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts +1 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.js +2 -2
- package/esm/presentation/automations/scheduledEmail/types.d.ts +35 -5
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.js +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +2 -1
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +1 -32
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.js +2 -177
- package/esm/presentation/automations/shared/filters/conversions.d.ts +36 -0
- package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -0
- package/esm/presentation/automations/shared/filters/conversions.js +242 -0
- package/esm/presentation/automations/shared/filters/index.d.ts +2 -0
- package/esm/presentation/automations/shared/filters/index.d.ts.map +1 -0
- package/esm/presentation/automations/shared/filters/index.js +3 -0
- package/esm/presentation/dashboard/components/DashboardLoading.js +1 -1
- package/esm/presentation/dashboardContexts/useSlideData.d.ts +5 -10
- package/esm/presentation/dashboardContexts/useSlideData.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/useSlideData.js +16 -10
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.js +2 -2
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSection.js +29 -8
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +3 -5
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +3 -5
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/ExportableDashboardLayoutSectionRenderer.d.ts +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/ExportableDashboardLayoutSectionRenderer.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/ExportableDashboardLayoutSectionRenderer.js +2 -5
- package/esm/presentation/insightList/InsightList.d.ts.map +1 -1
- package/esm/presentation/insightList/InsightList.js +4 -5
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -0
- 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 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +13 -2
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +11 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +11 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +12 -1
- package/esm/presentation/topBar/timezoneIndicator/DefaultTimezoneIndicator.d.ts +10 -0
- package/esm/presentation/topBar/timezoneIndicator/DefaultTimezoneIndicator.d.ts.map +1 -0
- package/esm/presentation/topBar/timezoneIndicator/DefaultTimezoneIndicator.js +19 -0
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts +13 -0
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts.map +1 -0
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.js +27 -0
- package/esm/presentation/topBar/timezoneIndicator/resolveDashboardTimezoneInfo.d.ts +13 -0
- package/esm/presentation/topBar/timezoneIndicator/resolveDashboardTimezoneInfo.d.ts.map +1 -0
- package/esm/presentation/topBar/timezoneIndicator/resolveDashboardTimezoneInfo.js +20 -0
- package/esm/presentation/topBar/timezoneIndicator/types.d.ts +47 -0
- package/esm/presentation/topBar/timezoneIndicator/types.d.ts.map +1 -0
- package/esm/presentation/topBar/timezoneIndicator/types.js +2 -0
- package/esm/presentation/topBar/topBar/DefaultTopBar.d.ts.map +1 -1
- package/esm/presentation/topBar/topBar/DefaultTopBar.js +15 -4
- package/esm/presentation/topBar/topBar/types.d.ts +2 -0
- package/esm/presentation/topBar/topBar/types.d.ts.map +1 -1
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.d.ts.map +1 -1
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.js +3 -5
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.d.ts.map +1 -1
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.js +3 -6
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.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 +3 -6
- package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.js +3 -5
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.js +3 -5
- package/esm/sdk-ui-dashboard.d.ts +162 -10
- package/package.json +21 -21
- package/styles/css/filterBar.css +1 -0
- package/styles/css/filterBar.css.map +1 -1
- package/styles/css/main.css +29 -1
- package/styles/css/main.css.map +1 -1
- package/styles/css/timezoneIndicator.css +20 -0
- package/styles/css/timezoneIndicator.css.map +1 -0
- package/styles/css/topBar.css +9 -1
- package/styles/css/topBar.css.map +1 -1
- package/styles/scss/filterBar.scss +7 -0
- package/styles/scss/main.scss +1 -0
- package/styles/scss/timezoneIndicator.scss +23 -0
- package/styles/scss/topBar.scss +13 -2
- package/esm/presentation/automations/scheduledEmail/utils/filters.d.ts +0 -3
- package/esm/presentation/automations/scheduledEmail/utils/filters.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/utils/filters.js +0 -5
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts +0 -4
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts.map +0 -1
- package/esm/presentation/automations/shared/utils/filterContextUtils.js +0 -67
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { isWidget, } from "@gooddata/sdk-model";
|
|
3
5
|
import { getAutomationDashboardFilters, getAutomationVisualizationFilters, } from "../../../_staging/automation/index.js";
|
|
4
6
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
5
7
|
import { useDashboardScheduledEmails } from "../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js";
|
|
@@ -10,12 +12,15 @@ import { ScheduledEmailDialogContextProvider } from "../contexts/ScheduledEmailD
|
|
|
10
12
|
import { ScheduledEmailManagementDialogContextProvider } from "../contexts/ScheduledEmailManagementDialogContext.js";
|
|
11
13
|
import { ScheduledEmailDialog } from "../scheduledEmail/ScheduledEmailDialog.js";
|
|
12
14
|
import { ScheduledEmailManagementDialog } from "../scheduledEmail/ScheduledEmailManagementDialog.js";
|
|
13
|
-
import { getAppliedDashboardFilters } from "../
|
|
15
|
+
import { getAppliedDashboardFilters } from "../shared/filters/index.js";
|
|
14
16
|
import { useAutomationManagementEditRouting } from "./hooks/useAutomationManagementEditRouting.js";
|
|
15
17
|
import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.js";
|
|
16
18
|
import { useBuildScheduledEmailDialogContext } from "./hooks/useBuildScheduledEmailDialogContext.js";
|
|
17
19
|
import { useBuildScheduledEmailManagementDialogContext } from "./hooks/useBuildScheduledEmailManagementDialogContext.js";
|
|
18
20
|
import { useWidgetAutomationFilters } from "./hooks/useWidgetAutomationFilters.js";
|
|
21
|
+
// Stable placeholder so useBuildScheduledEmailDialogContext's useMemo does not see a fresh array
|
|
22
|
+
// (and therefore a new context identity) on every render.
|
|
23
|
+
const EMPTY_USERS = [];
|
|
19
24
|
/**
|
|
20
25
|
* Provides AutomationsContext to its children, built from dashboard Redux state.
|
|
21
26
|
* Wraps the scheduled-email dialog subtree (both the create/edit and management dialogs reach
|
|
@@ -62,7 +67,7 @@ function ScheduledEmailConnectorWithData({ se }) {
|
|
|
62
67
|
// Shared Local State
|
|
63
68
|
scheduledExportToEdit,
|
|
64
69
|
// Data
|
|
65
|
-
automations,
|
|
70
|
+
automations, automationsLoading, notificationChannels,
|
|
66
71
|
// Single Schedule Dialog
|
|
67
72
|
isScheduleEmailingDialogOpen, onScheduleEmailingCancel, onScheduleEmailingBack, onScheduleEmailingCreateSuccess, onScheduleEmailingCreateError, onScheduleEmailingSaveSuccess, onScheduleEmailingSaveError,
|
|
68
73
|
// Management / List Dialog
|
|
@@ -72,42 +77,35 @@ function ScheduledEmailConnectorWithData({ se }) {
|
|
|
72
77
|
const automationDefaultSelectedFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
|
|
73
78
|
const dashboardHiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
|
|
74
79
|
const { executionFilters: savedWidgetFilters } = getAutomationVisualizationFilters(scheduledExportToEdit);
|
|
75
|
-
const
|
|
76
|
-
const { result: liveWidgetFilters, status: widgetFiltersStatus, error: widgetFiltersError, } = useWidgetAutomationFilters(widget, insight);
|
|
77
|
-
const widgetFilters = savedWidgetFilters ?? liveWidgetFilters;
|
|
80
|
+
const { status: widgetFiltersStatus } = useWidgetAutomationFilters(widget, insight);
|
|
78
81
|
const shouldLoadWidgetFilters = !!widget && !savedWidgetFilters;
|
|
79
|
-
const dashboardFilters =
|
|
80
|
-
getAppliedDashboardFilters(automationDefaultSelectedFilters, dashboardHiddenFilters, true);
|
|
82
|
+
const dashboardFilters = useMemo(() => getAutomationDashboardFilters(scheduledExportToEdit) ??
|
|
83
|
+
getAppliedDashboardFilters(automationDefaultSelectedFilters, dashboardHiddenFilters, true), [scheduledExportToEdit, automationDefaultSelectedFilters, dashboardHiddenFilters]);
|
|
81
84
|
const isLoading = automationsLoading ||
|
|
82
85
|
(shouldLoadWidgetFilters && (widgetFiltersStatus === "pending" || widgetFiltersStatus === "running"));
|
|
83
|
-
const loadingError = (shouldLoadWidgetFilters ? widgetFiltersError : undefined) ?? automationsError;
|
|
84
86
|
const insightWidget = isWidget(widget) ? widget : undefined;
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
insight,
|
|
88
|
-
});
|
|
89
|
-
const managementCtx = useBuildScheduledEmailManagementDialogContext();
|
|
90
|
-
return (_jsxs(ScheduledEmailDialogContextProvider, { value: seCtx, children: [
|
|
91
|
-
_jsx(ScheduledEmailManagementDialogContextProvider, { value: managementCtx, children: isScheduleEmailingManagementDialogOpen ? (
|
|
92
|
-
// TODO(GDP-3167 phase3): automations, notificationChannels, and scheduleDataError
|
|
93
|
-
// are still prop-threaded here because DefaultScheduledEmailManagementDialog reads
|
|
94
|
-
// them from props, not from AutomationsContext. Once all dialog fields are migrated
|
|
95
|
-
// to read from context, remove these props and the corresponding prop types.
|
|
96
|
-
_jsx(ScheduledEmailManagementDialog, { automations: automations, notificationChannels: notificationChannels, scheduleDataError: loadingError, isLoadingScheduleData: isLoading, onAdd: onScheduleEmailingManagementAdd, onEdit: handleManagementEdit, onClose: onScheduleEmailingManagementClose, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null }), isScheduleEmailingDialogOpen ? (
|
|
97
|
-
// TODO(GDP-3167 phase3): notificationChannels, users, usersError, widgetFilters,
|
|
98
|
-
// dashboardFilters, and isLoading are still prop-threaded here because
|
|
99
|
-
// DefaultScheduledEmailDialog reads them from props, not from context.
|
|
100
|
-
// Once all dialog fields are migrated to read from context, remove these props
|
|
101
|
-
// and the corresponding prop types.
|
|
102
|
-
_jsx(ScheduledEmailDialogWithUsers, { scheduledExportToEdit: scheduledExportToEdit, notificationChannels: notificationChannels, widget: insightWidget, insight: insight, widgetFilters: widgetFilters, dashboardFilters: dashboardFilters, isLoading: isLoading, onBack: onScheduleEmailingBack, onCancel: onScheduleEmailingCancel, onError: onScheduleEmailingCreateError, onSuccess: onScheduleEmailingCreateSuccess, onSaveError: onScheduleEmailingSaveError, onSaveSuccess: onScheduleEmailingSaveSuccess, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null] }));
|
|
87
|
+
const managementCtx = useBuildScheduledEmailManagementDialogContext({ automations, isLoading });
|
|
88
|
+
return (_jsxs(ScheduledEmailManagementDialogContextProvider, { value: managementCtx, children: [isScheduleEmailingManagementDialogOpen ? (_jsx(ScheduledEmailManagementDialog, { onAdd: onScheduleEmailingManagementAdd, onEdit: handleManagementEdit, onClose: onScheduleEmailingManagementClose, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null, isScheduleEmailingDialogOpen ? (_jsx(ScheduledEmailCreateEditConnector, { scheduledExportToEdit: scheduledExportToEdit, notificationChannels: notificationChannels, widget: insightWidget, insight: insight, dashboardFilters: dashboardFilters, isLoading: isLoading, onBack: onScheduleEmailingBack, onCancel: onScheduleEmailingCancel, onError: onScheduleEmailingCreateError, onSuccess: onScheduleEmailingCreateSuccess, onSaveError: onScheduleEmailingSaveError, onSaveSuccess: onScheduleEmailingSaveSuccess, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null] }));
|
|
103
89
|
}
|
|
104
90
|
/**
|
|
105
|
-
* Loads workspace users
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* dispatches the workspace-users load, matching the pre-separation behavior.
|
|
91
|
+
* Loads workspace users and hydrates the scheduled-email create/edit context. Both live here
|
|
92
|
+
* rather than in the parent so that opening only the management dialog — which consumes
|
|
93
|
+
* neither — never dispatches the workspace-users load.
|
|
109
94
|
*/
|
|
110
|
-
function
|
|
95
|
+
function ScheduledEmailCreateEditConnector(props) {
|
|
96
|
+
const { scheduledExportToEdit, notificationChannels, widget, insight, dashboardFilters, isLoading: isDataLoading, onBack, onCancel, onError, onSuccess, onSaveError, onSaveSuccess, onDeleteSuccess, onDeleteError, } = props;
|
|
111
97
|
const { users, status: usersStatus, usersError } = useWorkspaceUsers();
|
|
112
|
-
|
|
98
|
+
const isLoading = isDataLoading || usersStatus === "pending" || usersStatus === "loading";
|
|
99
|
+
const effectiveUsers = users ?? EMPTY_USERS;
|
|
100
|
+
const seCtx = useBuildScheduledEmailDialogContext({
|
|
101
|
+
widget,
|
|
102
|
+
insight,
|
|
103
|
+
scheduledExportToEdit,
|
|
104
|
+
users: effectiveUsers,
|
|
105
|
+
usersError,
|
|
106
|
+
notificationChannels,
|
|
107
|
+
dashboardFilters,
|
|
108
|
+
isLoading,
|
|
109
|
+
});
|
|
110
|
+
return (_jsx(ScheduledEmailDialogContextProvider, { value: seCtx, children: _jsx(ScheduledEmailDialog, { onBack: onBack, onCancel: onCancel, onError: onError, onSuccess: onSuccess, onSaveError: onSaveError, onSaveSuccess: onSaveSuccess, onDeleteSuccess: onDeleteSuccess, onDeleteError: onDeleteError }) }));
|
|
113
111
|
}
|
|
@@ -7,16 +7,41 @@ const fixtures = vi.hoisted(() => {
|
|
|
7
7
|
const navigate = vi.fn();
|
|
8
8
|
const onScheduleEmailingManagementEdit = vi.fn();
|
|
9
9
|
let managementDialogProps;
|
|
10
|
+
let dialogProps;
|
|
11
|
+
let automationsError;
|
|
12
|
+
const useWorkspaceUsers = vi.fn(() => ({
|
|
13
|
+
users: [],
|
|
14
|
+
status: "success",
|
|
15
|
+
usersError: new Error("users failed to load"),
|
|
16
|
+
}));
|
|
17
|
+
const seState = {
|
|
18
|
+
isScheduleEmailingDialogOpen: false,
|
|
19
|
+
isScheduleEmailingManagementDialogOpen: true,
|
|
20
|
+
};
|
|
10
21
|
return {
|
|
11
22
|
buildAutomationUrl,
|
|
12
23
|
navigate,
|
|
13
24
|
onScheduleEmailingManagementEdit,
|
|
25
|
+
useWorkspaceUsers,
|
|
26
|
+
seState,
|
|
14
27
|
get managementDialogProps() {
|
|
15
28
|
return managementDialogProps;
|
|
16
29
|
},
|
|
17
30
|
set managementDialogProps(value) {
|
|
18
31
|
managementDialogProps = value;
|
|
19
32
|
},
|
|
33
|
+
get dialogProps() {
|
|
34
|
+
return dialogProps;
|
|
35
|
+
},
|
|
36
|
+
set dialogProps(value) {
|
|
37
|
+
dialogProps = value;
|
|
38
|
+
},
|
|
39
|
+
get automationsError() {
|
|
40
|
+
return automationsError;
|
|
41
|
+
},
|
|
42
|
+
set automationsError(value) {
|
|
43
|
+
automationsError = value;
|
|
44
|
+
},
|
|
20
45
|
};
|
|
21
46
|
});
|
|
22
47
|
vi.mock("@gooddata/sdk-ui", () => ({
|
|
@@ -30,11 +55,17 @@ vi.mock("../../../model/react/DashboardStoreProvider.js", () => ({
|
|
|
30
55
|
vi.mock("../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js", () => ({
|
|
31
56
|
useDashboardScheduledEmails: () => ({
|
|
32
57
|
isInitialized: true,
|
|
33
|
-
isScheduleEmailingDialogOpen
|
|
34
|
-
|
|
35
|
-
|
|
58
|
+
get isScheduleEmailingDialogOpen() {
|
|
59
|
+
return fixtures.seState.isScheduleEmailingDialogOpen;
|
|
60
|
+
},
|
|
61
|
+
get isScheduleEmailingManagementDialogOpen() {
|
|
62
|
+
return fixtures.seState.isScheduleEmailingManagementDialogOpen;
|
|
63
|
+
},
|
|
64
|
+
scheduledExportToEdit: { id: "se-existing", title: "Existing schedule" },
|
|
36
65
|
automations: [],
|
|
37
|
-
automationsError
|
|
66
|
+
get automationsError() {
|
|
67
|
+
return fixtures.automationsError;
|
|
68
|
+
},
|
|
38
69
|
automationsLoading: false,
|
|
39
70
|
notificationChannels: [],
|
|
40
71
|
onScheduleEmailingCancel: vi.fn(),
|
|
@@ -48,12 +79,12 @@ vi.mock("../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEm
|
|
|
48
79
|
onScheduleEmailingManagementEdit: fixtures.onScheduleEmailingManagementEdit,
|
|
49
80
|
onScheduleEmailingManagementDeleteSuccess: vi.fn(),
|
|
50
81
|
onScheduleEmailingManagementDeleteError: vi.fn(),
|
|
51
|
-
widget:
|
|
52
|
-
insight:
|
|
82
|
+
widget: { type: "insight", ref: { identifier: "widget-1" } },
|
|
83
|
+
insight: { insight: { identifier: "insight-1", title: "Insight" } },
|
|
53
84
|
}),
|
|
54
85
|
}));
|
|
55
86
|
vi.mock("../../../model/react/useWorkspaceUsers.js", () => ({
|
|
56
|
-
useWorkspaceUsers:
|
|
87
|
+
useWorkspaceUsers: fixtures.useWorkspaceUsers,
|
|
57
88
|
}));
|
|
58
89
|
vi.mock("../../../model/store/config/configSelectors.js", () => ({
|
|
59
90
|
selectExternalRecipient: () => "recipient@example.com",
|
|
@@ -84,7 +115,10 @@ vi.mock("../../../model/store/ui/uiSelectors.js", () => ({
|
|
|
84
115
|
selectAutomationsInvalidationId: () => 0,
|
|
85
116
|
}));
|
|
86
117
|
vi.mock("../scheduledEmail/ScheduledEmailDialog.js", () => ({
|
|
87
|
-
ScheduledEmailDialog: () =>
|
|
118
|
+
ScheduledEmailDialog: (props) => {
|
|
119
|
+
fixtures.dialogProps = props;
|
|
120
|
+
return null;
|
|
121
|
+
},
|
|
88
122
|
}));
|
|
89
123
|
vi.mock("../scheduledEmail/ScheduledEmailManagementDialog.js", () => ({
|
|
90
124
|
ScheduledEmailManagementDialog: (props) => {
|
|
@@ -115,9 +149,9 @@ vi.mock("./hooks/useWidgetAutomationFilters.js", () => ({
|
|
|
115
149
|
}));
|
|
116
150
|
vi.mock("../../../_staging/automation/index.js", () => ({
|
|
117
151
|
getAutomationDashboardFilters: () => undefined,
|
|
118
|
-
getAutomationVisualizationFilters: () => ({ executionFilters:
|
|
152
|
+
getAutomationVisualizationFilters: () => ({ executionFilters: [] }),
|
|
119
153
|
}));
|
|
120
|
-
vi.mock("../
|
|
154
|
+
vi.mock("../shared/filters/index.js", () => ({
|
|
121
155
|
getAppliedDashboardFilters: () => [],
|
|
122
156
|
}));
|
|
123
157
|
import { ScheduledEmailConnector } from "./ScheduledEmailConnector.js";
|
|
@@ -127,6 +161,11 @@ describe("ScheduledEmailConnector", () => {
|
|
|
127
161
|
fixtures.navigate.mockClear();
|
|
128
162
|
fixtures.onScheduleEmailingManagementEdit.mockClear();
|
|
129
163
|
fixtures.managementDialogProps = undefined;
|
|
164
|
+
fixtures.dialogProps = undefined;
|
|
165
|
+
fixtures.automationsError = undefined;
|
|
166
|
+
fixtures.useWorkspaceUsers.mockClear();
|
|
167
|
+
fixtures.seState.isScheduleEmailingDialogOpen = false;
|
|
168
|
+
fixtures.seState.isScheduleEmailingManagementDialogOpen = true;
|
|
130
169
|
});
|
|
131
170
|
it("navigates cross-dashboard when editing a schedule on another dashboard in shell mode", () => {
|
|
132
171
|
render(_jsx(ScheduledEmailConnector, {}));
|
|
@@ -161,4 +200,46 @@ describe("ScheduledEmailConnector", () => {
|
|
|
161
200
|
dashboard: undefined,
|
|
162
201
|
});
|
|
163
202
|
});
|
|
203
|
+
it("does not load workspace users when only the management dialog is open", () => {
|
|
204
|
+
render(_jsx(ScheduledEmailConnector, {}));
|
|
205
|
+
expect(fixtures.useWorkspaceUsers).not.toHaveBeenCalled();
|
|
206
|
+
});
|
|
207
|
+
it("loads workspace users when the create/edit dialog is open", () => {
|
|
208
|
+
fixtures.seState.isScheduleEmailingDialogOpen = true;
|
|
209
|
+
fixtures.seState.isScheduleEmailingManagementDialogOpen = false;
|
|
210
|
+
render(_jsx(ScheduledEmailConnector, {}));
|
|
211
|
+
expect(fixtures.useWorkspaceUsers).toHaveBeenCalled();
|
|
212
|
+
});
|
|
213
|
+
it("does not supply the deprecated data props to the create/edit dialog", () => {
|
|
214
|
+
fixtures.seState.isScheduleEmailingDialogOpen = true;
|
|
215
|
+
fixtures.seState.isScheduleEmailingManagementDialogOpen = false;
|
|
216
|
+
render(_jsx(ScheduledEmailConnector, {}));
|
|
217
|
+
expect(fixtures.dialogProps).toBeDefined();
|
|
218
|
+
for (const prop of [
|
|
219
|
+
"scheduledExportToEdit",
|
|
220
|
+
"users",
|
|
221
|
+
"usersError",
|
|
222
|
+
"notificationChannels",
|
|
223
|
+
"widget",
|
|
224
|
+
"insight",
|
|
225
|
+
"dashboardFilters",
|
|
226
|
+
"widgetFilters",
|
|
227
|
+
"isLoading",
|
|
228
|
+
]) {
|
|
229
|
+
expect(fixtures.dialogProps?.[prop]).toBeUndefined();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
it("does not supply the deprecated data props to the management dialog", () => {
|
|
233
|
+
fixtures.automationsError = new Error("automations failed to load");
|
|
234
|
+
render(_jsx(ScheduledEmailConnector, {}));
|
|
235
|
+
expect(fixtures.managementDialogProps).toBeDefined();
|
|
236
|
+
for (const prop of [
|
|
237
|
+
"automations",
|
|
238
|
+
"isLoadingScheduleData",
|
|
239
|
+
"notificationChannels",
|
|
240
|
+
"scheduleDataError",
|
|
241
|
+
]) {
|
|
242
|
+
expect(fixtures.managementDialogProps?.[prop]).toBeUndefined();
|
|
243
|
+
}
|
|
244
|
+
});
|
|
164
245
|
});
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { type IInsight, type IWidget } from "@gooddata/sdk-model";
|
|
1
|
+
import { type FilterContextItem, type IAutomationMetadataObject, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget, type IWorkspaceUser } from "@gooddata/sdk-model";
|
|
2
|
+
import type { GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
2
3
|
import type { IScheduledEmailDialogContextValue } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
3
4
|
export interface IUseBuildScheduledEmailDialogContextOpts {
|
|
4
5
|
widget?: IWidget;
|
|
5
6
|
insight?: IInsight;
|
|
7
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
8
|
+
users: IWorkspaceUser[];
|
|
9
|
+
usersError?: GoodDataSdkError;
|
|
10
|
+
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
dashboardFilters?: FilterContextItem[];
|
|
6
13
|
}
|
|
7
14
|
export declare function useBuildScheduledEmailDialogContext(opts: IUseBuildScheduledEmailDialogContextOpts): IScheduledEmailDialogContextValue;
|
|
8
15
|
//# sourceMappingURL=useBuildScheduledEmailDialogContext.d.ts.map
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"useBuildScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAuBzD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAIvG,MAAM,WAAW,wCAAwC;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED,wBAAgB,mCAAmC,CAC/C,IAAI,EAAE,wCAAwC,GAC/C,iCAAiC,CA2GnC"}
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useDashboardSelector } from "../../../../model/react/DashboardStoreProv
|
|
|
6
6
|
import { useExportTemplates } from "../../../../model/react/useExportTemplates.js";
|
|
7
7
|
import { selectDateFormat } from "../../../../model/store/config/configSelectors.js";
|
|
8
8
|
import { selectIsCrossFiltering } from "../../../../model/store/drill/drillSelectors.js";
|
|
9
|
-
import { selectAutomationCommonDateFilterId,
|
|
9
|
+
import { selectAutomationCommonDateFilterId, selectDashboardHiddenFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
10
10
|
import { selectDashboardId, selectDashboardTitle } from "../../../../model/store/meta/metaSelectors.js";
|
|
11
11
|
import { selectEffectiveAttributeFiltersModeMap } from "../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
12
12
|
import { selectEffectiveDateFilterMode } from "../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
|
|
@@ -17,8 +17,7 @@ import { selectTabs } from "../../../../model/store/tabs/tabsSelectors.js";
|
|
|
17
17
|
import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
|
|
18
18
|
import { useCommandAsPromise, useDeleteAutomation } from "./useCommandAsPromise.js";
|
|
19
19
|
export function useBuildScheduledEmailDialogContext(opts) {
|
|
20
|
-
const { widget, insight } = opts;
|
|
21
|
-
const dashboardFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
|
|
20
|
+
const { widget, insight, scheduledExportToEdit, users, usersError, notificationChannels, isLoading, dashboardFilters, } = opts;
|
|
22
21
|
const hiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
|
|
23
22
|
const dashboardId = useDashboardSelector(selectDashboardId);
|
|
24
23
|
const dashboardTitle = useDashboardSelector(selectDashboardTitle);
|
|
@@ -71,6 +70,11 @@ export function useBuildScheduledEmailDialogContext(opts) {
|
|
|
71
70
|
createScheduledEmail,
|
|
72
71
|
saveScheduledEmail,
|
|
73
72
|
deleteScheduledEmail,
|
|
73
|
+
scheduledExportToEdit,
|
|
74
|
+
users,
|
|
75
|
+
usersError,
|
|
76
|
+
notificationChannels,
|
|
77
|
+
isLoading,
|
|
74
78
|
}), [
|
|
75
79
|
widget,
|
|
76
80
|
insight,
|
|
@@ -92,5 +96,10 @@ export function useBuildScheduledEmailDialogContext(opts) {
|
|
|
92
96
|
createScheduledEmail,
|
|
93
97
|
saveScheduledEmail,
|
|
94
98
|
deleteScheduledEmail,
|
|
99
|
+
scheduledExportToEdit,
|
|
100
|
+
users,
|
|
101
|
+
usersError,
|
|
102
|
+
notificationChannels,
|
|
103
|
+
isLoading,
|
|
95
104
|
]);
|
|
96
105
|
}
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js
CHANGED
|
@@ -31,7 +31,6 @@ vi.mock("../../../../model/commands/scheduledEmail.js", () => ({
|
|
|
31
31
|
}));
|
|
32
32
|
vi.mock("../../../../model/store/filtering/dashboardFilterSelectors.js", () => ({
|
|
33
33
|
selectAutomationCommonDateFilterId: () => "common-date-id",
|
|
34
|
-
selectAutomationDefaultSelectedFilters: () => [{ id: "filter-1" }],
|
|
35
34
|
selectDashboardHiddenFilters: () => [],
|
|
36
35
|
}));
|
|
37
36
|
vi.mock("../../../../model/store/meta/metaSelectors.js", () => ({
|
|
@@ -76,19 +75,50 @@ vi.mock("./sanitizeAutomationForSave.js", () => ({
|
|
|
76
75
|
}));
|
|
77
76
|
import { createScheduledEmail as createScheduledEmailCmd, saveScheduledEmail as saveScheduledEmailCmd, } from "../../../../model/commands/scheduledEmail.js";
|
|
78
77
|
import { sanitizeAutomationForSave } from "./sanitizeAutomationForSave.js";
|
|
79
|
-
import { useBuildScheduledEmailDialogContext } from "./useBuildScheduledEmailDialogContext.js";
|
|
78
|
+
import { useBuildScheduledEmailDialogContext, } from "./useBuildScheduledEmailDialogContext.js";
|
|
80
79
|
// ---------------------------------------------------------------------------
|
|
81
80
|
// Tests
|
|
82
81
|
// ---------------------------------------------------------------------------
|
|
82
|
+
// The builder's create/edit inputs (users, notificationChannels, isLoading) are required options;
|
|
83
|
+
// tests that don't care about them use this minimal, valid base and override what they need.
|
|
84
|
+
const BASE_OPTS = {
|
|
85
|
+
users: [],
|
|
86
|
+
notificationChannels: [],
|
|
87
|
+
isLoading: false,
|
|
88
|
+
};
|
|
83
89
|
describe("useBuildScheduledEmailDialogContext", () => {
|
|
84
|
-
it("exposes dashboardId
|
|
85
|
-
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(
|
|
90
|
+
it("exposes dashboardId and dashboardTitle from the store selectors", () => {
|
|
91
|
+
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(BASE_OPTS));
|
|
86
92
|
expect(result.current.dashboardId).toBe("dashboard-1");
|
|
87
93
|
expect(result.current.dashboardTitle).toBe("My Dashboard");
|
|
88
|
-
|
|
94
|
+
});
|
|
95
|
+
it("passes the create/edit inputs through and carries the effective dashboard filters", () => {
|
|
96
|
+
const scheduledExportToEdit = { id: "schedule-1", title: "Weekly" };
|
|
97
|
+
const users = [
|
|
98
|
+
{ ref: idRef("user-1"), uri: "/users/user-1", login: "user-1", email: "user-1@example.com" },
|
|
99
|
+
];
|
|
100
|
+
const notificationChannels = [
|
|
101
|
+
{ id: "channel-1", type: "notificationChannel" },
|
|
102
|
+
];
|
|
103
|
+
const dashboardFilters = [];
|
|
104
|
+
const { result } = renderHook(() => useBuildScheduledEmailDialogContext({
|
|
105
|
+
scheduledExportToEdit,
|
|
106
|
+
users,
|
|
107
|
+
usersError: undefined,
|
|
108
|
+
notificationChannels,
|
|
109
|
+
isLoading: true,
|
|
110
|
+
dashboardFilters,
|
|
111
|
+
}));
|
|
112
|
+
expect(result.current.scheduledExportToEdit).toBe(scheduledExportToEdit);
|
|
113
|
+
expect(result.current.users).toBe(users);
|
|
114
|
+
expect(result.current.notificationChannels).toBe(notificationChannels);
|
|
115
|
+
expect(result.current.isLoading).toBe(true);
|
|
116
|
+
// the connector computes `saved ?? getAppliedDashboardFilters(...)` and passes the result in;
|
|
117
|
+
// the builder must not re-derive it from selectAutomationDefaultSelectedFilters
|
|
118
|
+
expect(result.current.dashboardFilters).toBe(dashboardFilters);
|
|
89
119
|
});
|
|
90
120
|
it("createScheduledEmail applies sanitizeAutomationForSave before dispatching the command", async () => {
|
|
91
|
-
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(
|
|
121
|
+
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(BASE_OPTS));
|
|
92
122
|
const draft = {
|
|
93
123
|
type: "automation",
|
|
94
124
|
title: "New Schedule",
|
|
@@ -117,7 +147,7 @@ describe("useBuildScheduledEmailDialogContext", () => {
|
|
|
117
147
|
await expect(promise).resolves.toEqual(createdSE);
|
|
118
148
|
});
|
|
119
149
|
it("saveScheduledEmail applies sanitizeAutomationForSave before dispatching the command", async () => {
|
|
120
|
-
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(
|
|
150
|
+
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(BASE_OPTS));
|
|
121
151
|
const existing = {
|
|
122
152
|
type: "automation",
|
|
123
153
|
id: "se-2",
|
|
@@ -137,7 +167,7 @@ describe("useBuildScheduledEmailDialogContext", () => {
|
|
|
137
167
|
await expect(promise).resolves.toEqual(existing);
|
|
138
168
|
});
|
|
139
169
|
it("createScheduledEmail rejects with error when the command fails", async () => {
|
|
140
|
-
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(
|
|
170
|
+
const { result } = renderHook(() => useBuildScheduledEmailDialogContext(BASE_OPTS));
|
|
141
171
|
const draft = {
|
|
142
172
|
type: "automation",
|
|
143
173
|
title: "Fail Schedule",
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type { IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
1
2
|
import type { IScheduledEmailManagementDialogContextValue } from "../../contexts/ScheduledEmailManagementDialogContext.js";
|
|
2
|
-
export
|
|
3
|
+
export interface IUseBuildScheduledEmailManagementDialogContextOpts {
|
|
4
|
+
automations: IAutomationMetadataObject[];
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function useBuildScheduledEmailManagementDialogContext(opts: IUseBuildScheduledEmailManagementDialogContextOpts): IScheduledEmailManagementDialogContextValue;
|
|
3
8
|
//# sourceMappingURL=useBuildScheduledEmailManagementDialogContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBuildScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAiBrE,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,yDAAyD,CAAC;AAE3H,MAAM,WAAW,kDAAkD;IAC/D,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,6CAA6C,CACzD,IAAI,EAAE,kDAAkD,GACzD,2CAA2C,CAwC7C"}
|
|
@@ -6,7 +6,8 @@ import { selectEnableAccessibilityMode, selectIsEmbedded, } from "../../../../mo
|
|
|
6
6
|
import { selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, } from "../../../../model/store/entitlements/entitlementsSelectors.js";
|
|
7
7
|
import { selectDashboardId, selectDashboardTitle } from "../../../../model/store/meta/metaSelectors.js";
|
|
8
8
|
import { selectAutomationsInvalidationId, selectIsScheduleEmailDialogOpen, } from "../../../../model/store/ui/uiSelectors.js";
|
|
9
|
-
export function useBuildScheduledEmailManagementDialogContext() {
|
|
9
|
+
export function useBuildScheduledEmailManagementDialogContext(opts) {
|
|
10
|
+
const { automations, isLoading } = opts;
|
|
10
11
|
const isScheduleEmailDialogOpen = useDashboardSelector(selectIsScheduleEmailDialogOpen);
|
|
11
12
|
const automationsInvalidationId = useDashboardSelector(selectAutomationsInvalidationId);
|
|
12
13
|
const isEmbedded = useDashboardSelector(selectIsEmbedded);
|
|
@@ -25,6 +26,8 @@ export function useBuildScheduledEmailManagementDialogContext() {
|
|
|
25
26
|
dashboardTitle,
|
|
26
27
|
maxAutomations,
|
|
27
28
|
unlimitedAutomations,
|
|
29
|
+
automations,
|
|
30
|
+
isLoading,
|
|
28
31
|
}), [
|
|
29
32
|
isScheduleEmailDialogOpen,
|
|
30
33
|
automationsInvalidationId,
|
|
@@ -34,5 +37,7 @@ export function useBuildScheduledEmailManagementDialogContext() {
|
|
|
34
37
|
dashboardTitle,
|
|
35
38
|
maxAutomations,
|
|
36
39
|
unlimitedAutomations,
|
|
40
|
+
automations,
|
|
41
|
+
isLoading,
|
|
37
42
|
]);
|
|
38
43
|
}
|
|
@@ -29,7 +29,7 @@ import { useBuildScheduledEmailManagementDialogContext } from "./useBuildSchedul
|
|
|
29
29
|
// ---------------------------------------------------------------------------
|
|
30
30
|
describe("useBuildScheduledEmailManagementDialogContext", () => {
|
|
31
31
|
it("returns store-derived fields correctly", () => {
|
|
32
|
-
const { result } = renderHook(() => useBuildScheduledEmailManagementDialogContext());
|
|
32
|
+
const { result } = renderHook(() => useBuildScheduledEmailManagementDialogContext({ automations: [], isLoading: false }));
|
|
33
33
|
expect(result.current.isScheduleEmailDialogOpen).toBe(false);
|
|
34
34
|
expect(result.current.automationsInvalidationId).toBe(42);
|
|
35
35
|
expect(result.current.isEmbedded).toBe(false);
|
|
@@ -39,4 +39,10 @@ describe("useBuildScheduledEmailManagementDialogContext", () => {
|
|
|
39
39
|
expect(result.current.maxAutomations).toBe(10);
|
|
40
40
|
expect(result.current.unlimitedAutomations).toBe(false);
|
|
41
41
|
});
|
|
42
|
+
it("passes the automation list and loading flag through to the context", () => {
|
|
43
|
+
const automations = [{ id: "schedule-1", title: "Weekly" }];
|
|
44
|
+
const { result } = renderHook(() => useBuildScheduledEmailManagementDialogContext({ automations, isLoading: true }));
|
|
45
|
+
expect(result.current.automations).toBe(automations);
|
|
46
|
+
expect(result.current.isLoading).toBe(true);
|
|
47
|
+
});
|
|
42
48
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DashboardAttributeFilterConfigMode, DashboardDateFilterConfigMode, FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IDashboardExportParameter, IExportTemplate, IInsight, IWidget } from "@gooddata/sdk-model";
|
|
1
|
+
import type { DashboardAttributeFilterConfigMode, DashboardDateFilterConfigMode, FilterContextItem, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IDashboardExportParameter, IExportTemplate, IInsight, INotificationChannelIdentifier, INotificationChannelMetadataObject, IWidget, IWorkspaceUser } from "@gooddata/sdk-model";
|
|
2
|
+
import type { GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
2
3
|
/**
|
|
3
4
|
* Sub-context for the scheduled-email create/edit dialog.
|
|
4
5
|
*
|
|
@@ -14,6 +15,10 @@ export interface IScheduledEmailDialogContextValue {
|
|
|
14
15
|
widgetTitle?: string;
|
|
15
16
|
dashboardId?: string;
|
|
16
17
|
dashboardTitle: string;
|
|
18
|
+
/**
|
|
19
|
+
* Dashboard filters the export will use: the saved filters when editing, otherwise the currently
|
|
20
|
+
* applied dashboard filters with hidden filters resolved.
|
|
21
|
+
*/
|
|
17
22
|
dashboardFilters?: FilterContextItem[];
|
|
18
23
|
/**
|
|
19
24
|
* Raw dashboard hidden filters (selectDashboardHiddenFilters). Combined with edited filters via
|
|
@@ -47,14 +52,28 @@ export interface IScheduledEmailDialogContextValue {
|
|
|
47
52
|
createScheduledEmail(se: IAutomationMetadataObjectDefinition): Promise<IAutomationMetadataObject>;
|
|
48
53
|
saveScheduledEmail(se: IAutomationMetadataObject): Promise<IAutomationMetadataObject>;
|
|
49
54
|
deleteScheduledEmail(se: IAutomationMetadataObject): Promise<void>;
|
|
55
|
+
/** The scheduled export being edited; undefined when creating a new one. */
|
|
56
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
57
|
+
/**
|
|
58
|
+
* Workspace users available as scheduled-export recipients. Loaded only while the create/edit dialog
|
|
59
|
+
* is mounted, so opening the management dialog alone does not trigger the load.
|
|
60
|
+
*/
|
|
61
|
+
users: IWorkspaceUser[];
|
|
62
|
+
/** Error from loading workspace users, if any. */
|
|
63
|
+
usersError?: GoodDataSdkError;
|
|
64
|
+
/** Notification channels available as scheduled-export destinations. */
|
|
65
|
+
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
66
|
+
/** True while the dialog's initial data (automations, workspace users) is still loading. */
|
|
67
|
+
isLoading: boolean;
|
|
50
68
|
}
|
|
51
69
|
export declare const ScheduledEmailDialogContextProvider: import("react").Provider<IScheduledEmailDialogContextValue | undefined>;
|
|
52
70
|
/**
|
|
53
71
|
* Reads the scheduled-email create/edit dialog context.
|
|
54
72
|
*
|
|
55
73
|
* A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
|
|
56
|
-
* and insight, the dashboard filter context and export templates it should apply,
|
|
57
|
-
* create/save/delete
|
|
74
|
+
* and insight, the dashboard filter context and export templates it should apply, the scheduled export
|
|
75
|
+
* being edited, the available workspace users and notification channels, and the create/save/delete
|
|
76
|
+
* callbacks from here.
|
|
58
77
|
*
|
|
59
78
|
* Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
|
|
60
79
|
* `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,OAAO,
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,iCAAiC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;IACnE;;;OAGG;IACH,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,wEAAwE;IACxE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4EAA4E;IAC5E,eAAe,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,oBAAoB,EAAE,6BAA6B,CAAC;IACpD,kFAAgF;IAChF,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IAC/D,2EAAyE;IACzE,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;IAEzE,oBAAoB,CAAC,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClG,kBAAkB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtF,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD;;;OAGG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,kDAAkD;IAClD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,wEAAwE;IACxE,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,4FAA4F;IAC5F,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,CAQlF"}
|
|
@@ -6,8 +6,9 @@ export const ScheduledEmailDialogContextProvider = ScheduledEmailDialogContext.P
|
|
|
6
6
|
* Reads the scheduled-email create/edit dialog context.
|
|
7
7
|
*
|
|
8
8
|
* A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
|
|
9
|
-
* and insight, the dashboard filter context and export templates it should apply,
|
|
10
|
-
* create/save/delete
|
|
9
|
+
* and insight, the dashboard filter context and export templates it should apply, the scheduled export
|
|
10
|
+
* being edited, the available workspace users and notification channels, and the create/save/delete
|
|
11
|
+
* callbacks from here.
|
|
11
12
|
*
|
|
12
13
|
* Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
|
|
13
14
|
* `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
1
2
|
/**
|
|
2
3
|
* Sub-context for the scheduled-email management dialog.
|
|
3
4
|
* The connector hydrates this from dashboard state.
|
|
@@ -48,14 +49,20 @@ export interface IScheduledEmailManagementDialogContextValue {
|
|
|
48
49
|
* max-automations limit is not enforced.
|
|
49
50
|
*/
|
|
50
51
|
unlimitedAutomations: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Scheduled exports visible in the management dialog, scoped to the current dashboard context.
|
|
54
|
+
*/
|
|
55
|
+
automations: IAutomationMetadataObject[];
|
|
56
|
+
/** True while the automation list is still loading. */
|
|
57
|
+
isLoading: boolean;
|
|
51
58
|
}
|
|
52
59
|
export declare const ScheduledEmailManagementDialogContextProvider: import("react").Provider<IScheduledEmailManagementDialogContextValue | undefined>;
|
|
53
60
|
/**
|
|
54
61
|
* Reads the scheduled-email management dialog context.
|
|
55
62
|
*
|
|
56
63
|
* A replacement for the scheduled-email management dialog renders inside this context and reads the
|
|
57
|
-
* dashboard it's rendered on
|
|
58
|
-
* here.
|
|
64
|
+
* dashboard it's rendered on, the automations limit (`maxAutomations`, `unlimitedAutomations`), the
|
|
65
|
+
* scheduled exports to list (`automations`), and whether they are still loading (`isLoading`) from here.
|
|
59
66
|
*
|
|
60
67
|
* Some members exist to wire internal machinery (`automationsInvalidationId`) and are not intended as a
|
|
61
68
|
* customization surface.
|
package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,MAAM,WAAW,2CAA2C;IACxD;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;;;;;;;GASG;AACH,MAAM,WAAW,2CAA2C;IACxD;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;CACtB;AAMD,eAAO,MAAM,6CAA6C,mFAAiD,CAAC;AAE5G;;;;;;;;;;;GAWG;AACH,wBAAgB,wCAAwC,IAAI,2CAA2C,CAQtG"}
|
|
@@ -6,8 +6,8 @@ export const ScheduledEmailManagementDialogContextProvider = ScheduledEmailManag
|
|
|
6
6
|
* Reads the scheduled-email management dialog context.
|
|
7
7
|
*
|
|
8
8
|
* A replacement for the scheduled-email management dialog renders inside this context and reads the
|
|
9
|
-
* dashboard it's rendered on
|
|
10
|
-
* here.
|
|
9
|
+
* dashboard it's rendered on, the automations limit (`maxAutomations`, `unlimitedAutomations`), the
|
|
10
|
+
* scheduled exports to list (`automations`), and whether they are still loading (`isLoading`) from here.
|
|
11
11
|
*
|
|
12
12
|
* Some members exist to wire internal machinery (`automationsInvalidationId`) and are not intended as a
|
|
13
13
|
* customization surface.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
+
interface IDefaultLoadingScheduledEmailDialogProps {
|
|
3
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function DefaultLoadingScheduledEmailDialog({ scheduledExportToEdit, onCancel }: IDefaultLoadingScheduledEmailDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
3
8
|
//# sourceMappingURL=DefaultLoadingScheduledEmailDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultLoadingScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultLoadingScheduledEmailDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultLoadingScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultLoadingScheduledEmailDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAarE,UAAU,wCAAwC;IAC9C,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,kCAAkC,CAAC,EAC/C,qBAAqB,EACrB,QAAQ,EACX,EAAE,wCAAwC,2CAkD1C"}
|