@gooddata/sdk-ui-dashboard 11.53.0-alpha.0 → 11.53.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +59 -9
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +6 -6
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -4
- package/esm/internal.d.ts +1 -1
- package/esm/internal.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.js +2 -0
- package/esm/model/commandHandlers/dashboard/saveDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/saveDashboardHandler.js +43 -8
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +11 -0
- package/esm/model/store/config/configReducers.d.ts +8 -0
- package/esm/model/store/config/configReducers.d.ts.map +1 -1
- package/esm/model/store/config/configReducers.js +12 -0
- package/esm/model/store/config/configSelectors.d.ts +12 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +16 -0
- package/esm/model/store/config/index.d.ts +2 -0
- package/esm/model/store/config/index.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +1 -0
- package/esm/model/store/drill/drillReducers.d.ts.map +1 -1
- package/esm/model/store/drill/drillReducers.js +2 -1
- package/esm/model/types/commonTypes.d.ts +21 -0
- package/esm/model/types/commonTypes.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts +1 -11
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.js +7 -11
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +6 -3
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +25 -6
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts +1 -5
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/AlertingDialogStateProvider.js +1 -5
- package/esm/presentation/automations/alerting/state/useAlertFormState.d.ts +1 -1
- package/esm/presentation/automations/alerting/state/useAlertFormState.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/useAlertFormState.js +5 -4
- package/esm/presentation/automations/alerting/types.d.ts +51 -15
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +0 -26
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +0 -26
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +0 -9
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +0 -9
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +23 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +43 -6
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Header/ScheduleEmailDialogHeader.d.ts +1 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Header/ScheduleEmailDialogHeader.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Header/ScheduleEmailDialogHeader.js +10 -14
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.js +3 -2
- package/esm/presentation/automations/scheduledEmail/types.d.ts +55 -15
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +2 -2
- package/esm/presentation/automations/shared/filters/conversions.d.ts +6 -6
- package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
- package/esm/presentation/automations/shared/filters/conversions.js +48 -30
- package/esm/presentation/automations/shared/filters/index.d.ts +1 -1
- package/esm/presentation/automations/shared/filters/index.d.ts.map +1 -1
- package/esm/presentation/automations/shared/filters/index.js +1 -1
- package/esm/presentation/automations/shared/slots/types.d.ts +58 -0
- package/esm/presentation/automations/shared/slots/types.d.ts.map +1 -0
- package/esm/presentation/automations/shared/slots/types.js +2 -0
- package/esm/presentation/automations/shared/utils/automationTitle.d.ts +5 -0
- package/esm/presentation/automations/shared/utils/automationTitle.d.ts.map +1 -0
- package/esm/presentation/automations/shared/utils/automationTitle.js +7 -0
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js +10 -0
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +5 -2
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts +2 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightList.js +2 -2
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListCore.js +3 -3
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListItemWrapper.d.ts +2 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListItemWrapper.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DraggableInsightListItemWrapper.js +3 -2
- package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardInner.js +9 -5
- package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts +5 -0
- package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts.map +1 -0
- package/esm/presentation/dashboard/components/DashboardSkeleton.js +30 -0
- package/esm/presentation/dragAndDrop/WrapInsightListItemWithDrag.d.ts +1 -1
- package/esm/presentation/dragAndDrop/WrapInsightListItemWithDrag.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/WrapInsightListItemWithDrag.js +3 -3
- package/esm/presentation/dragAndDrop/draggableParameterFilter/DefaultParameterDraggingComponent.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableParameterFilter/DefaultParameterDraggingComponent.js +9 -2
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableInsightListItem.d.ts +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableInsightListItem.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableInsightListItem.js +2 -2
- package/esm/presentation/dragAndDrop/types.d.ts +2 -0
- package/esm/presentation/dragAndDrop/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +15 -3
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.js +4 -3
- package/esm/presentation/insightList/types.d.ts +1 -0
- package/esm/presentation/insightList/types.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/cancelButton/DefaultCancelButton.d.ts +1 -1
- package/esm/presentation/topBar/buttonBar/button/cancelButton/DefaultCancelButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/cancelButton/DefaultCancelButton.js +3 -2
- package/esm/presentation/topBar/buttonBar/button/cancelButton/types.d.ts +1 -0
- package/esm/presentation/topBar/buttonBar/button/cancelButton/types.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/cancelButton/types.js +1 -1
- package/esm/presentation/topBar/buttonBar/button/editButton/DefaultEditButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/editButton/DefaultEditButton.js +3 -2
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.d.ts +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.js +5 -2
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/types.d.ts +1 -0
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/types.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/types.js +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +3 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.js +3 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.d.ts +1 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.js +5 -2
- package/esm/presentation/topBar/buttonBar/button/shareButton/types.d.ts +1 -0
- package/esm/presentation/topBar/buttonBar/button/shareButton/types.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/types.js +1 -0
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +7 -2
- package/esm/presentation/topBar/menuButton/types.d.ts +4 -0
- package/esm/presentation/topBar/menuButton/types.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/DateDatasetDropdown.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/DateDatasetDropdown.js +93 -27
- package/esm/presentation/widget/common/configuration/utils.d.ts +3 -0
- package/esm/presentation/widget/common/configuration/utils.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/utils.js +14 -2
- package/esm/sdk-ui-dashboard.d.ts +234 -88
- package/package.json +21 -21
- package/styles/css/dashboard.css +118 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/main.css +180 -44
- package/styles/css/main.css.map +1 -1
- package/styles/scss/dashboard.scss +96 -0
|
@@ -5,7 +5,8 @@ import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.j
|
|
|
5
5
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
6
6
|
import { setAlertExecutionParameters } from "../../shared/automationFilters/automationParameters.js";
|
|
7
7
|
import { useAutomationAlertParameters } from "../../shared/automationFilters/useAutomationAlertParameters.js";
|
|
8
|
-
import { getAppliedWidgetFilters, getVisibleFiltersByFilters,
|
|
8
|
+
import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveFilterDimensionalityLocalRefs, } from "../../shared/filters/index.js";
|
|
9
|
+
import { isAutomationTitleValid } from "../../shared/utils/automationTitle.js";
|
|
9
10
|
import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../shared/utils/automationUtils.js";
|
|
10
11
|
import { createDefaultAlert } from "../DefaultAlertingDialog/utils/convertors.js";
|
|
11
12
|
import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, } from "../DefaultAlertingDialog/utils/transformation.js";
|
|
@@ -41,7 +42,7 @@ export function useAlertFormState({ alertToEdit, insight, widget, notificationCh
|
|
|
41
42
|
if (!alertToEdit.alert || !filters?.length || !insight) {
|
|
42
43
|
return alertToEdit;
|
|
43
44
|
}
|
|
44
|
-
const resolvedFilters =
|
|
45
|
+
const resolvedFilters = resolveFilterDimensionalityLocalRefs(filters, insight);
|
|
45
46
|
if (resolvedFilters === filters) {
|
|
46
47
|
return alertToEdit;
|
|
47
48
|
}
|
|
@@ -84,8 +85,8 @@ export function useAlertFormState({ alertToEdit, insight, widget, notificationCh
|
|
|
84
85
|
//
|
|
85
86
|
// Handlers
|
|
86
87
|
//
|
|
87
|
-
const onTitleChange = useCallback((value
|
|
88
|
-
setIsTitleValid(
|
|
88
|
+
const onTitleChange = useCallback((value) => {
|
|
89
|
+
setIsTitleValid(isAutomationTitleValid(value));
|
|
89
90
|
setEditedAutomation((s) => (s ? { ...s, title: value } : undefined));
|
|
90
91
|
}, [setEditedAutomation]);
|
|
91
92
|
const onMeasureChange = useCallback((measure) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type ComponentType, type
|
|
1
|
+
import { type ComponentType, 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 IAutomationDialogHeaderProps, type ISlotProps } from "../shared/slots/types.js";
|
|
4
5
|
/**
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
@@ -43,20 +44,6 @@ export interface IAlertingDialogProps {
|
|
|
43
44
|
* @deprecated read `isLoading` from `useAlertingDialogContext()` instead. Prop will be removed.
|
|
44
45
|
*/
|
|
45
46
|
isLoading?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Custom content rendered as the first child of the dialog content area, above the default form.
|
|
48
|
-
*
|
|
49
|
-
* @remarks
|
|
50
|
-
* Use this to surface an application-specific banner or warning without replacing the whole dialog.
|
|
51
|
-
*/
|
|
52
|
-
topContent?: ReactNode;
|
|
53
|
-
/**
|
|
54
|
-
* Custom content rendered as the last child of the dialog content area, below the default form.
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* Use this to surface an application-specific note or disclaimer without replacing the whole dialog.
|
|
58
|
-
*/
|
|
59
|
-
bottomContent?: ReactNode;
|
|
60
47
|
/**
|
|
61
48
|
* Callback to be called, when user closes the alert dialog.
|
|
62
49
|
*/
|
|
@@ -86,6 +73,55 @@ export interface IAlertingDialogProps {
|
|
|
86
73
|
*/
|
|
87
74
|
onDeleteError?: (error: GoodDataSdkError) => void;
|
|
88
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Props of the default alerting dialog's header region (the title input row).
|
|
78
|
+
*
|
|
79
|
+
* @alpha
|
|
80
|
+
*/
|
|
81
|
+
export interface IAlertingDialogHeaderProps extends IAutomationDialogHeaderProps {
|
|
82
|
+
/**
|
|
83
|
+
* Called when the header's back/close button is pressed. The default dialog closes on it.
|
|
84
|
+
*/
|
|
85
|
+
onCancel?: () => void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The exact props the default dialog renders its header with, including the dialog's
|
|
89
|
+
* initial-focus ref.
|
|
90
|
+
*
|
|
91
|
+
* @alpha
|
|
92
|
+
*/
|
|
93
|
+
export type AlertingDialogHeaderDefaultProps = IAlertingDialogHeaderProps & {
|
|
94
|
+
ref?: Ref<HTMLInputElement>;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Section-level overrides of the default alerting dialog.
|
|
98
|
+
*
|
|
99
|
+
* @alpha
|
|
100
|
+
*/
|
|
101
|
+
export interface IAlertingDialogSlots {
|
|
102
|
+
/**
|
|
103
|
+
* Wraps or replaces the dialog header (the title input row). Must have a stable reference
|
|
104
|
+
* identity — see {@link ISlotProps}.
|
|
105
|
+
*/
|
|
106
|
+
Header?: ComponentType<ISlotProps<AlertingDialogHeaderDefaultProps>>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Props of {@link DefaultAlertingDialog}.
|
|
110
|
+
*
|
|
111
|
+
* @remarks
|
|
112
|
+
* Extends the shared {@link IAlertingDialogProps} with customization only the default implementation
|
|
113
|
+
* supports. Slots render only in the fully rendered dialog: not while the dialog context reports
|
|
114
|
+
* loading, and not while the stale-filters confirmation step is shown.
|
|
115
|
+
*
|
|
116
|
+
* @alpha
|
|
117
|
+
*/
|
|
118
|
+
export interface IDefaultAlertingDialogProps extends IAlertingDialogProps {
|
|
119
|
+
/**
|
|
120
|
+
* Section-level overrides. Each slot receives `{ Default, defaultProps }` and may render its own
|
|
121
|
+
* content (replace) or `<Default {...defaultProps} />` inside its own markup (wrap).
|
|
122
|
+
*/
|
|
123
|
+
slots?: IAlertingDialogSlots;
|
|
124
|
+
}
|
|
89
125
|
/**
|
|
90
126
|
* @alpha
|
|
91
127
|
*/
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mapp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AAI,EAAE,eAAe,GAAG,WAAW,CAAC;CACvC,CAAC"}
|
|
@@ -40,32 +40,6 @@ export interface IAlertingDialogContextValue {
|
|
|
40
40
|
/** True while the dialog's initial data (automations) is still loading. */
|
|
41
41
|
isLoading: boolean;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Provider for {@link IAlertingDialogContextValue}.
|
|
45
|
-
*
|
|
46
|
-
* Besides the connector's own use, a custom `AlertingDialogComponent` can decorate the context for the
|
|
47
|
-
* default dialog: read the value via {@link useAlertingDialogContext}, adjust it (e.g. swap the
|
|
48
|
-
* `insight`), and re-provide it around `DefaultAlertingDialog`.
|
|
49
|
-
*
|
|
50
|
-
* The default dialog renders from the alert state contexts, which are initialized from this context
|
|
51
|
-
* **above** the resolved dialog component. A decorator that changes data members must therefore also
|
|
52
|
-
* remount `AlertingDialogStateProvider` beneath the re-provided context, so the state is derived from
|
|
53
|
-
* the decorated value (the nested state shadows the ambient one):
|
|
54
|
-
*
|
|
55
|
-
* ```tsx
|
|
56
|
-
* const ctx = useAlertingDialogContext();
|
|
57
|
-
* const value = useMemo(() => ({ ...ctx, insight: decoratedInsight }), [ctx, decoratedInsight]);
|
|
58
|
-
* return (
|
|
59
|
-
* <AlertingDialogContextProvider value={value}>
|
|
60
|
-
* <AlertingDialogStateProvider>
|
|
61
|
-
* <DefaultAlertingDialog {...props} />
|
|
62
|
-
* </AlertingDialogStateProvider>
|
|
63
|
-
* </AlertingDialogContextProvider>
|
|
64
|
-
* );
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @alpha
|
|
68
|
-
*/
|
|
69
43
|
export declare const AlertingDialogContextProvider: import("react").Provider<IAlertingDialogContextValue | undefined>;
|
|
70
44
|
/**
|
|
71
45
|
* Reads the alerting create/edit dialog context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":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,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID
|
|
1
|
+
{"version":3,"file":"AlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACR,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,mBAAmB,EACnB,QAAQ,EACR,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACP,MAAM,EACT,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK;QAAE,eAAe,CAAC,EAAE,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;IACtG,+HAA+H;IAC/H,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,KAAK,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5F,SAAS,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iEAAiE;IACjE,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,6DAA6D;IAC7D,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,6BAA6B,mEAAiC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,2BAA2B,CAMtE"}
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const AlertingDialogContext = createContext(undefined);
|
|
4
|
-
/**
|
|
5
|
-
* Provider for {@link IAlertingDialogContextValue}.
|
|
6
|
-
*
|
|
7
|
-
* Besides the connector's own use, a custom `AlertingDialogComponent` can decorate the context for the
|
|
8
|
-
* default dialog: read the value via {@link useAlertingDialogContext}, adjust it (e.g. swap the
|
|
9
|
-
* `insight`), and re-provide it around `DefaultAlertingDialog`.
|
|
10
|
-
*
|
|
11
|
-
* The default dialog renders from the alert state contexts, which are initialized from this context
|
|
12
|
-
* **above** the resolved dialog component. A decorator that changes data members must therefore also
|
|
13
|
-
* remount `AlertingDialogStateProvider` beneath the re-provided context, so the state is derived from
|
|
14
|
-
* the decorated value (the nested state shadows the ambient one):
|
|
15
|
-
*
|
|
16
|
-
* ```tsx
|
|
17
|
-
* const ctx = useAlertingDialogContext();
|
|
18
|
-
* const value = useMemo(() => ({ ...ctx, insight: decoratedInsight }), [ctx, decoratedInsight]);
|
|
19
|
-
* return (
|
|
20
|
-
* <AlertingDialogContextProvider value={value}>
|
|
21
|
-
* <AlertingDialogStateProvider>
|
|
22
|
-
* <DefaultAlertingDialog {...props} />
|
|
23
|
-
* </AlertingDialogStateProvider>
|
|
24
|
-
* </AlertingDialogContextProvider>
|
|
25
|
-
* );
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @alpha
|
|
29
|
-
*/
|
|
30
4
|
export const AlertingDialogContextProvider = AlertingDialogContext.Provider;
|
|
31
5
|
/**
|
|
32
6
|
* Reads the alerting create/edit dialog context.
|
|
@@ -55,15 +55,6 @@ export interface IScheduledEmailDialogContextValue {
|
|
|
55
55
|
/** True while the dialog's initial data (automations) is still loading. */
|
|
56
56
|
isLoading: boolean;
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Provider for {@link IScheduledEmailDialogContextValue}.
|
|
60
|
-
*
|
|
61
|
-
* Besides the connector's own use, a custom `ScheduledEmailDialogComponent` can decorate the context for
|
|
62
|
-
* the default dialog: read the value via {@link useScheduledEmailDialogContext}, adjust it, and
|
|
63
|
-
* re-provide it around `DefaultScheduledEmailDialog`.
|
|
64
|
-
*
|
|
65
|
-
* @alpha
|
|
66
|
-
*/
|
|
67
58
|
export declare const ScheduledEmailDialogContextProvider: import("react").Provider<IScheduledEmailDialogContextValue | undefined>;
|
|
68
59
|
/**
|
|
69
60
|
* Reads the scheduled-email create/edit dialog context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,mCAAmC,EACnC,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACR,8BAA8B,EAC9B,kCAAkC,EAClC,OAAO,EACV,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,iCAAiC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;IACnE;;;OAGG;IACH,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,wEAAwE;IACxE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mEAAmE;IACnE,oBAAoB,EAAE,6BAA6B,CAAC;IACpD,kFAAgF;IAChF,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IAC/D,2EAAyE;IACzE,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;IAEzE,oBAAoB,CAAC,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClG,kBAAkB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtF,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,wEAAwE;IACxE,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/ScheduledEmailDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,kCAAkC,EAClC,6BAA6B,EAC7B,iBAAiB,EACjB,yBAAyB,EACz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;IAClD,wEAAwE;IACxE,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,CAQlF"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const ScheduledEmailDialogContext = createContext(undefined);
|
|
4
|
-
/**
|
|
5
|
-
* Provider for {@link IScheduledEmailDialogContextValue}.
|
|
6
|
-
*
|
|
7
|
-
* Besides the connector's own use, a custom `ScheduledEmailDialogComponent` can decorate the context for
|
|
8
|
-
* the default dialog: read the value via {@link useScheduledEmailDialogContext}, adjust it, and
|
|
9
|
-
* re-provide it around `DefaultScheduledEmailDialog`.
|
|
10
|
-
*
|
|
11
|
-
* @alpha
|
|
12
|
-
*/
|
|
13
4
|
export const ScheduledEmailDialogContextProvider = ScheduledEmailDialogContext.Provider;
|
|
14
5
|
/**
|
|
15
6
|
* Reads the scheduled-email create/edit dialog context.
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess,
|
|
1
|
+
import { type IDefaultScheduledEmailDialogProps } from "../types.js";
|
|
2
|
+
export declare function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess, slots }: IDefaultScheduledEmailDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
/**
|
|
4
|
+
* Default implementation of the scheduled export create/edit dialog.
|
|
5
|
+
*
|
|
6
|
+
* This component is a pure consumer of `AutomationsContext`, `ScheduledEmailDialogContext`, and the
|
|
7
|
+
* scheduled export dialog state contexts: it reads org/workspace data, per-dialog state, and the
|
|
8
|
+
* export draft's state from those contexts rather than from the dashboard store. It must therefore
|
|
9
|
+
* be rendered within an `AutomationsContextProvider`, a `ScheduledEmailDialogContextProvider` (for
|
|
10
|
+
* the create/edit flow), and a `ScheduledEmailDialogStateProvider`, whose state model establishes
|
|
11
|
+
* itself once `useScheduledEmailDialogContext().isLoading` is false. Inside a `Dashboard`, the
|
|
12
|
+
* scheduled export connector supplies the first two providers above the
|
|
13
|
+
* `ScheduledEmailDialogComponent` slot and mounts `ScheduledEmailDialogStateProvider` around the
|
|
14
|
+
* resolved slot component — so the default component, and any wholesale slot replacement, inherit
|
|
15
|
+
* all three contexts automatically and require no extra wiring.
|
|
16
|
+
*
|
|
17
|
+
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
18
|
+
* that is what lets a wholesale replacement receive the same contexts. Rendering this component
|
|
19
|
+
* outside those providers throws at runtime.
|
|
20
|
+
*
|
|
21
|
+
* Slots render only in the fully rendered dialog: not while the dialog context reports loading,
|
|
22
|
+
* and not while the stale-filters confirmation step is shown.
|
|
23
|
+
*
|
|
4
24
|
* @alpha
|
|
5
25
|
*/
|
|
6
|
-
export declare function DefaultScheduledEmailDialog(props:
|
|
26
|
+
export declare function DefaultScheduledEmailDialog(props: IDefaultScheduledEmailDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
7
27
|
//# sourceMappingURL=DefaultScheduledEmailDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA8CA,OAAO,
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AA8CA,OAAO,EACH,KAAK,iCAAiC,EAEzC,MAAM,aAAa,CAAC;AA6DrB,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,2CA6gBnC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iCAAiC,2CAYnF"}
|
|
@@ -41,7 +41,8 @@ function ScheduledEmailDialogFooter({ isWhiteLabeled, helpTextId, scheduledExpor
|
|
|
41
41
|
const intl = useIntl();
|
|
42
42
|
return (_jsxs("div", { className: "gd-notifications-channels-dialog-footer-link", children: [isWhiteLabeled ? null : (_jsx(Hyperlink, { text: intl.formatMessage({ id: helpTextId }), href: "https://www.gooddata.com/docs/cloud/create-dashboards/automation/scheduled-exports/#ScheduleExportsinDashboards-ScheduleExport", iconClass: "gd-icon-circle-question" })), scheduledExportToEdit ? (_jsx(Button, { className: "gd-button-link-dimmed", value: intl.formatMessage({ id: "delete" }), onClick: onDeleteClick, disabled: isSavingScheduledEmail })) : null] }));
|
|
43
43
|
}
|
|
44
|
-
export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess,
|
|
44
|
+
export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess, slots, }) {
|
|
45
|
+
const HeaderSlot = slots?.Header;
|
|
45
46
|
const intl = useIntl();
|
|
46
47
|
const dialogTitleRef = useRef(null);
|
|
47
48
|
const generalTabContentRef = useRef(null);
|
|
@@ -149,9 +150,24 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
149
150
|
? intl.formatMessage({
|
|
150
151
|
id: "dialogs.schedule.email.save.executionTimestampMode",
|
|
151
152
|
})
|
|
152
|
-
: undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: handleSaveScheduledEmail, headline: undefined, headerLeftButtonRenderer: () =>
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
: undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: handleSaveScheduledEmail, headline: undefined, headerLeftButtonRenderer: () => {
|
|
154
|
+
const headerDefaultProps = {
|
|
155
|
+
title: editedAutomation.title ?? "",
|
|
156
|
+
onChange: onTitleChange,
|
|
157
|
+
onBack,
|
|
158
|
+
placeholder: intl.formatMessage({
|
|
159
|
+
id: "dialogs.schedule.email.title.placeholder",
|
|
160
|
+
}),
|
|
161
|
+
ref: dialogTitleRef,
|
|
162
|
+
onTitleKeyDown: handleSubmitForm,
|
|
163
|
+
secondaryTitle,
|
|
164
|
+
secondaryTitleIcon,
|
|
165
|
+
isSecondaryTitleVisible: isSecondaryTitleVisible
|
|
166
|
+
? isParentValid
|
|
167
|
+
: undefined,
|
|
168
|
+
};
|
|
169
|
+
return HeaderSlot ? (_jsx(HeaderSlot, { Default: ScheduledEmailDialogHeader, defaultProps: headerDefaultProps })) : (_jsx(ScheduledEmailDialogHeader, { ...headerDefaultProps }));
|
|
170
|
+
}, children: [
|
|
155
171
|
_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: {
|
|
156
172
|
role: "tablist",
|
|
157
173
|
tabRole: "tab",
|
|
@@ -161,7 +177,8 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
161
177
|
}, disableBottomBorder: true })) : null, _jsxs(ScrollablePanel, { className: cx("gd-notifications-channel-dialog-content-wrapper", {
|
|
162
178
|
"gd-notification-channel-dialog-with-automation-filters": true,
|
|
163
179
|
"gd-notification-channel-dialog-with-tabs": tabs.length > 1,
|
|
164
|
-
}), children: [
|
|
180
|
+
}), children: [
|
|
181
|
+
_jsx("div", { className: "gd-divider-with-margin" }), selectedTabId === "filters" ? (_jsx("div", { ref: filtersTabContentRef, className: "gd-schedule-dialog-tab-content", style: tabContentHeight
|
|
165
182
|
? { minHeight: `${tabContentHeight}px` }
|
|
166
183
|
: undefined, children: _jsx(AutomationFiltersSelect, { availableFilters: availableFilters, selectedFilters: selectedFilters, onFiltersChange: onFiltersChange, storeFilters: storeFilters, onStoreFiltersChange: onStoreFiltersChange, isDashboardAutomation: !widget, overlayPositionType: OVERLAY_POSITION_TYPE, hideTitle: true, showAllFilters: true, filtersByTab: filtersByTab, editedFiltersByTab: editedFiltersByTab, onFiltersByTabChange: onFiltersByTabChange, parameters: flatTabId ? visibleParametersByTab[flatTabId] : undefined, availableParameters: flatTabId ? availableParametersByTab[flatTabId] : undefined, onParameterChange: onParameterChange, onParameterDelete: onParameterDelete, onParameterAdd: onParameterAdd, parametersByTab: visibleParametersByTab, availableParametersByTab: availableParametersByTab, onParameterChangeByTab: onParameterChangeByTab, onParameterDeleteByTab: onParameterDeleteByTab, onParameterAddByTab: onParameterAddByTab, parametersEnabled: parametersEnabled }) })) : (_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({
|
|
167
184
|
id: "dialogs.schedule.email.tabs.info",
|
|
@@ -175,10 +192,30 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
175
192
|
.filter((invalidDatapoint) => invalidDatapoint.severity === "error")
|
|
176
193
|
.map((invalidDatapoint) => (_jsx(Message, { id: invalidDatapoint.id, type: "error", className: cx("gd-notifications-channels-dialog-error", {
|
|
177
194
|
"gd-notifications-channels-dialog-error-scrollable": true,
|
|
178
|
-
}), children: invalidDatapoint.message }, invalidDatapoint.id)))] }))
|
|
195
|
+
}), children: invalidDatapoint.message }, invalidDatapoint.id)))] }))] })
|
|
179
196
|
] }) }) }) }), scheduledEmailToDelete ? (_jsx(DeleteScheduleConfirmDialog, { scheduledEmail: scheduledEmailToDelete, onCancel: () => setScheduledEmailToDelete(null), onSuccess: handleScheduleDeleteSuccess, onError: onDeleteError })) : null] }));
|
|
180
197
|
}
|
|
181
198
|
/**
|
|
199
|
+
* Default implementation of the scheduled export create/edit dialog.
|
|
200
|
+
*
|
|
201
|
+
* This component is a pure consumer of `AutomationsContext`, `ScheduledEmailDialogContext`, and the
|
|
202
|
+
* scheduled export dialog state contexts: it reads org/workspace data, per-dialog state, and the
|
|
203
|
+
* export draft's state from those contexts rather than from the dashboard store. It must therefore
|
|
204
|
+
* be rendered within an `AutomationsContextProvider`, a `ScheduledEmailDialogContextProvider` (for
|
|
205
|
+
* the create/edit flow), and a `ScheduledEmailDialogStateProvider`, whose state model establishes
|
|
206
|
+
* itself once `useScheduledEmailDialogContext().isLoading` is false. Inside a `Dashboard`, the
|
|
207
|
+
* scheduled export connector supplies the first two providers above the
|
|
208
|
+
* `ScheduledEmailDialogComponent` slot and mounts `ScheduledEmailDialogStateProvider` around the
|
|
209
|
+
* resolved slot component — so the default component, and any wholesale slot replacement, inherit
|
|
210
|
+
* all three contexts automatically and require no extra wiring.
|
|
211
|
+
*
|
|
212
|
+
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
213
|
+
* that is what lets a wholesale replacement receive the same contexts. Rendering this component
|
|
214
|
+
* outside those providers throws at runtime.
|
|
215
|
+
*
|
|
216
|
+
* Slots render only in the fully rendered dialog: not while the dialog context reports loading,
|
|
217
|
+
* and not while the stale-filters confirmation step is shown.
|
|
218
|
+
*
|
|
182
219
|
* @alpha
|
|
183
220
|
*/
|
|
184
221
|
export function DefaultScheduledEmailDialog(props) {
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
interface IScheduledEmailDialogHeaderProps {
|
|
3
|
-
title: string;
|
|
4
|
-
placeholder: string;
|
|
5
|
-
isSecondaryTitleVisible?: boolean;
|
|
6
|
-
secondaryTitle?: string;
|
|
7
|
-
secondaryTitleIcon: ReactNode;
|
|
8
|
-
onChange: (value: string, isValid: boolean) => void;
|
|
9
|
-
onKeyDownSubmit: (e: KeyboardEvent) => void;
|
|
10
|
-
onBack?: () => void;
|
|
11
|
-
}
|
|
1
|
+
import { type IScheduledEmailDialogHeaderProps } from "../../../types.js";
|
|
12
2
|
export declare const ScheduledEmailDialogHeader: import("react").ForwardRefExoticComponent<IScheduledEmailDialogHeaderProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
|
-
export {};
|
|
14
3
|
//# sourceMappingURL=ScheduleEmailDialogHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduleEmailDialogHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Header/ScheduleEmailDialogHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduleEmailDialogHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Header/ScheduleEmailDialogHeader.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAE1E,eAAO,MAAM,0BAA0B,+HA2ItC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
|
-
import { forwardRef, useCallback
|
|
3
|
+
import { forwardRef, useCallback } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { createInvalidDatapoint, createInvalidNode, useValidationContextValue } from "@gooddata/sdk-ui";
|
|
7
7
|
import { Bubble, BubbleHoverTrigger, Button, IconError, useIdPrefixed } from "@gooddata/sdk-ui-kit";
|
|
8
|
-
|
|
8
|
+
import { MAX_AUTOMATION_TITLE_LENGTH, isAutomationTitleValid, } from "../../../../shared/utils/automationTitle.js";
|
|
9
9
|
export const ScheduledEmailDialogHeader = forwardRef((props, ref) => {
|
|
10
|
-
const { title, placeholder, secondaryTitle, secondaryTitleIcon, isSecondaryTitleVisible, onChange, onBack,
|
|
10
|
+
const { title, placeholder, secondaryTitle, secondaryTitleIcon, isSecondaryTitleVisible, onChange, onBack, onTitleKeyDown, } = props;
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
const validationContextValue = useValidationContextValue(createInvalidNode({ id: "ScheduleEmailDialogHeader" }));
|
|
13
13
|
const { isValid, getInvalidDatapoints, setInvalidDatapoints } = validationContextValue;
|
|
@@ -21,13 +21,10 @@ export const ScheduledEmailDialogHeader = forwardRef((props, ref) => {
|
|
|
21
21
|
setInvalidDatapoints(() => [
|
|
22
22
|
createInvalidDatapoint({
|
|
23
23
|
id: errorId,
|
|
24
|
-
message: formatMessage({ id: "dialogs.schedule.error.too_long" }, { value:
|
|
24
|
+
message: formatMessage({ id: "dialogs.schedule.error.too_long" }, { value: MAX_AUTOMATION_TITLE_LENGTH }),
|
|
25
25
|
}),
|
|
26
26
|
]);
|
|
27
27
|
}, [errorId, formatMessage, setInvalidDatapoints]);
|
|
28
|
-
const isValueValid = useCallback((value) => {
|
|
29
|
-
return value.length <= TITLE_MAX_LENGTH;
|
|
30
|
-
}, []);
|
|
31
28
|
const dialogHeaderClasses = cx("gd-notifications-channels-dialog-title", "s-gd-notifications-channels-dialog-title", {
|
|
32
29
|
placeholder: title === "",
|
|
33
30
|
"has-error": !isValid,
|
|
@@ -37,22 +34,21 @@ export const ScheduledEmailDialogHeader = forwardRef((props, ref) => {
|
|
|
37
34
|
});
|
|
38
35
|
const handleOnChange = useCallback((e) => {
|
|
39
36
|
const { value } = e.target;
|
|
40
|
-
const validationResult = isValueValid(value);
|
|
41
37
|
if (!isValid) {
|
|
42
|
-
setHasError(!
|
|
38
|
+
setHasError(!isAutomationTitleValid(value));
|
|
43
39
|
}
|
|
44
|
-
onChange(value
|
|
45
|
-
}, [
|
|
40
|
+
onChange(value);
|
|
41
|
+
}, [isValid, onChange, setHasError]);
|
|
46
42
|
const handleBlur = useCallback((e) => {
|
|
47
|
-
setHasError(!
|
|
48
|
-
}, [
|
|
43
|
+
setHasError(!isAutomationTitleValid(e.target.value));
|
|
44
|
+
}, [setHasError]);
|
|
49
45
|
return (_jsxs("div", { className: cx("gd-notifications-channels-dialog-header", {
|
|
50
46
|
"gd-notifications-channels-dialog-header--large": isSecondaryTitleVisible,
|
|
51
47
|
}), children: [
|
|
52
48
|
_jsx(Button, { className: "gd-button-primary gd-button-icon-only gd-icon-navigateleft s-schedule-email-dialog-button", onClick: onBack, accessibilityConfig: {
|
|
53
49
|
ariaLabel: formatMessage({ id: "dialogs.schedule.email.backLabel" }),
|
|
54
50
|
} }), _jsx("div", { className: dialogHeaderClasses, children: _jsxs("div", { className: "gd-input-wrapper", children: [
|
|
55
|
-
_jsx("input", { ref: ref, type: "text", autoFocus: true, className: inputHeaderClasses, onBlur: handleBlur, value: title, placeholder: placeholder, onChange: handleOnChange, onKeyDown:
|
|
51
|
+
_jsx("input", { ref: ref, type: "text", autoFocus: true, className: inputHeaderClasses, onBlur: handleBlur, value: title, placeholder: placeholder, onChange: handleOnChange, onKeyDown: onTitleKeyDown, autoComplete: "off", "aria-describedby": isValid ? undefined : errorId, "aria-label": formatMessage({
|
|
56
52
|
id: "dialogs.schedule.accessibility.label.email.title",
|
|
57
53
|
}) }), invalidDatapoint ? (_jsxs("span", { id: errorId, className: "gd-notifications-channels-dialog-error-icon", children: [
|
|
58
54
|
_jsx("div", { className: "sr-only", children: invalidDatapoint.message }), _jsxs(BubbleHoverTrigger, { showDelay: 0, hideDelay: 0, children: [
|
|
@@ -35,7 +35,7 @@ export declare function useScheduledEmailFormState({ scheduledExportToEdit, widg
|
|
|
35
35
|
originalAutomation: IAutomationMetadataObjectDefinition;
|
|
36
36
|
defaultRecipient: IAutomationRecipient;
|
|
37
37
|
defaultUser: IAutomationRecipient;
|
|
38
|
-
onTitleChange: (value: string
|
|
38
|
+
onTitleChange: (value: string) => void;
|
|
39
39
|
onRecurrenceChange: (cronExpression: string, startDate: Date | null, isValid: boolean) => void;
|
|
40
40
|
onEvaluationModeChange: (isShared: boolean) => void;
|
|
41
41
|
onDestinationChange: (notificationChannelId: string) => void;
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledEmailFormState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACf,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useScheduledEmailFormState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormState.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kC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../../../_staging/automation/index.js";
|
|
4
4
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
5
5
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
6
|
+
import { isAutomationTitleValid } from "../../shared/utils/automationTitle.js";
|
|
6
7
|
import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../shared/utils/automationUtils.js";
|
|
7
8
|
import { toModifiedISOStringToTimezone, toNormalizedFirstRunAndCron, toNormalizedStartDate, } from "../utils/date.js";
|
|
8
9
|
import { getUserTimezone } from "../utils/timezone.js";
|
|
@@ -70,8 +71,8 @@ export function useScheduledEmailFormState({ scheduledExportToEdit, widget, insi
|
|
|
70
71
|
const [isTitleValid, setIsTitleValid] = useState(true);
|
|
71
72
|
const [isSubjectValid, setIsSubjectValid] = useState(true);
|
|
72
73
|
const [isOnMessageValid, setIsOnMessageValid] = useState(true);
|
|
73
|
-
const onTitleChange = useCallback((value
|
|
74
|
-
setIsTitleValid(
|
|
74
|
+
const onTitleChange = useCallback((value) => {
|
|
75
|
+
setIsTitleValid(isAutomationTitleValid(value));
|
|
75
76
|
setEditedAutomation((s) => ({ ...s, title: value }));
|
|
76
77
|
}, []);
|
|
77
78
|
const onRecurrenceChange = useCallback((cronExpression, startDate, isValid) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type ComponentType, type
|
|
1
|
+
import { type ComponentType, type KeyboardEvent, type Ref } from "react";
|
|
2
2
|
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
|
+
import { type IAutomationDialogHeaderProps, type ISlotProps } from "../shared/slots/types.js";
|
|
4
5
|
/**
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
@@ -73,20 +74,6 @@ export interface IScheduledEmailDialogProps {
|
|
|
73
74
|
* @deprecated read `isLoading` from `useScheduledEmailDialogContext()` instead. Prop will be removed.
|
|
74
75
|
*/
|
|
75
76
|
isLoading?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Custom content rendered as the first child of the dialog content area, above the default form.
|
|
78
|
-
*
|
|
79
|
-
* @remarks
|
|
80
|
-
* Use this to surface an application-specific banner or warning without replacing the whole dialog.
|
|
81
|
-
*/
|
|
82
|
-
topContent?: ReactNode;
|
|
83
|
-
/**
|
|
84
|
-
* Custom content rendered as the last child of the dialog content area, below the default form.
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* Use this to surface an application-specific note or disclaimer without replacing the whole dialog.
|
|
88
|
-
*/
|
|
89
|
-
bottomContent?: ReactNode;
|
|
90
77
|
/**
|
|
91
78
|
* Callback to be called, when user submits the scheduled email dialog.
|
|
92
79
|
*/
|
|
@@ -128,6 +115,59 @@ export interface IScheduledEmailDialogProps {
|
|
|
128
115
|
*/
|
|
129
116
|
onDeleteError?: (error: GoodDataSdkError) => void;
|
|
130
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Props of the default scheduled email dialog's header region (the title input row).
|
|
120
|
+
*
|
|
121
|
+
* @alpha
|
|
122
|
+
*/
|
|
123
|
+
export interface IScheduledEmailDialogHeaderProps extends IAutomationDialogHeaderProps {
|
|
124
|
+
/**
|
|
125
|
+
* Called on key-down inside the title input.
|
|
126
|
+
*/
|
|
127
|
+
onTitleKeyDown: (event: KeyboardEvent) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Called when the header's back button is pressed.
|
|
130
|
+
*/
|
|
131
|
+
onBack?: () => void;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The exact props the default dialog renders its header with, including the dialog's
|
|
135
|
+
* initial-focus ref.
|
|
136
|
+
*
|
|
137
|
+
* @alpha
|
|
138
|
+
*/
|
|
139
|
+
export type ScheduledEmailDialogHeaderDefaultProps = IScheduledEmailDialogHeaderProps & {
|
|
140
|
+
ref?: Ref<HTMLInputElement>;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Section-level overrides of the default scheduled email dialog.
|
|
144
|
+
*
|
|
145
|
+
* @alpha
|
|
146
|
+
*/
|
|
147
|
+
export interface IScheduledEmailDialogSlots {
|
|
148
|
+
/**
|
|
149
|
+
* Wraps or replaces the dialog header (the title input row). Must have a stable reference
|
|
150
|
+
* identity — see {@link ISlotProps}.
|
|
151
|
+
*/
|
|
152
|
+
Header?: ComponentType<ISlotProps<ScheduledEmailDialogHeaderDefaultProps>>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Props of {@link DefaultScheduledEmailDialog}.
|
|
156
|
+
*
|
|
157
|
+
* @remarks
|
|
158
|
+
* Extends the shared {@link IScheduledEmailDialogProps} with customization only the default implementation
|
|
159
|
+
* supports. Slots render only in the fully rendered dialog: not while the dialog context reports
|
|
160
|
+
* loading, and not while the stale-filters confirmation step is shown.
|
|
161
|
+
*
|
|
162
|
+
* @alpha
|
|
163
|
+
*/
|
|
164
|
+
export interface IDefaultScheduledEmailDialogProps extends IScheduledEmailDialogProps {
|
|
165
|
+
/**
|
|
166
|
+
* Section-level overrides. Each slot receives `{ Default, defaultProps }` and may render its own
|
|
167
|
+
* content (replace) or `<Default {...defaultProps} />` inside its own markup (wrap).
|
|
168
|
+
*/
|
|
169
|
+
slots?: IScheduledEmailDialogSlots;
|
|
170
|
+
}
|
|
131
171
|
/**
|
|
132
172
|
*
|
|
133
173
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,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AAC,EAAE,yBAAyB,EAAE,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,aAAa,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAE5D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACrD;AAMD;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,aAAa,CAAC,0BAA0B,CAAC,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,6CAA6C,GACrD,aAAa,CAAC,oCAAoC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationParameter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationParameter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,
|
|
1
|
+
{"version":3,"file":"AutomationParameter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationParameter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,cAAc,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,mBAAmB,EAM3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,oBAAoB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACb,EAAE,yBAAyB,GAAG,SAAS,CA6FvC"}
|