@gooddata/sdk-ui-dashboard 11.53.0-alpha.6 → 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 +29 -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
|
@@ -10,7 +10,38 @@ export function withRebuiltExportDefinitions(automation, exportDefinitions, para
|
|
|
10
10
|
const next = { ...automation, exportDefinitions };
|
|
11
11
|
return parametersByTab ? setExportParametersByTab(next, parametersByTab) : next;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Applies the export-content timezone to every export definition of the automation. Undefined
|
|
15
|
+
* removes the timezone so the backend derives it at run time from the stored dashboard.
|
|
16
|
+
*/
|
|
17
|
+
export function withExportDefinitionsTimezone(automation, timezoneId) {
|
|
18
|
+
if (!automation.exportDefinitions?.length) {
|
|
19
|
+
return automation;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
...automation,
|
|
23
|
+
exportDefinitions: automation.exportDefinitions.map((definition) => {
|
|
24
|
+
// a shallow copy mutated in place: rest-destructuring the payload union would lose
|
|
25
|
+
// the member TypeScript correlates with `definition` and force a cast
|
|
26
|
+
const requestPayload = { ...definition.requestPayload };
|
|
27
|
+
if (timezoneId) {
|
|
28
|
+
requestPayload.timezoneId = timezoneId;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
delete requestPayload.timezoneId;
|
|
32
|
+
}
|
|
33
|
+
return { ...definition, requestPayload };
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The export-content timezone stored with the automation, read from its export definitions.
|
|
39
|
+
* All definitions of one automation carry the same value, so the first one is authoritative.
|
|
40
|
+
*/
|
|
41
|
+
export function getExportDefinitionsTimezone(automation) {
|
|
42
|
+
return automation?.exportDefinitions?.[0]?.requestPayload.timezoneId;
|
|
43
|
+
}
|
|
44
|
+
export function newDashboardExportDefinitionMetadataObjectDefinition({ dashboardId, dashboardTitle, dashboardFilters, filtersByTab, format, templateId, timezoneId, }) {
|
|
14
45
|
// Use filtersByTab if provided, otherwise fall back to simple filters
|
|
15
46
|
const filtersObj = filtersByTab
|
|
16
47
|
? { filtersByTab }
|
|
@@ -31,10 +62,11 @@ export function newDashboardExportDefinitionMetadataObjectDefinition({ dashboard
|
|
|
31
62
|
},
|
|
32
63
|
...settingsObj,
|
|
33
64
|
...(templateId ? { templateId } : {}),
|
|
65
|
+
...(timezoneId ? { timezoneId } : {}),
|
|
34
66
|
},
|
|
35
67
|
};
|
|
36
68
|
}
|
|
37
|
-
export function newWidgetExportDefinitionMetadataObjectDefinition({ insight, widget, dashboardId, format, widgetFilters, widgetFiltersWithInsight, dashboardFilters, defaultPdfPageSize, defaultCsvDelimiter, }) {
|
|
69
|
+
export function newWidgetExportDefinitionMetadataObjectDefinition({ insight, widget, dashboardId, format, widgetFilters, widgetFiltersWithInsight, dashboardFilters, defaultPdfPageSize, defaultCsvDelimiter, timezoneId, }) {
|
|
38
70
|
const widgetTitle = widget.title;
|
|
39
71
|
// Determine which filters to use based on format:
|
|
40
72
|
// - CSV: Use widgetFiltersWithInsight (insight filters merged on frontend)
|
|
@@ -90,6 +122,7 @@ export function newWidgetExportDefinitionMetadataObjectDefinition({ insight, wid
|
|
|
90
122
|
...filtersObj,
|
|
91
123
|
},
|
|
92
124
|
...settingsObj,
|
|
125
|
+
...(timezoneId ? { timezoneId } : {}),
|
|
93
126
|
},
|
|
94
127
|
};
|
|
95
128
|
}
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts
CHANGED
|
@@ -11,6 +11,14 @@ export interface IUseScheduledEmailExportSettingsProps {
|
|
|
11
11
|
effectiveWidgetFilters: IFilter[];
|
|
12
12
|
effectiveWidgetFiltersWithInsight: IFilter[];
|
|
13
13
|
defaultPdfPageSize?: IExportDefinitionVisualizationObjectSettings["pageSize"];
|
|
14
|
+
/**
|
|
15
|
+
* Live value of the "Schedule time zone" section. When active, it replaces the store-derived
|
|
16
|
+
* defaults for export definitions created by attachment changes.
|
|
17
|
+
*/
|
|
18
|
+
scheduleTimezone?: {
|
|
19
|
+
active: boolean;
|
|
20
|
+
timezoneId: string | undefined;
|
|
21
|
+
};
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
24
|
* Owns the scheduled export's attachment write path: the per-tab export-parameter wire, which is
|
|
@@ -23,7 +31,7 @@ export interface IUseScheduledEmailExportSettingsProps {
|
|
|
23
31
|
*
|
|
24
32
|
* @internal
|
|
25
33
|
*/
|
|
26
|
-
export declare function useScheduledEmailExportSettings({ editedAutomation, setEditedAutomation, insight, widget, storeFilters, effectiveDashboardFilters, effectiveDashboardFiltersByTab, effectiveWidgetFilters, effectiveWidgetFiltersWithInsight, defaultPdfPageSize }: IUseScheduledEmailExportSettingsProps): {
|
|
34
|
+
export declare function useScheduledEmailExportSettings({ editedAutomation, setEditedAutomation, insight, widget, storeFilters, effectiveDashboardFilters, effectiveDashboardFiltersByTab, effectiveWidgetFilters, effectiveWidgetFiltersWithInsight, defaultPdfPageSize, scheduleTimezone }: IUseScheduledEmailExportSettingsProps): {
|
|
27
35
|
setParametersWire: (wire: Record<string, IDashboardExportParameter[]> | undefined) => void;
|
|
28
36
|
onDashboardAttachmentsChange: (formats: DashboardAttachmentType[]) => void;
|
|
29
37
|
onWidgetAttachmentsChange: (formats: WidgetAttachmentType[]) => void;
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledEmailExportSettings.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAIhF,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAG5B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useScheduledEmailExportSettings.d.ts","sourceRoot":"","sources":["../../../../../src/pres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gSvC"}
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.js
CHANGED
|
@@ -4,6 +4,7 @@ import { invariant } from "ts-invariant";
|
|
|
4
4
|
import { isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, } from "@gooddata/sdk-model";
|
|
5
5
|
import { getAutomationExportParametersByTab, setExportParametersByTab, } from "../../../../_staging/automation/index.js";
|
|
6
6
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
7
|
+
import { useExportTimezones } from "../DefaultScheduledEmailDialog/hooks/useExportTimezones.js";
|
|
7
8
|
import { newDashboardExportDefinitionMetadataObjectDefinition, newWidgetExportDefinitionMetadataObjectDefinition, withRebuiltExportDefinitions, } from "./exportDefinitions.js";
|
|
8
9
|
/**
|
|
9
10
|
* Owns the scheduled export's attachment write path: the per-tab export-parameter wire, which is
|
|
@@ -16,8 +17,12 @@ import { newDashboardExportDefinitionMetadataObjectDefinition, newWidgetExportDe
|
|
|
16
17
|
*
|
|
17
18
|
* @internal
|
|
18
19
|
*/
|
|
19
|
-
export function useScheduledEmailExportSettings({ editedAutomation, setEditedAutomation, insight, widget, storeFilters, effectiveDashboardFilters, effectiveDashboardFiltersByTab, effectiveWidgetFilters, effectiveWidgetFiltersWithInsight, defaultPdfPageSize, }) {
|
|
20
|
+
export function useScheduledEmailExportSettings({ editedAutomation, setEditedAutomation, insight, widget, storeFilters, effectiveDashboardFilters, effectiveDashboardFiltersByTab, effectiveWidgetFilters, effectiveWidgetFiltersWithInsight, defaultPdfPageSize, scheduleTimezone, }) {
|
|
20
21
|
const { dashboardId, dashboardTitle } = useScheduledEmailDialogContext();
|
|
22
|
+
const { exportTimezoneId: defaultExportTimezoneId } = useExportTimezones(!!widget && !!insight);
|
|
23
|
+
// The live "Time zone" section value wins over the store-derived default for definitions
|
|
24
|
+
// created while the dialog is open.
|
|
25
|
+
const exportTimezoneId = scheduleTimezone?.active ? scheduleTimezone.timezoneId : defaultExportTimezoneId;
|
|
21
26
|
// Holds the wire outside the automation so it survives a rebuild from zero export definitions —
|
|
22
27
|
// with no definitions `setExportParametersByTab` has nowhere to store it.
|
|
23
28
|
// Seeded from the stored wire.
|
|
@@ -47,6 +52,7 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
47
52
|
dashboardFilters: storeFilters ? effectiveDashboardFilters : undefined,
|
|
48
53
|
filtersByTab: storeFilters ? effectiveDashboardFiltersByTab : undefined,
|
|
49
54
|
format,
|
|
55
|
+
timezoneId: exportTimezoneId,
|
|
50
56
|
}));
|
|
51
57
|
const updatedExportDefinitions = [...keptExportDefinitions, ...newExportDefinitions];
|
|
52
58
|
return withRebuiltExportDefinitions(s, updatedExportDefinitions, latestParametersWireRef.current);
|
|
@@ -58,6 +64,7 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
58
64
|
storeFilters,
|
|
59
65
|
effectiveDashboardFilters,
|
|
60
66
|
effectiveDashboardFiltersByTab,
|
|
67
|
+
exportTimezoneId,
|
|
61
68
|
]);
|
|
62
69
|
const onWidgetAttachmentsChange = useCallback((formats) => {
|
|
63
70
|
invariant(isWidget, "Widget or insight is missing in scheduling dialog context.");
|
|
@@ -77,6 +84,7 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
77
84
|
widgetFiltersWithInsight: effectiveWidgetFiltersWithInsight,
|
|
78
85
|
dashboardFilters: effectiveDashboardFilters,
|
|
79
86
|
defaultPdfPageSize,
|
|
87
|
+
timezoneId: exportTimezoneId,
|
|
80
88
|
}));
|
|
81
89
|
const updatedExportDefinitions = [...keptExportDefinitions, ...newExportDefinitions];
|
|
82
90
|
return withRebuiltExportDefinitions(s, updatedExportDefinitions, latestParametersWireRef.current);
|
|
@@ -91,6 +99,7 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
91
99
|
effectiveWidgetFiltersWithInsight,
|
|
92
100
|
effectiveDashboardFilters,
|
|
93
101
|
defaultPdfPageSize,
|
|
102
|
+
exportTimezoneId,
|
|
94
103
|
]);
|
|
95
104
|
const onXlsxSettingsChange = useCallback((settings) => {
|
|
96
105
|
setEditedAutomation((s) => ({
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledEmailFormState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useScheduledEmailFormState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAuB7B,MAAM,WAAW,gCAAgC;IAC7C,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,sBAAsB,EAAE,OAAO,EAAE,CAAC;IAClC,iCAAiC,EAAE,OAAO,EAAE,CAAC;IAC7C,6BAA6B,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IACtE,yBAAyB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC3D,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,CAAC;IAChF,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IACzE,qCAAqC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9F,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,CAAC;IACzF,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;CACjF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,8BAA8B,EAC9B,gCAAgC,EAChC,qCAAqC,EACrC,+BAA+B,EAC/B,kBAAkB,EACrB,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;EAsKlC"}
|
|
@@ -5,6 +5,7 @@ import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
|
5
5
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
6
6
|
import { isAutomationTitleValid } from "../../shared/utils/automationTitle.js";
|
|
7
7
|
import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../shared/utils/automationUtils.js";
|
|
8
|
+
import { useExportTimezones } from "../DefaultScheduledEmailDialog/hooks/useExportTimezones.js";
|
|
8
9
|
import { toModifiedISOStringToTimezone, toNormalizedFirstRunAndCron, toNormalizedStartDate, } from "../utils/date.js";
|
|
9
10
|
import { getUserTimezone } from "../utils/timezone.js";
|
|
10
11
|
import { newDashboardExportDefinitionMetadataObjectDefinition, newWidgetExportDefinitionMetadataObjectDefinition, } from "./exportDefinitions.js";
|
|
@@ -25,6 +26,11 @@ import { newDashboardExportDefinitionMetadataObjectDefinition, newWidgetExportDe
|
|
|
25
26
|
export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insight, notificationChannels, externalRecipientOverride, effectiveWidgetFilters, effectiveWidgetFiltersWithInsight, effectiveVisibleWidgetFilters, effectiveDashboardFilters, effectiveDashboardFiltersByTab, effectiveVisibleDashboardFilters, effectiveVisibleDashboardFiltersByTab, parametersByTabForNewAutomation, defaultPdfPageSize, }) {
|
|
26
27
|
const { timezone, currentUser, widgetLocalIdToTabIdMap: widgetTabMap } = useAutomationsContext();
|
|
27
28
|
const { dashboardId, dashboardTitle } = useScheduledEmailDialogContext();
|
|
29
|
+
// Baked into new export definitions when the backend cannot derive the value at run time:
|
|
30
|
+
// override/browser-resolution for dashboard schedules, additionally the dashboard's stored
|
|
31
|
+
// configuration for widget schedules (the backend has only workspace/organization settings
|
|
32
|
+
// available for those).
|
|
33
|
+
const { exportTimezoneId } = useExportTimezones(!!widget && !!insight);
|
|
28
34
|
const isWidget = !!widget && !!insight;
|
|
29
35
|
// Determine target tab ID if widget is present
|
|
30
36
|
const targetTabId = widget?.localIdentifier ? widgetTabMap[widget.localIdentifier] : undefined;
|
|
@@ -50,6 +56,7 @@ export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insi
|
|
|
50
56
|
evaluationMode: "PER_RECIPIENT",
|
|
51
57
|
targetTabId,
|
|
52
58
|
parametersByTab: parametersByTabForNewAutomation,
|
|
59
|
+
exportTimezoneId,
|
|
53
60
|
}
|
|
54
61
|
: {
|
|
55
62
|
timezone,
|
|
@@ -64,6 +71,7 @@ export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insi
|
|
|
64
71
|
defaultPdfPageSize,
|
|
65
72
|
evaluationMode: "PER_RECIPIENT",
|
|
66
73
|
parametersByTab: parametersByTabForNewAutomation,
|
|
74
|
+
exportTimezoneId,
|
|
67
75
|
}));
|
|
68
76
|
const [originalAutomation] = useState(editedAutomation);
|
|
69
77
|
const startDate = toNormalizedStartDate(editedAutomation.schedule?.firstRun, editedAutomation.schedule?.timezone);
|
|
@@ -82,7 +90,9 @@ export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insi
|
|
|
82
90
|
schedule: {
|
|
83
91
|
...s.schedule,
|
|
84
92
|
cron: cronExpression,
|
|
85
|
-
|
|
93
|
+
// the schedule's own timezone wins so that editing an existing schedule keeps
|
|
94
|
+
// interpreting the picked date in the timezone it was created with
|
|
95
|
+
firstRun: toModifiedISOStringToTimezone(startDate ?? new Date(), s.schedule?.timezone ?? timezone).iso,
|
|
86
96
|
},
|
|
87
97
|
}));
|
|
88
98
|
}, [timezone]);
|
|
@@ -144,7 +154,7 @@ export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insi
|
|
|
144
154
|
startDate,
|
|
145
155
|
};
|
|
146
156
|
}
|
|
147
|
-
function newAutomationMetadataObjectDefinition({ timezone, dashboardId, notificationChannel, title, insight, widget, recipient, dashboardFilters, filtersByTab, widgetFilters, widgetFiltersWithInsight, visibleFiltersMetadata, visibleFiltersByTab, defaultPdfPageSize, evaluationMode, targetTabId, parametersByTab, }) {
|
|
157
|
+
function newAutomationMetadataObjectDefinition({ timezone, dashboardId, notificationChannel, title, insight, widget, recipient, dashboardFilters, filtersByTab, widgetFilters, widgetFiltersWithInsight, visibleFiltersMetadata, visibleFiltersByTab, defaultPdfPageSize, evaluationMode, targetTabId, parametersByTab, exportTimezoneId, }) {
|
|
148
158
|
const { firstRun, cron } = toNormalizedFirstRunAndCron(timezone);
|
|
149
159
|
const exportDefinition = widget && insight
|
|
150
160
|
? newWidgetExportDefinitionMetadataObjectDefinition({
|
|
@@ -156,6 +166,7 @@ function newAutomationMetadataObjectDefinition({ timezone, dashboardId, notifica
|
|
|
156
166
|
widgetFiltersWithInsight,
|
|
157
167
|
dashboardFilters,
|
|
158
168
|
defaultPdfPageSize,
|
|
169
|
+
timezoneId: exportTimezoneId,
|
|
159
170
|
})
|
|
160
171
|
: newDashboardExportDefinitionMetadataObjectDefinition({
|
|
161
172
|
dashboardId,
|
|
@@ -163,6 +174,7 @@ function newAutomationMetadataObjectDefinition({ timezone, dashboardId, notifica
|
|
|
163
174
|
dashboardFilters,
|
|
164
175
|
filtersByTab,
|
|
165
176
|
format: "PDF",
|
|
177
|
+
timezoneId: exportTimezoneId,
|
|
166
178
|
});
|
|
167
179
|
let metadataObj = visibleFiltersMetadata || visibleFiltersByTab
|
|
168
180
|
? {
|
|
@@ -218,6 +218,61 @@ export interface IScheduledEmailDialogFiltersProps extends IAutomationDialogFilt
|
|
|
218
218
|
*/
|
|
219
219
|
parametersEnabled?: boolean;
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* A timezone selection of the schedule dialog's "Time zone" section.
|
|
223
|
+
*
|
|
224
|
+
* `shouldSave` decides whether the value is baked into the export definitions. Values the backend
|
|
225
|
+
* derives itself at run time are displayed but not saved: the Default option of a dashboard
|
|
226
|
+
* schedule (id undefined; persisted dashboard configuration → settings hierarchy) and a widget
|
|
227
|
+
* schedule showing the settings-hierarchy resolution (concrete id). Everything the backend cannot
|
|
228
|
+
* derive is saved: the view-mode override and browser resolution always, the dashboard's stored
|
|
229
|
+
* configuration for widget schedules, and any timezone picked manually in the dropdown.
|
|
230
|
+
*
|
|
231
|
+
* @alpha
|
|
232
|
+
*/
|
|
233
|
+
export interface IScheduleTimezoneSelection {
|
|
234
|
+
/**
|
|
235
|
+
* Selected timezone (IANA ID); undefined represents the Default option.
|
|
236
|
+
*/
|
|
237
|
+
id: string | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Whether the selection is baked into the export definitions or left for the backend to
|
|
240
|
+
* derive at run time.
|
|
241
|
+
*/
|
|
242
|
+
shouldSave: boolean;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Props of the default scheduled email dialog's "Time zone" section (the export-content timezone
|
|
246
|
+
* picker on the General tab; unrelated to the schedule cron timezone).
|
|
247
|
+
*
|
|
248
|
+
* @alpha
|
|
249
|
+
*/
|
|
250
|
+
export interface IScheduledEmailDialogTimezoneProps {
|
|
251
|
+
/**
|
|
252
|
+
* Whether the dialog schedules a single-widget export. Widget schedules always show a concrete
|
|
253
|
+
* resolved timezone — they have no Default option, because the backend cannot derive anything
|
|
254
|
+
* dashboard-scoped for them.
|
|
255
|
+
*/
|
|
256
|
+
isWidget: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Current selection; an undefined id is the Default option (dashboard schedules only).
|
|
259
|
+
*/
|
|
260
|
+
selection: IScheduleTimezoneSelection;
|
|
261
|
+
/**
|
|
262
|
+
* Concrete timezone the Default option currently resolves to (display only).
|
|
263
|
+
*/
|
|
264
|
+
defaultResolvedTimezone: string | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* Called with the picked timezone; undefined selects the Default option.
|
|
267
|
+
*/
|
|
268
|
+
onTimezoneChange: (timezoneId: string | undefined) => void;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* The exact props the default dialog renders its "Time zone" section with.
|
|
272
|
+
*
|
|
273
|
+
* @alpha
|
|
274
|
+
*/
|
|
275
|
+
export type ScheduledEmailDialogTimezoneDefaultProps = IScheduledEmailDialogTimezoneProps;
|
|
221
276
|
/**
|
|
222
277
|
* Section-level overrides of the default scheduled email dialog.
|
|
223
278
|
*
|
|
@@ -244,6 +299,15 @@ export interface IScheduledEmailDialogSlots {
|
|
|
244
299
|
* passed the current filters — see {@link IScheduledEmailDialogFiltersProps}.
|
|
245
300
|
*/
|
|
246
301
|
Filters?: ComponentType<ISlotProps<IScheduledEmailDialogFiltersProps>>;
|
|
302
|
+
/**
|
|
303
|
+
* Wraps or replaces the "Time zone" section on the General tab. Must have a stable reference
|
|
304
|
+
* identity — see {@link ISlotProps}.
|
|
305
|
+
*
|
|
306
|
+
* Renders only when the dialog shows the section at all: the dashboard-timezone feature is
|
|
307
|
+
* enabled and the dashboard allows the view-mode timezone override. When the section is
|
|
308
|
+
* hidden, the slot is not rendered either.
|
|
309
|
+
*/
|
|
310
|
+
Timezone?: ComponentType<ISlotProps<ScheduledEmailDialogTimezoneDefaultProps>>;
|
|
247
311
|
}
|
|
248
312
|
/**
|
|
249
313
|
* Props of {@link DefaultScheduledEmailDialog}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAClB,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAElD;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EA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AAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAErE;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,sCAAsC,CAAC,CAAC,CAAC;IAE3E;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAClB,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAElD;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F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BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;OAKG;IACH,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,aAAa,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACrD;AAMD;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,aAAa,CAAC,0BAA0B,CAAC,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,mDAAmD,GAAG,aAAa,CAAC;IAC5E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6CAA6C,GACrD,aAAa,CAAC,oCAAoC,CAAC,CAAC"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
interface IApplyCurrentFiltersConfirmDialogProps {
|
|
2
2
|
automationType: "alert" | "schedule";
|
|
3
|
+
/**
|
|
4
|
+
* Whether the stored schedule timezone no longer matches the dashboard; picks the
|
|
5
|
+
* timezone-specific warning wording (schedules only). When both filters and the timezone
|
|
6
|
+
* diverged, the combined wording is used.
|
|
7
|
+
*/
|
|
8
|
+
timezoneChanged?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the stored filters/parameters no longer match the dashboard. Defaults to true so
|
|
11
|
+
* existing callers keep the filters wording.
|
|
12
|
+
*/
|
|
13
|
+
filtersChanged?: boolean;
|
|
3
14
|
onCancel: () => void;
|
|
4
15
|
onEdit: () => void;
|
|
5
16
|
}
|
|
6
|
-
export declare function ApplyCurrentFiltersConfirmDialog({ automationType, onCancel, onEdit }: IApplyCurrentFiltersConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ApplyCurrentFiltersConfirmDialog({ automationType, timezoneChanged, filtersChanged, onCancel, onEdit }: IApplyCurrentFiltersConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
7
18
|
export {};
|
|
8
19
|
//# sourceMappingURL=ApplyLatestFiltersConfirmDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplyLatestFiltersConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.tsx"],"names":[],"mappings":"AAQA,UAAU,sCAAsC;IAC5C,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"ApplyLatestFiltersConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.tsx"],"names":[],"mappings":"AAQA,UAAU,sCAAsC;IAC5C,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC;IACrC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAuBD,wBAAgB,gCAAgC,CAAC,EAC7C,cAAc,EACd,eAAuB,EACvB,cAAqB,EACrB,QAAQ,EACR,MAAM,EACT,EAAE,sCAAsC,2CA6BxC"}
|
|
@@ -6,10 +6,25 @@ const messages = defineMessages({
|
|
|
6
6
|
submit: { id: "dialogs.automation.applyCurrentFilters.confirm.submit" },
|
|
7
7
|
alertText: { id: "dialogs.automation.applyCurrentFilters.alert.confirm" },
|
|
8
8
|
scheduleText: { id: "dialogs.automation.applyCurrentFilters.schedule.confirm" },
|
|
9
|
+
scheduleTimezoneText: { id: "dialogs.automation.applyCurrentFilters.schedule.timezone.confirm" },
|
|
10
|
+
scheduleFiltersAndTimezoneText: {
|
|
11
|
+
id: "dialogs.automation.applyCurrentFilters.schedule.filtersAndTimezone.confirm",
|
|
12
|
+
},
|
|
9
13
|
});
|
|
10
|
-
|
|
14
|
+
function getScheduleMessageId(filtersChanged, timezoneChanged) {
|
|
15
|
+
if (filtersChanged && timezoneChanged) {
|
|
16
|
+
return messages.scheduleFiltersAndTimezoneText.id;
|
|
17
|
+
}
|
|
18
|
+
if (timezoneChanged) {
|
|
19
|
+
return messages.scheduleTimezoneText.id;
|
|
20
|
+
}
|
|
21
|
+
return messages.scheduleText.id;
|
|
22
|
+
}
|
|
23
|
+
export function ApplyCurrentFiltersConfirmDialog({ automationType, timezoneChanged = false, filtersChanged = true, onCancel, onEdit, }) {
|
|
11
24
|
const intl = useIntl();
|
|
12
|
-
return (_jsx(ConfirmDialog, { displayCloseButton: true, isPositive: true, headline: intl.formatMessage(messages.title), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage(messages.submit), onSubmit: onEdit, onClose: onCancel, onCancel: onCancel, className: "s-automation-apply-current-filters-dialog", children: _jsx(Message, { type: "warning", children: _jsx(FormattedMessage, { id: automationType === "alert"
|
|
25
|
+
return (_jsx(ConfirmDialog, { displayCloseButton: true, isPositive: true, headline: intl.formatMessage(messages.title), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage(messages.submit), onSubmit: onEdit, onClose: onCancel, onCancel: onCancel, className: "s-automation-apply-current-filters-dialog", children: _jsx(Message, { type: "warning", children: _jsx(FormattedMessage, { id: automationType === "alert"
|
|
26
|
+
? messages.alertText.id
|
|
27
|
+
: getScheduleMessageId(filtersChanged, timezoneChanged), values: {
|
|
13
28
|
b: (chunks) => _jsx("strong", { children: chunks }),
|
|
14
29
|
} }) }) }));
|
|
15
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardSettingsDialog.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAoD,MAAM,OAAO,CAAC;AA2C5F,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAGhE;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,EAC3C,SAAS,EACT,OAAO,EACP,QAAQ,EACX,EAAE,6BAA6B,GAAG,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"DefaultDashboardSettingsDialog.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAoD,MAAM,OAAO,CAAC;AA2C5F,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAGhE;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,EAC3C,SAAS,EACT,OAAO,EACP,QAAQ,EACX,EAAE,6BAA6B,GAAG,YAAY,GAAG,IAAI,CAqRrD"}
|
|
@@ -125,7 +125,9 @@ export function DefaultDashboardSettingsDialog({ isVisible, onApply, onCancel /*
|
|
|
125
125
|
id: "settingsDashboardDialog.section.timezone.allowUserOverride.toggle",
|
|
126
126
|
}), tooltip: intl.formatMessage({
|
|
127
127
|
id: "settingsDashboardDialog.section.timezone.allowUserOverride.toggle.tooltip",
|
|
128
|
-
}), isChecked: currentData.timezoneConfig?.allowUserOverrideInViewMode ??
|
|
128
|
+
}), isChecked: currentData.timezoneConfig?.allowUserOverrideInViewMode ??
|
|
129
|
+
settings.enableTimezoneChange ??
|
|
130
|
+
false, onChange: (isChecked) => {
|
|
129
131
|
setCurrentData({
|
|
130
132
|
...currentData,
|
|
131
133
|
timezoneConfig: normalizeDashboardTimezoneConfig({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimezoneOption.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboardSettingsDialog/TimezoneOption.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAoB,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"TimezoneOption.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboardSettingsDialog/TimezoneOption.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAoB,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAQtF,UAAU,oBAAoB;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;IACnB,cAAc,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACrD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACtD;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAmEhG"}
|
|
@@ -3,10 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { BROWSER_DETECTED } from "@gooddata/sdk-model";
|
|
6
|
-
import {
|
|
7
|
-
const BUBBLE_ALIGN_POINTS = [{ align: "bc tl" }];
|
|
6
|
+
import { TimezoneSelect, UiTooltip, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
8
7
|
export function TimezoneOption({ label, tooltip, timezoneConfig, onChange }) {
|
|
9
8
|
const intl = useIntl();
|
|
9
|
+
const helpTooltipId = useIdPrefixed("timezone-help-tooltip");
|
|
10
10
|
const specialItems = useMemo(() => {
|
|
11
11
|
const workspaceItemLabel = intl.formatMessage({
|
|
12
12
|
id: "settingsDashboardDialog.section.timezone.defaultTimezone.workspace",
|
|
@@ -26,10 +26,9 @@ export function TimezoneOption({ label, tooltip, timezoneConfig, onChange }) {
|
|
|
26
26
|
];
|
|
27
27
|
}, [intl]);
|
|
28
28
|
return (_jsxs("div", { className: "configuration-category-item", children: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
] }), _jsx(TimezoneSelect, { value: timezoneConfig?.timezoneId, showTooltip: true, onChange: onChange, specialItems: specialItems, searchPlaceholder: intl.formatMessage({
|
|
29
|
+
_jsx("span", { className: "input-label-text", children: label }), _jsx(UiTooltip, { id: helpTooltipId, inlineAnchor: true, anchor: _jsx("span", { tabIndex: 0, "aria-label": intl.formatMessage({
|
|
30
|
+
id: "settingsDashboardDialog.section.timezone.defaultTimezone.help",
|
|
31
|
+
}), "aria-describedby": helpTooltipId, className: "gd-icon-circle-question gd-filter-configuration__help-icon configuration-category-item-tooltip-icon" }), content: _jsx("div", { className: "gd-filter-configuration__help-tooltip", children: tooltip }), triggerBy: ["hover", "focus"], arrowPlacement: "left", optimalPlacement: true, width: 200 }), _jsx(TimezoneSelect, { value: timezoneConfig?.timezoneId, showTooltip: true, onChange: onChange, specialItems: specialItems, searchPlaceholder: intl.formatMessage({
|
|
33
32
|
id: "settingsDashboardDialog.section.timezone.select.searchPlaceholder",
|
|
34
33
|
}), ariaLabel: intl.formatMessage({
|
|
35
34
|
id: "settingsDashboardDialog.section.timezone.defaultTimezone",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExecutionTimestampMessage.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/filterBar/useExecutionTimestampMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useExecutionTimestampMessage.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/filterBar/useExecutionTimestampMessage.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,4BAA4B;;;;CAsBxC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { changeIgnoreExecutionTimestamp } from "../../../model/commands/dashboard.js";
|
|
4
4
|
import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
5
5
|
import { selectLocale, selectTimezone } from "../../../model/store/config/configSelectors.js";
|
|
6
|
+
import { selectEffectiveDashboardTimezone } from "../../../model/store/meta/metaSelectors.js";
|
|
6
7
|
import { selectExecutionTimestamp } from "../../../model/store/ui/uiSelectors.js";
|
|
7
8
|
/**
|
|
8
9
|
* Formats a date using the provided locale and timezone from backend settings,
|
|
@@ -35,7 +36,11 @@ function formatDate(isoString, locale, timezone) {
|
|
|
35
36
|
}
|
|
36
37
|
export const useExecutionTimestampMessage = () => {
|
|
37
38
|
const locale = useDashboardSelector(selectLocale);
|
|
38
|
-
|
|
39
|
+
// the custom dashboard timezone (view-mode override or dashboard configuration) wins over
|
|
40
|
+
// the workspace setting so the displayed timestamp matches the rest of the dashboard
|
|
41
|
+
const workspaceTimezone = useDashboardSelector(selectTimezone);
|
|
42
|
+
const customTimezone = useDashboardSelector(selectEffectiveDashboardTimezone);
|
|
43
|
+
const timezone = customTimezone ?? workspaceTimezone;
|
|
39
44
|
const dashboardExecutionTimestamp = useDashboardSelector(selectExecutionTimestamp);
|
|
40
45
|
const showExecutionTimestampMessage = dashboardExecutionTimestamp !== undefined;
|
|
41
46
|
const formattedDate = formatDate(dashboardExecutionTimestamp, locale, timezone);
|
|
@@ -443,6 +443,10 @@ export declare const en_US: {
|
|
|
443
443
|
text: string;
|
|
444
444
|
crowdinContext: string;
|
|
445
445
|
};
|
|
446
|
+
"settingsDashboardDialog.section.timezone.defaultTimezone.help": {
|
|
447
|
+
text: string;
|
|
448
|
+
crowdinContext: string;
|
|
449
|
+
};
|
|
446
450
|
"settingsDashboardDialog.section.timezone.defaultTimezone.workspace": {
|
|
447
451
|
text: string;
|
|
448
452
|
crowdinContext: string;
|
|
@@ -491,10 +495,6 @@ export declare const en_US: {
|
|
|
491
495
|
text: string;
|
|
492
496
|
crowdinContext: string;
|
|
493
497
|
};
|
|
494
|
-
"timezoneDialog.description.ariaLabel": {
|
|
495
|
-
text: string;
|
|
496
|
-
crowdinContext: string;
|
|
497
|
-
};
|
|
498
498
|
"timezoneDialog.default": {
|
|
499
499
|
text: string;
|
|
500
500
|
crowdinContext: string;
|
|
@@ -955,6 +955,38 @@ export declare const en_US: {
|
|
|
955
955
|
text: string;
|
|
956
956
|
crowdinContext: string;
|
|
957
957
|
};
|
|
958
|
+
"dialogs.schedule.email.timezone": {
|
|
959
|
+
text: string;
|
|
960
|
+
crowdinContext: string;
|
|
961
|
+
};
|
|
962
|
+
"dialogs.automation.timezone.default": {
|
|
963
|
+
text: string;
|
|
964
|
+
crowdinContext: string;
|
|
965
|
+
};
|
|
966
|
+
"dialogs.automation.timezone.default.tooltip": {
|
|
967
|
+
text: string;
|
|
968
|
+
crowdinContext: string;
|
|
969
|
+
};
|
|
970
|
+
"dialogs.automation.timezone.select.searchPlaceholder": {
|
|
971
|
+
text: string;
|
|
972
|
+
crowdinContext: string;
|
|
973
|
+
};
|
|
974
|
+
"dialogs.automation.timezone.select.noMatch": {
|
|
975
|
+
text: string;
|
|
976
|
+
crowdinContext: string;
|
|
977
|
+
};
|
|
978
|
+
"dialogs.automation.timezone.now": {
|
|
979
|
+
text: string;
|
|
980
|
+
crowdinContext: string;
|
|
981
|
+
};
|
|
982
|
+
"dialogs.automation.timezone.defaultNow": {
|
|
983
|
+
text: string;
|
|
984
|
+
crowdinContext: string;
|
|
985
|
+
};
|
|
986
|
+
"dialogs.automation.timezone.usage": {
|
|
987
|
+
text: string;
|
|
988
|
+
crowdinContext: string;
|
|
989
|
+
};
|
|
958
990
|
"dialogs.automation.filters.missing": {
|
|
959
991
|
text: string;
|
|
960
992
|
crowdinContext: string;
|
|
@@ -991,6 +1023,14 @@ export declare const en_US: {
|
|
|
991
1023
|
text: string;
|
|
992
1024
|
crowdinContext: string;
|
|
993
1025
|
};
|
|
1026
|
+
"dialogs.automation.applyCurrentFilters.schedule.timezone.confirm": {
|
|
1027
|
+
text: string;
|
|
1028
|
+
crowdinContext: string;
|
|
1029
|
+
};
|
|
1030
|
+
"dialogs.automation.applyCurrentFilters.schedule.filtersAndTimezone.confirm": {
|
|
1031
|
+
text: string;
|
|
1032
|
+
crowdinContext: string;
|
|
1033
|
+
};
|
|
994
1034
|
"dialogs.automation.filters.schedule.ariaLabel": {
|
|
995
1035
|
text: string;
|
|
996
1036
|
crowdinContext: string;
|
|
@@ -1523,6 +1563,10 @@ export declare const en_US: {
|
|
|
1523
1563
|
text: string;
|
|
1524
1564
|
crowdinContext: string;
|
|
1525
1565
|
};
|
|
1566
|
+
"topBar.timezoneIndicator.label": {
|
|
1567
|
+
text: string;
|
|
1568
|
+
crowdinContext: string;
|
|
1569
|
+
};
|
|
1526
1570
|
"topBar.timezoneIndicator.tooltip": {
|
|
1527
1571
|
text: string;
|
|
1528
1572
|
crowdinContext: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../../src/presentation/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../../src/presentation/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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