@gooddata/sdk-ui-dashboard 11.43.0-alpha.3 → 11.43.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/model/react/useWidgetExecConfig.d.ts +5 -3
- package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
- package/esm/model/react/useWidgetExecConfig.js +8 -4
- package/esm/model/store/config/configSelectors.js +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +19 -0
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +46 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +13 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +24 -30
- package/esm/presentation/automations/_staging/alerting/AlertingManagementDialog.d.ts +1 -1
- package/esm/presentation/automations/_staging/alerting/AlertingManagementDialog.d.ts.map +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.js +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.js +3 -3
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/Alert.js +2 -2
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts.map +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.d.ts.map +1 -0
- package/esm/presentation/automations/_staging/alerting/{DefaultAlertingDialog → DefaultAlertingManagementDialog}/hooks/useAlertValidation.js +2 -2
- package/esm/presentation/automations/alerting/AlertingDialog.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingDialog.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +21 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultAlertingDialog.js +58 -56
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultLoadingAlertingDialog.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertThresholdInput.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/constants.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts +7 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.js +16 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts +6 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.js +31 -5
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useEditAlert.d.ts +7 -7
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useEditAlert.js +15 -45
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useOperators.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useThresholdValue.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/messages.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/convertors.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/cron.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/getters.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/granularity.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/guards.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/items.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/responsive.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/threshold.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/utils/transformation.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts +11 -0
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js +35 -0
- package/esm/presentation/automations/alerting/hooks/useGetSupportedMeasures.d.ts.map +1 -0
- package/esm/presentation/automations/{_staging/alerting → alerting}/hooks/useGetSupportedMeasures.js +2 -6
- package/esm/presentation/automations/{_staging/alerting → alerting}/types.d.ts +5 -3
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts +27 -0
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/AlertingConnector.js +72 -0
- package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.d.ts +15 -0
- package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/sanitizeAutomationForSave.js +25 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +9 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +128 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts +2 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +66 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +65 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +27 -0
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +32 -0
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -0
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +11 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +20 -1
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AutomationsContext.js +4 -1
- package/esm/presentation/automations/contexts/AutomationsContext.test.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useFiltersForDashboardScheduledExportInfo.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +19 -0
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.js +18 -4
- package/esm/presentation/dashboard/components/DashboardRenderer.js +1 -1
- package/esm/presentation/dashboard/types.d.ts +1 -1
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.d.ts +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdownMenuItem.js +6 -28
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts +0 -3
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts.map +1 -1
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.js +16 -3
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +11 -2
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -0
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +9 -9
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.js +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.d.ts +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTitle.js +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +23 -14
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +2 -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 +4 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts +3 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +5 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts +0 -11
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.js +2 -17
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +3 -3
- package/esm/sdk-ui-dashboard.d.ts +18 -1
- package/package.json +20 -20
- package/styles/css/dashboard.css +7 -7
- package/styles/css/drillSelect.css +0 -49
- package/styles/css/drillSelect.css.map +1 -1
- package/styles/css/main.css +10 -61
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +7 -7
- package/styles/css/topBar.css +3 -5
- package/styles/css/topBar.css.map +1 -1
- package/styles/scss/drillSelect.scss +0 -65
- package/styles/scss/notifications_channels_dialog.scss +1 -1
- package/styles/scss/topBar.scss +3 -9
- package/esm/presentation/automations/_staging/alerting/AlertingDialog.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts +0 -7
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertThresholdInput.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/constants.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useOperators.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useThresholdValue.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/messages.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/convertors.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/cron.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/getters.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/granularity.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/guards.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/items.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/responsive.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/threshold.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/utils/transformation.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/hooks/useGetSupportedMeasures.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/types.d.ts.map +0 -1
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.d.ts +0 -2
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.d.ts.map +0 -1
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderNew.js +0 -28
- /package/esm/presentation/automations/_staging/alerting/{DefaultAlertingDialog → DefaultAlertingManagementDialog}/hooks/useAlertValidation.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingDialog.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/AlertingDialogHeader.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/AlertingDialogHeader.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/DefaultLoadingAlertingDialog.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertAttributeSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertAttributeSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDeleteDialog.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDeleteDialog.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDestinationSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertDestinationSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertGranularitySelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertGranularitySelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertMeasureSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertMeasureSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertSensitivitySelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertSensitivitySelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertThresholdInput.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertThresholdInput.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerModeSelect.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/components/AlertTriggerModeSelect.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/constants.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/constants.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useOperators.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useOperators.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useThresholdValue.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/hooks/useThresholdValue.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/messages.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/messages.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/convertors.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/convertors.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/cron.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/cron.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/getters.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/getters.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/granularity.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/granularity.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/guards.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/guards.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/items.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/items.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/responsive.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/responsive.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/threshold.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/threshold.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/transformation.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingDialog/utils/transformation.js +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/hooks/useGetSupportedMeasures.d.ts +0 -0
- /package/esm/presentation/automations/{_staging/alerting → alerting}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAlertingManagementDialogNew.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DefaultAlertingManagementDialogNew.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAOjF;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,EAC/C,cAAc,EACd,YAAY,EACZ,MAAM,EACN,KAAK,EACL,eAAe,EACf,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,WAAW,EACd,EAAE,8BAA8B,2CAmGhC"}
|
|
@@ -12,8 +12,8 @@ import { selectCanManageWorkspace } from "../../../../../../model/store/permissi
|
|
|
12
12
|
import { selectWidgetByRef } from "../../../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
13
13
|
import { selectCurrentUser } from "../../../../../../model/store/user/userSelectors.js";
|
|
14
14
|
import { gdColorNegative, gdColorStateBlank } from "../../../../../constants/colors.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { getSubtitle } from "../../../../alerting/DefaultAlertingDialog/utils/getters.js";
|
|
16
|
+
import { useAlertValidation } from "../hooks/useAlertValidation.js";
|
|
17
17
|
const TEXT_TOOLTIP_ALIGN_POINTS = [
|
|
18
18
|
{ align: "tc bc", offset: { x: 0, y: 0 } },
|
|
19
19
|
{ align: "bc tc", offset: { x: 0, y: 0 } },
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type IAlertDropdownProps } from "
|
|
1
|
+
import { type IAlertDropdownProps } from "../../../../alerting/types.js";
|
|
2
2
|
export declare function AlertDropdown({ isReadOnly, paused, alignTo, onClose, onEdit, onPause, onDelete, onResume }: IAlertDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=AlertDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AlertDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAyBzE,wBAAgB,aAAa,CAAC,EAC1B,UAAU,EACV,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACX,EAAE,mBAAmB,2CA4DrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAUrE,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;CAgC9B,CAAC"}
|
|
@@ -4,8 +4,8 @@ import { selectCatalogDateDatasets } from "../../../../../../model/store/catalog
|
|
|
4
4
|
import { selectEnableComparisonInAlerting } from "../../../../../../model/store/config/configSelectors.js";
|
|
5
5
|
import { selectInsightByWidgetRef } from "../../../../../../model/store/insights/insightsSelectors.js";
|
|
6
6
|
import { selectWidgetByRef } from "../../../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
7
|
-
import { getAlertMeasure } from "
|
|
8
|
-
import { getSupportedInsightMeasuresByInsight } from "
|
|
7
|
+
import { getAlertMeasure } from "../../../../alerting/DefaultAlertingDialog/utils/getters.js";
|
|
8
|
+
import { getSupportedInsightMeasuresByInsight } from "../../../../alerting/DefaultAlertingDialog/utils/items.js";
|
|
9
9
|
export const useAlertValidation = (alert, isNewAlert) => {
|
|
10
10
|
const widgetLocalId = alert?.metadata?.widget;
|
|
11
11
|
const widgetRef = widgetLocalId ? { identifier: widgetLocalId } : undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertingDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/AlertingDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAIxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDashboardComponentsContext } from "
|
|
2
|
+
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertingDialogHeader.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/AlertingDialogHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqC,KAAK,SAAS,EAA2B,MAAM,OAAO,CAAC;AAUnG,UAAU,0BAA0B;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,oBAAoB,yHA4I/B,CAAC"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type IAlertingDialogProps } from "../types.js";
|
|
2
|
+
export declare function AlertingDialogRenderer({ alertToEdit, users, usersError, notificationChannels, insight, widget, onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess }: IAlertingDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation of the alerting create/edit dialog.
|
|
5
|
+
*
|
|
6
|
+
* This component is a pure consumer of `AutomationsContext` and `AlertingDialogContext`: it reads
|
|
7
|
+
* org/workspace data and per-dialog state from those contexts rather than from the dashboard store.
|
|
8
|
+
* It must therefore be rendered within an `AutomationsContextProvider` (and, for the create/edit
|
|
9
|
+
* flow, an `AlertingDialogContextProvider`). Inside a `Dashboard`, the alerting connector supplies
|
|
10
|
+
* both providers above the `AlertingDialogComponent` slot — so the default component, and any
|
|
11
|
+
* wholesale slot replacement, inherit the contexts automatically and require no extra wiring.
|
|
12
|
+
*
|
|
13
|
+
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
14
|
+
* that is what lets a wholesale replacement receive the same contexts (see the Phase-2 boundary in
|
|
15
|
+
* `docs/tasks/26Q1 - Automation Dialog Separation.md`). Rendering this component outside those
|
|
16
|
+
* providers throws at runtime.
|
|
17
|
+
*
|
|
18
|
+
* @alpha
|
|
19
|
+
*/
|
|
20
|
+
export declare function DefaultAlertingDialog(props: IAlertingDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=DefaultAlertingDialog.d.ts.map
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA2BxD,wBAAgB,sBAAsB,CAAC,EACnC,WAAW,EACX,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,EAChB,EAAE,oBAAoB,2CAulBtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,2CAahE"}
|
|
@@ -5,23 +5,15 @@ import cx from "classnames";
|
|
|
5
5
|
import { FormattedMessage, defineMessage, useIntl } from "react-intl";
|
|
6
6
|
import { ValidationContextStore, convertError, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
|
|
7
7
|
import { Button, ConfirmDialogBase, ContentDivider, Hyperlink, Message, Overlay, OverlayController, OverlayControllerProvider, ScrollablePanel, UiIcon, UiIconButton, UiTooltip, useId, } from "@gooddata/sdk-ui-kit";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { useSaveAlertToBackend } from "../../../../widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.js";
|
|
18
|
-
import { useBuildAutomationsContext } from "../../../connectors/hooks/useBuildAutomationsContext.js";
|
|
19
|
-
import { AutomationsContextProvider } from "../../../contexts/AutomationsContext.js";
|
|
20
|
-
import { RecipientsSelect } from "../../../scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js";
|
|
21
|
-
import { ApplyCurrentFiltersConfirmDialog } from "../../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
22
|
-
import { AutomationFiltersSelect } from "../../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
23
|
-
import { useValidateExistingAutomationFilters } from "../../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
|
|
24
|
-
import { useAutomationFiltersSelect } from "../../../shared/automationFilters/useAutomationFiltersSelect.js";
|
|
8
|
+
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
9
|
+
import { IntlWrapper } from "../../../localization/IntlWrapper.js";
|
|
10
|
+
import { useAlertingDialogContext } from "../../contexts/AlertingDialogContext.js";
|
|
11
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
12
|
+
import { RecipientsSelect } from "../../scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js";
|
|
13
|
+
import { ApplyCurrentFiltersConfirmDialog } from "../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
14
|
+
import { AutomationFiltersSelect } from "../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
15
|
+
import { useValidateExistingAutomationFilters } from "../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
|
|
16
|
+
import { useAutomationFiltersSelect } from "../../shared/automationFilters/useAutomationFiltersSelect.js";
|
|
25
17
|
import { DeleteAlertConfirmDialog } from "../DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js";
|
|
26
18
|
import { AlertingDialogHeader } from "./AlertingDialogHeader.js";
|
|
27
19
|
import { AlertAttributeSelect } from "./components/AlertAttributeSelect.js";
|
|
@@ -48,13 +40,8 @@ const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z
|
|
|
48
40
|
export function AlertingDialogRenderer({ alertToEdit, users, usersError, notificationChannels, insight, widget, onCancel, onDeleteSuccess, onDeleteError, onError, onSuccess, onSaveError, onSaveSuccess, }) {
|
|
49
41
|
const intl = useIntl();
|
|
50
42
|
const dialogTitleRef = useRef(null);
|
|
51
|
-
const isWhiteLabeled =
|
|
52
|
-
const
|
|
53
|
-
const isSecondaryTitleVisible = useDashboardSelector(selectIsAutomationDialogSecondaryTitleVisible);
|
|
54
|
-
const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
|
|
55
|
-
const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
|
|
56
|
-
const enableAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
|
|
57
|
-
const enableAlertOncePerInterval = useDashboardSelector(selectEnableAlertOncePerInterval);
|
|
43
|
+
const { isWhiteLabeled, isSecondaryTitleVisible, externalRecipient: externalRecipientOverride, features: { enableAlertOncePerInterval, enableAnomalyDetectionAlert, enableAutomationManagement, canUseAiAssistant: enableAiAssistant, }, } = useAutomationsContext();
|
|
44
|
+
const { widgetTitle, createAlert, saveAlert } = useAlertingDialogContext();
|
|
58
45
|
const [alertToDelete, setAlertToDelete] = useState(null);
|
|
59
46
|
const handleAlertDeleteSuccess = (alert) => {
|
|
60
47
|
onDeleteSuccess?.(alert);
|
|
@@ -65,10 +52,11 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
65
52
|
automationToEdit: alertToEdit,
|
|
66
53
|
widget,
|
|
67
54
|
});
|
|
68
|
-
const { onTitleChange, onRecipientsChange, onFiltersChange, onApplyCurrentFilters, automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd,
|
|
55
|
+
const { onTitleChange, onRecipientsChange, onFiltersChange, onApplyCurrentFilters, dropStaleParameters, automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, onMeasureChange, getAttributeValues, onAttributeChange, onComparisonOperatorChange, onRelativeOperatorChange, onAnomalyDetectionChange, onChange, onBlur, onComparisonTypeChange, onDestinationChange, onTriggerModeChange, onTriggerIntervalChange, selectedMeasure, canChangeMeasure, supportedMeasures, canManageAttributes, selectedAttribute, selectedValue, supportedAttributes, catalogAttributes, catalogDateDatasets, isResultLoading, selectedComparisonOperator, selectedRelativeOperator, selectedAiOperator, value, selectedComparator, selectedSensitivity, onSensitivityChange, selectedGranularity, onGranularityChange, canManageComparison, separators, defaultUser, originalAutomation, editedAutomation, allowOnlyLoggedUserRecipients, allowExternalRecipients, warningMessage, validationErrorMessage, isInvalidConnectionToInsight, isSubmitDisabled, isParentValid, thresholdErrorMessage, allowHourlyRecurrence, } = useEditAlert({
|
|
69
56
|
insight,
|
|
70
57
|
widget,
|
|
71
58
|
alertToEdit,
|
|
59
|
+
users,
|
|
72
60
|
editedAutomationFilters,
|
|
73
61
|
maxAutomationsRecipients,
|
|
74
62
|
availableFiltersAsVisibleFilters,
|
|
@@ -83,22 +71,9 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
83
71
|
insight,
|
|
84
72
|
});
|
|
85
73
|
const [isApplyCurrentFiltersDialogOpen, setIsApplyCurrentFiltersDialogOpen] = useState(!isValid);
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
onCreateError: (err) => {
|
|
91
|
-
onError?.(convertError(err));
|
|
92
|
-
},
|
|
93
|
-
onUpdateSuccess: (alert) => {
|
|
94
|
-
onSaveSuccess?.(alert);
|
|
95
|
-
},
|
|
96
|
-
onUpdateError: (err) => {
|
|
97
|
-
onSaveError?.(convertError(err));
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
const handleSaveAlert = () => {
|
|
101
|
-
if (!editedAutomation) {
|
|
74
|
+
const [isSavingAlert, setIsSavingAlert] = useState(false);
|
|
75
|
+
const handleSaveAlert = async () => {
|
|
76
|
+
if (!editedAutomation || isSavingAlert) {
|
|
102
77
|
return;
|
|
103
78
|
}
|
|
104
79
|
const title = getDescription(intl, supportedMeasures, editedAutomation, separators);
|
|
@@ -108,11 +83,27 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
108
83
|
...editedAutomation,
|
|
109
84
|
title,
|
|
110
85
|
};
|
|
111
|
-
|
|
112
|
-
|
|
86
|
+
setIsSavingAlert(true);
|
|
87
|
+
try {
|
|
88
|
+
if (alertToEdit) {
|
|
89
|
+
const saved = await saveAlert(sanitizedAutomation);
|
|
90
|
+
onSaveSuccess?.(saved);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const created = await createAlert(sanitizedAutomation);
|
|
94
|
+
onSuccess?.(created);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
if (alertToEdit) {
|
|
99
|
+
onSaveError?.(convertError(err));
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
onError?.(convertError(err));
|
|
103
|
+
}
|
|
113
104
|
}
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
finally {
|
|
106
|
+
setIsSavingAlert(false);
|
|
116
107
|
}
|
|
117
108
|
};
|
|
118
109
|
const validationContextValue = useValidationContextValue(createInvalidNode({ id: "AlertingDialog" }));
|
|
@@ -133,14 +124,14 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
133
124
|
const titleElementId = useId();
|
|
134
125
|
const { secondaryTitle, secondaryTitleIcon } = useMemo(() => {
|
|
135
126
|
return {
|
|
136
|
-
secondaryTitle:
|
|
127
|
+
secondaryTitle: widgetTitle,
|
|
137
128
|
secondaryTitleIcon: (_jsx(UiIcon, { type: "visualization", size: 16, color: "complementary-6", accessibilityConfig: {
|
|
138
129
|
ariaLabel: intl.formatMessage({
|
|
139
130
|
id: "dialogs.automation.icon.ariaLabel.sourceVisualization",
|
|
140
131
|
}),
|
|
141
132
|
} })),
|
|
142
133
|
};
|
|
143
|
-
}, [
|
|
134
|
+
}, [widgetTitle, intl]);
|
|
144
135
|
if (isApplyCurrentFiltersDialogOpen) {
|
|
145
136
|
return (_jsx(ApplyCurrentFiltersConfirmDialog, { automationType: "alert", onCancel: () => onCancel?.(), onEdit: () => {
|
|
146
137
|
// Repair only what is actually stale: replace filters when they are invalid, and
|
|
@@ -167,7 +158,9 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
167
158
|
? intl.formatMessage({
|
|
168
159
|
id: "dialogs.alert.save.executionTimestampMode",
|
|
169
160
|
})
|
|
170
|
-
: undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit:
|
|
161
|
+
: undefined, initialFocus: dialogTitleRef, submitOnEnterKey: false, onCancel: onCancel, onSubmit: () => {
|
|
162
|
+
void handleSaveAlert();
|
|
163
|
+
}, headline: undefined, headerLeftButtonRenderer: () => (_jsx(AlertingDialogHeader, { title: editedAutomation?.title ?? "", onChange: onTitleChange, onCancel: onCancel, placeholder: intl.formatMessage({
|
|
171
164
|
id: "dialogs.alert.title.placeholder",
|
|
172
165
|
}), ref: dialogTitleRef, secondaryTitle: secondaryTitle, secondaryTitleIcon: secondaryTitleIcon, isSecondaryTitleVisible: isSecondaryTitleVisible ? isParentValid : undefined })), children: [
|
|
173
166
|
_jsx("h2", { className: "sr-only", id: titleElementId, children: intl.formatMessage({ id: "dialogs.alert.accessibility.label.title" }) }), _jsxs(ScrollablePanel, { className: "gd-notifications-channel-dialog-content-wrapper gd-notification-channel-dialog-with-automation-filters", children: [
|
|
@@ -199,23 +192,32 @@ export function AlertingDialogRenderer({ alertToEdit, users, usersError, notific
|
|
|
199
192
|
] }) }) }) }), alertToDelete ? (_jsx(DeleteAlertConfirmDialog, { alert: alertToDelete, onCancel: () => setAlertToDelete(null), onSuccess: handleAlertDeleteSuccess, onError: onDeleteError })) : null] }));
|
|
200
193
|
}
|
|
201
194
|
/**
|
|
195
|
+
* Default implementation of the alerting create/edit dialog.
|
|
196
|
+
*
|
|
197
|
+
* This component is a pure consumer of `AutomationsContext` and `AlertingDialogContext`: it reads
|
|
198
|
+
* org/workspace data and per-dialog state from those contexts rather than from the dashboard store.
|
|
199
|
+
* It must therefore be rendered within an `AutomationsContextProvider` (and, for the create/edit
|
|
200
|
+
* flow, an `AlertingDialogContextProvider`). Inside a `Dashboard`, the alerting connector supplies
|
|
201
|
+
* both providers above the `AlertingDialogComponent` slot — so the default component, and any
|
|
202
|
+
* wholesale slot replacement, inherit the contexts automatically and require no extra wiring.
|
|
203
|
+
*
|
|
204
|
+
* The providers are intentionally hoisted above the slot rather than built inside this component:
|
|
205
|
+
* that is what lets a wholesale replacement receive the same contexts (see the Phase-2 boundary in
|
|
206
|
+
* `docs/tasks/26Q1 - Automation Dialog Separation.md`). Rendering this component outside those
|
|
207
|
+
* providers throws at runtime.
|
|
208
|
+
*
|
|
202
209
|
* @alpha
|
|
203
210
|
*/
|
|
204
211
|
export function DefaultAlertingDialog(props) {
|
|
205
212
|
const { isLoading, onCancel, alertToEdit } = props;
|
|
213
|
+
const { locale } = useAutomationsContext();
|
|
206
214
|
if (isLoading) {
|
|
207
215
|
return _jsx(DefaultLoadingAlertingDialog, { onCancel: onCancel, alertToEdit: alertToEdit });
|
|
208
216
|
}
|
|
209
|
-
return _jsx(
|
|
210
|
-
}
|
|
211
|
-
function DefaultAlertingDialogBody(props) {
|
|
212
|
-
const locale = useDashboardSelector(selectLocale);
|
|
213
|
-
const automationsContext = useBuildAutomationsContext();
|
|
214
|
-
return (_jsx(AutomationsContextProvider, { value: automationsContext, children: _jsx(IntlWrapper, { locale: locale, children: _jsx(AlertingDialogRenderer, { ...props }) }) }));
|
|
217
|
+
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(AlertingDialogRenderer, { ...props }) }));
|
|
215
218
|
}
|
|
216
219
|
function useDefaultAlertingDialogData() {
|
|
217
|
-
const maxAutomationsRecipients =
|
|
218
|
-
const isExecutionTimestampMode = !!useDashboardSelector(selectExecutionTimestamp);
|
|
220
|
+
const { maxAutomationsRecipients, isExecutionTimestampMode } = useAutomationsContext();
|
|
219
221
|
return {
|
|
220
222
|
maxAutomationsRecipients,
|
|
221
223
|
isExecutionTimestampMode,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLoadingAlertingDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/DefaultLoadingAlertingDialog.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGxD,wBAAgB,4BAA4B,CAAC,EACzC,WAAW,EACX,QAAQ,EACX,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,aAAa,CAAC,2CAkDxD"}
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2019-2026 GoodData Corporation
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { ConfirmDialogBase, Overlay, OverlayController, OverlayControllerProvider, UiSkeleton, useId, } from "@gooddata/sdk-ui-kit";
|
|
5
|
-
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "
|
|
5
|
+
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
6
6
|
const overlayController = OverlayController.getInstance(DASHBOARD_DIALOG_OVERS_Z_INDEX);
|
|
7
7
|
export function DefaultLoadingAlertingDialog({ alertToEdit, onCancel, }) {
|
|
8
8
|
const intl = useIntl();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertAttributeSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAE3B,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAGpF,MAAM,WAAW,0BAA0B;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,EAAE,KAAK,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAC;IACtG,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,kBAAkB,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,cAAc,EAAE,CAAC;IACzE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AA+HD,wBAAgB,oBAAoB,CAAC,EACjC,EAAE,EACF,QAAQ,EACR,iBAAiB,EAAE,qBAAqB,EACxC,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAgB,EAChB,mBAAmB,EACtB,EAAE,0BAA0B,kDA+M5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertComparisonOperatorSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgBlD,MAAM,WAAW,mCAAmC;IAChD,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,2BAA2B,EAAE,OAAO,CAAC;IACrC,0BAA0B,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACjE,wBAAwB,EAAE,CAAC,sBAAsB,EAAE,gCAAgC,CAAC,GAAG,SAAS,CAAC;IACjG,kBAAkB,EAAE,GAAG,OAAO,WAAW,IAAI,OAAO,YAAY,CAAC,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACjG,0BAA0B,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACxG,wBAAwB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxD,wBAAwB,EAAE,CACtB,MAAM,EAAE,WAAW,EACnB,gBAAgB,EAAE,sBAAsB,EACxC,0BAA0B,EAAE,gCAAgC,KAC3D,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,mCAAmC,kDA6MvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertComparisonPeriodSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAA8B,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAIzG,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,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,kBAAkB,EAAE,CAChB,UAAU,EAAE,yBAAyB,EACrC,WAAW,CAAC,EAAE,wBAAwB,KACrC,IAAI,CAAC;IACV,mBAAmB,EAAE,OAAO,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CAAC,EACxC,KAAK,EACL,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,EAAE,EACF,mBAAmB,EACtB,EAAE,iCAAiC,kDAsKnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDeleteDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDeleteDialog.tsx"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,QAAQ,EACX,EAAE;IACC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB,2CAuBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDestinationSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertDestinationSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,mBAAmB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IACtF,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,EACnC,EAAE,EACF,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACtB,EAAE,4BAA4B,2CA2E9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertGranularitySelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertGranularitySelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAkC9B,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,iCAAiC,GAAG,SAAS,CAAC;IACnE,mBAAmB,EAAE,CAAC,WAAW,EAAE,iCAAiC,KAAK,IAAI,CAAC;IAC9E,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,EACnC,EAAE,EACF,qBAAqB,EACrB,mBAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACtB,EAAE,4BAA4B,2CA6E9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertMeasureSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertMeasureSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAID,wBAAgB,kBAAkB,CAAC,EAC/B,EAAE,EACF,QAAQ,EACR,eAAe,EACf,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACtB,EAAE,uBAAuB,2CA8EzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertSensitivitySelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertSensitivitySelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAsB9B,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,EAAE,iCAAiC,GAAG,SAAS,CAAC;IACnE,mBAAmB,EAAE,CAAC,WAAW,EAAE,iCAAiC,KAAK,IAAI,CAAC;IAC9E,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,EACnC,EAAE,EACF,mBAA8B,EAC9B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACtB,EAAE,4BAA4B,2CAuE9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertThresholdInput.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertThresholdInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAMxC,UAAU,yBAAyB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC3C,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CAAC,EAChC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACf,EAAE,yBAAyB,2CAmC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertTriggerIntervalSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerIntervalSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AA8B9B,MAAM,WAAW,gCAAgC;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,uBAAuB,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACtE,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,0BAA0B,CAAC,EACvC,EAAE,EACF,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACtB,EAAE,gCAAgC,2CAqElC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertTriggerModeSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/components/AlertTriggerModeSelect.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,sBAAsB,CAAC;AAsB9B,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,EAAE,iBAAiB,CAAC;IACvC,mBAAmB,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9D,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,wBAAgB,sBAAsB,CAAC,EACnC,EAAE,EACF,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC7B,EAAE,4BAA4B,2CAsE9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAQpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAIrE,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,wBAAwB,IAAI;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,CAAC,CAAC;IACN,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,gBAAgB,EAqBzD,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAgBtE,CAAC;AACF,eAAO,MAAM,oCAAoC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAgB1E,CAAC;AACF,eAAO,MAAM,kCAAkC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAMxE,CAAC;AAEF,eAAO,MAAM,SAAS,4BAKrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAMlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,MAAM,CAMtD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,MAAM,CAM7D,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAK9C,CAAC;AAEF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,kBAAkB,oBAAoB,CAAC"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IAutomationMetadataObject, ICatalogDateDataset, IInsight, IWidget } from "@gooddata/sdk-model";
|
|
2
|
+
export type AlertInvalidityReason = "missingMetric" | "missingWidget";
|
|
3
|
+
export declare function useAlertValidation(alert: IAutomationMetadataObject | undefined, widget: IWidget | undefined, insight: IInsight | undefined, catalogDateDatasets: ICatalogDateDataset[], isNewAlert?: boolean, canManageComparison?: boolean): {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
invalidityReason: AlertInvalidityReason | undefined;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=useAlertValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK7G,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEtE,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,yBAAyB,GAAG,SAAS,EAC5C,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,UAAU,CAAC,EAAE,OAAO,EACpB,mBAAmB,GAAE,OAAe,GACrC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,gBAAgB,EAAE,qBAAqB,GAAG,SAAS,CAAA;CAAE,CAmB3E"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertValidation.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// (C) 2024-2026 GoodData Corporation
|
|
2
|
+
import { getAlertMeasure } from "../utils/getters.js";
|
|
3
|
+
import { getSupportedInsightMeasuresByInsight } from "../utils/items.js";
|
|
4
|
+
export function useAlertValidation(alert, widget, insight, catalogDateDatasets, isNewAlert, canManageComparison = false) {
|
|
5
|
+
const supportedMeasures = getSupportedInsightMeasuresByInsight(insight, catalogDateDatasets, canManageComparison, alert);
|
|
6
|
+
const selectedMeasureExists = alert ? getAlertMeasure(supportedMeasures, alert.alert) : undefined;
|
|
7
|
+
const isValid = isNewAlert || Boolean(!!widget && selectedMeasureExists);
|
|
8
|
+
let invalidityReason = undefined;
|
|
9
|
+
if (!widget) {
|
|
10
|
+
invalidityReason = "missingWidget";
|
|
11
|
+
}
|
|
12
|
+
else if (!selectedMeasureExists) {
|
|
13
|
+
invalidityReason = "missingMetric";
|
|
14
|
+
}
|
|
15
|
+
return { isValid, invalidityReason };
|
|
16
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { IExecutionResult } from "@gooddata/sdk-backend-spi";
|
|
1
2
|
import { type IAttribute, type IAttributeMetadataObject, type IMeasure } from "@gooddata/sdk-model";
|
|
2
|
-
|
|
3
|
+
type IExecutionResultEnvelope = {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
executionResult?: IExecutionResult;
|
|
6
|
+
};
|
|
3
7
|
export type AttributeValue = {
|
|
4
8
|
title: string;
|
|
5
9
|
value: string;
|
|
@@ -10,4 +14,5 @@ export declare function useAttributeValuesFromExecResults(execResult: IExecution
|
|
|
10
14
|
getAttributeValues: (attr: IAttributeMetadataObject) => AttributeValue[];
|
|
11
15
|
getMetricValue: (measure?: IMeasure<import("@gooddata/sdk-model").IMeasureDefinitionType> | undefined, attr?: IAttribute | undefined, value?: string | null | undefined) => number | undefined;
|
|
12
16
|
};
|
|
17
|
+
export {};
|
|
13
18
|
//# sourceMappingURL=useAttributeValuesFromExecResults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttributeValuesFromExecResults.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAttributeValuesFromExecResults.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACH,KAAK,UAAU,EAEf,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAGhB,MAAM,qBAAqB,CAAC;AAG7B,KAAK,wBAAwB,GAAG;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE5F,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,wBAAwB,GAAG,SAAS;;;;EAyEjG"}
|
|
@@ -3,15 +3,41 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
3
3
|
import { areObjRefsEqual, isResultAttributeHeader, } from "@gooddata/sdk-model";
|
|
4
4
|
import { DataViewFacade } from "@gooddata/sdk-ui";
|
|
5
5
|
export function useAttributeValuesFromExecResults(execResult) {
|
|
6
|
-
|
|
6
|
+
// Derive loading from the envelope's own isLoading flag, not from the
|
|
7
|
+
// presence of executionResult: an errored execution has no executionResult
|
|
8
|
+
// but is no longer loading, and there is no readAll() promise to clear the
|
|
9
|
+
// flag, so keying off executionResult would leave it stuck true forever.
|
|
10
|
+
const [isResultLoading, setIsResultLoading] = useState(!execResult || !!execResult.isLoading);
|
|
7
11
|
const [dataView, setDataView] = useState(null);
|
|
8
12
|
useEffect(() => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
let cancelled = false;
|
|
14
|
+
if (execResult?.executionResult) {
|
|
15
|
+
setIsResultLoading(true);
|
|
16
|
+
setDataView(null);
|
|
17
|
+
void execResult.executionResult
|
|
18
|
+
.readAll()
|
|
19
|
+
.then((data) => {
|
|
20
|
+
if (!cancelled) {
|
|
21
|
+
setDataView(DataViewFacade.for(data));
|
|
22
|
+
setIsResultLoading(false);
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
.catch(() => {
|
|
26
|
+
if (!cancelled) {
|
|
27
|
+
setIsResultLoading(false);
|
|
28
|
+
}
|
|
13
29
|
});
|
|
14
30
|
}
|
|
31
|
+
else {
|
|
32
|
+
// No execution result to read (terminal error, or none yet): reflect
|
|
33
|
+
// the envelope's own loading flag so an errored execution doesn't stay
|
|
34
|
+
// stuck loading.
|
|
35
|
+
setDataView(null);
|
|
36
|
+
setIsResultLoading(!execResult || !!execResult.isLoading);
|
|
37
|
+
}
|
|
38
|
+
return () => {
|
|
39
|
+
cancelled = true;
|
|
40
|
+
};
|
|
15
41
|
}, [execResult]);
|
|
16
42
|
const getAttributeValues = useCallback((attr) => {
|
|
17
43
|
const header = findAttributeHeader(dataView, attr);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type DateAttributeGranularity, type FilterContextItem, type IAlertAnomalyDetectionGranularity, type IAlertAnomalyDetectionSensitivity, type IAlertComparisonOperator, type IAlertRelativeArithmeticOperator, type IAlertRelativeOperator, type IAlertTriggerInterval, type IAlertTriggerMode, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IAutomationVisibleFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
-
import type { ExtendedDashboardWidget } from "../../../../../../model/types/layoutTypes.js";
|
|
1
|
+
import { type DateAttributeGranularity, type FilterContextItem, type IAlertAnomalyDetectionGranularity, type IAlertAnomalyDetectionSensitivity, type IAlertComparisonOperator, type IAlertRelativeArithmeticOperator, type IAlertRelativeOperator, type IAlertTriggerInterval, type IAlertTriggerMode, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IAutomationVisibleFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget, type IWorkspaceUser } from "@gooddata/sdk-model";
|
|
3
2
|
import { type AlertAttribute, type AlertMetric, type AlertMetricComparatorType } from "../../types.js";
|
|
4
3
|
export interface IUseEditAlertProps {
|
|
5
4
|
alertToEdit?: IAutomationMetadataObject;
|
|
6
5
|
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
7
6
|
maxAutomationsRecipients: number;
|
|
8
|
-
|
|
7
|
+
users: IWorkspaceUser[];
|
|
8
|
+
widget?: IWidget;
|
|
9
9
|
insight?: IInsight;
|
|
10
10
|
editedAutomationFilters?: FilterContextItem[];
|
|
11
11
|
setEditedAutomationFilters: (filters: FilterContextItem[]) => void;
|
|
@@ -13,13 +13,13 @@ export interface IUseEditAlertProps {
|
|
|
13
13
|
filtersForNewAutomation: FilterContextItem[];
|
|
14
14
|
externalRecipientOverride?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function useEditAlert({ alertToEdit, notificationChannels, insight, widget, editedAutomationFilters, maxAutomationsRecipients, setEditedAutomationFilters, availableFiltersAsVisibleFilters, filtersForNewAutomation, externalRecipientOverride }: IUseEditAlertProps): {
|
|
16
|
+
export declare function useEditAlert({ alertToEdit, notificationChannels, insight, widget, users, editedAutomationFilters, maxAutomationsRecipients, setEditedAutomationFilters, availableFiltersAsVisibleFilters, filtersForNewAutomation, externalRecipientOverride }: IUseEditAlertProps): {
|
|
17
17
|
onTitleChange: (value: string, isValid: boolean) => void;
|
|
18
18
|
onRecipientsChange: (updatedRecipients: IAutomationRecipient[]) => void;
|
|
19
19
|
onFiltersChange: (filters: FilterContextItem[]) => void;
|
|
20
20
|
onApplyCurrentFilters: () => void;
|
|
21
|
-
automationParameters: import("
|
|
22
|
-
availableParameters: import("
|
|
21
|
+
automationParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
|
22
|
+
availableParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
|
23
23
|
onParameterChange: (ref: import("@gooddata/sdk-model").IdentifierRef, value: number) => void;
|
|
24
24
|
onParameterDelete: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
|
|
25
25
|
onParameterAdd: (ref: import("@gooddata/sdk-model").IdentifierRef) => void;
|
|
@@ -63,7 +63,7 @@ export declare function useEditAlert({ alertToEdit, notificationChannels, insigh
|
|
|
63
63
|
canManageComparison: boolean;
|
|
64
64
|
separators: import("@gooddata/sdk-model").ISeparators;
|
|
65
65
|
warningMessage: string | undefined;
|
|
66
|
-
defaultUser:
|
|
66
|
+
defaultUser: IWorkspaceUser;
|
|
67
67
|
originalAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
68
68
|
editedAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
69
69
|
allowOnlyLoggedUserRecipients: boolean;
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,cAAc,EAItB,MAAM,qBAAqB,CAAC;AAkB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAkCvG,MAAM,WAAW,kBAAkB;IAC/B,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAE9C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,YAAY,CAAC,EACzB,WAAW,EACX,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,KAAK,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EAC5B,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmoBpB"}
|