@gooddata/sdk-ui-dashboard 11.51.0 → 11.52.0-alpha.3
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/index.d.ts +1 -5
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +0 -3
- package/esm/model/commandHandlers/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/index.js +0 -2
- package/esm/model/commands/base.d.ts +1 -1
- package/esm/model/commands/base.d.ts.map +1 -1
- package/esm/model/commands/index.d.ts +1 -2
- package/esm/model/commands/index.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.d.ts +0 -2
- package/esm/model/store/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +0 -2
- package/esm/model/store/types.d.ts +0 -3
- package/esm/model/store/types.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +2 -2
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts +3 -4
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.js +14 -16
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts +1 -3
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +1 -4
- package/esm/presentation/automations/alerting/types.d.ts +1 -13
- package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts +4 -5
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +8 -17
- package/esm/presentation/automations/connectors/AlertingConnector.test.js +0 -16
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +4 -4
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +8 -18
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +0 -20
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts +1 -4
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +5 -10
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +13 -10
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +35 -3
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +76 -27
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts +1 -4
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +1 -14
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +1 -11
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts +11 -14
- package/esm/presentation/automations/contexts/AlertingDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/AlertingDialogContext.js +3 -3
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +31 -1
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +5 -18
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.js +3 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +5 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts +3 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +21 -21
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts +6 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +14 -27
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts +13 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/useWorkspaceUsersSearch.js +44 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +1 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +1 -4
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailEffectiveFilters.js +3 -12
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFilters.js +2 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts +8 -9
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduledEmailFormState.js +12 -11
- package/esm/presentation/automations/scheduledEmail/types.d.ts +1 -13
- package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts +1 -2
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/users.js +1 -10
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +9 -0
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +7 -2
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +2 -14
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +12 -3
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +3 -11
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts +7 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js +9 -25
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.js +4 -7
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.js +6 -3
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +23 -10
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts +1 -3
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/utils/automationUtils.js +0 -17
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +5 -4
- package/esm/presentation/drill/utils/dashboardPredicate.d.ts +0 -15
- package/esm/presentation/drill/utils/dashboardPredicate.d.ts.map +1 -1
- package/esm/presentation/drill/utils/dashboardPredicate.js +1 -16
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts +4 -0
- package/esm/presentation/presentationComponents/DashboardItems/DashboardItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts +2 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/CreateAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts +2 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +4 -6
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +3 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/DefaultDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/EditableDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/ExportableDashboardVisualizationSwitcherWidget.js +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts +2 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +4 -4
- package/esm/sdk-ui-dashboard.d.ts +47 -115
- package/package.json +21 -21
- package/styles/css/main.css +2 -0
- package/styles/css/main.css.map +1 -1
- package/styles/css/visualizationSwitcherHeader.css +1 -0
- package/styles/css/visualizationSwitcherHeader.css.map +1 -1
- package/styles/css/visualizationSwitcherWidget.css +1 -0
- package/styles/css/visualizationSwitcherWidget.css.map +1 -1
- package/styles/scss/visualizationSwitcherHeader.scss +2 -0
- package/styles/scss/visualizationSwitcherWidget.scss +2 -0
- package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts +0 -5
- package/esm/model/commandHandlers/users/loadAllUsersHandler.d.ts.map +0 -1
- package/esm/model/commandHandlers/users/loadAllUsersHandler.js +0 -19
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts +0 -4
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.d.ts.map +0 -1
- package/esm/model/commandHandlers/users/loadWorkspaceUsers.js +0 -3
- package/esm/model/commands/users.d.ts +0 -19
- package/esm/model/commands/users.d.ts.map +0 -1
- package/esm/model/commands/users.js +0 -15
- package/esm/model/react/useWorkspaceUsers.d.ts +0 -9
- package/esm/model/react/useWorkspaceUsers.d.ts.map +0 -1
- package/esm/model/react/useWorkspaceUsers.js +0 -27
- package/esm/model/store/users/index.d.ts +0 -9
- package/esm/model/store/users/index.d.ts.map +0 -1
- package/esm/model/store/users/index.js +0 -12
- package/esm/model/store/users/usersReducers.d.ts +0 -21
- package/esm/model/store/users/usersReducers.d.ts.map +0 -1
- package/esm/model/store/users/usersReducers.js +0 -15
- package/esm/model/store/users/usersSelectors.d.ts +0 -22
- package/esm/model/store/users/usersSelectors.d.ts.map +0 -1
- package/esm/model/store/users/usersSelectors.js +0 -27
- package/esm/model/store/users/usersState.d.ts +0 -12
- package/esm/model/store/users/usersState.d.ts.map +0 -1
- package/esm/model/store/users/usersState.js +0 -2
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 } from "@gooddata/sdk-model";
|
|
2
2
|
import { type AlertAttribute, type AlertMetric, type AlertMetricComparatorType } from "../../types.js";
|
|
3
3
|
import { type IMeasureFormatMap } from "../utils/getters.js";
|
|
4
4
|
/**
|
|
@@ -10,7 +10,6 @@ export interface IUseAlertFormStateProps {
|
|
|
10
10
|
insight?: IInsight;
|
|
11
11
|
widget?: IWidget;
|
|
12
12
|
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
13
|
-
users: IWorkspaceUser[];
|
|
14
13
|
editedAutomationFilters?: FilterContextItem[];
|
|
15
14
|
availableFiltersAsVisibleFilters?: IAutomationVisibleFilter[] | undefined;
|
|
16
15
|
externalRecipientOverride?: string;
|
|
@@ -29,11 +28,11 @@ export interface IUseAlertFormStateProps {
|
|
|
29
28
|
*
|
|
30
29
|
* @internal
|
|
31
30
|
*/
|
|
32
|
-
export declare function useAlertFormState({ alertToEdit, insight, widget, notificationChannels,
|
|
31
|
+
export declare function useAlertFormState({ alertToEdit, insight, widget, notificationChannels, editedAutomationFilters, availableFiltersAsVisibleFilters, externalRecipientOverride, supportedMeasures, supportedAttributes, measureFormatMap }: IUseAlertFormStateProps): {
|
|
33
32
|
editedAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
34
33
|
setEditedAutomation: import("react").Dispatch<import("react").SetStateAction<IAutomationMetadataObjectDefinition | undefined>>;
|
|
35
34
|
originalAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
36
|
-
defaultUser:
|
|
35
|
+
defaultUser: IAutomationRecipient;
|
|
37
36
|
defaultRecipient: IAutomationRecipient;
|
|
38
37
|
automationParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
|
39
38
|
availableParameters: import("../../../shared/automationFilters/automationParameters.js").IAutomationParameter[];
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlertFormState.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.ts"],"names":[],"mappings":"AAMA,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,
|
|
1
|
+
{"version":3,"file":"useAlertFormState.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.ts"],"names":[],"mappings":"AAMA,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,EACf,MAAM,qBAAqB,CAAC;AAe7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEvG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAY7D;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9C,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,gBAAgB,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,WAAW,EACX,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACnB,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiZzB"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertFormState.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
|
6
6
|
import { setAlertExecutionParameters } from "../../../shared/automationFilters/automationParameters.js";
|
|
7
7
|
import { useAutomationAlertParameters } from "../../../shared/automationFilters/useAutomationAlertParameters.js";
|
|
8
8
|
import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveMvfDimensionalityLocalRefs, } from "../../../shared/filters/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { convertExternalRecipientToAutomationRecipient, convertUserToAutomationRecipient, } from "../../../shared/utils/automationUtils.js";
|
|
10
10
|
import { createDefaultAlert } from "../utils/convertors.js";
|
|
11
11
|
import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, } from "../utils/transformation.js";
|
|
12
12
|
/**
|
|
@@ -20,18 +20,18 @@ import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformA
|
|
|
20
20
|
*
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
export function useAlertFormState({ alertToEdit, insight, widget, notificationChannels,
|
|
23
|
+
export function useAlertFormState({ alertToEdit, insight, widget, notificationChannels, editedAutomationFilters, availableFiltersAsVisibleFilters, externalRecipientOverride, supportedMeasures, supportedAttributes, measureFormatMap, }) {
|
|
24
24
|
const intl = useIntl();
|
|
25
|
-
const { weekStart, timezone, settings, currentUser, features: { enableAlertOncePerInterval }, } = useAutomationsContext();
|
|
26
|
-
const { dashboardId, hiddenFilters: dashboardHiddenFilters, commonDateFilterId, dashboardEvaluationFrequency,
|
|
25
|
+
const { weekStart, timezone, settings, currentUser, widgetLocalIdToTabIdMap: widgetTabMap, features: { enableAlertOncePerInterval }, } = useAutomationsContext();
|
|
26
|
+
const { dashboardId, hiddenFilters: dashboardHiddenFilters, commonDateFilterId, dashboardEvaluationFrequency, parameterValues, dashboardParameters, } = useAlertingDialogContext();
|
|
27
27
|
// Determine target tab ID if widget is present
|
|
28
28
|
const targetTabIdentifier = widget?.localIdentifier ? widgetTabMap[widget.localIdentifier] : undefined;
|
|
29
29
|
// Default values
|
|
30
30
|
const defaultMeasure = supportedMeasures[0];
|
|
31
|
-
const defaultUser =
|
|
31
|
+
const defaultUser = convertUserToAutomationRecipient(currentUser);
|
|
32
32
|
const defaultRecipient = externalRecipientOverride
|
|
33
33
|
? convertExternalRecipientToAutomationRecipient(externalRecipientOverride)
|
|
34
|
-
:
|
|
34
|
+
: convertUserToAutomationRecipient(currentUser);
|
|
35
35
|
const defaultNotificationChannelId = notificationChannels[0]?.id;
|
|
36
36
|
const resolvedAlertToEdit = (() => {
|
|
37
37
|
if (!alertToEdit) {
|
|
@@ -71,7 +71,12 @@ export function useAlertFormState({ alertToEdit, insight, widget, notificationCh
|
|
|
71
71
|
: defaultNewAlert;
|
|
72
72
|
});
|
|
73
73
|
const [originalAutomation] = useState(editedAutomation);
|
|
74
|
-
const { automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, dropStaleParameters, } = useAutomationAlertParameters({
|
|
74
|
+
const { automationParameters, availableParameters, onParameterChange, onParameterDelete, onParameterAdd, dropStaleParameters, } = useAutomationAlertParameters({
|
|
75
|
+
editedAutomation,
|
|
76
|
+
setEditedAutomation,
|
|
77
|
+
dashboardParameters,
|
|
78
|
+
widgetParameterValues: parameterValues,
|
|
79
|
+
});
|
|
75
80
|
// Local state
|
|
76
81
|
const [warningMessage, setWarningMessage] = useState(undefined);
|
|
77
82
|
const [isTitleValid, setIsTitleValid] = useState(true);
|
|
@@ -161,19 +166,12 @@ export function useAlertFormState({ alertToEdit, insight, widget, notificationCh
|
|
|
161
166
|
* Reset recipients when new notification channel only allows the author/creator
|
|
162
167
|
*/
|
|
163
168
|
const updatedRecipients = selectedDestination?.allowedRecipients === "creator"
|
|
164
|
-
? [
|
|
169
|
+
? [convertUserToAutomationRecipient(currentUser)]
|
|
165
170
|
: undefined;
|
|
166
171
|
setEditedAutomation((alert) => alert
|
|
167
172
|
? transformAlertByDestination(alert, destinationId, updatedRecipients)
|
|
168
173
|
: undefined);
|
|
169
|
-
}, [
|
|
170
|
-
setEditedAutomation,
|
|
171
|
-
alertToEdit?.notificationChannel,
|
|
172
|
-
currentUser,
|
|
173
|
-
notificationChannels,
|
|
174
|
-
intl,
|
|
175
|
-
users,
|
|
176
|
-
]);
|
|
174
|
+
}, [setEditedAutomation, alertToEdit?.notificationChannel, currentUser, notificationChannels, intl]);
|
|
177
175
|
const onTriggerModeChange = useCallback((triggerMode) => {
|
|
178
176
|
setEditedAutomation((s) => s
|
|
179
177
|
? {
|
|
@@ -54,11 +54,9 @@ export declare function useEditAlert({ maxAutomationsRecipients, externalRecipie
|
|
|
54
54
|
selectedComparator: import("../../types.js").AlertMetricComparator | undefined;
|
|
55
55
|
separators: import("@gooddata/sdk-model").ISeparators;
|
|
56
56
|
warningMessage: string | undefined;
|
|
57
|
-
defaultUser: import("@gooddata/sdk-model").
|
|
57
|
+
defaultUser: import("@gooddata/sdk-model").IAutomationRecipient;
|
|
58
58
|
originalAutomation: import("@gooddata/sdk-model").IAutomationMetadataObjectDefinition | undefined;
|
|
59
59
|
editedAutomation: import("@gooddata/sdk-model").IAutomationMetadataObjectDefinition | undefined;
|
|
60
|
-
users: import("@gooddata/sdk-model").IWorkspaceUser[];
|
|
61
|
-
usersError: import("@gooddata/sdk-ui").GoodDataSdkError | undefined;
|
|
62
60
|
notificationChannels: import("@gooddata/sdk-model").INotificationChannelIdentifier[] | import("@gooddata/sdk-model").INotificationChannelMetadataObject[];
|
|
63
61
|
allowOnlyLoggedUserRecipients: boolean;
|
|
64
62
|
allowExternalRecipients: boolean;
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,kBAAkB;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,YAAY,CAAC,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,EAAE,kBAAkB
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,kBAAkB;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,wBAAgB,YAAY,CAAC,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6MvG"}
|
|
@@ -10,7 +10,7 @@ import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
|
|
|
10
10
|
import { useAlertThreshold } from "./useAlertThreshold.js";
|
|
11
11
|
export function useEditAlert({ maxAutomationsRecipients, externalRecipientOverride }) {
|
|
12
12
|
const { catalogDateDatasets, catalogAttributes, separators, weekStart, timezone, allowHourlyRecurrence } = useAutomationsContext();
|
|
13
|
-
const { hiddenFilters: dashboardHiddenFilters, commonDateFilterId, alertToEdit,
|
|
13
|
+
const { hiddenFilters: dashboardHiddenFilters, commonDateFilterId, alertToEdit, notificationChannels, widget, insight, } = useAlertingDialogContext();
|
|
14
14
|
const { editedAutomationFilters, setEditedAutomationFilters, availableFilters, availableFiltersAsVisibleFilters, filtersForNewAutomation, } = useAutomationFiltersSelect({ automationToEdit: alertToEdit, widget });
|
|
15
15
|
const isInvalidConnectionToInsight = alertToEdit?.metadata?.widget && !insight;
|
|
16
16
|
const { measureFormatMap, supportedMeasures, supportedAttributes, isResultLoading, getAttributeValues, getMetricValue, } = useAlertSupportedMetrics({ insight, widget, alertToEdit });
|
|
@@ -19,7 +19,6 @@ export function useEditAlert({ maxAutomationsRecipients, externalRecipientOverri
|
|
|
19
19
|
insight,
|
|
20
20
|
widget,
|
|
21
21
|
notificationChannels,
|
|
22
|
-
users,
|
|
23
22
|
editedAutomationFilters,
|
|
24
23
|
availableFiltersAsVisibleFilters,
|
|
25
24
|
externalRecipientOverride,
|
|
@@ -134,8 +133,6 @@ export function useEditAlert({ maxAutomationsRecipients, externalRecipientOverri
|
|
|
134
133
|
defaultUser,
|
|
135
134
|
originalAutomation,
|
|
136
135
|
editedAutomation,
|
|
137
|
-
users,
|
|
138
|
-
usersError,
|
|
139
136
|
notificationChannels,
|
|
140
137
|
allowOnlyLoggedUserRecipients,
|
|
141
138
|
allowExternalRecipients,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
|
-
import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget
|
|
2
|
+
import { type DateAttributeGranularity, type IAttribute, type IAutomationMetadataObject, type IDataSetMetadataObject, type IInsight, type IMeasure, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
4
|
/**
|
|
5
5
|
* @alpha
|
|
@@ -11,18 +11,6 @@ export interface IAlertingDialogProps {
|
|
|
11
11
|
* @deprecated read `alertToEdit` from `useAlertingDialogContext()` instead. Prop will be removed.
|
|
12
12
|
*/
|
|
13
13
|
alertToEdit?: IAutomationMetadataObject;
|
|
14
|
-
/**
|
|
15
|
-
* Users in workspace
|
|
16
|
-
*
|
|
17
|
-
* @deprecated read `users` from `useAlertingDialogContext()` instead. Prop will be removed.
|
|
18
|
-
*/
|
|
19
|
-
users?: IWorkspaceUser[];
|
|
20
|
-
/**
|
|
21
|
-
* Error occurred while loading users
|
|
22
|
-
*
|
|
23
|
-
* @deprecated read `usersError` from `useAlertingDialogContext()` instead. Prop will be removed.
|
|
24
|
-
*/
|
|
25
|
-
usersError?: GoodDataSdkError;
|
|
26
14
|
/**
|
|
27
15
|
* Notification channels in organization
|
|
28
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/alerting/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,11 +13,10 @@ export declare function AlertingAutomationsProvider({ children }: {
|
|
|
13
13
|
* Connector component that reads from the dashboard Redux store and wires up
|
|
14
14
|
* the alerting dialog tree (create/edit and management) via context providers.
|
|
15
15
|
*
|
|
16
|
-
* This is the
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* the note there); moving it behind this connector is tracked on GDP-3167.
|
|
16
|
+
* This is the bridge between dashboard store state and the alerting dialog tree, with no exceptions:
|
|
17
|
+
* the shared `automationFilters` hooks read AutomationsContext and take their widget-scoped values as
|
|
18
|
+
* props from this connector's `AlertingDialogContext`. The `automationFilters` allowlist in
|
|
19
|
+
* `.dependency-cruiser.js` no longer permits any store selector.
|
|
21
20
|
*
|
|
22
21
|
* AutomationsContext is provided by AlertingAutomationsProvider, which wraps this
|
|
23
22
|
* connector (see AlertingDialogProvider).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertingConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/AlertingConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertingConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/AlertingConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B1D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAG/F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,GAAG,IAAI,CAMvD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isWidget, } from "@gooddata/sdk-model";
|
|
3
3
|
import { useDashboardAlerts } from "../../../model/react/useDashboardAlerting/useDashboardAlerts.js";
|
|
4
|
-
import { useWorkspaceUsers } from "../../../model/react/useWorkspaceUsers.js";
|
|
5
4
|
import { AlertingDialog } from "../alerting/AlertingDialog.js";
|
|
6
5
|
import { AlertingManagementDialog } from "../alerting/AlertingManagementDialog.js";
|
|
7
6
|
import { AlertingDialogContextProvider } from "../contexts/AlertingDialogContext.js";
|
|
@@ -11,7 +10,6 @@ import { useAutomationManagementEditRouting } from "./hooks/useAutomationManagem
|
|
|
11
10
|
import { useBuildAlertingDialogContext } from "./hooks/useBuildAlertingDialogContext.js";
|
|
12
11
|
import { useBuildAlertingManagementDialogContext } from "./hooks/useBuildAlertingManagementDialogContext.js";
|
|
13
12
|
import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.js";
|
|
14
|
-
const EMPTY_USERS = [];
|
|
15
13
|
/**
|
|
16
14
|
* Provides AutomationsContext to its children, built from dashboard Redux state.
|
|
17
15
|
* Wraps the alerting dialog subtree (both the create/edit and management dialogs reach
|
|
@@ -27,11 +25,10 @@ export function AlertingAutomationsProvider({ children }) {
|
|
|
27
25
|
* Connector component that reads from the dashboard Redux store and wires up
|
|
28
26
|
* the alerting dialog tree (create/edit and management) via context providers.
|
|
29
27
|
*
|
|
30
|
-
* This is the
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* the note there); moving it behind this connector is tracked on GDP-3167.
|
|
28
|
+
* This is the bridge between dashboard store state and the alerting dialog tree, with no exceptions:
|
|
29
|
+
* the shared `automationFilters` hooks read AutomationsContext and take their widget-scoped values as
|
|
30
|
+
* props from this connector's `AlertingDialogContext`. The `automationFilters` allowlist in
|
|
31
|
+
* `.dependency-cruiser.js` no longer permits any store selector.
|
|
35
32
|
*
|
|
36
33
|
* AutomationsContext is provided by AlertingAutomationsProvider, which wraps this
|
|
37
34
|
* connector (see AlertingDialogProvider).
|
|
@@ -47,7 +44,7 @@ export function AlertingConnector() {
|
|
|
47
44
|
}
|
|
48
45
|
function AlertingConnectorInitialized(alerts) {
|
|
49
46
|
const { isAlertDialogOpen, isAlertManagementDialogOpen } = alerts;
|
|
50
|
-
// Defer store reads
|
|
47
|
+
// Defer store reads until at least one dialog is open.
|
|
51
48
|
if (!isAlertDialogOpen && !isAlertManagementDialogOpen) {
|
|
52
49
|
return null;
|
|
53
50
|
}
|
|
@@ -69,24 +66,18 @@ function AlertingConnectorWithData({ alerts }) {
|
|
|
69
66
|
return (_jsxs(AlertingManagementDialogContextProvider, { value: managementCtx, children: [isAlertManagementDialogOpen ? (_jsx(AlertingManagementDialog, { onAdd: onAlertingManagementAdd, onEdit: handleManagementEdit, onClose: onAlertingManagementClose, onDeleteSuccess: onAlertingManagementDeleteSuccess, onDeleteError: onAlertingManagementDeleteError, onPauseSuccess: onAlertingManagementPauseSuccess, onPauseError: onAlertingManagementPauseError })) : null, isAlertDialogOpen ? (_jsx(AlertingCreateEditConnector, { alertToEdit: alertToEdit, notificationChannels: notificationChannels, widget: insightWidget, insight: insight, automationsLoading: automationsLoading, onCancel: onAlertingCancel, onError: onAlertingCreateError, onSuccess: onAlertingCreateSuccess, onSaveError: onAlertingSaveError, onSaveSuccess: onAlertingSaveSuccess, onDeleteSuccess: onAlertingManagementDeleteSuccess, onDeleteError: onAlertingManagementDeleteError })) : null] }));
|
|
70
67
|
}
|
|
71
68
|
/**
|
|
72
|
-
*
|
|
73
|
-
* the
|
|
74
|
-
* workspace-users load.
|
|
69
|
+
* Hydrates the alerting create/edit context. Lives here rather than in the parent so that opening only
|
|
70
|
+
* the management dialog — which does not consume it — skips the work.
|
|
75
71
|
*/
|
|
76
72
|
function AlertingCreateEditConnector(props) {
|
|
77
73
|
const { alertToEdit, notificationChannels, widget, insight, automationsLoading, onCancel, onError, onSuccess, onSaveError, onSaveSuccess, onDeleteSuccess, onDeleteError, } = props;
|
|
78
|
-
const { users, status: usersStatus, usersError } = useWorkspaceUsers();
|
|
79
|
-
const isLoading = automationsLoading || usersStatus === "pending" || usersStatus === "loading";
|
|
80
|
-
const effectiveUsers = users ?? EMPTY_USERS;
|
|
81
74
|
const alertingCtx = useBuildAlertingDialogContext({
|
|
82
75
|
mode: alertToEdit ? "edit" : "create",
|
|
83
76
|
widget,
|
|
84
77
|
insight,
|
|
85
78
|
alertToEdit,
|
|
86
|
-
users: effectiveUsers,
|
|
87
|
-
usersError,
|
|
88
79
|
notificationChannels,
|
|
89
|
-
isLoading,
|
|
80
|
+
isLoading: automationsLoading,
|
|
90
81
|
});
|
|
91
82
|
return (_jsx(AlertingDialogContextProvider, { value: alertingCtx, children: _jsx(AlertingDialog, { onCancel: onCancel, onError: onError, onSuccess: onSuccess, onSaveError: onSaveError, onSaveSuccess: onSaveSuccess, onDeleteSuccess: onDeleteSuccess, onDeleteError: onDeleteError }) }));
|
|
92
83
|
}
|
|
@@ -9,13 +9,11 @@ const fixtures = vi.hoisted(() => {
|
|
|
9
9
|
let managementDialogProps;
|
|
10
10
|
let dialogProps;
|
|
11
11
|
let automationsError;
|
|
12
|
-
const useWorkspaceUsers = vi.fn(() => ({ users: [], status: "success", usersError: undefined }));
|
|
13
12
|
const alertsState = { isAlertDialogOpen: false, isAlertManagementDialogOpen: true };
|
|
14
13
|
return {
|
|
15
14
|
buildAutomationUrl,
|
|
16
15
|
navigate,
|
|
17
16
|
onAlertingManagementEdit,
|
|
18
|
-
useWorkspaceUsers,
|
|
19
17
|
alertsState,
|
|
20
18
|
get managementDialogProps() {
|
|
21
19
|
return managementDialogProps;
|
|
@@ -75,9 +73,6 @@ vi.mock("../../../model/react/useDashboardAlerting/useDashboardAlerts.js", () =>
|
|
|
75
73
|
insight: undefined,
|
|
76
74
|
}),
|
|
77
75
|
}));
|
|
78
|
-
vi.mock("../../../model/react/useWorkspaceUsers.js", () => ({
|
|
79
|
-
useWorkspaceUsers: fixtures.useWorkspaceUsers,
|
|
80
|
-
}));
|
|
81
76
|
vi.mock("../../../model/store/config/configSelectors.js", () => ({
|
|
82
77
|
selectExternalRecipient: () => "recipient@example.com",
|
|
83
78
|
selectIsEmbedded: () => false,
|
|
@@ -141,7 +136,6 @@ describe("AlertingConnector", () => {
|
|
|
141
136
|
fixtures.managementDialogProps = undefined;
|
|
142
137
|
fixtures.dialogProps = undefined;
|
|
143
138
|
fixtures.automationsError = undefined;
|
|
144
|
-
fixtures.useWorkspaceUsers.mockClear();
|
|
145
139
|
fixtures.alertsState.isAlertDialogOpen = false;
|
|
146
140
|
fixtures.alertsState.isAlertManagementDialogOpen = true;
|
|
147
141
|
});
|
|
@@ -178,16 +172,6 @@ describe("AlertingConnector", () => {
|
|
|
178
172
|
dashboard: undefined,
|
|
179
173
|
});
|
|
180
174
|
});
|
|
181
|
-
it("does not load workspace users when only the management dialog is open", () => {
|
|
182
|
-
render(_jsx(AlertingConnector, {}));
|
|
183
|
-
expect(fixtures.useWorkspaceUsers).not.toHaveBeenCalled();
|
|
184
|
-
});
|
|
185
|
-
it("loads workspace users when the create/edit dialog is open", () => {
|
|
186
|
-
fixtures.alertsState.isAlertDialogOpen = true;
|
|
187
|
-
fixtures.alertsState.isAlertManagementDialogOpen = false;
|
|
188
|
-
render(_jsx(AlertingConnector, {}));
|
|
189
|
-
expect(fixtures.useWorkspaceUsers).toHaveBeenCalled();
|
|
190
|
-
});
|
|
191
175
|
it("does not supply the deprecated data props to the create/edit dialog", () => {
|
|
192
176
|
fixtures.alertsState.isAlertDialogOpen = true;
|
|
193
177
|
fixtures.alertsState.isAlertManagementDialogOpen = false;
|
|
@@ -13,10 +13,10 @@ export declare function ScheduledEmailAutomationsProvider({ children }: {
|
|
|
13
13
|
* Connector component that reads from the dashboard Redux store and wires up
|
|
14
14
|
* the scheduled-email dialog tree (create/edit and management) via context providers.
|
|
15
15
|
*
|
|
16
|
-
* This is the
|
|
17
|
-
*
|
|
18
|
-
* `useAutomationExportParameters`, `useValidateExistingAutomationFilters`) read
|
|
19
|
-
* `
|
|
16
|
+
* This is the bridge between dashboard store state and the scheduled-email dialog tree, with no
|
|
17
|
+
* exceptions: the shared `automationFilters` hooks (`useAutomationFiltersSelect`,
|
|
18
|
+
* `useAutomationExportParameters`, `useValidateExistingAutomationFilters`) read AutomationsContext and
|
|
19
|
+
* take their widget-scoped values as props from this connector's `ScheduledEmailDialogContext`.
|
|
20
20
|
*
|
|
21
21
|
* AutomationsContext is provided by ScheduledEmailAutomationsProvider, which wraps this
|
|
22
22
|
* connector (see ScheduledEmailAutomationsProvider in DashboardHeader).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledEmailConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/ScheduledEmailConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduledEmailConnector.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/connectors/ScheduledEmailConnector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAsCnE;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAGrG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,YAAY,GAAG,IAAI,CAM7D"}
|
|
@@ -5,7 +5,6 @@ import { isWidget, } from "@gooddata/sdk-model";
|
|
|
5
5
|
import { getAutomationDashboardFilters, getAutomationVisualizationFilters, } from "../../../_staging/automation/index.js";
|
|
6
6
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
7
7
|
import { useDashboardScheduledEmails } from "../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEmails.js";
|
|
8
|
-
import { useWorkspaceUsers } from "../../../model/react/useWorkspaceUsers.js";
|
|
9
8
|
import { selectAutomationDefaultSelectedFilters, selectDashboardHiddenFilters, } from "../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
10
9
|
import { AutomationsContextProvider } from "../contexts/AutomationsContext.js";
|
|
11
10
|
import { ScheduledEmailDialogContextProvider } from "../contexts/ScheduledEmailDialogContext.js";
|
|
@@ -18,9 +17,6 @@ import { useBuildAutomationsContext } from "./hooks/useBuildAutomationsContext.j
|
|
|
18
17
|
import { useBuildScheduledEmailDialogContext } from "./hooks/useBuildScheduledEmailDialogContext.js";
|
|
19
18
|
import { useBuildScheduledEmailManagementDialogContext } from "./hooks/useBuildScheduledEmailManagementDialogContext.js";
|
|
20
19
|
import { useWidgetAutomationFilters } from "./hooks/useWidgetAutomationFilters.js";
|
|
21
|
-
// Stable placeholder so useBuildScheduledEmailDialogContext's useMemo does not see a fresh array
|
|
22
|
-
// (and therefore a new context identity) on every render.
|
|
23
|
-
const EMPTY_USERS = [];
|
|
24
20
|
/**
|
|
25
21
|
* Provides AutomationsContext to its children, built from dashboard Redux state.
|
|
26
22
|
* Wraps the scheduled-email dialog subtree (both the create/edit and management dialogs reach
|
|
@@ -36,10 +32,10 @@ export function ScheduledEmailAutomationsProvider({ children }) {
|
|
|
36
32
|
* Connector component that reads from the dashboard Redux store and wires up
|
|
37
33
|
* the scheduled-email dialog tree (create/edit and management) via context providers.
|
|
38
34
|
*
|
|
39
|
-
* This is the
|
|
40
|
-
*
|
|
41
|
-
* `useAutomationExportParameters`, `useValidateExistingAutomationFilters`) read
|
|
42
|
-
* `
|
|
35
|
+
* This is the bridge between dashboard store state and the scheduled-email dialog tree, with no
|
|
36
|
+
* exceptions: the shared `automationFilters` hooks (`useAutomationFiltersSelect`,
|
|
37
|
+
* `useAutomationExportParameters`, `useValidateExistingAutomationFilters`) read AutomationsContext and
|
|
38
|
+
* take their widget-scoped values as props from this connector's `ScheduledEmailDialogContext`.
|
|
43
39
|
*
|
|
44
40
|
* AutomationsContext is provided by ScheduledEmailAutomationsProvider, which wraps this
|
|
45
41
|
* connector (see ScheduledEmailAutomationsProvider in DashboardHeader).
|
|
@@ -55,7 +51,7 @@ export function ScheduledEmailConnector() {
|
|
|
55
51
|
}
|
|
56
52
|
function ScheduledEmailConnectorInitialized(se) {
|
|
57
53
|
const { isScheduleEmailingDialogOpen, isScheduleEmailingManagementDialogOpen } = se;
|
|
58
|
-
// Defer store reads
|
|
54
|
+
// Defer store reads until at least one dialog is open.
|
|
59
55
|
// This is a deliberate behavior alignment with AlertingConnector (GDP-3167).
|
|
60
56
|
if (!isScheduleEmailingDialogOpen && !isScheduleEmailingManagementDialogOpen) {
|
|
61
57
|
return null;
|
|
@@ -88,21 +84,15 @@ function ScheduledEmailConnectorWithData({ se }) {
|
|
|
88
84
|
return (_jsxs(ScheduledEmailManagementDialogContextProvider, { value: managementCtx, children: [isScheduleEmailingManagementDialogOpen ? (_jsx(ScheduledEmailManagementDialog, { onAdd: onScheduleEmailingManagementAdd, onEdit: handleManagementEdit, onClose: onScheduleEmailingManagementClose, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null, isScheduleEmailingDialogOpen ? (_jsx(ScheduledEmailCreateEditConnector, { scheduledExportToEdit: scheduledExportToEdit, notificationChannels: notificationChannels, widget: insightWidget, insight: insight, dashboardFilters: dashboardFilters, isLoading: isLoading, onBack: onScheduleEmailingBack, onCancel: onScheduleEmailingCancel, onError: onScheduleEmailingCreateError, onSuccess: onScheduleEmailingCreateSuccess, onSaveError: onScheduleEmailingSaveError, onSaveSuccess: onScheduleEmailingSaveSuccess, onDeleteSuccess: onScheduleEmailingManagementDeleteSuccess, onDeleteError: onScheduleEmailingManagementDeleteError })) : null] }));
|
|
89
85
|
}
|
|
90
86
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* neither — never dispatches the workspace-users load.
|
|
87
|
+
* Hydrates the scheduled-email create/edit context. Lives here rather than in the parent so that
|
|
88
|
+
* opening only the management dialog — which does not consume it — skips the work.
|
|
94
89
|
*/
|
|
95
90
|
function ScheduledEmailCreateEditConnector(props) {
|
|
96
|
-
const { scheduledExportToEdit, notificationChannels, widget, insight, dashboardFilters, isLoading
|
|
97
|
-
const { users, status: usersStatus, usersError } = useWorkspaceUsers();
|
|
98
|
-
const isLoading = isDataLoading || usersStatus === "pending" || usersStatus === "loading";
|
|
99
|
-
const effectiveUsers = users ?? EMPTY_USERS;
|
|
91
|
+
const { scheduledExportToEdit, notificationChannels, widget, insight, dashboardFilters, isLoading, onBack, onCancel, onError, onSuccess, onSaveError, onSaveSuccess, onDeleteSuccess, onDeleteError, } = props;
|
|
100
92
|
const seCtx = useBuildScheduledEmailDialogContext({
|
|
101
93
|
widget,
|
|
102
94
|
insight,
|
|
103
95
|
scheduledExportToEdit,
|
|
104
|
-
users: effectiveUsers,
|
|
105
|
-
usersError,
|
|
106
96
|
notificationChannels,
|
|
107
97
|
dashboardFilters,
|
|
108
98
|
isLoading,
|
|
@@ -9,11 +9,6 @@ const fixtures = vi.hoisted(() => {
|
|
|
9
9
|
let managementDialogProps;
|
|
10
10
|
let dialogProps;
|
|
11
11
|
let automationsError;
|
|
12
|
-
const useWorkspaceUsers = vi.fn(() => ({
|
|
13
|
-
users: [],
|
|
14
|
-
status: "success",
|
|
15
|
-
usersError: new Error("users failed to load"),
|
|
16
|
-
}));
|
|
17
12
|
const seState = {
|
|
18
13
|
isScheduleEmailingDialogOpen: false,
|
|
19
14
|
isScheduleEmailingManagementDialogOpen: true,
|
|
@@ -22,7 +17,6 @@ const fixtures = vi.hoisted(() => {
|
|
|
22
17
|
buildAutomationUrl,
|
|
23
18
|
navigate,
|
|
24
19
|
onScheduleEmailingManagementEdit,
|
|
25
|
-
useWorkspaceUsers,
|
|
26
20
|
seState,
|
|
27
21
|
get managementDialogProps() {
|
|
28
22
|
return managementDialogProps;
|
|
@@ -83,9 +77,6 @@ vi.mock("../../../model/react/useDasboardScheduledEmails/useDashboardScheduledEm
|
|
|
83
77
|
insight: { insight: { identifier: "insight-1", title: "Insight" } },
|
|
84
78
|
}),
|
|
85
79
|
}));
|
|
86
|
-
vi.mock("../../../model/react/useWorkspaceUsers.js", () => ({
|
|
87
|
-
useWorkspaceUsers: fixtures.useWorkspaceUsers,
|
|
88
|
-
}));
|
|
89
80
|
vi.mock("../../../model/store/config/configSelectors.js", () => ({
|
|
90
81
|
selectExternalRecipient: () => "recipient@example.com",
|
|
91
82
|
selectIsEmbedded: () => false,
|
|
@@ -163,7 +154,6 @@ describe("ScheduledEmailConnector", () => {
|
|
|
163
154
|
fixtures.managementDialogProps = undefined;
|
|
164
155
|
fixtures.dialogProps = undefined;
|
|
165
156
|
fixtures.automationsError = undefined;
|
|
166
|
-
fixtures.useWorkspaceUsers.mockClear();
|
|
167
157
|
fixtures.seState.isScheduleEmailingDialogOpen = false;
|
|
168
158
|
fixtures.seState.isScheduleEmailingManagementDialogOpen = true;
|
|
169
159
|
});
|
|
@@ -200,16 +190,6 @@ describe("ScheduledEmailConnector", () => {
|
|
|
200
190
|
dashboard: undefined,
|
|
201
191
|
});
|
|
202
192
|
});
|
|
203
|
-
it("does not load workspace users when only the management dialog is open", () => {
|
|
204
|
-
render(_jsx(ScheduledEmailConnector, {}));
|
|
205
|
-
expect(fixtures.useWorkspaceUsers).not.toHaveBeenCalled();
|
|
206
|
-
});
|
|
207
|
-
it("loads workspace users when the create/edit dialog is open", () => {
|
|
208
|
-
fixtures.seState.isScheduleEmailingDialogOpen = true;
|
|
209
|
-
fixtures.seState.isScheduleEmailingManagementDialogOpen = false;
|
|
210
|
-
render(_jsx(ScheduledEmailConnector, {}));
|
|
211
|
-
expect(fixtures.useWorkspaceUsers).toHaveBeenCalled();
|
|
212
|
-
});
|
|
213
193
|
it("does not supply the deprecated data props to the create/edit dialog", () => {
|
|
214
194
|
fixtures.seState.isScheduleEmailingDialogOpen = true;
|
|
215
195
|
fixtures.seState.isScheduleEmailingManagementDialogOpen = false;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { type IAutomationMetadataObject, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget
|
|
2
|
-
import type { GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
1
|
+
import { type IAutomationMetadataObject, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type IWidget } from "@gooddata/sdk-model";
|
|
3
2
|
import type { IAlertingDialogContextValue } from "../../contexts/AlertingDialogContext.js";
|
|
4
3
|
export interface IUseBuildAlertingDialogContextOpts {
|
|
5
4
|
mode: "create" | "edit";
|
|
6
5
|
widget?: IWidget;
|
|
7
6
|
insight?: IInsight;
|
|
8
7
|
alertToEdit?: IAutomationMetadataObject;
|
|
9
|
-
users: IWorkspaceUser[];
|
|
10
|
-
usersError?: GoodDataSdkError;
|
|
11
8
|
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
12
9
|
isLoading: boolean;
|
|
13
10
|
}
|
package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildAlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"useBuildAlertingDialogContext.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EAEf,MAAM,qBAAqB,CAAC;AAmB7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAI3F,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,6BAA6B,CACzC,IAAI,EAAE,kCAAkC,GACzC,2BAA2B,CAoG7B"}
|
|
@@ -6,20 +6,19 @@ import { useDashboardSelector } from "../../../../model/react/DashboardStoreProv
|
|
|
6
6
|
import { selectExecutionResultEntities } from "../../../../model/store/executionResults/executionResultsSelectors.js";
|
|
7
7
|
import { selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectDashboardHiddenFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
8
8
|
import { selectDashboardId, selectEvaluationFrequency } from "../../../../model/store/meta/metaSelectors.js";
|
|
9
|
-
import {
|
|
10
|
-
import { selectEffectiveParameterValuesForWidget } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
9
|
+
import { selectEffectiveDashboardParametersForWidget, selectEffectiveParameterValuesForWidget, } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
11
10
|
import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
|
|
12
11
|
import { useCommandAsPromise, useDeleteAutomation } from "./useCommandAsPromise.js";
|
|
13
12
|
export function useBuildAlertingDialogContext(opts) {
|
|
14
|
-
const { mode, widget, insight, alertToEdit,
|
|
13
|
+
const { mode, widget, insight, alertToEdit, notificationChannels, isLoading } = opts;
|
|
15
14
|
const dashboardFilters = useDashboardSelector(selectAutomationDefaultSelectedFilters);
|
|
16
15
|
const hiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
|
|
17
16
|
const dashboardId = useDashboardSelector(selectDashboardId);
|
|
18
|
-
const widgetLocalIdToTabIdMap = useDashboardSelector(selectWidgetLocalIdToTabIdMap);
|
|
19
17
|
const executionResultEntities = useDashboardSelector(selectExecutionResultEntities);
|
|
20
18
|
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
21
19
|
const dashboardEvaluationFrequency = useDashboardSelector(selectEvaluationFrequency);
|
|
22
20
|
const parameterValues = useDashboardSelector(selectEffectiveParameterValuesForWidget(widget?.ref));
|
|
21
|
+
const dashboardParameters = useDashboardSelector(selectEffectiveDashboardParametersForWidget(widget?.ref));
|
|
23
22
|
const widgetTitle = useMemo(() => {
|
|
24
23
|
if (widget) {
|
|
25
24
|
return getWidgetTitle(widget);
|
|
@@ -61,17 +60,15 @@ export function useBuildAlertingDialogContext(opts) {
|
|
|
61
60
|
dashboardId,
|
|
62
61
|
dashboardFilters,
|
|
63
62
|
hiddenFilters,
|
|
64
|
-
widgetLocalIdToTabIdMap,
|
|
65
63
|
executionResultByRef,
|
|
66
64
|
parameterValues,
|
|
65
|
+
dashboardParameters,
|
|
67
66
|
commonDateFilterId,
|
|
68
67
|
dashboardEvaluationFrequency,
|
|
69
68
|
createAlert,
|
|
70
69
|
saveAlert,
|
|
71
70
|
deleteAlert,
|
|
72
71
|
alertToEdit,
|
|
73
|
-
users,
|
|
74
|
-
usersError,
|
|
75
72
|
notificationChannels,
|
|
76
73
|
isLoading,
|
|
77
74
|
}), [
|
|
@@ -82,17 +79,15 @@ export function useBuildAlertingDialogContext(opts) {
|
|
|
82
79
|
dashboardId,
|
|
83
80
|
dashboardFilters,
|
|
84
81
|
hiddenFilters,
|
|
85
|
-
widgetLocalIdToTabIdMap,
|
|
86
82
|
executionResultByRef,
|
|
87
83
|
parameterValues,
|
|
84
|
+
dashboardParameters,
|
|
88
85
|
commonDateFilterId,
|
|
89
86
|
dashboardEvaluationFrequency,
|
|
90
87
|
createAlert,
|
|
91
88
|
saveAlert,
|
|
92
89
|
deleteAlert,
|
|
93
90
|
alertToEdit,
|
|
94
|
-
users,
|
|
95
|
-
usersError,
|
|
96
91
|
notificationChannels,
|
|
97
92
|
isLoading,
|
|
98
93
|
]);
|