@gooddata/sdk-ui-dashboard 11.36.0-alpha.3 → 11.36.0-alpha.6
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 +63 -115
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +5 -13
- package/esm/index.js +2 -10
- package/esm/internal.d.ts +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +24 -1
- package/esm/model/commandHandlers/dashboard/common/parameterHydration.d.ts +7 -1
- package/esm/model/commandHandlers/dashboard/common/parameterHydration.js +16 -2
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +4 -2
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts +7 -1
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.js +80 -4
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +10 -0
- package/esm/model/commandHandlers/filterContext/filterViewParameters.d.ts +7 -0
- package/esm/model/commandHandlers/filterContext/filterViewParameters.js +11 -0
- package/esm/model/store/config/configSelectors.d.ts +0 -6
- package/esm/model/store/config/configSelectors.js +0 -8
- package/esm/model/store/tabs/index.d.ts +4 -0
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts +11 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +16 -8
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.js +17 -0
- package/esm/model/types/commonTypes.d.ts +11 -2
- package/esm/model/utils/measureValueFilterUtils.d.ts +14 -0
- package/esm/model/utils/measureValueFilterUtils.js +21 -0
- package/esm/presentation/alerting/DefaultAlertingDialog/{DefaultAlertingDialogNew.d.ts → DefaultAlertingDialog.d.ts} +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/{DefaultAlertingDialogNew.js → DefaultAlertingDialog.js} +6 -12
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.js +43 -9
- package/esm/presentation/alerting/DefaultAlertingDialog/hooks/useSaveAlertToBackend.js +13 -25
- package/esm/presentation/alerting/types.d.ts +1 -72
- package/esm/presentation/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts +1 -2
- package/esm/presentation/automationFilters/hooks/useValidateExistingAutomationFilters.js +5 -5
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.js +1 -8
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js +17 -8
- package/esm/presentation/dashboard/DashboardHeader/ShareDialogDashboardHeader.js +5 -2
- package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +97 -13
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.d.ts +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.js +3 -3
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/DashboardParametersSection.d.ts +3 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/DashboardParametersSection.js +17 -4
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/InsightParametersSection.d.ts +4 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/InsightParametersSection.js +37 -4
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/Parameter.d.ts +4 -3
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/Parameter.js +3 -4
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +4 -1
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js +4 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -36
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -36
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +2 -9
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +2 -9
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +2 -9
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +26 -59
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +2 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +22 -104
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js +12 -33
- package/esm/presentation/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts +3 -0
- package/esm/presentation/scheduledEmail/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/scheduledEmail/types.d.ts +1 -7
- package/esm/presentation/scheduledEmail/utils/filters.d.ts +2 -0
- package/esm/presentation/scheduledEmail/utils/filters.js +5 -0
- package/esm/presentation/shareDialog/DefaultShareDialog.d.ts +1 -1
- package/esm/presentation/shareDialog/DefaultShareDialog.js +2 -2
- package/esm/presentation/shareDialog/types.d.ts +5 -1
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.d.ts +2 -2
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.js +36 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +3 -6
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +1 -9
- package/esm/sdk-ui-dashboard.d.ts +28 -240
- package/package.json +20 -20
- package/esm/model/react/filtering/shared.d.ts +0 -6
- package/esm/model/react/filtering/shared.js +0 -38
- package/esm/model/react/filtering/useAutomationAvailableDashboardFilters.d.ts +0 -13
- package/esm/model/react/filtering/useAutomationAvailableDashboardFilters.js +0 -54
- package/esm/model/react/filtering/useDashboardScheduledExportFilters.d.ts +0 -19
- package/esm/model/react/filtering/useDashboardScheduledExportFilters.js +0 -18
- package/esm/model/react/filtering/useScheduledExportFilters.d.ts +0 -26
- package/esm/model/react/filtering/useScheduledExportFilters.js +0 -23
- package/esm/model/react/filtering/useWidgetAlertFilters.d.ts +0 -33
- package/esm/model/react/filtering/useWidgetAlertFilters.js +0 -48
- package/esm/model/react/filtering/useWidgetScheduledExportFilters.d.ts +0 -33
- package/esm/model/react/filtering/useWidgetScheduledExportFilters.js +0 -48
- package/esm/model/react/useDashboardAlerting/useEnableAutomationFilterContext.d.ts +0 -4
- package/esm/model/react/useDashboardAlerting/useEnableAutomationFilterContext.js +0 -20
- package/esm/model/react/useDashboardAlertsOld.d.ts +0 -32
- package/esm/model/react/useDashboardAlertsOld.js +0 -141
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialogOld.d.ts +0 -5
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialogOld.js +0 -36
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelectOld.d.ts +0 -17
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelectOld.js +0 -103
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogOld.d.ts +0 -5
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogOld.js +0 -53
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertOld.d.ts +0 -9
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertOld.js +0 -84
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.d.ts +0 -11
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.js +0 -16
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderOld.d.ts +0 -1
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderOld.js +0 -12
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFilters.d.ts +0 -29
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFilters.js +0 -61
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFiltersList.d.ts +0 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFiltersList.js +0 -12
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentItems.d.ts +0 -17
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentItems.js +0 -68
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentsWrapper.d.ts +0 -4
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentsWrapper.js +0 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/DashboardAttachments.d.ts +0 -15
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/DashboardAttachments.js +0 -42
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/WidgetAttachments.d.ts +0 -18
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/WidgetAttachments.js +0 -25
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/types.d.ts +0 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/types.js +0 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertsOld.d.ts +0 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertsOld.js +0 -43
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2022-2026 GoodData Corporation
|
|
3
|
-
import { useCallback, useRef, useState } from "react";
|
|
4
|
-
import cx from "classnames";
|
|
5
|
-
import { useIntl } from "react-intl";
|
|
6
|
-
import { isInsightWidget } from "@gooddata/sdk-model";
|
|
7
|
-
import { IconAlert, IconAlertPaused, IconWarning, ShortenedText } from "@gooddata/sdk-ui-kit";
|
|
8
|
-
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
9
|
-
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
10
|
-
import { selectSeparators } from "../../../../model/store/config/configSelectors.js";
|
|
11
|
-
import { selectCanManageWorkspace } from "../../../../model/store/permissions/permissionsSelectors.js";
|
|
12
|
-
import { selectWidgetByRef } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
13
|
-
import { selectCurrentUser } from "../../../../model/store/user/userSelectors.js";
|
|
14
|
-
import { gdColorNegative, gdColorStateBlank } from "../../../constants/colors.js";
|
|
15
|
-
import { useAlertValidation } from "../../DefaultAlertingDialog/hooks/useAlertValidation.js";
|
|
16
|
-
import { getSubtitle } from "../../DefaultAlertingDialog/utils/getters.js";
|
|
17
|
-
import { AlertDropdown } from "./AlertDropdown.js";
|
|
18
|
-
const TEXT_TOOLTIP_ALIGN_POINTS = [
|
|
19
|
-
{ align: "tc bc", offset: { x: 0, y: 0 } },
|
|
20
|
-
{ align: "bc tc", offset: { x: 0, y: 0 } },
|
|
21
|
-
];
|
|
22
|
-
export function AlertOld({ alert, onDelete, onEdit, onPause }) {
|
|
23
|
-
const theme = useTheme();
|
|
24
|
-
const intl = useIntl();
|
|
25
|
-
const { isValid } = useAlertValidation(alert);
|
|
26
|
-
const iconColor = theme?.palette?.complementary?.c6 ?? gdColorStateBlank;
|
|
27
|
-
const iconColorError = theme?.palette?.error?.base ?? gdColorNegative;
|
|
28
|
-
const iconActive = _jsx(IconAlert, { width: 16, height: 16, color: iconColor });
|
|
29
|
-
const iconPaused = _jsx(IconAlertPaused, { width: 16, height: 16, color: iconColor });
|
|
30
|
-
const iconError = _jsx(IconWarning, { width: 16, height: 16, color: iconColorError });
|
|
31
|
-
const paused = alert.alert?.trigger.state === "PAUSED";
|
|
32
|
-
const editWidgetId = alert.metadata?.widget;
|
|
33
|
-
const editWidgetRef = editWidgetId ? { identifier: editWidgetId } : undefined;
|
|
34
|
-
const widget = useDashboardSelector(selectWidgetByRef(editWidgetRef));
|
|
35
|
-
const insightWidget = isInsightWidget(widget) ? widget : undefined;
|
|
36
|
-
const widgetName = insightWidget?.title ?? "";
|
|
37
|
-
const separators = useDashboardSelector(selectSeparators);
|
|
38
|
-
const subtitle = getSubtitle(intl, widgetName, alert, separators);
|
|
39
|
-
const [hover, setHover] = useState(false);
|
|
40
|
-
const [dropdownOpened, toggleDropdownOpened] = useState(false);
|
|
41
|
-
const buttonRef = useRef(null);
|
|
42
|
-
const currentUser = useDashboardSelector(selectCurrentUser);
|
|
43
|
-
const canManageWorkspace = useDashboardSelector(selectCanManageWorkspace);
|
|
44
|
-
const canEdit = canManageWorkspace || (currentUser && currentUser.login === alert.createdBy?.login);
|
|
45
|
-
const openDropdown = () => {
|
|
46
|
-
toggleDropdownOpened(true);
|
|
47
|
-
setHover(true);
|
|
48
|
-
};
|
|
49
|
-
const closeDropdown = () => {
|
|
50
|
-
toggleDropdownOpened(false);
|
|
51
|
-
setHover(false);
|
|
52
|
-
};
|
|
53
|
-
const handleEdit = useCallback(() => {
|
|
54
|
-
onEdit(alert, insightWidget, buttonRef.current, () => {
|
|
55
|
-
setHover(false);
|
|
56
|
-
});
|
|
57
|
-
closeDropdown();
|
|
58
|
-
setHover(true);
|
|
59
|
-
}, [alert, insightWidget, onEdit]);
|
|
60
|
-
const handleRemove = useCallback(() => {
|
|
61
|
-
onDelete(alert);
|
|
62
|
-
closeDropdown();
|
|
63
|
-
}, [alert, onDelete]);
|
|
64
|
-
const handlePause = useCallback(() => {
|
|
65
|
-
onPause(alert, true);
|
|
66
|
-
closeDropdown();
|
|
67
|
-
}, [alert, onPause]);
|
|
68
|
-
const handleResume = useCallback(() => {
|
|
69
|
-
onPause(alert, false);
|
|
70
|
-
closeDropdown();
|
|
71
|
-
}, [alert, onPause]);
|
|
72
|
-
return (_jsxs("div", { className: cx("gd-notifications-channel gd-notifications-channel-old", "s-alert", {
|
|
73
|
-
editable: false,
|
|
74
|
-
hover,
|
|
75
|
-
}), children: [dropdownOpened && buttonRef.current ? (_jsx(AlertDropdown, { isReadOnly: !canEdit, paused: paused, alignTo: buttonRef.current, onClose: closeDropdown, onEdit: handleEdit, onDelete: handleRemove, onPause: handlePause, onResume: handleResume })) : null, _jsx("div", { className: "gd-notifications-channel-menu", children: _jsx("span", { className: "gd-notifications-channel-menu-icon s-alert-menu-icon", id: `alert-menu-${alert.id}`, ref: buttonRef, onClick: openDropdown }) }), _jsxs("div", { className: "gd-notifications-channel-content", onClick: canEdit ? handleEdit : undefined, children: [
|
|
76
|
-
_jsx("div", { className: cx("gd-notifications-channel-icon", {
|
|
77
|
-
"gd-notifications-channel-icon-invalid": !isValid,
|
|
78
|
-
}), children: isValid ? (paused ? iconPaused : iconActive) : iconError }), _jsxs("div", { className: "gd-notifications-channel-text-content", children: [
|
|
79
|
-
_jsx("div", { className: "gd-notifications-channel-title", children: _jsx("strong", { children: _jsx(ShortenedText, { className: "gd-notifications-channel-shortened-text", tooltipAlignPoints: TEXT_TOOLTIP_ALIGN_POINTS, children: alert.title ??
|
|
80
|
-
intl.formatMessage({ id: "dialogs.alerting.title.placeholder" }) }) }) }), _jsx("div", { children: _jsx("span", { className: "gd-notifications-channel-subtitle", children: _jsx(ShortenedText, { className: "gd-notifications-channel-shortened-text", tooltipAlignPoints: TEXT_TOOLTIP_ALIGN_POINTS, children: subtitle }) }) })
|
|
81
|
-
] })
|
|
82
|
-
] })
|
|
83
|
-
] }));
|
|
84
|
-
}
|
package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type IAutomationMetadataObject, type IInsightWidget } from "@gooddata/sdk-model";
|
|
2
|
-
interface IAlertsProps {
|
|
3
|
-
onDelete: (alert: IAutomationMetadataObject) => void;
|
|
4
|
-
onEdit: (alert: IAutomationMetadataObject, widget: IInsightWidget | undefined, anchor: HTMLElement | null, onClosed: () => void) => void;
|
|
5
|
-
onPause: (alert: IAutomationMetadataObject, pause: boolean) => void;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
alerts: IAutomationMetadataObject[];
|
|
8
|
-
noAlertsMessageId: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function AlertsOld({ isLoading, alerts, onDelete, onEdit, onPause, noAlertsMessageId }: IAlertsProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2022-2025 GoodData Corporation
|
|
3
|
-
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import { LoadingSpinner } from "@gooddata/sdk-ui-kit";
|
|
5
|
-
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
6
|
-
import { AlertOld } from "./AlertOld.js";
|
|
7
|
-
export function AlertsOld({ isLoading, alerts, onDelete, onEdit, onPause, noAlertsMessageId }) {
|
|
8
|
-
const theme = useTheme();
|
|
9
|
-
if (isLoading) {
|
|
10
|
-
return (_jsx("div", { className: "gd-loading-equalizer-wrap gd-notifications-channels-message", children: _jsx("div", { className: "gd-loading-equalizer gd-loading-equalizer-fade", children: _jsx(LoadingSpinner, { className: "large gd-loading-equalizer-spinner", color: theme?.palette?.complementary?.c9 }) }) }));
|
|
11
|
-
}
|
|
12
|
-
if (alerts.length === 0) {
|
|
13
|
-
return (_jsx("div", { className: "gd-notifications-channels-message s-no-alerts-message", children: _jsx(FormattedMessage, { id: noAlertsMessageId, values: { br: _jsx("br", {}) } }) }));
|
|
14
|
-
}
|
|
15
|
-
return (_jsx(_Fragment, { children: alerts.map((alert) => (_jsx(AlertOld, { alert: alert, onDelete: onDelete, onEdit: onEdit, onPause: onPause }, alert.id))) }));
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function AlertingDialogProviderOld(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2022-2026 GoodData Corporation
|
|
3
|
-
import { useDashboardAlertsOld } from "../../../model/react/useDashboardAlertsOld.js";
|
|
4
|
-
import { DefaultAlertingDialogOld } from "../../alerting/DefaultAlertingDialog/DefaultAlertingDialogOld.js";
|
|
5
|
-
import { DefaultAlertingManagementDialogOld } from "../../alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogOld.js";
|
|
6
|
-
export function AlertingDialogProviderOld() {
|
|
7
|
-
const { isInitialized, automations, alertingLoadError, alertingToEdit, isAlertingLoading, isAlertingManagementDialogOpen, isAlertingDialogOpen, onAlertingManagementEdit, onAlertingManagementClose, onAlertingManagementDeleteSuccess, onAlertingManagementDeleteError, onAlertingManagementPauseSuccess, onAlertingManagementPauseError, onAlertingCancel, onAlertingUpdate, } = useDashboardAlertsOld();
|
|
8
|
-
if (!isInitialized) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return (_jsxs(_Fragment, { children: [isAlertingManagementDialogOpen ? (_jsx(DefaultAlertingManagementDialogOld, { onEdit: onAlertingManagementEdit, onClose: onAlertingManagementClose, onDeleteSuccess: onAlertingManagementDeleteSuccess, onDeleteError: onAlertingManagementDeleteError, onPauseSuccess: onAlertingManagementPauseSuccess, onPauseError: onAlertingManagementPauseError, isLoadingAlertingData: isAlertingLoading, automations: automations, alertingDataError: alertingLoadError })) : null, isAlertingDialogOpen ? (_jsx(DefaultAlertingDialogOld, { anchorEl: alertingToEdit?.anchor, editAlert: alertingToEdit?.alert, editWidget: alertingToEdit?.widget, onCancel: onAlertingCancel, onUpdate: onAlertingUpdate })) : null] }));
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
2
|
-
import { type IAttachmentFilterInfo } from "../../hooks/useFiltersForDashboardScheduledExportInfo.js";
|
|
3
|
-
interface IAttachmentFiltersProps {
|
|
4
|
-
filterType: AttachmentFilterType;
|
|
5
|
-
onChange: (type: AttachmentFilterType) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Whole attachment content is hidden
|
|
8
|
-
*/
|
|
9
|
-
hidden?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* We do not allow changing the filter type when disabled
|
|
12
|
-
*/
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Information about attachment filters
|
|
16
|
-
*/
|
|
17
|
-
filters?: IAttachmentFilterInfo[];
|
|
18
|
-
/**
|
|
19
|
-
* Position type of the dropdown
|
|
20
|
-
*/
|
|
21
|
-
overlayPositionType?: OverlayPositionType;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* edited - ad-hoc changed dashboard filters
|
|
25
|
-
* default - default dashboard filters stored in its filter context definition
|
|
26
|
-
*/
|
|
27
|
-
export type AttachmentFilterType = "edited" | "default";
|
|
28
|
-
export declare function AttachmentFilters({ filterType, onChange, hidden, disabled, filters, overlayPositionType }: IAttachmentFiltersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2024-2026 GoodData Corporation
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { FormattedMessage, defineMessage, useIntl } from "react-intl";
|
|
5
|
-
import { Bubble, BubbleHoverTrigger, Button, ContentDivider, Dropdown, } from "@gooddata/sdk-ui-kit";
|
|
6
|
-
import { DEFAULT_DROPDOWN_ALIGN_POINTS } from "../../constants.js";
|
|
7
|
-
import { AttachmentFiltersList } from "./AttachmentFiltersList.js";
|
|
8
|
-
const TOOLTIP_ALIGN_POINTS = [
|
|
9
|
-
{
|
|
10
|
-
align: "cr cl",
|
|
11
|
-
offset: { x: 0, y: -2 },
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
align: "cl cr",
|
|
15
|
-
offset: { x: 0, y: -2 },
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
const buttonTitle = {
|
|
19
|
-
edited: defineMessage({ id: "dialogs.schedule.management.attachments.filters.edited" }).id,
|
|
20
|
-
default: defineMessage({ id: "dialogs.schedule.management.attachments.filters.default" }).id,
|
|
21
|
-
};
|
|
22
|
-
export function AttachmentFilters({ filterType, onChange, hidden = false, disabled = false, filters, overlayPositionType, }) {
|
|
23
|
-
const [selectedType, setSelectedType] = useState(filterType);
|
|
24
|
-
const intl = useIntl();
|
|
25
|
-
const handleTypeChange = (type) => {
|
|
26
|
-
if (!disabled) {
|
|
27
|
-
setSelectedType(type);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const isDefaultDisabled = selectedType !== "default" && disabled;
|
|
31
|
-
const defaultFiltersTooltipMessage = isDefaultDisabled
|
|
32
|
-
? defineMessage({
|
|
33
|
-
id: "dialogs.schedule.management.attachments.filters.item.tooltip.disabled",
|
|
34
|
-
})
|
|
35
|
-
: defineMessage({ id: "dialogs.schedule.management.attachments.filters.item.tooltip" });
|
|
36
|
-
if (hidden) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
return (_jsx(Dropdown, { overlayPositionType: overlayPositionType, alignPoints: DEFAULT_DROPDOWN_ALIGN_POINTS, renderButton: ({ toggleDropdown }) => (_jsxs("div", { className: "gd-attachment-filters-dropdown-button", children: [
|
|
40
|
-
_jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.using" }), _jsx(Button, { className: "gd-button-link-dimmed s-attachment-filters-dropdown-button", value: intl.formatMessage({ id: buttonTitle[filterType] }), onClick: toggleDropdown })
|
|
41
|
-
] })), renderBody: ({ closeDropdown }) => (_jsxs("div", { className: "gd-attachment-filters-dropdown", children: [
|
|
42
|
-
_jsxs("div", { className: "gd-list-title", children: [
|
|
43
|
-
_jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.title" }), _jsx("div", { className: "gd-close-button", children: _jsx(Button, { className: "gd-button-link gd-button-icon-only gd-icon-cross s-dialog-close-button", value: "", onClick: closeDropdown }) })
|
|
44
|
-
] }), _jsxs("div", { className: "gd-attachment-filters-dropdown-content", children: [
|
|
45
|
-
_jsxs("label", { className: "input-radio-label", children: [
|
|
46
|
-
_jsx("input", { type: "radio", className: "input-radio", name: "filterType", onChange: () => handleTypeChange("edited"), checked: selectedType === "edited", disabled: selectedType !== "edited" && disabled }), _jsx("span", { className: "input-label-text", children: _jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.item.edited" }) })
|
|
47
|
-
] }), _jsx(AttachmentFiltersList, { filters: filters }), _jsxs("label", { className: "input-radio-label", children: [
|
|
48
|
-
_jsx("input", { type: "radio", className: "input-radio", name: "filterType", onChange: () => handleTypeChange("default"), checked: selectedType === "default", disabled: isDefaultDisabled }), _jsxs("span", { className: "input-label-text", children: [
|
|
49
|
-
_jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.item.default" }), _jsxs(BubbleHoverTrigger, { children: [
|
|
50
|
-
_jsx("span", { className: "gd-icon-circle-question" }), _jsx(Bubble, { alignPoints: TOOLTIP_ALIGN_POINTS, children: _jsx(FormattedMessage, { id: defaultFiltersTooltipMessage.id }) })
|
|
51
|
-
] })
|
|
52
|
-
] })
|
|
53
|
-
] })
|
|
54
|
-
] }), _jsx(ContentDivider, { className: "gd-divider-without-margin" }), _jsxs("div", { className: "gd-attachment-filters-dropdown-footer", children: [
|
|
55
|
-
_jsx(Button, { value: intl.formatMessage({ id: "cancel" }), className: "gd-button-secondary", onClick: closeDropdown }), _jsx(Button, { value: intl.formatMessage({ id: "save" }), className: "gd-button-action", onClick: () => {
|
|
56
|
-
onChange(selectedType);
|
|
57
|
-
closeDropdown();
|
|
58
|
-
}, disabled: selectedType === filterType })
|
|
59
|
-
] })
|
|
60
|
-
] })) }));
|
|
61
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type IAttachmentFilterInfo } from "../../hooks/useFiltersForDashboardScheduledExportInfo.js";
|
|
2
|
-
interface IAttachmentFiltersListProps {
|
|
3
|
-
filters?: IAttachmentFilterInfo[];
|
|
4
|
-
}
|
|
5
|
-
export declare function AttachmentFiltersList({ filters }: IAttachmentFiltersListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function AttachmentFiltersList({ filters }) {
|
|
3
|
-
if (!filters) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
return (_jsx("div", { className: "gd-attachment-filters-list", children: filters.map((filter) => (_jsx(FilterListItem, { title: filter.title, subtitle: filter.subtitle }, filter.id))) }));
|
|
7
|
-
}
|
|
8
|
-
function FilterListItem({ title, subtitle }) {
|
|
9
|
-
return (_jsxs("div", { className: "gd-attachment-filters-list-item", children: [
|
|
10
|
-
_jsx("div", { className: "gd-attachment-filters-list-item-title", title: subtitle, children: title }), _jsx("div", { className: "gd-attachment-filters-list-item-subtitle", title: subtitle, children: subtitle })
|
|
11
|
-
] }));
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type IExportDefinitionVisualizationObjectSettings } from "@gooddata/sdk-model";
|
|
2
|
-
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
3
|
-
import { type OldWidgetAttachmentType } from "../../types.js";
|
|
4
|
-
export declare function AttachmentDashboard({ pdfSelected, disabled, onSelectionChange }: {
|
|
5
|
-
pdfSelected: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
onSelectionChange: () => void;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare function AttachmentWidgets({ csvSelected, xlsxSelected, settings, onSelectionChange, onSettingsChange, closeOnParentScroll, overlayPositionType }: {
|
|
10
|
-
csvSelected: boolean;
|
|
11
|
-
xlsxSelected: boolean;
|
|
12
|
-
settings: IExportDefinitionVisualizationObjectSettings;
|
|
13
|
-
onSelectionChange: (format: OldWidgetAttachmentType) => void;
|
|
14
|
-
onSettingsChange: (obj: IExportDefinitionVisualizationObjectSettings) => void;
|
|
15
|
-
closeOnParentScroll?: boolean;
|
|
16
|
-
overlayPositionType?: OverlayPositionType;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2024-2025 GoodData Corporation
|
|
3
|
-
import { useCallback, useState } from "react";
|
|
4
|
-
import cx from "classnames";
|
|
5
|
-
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
|
-
import { Button, ContentDivider, Dropdown, isEscapeKey, isSpaceKey, } from "@gooddata/sdk-ui-kit";
|
|
7
|
-
const DROPDOWN_ALIGN_POINTS = [
|
|
8
|
-
{
|
|
9
|
-
align: "bc tc",
|
|
10
|
-
offset: { x: 0, y: 0 },
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
align: "tc bc",
|
|
14
|
-
offset: { x: 0, y: 0 },
|
|
15
|
-
},
|
|
16
|
-
];
|
|
17
|
-
function AttachmentItem({ format, checked, onChange, className, disabled, }) {
|
|
18
|
-
const intl = useIntl();
|
|
19
|
-
const handleKeyDown = (e) => {
|
|
20
|
-
if (disabled) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (isSpaceKey(e)) {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
onChange();
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return (_jsxs("label", { className: "gd-notifications-channels-attachment-checkbox input-checkbox-label", children: [
|
|
29
|
-
_jsx("input", { type: "checkbox", className: "input-checkbox", disabled: disabled, checked: checked, onChange: onChange, onKeyDown: handleKeyDown, "aria-label": intl.formatMessage({ id: "dialogs.schedule.management.attachments.attachment" }, { format: format }) }), _jsx("span", { className: "input-label-text" }), _jsx("div", { className: cx("gd-attachment-item", `s-attachment-item-${format.toLowerCase()}`, className), children: _jsx("span", { className: "gd-attachment-item-format", children: format }) })
|
|
30
|
-
] }));
|
|
31
|
-
}
|
|
32
|
-
export function AttachmentDashboard({ pdfSelected, disabled, onSelectionChange, }) {
|
|
33
|
-
return (_jsx(AttachmentItem, { format: "PDF", disabled: disabled, checked: pdfSelected, onChange: onSelectionChange }));
|
|
34
|
-
}
|
|
35
|
-
export function AttachmentWidgets({ csvSelected, xlsxSelected, settings, onSelectionChange, onSettingsChange, closeOnParentScroll, overlayPositionType, }) {
|
|
36
|
-
const intl = useIntl();
|
|
37
|
-
const [mergeHeaders, setMergeHeaders] = useState(settings.mergeHeaders);
|
|
38
|
-
const handleInputKeyDown = useCallback((e) => {
|
|
39
|
-
if (isSpaceKey(e)) {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
setMergeHeaders(!mergeHeaders);
|
|
42
|
-
}
|
|
43
|
-
}, [setMergeHeaders, mergeHeaders]);
|
|
44
|
-
return (_jsxs(_Fragment, { children: [
|
|
45
|
-
_jsx(AttachmentItem, { format: "CSV", checked: csvSelected, onChange: () => onSelectionChange("CSV") }), _jsx(AttachmentItem, { format: "XLSX", checked: xlsxSelected, onChange: () => onSelectionChange("XLSX"), className: "gd-attachment-item-format-with-configuration" }), _jsx(Dropdown, { closeOnParentScroll: closeOnParentScroll, overlayPositionType: overlayPositionType, alignPoints: DROPDOWN_ALIGN_POINTS, autofocusOnOpen: true, renderButton: ({ toggleDropdown, buttonRef }) => (_jsx(Button, { className: "gd-attachment-item-configuration gd-icon-settings", onClick: toggleDropdown, accessibilityConfig: {
|
|
46
|
-
ariaLabel: intl.formatMessage({
|
|
47
|
-
id: "dialogs.schedule.management.attachments.xlsx.settings",
|
|
48
|
-
}),
|
|
49
|
-
}, ref: buttonRef })), renderBody: ({ closeDropdown }) => (_jsxs("div", { className: "gd-attachment-settings-dropdown", onKeyDown: (e) => {
|
|
50
|
-
if (isEscapeKey(e)) {
|
|
51
|
-
e.stopPropagation();
|
|
52
|
-
closeDropdown();
|
|
53
|
-
}
|
|
54
|
-
}, children: [
|
|
55
|
-
_jsxs("div", { className: "gd-list-title", children: [
|
|
56
|
-
_jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.xlsx.settings" }), _jsx("div", { className: "gd-close-button", children: _jsx(Button, { className: "gd-button-link gd-button-icon-only gd-icon-cross s-dialog-close-button", value: "", onClick: closeDropdown, accessibilityConfig: {
|
|
57
|
-
ariaLabel: intl.formatMessage({ id: "close" }),
|
|
58
|
-
} }) })
|
|
59
|
-
] }), _jsx("div", { className: "gd-attachment-settings-dropdown-content", children: _jsxs("label", { className: "input-checkbox-label", children: [
|
|
60
|
-
_jsx("input", { type: "checkbox", className: "input-checkbox", onChange: () => setMergeHeaders(!mergeHeaders), onKeyDown: handleInputKeyDown, checked: mergeHeaders }), _jsx("span", { className: "input-label-text", children: _jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.cells.merged" }) })
|
|
61
|
-
] }) }), _jsx(ContentDivider, { className: "gd-divider-without-margin" }), _jsxs("div", { className: "gd-attachment-settings-dropdown-footer", children: [
|
|
62
|
-
_jsx(Button, { value: intl.formatMessage({ id: "cancel" }), className: "gd-button-secondary", onClick: closeDropdown }), _jsx(Button, { value: intl.formatMessage({ id: "save" }), className: "gd-button-action", onClick: () => {
|
|
63
|
-
onSettingsChange({ mergeHeaders });
|
|
64
|
-
closeDropdown();
|
|
65
|
-
}, disabled: mergeHeaders === settings.mergeHeaders })
|
|
66
|
-
] })
|
|
67
|
-
] })) })] }));
|
|
68
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FormattedMessage } from "react-intl";
|
|
3
|
-
export function AttachmentsWrapper({ children }) {
|
|
4
|
-
return (_jsxs("fieldset", { className: "gd-input-component gd-notifications-channels-attachments s-notifications-channels-attachments", children: [
|
|
5
|
-
_jsx("legend", { className: "gd-label", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.attachments.label" }) }), children] }));
|
|
6
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type FilterContextItem, type IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
-
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
3
|
-
import { type IAttachmentFilterInfo } from "../../hooks/useFiltersForDashboardScheduledExportInfo.js";
|
|
4
|
-
export interface IDashboardAttachmentsProps {
|
|
5
|
-
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
6
|
-
dashboardSelected: boolean;
|
|
7
|
-
areDashboardFiltersChanged: boolean;
|
|
8
|
-
dashboardFilters?: FilterContextItem[];
|
|
9
|
-
isCrossFiltering: boolean;
|
|
10
|
-
filtersToDisplayInfo: IAttachmentFilterInfo[];
|
|
11
|
-
onDashboardAttachmentsSelectionChange: (dashboardSelected: boolean, filters?: FilterContextItem[]) => void;
|
|
12
|
-
enableAutomationFilterContext?: boolean;
|
|
13
|
-
overlayPositionType?: OverlayPositionType;
|
|
14
|
-
}
|
|
15
|
-
export declare function DashboardAttachments({ dashboardSelected, scheduledExportToEdit, areDashboardFiltersChanged, dashboardFilters, isCrossFiltering, filtersToDisplayInfo, onDashboardAttachmentsSelectionChange, enableAutomationFilterContext, overlayPositionType }: IDashboardAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2019-2026 GoodData Corporation
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { FormattedMessage } from "react-intl";
|
|
5
|
-
import { Message } from "@gooddata/sdk-ui-kit";
|
|
6
|
-
import { getAutomationDashboardFilters } from "../../../../../_staging/automation/index.js";
|
|
7
|
-
import { AttachmentFilters } from "./AttachmentFilters.js";
|
|
8
|
-
import { AttachmentDashboard } from "./AttachmentItems.js";
|
|
9
|
-
import { AttachmentsWrapper } from "./AttachmentsWrapper.js";
|
|
10
|
-
export function DashboardAttachments({ dashboardSelected, scheduledExportToEdit, areDashboardFiltersChanged, dashboardFilters, isCrossFiltering, filtersToDisplayInfo, onDashboardAttachmentsSelectionChange, enableAutomationFilterContext, overlayPositionType, }) {
|
|
11
|
-
/**
|
|
12
|
-
* When editing a schedule, we need to get the filters from the export definition and we don't care
|
|
13
|
-
* about the actual filters on the dashboard.
|
|
14
|
-
*/
|
|
15
|
-
const savedFilters = getAutomationDashboardFilters(scheduledExportToEdit);
|
|
16
|
-
const isEditing = !!scheduledExportToEdit;
|
|
17
|
-
const [attachmentFilterType, setAttachmentFilterType] = useState(
|
|
18
|
-
/**
|
|
19
|
-
* We use "edited" by default when creating a new schedule or editing
|
|
20
|
-
* an existing schedule with filters.
|
|
21
|
-
* "default" is used when editing without filters.
|
|
22
|
-
*/
|
|
23
|
-
!isEditing || savedFilters ? "edited" : "default");
|
|
24
|
-
const showAttachmentFilters = enableAutomationFilterContext
|
|
25
|
-
? false
|
|
26
|
-
: isEditing
|
|
27
|
-
? attachmentFilterType !== "default"
|
|
28
|
-
: areDashboardFiltersChanged && dashboardSelected;
|
|
29
|
-
const includeFilters = attachmentFilterType === "edited" && areDashboardFiltersChanged;
|
|
30
|
-
const handleAttachmentFilterTypeChange = (type) => {
|
|
31
|
-
const includeFilters = type === "edited" && areDashboardFiltersChanged;
|
|
32
|
-
setAttachmentFilterType(type);
|
|
33
|
-
onDashboardAttachmentsSelectionChange(dashboardSelected, includeFilters ? dashboardFilters : undefined);
|
|
34
|
-
};
|
|
35
|
-
const handleDashboardAttachmentSelectionChange = () => {
|
|
36
|
-
onDashboardAttachmentsSelectionChange(!dashboardSelected, includeFilters ? dashboardFilters : undefined);
|
|
37
|
-
};
|
|
38
|
-
return (_jsx(AttachmentsWrapper, { children: _jsxs("div", { className: "gd-attachment-list-old", children: [
|
|
39
|
-
_jsx(AttachmentDashboard, { disabled: true, pdfSelected: dashboardSelected, onSelectionChange: handleDashboardAttachmentSelectionChange }), _jsx(AttachmentFilters, { filterType: attachmentFilterType, onChange: handleAttachmentFilterTypeChange, hidden: !showAttachmentFilters, disabled: isEditing, filters: filtersToDisplayInfo, overlayPositionType: overlayPositionType }), isCrossFiltering && dashboardSelected ? (_jsx(Message, { type: "progress", className: "gd-attachment-list-message", children: _jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.message", values: {
|
|
40
|
-
strong: (chunks) => _jsx("strong", { children: chunks }),
|
|
41
|
-
} }) })) : null] }) }));
|
|
42
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type IAutomationMetadataObject, type IExportDefinitionVisualizationObjectSettings, type IFilter } from "@gooddata/sdk-model";
|
|
2
|
-
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
3
|
-
import { type OldWidgetAttachmentType } from "../../types.js";
|
|
4
|
-
export interface IWidgetAttachmentsProps {
|
|
5
|
-
widgetFilters?: IFilter[];
|
|
6
|
-
areDashboardFiltersChanged: boolean;
|
|
7
|
-
isCrossFiltering: boolean;
|
|
8
|
-
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
9
|
-
csvSelected: boolean;
|
|
10
|
-
xlsxSelected: boolean;
|
|
11
|
-
settings: IExportDefinitionVisualizationObjectSettings;
|
|
12
|
-
onWidgetAttachmentsSelectionChange: (selected: boolean, format: OldWidgetAttachmentType, filters?: IFilter[]) => void;
|
|
13
|
-
onAttachmentsSettingsChange: (obj: IExportDefinitionVisualizationObjectSettings) => void;
|
|
14
|
-
enableAutomationFilterContext?: boolean;
|
|
15
|
-
closeOnParentScroll?: boolean;
|
|
16
|
-
overlayPositionType?: OverlayPositionType;
|
|
17
|
-
}
|
|
18
|
-
export declare function WidgetAttachments({ widgetFilters, areDashboardFiltersChanged, isCrossFiltering, csvSelected, xlsxSelected, settings, scheduledExportToEdit, onWidgetAttachmentsSelectionChange, onAttachmentsSettingsChange, enableAutomationFilterContext, closeOnParentScroll, overlayPositionType }: IWidgetAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FormattedMessage } from "react-intl";
|
|
3
|
-
import { Message } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import { AttachmentWidgets } from "./AttachmentItems.js";
|
|
5
|
-
import { AttachmentsWrapper } from "./AttachmentsWrapper.js";
|
|
6
|
-
export function WidgetAttachments({ widgetFilters, areDashboardFiltersChanged, isCrossFiltering, csvSelected, xlsxSelected, settings, scheduledExportToEdit, onWidgetAttachmentsSelectionChange, onAttachmentsSettingsChange, enableAutomationFilterContext, closeOnParentScroll, overlayPositionType, }) {
|
|
7
|
-
const renderFiltersMessage = !enableAutomationFilterContext;
|
|
8
|
-
const isEditing = !!scheduledExportToEdit;
|
|
9
|
-
const handleWidgetAttachmentSelectionChange = (format) => {
|
|
10
|
-
if (format === "CSV") {
|
|
11
|
-
onWidgetAttachmentsSelectionChange(!csvSelected, format, widgetFilters);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
onWidgetAttachmentsSelectionChange(!xlsxSelected, format, widgetFilters);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (_jsx(AttachmentsWrapper, { children: _jsxs("div", { className: "gd-attachment-list-old", children: [
|
|
18
|
-
_jsx(AttachmentWidgets, { csvSelected: csvSelected, xlsxSelected: xlsxSelected, settings: settings, onSelectionChange: handleWidgetAttachmentSelectionChange, onSettingsChange: onAttachmentsSettingsChange, closeOnParentScroll: closeOnParentScroll, overlayPositionType: overlayPositionType }), renderFiltersMessage &&
|
|
19
|
-
(isEditing || areDashboardFiltersChanged) &&
|
|
20
|
-
(csvSelected || xlsxSelected) ? (_jsxs("div", { className: "s-scheduled-email-attachments-filters-message", children: [
|
|
21
|
-
_jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.using" }), " ", _jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.filters.edited" })
|
|
22
|
-
] })) : null, isCrossFiltering ? (_jsx(Message, { type: "progress", className: "gd-attachment-list-message", children: _jsx(FormattedMessage, { id: "dialogs.schedule.management.attachments.message", values: {
|
|
23
|
-
strong: (chunks) => _jsx("strong", { children: chunks }),
|
|
24
|
-
} }) })) : null] }) }));
|
|
25
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2022-2026 GoodData Corporation
|
|
3
|
-
import cx from "classnames";
|
|
4
|
-
import { isInsightWidget, objRefToString } from "@gooddata/sdk-model";
|
|
5
|
-
import { OverlayController, OverlayControllerProvider, ScrollablePanel } from "@gooddata/sdk-ui-kit";
|
|
6
|
-
import { simplifyText } from "@gooddata/util";
|
|
7
|
-
import { AlertDeleteDialog } from "../../../alerting/DefaultAlertingDialog/components/AlertDeleteDialog.js";
|
|
8
|
-
import { DASHBOARD_HEADER_OVERLAYS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
9
|
-
import { AlertsList } from "./InsightAlertConfig/AlertsList.js";
|
|
10
|
-
import { CreateAlert } from "./InsightAlertConfig/CreateAlert.js";
|
|
11
|
-
import { EditAlert } from "./InsightAlertConfig/EditAlert.js";
|
|
12
|
-
import { useInsightWidgetAlerting } from "./InsightAlertConfig/hooks/useInsightWidgetAlerting.js";
|
|
13
|
-
import { NoAvailableMeasures } from "./InsightAlertConfig/NoAvailableAlerts.js";
|
|
14
|
-
const overlayController = OverlayController.getInstance(DASHBOARD_HEADER_OVERLAYS_Z_INDEX);
|
|
15
|
-
export function InsightAlertsOld({ widget, onClose, onGoBack }) {
|
|
16
|
-
const widgetRefSuffix = isInsightWidget(widget) ? simplifyText(objRefToString(widget.ref)) : "";
|
|
17
|
-
const classes = cx("gd-alerts-configuration-panel", "configuration-scrollable-panel", "s-configuration-scrollable-panel", `s-visualization-${widgetRefSuffix}`);
|
|
18
|
-
const { isLoading, alerts, hasAlerts, destinations, users, viewMode, execResult, separators, supportedMeasures, supportedAttributes, maxAutomationsReached, maxAutomationsRecipients, canManageAttributes, canManageComparison, canCreateAutomation, catalogAttributes, catalogDateDatasets, measureFormatMap, isExecutionTimestampMode,
|
|
19
|
-
//
|
|
20
|
-
creatingAlert, initiateAlertCreation, cancelAlertCreation,
|
|
21
|
-
//
|
|
22
|
-
editingAlert, initiateAlertEditing, cancelAlertEditing,
|
|
23
|
-
//
|
|
24
|
-
saveNewAlert, updateExistingAlert, pauseExistingAlert, resumeExistingAlert,
|
|
25
|
-
//
|
|
26
|
-
alertToDelete, startDeletingAlert, cancelDeletingAlert, deleteExistingAlert, } = useInsightWidgetAlerting({ closeInsightWidgetMenu: onClose, widget });
|
|
27
|
-
let content;
|
|
28
|
-
if (isLoading || viewMode === "list") {
|
|
29
|
-
content = (_jsx(AlertsList, { isLoading: isLoading, alerts: alerts, onCreateAlert: initiateAlertCreation, onEditAlert: initiateAlertEditing, onPauseAlert: pauseExistingAlert, onResumeAlert: resumeExistingAlert, onDeleteAlert: startDeletingAlert, onClose: onClose, onGoBack: onGoBack, maxAutomationsReached: maxAutomationsReached, canCreateAutomation: canCreateAutomation, isExecutionTimestampMode: isExecutionTimestampMode }));
|
|
30
|
-
}
|
|
31
|
-
else if (viewMode === "edit" && editingAlert) {
|
|
32
|
-
content = (_jsx(EditAlert, { canManageAttributes: canManageAttributes, canManageComparison: canManageComparison, execResult: execResult, alert: editingAlert, separators: separators, hasAlerts: hasAlerts, destinations: destinations, users: users ?? [], measures: supportedMeasures, attributes: supportedAttributes, onUpdate: updateExistingAlert, onCancel: cancelAlertEditing, onClose: onClose, measureFormatMap: measureFormatMap, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, maxAutomationsRecipients: maxAutomationsRecipients, isExecutionTimestampMode: isExecutionTimestampMode }));
|
|
33
|
-
}
|
|
34
|
-
else if (viewMode === "create" && creatingAlert) {
|
|
35
|
-
content = (_jsx(CreateAlert, { canManageAttributes: canManageAttributes, canManageComparison: canManageComparison, execResult: execResult, alert: creatingAlert, separators: separators, measures: supportedMeasures, attributes: supportedAttributes, hasAlerts: hasAlerts, destinations: destinations, users: users ?? [], onCreate: saveNewAlert, onCancel: cancelAlertCreation, onClose: onClose, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, measureFormatMap: measureFormatMap, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, isExecutionTimestampMode: isExecutionTimestampMode }));
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
content = _jsx(NoAvailableMeasures, { onClose: onClose, onBack: onGoBack });
|
|
39
|
-
}
|
|
40
|
-
return (_jsx(ScrollablePanel, { className: classes, children: _jsxs(OverlayControllerProvider, { overlayController: overlayController, children: [content, alertToDelete ? (_jsx(AlertDeleteDialog, { onCancel: cancelDeletingAlert, onDelete: () => {
|
|
41
|
-
void deleteExistingAlert(alertToDelete);
|
|
42
|
-
}, title: alertToDelete.title })) : null] }) }));
|
|
43
|
-
}
|