@gooddata/sdk-ui-dashboard 11.43.0-alpha.0 → 11.43.0-alpha.2
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 +130 -130
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +3 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.js +10 -5
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.js +22 -4
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.js +3 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts +2 -2
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.js +36 -3
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.js +3 -1
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts +4 -0
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts.map +1 -1
- package/esm/model/store/executionResults/executionResultsSelectors.js +4 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts +1 -30
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.js +3 -0
- package/esm/model/store/filtering/types.d.ts +33 -0
- package/esm/model/store/filtering/types.d.ts.map +1 -0
- package/esm/model/store/filtering/types.js +2 -0
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.d.ts +14 -0
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js +35 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +12 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +37 -12
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +10 -5
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.js +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts +3 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +110 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts +2 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +99 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.d.ts +4 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +42 -2
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +8 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts +2 -3
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.js +4 -45
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.js +9 -16
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts +2 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts.map +1 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +131 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.js +4 -6
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.js +3 -4
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +4 -10
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +3 -28
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.js +2 -5
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.d.ts +10 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.js +89 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.d.ts +34 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.js +261 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.d.ts +12 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.js +437 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts +3 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.js +14 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.d.ts +3 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.js +7 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.d.ts +3 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.js +6 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts +4 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.js +19 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts +13 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +196 -0
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts +24 -0
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/utils/automationUtils.js +135 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts +4 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.js +67 -0
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +11 -13
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.js +34 -16
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.js +23 -8
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +17 -6
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +11 -20
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/Insight/DashboardInsight.js +3 -4
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogExportDropdown.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogExportDropdown.js +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +11 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useCreateAlert.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useUpdateAlert.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.d.ts +4 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js +2 -2
- package/esm/presentation/widget/insightMenu/types.js +1 -1
- package/esm/presentation/widget/widget/warningPartialResult/InsightWidgetWarningPartialResult.d.ts.map +1 -1
- package/esm/presentation/widget/widget/warningPartialResult/InsightWidgetWarningPartialResult.js +1 -1
- package/esm/sdk-ui-dashboard.d.ts +11 -2
- package/esm/tsdoc-metadata.json +1 -1
- package/package.json +20 -20
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useCreateAlert.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useSaveAlertToBackend.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useUpdateAlert.d.ts.map +0 -1
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useCreateAlert.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useCreateAlert.js +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useSaveAlertToBackend.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useSaveAlertToBackend.js +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useUpdateAlert.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useUpdateAlert.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,WAAW,EACX,SAAS,EACT,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IACzC,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,qBAAqB,EAAE,CAAC;IACnE,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,wBAAwB,GAAG,SAAS,CAAC;CAC7E;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,uBAAuB,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAChE,sBAAsB,EAAE,+BAA+B,EA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["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultScheduledEmailDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.tsx"],"names":[],"mappings":"AAmEA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAgE9D,wBAAgB,2BAA2B,CAAC,EACxC,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,QAAQ,EACR,eAAe,EACf,aAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACZ,EAAE,0BAA0B,2CA0kB5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,2CAW5E"}
|
|
@@ -17,6 +17,8 @@ import { selectExecutionTimestamp } from "../../../../model/store/ui/uiSelectors
|
|
|
17
17
|
import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
|
|
18
18
|
import { DASHBOARD_DIALOG_OVERS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
19
19
|
import { IntlWrapper } from "../../../localization/IntlWrapper.js";
|
|
20
|
+
import { useBuildAutomationsContext } from "../../connectors/hooks/useBuildAutomationsContext.js";
|
|
21
|
+
import { AutomationsContextProvider } from "../../contexts/AutomationsContext.js";
|
|
20
22
|
import { ApplyCurrentFiltersConfirmDialog } from "../../shared/automationFilters/components/ApplyLatestFiltersConfirmDialog.js";
|
|
21
23
|
import { AutomationFiltersSelect } from "../../shared/automationFilters/components/AutomationFiltersSelect.js";
|
|
22
24
|
import { useValidateExistingAutomationFilters } from "../../shared/automationFilters/hooks/useValidateExistingAutomationFilters.js";
|
|
@@ -243,11 +245,15 @@ export function ScheduledMailDialogRenderer({ scheduledExportToEdit, users, user
|
|
|
243
245
|
*/
|
|
244
246
|
export function DefaultScheduledEmailDialog(props) {
|
|
245
247
|
const { isLoading, onCancel, scheduledExportToEdit } = props;
|
|
246
|
-
const locale = useDashboardSelector(selectLocale);
|
|
247
248
|
if (isLoading) {
|
|
248
249
|
return (_jsx(DefaultLoadingScheduledEmailDialog, { onCancel: onCancel, scheduledExportToEdit: scheduledExportToEdit }));
|
|
249
250
|
}
|
|
250
|
-
return
|
|
251
|
+
return _jsx(DefaultScheduledEmailDialogBody, { ...props });
|
|
252
|
+
}
|
|
253
|
+
function DefaultScheduledEmailDialogBody(props) {
|
|
254
|
+
const locale = useDashboardSelector(selectLocale);
|
|
255
|
+
const automationsContext = useBuildAutomationsContext();
|
|
256
|
+
return (_jsx(AutomationsContextProvider, { value: automationsContext, children: _jsx(IntlWrapper, { locale: locale, children: _jsx(ScheduledMailDialogRenderer, { ...props }) }) }));
|
|
251
257
|
}
|
|
252
258
|
function useDefaultScheduledEmailDialogData() {
|
|
253
259
|
const locale = useDashboardSelector(selectLocale);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DashboardAttachmentType, type FilterContextItem, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationRecipient, type IAutomationVisibleFilter, type IDashboardExportParameter, type IExportDefinitionVisualizationObjectSettings, type IFilter, type IInsight, type INotificationChannelIdentifier, type INotificationChannelMetadataObject, type WidgetAttachmentType } from "@gooddata/sdk-model";
|
|
2
|
-
import {
|
|
2
|
+
import type { IAutomationFiltersTab } from "../../../../../model/store/filtering/types.js";
|
|
3
3
|
import { type ExtendedDashboardWidget } from "../../../../../model/types/layoutTypes.js";
|
|
4
4
|
export interface IUseEditScheduledEmailProps {
|
|
5
5
|
scheduledExportToEdit?: IAutomationMetadataObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditScheduledEmail.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.ts"],"names":[],"mappings":"AAOA,OAAO,EAGH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAE9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,oBAAoB,EAU5B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditScheduledEmail.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.ts"],"names":[],"mappings":"AAOA,OAAO,EAGH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAE9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAE9B,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,oBAAoB,EAU5B,MAAM,qBAAqB,CAAC;AAqB7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAM3F,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAmBzF,MAAM,WAAW,2BAA2B;IACxC,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,uBAA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|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function useWidgetAutomationFilters(widget?: FilterableDashboardWidget, insight?: IInsightDefinition): import("../../../../index.js").QueryProcessingState<IFilter[]>;
|
|
1
|
+
import { useWidgetAutomationFilters as useWidgetAutomationFiltersCanonical } from "../../connectors/hooks/useWidgetAutomationFilters.js";
|
|
2
|
+
export declare const useWidgetAutomationFilters: typeof useWidgetAutomationFiltersCanonical;
|
|
4
3
|
//# sourceMappingURL=useWidgetAutomationFilters.d.ts.map
|
package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useWidgetAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,IAAI,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAIzI,eAAO,MAAM,0BAA0B,4CAAsC,CAAC"}
|
|
@@ -1,46 +1,5 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { selectCrossFilteringItems } from "../../../../model/store/drill/drillSelectors.js";
|
|
7
|
-
export function useWidgetAutomationFilters(widget, insight) {
|
|
8
|
-
const widgetFiltersQuery = useWidgetFilters(widget, insight);
|
|
9
|
-
const crossFilteringItems = useDashboardSelector(selectCrossFilteringItems);
|
|
10
|
-
return useMemo(() => {
|
|
11
|
-
const { result: widgetFilters, status: widgetFiltersStatus } = widgetFiltersQuery;
|
|
12
|
-
const sanitizedWidgetFilters = widgetFilters
|
|
13
|
-
? sanitizeWidgetFilters(widgetFilters, crossFilteringItems)
|
|
14
|
-
: undefined;
|
|
15
|
-
if (widgetFiltersStatus === "success" && sanitizedWidgetFilters) {
|
|
16
|
-
return {
|
|
17
|
-
...widgetFiltersQuery,
|
|
18
|
-
result: sanitizedWidgetFilters,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return widgetFiltersQuery;
|
|
22
|
-
}, [crossFilteringItems, widgetFiltersQuery]);
|
|
23
|
-
}
|
|
24
|
-
function sanitizeWidgetFilters(filters, crossFilteringItems) {
|
|
25
|
-
const withoutCrossFiltering = removeCrossFilteringFilters(filters, crossFilteringItems);
|
|
26
|
-
const withoutAllTimeDateFilters = removeAllTimeDateFilters(withoutCrossFiltering);
|
|
27
|
-
return removeEmptyAttributeFilters(withoutAllTimeDateFilters);
|
|
28
|
-
}
|
|
29
|
-
function removeCrossFilteringFilters(filters, crossFilteringItems) {
|
|
30
|
-
const crossFilteringFilterLocalIdentifiers = crossFilteringItems.flatMap((c) => c.filterLocalIdentifiers);
|
|
31
|
-
return filters.filter((filter) => {
|
|
32
|
-
const filterLocalId = filterLocalIdentifier(filter);
|
|
33
|
-
return filterLocalId ? !crossFilteringFilterLocalIdentifiers.includes(filterLocalId) : true;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function removeEmptyAttributeFilters(filters) {
|
|
37
|
-
return filters.filter((filter) => {
|
|
38
|
-
if (isAttributeFilter(filter)) {
|
|
39
|
-
return !filterIsEmpty(filter);
|
|
40
|
-
}
|
|
41
|
-
return true;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function removeAllTimeDateFilters(filters) {
|
|
45
|
-
return filters.filter((filter) => !isNoopAllTimeDateFilter(filter));
|
|
46
|
-
}
|
|
2
|
+
import { useWidgetAutomationFilters as useWidgetAutomationFiltersCanonical } from "../../connectors/hooks/useWidgetAutomationFilters.js";
|
|
3
|
+
// Delegates to the canonical implementation in connectors.
|
|
4
|
+
// This file will be removed in the scheduled-email separation PR.
|
|
5
|
+
export const useWidgetAutomationFilters = useWidgetAutomationFiltersCanonical;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationDateFilter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationDateFilter.tsx"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"AutomationDateFilter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationDateFilter.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,iBAAiB,EAEtB,KAAK,oBAAoB,EAE5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,mBAAmB,EAAoC,MAAM,sBAAsB,CAAC;AAqGlG,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACR,KAAK,EACR,EAAE;IACC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,2CA8DA"}
|
package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.js
CHANGED
|
@@ -2,12 +2,10 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
-
import { areObjRefsEqual } from "@gooddata/sdk-model";
|
|
5
|
+
import { areObjRefsEqual, } from "@gooddata/sdk-model";
|
|
6
6
|
import { UiChip, UiTooltip, useIdPrefixed } from "@gooddata/sdk-ui-kit";
|
|
7
|
-
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
8
|
-
import { selectCatalogDateDatasets } from "../../../../../model/store/catalog/catalogSelectors.js";
|
|
9
|
-
import { selectEffectiveDateFilterAvailableGranularities, selectEffectiveDateFilterAvailableGranularitiesForTab, selectEffectiveDateFilterOptions, selectEffectiveDateFilterOptionsForTab, } from "../../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
|
|
10
7
|
import { DefaultDashboardDateFilter } from "../../../../filterBar/dateFilter/DefaultDashboardDateFilter.js";
|
|
8
|
+
import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
11
9
|
import { AutomationDateFilterProvider, useAutomationDateFilterContext, } from "./AutomationDateFilterContext.js";
|
|
12
10
|
function AutomationDateFilterButton(props) {
|
|
13
11
|
const { isLocked, isCommonDateFilter, onDelete, filter, deleteAriaLabel, deleteTooltipContent, lockedTooltipContent, } = useAutomationDateFilterContext();
|
|
@@ -51,19 +49,14 @@ export function AutomationDateFilter({ filter, onChange, onDelete, isLocked, isC
|
|
|
51
49
|
const deleteAriaLabel = intl.formatMessage({ id: "dialogs.automation.filters.deleteAriaLabel" });
|
|
52
50
|
const deleteTooltipContent = intl.formatMessage({ id: "dialogs.automation.filters.deleteTooltip" });
|
|
53
51
|
const lockedTooltipContent = intl.formatMessage({ id: "dialogs.automation.filters.lockedTooltip" });
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
const availableGranularitiesForTab = useDashboardSelector(tabId
|
|
57
|
-
? selectEffectiveDateFilterAvailableGranularitiesForTab(tabId)
|
|
58
|
-
: selectEffectiveDateFilterAvailableGranularities);
|
|
52
|
+
const { dateFilterConfig, catalogDateDatasets } = useAutomationsContext();
|
|
53
|
+
const tabGranularities = tabId ? dateFilterConfig.getGranularitiesForTab(tabId) : [];
|
|
59
54
|
// Fallback to active tab granularities if tab-specific config is empty
|
|
60
|
-
const availableGranularities = tabId &&
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const dateFilterOptions = tabId && dateFilterOptionsForTab ? dateFilterOptionsForTab : dateFilterOptionsActive;
|
|
66
|
-
const allDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
|
|
55
|
+
const availableGranularities = tabId && tabGranularities.length > 0 ? tabGranularities : dateFilterConfig.availableGranularities;
|
|
56
|
+
const tabOptions = tabId ? dateFilterConfig.getOptionsForTab(tabId) : undefined;
|
|
57
|
+
// Fallback to active options if tab-specific options are absent or empty
|
|
58
|
+
const dateFilterOptions = tabOptions && Object.keys(tabOptions).length > 0 ? tabOptions : dateFilterConfig.dateFilterOptions;
|
|
59
|
+
const allDateDatasets = catalogDateDatasets;
|
|
67
60
|
const handleFilterChanged = useCallback((newFilter) => {
|
|
68
61
|
onChange(newFilter);
|
|
69
62
|
}, [onChange]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationDateFilter.test.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { newRelativeDashboardDateFilter } from "@gooddata/sdk-model";
|
|
6
|
+
import { AutomationsContextProvider, } from "../../../contexts/AutomationsContext.js";
|
|
7
|
+
const captured = vi.hoisted(() => ({
|
|
8
|
+
lastConfig: undefined,
|
|
9
|
+
}));
|
|
10
|
+
vi.mock("react-intl", () => ({
|
|
11
|
+
useIntl: () => ({
|
|
12
|
+
formatMessage: ({ id }) => id,
|
|
13
|
+
}),
|
|
14
|
+
}));
|
|
15
|
+
vi.mock("../../../../../model/react/DashboardStoreProvider.js", () => ({
|
|
16
|
+
useDashboardSelector: vi.fn(() => {
|
|
17
|
+
throw new Error("AutomationDateFilter must not read dashboard selectors directly");
|
|
18
|
+
}),
|
|
19
|
+
}));
|
|
20
|
+
vi.mock("../../../../filterBar/dateFilter/DefaultDashboardDateFilter.js", () => ({
|
|
21
|
+
DefaultDashboardDateFilter: vi.fn((props) => {
|
|
22
|
+
captured.lastConfig = props.config;
|
|
23
|
+
return null;
|
|
24
|
+
}),
|
|
25
|
+
}));
|
|
26
|
+
import { AutomationDateFilter } from "./AutomationDateFilter.js";
|
|
27
|
+
function createAutomationsContextValue(overrides) {
|
|
28
|
+
return {
|
|
29
|
+
locale: "en-US",
|
|
30
|
+
separators: { decimal: ".", thousand: "," },
|
|
31
|
+
settings: undefined,
|
|
32
|
+
catalogAttributes: [],
|
|
33
|
+
catalogDateDatasets: overrides.catalogDateDatasets,
|
|
34
|
+
catalogMeasures: [],
|
|
35
|
+
dateFilterConfig: overrides.dateFilterConfig,
|
|
36
|
+
dateFilterContextConfig: undefined,
|
|
37
|
+
attributeFilterConfigs: [],
|
|
38
|
+
attributeFilterConfigsByTab: {},
|
|
39
|
+
attributeFilterSelectionTypeMap: new Map(),
|
|
40
|
+
attributeFilterSelectionTypeMapByTab: {},
|
|
41
|
+
dateFilterConfigs: [],
|
|
42
|
+
dateFilterConfigsByTab: {},
|
|
43
|
+
dateFilterConfigOverridesByTab: {},
|
|
44
|
+
measureValueFilterConfigs: [],
|
|
45
|
+
measureValueFilterConfigsByTab: {},
|
|
46
|
+
commonDateFilterId: undefined,
|
|
47
|
+
lockedFilters: [],
|
|
48
|
+
hiddenFilters: [],
|
|
49
|
+
availableFilters: [],
|
|
50
|
+
automationFiltersByTab: [],
|
|
51
|
+
defaultSelectedFilters: [],
|
|
52
|
+
automationAvailableFilters: [],
|
|
53
|
+
enableNewScheduledExport: false,
|
|
54
|
+
getCatalogAttributeByRef: () => undefined,
|
|
55
|
+
getAttributeFilterDisplayForm: () => undefined,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
describe("AutomationDateFilter", () => {
|
|
59
|
+
const activeGranularities = ["GDC.time.date"];
|
|
60
|
+
const tabGranularities = ["GDC.time.month"];
|
|
61
|
+
const activeOptions = {
|
|
62
|
+
allTime: {
|
|
63
|
+
localIdentifier: "allTime",
|
|
64
|
+
type: "allTime",
|
|
65
|
+
name: "All time",
|
|
66
|
+
visible: true,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const tabOptions = {
|
|
70
|
+
relativeForm: {
|
|
71
|
+
fromLimit: -30,
|
|
72
|
+
toLimit: 0,
|
|
73
|
+
localIdentifier: "relative",
|
|
74
|
+
type: "relativeForm",
|
|
75
|
+
name: "Relative",
|
|
76
|
+
visible: true,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
const filter = newRelativeDashboardDateFilter("GDC.time.date", -6, 0);
|
|
80
|
+
it("uses tab-specific values from AutomationsContext without reading dashboard selectors", () => {
|
|
81
|
+
captured.lastConfig = undefined;
|
|
82
|
+
const value = createAutomationsContextValue({
|
|
83
|
+
catalogDateDatasets: [],
|
|
84
|
+
dateFilterConfig: {
|
|
85
|
+
availableGranularities: activeGranularities,
|
|
86
|
+
dateFilterOptions: activeOptions,
|
|
87
|
+
getGranularitiesForTab: (tabId) => (tabId === "tab1" ? tabGranularities : []),
|
|
88
|
+
getOptionsForTab: (tabId) => (tabId === "tab1" ? tabOptions : undefined),
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
render(_jsx(AutomationsContextProvider, { value: value, children: _jsx(AutomationDateFilter, { filter: filter, onChange: vi.fn(), onDelete: vi.fn(), tabId: "tab1" }) }));
|
|
92
|
+
expect(captured.lastConfig).toMatchObject({
|
|
93
|
+
availableGranularities: tabGranularities,
|
|
94
|
+
dateFilterOptions: tabOptions,
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
it("falls back to active values when the tab-specific config is empty", () => {
|
|
98
|
+
captured.lastConfig = undefined;
|
|
99
|
+
const value = createAutomationsContextValue({
|
|
100
|
+
catalogDateDatasets: [],
|
|
101
|
+
dateFilterConfig: {
|
|
102
|
+
availableGranularities: activeGranularities,
|
|
103
|
+
dateFilterOptions: activeOptions,
|
|
104
|
+
getGranularitiesForTab: () => [],
|
|
105
|
+
getOptionsForTab: () => undefined,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
render(_jsx(AutomationsContextProvider, { value: value, children: _jsx(AutomationDateFilter, { filter: filter, onChange: vi.fn(), onDelete: vi.fn(), tabId: "missing-tab" }) }));
|
|
109
|
+
expect(captured.lastConfig).toMatchObject({
|
|
110
|
+
availableGranularities: activeGranularities,
|
|
111
|
+
dateFilterOptions: activeOptions,
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
it("falls back to active options when tab-specific options map is empty", () => {
|
|
115
|
+
captured.lastConfig = undefined;
|
|
116
|
+
const value = createAutomationsContextValue({
|
|
117
|
+
catalogDateDatasets: [],
|
|
118
|
+
dateFilterConfig: {
|
|
119
|
+
availableGranularities: activeGranularities,
|
|
120
|
+
dateFilterOptions: activeOptions,
|
|
121
|
+
getGranularitiesForTab: () => tabGranularities,
|
|
122
|
+
getOptionsForTab: () => ({}),
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
render(_jsx(AutomationsContextProvider, { value: value, children: _jsx(AutomationDateFilter, { filter: filter, onChange: vi.fn(), onDelete: vi.fn(), tabId: "tab1" }) }));
|
|
126
|
+
expect(captured.lastConfig).toMatchObject({
|
|
127
|
+
availableGranularities: tabGranularities,
|
|
128
|
+
dateFilterOptions: activeOptions,
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FilterContextItem, type ICatalogAttribute, type ICatalogDateDataset, type IDashboardAttributeFilterConfig, type IDashboardDateFilterConfigItem, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
|
|
2
2
|
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
3
|
-
import type { IAutomationFiltersTab } from "../../../../../model/store/filtering/
|
|
3
|
+
import type { IAutomationFiltersTab } from "../../../../../model/store/filtering/types.js";
|
|
4
4
|
import { type IAutomationParameter } from "../automationParameters.js";
|
|
5
5
|
export interface IAutomationFiltersProps {
|
|
6
6
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationFiltersSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,aAAa,EAClB,KAAK,MAAM,EAYd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAO3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AutomationFiltersSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,aAAa,EAClB,KAAK,MAAM,EAYd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,mBAAmB,EAO3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAU3F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA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sB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACrE;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AA4ED,wBAAgB,uBAAuB,CAAC,EACpC,gBAAqB,EACrB,eAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,SAAiB,EACjB,cAAsB,EACtB,kBAA0B,EAC1B,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,UAAe,EACf,mBAAwB,EACxB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACpB,EAAE,6BAA6B,2CA6d/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationVisibleFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAutomationVisibleFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAI5F,eAAO,MAAM,2BAA2B,oFAcvC,CAAC;AAEF,eAAO,MAAM,gCAAgC,oHAgB5C,CAAC"}
|
package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { compact } from "lodash-es";
|
|
4
|
-
import { useFiltersByTabNamings, useFiltersNamings
|
|
4
|
+
import { useFiltersByTabNamings, useFiltersNamings } from "../../hooks/useFiltersNamings.js";
|
|
5
5
|
export const useAutomationVisibleFilters = (availableFilters = []) => {
|
|
6
6
|
const filterNamings = useFiltersNamings(availableFilters);
|
|
7
7
|
return useMemo(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationVisibleFilter } from "@gooddata/sdk-model";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExtendedDashboardWidget } from "../../../../../model/types/layoutTypes.js";
|
|
3
3
|
export declare function useDefaultSelectedFiltersForExistingAutomation(automationToEdit?: IAutomationMetadataObject, availableVisibleFilters?: IAutomationVisibleFilter[], widget?: ExtendedDashboardWidget): (import("@gooddata/sdk-model").IDashboardArbitraryAttributeFilter | import("@gooddata/sdk-model").IDashboardAttributeFilter | import("@gooddata/sdk-model").IDashboardDateFilter | import("@gooddata/sdk-model").IDashboardMatchAttributeFilter | import("@gooddata/sdk-model").IDashboardMeasureValueFilter)[];
|
|
4
4
|
/**
|
|
5
5
|
* Reconstructs filters per tab from saved visibleFiltersByTab and filtersByTab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultSelectedFiltersForExistingAutomation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAShC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useDefaultSelectedFiltersForExistingAutomation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAShC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAYzF,wBAAgB,8CAA8C,CAC1D,gBAAgB,CAAC,EAAE,yBAAyB,EAC5C,uBAAuB,CAAC,EAAE,wBAAwB,EAAE,EACpD,MAAM,CAAC,EAAE,uBAAuB,mTA2CnC;AAwED;;;;;GAKG;AACH,wBAAgB,mDAAmD,CAC/D,gBAAgB,EAAE,yBAAyB,GAAG,SAAS,EACvD,8BAA8B,GAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAM,EACxE,kBAAkB,CAAC,EAAE,MAAM,GAC5B,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,CAoCjD"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { dashboardFilterLocalIdentifier, filterLocalIdentifier, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
4
|
-
import { getAutomationAlertFilters, getAutomationDashboardFilters, getAutomationDashboardFiltersByTab, getAutomationVisualizationFilters, } from "../../../../../_staging/automation/index.js";
|
|
5
|
-
import { dashboardFilterToFilterContextItem } from "../../../../../_staging/dashboard/dashboardFilterContext.js";
|
|
6
|
-
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
7
|
-
import { selectAutomationAvailableDashboardFilters, selectAutomationCommonDateFilterId, } from "../../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
8
4
|
import { removeIgnoredWidgetFilters } from "../../../../../model/utils/widgetFilters.js";
|
|
9
5
|
import { isDashboardFilter } from "../../../../../types.js";
|
|
6
|
+
import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
7
|
+
import { getAutomationAlertFilters, getAutomationDashboardFilters, getAutomationDashboardFiltersByTab, getAutomationVisualizationFilters, } from "../../utils/automationUtils.js";
|
|
8
|
+
import { dashboardFilterToFilterContextItem } from "../../utils/filterContextUtils.js";
|
|
10
9
|
export function useDefaultSelectedFiltersForExistingAutomation(automationToEdit, availableVisibleFilters, widget) {
|
|
11
|
-
const availableDashboardFilters =
|
|
12
|
-
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
10
|
+
const { automationAvailableFilters: availableDashboardFilters, commonDateFilterId } = useAutomationsContext();
|
|
13
11
|
const savedWidgetAlertFilters = getAutomationAlertFilters(automationToEdit);
|
|
14
12
|
const { executionFilters: savedWidgetScheduleFilters, filterContextItems: savedWidgetScheduleFilterContextItems, } = getAutomationVisualizationFilters(automationToEdit);
|
|
15
13
|
const savedDashboardScheduleFilters = getAutomationDashboardFilters(automationToEdit);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExtendedDashboardWidget } from "../../../../../model/types/layoutTypes.js";
|
|
2
2
|
export declare function useDefaultSelectedFiltersForNewAutomation(widget?: ExtendedDashboardWidget): import("@gooddata/sdk-model").FilterContextItem[];
|
|
3
3
|
//# sourceMappingURL=useDefaultSelectedFiltersForNewAutomation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultSelectedFiltersForNewAutomation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDefaultSelectedFiltersForNewAutomation.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAIzF,wBAAgB,yCAAyC,CAAC,MAAM,CAAC,EAAE,uBAAuB,qDAGzF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
|
-
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
3
|
-
import { selectAutomationDefaultSelectedFilters } from "../../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
4
2
|
import { removeIgnoredWidgetFilters } from "../../../../../model/utils/widgetFilters.js";
|
|
3
|
+
import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
5
4
|
export function useDefaultSelectedFiltersForNewAutomation(widget) {
|
|
6
|
-
const
|
|
7
|
-
return removeIgnoredWidgetFilters(
|
|
5
|
+
const { defaultSelectedFilters } = useAutomationsContext();
|
|
6
|
+
return removeIgnoredWidgetFilters(defaultSelectedFilters, widget);
|
|
8
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DashboardAttributeFilterSelectionType, type FilterContextItem, type IAutomationMetadataObject, type IAutomationVisibleFilter, type IDashboardExportParameter, type IDashboardParameter, type IFilter, type IInsight, type IParameterMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExtendedDashboardWidget } from "../../../../../model/types/layoutTypes.js";
|
|
3
3
|
export interface IAutomationValidationResult {
|
|
4
4
|
isValid: boolean;
|
|
5
5
|
hiddenFilterIsMissingInSavedFilters: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateExistingAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qCAAqC,EAE1C,KAAK,iBAAiB,EAEtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,OAAO,EAEZ,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAmBhC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useValidateExistingAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qCAAqC,EAE1C,KAAK,iBAAiB,EAEtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,OAAO,EAEZ,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAmBhC,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuEzF,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC,EAAE,OAAO,CAAC;IAC7C,0CAA0C,EAAE,OAAO,CAAC;IACpD,mCAAmC,EAAE,OAAO,CAAC;IAC7C,0CAA0C,EAAE,OAAO,CAAC;IACpD,oCAAoC,EAAE,OAAO,CAAC;IAC9C,oCAAoC,EAAE,OAAO,CAAC;IAC9C,8CAA8C,EAAE,OAAO,CAAC;IACxD,oCAAoC,EAAE,OAAO,CAAC;IAC9C,wBAAwB,EAAE,OAAO,CAAC;IAClC,gDAAgD,EAAE,OAAO,CAAC;IAC1D;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAiBD,wBAAgB,oCAAoC,CAAC,EACjD,gBAAgB,EAChB,MAAM,EACN,OAAO,EACV,EAAE;IACC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,OAAO,CAAC,EAAE,QAAQ,CAAC;CACtB,GAAG,2BAA2B,CAuD9B;AAoHD;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,EACj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0B,EAC1B,kCAAkC,EAClC,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACxB,EAAE;IACC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChE,kCAAkC,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;IAC/E,sBAAsB,EAAE,4BAA4B,EAAE,CAAC;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,qCAAqC,GAAG,SAAS,CAAC,CAAC,CAAC;CAC1G,GAAG,2BAA2B,CAoE9B"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { differenceBy, omit } from "lodash-es";
|
|
3
3
|
import { DashboardParameterModeValues, dashboardFilterLocalIdentifier, filterLocalIdentifier, isAllDashboardMeasureValueFilter, isAllValuesAttributeFilter, isAllValuesDashboardAttributeFilter, isAttributeFilter, isAttributeFilterWithSelection, isDashboardAttributeFilter, isDashboardCommonDateFilter, isDateFilter, isInsightWidget, isLocalIdRef, isNegativeAttributeFilter, isNumberParameterDefinition, isPositiveAttributeFilter, isRelativeDateFilter, isSingleSelectionFilter, } from "@gooddata/sdk-model";
|
|
4
|
-
import {
|
|
4
|
+
import { getAutomationAlertParameters, getAutomationExportParametersByTab, } from "../../../../../_staging/automation/index.js";
|
|
5
5
|
import { filterContextItemsToDashboardFiltersByWidget } from "../../../../../converters/filterConverters.js";
|
|
6
6
|
import { isFilterTypeCompatibleWithSelectionType } from "../../../../../model/commandHandlers/dashboard/common/attributeFilterSelectionTypeCompatibility.js";
|
|
7
7
|
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
8
8
|
import { selectCatalogParameters, selectCatalogParametersIsLoaded, } from "../../../../../model/store/catalog/catalogSelectors.js";
|
|
9
9
|
import { selectEnableParameters } from "../../../../../model/store/config/configSelectors.js";
|
|
10
|
-
import { selectAutomationCommonDateFilterId, selectAutomationFiltersByTab, selectDashboardFiltersWithoutCrossFiltering, selectDashboardHiddenFilters, selectDashboardLockedFilters, } from "../../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
11
|
-
import { selectAttributeFilterConfigsSelectionTypeMap, selectAttributeFilterConfigsSelectionTypeMapByTab, } from "../../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
12
10
|
import { selectWidgetLocalIdToTabIdMap } from "../../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
13
11
|
import { selectSmartPersistedTabsParameters } from "../../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
14
12
|
import { selectTabs } from "../../../../../model/store/tabs/tabsSelectors.js";
|
|
13
|
+
import { useAutomationsContext } from "../../../contexts/AutomationsContext.js";
|
|
14
|
+
import { getAutomationAlertFilters, getAutomationDashboardFilters, getAutomationDashboardFiltersByTab, getAutomationVisualizationFilters, } from "../../utils/automationUtils.js";
|
|
15
15
|
import { hasStaleAlertParameters } from "../automationParameters.js";
|
|
16
16
|
import { areFiltersEqual, isFilterIgnoredByWidget, isFilterMatch, isNoopAllTimeDateFilterFixed, } from "../utils.js";
|
|
17
17
|
function sanitizeCommonDateFilter(filter, commonDateFilterId) {
|
|
@@ -60,13 +60,7 @@ const defaultValidState = {
|
|
|
60
60
|
parametersAreStale: false,
|
|
61
61
|
};
|
|
62
62
|
export function useValidateExistingAutomationFilters({ automationToEdit, widget, insight, }) {
|
|
63
|
-
const lockedFilters =
|
|
64
|
-
const hiddenFilters = useDashboardSelector(selectDashboardHiddenFilters);
|
|
65
|
-
const dashboardFilters = useDashboardSelector(selectDashboardFiltersWithoutCrossFiltering);
|
|
66
|
-
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
67
|
-
const dashboardFiltersByTab = useDashboardSelector(selectAutomationFiltersByTab);
|
|
68
|
-
const selectionTypeMap = useDashboardSelector(selectAttributeFilterConfigsSelectionTypeMap);
|
|
69
|
-
const selectionTypeMapByTab = useDashboardSelector(selectAttributeFilterConfigsSelectionTypeMapByTab);
|
|
63
|
+
const { lockedFilters, hiddenFilters, availableFilters: dashboardFilters, commonDateFilterId, automationFiltersByTab: dashboardFiltersByTab, attributeFilterSelectionTypeMap: selectionTypeMap, attributeFilterSelectionTypeMapByTab: selectionTypeMapByTab, } = useAutomationsContext();
|
|
70
64
|
const parametersEnabled = useDashboardSelector(selectEnableParameters);
|
|
71
65
|
const catalogParameters = useDashboardSelector(selectCatalogParameters);
|
|
72
66
|
const catalogParametersIsLoaded = useDashboardSelector(selectCatalogParametersIsLoaded);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MutableRefObject } from "react";
|
|
2
2
|
import { type FilterContextItem, type ICatalogAttribute, type ICatalogDateDataset, type ICatalogMeasure, type IDashboardAttributeFilterConfig, type IDashboardDateFilterConfigItem, type ObjRef } from "@gooddata/sdk-model";
|
|
3
|
-
import {
|
|
3
|
+
import type { IAutomationFiltersTab } from "../../../../model/store/filtering/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Processed filter data for a single tab, ready for UI rendering.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAA0C,MAAM,OAAO,CAAC;AAItF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAA0C,MAAM,OAAO,CAAC;AAItF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EAEnC,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAgFxF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,kCAAkC;IAClC,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,2DAA2D;IAC3D,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,8DAA8D;IAC9D,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,sFAAsF;IACtF,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,+BAA+B,EAAE,CAAC;IACpD,uCAAuC;IACvC,WAAW,EAAE,8BAA8B,EAAE,CAAC;CACjD;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAwQhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;CAuQrC,CAAC"}
|
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, isDashboardAttributeFilterItem, isDashboardDateFilter, isDashboardMeasureValueFilter, } from "@gooddata/sdk-model";
|
|
5
|
-
import {
|
|
6
|
-
import { selectCatalogAttributes, selectCatalogDateDatasets, selectCatalogMeasures, } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
7
|
-
import { selectEnableNewScheduledExport } from "../../../../model/store/config/configSelectors.js";
|
|
8
|
-
import { selectAutomationCommonDateFilterId, selectDashboardLockedFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
9
|
-
import { selectPersistedDashboardFilterContextDateFilterConfig } from "../../../../model/store/meta/metaSelectors.js";
|
|
10
|
-
import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
11
|
-
import { selectDateFilterConfigOverridesByTab } from "../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
|
|
12
|
-
import { selectDateFilterConfigsOverrides, selectDateFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
|
|
13
|
-
import { selectMeasureValueFilterConfigsOverrides, selectMeasureValueFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/measureValueFilterConfigs/measureValueFilterConfigsSelectors.js";
|
|
5
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
14
6
|
import { areFiltersMatchedByIdentifier, getCatalogAttributesByFilters, getCatalogDateDatasetsByFilters, getCatalogMeasuresByFilters, getFilterByCatalogItemRef, getFilterLocalIdentifier, getFilterTitle, getNonHiddenFilters, getNonSelectedFilters, } from "./utils.js";
|
|
15
7
|
/**
|
|
16
8
|
* Computes visible filters by removing hidden filters.
|
|
@@ -41,16 +33,7 @@ function computeAddDropdownMeasures(nonSelectedFilters, context) {
|
|
|
41
33
|
*/
|
|
42
34
|
export const useAutomationFilters = ({ availableFilters, selectedFilters, onFiltersChange, onStoreFiltersChange, disableDateFilters = false, }) => {
|
|
43
35
|
const intl = useIntl();
|
|
44
|
-
const allAttributes =
|
|
45
|
-
const allDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
|
|
46
|
-
const allMeasures = useDashboardSelector(selectCatalogMeasures);
|
|
47
|
-
const attributeConfigs = useDashboardSelector(selectAttributeFilterConfigsOverrides);
|
|
48
|
-
const dateConfigs = useDashboardSelector(selectDateFilterConfigsOverrides);
|
|
49
|
-
const mvfConfigs = useDashboardSelector(selectMeasureValueFilterConfigsOverrides);
|
|
50
|
-
const dateFilterConfig = useDashboardSelector(selectPersistedDashboardFilterContextDateFilterConfig);
|
|
51
|
-
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
52
|
-
const lockedFilters = useDashboardSelector(selectDashboardLockedFilters);
|
|
53
|
-
const enableNewScheduledExport = useDashboardSelector(selectEnableNewScheduledExport);
|
|
36
|
+
const { catalogAttributes: allAttributes, catalogDateDatasets: allDateDatasets, catalogMeasures: allMeasures, attributeFilterConfigs: attributeConfigs, dateFilterConfigs: dateConfigs, measureValueFilterConfigs: mvfConfigs, dateFilterContextConfig: dateFilterConfig, commonDateFilterId, lockedFilters, enableNewScheduledExport, } = useAutomationsContext();
|
|
54
37
|
const [filterAnnouncement, setFilterAnnouncement] = useState("");
|
|
55
38
|
const addFilterButtonRef = useRef(null);
|
|
56
39
|
const filterGroupRef = useRef(null);
|
|
@@ -204,18 +187,10 @@ export const useAutomationFilters = ({ availableFilters, selectedFilters, onFilt
|
|
|
204
187
|
* Returns processed filters and handlers for add/change/delete operations per tab.
|
|
205
188
|
*/
|
|
206
189
|
export const useAutomationFiltersByTab = ({ filtersByTab, editedFiltersByTab, onFiltersByTabChange, onStoreFiltersChange, disableDateFilters = false, }) => {
|
|
207
|
-
const allAttributes =
|
|
208
|
-
const allDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
|
|
209
|
-
const allMeasures = useDashboardSelector(selectCatalogMeasures);
|
|
210
|
-
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
190
|
+
const { catalogAttributes: allAttributes, catalogDateDatasets: allDateDatasets, catalogMeasures: allMeasures, commonDateFilterId, attributeFilterConfigsByTab: attributeConfigsByTab, dateFilterConfigsByTab: dateConfigsByTab, dateFilterConfigOverridesByTab: dateFilterConfigByTab, measureValueFilterConfigsByTab: mvfConfigsByTab, } = useAutomationsContext();
|
|
211
191
|
const [filterAnnouncement] = useState("");
|
|
212
192
|
const addFilterButtonRef = useRef(null);
|
|
213
193
|
const filterGroupRef = useRef(null);
|
|
214
|
-
// Get per-tab filter configs
|
|
215
|
-
const attributeConfigsByTab = useDashboardSelector(selectAttributeFilterConfigsOverridesByTab);
|
|
216
|
-
const dateConfigsByTab = useDashboardSelector(selectDateFilterConfigsOverridesByTab);
|
|
217
|
-
const dateFilterConfigByTab = useDashboardSelector(selectDateFilterConfigOverridesByTab);
|
|
218
|
-
const mvfConfigsByTab = useDashboardSelector(selectMeasureValueFilterConfigsOverridesByTab);
|
|
219
194
|
const processedFiltersByTab = useMemo(() => {
|
|
220
195
|
if (!filtersByTab || filtersByTab.length === 0) {
|
|
221
196
|
return undefined;
|
package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FilterContextItem, type IAutomationMetadataObject, type IAutomationVisibleFilter } from "@gooddata/sdk-model";
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
2
|
+
import type { IAutomationFiltersTab } from "../../../../model/store/filtering/types.js";
|
|
3
|
+
import { type ExtendedDashboardWidget } from "../../../../model/types/layoutTypes.js";
|
|
4
4
|
/**
|
|
5
5
|
* Edited automation filters structured by tab ID.
|
|
6
6
|
* Used for storing user edits to filters when dashboard tabs are enabled.
|
package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationFiltersSelect.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAEhC,MAAM,qBAAqB,CAAC;AAK7B,OAAO,
|
|
1
|
+
{"version":3,"file":"useAutomationFiltersSelect.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAEhC,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AActF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IACxC,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C,0BAA0B,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACnE,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAClD,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IACzE,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;IAC7C;;;;;OAKG;IACH,YAAY,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;IAClD;;;;OAIG;IACH,4BAA4B,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC7D;;OAEG;IACH,+BAA+B,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAEvE,qCAAqC,EAAE,MAAM,CAAC,MAAM,EAAE,wB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