@gooddata/sdk-ui-dashboard 11.36.0-alpha.3 → 11.36.0-alpha.7
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 +74 -162
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +5 -13
- package/esm/index.js +2 -10
- package/esm/internal.d.ts +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +24 -1
- package/esm/model/commandHandlers/dashboard/common/parameterHydration.d.ts +7 -1
- package/esm/model/commandHandlers/dashboard/common/parameterHydration.js +16 -2
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +4 -2
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts +7 -1
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.js +80 -4
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +10 -0
- package/esm/model/commandHandlers/filterContext/filterViewParameters.d.ts +7 -0
- package/esm/model/commandHandlers/filterContext/filterViewParameters.js +11 -0
- package/esm/model/store/config/configSelectors.d.ts +0 -12
- package/esm/model/store/config/configSelectors.js +2 -18
- package/esm/model/store/tabs/index.d.ts +4 -0
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts +11 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +16 -8
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.js +17 -0
- package/esm/model/store/widgetDrills/widgetDrillSelectors.js +10 -18
- package/esm/model/types/commonTypes.d.ts +11 -2
- package/esm/model/utils/measureValueFilterUtils.d.ts +14 -0
- package/esm/model/utils/measureValueFilterUtils.js +21 -0
- package/esm/presentation/alerting/DefaultAlertingDialog/{DefaultAlertingDialogNew.d.ts → DefaultAlertingDialog.d.ts} +1 -1
- package/esm/presentation/alerting/DefaultAlertingDialog/{DefaultAlertingDialogNew.js → DefaultAlertingDialog.js} +6 -12
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelect.js +43 -9
- package/esm/presentation/alerting/DefaultAlertingDialog/hooks/useSaveAlertToBackend.js +13 -25
- package/esm/presentation/alerting/DefaultAlertingDialog/utils/items.js +5 -2
- package/esm/presentation/alerting/types.d.ts +1 -72
- package/esm/presentation/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts +1 -2
- package/esm/presentation/automationFilters/hooks/useValidateExistingAutomationFilters.js +5 -5
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.js +1 -8
- package/esm/presentation/dashboard/DashboardHeader/ScheduledEmailDialogProvider.js +17 -8
- package/esm/presentation/dashboard/DashboardHeader/ShareDialogDashboardHeader.js +5 -2
- package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +97 -13
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.d.ts +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.js +3 -3
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/DashboardParametersSection.d.ts +3 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/DashboardParametersSection.js +17 -4
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/InsightParametersSection.d.ts +4 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/InsightParametersSection.js +37 -4
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/Parameter.d.ts +4 -3
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/Parameter.js +3 -4
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +1 -3
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.js +1 -5
- package/esm/presentation/export/DefaultDashboardExportVariables.js +5 -2
- package/esm/presentation/export/hooks/useDashboardRelatedFilters.d.ts +2 -1
- package/esm/presentation/export/hooks/useDashboardRelatedFilters.js +9 -0
- package/esm/presentation/export/types.d.ts +2 -1
- package/esm/presentation/export/types.js +1 -1
- package/esm/presentation/export/useExportData.js +4 -0
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +4 -1
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js +4 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +4 -10
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -36
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -36
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +4 -10
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +4 -10
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +3 -9
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +3 -9
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +3 -9
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +26 -59
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +2 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +22 -104
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js +12 -33
- package/esm/presentation/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts +3 -0
- package/esm/presentation/scheduledEmail/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/scheduledEmail/types.d.ts +1 -7
- package/esm/presentation/scheduledEmail/utils/filters.d.ts +2 -0
- package/esm/presentation/scheduledEmail/utils/filters.js +5 -0
- package/esm/presentation/shareDialog/DefaultShareDialog.d.ts +1 -1
- package/esm/presentation/shareDialog/DefaultShareDialog.js +2 -2
- package/esm/presentation/shareDialog/types.d.ts +5 -1
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.d.ts +2 -2
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.js +36 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +3 -6
- package/esm/presentation/widget/insight/configuration/InsightAlerts.js +1 -9
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigPanel/useInsightDrillConfigPanel.js +4 -10
- package/esm/sdk-ui-dashboard.d.ts +31 -249
- package/package.json +20 -20
- package/esm/model/react/filtering/shared.d.ts +0 -6
- package/esm/model/react/filtering/shared.js +0 -38
- package/esm/model/react/filtering/useAutomationAvailableDashboardFilters.d.ts +0 -13
- package/esm/model/react/filtering/useAutomationAvailableDashboardFilters.js +0 -54
- package/esm/model/react/filtering/useDashboardScheduledExportFilters.d.ts +0 -19
- package/esm/model/react/filtering/useDashboardScheduledExportFilters.js +0 -18
- package/esm/model/react/filtering/useScheduledExportFilters.d.ts +0 -26
- package/esm/model/react/filtering/useScheduledExportFilters.js +0 -23
- package/esm/model/react/filtering/useWidgetAlertFilters.d.ts +0 -33
- package/esm/model/react/filtering/useWidgetAlertFilters.js +0 -48
- package/esm/model/react/filtering/useWidgetScheduledExportFilters.d.ts +0 -33
- package/esm/model/react/filtering/useWidgetScheduledExportFilters.js +0 -48
- package/esm/model/react/useDashboardAlerting/useEnableAutomationFilterContext.d.ts +0 -4
- package/esm/model/react/useDashboardAlerting/useEnableAutomationFilterContext.js +0 -20
- package/esm/model/react/useDashboardAlertsOld.d.ts +0 -32
- package/esm/model/react/useDashboardAlertsOld.js +0 -141
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialogOld.d.ts +0 -5
- package/esm/presentation/alerting/DefaultAlertingDialog/DefaultAlertingDialogOld.js +0 -36
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelectOld.d.ts +0 -17
- package/esm/presentation/alerting/DefaultAlertingDialog/components/AlertAttributeSelectOld.js +0 -103
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogOld.d.ts +0 -5
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogOld.js +0 -53
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertOld.d.ts +0 -9
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertOld.js +0 -84
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.d.ts +0 -11
- package/esm/presentation/alerting/DefaultAlertingManagementDialog/components/AlertsListOld.js +0 -16
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderOld.d.ts +0 -1
- package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProviderOld.js +0 -12
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFilters.d.ts +0 -29
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFilters.js +0 -61
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFiltersList.d.ts +0 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentFiltersList.js +0 -12
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentItems.d.ts +0 -17
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentItems.js +0 -68
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentsWrapper.d.ts +0 -4
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/AttachmentsWrapper.js +0 -6
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/DashboardAttachments.d.ts +0 -15
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/DashboardAttachments.js +0 -42
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/WidgetAttachments.d.ts +0 -18
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/AttachmentsOld/WidgetAttachments.js +0 -25
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/types.d.ts +0 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/types.js +0 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertsOld.d.ts +0 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertsOld.js +0 -43
|
@@ -3,4 +3,4 @@ import { type IShareDialogProps } from "./types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* @alpha
|
|
5
5
|
*/
|
|
6
|
-
export declare function DefaultShareDialog({ workspace, backend, isVisible, sharedObject, currentUser, isLockingSupported, isCurrentUserWorkspaceManager, currentUserPermissions, dashboardFilters, isShareGrantHidden, applyShareGrantOnSelect, showDashboardShareLink, isGranteeShareLoading, onApply, onCancel, onError, onInteraction, onShareLinkCopy }: IShareDialogProps): ReactElement | null;
|
|
6
|
+
export declare function DefaultShareDialog({ workspace, backend, isVisible, sharedObject, currentUser, isLockingSupported, isCurrentUserWorkspaceManager, currentUserPermissions, dashboardFilters, dashboardParameters, isShareGrantHidden, applyShareGrantOnSelect, showDashboardShareLink, isGranteeShareLoading, onApply, onCancel, onError, onInteraction, onShareLinkCopy }: IShareDialogProps): ReactElement | null;
|
|
@@ -8,7 +8,7 @@ import { selectLocale } from "../../model/store/config/configSelectors.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* @alpha
|
|
10
10
|
*/
|
|
11
|
-
export function DefaultShareDialog({ workspace, backend, isVisible, sharedObject, currentUser, isLockingSupported, isCurrentUserWorkspaceManager, currentUserPermissions, dashboardFilters, isShareGrantHidden, applyShareGrantOnSelect, showDashboardShareLink, isGranteeShareLoading, onApply, onCancel, onError, onInteraction, onShareLinkCopy, }) {
|
|
11
|
+
export function DefaultShareDialog({ workspace, backend, isVisible, sharedObject, currentUser, isLockingSupported, isCurrentUserWorkspaceManager, currentUserPermissions, dashboardFilters, dashboardParameters, isShareGrantHidden, applyShareGrantOnSelect, showDashboardShareLink, isGranteeShareLoading, onApply, onCancel, onError, onInteraction, onShareLinkCopy, }) {
|
|
12
12
|
const locale = useDashboardSelector(selectLocale);
|
|
13
13
|
const intl = useIntl();
|
|
14
14
|
const labels = useMemo(() => ({
|
|
@@ -26,5 +26,5 @@ export function DefaultShareDialog({ workspace, backend, isVisible, sharedObject
|
|
|
26
26
|
if (!isVisible) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
return (_jsx(ShareDialog, { locale: locale, backend: backend, workspace: workspace, sharedObject: sharedObject, currentUser: currentUser, onApply: onApply, onCancel: onCancel, onError: onError, isLockingSupported: isLockingSupported, labels: labels, isCurrentUserWorkspaceManager: isCurrentUserWorkspaceManager, currentUserPermissions: currentUserPermissions, dashboardFilters: dashboardFilters, isShareGrantHidden: isShareGrantHidden, applyShareGrantOnSelect: applyShareGrantOnSelect, showDashboardShareLink: showDashboardShareLink, isGranteeShareLoading: isGranteeShareLoading, onInteraction: onInteraction, onShareLinkCopy: onShareLinkCopy }));
|
|
29
|
+
return (_jsx(ShareDialog, { locale: locale, backend: backend, workspace: workspace, sharedObject: sharedObject, currentUser: currentUser, onApply: onApply, onCancel: onCancel, onError: onError, isLockingSupported: isLockingSupported, labels: labels, isCurrentUserWorkspaceManager: isCurrentUserWorkspaceManager, currentUserPermissions: currentUserPermissions, dashboardFilters: dashboardFilters, dashboardParameters: dashboardParameters, isShareGrantHidden: isShareGrantHidden, applyShareGrantOnSelect: applyShareGrantOnSelect, showDashboardShareLink: showDashboardShareLink, isGranteeShareLoading: isGranteeShareLoading, onInteraction: onInteraction, onShareLinkCopy: onShareLinkCopy }));
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
2
|
import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
3
|
-
import { type FilterContextItem, type IUser } from "@gooddata/sdk-model";
|
|
3
|
+
import { type FilterContextItem, type IDashboardParameter, type IUser } from "@gooddata/sdk-model";
|
|
4
4
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
5
5
|
import { type CurrentUserPermissions, type IShareDialogInteractionData, type ISharedObject, type ISharingApplyPayload as ISharingDialogApplyPayload } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
/**
|
|
@@ -48,6 +48,10 @@ export interface IShareDialogProps {
|
|
|
48
48
|
* Dashboard filters
|
|
49
49
|
*/
|
|
50
50
|
dashboardFilters: FilterContextItem[];
|
|
51
|
+
/**
|
|
52
|
+
* Dashboard parameters
|
|
53
|
+
*/
|
|
54
|
+
dashboardParameters?: IDashboardParameter[];
|
|
51
55
|
/**
|
|
52
56
|
* Is share grant hidden?
|
|
53
57
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type IAttributeFilter, type IDashboardAttributeFilterConfig } from "@gooddata/sdk-model";
|
|
1
|
+
import { type IAttributeFilter, type IDashboardAttributeFilterConfig, type IDashboardMeasureValueFilter, type IMeasureValueFilter } from "@gooddata/sdk-model";
|
|
2
2
|
import { type UrlDrillTarget } from "../../../../drill/types.js";
|
|
3
|
-
export declare function useInvalidFilteringParametersIdentifiers(urlDrillTarget: UrlDrillTarget | undefined, insightFilters: IAttributeFilter[] | undefined, dashboardFilters: IAttributeFilter[] | undefined, attributeFilterConfigs: IDashboardAttributeFilterConfig[] | undefined): string[];
|
|
3
|
+
export declare function useInvalidFilteringParametersIdentifiers(urlDrillTarget: UrlDrillTarget | undefined, insightFilters: IAttributeFilter[] | undefined, dashboardFilters: IAttributeFilter[] | undefined, dashboardMeasureValueFilters: IDashboardMeasureValueFilter[] | undefined, insightMeasureValueFilters: IMeasureValueFilter[] | undefined, enableInsightMeasureValueFilters: boolean, attributeFilterConfigs: IDashboardAttributeFilterConfig[] | undefined): string[];
|
|
@@ -2,16 +2,20 @@
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { uniq } from "lodash-es";
|
|
4
4
|
import { areObjRefsEqual, filterObjRef, idRef, } from "@gooddata/sdk-model";
|
|
5
|
-
import { getDashboardAttributeFilterPlaceholdersFromUrl, getInsightAttributeFilterPlaceholdersFromUrl, } from "@gooddata/sdk-model/internal";
|
|
5
|
+
import { getDashboardAttributeFilterPlaceholdersFromUrl, getDashboardMeasureValueFilterPlaceholdersFromUrl, getInsightAttributeFilterPlaceholdersFromUrl, getInsightMeasureValueFilterPlaceholdersFromUrl, } from "@gooddata/sdk-model/internal";
|
|
6
6
|
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
7
|
-
import { selectAllCatalogDisplayFormsMap } from "../../../../../model/store/catalog/catalogSelectors.js";
|
|
7
|
+
import { selectAllCatalogDisplayFormsMap, selectAllCatalogMeasuresMap, } from "../../../../../model/store/catalog/catalogSelectors.js";
|
|
8
|
+
import { dashboardMeasureValueFilterMatchesIdentifier, insightMeasureValueFilterMatchesIdentifier, } from "../../../../../model/utils/measureValueFilterUtils.js";
|
|
8
9
|
import { isDrillToCustomUrlConfig } from "../../../../drill/types.js";
|
|
9
|
-
export function useInvalidFilteringParametersIdentifiers(urlDrillTarget, insightFilters, dashboardFilters, attributeFilterConfigs) {
|
|
10
|
+
export function useInvalidFilteringParametersIdentifiers(urlDrillTarget, insightFilters, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, enableInsightMeasureValueFilters, attributeFilterConfigs) {
|
|
10
11
|
const displayForms = useDashboardSelector(selectAllCatalogDisplayFormsMap);
|
|
12
|
+
const measures = useDashboardSelector(selectAllCatalogMeasuresMap);
|
|
11
13
|
return useMemo(() => {
|
|
12
14
|
if (isDrillToCustomUrlConfig(urlDrillTarget)) {
|
|
13
15
|
const dashboardAttributeFilterParameters = getDashboardAttributeFilterPlaceholdersFromUrl(urlDrillTarget.customUrl);
|
|
14
16
|
const insightAttributeFilterParameters = getInsightAttributeFilterPlaceholdersFromUrl(urlDrillTarget.customUrl);
|
|
17
|
+
const dashboardMeasureValueFilterParameters = getDashboardMeasureValueFilterPlaceholdersFromUrl(urlDrillTarget.customUrl);
|
|
18
|
+
const insightMeasureValueFilterParameters = getInsightMeasureValueFilterPlaceholdersFromUrl(urlDrillTarget.customUrl);
|
|
15
19
|
const invalidDashboardParameters = dashboardAttributeFilterParameters
|
|
16
20
|
.filter(({ identifier }) => {
|
|
17
21
|
// parameter is invalid if either it points to display form that no longer exists
|
|
@@ -40,8 +44,35 @@ export function useInvalidFilteringParametersIdentifiers(urlDrillTarget, insight
|
|
|
40
44
|
});
|
|
41
45
|
})
|
|
42
46
|
.map(({ identifier }) => identifier);
|
|
43
|
-
|
|
47
|
+
const invalidDashboardMvfParameters = dashboardMeasureValueFilterParameters
|
|
48
|
+
.filter(({ identifier }) => {
|
|
49
|
+
return !dashboardMeasureValueFilters?.some((filter) => dashboardMeasureValueFilterMatchesIdentifier(filter.dashboardMeasureValueFilter.measure, identifier, measures));
|
|
50
|
+
})
|
|
51
|
+
.map(({ identifier }) => identifier);
|
|
52
|
+
const invalidInsightMvfParameters = enableInsightMeasureValueFilters
|
|
53
|
+
? insightMeasureValueFilterParameters
|
|
54
|
+
.filter(({ identifier }) => {
|
|
55
|
+
return !insightMeasureValueFilters?.some((filter) => insightMeasureValueFilterMatchesIdentifier(filter.measureValueFilter.measure, identifier));
|
|
56
|
+
})
|
|
57
|
+
.map(({ identifier }) => identifier)
|
|
58
|
+
: insightMeasureValueFilterParameters.map(({ identifier }) => identifier);
|
|
59
|
+
return uniq([
|
|
60
|
+
...invalidDashboardParameters,
|
|
61
|
+
...invalidInsightParameters,
|
|
62
|
+
...invalidDashboardMvfParameters,
|
|
63
|
+
...invalidInsightMvfParameters,
|
|
64
|
+
]);
|
|
44
65
|
}
|
|
45
66
|
return [];
|
|
46
|
-
}, [
|
|
67
|
+
}, [
|
|
68
|
+
displayForms,
|
|
69
|
+
measures,
|
|
70
|
+
urlDrillTarget,
|
|
71
|
+
insightFilters,
|
|
72
|
+
dashboardFilters,
|
|
73
|
+
dashboardMeasureValueFilters,
|
|
74
|
+
insightMeasureValueFilters,
|
|
75
|
+
enableInsightMeasureValueFilters,
|
|
76
|
+
attributeFilterConfigs,
|
|
77
|
+
]);
|
|
47
78
|
}
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2022-2026 GoodData Corporation
|
|
3
3
|
import { FormattedMessage, defineMessages, useIntl } from "react-intl";
|
|
4
4
|
import { Bubble, BubbleHoverTrigger, Button, Input, Message, } from "@gooddata/sdk-ui-kit";
|
|
5
|
-
import {
|
|
5
|
+
import { AlertAttributeSelect } from "../../../../alerting/DefaultAlertingDialog/components/AlertAttributeSelect.js";
|
|
6
6
|
import { AlertComparisonOperatorSelect } from "../../../../alerting/DefaultAlertingDialog/components/AlertComparisonOperatorSelect.js";
|
|
7
7
|
import { AlertComparisonPeriodSelect } from "../../../../alerting/DefaultAlertingDialog/components/AlertComparisonPeriodSelect.js";
|
|
8
8
|
import { AlertDestinationSelect } from "../../../../alerting/DefaultAlertingDialog/components/AlertDestinationSelect.js";
|
|
@@ -72,7 +72,7 @@ export function EditAlert({ alert, execResult, isNewAlert, hasAlerts, destinatio
|
|
|
72
72
|
: intl.formatMessage({ id: "insightAlert.config.editAlert" }), onClose: onClose, onBack: hasAlerts ? onCancel : undefined, children: _jsxs("div", { className: "gd-edit-alert", children: [
|
|
73
73
|
_jsxs("div", { className: "gd-edit-alert__form", children: [
|
|
74
74
|
_jsxs("div", { className: "gd-edit-alert__form-content", children: [
|
|
75
|
-
_jsx("label", { htmlFor: "alert.measure", className: "gd-edit-alert__measure-label", children: _jsx(FormattedMessage, { id: "insightAlert.config.when" }) }), _jsx(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: changeMeasure, measures: measures, overlayPositionType: overlayPositionType, id: "alert.measure" }), Boolean(canManageAttributes) && (_jsx(_Fragment, { children: _jsx(
|
|
75
|
+
_jsx("label", { htmlFor: "alert.measure", className: "gd-edit-alert__measure-label", children: _jsx(FormattedMessage, { id: "insightAlert.config.when" }) }), _jsx(AlertMeasureSelect, { selectedMeasure: selectedMeasure, onMeasureChange: changeMeasure, measures: measures, overlayPositionType: overlayPositionType, id: "alert.measure" }), Boolean(canManageAttributes) && (_jsx(_Fragment, { children: _jsx(AlertAttributeSelect, { id: "alert.attribute", selectedAttribute: selectedAttribute, selectedValue: selectedValue, onAttributeChange: changeAttribute, attributes: attributes, catalogAttributes: catalogAttributes, catalogDateDatasets: catalogDateDatasets, getAttributeValues: getAttributeValues, isResultLoading: isResultLoading, showLabel: true, closeOnParentScroll: true }) })), showFilterInfo ? (_jsxs("div", { className: "gd-edit-alert__measure-info", children: [Boolean(selectedComparator?.granularity) && (_jsx(FormattedMessage, { tagName: "span", id: "insightAlert.config.for.filter", values: {
|
|
76
76
|
granularity: [
|
|
77
77
|
intl.formatMessage({ id: "granularity.this_keyword" }),
|
|
78
78
|
translateGranularity(intl, selectedComparator?.granularity),
|
|
@@ -6,7 +6,6 @@ import { useToastMessage } from "@gooddata/sdk-ui-kit";
|
|
|
6
6
|
import { convertCurrentUserToAutomationRecipient } from "../../../../../../_staging/automation/index.js";
|
|
7
7
|
import { refreshAutomations } from "../../../../../../model/commands/scheduledEmail.js";
|
|
8
8
|
import { useDashboardDispatch, useDashboardSelector, } from "../../../../../../model/react/DashboardStoreProvider.js";
|
|
9
|
-
import { useWidgetAlertFilters } from "../../../../../../model/react/filtering/useWidgetAlertFilters.js";
|
|
10
9
|
import { DEFAULT_MAX_AUTOMATIONS } from "../../../../../../model/react/useDashboardAutomations/constants.js";
|
|
11
10
|
import { useDashboardUserInteraction } from "../../../../../../model/react/useDashboardUserInteraction.js";
|
|
12
11
|
import { useWorkspaceUsers } from "../../../../../../model/react/useWorkspaceUsers.js";
|
|
@@ -27,6 +26,7 @@ import { messages } from "../../../../../alerting/DefaultAlertingDialog/messages
|
|
|
27
26
|
import { createDefaultAlert } from "../../../../../alerting/DefaultAlertingDialog/utils/convertors.js";
|
|
28
27
|
import { getMeasureFormatsFromExecution } from "../../../../../alerting/DefaultAlertingDialog/utils/getters.js";
|
|
29
28
|
import { getSupportedInsightAttributesByInsight, getSupportedInsightMeasuresByInsight, } from "../../../../../alerting/DefaultAlertingDialog/utils/items.js";
|
|
29
|
+
import { useWidgetAutomationFilters } from "../../../../../scheduledEmail/hooks/useWidgetAutomationFilters.js";
|
|
30
30
|
export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) => {
|
|
31
31
|
const { addSuccess, addError } = useToastMessage();
|
|
32
32
|
const { automationInteraction } = useDashboardUserInteraction();
|
|
@@ -98,10 +98,7 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
98
98
|
addError(messages.alertSaveError);
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
|
-
const { result: widgetFilters, status: widgetFiltersStatus } =
|
|
102
|
-
widget,
|
|
103
|
-
insight,
|
|
104
|
-
});
|
|
101
|
+
const { result: widgetFilters, status: widgetFiltersStatus } = useWidgetAutomationFilters(widget, insight);
|
|
105
102
|
const locale = useDashboardSelector(selectLocale);
|
|
106
103
|
const settings = useDashboardSelector(selectSettings);
|
|
107
104
|
const supportedAttributes = useMemo(() => getSupportedInsightAttributesByInsight(insight, catalogDateDatasets), [insight, catalogDateDatasets]);
|
|
@@ -163,11 +160,11 @@ export const useInsightWidgetAlerting = ({ widget, closeInsightWidgetMenu }) =>
|
|
|
163
160
|
defaultNotificationChannelId,
|
|
164
161
|
supportedMeasures,
|
|
165
162
|
widgetFilters,
|
|
166
|
-
widgetFiltersStatus,
|
|
167
163
|
addError,
|
|
168
164
|
currentUser,
|
|
169
165
|
users,
|
|
170
166
|
usersStatus,
|
|
167
|
+
widgetFiltersStatus,
|
|
171
168
|
measureFormatMap,
|
|
172
169
|
]);
|
|
173
170
|
useEffect(() => {
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2022-2026 GoodData Corporation
|
|
3
|
-
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
4
|
-
import { selectEnableAutomationFilterContext } from "../../../../model/store/config/configSelectors.js";
|
|
5
2
|
import { InsightAlertsNew } from "./InsightAlertsNew.js";
|
|
6
|
-
import { InsightAlertsOld } from "./InsightAlertsOld.js";
|
|
7
3
|
export function InsightAlerts({ widget, onClose, onGoBack }) {
|
|
8
|
-
|
|
9
|
-
if (enableAutomationFilters) {
|
|
10
|
-
return _jsx(InsightAlertsNew, { widget: widget, onClose: onClose, onGoBack: onGoBack });
|
|
11
|
-
}
|
|
12
|
-
return _jsx(InsightAlertsOld, { widget: widget, onClose: onClose, onGoBack: onGoBack });
|
|
4
|
+
return _jsx(InsightAlertsNew, { widget: widget, onClose: onClose, onGoBack: onGoBack });
|
|
13
5
|
}
|
|
@@ -8,7 +8,6 @@ import { addDrillDownForInsightWidget, modifyDrillDownForInsightWidget, modifyDr
|
|
|
8
8
|
import { useDashboardDispatch, useDashboardSelector, } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
9
9
|
import { selectAllowMultipleInteractionsPerAttributeAndMeasure, selectSupportsAttributeHierarchies, } from "../../../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
10
10
|
import { selectAllCatalogAttributeHierarchies } from "../../../../../model/store/catalog/catalogSelectors.js";
|
|
11
|
-
import { selectEnableImplicitDrillToUrl } from "../../../../../model/store/config/configSelectors.js";
|
|
12
11
|
import { selectDrillTargetsByWidgetRef } from "../../../../../model/store/drillTargets/drillTargetsSelectors.js";
|
|
13
12
|
import { selectInsightByRef } from "../../../../../model/store/insights/insightsSelectors.js";
|
|
14
13
|
import { selectWidgetByRef } from "../../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
@@ -22,7 +21,7 @@ const messages = defineMessages({
|
|
|
22
21
|
added: { id: "messages.drill.InteractionConfiguredSuccess" },
|
|
23
22
|
modified: { id: "messages.drill.InteractionUpdatedSuccess" },
|
|
24
23
|
});
|
|
25
|
-
const mergeDrillConfigItems = (drillConfigItems, globalDrillDownItems, drillToUrlItems, incompleteItems
|
|
24
|
+
const mergeDrillConfigItems = (drillConfigItems, globalDrillDownItems, drillToUrlItems, incompleteItems) => {
|
|
26
25
|
return incompleteItems.reduce((acc, incompleteItem) => {
|
|
27
26
|
const found = acc.findIndex((item) => item.localIdentifier === incompleteItem.localIdentifier);
|
|
28
27
|
if (found === -1) {
|
|
@@ -34,11 +33,7 @@ const mergeDrillConfigItems = (drillConfigItems, globalDrillDownItems, drillToUr
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
return acc;
|
|
37
|
-
}, [
|
|
38
|
-
...(globalDrillDownItems ?? []),
|
|
39
|
-
...(enableImplicitDrillToUrl ? (drillToUrlItems ?? []) : []),
|
|
40
|
-
...(drillConfigItems ?? []),
|
|
41
|
-
]);
|
|
36
|
+
}, [...(globalDrillDownItems ?? []), ...(drillToUrlItems ?? []), ...(drillConfigItems ?? [])]);
|
|
42
37
|
};
|
|
43
38
|
const getUnusedDrillTargets = (availableDrillTargets, mergedItems, allowMultipleInteractionsPerAttributeAndMeasure, supportsAttributeHierarchies) => {
|
|
44
39
|
if (allowMultipleInteractionsPerAttributeAndMeasure && supportsAttributeHierarchies) {
|
|
@@ -65,7 +60,6 @@ export const useInsightDrillConfigPanel = (props) => {
|
|
|
65
60
|
const widget = useDashboardSelector(selectWidgetByRef(widgetRef));
|
|
66
61
|
invariant(isInsightWidget(widget), "must be insight widget");
|
|
67
62
|
const insight = useDashboardSelector(selectInsightByRef(widget.insight));
|
|
68
|
-
const enableImplicitDrillToUrl = useDashboardSelector(selectEnableImplicitDrillToUrl);
|
|
69
63
|
const { drills: widgetDrills } = widget;
|
|
70
64
|
const { incompleteItems, deleteIncompleteItem, onChangeItem, onOriginSelect, completeItem, isItemNew } = useIncompleteItems({ widgetDrills });
|
|
71
65
|
const { addSuccess } = useToastMessage();
|
|
@@ -96,8 +90,8 @@ export const useInsightDrillConfigPanel = (props) => {
|
|
|
96
90
|
: [];
|
|
97
91
|
}, [widgetDrillToUrls, availableDrillTargets, widget]);
|
|
98
92
|
const mergedItems = useMemo(() => {
|
|
99
|
-
return mergeDrillConfigItems(drillItems, globalDrillDownItems, drillToUrlItems, incompleteItems
|
|
100
|
-
}, [drillItems, globalDrillDownItems, drillToUrlItems, incompleteItems
|
|
93
|
+
return mergeDrillConfigItems(drillItems, globalDrillDownItems, drillToUrlItems, incompleteItems);
|
|
94
|
+
}, [drillItems, globalDrillDownItems, drillToUrlItems, incompleteItems]);
|
|
101
95
|
const { activeDrillItemLocalId } = useDrillFiltersSubview();
|
|
102
96
|
const selectedDrillItem = useMemo(() => mergedItems.find((item) => item.localIdentifier === activeDrillItemLocalId), [activeDrillItemLocalId, mergedItems]);
|
|
103
97
|
const originSelectorItems = useMemo(() => getUnusedDrillTargets(availableDrillTargets, mergedItems, allowMultipleInteractionsPerAttributeAndMeasure, supportsAttributeHierarchies), [
|