DefaultScheduledEmailDialog()
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Default implementation of the scheduled export create/edit dialog.
export declare function DefaultScheduledEmailDialog(props: IDefaultScheduledEmailDialogProps): ReactElement;
Parameters
Parameter | Type | Description |
|---|---|---|
props |
Returns
ReactElement
Remarks
This component is a pure consumer of AutomationsContext, ScheduledEmailDialogContext, and the scheduled export dialog state contexts: it reads org/workspace data, per-dialog state, and the export draft’s state from those contexts rather than from the dashboard store. It must therefore be rendered within an AutomationsContextProvider, a ScheduledEmailDialogContextProvider (for the create/edit flow), and a ScheduledEmailDialogStateProvider, whose state model establishes itself once useScheduledEmailDialogContext().isLoading is false for the first time and stays mounted from then on. Inside a Dashboard, the scheduled export connector supplies the first two providers above the ScheduledEmailDialogComponent slot and mounts ScheduledEmailDialogStateProvider around the resolved slot component — so the default component, and any wholesale slot replacement, inherit all three contexts automatically and require no extra wiring.
The providers are intentionally hoisted above the slot rather than built inside this component: that is what lets a wholesale replacement receive the same contexts. Rendering this component outside those providers throws at runtime.
The dialog is ScheduledEmailDialogShell() — the chrome: overlay, frame, header row, action bar, the General/Filters tabs, the body’s messages, the stale-filters and delete confirmation steps, the loading skeleton — around the exported region renders (DefaultScheduledEmailDialogDestination(), DefaultScheduledEmailDialogRecipients(), DefaultScheduledEmailDialogTimezone(), fed by useScheduledEmailDialogDestinationProps() and siblings; the header, action bar and the Filters tab’s DefaultScheduledEmailDialogFilters() are the shell’s) and the General-tab field blocks (ScheduledEmailDialogRecurrence(), ScheduledEmailDialogSubject(), ScheduledEmailDialogMessage(), ScheduledEmailDialogWidgetAttachments(), ScheduledEmailDialogDashboardAttachments(), ScheduledEmailDialogEvaluationMode()). A custom ScheduledEmailDialogComponent that keeps this chrome but owns the arrangement renders ScheduledEmailDialogShell() around the blocks it wants (see its example); one that owns the chrome too places the blocks (ScheduledEmailDialogFilters() and siblings) in its own markup and reads or writes the same draft through useScheduledExportDraft() and useScheduledExportActions().
Slots render only in the fully rendered dialog: not while the dialog context reports loading, and not while the stale-filters confirmation step is shown. The Filters slot additionally renders only while the Filters tab is selected — see IScheduledEmailDialogSlots.Filters.