@gooddata/sdk-ui-dashboard 10.15.0-alpha.8 → 10.15.0-beta.1
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 +65 -3
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/__version.js.map +1 -1
- package/esm/model/commandHandlers/drill/common/intersectionUtils.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/common/intersectionUtils.js +2 -2
- package/esm/model/commandHandlers/drill/common/intersectionUtils.js.map +1 -1
- package/esm/model/commandHandlers/drill/crossFilteringHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/crossFilteringHandler.js +4 -2
- package/esm/model/commandHandlers/drill/crossFilteringHandler.js.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +4 -3
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js.map +1 -1
- package/esm/model/queryServices/queryWidgetFilters.js +2 -2
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.d.ts +1 -1
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.d.ts +1 -1
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsData.js +2 -2
- package/esm/model/store/_infra/generators.d.ts +3 -0
- package/esm/model/store/_infra/generators.d.ts.map +1 -0
- package/esm/model/store/_infra/generators.js +6 -0
- package/esm/model/store/_infra/generators.js.map +1 -0
- package/esm/model/store/config/configSelectors.d.ts +4 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +7 -1
- package/esm/model/store/config/configSelectors.js.map +1 -1
- package/esm/model/store/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/filterContext/filterContextReducers.js +5 -5
- package/esm/model/store/filterContext/filterContextReducers.js.map +1 -1
- package/esm/model/store/index.d.ts +2 -2
- package/esm/model/store/index.d.ts.map +1 -1
- package/esm/model/store/index.js +2 -2
- package/esm/model/store/index.js.map +1 -1
- package/esm/model/store/layout/layoutSelectors.d.ts +11 -1
- package/esm/model/store/layout/layoutSelectors.d.ts.map +1 -1
- package/esm/model/store/layout/layoutSelectors.js +19 -0
- package/esm/model/store/layout/layoutSelectors.js.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js.map +1 -1
- package/esm/presentation/componentDefinition/types.d.ts +28 -5
- package/esm/presentation/componentDefinition/types.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts +2 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +7 -2
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.js +2 -2
- package/esm/presentation/dashboard/DashboardSidebar/DashboardSidebar.js.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.js +2 -2
- package/esm/presentation/dashboard/DashboardSidebar/SidebarConfigurationPanel.js.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/types.d.ts +8 -1
- package/esm/presentation/dashboard/DashboardSidebar/types.d.ts.map +1 -1
- package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.d.ts.map +1 -1
- package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js +2 -0
- package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js.map +1 -1
- package/esm/presentation/dashboard/components/DashboardMainContent.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardMainContent.js +2 -0
- package/esm/presentation/dashboard/components/DashboardMainContent.js.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
- package/esm/presentation/dashboard/components/DashboardRenderer.js.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts +4 -2
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js +11 -2
- package/esm/presentation/dashboard/hooks/useDashboard.js.map +1 -1
- package/esm/presentation/dashboard/types.d.ts +13 -1
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -0
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js.map +1 -1
- package/esm/presentation/dashboardContexts/types.d.ts +10 -2
- package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.js +3 -1
- package/esm/presentation/dragAndDrop/DragLayerPreview/ContentDragPreview.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts +3 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js +25 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js +3 -3
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.d.ts +4 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.js +10 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DashboardLayoutDraggingComponent.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.d.ts +16 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.js +21 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableDashboardLayoutCreatePanelItem.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.js +11 -1
- package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.js +10 -1
- package/esm/presentation/dragAndDrop/draggableWidget/Hotspot.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.js +9 -1
- package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.js +11 -1
- package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/index.d.ts +3 -0
- package/esm/presentation/dragAndDrop/draggableWidget/index.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/index.js +3 -0
- package/esm/presentation/dragAndDrop/draggableWidget/index.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.d.ts +2 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.js +39 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useDashboardLayoutPlaceholderDropHandler.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.js +2 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useIsDraggingWidget.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.d.ts +2 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.js +46 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionDashboardLayoutPlaceholderDropHandler.js.map +1 -0
- package/esm/presentation/dragAndDrop/types.d.ts +25 -3
- package/esm/presentation/dragAndDrop/types.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/types.js +12 -0
- package/esm/presentation/dragAndDrop/types.js.map +1 -1
- package/esm/presentation/dragAndDrop/useDashboardDragScroll.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/useDashboardDragScroll.js +2 -0
- package/esm/presentation/dragAndDrop/useDashboardDragScroll.js.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +2 -2
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilterComponentSetFactory.js +1 -1
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilterComponentSetFactory.js.map +1 -1
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js +3 -4
- package/esm/presentation/flexibleLayout/DashboardLayoutWidget.js.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js +2 -1
- package/esm/presentation/flexibleLayout/DefaultFlexibleDashboardLayout.js.map +1 -1
- package/esm/presentation/flexibleLayout/index.d.ts +1 -1
- package/esm/presentation/flexibleLayout/index.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/index.js +1 -1
- package/esm/presentation/flexibleLayout/index.js.map +1 -1
- package/esm/presentation/flexibleLayout/types.d.ts +1 -20
- package/esm/presentation/flexibleLayout/types.d.ts.map +1 -1
- package/esm/presentation/layout/DashboardLayoutWidget.d.ts.map +1 -1
- package/esm/presentation/layout/DashboardLayoutWidget.js +3 -4
- package/esm/presentation/layout/DashboardLayoutWidget.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +72 -2
- package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.d.ts +7 -0
- package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.d.ts.map +1 -0
- package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.js +13 -0
- package/esm/presentation/widget/dashboardLayout/CreatableDashboardLayout.js.map +1 -0
- package/esm/presentation/{flexibleLayout → widget/dashboardLayout}/DashboardLayout.d.ts +1 -1
- package/esm/presentation/widget/dashboardLayout/DashboardLayout.d.ts.map +1 -0
- package/esm/presentation/{flexibleLayout → widget/dashboardLayout}/DashboardLayout.js +1 -1
- package/esm/presentation/widget/dashboardLayout/DashboardLayout.js.map +1 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.d.ts +8 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.d.ts.map +1 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.js +13 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayout.js.map +1 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.d.ts +7 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.d.ts.map +1 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.js +24 -0
- package/esm/presentation/widget/dashboardLayout/DefaultDashboardLayoutComponentSetFactory.js.map +1 -0
- package/esm/presentation/widget/dashboardLayout/index.d.ts +4 -0
- package/esm/presentation/widget/dashboardLayout/index.d.ts.map +1 -0
- package/esm/presentation/widget/dashboardLayout/index.js +4 -0
- package/esm/presentation/widget/dashboardLayout/index.js.map +1 -0
- package/esm/presentation/widget/dashboardLayout/types.d.ts +55 -0
- package/esm/presentation/widget/dashboardLayout/types.d.ts.map +1 -0
- package/esm/presentation/widget/dashboardLayout/types.js +3 -0
- package/esm/presentation/widget/dashboardLayout/types.js.map +1 -0
- package/esm/presentation/widget/index.d.ts +1 -0
- package/esm/presentation/widget/index.d.ts.map +1 -1
- package/esm/presentation/widget/index.js +1 -0
- package/esm/presentation/widget/index.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.d.ts +14 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.js +92 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +32 -25
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js +3 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +8 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +5 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.js +5 -8
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/convertors.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.d.ts +10 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.js +26 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/getters.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/granularity.d.ts +4 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/granularity.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/granularity.js +22 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/granularity.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.d.ts +3 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.js +203 -8
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/items.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.d.ts +9 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.js +71 -22
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils/transformation.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +3 -3
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js.map +1 -1
- package/esm/presentation/widget/insight/types.d.ts +3 -1
- package/esm/presentation/widget/insight/types.d.ts.map +1 -1
- package/esm/presentation/widget/insight/types.js.map +1 -1
- package/esm/presentation/widget/types.d.ts +1 -0
- package/esm/presentation/widget/types.d.ts.map +1 -1
- package/esm/presentation/widget/widget/DefaultDashboardWidget.js +1 -1
- package/esm/presentation/widget/widget/DefaultDashboardWidget.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +167 -5
- package/package.json +15 -15
- package/styles/css/alerting.css +25 -6
- package/styles/css/alerting.css.map +1 -1
- package/styles/css/main.css +33 -19
- package/styles/css/main.css.map +1 -1
- package/styles/css/sidebar.css +9 -14
- package/styles/css/sidebar.css.map +1 -1
- package/styles/scss/alerting.scss +7 -3
- package/styles/scss/sidebar.scss +10 -18
- package/esm/presentation/flexibleLayout/DashboardLayout.d.ts.map +0 -1
- package/esm/presentation/flexibleLayout/DashboardLayout.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentType } from "react";
|
|
2
|
+
import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
3
|
+
import { FilterContextItem, IDashboardLayout, IDashboardLayoutSizeByScreenSize, ScreenSize } from "@gooddata/sdk-model";
|
|
4
|
+
import { IErrorProps, OnError } from "@gooddata/sdk-ui";
|
|
5
|
+
import { IDashboardFilter, OnFiredDashboardDrillEvent } from "../../../types.js";
|
|
6
|
+
import { ExtendedDashboardWidget } from "../../../model/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export interface IDashboardLayoutProps {
|
|
11
|
+
ErrorComponent?: React.ComponentType<IErrorProps>;
|
|
12
|
+
onFiltersChange?: (filters: (IDashboardFilter | FilterContextItem)[], resetOthers?: boolean) => void;
|
|
13
|
+
onDrill?: OnFiredDashboardDrillEvent;
|
|
14
|
+
onError?: OnError;
|
|
15
|
+
layout?: IDashboardLayout<ExtendedDashboardWidget>;
|
|
16
|
+
screen?: ScreenSize;
|
|
17
|
+
parentLayoutItemSize?: IDashboardLayoutSizeByScreenSize;
|
|
18
|
+
/**
|
|
19
|
+
* Backend to work with.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Note: the backend must come either from this property or from BackendContext. If you do not specify
|
|
23
|
+
* backend here, then the component MUST be rendered within an existing BackendContext.
|
|
24
|
+
*
|
|
25
|
+
* @alpha
|
|
26
|
+
*/
|
|
27
|
+
backend?: IAnalyticalBackend;
|
|
28
|
+
/**
|
|
29
|
+
* Workspace where the Insight widget exists.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Note: the workspace must come either from this property or from WorkspaceContext. If you do not specify
|
|
33
|
+
* workspace here, then the component MUST be rendered within an existing WorkspaceContext.
|
|
34
|
+
*
|
|
35
|
+
* @alpha
|
|
36
|
+
*/
|
|
37
|
+
workspace?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Height of the visualization switcher widget container.
|
|
40
|
+
*
|
|
41
|
+
* @alpha
|
|
42
|
+
*/
|
|
43
|
+
clientHeight?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Width of the visualization switcher widget container.
|
|
46
|
+
*
|
|
47
|
+
* @alpha
|
|
48
|
+
*/
|
|
49
|
+
clientWidth?: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @alpha
|
|
53
|
+
*/
|
|
54
|
+
export type CustomDashboardLayoutComponent = ComponentType<IDashboardLayoutProps>;
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/dashboardLayout/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,UAAU,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAElD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACrG,OAAO,CAAC,EAAE,0BAA0B,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAEnD,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB,oBAAoB,CAAC,EAAE,gCAAgC,CAAC;IAGxD;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/presentation/widget/dashboardLayout/types.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
|
|
@@ -6,5 +6,6 @@ export * from "./kpi/index.js";
|
|
|
6
6
|
export * from "./kpiPlaceholder/index.js";
|
|
7
7
|
export * from "./richText/index.js";
|
|
8
8
|
export * from "./visualizationSwitcher/index.js";
|
|
9
|
+
export * from "./dashboardLayout/index.js";
|
|
9
10
|
export * from "./widget/index.js";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/widget/index.ts"],"names":[],"mappings":"AACA,YAAY,EACR,uCAAuC,EACvC,qCAAqC,EACrC,yBAAyB,EACzB,yCAAyC,EACzC,uCAAuC,EACvC,wCAAwC,GAC3C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/widget/index.ts"],"names":[],"mappings":"AACA,YAAY,EACR,uCAAuC,EACvC,qCAAqC,EACrC,yBAAyB,EACzB,yCAAyC,EACzC,uCAAuC,EACvC,wCAAwC,GAC3C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
|
@@ -5,5 +5,6 @@ export * from "./kpi/index.js";
|
|
|
5
5
|
export * from "./kpiPlaceholder/index.js";
|
|
6
6
|
export * from "./richText/index.js";
|
|
7
7
|
export * from "./visualizationSwitcher/index.js";
|
|
8
|
+
export * from "./dashboardLayout/index.js";
|
|
8
9
|
export * from "./widget/index.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/widget/index.ts"],"names":[],"mappings":"AASA,OAAO,EACH,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/widget/index.ts"],"names":[],"mappings":"AASA,OAAO,EACH,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
3
|
+
import { OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { AlertMetric, AlertMetricComparatorType } from "../../types.js";
|
|
5
|
+
export interface IAlertComparisonPeriodSelectProps {
|
|
6
|
+
alert: IAutomationMetadataObject | undefined;
|
|
7
|
+
measure: AlertMetric | undefined;
|
|
8
|
+
overlayPositionType?: OverlayPositionType;
|
|
9
|
+
selectedComparison?: AlertMetricComparatorType;
|
|
10
|
+
onComparisonChange: (comparison: AlertMetricComparatorType) => void;
|
|
11
|
+
canManageComparison: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const AlertComparisonPeriodSelect: (props: IAlertComparisonPeriodSelectProps) => React.JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=AlertComparisonPeriodSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertComparisonPeriodSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAA0B,mBAAmB,EAAwB,MAAM,sBAAsB,CAAC;AAIzG,OAAO,EAAE,WAAW,EAAyB,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAM/F,MAAM,WAAW,iCAAiC;IAC9C,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAC/C,kBAAkB,EAAE,CAAC,UAAU,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACpE,mBAAmB,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,2BAA2B,UAAW,iCAAiC,6BAqHnF,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// (C) 2022-2024 GoodData Corporation
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { DateGranularity } from "@gooddata/sdk-model";
|
|
4
|
+
import { Button, Dropdown, List, SingleSelectListItem } from "@gooddata/sdk-ui-kit";
|
|
5
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
|
+
import cx from "classnames";
|
|
7
|
+
import { AlertMetricComparatorType } from "../../types.js";
|
|
8
|
+
import { isChangeOrDifferenceOperator } from "./utils/guards.js";
|
|
9
|
+
import { translateGranularity } from "./utils/granularity.js";
|
|
10
|
+
import { DROPDOWN_ITEM_HEIGHT } from "./constants.js";
|
|
11
|
+
export const AlertComparisonPeriodSelect = (props) => {
|
|
12
|
+
const { alert, measure, overlayPositionType, selectedComparison, canManageComparison, onComparisonChange, } = props;
|
|
13
|
+
const intl = useIntl();
|
|
14
|
+
const selectedOperator = useMemo(() => {
|
|
15
|
+
return measure?.comparators.find((a) => a.comparator === selectedComparison);
|
|
16
|
+
}, [measure?.comparators, selectedComparison]);
|
|
17
|
+
const comparisons = useMemo(() => {
|
|
18
|
+
const sp = measure?.comparators.find((a) => a.comparator === AlertMetricComparatorType.SamePeriodPreviousYear);
|
|
19
|
+
const pp = measure?.comparators.find((a) => a.comparator === AlertMetricComparatorType.PreviousPeriod);
|
|
20
|
+
return [
|
|
21
|
+
sp?.granularity && pp?.granularity !== DateGranularity.year
|
|
22
|
+
? {
|
|
23
|
+
title: intl.formatMessage({ id: "insightAlert.config.compare_with_sp_granularity" }, {
|
|
24
|
+
period: translateGranularity(intl, sp.granularity),
|
|
25
|
+
}),
|
|
26
|
+
type: AlertMetricComparatorType.SamePeriodPreviousYear,
|
|
27
|
+
}
|
|
28
|
+
: {
|
|
29
|
+
title: intl.formatMessage({ id: "insightAlert.config.compare_with_sp" }),
|
|
30
|
+
type: AlertMetricComparatorType.SamePeriodPreviousYear,
|
|
31
|
+
},
|
|
32
|
+
pp?.granularity
|
|
33
|
+
? {
|
|
34
|
+
title: intl.formatMessage({ id: "insightAlert.config.compare_with_pp_granularity" }, {
|
|
35
|
+
period: translateGranularity(intl, pp.granularity),
|
|
36
|
+
}),
|
|
37
|
+
type: AlertMetricComparatorType.PreviousPeriod,
|
|
38
|
+
}
|
|
39
|
+
: {
|
|
40
|
+
title: intl.formatMessage({ id: "insightAlert.config.compare_with_pp" }),
|
|
41
|
+
type: AlertMetricComparatorType.PreviousPeriod,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
}, [intl, measure?.comparators]);
|
|
45
|
+
// If alert is not defined or the measure does not have any comparators, return null
|
|
46
|
+
if (!alert || !isChangeOrDifferenceOperator(alert.alert)) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
// If the measure has only one comparator, return the label with possibility to
|
|
50
|
+
// select the comparison period
|
|
51
|
+
// If feature flag is not enabled, return the label with the selected comparison period
|
|
52
|
+
if (measure?.comparators.length === 1 || !canManageComparison) {
|
|
53
|
+
return React.createElement(DropdownButtonLabel, { selectedOperator: selectedOperator });
|
|
54
|
+
}
|
|
55
|
+
return (React.createElement("div", { className: "gd-alert-comparison-select" },
|
|
56
|
+
React.createElement(Dropdown, { overlayPositionType: overlayPositionType, renderButton: ({ isOpen, toggleDropdown }) => {
|
|
57
|
+
return (React.createElement(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "primary", className: cx("gd-alert-comparison-select__button s-alert-comparison-select", "button-dropdown", "dropdown-button", {
|
|
58
|
+
"gd-alert-comparison-select__button--open": isOpen,
|
|
59
|
+
"is-active": isOpen,
|
|
60
|
+
}) },
|
|
61
|
+
React.createElement(DropdownButtonLabel, { selectedOperator: selectedOperator })));
|
|
62
|
+
}, renderBody: ({ closeDropdown }) => {
|
|
63
|
+
return (React.createElement(List, { className: "gd-alert-comparison-select__list s-alert-comparison-select-list", items: comparisons, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.title, isSelected: i.item.type === selectedComparison, onClick: () => {
|
|
64
|
+
if (i.item.type !== selectedComparison) {
|
|
65
|
+
onComparisonChange(i.item.type);
|
|
66
|
+
}
|
|
67
|
+
closeDropdown();
|
|
68
|
+
} })) }));
|
|
69
|
+
} })));
|
|
70
|
+
};
|
|
71
|
+
const DropdownButtonLabel = (props) => {
|
|
72
|
+
const intl = useIntl();
|
|
73
|
+
const { selectedOperator } = props;
|
|
74
|
+
if (selectedOperator?.comparator === AlertMetricComparatorType.SamePeriodPreviousYear) {
|
|
75
|
+
return (React.createElement("div", { className: "gd-edit-alert__measure-info" },
|
|
76
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with" }),
|
|
77
|
+
" ",
|
|
78
|
+
selectedOperator.granularity && selectedOperator.granularity !== DateGranularity.year ? (React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_sp_granularity", values: {
|
|
79
|
+
period: translateGranularity(intl, selectedOperator.granularity),
|
|
80
|
+
} })) : (React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_sp" }))));
|
|
81
|
+
}
|
|
82
|
+
if (selectedOperator?.comparator === AlertMetricComparatorType.PreviousPeriod) {
|
|
83
|
+
return (React.createElement("div", { className: "gd-edit-alert__measure-info" },
|
|
84
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with" }),
|
|
85
|
+
" ",
|
|
86
|
+
selectedOperator.granularity ? (React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_pp_granularity", values: {
|
|
87
|
+
period: translateGranularity(intl, selectedOperator.granularity),
|
|
88
|
+
} })) : (React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_pp" }))));
|
|
89
|
+
}
|
|
90
|
+
return React.createElement("div", { className: "gd-edit-alert__measure-info" }, " - ");
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=AlertComparisonPeriodSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertComparisonPeriodSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonPeriodSelect.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAA6B,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAuB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE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IExecutionResultEnvelope } from "../../../../../model/index.js";
|
|
5
5
|
interface ICreateAlertProps {
|
|
6
6
|
canManageAttributes: boolean;
|
|
7
|
+
canManageComparison: boolean;
|
|
7
8
|
execResult: IExecutionResultEnvelope | undefined;
|
|
8
9
|
alert: IAutomationMetadataObjectDefinition | null;
|
|
9
10
|
onClose: () => void;
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEH,mCAAmC,EACnC,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kCAAkC,EAClC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,UAAU,iBAAiB;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"CreateAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEH,mCAAmC,EACnC,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kCAAkC,EAClC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,UAAU,iBAAiB;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyCnD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2022-2024 GoodData Corporation
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { EditAlert } from "./EditAlert.js";
|
|
4
|
-
export const CreateAlert = ({ canManageAttributes, execResult, alert, onClose, onCancel, onCreate, destinations, users, hasAlerts, measures, attributes, maxAutomationsReached, maxAutomationsRecipients, catalogMeasures, catalogAttributes, catalogDateDatasets, }) => {
|
|
5
|
-
return (React.createElement(EditAlert, { canManageAttributes: canManageAttributes, execResult: execResult, alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations, users: users, hasAlerts: hasAlerts, measures: measures, attributes: attributes, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, catalogMeasures: catalogMeasures, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets }));
|
|
4
|
+
export const CreateAlert = ({ canManageAttributes, canManageComparison, execResult, alert, onClose, onCancel, onCreate, destinations, users, hasAlerts, measures, attributes, maxAutomationsReached, maxAutomationsRecipients, catalogMeasures, catalogAttributes, catalogDateDatasets, }) => {
|
|
5
|
+
return (React.createElement(EditAlert, { canManageAttributes: canManageAttributes, canManageComparison: canManageComparison, execResult: execResult, alert: alert, onClose: onClose, onCancel: onCancel, onCreate: onCreate, isNewAlert: true, destinations: destinations, users: users, hasAlerts: hasAlerts, measures: measures, attributes: attributes, maxAutomationsReached: maxAutomationsReached, maxAutomationsRecipients: maxAutomationsRecipients, catalogMeasures: catalogMeasures, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets }));
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=CreateAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAuB3C,MAAM,CAAC,MAAM,WAAW,GAAgC,CAAC,EACrD,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACtB,EAAE,EAAE;IACD,OAAO,CACH,oBAAC,SAAS,IACN,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAkC,EACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,QACV,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,wBAAwB,EAAE,wBAAwB,EAClD,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,GAC1C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IAutomationMetadataObject, IAutomationMetadataObjectDefinition, INotificationChannelMetadataObject, ICatalogAttribute, ICatalogMeasure, IWorkspaceUser, ICatalogDateDataset } from "@gooddata/sdk-model";
|
|
3
3
|
import { OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import { AlertAttribute, AlertMetric } from "../../types.js";
|
|
5
4
|
import { IExecutionResultEnvelope } from "../../../../../model/index.js";
|
|
5
|
+
import { AlertAttribute, AlertMetric } from "../../types.js";
|
|
6
6
|
interface IEditAlertProps {
|
|
7
7
|
canManageAttributes: boolean;
|
|
8
|
+
canManageComparison: boolean;
|
|
8
9
|
execResult: IExecutionResultEnvelope | undefined;
|
|
9
10
|
alert: IAutomationMetadataObject;
|
|
10
11
|
isNewAlert?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,kCAAkC,EAClC,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMH,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,kCAAkC,EAClC,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAMH,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAsC7D,UAAU,eAAe;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,yBAAyB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC7C;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2Q/C,CAAC"}
|
|
@@ -4,16 +4,16 @@ import { Bubble, BubbleHoverTrigger, Button, Input, Message, } from "@gooddata/s
|
|
|
4
4
|
import { defineMessages, FormattedMessage, useIntl } from "react-intl";
|
|
5
5
|
import { DashboardInsightSubmenuContainer } from "../../../insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightSubmenuContainer.js";
|
|
6
6
|
import { RecipientsSelect } from "../../../../scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js";
|
|
7
|
-
import { AlertMetricComparatorType } from "../../types.js";
|
|
8
7
|
import { AlertMeasureSelect } from "./AlertMeasureSelect.js";
|
|
9
8
|
import { AlertComparisonOperatorSelect } from "./AlertComparisonOperatorSelect.js";
|
|
10
9
|
import { AlertDestinationSelect } from "./AlertDestinationSelect.js";
|
|
11
10
|
import { EditAlertConfiguration } from "./EditAlertConfiguration.js";
|
|
12
11
|
import { useEditAlert } from "./hooks/useEditAlert.js";
|
|
13
12
|
import { useAlertValidation } from "./hooks/useAlertValidation.js";
|
|
14
|
-
import {
|
|
13
|
+
import { AlertComparisonPeriodSelect } from "./AlertComparisonPeriodSelect.js";
|
|
14
|
+
import { getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertFilters, getAlertMeasure, getAlertRelativeOperator, getAlertThreshold, getValueSuffix, } from "./utils/getters.js";
|
|
15
15
|
import { AlertAttributeSelect } from "./AlertAttributeSelect.js";
|
|
16
|
-
import {
|
|
16
|
+
import { translateGranularity } from "./utils/granularity.js";
|
|
17
17
|
const TOOLTIP_ALIGN_POINTS = [{ align: "cl cr" }, { align: "cr cl" }];
|
|
18
18
|
const messages = defineMessages({
|
|
19
19
|
invalidDefault: {
|
|
@@ -27,10 +27,10 @@ const invalidMessagesObj = {
|
|
|
27
27
|
missingMetric: messages.invalidDefault,
|
|
28
28
|
missingWidget: messages.invalidWidget,
|
|
29
29
|
};
|
|
30
|
-
export const EditAlert = ({ alert, execResult, isNewAlert, hasAlerts, destinations, users, attributes, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached = false, maxAutomationsRecipients, overlayPositionType, catalogMeasures, catalogAttributes, catalogDateDatasets, canManageAttributes, }) => {
|
|
30
|
+
export const EditAlert = ({ alert, execResult, isNewAlert, hasAlerts, destinations, users, attributes, measures, onClose, onCancel, onCreate, onUpdate, maxAutomationsReached = false, maxAutomationsRecipients, overlayPositionType, catalogMeasures, catalogAttributes, catalogDateDatasets, canManageAttributes, canManageComparison, }) => {
|
|
31
31
|
const { viewMode, updatedAlert, canSubmit, showRecipientsSelect, warningMessage,
|
|
32
32
|
//
|
|
33
|
-
changeComparisonOperator, changeRelativeOperator, changeMeasure, changeAttribute, changeValue, changeDestination, changeRecipients,
|
|
33
|
+
changeComparisonOperator, changeRelativeOperator, changeMeasure, changeAttribute, changeValue, changeDestination, changeComparisonType, changeRecipients,
|
|
34
34
|
//
|
|
35
35
|
configureAlert, saveAlertConfiguration, cancelAlertConfiguration,
|
|
36
36
|
//
|
|
@@ -48,9 +48,13 @@ export const EditAlert = ({ alert, execResult, isNewAlert, hasAlerts, destinatio
|
|
|
48
48
|
const intl = useIntl();
|
|
49
49
|
const disableCreateButtonDueToLimits = isNewAlert && maxAutomationsReached;
|
|
50
50
|
const selectedMeasure = getAlertMeasure(measures, updatedAlert.alert);
|
|
51
|
+
const selectedComparator = getAlertComparison(selectedMeasure, updatedAlert.alert);
|
|
51
52
|
const [selectedAttribute, selectedValue] = getAlertAttribute(attributes, updatedAlert);
|
|
52
53
|
const filters = getAlertFilters(updatedAlert);
|
|
54
|
+
const selectedComparisonOperator = getAlertCompareOperator(updatedAlert.alert);
|
|
55
|
+
const selectedRelativeOperator = getAlertRelativeOperator(updatedAlert.alert);
|
|
53
56
|
const { isValid, invalidityReason } = useAlertValidation(alert, isNewAlert);
|
|
57
|
+
const showFilterInfo = filters.length > 0 || Boolean(selectedComparator?.granularity);
|
|
54
58
|
return viewMode === "edit" ? (React.createElement(DashboardInsightSubmenuContainer, { title: isNewAlert
|
|
55
59
|
? intl.formatMessage({ id: "insightAlert.config.createAlert" })
|
|
56
60
|
: intl.formatMessage({ id: "insightAlert.config.editAlert" }), onClose: onClose, onBack: hasAlerts ? onCancel : undefined },
|
|
@@ -62,27 +66,30 @@ export const EditAlert = ({ alert, execResult, isNewAlert, hasAlerts, destinatio
|
|
|
62
66
|
React.createElement(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: changeMeasure, measures: measures, overlayPositionType: overlayPositionType }),
|
|
63
67
|
Boolean(canManageAttributes) && (React.createElement(React.Fragment, null,
|
|
64
68
|
React.createElement(AlertAttributeSelect, { execResult: execResult, selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: changeAttribute, attributes: attributes, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets }))),
|
|
65
|
-
|
|
66
|
-
React.createElement(FormattedMessage, { id: "insightAlert.config.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
showFilterInfo ? (React.createElement("div", { className: "gd-edit-alert__measure-info" },
|
|
70
|
+
Boolean(selectedComparator?.granularity) && (React.createElement(FormattedMessage, { tagName: "span", id: "insightAlert.config.for.filter", values: {
|
|
71
|
+
granularity: [
|
|
72
|
+
intl.formatMessage({ id: "granularity.this_keyword" }),
|
|
73
|
+
translateGranularity(intl, selectedComparator?.granularity),
|
|
74
|
+
].join(" "),
|
|
75
|
+
} })),
|
|
76
|
+
filters.length > 0 && selectedComparator?.granularity ? (React.createElement(FormattedMessage, { tagName: "span", id: "insightAlert.config.and" })) : null,
|
|
77
|
+
filters.length > 0 && (React.createElement(React.Fragment, null,
|
|
78
|
+
React.createElement(FormattedMessage, { tagName: "span", id: "insightAlert.config.filters", values: {
|
|
79
|
+
n: filters.length,
|
|
80
|
+
} }),
|
|
81
|
+
React.createElement("div", { role: "item-info", className: "gd-list-item-bubble" },
|
|
82
|
+
React.createElement(BubbleHoverTrigger, { tagName: "div", showDelay: 200, hideDelay: 0, eventsOnBubble: false },
|
|
83
|
+
React.createElement("div", { className: "inlineBubbleHelp" }),
|
|
84
|
+
React.createElement(Bubble, { className: "bubble-primary", alignPoints: [{ align: "cr cl" }, { align: "cl cr" }], arrowOffsets: { "cr cl": [15, 0] } },
|
|
85
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.filters.info", values: {
|
|
86
|
+
spacer: (React.createElement("div", { className: "gd-alert-comparison-operator-tooltip-spacer" })),
|
|
87
|
+
} })))))))) : null,
|
|
88
|
+
React.createElement(AlertComparisonOperatorSelect, { measure: selectedMeasure, selectedComparisonOperator: selectedComparisonOperator, selectedRelativeOperator: selectedRelativeOperator, onComparisonOperatorChange: changeComparisonOperator, onRelativeOperatorChange: changeRelativeOperator, overlayPositionType: overlayPositionType }),
|
|
77
89
|
React.createElement(Input, { className: "gd-edit-alert__value-input s-alert-value-input", isSmall: true, autofocus: true, value: getAlertThreshold(updatedAlert.alert), onChange: (e) => changeValue(e !== "" ? parseFloat(e) : undefined), type: "number", suffix: getValueSuffix(updatedAlert.alert) }),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_sp" }))) : null,
|
|
82
|
-
selectedMeasure?.comparators.some((a) => a.comparator === AlertMetricComparatorType.PreviousPeriod) && isChangeOrDifferenceOperator(updatedAlert.alert) ? (React.createElement("div", { className: "gd-edit-alert__measure-info" },
|
|
83
|
-
React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with" }),
|
|
84
|
-
" ",
|
|
85
|
-
React.createElement(FormattedMessage, { id: "insightAlert.config.compare_with_pp" }))) : null,
|
|
90
|
+
React.createElement(AlertComparisonPeriodSelect, { measure: selectedMeasure, alert: updatedAlert, selectedComparison: selectedComparator?.comparator, onComparisonChange: (comparisonType) => {
|
|
91
|
+
changeComparisonType(selectedMeasure, selectedRelativeOperator, comparisonType);
|
|
92
|
+
}, overlayPositionType: overlayPositionType, canManageComparison: canManageComparison }),
|
|
86
93
|
destinations.length > 1 && (React.createElement(AlertDestinationSelect, { selectedDestination: updatedAlert.notificationChannel, onDestinationChange: changeDestination, destinations: destinations, overlayPositionType: overlayPositionType })),
|
|
87
94
|
showRecipientsSelect ? (React.createElement(RecipientsSelect, { users: users, value: updatedAlert.recipients ?? [], originalValue: alert.recipients || [], onChange: changeRecipients, allowEmptySelection: true, maxRecipients: maxAutomationsRecipients, className: "gd-edit-alert__recipients", notificationChannels: destinations, notificationChannelId: updatedAlert.notificationChannel })) : null),
|
|
88
95
|
warningMessage ? React.createElement(Message, { type: "warning" }, warningMessage) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EACH,MAAM,EACN,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,OAAO,GAEV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAqB,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1F,OAAO,EAAE,gCAAgC,EAAE,MAAM,2GAA2G,CAAC;AAC7J,OAAO,EAAE,gBAAgB,EAAE,MAAM,wGAAwG,CAAC;
|
|
1
|
+
{"version":3,"file":"EditAlert.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EACH,MAAM,EACN,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,OAAO,GAEV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAqB,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1F,OAAO,EAAE,gCAAgC,EAAE,MAAM,2GAA2G,CAAC;AAC7J,OAAO,EAAE,gBAAgB,EAAE,MAAM,wGAAwG,CAAC;AAI1I,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE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AAoB;4BACrC,oBAAC,gBAAgB,IAAC,EAAE,EAAC,+BAA+B,GAAG,CAClD,CACZ,CAAC,CAAC,CAAC,IAAI,CACS,CACnB,CACJ,CACJ,CACyB,CACtC,CAAC,CAAC,CAAC,CACA,oBAAC,gCAAgC,IAC7B,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,2BAA2B,EAAE,CAAC,EAC9D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,wBAAwB;QAEhC,oBAAC,sBAAsB,IACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,EAAE,mBAAmB,GAC1C,CAC6B,CACtC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAWhE,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEtE,eAAO,MAAM,kBAAkB,UACpB,yBAAyB,eACnB,OAAO;aACV,OAAO;sBAAoB,qBAAqB,GAAG,SAAS;CAuBzE,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
|
-
import { selectInsightByWidgetRef, selectWidgetByRef, useDashboardSelector, } from "../../../../../../model/index.js";
|
|
2
|
+
import { selectCatalogDateDatasets, selectInsightByWidgetRef, selectWidgetByRef, useDashboardSelector, } from "../../../../../../model/index.js";
|
|
3
3
|
import { getSupportedInsightMeasuresByInsight } from "../utils/items.js";
|
|
4
4
|
import { getAlertMeasure } from "../utils/getters.js";
|
|
5
5
|
export const useAlertValidation = (alert, isNewAlert) => {
|
|
@@ -7,7 +7,8 @@ export const useAlertValidation = (alert, isNewAlert) => {
|
|
|
7
7
|
const widgetRef = widgetLocalId ? { identifier: widgetLocalId } : undefined;
|
|
8
8
|
const widget = useDashboardSelector(selectWidgetByRef(widgetRef));
|
|
9
9
|
const insight = useDashboardSelector(selectInsightByWidgetRef(widget?.ref));
|
|
10
|
-
const
|
|
10
|
+
const dateDatasets = useDashboardSelector(selectCatalogDateDatasets);
|
|
11
|
+
const supportedMeasures = getSupportedInsightMeasuresByInsight(insight, dateDatasets);
|
|
11
12
|
const selectedMeasureExists = getAlertMeasure(supportedMeasures, alert.alert);
|
|
12
13
|
const isValid = isNewAlert || Boolean(!!widget && selectedMeasureExists);
|
|
13
14
|
let invalidityReason = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlertValidation.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAIhC,OAAO,EACH,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,KAAgC,EAChC,UAAoB,EACqD,EAAE;IAC3E,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC7C,MAAM,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5E,MAAM,MAAM,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,oBAAoB,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5E,MAAM,iBAAiB,GAAG,oCAAoC,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useAlertValidation.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAIhC,OAAO,EACH,yBAAyB,EACzB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,KAAgC,EAChC,UAAoB,EACqD,EAAE;IAC3E,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC7C,MAAM,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5E,MAAM,MAAM,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,oBAAoB,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5E,MAAM,YAAY,GAAG,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;IACrE,MAAM,iBAAiB,GAAG,oCAAoC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACtF,MAAM,qBAAqB,GAAG,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAE9E,MAAM,OAAO,GAAG,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,qBAAqB,CAAC,CAAC;IAEzE,IAAI,gBAAgB,GAAsC,SAAS,CAAC;IACpE,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,gBAAgB,GAAG,eAAe,CAAC;IACvC,CAAC;SAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAChC,gBAAgB,GAAG,eAAe,CAAC;IACvC,CAAC;IAED,OAAO;QACH,OAAO;QACP,gBAAgB;KACnB,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAlertComparisonOperator, IAlertRelativeArithmeticOperator, IAlertRelativeOperator, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IAutomationRecipient, ICatalogAttribute, ICatalogDateDataset, ICatalogMeasure, INotificationChannelMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
-
import { AlertAttribute, AlertMetric } from "../../../types.js";
|
|
2
|
+
import { AlertAttribute, AlertMetric, AlertMetricComparatorType } from "../../../types.js";
|
|
3
3
|
export interface IUseEditAlertProps {
|
|
4
4
|
metrics: AlertMetric[];
|
|
5
5
|
attributes: AlertAttribute[];
|
|
@@ -27,6 +27,7 @@ export declare const useEditAlert: ({ metrics, attributes, alert, onCreate, onUp
|
|
|
27
27
|
} | undefined) => void;
|
|
28
28
|
changeValue: (value: number) => void;
|
|
29
29
|
changeDestination: (destinationId: string) => void;
|
|
30
|
+
changeComparisonType: (measure: AlertMetric | undefined, relativeOperator: [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined, comparisonType: AlertMetricComparatorType) => void;
|
|
30
31
|
changeRecipients: (recipients: IAutomationRecipient[]) => void;
|
|
31
32
|
configureAlert: () => void;
|
|
32
33
|
saveAlertConfiguration: (alert: IAutomationMetadataObject) => void;
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,EACtB,yBAAyB,EACzB,mCAAmC,EACnC,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kCAAkC,EAErC,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,EACtB,yBAAyB,EACzB,mCAAmC,EACnC,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kCAAkC,EAErC,MAAM,qBAAqB,CAAC;AAW7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAK3F,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,KAAK,EAAE,yBAAyB,CAAC;IACjC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD;AAED,eAAO,MAAM,YAAY,uFAQtB,kBAAkB;;;;;;wCA8B0B,WAAW,sBAAsB,wBAAwB;sCAOvF,WAAW,oBACF,sBAAsB,sBACpB,gCAAgC;6BA1BxB,WAAW;iCAK5B,cAAc,GAAG,SAAS;eAGpB,MAAM;eACN,MAAM;cACP,MAAM;;yBA8BE,MAAM;uCAIQ,MAAM;oCA4BnC,WAAW,GAAG,SAAS,oBACd,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,GAAG,SAAS,kBACxE,yBAAyB;mCAmBP,oBAAoB,EAAE;;oCAWrB,yBAAyB;;;;CAoDnE,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js
CHANGED
|
@@ -51,6 +51,13 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, c
|
|
|
51
51
|
: undefined;
|
|
52
52
|
setUpdatedAlert((alert) => transformAlertByDestination(alert, destinationId, updatedRecipients));
|
|
53
53
|
};
|
|
54
|
+
const changeComparisonType = (measure, relativeOperator, comparisonType) => {
|
|
55
|
+
if (!measure || !relativeOperator || !relativeOperator) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const [relativeOperatorValue, arithmeticOperator] = relativeOperator;
|
|
59
|
+
setUpdatedAlert((alert) => transformAlertByRelativeOperator(metrics, alert, measure, relativeOperatorValue, arithmeticOperator, catalogMeasures, comparisonType));
|
|
60
|
+
};
|
|
54
61
|
const changeRecipients = (recipients) => {
|
|
55
62
|
setUpdatedAlert((alert) => ({
|
|
56
63
|
...alert,
|
|
@@ -93,6 +100,7 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, c
|
|
|
93
100
|
changeAttribute,
|
|
94
101
|
changeValue,
|
|
95
102
|
changeDestination,
|
|
103
|
+
changeComparisonType,
|
|
96
104
|
changeRecipients,
|
|
97
105
|
//
|
|
98
106
|
configureAlert,
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAWH,yBAAyB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACH,yBAAyB,EACzB,kCAAkC,EAClC,2BAA2B,EAC3B,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,GACxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAE,uCAAuC,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,6EAA6E,CAAC;AActG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,OAAO,EACP,UAAU,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,YAAY,GACK,EAAE,EAAE;IACrB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA2B,MAAM,CAAC,CAAC;IAC3E,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAA4B,KAAK,CAAC,CAAC;IACnF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,MAAM,KAAK,GAA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ACd,CAAC;AACN,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"useEditAlert.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAWH,yBAAyB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACH,yBAAyB,EACzB,kCAAkC,EAClC,2BAA2B,EAC3B,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,GACxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAE,uCAAuC,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,6EAA6E,CAAC;AActG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,OAAO,EACP,UAAU,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,YAAY,GACK,EAAE,EAAE;IACrB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA2B,MAAM,CAAC,CAAC;IAC3E,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAA4B,KAAK,CAAC,CAAC;IACnF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC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,CAAC,CAAC,IAAI,CAC/D;QACH,CAAC,CAAC,IAAI,CAAC;IAEf,MAAM,SAAS,GAAG,cAAc,IAAI,cAAc,IAAI,iBAAiB,IAAI,cAAc,CAAC;IAE1F,OAAO;QACH,QAAQ;QACR,YAAY;QACZ,SAAS;QACT,oBAAoB;QACpB,cAAc;QACd,EAAE;QACF,wBAAwB;QACxB,sBAAsB;QACtB,aAAa;QACb,eAAe;QACf,WAAW;QACX,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,EAAE;QACF,cAAc;QACd,sBAAsB;QACtB,wBAAwB;QACxB,EAAE;QACF,WAAW;QACX,WAAW;KACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -29,6 +29,7 @@ export declare const useInsightWidgetAlerting: ({ widget, closeInsightWidgetMenu
|
|
|
29
29
|
maxAutomationsReached: boolean;
|
|
30
30
|
maxAutomationsRecipients: number;
|
|
31
31
|
canManageAttributes: boolean;
|
|
32
|
+
canManageComparison: boolean;
|
|
32
33
|
canCreateAutomation: boolean;
|
|
33
34
|
catalogMeasures: import("@gooddata/sdk-model").ICatalogMeasure[] | never[];
|
|
34
35
|
catalogAttributes: import("@gooddata/sdk-model").ICatalogAttribute[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInsightAlerting.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"AACA,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,cAAc,EACjB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useInsightAlerting.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"AACA,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,cAAc,EACjB,MAAM,qBAAqB,CAAC;AA6C7B,KAAK,6BAA6B,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,2BAA2B;IACxC,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACpC,sBAAsB,EAAE,MAAM,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,wBAAwB,uCAAwC,2BAA2B;;;;;;;;;kCA0L/D,yBAAyB;iCA8B1B,yBAAyB;0BApBhC,mCAAmC;gCAwB7B,yBAAyB;iCAQxB,yBAAyB;iCAQnB,yBAAyB;;;;;;;;;;;;;;;;CAuEtE,CAAC"}
|