@gooddata/sdk-ui-dashboard 11.71.0-alpha.0 → 11.71.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 +49 -49
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts +0 -7
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.d.ts.map +1 -1
- package/esm/_staging/dashboard/absoluteGranularityDateFilters.js +0 -17
- package/esm/_staging/dashboard/dashboardFilterContext.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterContext.js +9 -1
- package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardFilterConverter.js +13 -5
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts +1 -6
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts.map +1 -1
- package/esm/_staging/dashboard/parameterizedDateFilters.js +1 -13
- package/esm/_staging/dateFilterConfig/periodPresets.d.ts +11 -0
- package/esm/_staging/dateFilterConfig/periodPresets.d.ts.map +1 -0
- package/esm/_staging/dateFilterConfig/periodPresets.js +15 -0
- package/esm/_staging/sharedHooks/useDateFiltersTitles.d.ts +2 -2
- package/esm/_staging/sharedHooks/useDateFiltersTitles.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useDateFiltersTitles.js +7 -5
- package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useFiltersNamings.js +18 -10
- package/esm/index.d.ts +4 -4
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -3
- package/esm/kdaDialog/components/KdaSummaryHeadline.d.ts.map +1 -1
- package/esm/kdaDialog/components/KdaSummaryHeadline.js +3 -1
- package/esm/kdaDialog/components/bars/DateBar.js +1 -1
- package/esm/kdaDialog/composition/KeyDriversPanel.d.ts.map +1 -1
- package/esm/kdaDialog/composition/KeyDriversPanel.js +5 -2
- package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialog.js +4 -3
- package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts +5 -1
- package/esm/kdaDialog/dialog/KdaDialogActionButtons.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialogActionButtons.js +33 -5
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts +5 -1
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialogFloatingStatusBar.js +2 -2
- package/esm/kdaDialog/dialog/KdaReplaceConfirmationDialog.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaReplaceConfirmationDialog.js +9 -1
- package/esm/kdaDialog/utils.d.ts +6 -1
- package/esm/kdaDialog/utils.d.ts.map +1 -1
- package/esm/kdaDialog/utils.js +7 -2
- package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.js +5 -10
- package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/changeDateFilterTitleHandler.js +8 -6
- package/esm/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/changeDateFilterWithDimensionModeHandler.js +10 -6
- package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +28 -29
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +7 -8
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +0 -6
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts +1 -2
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.js +1 -2
- package/esm/model/commandHandlers/drill/crossFilteringHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/crossFilteringHandler.js +1 -0
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +5 -6
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +81 -64
- package/esm/model/commandHandlers/filterContext/dateFilter/addDateFilterHandler.js +2 -2
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +2 -6
- package/esm/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.js +8 -4
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.js +21 -17
- package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.d.ts +2 -2
- package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.js +2 -2
- package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +1 -11
- package/esm/model/commandHandlers/filterContext/removeRestrictedFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/removeRestrictedFiltersHandler.js +3 -3
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +13 -6
- package/esm/model/commandHandlers/widgets/changeInsightWidgetFilterSettingsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/changeInsightWidgetFilterSettingsHandler.js +2 -2
- package/esm/model/commandHandlers/widgets/changeRichTextWidgetFilterSettingsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/changeRichTextWidgetFilterSettingsHandler.js +2 -2
- package/esm/model/commandHandlers/widgets/common/filterOperations.d.ts +3 -3
- package/esm/model/commandHandlers/widgets/common/filterOperations.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/common/filterOperations.js +14 -14
- package/esm/model/commandHandlers/widgets/common/filterReferences.d.ts +2 -2
- package/esm/model/commandHandlers/widgets/common/filterReferences.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/common/filterReferences.js +1 -1
- package/esm/model/commandHandlers/widgets/validation/filterValidation.d.ts +2 -2
- package/esm/model/commandHandlers/widgets/validation/filterValidation.d.ts.map +1 -1
- package/esm/model/commandHandlers/widgets/validation/filterValidation.js +4 -4
- package/esm/model/commands/filters.d.ts +1 -2
- package/esm/model/commands/filters.d.ts.map +1 -1
- 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 +107 -0
- package/esm/model/events/filters.d.ts.map +1 -1
- package/esm/model/events/filters.js +54 -0
- package/esm/model/events/index.d.ts +2 -2
- package/esm/model/events/index.d.ts.map +1 -1
- package/esm/model/events/insight.d.ts +12 -2
- package/esm/model/events/insight.d.ts.map +1 -1
- package/esm/model/events/insight.js +2 -1
- package/esm/model/events/richText.d.ts +12 -2
- package/esm/model/events/richText.d.ts.map +1 -1
- package/esm/model/events/richText.js +2 -1
- package/esm/model/react/useWidgetFilters.d.ts.map +1 -1
- package/esm/model/react/useWidgetFilters.js +8 -10
- package/esm/model/store/config/configSelectors.d.ts +6 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.js +20 -39
- package/esm/model/store/insights/insightsSelectors.d.ts.map +1 -1
- package/esm/model/store/insights/insightsSelectors.js +9 -3
- package/esm/model/store/meta/metaSelectors.js +3 -3
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +28 -2
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +36 -25
- package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts +43 -3
- package/esm/model/store/tabs/filterContext/filterContextSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextSelectors.js +53 -9
- package/esm/model/store/tabs/filterContext/filterContextUtils.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextUtils.js +18 -20
- package/esm/model/store/tabs/filterContext/filterSync.d.ts +7 -0
- package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterSync.js +32 -44
- package/esm/model/utils/widgetFilters.d.ts.map +1 -1
- package/esm/model/utils/widgetFilters.js +4 -3
- package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/AlertingConnector.js +6 -0
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +6 -0
- package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts +1 -0
- package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.js +56 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +4 -1
- package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.d.ts +10 -0
- package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useParameterizedDateFilterBlocksAutomation.js +20 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +2 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.js +5 -3
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.js +6 -4
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts +2 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +43 -7
- package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.d.ts +12 -0
- package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.d.ts.map +1 -0
- package/esm/presentation/automations/shared/components/ParameterizedDateFilterNotSupportedDialog.js +31 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +1 -0
- package/esm/presentation/constants/automations.d.ts +1 -0
- package/esm/presentation/constants/automations.d.ts.map +1 -1
- package/esm/presentation/constants/automations.js +19 -0
- package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardInner.js +18 -10
- package/esm/presentation/dragAndDrop/draggableDateFilter/DefaultDateFilterDraggingComponent.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableDateFilter/DefaultDateFilterDraggingComponent.js +3 -2
- package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts +3 -3
- package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableDateFilter/DraggableDateFilter.js +1 -1
- package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZoneHint.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZoneHint.js +2 -2
- package/esm/presentation/dragAndDrop/types.d.ts +2 -2
- package/esm/presentation/dragAndDrop/types.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/useFilterDeleteDrop.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/useFilterDeleteDrop.js +2 -2
- package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.js +3 -3
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts +15 -3
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.js +27 -31
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts +3 -3
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.js +3 -2
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.d.ts +2 -2
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/AddLimitingItemDialog.d.ts +2 -2
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/AddLimitingItemDialog.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.d.ts +2 -2
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/DateFiltersPage.js +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.d.ts +2 -2
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.d.ts +3 -3
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/shared/limitingItemsHook.js +2 -4
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +42 -20
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +10 -7
- package/esm/presentation/filterBar/filterBar/DefaultFilterBar.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBar.js +3 -3
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarContainer.js +13 -4
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +9 -8
- package/esm/presentation/filterBar/filterBar/filterGroupUtils.js +3 -3
- package/esm/presentation/filterBar/filterBar/filterViews/FilterViews.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/filterViews/FilterViews.js +13 -2
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +5 -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 +9 -9
- package/esm/presentation/filterBar/utils.d.ts.map +1 -1
- package/esm/presentation/filterBar/utils.js +2 -2
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +13 -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 +20 -7
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +13 -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 +15 -2
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +20 -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 +20 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +13 -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 +14 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +13 -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 +15 -2
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +13 -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 +16 -3
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +13 -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 +16 -3
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +13 -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 +17 -4
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +13 -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 +14 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +13 -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 +17 -4
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +13 -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 +15 -2
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +13 -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 +20 -7
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +13 -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 +13 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +13 -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 +22 -9
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +13 -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 +14 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +13 -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 +17 -4
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +33 -6
- package/esm/presentation/widget/common/configuration/DateDatasetFilter.js +2 -2
- package/esm/presentation/widget/common/configuration/FilterConfiguration.d.ts.map +1 -1
- package/esm/presentation/widget/common/configuration/FilterConfiguration.js +5 -4
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +9 -2
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +3 -21
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.d.ts +6 -0
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.d.ts.map +1 -0
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getDrillDialogInsightDescription.js +24 -0
- package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/DrillFilters/drillFiltersConfigUtils.js +3 -3
- package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/DrillFilters/optionMappings/mapDashboardFilterToOption.js +5 -4
- package/esm/sdk-ui-dashboard.d.ts +231 -14
- package/package.json +23 -23
- package/styles/css/kdaDialog.css +7 -0
- package/styles/css/kdaDialog.css.map +1 -1
- package/styles/css/main.css +17 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/kdaDialog.scss +11 -0
|
@@ -5,8 +5,6 @@ import { walkLayout, } from "@gooddata/sdk-backend-spi";
|
|
|
5
5
|
import { areObjRefsEqual, isDrillToInsight, isInsightWidget, isVisualizationSwitcherWidget, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
6
6
|
import { _uniqBy } from "@gooddata/util";
|
|
7
7
|
import { createDisplayFormMap, createDisplayFormMapFromCatalog, } from "../../../../_staging/catalog/displayFormMap.js";
|
|
8
|
-
import { assertNoAbsoluteGranularityDateFilterWithDataSetInDashboards } from "../../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
9
|
-
import { assertNoParameterizedDateFilterInDashboards } from "../../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
10
8
|
import { deriveAbsoluteFormGranularitiesFromRelativeForm } from "../../../../_staging/dateFilterConfig/merge.js";
|
|
11
9
|
import { changeDashboardTimezoneOverride } from "../../../commands/timezone.js";
|
|
12
10
|
import { dashboardInitialized } from "../../../events/dashboard.js";
|
|
@@ -189,8 +187,6 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
189
187
|
];
|
|
190
188
|
const [dashboardWithReferences, { resolvedConfig: config, additionalData: { workspaceAutomationsCount, notificationChannelsCount }, }, permissions, entitlements, user, dashboardPermissions, dateHierarchyTemplates, filterViews, exportTimezone, automationTimezone,] = yield all(calls);
|
|
191
189
|
const { dashboard: loadedDashboard, references: { insights, unavailable }, } = dashboardWithReferences;
|
|
192
|
-
assertNoAbsoluteGranularityDateFilterWithDataSetInDashboards([loadedDashboard, cmd.payload.persistedDashboard], ctx.config?.overrideDefaultFilters);
|
|
193
|
-
assertNoParameterizedDateFilterInDashboards([loadedDashboard, cmd.payload.persistedDashboard], ctx.config?.overrideDefaultFilters);
|
|
194
190
|
// must be in the store before filter sanitization/resolution so they can keep forbidden refs;
|
|
195
191
|
// FF off => nothing is ever marked unavailable and behavior is unchanged
|
|
196
192
|
const unavailableReferences = yield call(loadUnavailableReferences, ctx, loadedDashboard, unavailable, Boolean(config.settings?.enableDashboardPartialRendering), !!cmd.payload.persistedDashboard);
|
|
@@ -267,8 +263,6 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
267
263
|
}
|
|
268
264
|
function* initializeNewDashboard(ctx, cmd) {
|
|
269
265
|
const { backend } = ctx;
|
|
270
|
-
assertNoAbsoluteGranularityDateFilterWithDataSetInDashboards([], ctx.config?.overrideDefaultFilters);
|
|
271
|
-
assertNoParameterizedDateFilterInDashboards([], ctx.config?.overrideDefaultFilters);
|
|
272
266
|
const [{ resolvedConfig: config, additionalData: { notificationChannelsCount, workspaceAutomationsCount }, loadedCatalog, }, permissions, entitlements, user, listedDashboards, dateHierarchyTemplates, , exportTimezone,] = yield all([
|
|
273
267
|
// the catalog load rides along with the config resolution because its computed-attributes
|
|
274
268
|
// part is feature-flag dependent - see resolveDashboardConfigAndFeatureFlagDependentCalls
|
package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ import { type DashboardContext } from "../../../types/commonTypes.js";
|
|
|
9
9
|
* only when the `enableDateRangeParameters` setting is on. With neither on, no request is sent. A list whose
|
|
10
10
|
* setting is off is empty and `gated-off`, whatever the request did. When the request fails, each list whose
|
|
11
11
|
* setting is on is `failed` and the dashboard renders without parameters. String parameters are kept only
|
|
12
|
-
* when `enableStringParameters` is on (the default). Each list keeps only the kinds it is typed for.
|
|
13
|
-
* backend that rejects a kind this SDK does not know fails the whole request.
|
|
12
|
+
* when `enableStringParameters` is on (the default). Each list keeps only the kinds it is typed for.
|
|
14
13
|
*/
|
|
15
14
|
export declare function loadDashboardParameters(ctx: DashboardContext, settings: ISettings | undefined): Promise<ICatalogParametersState>;
|
|
16
15
|
//# sourceMappingURL=loadDashboardParameters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadDashboardParameters.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,SAAS,EAIjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"loadDashboardParameters.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,SAAS,EAIjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CACzC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,SAAS,GAAG,SAAS,GAChC,OAAO,CAAC,uBAAuB,CAAC,CA6BlC"}
|
package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.js
CHANGED
|
@@ -8,8 +8,7 @@ import { isDateRangeParameterMetadataObject, isNumberParameterDefinition, isScal
|
|
|
8
8
|
* only when the `enableDateRangeParameters` setting is on. With neither on, no request is sent. A list whose
|
|
9
9
|
* setting is off is empty and `gated-off`, whatever the request did. When the request fails, each list whose
|
|
10
10
|
* setting is on is `failed` and the dashboard renders without parameters. String parameters are kept only
|
|
11
|
-
* when `enableStringParameters` is on (the default). Each list keeps only the kinds it is typed for.
|
|
12
|
-
* backend that rejects a kind this SDK does not know fails the whole request.
|
|
11
|
+
* when `enableStringParameters` is on (the default). Each list keeps only the kinds it is typed for.
|
|
13
12
|
*/
|
|
14
13
|
export async function loadDashboardParameters(ctx, settings) {
|
|
15
14
|
const enableParameters = settings?.enableParameters ?? false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crossFilteringHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/drill/crossFilteringHandler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAmB/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAgGnE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"crossFilteringHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/drill/crossFilteringHandler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAmB/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAgGnE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe;;;;;;;;;yHAoJjF"}
|
|
@@ -68,6 +68,7 @@ function createVirtualFilter(drillFilterData, existingLocalIdentifier, filtersCo
|
|
|
68
68
|
export function* crossFilteringHandler(ctx, cmd) {
|
|
69
69
|
yield put(crossFilteringRequested(ctx, cmd.payload.drillDefinition, cmd.payload.drillEvent, cmd.correlationId));
|
|
70
70
|
const widgetRef = cmd.payload.drillEvent.widgetRef;
|
|
71
|
+
// TODO INE: MC-5779 - date filters with dimension of the whole-period type are not counted here yet.
|
|
71
72
|
const currentFilters = yield select(selectFilterContextDraggableFilterItems);
|
|
72
73
|
const dateAttributes = yield select(selectCatalogDateAttributes);
|
|
73
74
|
const dateDataSetsAttributesRefs = dateAttributes.map((dateAttribute) => dateAttribute.attribute.ref);
|
|
@@ -1,10 +1,9 @@
|
|
|
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, isDashboardAbsoluteGranularityDateFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
4
|
+
import { areObjRefsEqual, dashboardAbsoluteGranularityDateFilterToDateFilterByWidget, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, filterContextItemsToDashboardFiltersByWidget, insightMeasures, isDashboardAbsoluteGranularityDateFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDateFilterOfAnyType, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
5
5
|
import { _compact, _isEmpty, _isEqual } from "@gooddata/util";
|
|
6
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";
|
|
8
7
|
import { switchDashboardTab } from "../../commands/tabs.js";
|
|
9
8
|
import { drillToDashboardRequested, drillToDashboardResolved, } from "../../events/drill.js";
|
|
10
9
|
import { generateFilterLocalIdentifier } from "../../store/_infra/generators.js";
|
|
@@ -13,7 +12,7 @@ import { selectCatalogDateAttributes } from "../../store/catalog/catalogSelector
|
|
|
13
12
|
import { selectRestrictedDashboardFilterLocalIdentifiers } from "../../store/filtering/dashboardFilterSelectors.js";
|
|
14
13
|
import { selectInsightByRef } from "../../store/insights/insightsSelectors.js";
|
|
15
14
|
import { selectAttributeFilterConfigsDisplayAsLabelMap, selectAttributeFilterConfigsOverrides, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
16
|
-
import { selectFilterContextAttributeFilterItems, selectFilterContextDateFilterOfAnyType,
|
|
15
|
+
import { selectFilterContextAttributeFilterItems, selectFilterContextDateFilterOfAnyType, selectFilterContextDraggableFilterItemsOfAnyType, selectFilterContextMeasureValueFilters, } from "../../store/tabs/filterContext/filterContextSelectors.js";
|
|
17
16
|
import { selectAnalyticalWidgetByRef } from "../../store/tabs/layout/layoutSelectors.js";
|
|
18
17
|
import { selectActiveTabDrillParameters } from "../../store/tabs/parameters/parametersSelectors.js";
|
|
19
18
|
import { convertIntersectionToAttributeFilters, removeIgnoredValuesFromDrillIntersection, } from "./common/intersectionUtils.js";
|
|
@@ -141,8 +140,9 @@ function selectAllAttributeFilters(state) {
|
|
|
141
140
|
function selectAllMeasureValueFilters(state) {
|
|
142
141
|
return selectFilterContextMeasureValueFilters(state);
|
|
143
142
|
}
|
|
143
|
+
// TODO INE: MC-5779 - date filters with dimension of the whole-period type are not passed through yet.
|
|
144
144
|
function selectAllDraggableFilters(state) {
|
|
145
|
-
return
|
|
145
|
+
return selectFilterContextDraggableFilterItemsOfAnyType(state).filter((filter) => !isDashboardAbsoluteGranularityDateFilter(filter));
|
|
146
146
|
}
|
|
147
147
|
function convertFilterItemsToFilters(filter, widget) {
|
|
148
148
|
if ("dateFilter" in filter) {
|
|
@@ -158,8 +158,7 @@ function convertFilterItemsToFilters(filter, widget) {
|
|
|
158
158
|
return dashboardAttributeFilterItemToAttributeFilter(filter);
|
|
159
159
|
}
|
|
160
160
|
if (isDashboardParameterizedDateFilter(filter)) {
|
|
161
|
-
|
|
162
|
-
return undefined;
|
|
161
|
+
return filterContextItemsToDashboardFiltersByWidget([filter], widget)[0];
|
|
163
162
|
}
|
|
164
163
|
const unknownFilter = filter;
|
|
165
164
|
console.warn("Skipping a filter of an unknown type.", unknownFilter);
|
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;AA4C/C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AA0C9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AA4QnE,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,4BAA4B,GAClC,YAAY,CAAC,IAAI,CAAC,CA0QpB"}
|
|
@@ -1,17 +1,16 @@
|
|
|
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, isDashboardAbsoluteGranularityDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilterOfAnyType, isDashboardDateFilterOfAnyType, isDashboardMeasureValueFilter, isDashboardParameterizedDateFilter, isDashboardTextAttributeFilter, isObjRef, isSingleSelectionFilter, isUriRef, objRefToString, serializeObjRef, updateAttributeElementsItems, } from "@gooddata/sdk-model";
|
|
5
5
|
import { _compact, _partition, _uniqBy } from "@gooddata/util";
|
|
6
|
-
import { ABSOLUTE_GRANULARITY_DATE_FILTER_WITH_DATA_SET_NOT_SUPPORTED, containsAbsoluteGranularityDateFilterWithDataSet, } from "../../../_staging/dashboard/absoluteGranularityDateFilters.js";
|
|
7
6
|
import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
|
|
8
|
-
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
9
7
|
import { invalidArgumentsProvided } from "../../events/general.js";
|
|
10
8
|
import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
|
|
9
|
+
import { selectCatalogDateRangeParameters, selectCatalogDateRangeParametersStatus, } from "../../store/catalog/catalogSelectors.js";
|
|
11
10
|
import { selectRestrictedDashboardFilterLocalIdentifiers, selectRestrictedDashboardFilterLocalIdentifiersForTab, } from "../../store/filtering/dashboardFilterSelectors.js";
|
|
12
11
|
import { isDashboardFilterUsingRestrictedObject } from "../../store/filtering/restrictedFilterUtils.js";
|
|
13
12
|
import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, selectAttributeFilterConfigsSelectionTypeMap, selectAttributeFilterConfigsSelectionTypeMapByTab, } from "../../store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
14
|
-
import { isDisplayFormRefOf, selectAttributeFilterDisplayFormsMap, selectFilterContextAttributeFilterItems, selectFilterContextAttributeFilterItemsForTab,
|
|
13
|
+
import { isDisplayFormRefOf, selectAttributeFilterDisplayFormsMap, selectFilterContextAttributeFilterItems, selectFilterContextAttributeFilterItemsForTab, selectFilterContextDateFilterByDataSetForTab, selectFilterContextDateFilterOfAnyTypeByDataSet, selectFilterContextDateFiltersWithDimensionForTab, selectFilterContextDateFiltersWithDimensionOfAnyType, selectFilterContextFilters, selectFilterContextMeasureValueFilters, selectFiltersByTab, selectFiltersForTab, selectOriginalFilterContextFiltersByTab, } from "../../store/tabs/filterContext/filterContextSelectors.js";
|
|
15
14
|
import { tabsActions } from "../../store/tabs/index.js";
|
|
16
15
|
import { selectTabs } from "../../store/tabs/tabsSelectors.js";
|
|
17
16
|
import { selectUnavailableObjects } from "../../store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
@@ -103,12 +102,38 @@ function* selectFilterContextAttributeFilterByDisplayFormTabAware(displayForm, t
|
|
|
103
102
|
function* selectFilterContextDateFilterByDataSetTabAware(dataSet, tabLocalIdentifier) {
|
|
104
103
|
return tabLocalIdentifier
|
|
105
104
|
? yield select(selectFilterContextDateFilterByDataSetForTab(dataSet, tabLocalIdentifier))
|
|
106
|
-
: yield select(
|
|
105
|
+
: yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
|
|
107
106
|
}
|
|
108
107
|
function* selectFilterContextDateFiltersWithDimensionTabAware(tabLocalIdentifier) {
|
|
109
108
|
return tabLocalIdentifier
|
|
110
109
|
? yield select(selectFilterContextDateFiltersWithDimensionForTab(tabLocalIdentifier))
|
|
111
|
-
: yield select(
|
|
110
|
+
: yield select(selectFilterContextDateFiltersWithDimensionOfAnyType);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Period entries of the command that must not be applied: their parameter is neither one of the loaded
|
|
114
|
+
* periods nor held by a filter of the dashboard, stored or applied, on any tab.
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* This keeps a caller from setting a period that does not exist, e.g. a deleted one. Without loaded periods
|
|
118
|
+
* (their setting is off, or the load failed) every period applies, as it does when the dashboard loads.
|
|
119
|
+
*/
|
|
120
|
+
function* selectUnavailablePeriodFilters(filters) {
|
|
121
|
+
const periodFilters = filters.filter(isDashboardParameterizedDateFilter);
|
|
122
|
+
const status = yield select(selectCatalogDateRangeParametersStatus);
|
|
123
|
+
if (periodFilters.length === 0 || status !== "loaded") {
|
|
124
|
+
return new Set();
|
|
125
|
+
}
|
|
126
|
+
const loadedPeriods = yield select(selectCatalogDateRangeParameters);
|
|
127
|
+
const filtersByTab = yield select(selectFiltersByTab);
|
|
128
|
+
const originalFiltersByTab = yield select(selectOriginalFilterContextFiltersByTab);
|
|
129
|
+
const availableParameters = [
|
|
130
|
+
...loadedPeriods.map((parameter) => parameter.ref),
|
|
131
|
+
...[...Object.values(filtersByTab), ...Object.values(originalFiltersByTab)]
|
|
132
|
+
.flat()
|
|
133
|
+
.filter(isDashboardParameterizedDateFilter)
|
|
134
|
+
.map((filter) => filter.dashboardParameterizedDateFilter.parameter),
|
|
135
|
+
];
|
|
136
|
+
return new Set(periodFilters.filter(({ dashboardParameterizedDateFilter: { parameter } }) => !availableParameters.some((available) => areObjRefsEqual(available, parameter))));
|
|
112
137
|
}
|
|
113
138
|
function* selectFilterContextMeasureValueFiltersTabAware(tabLocalIdentifier) {
|
|
114
139
|
if (tabLocalIdentifier) {
|
|
@@ -135,10 +160,6 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
135
160
|
return;
|
|
136
161
|
}
|
|
137
162
|
}
|
|
138
|
-
if (filters.some((filter) => isDashboardParameterizedDateFilter(filter) || isParameterizedDateFilter(filter))) {
|
|
139
|
-
yield dispatchDashboardEvent(invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED));
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
163
|
// Cross-filtering is always compatible with dashboard tabs now
|
|
143
164
|
// (removed the check that prevented cross-filtering without tabs)
|
|
144
165
|
const unavailableObjects = yield select(selectUnavailableObjects);
|
|
@@ -168,7 +189,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
168
189
|
}
|
|
169
190
|
return isDashboardMeasureValueFilter(entry) && isDashboardMeasureValueFilter(target);
|
|
170
191
|
};
|
|
171
|
-
const
|
|
192
|
+
const convertedFilters = _compact(filters.map((filter) => {
|
|
172
193
|
if (isDashboardAttributeFilterItem(filter) ||
|
|
173
194
|
isDashboardDateFilterOfAnyType(filter) ||
|
|
174
195
|
isDashboardMeasureValueFilter(filter)) {
|
|
@@ -177,10 +198,15 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
177
198
|
return dashboardFilterToFilterContextItem(filter, !!ctx.backend.capabilities.supportsMultipleDateFilters);
|
|
178
199
|
})).filter((filter) => !((isDashboardAttributeFilterItem(filter) || isDashboardMeasureValueFilter(filter)) &&
|
|
179
200
|
isDashboardFilterUsingRestrictedObject(filter, unavailableObjects)) && !(matchByLocalIdentifier && addressesRestrictedFilter(filter)));
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
201
|
+
const unavailablePeriodFilters = yield call(selectUnavailablePeriodFilters, convertedFilters);
|
|
202
|
+
unavailablePeriodFilters.forEach((filter) => {
|
|
203
|
+
console.warn("changeFilterContextSelection: ignoring a date filter set to a period that is not available.", filter);
|
|
204
|
+
});
|
|
205
|
+
const normalizedFilters = convertedFilters.filter((filter) => !unavailablePeriodFilters.has(filter));
|
|
206
|
+
// a date filter whose period was dropped keeps its value, also when the command resets the others
|
|
207
|
+
const droppedPeriods = [...unavailablePeriodFilters].filter(isDashboardParameterizedDateFilter);
|
|
208
|
+
const keepsCommonDateFilter = droppedPeriods.some(isDashboardCommonDateFilterOfAnyType);
|
|
209
|
+
const keptDataSets = droppedPeriods.map(dashboardFilterObjRef).filter(isObjRef);
|
|
184
210
|
const disabledComputedAttributeRef = yield call(findDisabledComputedAttributeRef, [
|
|
185
211
|
...normalizedFilters
|
|
186
212
|
.filter(isDashboardAttributeFilterItem)
|
|
@@ -229,8 +255,8 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
229
255
|
const selectionTypeMap = yield call(selectAttributeFilterConfigsSelectionTypeMapTabAware, tabLocalIdentifier);
|
|
230
256
|
const [attributeFilterResult, commonDateFilterUpdateActions, dateFiltersUpdateActions, measureValueFilterUpdateActions,] = yield all([
|
|
231
257
|
call(getAttributeFiltersUpdateActions, [...attributeFilters].reverse(), textAttributeFilters, attributeFilterConfigs, resetOthers, ctx, tabLocalIdentifier, selectionTypeMap, matchByLocalIdentifier),
|
|
232
|
-
call(getDateFilterUpdateActions, commonDateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier),
|
|
233
|
-
call(getDateFiltersUpdateActions, dateFiltersWithDimension, resetOthers, tabLocalIdentifier),
|
|
258
|
+
call(getDateFilterUpdateActions, commonDateFilter, resetOthers && !keepsCommonDateFilter, restorePerTabOriginals, tabLocalIdentifier),
|
|
259
|
+
call(getDateFiltersUpdateActions, dateFiltersWithDimension, resetOthers, restorePerTabOriginals, keptDataSets, tabLocalIdentifier),
|
|
234
260
|
call(getMeasureValueFiltersUpdateActions, measureValueFilters, resetOthers, tabLocalIdentifier),
|
|
235
261
|
]);
|
|
236
262
|
const session = yield call(beginTabSync, { tabLocalIdentifier, enabled: !skipSync });
|
|
@@ -652,8 +678,9 @@ function* getAttributeFiltersUpdateActions(attributeFilters, textAttributeFilter
|
|
|
652
678
|
}
|
|
653
679
|
function* getDateFilterUpdateActions(dateFilter, resetOthers, restorePerTabOriginals, tabLocalIdentifier) {
|
|
654
680
|
if (dateFilter) {
|
|
655
|
-
// a
|
|
656
|
-
const canApply =
|
|
681
|
+
// a stored period, or the stored filter with granularity on reset, applies without being offered
|
|
682
|
+
const canApply = isDashboardParameterizedDateFilter(dateFilter) ||
|
|
683
|
+
(restorePerTabOriginals && isDashboardAbsoluteGranularityDateFilter(dateFilter))
|
|
657
684
|
? true
|
|
658
685
|
: yield call(canApplyDateFilter, dateFilter);
|
|
659
686
|
if (!canApply) {
|
|
@@ -723,60 +750,50 @@ function* getMeasureValueFiltersUpdateActions(measureValueFilters, resetOthers,
|
|
|
723
750
|
}
|
|
724
751
|
return updateActions;
|
|
725
752
|
}
|
|
726
|
-
function* getDateFiltersUpdateActions(dateFilters, resetOthers, tabLocalIdentifier) {
|
|
753
|
+
function* getDateFiltersUpdateActions(dateFilters, resetOthers, restorePerTabOriginals, keptDataSets, tabLocalIdentifier) {
|
|
727
754
|
const updateActions = [];
|
|
728
755
|
const handledDataSets = new Set();
|
|
729
756
|
for (const dateFilter of dateFilters) {
|
|
730
|
-
const filterRef = dateFilter
|
|
731
|
-
const dashboardFilter =
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
: {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
from: dateFilter.dateFilter.from,
|
|
752
|
-
to: dateFilter.dateFilter.to,
|
|
753
|
-
dataSet: dateFilter.dateFilter.dataSet,
|
|
754
|
-
...localIdentifierObj,
|
|
755
|
-
...(dateFilter.dateFilter.boundedFilter
|
|
756
|
-
? { boundedFilter: dateFilter.dateFilter.boundedFilter }
|
|
757
|
-
: {}),
|
|
758
|
-
...emptyValueHandlingObj,
|
|
759
|
-
tabLocalIdentifier,
|
|
760
|
-
};
|
|
761
|
-
updateActions.push(tabsActions.upsertDateFilter(upsertPayload));
|
|
757
|
+
const filterRef = dashboardFilterObjRef(dateFilter);
|
|
758
|
+
const dashboardFilter = filterRef
|
|
759
|
+
? yield call(selectFilterContextDateFilterByDataSetTabAware, filterRef, tabLocalIdentifier)
|
|
760
|
+
: undefined;
|
|
761
|
+
const dashboardFilterRef = dashboardFilter ? dashboardFilterObjRef(dashboardFilter) : undefined;
|
|
762
|
+
if (dashboardFilter && dashboardFilterRef) {
|
|
763
|
+
handledDataSets.add(serializeObjRef(dashboardFilterRef));
|
|
764
|
+
// the same check as for the common date filter, a filter that cannot be applied keeps its selection
|
|
765
|
+
const canApply = isDashboardAbsoluteGranularityDateFilter(dateFilter) && !restorePerTabOriginals
|
|
766
|
+
? yield call(canApplyDateFilter, dateFilter)
|
|
767
|
+
: true;
|
|
768
|
+
if (!canApply) {
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
771
|
+
// the filter keeps its own local identifier, other filters can depend on it
|
|
772
|
+
const localIdentifier = dashboardFilterLocalIdentifier(dashboardFilter);
|
|
773
|
+
updateActions.push(tabsActions.upsertDateFilter({
|
|
774
|
+
...toUpsertDateFilterPayload(dateFilter),
|
|
775
|
+
...(localIdentifier ? { localIdentifier } : {}),
|
|
776
|
+
tabLocalIdentifier,
|
|
777
|
+
}));
|
|
762
778
|
}
|
|
763
779
|
}
|
|
764
780
|
if (resetOthers) {
|
|
765
781
|
const currentDateFilters = yield call(selectFilterContextDateFiltersWithDimensionTabAware, tabLocalIdentifier);
|
|
766
782
|
// for filters that have not been handled by the loop above, create a clear selection actions
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
updateActions.push(tabsActions.upsertDateFilter({
|
|
774
|
-
type: "allTime",
|
|
775
|
-
dataSet: dateFilter.dateFilter.dataSet,
|
|
776
|
-
...localIdentifierObj,
|
|
777
|
-
tabLocalIdentifier,
|
|
778
|
-
}));
|
|
783
|
+
for (const dateFilter of currentDateFilters) {
|
|
784
|
+
const dataSet = dashboardFilterObjRef(dateFilter);
|
|
785
|
+
if (!dataSet ||
|
|
786
|
+
handledDataSets.has(serializeObjRef(dataSet)) ||
|
|
787
|
+
keptDataSets.some((kept) => areObjRefsEqual(kept, dataSet))) {
|
|
788
|
+
continue;
|
|
779
789
|
}
|
|
790
|
+
const localIdentifier = dashboardFilterLocalIdentifier(dateFilter);
|
|
791
|
+
updateActions.push(tabsActions.upsertDateFilter({
|
|
792
|
+
type: "allTime",
|
|
793
|
+
dataSet,
|
|
794
|
+
...(localIdentifier ? { localIdentifier } : {}),
|
|
795
|
+
tabLocalIdentifier,
|
|
796
|
+
}));
|
|
780
797
|
}
|
|
781
798
|
}
|
|
782
799
|
return updateActions;
|
|
@@ -6,7 +6,7 @@ import { selectAllCatalogDateDatasetsMap } from "../../../../model/store/catalog
|
|
|
6
6
|
import { dateFilterAdded } from "../../../events/filters.js";
|
|
7
7
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
8
8
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
9
|
-
import { selectCanAddMoreFilters, selectFilterContextDateFilterByDataSet,
|
|
9
|
+
import { selectCanAddMoreFilters, selectFilterContextDateFilterByDataSet, selectFilterContextDateFiltersWithDimensionOfAnyType, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
10
10
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
11
11
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
12
12
|
// import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
@@ -23,7 +23,7 @@ export function* addDateFilterHandler(ctx, cmd) {
|
|
|
23
23
|
throw invalidArgumentsProvided(ctx, cmd, `Attempting to add filter for a non-existing date data set ${objRefToString(dateDataset)}.`);
|
|
24
24
|
}
|
|
25
25
|
invariant(usedDateDataSet);
|
|
26
|
-
const allFilters = yield select(
|
|
26
|
+
const allFilters = yield select(selectFilterContextDateFiltersWithDimensionOfAnyType);
|
|
27
27
|
const canBeAdded = yield call(canFilterBeAdded, dateDataset, allFilters);
|
|
28
28
|
if (!canBeAdded) {
|
|
29
29
|
throw invalidArgumentsProvided(ctx, cmd, `Filter for date data set ${objRefToString(dateDataset)} already exists in the filter context.`);
|
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;AAe/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,CAwBpB"}
|
package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
import { toNumber } from "lodash-es";
|
|
3
3
|
import { call, select } from "redux-saga/effects";
|
|
4
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
5
|
import { PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED } from "../../../../_staging/dashboard/parameterizedDateFilters.js";
|
|
7
6
|
import { dateFilterChanged, dateFilterOfAnyTypeChanged } from "../../../events/filters.js";
|
|
8
7
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
9
8
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
10
9
|
import { selectIsApplyFiltersAllAtOnceEnabledAndSet } from "../../../store/config/configSelectors.js";
|
|
11
10
|
import { selectIsCrossFiltering } from "../../../store/drill/drillSelectors.js";
|
|
12
|
-
import {
|
|
11
|
+
import { selectFilterContextDateFilterOfAnyType, selectFilterContextDateFilterOfAnyTypeByDataSet, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
13
12
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
14
13
|
import { canApplyDateFilter, resetCrossFiltering } from "../common.js";
|
|
15
14
|
import { toUpsertDateFilterPayload } from "../tabSync/tabSyncRules.js";
|
|
@@ -50,9 +49,6 @@ export function* changeDateFilterSelectionHandler(ctx, cmd) {
|
|
|
50
49
|
}
|
|
51
50
|
export function* changeDateFilterSelectionOfAnyTypeHandler(ctx, cmd) {
|
|
52
51
|
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
52
|
if (isDashboardParameterizedDateFilter(filter)) {
|
|
57
53
|
throw invalidArgumentsProvided(ctx, cmd, PARAMETERIZED_DATE_FILTER_NOT_SUPPORTED);
|
|
58
54
|
}
|
|
@@ -77,7 +73,7 @@ function* upsertDateFilterSelection(ctx, cmd, upsertPayload, dataSet, dateFilter
|
|
|
77
73
|
}
|
|
78
74
|
}
|
|
79
75
|
const affectedFilter = dataSet
|
|
80
|
-
? yield select(
|
|
76
|
+
? yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet))
|
|
81
77
|
: yield select(selectFilterContextDateFilterOfAnyType);
|
|
82
78
|
if (!affectedFilter || isDashboardDateFilter(affectedFilter)) {
|
|
83
79
|
yield dispatchDashboardEvent(dateFilterChanged(ctx, affectedFilter, dateFilterOptionLocalId, cmd.correlationId));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moveDateFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"moveDateFilterHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/moveDateFilterHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAUpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,CA+CtG"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { call, put, select } from "redux-saga/effects";
|
|
3
|
-
import {
|
|
3
|
+
import { isDashboardDateFilter } from "@gooddata/sdk-model";
|
|
4
|
+
import { dateFilterMoved, dateFilterOfAnyTypeMoved } from "../../../events/filters.js";
|
|
4
5
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
5
6
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
6
|
-
import {
|
|
7
|
+
import { selectFilterContextDateFilterOfAnyTypeByDataSet, selectFilterContextDraggableFilterIndexByRef, selectFilterContextFilters, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
7
8
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
8
9
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
9
10
|
export function* moveDateFilterHandler(ctx, cmd) {
|
|
10
11
|
const { dataSet, index } = cmd.payload;
|
|
11
12
|
// validate dataSet
|
|
12
|
-
const affectedFilter = yield select(
|
|
13
|
+
const affectedFilter = yield select(selectFilterContextDateFilterOfAnyTypeByDataSet(dataSet));
|
|
13
14
|
if (!affectedFilter) {
|
|
14
15
|
throw invalidArgumentsProvided(ctx, cmd, `Filter with dataSet ${dataSet} not found.`);
|
|
15
16
|
}
|
|
@@ -25,6 +26,9 @@ export function* moveDateFilterHandler(ctx, cmd) {
|
|
|
25
26
|
index,
|
|
26
27
|
}));
|
|
27
28
|
const finalIndex = yield select(selectFilterContextDraggableFilterIndexByRef(dataSet));
|
|
28
|
-
|
|
29
|
+
if (isDashboardDateFilter(affectedFilter)) {
|
|
30
|
+
yield dispatchDashboardEvent(dateFilterMoved(ctx, affectedFilter, originalIndex, finalIndex, cmd.correlationId));
|
|
31
|
+
}
|
|
32
|
+
yield dispatchDashboardEvent(dateFilterOfAnyTypeMoved(ctx, affectedFilter, originalIndex, finalIndex, cmd.correlationId));
|
|
29
33
|
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
30
34
|
}
|
package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeDateFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"removeDateFiltersHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAc/C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AASvE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,wBAAiB,wBAAwB,CACrC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,kBAAkB,GACxB,YAAY,CAAC,IAAI,CAAC,CA0FpB"}
|
|
@@ -3,29 +3,30 @@ import { difference } from "lodash-es";
|
|
|
3
3
|
import { batchActions } from "redux-batched-actions";
|
|
4
4
|
import { call, put, select } from "redux-saga/effects";
|
|
5
5
|
import { invariant } from "ts-invariant";
|
|
6
|
-
import { areObjRefsEqual, isUriRef, serializeObjRef } from "@gooddata/sdk-model";
|
|
6
|
+
import { areObjRefsEqual, dashboardFilterLocalIdentifier, dashboardFilterObjRef, isDashboardDateFilter, isUriRef, serializeObjRef, } from "@gooddata/sdk-model";
|
|
7
7
|
import { _partition } from "@gooddata/util";
|
|
8
|
-
import { dateFilterRemoved } from "../../../events/filters.js";
|
|
8
|
+
import { dateFilterOfAnyTypeRemoved, dateFilterRemoved } from "../../../events/filters.js";
|
|
9
9
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
10
10
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
11
|
-
import { selectFilterContextAttributeFilters,
|
|
11
|
+
import { selectFilterContextAttributeFilters, selectFilterContextDateFiltersWithDimensionOfAnyType, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
12
12
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
13
13
|
import { dispatchFilterContextChanged } from "../common.js";
|
|
14
14
|
export function* removeDateFiltersHandler(ctx, cmd) {
|
|
15
15
|
const { dataSets } = cmd.payload;
|
|
16
|
-
const allDateFiltersWithDimension = yield select(
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const invalidDataSets = difference(dataSets.map(serializeObjRef), allDateFiltersWithDimension.map((filter) => serializeObjRef(filter.dateFilter.dataSet)));
|
|
16
|
+
const allDateFiltersWithDimension = yield select(selectFilterContextDateFiltersWithDimensionOfAnyType);
|
|
17
|
+
const [removedFilters, _survivingFilters] = _partition(allDateFiltersWithDimension, (item) => dataSets.some((ds) => areObjRefsEqual(ds, dashboardFilterObjRef(item))));
|
|
18
|
+
const invalidDataSets = difference(dataSets.map(serializeObjRef), allDateFiltersWithDimension.map((filter) => serializeObjRef(dashboardFilterObjRef(filter))));
|
|
20
19
|
if (invalidDataSets.length) {
|
|
21
20
|
throw invalidArgumentsProvided(ctx, cmd, `Invalid dataSet provided. These ids were not found: ${invalidDataSets.join(", ")}.`);
|
|
22
21
|
}
|
|
23
22
|
for (const removedFilter of removedFilters) {
|
|
24
|
-
const dataSetRef = removedFilter
|
|
25
|
-
//
|
|
26
|
-
|
|
23
|
+
const dataSetRef = dashboardFilterObjRef(removedFilter);
|
|
24
|
+
// read the dependencies left by the previous removal, its cleanup must not be overwritten
|
|
25
|
+
const allAttributeFilters = yield select(selectFilterContextAttributeFilters);
|
|
26
|
+
// the local identifier is the new format stored by useDependentDateFilterConfigurationState;
|
|
27
|
+
// dataSetRef.identifier (dataset identifier) is the legacy format. Both must be matched here
|
|
27
28
|
// so that cleanup works regardless of which format a dependent reference was saved in.
|
|
28
|
-
const filterLocalIdentifier = removedFilter
|
|
29
|
+
const filterLocalIdentifier = dashboardFilterLocalIdentifier(removedFilter);
|
|
29
30
|
invariant(!isUriRef(dataSetRef));
|
|
30
31
|
const affectedDependentFilters = allAttributeFilters.filter((item) => {
|
|
31
32
|
return item.attributeFilter.filterElementsByDate?.some((depdendentDateFilter) => {
|
|
@@ -36,7 +37,7 @@ export function* removeDateFiltersHandler(ctx, cmd) {
|
|
|
36
37
|
// filterLocalIdentifier is also undefined, incorrectly tagging unrelated filters.
|
|
37
38
|
((filterLocalIdentifier !== undefined &&
|
|
38
39
|
depdendentDateFilter.filterLocalIdentifier === filterLocalIdentifier) ||
|
|
39
|
-
depdendentDateFilter.filterLocalIdentifier === dataSetRef
|
|
40
|
+
depdendentDateFilter.filterLocalIdentifier === dataSetRef.identifier) &&
|
|
40
41
|
!depdendentDateFilter.isCommonDate);
|
|
41
42
|
});
|
|
42
43
|
});
|
|
@@ -51,21 +52,24 @@ export function* removeDateFiltersHandler(ctx, cmd) {
|
|
|
51
52
|
// true), so skip it and rely solely on the legacy dataset-identifier check.
|
|
52
53
|
(parent) => (filterLocalIdentifier === undefined ||
|
|
53
54
|
parent.filterLocalIdentifier !== filterLocalIdentifier) &&
|
|
54
|
-
parent.filterLocalIdentifier !== dataSetRef
|
|
55
|
+
parent.filterLocalIdentifier !== dataSetRef.identifier),
|
|
55
56
|
})),
|
|
56
57
|
// remove filter itself
|
|
57
58
|
tabsActions.removeDateFilter({
|
|
58
|
-
dataSet:
|
|
59
|
+
dataSet: dataSetRef,
|
|
59
60
|
}),
|
|
60
61
|
// remove reflect dashboard date filter config
|
|
61
|
-
tabsActions.removeDateFilterConfigs(
|
|
62
|
+
tabsActions.removeDateFilterConfigs(dataSetRef),
|
|
62
63
|
// house-keeping: ensure the removed date filter disappears from widget ignore lists
|
|
63
64
|
tabsActions.removeIgnoredDateFilter({
|
|
64
|
-
dateDataSets: [
|
|
65
|
+
dateDataSets: [dataSetRef],
|
|
65
66
|
}),
|
|
66
67
|
]);
|
|
67
68
|
yield put(batch);
|
|
68
|
-
|
|
69
|
+
if (isDashboardDateFilter(removedFilter)) {
|
|
70
|
+
yield dispatchDashboardEvent(dateFilterRemoved(ctx, removedFilter, cmd.correlationId));
|
|
71
|
+
}
|
|
72
|
+
yield dispatchDashboardEvent(dateFilterOfAnyTypeRemoved(ctx, removedFilter, cmd.correlationId));
|
|
69
73
|
}
|
|
70
74
|
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
71
75
|
}
|
package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function canFilterBeAdded(addedDateDataSetRef: ObjRef, allFilters:
|
|
1
|
+
import { type DashboardDateFilterOfAnyType, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
export declare function canFilterBeAdded(addedDateDataSetRef: ObjRef, allFilters: DashboardDateFilterOfAnyType[]): boolean;
|
|
3
3
|
//# sourceMappingURL=uniqueFiltersValidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniqueFiltersValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"uniqueFiltersValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAE7B,wBAAgB,gBAAgB,CAC5B,mBAAmB,EAAE,MAAM,EAC3B,UAAU,EAAE,4BAA4B,EAAE,GAC3C,OAAO,CAST"}
|
package/esm/model/commandHandlers/filterContext/dateFilter/validation/uniqueFiltersValidation.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { areObjRefsEqual } from "@gooddata/sdk-model";
|
|
2
|
+
import { areObjRefsEqual, dashboardFilterObjRef, } from "@gooddata/sdk-model";
|
|
3
3
|
export function canFilterBeAdded(addedDateDataSetRef, allFilters) {
|
|
4
4
|
// first filter is always ok, save some useless work upfront
|
|
5
5
|
if (allFilters.length === 0) {
|
|
6
6
|
return true;
|
|
7
7
|
}
|
|
8
|
-
const existingDateDataSets = allFilters.map(
|
|
8
|
+
const existingDateDataSets = allFilters.map(dashboardFilterObjRef);
|
|
9
9
|
return !existingDateDataSets.some((existing) => areObjRefsEqual(existing, addedDateDataSetRef));
|
|
10
10
|
}
|
|
@@ -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;AAe/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,CAYxG;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,8 +2,6 @@
|
|
|
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 { 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";
|
|
7
5
|
import { changeFilterContextSelectionByParams, } from "../../commands/filters.js";
|
|
8
6
|
import { changeParameterValues } from "../../commands/parameters.js";
|
|
9
7
|
import { filterViewApplicationFailed, filterViewApplicationSucceeded, filterViewCreationFailed, filterViewCreationSucceeded, filterViewDefaultStatusChangeFailed, filterViewDefaultStatusChangeSucceeded, filterViewDeletionFailed, filterViewDeletionSucceeded, } from "../../events/filters.js";
|
|
@@ -99,15 +97,7 @@ function* findFilterView(ref) {
|
|
|
99
97
|
}
|
|
100
98
|
export function* applyFilterViewHandler(ctx, cmd) {
|
|
101
99
|
const filterView = yield call(findFilterView, cmd.payload.ref);
|
|
102
|
-
if (filterView
|
|
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}`);
|
|
108
|
-
yield put(filterViewApplicationFailed(ctx));
|
|
109
|
-
}
|
|
110
|
-
else if (filterView) {
|
|
100
|
+
if (filterView) {
|
|
111
101
|
yield call(applyFilterViewSelection, ctx, cmd, filterView);
|
|
112
102
|
yield put(filterViewApplicationSucceeded(ctx, filterView, cmd.correlationId));
|
|
113
103
|
}
|