@gooddata/sdk-ui-dashboard 11.54.0-alpha.3 → 11.54.0-alpha.5
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 +92923 -17333
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/automation/index.d.ts +6 -0
- package/esm/_staging/automation/index.d.ts.map +1 -1
- package/esm/_staging/automation/index.js +7 -0
- package/esm/_staging/dashboard/flexibleLayout/builder/utils.d.ts +45 -0
- package/esm/_staging/dashboard/flexibleLayout/builder/utils.d.ts.map +1 -0
- package/esm/_staging/dashboard/flexibleLayout/builder/utils.js +54 -0
- package/esm/_staging/dateFilterConfig/fixtures.d.ts +10 -0
- package/esm/_staging/dateFilterConfig/fixtures.d.ts.map +1 -0
- package/esm/_staging/dateFilterConfig/fixtures.js +60 -0
- package/esm/_staging/layout/coordinates.mock.d.ts +17 -0
- package/esm/_staging/layout/coordinates.mock.d.ts.map +1 -0
- package/esm/_staging/layout/coordinates.mock.js +103 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/model/DashboardTester.d.ts +150 -0
- package/esm/model/DashboardTester.d.ts.map +1 -0
- package/esm/model/DashboardTester.js +208 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +27 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadAutomationTimezone.d.ts +9 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadAutomationTimezone.d.ts.map +1 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadAutomationTimezone.js +27 -0
- package/esm/model/commandHandlers/timezone/changeDashboardTimezoneOverrideHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/timezone/changeDashboardTimezoneOverrideHandler.js +2 -11
- package/esm/model/commands/timezone.d.ts +10 -2
- package/esm/model/commands/timezone.d.ts.map +1 -1
- package/esm/model/commands/timezone.js +5 -2
- package/esm/model/fixtures/CatalogAvailability.fixtures.d.ts +14 -0
- package/esm/model/fixtures/CatalogAvailability.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/CatalogAvailability.fixtures.js +57 -0
- package/esm/model/fixtures/ComplexDashboard.fixtures.d.ts +56 -0
- package/esm/model/fixtures/ComplexDashboard.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/ComplexDashboard.fixtures.js +71 -0
- package/esm/model/fixtures/Dashboard.fixtures.d.ts +10 -0
- package/esm/model/fixtures/Dashboard.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/Dashboard.fixtures.js +13 -0
- package/esm/model/fixtures/Insights.fixtures.d.ts +6 -0
- package/esm/model/fixtures/Insights.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/Insights.fixtures.js +11 -0
- package/esm/model/fixtures/Layout.fixtures.d.ts +14 -0
- package/esm/model/fixtures/Layout.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/Layout.fixtures.js +115 -0
- package/esm/model/fixtures/SimpleDashboard.fixtures.d.ts +46 -0
- package/esm/model/fixtures/SimpleDashboard.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/SimpleDashboard.fixtures.js +315 -0
- package/esm/model/fixtures/SimpleDashboardNoDrills.fixtures.d.ts +28 -0
- package/esm/model/fixtures/SimpleDashboardNoDrills.fixtures.d.ts.map +1 -0
- package/esm/model/fixtures/SimpleDashboardNoDrills.fixtures.js +40 -0
- package/esm/plugins/customizationApis/fixtures/TestingDashboardCustomizationLogger.d.ts +16 -0
- package/esm/plugins/customizationApis/fixtures/TestingDashboardCustomizationLogger.d.ts.map +1 -0
- package/esm/plugins/customizationApis/fixtures/TestingDashboardCustomizationLogger.js +30 -0
- package/esm/plugins/customizationApis/utils.d.ts +3 -0
- package/esm/plugins/customizationApis/utils.d.ts.map +1 -0
- package/esm/plugins/customizationApis/utils.js +17 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogDestination.d.ts +6 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogDestination.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogDestination.js +13 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogRecipients.d.ts +7 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogRecipients.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogRecipients.js +12 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +25 -13
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/FormField.d.ts +8 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/FormField.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/FormField.js +8 -0
- package/esm/presentation/automations/alerting/state/fixtures.d.ts +13 -0
- package/esm/presentation/automations/alerting/state/fixtures.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/state/fixtures.js +37 -0
- package/esm/presentation/automations/alerting/types.d.ts +42 -2
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +24 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts +1 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +2 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts +0 -4
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogDestination.d.ts +6 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogDestination.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogDestination.js +10 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogRecipients.d.ts +6 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogRecipients.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogRecipients.js +8 -0
- package/esm/presentation/automations/scheduledEmail/state/fixtures.d.ts +18 -0
- package/esm/presentation/automations/scheduledEmail/state/fixtures.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/state/fixtures.js +105 -0
- package/esm/presentation/automations/scheduledEmail/types.d.ts +52 -3
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/parameterFixtures.d.ts +5 -0
- package/esm/presentation/automations/shared/automationFilters/parameterFixtures.d.ts.map +1 -0
- package/esm/presentation/automations/shared/automationFilters/parameterFixtures.js +22 -0
- package/esm/presentation/automations/shared/slots/types.d.ts +67 -1
- package/esm/presentation/automations/shared/slots/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/test/fixtures.d.ts +9 -0
- package/esm/presentation/automations/shared/test/fixtures.d.ts.map +1 -0
- package/esm/presentation/automations/shared/test/fixtures.js +101 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayout.d.ts +17 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayout.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayout.js +18 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutItemRenderer.d.ts +12 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutItemRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutItemRenderer.js +26 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutMocks.d.ts +20 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutMocks.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutMocks.js +95 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutRowRenderer.d.ts +14 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutRowRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutRowRenderer.js +9 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorder.d.ts +9 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorder.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorder.js +17 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorderMarker.d.ts +6 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorderMarker.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionBorderMarker.js +10 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeader.d.ts +9 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeader.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeader.js +14 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeaderRenderer.d.ts +8 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeaderRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionHeaderRenderer.js +49 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionRenderer.d.ts +7 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutSectionRenderer.js +33 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutTypes.d.ts +62 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutTypes.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutTypes.js +2 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidget.d.ts +11 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidget.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidget.js +4 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidgetRenderer.d.ts +8 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidgetRenderer.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/DashboardEditLayoutWidgetRenderer.js +28 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/LayoutTypes.d.ts +26 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/LayoutTypes.d.ts.map +1 -0
- package/esm/presentation/flexibleLayout/useInKD/DashboardEditLayout/LayoutTypes.js +21 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +1 -1
- package/esm/sdk-ui-dashboard.d.ts +172 -5
- package/package.json +21 -21
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export declare function FormField({ label, children, htmlFor, fullWidth }: {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
htmlFor?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/FormField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAiB,EACpB,EAAE;IACC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,2CAmBA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function FormField({ label, children, htmlFor, fullWidth = false, }) {
|
|
3
|
+
return (_jsxs("div", { className: "gd-input-component gd-input-component--no-last-child-margin gd-dashboard-alerting-dialog-form-field", children: [
|
|
4
|
+
_jsx("div", { className: "gd-dashboard-alerting-dialog-form-field__label-container", children: _jsx("label", { className: "gd-label gd-dashboard-alerting-dialog-form-field__label", htmlFor: htmlFor, children: label }) }), _jsx("div", { className: fullWidth
|
|
5
|
+
? "gd-dashboard-alerting-dialog-form-field__content-container-full-width"
|
|
6
|
+
: "gd-dashboard-alerting-dialog-form-field__content-container", children: children })
|
|
7
|
+
] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IdentifierRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IAlertingDialogContextValue } from "../../contexts/AlertingDialogContext.js";
|
|
3
|
+
import { type AlertMetric } from "../types.js";
|
|
4
|
+
export declare const AUTOMATIONS_CONTEXT: import("../../contexts/AutomationsContext.js").IAutomationsContextValue;
|
|
5
|
+
export declare const CURRENT_USER: import("@gooddata/sdk-model").IUser;
|
|
6
|
+
export declare const NEXT_FILTER: import("@gooddata/sdk-model").FilterContextItem;
|
|
7
|
+
export declare const SENTINEL_CHANNEL: import("@gooddata/sdk-model").INotificationChannelIdentifier;
|
|
8
|
+
export declare const SENTINEL_WIDGET: import("@gooddata/sdk-model").IInsightWidget;
|
|
9
|
+
export declare const WORKSPACE_PARAMETER: import("@gooddata/sdk-model").IParameterMetadataObject;
|
|
10
|
+
export declare const SENTINEL_MEASURE: AlertMetric;
|
|
11
|
+
export declare const PARAMETER_REF: IdentifierRef;
|
|
12
|
+
export declare const ALERTING_DIALOG_CONTEXT: IAlertingDialogContextValue;
|
|
13
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAS3F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,mBAAmB,yEAA6B,CAAC;AAC9D,eAAO,MAAM,YAAY,qCAAsB,CAAC;AAChD,eAAO,MAAM,WAAW,iDAAqB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,8DAA0B,CAAC;AACxD,eAAO,MAAM,eAAe,8CAAyB,CAAC;AACtD,eAAO,MAAM,mBAAmB,wDAA6B,CAAC;AAE9D,eAAO,MAAM,gBAAgB,EAAE,WAI9B,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,aAA6C,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,2BAmBrC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { idRef, newMeasure } from "@gooddata/sdk-model";
|
|
3
|
+
import { AUTOMATIONS_CONTEXT as SHARED_AUTOMATIONS_CONTEXT, CURRENT_USER as SHARED_CURRENT_USER, NEXT_FILTER as SHARED_NEXT_FILTER, SENTINEL_CHANNEL as SHARED_SENTINEL_CHANNEL, SENTINEL_WIDGET as SHARED_SENTINEL_WIDGET, WORKSPACE_PARAMETER as SHARED_WORKSPACE_PARAMETER, } from "../../shared/test/fixtures.js";
|
|
4
|
+
export const AUTOMATIONS_CONTEXT = SHARED_AUTOMATIONS_CONTEXT;
|
|
5
|
+
export const CURRENT_USER = SHARED_CURRENT_USER;
|
|
6
|
+
export const NEXT_FILTER = SHARED_NEXT_FILTER;
|
|
7
|
+
export const SENTINEL_CHANNEL = SHARED_SENTINEL_CHANNEL;
|
|
8
|
+
export const SENTINEL_WIDGET = SHARED_SENTINEL_WIDGET;
|
|
9
|
+
export const WORKSPACE_PARAMETER = SHARED_WORKSPACE_PARAMETER;
|
|
10
|
+
export const SENTINEL_MEASURE = {
|
|
11
|
+
measure: newMeasure("m1", (m) => m.localId("m1")),
|
|
12
|
+
isPrimary: true,
|
|
13
|
+
comparators: [],
|
|
14
|
+
};
|
|
15
|
+
// A catalog parameter with a matching workspace definition, so a stored `{ref, value}` override
|
|
16
|
+
// survives `reconstructAutomationParametersFromValues` instead of being dropped as unresolvable.
|
|
17
|
+
export const PARAMETER_REF = idRef("param-1", "parameter");
|
|
18
|
+
export const ALERTING_DIALOG_CONTEXT = {
|
|
19
|
+
mode: "create",
|
|
20
|
+
widget: SENTINEL_WIDGET,
|
|
21
|
+
insight: undefined,
|
|
22
|
+
widgetTitle: undefined,
|
|
23
|
+
dashboardId: undefined,
|
|
24
|
+
dashboardFilters: [],
|
|
25
|
+
hiddenFilters: [],
|
|
26
|
+
executionResultByRef: () => undefined,
|
|
27
|
+
parameterValues: [],
|
|
28
|
+
dashboardParameters: [],
|
|
29
|
+
commonDateFilterId: undefined,
|
|
30
|
+
dashboardEvaluationFrequency: undefined,
|
|
31
|
+
createAlert: () => Promise.reject(new Error("not wired in tests")),
|
|
32
|
+
saveAlert: () => Promise.reject(new Error("not wired in tests")),
|
|
33
|
+
deleteAlert: () => Promise.resolve(),
|
|
34
|
+
alertToEdit: undefined,
|
|
35
|
+
notificationChannels: [SENTINEL_CHANNEL],
|
|
36
|
+
isLoading: false,
|
|
37
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
|
-
import { type IAutomationDialogFiltersProps, type IAutomationDialogHeaderProps, type ISlotProps } from "../shared/slots/types.js";
|
|
4
|
+
import { type IAutomationDialogDestinationProps, type IAutomationDialogFiltersProps, type IAutomationDialogHeaderProps, type IAutomationDialogRecipientsProps, type ISlotProps } from "../shared/slots/types.js";
|
|
5
5
|
/**
|
|
6
6
|
* @alpha
|
|
7
7
|
*/
|
|
@@ -138,6 +138,24 @@ export interface IAlertingDialogSlots {
|
|
|
138
138
|
* updated array, not a delta.
|
|
139
139
|
*/
|
|
140
140
|
Filters?: ComponentType<ISlotProps<IAlertingDialogFiltersProps>>;
|
|
141
|
+
/**
|
|
142
|
+
* Wraps or replaces the dialog's destination region (the "Action" row selecting the
|
|
143
|
+
* notification channel). Must have a stable reference identity — see {@link ISlotProps}.
|
|
144
|
+
*
|
|
145
|
+
* Renders only in the fully rendered dialog — not while the dialog context reports loading,
|
|
146
|
+
* not while the stale-filters confirmation step is shown — **and only when more than one
|
|
147
|
+
* notification channel exists**: with a single channel the default dialog hides the whole
|
|
148
|
+
* row, and the slot with it.
|
|
149
|
+
*/
|
|
150
|
+
Destination?: ComponentType<ISlotProps<IAutomationDialogDestinationProps>>;
|
|
151
|
+
/**
|
|
152
|
+
* Wraps or replaces the dialog's recipients region. Must have a stable reference identity —
|
|
153
|
+
* see {@link ISlotProps}.
|
|
154
|
+
*
|
|
155
|
+
* Renders only in the fully rendered dialog: not while the dialog context reports loading,
|
|
156
|
+
* and not while the stale-filters confirmation step is shown.
|
|
157
|
+
*/
|
|
158
|
+
Recipients?: ComponentType<ISlotProps<IAutomationDialogRecipientsProps>>;
|
|
141
159
|
}
|
|
142
160
|
/**
|
|
143
161
|
* Props of {@link DefaultAlertingDialog}.
|
|
@@ -145,7 +163,9 @@ export interface IAlertingDialogSlots {
|
|
|
145
163
|
* @remarks
|
|
146
164
|
* Extends the shared {@link IAlertingDialogProps} with customization only the default implementation
|
|
147
165
|
* supports. Slots render only in the fully rendered dialog: not while the dialog context reports
|
|
148
|
-
* loading, and not while the stale-filters confirmation step is shown.
|
|
166
|
+
* loading, and not while the stale-filters confirmation step is shown. The Destination slot
|
|
167
|
+
* additionally renders only when more than one notification channel exists — see
|
|
168
|
+
* {@link IAlertingDialogSlots.Destination}.
|
|
149
169
|
*
|
|
150
170
|
* @alpha
|
|
151
171
|
*/
|
|
@@ -153,6 +173,26 @@ export interface IDefaultAlertingDialogProps extends IAlertingDialogProps {
|
|
|
153
173
|
/**
|
|
154
174
|
* Section-level overrides. Each slot receives `{ Default, defaultProps }` and may render its own
|
|
155
175
|
* content (replace) or `<Default {...defaultProps} />` inside its own markup (wrap).
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* The dialog is reached through the `Dashboard` component override; define slot components at
|
|
179
|
+
* module scope (see {@link ISlotProps}):
|
|
180
|
+
* ```tsx
|
|
181
|
+
* function HeaderWithBanner({ Default, defaultProps }: ISlotProps<AlertingDialogHeaderDefaultProps>) {
|
|
182
|
+
* return (
|
|
183
|
+
* <>
|
|
184
|
+
* <WarningBanner>Alerts may take up to 5 minutes.</WarningBanner>
|
|
185
|
+
* <Default {...defaultProps} />
|
|
186
|
+
* </>
|
|
187
|
+
* );
|
|
188
|
+
* }
|
|
189
|
+
*
|
|
190
|
+
* <Dashboard
|
|
191
|
+
* AlertingDialogComponent={(props) => (
|
|
192
|
+
* <DefaultAlertingDialog {...props} slots={{ Header: HeaderWithBanner }} />
|
|
193
|
+
* )}
|
|
194
|
+
* />;
|
|
195
|
+
* ```
|
|
156
196
|
*/
|
|
157
197
|
slots?: IAlertingDialogSlots;
|
|
158
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAA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AG,0BAA0B,GAAG;IACxE,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC/B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B;IAC9E;;;OAGG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAErE;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EACH,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,UAAU,EAClB,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,yBAAyB,CAAC;IAExC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;;;;;;;OAWG;IACH,MAAM,C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@
|
|
|
1
|
-
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA+CA,OAAO,EACH,KAAK,iCAAiC,EAKzC,MAAM,aAAa,CAAC;AA8DrB,wBAAgB,2BAA2B,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACT,KAAK,EACR,EAAE,iCAAiC,2CAglBnC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iCAAiC,2CAYnF"}
|
|
@@ -23,19 +23,18 @@ import { isMobileView } from "../utils/responsive.js";
|
|
|
23
23
|
import { TIMEZONE_DEFAULT } from "../utils/timezone.js";
|
|
24
24
|
import { DashboardAttachments } from "./components/Attachments/DashboardAttachments.js";
|
|
25
25
|
import { WidgetAttachments } from "./components/Attachments/WidgetAttachments.js";
|
|
26
|
-
import { DestinationSelect } from "./components/DestinationSelect/DestinationSelect.js";
|
|
27
26
|
import { EvaluationModeCheckbox } from "./components/EvaluationModeCheckbox/EvaluationModeCheckbox.js";
|
|
28
27
|
import { ScheduledEmailDialogHeader } from "./components/Header/ScheduleEmailDialogHeader.js";
|
|
29
28
|
import { MessageForm } from "./components/MessageForm/MessageForm.js";
|
|
30
|
-
import {
|
|
29
|
+
import { ScheduledEmailDialogDestination } from "./components/ScheduledEmailDialogDestination.js";
|
|
31
30
|
import { ScheduledEmailDialogFilters } from "./components/ScheduledEmailDialogFilters.js";
|
|
31
|
+
import { ScheduledEmailDialogRecipients } from "./components/ScheduledEmailDialogRecipients.js";
|
|
32
32
|
import { ScheduleTimezoneSelect } from "./components/ScheduleTimezoneSelect/ScheduleTimezoneSelect.js";
|
|
33
33
|
import { SubjectForm } from "./components/SubjectForm/SubjectForm.js";
|
|
34
34
|
import { SCHEDULED_EMAIL_DIALOG_ID } from "./constants.js";
|
|
35
35
|
import { DefaultLoadingScheduledEmailDialog } from "./DefaultLoadingScheduledEmailDialog.js";
|
|
36
36
|
import { useElementHeightSnapshot } from "./hooks/useElementHeightSnapshot.js";
|
|
37
37
|
import { useSaveScheduledEmailToBackend } from "./hooks/useSaveScheduledEmailToBackend.js";
|
|
38
|
-
const OVERLAY_POSITION_TYPE = "sameAsTarget";
|
|
39
38
|
const CLOSE_ON_PARENT_SCROLL = true;
|
|
40
39
|
const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z_INDEX);
|
|
41
40
|
function ScheduledEmailDialogFooter({ isWhiteLabeled, helpTextId, scheduledExportToEdit, isSavingScheduledEmail, onDeleteClick, }) {
|
|
@@ -46,6 +45,8 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
46
45
|
const HeaderSlot = slots?.Header;
|
|
47
46
|
const FiltersSlot = slots?.Filters;
|
|
48
47
|
const TimezoneSlot = slots?.Timezone;
|
|
48
|
+
const DestinationSlot = slots?.Destination;
|
|
49
|
+
const RecipientsSlot = slots?.Recipients;
|
|
49
50
|
const intl = useIntl();
|
|
50
51
|
const dialogTitleRef = useRef(null);
|
|
51
52
|
const generalTabContentRef = useRef(null);
|
|
@@ -59,7 +60,7 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
59
60
|
setScheduledEmailToDelete(null);
|
|
60
61
|
};
|
|
61
62
|
const { locale, dashboardTitle, dateFormat, weekStart, maxAutomationsRecipients, allowHourlyRecurrence, isCrossFiltering, isExecutionTimestampMode, isSlidesExportEnabled, isAccessibilityModeEnabled, enableAutomationEvaluationMode, } = useDefaultScheduledEmailDialogData();
|
|
62
|
-
const { editedAutomation,
|
|
63
|
+
const { editedAutomation, startDate, isTimezoneFeatureEnabled, canSelectScheduleTimezone, scheduleTimezoneSelection, defaultResolvedTimezone, scheduleTimezoneIsStale, } = useScheduledExportDraft();
|
|
63
64
|
const { onTitleChange, onRecurrenceChange, onEvaluationModeChange, onDestinationChange, onRecipientsChange, onSubjectChange, onMessageChange, onDashboardAttachmentsChange, onWidgetAttachmentsChange, onXlsxSettingsChange, onPdfSettingsChange, onCsvSettingsChange, onCsvRawSettingsChange, onSlidesTemplateIdChange, onScheduleTimezoneChange, applyCurrentScheduleTimezone, } = useScheduledExportActions();
|
|
64
65
|
const { defaultUser } = useScheduledExportData();
|
|
65
66
|
const { selectedFilters, availableFilters, storeFilters, filtersByTab, editedFiltersByTab, onFiltersChange, onFiltersByTabChange, onApplyCurrentFilters, onStoreFiltersChange, automationIsValid, parametersEnabled, visibleParametersByTab, availableParametersByTab, flatTabId, onParameterAdd, onParameterChange, onParameterDelete, onParameterAddByTab, onParameterChangeByTab, onParameterDeleteByTab, applyLatest: applyLatestParameters, } = useScheduledExportFilters();
|
|
@@ -174,6 +175,24 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
174
175
|
onParameterDeleteByTab,
|
|
175
176
|
parametersEnabled,
|
|
176
177
|
};
|
|
178
|
+
const destinationDefaultProps = {
|
|
179
|
+
notificationChannels,
|
|
180
|
+
selectedNotificationChannelId: editedAutomation.notificationChannel,
|
|
181
|
+
onChange: onDestinationChange,
|
|
182
|
+
};
|
|
183
|
+
const recipientsDefaultProps = {
|
|
184
|
+
loggedUser: defaultUser,
|
|
185
|
+
value: editedAutomation.recipients ?? [],
|
|
186
|
+
onChange: onRecipientsChange,
|
|
187
|
+
allowEmptySelection: true,
|
|
188
|
+
allowOnlyLoggedUserRecipients,
|
|
189
|
+
allowExternalRecipients,
|
|
190
|
+
maxRecipients: maxAutomationsRecipients,
|
|
191
|
+
notificationChannels,
|
|
192
|
+
notificationChannelId: editedAutomation.notificationChannel,
|
|
193
|
+
onKeyDownSubmit: handleSubmitForm,
|
|
194
|
+
externalRecipientOverride,
|
|
195
|
+
};
|
|
177
196
|
return (_jsxs(_Fragment, { children: [
|
|
178
197
|
_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", isPositive: true, cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: scheduledExportToEdit
|
|
179
198
|
? intl.formatMessage({ id: `dialogs.schedule.email.save` })
|
|
@@ -230,7 +249,7 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
230
249
|
? getTimezoneDisplayLabel(editedAutomation.schedule?.timezone ??
|
|
231
250
|
TIMEZONE_DEFAULT.identifier)
|
|
232
251
|
: (editedAutomation.schedule?.timezone ??
|
|
233
|
-
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(
|
|
252
|
+
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" }), DestinationSlot ? (_jsx(DestinationSlot, { Default: ScheduledEmailDialogDestination, defaultProps: destinationDefaultProps })) : (_jsx(ScheduledEmailDialogDestination, { ...destinationDefaultProps })), _jsx(ContentDivider, { className: "gd-divider-with-margin" }), RecipientsSlot ? (_jsx(RecipientsSlot, { Default: ScheduledEmailDialogRecipients, defaultProps: recipientsDefaultProps })) : (_jsx(ScheduledEmailDialogRecipients, { ...recipientsDefaultProps })), isInPlatformChannel ? null : (_jsxs(_Fragment, { children: [
|
|
234
253
|
_jsx(SubjectForm, { dashboardTitle: dashboardTitle, editedAutomation: editedAutomation, onChange: onSubjectChange, onKeyDownSubmit: handleSaveScheduledEmail, isSubmitDisabled: isSubmitDisabled }), _jsx(MessageForm, { onChange: onMessageChange, value: editedAutomation.details?.message ?? "" })
|
|
235
254
|
] })), 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, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })) : (_jsx(DashboardAttachments, { selectedAttachments: selectedAttachments, dashboardFilters: dashboardFilters, isCrossFiltering: isCrossFiltering, onDashboardAttachmentsChange: onDashboardAttachmentsChange, xlsxSettings: xlsxSettings, onXlsxSettingsChange: onXlsxSettingsChange, isSlidesExportEnabled: isSlidesExportEnabled, exportTemplates: exportTemplates, slidesTemplateIds: slidesTemplateIds, onSlidesTemplateIdChange: onSlidesTemplateIdChange })), canSelectScheduleTimezone ? (TimezoneSlot ? (_jsx(TimezoneSlot, { Default: ScheduleTimezoneSelect, defaultProps: timezoneDefaultProps })) : (_jsx(ScheduleTimezoneSelect, { ...timezoneDefaultProps }))) : null, enableAutomationEvaluationMode ? (_jsx(EvaluationModeCheckbox, { isShared: editedAutomation.evaluationMode === "SHARED", onChange: onEvaluationModeChange })) : null, errorMessage ? (_jsx(Message, { type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
236
255
|
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
@@ -5,10 +5,6 @@ interface IRecipientsSelectProps {
|
|
|
5
5
|
* Currently selected recipients.
|
|
6
6
|
*/
|
|
7
7
|
value: IAutomationRecipient[];
|
|
8
|
-
/**
|
|
9
|
-
* Originally selected recipients of a edited schedule
|
|
10
|
-
*/
|
|
11
|
-
originalValue: IAutomationRecipient[];
|
|
12
8
|
/**
|
|
13
9
|
* Callback to be called, when recipients are changed.
|
|
14
10
|
*/
|
|
@@ -62,6 +58,6 @@ interface IRecipientsSelectProps {
|
|
|
62
58
|
*/
|
|
63
59
|
externalRecipientOverride?: string;
|
|
64
60
|
}
|
|
65
|
-
export declare function RecipientsSelect({ id, value,
|
|
61
|
+
export declare function RecipientsSelect({ id, value, onChange, loggedUser, allowEmptySelection, allowExternalRecipients, allowOnlyLoggedUserRecipients, maxRecipients, className, notificationChannels, notificationChannelId, showLabel, onKeyDownSubmit, externalRecipientOverride }: IRecipientsSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
66
62
|
export {};
|
|
67
63
|
//# sourceMappingURL=RecipientsSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecipientsSelect.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAIpD,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAU7B,UAAU,sBAAsB;IAC5B;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"RecipientsSelect.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAIpD,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAU7B,UAAU,sBAAsB;IAC5B;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,QAAQ,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,EAAE,EACF,KAAK,EACL,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,SAAgB,EAChB,eAAe,EACf,yBAAyB,EAC5B,EAAE,sBAAsB,2CAuExB"}
|
|
@@ -8,7 +8,7 @@ import { createUser, matchRecipient } from "../../../utils/users.js";
|
|
|
8
8
|
import { isEmail } from "../../../utils/validate.js";
|
|
9
9
|
import { RecipientsSelectRenderer } from "./RecipientsSelectRenderer.js";
|
|
10
10
|
import { useWorkspaceUsersSearch } from "./useWorkspaceUsersSearch.js";
|
|
11
|
-
export function RecipientsSelect({ id, value,
|
|
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({
|
|
14
14
|
enabled: isServerSearch,
|
|
@@ -39,6 +39,6 @@ export function RecipientsSelect({ id, value, originalValue, onChange, loggedUse
|
|
|
39
39
|
const hasSettledResults = !isLoading && (isServerSearch ? users !== undefined : Boolean(search));
|
|
40
40
|
const announcedResultValues = useMemo(() => options.slice(0, DETAILED_ANNOUNCEMENT_THRESHOLD).map((option) => option.name ?? option.id), [options]);
|
|
41
41
|
return (_jsxs(_Fragment, { children: [
|
|
42
|
-
_jsx(UiSearchResultsAnnouncement, { totalResults: hasSettledResults ? options.length : undefined, resultValues: announcedResultValues }), _jsx(RecipientsSelectRenderer, { id: id, canListUsersInProject: true, isMulti: true, options: options, value: value,
|
|
42
|
+
_jsx(UiSearchResultsAnnouncement, { totalResults: hasSettledResults ? options.length : undefined, resultValues: announcedResultValues }), _jsx(RecipientsSelectRenderer, { id: id, canListUsersInProject: true, isMulti: true, options: options, value: value, onChange: onChange, onSearch: onSearch, onActivate: onActivate, isLoading: isLoading, loggedUser: loggedUser, allowOnlyLoggedUserRecipients: allowOnlyLoggedUserRecipients, allowEmptySelection: allowEmptySelection, allowExternalRecipients: allowExternalRecipients, maxRecipients: maxRecipients, className: className, notificationChannel: notificationChannel, usersError: usersError, showLabel: showLabel, onKeyDownSubmit: onKeyDownSubmit, externalRecipientOverride: externalRecipientOverride })
|
|
43
43
|
] }));
|
|
44
44
|
}
|
|
@@ -6,10 +6,6 @@ export interface IRecipientsSelectRendererProps {
|
|
|
6
6
|
* Currently selected recipients.
|
|
7
7
|
*/
|
|
8
8
|
value: IAutomationRecipient[];
|
|
9
|
-
/**
|
|
10
|
-
* Originally selected recipients of a edited schedule
|
|
11
|
-
*/
|
|
12
|
-
originalValue: IAutomationRecipient[];
|
|
13
9
|
/**
|
|
14
10
|
* Recipients to display in the autocomplete.
|
|
15
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecipientsSelectRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAqE,MAAM,OAAO,CAAC;AAiB9G,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAE1C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,kBAAkB,CAAC;AA8F1B,MAAM,WAAW,8BAA8B;IAC3C;;OAEG;IACH,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"RecipientsSelectRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src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G;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAQD,eAAO,MAAM,wBAAwB,sEA+vBnC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IAutomationDialogDestinationProps } from "../../../shared/slots/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation of the scheduled email dialog's destination region.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ScheduledEmailDialogDestination({ notificationChannels, selectedNotificationChannelId, onChange }: IAutomationDialogDestinationProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ScheduledEmailDialogDestination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogDestination.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogDestination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAOxF;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,EAC5C,oBAAoB,EACpB,6BAA6B,EAC7B,QAAQ,EACX,EAAE,iCAAiC,2CAUnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DestinationSelect } from "./DestinationSelect/DestinationSelect.js";
|
|
3
|
+
const OVERLAY_POSITION_TYPE = "sameAsTarget";
|
|
4
|
+
const CLOSE_ON_PARENT_SCROLL = true;
|
|
5
|
+
/**
|
|
6
|
+
* Default implementation of the scheduled email dialog's destination region.
|
|
7
|
+
*/
|
|
8
|
+
export function ScheduledEmailDialogDestination({ notificationChannels, selectedNotificationChannelId, onChange, }) {
|
|
9
|
+
return (_jsx(DestinationSelect, { notificationChannels: notificationChannels, selectedItemId: selectedNotificationChannelId, onChange: onChange, closeOnParentScroll: CLOSE_ON_PARENT_SCROLL, overlayPositionType: OVERLAY_POSITION_TYPE }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IScheduledEmailDialogRecipientsProps } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation of the scheduled email dialog's recipients region.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ScheduledEmailDialogRecipients(props: IScheduledEmailDialogRecipientsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ScheduledEmailDialogRecipients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogRecipients.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogRecipients.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,gBAAgB,CAAC;AAI3E;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,oCAAoC,2CAEzF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RecipientsSelect } from "./RecipientsSelect/RecipientsSelect.js";
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation of the scheduled email dialog's recipients region.
|
|
5
|
+
*/
|
|
6
|
+
export function ScheduledEmailDialogRecipients(props) {
|
|
7
|
+
return _jsx(RecipientsSelect, { id: "schedule.email.recipients", ...props });
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DashboardAttachmentType, type IAutomationMetadataObjectDefinition, type IExportDefinitionDashboardRequestPayload, type IExportDefinitionVisualizationObjectRequestPayload, type IInsight, type IWidget, type WidgetAttachmentType } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IScheduledEmailDialogContextValue } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
3
|
+
import { type IScheduledExportDataContextValue } from "./ScheduledExportDataContext.js";
|
|
4
|
+
import { type IScheduledExportDraftContextValue } from "./ScheduledExportDraftContext.js";
|
|
5
|
+
export declare const AUTOMATIONS_CONTEXT: import("../../contexts/AutomationsContext.js").IAutomationsContextValue;
|
|
6
|
+
export declare const CURRENT_USER: import("@gooddata/sdk-model").IUser;
|
|
7
|
+
export declare const NEXT_FILTER: import("@gooddata/sdk-model").FilterContextItem;
|
|
8
|
+
export declare const SENTINEL_CHANNEL: import("@gooddata/sdk-model").INotificationChannelIdentifier;
|
|
9
|
+
export declare const WORKSPACE_PARAMETER: import("@gooddata/sdk-model").IParameterMetadataObject;
|
|
10
|
+
export declare const SENTINEL_WIDGET: IWidget;
|
|
11
|
+
export declare const SENTINEL_INSIGHT: IInsight;
|
|
12
|
+
export declare const SCHEDULED_EMAIL_DIALOG_CONTEXT: IScheduledEmailDialogContextValue;
|
|
13
|
+
export declare const DRAFT_FIXTURE: IScheduledExportDraftContextValue;
|
|
14
|
+
export declare const DATA_FIXTURE: IScheduledExportDataContextValue;
|
|
15
|
+
export declare const makeDashboardExportDefinition: (format: DashboardAttachmentType, requestPayloadOverrides?: Partial<IExportDefinitionDashboardRequestPayload>) => import("@gooddata/sdk-model").IExportDefinitionMetadataObject | import("@gooddata/sdk-model").IExportDefinitionMetadataObjectDefinition;
|
|
16
|
+
export declare const makeWidgetExportDefinition: (format: WidgetAttachmentType, requestPayloadOverrides?: Partial<IExportDefinitionVisualizationObjectRequestPayload>) => import("@gooddata/sdk-model").IExportDefinitionMetadataObject | import("@gooddata/sdk-model").IExportDefinitionMetadataObjectDefinition;
|
|
17
|
+
export declare const makeAutomation: (overrides?: Partial<IAutomationMetadataObjectDefinition>) => IAutomationMetadataObjectDefinition;
|
|
18
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,wCAAwC,EAC7C,KAAK,kDAAkD,EACvD,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAE5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAUvG,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAE1F,eAAO,MAAM,mBAAmB,yEAA6B,CAAC;AAC9D,eAAO,MAAM,YAAY,qCAAsB,CAAC;AAChD,eAAO,MAAM,WAAW,iDAAqB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,8DAA0B,CAAC;AACxD,eAAO,MAAM,mBAAmB,wDAA6B,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,OAG7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAY9B,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,iCAsB5C,CAAC;AAYF,eAAO,MAAM,aAAa,EAAE,iCAa3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,gCAG1B,CAAC;AAIF,eAAO,MAAM,6BAA6B,2PAaxC,CAAC;AAEH,eAAO,MAAM,0BAA0B,kQAarC,CAAC;AAEH,eAAO,MAAM,cAAc,mGASzB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { idRef, } from "@gooddata/sdk-model";
|
|
3
|
+
import { AUTOMATIONS_CONTEXT as SHARED_AUTOMATIONS_CONTEXT, CURRENT_USER as SHARED_CURRENT_USER, NEXT_FILTER as SHARED_NEXT_FILTER, SENTINEL_CHANNEL as SHARED_SENTINEL_CHANNEL, SENTINEL_WIDGET as SHARED_SENTINEL_WIDGET, WORKSPACE_PARAMETER as SHARED_WORKSPACE_PARAMETER, } from "../../shared/test/fixtures.js";
|
|
4
|
+
export const AUTOMATIONS_CONTEXT = SHARED_AUTOMATIONS_CONTEXT;
|
|
5
|
+
export const CURRENT_USER = SHARED_CURRENT_USER;
|
|
6
|
+
export const NEXT_FILTER = SHARED_NEXT_FILTER;
|
|
7
|
+
export const SENTINEL_CHANNEL = SHARED_SENTINEL_CHANNEL;
|
|
8
|
+
export const WORKSPACE_PARAMETER = SHARED_WORKSPACE_PARAMETER;
|
|
9
|
+
export const SENTINEL_WIDGET = {
|
|
10
|
+
...SHARED_SENTINEL_WIDGET,
|
|
11
|
+
insight: idRef("insight-1", "insight"),
|
|
12
|
+
};
|
|
13
|
+
export const SENTINEL_INSIGHT = {
|
|
14
|
+
insight: {
|
|
15
|
+
identifier: "insight-1",
|
|
16
|
+
uri: "/insight-1",
|
|
17
|
+
ref: idRef("insight-1", "insight"),
|
|
18
|
+
title: "Insight",
|
|
19
|
+
visualizationUrl: "local:table",
|
|
20
|
+
buckets: [],
|
|
21
|
+
filters: [],
|
|
22
|
+
sorts: [],
|
|
23
|
+
properties: {},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const SCHEDULED_EMAIL_DIALOG_CONTEXT = {
|
|
27
|
+
widget: undefined,
|
|
28
|
+
insight: undefined,
|
|
29
|
+
widgetTitle: undefined,
|
|
30
|
+
dashboardId: "dashboard-1",
|
|
31
|
+
dashboardTitle: "Dashboard",
|
|
32
|
+
dashboardFilters: undefined,
|
|
33
|
+
hiddenFilters: [],
|
|
34
|
+
commonDateFilterId: undefined,
|
|
35
|
+
exportParametersByTab: {},
|
|
36
|
+
exportTemplates: [],
|
|
37
|
+
dateFormat: "MM/dd/yyyy",
|
|
38
|
+
isCrossFiltering: false,
|
|
39
|
+
commonDateFilterMode: "active",
|
|
40
|
+
dateFiltersModeMap: new Map(),
|
|
41
|
+
attributeFiltersModeMap: new Map(),
|
|
42
|
+
createScheduledEmail: () => Promise.reject(new Error("not wired in tests")),
|
|
43
|
+
saveScheduledEmail: () => Promise.reject(new Error("not wired in tests")),
|
|
44
|
+
deleteScheduledEmail: () => Promise.resolve(),
|
|
45
|
+
scheduledExportToEdit: undefined,
|
|
46
|
+
notificationChannels: [SENTINEL_CHANNEL],
|
|
47
|
+
isLoading: false,
|
|
48
|
+
};
|
|
49
|
+
const EDITED_AUTOMATION = {
|
|
50
|
+
type: "automation",
|
|
51
|
+
title: "Draft",
|
|
52
|
+
notificationChannel: SENTINEL_CHANNEL.id,
|
|
53
|
+
recipients: [],
|
|
54
|
+
exportDefinitions: [],
|
|
55
|
+
schedule: { cron: "0 0 * * *", firstRun: "2026-01-01T00:00:00.000Z", timezone: "Europe/Prague" },
|
|
56
|
+
details: { subject: "", message: "" },
|
|
57
|
+
};
|
|
58
|
+
export const DRAFT_FIXTURE = {
|
|
59
|
+
editedAutomation: EDITED_AUTOMATION,
|
|
60
|
+
originalAutomation: EDITED_AUTOMATION,
|
|
61
|
+
startDate: new Date("2026-01-01T00:00:00.000Z"),
|
|
62
|
+
isCronValid: true,
|
|
63
|
+
isTitleValid: true,
|
|
64
|
+
isSubjectValid: false,
|
|
65
|
+
isOnMessageValid: true,
|
|
66
|
+
isTimezoneFeatureEnabled: false,
|
|
67
|
+
canSelectScheduleTimezone: false,
|
|
68
|
+
scheduleTimezoneSelection: { id: undefined, shouldSave: false },
|
|
69
|
+
defaultResolvedTimezone: undefined,
|
|
70
|
+
scheduleTimezoneIsStale: false,
|
|
71
|
+
};
|
|
72
|
+
export const DATA_FIXTURE = {
|
|
73
|
+
defaultUser: { type: "user", id: "user-1", email: "user1@example.com" },
|
|
74
|
+
defaultRecipient: { type: "user", id: "recipient-1", email: "recipient1@example.com" },
|
|
75
|
+
};
|
|
76
|
+
export const makeDashboardExportDefinition = (format, requestPayloadOverrides = {}) => ({
|
|
77
|
+
type: "exportDefinition",
|
|
78
|
+
title: "Dashboard export",
|
|
79
|
+
requestPayload: {
|
|
80
|
+
type: "dashboard",
|
|
81
|
+
fileName: "Dashboard",
|
|
82
|
+
format,
|
|
83
|
+
content: { dashboard: "dashboard-1" },
|
|
84
|
+
...requestPayloadOverrides,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
export const makeWidgetExportDefinition = (format, requestPayloadOverrides = {}) => ({
|
|
88
|
+
type: "exportDefinition",
|
|
89
|
+
title: "Widget export",
|
|
90
|
+
requestPayload: {
|
|
91
|
+
type: "visualizationObject",
|
|
92
|
+
fileName: "Widget",
|
|
93
|
+
format,
|
|
94
|
+
content: { visualizationObject: "insight-1", widget: "w1", dashboard: "dashboard-1" },
|
|
95
|
+
...requestPayloadOverrides,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
export const makeAutomation = (overrides = {}) => ({
|
|
99
|
+
type: "automation",
|
|
100
|
+
title: "Test Scheduled Email",
|
|
101
|
+
notificationChannel: "channel-1",
|
|
102
|
+
recipients: [],
|
|
103
|
+
exportDefinitions: [],
|
|
104
|
+
...overrides,
|
|
105
|
+
});
|
|
@@ -3,7 +3,7 @@ import { type FilterContextItem, type IAutomationMetadataObject, type IAutomatio
|
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
4
|
import { type IAutomationFiltersTab } from "../../../model/store/filtering/types.js";
|
|
5
5
|
import { type IAutomationParameter } from "../shared/automationFilters/automationParameters.js";
|
|
6
|
-
import { type IAutomationDialogFiltersProps, type IAutomationDialogHeaderProps, type ISlotProps } from "../shared/slots/types.js";
|
|
6
|
+
import { type IAutomationDialogDestinationProps, type IAutomationDialogFiltersProps, type IAutomationDialogHeaderProps, type IAutomationDialogRecipientsProps, type ISlotProps } from "../shared/slots/types.js";
|
|
7
7
|
/**
|
|
8
8
|
* @alpha
|
|
9
9
|
*/
|
|
@@ -273,6 +273,17 @@ export interface IScheduledEmailDialogTimezoneProps {
|
|
|
273
273
|
* @alpha
|
|
274
274
|
*/
|
|
275
275
|
export type ScheduledEmailDialogTimezoneDefaultProps = IScheduledEmailDialogTimezoneProps;
|
|
276
|
+
/**
|
|
277
|
+
* Props of the default scheduled email dialog's recipients region.
|
|
278
|
+
*
|
|
279
|
+
* @alpha
|
|
280
|
+
*/
|
|
281
|
+
export interface IScheduledEmailDialogRecipientsProps extends IAutomationDialogRecipientsProps {
|
|
282
|
+
/**
|
|
283
|
+
* Submits the dialog from the recipients input. The default dialog always supplies it.
|
|
284
|
+
*/
|
|
285
|
+
onKeyDownSubmit: (e: KeyboardEvent) => void;
|
|
286
|
+
}
|
|
276
287
|
/**
|
|
277
288
|
* Section-level overrides of the default scheduled email dialog.
|
|
278
289
|
*
|
|
@@ -308,6 +319,24 @@ export interface IScheduledEmailDialogSlots {
|
|
|
308
319
|
* hidden, the slot is not rendered either.
|
|
309
320
|
*/
|
|
310
321
|
Timezone?: ComponentType<ISlotProps<ScheduledEmailDialogTimezoneDefaultProps>>;
|
|
322
|
+
/**
|
|
323
|
+
* Wraps or replaces the dialog's destination region (the notification-channel select on the
|
|
324
|
+
* General tab). Must have a stable reference identity — see {@link ISlotProps}.
|
|
325
|
+
*
|
|
326
|
+
* Renders only in the fully rendered dialog **and only while the General tab is selected**:
|
|
327
|
+
* not while the dialog context reports loading, and not while the stale-filters confirmation
|
|
328
|
+
* step is shown. It unmounts — losing any local state — on every switch to the Filters tab.
|
|
329
|
+
*/
|
|
330
|
+
Destination?: ComponentType<ISlotProps<IAutomationDialogDestinationProps>>;
|
|
331
|
+
/**
|
|
332
|
+
* Wraps or replaces the dialog's recipients region on the General tab. Must have a stable
|
|
333
|
+
* reference identity — see {@link ISlotProps}.
|
|
334
|
+
*
|
|
335
|
+
* Renders only in the fully rendered dialog **and only while the General tab is selected**:
|
|
336
|
+
* not while the dialog context reports loading, and not while the stale-filters confirmation
|
|
337
|
+
* step is shown. It unmounts — losing any local state — on every switch to the Filters tab.
|
|
338
|
+
*/
|
|
339
|
+
Recipients?: ComponentType<ISlotProps<IScheduledEmailDialogRecipientsProps>>;
|
|
311
340
|
}
|
|
312
341
|
/**
|
|
313
342
|
* Props of {@link DefaultScheduledEmailDialog}.
|
|
@@ -316,8 +345,8 @@ export interface IScheduledEmailDialogSlots {
|
|
|
316
345
|
* Extends the shared {@link IScheduledEmailDialogProps} with customization only the default implementation
|
|
317
346
|
* supports. Slots render only in the fully rendered dialog: not while the dialog context reports
|
|
318
347
|
* loading, and not while the stale-filters confirmation step is shown. The Filters slot
|
|
319
|
-
* additionally renders only while the Filters tab is selected
|
|
320
|
-
* {@link IScheduledEmailDialogSlots
|
|
348
|
+
* additionally renders only while the Filters tab is selected; the Destination and Recipients
|
|
349
|
+
* slots only while the General tab is — see {@link IScheduledEmailDialogSlots}.
|
|
321
350
|
*
|
|
322
351
|
* @alpha
|
|
323
352
|
*/
|
|
@@ -325,6 +354,26 @@ export interface IDefaultScheduledEmailDialogProps extends IScheduledEmailDialog
|
|
|
325
354
|
/**
|
|
326
355
|
* Section-level overrides. Each slot receives `{ Default, defaultProps }` and may render its own
|
|
327
356
|
* content (replace) or `<Default {...defaultProps} />` inside its own markup (wrap).
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* The dialog is reached through the `Dashboard` component override; define slot components at
|
|
360
|
+
* module scope (see {@link ISlotProps}):
|
|
361
|
+
* ```tsx
|
|
362
|
+
* function RecipientsWithNote({ Default, defaultProps }: ISlotProps<IScheduledEmailDialogRecipientsProps>) {
|
|
363
|
+
* return (
|
|
364
|
+
* <>
|
|
365
|
+
* <Default {...defaultProps} />
|
|
366
|
+
* <Note>External recipients receive a public link.</Note>
|
|
367
|
+
* </>
|
|
368
|
+
* );
|
|
369
|
+
* }
|
|
370
|
+
*
|
|
371
|
+
* <Dashboard
|
|
372
|
+
* ScheduledEmailDialogComponent={(props) => (
|
|
373
|
+
* <DefaultScheduledEmailDialog {...props} slots={{ Recipients: RecipientsWithNote }} />
|
|
374
|
+
* )}
|
|
375
|
+
* />;
|
|
376
|
+
* ```
|
|
328
377
|
*/
|
|
329
378
|
slots?: IScheduledEmailDialogSlots;
|
|
330
379
|
}
|