@gooddata/sdk-ui-dashboard 11.55.0-alpha.2 → 11.55.0-alpha.3
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 +20 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +18 -0
- package/esm/internal.d.ts +1 -1
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +10 -22
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +13 -42
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +8 -10
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +22 -32
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +16 -16
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +34 -109
- package/esm/presentation/automations/alerting/blocks/AlertingDialogFormFieldGroup.d.ts +10 -0
- package/esm/presentation/automations/alerting/blocks/AlertingDialogFormFieldGroup.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/blocks/AlertingDialogFormFieldGroup.js +12 -0
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.d.ts +49 -0
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/blocks/AlertingDialogShell.js +128 -0
- package/esm/presentation/automations/alerting/blocks/DefaultLoadingAlertingDialog.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/types.d.ts +59 -0
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingManagementDialogContext.js +7 -0
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts +12 -0
- package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +15 -10
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +45 -198
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts +2 -18
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/DashboardAttachments.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts +2 -23
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/WidgetAttachments.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogDashboardAttachments.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogDashboardAttachments.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogDashboardAttachments.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogEvaluationMode.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogEvaluationMode.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogEvaluationMode.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogMessage.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogMessage.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogMessage.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogRecurrence.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogRecurrence.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogRecurrence.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogSubject.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogSubject.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogSubject.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogWidgetAttachments.d.ts +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogWidgetAttachments.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogWidgetAttachments.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/EvaluationModeCheckbox/EvaluationModeCheckbox.d.ts +2 -17
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/EvaluationModeCheckbox/EvaluationModeCheckbox.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/EvaluationModeCheckbox/EvaluationModeCheckbox.js +0 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/MessageForm/MessageForm.d.ts +2 -6
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/MessageForm/MessageForm.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.d.ts +2 -10
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/blocks/DefaultLoadingScheduledEmailDialog.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogDashboardAttachments.d.ts +16 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogDashboardAttachments.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogDashboardAttachments.js +28 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.d.ts +16 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.js +28 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogMessage.d.ts +15 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogMessage.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogMessage.js +27 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.d.ts +16 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.js +24 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.d.ts +59 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.js +195 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogSubject.d.ts +16 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogSubject.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogSubject.js +29 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogWidgetAttachments.d.ts +16 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogWidgetAttachments.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogWidgetAttachments.js +28 -0
- package/esm/presentation/automations/scheduledEmail/state/useIsInPlatformChannel.d.ts +6 -0
- package/esm/presentation/automations/scheduledEmail/state/useIsInPlatformChannel.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useIsInPlatformChannel.js +13 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDialogFieldProps.d.ts +73 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDialogFieldProps.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailDialogFieldProps.js +168 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailSubmitOnEnter.d.ts +30 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailSubmitOnEnter.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailSubmitOnEnter.js +26 -0
- package/esm/presentation/automations/scheduledEmail/types.d.ts +299 -1
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useWorkspaceUsersSearch.d.ts +51 -0
- package/esm/presentation/automations/shared/hooks/useWorkspaceUsersSearch.d.ts.map +1 -0
- package/esm/presentation/automations/{scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect → shared/hooks}/useWorkspaceUsersSearch.js +13 -0
- package/esm/presentation/dashboard/components/DashboardScreenSizeContext.js +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +91 -91
- package/esm/presentation/widget/insightMenu/types.js +1 -1
- package/esm/presentation/widget/richTextMenu/types.d.ts.map +1 -1
- package/esm/presentation/widget/richTextMenu/types.js +2 -1
- package/esm/sdk-ui-dashboard.d.ts +824 -35
- package/package.json +22 -22
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultLoadingScheduledEmailDialog.d.ts.map +0 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts +0 -13
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts.map +0 -1
- /package/esm/presentation/automations/alerting/{DefaultAlertingDialog → blocks}/DefaultLoadingAlertingDialog.d.ts +0 -0
- /package/esm/presentation/automations/alerting/{DefaultAlertingDialog → blocks}/DefaultLoadingAlertingDialog.js +0 -0
- /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog → blocks}/DefaultLoadingScheduledEmailDialog.d.ts +0 -0
- /package/esm/presentation/automations/scheduledEmail/{DefaultScheduledEmailDialog → blocks}/DefaultLoadingScheduledEmailDialog.js +0 -0
|
@@ -3,11 +3,11 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { sortBy } from "lodash-es";
|
|
5
5
|
import { DETAILED_ANNOUNCEMENT_THRESHOLD, UiSearchResultsAnnouncement } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { useWorkspaceUsersSearch } from "../../../../shared/hooks/useWorkspaceUsersSearch.js";
|
|
6
7
|
import { convertUserToAutomationRecipient } from "../../../../shared/utils/automationUtils.js";
|
|
7
8
|
import { createUser, matchRecipient } from "../../../utils/users.js";
|
|
8
9
|
import { isEmail } from "../../../utils/validate.js";
|
|
9
10
|
import { RecipientsSelectRenderer } from "./RecipientsSelectRenderer.js";
|
|
10
|
-
import { useWorkspaceUsersSearch } from "./useWorkspaceUsersSearch.js";
|
|
11
11
|
export function RecipientsSelect({ id, value, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel = true, onKeyDownSubmit, externalRecipientOverride, }) {
|
|
12
12
|
const isServerSearch = !externalRecipientOverride && !allowOnlyLoggedUserRecipients;
|
|
13
13
|
const { search, users, usersError, isLoading, onSearch, onActivate } = useWorkspaceUsersSearch({
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
dashboardTitle: string;
|
|
4
|
-
editedAutomation: IAutomationMetadataObjectDefinition;
|
|
5
|
-
isSubmitDisabled?: boolean;
|
|
6
|
-
onChange: (value: string, isValid: boolean) => void;
|
|
7
|
-
onKeyDownSubmit: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function SubjectForm({ dashboardTitle, editedAutomation, isSubmitDisabled, onChange, onKeyDownSubmit }: ISubjectFormProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
1
|
+
import { type IScheduledEmailDialogSubjectProps } from "../../../types.js";
|
|
2
|
+
export declare function SubjectForm({ dashboardTitle, editedAutomation, isSubmitDisabled, onChange, onKeyDownSubmit }: IScheduledEmailDialogSubjectProps): import("react/jsx-runtime").JSX.Element;
|
|
11
3
|
//# sourceMappingURL=SubjectForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubjectForm.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubjectForm.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAK3E,wBAAgB,WAAW,CAAC,EACxB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EAClB,EAAE,iCAAiC,2CA8FnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLoadingScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/DefaultLoadingScheduledEmailDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAarE,UAAU,wCAAwC;IAC9C,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,kCAAkC,CAAC,EAC/C,qBAAqB,EACrB,QAAQ,EACX,EAAE,wCAAwC,2CAkD1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogDashboardAttachmentsProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's dashboard-attachments field, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogDashboardAttachments} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogDashboardAttachmentsProps}; every prop passed here replaces the
|
|
8
|
+
* hook's value for that prop wholesale. Renders nothing while
|
|
9
|
+
* `useScheduledEmailDialogContext().isLoading` is true and when the dialog context has a `widget`
|
|
10
|
+
* (a widget schedule renders {@link ScheduledEmailDialogWidgetAttachments} instead), the same
|
|
11
|
+
* visibility the default dialog gives the field.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export declare function ScheduledEmailDialogDashboardAttachments(props: Partial<IScheduledEmailDialogDashboardAttachmentsProps>): ReactElement;
|
|
16
|
+
//# sourceMappingURL=ScheduledEmailDialogDashboardAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogDashboardAttachments.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogDashboardAttachments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,8CAA8C,EAAE,MAAM,aAAa,CAAC;AAIlF;;;;;;;;;;;GAWG;AACH,wBAAgB,wCAAwC,CACpD,KAAK,EAAE,OAAO,CAAC,8CAA8C,CAAC,GAC/D,YAAY,CAMd"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
3
|
+
import { DefaultScheduledEmailDialogDashboardAttachments } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogDashboardAttachments.js";
|
|
4
|
+
import { useScheduledEmailDialogDashboardAttachmentsProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
5
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
6
|
+
/**
|
|
7
|
+
* The scheduled-export dialog's dashboard-attachments field, connected to the dialog's state.
|
|
8
|
+
*
|
|
9
|
+
* Renders {@link DefaultScheduledEmailDialogDashboardAttachments} with the props of
|
|
10
|
+
* {@link useScheduledEmailDialogDashboardAttachmentsProps}; every prop passed here replaces the
|
|
11
|
+
* hook's value for that prop wholesale. Renders nothing while
|
|
12
|
+
* `useScheduledEmailDialogContext().isLoading` is true and when the dialog context has a `widget`
|
|
13
|
+
* (a widget schedule renders {@link ScheduledEmailDialogWidgetAttachments} instead), the same
|
|
14
|
+
* visibility the default dialog gives the field.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export function ScheduledEmailDialogDashboardAttachments(props) {
|
|
19
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogDashboardAttachments, { ...props }) }));
|
|
20
|
+
}
|
|
21
|
+
function ConnectedScheduledEmailDialogDashboardAttachments(overrides) {
|
|
22
|
+
const defaultProps = useScheduledEmailDialogDashboardAttachmentsProps();
|
|
23
|
+
const { widget } = useScheduledEmailDialogContext();
|
|
24
|
+
if (widget) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return _jsx(DefaultScheduledEmailDialogDashboardAttachments, { ...defaultProps, ...overrides });
|
|
28
|
+
}
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogEvaluationModeProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's evaluation-mode checkbox, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogEvaluationMode} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogEvaluationModeProps}; every prop passed here replaces the hook's
|
|
8
|
+
* value for that prop wholesale. Renders nothing while
|
|
9
|
+
* `useScheduledEmailDialogContext().isLoading` is true and while
|
|
10
|
+
* `useAutomationsContext().features.enableAutomationEvaluationMode` is off, the same visibility the
|
|
11
|
+
* default dialog gives the field.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export declare function ScheduledEmailDialogEvaluationMode(props: Partial<IScheduledEmailDialogEvaluationModeProps>): ReactElement;
|
|
16
|
+
//# sourceMappingURL=ScheduledEmailDialogEvaluationMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogEvaluationMode.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAI5E;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,OAAO,CAAC,wCAAwC,CAAC,GACzD,YAAY,CAMd"}
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogEvaluationMode.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
3
|
+
import { DefaultScheduledEmailDialogEvaluationMode } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogEvaluationMode.js";
|
|
4
|
+
import { useScheduledEmailDialogEvaluationModeProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
5
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
6
|
+
/**
|
|
7
|
+
* The scheduled-export dialog's evaluation-mode checkbox, connected to the dialog's state.
|
|
8
|
+
*
|
|
9
|
+
* Renders {@link DefaultScheduledEmailDialogEvaluationMode} with the props of
|
|
10
|
+
* {@link useScheduledEmailDialogEvaluationModeProps}; every prop passed here replaces the hook's
|
|
11
|
+
* value for that prop wholesale. Renders nothing while
|
|
12
|
+
* `useScheduledEmailDialogContext().isLoading` is true and while
|
|
13
|
+
* `useAutomationsContext().features.enableAutomationEvaluationMode` is off, the same visibility the
|
|
14
|
+
* default dialog gives the field.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export function ScheduledEmailDialogEvaluationMode(props) {
|
|
19
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogEvaluationMode, { ...props }) }));
|
|
20
|
+
}
|
|
21
|
+
function ConnectedScheduledEmailDialogEvaluationMode(overrides) {
|
|
22
|
+
const defaultProps = useScheduledEmailDialogEvaluationModeProps();
|
|
23
|
+
const { features: { enableAutomationEvaluationMode }, } = useAutomationsContext();
|
|
24
|
+
if (!enableAutomationEvaluationMode) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return _jsx(DefaultScheduledEmailDialogEvaluationMode, { ...defaultProps, ...overrides });
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogMessageProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's message field, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogMessage} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogMessageProps}; every prop passed here replaces the hook's value for
|
|
8
|
+
* that prop wholesale. Renders nothing while `useScheduledEmailDialogContext().isLoading` is true
|
|
9
|
+
* and for an in-platform notification channel (which has no e-mail message), the same visibility
|
|
10
|
+
* the default dialog gives the field.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
14
|
+
export declare function ScheduledEmailDialogMessage(props: Partial<IScheduledEmailDialogMessageProps>): ReactElement;
|
|
15
|
+
//# sourceMappingURL=ScheduledEmailDialogMessage.d.ts.map
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogMessage.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogMessage.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAIrE;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,iCAAiC,CAAC,GAAG,YAAY,CAM3G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DefaultScheduledEmailDialogMessage } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogMessage.js";
|
|
3
|
+
import { useIsInPlatformChannel } from "../state/useIsInPlatformChannel.js";
|
|
4
|
+
import { useScheduledEmailDialogMessageProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
5
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
6
|
+
/**
|
|
7
|
+
* The scheduled-export dialog's message field, connected to the dialog's state.
|
|
8
|
+
*
|
|
9
|
+
* Renders {@link DefaultScheduledEmailDialogMessage} with the props of
|
|
10
|
+
* {@link useScheduledEmailDialogMessageProps}; every prop passed here replaces the hook's value for
|
|
11
|
+
* that prop wholesale. Renders nothing while `useScheduledEmailDialogContext().isLoading` is true
|
|
12
|
+
* and for an in-platform notification channel (which has no e-mail message), the same visibility
|
|
13
|
+
* the default dialog gives the field.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export function ScheduledEmailDialogMessage(props) {
|
|
18
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogMessage, { ...props }) }));
|
|
19
|
+
}
|
|
20
|
+
function ConnectedScheduledEmailDialogMessage(overrides) {
|
|
21
|
+
const defaultProps = useScheduledEmailDialogMessageProps();
|
|
22
|
+
const isInPlatformChannel = useIsInPlatformChannel();
|
|
23
|
+
if (isInPlatformChannel) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return _jsx(DefaultScheduledEmailDialogMessage, { ...defaultProps, ...overrides });
|
|
27
|
+
}
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogRecurrenceProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's recurrence field, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogRecurrence} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogRecurrenceProps}; every prop passed here replaces the hook's value
|
|
8
|
+
* for that prop wholesale. Pass `onKeyDownSubmit` to submit on Enter from the recurrence inputs —
|
|
9
|
+
* the default dialog passes its save action; without it Enter does nothing here. Renders nothing
|
|
10
|
+
* while `useScheduledEmailDialogContext().isLoading` is true; otherwise ungated, unlike the other
|
|
11
|
+
* General-tab fields.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export declare function ScheduledEmailDialogRecurrence(props: Partial<IScheduledEmailDialogRecurrenceProps>): ReactElement;
|
|
16
|
+
//# sourceMappingURL=ScheduledEmailDialogRecurrence.d.ts.map
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogRecurrence.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogRecurrence.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,aAAa,CAAC;AAMxE;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,OAAO,CAAC,oCAAoC,CAAC,GACrD,YAAY,CAMd"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DefaultScheduledEmailDialogRecurrence } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogRecurrence.js";
|
|
3
|
+
import { useScheduledEmailDialogRecurrenceProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
4
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
5
|
+
const noop = () => { };
|
|
6
|
+
/**
|
|
7
|
+
* The scheduled-export dialog's recurrence field, connected to the dialog's state.
|
|
8
|
+
*
|
|
9
|
+
* Renders {@link DefaultScheduledEmailDialogRecurrence} with the props of
|
|
10
|
+
* {@link useScheduledEmailDialogRecurrenceProps}; every prop passed here replaces the hook's value
|
|
11
|
+
* for that prop wholesale. Pass `onKeyDownSubmit` to submit on Enter from the recurrence inputs —
|
|
12
|
+
* the default dialog passes its save action; without it Enter does nothing here. Renders nothing
|
|
13
|
+
* while `useScheduledEmailDialogContext().isLoading` is true; otherwise ungated, unlike the other
|
|
14
|
+
* General-tab fields.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export function ScheduledEmailDialogRecurrence(props) {
|
|
19
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogRecurrence, { ...props }) }));
|
|
20
|
+
}
|
|
21
|
+
function ConnectedScheduledEmailDialogRecurrence({ onKeyDownSubmit, ...overrides }) {
|
|
22
|
+
const defaultProps = useScheduledEmailDialogRecurrenceProps({ onKeyDownSubmit: onKeyDownSubmit ?? noop });
|
|
23
|
+
return _jsx(DefaultScheduledEmailDialogRecurrence, { ...defaultProps, ...overrides });
|
|
24
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogShellProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's chrome, connected to the dialog's state: the modal overlay, the dialog
|
|
5
|
+
* frame with the header row (the back button and the title input) and the action bar, the General and
|
|
6
|
+
* Filters tabs, the scrollable content area around the selected tab's content, the body's error and
|
|
7
|
+
* validation messages, the stale-filters confirmation step shown before the dialog when the saved filters
|
|
8
|
+
* or schedule timezone no longer match the dashboard, and the delete confirmation reached from the
|
|
9
|
+
* action bar in edit mode. While `useScheduledEmailDialogContext().isLoading` is true — on scheduled
|
|
10
|
+
* email the ordinary path while a widget export's filters load — it renders the loading skeleton and
|
|
11
|
+
* none of its children.
|
|
12
|
+
*
|
|
13
|
+
* The default dialog is `<ScheduledEmailDialogShell>` around the region blocks and form; a custom
|
|
14
|
+
* `ScheduledEmailDialogComponent` that keeps this chrome and arranges the blocks differently renders the
|
|
15
|
+
* shell itself. The shell does not own the save: call {@link useSaveScheduledEmailToBackend} and pass its
|
|
16
|
+
* `handleSaveScheduledEmail`, `isSavingScheduledEmail` and `savingErrorMessage`; build Enter handlers for
|
|
17
|
+
* the blocks you place with {@link useScheduledEmailSubmitOnEnter} over the same `handleSaveScheduledEmail`.
|
|
18
|
+
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is false — the state hooks throw
|
|
19
|
+
* while the dialog loads — and render the shell alone (any `onSubmit`, `isSaving: false`) until then, as
|
|
20
|
+
* the example does.
|
|
21
|
+
*
|
|
22
|
+
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* function MyScheduledEmailDialog(props: IScheduledEmailDialogProps) {
|
|
27
|
+
* const { isLoading } = useScheduledEmailDialogContext();
|
|
28
|
+
* // the state hooks throw while the dialog loads; the shell renders the loading skeleton
|
|
29
|
+
* if (isLoading) {
|
|
30
|
+
* return <ScheduledEmailDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
31
|
+
* }
|
|
32
|
+
* return <MyScheduledEmailDialogBody {...props} />;
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* function MyScheduledEmailDialogBody(props: IScheduledEmailDialogProps) {
|
|
36
|
+
* const { handleSaveScheduledEmail, isSavingScheduledEmail, savingErrorMessage } =
|
|
37
|
+
* useSaveScheduledEmailToBackend(props);
|
|
38
|
+
* const submitOnEnter = useScheduledEmailSubmitOnEnter({
|
|
39
|
+
* onSubmit: handleSaveScheduledEmail,
|
|
40
|
+
* isSaving: isSavingScheduledEmail,
|
|
41
|
+
* });
|
|
42
|
+
* return (
|
|
43
|
+
* <ScheduledEmailDialogShell
|
|
44
|
+
* {...props}
|
|
45
|
+
* onSubmit={handleSaveScheduledEmail}
|
|
46
|
+
* isSaving={isSavingScheduledEmail}
|
|
47
|
+
* savingErrorMessage={savingErrorMessage}
|
|
48
|
+
* >
|
|
49
|
+
* <ScheduledEmailDialogDestination />
|
|
50
|
+
* <ScheduledEmailDialogRecipients onKeyDownSubmit={submitOnEnter} />
|
|
51
|
+
* </ScheduledEmailDialogShell>
|
|
52
|
+
* );
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @alpha
|
|
57
|
+
*/
|
|
58
|
+
export declare function ScheduledEmailDialogShell(props: IScheduledEmailDialogShellProps): ReactElement;
|
|
59
|
+
//# sourceMappingURL=ScheduledEmailDialogShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogShell.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogShell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA0C,MAAM,OAAO,CAAC;AA4ClF,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAMnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CAW9F"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useMemo, useRef, useState } from "react";
|
|
4
|
+
import cx from "classnames";
|
|
5
|
+
import { useIntl } from "react-intl";
|
|
6
|
+
import { ValidationContextStore, createInvalidNode, useValidationContextValue } from "@gooddata/sdk-ui";
|
|
7
|
+
import { ConfirmDialogBase, Message, Overlay, OverlayController, OverlayControllerProvider, ScrollablePanel, UiTabs, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
8
|
+
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
9
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
10
|
+
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
11
|
+
import { ApplyCurrentFiltersConfirmDialog } from "../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
12
|
+
import { DefaultAutomationDialogActionBar } from "../../shared/slots/DefaultAutomationDialogActionBar.js";
|
|
13
|
+
import { DefaultScheduledEmailDialogFilters } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogFilters.js";
|
|
14
|
+
import { DefaultScheduledEmailDialogHeader } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogHeader.js";
|
|
15
|
+
import { SCHEDULED_EMAIL_DIALOG_ID } from "../DefaultScheduledEmailDialog/constants.js";
|
|
16
|
+
import { useElementHeightSnapshot } from "../DefaultScheduledEmailDialog/hooks/useElementHeightSnapshot.js";
|
|
17
|
+
import { DeleteScheduleConfirmDialog } from "../DefaultScheduledEmailManagementDialog/components/DeleteScheduleConfirmDialog.js";
|
|
18
|
+
import { useScheduleEmailDialogAccessibility } from "../hooks/useScheduleEmailDialogAccessibility.js";
|
|
19
|
+
import { useScheduledExportActions } from "../state/ScheduledExportActionsContext.js";
|
|
20
|
+
import { useScheduledExportDraft } from "../state/ScheduledExportDraftContext.js";
|
|
21
|
+
import { useScheduledExportFilters } from "../state/ScheduledExportFiltersContext.js";
|
|
22
|
+
import { useScheduledEmailDialogActionBarProps, useScheduledEmailDialogFiltersProps, useScheduledEmailDialogHeaderProps, } from "../state/useScheduledEmailDialogRegionProps.js";
|
|
23
|
+
import { useScheduledEmailSubmitOnEnter } from "../state/useScheduledEmailSubmitOnEnter.js";
|
|
24
|
+
import { useScheduledExportAttachments } from "../state/useScheduledExportAttachments.js";
|
|
25
|
+
import { useScheduledExportDialogValidity } from "../state/useScheduledExportDialogValidity.js";
|
|
26
|
+
import { DefaultLoadingScheduledEmailDialog } from "./DefaultLoadingScheduledEmailDialog.js";
|
|
27
|
+
const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z_INDEX);
|
|
28
|
+
/**
|
|
29
|
+
* The scheduled-export dialog's chrome, connected to the dialog's state: the modal overlay, the dialog
|
|
30
|
+
* frame with the header row (the back button and the title input) and the action bar, the General and
|
|
31
|
+
* Filters tabs, the scrollable content area around the selected tab's content, the body's error and
|
|
32
|
+
* validation messages, the stale-filters confirmation step shown before the dialog when the saved filters
|
|
33
|
+
* or schedule timezone no longer match the dashboard, and the delete confirmation reached from the
|
|
34
|
+
* action bar in edit mode. While `useScheduledEmailDialogContext().isLoading` is true — on scheduled
|
|
35
|
+
* email the ordinary path while a widget export's filters load — it renders the loading skeleton and
|
|
36
|
+
* none of its children.
|
|
37
|
+
*
|
|
38
|
+
* The default dialog is `<ScheduledEmailDialogShell>` around the region blocks and form; a custom
|
|
39
|
+
* `ScheduledEmailDialogComponent` that keeps this chrome and arranges the blocks differently renders the
|
|
40
|
+
* shell itself. The shell does not own the save: call {@link useSaveScheduledEmailToBackend} and pass its
|
|
41
|
+
* `handleSaveScheduledEmail`, `isSavingScheduledEmail` and `savingErrorMessage`; build Enter handlers for
|
|
42
|
+
* the blocks you place with {@link useScheduledEmailSubmitOnEnter} over the same `handleSaveScheduledEmail`.
|
|
43
|
+
* Call that hook only once `useScheduledEmailDialogContext().isLoading` is false — the state hooks throw
|
|
44
|
+
* while the dialog loads — and render the shell alone (any `onSubmit`, `isSaving: false`) until then, as
|
|
45
|
+
* the example does.
|
|
46
|
+
*
|
|
47
|
+
* Needs an ambient `IntlProvider`; inside a `Dashboard` the dashboard's provider covers it.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* function MyScheduledEmailDialog(props: IScheduledEmailDialogProps) {
|
|
52
|
+
* const { isLoading } = useScheduledEmailDialogContext();
|
|
53
|
+
* // the state hooks throw while the dialog loads; the shell renders the loading skeleton
|
|
54
|
+
* if (isLoading) {
|
|
55
|
+
* return <ScheduledEmailDialogShell {...props} onSubmit={() => {}} isSaving={false} />;
|
|
56
|
+
* }
|
|
57
|
+
* return <MyScheduledEmailDialogBody {...props} />;
|
|
58
|
+
* }
|
|
59
|
+
*
|
|
60
|
+
* function MyScheduledEmailDialogBody(props: IScheduledEmailDialogProps) {
|
|
61
|
+
* const { handleSaveScheduledEmail, isSavingScheduledEmail, savingErrorMessage } =
|
|
62
|
+
* useSaveScheduledEmailToBackend(props);
|
|
63
|
+
* const submitOnEnter = useScheduledEmailSubmitOnEnter({
|
|
64
|
+
* onSubmit: handleSaveScheduledEmail,
|
|
65
|
+
* isSaving: isSavingScheduledEmail,
|
|
66
|
+
* });
|
|
67
|
+
* return (
|
|
68
|
+
* <ScheduledEmailDialogShell
|
|
69
|
+
* {...props}
|
|
70
|
+
* onSubmit={handleSaveScheduledEmail}
|
|
71
|
+
* isSaving={isSavingScheduledEmail}
|
|
72
|
+
* savingErrorMessage={savingErrorMessage}
|
|
73
|
+
* >
|
|
74
|
+
* <ScheduledEmailDialogDestination />
|
|
75
|
+
* <ScheduledEmailDialogRecipients onKeyDownSubmit={submitOnEnter} />
|
|
76
|
+
* </ScheduledEmailDialogShell>
|
|
77
|
+
* );
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @alpha
|
|
82
|
+
*/
|
|
83
|
+
export function ScheduledEmailDialogShell(props) {
|
|
84
|
+
const { isLoading, scheduledExportToEdit } = useScheduledEmailDialogContext();
|
|
85
|
+
if (isLoading) {
|
|
86
|
+
return (_jsx(DefaultLoadingScheduledEmailDialog, { onCancel: props.onCancel, scheduledExportToEdit: scheduledExportToEdit }));
|
|
87
|
+
}
|
|
88
|
+
return _jsx(LoadedScheduledEmailDialogShell, { ...props });
|
|
89
|
+
}
|
|
90
|
+
function LoadedScheduledEmailDialogShell({ onBack, onCancel, onDeleteSuccess, onDeleteError, onSubmit, isSaving, savingErrorMessage, slots, topContent, bottomContent, children, filtersTabContent, }) {
|
|
91
|
+
const HeaderSlot = slots?.Header;
|
|
92
|
+
const FiltersSlot = slots?.Filters;
|
|
93
|
+
const ActionBarSlot = slots?.ActionBar;
|
|
94
|
+
const intl = useIntl();
|
|
95
|
+
const dialogTitleRef = useRef(null);
|
|
96
|
+
const generalTabContentRef = useRef(null);
|
|
97
|
+
const [scheduledEmailToDelete, setScheduledEmailToDelete] = useState(null);
|
|
98
|
+
const [selectedTabId, setSelectedTabId] = useState("general");
|
|
99
|
+
const { tabIds } = useAutomationsContext();
|
|
100
|
+
const { widget } = useScheduledEmailDialogContext();
|
|
101
|
+
const handleScheduleDeleteSuccess = () => {
|
|
102
|
+
onDeleteSuccess?.();
|
|
103
|
+
setScheduledEmailToDelete(null);
|
|
104
|
+
};
|
|
105
|
+
const { editedAutomation, scheduleTimezoneIsStale } = useScheduledExportDraft();
|
|
106
|
+
const { applyCurrentScheduleTimezone } = useScheduledExportActions();
|
|
107
|
+
const { onApplyCurrentFilters, automationIsValid, applyLatest: applyLatestParameters, } = useScheduledExportFilters();
|
|
108
|
+
const { selectedAttachments } = useScheduledExportAttachments();
|
|
109
|
+
const { validationErrorMessage } = useScheduledExportDialogValidity();
|
|
110
|
+
// a stale schedule timezone repairs through the same consent dialog as stale filters
|
|
111
|
+
const [isApplyCurrentFiltersDialogOpen, setIsApplyCurrentFiltersDialogOpen] = useState(!automationIsValid || scheduleTimezoneIsStale);
|
|
112
|
+
const { returnFocusTo } = useScheduleEmailDialogAccessibility();
|
|
113
|
+
const missingAttachmentsErrorMessage = selectedAttachments.length === 0 &&
|
|
114
|
+
intl.formatMessage({ id: "scheduledEmail.attachments.error.noAttachmentsSelected" });
|
|
115
|
+
const validationContextValue = useValidationContextValue(createInvalidNode({ id: "ScheduledEmailDialog" }));
|
|
116
|
+
const { getInvalidDatapoints } = validationContextValue;
|
|
117
|
+
const errorMessage = savingErrorMessage ?? validationErrorMessage ?? missingAttachmentsErrorMessage;
|
|
118
|
+
const titleElementId = useIdPrefixed("title");
|
|
119
|
+
const submitOnEnter = useScheduledEmailSubmitOnEnter({ onSubmit, isSaving });
|
|
120
|
+
const actionBarDefaultProps = useScheduledEmailDialogActionBarProps({
|
|
121
|
+
onCancel,
|
|
122
|
+
onSubmit,
|
|
123
|
+
isSaving,
|
|
124
|
+
onDelete: () => setScheduledEmailToDelete(editedAutomation),
|
|
125
|
+
});
|
|
126
|
+
const headerDefaultProps = useScheduledEmailDialogHeaderProps({
|
|
127
|
+
onBack,
|
|
128
|
+
onTitleKeyDown: submitOnEnter,
|
|
129
|
+
ref: dialogTitleRef,
|
|
130
|
+
});
|
|
131
|
+
const filtersDefaultProps = useScheduledEmailDialogFiltersProps();
|
|
132
|
+
const tabs = useMemo(() => [
|
|
133
|
+
{
|
|
134
|
+
id: "general",
|
|
135
|
+
label: intl.formatMessage({ id: "dialogs.schedule.email.tabs.general" }),
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "filters",
|
|
139
|
+
label: intl.formatMessage({ id: "dialogs.schedule.email.tabs.filters" }),
|
|
140
|
+
},
|
|
141
|
+
], [intl]);
|
|
142
|
+
const handleTabSelect = useCallback((tab) => {
|
|
143
|
+
setSelectedTabId(tab.id);
|
|
144
|
+
}, []);
|
|
145
|
+
// Measure General tab content height to maintain consistent dialog size. Re-measures on
|
|
146
|
+
// content-size changes within the General tab itself (e.g. validation messages
|
|
147
|
+
// appearing/disappearing), not just on tab switch - otherwise the Filters tab could
|
|
148
|
+
// inherit a stale minHeight from before the change. The last measured value is kept
|
|
149
|
+
// internally so it survives the General tab unmounting when the user switches to Filters.
|
|
150
|
+
const tabContentHeight = useElementHeightSnapshot(generalTabContentRef, selectedTabId);
|
|
151
|
+
if (isApplyCurrentFiltersDialogOpen) {
|
|
152
|
+
return (_jsx(ApplyCurrentFiltersConfirmDialog, { automationType: "schedule", filtersChanged: !automationIsValid, timezoneChanged: scheduleTimezoneIsStale, onCancel: () => onCancel?.(), onEdit: () => {
|
|
153
|
+
// each repair only fixes its own staleness: a timezone-only repair must not
|
|
154
|
+
// replace intentionally snapshotted, still-valid filters (and vice versa)
|
|
155
|
+
if (!automationIsValid) {
|
|
156
|
+
onApplyCurrentFilters();
|
|
157
|
+
applyLatestParameters();
|
|
158
|
+
}
|
|
159
|
+
applyCurrentScheduleTimezone();
|
|
160
|
+
setIsApplyCurrentFiltersDialogOpen(false);
|
|
161
|
+
} }));
|
|
162
|
+
}
|
|
163
|
+
const filtersTab = filtersTabContent === undefined ? (FiltersSlot ? (_jsx(FiltersSlot, { Default: DefaultScheduledEmailDialogFilters, defaultProps: filtersDefaultProps })) : (_jsx(DefaultScheduledEmailDialogFilters, { ...filtersDefaultProps }))) : (filtersTabContent);
|
|
164
|
+
return (_jsxs(_Fragment, { children: [
|
|
165
|
+
_jsx(Overlay, { className: "gd-notifications-channels-dialog-overlay", isModal: true, positionType: "fixed", ensureVisibility: true, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ValidationContextStore, { value: validationContextValue, children: _jsxs(ConfirmDialogBase, { className: "gd-notifications-channels-dialog s-gd-notifications-channels-dialog gd-dialog--wide gd-notifications-channels-dialog--wide", accessibilityConfig: {
|
|
166
|
+
closeButton: {
|
|
167
|
+
ariaLabel: intl.formatMessage({
|
|
168
|
+
id: "dialogs.schedule.email.closeLabel",
|
|
169
|
+
}),
|
|
170
|
+
},
|
|
171
|
+
titleElementId,
|
|
172
|
+
dialogId: SCHEDULED_EMAIL_DIALOG_ID,
|
|
173
|
+
}, returnFocusTo: returnFocusTo, returnFocusAfterClose: false, footerRenderer: () => ActionBarSlot ? (_jsx(ActionBarSlot, { Default: DefaultAutomationDialogActionBar, defaultProps: actionBarDefaultProps })) : (_jsx(DefaultAutomationDialogActionBar, { ...actionBarDefaultProps })), isSubmitDisabled: actionBarDefaultProps.isSubmitDisabled, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: actionBarDefaultProps.onSubmit, headline: undefined, headerLeftButtonRenderer: () => HeaderSlot ? (_jsx(HeaderSlot, { Default: DefaultScheduledEmailDialogHeader, defaultProps: headerDefaultProps })) : (_jsx(DefaultScheduledEmailDialogHeader, { ...headerDefaultProps })), children: [
|
|
174
|
+
_jsx("h2", { className: "sr-only", id: titleElementId, children: intl.formatMessage({ id: "dialogs.schedule.email.accessibilityTitle" }) }), tabs.length > 1 ? (_jsx(UiTabs, { tabs: tabs, selectedTabId: selectedTabId, onTabSelect: handleTabSelect, size: "medium", accessibilityConfig: {
|
|
175
|
+
role: "tablist",
|
|
176
|
+
tabRole: "tab",
|
|
177
|
+
ariaLabel: intl.formatMessage({
|
|
178
|
+
id: "dialogs.schedule.email.accessibilityTitle",
|
|
179
|
+
}),
|
|
180
|
+
}, disableBottomBorder: true })) : null, _jsxs(ScrollablePanel, { className: cx("gd-notifications-channel-dialog-content-wrapper", {
|
|
181
|
+
"gd-notification-channel-dialog-with-automation-filters": true,
|
|
182
|
+
"gd-notification-channel-dialog-with-tabs": tabs.length > 1,
|
|
183
|
+
}), children: [topContent, _jsx("div", { className: "gd-divider-with-margin" }), selectedTabId === "filters" ? (_jsx("div", { className: "gd-schedule-dialog-tab-content", style: tabContentHeight
|
|
184
|
+
? { minHeight: `${tabContentHeight}px` }
|
|
185
|
+
: undefined, children: filtersTab })) : (_jsxs("div", { ref: generalTabContentRef, className: "gd-schedule-dialog-tab-content", children: [!widget && tabIds.length > 1 ? (_jsx(Message, { type: "progress", className: "gd-schedule-dialog-tab-content-info", children: intl.formatMessage({
|
|
186
|
+
id: "dialogs.schedule.email.tabs.info",
|
|
187
|
+
}) })) : null, children, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
188
|
+
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
189
|
+
}), children: errorMessage })) : null, getInvalidDatapoints()
|
|
190
|
+
.filter((invalidDatapoint) => invalidDatapoint.severity === "error")
|
|
191
|
+
.map((invalidDatapoint) => (_jsx(Message, { id: invalidDatapoint.id, type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
192
|
+
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
193
|
+
}), children: invalidDatapoint.message }, invalidDatapoint.id)))] })), bottomContent] })
|
|
194
|
+
] }) }) }) }), scheduledEmailToDelete ? (_jsx(DeleteScheduleConfirmDialog, { scheduledEmail: scheduledEmailToDelete, onCancel: () => setScheduledEmailToDelete(null), onSuccess: handleScheduleDeleteSuccess, onError: onDeleteError })) : null] }));
|
|
195
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogSubjectProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's subject field, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogSubject} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogSubjectProps}; every prop passed here replaces the hook's value for
|
|
8
|
+
* that prop wholesale. Pass `onKeyDownSubmit` to submit on Enter from the subject input — the
|
|
9
|
+
* default dialog passes its save action; without it Enter does nothing here. Renders nothing while
|
|
10
|
+
* `useScheduledEmailDialogContext().isLoading` is true and for an in-platform notification channel
|
|
11
|
+
* (which has no e-mail subject), the same visibility the default dialog gives the field.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export declare function ScheduledEmailDialogSubject(props: Partial<IScheduledEmailDialogSubjectProps>): ReactElement;
|
|
16
|
+
//# sourceMappingURL=ScheduledEmailDialogSubject.d.ts.map
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogSubject.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogSubject.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogSubject.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAMrE;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,iCAAiC,CAAC,GAAG,YAAY,CAM3G"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DefaultScheduledEmailDialogSubject } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogSubject.js";
|
|
3
|
+
import { useIsInPlatformChannel } from "../state/useIsInPlatformChannel.js";
|
|
4
|
+
import { useScheduledEmailDialogSubjectProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
5
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
6
|
+
const noop = () => { };
|
|
7
|
+
/**
|
|
8
|
+
* The scheduled-export dialog's subject field, connected to the dialog's state.
|
|
9
|
+
*
|
|
10
|
+
* Renders {@link DefaultScheduledEmailDialogSubject} with the props of
|
|
11
|
+
* {@link useScheduledEmailDialogSubjectProps}; every prop passed here replaces the hook's value for
|
|
12
|
+
* that prop wholesale. Pass `onKeyDownSubmit` to submit on Enter from the subject input — the
|
|
13
|
+
* default dialog passes its save action; without it Enter does nothing here. Renders nothing while
|
|
14
|
+
* `useScheduledEmailDialogContext().isLoading` is true and for an in-platform notification channel
|
|
15
|
+
* (which has no e-mail subject), the same visibility the default dialog gives the field.
|
|
16
|
+
*
|
|
17
|
+
* @alpha
|
|
18
|
+
*/
|
|
19
|
+
export function ScheduledEmailDialogSubject(props) {
|
|
20
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogSubject, { ...props }) }));
|
|
21
|
+
}
|
|
22
|
+
function ConnectedScheduledEmailDialogSubject({ onKeyDownSubmit, ...overrides }) {
|
|
23
|
+
const defaultProps = useScheduledEmailDialogSubjectProps({ onKeyDownSubmit: onKeyDownSubmit ?? noop });
|
|
24
|
+
const isInPlatformChannel = useIsInPlatformChannel();
|
|
25
|
+
if (isInPlatformChannel) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return _jsx(DefaultScheduledEmailDialogSubject, { ...defaultProps, ...overrides });
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type IScheduledEmailDialogWidgetAttachmentsProps } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The scheduled-export dialog's widget-attachments field, connected to the dialog's state.
|
|
5
|
+
*
|
|
6
|
+
* Renders {@link DefaultScheduledEmailDialogWidgetAttachments} with the props of
|
|
7
|
+
* {@link useScheduledEmailDialogWidgetAttachmentsProps}; every prop passed here replaces the hook's
|
|
8
|
+
* value for that prop wholesale. Renders nothing while `useScheduledEmailDialogContext().isLoading`
|
|
9
|
+
* is true and when the dialog context has no `widget` (a dashboard schedule renders
|
|
10
|
+
* {@link ScheduledEmailDialogDashboardAttachments} instead), the same visibility the default dialog
|
|
11
|
+
* gives the field.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export declare function ScheduledEmailDialogWidgetAttachments(props: Partial<IScheduledEmailDialogWidgetAttachmentsProps>): ReactElement;
|
|
16
|
+
//# sourceMappingURL=ScheduledEmailDialogWidgetAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogWidgetAttachments.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogWidgetAttachments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,2CAA2C,EAAE,MAAM,aAAa,CAAC;AAI/E;;;;;;;;;;;GAWG;AACH,wBAAgB,qCAAqC,CACjD,KAAK,EAAE,OAAO,CAAC,2CAA2C,CAAC,GAC5D,YAAY,CAMd"}
|
package/esm/presentation/automations/scheduledEmail/blocks/ScheduledEmailDialogWidgetAttachments.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
3
|
+
import { DefaultScheduledEmailDialogWidgetAttachments } from "../DefaultScheduledEmailDialog/components/DefaultScheduledEmailDialogWidgetAttachments.js";
|
|
4
|
+
import { useScheduledEmailDialogWidgetAttachmentsProps } from "../state/useScheduledEmailDialogFieldProps.js";
|
|
5
|
+
import { WhenScheduledEmailDialogLoaded } from "./WhenScheduledEmailDialogLoaded.js";
|
|
6
|
+
/**
|
|
7
|
+
* The scheduled-export dialog's widget-attachments field, connected to the dialog's state.
|
|
8
|
+
*
|
|
9
|
+
* Renders {@link DefaultScheduledEmailDialogWidgetAttachments} with the props of
|
|
10
|
+
* {@link useScheduledEmailDialogWidgetAttachmentsProps}; every prop passed here replaces the hook's
|
|
11
|
+
* value for that prop wholesale. Renders nothing while `useScheduledEmailDialogContext().isLoading`
|
|
12
|
+
* is true and when the dialog context has no `widget` (a dashboard schedule renders
|
|
13
|
+
* {@link ScheduledEmailDialogDashboardAttachments} instead), the same visibility the default dialog
|
|
14
|
+
* gives the field.
|
|
15
|
+
*
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export function ScheduledEmailDialogWidgetAttachments(props) {
|
|
19
|
+
return (_jsx(WhenScheduledEmailDialogLoaded, { children: _jsx(ConnectedScheduledEmailDialogWidgetAttachments, { ...props }) }));
|
|
20
|
+
}
|
|
21
|
+
function ConnectedScheduledEmailDialogWidgetAttachments(overrides) {
|
|
22
|
+
const defaultProps = useScheduledEmailDialogWidgetAttachmentsProps();
|
|
23
|
+
const { widget } = useScheduledEmailDialogContext();
|
|
24
|
+
if (!widget) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return _jsx(DefaultScheduledEmailDialogWidgetAttachments, { ...defaultProps, ...overrides });
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsInPlatformChannel.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useIsInPlatformChannel.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD"}
|