@gooddata/sdk-ui-dashboard 11.70.0-alpha.3 → 11.70.0-alpha.5
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 +49 -49
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/automation/index.d.ts +1 -0
- package/esm/_staging/automation/index.d.ts.map +1 -1
- package/esm/_staging/automation/index.js +16 -5
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts +9 -3
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts.map +1 -1
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.js +22 -13
- package/esm/_staging/dashboard/dashboardFilterContext.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterContext.js +11 -1
- package/esm/_staging/dashboard/dashboardFilterContextValidation.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterContextValidation.js +9 -9
- package/esm/_staging/dashboard/dashboardFilterConverter.d.ts +3 -3
- package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterConverter.js +14 -2
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts +9 -0
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts.map +1 -1
- package/esm/_staging/dashboard/parameterizedDateFilters.js +27 -0
- package/esm/_staging/exportUtils/filterUtils.d.ts.map +1 -1
- package/esm/_staging/exportUtils/filterUtils.js +5 -3
- package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useFiltersNamings.js +9 -7
- package/esm/index.d.ts +8 -8
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +5 -5
- package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialog.js +15 -11
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts +17 -0
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.js +44 -2
- package/esm/model/DashboardTester.d.ts.map +1 -1
- package/esm/model/DashboardTester.js +0 -2
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts +2 -0
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts.map +1 -1
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.js +6 -1
- package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.js +7 -3
- package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.js +9 -4
- package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +23 -11
- package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.js +7 -8
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +6 -3
- package/esm/model/commandHandlers/drill/common/sourceDrillFilters.js +2 -2
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +18 -6
- package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.js +3 -5
- package/esm/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.js +3 -5
- package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.js +3 -5
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +21 -42
- package/esm/model/commandHandlers/filterContext/common.d.ts +2 -2
- package/esm/model/commandHandlers/filterContext/common.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/common.js +16 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts +2 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +56 -34
- package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +8 -3
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts +8 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +42 -9
- package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.js +2 -1
- package/esm/model/commandHandlers/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/index.js +6 -1
- package/esm/model/commandHandlers/layout/undoLayoutChangesHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/layout/undoLayoutChangesHandler.js +3 -1
- package/esm/model/commandHandlers/parameters/addParametersHandler.d.ts +6 -0
- package/esm/model/commandHandlers/parameters/addParametersHandler.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/addParametersHandler.js +43 -0
- package/esm/model/commandHandlers/parameters/removeParametersHandler.d.ts +6 -0
- package/esm/model/commandHandlers/parameters/removeParametersHandler.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/removeParametersHandler.js +29 -0
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +10 -4
- package/esm/model/commandHandlers/widgets/addVisualizationToSwitcherWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/addVisualizationToSwitcherWidgetHandler.js +3 -1
- package/esm/model/commandHandlers/widgets/changeInsightWidgetInsightHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/changeInsightWidgetInsightHandler.js +2 -0
- package/esm/model/commandHandlers/widgets/refreshInsightWidgetHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/refreshInsightWidgetHandler.js +2 -0
- package/esm/model/commands/base.d.ts +1 -1
- package/esm/model/commands/base.d.ts.map +1 -1
- package/esm/model/commands/filters.d.ts +88 -4
- package/esm/model/commands/filters.d.ts.map +1 -1
- package/esm/model/commands/filters.js +33 -21
- package/esm/model/commands/index.d.ts +3 -3
- package/esm/model/commands/index.d.ts.map +1 -1
- package/esm/model/commands/parameters.d.ts +78 -1
- package/esm/model/commands/parameters.d.ts.map +1 -1
- package/esm/model/commands/parameters.js +47 -0
- package/esm/model/events/base.d.ts +1 -1
- package/esm/model/events/base.d.ts.map +1 -1
- package/esm/model/events/filters.d.ts +70 -1
- package/esm/model/events/filters.d.ts.map +1 -1
- package/esm/model/events/filters.js +36 -0
- package/esm/model/events/index.d.ts +3 -3
- package/esm/model/events/index.d.ts.map +1 -1
- package/esm/model/events/parameters.d.ts +43 -1
- package/esm/model/events/parameters.d.ts.map +1 -1
- package/esm/model/events/parameters.js +26 -0
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.d.ts.map +1 -1
- package/esm/model/react/useDasboardScheduledEmails/useDashboardScheduledEmailsCommands.js +5 -0
- package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.d.ts.map +1 -1
- package/esm/model/react/useDashboardAlerting/useDashboardAlertsCommands.js +5 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +0 -2
- package/esm/model/react/useWidgetFilters.d.ts.map +1 -1
- package/esm/model/react/useWidgetFilters.js +5 -2
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.js +10 -2
- package/esm/model/store/meta/metaSelectors.js +3 -3
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +31 -2
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +66 -12
- package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts +29 -3
- package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextSelectors.js +29 -3
- package/esm/model/store/tabs/filterContext/filterContextState.d.ts +2 -2
- package/esm/model/store/tabs/filterContext/filterContextState.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextUtils.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextUtils.js +80 -24
- package/esm/model/store/tabs/filterContext/filterSync.d.ts +7 -1
- package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterSync.js +58 -21
- package/esm/model/store/tabs/layout/layoutSelectors.js +2 -2
- package/esm/model/utils/widgetFilters.js +2 -2
- package/esm/plugins/customizationApis/customizationBuilder.d.ts.map +1 -1
- package/esm/plugins/customizationApis/customizationBuilder.js +3 -1
- package/esm/plugins/customizationApis/dateFiltersCustomizer.d.ts +4 -3
- package/esm/plugins/customizationApis/dateFiltersCustomizer.d.ts.map +1 -1
- package/esm/plugins/customizationApis/dateFiltersCustomizer.js +23 -41
- package/esm/plugins/customizer.d.ts +16 -1
- package/esm/plugins/customizer.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +14 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +14 -1
- package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.d.ts +8 -0
- package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useAbsoluteGranularityDateFilterBlocksAutomation.js +16 -0
- package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.d.ts +13 -0
- package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.d.ts.map +1 -0
- package/esm/presentation/automations/shared/components/AbsoluteGranularityDateFilterNotSupportedDialog.js +29 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/exportUtils/filterUtils.js +4 -2
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/utils/automationUtils.js +10 -4
- package/esm/presentation/componentDefinition/types.d.ts +3 -3
- package/esm/presentation/componentDefinition/types.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.js +56 -20
- package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.js +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts +2 -2
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js +8 -3
- package/esm/presentation/dashboard/types.d.ts +12 -1
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -2
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -1
- package/esm/presentation/dashboardContexts/types.d.ts +13 -2
- package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts +4 -4
- package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/useFilterDeleteDrop.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/useFilterDeleteDrop.js +6 -4
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +10 -2
- package/esm/presentation/drill/DrillSelect/WithDrillSelect.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/WithDrillSelect.js +15 -7
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.js +62 -6
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +3 -2
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts +2 -2
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +30 -14
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilterComponentSetFactory.d.ts +2 -2
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilterComponentSetFactory.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.d.ts +7 -0
- package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.d.ts.map +1 -0
- package/esm/presentation/filterBar/dateFilter/dateFilterOfAnyTypeProvider.js +40 -0
- package/esm/presentation/filterBar/dateFilter/types.d.ts +43 -1
- package/esm/presentation/filterBar/dateFilter/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +13 -5
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +3 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +2 -2
- package/esm/presentation/filterBar/filterBar/ShowAllFiltersButton.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/ShowAllFiltersButton.js +1 -1
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +21 -3
- package/esm/presentation/filterBar/filterBar/types.d.ts +3 -3
- package/esm/presentation/filterBar/filterBar/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts +3 -3
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js +3 -3
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.js +11 -13
- package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts.map +1 -1
- package/esm/presentation/insightEditor/filterContext/dateFilters.js +2 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +52 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +52 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +3 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +2 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +2 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +2 -0
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +33 -6
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.d.ts.map +1 -1
- package/esm/presentation/topBar/timezoneIndicator/TimezoneIndicator.js +2 -2
- package/esm/presentation/widget/description/DescriptionClickTrigger.d.ts.map +1 -1
- package/esm/presentation/widget/description/DescriptionClickTrigger.js +19 -3
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js +19 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.d.ts.map +1 -1
- package/esm/presentation/widget/widget/VisualizationSwitcherWidget/VisualizationSwitcherNavigationHeader.js +12 -5
- package/esm/sdk-ui-dashboard.d.ts +451 -16
- package/package.json +23 -23
- package/styles/css/filterBar.css +5 -0
- package/styles/css/filterBar.css.map +1 -1
- package/styles/css/main.css +6 -3
- package/styles/css/main.css.map +1 -1
- package/styles/css/timezoneIndicator.css +1 -3
- package/styles/css/timezoneIndicator.css.map +1 -1
- package/styles/scss/filterBar.scss +4 -0
- package/styles/scss/timezoneIndicator.scss +1 -3
- package/esm/assets/timezone.svg +0 -1
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts +0 -3
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.js +0 -26
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { call, put, select } from "redux-saga/effects";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
|
-
import { areObjRefsEqual, dashboardAbsoluteGranularityDateFilterToDateFilterByWidget, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, insightMeasures, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
4
|
+
import { areObjRefsEqual, dashboardAbsoluteGranularityDateFilterToDateFilterByWidget, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, insightMeasures, isDashboardAbsoluteGranularityDateFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
5
5
|
import { _compact, _isEmpty, _isEqual } from "@gooddata/util";
|
|
6
|
+
import { ABSOLUTE_GRANULARITY_DATE_FILTER_DRILL_TO_DASHBOARD_NOT_SUPPORTED } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
7
|
+
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
6
8
|
import { switchDashboardTab } from "../../commands/tabs.js";
|
|
7
9
|
import { drillToDashboardRequested, drillToDashboardResolved, } from "../../events/drill.js";
|
|
8
10
|
import { generateFilterLocalIdentifier } from "../../store/_infra/generators.js";
|
|
@@ -11,7 +13,7 @@ import { selectCatalogDateAttributes } from "../../store/catalog/catalogSelector
|
|
|
11
13
|
import { selectRestrictedDashboardFilterLocalIdentifiers } from "../../store/filtering/dashboardFilterSelectors.js";
|
|
12
14
|
import { selectInsightByRef } from "../../store/insights/insightsSelectors.js";
|
|
13
15
|
import { selectAttributeFilterConfigsDisplayAsLabelMap, selectAttributeFilterConfigsOverrides, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
14
|
-
import { selectFilterContextAttributeFilterItems,
|
|
16
|
+
import { selectFilterContextAttributeFilterItems, selectFilterContextDateFilterOfAnyType, selectFilterContextDraggableFilterItems, selectFilterContextMeasureValueFilters, } from "../../store/tabs/filterContext/filterContextSelectors.js";
|
|
15
17
|
import { selectAnalyticalWidgetByRef } from "../../store/tabs/layout/layoutSelectors.js";
|
|
16
18
|
import { selectActiveTabDrillParameters } from "../../store/tabs/parameters/parametersSelectors.js";
|
|
17
19
|
import { convertIntersectionToAttributeFilters, removeIgnoredValuesFromDrillIntersection, } from "./common/intersectionUtils.js";
|
|
@@ -30,8 +32,14 @@ export function* drillToDashboardHandler(ctx, cmd) {
|
|
|
30
32
|
const ignoredDashboardFilterIds = new Set(cmd.payload.drillDefinition.ignoredDashboardFilters ?? []);
|
|
31
33
|
const shouldUseDateFilter = !!widget.dateDataSet && !isDateFilterDisabled(insight);
|
|
32
34
|
// widget's dateDataSet is not needed in common date filter because target dashboard widget's will use their own dateDataSet
|
|
33
|
-
const
|
|
34
|
-
?
|
|
35
|
+
const drillingDateFilter = shouldUseDateFilter
|
|
36
|
+
? yield select(selectDrillingDateFilter)
|
|
37
|
+
: undefined;
|
|
38
|
+
if (isDashboardAbsoluteGranularityDateFilter(drillingDateFilter)) {
|
|
39
|
+
console.warn(`${ABSOLUTE_GRANULARITY_DATE_FILTER_DRILL_TO_DASHBOARD_NOT_SUPPORTED} The target dashboard keeps its date filter.`);
|
|
40
|
+
}
|
|
41
|
+
const commonDateFilter = drillingDateFilter && !isDashboardAbsoluteGranularityDateFilter(drillingDateFilter)
|
|
42
|
+
? removeIgnoredDashboardFilters([drillingDateFilter], ignoredDashboardFilterIds)[0]
|
|
35
43
|
: undefined;
|
|
36
44
|
// get proper attr filters
|
|
37
45
|
const isDrillingToSelf = areObjRefsEqual(ctx.dashboardRef, cmd.payload.drillDefinition.target);
|
|
@@ -122,9 +130,9 @@ function transformToPrimaryLabelFilters(drillIntersectionFilters, filtersCount =
|
|
|
122
130
|
});
|
|
123
131
|
return [transformedFilters, attributeFilterConfigs];
|
|
124
132
|
}
|
|
125
|
-
// result needs to be
|
|
133
|
+
// result needs to be a dashboard date filter to allow optional dateDataSet
|
|
126
134
|
function selectDrillingDateFilter(state) {
|
|
127
|
-
const globalDateFilter =
|
|
135
|
+
const globalDateFilter = selectFilterContextDateFilterOfAnyType(state);
|
|
128
136
|
return globalDateFilter ?? newAllTimeDashboardDateFilter();
|
|
129
137
|
}
|
|
130
138
|
function selectAllAttributeFilters(state) {
|
|
@@ -149,6 +157,10 @@ function convertFilterItemsToFilters(filter, widget) {
|
|
|
149
157
|
if (isDashboardAttributeFilterItem(filter)) {
|
|
150
158
|
return dashboardAttributeFilterItemToAttributeFilter(filter);
|
|
151
159
|
}
|
|
160
|
+
if (isDashboardParameterizedDateFilter(filter)) {
|
|
161
|
+
console.warn(`Skipping a dashboard filter. ${PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED}`, filter);
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
152
164
|
const unknownFilter = filter;
|
|
153
165
|
console.warn("Skipping a filter of an unknown type.", unknownFilter);
|
|
154
166
|
return undefined;
|
package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"addAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAcxE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,yBAAyB,CACtC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,IAAI,GAAE,QAAQ,GAAG,aAAwB,GAC1C,YAAY,CAAC,IAAI,CAAC,CAwJpB;AAED,wBAAiB,uBAAuB,CACpC,GAAG,EAAE,gBAAgB,EACrB,oBAAoB,EAAE,MAAM,EAC5B,cAAc,EAAE,yBAAyB;;;;;;sLAqC5C"}
|
package/esm/model/commandHandlers/filterContext/attributeFilter/addAttributeFilterHandler.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { batchActions } from "redux-batched-actions";
|
|
3
3
|
import { all, call, put, select } from "redux-saga/effects";
|
|
4
4
|
import { invariant } from "ts-invariant";
|
|
5
|
-
import { DashboardAttributeFilterSelectionTypeValues, areObjRefsEqual,
|
|
5
|
+
import { DashboardAttributeFilterSelectionTypeValues, areObjRefsEqual, objRefToString, } from "@gooddata/sdk-model";
|
|
6
6
|
import { _isEmpty } from "@gooddata/util";
|
|
7
7
|
import { attributeFilterAdded } from "../../../events/filters.js";
|
|
8
8
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
@@ -11,9 +11,8 @@ import { selectBackendCapabilities } from "../../../store/backendCapabilities/ba
|
|
|
11
11
|
import { selectCrossFilteringFiltersLocalIdentifiers } from "../../../store/drill/drillSelectors.js";
|
|
12
12
|
import { selectAttributeFilterDisplayFormsMap, selectCanAddMoreFilters, selectFilterContextAttributeFilterByDisplayForm, selectFilterContextAttributeFilterByLocalId, selectFilterContextAttributeFilterItems, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
13
13
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
14
|
-
import { selectAllAnalyticalWidgets } from "../../../store/tabs/layout/layoutSelectors.js";
|
|
15
14
|
import { resolveDisplayFormMetadata } from "../../../utils/displayFormResolver.js";
|
|
16
|
-
import {
|
|
15
|
+
import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
|
|
17
16
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
18
17
|
import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./validation/computedAttributesEnabledValidation.js";
|
|
19
18
|
import { canFilterBeAdded } from "./validation/uniqueFiltersValidation.js";
|
|
@@ -84,8 +83,7 @@ export function* addAttributeFilterHandler(ctx, cmd, type = "normal") {
|
|
|
84
83
|
}
|
|
85
84
|
yield dispatchDashboardEvent(attributeFilterAdded(ctx, addedFilter, cmd.payload.index, cmd.correlationId));
|
|
86
85
|
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
87
|
-
|
|
88
|
-
yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
|
|
86
|
+
yield call(revalidateDrillToCustomUrlParams);
|
|
89
87
|
}
|
|
90
88
|
export function* getConnectingAttributes(ctx, addedFilterAttribute, neighborFilter) {
|
|
91
89
|
const { backend, workspace } = ctx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTextAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"addTextAttributeFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAY/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAU5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CA0GpB"}
|
package/esm/model/commandHandlers/filterContext/attributeFilter/addTextAttributeFilterHandler.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
import { batchActions } from "redux-batched-actions";
|
|
3
3
|
import { call, put, select } from "redux-saga/effects";
|
|
4
4
|
import { invariant } from "ts-invariant";
|
|
5
|
-
import { DashboardAttributeFilterSelectionTypeValues, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier,
|
|
5
|
+
import { DashboardAttributeFilterSelectionTypeValues, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, objRefToString, } from "@gooddata/sdk-model";
|
|
6
6
|
import { _isEmpty } from "@gooddata/util";
|
|
7
7
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
8
8
|
import { selectBackendCapabilities } from "../../../store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
9
9
|
import { selectCanAddMoreFilters, selectFilterContextAttributeFilterItemByDisplayForm, selectFilterContextAttributeFilterItemByLocalId, selectFilterContextAttributeFilterItems, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
10
10
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { validateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
|
|
11
|
+
import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
|
|
13
12
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
14
13
|
import { resolveAndRegisterDisplayFormMetadata } from "./resolveDisplayFormMetadata.js";
|
|
15
14
|
import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./validation/computedAttributesEnabledValidation.js";
|
|
@@ -65,6 +64,5 @@ export function* addTextAttributeFilterHandler(ctx, cmd) {
|
|
|
65
64
|
yield put(batchActions(configActions));
|
|
66
65
|
}
|
|
67
66
|
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
68
|
-
|
|
69
|
-
yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
|
|
67
|
+
yield call(revalidateDrillToCustomUrlParams);
|
|
70
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeAttributeFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"removeAttributeFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAM5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAkFpB"}
|
package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.js
CHANGED
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
import { difference } from "lodash-es";
|
|
3
3
|
import { batchActions } from "redux-batched-actions";
|
|
4
4
|
import { call, put, select } from "redux-saga/effects";
|
|
5
|
-
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemLocalIdentifier,
|
|
5
|
+
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemLocalIdentifier, } from "@gooddata/sdk-model";
|
|
6
6
|
import { _partition } from "@gooddata/util";
|
|
7
7
|
import { attributeFilterRemoved } from "../../../events/filters.js";
|
|
8
8
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
9
9
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
10
10
|
import { selectFilterContextAttributeFilterItems } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
11
11
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { validateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
|
|
12
|
+
import { revalidateDrillToCustomUrlParams } from "../../common/validateDrillToCustomUrlParams.js";
|
|
14
13
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
15
14
|
export function* removeAttributeFiltersHandler(ctx, cmd) {
|
|
16
15
|
const { filterLocalIds } = cmd.payload;
|
|
@@ -61,6 +60,5 @@ export function* removeAttributeFiltersHandler(ctx, cmd) {
|
|
|
61
60
|
yield dispatchDashboardEvent(attributeFilterRemoved(ctx, removedFilter, affectedChildren, cmd.correlationId));
|
|
62
61
|
}
|
|
63
62
|
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
64
|
-
|
|
65
|
-
yield call(validateDrillToCustomUrlParams, widgets.filter(isInsightWidget));
|
|
63
|
+
yield call(revalidateDrillToCustomUrlParams);
|
|
66
64
|
}
|
package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmD/C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAuC9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAkOnE,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,4BAA4B,GAClC,YAAY,CAAC,IAAI,CAAC,CAqQpB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { all, call, put, select } from "redux-saga/effects";
|
|
3
3
|
import { NotSupported } from "@gooddata/sdk-backend-spi";
|
|
4
|
-
import { areObjRefsEqual, attributeElementsIsEmpty, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, getAttributeElementsItems,
|
|
4
|
+
import { areObjRefsEqual, attributeElementsIsEmpty, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, getAttributeElementsItems, isAllTimeDashboardDateFilter, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilterOfAnyType, isDashboardDateFilterOfAnyType, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDashboardTextAttributeFilter, isParameterizedDateFilter, isSingleSelectionFilter, isUriRef, objRefToString, serializeObjRef, updateAttributeElementsItems, } from "@gooddata/sdk-model";
|
|
5
5
|
import { _compact, _partition, _uniqBy } from "@gooddata/util";
|
|
6
|
-
import {
|
|
6
|
+
import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
7
7
|
import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
|
|
8
8
|
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
9
9
|
import { invalidArgumentsProvided } from "../../events/general.js";
|
|
@@ -21,6 +21,7 @@ import { resolveDisplayFormMetadata, } from "../../utils/displayFormResolver.js"
|
|
|
21
21
|
import { resolveAndRegisterDisplayFormMetadata } from "./attributeFilter/resolveDisplayFormMetadata.js";
|
|
22
22
|
import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./attributeFilter/validation/computedAttributesEnabledValidation.js";
|
|
23
23
|
import { canApplyDateFilter } from "./common.js";
|
|
24
|
+
import { toUpsertDateFilterPayload } from "./tabSync/tabSyncRules.js";
|
|
24
25
|
import { beginTabSync, endTabSync, putTabSynced } from "./tabSync/tabSyncSaga.js";
|
|
25
26
|
import { writtenFiltersOf } from "./tabSync/writtenTargets.js";
|
|
26
27
|
function classifyRestore(type, restoresOriginal) {
|
|
@@ -134,11 +135,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
|
-
if (filters.some((filter) =>
|
|
138
|
-
yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_NOT_SUPPORTED));
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (filters.some(isParameterizedDateFilter)) {
|
|
138
|
+
if (filters.some((filter) => isDashboardParameterizedDateFilter(filter) || isParameterizedDateFilter(filter))) {
|
|
142
139
|
yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED));
|
|
143
140
|
return;
|
|
144
141
|
}
|
|
@@ -180,6 +177,10 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
180
177
|
return dashboardFilterToFilterContextItem(filter, !!ctx.backend.capabilities.supportsMultipleDateFilters);
|
|
181
178
|
})).filter((filter) => !((isDashboardAttributeFilterItem(filter) || isDashboardMeasureValueFilter(filter)) &&
|
|
182
179
|
isDashboardFilterUsingRestrictedObject(filter, unavailableObjects)) && !(matchByLocalIdentifier && addressesRestrictedFilter(filter)));
|
|
180
|
+
if (containsAbsoluteGranularityDateFilterWithDataSet(normalizedFilters)) {
|
|
181
|
+
yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED));
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
183
184
|
const disabledComputedAttributeRef = yield call(findDisabledComputedAttributeRef, [
|
|
184
185
|
...normalizedFilters
|
|
185
186
|
.filter(isDashboardAttributeFilterItem)
|
|
@@ -197,7 +198,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
197
198
|
.filter((f) => dashboardAttributeFilterItemLocalIdentifier(f))
|
|
198
199
|
.slice()
|
|
199
200
|
.reverse(), (f) => dashboardAttributeFilterItemLocalIdentifier(f)).reverse();
|
|
200
|
-
const supportedFilters = normalizedFilters.filter((filter) => isDashboardAttributeFilter(filter) ||
|
|
201
|
+
const supportedFilters = normalizedFilters.filter((filter) => isDashboardAttributeFilter(filter) || isDashboardDateFilterOfAnyType(filter));
|
|
201
202
|
// Measure value filters use whole-condition replacement keyed by localIdentifier; deduplicate
|
|
202
203
|
// by localIdentifier (last occurrence wins, mirroring text attribute filter handling).
|
|
203
204
|
const measureValueFilters = _uniqBy(normalizedFilters.filter(isDashboardMeasureValueFilter).slice().reverse(), (f) => dashboardMeasureValueFilterLocalIdentifier(f)).reverse();
|
|
@@ -212,7 +213,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
212
213
|
}
|
|
213
214
|
const identification = isDashboardAttributeFilter(filter)
|
|
214
215
|
? dashboardAttributeFilterItemDisplayForm(filter)
|
|
215
|
-
: filter
|
|
216
|
+
: dashboardFilterObjRef(filter);
|
|
216
217
|
let config;
|
|
217
218
|
if (isDashboardAttributeFilter(filter)) {
|
|
218
219
|
config = attributeFilterConfigs.find((config) => config.localIdentifier === dashboardAttributeFilterItemLocalIdentifier(filter));
|
|
@@ -223,12 +224,12 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
223
224
|
? objRefToString(identification) + secondaryIdentification
|
|
224
225
|
: identification + secondaryIdentification;
|
|
225
226
|
});
|
|
226
|
-
const [dateFilters, attributeFilters] = _partition(uniqueFilters,
|
|
227
|
-
const [[commonDateFilter], dateFiltersWithDimension] = _partition(dateFilters,
|
|
227
|
+
const [dateFilters, attributeFilters] = _partition(uniqueFilters, isDashboardDateFilterOfAnyType);
|
|
228
|
+
const [[commonDateFilter], dateFiltersWithDimension] = _partition(dateFilters, isDashboardCommonDateFilterOfAnyType);
|
|
228
229
|
const selectionTypeMap = yield call(selectAttributeFilterConfigsSelectionTypeMapTabAware, tabLocalIdentifier);
|
|
229
230
|
const [attributeFilterResult, commonDateFilterUpdateActions, dateFiltersUpdateActions, measureValueFilterUpdateActions,] = yield all([
|
|
230
231
|
call(getAttributeFiltersUpdateActions, [...attributeFilters].reverse(), textAttributeFilters, attributeFilterConfigs, resetOthers, ctx, tabLocalIdentifier, selectionTypeMap, matchByLocalIdentifier),
|
|
231
|
-
call(getDateFilterUpdateActions, commonDateFilter, resetOthers, tabLocalIdentifier),
|
|
232
|
+
call(getDateFilterUpdateActions, commonDateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier),
|
|
232
233
|
call(getDateFiltersUpdateActions, dateFiltersWithDimension, resetOthers, tabLocalIdentifier),
|
|
233
234
|
call(getMeasureValueFiltersUpdateActions, measureValueFilters, resetOthers, tabLocalIdentifier),
|
|
234
235
|
]);
|
|
@@ -649,40 +650,18 @@ function* getAttributeFiltersUpdateActions(attributeFilters, textAttributeFilter
|
|
|
649
650
|
}
|
|
650
651
|
return { actions: updateActions, displayFormsToResolve };
|
|
651
652
|
}
|
|
652
|
-
function* getDateFilterUpdateActions(dateFilter, resetOthers, tabLocalIdentifier) {
|
|
653
|
+
function* getDateFilterUpdateActions(dateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier) {
|
|
653
654
|
if (dateFilter) {
|
|
654
|
-
|
|
655
|
+
// a reset restores the stored filter with granularity, which loads without the check too
|
|
656
|
+
const canApply = restorePerTabOriginals && isDashboardAbsoluteGranularityDateFilter(dateFilter)
|
|
657
|
+
? true
|
|
658
|
+
: yield call(canApplyDateFilter, dateFilter);
|
|
655
659
|
if (!canApply) {
|
|
656
660
|
return [];
|
|
657
661
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
const emptyValueHandlingObj = dateFilter.dateFilter.emptyValueHandling
|
|
662
|
-
? { emptyValueHandling: dateFilter.dateFilter.emptyValueHandling }
|
|
663
|
-
: {};
|
|
664
|
-
const upsertPayload = isAllTimeDashboardDateFilter(dateFilter)
|
|
665
|
-
? {
|
|
666
|
-
type: "allTime",
|
|
667
|
-
dataSet: dateFilter.dateFilter.dataSet,
|
|
668
|
-
...localIdentifierObj,
|
|
669
|
-
...emptyValueHandlingObj,
|
|
670
|
-
tabLocalIdentifier,
|
|
671
|
-
}
|
|
672
|
-
: {
|
|
673
|
-
type: dateFilter.dateFilter.type,
|
|
674
|
-
granularity: dateFilter.dateFilter.granularity,
|
|
675
|
-
from: dateFilter.dateFilter.from,
|
|
676
|
-
to: dateFilter.dateFilter.to,
|
|
677
|
-
dataSet: dateFilter.dateFilter.dataSet,
|
|
678
|
-
...localIdentifierObj,
|
|
679
|
-
...(dateFilter.dateFilter.boundedFilter
|
|
680
|
-
? { boundedFilter: dateFilter.dateFilter.boundedFilter }
|
|
681
|
-
: {}),
|
|
682
|
-
...emptyValueHandlingObj,
|
|
683
|
-
tabLocalIdentifier,
|
|
684
|
-
};
|
|
685
|
-
return [tabsActions.upsertDateFilter(upsertPayload)];
|
|
662
|
+
return [
|
|
663
|
+
tabsActions.upsertDateFilter({ ...toUpsertDateFilterPayload(dateFilter), tabLocalIdentifier }),
|
|
664
|
+
];
|
|
686
665
|
}
|
|
687
666
|
else if (resetOthers) {
|
|
688
667
|
return [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SagaIterator } from "redux-saga";
|
|
2
|
-
import { type
|
|
2
|
+
import { type DashboardDateFilterOfAnyType, type IDashboardAttributeFilterConfig, type IFilterContextDefinition } from "@gooddata/sdk-model";
|
|
3
3
|
import { type IDashboardCommand } from "../../commands/base.js";
|
|
4
4
|
import { type IWorkingFilterContextDefinition } from "../../store/tabs/filterContext/filterContextState.js";
|
|
5
5
|
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
@@ -19,7 +19,7 @@ export declare function captureFilterContextByTabSnapshot(): SagaIterator<IFilte
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function dispatchFilterContextChangedForMutatedTabs(ctx: DashboardContext, cmd: IDashboardCommand, snapshot: IFilterContextByTabSnapshot, skippedTabId?: string): SagaIterator<void>;
|
|
21
21
|
export declare function dispatchFilterContextChanged(ctx: DashboardContext, cmd: IDashboardCommand, tabLocalIdentifier?: string): SagaIterator<void>;
|
|
22
|
-
export declare function canApplyDateFilter(dateFilter:
|
|
22
|
+
export declare function canApplyDateFilter(dateFilter: DashboardDateFilterOfAnyType): SagaIterator<boolean>;
|
|
23
23
|
export declare function resetCrossFiltering(cmd: IDashboardCommand): Generator<import("redux-saga/effects").PutEffect<import("../../commands/filters.js").IRemoveAttributeFilters> | import("redux-saga/effects").PutEffect<{
|
|
24
24
|
payload: string | undefined;
|
|
25
25
|
type: "drill/resetCrossFiltering";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,+BAA+B,EACpC,KAAK,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAGhC,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAwBhE,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AAI5G,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAE,KAAK,eAAe,EAA0C,MAAM,0BAA0B,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,CAAC;IAC9E,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,SAAS,CAAC,CAAC;IAC5F,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,CAAC;CACtF;AAED,wBAAiB,iCAAiC,IAAI,YAAY,CAAC,2BAA2B,CAAC,CAU9F;AAED;;GAEG;AACH,wBAAiB,0CAA0C,CACvD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,QAAQ,EAAE,2BAA2B,EACrC,YAAY,CAAC,EAAE,MAAM,GACtB,YAAY,CAAC,IAAI,CAAC,CAwBpB;AAED,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC5B,YAAY,CAAC,IAAI,CAAC,CAkCpB;AAED,wBAAiB,kBAAkB,CAAC,UAAU,EAAE,4BAA4B,GAAG,YAAY,CAAC,OAAO,CAAC,CAyCnG;AAED,wBAAiB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB;;;yEAU1D;AAED,wBAAiB,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,8YA4B1F;AAED,wBAAiB,4BAA4B;;;mBAE5C"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { call, put, select } from "redux-saga/effects";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
|
+
import { isDashboardAbsoluteGranularityDateFilter, isDashboardParameterizedDateFilter, } from "@gooddata/sdk-model";
|
|
4
5
|
import { _isEqual } from "@gooddata/util";
|
|
5
6
|
import { findDateFilterOptionByValue } from "../../../_staging/dateFilterConfig/dateFilterOptionMapping.js";
|
|
6
7
|
import { removeAttributeFilters } from "../../commands/filters.js";
|
|
7
8
|
import { filterContextChanged, filterContextWorkingSelectionApplied } from "../../events/filters.js";
|
|
8
9
|
import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
|
|
9
|
-
import { selectEnableImmediateAttributeFilterDisplayAsLabelMigration } from "../../store/config/configSelectors.js";
|
|
10
|
+
import { selectEnableImmediateAttributeFilterDisplayAsLabelMigration, selectSettings, } from "../../store/config/configSelectors.js";
|
|
10
11
|
import { selectCrossFilteringFiltersLocalIdentifiers, selectIsCrossFiltering, } from "../../store/drill/drillSelectors.js";
|
|
11
12
|
import { drillActions } from "../../store/drill/index.js";
|
|
12
13
|
import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
@@ -63,6 +64,20 @@ export function* dispatchFilterContextChanged(ctx, cmd, tabLocalIdentifier) {
|
|
|
63
64
|
}
|
|
64
65
|
export function* canApplyDateFilter(dateFilter) {
|
|
65
66
|
const effectiveDateFilterOptions = yield select(selectEffectiveDateFilterOptions);
|
|
67
|
+
if (isDashboardAbsoluteGranularityDateFilter(dateFilter)) {
|
|
68
|
+
const settings = yield select(selectSettings);
|
|
69
|
+
const absoluteForm = effectiveDateFilterOptions?.absoluteForm;
|
|
70
|
+
const { granularity } = dateFilter.dashboardAbsoluteGranularityDateFilter;
|
|
71
|
+
// the configuration lists the week as the US week
|
|
72
|
+
const tab = granularity === "GDC.time.week" ? "GDC.time.week_us" : granularity;
|
|
73
|
+
return (!!settings.enableAbsoluteDateFilterGranularity &&
|
|
74
|
+
!!absoluteForm?.visible &&
|
|
75
|
+
!!absoluteForm.availableGranularities?.includes(tab));
|
|
76
|
+
}
|
|
77
|
+
// periods are not among the date filter options yet
|
|
78
|
+
if (isDashboardParameterizedDateFilter(dateFilter)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
66
81
|
const targetOption = findDateFilterOptionByValue(dateFilter, effectiveDateFilterOptions);
|
|
67
82
|
if (!targetOption) {
|
|
68
83
|
if (dateFilter.dateFilter.type === "absolute") {
|
package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SagaIterator } from "redux-saga";
|
|
2
|
-
import { type ChangeDateFilterSelection } from "../../../commands/filters.js";
|
|
2
|
+
import { type ChangeDateFilterSelection, type ChangeDateFilterSelectionOfAnyType } from "../../../commands/filters.js";
|
|
3
3
|
import { type DashboardContext } from "../../../types/commonTypes.js";
|
|
4
4
|
export declare function changeDateFilterSelectionHandler(ctx: DashboardContext, cmd: ChangeDateFilterSelection): SagaIterator<void>;
|
|
5
|
+
export declare function changeDateFilterSelectionOfAnyTypeHandler(ctx: DashboardContext, cmd: ChangeDateFilterSelectionOfAnyType): SagaIterator<void>;
|
|
5
6
|
//# sourceMappingURL=changeDateFilterSelectionHandler.d.ts.map
|
package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeDateFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"changeDateFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB/C,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EAE1C,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKtE,wBAAiB,gCAAgC,CAC7C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,yBAAyB,GAC/B,YAAY,CAAC,IAAI,CAAC,CAgDpB;AAED,wBAAiB,yCAAyC,CACtD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,kCAAkC,GACxC,YAAY,CAAC,IAAI,CAAC,CA+BpB"}
|
package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { toNumber } from "lodash-es";
|
|
3
3
|
import { call, select } from "redux-saga/effects";
|
|
4
|
-
import { newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
5
|
-
import {
|
|
4
|
+
import { dashboardFilterObjRef, isDashboardDateFilter, isDashboardParameterizedDateFilter, newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
5
|
+
import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
6
|
+
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
7
|
+
import { dateFilterChanged, dateFilterOfAnyTypeChanged } from "../../../events/filters.js";
|
|
6
8
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
7
9
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
8
10
|
import { selectIsApplyFiltersAllAtOnceEnabledAndSet } from "../../../store/config/configSelectors.js";
|
|
9
11
|
import { selectIsCrossFiltering } from "../../../store/drill/drillSelectors.js";
|
|
10
|
-
import {
|
|
12
|
+
import { selectFilterContextDateFilterByDataSet, selectFilterContextDateFilterOfAnyType, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
11
13
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
12
14
|
import { canApplyDateFilter, resetCrossFiltering } from "../common.js";
|
|
15
|
+
import { toUpsertDateFilterPayload } from "../tabSync/tabSyncRules.js";
|
|
13
16
|
import { beginTabSync, endTabSync, putTabSynced } from "../tabSync/tabSyncSaga.js";
|
|
14
17
|
export function* changeDateFilterSelectionHandler(ctx, cmd) {
|
|
15
18
|
const isAllTime = cmd.payload.type === "relative" &&
|
|
@@ -18,38 +21,54 @@ export function* changeDateFilterSelectionHandler(ctx, cmd) {
|
|
|
18
21
|
cmd.payload.to === undefined;
|
|
19
22
|
const canApply = yield call(canApplyDateFilter, dateFilterSelectionToDateFilter(cmd.payload));
|
|
20
23
|
if (!canApply) {
|
|
21
|
-
throw invalidArgumentsProvided(ctx, cmd,
|
|
24
|
+
throw invalidArgumentsProvided(ctx, cmd, INVALID_BY_DATE_FILTER_CONFIG);
|
|
22
25
|
}
|
|
23
|
-
const session = yield call(beginTabSync);
|
|
24
|
-
const isApplyAllAtOnceEnabledAndSet = yield select(selectIsApplyFiltersAllAtOnceEnabledAndSet);
|
|
25
|
-
const isWorkingSelectionChange = cmd.payload.isWorkingSelectionChange && isApplyAllAtOnceEnabledAndSet;
|
|
26
26
|
const localIdentifierObj = cmd.payload.localIdentifier
|
|
27
27
|
? { localIdentifier: cmd.payload.localIdentifier }
|
|
28
28
|
: {};
|
|
29
|
+
const emptyValueHandlingObj = cmd.payload.emptyValueHandling
|
|
30
|
+
? { emptyValueHandling: cmd.payload.emptyValueHandling }
|
|
31
|
+
: {};
|
|
32
|
+
const upsertPayload = isAllTime
|
|
33
|
+
? {
|
|
34
|
+
type: "allTime",
|
|
35
|
+
dataSet: cmd.payload.dataSet,
|
|
36
|
+
...localIdentifierObj,
|
|
37
|
+
...emptyValueHandlingObj,
|
|
38
|
+
}
|
|
39
|
+
: {
|
|
40
|
+
type: cmd.payload.type,
|
|
41
|
+
granularity: cmd.payload.granularity,
|
|
42
|
+
from: cmd.payload.from,
|
|
43
|
+
to: cmd.payload.to,
|
|
44
|
+
dataSet: cmd.payload.dataSet,
|
|
45
|
+
...localIdentifierObj,
|
|
46
|
+
...(cmd.payload.boundedFilter ? { boundedFilter: cmd.payload.boundedFilter } : {}),
|
|
47
|
+
...emptyValueHandlingObj,
|
|
48
|
+
};
|
|
49
|
+
yield call(upsertDateFilterSelection, ctx, cmd, upsertPayload, cmd.payload.dataSet, cmd.payload.dateFilterOptionLocalId, cmd.payload.isWorkingSelectionChange);
|
|
50
|
+
}
|
|
51
|
+
export function* changeDateFilterSelectionOfAnyTypeHandler(ctx, cmd) {
|
|
52
|
+
const { filter, dateFilterOptionLocalId, isWorkingSelectionChange } = cmd.payload;
|
|
53
|
+
if (containsAbsoluteGranularityDateFilterWithDataSet(filter ? [filter] : [])) {
|
|
54
|
+
throw invalidArgumentsProvided(ctx, cmd, ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED);
|
|
55
|
+
}
|
|
56
|
+
if (isDashboardParameterizedDateFilter(filter)) {
|
|
57
|
+
throw invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED);
|
|
58
|
+
}
|
|
59
|
+
const canApply = yield call(canApplyDateFilter, filter ?? newAllTimeDashboardDateFilter());
|
|
60
|
+
if (!canApply) {
|
|
61
|
+
throw invalidArgumentsProvided(ctx, cmd, INVALID_BY_DATE_FILTER_CONFIG);
|
|
62
|
+
}
|
|
63
|
+
yield call(upsertDateFilterSelection, ctx, cmd, filter ? toUpsertDateFilterPayload(filter) : { type: "allTime" }, filter ? dashboardFilterObjRef(filter) : undefined, dateFilterOptionLocalId, isWorkingSelectionChange);
|
|
64
|
+
}
|
|
65
|
+
const INVALID_BY_DATE_FILTER_CONFIG = "Cannot apply a date filter that is invalid by the current dateFilterConfig.";
|
|
66
|
+
function* upsertDateFilterSelection(ctx, cmd, upsertPayload, dataSet, dateFilterOptionLocalId, requestedWorkingSelectionChange) {
|
|
67
|
+
const session = yield call(beginTabSync);
|
|
68
|
+
const isApplyAllAtOnceEnabledAndSet = yield select(selectIsApplyFiltersAllAtOnceEnabledAndSet);
|
|
69
|
+
const isWorkingSelectionChange = requestedWorkingSelectionChange && isApplyAllAtOnceEnabledAndSet;
|
|
29
70
|
yield call(putTabSynced, session, [
|
|
30
|
-
tabsActions.upsertDateFilter(
|
|
31
|
-
? {
|
|
32
|
-
type: "allTime",
|
|
33
|
-
dataSet: cmd.payload.dataSet,
|
|
34
|
-
isWorkingSelectionChange,
|
|
35
|
-
...localIdentifierObj,
|
|
36
|
-
...(cmd.payload.emptyValueHandling
|
|
37
|
-
? { emptyValueHandling: cmd.payload.emptyValueHandling }
|
|
38
|
-
: {}),
|
|
39
|
-
}
|
|
40
|
-
: {
|
|
41
|
-
type: cmd.payload.type,
|
|
42
|
-
granularity: cmd.payload.granularity,
|
|
43
|
-
from: cmd.payload.from,
|
|
44
|
-
to: cmd.payload.to,
|
|
45
|
-
dataSet: cmd.payload.dataSet,
|
|
46
|
-
isWorkingSelectionChange,
|
|
47
|
-
...localIdentifierObj,
|
|
48
|
-
...(cmd.payload.boundedFilter ? { boundedFilter: cmd.payload.boundedFilter } : {}),
|
|
49
|
-
...(cmd.payload.emptyValueHandling
|
|
50
|
-
? { emptyValueHandling: cmd.payload.emptyValueHandling }
|
|
51
|
-
: {}),
|
|
52
|
-
}),
|
|
71
|
+
tabsActions.upsertDateFilter({ ...upsertPayload, isWorkingSelectionChange }),
|
|
53
72
|
]);
|
|
54
73
|
if (!isWorkingSelectionChange) {
|
|
55
74
|
const isCrossFiltering = yield select(selectIsCrossFiltering);
|
|
@@ -57,10 +76,13 @@ export function* changeDateFilterSelectionHandler(ctx, cmd) {
|
|
|
57
76
|
yield call(resetCrossFiltering, cmd);
|
|
58
77
|
}
|
|
59
78
|
}
|
|
60
|
-
const affectedFilter =
|
|
61
|
-
? yield select(selectFilterContextDateFilterByDataSet(
|
|
62
|
-
: yield select(
|
|
63
|
-
|
|
79
|
+
const affectedFilter = dataSet
|
|
80
|
+
? yield select(selectFilterContextDateFilterByDataSet(dataSet))
|
|
81
|
+
: yield select(selectFilterContextDateFilterOfAnyType);
|
|
82
|
+
if (!affectedFilter || isDashboardDateFilter(affectedFilter)) {
|
|
83
|
+
yield dispatchDashboardEvent(dateFilterChanged(ctx, affectedFilter, dateFilterOptionLocalId, cmd.correlationId));
|
|
84
|
+
}
|
|
85
|
+
yield dispatchDashboardEvent(dateFilterOfAnyTypeChanged(ctx, affectedFilter, dateFilterOptionLocalId, cmd.correlationId));
|
|
64
86
|
yield call(endTabSync, ctx, cmd, session);
|
|
65
87
|
}
|
|
66
88
|
function dateFilterSelectionToDateFilter(dateFilterSelection) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterViewHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/filterViewHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"filterViewHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/filterViewHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAuB/C,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAoClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiBnE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,CAqEtG;AAMD,wBAAiB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsB1G;AAOD,wBAAiB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsBxG;AA6DD;;;;;;;GAOG;AACH,wBAAiB,qCAAqC,CAClD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,kBAAkB,EAAE,MAAM,GAC3B,YAAY,CAAC,IAAI,CAAC,CAyCpB;AAMD,wBAAiB,6BAA6B,CAC1C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,uBAAuB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAuBpB;AAED,wBAAiB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAcnF"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { call, put, select } from "redux-saga/effects";
|
|
3
3
|
import { areObjRefsEqual, isDashboardAttributeFilter, } from "@gooddata/sdk-model";
|
|
4
4
|
import { defaultErrorHandler } from "@gooddata/sdk-ui";
|
|
5
|
-
import {
|
|
5
|
+
import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
6
|
+
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED, containsDashboardParameterizedDateFilter, } from "../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
6
7
|
import { changeFilterContextSelectionByParams, } from "../../commands/filters.js";
|
|
7
8
|
import { changeParameterValues } from "../../commands/parameters.js";
|
|
8
9
|
import { filterViewApplicationFailed, filterViewApplicationSucceeded, filterViewCreationFailed, filterViewCreationSucceeded, filterViewDefaultStatusChangeFailed, filterViewDefaultStatusChangeSucceeded, filterViewDeletionFailed, filterViewDeletionSucceeded, } from "../../events/filters.js";
|
|
@@ -98,8 +99,12 @@ function* findFilterView(ref) {
|
|
|
98
99
|
}
|
|
99
100
|
export function* applyFilterViewHandler(ctx, cmd) {
|
|
100
101
|
const filterView = yield call(findFilterView, cmd.payload.ref);
|
|
101
|
-
if (filterView &&
|
|
102
|
-
console.warn(`The filter view "${filterView.name}" was not applied. ${
|
|
102
|
+
if (filterView && containsAbsoluteGranularityDateFilterWithDataSet(filterView.filterContext.filters)) {
|
|
103
|
+
console.warn(`The filter view "${filterView.name}" was not applied. ${ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED}`);
|
|
104
|
+
yield put(filterViewApplicationFailed(ctx));
|
|
105
|
+
}
|
|
106
|
+
else if (filterView && containsDashboardParameterizedDateFilter(filterView.filterContext.filters)) {
|
|
107
|
+
console.warn(`The filter view "${filterView.name}" was not applied. ${PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED}`);
|
|
103
108
|
yield put(filterViewApplicationFailed(ctx));
|
|
104
109
|
}
|
|
105
110
|
else if (filterView) {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { type DashboardDateFilterOfAnyType } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IUpsertDateFilterPayload } from "../../../store/tabs/filterContext/filterContextReducers.js";
|
|
1
3
|
import { type TabSyncActionsRule } from "./tabSyncScope.js";
|
|
2
4
|
type AnyTabSyncRule = TabSyncActionsRule<any>;
|
|
5
|
+
/**
|
|
6
|
+
* The upsert payload that writes the date filter.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function toUpsertDateFilterPayload(filter: DashboardDateFilterOfAnyType): IUpsertDateFilterPayload;
|
|
3
11
|
/**
|
|
4
12
|
* Tabs slice actions that are mirrored to other tabs when filters persist across tabs, keyed by action type.
|
|
5
13
|
* Actions without a rule apply to their own tab only, which includes every filter configuration change.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabSyncRules.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncRules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabSyncRules.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncRules.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,4BAA4B,EAmBpC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KAAK,wBAAwB,EAEhC,MAAM,4DAA4D,CAAC;AAepE,OAAO,EAA4B,KAAK,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAExG,KAAK,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AA4N9C;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,4BAA4B,GAAG,wBAAwB,CAkCxG;AAsXD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAG3D,CAAC"}
|