@gooddata/sdk-ui-dashboard 10.10.0-alpha.9 → 10.10.0
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 +3 -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/_staging/drills/drillingUtils.d.ts +12 -1
- package/esm/_staging/drills/drillingUtils.d.ts.map +1 -1
- package/esm/_staging/drills/drillingUtils.js +20 -1
- package/esm/_staging/drills/drillingUtils.js.map +1 -1
- package/esm/_staging/layout/sizing.d.ts.map +1 -1
- package/esm/_staging/layout/sizing.js +4 -1
- package/esm/_staging/layout/sizing.js.map +1 -1
- package/esm/_staging/sharedHooks/useFiltersNamings.d.ts +7 -0
- package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -0
- package/esm/_staging/sharedHooks/useFiltersNamings.js +70 -0
- package/esm/_staging/sharedHooks/useFiltersNamings.js.map +1 -0
- package/esm/model/commandHandlers/common/validateDrills.d.ts +2 -2
- package/esm/model/commandHandlers/common/validateDrills.d.ts.map +1 -1
- package/esm/model/commandHandlers/common/validateDrills.js.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/loadOrganizationSmtps.d.ts +4 -0
- package/esm/model/commandHandlers/dashboard/common/loadOrganizationSmtps.d.ts.map +1 -0
- package/esm/model/commandHandlers/dashboard/common/loadOrganizationSmtps.js +13 -0
- package/esm/model/commandHandlers/dashboard/common/loadOrganizationSmtps.js.map +1 -0
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +8 -2
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js.map +1 -1
- package/esm/model/commandHandlers/drill/drillDownHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillDownHandler.js +5 -2
- package/esm/model/commandHandlers/drill/drillDownHandler.js.map +1 -1
- package/esm/model/index.d.ts +1 -1
- package/esm/model/index.d.ts.map +1 -1
- package/esm/model/index.js.map +1 -1
- package/esm/model/queryServices/queryWidgetFilters.d.ts.map +1 -1
- package/esm/model/queryServices/queryWidgetFilters.js.map +1 -1
- package/esm/model/react/useDashboardAlerts.d.ts.map +1 -1
- package/esm/model/react/useDashboardAlerts.js +5 -4
- package/esm/model/react/useDashboardAlerts.js.map +1 -1
- package/esm/model/react/useDashboardScheduledEmails.d.ts +2 -1
- package/esm/model/react/useDashboardScheduledEmails.d.ts.map +1 -1
- package/esm/model/react/useDashboardScheduledEmails.js +8 -7
- package/esm/model/react/useDashboardScheduledEmails.js.map +1 -1
- package/esm/model/store/automations/automationsSelectors.d.ts +2 -2
- package/esm/model/store/automations/automationsSelectors.d.ts.map +1 -1
- package/esm/model/store/automations/automationsSelectors.js +14 -4
- package/esm/model/store/automations/automationsSelectors.js.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.d.ts +4 -0
- package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.js +9 -0
- package/esm/model/store/catalog/catalogSelectors.js.map +1 -1
- package/esm/model/store/config/configSelectors.d.ts +6 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- package/esm/model/store/config/configSelectors.js.map +1 -1
- package/esm/model/store/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +2 -0
- package/esm/model/store/dashboardStore.js.map +1 -1
- package/esm/model/store/index.d.ts +5 -3
- package/esm/model/store/index.d.ts.map +1 -1
- package/esm/model/store/index.js +4 -3
- package/esm/model/store/index.js.map +1 -1
- package/esm/model/store/layout/layoutUtils.d.ts +1 -1
- package/esm/model/store/layout/layoutUtils.d.ts.map +1 -1
- package/esm/model/store/layout/layoutUtils.js +5 -2
- package/esm/model/store/layout/layoutUtils.js.map +1 -1
- package/esm/model/store/smtps/index.d.ts +8 -0
- package/esm/model/store/smtps/index.d.ts.map +1 -0
- package/esm/model/store/smtps/index.js +12 -0
- package/esm/model/store/smtps/index.js.map +1 -0
- package/esm/model/store/smtps/smtpsReducers.d.ts +12 -0
- package/esm/model/store/smtps/smtpsReducers.d.ts.map +1 -0
- package/esm/model/store/smtps/smtpsReducers.js +9 -0
- package/esm/model/store/smtps/smtpsReducers.js.map +1 -0
- package/esm/model/store/smtps/smtpsSelectors.d.ts +22 -0
- package/esm/model/store/smtps/smtpsSelectors.d.ts.map +1 -0
- package/esm/model/store/smtps/smtpsSelectors.js +28 -0
- package/esm/model/store/smtps/smtpsSelectors.js.map +1 -0
- package/esm/model/store/smtps/smtpsState.d.ts +12 -0
- package/esm/model/store/smtps/smtpsState.d.ts.map +1 -0
- package/esm/model/store/smtps/smtpsState.js +3 -0
- package/esm/model/store/smtps/smtpsState.js.map +1 -0
- package/esm/model/store/types.d.ts +3 -0
- package/esm/model/store/types.d.ts.map +1 -1
- package/esm/model/store/ui/index.d.ts +5 -0
- package/esm/model/store/ui/index.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.d.ts +5 -0
- package/esm/model/store/ui/uiReducers.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.js +10 -0
- package/esm/model/store/ui/uiReducers.js.map +1 -1
- package/esm/model/store/ui/uiSelectors.d.ts +8 -0
- package/esm/model/store/ui/uiSelectors.d.ts.map +1 -1
- package/esm/model/store/ui/uiSelectors.js +8 -0
- package/esm/model/store/ui/uiSelectors.js.map +1 -1
- package/esm/model/store/ui/uiState.d.ts +4 -0
- package/esm/model/store/ui/uiState.d.ts.map +1 -1
- package/esm/model/store/ui/uiState.js +4 -0
- package/esm/model/store/ui/uiState.js.map +1 -1
- package/esm/model/types/commonTypes.d.ts +7 -1
- package/esm/model/types/commonTypes.d.ts.map +1 -1
- package/esm/model/types/commonTypes.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/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/Alert.js +15 -11
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/Alert.js.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts.map +1 -1
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.js +1 -1
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.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/constants/colors.d.ts +1 -0
- package/esm/presentation/constants/colors.d.ts.map +1 -1
- package/esm/presentation/constants/colors.js +2 -1
- package/esm/presentation/constants/colors.js.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js +6 -0
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js +3 -3
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js.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 +5 -1
- 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 +3 -3
- 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 +4 -2
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +2 -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/deleteDialog/DefaultDeleteDialog.d.ts.map +1 -1
- package/esm/presentation/deleteDialog/DefaultDeleteDialog.js +29 -21
- package/esm/presentation/deleteDialog/DefaultDeleteDialog.js.map +1 -1
- package/esm/presentation/deleteDialog/types.d.ts +5 -2
- package/esm/presentation/deleteDialog/types.d.ts.map +1 -1
- package/esm/presentation/deleteDialog/types.js +1 -1
- package/esm/presentation/deleteDialog/types.js.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/AddVisualizationSwitcherWidgetButton.d.ts +3 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js +20 -0
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.d.ts +16 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.js +18 -0
- package/esm/presentation/dragAndDrop/draggableWidget/DraggableVisualizationSwitcherCreatePanelItem.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/EmptyDashboardDropZone.js +16 -2
- 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 +15 -3
- 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 +19 -2
- package/esm/presentation/dragAndDrop/draggableWidget/SectionHotspot.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/VisualizationSwitcherDraggingComponent.d.ts +4 -0
- package/esm/presentation/dragAndDrop/draggableWidget/VisualizationSwitcherDraggingComponent.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/VisualizationSwitcherDraggingComponent.js +10 -0
- package/esm/presentation/dragAndDrop/draggableWidget/VisualizationSwitcherDraggingComponent.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/WidgetDropZoneColumn.js +17 -3
- 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/useAddInitialSectionHandler.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useAddInitialSectionHandler.js +4 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useAddInitialSectionHandler.js.map +1 -1
- 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/useMoveWidgetHandler.d.ts +2 -2
- package/esm/presentation/dragAndDrop/draggableWidget/useMoveWidgetHandler.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useMoveWidgetHandler.js.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionVisualizationSwitcherPlaceholderDropHandler.d.ts +2 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionVisualizationSwitcherPlaceholderDropHandler.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionVisualizationSwitcherPlaceholderDropHandler.js +46 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useNewSectionVisualizationSwitcherPlaceholderDropHandler.js.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useVisualizationSwitcherPlaceholderDropHandler.d.ts +2 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useVisualizationSwitcherPlaceholderDropHandler.d.ts.map +1 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useVisualizationSwitcherPlaceholderDropHandler.js +45 -0
- package/esm/presentation/dragAndDrop/draggableWidget/useVisualizationSwitcherPlaceholderDropHandler.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/DrillSelect/DrillSelectDropdown.d.ts +12 -2
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +39 -9
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js.map +1 -1
- package/esm/presentation/drill/index.d.ts +2 -2
- package/esm/presentation/drill/index.d.ts.map +1 -1
- package/esm/presentation/drill/index.js +2 -2
- package/esm/presentation/drill/index.js.map +1 -1
- package/esm/presentation/drill/types.d.ts +3 -0
- package/esm/presentation/drill/types.d.ts.map +1 -1
- package/esm/presentation/drill/types.js.map +1 -1
- package/esm/presentation/drill/utils/drillDownUtils.d.ts +7 -2
- package/esm/presentation/drill/utils/drillDownUtils.d.ts.map +1 -1
- package/esm/presentation/drill/utils/drillDownUtils.js +21 -5
- package/esm/presentation/drill/utils/drillDownUtils.js.map +1 -1
- package/esm/presentation/layout/DashboardLayoutWidget.d.ts.map +1 -1
- package/esm/presentation/layout/DashboardLayoutWidget.js +12 -1
- package/esm/presentation/layout/DashboardLayoutWidget.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +135 -32
- package/esm/presentation/localization/bundles/zh-HK.json +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts +0 -7
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +44 -52
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFilters.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.d.ts +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.js +5 -5
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.d.ts +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.js +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.d.ts +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.js +5 -68
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useAttachmentDashboardFilters.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +3 -9
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +12 -25
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.d.ts +5 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.d.ts.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.js +14 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.js.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.d.ts +2 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js +10 -5
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts +2 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmailsList.js.map +1 -1
- package/esm/presentation/scheduledEmail/types.d.ts +9 -1
- package/esm/presentation/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +3 -3
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js.map +1 -1
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.d.ts +2 -1
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.js +3 -3
- package/esm/presentation/widget/common/configuration/ConfigurationBubble.js.map +1 -1
- 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/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.js +18 -5
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.d.ts +8 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.js +33 -11
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.d.ts +4 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.d.ts +7 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js +5 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.d.ts +3 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.d.ts +1 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.js +2 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.d.ts +0 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js +15 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +5 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +7 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +51 -13
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.d.ts +2 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.d.ts +30 -6
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js +73 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.d.ts +7 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js +25 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useAlertValidation.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +4 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +10 -46
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js +19 -7
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.d.ts +9 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.js +22 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.d.ts +30 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.js +30 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts +20 -7
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js +305 -19
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/drillConfigMapper.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/drillConfigMapper.js +3 -12
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/drillConfigMapper.js.map +1 -1
- package/esm/presentation/widget/insight/types.d.ts +22 -1
- package/esm/presentation/widget/insight/types.d.ts.map +1 -1
- package/esm/presentation/widget/insight/types.js +8 -1
- package/esm/presentation/widget/insight/types.js.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.d.ts +2 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.js +6 -4
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.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/visualizationSwitcher/CreatableVisualizationSwitcher.d.ts +7 -0
- package/esm/presentation/widget/visualizationSwitcher/CreatableVisualizationSwitcher.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/CreatableVisualizationSwitcher.js +13 -0
- package/esm/presentation/widget/visualizationSwitcher/CreatableVisualizationSwitcher.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DashboardVisualizationSwitcher.d.ts +7 -0
- package/esm/presentation/widget/visualizationSwitcher/DashboardVisualizationSwitcher.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DashboardVisualizationSwitcher.js +13 -0
- package/esm/presentation/widget/visualizationSwitcher/DashboardVisualizationSwitcher.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcher.d.ts +8 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcher.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcher.js +14 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcher.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcherComponentSetFactory.d.ts +7 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcherComponentSetFactory.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcherComponentSetFactory.js +24 -0
- package/esm/presentation/widget/visualizationSwitcher/DefaultDashboardVisualizationSwitcherComponentSetFactory.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.d.ts +7 -0
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +17 -0
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts +7 -0
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +9 -0
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/index.d.ts +4 -0
- package/esm/presentation/widget/visualizationSwitcher/index.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/index.js +4 -0
- package/esm/presentation/widget/visualizationSwitcher/index.js.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/types.d.ts +53 -0
- package/esm/presentation/widget/visualizationSwitcher/types.d.ts.map +1 -0
- package/esm/presentation/widget/visualizationSwitcher/types.js +3 -0
- package/esm/presentation/widget/visualizationSwitcher/types.js.map +1 -0
- package/esm/presentation/widget/widget/DefaultDashboardWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/DefaultDashboardWidget.js +5 -1
- package/esm/presentation/widget/widget/DefaultDashboardWidget.js.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +6 -5
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js +12 -3
- package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.d.ts +7 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.js +13 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.js.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts +7 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js +18 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/RenderModeAwareDashboardVisualizationSwitcherWidget.d.ts +6 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/RenderModeAwareDashboardVisualizationSwitcherWidget.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/RenderModeAwareDashboardVisualizationSwitcherWidget.js +12 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/RenderModeAwareDashboardVisualizationSwitcherWidget.js.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/index.d.ts +2 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/index.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/index.js +3 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/index.js.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/types.d.ts +7 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/types.d.ts.map +1 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/types.js +3 -0
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/types.js.map +1 -0
- package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.d.ts +11 -0
- package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.d.ts.map +1 -0
- package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.js +76 -0
- package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.js.map +1 -0
- package/esm/presentation/widgetDeleteDialog/WidgetDeleteDialog.d.ts +7 -0
- package/esm/presentation/widgetDeleteDialog/WidgetDeleteDialog.d.ts.map +1 -0
- package/esm/presentation/widgetDeleteDialog/WidgetDeleteDialog.js +11 -0
- package/esm/presentation/widgetDeleteDialog/WidgetDeleteDialog.js.map +1 -0
- package/esm/presentation/widgetDeleteDialog/index.d.ts +4 -0
- package/esm/presentation/widgetDeleteDialog/index.d.ts.map +1 -0
- package/esm/presentation/widgetDeleteDialog/index.js +4 -0
- package/esm/presentation/widgetDeleteDialog/index.js.map +1 -0
- package/esm/presentation/widgetDeleteDialog/types.d.ts +18 -0
- package/esm/presentation/widgetDeleteDialog/types.d.ts.map +1 -0
- package/esm/presentation/widgetDeleteDialog/types.js +3 -0
- package/esm/presentation/widgetDeleteDialog/types.js.map +1 -0
- package/esm/sdk-ui-dashboard.d.ts +244 -9
- package/esm/widgets/placeholders/types.js +1 -1
- package/package.json +15 -15
- package/styles/css/alerting.css +22 -0
- package/styles/css/alerting.css.map +1 -1
- package/styles/css/dashboard.css +5 -1
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/deleteDialog.css +6 -0
- package/styles/css/deleteDialog.css.map +1 -0
- package/styles/css/main.css +72 -1
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +5 -1
- package/styles/css/notifications_channels_dialog.css.map +1 -1
- package/styles/css/sidebar.css +19 -0
- package/styles/css/sidebar.css.map +1 -1
- package/styles/css/visualizationSwitcherWidget.css +27 -0
- package/styles/css/visualizationSwitcherWidget.css.map +1 -0
- package/styles/scss/alerting.scss +23 -0
- package/styles/scss/deleteDialog.scss +6 -0
- package/styles/scss/main.scss +2 -0
- package/styles/scss/notifications_channels_dialog.scss +6 -3
- package/styles/scss/sidebar.scss +26 -0
- package/styles/scss/visualizationSwitcherWidget.scss +23 -0
- package/esm/presentation/alerting/DefaultAlertingDialog/operator.d.ts +0 -4
- package/esm/presentation/alerting/DefaultAlertingDialog/operator.d.ts.map +0 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/operator.js +0 -31
- package/esm/presentation/alerting/DefaultAlertingDialog/operator.js.map +0 -1
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js
CHANGED
|
@@ -1,61 +1,24 @@
|
|
|
1
1
|
// (C) 2022-2024 GoodData Corporation
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import isEqual from "lodash/isEqual.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useIntl } from "react-intl";
|
|
4
|
+
import { isAlertValueDefined, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertByValue, } from "../utils.js";
|
|
6
5
|
export const useEditAlert = ({ alert, onCreate, onUpdate }) => {
|
|
7
6
|
const [viewMode, setViewMode] = useState("edit");
|
|
8
7
|
const [updatedAlert, setUpdatedAlert] = useState(alert);
|
|
9
|
-
const intl = useIntl();
|
|
10
8
|
const changeMeasure = (measure) => {
|
|
11
|
-
setUpdatedAlert((alert) => (
|
|
12
|
-
...alert,
|
|
13
|
-
title: getMeasureTitle(measure) ?? "",
|
|
14
|
-
description: `${getComparisonOperatorTitle(updatedAlert.alert.condition.operator, intl)} ${alert.alert.condition.right}`,
|
|
15
|
-
alert: {
|
|
16
|
-
...alert.alert,
|
|
17
|
-
condition: {
|
|
18
|
-
...alert.alert.condition,
|
|
19
|
-
left: measure.measure.localIdentifier,
|
|
20
|
-
},
|
|
21
|
-
execution: {
|
|
22
|
-
...alert.alert.execution,
|
|
23
|
-
measures: [measure],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}));
|
|
9
|
+
setUpdatedAlert((alert) => transformAlertByMetric(alert, measure));
|
|
27
10
|
};
|
|
28
11
|
const changeComparisonOperator = (comparisonOperator) => {
|
|
29
|
-
setUpdatedAlert((alert) => (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...alert.alert,
|
|
34
|
-
condition: {
|
|
35
|
-
...alert.alert.condition,
|
|
36
|
-
operator: comparisonOperator,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}));
|
|
12
|
+
setUpdatedAlert((alert) => transformAlertByComparisonOperator(alert, comparisonOperator));
|
|
13
|
+
};
|
|
14
|
+
const changeRelativeOperator = (relativeOperator, arithmeticOperator) => {
|
|
15
|
+
setUpdatedAlert((alert) => transformAlertByRelativeOperator(alert, relativeOperator, arithmeticOperator));
|
|
40
16
|
};
|
|
41
17
|
const changeValue = (value) => {
|
|
42
|
-
setUpdatedAlert((alert) => (
|
|
43
|
-
...alert,
|
|
44
|
-
description: `${getComparisonOperatorTitle(updatedAlert.alert.condition.operator, intl)} ${alert.alert.condition.right}`,
|
|
45
|
-
alert: {
|
|
46
|
-
...alert.alert,
|
|
47
|
-
condition: {
|
|
48
|
-
...alert.alert.condition,
|
|
49
|
-
right: value,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
}));
|
|
18
|
+
setUpdatedAlert((alert) => transformAlertByValue(alert, value));
|
|
53
19
|
};
|
|
54
20
|
const changeDestination = (destinationId) => {
|
|
55
|
-
setUpdatedAlert((alert) => (
|
|
56
|
-
...alert,
|
|
57
|
-
webhook: destinationId,
|
|
58
|
-
}));
|
|
21
|
+
setUpdatedAlert((alert) => transformAlertByDestination(alert, destinationId));
|
|
59
22
|
};
|
|
60
23
|
const configureAlert = () => {
|
|
61
24
|
setViewMode("configuration");
|
|
@@ -73,7 +36,7 @@ export const useEditAlert = ({ alert, onCreate, onUpdate }) => {
|
|
|
73
36
|
const updateAlert = () => {
|
|
74
37
|
onUpdate?.(updatedAlert);
|
|
75
38
|
};
|
|
76
|
-
const isValueDefined =
|
|
39
|
+
const isValueDefined = isAlertValueDefined(updatedAlert.alert);
|
|
77
40
|
const isAlertChanged = !isEqual(updatedAlert, alert);
|
|
78
41
|
const canSubmit = isValueDefined && isAlertChanged;
|
|
79
42
|
return {
|
|
@@ -82,6 +45,7 @@ export const useEditAlert = ({ alert, onCreate, onUpdate }) => {
|
|
|
82
45
|
canSubmit,
|
|
83
46
|
//
|
|
84
47
|
changeComparisonOperator,
|
|
48
|
+
changeRelativeOperator,
|
|
85
49
|
changeMeasure,
|
|
86
50
|
changeValue,
|
|
87
51
|
changeDestination,
|
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;
|
|
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;AAQjC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EACH,mBAAmB,EACnB,kCAAkC,EAClC,2BAA2B,EAC3B,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,GACxB,MAAM,aAAa,CAAC;AASrB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAsB,EAAE,EAAE;IAC9E,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;IAEnF,MAAM,aAAa,GAAG,CAAC,OAAoB,EAAE,EAAE;QAC3C,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,CAAC,CAAC;IAEF,MAAM,wBAAwB,GAAG,CAAC,kBAA4C,EAAE,EAAE;QAC9E,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC9F,CAAC,CAAC;IAEF,MAAM,sBAAsB,GAAG,CAC3B,gBAAwC,EACxC,kBAAoD,EACtD,EAAE;QACA,eAAe,CAAC,CAAC,KAAK,EAAE,EA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ACb,WAAW;QACX,iBAAiB;QACjB,EAAE;QACF,cAAc;QACd,sBAAsB;QACtB,wBAAwB;QACxB,EAAE;QACF,WAAW;QACX,WAAW;KACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export interface IInsightWidgetAlertingProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const useInsightWidgetAlerting: ({ widget, closeInsightWidgetMenu }: IInsightWidgetAlertingProps) => {
|
|
8
8
|
isLoading: boolean;
|
|
9
|
-
destinations: import("
|
|
9
|
+
destinations: (import("@gooddata/sdk-model").IWebhookDefinitionObject | import("@gooddata/sdk-model").ISmtpDefinitionObject)[];
|
|
10
10
|
alerts: IAutomationMetadataObject[];
|
|
11
11
|
viewMode: InsightWidgetAlertingViewMode;
|
|
12
12
|
editingAlert: IAutomationMetadataObject | null;
|
|
@@ -21,7 +21,7 @@ export declare const useInsightWidgetAlerting: ({ widget, closeInsightWidgetMenu
|
|
|
21
21
|
cancelAlertEditing: () => void;
|
|
22
22
|
cancelAlertCreation: () => void;
|
|
23
23
|
hasAlerts: boolean;
|
|
24
|
-
supportedMeasures: import("
|
|
24
|
+
supportedMeasures: import("../../../types.js").AlertMetric[];
|
|
25
25
|
maxAutomationsReached: boolean;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
|
@@ -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,
|
|
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,EAEjB,MAAM,qBAAqB,CAAC;AA0B7B,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;;;;;;;;kCAkH/D,yBAAyB;iCA0B1B,yBAAyB;0BAhBhC,mCAAmC;gCAqB7B,yBAAyB;iCASxB,yBAAyB;iCASnB,yBAAyB;;;;;;CAwCtE,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
// (C) 2022-2024 GoodData Corporation
|
|
2
|
+
import { isAllTimeDateFilter, } from "@gooddata/sdk-model";
|
|
1
3
|
import { useToastMessage } from "@gooddata/sdk-ui-kit";
|
|
2
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
5
|
import { v4 as uuidv4 } from "uuid";
|
|
4
|
-
import { useDashboardSelector, selectInsightByWidgetRef, selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, DEFAULT_MAX_AUTOMATIONS, selectAutomationsCount, selectWebhooks, refreshAutomations, useDashboardDispatch, dispatchAndWaitFor, selectAutomationsAlertsInContext, selectDashboardId, } from "../../../../../../model/index.js";
|
|
6
|
+
import { useDashboardSelector, selectInsightByWidgetRef, selectEntitlementMaxAutomations, selectEntitlementUnlimitedAutomations, DEFAULT_MAX_AUTOMATIONS, selectAutomationsCount, selectWebhooks, refreshAutomations, useDashboardDispatch, dispatchAndWaitFor, selectAutomationsAlertsInContext, selectDashboardId, selectSmtps, selectLocale, } from "../../../../../../model/index.js";
|
|
5
7
|
import { createDefaultAlert, getSupportedInsightMeasuresByInsight } from "../utils.js";
|
|
6
8
|
import { messages } from "../messages.js";
|
|
7
9
|
import { useWidgetFilters } from "../../../../common/useWidgetFilters.js";
|
|
8
10
|
import { useSaveAlertToBackend } from "./useSaveAlertToBackend.js";
|
|
9
|
-
import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
11
|
+
import { fillMissingTitles, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
10
12
|
export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) => {
|
|
11
13
|
const { addSuccess, addError } = useToastMessage();
|
|
12
14
|
const dispatch = useDashboardDispatch();
|
|
13
15
|
const effectiveBackend = useBackendStrict();
|
|
14
16
|
const effectiveWorkspace = useWorkspaceStrict();
|
|
15
|
-
const
|
|
17
|
+
const webhooks = useDashboardSelector(selectWebhooks);
|
|
18
|
+
const emails = useDashboardSelector(selectSmtps);
|
|
16
19
|
const alerts = useDashboardSelector(selectAutomationsAlertsInContext(widget?.localIdentifier));
|
|
17
20
|
const dashboard = useDashboardSelector(selectDashboardId);
|
|
18
21
|
const insight = useDashboardSelector(selectInsightByWidgetRef(widget?.ref));
|
|
@@ -41,22 +44,28 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
41
44
|
addError(messages.alertSaveError);
|
|
42
45
|
},
|
|
43
46
|
onPauseSuccess: () => {
|
|
47
|
+
handleRefreshAutomations();
|
|
44
48
|
addSuccess(messages.alertPauseSuccess);
|
|
45
49
|
},
|
|
46
50
|
onPauseError: () => {
|
|
51
|
+
setIsLoading(false);
|
|
47
52
|
addError(messages.alertSaveError);
|
|
48
53
|
},
|
|
49
54
|
onResumeSuccess: () => {
|
|
55
|
+
handleRefreshAutomations();
|
|
50
56
|
addSuccess(messages.alertResumeSuccess);
|
|
51
57
|
},
|
|
52
58
|
onResumeError: () => {
|
|
59
|
+
setIsLoading(false);
|
|
53
60
|
addError(messages.alertSaveError);
|
|
54
61
|
},
|
|
55
62
|
});
|
|
56
63
|
const { result: widgetFilters, status: widgetFiltersStatus } = useWidgetFilters(widget, insight);
|
|
57
|
-
const
|
|
64
|
+
const destinations = useMemo(() => [...emails, ...webhooks], [emails, webhooks]);
|
|
65
|
+
const locale = useDashboardSelector(selectLocale);
|
|
66
|
+
const supportedMeasures = useMemo(() => getSupportedInsightMeasuresByInsight(insight ? fillMissingTitles(insight, locale, 9999) : insight), [insight, locale]);
|
|
58
67
|
const defaultMeasure = supportedMeasures[0];
|
|
59
|
-
const defaultNotificationChannelId = destinations[0]
|
|
68
|
+
const defaultNotificationChannelId = destinations[0]?.id;
|
|
60
69
|
const hasAlerts = alerts.length > 0;
|
|
61
70
|
const maxAutomations = parseInt(maxAutomationsEntitlement?.value ?? DEFAULT_MAX_AUTOMATIONS, 10);
|
|
62
71
|
const maxAutomationsReached = automationsCount >= maxAutomations && !unlimitedAutomationsEntitlement;
|
|
@@ -64,7 +73,8 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
64
73
|
useEffect(() => {
|
|
65
74
|
if (widgetFiltersStatus === "success") {
|
|
66
75
|
setIsLoading(false);
|
|
67
|
-
|
|
76
|
+
const sanitizedFilters = widgetFilters.filter((filter) => !isAllTimeDateFilter(filter));
|
|
77
|
+
setDefaultAlert(createDefaultAlert(sanitizedFilters, defaultMeasure, defaultNotificationChannelId));
|
|
68
78
|
}
|
|
69
79
|
else if (widgetFiltersStatus === "error") {
|
|
70
80
|
setIsLoading(false);
|
|
@@ -127,6 +137,7 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
127
137
|
...alert,
|
|
128
138
|
alert: { ...alert.alert, trigger: { ...alert.alert?.trigger, state: "PAUSED" } },
|
|
129
139
|
};
|
|
140
|
+
setIsLoading(true);
|
|
130
141
|
handlePauseAlert(alertToPause);
|
|
131
142
|
};
|
|
132
143
|
const resumeExistingAlert = (alert) => {
|
|
@@ -134,6 +145,7 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
134
145
|
...alert,
|
|
135
146
|
alert: { ...alert.alert, trigger: { ...alert.alert?.trigger, state: "ACTIVE" } },
|
|
136
147
|
};
|
|
148
|
+
setIsLoading(true);
|
|
137
149
|
handleResumeAlert(alertToResume);
|
|
138
150
|
};
|
|
139
151
|
const deleteExistingAlert = async (alert) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInsightAlerting.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInsightAlerting.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightAlerting.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAIH,mBAAmB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACH,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,EAC/B,qCAAqC,EACrC,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,EACjB,WAAW,EACX,YAAY,GACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,oCAAoC,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kB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AAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACrD,wBAAwB,EAAE,CAAC;QAC/B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;YACpC,YAAY,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,wBAAwB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9C,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACzD,YAAY,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACH,SAAS;QACT,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,aAAa,EAAE,YAAY;QAC3B,qBAAqB;QACrB,oBAAoB;QACpB,mBAAmB;QACnB,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;QACnB,kBAAkB;QAClB,mBAAmB;QACnB,SAAS;QACT,iBAAiB;QACjB,qBAAqB;KACxB,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AlertMetric } from "../../../types.js";
|
|
2
|
+
export declare function useOperators(measure: AlertMetric | undefined): {
|
|
3
|
+
title: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
id: any;
|
|
6
|
+
type?: import("@gooddata/sdk-ui-kit").SingleSelectListItemType | undefined;
|
|
7
|
+
info?: string | undefined;
|
|
8
|
+
}[];
|
|
9
|
+
//# sourceMappingURL=useOperators.d.ts.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOperators.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAA6B,MAAM,mBAAmB,CAAC;AAU3E,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS;;;;;;IAqB5D"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { AlertMetricComparatorType } from "../../../types.js";
|
|
4
|
+
import { COMPARISON_OPERATOR_OPTIONS, RELATIVE_CHANGE_OPERATOR_OPTIONS, RELATIVE_DIFFERENCE_OPERATOR_OPTIONS, CHANGE_HEADER, DIFFERENCE_HEADER, SEPARATOR, } from "../constants.js";
|
|
5
|
+
export function useOperators(measure) {
|
|
6
|
+
return useMemo(() => {
|
|
7
|
+
if (measure?.comparators.find((a) => a.comparator === AlertMetricComparatorType.PreviousPeriod ||
|
|
8
|
+
a.comparator === AlertMetricComparatorType.SamePeriodPreviousYear)) {
|
|
9
|
+
return [
|
|
10
|
+
...COMPARISON_OPERATOR_OPTIONS,
|
|
11
|
+
SEPARATOR,
|
|
12
|
+
CHANGE_HEADER,
|
|
13
|
+
...RELATIVE_CHANGE_OPERATOR_OPTIONS,
|
|
14
|
+
SEPARATOR,
|
|
15
|
+
DIFFERENCE_HEADER,
|
|
16
|
+
...RELATIVE_DIFFERENCE_OPERATOR_OPTIONS,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
return COMPARISON_OPERATOR_OPTIONS;
|
|
20
|
+
}, [measure]);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=useOperators.js.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOperators.js","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useOperators.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAe,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACH,2BAA2B,EAC3B,gCAAgC,EAChC,oCAAoC,EACpC,aAAa,EACb,iBAAiB,EACjB,SAAS,GACZ,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,YAAY,CAAC,OAAgC;IACzD,OAAO,OAAO,CAAC,GAAG,EAAE;QAChB,IACI,OAAO,EAAE,WAAW,CAAC,IAAI,CACrB,CAAC,CAAC,EAAE,EAAE,CACF,CAAC,CAAC,UAAU,KAAK,yBAAyB,CAAC,cAAc;YACzD,CAAC,CAAC,UAAU,KAAK,yBAAyB,CAAC,sBAAsB,CACxE,EACH,CAAC;YACC,OAAO;gBACH,GAAG,2BAA2B;gBAC9B,SAAS;gBACT,aAAa;gBACb,GAAG,gCAAgC;gBACnC,SAAS;gBACT,iBAAiB;gBACjB,GAAG,oCAAoC;aAC1C,CAAC;QACN,CAAC;QACD,OAAO,2BAA2B,CAAC;IACvC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -23,6 +23,36 @@ export declare const messages: {
|
|
|
23
23
|
comparisonOperatorGreaterThanOrEquals: {
|
|
24
24
|
id: string;
|
|
25
25
|
};
|
|
26
|
+
comparisonOperatorChangeHeader: {
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
comparisonOperatorChangeHeaderInfo: {
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
comparisonOperatorChangeIncreasesBy: {
|
|
33
|
+
id: string;
|
|
34
|
+
};
|
|
35
|
+
comparisonOperatorChangeDecreasesBy: {
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
comparisonOperatorChangeChangesBy: {
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
comparisonOperatorDifferenceHeader: {
|
|
42
|
+
id: string;
|
|
43
|
+
};
|
|
44
|
+
comparisonOperatorDifferenceHeaderInfo: {
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
comparisonOperatorDifferenceIncreasesBy: {
|
|
48
|
+
id: string;
|
|
49
|
+
};
|
|
50
|
+
comparisonOperatorDifferenceDecreasesBy: {
|
|
51
|
+
id: string;
|
|
52
|
+
};
|
|
53
|
+
comparisonOperatorDifferenceChangesBy: {
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
26
56
|
alertTriggerModeAlways: {
|
|
27
57
|
id: string;
|
|
28
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/messages.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/messages.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFnB,CAAC"}
|
|
@@ -25,6 +25,36 @@ export const messages = defineMessages({
|
|
|
25
25
|
comparisonOperatorGreaterThanOrEquals: {
|
|
26
26
|
id: "insightAlert.config.comparisonOperator.greaterThanOrEquals",
|
|
27
27
|
},
|
|
28
|
+
comparisonOperatorChangeHeader: {
|
|
29
|
+
id: "insightAlert.config.changeOperator.header",
|
|
30
|
+
},
|
|
31
|
+
comparisonOperatorChangeHeaderInfo: {
|
|
32
|
+
id: "insightAlert.config.changeOperator.header.info",
|
|
33
|
+
},
|
|
34
|
+
comparisonOperatorChangeIncreasesBy: {
|
|
35
|
+
id: "insightAlert.config.changeOperator.increasesBy",
|
|
36
|
+
},
|
|
37
|
+
comparisonOperatorChangeDecreasesBy: {
|
|
38
|
+
id: "insightAlert.config.changeOperator.decreasesBy",
|
|
39
|
+
},
|
|
40
|
+
comparisonOperatorChangeChangesBy: {
|
|
41
|
+
id: "insightAlert.config.changeOperator.changesBy",
|
|
42
|
+
},
|
|
43
|
+
comparisonOperatorDifferenceHeader: {
|
|
44
|
+
id: "insightAlert.config.differenceOperator.header",
|
|
45
|
+
},
|
|
46
|
+
comparisonOperatorDifferenceHeaderInfo: {
|
|
47
|
+
id: "insightAlert.config.differenceOperator.header.info",
|
|
48
|
+
},
|
|
49
|
+
comparisonOperatorDifferenceIncreasesBy: {
|
|
50
|
+
id: "insightAlert.config.differenceOperator.increasesBy",
|
|
51
|
+
},
|
|
52
|
+
comparisonOperatorDifferenceDecreasesBy: {
|
|
53
|
+
id: "insightAlert.config.differenceOperator.decreasesBy",
|
|
54
|
+
},
|
|
55
|
+
comparisonOperatorDifferenceChangesBy: {
|
|
56
|
+
id: "insightAlert.config.differenceOperator.changesBy",
|
|
57
|
+
},
|
|
28
58
|
alertTriggerModeAlways: {
|
|
29
59
|
id: "insightAlert.config.triggerMode.always",
|
|
30
60
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/messages.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC;IACnC,eAAe,EAAE;QACb,EAAE,EAAE,iCAAiC;KACxC;IACD,gBAAgB,EAAE;QACd,EAAE,EAAE,kCAAkC;KACzC;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,0BAA0B,EAAE;QACxB,EAAE,EAAE,iDAAiD;KACxD;IACD,kCAAkC,EAAE;QAChC,EAAE,EAAE,yDAAyD;KAChE;IACD,6BAA6B,EAAE;QAC3B,EAAE,EAAE,oDAAoD;KAC3D;IACD,qCAAqC,EAAE;QACnC,EAAE,EAAE,4DAA4D;KACnE;IACD,sBAAsB,EAAE;QACpB,EAAE,EAAE,wCAAwC;KAC/C;IACD,oBAAoB,EAAE;QAClB,EAAE,EAAE,sCAAsC;KAC7C;IACD,kBAAkB,EAAE;QAChB,EAAE,EAAE,oCAAoC;KAC3C;IACD,eAAe,EAAE;QACb,EAAE,EAAE,iCAAiC;KACxC;IACD,kBAAkB,EAAE;QAChB,EAAE,EAAE,oCAAoC;KAC3C;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,kBAAkB,EAAE;QAChB,EAAE,EAAE,oCAAoC;KAC3C;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,cAAc,EAAE;QACZ,EAAE,EAAE,gCAAgC;KACvC;IACD,gBAAgB,EAAE;QACd,EAAE,EAAE,kCAAkC;KACzC;CACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/messages.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC;IACnC,eAAe,EAAE;QACb,EAAE,EAAE,iCAAiC;KACxC;IACD,gBAAgB,EAAE;QACd,EAAE,EAAE,kCAAkC;KACzC;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,mCAAmC;KAC1C;IACD,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AAkC;KACzC;CACJ,CAAC,CAAC"}
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import { IAlertComparisonOperator, IAutomationMetadataObjectDefinition, IFilter, IInsight, IMeasure } from "@gooddata/sdk-model";
|
|
1
|
+
import { IAlertComparisonOperator, IAlertRelativeArithmeticOperator, IAlertRelativeOperator, IAutomationAlert, IAutomationMetadataObject, IAutomationMetadataObjectDefinition, IFilter, IInsight, IMeasure } from "@gooddata/sdk-model";
|
|
2
2
|
import { IntlShape } from "react-intl";
|
|
3
|
+
import { AlertMetric } from "../../types.js";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
7
|
export declare const getMeasureTitle: (measure: IMeasure) => string | undefined;
|
|
8
|
+
export declare const getOperatorTitle: (intl: IntlShape, alert?: IAutomationAlert) => string;
|
|
7
9
|
/**
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare
|
|
15
|
-
export declare
|
|
12
|
+
export declare const createDefaultAlert: (filters: IFilter[], measure: AlertMetric, notificationChannelId: string, comparisonOperator?: IAlertComparisonOperator) => IAutomationMetadataObjectDefinition;
|
|
13
|
+
export declare const getSupportedInsightMeasuresByInsight: (insight: IInsight | null | undefined) => AlertMetric[];
|
|
14
|
+
export declare const isSupportedInsightVisType: (insight: IInsight | null | undefined) => boolean;
|
|
15
|
+
export declare function getValueSuffix(alert?: IAutomationAlert): string | undefined;
|
|
16
|
+
export declare function isChangeOperator(alert?: IAutomationAlert): boolean;
|
|
17
|
+
export declare function isDifferenceOperator(alert?: IAutomationAlert): boolean;
|
|
18
|
+
export declare function isChangeOrDifferenceOperator(alert?: IAutomationAlert): boolean;
|
|
19
|
+
export declare function isAlertValueDefined(alert?: IAutomationAlert): boolean;
|
|
20
|
+
export declare function getAlertThreshold(alert?: IAutomationAlert): number | undefined;
|
|
21
|
+
export declare function getAlertMeasure(alert?: IAutomationAlert): string | undefined;
|
|
22
|
+
export declare function getAlertCompareOperator(alert?: IAutomationAlert): IAlertComparisonOperator | undefined;
|
|
23
|
+
export declare function getAlertRelativeOperator(alert?: IAutomationAlert): [IAlertRelativeOperator, IAlertRelativeArithmeticOperator] | undefined;
|
|
24
|
+
export declare function transformAlertByMetric(alert: IAutomationMetadataObject, measure: AlertMetric): IAutomationMetadataObject;
|
|
25
|
+
export declare function transformAlertByComparisonOperator(alert: IAutomationMetadataObject, comparisonOperator: IAlertComparisonOperator): IAutomationMetadataObject;
|
|
26
|
+
export declare function transformAlertByRelativeOperator(alert: IAutomationMetadataObject, relativeOperator: IAlertRelativeOperator, arithmeticOperator: IAlertRelativeArithmeticOperator): IAutomationMetadataObject;
|
|
27
|
+
export declare function transformAlertByValue(alert: IAutomationMetadataObject, value: number): IAutomationMetadataObject;
|
|
28
|
+
export declare function transformAlertByDestination(alert: IAutomationMetadataObject, notificationChannel: string): IAutomationMetadataObject;
|
|
16
29
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,wBAAwB,EACxB,mCAAmC,EAEnC,OAAO,EACP,QAAQ,EACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,EACtB,gBAAgB,EAIhB,yBAAyB,EACzB,mCAAmC,EAEnC,OAAO,EACP,QAAQ,EACR,QAAQ,EAWX,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,WAAW,EAA6B,MAAM,gBAAgB,CAAC;AAKxE;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