@gooddata/sdk-ui-dashboard 11.51.0-alpha.1 → 11.51.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +4 -4
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +6 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +6 -1
- package/esm/model/store/meta/index.d.ts +1 -0
- package/esm/model/store/meta/index.d.ts.map +1 -1
- package/esm/model/store/meta/metaReducers.d.ts +5 -1
- package/esm/model/store/meta/metaReducers.d.ts.map +1 -1
- package/esm/model/store/meta/metaReducers.js +9 -0
- package/esm/model/store/meta/metaSelectors.d.ts +23 -1
- package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.js +33 -2
- package/esm/model/store/meta/metaState.d.ts +1 -1
- package/esm/model/store/meta/metaState.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +9 -9
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts +7 -2
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +6 -8
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +5 -2
- package/esm/presentation/automations/alerting/types.d.ts +30 -5
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +22 -25
- package/esm/presentation/automations/connectors/AlertingConnector.test.js +71 -5
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +7 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +12 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +28 -2
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +29 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +12 -0
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts +14 -0
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.js +12 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +13 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AutomationsContext.js +9 -0
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +15 -0
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +13 -0
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts +13 -1
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +8 -14
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useElementHeightSnapshot.d.ts +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useElementHeightSnapshot.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useElementHeightSnapshot.js +41 -0
- package/esm/presentation/automations/scheduledEmail/utils/timezone.d.ts +4 -1
- package/esm/presentation/automations/scheduledEmail/utils/timezone.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/timezone.js +14 -138
- package/esm/presentation/dashboard/DashboardHeader/SettingsDialogProvider.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/SettingsDialogProvider.js +1 -0
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.js +52 -14
- package/esm/presentation/dashboardSettingsDialog/TimezoneOption.d.ts +11 -0
- package/esm/presentation/dashboardSettingsDialog/TimezoneOption.d.ts.map +1 -0
- package/esm/presentation/dashboardSettingsDialog/TimezoneOption.js +36 -0
- package/esm/presentation/dashboardSettingsDialog/types.d.ts +2 -1
- package/esm/presentation/dashboardSettingsDialog/types.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/useDialogData.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/useDialogData.js +4 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +30 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +44 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +44 -0
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +2 -1
- package/esm/sdk-ui-dashboard.d.ts +370 -6
- package/package.json +21 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,QAAQ,EACR,sBAAsB,EACtB,OAAO,EACP,MAAM,EACT,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,QAAQ,EACR,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,cAAc,EACd,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK;QAAE,eAAe,CAAC,EAAE,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;IACtG,+HAA+H;IAC/H,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,KAAK,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5F,SAAS,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iEAAiE;IACjE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC;;;OAGG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,kDAAkD;IAClD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,6DAA6D;IAC7D,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,4FAA4F;IAC5F,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,6BAA6B,mEAAiC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,2BAA2B,CAMtE"}
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const AlertingDialogContext = createContext(undefined);
|
|
4
4
|
export const AlertingDialogContextProvider = AlertingDialogContext.Provider;
|
|
5
|
+
/**
|
|
6
|
+
* Reads the alerting create/edit dialog context.
|
|
7
|
+
*
|
|
8
|
+
* A replacement for `AlertingDialogComponent` renders inside this context and reads the dialog's widget
|
|
9
|
+
* and insight, the dashboard filter context it should apply, the alert being edited, the available
|
|
10
|
+
* workspace users and notification channels, and the create/save/delete callbacks from here.
|
|
11
|
+
*
|
|
12
|
+
* Some members exist to wire internal machinery (`executionResultByRef`, `widgetLocalIdToTabIdMap`,
|
|
13
|
+
* `parameterValues`) and are not intended as a customization surface.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
5
17
|
export function useAlertingDialogContext() {
|
|
6
18
|
const ctx = useContext(AlertingDialogContext);
|
|
7
19
|
if (!ctx) {
|
|
@@ -3,6 +3,8 @@ import type { IAutomationMetadataObject, IInsight, IUser, IWidget, ObjRef } from
|
|
|
3
3
|
* Sub-context for the alerting management dialog.
|
|
4
4
|
* The connector hydrates this from dashboard state.
|
|
5
5
|
* The management dialog tree reads from this context instead of calling useDashboardSelector directly.
|
|
6
|
+
*
|
|
7
|
+
* @alpha
|
|
6
8
|
*/
|
|
7
9
|
export interface IAlertingManagementDialogContextValue {
|
|
8
10
|
currentUser?: IUser;
|
|
@@ -23,5 +25,17 @@ export interface IAlertingManagementDialogContextValue {
|
|
|
23
25
|
resumeAlert(alert: IAutomationMetadataObject): Promise<IAutomationMetadataObject>;
|
|
24
26
|
}
|
|
25
27
|
export declare const AlertingManagementDialogContextProvider: import("react").Provider<IAlertingManagementDialogContextValue | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Reads the alerting management dialog context.
|
|
30
|
+
*
|
|
31
|
+
* A replacement for the alerting management dialog renders inside this context and reads the current
|
|
32
|
+
* user, the dashboard it's rendered on, the widget/insight lookups (`getWidgetByRef`,
|
|
33
|
+
* `getInsightByWidgetRef`), and the pause/resume callbacks from here.
|
|
34
|
+
*
|
|
35
|
+
* Some members exist to wire internal machinery (`automationsInvalidationId`, `managementDialogContext`)
|
|
36
|
+
* and are not intended as a customization surface.
|
|
37
|
+
*
|
|
38
|
+
* @alpha
|
|
39
|
+
*/
|
|
26
40
|
export declare function useAlertingManagementDialogContext(): IAlertingManagementDialogContextValue;
|
|
27
41
|
//# sourceMappingURL=AlertingManagementDialogContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingManagementDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEvG
|
|
1
|
+
{"version":3,"file":"AlertingManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingManagementDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEvG;;;;;;GAMG;AACH,MAAM,WAAW,qCAAqC;IAClD,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,CAAC;IACjE,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,QAAQ,GAAG,SAAS,CAAC;IACzE,UAAU,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACjF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACrF;AAMD,eAAO,MAAM,uCAAuC,6EAA2C,CAAC;AAEhG;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,IAAI,qCAAqC,CAQ1F"}
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const AlertingManagementDialogContext = createContext(undefined);
|
|
4
4
|
export const AlertingManagementDialogContextProvider = AlertingManagementDialogContext.Provider;
|
|
5
|
+
/**
|
|
6
|
+
* Reads the alerting management dialog context.
|
|
7
|
+
*
|
|
8
|
+
* A replacement for the alerting management dialog renders inside this context and reads the current
|
|
9
|
+
* user, the dashboard it's rendered on, the widget/insight lookups (`getWidgetByRef`,
|
|
10
|
+
* `getInsightByWidgetRef`), and the pause/resume callbacks from here.
|
|
11
|
+
*
|
|
12
|
+
* Some members exist to wire internal machinery (`automationsInvalidationId`, `managementDialogContext`)
|
|
13
|
+
* and are not intended as a customization surface.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
5
17
|
export function useAlertingManagementDialogContext() {
|
|
6
18
|
const ctx = useContext(AlertingManagementDialogContext);
|
|
7
19
|
if (!ctx) {
|
|
@@ -5,6 +5,8 @@ import type { IAutomationFiltersTab } from "../../../model/store/filtering/types
|
|
|
5
5
|
/**
|
|
6
6
|
* Date filter configuration provided by the dashboard connector so that AutomationDateFilter
|
|
7
7
|
* does not need to read dashboard selectors directly.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
8
10
|
*/
|
|
9
11
|
export interface IAutomationsDateFilterConfig {
|
|
10
12
|
availableGranularities: DateFilterGranularity[];
|
|
@@ -15,6 +17,8 @@ export interface IAutomationsDateFilterConfig {
|
|
|
15
17
|
/**
|
|
16
18
|
* Main context shared across all automation dialogs.
|
|
17
19
|
* Only fields actively consumed by migrated leaves are listed here — add fields as each leaf migrates.
|
|
20
|
+
*
|
|
21
|
+
* @alpha
|
|
18
22
|
*/
|
|
19
23
|
export interface IAutomationsContextValue {
|
|
20
24
|
locale: ILocale;
|
|
@@ -75,5 +79,14 @@ export interface IAutomationsContextValue {
|
|
|
75
79
|
widgetExistsByRef: (ref: ObjRef | undefined) => boolean;
|
|
76
80
|
}
|
|
77
81
|
export declare const AutomationsContextProvider: import("react").Provider<IAutomationsContextValue | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* Reads the automation dialogs' shared context.
|
|
84
|
+
*
|
|
85
|
+
* The alerting and scheduled-email dialogs (create/edit and management) render inside this context and
|
|
86
|
+
* read the workspace catalog, filter configuration, locale, formatting, and other cross-dialog data from
|
|
87
|
+
* here.
|
|
88
|
+
*
|
|
89
|
+
* @alpha
|
|
90
|
+
*/
|
|
78
91
|
export declare function useAutomationsContext(): IAutomationsContextValue;
|
|
79
92
|
//# sourceMappingURL=AutomationsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF
|
|
1
|
+
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+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AS,CAAC;IACjG,6BAA6B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mCAAmC,GAAG,SAAS,CAAC;IACxG;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC;CAC3D;AAID,eAAO,MAAM,0BAA0B,gEAA8B,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,wBAAwB,CAWhE"}
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const AutomationsContext = createContext(undefined);
|
|
4
4
|
export const AutomationsContextProvider = AutomationsContext.Provider;
|
|
5
|
+
/**
|
|
6
|
+
* Reads the automation dialogs' shared context.
|
|
7
|
+
*
|
|
8
|
+
* The alerting and scheduled-email dialogs (create/edit and management) render inside this context and
|
|
9
|
+
* read the workspace catalog, filter configuration, locale, formatting, and other cross-dialog data from
|
|
10
|
+
* here.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
5
14
|
export function useAutomationsContext() {
|
|
6
15
|
const ctx = useContext(AutomationsContext);
|
|
7
16
|
if (!ctx) {
|
|
@@ -5,6 +5,8 @@ import type { DashboardAttributeFilterConfigMode, DashboardDateFilterConfigMode,
|
|
|
5
5
|
* The connector hydrates this from dashboard state and provides the CRUD callbacks; the dialog and its
|
|
6
6
|
* hooks read it instead of reaching into the dashboard store. That direction is enforced by the
|
|
7
7
|
* `no-model-imports-in-clean-scheduled-email` rule in `.dependency-cruiser.js`.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
8
10
|
*/
|
|
9
11
|
export interface IScheduledEmailDialogContextValue {
|
|
10
12
|
widget?: IWidget;
|
|
@@ -47,5 +49,18 @@ export interface IScheduledEmailDialogContextValue {
|
|
|
47
49
|
deleteScheduledEmail(se: IAutomationMetadataObject): Promise<void>;
|
|
48
50
|
}
|
|
49
51
|
export declare const ScheduledEmailDialogContextProvider: import("react").Provider<IScheduledEmailDialogContextValue | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Reads the scheduled-email create/edit dialog context.
|
|
54
|
+
*
|
|
55
|
+
* A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
|
|
56
|
+
* and insight, the dashboard filter context and export templates it should apply, and the
|
|
57
|
+
* create/save/delete callbacks from here.
|
|
58
|
+
*
|
|
59
|
+
* Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
|
|
60
|
+
* `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
|
|
61
|
+
* customization surface.
|
|
62
|
+
*
|
|
63
|
+
* @alpha
|
|
64
|
+
*/
|
|
50
65
|
export declare function useScheduledEmailDialogContext(): IScheduledEmailDialogContextValue;
|
|
51
66
|
//# sourceMappingURL=ScheduledEmailDialogContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,OAAO,EACV,MAAM,qBAAqB,CAAC;AAE7B
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,OAAO,EACV,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MA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C,CAQlF"}
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const ScheduledEmailDialogContext = createContext(undefined);
|
|
4
4
|
export const ScheduledEmailDialogContextProvider = ScheduledEmailDialogContext.Provider;
|
|
5
|
+
/**
|
|
6
|
+
* Reads the scheduled-email create/edit dialog context.
|
|
7
|
+
*
|
|
8
|
+
* A replacement for the scheduled-email dialog renders inside this context and reads the dialog's widget
|
|
9
|
+
* and insight, the dashboard filter context and export templates it should apply, and the
|
|
10
|
+
* create/save/delete callbacks from here.
|
|
11
|
+
*
|
|
12
|
+
* Some members exist to wire internal machinery (`exportParametersByTab`, `widgetLocalIdToTabIdMap`,
|
|
13
|
+
* `commonDateFilterMode`, `dateFiltersModeMap`, `attributeFiltersModeMap`) and are not intended as a
|
|
14
|
+
* customization surface.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
5
18
|
export function useScheduledEmailDialogContext() {
|
|
6
19
|
const ctx = useContext(ScheduledEmailDialogContext);
|
|
7
20
|
if (!ctx) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* isWhiteLabeled, isExecutionTimestampMode, externalRecipient, features.*) are NOT
|
|
7
7
|
* duplicated here — consumers read those from useAutomationsContext().
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
9
|
+
* @alpha
|
|
10
10
|
*/
|
|
11
11
|
export interface IScheduledEmailManagementDialogContextValue {
|
|
12
12
|
/**
|
|
@@ -50,5 +50,17 @@ export interface IScheduledEmailManagementDialogContextValue {
|
|
|
50
50
|
unlimitedAutomations: boolean;
|
|
51
51
|
}
|
|
52
52
|
export declare const ScheduledEmailManagementDialogContextProvider: import("react").Provider<IScheduledEmailManagementDialogContextValue | undefined>;
|
|
53
|
+
/**
|
|
54
|
+
* Reads the scheduled-email management dialog context.
|
|
55
|
+
*
|
|
56
|
+
* A replacement for the scheduled-email management dialog renders inside this context and reads the
|
|
57
|
+
* dashboard it's rendered on and the automations limit (`maxAutomations`, `unlimitedAutomations`) from
|
|
58
|
+
* here.
|
|
59
|
+
*
|
|
60
|
+
* Some members exist to wire internal machinery (`automationsInvalidationId`) and are not intended as a
|
|
61
|
+
* customization surface.
|
|
62
|
+
*
|
|
63
|
+
* @alpha
|
|
64
|
+
*/
|
|
53
65
|
export declare function useScheduledEmailManagementDialogContext(): IScheduledEmailManagementDialogContextValue;
|
|
54
66
|
//# sourceMappingURL=ScheduledEmailManagementDialogContext.d.ts.map
|
package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,MAAM,WAAW,2CAA2C;IACxD;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAMD,eAAO,MAAM,6CAA6C,mFAAiD,CAAC;AAE5G,wBAAgB,wCAAwC,IAAI,2CAA2C,CAQtG"}
|
|
1
|
+
{"version":3,"file":"ScheduledEmailManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailManagementDialogContext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,MAAM,WAAW,2CAA2C;IACxD;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAMD,eAAO,MAAM,6CAA6C,mFAAiD,CAAC;AAE5G;;;;;;;;;;;GAWG;AACH,wBAAgB,wCAAwC,IAAI,2CAA2C,CAQtG"}
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const ScheduledEmailManagementDialogContext = createContext(undefined);
|
|
4
4
|
export const ScheduledEmailManagementDialogContextProvider = ScheduledEmailManagementDialogContext.Provider;
|
|
5
|
+
/**
|
|
6
|
+
* Reads the scheduled-email management dialog context.
|
|
7
|
+
*
|
|
8
|
+
* A replacement for the scheduled-email management dialog renders inside this context and reads the
|
|
9
|
+
* dashboard it's rendered on and the automations limit (`maxAutomations`, `unlimitedAutomations`) from
|
|
10
|
+
* here.
|
|
11
|
+
*
|
|
12
|
+
* Some members exist to wire internal machinery (`automationsInvalidationId`) and are not intended as a
|
|
13
|
+
* customization surface.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
5
17
|
export function useScheduledEmailManagementDialogContext() {
|
|
6
18
|
const ctx = useContext(ScheduledEmailManagementDialogContext);
|
|
7
19
|
if (!ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA+D9D,wBAAgB,2BAA2B,CAAC,EACxC,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,2CA8jB5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,2CAW5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2019-2026 GoodData Corporation
|
|
3
|
-
import { useCallback,
|
|
3
|
+
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";
|
|
@@ -31,6 +31,7 @@ import { SubjectForm } from "./components/SubjectForm/SubjectForm.js";
|
|
|
31
31
|
import { SCHEDULED_EMAIL_DIALOG_ID } from "./constants.js";
|
|
32
32
|
import { DefaultLoadingScheduledEmailDialog } from "./DefaultLoadingScheduledEmailDialog.js";
|
|
33
33
|
import { useEditScheduledEmail } from "./hooks/useEditScheduledEmail.js";
|
|
34
|
+
import { useElementHeightSnapshot } from "./hooks/useElementHeightSnapshot.js";
|
|
34
35
|
import { useSaveScheduledEmailToBackend } from "./hooks/useSaveScheduledEmailToBackend.js";
|
|
35
36
|
const OVERLAY_POSITION_TYPE = "sameAsTarget";
|
|
36
37
|
const CLOSE_ON_PARENT_SCROLL = true;
|
|
@@ -46,7 +47,6 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
46
47
|
const filtersTabContentRef = useRef(null);
|
|
47
48
|
const [scheduledEmailToDelete, setScheduledEmailToDelete] = useState(null);
|
|
48
49
|
const [selectedTabId, setSelectedTabId] = useState("general");
|
|
49
|
-
const [tabContentHeight, setTabContentHeight] = useState(undefined);
|
|
50
50
|
const { isWhiteLabeled, externalRecipient: externalRecipientOverride, isSecondaryTitleVisible, } = useAutomationsContext();
|
|
51
51
|
const { exportTemplates, widgetTitle, hasMultipleTabs } = useScheduledEmailDialogContext();
|
|
52
52
|
const handleScheduleDeleteSuccess = () => {
|
|
@@ -156,18 +156,12 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
156
156
|
const handleTabSelect = useCallback((tab) => {
|
|
157
157
|
setSelectedTabId(tab.id);
|
|
158
158
|
}, []);
|
|
159
|
-
// Measure General tab content height to maintain consistent dialog size
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const height = generalTabContentRef.current.scrollHeight;
|
|
166
|
-
setTabContentHeight(height);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}, [selectedTabId]);
|
|
159
|
+
// Measure General tab content height to maintain consistent dialog size. Re-measures on
|
|
160
|
+
// content-size changes within the General tab itself (e.g. validation messages
|
|
161
|
+
// appearing/disappearing), not just on tab switch - otherwise the Filters tab could
|
|
162
|
+
// inherit a stale minHeight from before the change. The last measured value is kept
|
|
163
|
+
// internally so it survives the General tab unmounting when the user switches to Filters.
|
|
164
|
+
const tabContentHeight = useElementHeightSnapshot(generalTabContentRef, selectedTabId);
|
|
171
165
|
if (isApplyCurrentFiltersDialogOpen) {
|
|
172
166
|
return (_jsx(ApplyCurrentFiltersConfirmDialog, { automationType: "schedule", onCancel: () => onCancel?.(), onEdit: () => {
|
|
173
167
|
onApplyCurrentFilters();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tracks a DOM node's scrollHeight, keeping the last measured value even after the node
|
|
4
|
+
* unmounts. Uses a ResizeObserver to catch content-size changes while the node stays mounted,
|
|
5
|
+
* not just mount/unmount transitions (e.g. a tab switch).
|
|
6
|
+
*
|
|
7
|
+
* @param ref - ref to the observed node
|
|
8
|
+
* @param resubscribeKey - forces a resubscribe when the ref will point to a freshly mounted node
|
|
9
|
+
* (e.g. a tab id gating the node's conditional rendering)
|
|
10
|
+
*/
|
|
11
|
+
export declare function useElementHeightSnapshot(ref: RefObject<HTMLElement | null>, resubscribeKey: unknown): number | undefined;
|
|
12
|
+
//# sourceMappingURL=useElementHeightSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useElementHeightSnapshot.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useElementHeightSnapshot.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA6C,MAAM,OAAO,CAAC;AAElF;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACpC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,cAAc,EAAE,OAAO,GACxB,MAAM,GAAG,SAAS,CAuCpB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useCallback, useRef, useSyncExternalStore } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Tracks a DOM node's scrollHeight, keeping the last measured value even after the node
|
|
5
|
+
* unmounts. Uses a ResizeObserver to catch content-size changes while the node stays mounted,
|
|
6
|
+
* not just mount/unmount transitions (e.g. a tab switch).
|
|
7
|
+
*
|
|
8
|
+
* @param ref - ref to the observed node
|
|
9
|
+
* @param resubscribeKey - forces a resubscribe when the ref will point to a freshly mounted node
|
|
10
|
+
* (e.g. a tab id gating the node's conditional rendering)
|
|
11
|
+
*/
|
|
12
|
+
export function useElementHeightSnapshot(ref, resubscribeKey) {
|
|
13
|
+
const lastMeasuredHeightRef = useRef(undefined);
|
|
14
|
+
const subscribe = useCallback((onStoreChange) => {
|
|
15
|
+
const node = ref.current;
|
|
16
|
+
if (!node) {
|
|
17
|
+
return () => { };
|
|
18
|
+
}
|
|
19
|
+
const updateHeight = () => {
|
|
20
|
+
lastMeasuredHeightRef.current = node.scrollHeight;
|
|
21
|
+
onStoreChange();
|
|
22
|
+
};
|
|
23
|
+
// Measure once unconditionally - environments without ResizeObserver still need
|
|
24
|
+
// an initial (and only) measurement rather than never syncing at all.
|
|
25
|
+
updateHeight();
|
|
26
|
+
if (typeof ResizeObserver === "undefined") {
|
|
27
|
+
return () => { };
|
|
28
|
+
}
|
|
29
|
+
const observer = new ResizeObserver(updateHeight);
|
|
30
|
+
observer.observe(node);
|
|
31
|
+
return () => {
|
|
32
|
+
observer.disconnect();
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
// resubscribeKey is not read in the body, but must force a resubscribe once the ref
|
|
36
|
+
// points to a newly mounted node.
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
[ref, resubscribeKey]);
|
|
39
|
+
const getSnapshot = useCallback(() => lastMeasuredHeightRef.current, []);
|
|
40
|
+
return useSyncExternalStore(subscribe, getSnapshot);
|
|
41
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduled-email flavor of a timezone entry, adapting the shared curated list from sdk-ui-kit.
|
|
3
|
+
*/
|
|
1
4
|
export interface ITimezone {
|
|
2
5
|
identifier: string;
|
|
3
6
|
januaryOffset: number;
|
|
@@ -6,5 +9,5 @@ export interface ITimezone {
|
|
|
6
9
|
}
|
|
7
10
|
export declare const TIMEZONE_DEFAULT: ITimezone;
|
|
8
11
|
export declare function getUserTimezone(): ITimezone;
|
|
9
|
-
export declare function getTimezoneByIdentifier(
|
|
12
|
+
export declare function getTimezoneByIdentifier(identifier: string | undefined): ITimezone | undefined;
|
|
10
13
|
//# sourceMappingURL=timezone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/utils/timezone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/utils/timezone.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACjB;AAWD,eAAO,MAAM,gBAAgB,WAA0C,CAAC;AAExE,wBAAgB,eAAe,IAAI,SAAS,CAE3C;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAG7F"}
|
|
@@ -1,142 +1,18 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
["America/Chihuahua", "GMT-07:00 Chihuahua", -420, -360],
|
|
13
|
-
["America/Mazatlan", "GMT-07:00 Mazatlan", -420, -360],
|
|
14
|
-
["America/Denver", "GMT-07:00 Mountain Time (US & Canada)", -420, -360],
|
|
15
|
-
["America/Guatemala", "GMT-06:00 Central America", -360, -360],
|
|
16
|
-
["America/Chicago", "GMT-06:00 Central Time (US & Canada)", -360, -300],
|
|
17
|
-
["America/Mexico_City", "GMT-06:00 Mexico City", -360, -300],
|
|
18
|
-
["America/Monterrey", "GMT-06:00 Monterrey", -360, -300],
|
|
19
|
-
["America/Regina", "GMT-06:00 Saskatchewan", -360, -360],
|
|
20
|
-
["America/Bogota", "GMT-05:00 Bogota", -300, -300],
|
|
21
|
-
["America/New_York", "GMT-05:00 Eastern Time (US & Canada)", -300, -240],
|
|
22
|
-
["America/Indiana/Indianapolis", "GMT-05:00 Indiana (East)", -300, -240],
|
|
23
|
-
["America/Lima", "GMT-05:00 Lima", -300, -300],
|
|
24
|
-
["America/Caracas", "GMT-04:30 Caracas", -270, -270],
|
|
25
|
-
["America/Halifax", "GMT-04:00 Atlantic Time (Canada)", -240, -180],
|
|
26
|
-
["America/Guyana", "GMT-04:00 Georgetown", -240, -240],
|
|
27
|
-
["America/La_Paz", "GMT-04:00 La Paz", -240, -240],
|
|
28
|
-
["America/Santiago", "GMT-04:00 Santiago", -180, -240],
|
|
29
|
-
["America/St_Johns", "GMT-03:30 Newfoundland", -210, -150],
|
|
30
|
-
["America/Sao_Paulo", "GMT-03:00 Brasilia", -120, -180],
|
|
31
|
-
["America/Argentina/Buenos_Aires", "GMT-03:00 Buenos Aires", -180, -180],
|
|
32
|
-
["America/Godthab", "GMT-03:00 Greenland", -180, -120],
|
|
33
|
-
["Atlantic/South_Georgia", "GMT-02:00 Mid-Atlantic", -120, -120],
|
|
34
|
-
["Atlantic/Azores", "GMT-01:00 Azores", -60, 0],
|
|
35
|
-
["Atlantic/Cape_Verde", "GMT-01:00 Cape Verde Is.", -60, -60],
|
|
36
|
-
["Africa/Casablanca", "GMT+00:00 Casablanca", 0, 0],
|
|
37
|
-
["Europe/Dublin", "GMT+00:00 Dublin", 0, 60],
|
|
38
|
-
["Europe/Lisbon", "GMT+00:00 Lisbon", 0, 60],
|
|
39
|
-
["Europe/London", "GMT+00:00 London", 0, 60],
|
|
40
|
-
["Africa/Monrovia", "GMT+00:00 Monrovia", 0, 0],
|
|
41
|
-
["Etc/UTC", "GMT+00:00 UTC", 0, 0],
|
|
42
|
-
["Europe/Amsterdam", "GMT+01:00 Amsterdam", 60, 120],
|
|
43
|
-
["Europe/Belgrade", "GMT+01:00 Belgrade", 60, 120],
|
|
44
|
-
["Europe/Berlin", "GMT+01:00 Berlin", 60, 120],
|
|
45
|
-
["Europe/Bratislava", "GMT+01:00 Bratislava", 60, 120],
|
|
46
|
-
["Europe/Brussels", "GMT+01:00 Brussels", 60, 120],
|
|
47
|
-
["Europe/Budapest", "GMT+01:00 Budapest", 60, 120],
|
|
48
|
-
["Europe/Copenhagen", "GMT+01:00 Copenhagen", 60, 120],
|
|
49
|
-
["Europe/Ljubljana", "GMT+01:00 Ljubljana", 60, 120],
|
|
50
|
-
["Europe/Madrid", "GMT+01:00 Madrid", 60, 120],
|
|
51
|
-
["Europe/Paris", "GMT+01:00 Paris", 60, 120],
|
|
52
|
-
["Europe/Prague", "GMT+01:00 Prague", 60, 120],
|
|
53
|
-
["Europe/Rome", "GMT+01:00 Rome", 60, 120],
|
|
54
|
-
["Europe/Sarajevo", "GMT+01:00 Sarajevo", 60, 120],
|
|
55
|
-
["Europe/Skopje", "GMT+01:00 Skopje", 60, 120],
|
|
56
|
-
["Europe/Stockholm", "GMT+01:00 Stockholm", 60, 120],
|
|
57
|
-
["Europe/Vienna", "GMT+01:00 Vienna", 60, 120],
|
|
58
|
-
["Europe/Warsaw", "GMT+01:00 Warsaw", 60, 120],
|
|
59
|
-
["Africa/Algiers", "GMT+01:00 West Central Africa", 60, 60],
|
|
60
|
-
["Europe/Zagreb", "GMT+01:00 Zagreb", 60, 120],
|
|
61
|
-
["Europe/Athens", "GMT+02:00 Athens", 120, 180],
|
|
62
|
-
["Europe/Bucharest", "GMT+02:00 Bucharest", 120, 180],
|
|
63
|
-
["Africa/Cairo", "GMT+02:00 Cairo", 120, 180],
|
|
64
|
-
["Africa/Harare", "GMT+02:00 Harare", 120, 120],
|
|
65
|
-
["Europe/Helsinki", "GMT+02:00 Helsinki", 120, 180],
|
|
66
|
-
["Europe/Istanbul", "GMT+02:00 Istanbul", 120, 180],
|
|
67
|
-
["Asia/Jerusalem", "GMT+02:00 Jerusalem", 120, 180],
|
|
68
|
-
["Europe/Kiev", "GMT+02:00 Kyiv", 120, 180],
|
|
69
|
-
["Europe/Minsk", "GMT+02:00 Minsk", 120, 180],
|
|
70
|
-
["Africa/Johannesburg", "GMT+02:00 Pretoria", 120, 120],
|
|
71
|
-
["Europe/Riga", "GMT+02:00 Riga", 120, 180],
|
|
72
|
-
["Europe/Sofia", "GMT+02:00 Sofia", 120, 180],
|
|
73
|
-
["Europe/Tallinn", "GMT+02:00 Tallinn", 120, 180],
|
|
74
|
-
["Europe/Vilnius", "GMT+02:00 Vilnius", 120, 180],
|
|
75
|
-
["Asia/Baghdad", "GMT+03:00 Baghdad", 180, 180],
|
|
76
|
-
["Asia/Kuwait", "GMT+03:00 Kuwait", 180, 180],
|
|
77
|
-
["Europe/Moscow", "GMT+03:00 Moscow", 180, 240],
|
|
78
|
-
["Africa/Nairobi", "GMT+03:00 Nairobi", 180, 180],
|
|
79
|
-
["Asia/Riyadh", "GMT+03:00 Riyadh", 180, 180],
|
|
80
|
-
["Asia/Tehran", "GMT+03:30 Tehran", 210, 270],
|
|
81
|
-
["Asia/Baku", "GMT+04:00 Baku", 240, 300],
|
|
82
|
-
["Asia/Muscat", "GMT+04:00 Muscat", 240, 240],
|
|
83
|
-
["Asia/Tbilisi", "GMT+04:00 Tbilisi", 240, 240],
|
|
84
|
-
["Asia/Yerevan", "GMT+04:00 Yerevan", 240, 300],
|
|
85
|
-
["Asia/Kabul", "GMT+04:30 Kabul", 270, 270],
|
|
86
|
-
["Asia/Yekaterinburg", "GMT+05:00 Ekaterinburg", 300, 360],
|
|
87
|
-
["Asia/Karachi", "GMT+05:00 Karachi", 300, 300],
|
|
88
|
-
["Asia/Tashkent", "GMT+05:00 Tashkent", 300, 300],
|
|
89
|
-
["Asia/Kolkata", "GMT+05:30 Kolkata", 330, 330],
|
|
90
|
-
["Asia/Colombo", "GMT+05:30 Sri Jayawardenepura", 330, 330],
|
|
91
|
-
["Asia/Kathmandu", "GMT+05:45 Kathmandu", 345, 345],
|
|
92
|
-
["Asia/Almaty", "GMT+06:00 Almaty", 360, 360],
|
|
93
|
-
["Asia/Dhaka", "GMT+06:00 Dhaka", 360, 360],
|
|
94
|
-
["Asia/Novosibirsk", "GMT+06:00 Novosibirsk", 360, 420],
|
|
95
|
-
["Asia/Rangoon", "GMT+06:30 Rangoon", 390, 390],
|
|
96
|
-
["Asia/Bangkok", "GMT+07:00 Bangkok", 420, 420],
|
|
97
|
-
["Asia/Jakarta", "GMT+07:00 Jakarta", 420, 420],
|
|
98
|
-
["Asia/Krasnoyarsk", "GMT+07:00 Krasnoyarsk", 420, 480],
|
|
99
|
-
["Asia/Shanghai", "GMT+08:00 Beijing", 480, 480],
|
|
100
|
-
["Asia/Chongqing", "GMT+08:00 Chongqing", 480, 480],
|
|
101
|
-
["Asia/Hong_Kong", "GMT+08:00 Hong Kong", 480, 480],
|
|
102
|
-
["Asia/Irkutsk", "GMT+08:00 Irkutsk", 480, 540],
|
|
103
|
-
["Asia/Kuala_Lumpur", "GMT+08:00 Kuala Lumpur", 480, 480],
|
|
104
|
-
["Australia/Perth", "GMT+08:00 Perth", 480, 480],
|
|
105
|
-
["Asia/Singapore", "GMT+08:00 Singapore", 480, 480],
|
|
106
|
-
["Asia/Taipei", "GMT+08:00 Taipei", 480, 480],
|
|
107
|
-
["Asia/Ulaanbaatar", "GMT+08:00 Ulaan Bataar", 480, 480],
|
|
108
|
-
["Asia/Urumqi", "GMT+08:00 Urumqi", 480, 480],
|
|
109
|
-
["Asia/Seoul", "GMT+09:00 Seoul", 540, 540],
|
|
110
|
-
["Asia/Tokyo", "GMT+09:00 Tokyo", 540, 540],
|
|
111
|
-
["Asia/Yakutsk", "GMT+09:00 Yakutsk", 540, 600],
|
|
112
|
-
["Australia/Adelaide", "GMT+09:30 Adelaide", 630, 570],
|
|
113
|
-
["Australia/Darwin", "GMT+09:30 Darwin", 570, 570],
|
|
114
|
-
["Australia/Brisbane", "GMT+10:00 Brisbane", 600, 600],
|
|
115
|
-
["Pacific/Guam", "GMT+10:00 Guam", 600, 600],
|
|
116
|
-
["Australia/Hobart", "GMT+10:00 Hobart", 660, 600],
|
|
117
|
-
["Australia/Melbourne", "GMT+10:00 Melbourne", 660, 600],
|
|
118
|
-
["Pacific/Port_Moresby", "GMT+10:00 Port Moresby", 600, 600],
|
|
119
|
-
["Australia/Sydney", "GMT+10:00 Sydney", 660, 600],
|
|
120
|
-
["Asia/Vladivostok", "GMT+10:00 Vladivostok", 600, 660],
|
|
121
|
-
["Asia/Kamchatka", "GMT+11:00 Kamchatka", 660, 720],
|
|
122
|
-
["Asia/Magadan", "GMT+11:00 Magadan", 660, 720],
|
|
123
|
-
["Pacific/Noumea", "GMT+11:00 New Caledonia", 660, 660],
|
|
124
|
-
["Pacific/Auckland", "GMT+12:00 Auckland", 780, 720],
|
|
125
|
-
["Pacific/Fiji", "GMT+12:00 Fiji", 780, 720],
|
|
126
|
-
["Pacific/Majuro", "GMT+12:00 Marshall Is.", 720, 720],
|
|
127
|
-
["Pacific/Tongatapu", "GMT+13:00 Nuku'alofa", 780, 780],
|
|
128
|
-
];
|
|
129
|
-
const timezones = timezonesRaw.map((t) => ({
|
|
130
|
-
identifier: t[0],
|
|
131
|
-
title: t[1],
|
|
132
|
-
januaryOffset: t[2],
|
|
133
|
-
juneOffset: t[3],
|
|
134
|
-
}));
|
|
135
|
-
const TIMEZONE_BY_OFFSETS = timezones.find((tz) => tz.januaryOffset === JANUARY_OFFSET && tz.juneOffset === JUNE_OFFSET);
|
|
136
|
-
export const TIMEZONE_DEFAULT = getTimezoneByIdentifier("Etc/UTC");
|
|
2
|
+
import { getTimezoneById, getTimezoneTitle, getUserTimezone as getUserTimezoneItem, } from "@gooddata/sdk-ui-kit";
|
|
3
|
+
function toTimezone(item) {
|
|
4
|
+
return {
|
|
5
|
+
identifier: item.id,
|
|
6
|
+
title: getTimezoneTitle(item),
|
|
7
|
+
januaryOffset: item.januaryOffset,
|
|
8
|
+
juneOffset: item.juneOffset,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export const TIMEZONE_DEFAULT = toTimezone(getTimezoneById("Etc/UTC"));
|
|
137
12
|
export function getUserTimezone() {
|
|
138
|
-
return
|
|
13
|
+
return toTimezone(getUserTimezoneItem());
|
|
139
14
|
}
|
|
140
|
-
export function getTimezoneByIdentifier(
|
|
141
|
-
|
|
15
|
+
export function getTimezoneByIdentifier(identifier) {
|
|
16
|
+
const item = identifier ? getTimezoneById(identifier) : undefined;
|
|
17
|
+
return item ? toTimezone(item) : undefined;
|
|
142
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsDialogProvider.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardHeader/SettingsDialogProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsDialogProvider.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardHeader/SettingsDialogProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,OAAO,CAAC;AA2DvD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,YAAY,GAAG,IAAI,CAwB5D"}
|
|
@@ -28,6 +28,7 @@ const useShareDialogDashboardHeader = () => {
|
|
|
28
28
|
dispatch(metaActions.setDisablePersistentFiltersAcrossTabs(payload.disablePersistentFiltersAcrossTabs));
|
|
29
29
|
dispatch(metaActions.setEvaluationFrequency(payload.evaluationFrequency));
|
|
30
30
|
dispatch(metaActions.setSectionHeadersDateDataSet(payload.sectionHeadersDateDataSet));
|
|
31
|
+
dispatch(metaActions.setDashboardTimezoneConfig(payload.timezoneConfig));
|
|
31
32
|
}, [closeSettingsDialog, dispatch]);
|
|
32
33
|
const onErrorSettingsDialog = useCallback(() => {
|
|
33
34
|
dispatch(uiActions.closeSettingsDialog());
|
|
@@ -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;
|
|
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,CA+QrD"}
|