@gooddata/sdk-ui-dashboard 11.53.0-alpha.3 → 11.53.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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +6 -5
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/presentation/automations/alerting/AlertingDialog.d.ts +2 -1
- package/esm/presentation/automations/alerting/AlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/AlertingDialog.js +4 -3
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogFilters.d.ts +8 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogFilters.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogFilters.js +13 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +14 -3
- package/esm/presentation/automations/alerting/types.d.ts +71 -8
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +9 -0
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +9 -0
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +10 -0
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +10 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +27 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogFilters.d.ts +7 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogFilters.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogFilters.js +11 -0
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts +3 -1
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/ScheduledEmailDialog.js +5 -3
- package/esm/presentation/automations/scheduledEmail/types.d.ts +141 -11
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +17 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +7 -51
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +21 -0
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.js +57 -0
- package/esm/presentation/automations/shared/slots/types.d.ts +42 -0
- package/esm/presentation/automations/shared/slots/types.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.js +4 -1
- package/esm/presentation/dashboard/types.d.ts +20 -2
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +4 -2
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +2 -0
- package/esm/presentation/dashboardContexts/DefaultDialogContextDecorator.d.ts +10 -0
- package/esm/presentation/dashboardContexts/DefaultDialogContextDecorator.d.ts.map +1 -0
- package/esm/presentation/dashboardContexts/DefaultDialogContextDecorator.js +9 -0
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.d.ts.map +1 -1
- package/esm/presentation/dashboardSettingsDialog/DefaultDashboardSettingsDialog.js +4 -4
- package/esm/sdk-ui-dashboard.d.ts +332 -17
- package/package.json +21 -21
|
@@ -55,6 +55,16 @@ export interface IScheduledEmailDialogContextValue {
|
|
|
55
55
|
/** True while the dialog's initial data (automations) is still loading. */
|
|
56
56
|
isLoading: boolean;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Provides the scheduled-email create/edit dialog context.
|
|
60
|
+
*
|
|
61
|
+
* The dashboard's connector mounts the original value. Exported so a context-decorator
|
|
62
|
+
* component (`CustomScheduledEmailDialogContextDecoratorComponent`) can re-provide a decorated
|
|
63
|
+
* value read from `useScheduledEmailDialogContext()`; it is not a way to run the dialog outside
|
|
64
|
+
* a dashboard.
|
|
65
|
+
*
|
|
66
|
+
* @alpha
|
|
67
|
+
*/
|
|
58
68
|
export declare const ScheduledEmailDialogContextProvider: import("react").Provider<IScheduledEmailDialogContextValue | undefined>;
|
|
59
69
|
/**
|
|
60
70
|
* 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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CAQlF"}
|
|
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;;;;;;;;;GASG;AACH,eAAO,MAAM,mCAAmC,yEAAuC,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,IAAI,iCAAiC,CAQlF"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
const ScheduledEmailDialogContext = createContext(undefined);
|
|
4
|
+
/**
|
|
5
|
+
* Provides the scheduled-email create/edit dialog context.
|
|
6
|
+
*
|
|
7
|
+
* The dashboard's connector mounts the original value. Exported so a context-decorator
|
|
8
|
+
* component (`CustomScheduledEmailDialogContextDecoratorComponent`) can re-provide a decorated
|
|
9
|
+
* value read from `useScheduledEmailDialogContext()`; it is not a way to run the dialog outside
|
|
10
|
+
* a dashboard.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
4
14
|
export const ScheduledEmailDialogContextProvider = ScheduledEmailDialogContext.Provider;
|
|
5
15
|
/**
|
|
6
16
|
* Reads the scheduled-email create/edit dialog context.
|
|
@@ -19,7 +19,8 @@ export declare function ScheduledMailDialogRenderer({ onBack, onCancel, onDelete
|
|
|
19
19
|
* outside those providers throws at runtime.
|
|
20
20
|
*
|
|
21
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.
|
|
22
|
+
* and not while the stale-filters confirmation step is shown. The Filters slot additionally
|
|
23
|
+
* renders only while the Filters tab is selected — see {@link IScheduledEmailDialogSlots.Filters}.
|
|
23
24
|
*
|
|
24
25
|
* @alpha
|
|
25
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
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":"AA6CA,OAAO,EACH,KAAK,iCAAiC,EAGzC,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,2CAghBnC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iCAAiC,2CAYnF"}
|
|
@@ -10,7 +10,6 @@ import { IntlWrapper } from "../../../localization/IntlWrapper.js";
|
|
|
10
10
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
11
11
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
12
12
|
import { ApplyCurrentFiltersConfirmDialog } from "../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
13
|
-
import { AutomationFiltersSelect } from "../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
14
13
|
import { DeleteScheduleConfirmDialog } from "../DefaultScheduledEmailManagementDialog/components/DeleteScheduleConfirmDialog.js";
|
|
15
14
|
import { useScheduleEmailDialogAccessibility } from "../hooks/useScheduleEmailDialogAccessibility.js";
|
|
16
15
|
import { useScheduledExportActions } from "../state/ScheduledExportActionsContext.js";
|
|
@@ -29,6 +28,7 @@ import { EvaluationModeCheckbox } from "./components/EvaluationModeCheckbox/Eval
|
|
|
29
28
|
import { ScheduledEmailDialogHeader } from "./components/Header/ScheduleEmailDialogHeader.js";
|
|
30
29
|
import { MessageForm } from "./components/MessageForm/MessageForm.js";
|
|
31
30
|
import { RecipientsSelect } from "./components/RecipientsSelect/RecipientsSelect.js";
|
|
31
|
+
import { ScheduledEmailDialogFilters } from "./components/ScheduledEmailDialogFilters.js";
|
|
32
32
|
import { SubjectForm } from "./components/SubjectForm/SubjectForm.js";
|
|
33
33
|
import { SCHEDULED_EMAIL_DIALOG_ID } from "./constants.js";
|
|
34
34
|
import { DefaultLoadingScheduledEmailDialog } from "./DefaultLoadingScheduledEmailDialog.js";
|
|
@@ -43,6 +43,7 @@ function ScheduledEmailDialogFooter({ isWhiteLabeled, helpTextId, scheduledExpor
|
|
|
43
43
|
}
|
|
44
44
|
export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess, onDeleteError, onError, onSave, onSaveError, onSaveSuccess, onSubmit, onSuccess, slots, }) {
|
|
45
45
|
const HeaderSlot = slots?.Header;
|
|
46
|
+
const FiltersSlot = slots?.Filters;
|
|
46
47
|
const intl = useIntl();
|
|
47
48
|
const dialogTitleRef = useRef(null);
|
|
48
49
|
const generalTabContentRef = useRef(null);
|
|
@@ -135,6 +136,28 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
135
136
|
}
|
|
136
137
|
const selectedChannel = notificationChannels.find((channel) => channel.id === editedAutomation.notificationChannel);
|
|
137
138
|
const isInPlatformChannel = selectedChannel?.destinationType === "inPlatform";
|
|
139
|
+
const filtersDefaultProps = {
|
|
140
|
+
availableFilters,
|
|
141
|
+
selectedFilters,
|
|
142
|
+
onFiltersChange,
|
|
143
|
+
storeFilters,
|
|
144
|
+
onStoreFiltersChange,
|
|
145
|
+
isDashboardAutomation: !widget,
|
|
146
|
+
filtersByTab,
|
|
147
|
+
editedFiltersByTab,
|
|
148
|
+
onFiltersByTabChange,
|
|
149
|
+
parameters: flatTabId ? visibleParametersByTab[flatTabId] : undefined,
|
|
150
|
+
availableParameters: flatTabId ? availableParametersByTab[flatTabId] : undefined,
|
|
151
|
+
onParameterAdd,
|
|
152
|
+
onParameterChange,
|
|
153
|
+
onParameterDelete,
|
|
154
|
+
parametersByTab: visibleParametersByTab,
|
|
155
|
+
availableParametersByTab,
|
|
156
|
+
onParameterAddByTab,
|
|
157
|
+
onParameterChangeByTab,
|
|
158
|
+
onParameterDeleteByTab,
|
|
159
|
+
parametersEnabled,
|
|
160
|
+
};
|
|
138
161
|
return (_jsxs(_Fragment, { children: [
|
|
139
162
|
_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
|
|
140
163
|
? intl.formatMessage({ id: `dialogs.schedule.email.save` })
|
|
@@ -180,7 +203,7 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
180
203
|
}), children: [
|
|
181
204
|
_jsx("div", { className: "gd-divider-with-margin" }), selectedTabId === "filters" ? (_jsx("div", { ref: filtersTabContentRef, className: "gd-schedule-dialog-tab-content", style: tabContentHeight
|
|
182
205
|
? { minHeight: `${tabContentHeight}px` }
|
|
183
|
-
: undefined, children: _jsx(
|
|
206
|
+
: undefined, children: FiltersSlot ? (_jsx(FiltersSlot, { Default: ScheduledEmailDialogFilters, defaultProps: filtersDefaultProps })) : (_jsx(ScheduledEmailDialogFilters, { ...filtersDefaultProps })) })) : (_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({
|
|
184
207
|
id: "dialogs.schedule.email.tabs.info",
|
|
185
208
|
}) })) : null, _jsx(RecurrenceForm, { startDate: startDate, cronExpression: editedAutomation.schedule?.cron ??
|
|
186
209
|
getDefaultCronExpression(startDate), cronDescription: editedAutomation.schedule?.cronDescription, timezone: editedAutomation.schedule?.timezone ??
|
|
@@ -214,7 +237,8 @@ export function ScheduledMailDialogRenderer({ onBack, onCancel, onDeleteSuccess,
|
|
|
214
237
|
* outside those providers throws at runtime.
|
|
215
238
|
*
|
|
216
239
|
* 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.
|
|
240
|
+
* and not while the stale-filters confirmation step is shown. The Filters slot additionally
|
|
241
|
+
* renders only while the Filters tab is selected — see {@link IScheduledEmailDialogSlots.Filters}.
|
|
218
242
|
*
|
|
219
243
|
* @alpha
|
|
220
244
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IScheduledEmailDialogFiltersProps } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation of the scheduled email dialog's Filters tab content. The title is
|
|
4
|
+
* hidden and the list always expanded because the tab itself provides both.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ScheduledEmailDialogFilters(props: IScheduledEmailDialogFiltersProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ScheduledEmailDialogFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialogFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/ScheduledEmailDialogFilters.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AAIxE;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iCAAiC,2CASnF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { AutomationFiltersSelect } from "../../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
4
|
+
const OVERLAY_POSITION_TYPE = "sameAsTarget";
|
|
5
|
+
/**
|
|
6
|
+
* Default implementation of the scheduled email dialog's Filters tab content. The title is
|
|
7
|
+
* hidden and the list always expanded because the tab itself provides both.
|
|
8
|
+
*/
|
|
9
|
+
export function ScheduledEmailDialogFilters(props) {
|
|
10
|
+
return (_jsx(AutomationFiltersSelect, { ...props, overlayPositionType: OVERLAY_POSITION_TYPE, hideTitle: true, showAllFilters: true }));
|
|
11
|
+
}
|
|
@@ -2,7 +2,9 @@ import { type ReactElement } from "react";
|
|
|
2
2
|
import { type IScheduledEmailDialogProps } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Resolves the dialog component from DashboardComponentsContext and mounts it under the
|
|
5
|
-
* scheduled-export dialog's state contexts
|
|
5
|
+
* scheduled-export dialog's state contexts, inside the resolved context decorator — so a
|
|
6
|
+
* decorated dialog context is what both the state seeding and the dialog (default or
|
|
7
|
+
* replacement) read.
|
|
6
8
|
*
|
|
7
9
|
* @internal
|
|
8
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/ScheduledEmailDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"ScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/ScheduledEmailDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,0BAA0B,GAAG,YAAY,CAWpF"}
|
|
@@ -3,11 +3,13 @@ import { useDashboardComponentsContext } from "../../dashboardContexts/Dashboard
|
|
|
3
3
|
import { ScheduledEmailDialogStateProvider } from "./state/ScheduledEmailDialogStateProvider.js";
|
|
4
4
|
/**
|
|
5
5
|
* Resolves the dialog component from DashboardComponentsContext and mounts it under the
|
|
6
|
-
* scheduled-export dialog's state contexts
|
|
6
|
+
* scheduled-export dialog's state contexts, inside the resolved context decorator — so a
|
|
7
|
+
* decorated dialog context is what both the state seeding and the dialog (default or
|
|
8
|
+
* replacement) read.
|
|
7
9
|
*
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
12
|
export function ScheduledEmailDialog(props) {
|
|
11
|
-
const { ScheduledEmailDialogComponent } = useDashboardComponentsContext();
|
|
12
|
-
return (_jsx(ScheduledEmailDialogStateProvider, { children: _jsx(ScheduledEmailDialogComponent, { ...props }) }));
|
|
13
|
+
const { ScheduledEmailDialogComponent, ScheduledEmailDialogContextDecoratorComponent } = useDashboardComponentsContext();
|
|
14
|
+
return (_jsx(ScheduledEmailDialogContextDecoratorComponent, { children: _jsx(ScheduledEmailDialogStateProvider, { children: _jsx(ScheduledEmailDialogComponent, { ...props }) }) }));
|
|
13
15
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { type ComponentType, type KeyboardEvent, type Ref } from "react";
|
|
2
|
-
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
|
|
1
|
+
import { type ComponentType, type KeyboardEvent, type ReactNode, type Ref } from "react";
|
|
2
|
+
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget, type IdentifierRef, type ParameterValue } from "@gooddata/sdk-model";
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
|
-
import { type
|
|
4
|
+
import { type IAutomationFiltersTab } from "../../../model/store/filtering/types.js";
|
|
5
|
+
import { type IAutomationParameter } from "../shared/automationFilters/automationParameters.js";
|
|
6
|
+
import { type IAutomationDialogFiltersProps, type IAutomationDialogHeaderProps, type ISlotProps } from "../shared/slots/types.js";
|
|
5
7
|
/**
|
|
6
8
|
* @alpha
|
|
7
9
|
*/
|
|
@@ -9,14 +11,17 @@ export interface IScheduledEmailDialogProps {
|
|
|
9
11
|
/**
|
|
10
12
|
* In case, we are not creating new schedule, but editing existing one, this is the active schedule to be edited.
|
|
11
13
|
*
|
|
12
|
-
* @deprecated
|
|
14
|
+
* @deprecated has no effect since 11.51 — the dialog reads `scheduledExportToEdit` from
|
|
15
|
+
* `useScheduledEmailDialogContext()`. To adjust what it reads, use the
|
|
16
|
+
* `ScheduledEmailDialogContextDecoratorComponent` dashboard prop. Prop will be removed.
|
|
13
17
|
*/
|
|
14
18
|
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
15
19
|
/**
|
|
16
20
|
* Notification channels in organization
|
|
17
21
|
*
|
|
18
|
-
* @deprecated
|
|
19
|
-
*
|
|
22
|
+
* @deprecated has no effect since 11.51 — the dialog reads `notificationChannels` from
|
|
23
|
+
* `useScheduledEmailDialogContext()`. To adjust what it reads, use the
|
|
24
|
+
* `ScheduledEmailDialogContextDecoratorComponent` dashboard prop. Prop will be removed.
|
|
20
25
|
*/
|
|
21
26
|
notificationChannels?: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
22
27
|
/**
|
|
@@ -27,7 +32,9 @@ export interface IScheduledEmailDialogProps {
|
|
|
27
32
|
* supports insight widgets; custom widgets and nested layouts are not valid
|
|
28
33
|
* export targets and were silently discarded at the connector boundary anyway.
|
|
29
34
|
*
|
|
30
|
-
* @deprecated
|
|
35
|
+
* @deprecated has no effect since 11.51 — the dialog reads `widget` from
|
|
36
|
+
* `useScheduledEmailDialogContext()`. To adjust what it reads, use the
|
|
37
|
+
* `ScheduledEmailDialogContextDecoratorComponent` dashboard prop. Prop will be removed.
|
|
31
38
|
*/
|
|
32
39
|
widget?: IWidget;
|
|
33
40
|
/**
|
|
@@ -35,7 +42,9 @@ export interface IScheduledEmailDialogProps {
|
|
|
35
42
|
*
|
|
36
43
|
* Note: this is available only when scheduling export for widget, not dashboard.
|
|
37
44
|
*
|
|
38
|
-
* @deprecated
|
|
45
|
+
* @deprecated has no effect since 11.51 — the dialog reads `insight` from
|
|
46
|
+
* `useScheduledEmailDialogContext()`. To adjust what it reads, use the
|
|
47
|
+
* `ScheduledEmailDialogContextDecoratorComponent` dashboard prop. Prop will be removed.
|
|
39
48
|
*/
|
|
40
49
|
insight?: IInsight;
|
|
41
50
|
/**
|
|
@@ -50,7 +59,9 @@ export interface IScheduledEmailDialogProps {
|
|
|
50
59
|
*
|
|
51
60
|
* - If we are editing an existing scheduled export, this will contain its filters, as changing saved filters is currently not allowed.
|
|
52
61
|
*
|
|
53
|
-
* @deprecated
|
|
62
|
+
* @deprecated has no effect since 11.51 — the dialog reads `dashboardFilters` from
|
|
63
|
+
* `useScheduledEmailDialogContext()`. To adjust what it reads, use the
|
|
64
|
+
* `ScheduledEmailDialogContextDecoratorComponent` dashboard prop. Prop will be removed.
|
|
54
65
|
*/
|
|
55
66
|
dashboardFilters?: FilterContextItem[];
|
|
56
67
|
/**
|
|
@@ -71,7 +82,8 @@ export interface IScheduledEmailDialogProps {
|
|
|
71
82
|
/**
|
|
72
83
|
* Is scheduled email dialog loading initial data, before it can be rendered?
|
|
73
84
|
*
|
|
74
|
-
* @deprecated
|
|
85
|
+
* @deprecated has no effect since 11.51 — the dialog reads `isLoading` from
|
|
86
|
+
* `useScheduledEmailDialogContext()`. Prop will be removed.
|
|
75
87
|
*/
|
|
76
88
|
isLoading?: boolean;
|
|
77
89
|
/**
|
|
@@ -139,6 +151,73 @@ export interface IScheduledEmailDialogHeaderProps extends IAutomationDialogHeade
|
|
|
139
151
|
export type ScheduledEmailDialogHeaderDefaultProps = IScheduledEmailDialogHeaderProps & {
|
|
140
152
|
ref?: Ref<HTMLInputElement>;
|
|
141
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* Props of the default scheduled email dialog's filters region (the Filters tab content).
|
|
156
|
+
*
|
|
157
|
+
* @remarks
|
|
158
|
+
* The region is bimodal: whenever `filtersByTab` is present with more than one tab, the by-tab
|
|
159
|
+
* members (`filtersByTab` and the `*ByTab` parameter family) drive rendering and the flat
|
|
160
|
+
* handlers are unused; otherwise the flat members drive it and the by-tab members are unused.
|
|
161
|
+
* `defaultProps` always carries both families so a wrap stays faithful in either mode.
|
|
162
|
+
*
|
|
163
|
+
* @alpha
|
|
164
|
+
*/
|
|
165
|
+
export interface IScheduledEmailDialogFiltersProps extends IAutomationDialogFiltersProps {
|
|
166
|
+
/**
|
|
167
|
+
* Whether the schedule stores its own filters instead of using the latest saved dashboard
|
|
168
|
+
* filters.
|
|
169
|
+
*/
|
|
170
|
+
storeFilters: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Toggles filter (and parameter) persistence. The current filters must be passed back —
|
|
173
|
+
* flat mode as `(value, selectedFilters, undefined)`, by-tab mode as
|
|
174
|
+
* `(value, undefined, editedFiltersByTab)`; calling it with the value alone leaves the
|
|
175
|
+
* draft's export definitions out of sync with the toggle.
|
|
176
|
+
*/
|
|
177
|
+
onStoreFiltersChange: (value: boolean, filters?: FilterContextItem[], filtersByTab?: Record<string, FilterContextItem[]>) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the schedule targets the whole dashboard (shows the store-filters checkbox)
|
|
180
|
+
* rather than a single widget.
|
|
181
|
+
*/
|
|
182
|
+
isDashboardAutomation: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Filters structured per dashboard tab; when present with more than one tab, the region
|
|
185
|
+
* renders in by-tab mode.
|
|
186
|
+
*/
|
|
187
|
+
filtersByTab?: IAutomationFiltersTab[];
|
|
188
|
+
/**
|
|
189
|
+
* Edited filter selection per tab.
|
|
190
|
+
*/
|
|
191
|
+
editedFiltersByTab?: Record<string, FilterContextItem[]>;
|
|
192
|
+
/**
|
|
193
|
+
* Replaces a tab's filter selection with the complete updated record.
|
|
194
|
+
*/
|
|
195
|
+
onFiltersByTabChange?: (filtersByTab: Record<string, FilterContextItem[]>) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Parameter chips per tab (by-tab mode).
|
|
198
|
+
*/
|
|
199
|
+
parametersByTab?: Record<string, IAutomationParameter[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Addable workspace parameters per tab (by-tab mode).
|
|
202
|
+
*/
|
|
203
|
+
availableParametersByTab?: Record<string, IAutomationParameter[]>;
|
|
204
|
+
/**
|
|
205
|
+
* Called when a parameter is added in a tab section (by-tab mode).
|
|
206
|
+
*/
|
|
207
|
+
onParameterAddByTab?: (tabId: string, ref: IdentifierRef) => void;
|
|
208
|
+
/**
|
|
209
|
+
* Called when a parameter chip's value is edited in a tab section (by-tab mode).
|
|
210
|
+
*/
|
|
211
|
+
onParameterChangeByTab?: (tabId: string, ref: IdentifierRef, value: ParameterValue) => void;
|
|
212
|
+
/**
|
|
213
|
+
* Called when a parameter chip is removed in a tab section (by-tab mode).
|
|
214
|
+
*/
|
|
215
|
+
onParameterDeleteByTab?: (tabId: string, ref: IdentifierRef) => void;
|
|
216
|
+
/**
|
|
217
|
+
* Whether workspace parameters are enabled; adjusts the store-filters tooltip copy.
|
|
218
|
+
*/
|
|
219
|
+
parametersEnabled?: boolean;
|
|
220
|
+
}
|
|
142
221
|
/**
|
|
143
222
|
* Section-level overrides of the default scheduled email dialog.
|
|
144
223
|
*
|
|
@@ -150,6 +229,21 @@ export interface IScheduledEmailDialogSlots {
|
|
|
150
229
|
* identity — see {@link ISlotProps}.
|
|
151
230
|
*/
|
|
152
231
|
Header?: ComponentType<ISlotProps<ScheduledEmailDialogHeaderDefaultProps>>;
|
|
232
|
+
/**
|
|
233
|
+
* Wraps or replaces the Filters tab content (the filter and parameter chips). Must have a
|
|
234
|
+
* stable reference identity — see {@link ISlotProps}.
|
|
235
|
+
*
|
|
236
|
+
* Renders only in the fully rendered dialog **and only while the Filters tab is selected**:
|
|
237
|
+
* not while the dialog context reports loading, not while the stale-filters confirmation
|
|
238
|
+
* step is shown, and not on the General tab. The dialog opens on the General tab, so the
|
|
239
|
+
* slot is not mounted initially, and it unmounts — losing any local state — on every switch
|
|
240
|
+
* away from the Filters tab.
|
|
241
|
+
*
|
|
242
|
+
* A replacement takes over computing the next filters array: `onFiltersChange` /
|
|
243
|
+
* `onFiltersByTabChange` expect the complete selection, and `onStoreFiltersChange` must be
|
|
244
|
+
* passed the current filters — see {@link IScheduledEmailDialogFiltersProps}.
|
|
245
|
+
*/
|
|
246
|
+
Filters?: ComponentType<ISlotProps<IScheduledEmailDialogFiltersProps>>;
|
|
153
247
|
}
|
|
154
248
|
/**
|
|
155
249
|
* Props of {@link DefaultScheduledEmailDialog}.
|
|
@@ -157,7 +251,9 @@ export interface IScheduledEmailDialogSlots {
|
|
|
157
251
|
* @remarks
|
|
158
252
|
* Extends the shared {@link IScheduledEmailDialogProps} with customization only the default implementation
|
|
159
253
|
* 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.
|
|
254
|
+
* loading, and not while the stale-filters confirmation step is shown. The Filters slot
|
|
255
|
+
* additionally renders only while the Filters tab is selected — see
|
|
256
|
+
* {@link IScheduledEmailDialogSlots.Filters}.
|
|
161
257
|
*
|
|
162
258
|
* @alpha
|
|
163
259
|
*/
|
|
@@ -224,6 +320,40 @@ export interface IScheduledEmailManagementDialogProps {
|
|
|
224
320
|
* @alpha
|
|
225
321
|
*/
|
|
226
322
|
export type CustomScheduledEmailDialogComponent = ComponentType<IScheduledEmailDialogProps>;
|
|
323
|
+
/**
|
|
324
|
+
* Decorates the data the scheduled-email create/edit dialog reads.
|
|
325
|
+
*
|
|
326
|
+
* The dashboard mounts this component between the connector-provided dialog context and the
|
|
327
|
+
* dialog's state model, so the value it re-provides is what both the default dialog and the
|
|
328
|
+
* state seeding read — a wholesale `ScheduledEmailDialogComponent` replacement sees it too.
|
|
329
|
+
* Read the current value with `useScheduledEmailDialogContext()`, decorate the members to
|
|
330
|
+
* adjust, and re-provide via `ScheduledEmailDialogContextProvider`:
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```tsx
|
|
334
|
+
* function ChannelsDecorator({ children }: { children?: ReactNode }) {
|
|
335
|
+
* const ctx = useScheduledEmailDialogContext();
|
|
336
|
+
* const notificationChannels = useMyFilteredChannels(ctx.notificationChannels);
|
|
337
|
+
* const decorated = useMemo(() => ({ ...ctx, notificationChannels }), [ctx, notificationChannels]);
|
|
338
|
+
* return (
|
|
339
|
+
* <ScheduledEmailDialogContextProvider value={decorated}>
|
|
340
|
+
* {children}
|
|
341
|
+
* </ScheduledEmailDialogContextProvider>
|
|
342
|
+
* );
|
|
343
|
+
* }
|
|
344
|
+
* // <Dashboard ScheduledEmailDialogContextDecoratorComponent={ChannelsDecorator} />
|
|
345
|
+
* ```
|
|
346
|
+
*
|
|
347
|
+
* Pass `isLoading` through untouched. On scheduled email the loading state is on the ordinary
|
|
348
|
+
* path — a widget export renders while its filters load — so a decorator that overrides it
|
|
349
|
+
* corrupts the draft seed on every such open, not in an edge case. Define the decorator outside
|
|
350
|
+
* render, or the dialog remounts (and reseeds) on every parent render.
|
|
351
|
+
*
|
|
352
|
+
* @alpha
|
|
353
|
+
*/
|
|
354
|
+
export type CustomScheduledEmailDialogContextDecoratorComponent = ComponentType<{
|
|
355
|
+
children?: ReactNode;
|
|
356
|
+
}>;
|
|
227
357
|
/**
|
|
228
358
|
* @alpha
|
|
229
359
|
*/
|
|
@@ -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,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/scheduledEmail/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAClB,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAElD;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAE/F;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAE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AC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6CAA6C,GACrD,aAAa,CAAC,oCAAoC,CAAC,CAAC"}
|
|
@@ -4,13 +4,29 @@ import { type DashboardParameterMode, type IAutomationMetadataObjectDefinition,
|
|
|
4
4
|
* dialog. The `value` is the current effective value the headless run will capture; `definition`
|
|
5
5
|
* picks which control renders.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @alpha
|
|
8
8
|
*/
|
|
9
9
|
export interface IAutomationParameter {
|
|
10
|
+
/**
|
|
11
|
+
* Reference to the workspace parameter this row represents.
|
|
12
|
+
*/
|
|
10
13
|
ref: IdentifierRef;
|
|
14
|
+
/**
|
|
15
|
+
* Title shown on the parameter chip: the dashboard-level label when the dashboard defines one,
|
|
16
|
+
* otherwise the workspace parameter's title, otherwise the identifier.
|
|
17
|
+
*/
|
|
11
18
|
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* The current effective value — the value a headless run of the automation will capture.
|
|
21
|
+
*/
|
|
12
22
|
value: ParameterValue;
|
|
23
|
+
/**
|
|
24
|
+
* Dashboard-level mode of the parameter, controlling whether its chip is editable in the dialog.
|
|
25
|
+
*/
|
|
13
26
|
mode: DashboardParameterMode;
|
|
27
|
+
/**
|
|
28
|
+
* Resolved definition of the parameter; determines which editing control the chip renders.
|
|
29
|
+
*/
|
|
14
30
|
definition: IParameterDefinition;
|
|
15
31
|
}
|
|
16
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automationParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/automationParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAE3B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,cAAc,EAKtB,MAAM,qBAAqB,CAAC;AAI7B;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"automationParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/automationParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAE3B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,cAAc,EAKtB,MAAM,qBAAqB,CAAC;AAI7B;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,GAAG,EAAE,aAAa,CAAC;IAEnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,oBAAoB,CAAC;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,yCAAyC,CACrD,MAAM,EAAE,sBAAsB,EAAE,EAChC,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,OAAO,EAAE,wBAAwB,EAAE,EACnC,yBAAyB,EAAE,OAAO,GACnC,oBAAoB,EAAE,CAyBxB;AAED;;;;;;;GAOG;AACH,wBAAgB,mDAAmD,CAC/D,MAAM,EAAE,yBAAyB,EAAE,EACnC,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,OAAO,EAAE,wBAAwB,EAAE,EACnC,yBAAyB,EAAE,OAAO,GACnC,oBAAoB,EAAE,CAOxB;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CACzC,OAAO,EAAE,wBAAwB,EAAE,EACnC,QAAQ,EAAE,oBAAoB,EAAE,EAChC,mBAAmB,mCAA4B,EAC/C,qBAAqB,sCAA+B,EACpD,yBAAyB,EAAE,OAAO,GACnC,oBAAoB,EAAE,CAmCxB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,UAAU,EAAE,mCAAmC,EAC/C,UAAU,EAAE,sBAAsB,EAAE,GACrC,mCAAmC,CAcrC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAC5C,OAAO,EAAE,wBAAwB,EAAE,GACpC,OAAO,CAMT;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,sBAAsB,EAAE,EAChC,OAAO,EAAE,wBAAwB,EAAE,GACpC,sBAAsB,EAAE,CAG1B;AAED;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAClD,UAAU,EAAE,oBAAoB,EAAE,GACnC,yBAAyB,EAAE,CAO7B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,EACvD,WAAW,EAAE,OAAO,GACrB,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,CASzD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,OAAO,EAAE,YAAY,UAAQ,GAAG,OAAO,CAEpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAA0C,MAAM,OAAO,CAAC;AAItF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"useAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAA0C,MAAM,OAAO,CAAC;AAItF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,MAAM,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAiFxF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,kCAAkC;IAClC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,2DAA2D;IAC3D,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,8DAA8D;IAC9D,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,sFAAsF;IACtF,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,+BAA+B,EAAE,CAAC;IACpD,uCAAuC;IACvC,WAAW,EAAE,8BAA8B,EAAE,CAAC;CACjD;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAkOhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;CAuOrC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, isDashboardAttributeFilterItem, isDashboardDateFilter, isDashboardMeasureValueFilter, } from "@gooddata/sdk-model";
|
|
5
4
|
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
6
|
-
import {
|
|
5
|
+
import { applyFilterChange, getCatalogAttributesByFilters, getCatalogDateDatasetsByFilters, getCatalogMeasuresByFilters, getFilterTitle, getNonHiddenFilters, getNonSelectedFilters, removeFilterFrom, resolveFilterToAdd, resolveTabFilterToAdd, } from "./utils.js";
|
|
7
6
|
/**
|
|
8
7
|
* Computes visible filters by removing hidden filters.
|
|
9
8
|
*/
|
|
@@ -98,12 +97,7 @@ export const useAutomationFilters = ({ availableFilters, selectedFilters, onFilt
|
|
|
98
97
|
const filterTitle = getFilterTitle(filter, allAttributes, allDateDatasets, intl);
|
|
99
98
|
const message = intl.formatMessage({ id: "automationFilters.announcement.filterChanged" }, { title: filterTitle });
|
|
100
99
|
announceFiltersChanged(message);
|
|
101
|
-
const updatedFilters = selectedFilters
|
|
102
|
-
if (areFiltersMatchedByIdentifier(prevFilter, filter)) {
|
|
103
|
-
return filter;
|
|
104
|
-
}
|
|
105
|
-
return prevFilter;
|
|
106
|
-
});
|
|
100
|
+
const updatedFilters = applyFilterChange(selectedFilters, filter);
|
|
107
101
|
onFiltersChange(updatedFilters);
|
|
108
102
|
},
|
|
109
103
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -112,26 +106,14 @@ export const useAutomationFilters = ({ availableFilters, selectedFilters, onFilt
|
|
|
112
106
|
const filterTitle = getFilterTitle(filter, allAttributes, allDateDatasets, intl);
|
|
113
107
|
const message = intl.formatMessage({ id: "automationFilters.announcement.filterRemoved" }, { title: filterTitle });
|
|
114
108
|
announceFiltersChanged(message);
|
|
115
|
-
const updatedFilters = selectedFilters
|
|
109
|
+
const updatedFilters = removeFilterFrom(selectedFilters, filter);
|
|
116
110
|
onFiltersChange(updatedFilters);
|
|
117
111
|
focusFilterGroup();
|
|
118
112
|
},
|
|
119
113
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
114
|
[onFiltersChange, focusFilterGroup, selectedFilters, allAttributes, allDateDatasets, intl]);
|
|
121
115
|
const handleAddFilter = useCallback((catalogItemRef, attributes, dateDatasets) => {
|
|
122
|
-
|
|
123
|
-
// the filter is using different display form.
|
|
124
|
-
const selectedAttributeDisplayForms = attributes
|
|
125
|
-
.find((attribute) => attribute.displayForms.some((df) => areObjRefsEqual(df.ref, catalogItemRef)))
|
|
126
|
-
?.displayForms?.map((df) => df.ref) ?? [];
|
|
127
|
-
const selectedDateDataSets = dateDatasets.filter((ds) => areObjRefsEqual(ds.dataSet.ref, catalogItemRef));
|
|
128
|
-
const attributeFilter = selectedAttributeDisplayForms.reduce((acc, displayFormRef) => acc || getFilterByCatalogItemRef(displayFormRef, nonSelectedFilters), undefined);
|
|
129
|
-
const dateFilter = selectedDateDataSets.reduce((acc, dateDataSet) => acc || getFilterByCatalogItemRef(dateDataSet.dataSet.ref, nonSelectedFilters), undefined);
|
|
130
|
-
// For MVF: the dropdown emits the metric's catalog ref directly; look it up by ref.
|
|
131
|
-
const measureFilter = getFilterByCatalogItemRef(catalogItemRef, nonSelectedFilters);
|
|
132
|
-
const filter = attributeFilter ||
|
|
133
|
-
dateFilter ||
|
|
134
|
-
(measureFilter && isDashboardMeasureValueFilter(measureFilter) ? measureFilter : undefined);
|
|
116
|
+
const filter = resolveFilterToAdd(catalogItemRef, nonSelectedFilters, attributes, dateDatasets);
|
|
135
117
|
if (filter) {
|
|
136
118
|
const filterTitle = getFilterTitle(filter, allAttributes, allDateDatasets, intl);
|
|
137
119
|
const message = intl.formatMessage({ id: "automationFilters.announcement.filterAdded" }, { title: filterTitle });
|
|
@@ -259,11 +241,7 @@ export const useAutomationFiltersByTab = ({ filtersByTab, editedFiltersByTab, on
|
|
|
259
241
|
if (!updatedFilter) {
|
|
260
242
|
return;
|
|
261
243
|
}
|
|
262
|
-
const
|
|
263
|
-
const updatedTabFilters = currentTabFilters.map((f) => {
|
|
264
|
-
const currentFilterLocalId = getFilterLocalIdentifier(f);
|
|
265
|
-
return currentFilterLocalId === filterLocalId ? updatedFilter : f;
|
|
266
|
-
});
|
|
244
|
+
const updatedTabFilters = applyFilterChange(currentTabFilters, updatedFilter);
|
|
267
245
|
onFiltersByTabChange({
|
|
268
246
|
...editedFiltersByTab,
|
|
269
247
|
[tabId]: updatedTabFilters,
|
|
@@ -274,11 +252,7 @@ export const useAutomationFiltersByTab = ({ filtersByTab, editedFiltersByTab, on
|
|
|
274
252
|
return;
|
|
275
253
|
}
|
|
276
254
|
const currentTabFilters = editedFiltersByTab[tabId] ?? [];
|
|
277
|
-
const
|
|
278
|
-
const updatedTabFilters = currentTabFilters.filter((f) => {
|
|
279
|
-
const currentFilterLocalId = getFilterLocalIdentifier(f);
|
|
280
|
-
return currentFilterLocalId !== filterLocalId;
|
|
281
|
-
});
|
|
255
|
+
const updatedTabFilters = removeFilterFrom(currentTabFilters, filterToDelete);
|
|
282
256
|
onFiltersByTabChange({
|
|
283
257
|
...editedFiltersByTab,
|
|
284
258
|
[tabId]: updatedTabFilters,
|
|
@@ -293,25 +267,7 @@ export const useAutomationFiltersByTab = ({ filtersByTab, editedFiltersByTab, on
|
|
|
293
267
|
if (!tabData) {
|
|
294
268
|
return;
|
|
295
269
|
}
|
|
296
|
-
|
|
297
|
-
// the filter is using different display form (same logic as flat version).
|
|
298
|
-
const selectedAttributeDisplayForms = attributes
|
|
299
|
-
.find((attribute) => attribute.displayForms.some((df) => areObjRefsEqual(df.ref, displayForm)))
|
|
300
|
-
?.displayForms?.map((df) => df.ref) ?? [];
|
|
301
|
-
const selectedDateDataSets = dateDatasets.filter((ds) => areObjRefsEqual(ds.dataSet.ref, displayForm));
|
|
302
|
-
// Search through all display forms to find matching filter
|
|
303
|
-
const availableFilter = tabData.availableFilters.find((f) => {
|
|
304
|
-
if (isDashboardAttributeFilterItem(f)) {
|
|
305
|
-
return selectedAttributeDisplayForms.some((dfRef) => areObjRefsEqual(dashboardAttributeFilterItemDisplayForm(f), dfRef));
|
|
306
|
-
}
|
|
307
|
-
else if (isDashboardDateFilter(f)) {
|
|
308
|
-
return selectedDateDataSets.some((ds) => areObjRefsEqual(f.dateFilter.dataSet, ds.dataSet.ref));
|
|
309
|
-
}
|
|
310
|
-
else if (isDashboardMeasureValueFilter(f)) {
|
|
311
|
-
return areObjRefsEqual(f.dashboardMeasureValueFilter.measure, displayForm);
|
|
312
|
-
}
|
|
313
|
-
return false;
|
|
314
|
-
});
|
|
270
|
+
const availableFilter = resolveTabFilterToAdd(displayForm, tabData.availableFilters, attributes, dateDatasets);
|
|
315
271
|
if (availableFilter) {
|
|
316
272
|
onFiltersByTabChange({
|
|
317
273
|
...editedFiltersByTab,
|