@gooddata/sdk-ui-dashboard 11.53.0-alpha.5 → 11.53.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/model/commandHandlers/dashboard/exportDashboardToPdfHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/exportDashboardToPdfHandler.js +3 -1
- package/esm/model/commandHandlers/dashboard/exportDashboardToPdfPresentationHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/exportDashboardToPdfPresentationHandler.js +3 -1
- package/esm/model/commandHandlers/dashboard/exportDashboardToPptPresentationHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/exportDashboardToPptPresentationHandler.js +3 -1
- package/esm/model/commandHandlers/dashboard/exportToTabularHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/exportToTabularHandler.js +5 -3
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +9 -2
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadExportTimezone.d.ts +12 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadExportTimezone.d.ts.map +1 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadExportTimezone.js +25 -0
- package/esm/model/commandHandlers/timezone/changeDashboardTimezoneOverrideHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/timezone/changeDashboardTimezoneOverrideHandler.js +4 -3
- package/esm/model/commandHandlers/widgets/exportImageInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportImageInsightWidgetHandler.js +3 -1
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.js +4 -2
- package/esm/model/commandHandlers/widgets/exportRawInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportRawInsightWidgetHandler.js +7 -1
- package/esm/model/commandHandlers/widgets/exportSlidesInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/exportSlidesInsightWidgetHandler.js +3 -1
- 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 +16 -0
- package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.js +28 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/convertors.d.ts +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/convertors.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/convertors.js +6 -1
- package/esm/presentation/automations/alerting/state/useAlertFormState.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/useAlertFormState.js +6 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +29 -3
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +39 -0
- 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 +33 -10
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.d.ts +15 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.js +58 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useExportTimezones.d.ts +52 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useExportTimezones.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useExportTimezones.js +46 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleTimezone.d.ts +47 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleTimezone.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleTimezone.js +90 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js +21 -0
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts +2 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts +5 -2
- package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/exportDefinitions.d.ts +19 -2
- package/esm/presentation/automations/scheduledEmail/state/exportDefinitions.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/exportDefinitions.js +35 -2
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts +9 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.js +10 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.js +14 -2
- package/esm/presentation/automations/scheduledEmail/types.d.ts +64 -0
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.d.ts +12 -1
- package/esm/presentation/automations/shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js +17 -2
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.js +3 -1
- package/esm/presentation/dashboardSettingsDialog/TimezoneOption.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/TimezoneOption.js +5 -6
- package/esm/presentation/filterBar/filterBar/useExecutionTimestampMessage.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/useExecutionTimestampMessage.js +6 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +48 -4
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +51 -7
- package/esm/presentation/timezoneDialog/TimezoneDialog.d.ts +1 -1
- package/esm/presentation/timezoneDialog/TimezoneDialog.d.ts.map +1 -1
- package/esm/presentation/timezoneDialog/TimezoneDialog.js +7 -6
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +6 -2
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts +4 -3
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts.map +1 -1
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.js +10 -9
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +6 -1
- package/esm/sdk-ui-dashboard.d.ts +134 -3
- package/package.json +21 -21
- package/styles/css/main.css +41 -0
- package/styles/css/main.css.map +1 -1
- package/styles/css/scheduleTimezone.css +30 -0
- package/styles/css/scheduleTimezone.css.map +1 -0
- package/styles/scss/main.scss +1 -0
- package/styles/scss/scheduleTimezone.scss +37 -0
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.d.ts +0 -2
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.d.ts.map +0 -1
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.js +0 -39
- package/esm/presentation/automations/connectors/AlertingConnector.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/AlertingConnector.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -201
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -225
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +0 -95
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +0 -185
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +0 -175
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.d.ts +0 -2
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.d.ts.map +0 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.js +0 -48
- package/esm/presentation/automations/contexts/AutomationsContext.test.d.ts +0 -2
- package/esm/presentation/automations/contexts/AutomationsContext.test.d.ts.map +0 -1
- package/esm/presentation/automations/contexts/AutomationsContext.test.js +0 -9
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts +0 -2
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts.map +0 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +0 -159
- package/esm/presentation/export/DefaultDashboardExportVariables.test.d.ts +0 -2
- package/esm/presentation/export/DefaultDashboardExportVariables.test.d.ts.map +0 -1
- package/esm/presentation/export/DefaultDashboardExportVariables.test.js +0 -58
- package/esm/presentation/widget/insight/LayeredTableView.test.d.ts +0 -2
- package/esm/presentation/widget/insight/LayeredTableView.test.d.ts.map +0 -1
- package/esm/presentation/widget/insight/LayeredTableView.test.js +0 -149
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.d.ts +0 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.d.ts.map +0 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.js +0 -124
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.test.d.ts +0 -2
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.test.d.ts.map +0 -1
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.test.js +0 -139
- package/esm/presentation/widget/insight/insightToTable.test.d.ts +0 -2
- package/esm/presentation/widget/insight/insightToTable.test.d.ts.map +0 -1
- package/esm/presentation/widget/insight/insightToTable.test.js +0 -325
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo, useRef, useState } from "react";
|
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { defineMessage, useIntl } from "react-intl";
|
|
6
6
|
import { ValidationContextStore, createInvalidNode, useValidationContextValue } from "@gooddata/sdk-ui";
|
|
7
|
-
import { Button, ConfirmDialogBase, ContentDivider, Hyperlink, Message, Overlay, OverlayController, OverlayControllerProvider, RecurrenceForm, ScrollablePanel, UiIcon, UiTabs, isEnterKey, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
7
|
+
import { Button, ConfirmDialogBase, ContentDivider, Hyperlink, Message, Overlay, OverlayController, OverlayControllerProvider, RecurrenceForm, ScrollablePanel, UiIcon, UiTabs, getTimezoneDisplayLabel, isEnterKey, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
8
8
|
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
9
9
|
import { IntlWrapper } from "../../../localization/IntlWrapper.js";
|
|
10
10
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
@@ -29,6 +29,7 @@ import { ScheduledEmailDialogHeader } from "./components/Header/ScheduleEmailDia
|
|
|
29
29
|
import { MessageForm } from "./components/MessageForm/MessageForm.js";
|
|
30
30
|
import { RecipientsSelect } from "./components/RecipientsSelect/RecipientsSelect.js";
|
|
31
31
|
import { ScheduledEmailDialogFilters } from "./components/ScheduledEmailDialogFilters.js";
|
|
32
|
+
import { ScheduleTimezoneSelect } from "./components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.js";
|
|
32
33
|
import { SubjectForm } from "./components/SubjectForm/SubjectForm.js";
|
|
33
34
|
import { SCHEDULED_EMAIL_DIALOG_ID } from "./constants.js";
|
|
34
35
|
import { DefaultLoadingScheduledEmailDialog } from "./DefaultLoadingScheduledEmailDialog.js";
|
|
@@ -44,6 +45,7 @@ function ScheduledEmailDialogFooter({ isWhiteLabeled, helpTextId, scheduledExpor
|
|
|
44
45
|
export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess, slots, }) {
|
|
45
46
|
const HeaderSlot = slots?.Header;
|
|
46
47
|
const FiltersSlot = slots?.Filters;
|
|
48
|
+
const TimezoneSlot = slots?.Timezone;
|
|
47
49
|
const intl = useIntl();
|
|
48
50
|
const dialogTitleRef = useRef(null);
|
|
49
51
|
const generalTabContentRef = useRef(null);
|
|
@@ -57,13 +59,14 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
57
59
|
setScheduledEmailToDelete(null);
|
|
58
60
|
};
|
|
59
61
|
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, isSlidesExportEnabled, isAccessibilityModeEnabled, enableAutomationEvaluationMode, } = useDefaultScheduledEmailDialogData();
|
|
60
|
-
const { editedAutomation, originalAutomation, startDate } = useScheduledExportDraft();
|
|
61
|
-
const { onTitleChange, onRecurrenceChange, onEvaluationModeChange, onDestinationChange, onRecipientsChange, onSubjectChange, onMessageChange, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, onSlidesTemplateIdChange, } = useScheduledExportActions();
|
|
62
|
+
const { editedAutomation, originalAutomation, startDate, isTimezoneFeatureEnabled, canSelectScheduleTimezone, scheduleTimezoneSelection, defaultResolvedTimezone, scheduleTimezoneIsStale, } = useScheduledExportDraft();
|
|
63
|
+
const { onTitleChange, onRecurrenceChange, onEvaluationModeChange, onDestinationChange, onRecipientsChange, onSubjectChange, onMessageChange, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, onSlidesTemplateIdChange, onScheduleTimezoneChange, applyCurrentScheduleTimezone, } = useScheduledExportActions();
|
|
62
64
|
const { defaultUser } = useScheduledExportData();
|
|
63
65
|
const { selectedFilters, availableFilters, storeFilters, filtersByTab, editedFiltersByTab, onFiltersChange, onFiltersByTabChange, onApplyCurrentFilters, onStoreFiltersChange, automationIsValid, parametersEnabled, visibleParametersByTab, availableParametersByTab, flatTabId, onParameterAdd, onParameterChange, onParameterDelete, onParameterAddByTab, onParameterChangeByTab, onParameterDeleteByTab, applyLatest: applyLatestParameters, } = useScheduledExportFilters();
|
|
64
66
|
const { selectedAttachments, xlsxSettings, pdfSettings, csvSettings, csvRawSettings, slidesTemplateIds } = useScheduledExportAttachments();
|
|
65
67
|
const { isSubmitDisabled, validationErrorMessage, isParentValid, allowExternalRecipients, allowOnlyLoggedUserRecipients, } = useScheduledExportDialogValidity();
|
|
66
|
-
|
|
68
|
+
// a stale schedule timezone repairs through the same consent dialog as stale filters
|
|
69
|
+
const [isApplyCurrentFiltersDialogOpen, setIsApplyCurrentFiltersDialogOpen] = useState(!automationIsValid || scheduleTimezoneIsStale);
|
|
67
70
|
const { handleSaveScheduledEmail, isSavingScheduledEmail, savingErrorMessage } = useSaveScheduledEmailToBackend(editedAutomation, {
|
|
68
71
|
onSuccess,
|
|
69
72
|
onError,
|
|
@@ -88,6 +91,14 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
88
91
|
handleSaveScheduledEmail();
|
|
89
92
|
}
|
|
90
93
|
}, [submitDisabled, handleSaveScheduledEmail]);
|
|
94
|
+
// the exact props the default dialog renders the "Time zone" section with; also handed to the
|
|
95
|
+
// Timezone slot so a wrap keeps the default behavior
|
|
96
|
+
const timezoneDefaultProps = {
|
|
97
|
+
isWidget: !!widget,
|
|
98
|
+
selection: scheduleTimezoneSelection,
|
|
99
|
+
defaultResolvedTimezone,
|
|
100
|
+
onTimezoneChange: onScheduleTimezoneChange,
|
|
101
|
+
};
|
|
91
102
|
const { secondaryTitle, secondaryTitleIcon } = useMemo(() => {
|
|
92
103
|
if (widget) {
|
|
93
104
|
return {
|
|
@@ -128,9 +139,14 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
128
139
|
// internally so it survives the General tab unmounting when the user switches to Filters.
|
|
129
140
|
const tabContentHeight = useElementHeightSnapshot(generalTabContentRef, selectedTabId);
|
|
130
141
|
if (isApplyCurrentFiltersDialogOpen) {
|
|
131
|
-
return (_jsx(ApplyCurrentFiltersConfirmDialog, { automationType: "schedule", onCancel: () => onCancel?.(), onEdit: () => {
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
return (_jsx(ApplyCurrentFiltersConfirmDialog, { automationType: "schedule", filtersChanged: !automationIsValid, timezoneChanged: scheduleTimezoneIsStale, onCancel: () => onCancel?.(), onEdit: () => {
|
|
143
|
+
// each repair only fixes its own staleness: a timezone-only repair must not
|
|
144
|
+
// replace intentionally snapshotted, still-valid filters (and vice versa)
|
|
145
|
+
if (!automationIsValid) {
|
|
146
|
+
onApplyCurrentFilters();
|
|
147
|
+
applyLatestParameters();
|
|
148
|
+
}
|
|
149
|
+
applyCurrentScheduleTimezone();
|
|
134
150
|
setIsApplyCurrentFiltersDialogOpen(false);
|
|
135
151
|
} }));
|
|
136
152
|
}
|
|
@@ -206,10 +222,17 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
206
222
|
: undefined, children: FiltersSlot ? (_jsx(FiltersSlot, { Default: ScheduledEmailDialogFilters, defaultProps: filtersDefaultProps })) : (_jsx(ScheduledEmailDialogFilters, { ...filtersDefaultProps })) })) : (_jsxs("div", { ref: generalTabContentRef, className: "gd-schedule-dialog-tab-content", children: [!widget && tabIds.length > 1 ? (_jsx(Message, { type: "progress", className: "gd-schedule-dialog-tab-content-info", children: intl.formatMessage({
|
|
207
223
|
id: "dialogs.schedule.email.tabs.info",
|
|
208
224
|
}) })) : null, _jsx(RecurrenceForm, { startDate: startDate, cronExpression: editedAutomation.schedule?.cron ??
|
|
209
|
-
getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone:
|
|
210
|
-
|
|
225
|
+
getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone:
|
|
226
|
+
// display-only prop; with the timezone feature on,
|
|
227
|
+
// show the friendly label used by the time zone
|
|
228
|
+
// picker instead of the raw IANA ID
|
|
229
|
+
isTimezoneFeatureEnabled
|
|
230
|
+
? getTimezoneDisplayLabel(editedAutomation.schedule?.timezone ??
|
|
231
|
+
TIMEZONE_DEFAULT.identifier)
|
|
232
|
+
: (editedAutomation.schedule?.timezone ??
|
|
233
|
+
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, 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: [
|
|
211
234
|
_jsx(SubjectForm, { dashboardTitle: dashboardTitle, editedAutomation: editedAutomation, onChange: onSubjectChange, onKeyDownSubmit: handleSaveScheduledEmail, isSubmitDisabled: isSubmitDisabled }), _jsx(MessageForm, { onChange: onMessageChange, value: editedAutomation.details?.message ?? "" })
|
|
212
|
-
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, isAccessibilityModeEnabled: isAccessibilityModeEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, 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", {
|
|
235
|
+
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, isAccessibilityModeEnabled: isAccessibilityModeEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), canSelectScheduleTimezone ? (TimezoneSlot ? (_jsx(TimezoneSlot, { Default: ScheduleTimezoneSelect, defaultProps: timezoneDefaultProps })) : (_jsx(ScheduleTimezoneSelect, { ...timezoneDefaultProps }))) : null, enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
213
236
|
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
214
237
|
}), children: errorMessage })) : null, getInvalidDatapoints()
|
|
215
238
|
.filter((invalidDatapoint) => invalidDatapoint.severity === "error")
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type IScheduledEmailDialogTimezoneProps } from "../../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The "Time zone" section of the scheduled-email dialog's General tab. Unlike the
|
|
4
|
+
* dashboard-settings timezone picker, the dropdown offers no browser-detected option — the
|
|
5
|
+
* schedule runs without a browser. Dashboard schedules offer a Default option (the backend
|
|
6
|
+
* derives the persisted dashboard/settings timezone at run time); widget schedules always show
|
|
7
|
+
* a concrete timezone.
|
|
8
|
+
*
|
|
9
|
+
* The default implementation of the dialog's `Timezone` slot; its props are the slot contract
|
|
10
|
+
* (see {@link IScheduledEmailDialogTimezoneProps}).
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function ScheduleTimezoneSelect({ isWidget, selection, defaultResolvedTimezone, onTimezoneChange }: IScheduledEmailDialogTimezoneProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=ScheduleTimezoneSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduleTimezoneSelect.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,kCAAkC,EAAE,MAAM,mBAAmB,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,QAAQ,EACR,SAAS,EACT,uBAAuB,EACvB,gBAAgB,EACnB,EAAE,kCAAkC,2CAiFpC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
|
+
import { TimezoneSelect, getCurrentTimeByTimezoneId, getTimezoneDisplayLabel, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
5
|
+
/**
|
|
6
|
+
* The "Time zone" section of the scheduled-email dialog's General tab. Unlike the
|
|
7
|
+
* dashboard-settings timezone picker, the dropdown offers no browser-detected option — the
|
|
8
|
+
* schedule runs without a browser. Dashboard schedules offer a Default option (the backend
|
|
9
|
+
* derives the persisted dashboard/settings timezone at run time); widget schedules always show
|
|
10
|
+
* a concrete timezone.
|
|
11
|
+
*
|
|
12
|
+
* The default implementation of the dialog's `Timezone` slot; its props are the slot contract
|
|
13
|
+
* (see {@link IScheduledEmailDialogTimezoneProps}).
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function ScheduleTimezoneSelect({ isWidget, selection, defaultResolvedTimezone, onTimezoneChange, }) {
|
|
18
|
+
const intl = useIntl();
|
|
19
|
+
const selectId = useIdPrefixed("schedule-timezone");
|
|
20
|
+
const currentTimeId = useIdPrefixed("schedule-timezone-current-time");
|
|
21
|
+
const usageNoteId = useIdPrefixed("schedule-timezone-note");
|
|
22
|
+
const isDefaultSelected = selection.id === undefined;
|
|
23
|
+
const currentTimezoneId = selection.id ?? defaultResolvedTimezone;
|
|
24
|
+
const currentTime = currentTimezoneId ? getCurrentTimeByTimezoneId(currentTimezoneId) : "";
|
|
25
|
+
// "Now: 14:45" preview of the current time in the effective selection; the Default option
|
|
26
|
+
// additionally prints out the concrete timezone it resolves to right now.
|
|
27
|
+
const currentTimeCaption = currentTime
|
|
28
|
+
? isDefaultSelected
|
|
29
|
+
? intl.formatMessage({ id: "dialogs.automation.timezone.defaultNow" }, { timezone: getTimezoneDisplayLabel(currentTimezoneId), time: currentTime })
|
|
30
|
+
: intl.formatMessage({ id: "dialogs.automation.timezone.now" }, { time: currentTime })
|
|
31
|
+
: null;
|
|
32
|
+
// the current-time caption and the usage note describe the trigger for assistive tech
|
|
33
|
+
const describedBy = [currentTimeCaption ? currentTimeId : undefined, usageNoteId]
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.join(" ");
|
|
36
|
+
return (_jsxs("div", { className: "gd-input-component gd-schedule-timezone-field s-gd-schedule-timezone", children: [
|
|
37
|
+
_jsx("label", { htmlFor: selectId, className: "gd-label", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.timezone" }) }), _jsxs("div", { className: "gd-schedule-timezone-field__content", children: [
|
|
38
|
+
_jsxs("div", { className: "gd-schedule-timezone-field__row", children: [
|
|
39
|
+
_jsx(TimezoneSelect, { value: selection.id, onChange: onTimezoneChange, id: selectId, ariaDescribedBy: describedBy, showTooltip: true, specialItems: isWidget
|
|
40
|
+
? []
|
|
41
|
+
: [
|
|
42
|
+
{
|
|
43
|
+
id: undefined,
|
|
44
|
+
label: intl.formatMessage({
|
|
45
|
+
id: "dialogs.automation.timezone.default",
|
|
46
|
+
}),
|
|
47
|
+
tooltip: intl.formatMessage({
|
|
48
|
+
id: "dialogs.automation.timezone.default.tooltip",
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
], searchPlaceholder: intl.formatMessage({
|
|
52
|
+
id: "dialogs.automation.timezone.select.searchPlaceholder",
|
|
53
|
+
}), ariaLabel: intl.formatMessage({ id: "dialogs.schedule.email.timezone" }), noMatchLabel: intl.formatMessage({
|
|
54
|
+
id: "dialogs.automation.timezone.select.noMatch",
|
|
55
|
+
}) }), currentTimeCaption ? (_jsx("div", { id: currentTimeId, className: "gd-schedule-timezone-field__current-time s-gd-schedule-timezone-current-time", children: currentTimeCaption })) : null] }), _jsx("div", { id: usageNoteId, className: "gd-schedule-timezone-field__message s-gd-schedule-timezone-note", children: _jsx(FormattedMessage, { id: "dialogs.automation.timezone.usage" }) })
|
|
56
|
+
] })
|
|
57
|
+
] }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type IScheduleTimezoneSelection } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Export-content timezone inputs for scheduled export definitions (unrelated to the schedule
|
|
4
|
+
* cron timezone). What gets baked into a NEW schedule — and what the Default option means —
|
|
5
|
+
* differs by schedule kind, because of what the backend can derive at run time:
|
|
6
|
+
*
|
|
7
|
+
* - Dashboard schedules: the backend loads the stored dashboard, so only values it cannot derive
|
|
8
|
+
* (view-mode override, browser resolution) are baked; Default resolves through the persisted
|
|
9
|
+
* dashboard configuration to the workspace/organization setting.
|
|
10
|
+
* - Widget schedules: the backend service has ONLY the workspace/organization settings available
|
|
11
|
+
* (it does not load the dashboard object), so anything dashboard-scoped — the stored dashboard
|
|
12
|
+
* configuration, the view-mode override, or the browser resolution — must be baked into the
|
|
13
|
+
* definition. Default then means just the workspace/organization setting.
|
|
14
|
+
*
|
|
15
|
+
* The store-derived inputs arrive via {@link useAutomationsContext}, filled by the connectors
|
|
16
|
+
* layer — the scheduledEmail tree must not read the dashboard store itself.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useExportTimezones(isWidgetSchedule: boolean): {
|
|
19
|
+
/**
|
|
20
|
+
* The enableDashboardTimezone feature flag; timezone-related presentation changes in the
|
|
21
|
+
* dialog are gated by it.
|
|
22
|
+
*/
|
|
23
|
+
isTimezoneFeatureEnabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the schedule may define its own export timezone (the "Time zone" section renders
|
|
26
|
+
* a dropdown): the feature is enabled and the dashboard allows the view-mode timezone
|
|
27
|
+
* override. False also for dashboards that only show the timezone info (showTimezoneInfo
|
|
28
|
+
* without the override) — the schedule dialog then has no timezone section.
|
|
29
|
+
*/
|
|
30
|
+
canSelectScheduleTimezone: boolean;
|
|
31
|
+
workspaceTimezone: string | undefined;
|
|
32
|
+
effectiveTimezone: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Timezone to bake into a NEW schedule's export definitions; undefined means nothing is baked
|
|
35
|
+
* and the backend derives the timezone at run time.
|
|
36
|
+
*/
|
|
37
|
+
exportTimezoneId: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Initial dropdown selection for a new schedule: dashboard schedules start at the Default
|
|
40
|
+
* option unless an override/browser resolution must be baked; widget schedules always start
|
|
41
|
+
* at a concrete resolved timezone (there is no Default for them).
|
|
42
|
+
*/
|
|
43
|
+
initialSelection: IScheduleTimezoneSelection;
|
|
44
|
+
/**
|
|
45
|
+
* Concrete timezone the Default option currently resolves to, for display purposes: the
|
|
46
|
+
* resolution the backend derives at run time for this schedule kind. The session-only
|
|
47
|
+
* view-mode override is deliberately excluded — a schedule left at Default never sees it
|
|
48
|
+
* (the override is instead baked as an explicit timezone via `exportTimezoneId`).
|
|
49
|
+
*/
|
|
50
|
+
defaultResolvedTimezone: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=useExportTimezones.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExportTimezones.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useExportTimezones.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,OAAO,GAAG;IAC3D;;;OAGG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC;;;;;OAKG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,gBAAgB,EAAE,0BAA0B,CAAC;IAC7C;;;;;OAKG;IACH,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C,CAsCA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { resolveTimezoneId } from "@gooddata/sdk-model";
|
|
3
|
+
import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
4
|
+
/**
|
|
5
|
+
* Export-content timezone inputs for scheduled export definitions (unrelated to the schedule
|
|
6
|
+
* cron timezone). What gets baked into a NEW schedule — and what the Default option means —
|
|
7
|
+
* differs by schedule kind, because of what the backend can derive at run time:
|
|
8
|
+
*
|
|
9
|
+
* - Dashboard schedules: the backend loads the stored dashboard, so only values it cannot derive
|
|
10
|
+
* (view-mode override, browser resolution) are baked; Default resolves through the persisted
|
|
11
|
+
* dashboard configuration to the workspace/organization setting.
|
|
12
|
+
* - Widget schedules: the backend service has ONLY the workspace/organization settings available
|
|
13
|
+
* (it does not load the dashboard object), so anything dashboard-scoped — the stored dashboard
|
|
14
|
+
* configuration, the view-mode override, or the browser resolution — must be baked into the
|
|
15
|
+
* definition. Default then means just the workspace/organization setting.
|
|
16
|
+
*
|
|
17
|
+
* The store-derived inputs arrive via {@link useAutomationsContext}, filled by the connectors
|
|
18
|
+
* layer — the scheduledEmail tree must not read the dashboard store itself.
|
|
19
|
+
*/
|
|
20
|
+
export function useExportTimezones(isWidgetSchedule) {
|
|
21
|
+
const { exportTimezones } = useAutomationsContext();
|
|
22
|
+
const { isTimezoneFeatureEnabled = false, allowUserOverrideInViewMode = false, configuredTimezoneId = undefined, workspaceTimezone = undefined, effectiveTimezone = undefined, scheduledExportTimezone: explicitTimezone = undefined, } = exportTimezones ?? {};
|
|
23
|
+
const canSelectScheduleTimezone = isTimezoneFeatureEnabled && allowUserOverrideInViewMode;
|
|
24
|
+
const initialSelection = isWidgetSchedule
|
|
25
|
+
? effectiveTimezone
|
|
26
|
+
? { id: effectiveTimezone, shouldSave: true }
|
|
27
|
+
: { id: workspaceTimezone, shouldSave: false }
|
|
28
|
+
: explicitTimezone
|
|
29
|
+
? { id: explicitTimezone, shouldSave: true }
|
|
30
|
+
: { id: undefined, shouldSave: false };
|
|
31
|
+
const exportTimezoneId = initialSelection.shouldSave ? initialSelection.id : undefined;
|
|
32
|
+
const defaultResolvedTimezone = isWidgetSchedule
|
|
33
|
+
? workspaceTimezone
|
|
34
|
+
: configuredTimezoneId
|
|
35
|
+
? resolveTimezoneId(configuredTimezoneId)
|
|
36
|
+
: workspaceTimezone;
|
|
37
|
+
return {
|
|
38
|
+
isTimezoneFeatureEnabled,
|
|
39
|
+
canSelectScheduleTimezone,
|
|
40
|
+
workspaceTimezone,
|
|
41
|
+
effectiveTimezone,
|
|
42
|
+
exportTimezoneId,
|
|
43
|
+
initialSelection,
|
|
44
|
+
defaultResolvedTimezone,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
|
2
|
+
import { type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IWidget } from "@gooddata/sdk-model";
|
|
3
|
+
import { type IScheduleTimezoneSelection } from "../../types.js";
|
|
4
|
+
export interface IUseScheduleTimezoneProps {
|
|
5
|
+
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
6
|
+
widget?: IWidget;
|
|
7
|
+
setEditedAutomation: Dispatch<SetStateAction<IAutomationMetadataObjectDefinition>>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Owns the "Time zone" section state of the scheduled-email dialog.
|
|
11
|
+
*
|
|
12
|
+
* The selection (see {@link IScheduleTimezoneSelection}) decides what is baked into the export
|
|
13
|
+
* definitions: backend-derivable values are displayed but not saved, everything else stores the
|
|
14
|
+
* concrete timezone.
|
|
15
|
+
* Widget schedules always show a concrete resolved timezone (no Default option); dashboard
|
|
16
|
+
* schedules offer the Default option. The cron `schedule.timezone` is a different concept (when
|
|
17
|
+
* the schedule fires) and is never touched here.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useScheduleTimezone({ scheduledExportToEdit, widget, setEditedAutomation }: IUseScheduleTimezoneProps): {
|
|
20
|
+
isTimezoneFeatureEnabled: boolean;
|
|
21
|
+
canSelectScheduleTimezone: boolean;
|
|
22
|
+
scheduleTimezoneSelection: IScheduleTimezoneSelection;
|
|
23
|
+
/**
|
|
24
|
+
* Concrete timezone the dashboard-schedule Default option currently resolves to
|
|
25
|
+
* (display only).
|
|
26
|
+
*/
|
|
27
|
+
defaultResolvedTimezone: string | undefined;
|
|
28
|
+
onScheduleTimezoneChange: (timezoneId: string | undefined) => void;
|
|
29
|
+
/**
|
|
30
|
+
* True when the edited schedule cannot behave correctly as stored (widget schedule
|
|
31
|
+
* missing a dashboard-scoped timezone); feeds the apply-current-state confirmation.
|
|
32
|
+
*/
|
|
33
|
+
scheduleTimezoneIsStale: boolean;
|
|
34
|
+
applyCurrentScheduleTimezone: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Live value for export definitions created after the dialog opened (attachment changes).
|
|
37
|
+
* Active when the section is interactive, and also when an edited schedule carries a
|
|
38
|
+
* stored timezone while the section is hidden — new definitions must then inherit the
|
|
39
|
+
* stored value instead of the store-derived default.
|
|
40
|
+
*/
|
|
41
|
+
scheduleTimezone: {
|
|
42
|
+
active: boolean;
|
|
43
|
+
timezoneId: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type ScheduleTimezoneState = ReturnType<typeof useScheduleTimezone>;
|
|
47
|
+
//# sourceMappingURL=useScheduleTimezone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScheduleTimezone.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleTimezone.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAyB,MAAM,OAAO,CAAC;AAElF,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAIjE,MAAM,WAAW,yBAAyB;IACtC,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;CACtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,qBAAqB,EACrB,MAAM,EACN,mBAAmB,EACtB,EAAE,yBAAyB;;;;IAiEpB;;;OAGG;;;IAGH;;;OAGG;;;IAGH;;;;;OAKG;;;;;EAMV;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
import { getExportDefinitionsTimezone, withExportDefinitionsTimezone, } from "../../state/exportDefinitions.js";
|
|
4
|
+
import { useExportTimezones } from "./useExportTimezones.js";
|
|
5
|
+
/**
|
|
6
|
+
* Owns the "Time zone" section state of the scheduled-email dialog.
|
|
7
|
+
*
|
|
8
|
+
* The selection (see {@link IScheduleTimezoneSelection}) decides what is baked into the export
|
|
9
|
+
* definitions: backend-derivable values are displayed but not saved, everything else stores the
|
|
10
|
+
* concrete timezone.
|
|
11
|
+
* Widget schedules always show a concrete resolved timezone (no Default option); dashboard
|
|
12
|
+
* schedules offer the Default option. The cron `schedule.timezone` is a different concept (when
|
|
13
|
+
* the schedule fires) and is never touched here.
|
|
14
|
+
*/
|
|
15
|
+
export function useScheduleTimezone({ scheduledExportToEdit, widget, setEditedAutomation, }) {
|
|
16
|
+
const isWidget = !!widget;
|
|
17
|
+
const { isTimezoneFeatureEnabled, canSelectScheduleTimezone, initialSelection, defaultResolvedTimezone } = useExportTimezones(isWidget);
|
|
18
|
+
const storedTimezoneId = getExportDefinitionsTimezone(scheduledExportToEdit);
|
|
19
|
+
const [selection, setSelection] = useState(() => {
|
|
20
|
+
if (!scheduledExportToEdit) {
|
|
21
|
+
return initialSelection;
|
|
22
|
+
}
|
|
23
|
+
if (storedTimezoneId) {
|
|
24
|
+
return { id: storedTimezoneId, shouldSave: true };
|
|
25
|
+
}
|
|
26
|
+
// an edited schedule without a stored timezone: widget schedules still present the
|
|
27
|
+
// currently resolved timezone (they have no Default), dashboard schedules sit at Default
|
|
28
|
+
return isWidget ? initialSelection : { id: undefined, shouldSave: false };
|
|
29
|
+
});
|
|
30
|
+
// A widget schedule must carry any dashboard-scoped timezone in its definitions (the backend
|
|
31
|
+
// cannot derive it). An edited widget schedule without a stored timezone while a
|
|
32
|
+
// dashboard-scoped one is effective is therefore structurally stale — same category as
|
|
33
|
+
// filters that no longer exist on the dashboard — and is repaired through the
|
|
34
|
+
// apply-current-state confirmation flow, never silently. Deliberately not gated by the
|
|
35
|
+
// section's visibility: the repair matters even when the dashboard forbids the view-mode
|
|
36
|
+
// override and the dialog shows no Time zone section.
|
|
37
|
+
const scheduleTimezoneIsStale = isTimezoneFeatureEnabled &&
|
|
38
|
+
isWidget &&
|
|
39
|
+
!!scheduledExportToEdit &&
|
|
40
|
+
!storedTimezoneId &&
|
|
41
|
+
initialSelection.shouldSave &&
|
|
42
|
+
!!initialSelection.id;
|
|
43
|
+
// Both handlers are published on the actions context, so they hold their identity across
|
|
44
|
+
// draft edits; they depend on the selection's primitive fields because `initialSelection`
|
|
45
|
+
// is rebuilt on every render.
|
|
46
|
+
const { id: initialSelectionId, shouldSave: initialSelectionShouldSave } = initialSelection;
|
|
47
|
+
const applyCurrentScheduleTimezone = useCallback(() => {
|
|
48
|
+
if (!scheduleTimezoneIsStale) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
setSelection({ id: initialSelectionId, shouldSave: initialSelectionShouldSave });
|
|
52
|
+
setEditedAutomation((s) => withExportDefinitionsTimezone(s, initialSelectionId));
|
|
53
|
+
}, [scheduleTimezoneIsStale, initialSelectionId, initialSelectionShouldSave, setEditedAutomation]);
|
|
54
|
+
const onScheduleTimezoneChange = useCallback((timezoneId) => {
|
|
55
|
+
const nextSelection = timezoneId === undefined
|
|
56
|
+
? { id: undefined, shouldSave: false }
|
|
57
|
+
: { id: timezoneId, shouldSave: true };
|
|
58
|
+
setSelection(nextSelection);
|
|
59
|
+
if (canSelectScheduleTimezone) {
|
|
60
|
+
setEditedAutomation((s) => withExportDefinitionsTimezone(s, nextSelection.id));
|
|
61
|
+
}
|
|
62
|
+
}, [canSelectScheduleTimezone, setEditedAutomation]);
|
|
63
|
+
return {
|
|
64
|
+
isTimezoneFeatureEnabled,
|
|
65
|
+
canSelectScheduleTimezone,
|
|
66
|
+
scheduleTimezoneSelection: selection,
|
|
67
|
+
/**
|
|
68
|
+
* Concrete timezone the dashboard-schedule Default option currently resolves to
|
|
69
|
+
* (display only).
|
|
70
|
+
*/
|
|
71
|
+
defaultResolvedTimezone,
|
|
72
|
+
onScheduleTimezoneChange,
|
|
73
|
+
/**
|
|
74
|
+
* True when the edited schedule cannot behave correctly as stored (widget schedule
|
|
75
|
+
* missing a dashboard-scoped timezone); feeds the apply-current-state confirmation.
|
|
76
|
+
*/
|
|
77
|
+
scheduleTimezoneIsStale,
|
|
78
|
+
applyCurrentScheduleTimezone,
|
|
79
|
+
/**
|
|
80
|
+
* Live value for export definitions created after the dialog opened (attachment changes).
|
|
81
|
+
* Active when the section is interactive, and also when an edited schedule carries a
|
|
82
|
+
* stored timezone while the section is hidden — new definitions must then inherit the
|
|
83
|
+
* stored value instead of the store-derived default.
|
|
84
|
+
*/
|
|
85
|
+
scheduleTimezone: {
|
|
86
|
+
active: canSelectScheduleTimezone || !!storedTimezoneId,
|
|
87
|
+
timezoneId: selection.shouldSave ? selection.id : undefined,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogStateProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AA0BhD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAQtF"}
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledEmailDialogStateProvider.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useMemo } from "react";
|
|
|
4
4
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
5
5
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
6
6
|
import { useAutomationFiltersSelect } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
|
|
7
|
+
import { useScheduleTimezone } from "../DefaultScheduledEmailDialog/hooks/useScheduleTimezone.js";
|
|
7
8
|
import { getDefaultPdfPageSize } from "../utils/pdfPageSize.js";
|
|
8
9
|
import { ScheduledExportActionsContextProvider, } from "./ScheduledExportActionsContext.js";
|
|
9
10
|
import { ScheduledExportDataContextProvider, } from "./ScheduledExportDataContext.js";
|
|
@@ -65,6 +66,11 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
65
66
|
parametersByTabForNewAutomation,
|
|
66
67
|
defaultPdfPageSize,
|
|
67
68
|
});
|
|
69
|
+
const scheduleTimezoneState = useScheduleTimezone({
|
|
70
|
+
scheduledExportToEdit,
|
|
71
|
+
widget,
|
|
72
|
+
setEditedAutomation: formState.setEditedAutomation,
|
|
73
|
+
});
|
|
68
74
|
const exportSettings = useScheduledEmailExportSettings({
|
|
69
75
|
editedAutomation: formState.editedAutomation,
|
|
70
76
|
setEditedAutomation: formState.setEditedAutomation,
|
|
@@ -76,6 +82,7 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
76
82
|
effectiveWidgetFilters,
|
|
77
83
|
effectiveWidgetFiltersWithInsight,
|
|
78
84
|
defaultPdfPageSize,
|
|
85
|
+
scheduleTimezone: scheduleTimezoneState.scheduleTimezone,
|
|
79
86
|
});
|
|
80
87
|
const filtersModel = useScheduledEmailFiltersModel({
|
|
81
88
|
setEditedAutomation: formState.setEditedAutomation,
|
|
@@ -103,6 +110,11 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
103
110
|
isTitleValid: formState.isTitleValid,
|
|
104
111
|
isSubjectValid: formState.isSubjectValid,
|
|
105
112
|
isOnMessageValid: formState.isOnMessageValid,
|
|
113
|
+
isTimezoneFeatureEnabled: scheduleTimezoneState.isTimezoneFeatureEnabled,
|
|
114
|
+
canSelectScheduleTimezone: scheduleTimezoneState.canSelectScheduleTimezone,
|
|
115
|
+
scheduleTimezoneSelection: scheduleTimezoneState.scheduleTimezoneSelection,
|
|
116
|
+
defaultResolvedTimezone: scheduleTimezoneState.defaultResolvedTimezone,
|
|
117
|
+
scheduleTimezoneIsStale: scheduleTimezoneState.scheduleTimezoneIsStale,
|
|
106
118
|
}), [
|
|
107
119
|
formState.editedAutomation,
|
|
108
120
|
formState.originalAutomation,
|
|
@@ -111,6 +123,11 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
111
123
|
formState.isTitleValid,
|
|
112
124
|
formState.isSubjectValid,
|
|
113
125
|
formState.isOnMessageValid,
|
|
126
|
+
scheduleTimezoneState.isTimezoneFeatureEnabled,
|
|
127
|
+
scheduleTimezoneState.canSelectScheduleTimezone,
|
|
128
|
+
scheduleTimezoneState.scheduleTimezoneSelection,
|
|
129
|
+
scheduleTimezoneState.defaultResolvedTimezone,
|
|
130
|
+
scheduleTimezoneState.scheduleTimezoneIsStale,
|
|
114
131
|
]);
|
|
115
132
|
const actions = useMemo(() => ({
|
|
116
133
|
setEditedAutomation: formState.setEditedAutomation,
|
|
@@ -128,6 +145,8 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
128
145
|
onCsvSettingsChange: exportSettings.onCsvSettingsChange,
|
|
129
146
|
onCsvRawSettingsChange: exportSettings.onCsvRawSettingsChange,
|
|
130
147
|
onSlidesTemplateIdChange: exportSettings.onSlidesTemplateIdChange,
|
|
148
|
+
onScheduleTimezoneChange: scheduleTimezoneState.onScheduleTimezoneChange,
|
|
149
|
+
applyCurrentScheduleTimezone: scheduleTimezoneState.applyCurrentScheduleTimezone,
|
|
131
150
|
}), [
|
|
132
151
|
formState.setEditedAutomation,
|
|
133
152
|
formState.onTitleChange,
|
|
@@ -144,6 +163,8 @@ function LoadedScheduledEmailDialogState({ children }) {
|
|
|
144
163
|
exportSettings.onCsvSettingsChange,
|
|
145
164
|
exportSettings.onCsvRawSettingsChange,
|
|
146
165
|
exportSettings.onSlidesTemplateIdChange,
|
|
166
|
+
scheduleTimezoneState.onScheduleTimezoneChange,
|
|
167
|
+
scheduleTimezoneState.applyCurrentScheduleTimezone,
|
|
147
168
|
]);
|
|
148
169
|
const data = useMemo(() => ({ defaultUser: formState.defaultUser, defaultRecipient: formState.defaultRecipient }), [formState.defaultUser, formState.defaultRecipient]);
|
|
149
170
|
return (_jsx(ScheduledExportDraftContextProvider, { value: draft, children: _jsx(ScheduledExportActionsContextProvider, { value: actions, children: _jsx(ScheduledExportDataContextProvider, { value: data, children: _jsx(ScheduledExportFiltersContextProvider, { value: filtersModel, children: children }) }) }) }));
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type useScheduleTimezone } from "../DefaultScheduledEmailDialog/hooks/useScheduleTimezone.js";
|
|
1
2
|
import { type useScheduledEmailExportSettings } from "./useScheduledEmailExportSettings.js";
|
|
2
3
|
import { type useScheduledEmailFormState } from "./useScheduledEmailFormState.js";
|
|
3
4
|
/**
|
|
@@ -12,7 +13,7 @@ import { type useScheduledEmailFormState } from "./useScheduledEmailFormState.js
|
|
|
12
13
|
*
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
export type IScheduledExportActionsContextValue = Pick<ReturnType<typeof useScheduledEmailFormState>, "setEditedAutomation" | "onTitleChange" | "onRecurrenceChange" | "onEvaluationModeChange" | "onDestinationChange" | "onRecipientsChange" | "onSubjectChange" | "onMessageChange"> & Pick<ReturnType<typeof useScheduledEmailExportSettings>, "onDashboardAttachmentsChange" | "onWidgetAttachmentsChange" | "onXlsxSettingsChange" | "onPdfSettingsChange" | "onCsvSettingsChange" | "onCsvRawSettingsChange" | "onSlidesTemplateIdChange">;
|
|
16
|
+
export type IScheduledExportActionsContextValue = Pick<ReturnType<typeof useScheduledEmailFormState>, "setEditedAutomation" | "onTitleChange" | "onRecurrenceChange" | "onEvaluationModeChange" | "onDestinationChange" | "onRecipientsChange" | "onSubjectChange" | "onMessageChange"> & Pick<ReturnType<typeof useScheduledEmailExportSettings>, "onDashboardAttachmentsChange" | "onWidgetAttachmentsChange" | "onXlsxSettingsChange" | "onPdfSettingsChange" | "onCsvSettingsChange" | "onCsvRawSettingsChange" | "onSlidesTemplateIdChange"> & Pick<ReturnType<typeof useScheduleTimezone>, "onScheduleTimezoneChange" | "applyCurrentScheduleTimezone">;
|
|
16
17
|
export declare const ScheduledExportActionsContextProvider: import("react").Provider<IScheduledExportActionsContextValue | undefined>;
|
|
17
18
|
/**
|
|
18
19
|
* Reads the scheduled-export dialog's draft mutators.
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduledExportActionsContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportActionsContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAGvG,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mCAAmC,GAAG,IAAI,CAClD,UAAU,CAAC,OAAO,0BAA0B,CAAC,EAC3C,qBAAqB,GACrB,eAAe,GACf,oBAAoB,GACpB,wBAAwB,GACxB,qBAAqB,GACrB,oBAAoB,GACpB,iBAAiB,GACjB,iBAAiB,CACtB,GACG,IAAI,CACA,UAAU,CAAC,OAAO,+BAA+B,CAAC,EAChD,8BAA8B,GAC9B,2BAA2B,GAC3B,sBAAsB,GACtB,qBAAqB,GACrB,qBAAqB,GACrB,wBAAwB,GACxB,0BAA0B,CAC/B,GACD,IAAI,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,EAAE,0BAA0B,GAAG,8BAA8B,CAAC,CAAC;AAO9G,eAAO,MAAM,qCAAqC,2EAAyC,CAAC;AAE5F;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,IAAI,mCAAmC,CAK/E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type useScheduleTimezone } from "../DefaultScheduledEmailDialog/hooks/useScheduleTimezone.js";
|
|
1
2
|
import { type useScheduledEmailFormState } from "./useScheduledEmailFormState.js";
|
|
2
3
|
/**
|
|
3
4
|
* The scheduled-export dialog's edit draft: the automation being edited, the baseline it is
|
|
@@ -5,11 +6,13 @@ import { type useScheduledEmailFormState } from "./useScheduledEmailFormState.js
|
|
|
5
6
|
* flags the form fields report back.
|
|
6
7
|
*
|
|
7
8
|
* Changes on every keystroke; consumers re-render by design. The shape is derived from
|
|
8
|
-
* `useScheduledEmailFormState`, which owns these values
|
|
9
|
+
* `useScheduledEmailFormState`, which owns these values, and `useScheduleTimezone`, which owns the
|
|
10
|
+
* "Time zone" section's view state (a timezone pick also edits the draft's export definitions, so
|
|
11
|
+
* the selection changes together with the draft).
|
|
9
12
|
*
|
|
10
13
|
* @internal
|
|
11
14
|
*/
|
|
12
|
-
export type IScheduledExportDraftContextValue = Pick<ReturnType<typeof useScheduledEmailFormState>, "editedAutomation" | "originalAutomation" | "startDate" | "isCronValid" | "isTitleValid" | "isSubjectValid" | "isOnMessageValid">;
|
|
15
|
+
export type IScheduledExportDraftContextValue = Pick<ReturnType<typeof useScheduledEmailFormState>, "editedAutomation" | "originalAutomation" | "startDate" | "isCronValid" | "isTitleValid" | "isSubjectValid" | "isOnMessageValid"> & Pick<ReturnType<typeof useScheduleTimezone>, "isTimezoneFeatureEnabled" | "canSelectScheduleTimezone" | "scheduleTimezoneSelection" | "defaultResolvedTimezone" | "scheduleTimezoneIsStale">;
|
|
13
16
|
export declare const ScheduledExportDraftContextProvider: import("react").Provider<IScheduledExportDraftContextValue | undefined>;
|
|
14
17
|
/**
|
|
15
18
|
* Reads the scheduled-export dialog's edit draft.
|
package/esm/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledExportDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduledExportDraftContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/ScheduledExportDraftContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAGvG,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAChD,UAAU,CAAC,OAAO,0BAA0B,CAAC,EAC3C,kBAAkB,GAClB,oBAAoB,GACpB,WAAW,GACX,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,kBAAkB,CACvB,GACG,IAAI,CACA,UAAU,CAAC,OAAO,mBAAmB,CAAC,EACpC,0BAA0B,GAC1B,2BAA2B,GAC3B,2BAA2B,GAC3B,yBAAyB,GACzB,yBAAyB,CAC9B,CAAC;AAKN,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,IAAI,iCAAiC,CAK3E"}
|
|
@@ -5,15 +5,26 @@ import { type DashboardAttachmentType, type FilterContextItem, type IAutomationM
|
|
|
5
5
|
* a rebuild from zero definitions — see `latestParametersWireRef`.
|
|
6
6
|
*/
|
|
7
7
|
export declare function withRebuiltExportDefinitions(automation: IAutomationMetadataObjectDefinition, exportDefinitions: NonNullable<IAutomationMetadataObjectDefinition["exportDefinitions"]>, parametersByTab: Record<string, IDashboardExportParameter[]> | undefined): IAutomationMetadataObjectDefinition;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Applies the export-content timezone to every export definition of the automation. Undefined
|
|
10
|
+
* removes the timezone so the backend derives it at run time from the stored dashboard.
|
|
11
|
+
*/
|
|
12
|
+
export declare function withExportDefinitionsTimezone(automation: IAutomationMetadataObjectDefinition, timezoneId: string | undefined): IAutomationMetadataObjectDefinition;
|
|
13
|
+
/**
|
|
14
|
+
* The export-content timezone stored with the automation, read from its export definitions.
|
|
15
|
+
* All definitions of one automation carry the same value, so the first one is authoritative.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getExportDefinitionsTimezone(automation: IAutomationMetadataObjectDefinition | undefined): string | undefined;
|
|
18
|
+
export declare function newDashboardExportDefinitionMetadataObjectDefinition({ dashboardId, dashboardTitle, dashboardFilters, filtersByTab, format, templateId, timezoneId }: {
|
|
9
19
|
dashboardId: string;
|
|
10
20
|
dashboardTitle: string;
|
|
11
21
|
dashboardFilters?: FilterContextItem[];
|
|
12
22
|
filtersByTab?: Record<string, FilterContextItem[]>;
|
|
13
23
|
format: DashboardAttachmentType;
|
|
14
24
|
templateId?: string;
|
|
25
|
+
timezoneId?: string;
|
|
15
26
|
}): IExportDefinitionMetadataObjectDefinition;
|
|
16
|
-
export declare function newWidgetExportDefinitionMetadataObjectDefinition({ insight, widget, dashboardId, format, widgetFilters, widgetFiltersWithInsight, dashboardFilters, defaultPdfPageSize, defaultCsvDelimiter }: {
|
|
27
|
+
export declare function newWidgetExportDefinitionMetadataObjectDefinition({ insight, widget, dashboardId, format, widgetFilters, widgetFiltersWithInsight, dashboardFilters, defaultPdfPageSize, defaultCsvDelimiter, timezoneId }: {
|
|
17
28
|
insight: IInsight;
|
|
18
29
|
widget: IWidget;
|
|
19
30
|
dashboardId: string;
|
|
@@ -23,5 +34,11 @@ export declare function newWidgetExportDefinitionMetadataObjectDefinition({ insi
|
|
|
23
34
|
dashboardFilters?: FilterContextItem[];
|
|
24
35
|
defaultPdfPageSize?: IExportDefinitionVisualizationObjectSettings["pageSize"];
|
|
25
36
|
defaultCsvDelimiter?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Effective dashboard timezone baked into the definition. Unlike dashboard export definitions,
|
|
39
|
+
* widget exports always carry it when defined — the backend does not load the dashboard object
|
|
40
|
+
* for widget exports, so it has no access to the dashboard's timezone configuration.
|
|
41
|
+
*/
|
|
42
|
+
timezoneId?: string;
|
|
26
43
|
}): IExportDefinitionMetadataObjectDefinition;
|
|
27
44
|
//# sourceMappingURL=exportDefinitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportDefinitions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/exportDefinitions.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,yCAAyC,EAC9C,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAE5B,MAAM,qBAAqB,CAAC;AAI7B;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,mCAAmC,EAC/C,iBAAiB,EAAE,WAAW,CAAC,mCAAmC,CAAC,mBAAmB,CAAC,CAAC,EACxF,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,GACzE,mCAAmC,CAGrC;AAED,wBAAgB,oDAAoD,CAAC,EACjE,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,UAAU,EACb,EAAE;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnD,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,yCAAyC,
|
|
1
|
+
{"version":3,"file":"exportDefinitions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/exportDefinitions.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,yCAAyC,EAC9C,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAE5B,MAAM,qBAAqB,CAAC;AAI7B;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,mCAAmC,EAC/C,iBAAiB,EAAE,WAAW,CAAC,mCAAmC,CAAC,mBAAmB,CAAC,CAAC,EACxF,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,GACzE,mCAAmC,CAGrC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CACzC,UAAU,EAAE,mCAAmC,EAC/C,UAAU,EAAE,MAAM,GAAG,SAAS,GAC/B,mCAAmC,CAkBrC;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,mCAAmC,GAAG,SAAS,GAC5D,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,oDAAoD,CAAC,EACjE,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,UAAU,EACb,EAAE;IACC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACnD,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,yCAAyC,CA0B5C;AAED,wBAAgB,iDAAiD,CAAC,EAC9D,OAAO,EACP,MAAM,EACN,WAAW,EACX,MAAM,EACN,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACb,EAAE;IACC,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,yCAAyC,CAkE5C"}
|