@gooddata/sdk-ui-dashboard 11.45.0 → 11.46.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.d.ts +38 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.d.ts.map +1 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.js +39 -0
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +7 -12
- package/package.json +21 -21
package/esm/__version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.
|
|
1
|
+
export declare const LIB_VERSION = "11.46.0-alpha.0";
|
|
2
2
|
export declare const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
3
3
|
export declare const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
4
4
|
//# sourceMappingURL=__version.d.ts.map
|
package/esm/__version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C,eAAO,MAAM,eAAe,uCAAuC,CAAC;AAEpE,eAAO,MAAM,QAAQ,+BAA+B,CAAC"}
|
package/esm/__version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2021 GoodData Corporation
|
|
2
2
|
// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
|
|
3
|
-
export const LIB_VERSION = "11.
|
|
3
|
+
export const LIB_VERSION = "11.46.0-alpha.0";
|
|
4
4
|
export const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
5
5
|
export const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type IAutomationMetadataObjectDefinition, type INotificationChannelIdentifier, type INotificationChannelMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
+
import { type AlertAttribute, type AlertMetric } from "../../types.js";
|
|
3
|
+
import { getAlertAiOperator, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity } from "../utils/getters.js";
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link useAlertSelectedValues}.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface IUseAlertSelectedValuesProps {
|
|
9
|
+
editedAutomation: IAutomationMetadataObjectDefinition | undefined;
|
|
10
|
+
supportedMeasures: AlertMetric[];
|
|
11
|
+
supportedAttributes: AlertAttribute[];
|
|
12
|
+
notificationChannels: INotificationChannelIdentifier[] | INotificationChannelMetadataObject[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pure selector hook that derives the currently-selected values from the edited automation draft.
|
|
16
|
+
*
|
|
17
|
+
* No memoization is intentionally added — values are recomputed on every render to preserve the
|
|
18
|
+
* referential behaviour of the original inline code in `useEditAlert` (the returned objects flow
|
|
19
|
+
* into `useCallback` dep arrays and `useThresholdValue` args; memoizing them would be a behaviour
|
|
20
|
+
* change, not an optimisation). The hook therefore contains no internal React hooks.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function useAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels }: IUseAlertSelectedValuesProps): {
|
|
25
|
+
selectedMeasure: ReturnType<typeof getAlertMeasure>;
|
|
26
|
+
selectedComparisonOperator: ReturnType<typeof getAlertCompareOperator>;
|
|
27
|
+
selectedRelativeOperator: ReturnType<typeof getAlertRelativeOperator>;
|
|
28
|
+
selectedAiOperator: ReturnType<typeof getAlertAiOperator>;
|
|
29
|
+
selectedComparator: ReturnType<typeof getAlertComparison>;
|
|
30
|
+
selectedSensitivity: ReturnType<typeof getAlertSensitivity>;
|
|
31
|
+
selectedGranularity: ReturnType<typeof getAlertGranularity>;
|
|
32
|
+
selectedAttribute: AlertAttribute | undefined;
|
|
33
|
+
selectedValue: string | null | undefined;
|
|
34
|
+
selectedNotificationChannel: (INotificationChannelIdentifier | INotificationChannelMetadataObject) | undefined;
|
|
35
|
+
allowExternalRecipients: boolean;
|
|
36
|
+
allowOnlyLoggedUserRecipients: boolean;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=useAlertSelectedValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAlertSelectedValues.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAC1C,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACH,kBAAkB,EAElB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IACzC,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAClE,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;CACjG;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACvB,EAAE,4BAA4B,GAAG;IAC9B,eAAe,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACpD,0BAA0B,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;IACvE,wBAAwB,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;IACtE,kBAAkB,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC1D,kBAAkB,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC1D,mBAAmB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC5D,mBAAmB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC5D,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,2BAA2B,EACrB,CAAC,8BAA8B,GAAG,kCAAkC,CAAC,GACrE,SAAS,CAAC;IAChB,uBAAuB,EAAE,OAAO,CAAC;IACjC,6BAA6B,EAAE,OAAO,CAAC;CAC1C,CAkCA"}
|
package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useAlertSelectedValues.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, } from "../utils/getters.js";
|
|
3
|
+
/**
|
|
4
|
+
* Pure selector hook that derives the currently-selected values from the edited automation draft.
|
|
5
|
+
*
|
|
6
|
+
* No memoization is intentionally added — values are recomputed on every render to preserve the
|
|
7
|
+
* referential behaviour of the original inline code in `useEditAlert` (the returned objects flow
|
|
8
|
+
* into `useCallback` dep arrays and `useThresholdValue` args; memoizing them would be a behaviour
|
|
9
|
+
* change, not an optimisation). The hook therefore contains no internal React hooks.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export function useAlertSelectedValues({ editedAutomation, supportedMeasures, supportedAttributes, notificationChannels, }) {
|
|
14
|
+
const selectedMeasure = getAlertMeasure(supportedMeasures, editedAutomation?.alert);
|
|
15
|
+
const selectedComparisonOperator = getAlertCompareOperator(editedAutomation?.alert);
|
|
16
|
+
const selectedRelativeOperator = getAlertRelativeOperator(editedAutomation?.alert);
|
|
17
|
+
const selectedAiOperator = getAlertAiOperator(editedAutomation?.alert);
|
|
18
|
+
const selectedComparator = getAlertComparison(selectedMeasure, editedAutomation?.alert);
|
|
19
|
+
const selectedSensitivity = getAlertSensitivity(editedAutomation?.alert);
|
|
20
|
+
const selectedGranularity = getAlertGranularity(editedAutomation?.alert);
|
|
21
|
+
const [selectedAttribute, selectedValue] = getAlertAttribute(supportedAttributes, editedAutomation);
|
|
22
|
+
const selectedNotificationChannel = notificationChannels.find((channel) => channel.id === editedAutomation?.notificationChannel);
|
|
23
|
+
const allowExternalRecipients = selectedNotificationChannel?.allowedRecipients === "external";
|
|
24
|
+
const allowOnlyLoggedUserRecipients = selectedNotificationChannel?.allowedRecipients === "creator";
|
|
25
|
+
return {
|
|
26
|
+
selectedMeasure,
|
|
27
|
+
selectedComparisonOperator,
|
|
28
|
+
selectedRelativeOperator,
|
|
29
|
+
selectedAiOperator,
|
|
30
|
+
selectedComparator,
|
|
31
|
+
selectedSensitivity,
|
|
32
|
+
selectedGranularity,
|
|
33
|
+
selectedAttribute,
|
|
34
|
+
selectedValue,
|
|
35
|
+
selectedNotificationChannel,
|
|
36
|
+
allowExternalRecipients,
|
|
37
|
+
allowOnlyLoggedUserRecipients,
|
|
38
|
+
};
|
|
39
|
+
}
|
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":"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;AAiB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;
|
|
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;AAiB7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAoBvG,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0lBpB"}
|
|
@@ -11,9 +11,9 @@ import { useAutomationAlertParameters } from "../../../shared/automationFilters/
|
|
|
11
11
|
import { getAppliedWidgetFilters, getVisibleFiltersByFilters, resolveMvfDimensionalityLocalRefs, } from "../../../shared/automationFilters/utils.js";
|
|
12
12
|
import { convertCurrentUserToAutomationRecipient, convertCurrentUserToWorkspaceUser, convertExternalRecipientToAutomationRecipient, } from "../../../shared/utils/automationUtils.js";
|
|
13
13
|
import { createDefaultAlert } from "../utils/convertors.js";
|
|
14
|
-
import { getAlertAiOperator, getAlertAttribute, getAlertCompareOperator, getAlertComparison, getAlertGranularity, getAlertMeasure, getAlertRelativeOperator, getAlertSensitivity, } from "../utils/getters.js";
|
|
15
14
|
import { isAlertValueDefined } from "../utils/guards.js";
|
|
16
15
|
import { transformAlertByAnomalyDetection, transformAlertByAttribute, transformAlertByComparisonOperator, transformAlertByDestination, transformAlertByGranularity, transformAlertByMetric, transformAlertByRelativeOperator, transformAlertBySensitivity, transformAlertByValue, } from "../utils/transformation.js";
|
|
16
|
+
import { useAlertSelectedValues } from "./useAlertSelectedValues.js";
|
|
17
17
|
import { useAlertSupportedMetrics } from "./useAlertSupportedMetrics.js";
|
|
18
18
|
import { useAlertValidation } from "./useAlertValidation.js";
|
|
19
19
|
import { useThresholdValue } from "./useThresholdValue.js";
|
|
@@ -80,17 +80,12 @@ export function useEditAlert({ alertToEdit, notificationChannels, insight, widge
|
|
|
80
80
|
//
|
|
81
81
|
// Selected values
|
|
82
82
|
//
|
|
83
|
-
const selectedMeasure =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const selectedGranularity = getAlertGranularity(editedAutomation?.alert);
|
|
90
|
-
const [selectedAttribute, selectedValue] = getAlertAttribute(supportedAttributes, editedAutomation);
|
|
91
|
-
const selectedNotificationChannel = notificationChannels.find((channel) => channel.id === editedAutomation?.notificationChannel);
|
|
92
|
-
const allowExternalRecipients = selectedNotificationChannel?.allowedRecipients === "external";
|
|
93
|
-
const allowOnlyLoggedUserRecipients = selectedNotificationChannel?.allowedRecipients === "creator";
|
|
83
|
+
const { selectedMeasure, selectedComparisonOperator, selectedRelativeOperator, selectedAiOperator, selectedComparator, selectedSensitivity, selectedGranularity, selectedAttribute, selectedValue, selectedNotificationChannel, allowExternalRecipients, allowOnlyLoggedUserRecipients, } = useAlertSelectedValues({
|
|
84
|
+
editedAutomation,
|
|
85
|
+
supportedMeasures,
|
|
86
|
+
supportedAttributes,
|
|
87
|
+
notificationChannels,
|
|
88
|
+
});
|
|
94
89
|
const { isValid: isOriginalAutomationValid, invalidityReason } = useAlertValidation(originalAutomation, widget, insight, catalogDateDatasets, undefined);
|
|
95
90
|
const isParentValid = invalidityReason !== "missingWidget";
|
|
96
91
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.46.0-alpha.0",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"ts-invariant": "0.10.3",
|
|
61
61
|
"tslib": "2.8.1",
|
|
62
62
|
"uuid": "11.1.1",
|
|
63
|
-
"@gooddata/sdk-backend-
|
|
64
|
-
"@gooddata/sdk-backend-
|
|
65
|
-
"@gooddata/sdk-
|
|
66
|
-
"@gooddata/sdk-ui
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-ui-
|
|
69
|
-
"@gooddata/sdk-ui-
|
|
70
|
-
"@gooddata/sdk-
|
|
71
|
-
"@gooddata/sdk-ui-
|
|
72
|
-
"@gooddata/sdk-ui-pivot": "11.
|
|
73
|
-
"@gooddata/sdk-ui-semantic-search": "11.
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/util": "11.
|
|
63
|
+
"@gooddata/sdk-backend-spi": "11.46.0-alpha.0",
|
|
64
|
+
"@gooddata/sdk-backend-base": "11.46.0-alpha.0",
|
|
65
|
+
"@gooddata/sdk-model": "11.46.0-alpha.0",
|
|
66
|
+
"@gooddata/sdk-ui": "11.46.0-alpha.0",
|
|
67
|
+
"@gooddata/sdk-ui-charts": "11.46.0-alpha.0",
|
|
68
|
+
"@gooddata/sdk-ui-ext": "11.46.0-alpha.0",
|
|
69
|
+
"@gooddata/sdk-ui-filters": "11.46.0-alpha.0",
|
|
70
|
+
"@gooddata/sdk-ui-geo": "11.46.0-alpha.0",
|
|
71
|
+
"@gooddata/sdk-ui-kit": "11.46.0-alpha.0",
|
|
72
|
+
"@gooddata/sdk-ui-pivot": "11.46.0-alpha.0",
|
|
73
|
+
"@gooddata/sdk-ui-semantic-search": "11.46.0-alpha.0",
|
|
74
|
+
"@gooddata/sdk-ui-theme-provider": "11.46.0-alpha.0",
|
|
75
|
+
"@gooddata/sdk-ui-vis-commons": "11.46.0-alpha.0",
|
|
76
|
+
"@gooddata/util": "11.46.0-alpha.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -119,12 +119,12 @@
|
|
|
119
119
|
"typescript": "5.9.3",
|
|
120
120
|
"vitest": "4.1.8",
|
|
121
121
|
"vitest-dom": "0.1.1",
|
|
122
|
-
"@gooddata/eslint-config": "11.
|
|
123
|
-
"@gooddata/i18n-toolkit": "11.
|
|
124
|
-
"@gooddata/oxlint-config": "11.
|
|
125
|
-
"@gooddata/reference-workspace": "11.
|
|
126
|
-
"@gooddata/sdk-backend-mockingbird": "11.
|
|
127
|
-
"@gooddata/stylelint-config": "11.
|
|
122
|
+
"@gooddata/eslint-config": "11.46.0-alpha.0",
|
|
123
|
+
"@gooddata/i18n-toolkit": "11.46.0-alpha.0",
|
|
124
|
+
"@gooddata/oxlint-config": "11.46.0-alpha.0",
|
|
125
|
+
"@gooddata/reference-workspace": "11.46.0-alpha.0",
|
|
126
|
+
"@gooddata/sdk-backend-mockingbird": "11.46.0-alpha.0",
|
|
127
|
+
"@gooddata/stylelint-config": "11.46.0-alpha.0"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"react": "^18.0.0 || ^19.0.0",
|