@gooddata/sdk-ui-dashboard 11.51.0-alpha.0 → 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 +11 -16
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.js +7 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.js +12 -4
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts +17 -7
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.js +18 -8
- 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
- package/styles/css/dashboard.css +7 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/main.css +7 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/dashboard.scss +12 -0
|
@@ -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":"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"}
|
|
@@ -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,MAAM,WAAW,iCAAiC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;IACnE;;;OAGG;IACH,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,wEAAwE;IACxE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4EAA4E;IAC5E,eAAe,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,oBAAoB,EAAE,6BAA6B,CAAC;IACpD,kFAAgF;IAChF,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IAC/D,2EAAyE;IACzE,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;IAEzE,oBAAoB,CAAC,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClG,kBAAkB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtF,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtE;AAID,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,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 = () => {
|
|
@@ -59,7 +59,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
59
59
|
automationToEdit: scheduledExportToEdit,
|
|
60
60
|
widget,
|
|
61
61
|
});
|
|
62
|
-
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, isSlidesExportEnabled, defaultPdfPageSize, } = useDefaultScheduledEmailDialogData();
|
|
62
|
+
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, isSlidesExportEnabled, isAccessibilityModeEnabled, defaultPdfPageSize, } = useDefaultScheduledEmailDialogData();
|
|
63
63
|
const { defaultUser, editedAutomation, originalAutomation, isSubmitDisabled, xlsxSettings, pdfSettings, csvSettings, csvRawSettings, startDate, allowExternalRecipients, allowOnlyLoggedUserRecipients, validationErrorMessage, selectedAttachments, isParentValid, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, slidesTemplateIds, onSlidesTemplateIdChange, onDestinationChange, onMessageChange, onRecipientsChange, onRecurrenceChange, onEvaluationModeChange, onSubjectChange, onTitleChange, onFiltersChange, onApplyCurrentFilters, onStoreFiltersChange, onFiltersByTabChange, setParametersWire, enableAutomationEvaluationMode, } = useEditScheduledEmail({
|
|
64
64
|
notificationChannels,
|
|
65
65
|
insight,
|
|
@@ -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();
|
|
@@ -213,7 +207,7 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
213
207
|
getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone: editedAutomation.schedule?.timezone ??
|
|
214
208
|
TIMEZONE_DEFAULT.identifier, dateFormat: dateFormat ?? "MM/dd/yyyy", locale: locale, weekStart: weekStart, onChange: onRecurrenceChange, allowHourlyRecurrence: allowHourlyRecurrence, isWhiteLabeled: isWhiteLabeled, closeDropdownsOnParentScroll: CLOSE_ON_PARENT_SCROLL, onKeyDownSubmit: handleSubmitForm }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(DestinationSelect, { notificationChannels: notificationChannels, selectedItemId: editedAutomation.notificationChannel, onChange: onDestinationChange, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL, overlayPositionType: OVERLAY_POSITION_TYPE }), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), _jsx(RecipientsSelect, { id: "schedule.email.recipients", loggedUser: defaultUser, users: users, usersError: usersError, value: editedAutomation.recipients ?? [], originalValue: originalAutomation.recipients || [], onChange: onRecipientsChange, allowEmptySelection: true, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxAutomationsRecipients, notificationChannels: notificationChannels, notificationChannelId: editedAutomation.notificationChannel, onKeyDownSubmit: handleSubmitForm, externalRecipientOverride: externalRecipientOverride }), isInPlatformChannel ? null : (_jsxs(_Fragment, { children: [
|
|
215
209
|
_jsx(SubjectForm, { dashboardTitle: dashboardTitle, editedAutomation: editedAutomation, onChange: onSubjectChange, onKeyDownSubmit: handleSaveScheduledEmail, isSubmitDisabled: isSubmitDisabled }), _jsx(MessageForm, { onChange: onMessageChange, value: editedAutomation.details?.message ?? "" })
|
|
216
|
-
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
210
|
+
] })), widget ? (_jsx(WidgetAttachments, { selectedAttachments: selectedAttachments, onWidgetAttachmentsChange: onWidgetAttachmentsChange, xlsxSettings: xlsxSettings, pdfSettings: pdfSettings, onXlsxSettingsChange: onXlsxSettingsChange, onPdfSettingsChange: onPdfSettingsChange, csvSettings: csvSettings, onCsvSettingsChange: onCsvSettingsChange, csvRawSettings: csvRawSettings, onCsvRawSettingsChange: onCsvRawSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, isAccessibilityModeEnabled: isAccessibilityModeEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, defaultPdfPageSize: defaultPdfPageSize, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
217
211
|
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
218
212
|
}), children: errorMessage })) : null, getInvalidDatapoints()
|
|
219
213
|
.filter((invalidDatapoint) => invalidDatapoint.severity === "error")
|
|
@@ -251,6 +245,7 @@ function useDefaultScheduledEmailDialogData() {
|
|
|
251
245
|
isCrossFiltering,
|
|
252
246
|
isExecutionTimestampMode,
|
|
253
247
|
isSlidesExportEnabled: enableSlideshowExports,
|
|
248
|
+
isAccessibilityModeEnabled: settings?.enableAccessibilityMode === true,
|
|
254
249
|
defaultPdfPageSize,
|
|
255
250
|
};
|
|
256
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACvB,MAAM,qBAAqB,CAAC;AAa7B,MAAM,WAAW,0BAA0B;IACvC,mBAAmB,EAAE,uBAAuB,EAAE,CAAC;IAC/C,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4BAA4B,EAAE,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAC1G,YAAY,EAAE,4CAA4C,CAAC;IAC3D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACvF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,wBAAwB,CAAC,EAAE,CACvB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,KACpC,IAAI,CAAC;CACb;AAED,wBAAgB,oBAAoB,CAAC,EACjC,gBAAgB,EAChB,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EAC3B,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"DashboardAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACvB,MAAM,qBAAqB,CAAC;AAa7B,MAAM,WAAW,0BAA0B;IACvC,mBAAmB,EAAE,uBAAuB,EAAE,CAAC;IAC/C,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4BAA4B,EAAE,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAC1G,YAAY,EAAE,4CAA4C,CAAC;IAC3D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACvF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,wBAAwB,CAAC,EAAE,CACvB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,KACpC,IAAI,CAAC;CACb;AAED,wBAAgB,oBAAoB,CAAC,EACjC,gBAAgB,EAChB,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EAC3B,EAAE,0BAA0B,2CA6H5B"}
|
|
@@ -12,7 +12,11 @@ const ALL_DASHBOARD_ATTACHMENTS = ["PDF", "PDF_SLIDES", "PPTX", "XLSX"];
|
|
|
12
12
|
const SLIDE_DASHBOARD_ATTACHMENTS = ["PDF_SLIDES", "PPTX"];
|
|
13
13
|
export function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDashboardAttachmentsChange, selectedAttachments, xlsxSettings, onXlsxSettingsChange, isSlidesExportEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange, }) {
|
|
14
14
|
const intl = useIntl();
|
|
15
|
-
const { available: availableAttachments, visibleSelected: visibleSelectedAttachments,
|
|
15
|
+
const { available: availableAttachments, visibleSelected: visibleSelectedAttachments, buildNextSelection, } = partitionAttachments({
|
|
16
|
+
all: ALL_DASHBOARD_ATTACHMENTS,
|
|
17
|
+
selected: selectedAttachments,
|
|
18
|
+
excluded: isSlidesExportEnabled ? [] : SLIDE_DASHBOARD_ATTACHMENTS,
|
|
19
|
+
});
|
|
16
20
|
const attachmentListRef = useRef(null);
|
|
17
21
|
const addButtonRef = useRef(null);
|
|
18
22
|
const [announcement, setAnnouncement] = useState("");
|
|
@@ -52,9 +56,9 @@ export function DashboardAttachments({ dashboardFilters, isCrossFiltering, onDas
|
|
|
52
56
|
};
|
|
53
57
|
const handleChange = (attachments) => {
|
|
54
58
|
const formats = attachments
|
|
55
|
-
.filter((attachment) => attachment.selected
|
|
59
|
+
.filter((attachment) => attachment.selected)
|
|
56
60
|
.map((attachment) => attachment.type);
|
|
57
|
-
handleDashboardAttachmentSelectionSave(
|
|
61
|
+
handleDashboardAttachmentSelectionSave(buildNextSelection(formats));
|
|
58
62
|
// Focus add button after state update causes remount (returnFocusTo ref becomes stale)
|
|
59
63
|
requestAnimationFrame(() => {
|
|
60
64
|
addButtonRef.current?.focus();
|
|
@@ -11,6 +11,7 @@ export interface IWidgetAttachmentsProps {
|
|
|
11
11
|
csvRawSettings: IExportDefinitionVisualizationObjectSettings;
|
|
12
12
|
onCsvRawSettingsChange: (settings: IExportDefinitionVisualizationObjectSettings) => void;
|
|
13
13
|
isSlidesExportEnabled: boolean;
|
|
14
|
+
isAccessibilityModeEnabled: boolean;
|
|
14
15
|
defaultPdfPageSize?: IExportDefinitionVisualizationObjectSettings["pageSize"];
|
|
15
16
|
exportTemplates?: IExportTemplate[];
|
|
16
17
|
slidesTemplateIds?: {
|
|
@@ -20,5 +21,5 @@ export interface IWidgetAttachmentsProps {
|
|
|
20
21
|
};
|
|
21
22
|
onSlidesTemplateIdChange?: (templateId: string | undefined, format: "PPTX" | "PDF_SLIDES" | "PDF") => void;
|
|
22
23
|
}
|
|
23
|
-
export declare function WidgetAttachments({ selectedAttachments, onWidgetAttachmentsChange, xlsxSettings, onXlsxSettingsChange, pdfSettings, onPdfSettingsChange, csvSettings, onCsvSettingsChange, csvRawSettings, onCsvRawSettingsChange, isSlidesExportEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange }: IWidgetAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function WidgetAttachments({ selectedAttachments, onWidgetAttachmentsChange, xlsxSettings, onXlsxSettingsChange, pdfSettings, onPdfSettingsChange, csvSettings, onCsvSettingsChange, csvRawSettings, onCsvRawSettingsChange, isSlidesExportEnabled, isAccessibilityModeEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange }: IWidgetAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
//# sourceMappingURL=WidgetAttachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC5B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetAttachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,4CAA4C,EACjD,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC5B,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,WAAW,uBAAuB;IACpC,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;IAC5C,yBAAyB,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IACrE,YAAY,EAAE,4CAA4C,CAAC;IAC3D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACvF,WAAW,EAAE,4CAA4C,CAAC;IAC1D,mBAAmB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACtF,WAAW,EAAE,4CAA4C,CAAC;IAC1D,mBAAmB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACtF,cAAc,EAAE,4CAA4C,CAAC;IAC7D,sBAAsB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACzF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,0BAA0B,EAAE,OAAO,CAAC;IACpC,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,wBAAwB,CAAC,EAAE,CACvB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,KACpC,IAAI,CAAC;CACb;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EAC3B,EAAE,uBAAuB,2CA6HzB"}
|
|
@@ -17,9 +17,17 @@ const ALL_WIDGET_ATTACHMENTS = [
|
|
|
17
17
|
"CSV_RAW",
|
|
18
18
|
];
|
|
19
19
|
const SLIDE_WIDGET_ATTACHMENTS = ["PDF", "PPTX"];
|
|
20
|
-
|
|
20
|
+
const ACCESSIBILITY_MODE_EXCLUDED_WIDGET_ATTACHMENTS = ["PDF_TABULAR"];
|
|
21
|
+
export function WidgetAttachments({ selectedAttachments, onWidgetAttachmentsChange, xlsxSettings, onXlsxSettingsChange, pdfSettings, onPdfSettingsChange, csvSettings, onCsvSettingsChange, csvRawSettings, onCsvRawSettingsChange, isSlidesExportEnabled, isAccessibilityModeEnabled, defaultPdfPageSize, exportTemplates, slidesTemplateIds, onSlidesTemplateIdChange, }) {
|
|
21
22
|
const intl = useIntl();
|
|
22
|
-
const { available: availableAttachments, visibleSelected: visibleSelectedAttachments,
|
|
23
|
+
const { available: availableAttachments, visibleSelected: visibleSelectedAttachments, buildNextSelection, } = partitionAttachments({
|
|
24
|
+
all: ALL_WIDGET_ATTACHMENTS,
|
|
25
|
+
selected: selectedAttachments,
|
|
26
|
+
excluded: [
|
|
27
|
+
...(isSlidesExportEnabled ? [] : SLIDE_WIDGET_ATTACHMENTS),
|
|
28
|
+
...(isAccessibilityModeEnabled ? ACCESSIBILITY_MODE_EXCLUDED_WIDGET_ATTACHMENTS : []),
|
|
29
|
+
],
|
|
30
|
+
});
|
|
23
31
|
const attachmentListRef = useRef(null);
|
|
24
32
|
const addButtonRef = useRef(null);
|
|
25
33
|
const [announcement, setAnnouncement] = useState("");
|
|
@@ -59,9 +67,9 @@ export function WidgetAttachments({ selectedAttachments, onWidgetAttachmentsChan
|
|
|
59
67
|
};
|
|
60
68
|
const handleChange = (attachments) => {
|
|
61
69
|
const formats = attachments
|
|
62
|
-
.filter((attachment) => attachment.selected
|
|
70
|
+
.filter((attachment) => attachment.selected)
|
|
63
71
|
.map((attachment) => attachment.type);
|
|
64
|
-
handleWidgetAttachmentSelectionSave(
|
|
72
|
+
handleWidgetAttachmentSelectionSave(buildNextSelection(formats));
|
|
65
73
|
// Focus add button after state update causes remount (returnFocusTo ref becomes stale)
|
|
66
74
|
requestAnimationFrame(() => {
|
|
67
75
|
addButtonRef.current?.focus();
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Partitions attachment formats for the schedule picker
|
|
2
|
+
* Partitions attachment formats for the schedule picker based on their current availability.
|
|
3
|
+
* Callers decide which formats are not offered (slide formats when slide exports are disabled,
|
|
4
|
+
* tabular PDF in Accessibility Mode, …) and pass them as `excluded`.
|
|
3
5
|
*
|
|
4
|
-
* - `available` — formats to offer in the picker (
|
|
6
|
+
* - `available` — formats to offer in the picker (`excluded` ones omitted).
|
|
5
7
|
* - `visibleSelected` — currently-selected formats to render as chips (offered ones only).
|
|
6
|
-
* - `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
* - `buildNextSelection` — builds the next full selection from the formats picked in the picker:
|
|
9
|
+
* keeps only offered formats from `picked` and appends the selected-but-not-offered ones (e.g. a
|
|
10
|
+
* slide deck the schedule already had while the feature was enabled). Those are kept out of the
|
|
11
|
+
* UI entirely, but dropping them from the selection would mean an unrelated edit silently
|
|
12
|
+
* removes them — always route picker output through this. Deletes are exempt: they operate on
|
|
13
|
+
* the full selection, which already contains the hidden formats. Note it normalizes rather than
|
|
14
|
+
* errors: unknown or hidden formats in `picked` are dropped, never duplicated.
|
|
9
15
|
*/
|
|
10
|
-
export declare function partitionAttachments<T extends string>(all
|
|
16
|
+
export declare function partitionAttachments<T extends string>({ all, selected, excluded }: {
|
|
17
|
+
all: readonly T[];
|
|
18
|
+
selected: readonly T[];
|
|
19
|
+
excluded?: readonly T[];
|
|
20
|
+
}): {
|
|
11
21
|
available: T[];
|
|
12
22
|
visibleSelected: T[];
|
|
13
|
-
|
|
23
|
+
buildNextSelection: (picked: readonly T[]) => T[];
|
|
14
24
|
};
|
|
15
25
|
//# sourceMappingURL=attachmentFormats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachmentFormats.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"attachmentFormats.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/attachmentFormats.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,EACnD,GAAG,EACH,QAAQ,EACR,QAAa,EAChB,EAAE;IACC,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;CAC3B,GAAG;IACA,SAAS,EAAE,CAAC,EAAE,CAAC;IACf,eAAe,EAAE,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;CACrD,CASA"}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
/**
|
|
3
|
-
* Partitions attachment formats for the schedule picker
|
|
3
|
+
* Partitions attachment formats for the schedule picker based on their current availability.
|
|
4
|
+
* Callers decide which formats are not offered (slide formats when slide exports are disabled,
|
|
5
|
+
* tabular PDF in Accessibility Mode, …) and pass them as `excluded`.
|
|
4
6
|
*
|
|
5
|
-
* - `available` — formats to offer in the picker (
|
|
7
|
+
* - `available` — formats to offer in the picker (`excluded` ones omitted).
|
|
6
8
|
* - `visibleSelected` — currently-selected formats to render as chips (offered ones only).
|
|
7
|
-
* - `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* - `buildNextSelection` — builds the next full selection from the formats picked in the picker:
|
|
10
|
+
* keeps only offered formats from `picked` and appends the selected-but-not-offered ones (e.g. a
|
|
11
|
+
* slide deck the schedule already had while the feature was enabled). Those are kept out of the
|
|
12
|
+
* UI entirely, but dropping them from the selection would mean an unrelated edit silently
|
|
13
|
+
* removes them — always route picker output through this. Deletes are exempt: they operate on
|
|
14
|
+
* the full selection, which already contains the hidden formats. Note it normalizes rather than
|
|
15
|
+
* errors: unknown or hidden formats in `picked` are dropped, never duplicated.
|
|
10
16
|
*/
|
|
11
|
-
export function partitionAttachments(all,
|
|
12
|
-
const available =
|
|
17
|
+
export function partitionAttachments({ all, selected, excluded = [], }) {
|
|
18
|
+
const available = all.filter((format) => !excluded.includes(format));
|
|
13
19
|
const visibleSelected = selected.filter((f) => available.includes(f));
|
|
14
20
|
const hiddenSelected = selected.filter((f) => !available.includes(f));
|
|
15
|
-
return {
|
|
21
|
+
return {
|
|
22
|
+
available,
|
|
23
|
+
visibleSelected,
|
|
24
|
+
buildNextSelection: (picked) => [...picked.filter((f) => available.includes(f)), ...hiddenSelected],
|
|
25
|
+
};
|
|
16
26
|
}
|
|
@@ -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"}
|