@gooddata/sdk-ui-dashboard 11.65.0-alpha.1 → 11.65.0-alpha.11
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 +72039 -4
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/assets/type-csv-formatted.svg +1 -1
- package/esm/assets/type-csv-raw.svg +1 -1
- package/esm/index.d.ts +8 -5
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -2
- package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts +36 -3
- package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +138 -26
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts +15 -4
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +55 -11
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/preloadAttributeFiltersData.d.ts +6 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/preloadAttributeFiltersData.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/preloadAttributeFiltersData.js +14 -6
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.js +1 -3
- package/esm/model/commandHandlers/dashboard/resetDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js +21 -8
- package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.js +8 -7
- package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.js +19 -28
- package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/removeAttributeFiltersHandler.js +4 -5
- package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/replaceAttributeFilterItemSelectionHandler.js +14 -15
- package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.d.ts +4 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/resolveDisplayFormMetadata.js +11 -2
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +28 -44
- package/esm/model/commandHandlers/filterContext/common.d.ts +6 -5
- package/esm/model/commandHandlers/filterContext/common.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/common.js +12 -18
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/changeDateFilterSelectionHandler.js +30 -36
- package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts +10 -0
- package/esm/model/commandHandlers/filterContext/filterViewHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +79 -24
- package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.js +11 -17
- package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.js +7 -10
- package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.d.ts +15 -0
- package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.d.ts.map +1 -0
- package/esm/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.js +88 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts +11 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +335 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.d.ts +52 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.d.ts.map +1 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncSaga.js +60 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.d.ts +69 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.d.ts.map +1 -0
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncScope.js +2 -0
- package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.d.ts +17 -0
- package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.d.ts.map +1 -0
- package/esm/model/commandHandlers/filterContext/tabSync/writtenTargets.js +79 -0
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts +2 -1
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +44 -9
- package/esm/model/commandHandlers/tabs/switchDashboardTabHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/tabs/switchDashboardTabHandler.js +3 -1
- package/esm/model/commands/filters.d.ts +16 -1
- package/esm/model/commands/filters.d.ts.map +1 -1
- package/esm/model/commands/filters.js +2 -1
- package/esm/model/commands/parameters.d.ts +20 -1
- package/esm/model/commands/parameters.d.ts.map +1 -1
- package/esm/model/commands/parameters.js +3 -1
- package/esm/model/events/base.d.ts +1 -1
- package/esm/model/events/base.d.ts.map +1 -1
- package/esm/model/events/index.d.ts +2 -1
- package/esm/model/events/index.d.ts.map +1 -1
- package/esm/model/events/insightEditor.d.ts +128 -0
- package/esm/model/events/insightEditor.d.ts.map +1 -0
- package/esm/model/events/insightEditor.js +74 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +4 -9
- package/esm/model/store/config/configReducers.d.ts +4 -8
- package/esm/model/store/config/configReducers.d.ts.map +1 -1
- package/esm/model/store/config/configReducers.js +6 -12
- package/esm/model/store/config/configSelectors.d.ts +24 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +30 -4
- package/esm/model/store/config/index.d.ts +2 -3
- package/esm/model/store/config/index.d.ts.map +1 -1
- package/esm/model/store/filterViews/filterViewsReducers.d.ts +8 -0
- package/esm/model/store/filterViews/filterViewsReducers.d.ts.map +1 -1
- package/esm/model/store/filterViews/filterViewsReducers.js +11 -0
- package/esm/model/store/filterViews/filterViewsReducersSelectors.d.ts +6 -0
- package/esm/model/store/filterViews/filterViewsReducersSelectors.d.ts.map +1 -1
- package/esm/model/store/filterViews/filterViewsReducersSelectors.js +6 -0
- package/esm/model/store/filterViews/filterViewsState.d.ts +6 -0
- package/esm/model/store/filterViews/filterViewsState.d.ts.map +1 -1
- package/esm/model/store/filterViews/index.d.ts +2 -0
- package/esm/model/store/filterViews/index.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.d.ts +7 -0
- package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.js +10 -0
- package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.d.ts +75 -5
- package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/attributeFilterConfigs/attributeFilterConfigsReducers.js +35 -60
- package/esm/model/store/tabs/dateFilterConfigs/dateFilterConfigsReducers.js +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts +163 -31
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +389 -529
- package/esm/model/store/tabs/filterContext/filterSync.d.ts +35 -13
- package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterSync.js +79 -58
- package/esm/model/store/tabs/index.d.ts +18 -12
- package/esm/model/store/tabs/index.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutReducers.d.ts +1 -0
- package/esm/model/store/tabs/layout/layoutReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/measureValueFilterConfigs/measureValueFilterConfigsReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts +16 -5
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +33 -7
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +7 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +16 -0
- package/esm/model/store/tabs/tabsReducers.d.ts +8 -4
- package/esm/model/store/tabs/tabsReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/tabsReducers.js +15 -18
- package/esm/model/store/tabs/tabsState.d.ts +0 -10
- package/esm/model/store/tabs/tabsState.d.ts.map +1 -1
- package/esm/model/store/tabs/tabsState.js +0 -20
- package/esm/model/store/ui/index.d.ts +2 -0
- package/esm/model/store/ui/index.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.d.ts +6 -0
- package/esm/model/store/ui/uiReducers.d.ts.map +1 -1
- package/esm/model/store/ui/uiReducers.js +8 -0
- package/esm/model/store/ui/uiSelectors.d.ts +7 -0
- package/esm/model/store/ui/uiSelectors.d.ts.map +1 -1
- package/esm/model/store/ui/uiSelectors.js +6 -0
- package/esm/model/store/ui/uiState.d.ts +5 -0
- package/esm/model/store/ui/uiState.d.ts.map +1 -1
- package/esm/model/store/ui/uiState.js +1 -0
- package/esm/model/types/commonTypes.d.ts +38 -22
- package/esm/model/types/commonTypes.d.ts.map +1 -1
- package/esm/model/types/insightEditorTypes.d.ts +43 -0
- package/esm/model/types/insightEditorTypes.d.ts.map +1 -0
- package/esm/model/types/insightEditorTypes.js +2 -0
- package/esm/model/utils/attributeFilterMatching.d.ts +10 -0
- package/esm/model/utils/attributeFilterMatching.d.ts.map +1 -1
- package/esm/model/utils/attributeFilterMatching.js +14 -3
- package/esm/model/utils/attributeFilterSelectionTypeCompatibility.d.ts +8 -0
- package/esm/model/utils/attributeFilterSelectionTypeCompatibility.d.ts.map +1 -1
- package/esm/model/utils/attributeFilterSelectionTypeCompatibility.js +14 -4
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.d.ts +9 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/LiveRegionLastSelectContainer.js +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelect.js +3 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +14 -7
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.d.ts +12 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.d.ts.map +1 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectionDescription.js +30 -0
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts +1 -0
- package/esm/presentation/automations/scheduledEmail/utils/users.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/utils/users.js +3 -0
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +4 -0
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.js +12 -5
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardHeader/DashboardHeader.js +2 -11
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +10 -1
- package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.d.ts +5 -0
- package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.d.ts.map +1 -0
- package/esm/presentation/dashboard/DefaultDashboardContent/DashboardContentLoader.js +27 -0
- package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.d.ts.map +1 -1
- package/esm/presentation/dashboard/DefaultDashboardContent/DefaultDashboardMainContent.js +7 -2
- package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts +4 -0
- package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts.map +1 -0
- package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.js +151 -0
- package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardInner.js +17 -14
- package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts +8 -0
- package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts.map +1 -0
- package/esm/presentation/dashboard/components/DashboardInteractionComposing.js +23 -0
- package/esm/presentation/dashboard/components/DashboardInteractionLock.d.ts +8 -0
- package/esm/presentation/dashboard/components/DashboardInteractionLock.d.ts.map +1 -0
- package/esm/presentation/dashboard/components/DashboardInteractionLock.js +29 -0
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js +3 -2
- package/esm/presentation/dashboard/types.d.ts +5 -0
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddDashboardLayoutWidgetButton.js +2 -4
- package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.js +3 -3
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableWidget/AddVisualizationSwitcherWidgetButton.js +2 -4
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.js +3 -2
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/hooks/useResetFiltersButton.js +4 -1
- package/esm/presentation/insightEditor/InsightEditorContent.d.ts +26 -0
- package/esm/presentation/insightEditor/InsightEditorContent.d.ts.map +1 -0
- package/esm/presentation/insightEditor/InsightEditorContent.js +179 -0
- package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.d.ts +7 -0
- package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.d.ts.map +1 -0
- package/esm/presentation/insightEditor/InsightEditorCreatePanelItem.js +25 -0
- package/esm/presentation/insightEditor/InsightEditorOverlay.d.ts +6 -0
- package/esm/presentation/insightEditor/InsightEditorOverlay.d.ts.map +1 -0
- package/esm/presentation/insightEditor/InsightEditorOverlay.js +110 -0
- package/esm/presentation/insightEditor/InsightEditorPermissionsContext.d.ts +10 -0
- package/esm/presentation/insightEditor/InsightEditorPermissionsContext.d.ts.map +1 -0
- package/esm/presentation/insightEditor/InsightEditorPermissionsContext.js +18 -0
- package/esm/presentation/insightEditor/InsightEditorPlaceholder.d.ts +7 -0
- package/esm/presentation/insightEditor/InsightEditorPlaceholder.d.ts.map +1 -0
- package/esm/presentation/insightEditor/InsightEditorPlaceholder.js +15 -0
- package/esm/presentation/insightEditor/filterContext/attributeFilters.d.ts +4 -0
- package/esm/presentation/insightEditor/filterContext/attributeFilters.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/attributeFilters.js +115 -0
- package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts +5 -0
- package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/dateFilters.js +117 -0
- package/esm/presentation/insightEditor/filterContext/filterIntersection.d.ts +7 -0
- package/esm/presentation/insightEditor/filterContext/filterIntersection.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/filterIntersection.js +149 -0
- package/esm/presentation/insightEditor/filterContext/insightFilterContext.d.ts +26 -0
- package/esm/presentation/insightEditor/filterContext/insightFilterContext.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/insightFilterContext.js +72 -0
- package/esm/presentation/insightEditor/filterContext/measureValueFilters.d.ts +20 -0
- package/esm/presentation/insightEditor/filterContext/measureValueFilters.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/measureValueFilters.js +76 -0
- package/esm/presentation/insightEditor/filterContext/objQualifiers.d.ts +11 -0
- package/esm/presentation/insightEditor/filterContext/objQualifiers.d.ts.map +1 -0
- package/esm/presentation/insightEditor/filterContext/objQualifiers.js +18 -0
- package/esm/presentation/insightEditor/insightEditorEscapeGuard.d.ts +18 -0
- package/esm/presentation/insightEditor/insightEditorEscapeGuard.d.ts.map +1 -0
- package/esm/presentation/insightEditor/insightEditorEscapeGuard.js +24 -0
- package/esm/presentation/insightEditor/insightEditorRoute.d.ts +34 -0
- package/esm/presentation/insightEditor/insightEditorRoute.d.ts.map +1 -0
- package/esm/presentation/insightEditor/insightEditorRoute.js +48 -0
- package/esm/presentation/insightEditor/types.d.ts +7 -0
- package/esm/presentation/insightEditor/types.d.ts.map +1 -0
- package/esm/presentation/insightEditor/types.js +2 -0
- package/esm/presentation/insightEditor/useCanCreateInsightInEditor.d.ts +5 -0
- package/esm/presentation/insightEditor/useCanCreateInsightInEditor.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useCanCreateInsightInEditor.js +14 -0
- package/esm/presentation/insightEditor/useExploreFilterTransfer.d.ts +21 -0
- package/esm/presentation/insightEditor/useExploreFilterTransfer.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useExploreFilterTransfer.js +193 -0
- package/esm/presentation/insightEditor/useInsightEditPermissions.d.ts +17 -0
- package/esm/presentation/insightEditor/useInsightEditPermissions.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useInsightEditPermissions.js +42 -0
- package/esm/presentation/insightEditor/useInsightEditorMenuItems.d.ts +23 -0
- package/esm/presentation/insightEditor/useInsightEditorMenuItems.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useInsightEditorMenuItems.js +126 -0
- package/esm/presentation/insightEditor/useInsightEditorSession.d.ts +19 -0
- package/esm/presentation/insightEditor/useInsightEditorSession.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useInsightEditorSession.js +141 -0
- package/esm/presentation/insightList/InsightList.d.ts.map +1 -1
- package/esm/presentation/insightList/InsightList.js +10 -5
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +6 -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 +48 -42
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +6 -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 +11 -5
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +56 -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 +56 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +6 -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 +187 -181
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +6 -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 +6 -0
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +6 -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 +7 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.js +3 -2
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +3 -2
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/settingButton/DefaultSettingButton.js +3 -2
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.js +3 -2
- package/esm/presentation/topBar/title/EditableTitle.d.ts.map +1 -1
- package/esm/presentation/topBar/title/EditableTitle.js +6 -0
- package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.d.ts +1 -1
- package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.d.ts.map +1 -1
- package/esm/presentation/widget/insight/DefaultDashboardInsightComponentSetFactory.js +13 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/index.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/index.js +10 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/EditModeDashboardVisualizationSwitcher.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/ToolbarTop.js +2 -2
- package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useEditableInsightMenu.js +5 -1
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js +4 -1
- package/esm/sdk-ui-dashboard.d.ts +596 -69
- package/package.json +23 -21
- package/styles/css/alerting.css +1 -1
- package/styles/css/alerting.css.map +1 -1
- package/styles/css/attributeFilterConfig.css +3 -3
- package/styles/css/automationFilters.css +1 -1
- package/styles/css/configurationPanel.css +2 -2
- package/styles/css/configurationPanel.css.map +1 -1
- package/styles/css/dashboard.css +141 -87
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/dashboardContentLoader.css +45 -0
- package/styles/css/dashboardContentLoader.css.map +1 -0
- package/styles/css/dashboardNestedLayoutToolbar.css.map +1 -1
- package/styles/css/dashboardNestedLayoutWidget.css +1 -1
- package/styles/css/dashboardSettingsDialog.css +1 -1
- package/styles/css/dragAndDrop.css +0 -8
- package/styles/css/dragAndDrop.css.map +1 -1
- package/styles/css/drillConfigPanel.css +7 -7
- package/styles/css/drillConfigPanel.css.map +1 -1
- package/styles/css/filterBar.css +4 -4
- package/styles/css/filterBar.css.map +1 -1
- package/styles/css/grouped-navigation.css +2 -2
- package/styles/css/grouped-navigation.css.map +1 -1
- package/styles/css/icons.css.map +1 -1
- package/styles/css/insightConfiguration.css +1 -1
- package/styles/css/insightConfiguration.css.map +1 -1
- package/styles/css/insightEditor.css +46 -0
- package/styles/css/insightEditor.css.map +1 -0
- package/styles/css/kpi.css +2 -2
- package/styles/css/kpi.css.map +1 -1
- package/styles/css/kpi_alert_dialog.css +2 -2
- package/styles/css/layout.css +5 -5
- package/styles/css/layout.css.map +1 -1
- package/styles/css/main.css +336 -219
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +2 -2
- package/styles/css/notifications_channels_dialog.css.map +1 -1
- package/styles/css/resizing.css.map +1 -1
- package/styles/css/richTextWidget.css.map +1 -1
- package/styles/css/saveAsDialog.css.map +1 -1
- package/styles/css/sidebar.css +35 -10
- package/styles/css/sidebar.css.map +1 -1
- package/styles/css/topBar.css.map +1 -1
- package/styles/css/visualization.css.map +1 -1
- package/styles/css/visualizationSwitcherHeader.css.map +1 -1
- package/styles/css/visualizationSwitcherToolbar.css +1 -1
- package/styles/css/visualizationSwitcherToolbar.css.map +1 -1
- package/styles/css/visualizationSwitcherWidget.css +1 -1
- package/styles/css/visualizationSwitcherWidget.css.map +1 -1
- package/styles/scss/_variables.scss +3 -2
- package/styles/scss/_zIndexes.scss +4 -0
- package/styles/scss/attributeFilterConfig.scss +1 -1
- package/styles/scss/configurationPanel.scss +1 -1
- package/styles/scss/dashboard.scss +104 -96
- package/styles/scss/dashboardContentLoader.scss +45 -0
- package/styles/scss/dragAndDrop.scss +2 -9
- package/styles/scss/drillConfigPanel.scss +3 -3
- package/styles/scss/insightEditor.scss +53 -0
- package/styles/scss/layout.scss +1 -1
- package/styles/scss/main.scss +1 -0
- package/styles/scss/sidebar.scss +47 -12
- package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts +0 -5
- package/esm/presentation/dashboard/components/DashboardSkeleton.d.ts.map +0 -1
- package/esm/presentation/dashboard/components/DashboardSkeleton.js +0 -20
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { areObjRefsEqual, dashboardAttributeFilterItemLocalIdentifier, dashboardFilterLocalIdentifier, isAllTimeDashboardDateFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardDateFilterWithDimension, isDashboardMeasureValueFilter, isNoopAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
3
|
+
import { applyMirroredFilterValue, findAppliedFilterForStaged, findCounterpartFilter, findOriginalFilter, isCrossFilteringVirtualFilter, retargetAttributeFilterItem, } from "../../../store/tabs/filterContext/filterSync.js";
|
|
4
|
+
import { tabsActions } from "../../../store/tabs/index.js";
|
|
5
|
+
function defineRule(actionCreator, rule) {
|
|
6
|
+
return defineActionsRule(actionCreator, (payload, target, ctx) => {
|
|
7
|
+
const targetPayload = rule(payload, target, ctx);
|
|
8
|
+
return targetPayload ? [actionCreator(targetPayload)] : [];
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function defineActionsRule(actionCreator, rule) {
|
|
12
|
+
return [actionCreator.type, rule];
|
|
13
|
+
}
|
|
14
|
+
//
|
|
15
|
+
// Shared lookups
|
|
16
|
+
//
|
|
17
|
+
function filtersOf(tab) {
|
|
18
|
+
return tab.filterContext?.filterContextDefinition?.filters ?? [];
|
|
19
|
+
}
|
|
20
|
+
function findFilterByLocalId(tab, localIdentifier) {
|
|
21
|
+
return filtersOf(tab).find((item) => dashboardFilterLocalIdentifier(item) === localIdentifier);
|
|
22
|
+
}
|
|
23
|
+
function findCounterpartOf(ctx, sourceTab, sourceFilter, target) {
|
|
24
|
+
const { crossFilteringLocalIdsByTab } = ctx.scope;
|
|
25
|
+
if (isCrossFilteringVirtualFilter(sourceTab, dashboardFilterLocalIdentifier(sourceFilter), crossFilteringLocalIdsByTab)) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
return findCounterpartFilter(sourceTab, sourceFilter, target, ctx.state.attributesWithReferences, {
|
|
29
|
+
crossFilteringLocalIdsByTab,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The filter on `target` that is the same logical filter as the source tab filter `sourceLocalId`.
|
|
34
|
+
* Cross-filtering virtual filters have no counterpart.
|
|
35
|
+
*/
|
|
36
|
+
function findCounterpart(ctx, target, sourceLocalId) {
|
|
37
|
+
const sourceFilter = findFilterByLocalId(ctx.source, sourceLocalId);
|
|
38
|
+
return sourceFilter ? findCounterpartOf(ctx, ctx.source, sourceFilter, target) : undefined;
|
|
39
|
+
}
|
|
40
|
+
function counterpartLocalId(ctx, target, sourceLocalId) {
|
|
41
|
+
const counterpart = findCounterpart(ctx, target, sourceLocalId);
|
|
42
|
+
return counterpart ? dashboardFilterLocalIdentifier(counterpart) : undefined;
|
|
43
|
+
}
|
|
44
|
+
function findDimensionDateFilter(tab, dataSet) {
|
|
45
|
+
return filtersOf(tab).find((item) => isDashboardDateFilterWithDimension(item) && areObjRefsEqual(item.dateFilter.dataSet, dataSet));
|
|
46
|
+
}
|
|
47
|
+
//
|
|
48
|
+
// Selection
|
|
49
|
+
//
|
|
50
|
+
function findSelectionCounterpart(ctx, target, sourceLocalId) {
|
|
51
|
+
const sourceFilter = findFilterByLocalId(ctx.source, sourceLocalId);
|
|
52
|
+
if (!isDashboardAttributeFilter(sourceFilter)) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
const counterpart = findCounterpartOf(ctx, ctx.source, sourceFilter, target);
|
|
56
|
+
return isDashboardAttributeFilter(counterpart) && counterpart.attributeFilter.localIdentifier
|
|
57
|
+
? counterpart
|
|
58
|
+
: undefined;
|
|
59
|
+
}
|
|
60
|
+
function findMeasureValueCounterpart(ctx, target, sourceLocalId) {
|
|
61
|
+
const sourceFilter = findFilterByLocalId(ctx.source, sourceLocalId);
|
|
62
|
+
if (!isDashboardMeasureValueFilter(sourceFilter)) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
const counterpart = findCounterpartOf(ctx, ctx.source, sourceFilter, target);
|
|
66
|
+
return isDashboardMeasureValueFilter(counterpart) ? counterpart : undefined;
|
|
67
|
+
}
|
|
68
|
+
function findAppliedDateFilter(tab, dataSet) {
|
|
69
|
+
return dataSet ? findDimensionDateFilter(tab, dataSet) : filtersOf(tab).find(isDashboardCommonDateFilter);
|
|
70
|
+
}
|
|
71
|
+
function toUpsertDateFilterPayload(filter) {
|
|
72
|
+
const { dataSet, localIdentifier, emptyValueHandling, boundedFilter, type, granularity, from, to } = filter.dateFilter;
|
|
73
|
+
const shared = {
|
|
74
|
+
...(dataSet ? { dataSet } : {}),
|
|
75
|
+
...(localIdentifier ? { localIdentifier } : {}),
|
|
76
|
+
...(emptyValueHandling ? { emptyValueHandling } : {}),
|
|
77
|
+
};
|
|
78
|
+
if (isAllTimeDashboardDateFilter(filter)) {
|
|
79
|
+
return { type: "allTime", ...shared };
|
|
80
|
+
}
|
|
81
|
+
return { type, granularity, from, to, ...(boundedFilter ? { boundedFilter } : {}), ...shared };
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Saved date filter of `target`. A common date filter without a saved original is all time, which is
|
|
85
|
+
* stored as the absence of the filter. A dimension date filter without a saved original is left unchanged.
|
|
86
|
+
*/
|
|
87
|
+
function savedDateFilterPayload(target, applied, dataSet) {
|
|
88
|
+
const original = findOriginalFilter(target, applied ?? { dateFilter: { type: "relative", granularity: "GDC.time.date" } });
|
|
89
|
+
if (isDashboardDateFilter(original)) {
|
|
90
|
+
return toUpsertDateFilterPayload(original);
|
|
91
|
+
}
|
|
92
|
+
return dataSet ? undefined : { type: "allTime" };
|
|
93
|
+
}
|
|
94
|
+
function committedParameterValues(ctx, target) {
|
|
95
|
+
const stagedRefs = (ctx.source.parameters?.parameters ?? [])
|
|
96
|
+
.filter((entry) => entry.workingOverride !== undefined)
|
|
97
|
+
.map((entry) => entry.parameter.ref);
|
|
98
|
+
return stagedRefs.flatMap((ref) => {
|
|
99
|
+
const committed = ctx.sourceAfter.parameters?.parameters.find((entry) => areObjRefsEqual(entry.parameter.ref, ref));
|
|
100
|
+
const definedOnTarget = target.parameters?.parameters.some((entry) => areObjRefsEqual(entry.parameter.ref, ref));
|
|
101
|
+
return committed && definedOnTarget ? [{ ref, value: committed.runtimeOverride }] : [];
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function committedFilterValues(ctx, target) {
|
|
105
|
+
const staged = ctx.source.filterContext?.workingFilterContextDefinition?.filters ?? [];
|
|
106
|
+
return staged.flatMap((item) => {
|
|
107
|
+
const committed = findAppliedFilterForStaged(ctx.sourceAfter, item);
|
|
108
|
+
if (!committed) {
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
111
|
+
const counterpart = findCounterpartOf(ctx, ctx.sourceAfter, committed, target);
|
|
112
|
+
if (counterpart) {
|
|
113
|
+
return [applyMirroredFilterValue(committed, counterpart)];
|
|
114
|
+
}
|
|
115
|
+
// A tab without a common date filter is all time, so it receives the committed value
|
|
116
|
+
// without the local identifier of the source.
|
|
117
|
+
if (!isDashboardCommonDateFilter(committed) || isNoopAllTimeDashboardDateFilter(committed)) {
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
const { localIdentifier: _sourceLocalIdentifier, ...dateFilter } = committed.dateFilter;
|
|
121
|
+
return [{ dateFilter }];
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
//
|
|
125
|
+
// Rules
|
|
126
|
+
//
|
|
127
|
+
const filterContextRules = [
|
|
128
|
+
defineRule(tabsActions.addAttributeFilterDisplayForm, (payload, target) => {
|
|
129
|
+
if (!target.filterContext?.attributeFilterDisplayForms) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
return { displayForm: "displayForm" in payload ? payload.displayForm : payload };
|
|
133
|
+
}),
|
|
134
|
+
// Selection changes swap the display form together with elements expressed in it, so the swap
|
|
135
|
+
// follows the selection. Filter configuration handlers do not sync these actions.
|
|
136
|
+
// A tab that shows its display form as its label keeps showing it as its display-as label.
|
|
137
|
+
// With `restoreTargetOriginal`, every tab restores its own saved labels.
|
|
138
|
+
defineActionsRule(tabsActions.changeAttributeDisplayForm, (payload, target, ctx) => {
|
|
139
|
+
// Staged edits stay on their tab until applied; every tab migrates its own filters.
|
|
140
|
+
if (payload.isWorkingSelectionChange || payload.isResultOfMigration) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
const counterpart = findCounterpart(ctx, target, payload.filterLocalId);
|
|
144
|
+
if (!isDashboardAttributeFilter(counterpart)) {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
const filterLocalId = dashboardFilterLocalIdentifier(counterpart);
|
|
148
|
+
if (!payload.restoreTargetOriginal) {
|
|
149
|
+
const changeDisplayForm = tabsActions.changeAttributeDisplayForm({ ...payload, filterLocalId });
|
|
150
|
+
const currentDisplayForm = counterpart.attributeFilter.displayForm;
|
|
151
|
+
const hasDisplayAsLabel = target.attributeFilterConfigs?.attributeFilterConfigs?.some((config) => config.localIdentifier === filterLocalId && config.displayAsLabel);
|
|
152
|
+
if (hasDisplayAsLabel || areObjRefsEqual(currentDisplayForm, payload.displayForm)) {
|
|
153
|
+
return [changeDisplayForm];
|
|
154
|
+
}
|
|
155
|
+
return [
|
|
156
|
+
changeDisplayForm,
|
|
157
|
+
tabsActions.changeDisplayAsLabel({
|
|
158
|
+
localIdentifier: filterLocalId,
|
|
159
|
+
displayAsLabel: currentDisplayForm,
|
|
160
|
+
}),
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
const original = findOriginalFilter(target, counterpart);
|
|
164
|
+
if (!isDashboardAttributeFilter(original) ||
|
|
165
|
+
areObjRefsEqual(original.attributeFilter.displayForm, counterpart.attributeFilter.displayForm)) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
return [
|
|
169
|
+
tabsActions.changeAttributeDisplayForm({
|
|
170
|
+
...payload,
|
|
171
|
+
filterLocalId,
|
|
172
|
+
displayForm: original.attributeFilter.displayForm,
|
|
173
|
+
}),
|
|
174
|
+
];
|
|
175
|
+
}),
|
|
176
|
+
// A display-as label is filter configuration, which stays on its tab. Only a reset is mirrored,
|
|
177
|
+
// so that every tab restores its own saved label.
|
|
178
|
+
defineRule(tabsActions.changeDisplayAsLabel, (payload, target, ctx) => {
|
|
179
|
+
if (!payload.restoreTargetOriginal) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
const localIdentifier = counterpartLocalId(ctx, target, payload.localIdentifier);
|
|
183
|
+
if (!localIdentifier) {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
const savedConfigs = ctx.scope.persistedAttributeFilterConfigsByTab?.[target.localIdentifier];
|
|
187
|
+
if (!savedConfigs) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
const displayAsLabel = savedConfigs.find((config) => config.localIdentifier === localIdentifier)?.displayAsLabel;
|
|
191
|
+
const currentDisplayAsLabel = target.attributeFilterConfigs?.attributeFilterConfigs?.find((config) => config.localIdentifier === localIdentifier)?.displayAsLabel;
|
|
192
|
+
return areObjRefsEqual(displayAsLabel, currentDisplayAsLabel)
|
|
193
|
+
? undefined
|
|
194
|
+
: { ...payload, localIdentifier, displayAsLabel };
|
|
195
|
+
}),
|
|
196
|
+
];
|
|
197
|
+
// Staged edits stay on their tab until applied. With `restoreTargetOriginal`, every tab restores its own saved value.
|
|
198
|
+
const selectionRules = [
|
|
199
|
+
defineRule(tabsActions.updateAttributeFilterSelection, (payload, target, ctx) => {
|
|
200
|
+
// Every tab migrates its own filters, so a migrated selection stays on its tab.
|
|
201
|
+
if (payload.isWorkingSelectionChange || payload.isResultOfMigration) {
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
const counterpart = findSelectionCounterpart(ctx, target, payload.filterLocalId);
|
|
205
|
+
if (!counterpart) {
|
|
206
|
+
return undefined;
|
|
207
|
+
}
|
|
208
|
+
const original = payload.restoreTargetOriginal ? findOriginalFilter(target, counterpart) : undefined;
|
|
209
|
+
if (payload.restoreTargetOriginal && !isDashboardAttributeFilter(original)) {
|
|
210
|
+
return undefined;
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
...payload,
|
|
214
|
+
filterLocalId: counterpart.attributeFilter.localIdentifier,
|
|
215
|
+
...(isDashboardAttributeFilter(original)
|
|
216
|
+
? {
|
|
217
|
+
elements: original.attributeFilter.attributeElements,
|
|
218
|
+
negativeSelection: original.attributeFilter.negativeSelection,
|
|
219
|
+
}
|
|
220
|
+
: {}),
|
|
221
|
+
// Every tab migrates its own filters.
|
|
222
|
+
enableImmediateAttributeFilterDisplayAsLabelMigration: false,
|
|
223
|
+
};
|
|
224
|
+
}),
|
|
225
|
+
defineRule(tabsActions.replaceAttributeFilterItem, (payload, target, ctx) => {
|
|
226
|
+
if (payload.isWorkingSelectionChange) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
const sourceFilter = findFilterByLocalId(ctx.source, payload.filterLocalId);
|
|
230
|
+
if (!isDashboardAttributeFilterItem(sourceFilter)) {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
const counterpart = findCounterpartOf(ctx, ctx.source, sourceFilter, target);
|
|
234
|
+
if (!isDashboardAttributeFilterItem(counterpart)) {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
const filterLocalId = dashboardAttributeFilterItemLocalIdentifier(counterpart);
|
|
238
|
+
if (!filterLocalId) {
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
const original = payload.restoreTargetOriginal ? findOriginalFilter(target, counterpart) : undefined;
|
|
242
|
+
if (payload.restoreTargetOriginal && !isDashboardAttributeFilterItem(original)) {
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
const replacement = isDashboardAttributeFilterItem(original) ? original : payload.filter;
|
|
246
|
+
return { ...payload, filterLocalId, filter: retargetAttributeFilterItem(replacement, filterLocalId) };
|
|
247
|
+
}),
|
|
248
|
+
defineRule(tabsActions.clearAttributeFiltersSelection, (payload, target, ctx) => {
|
|
249
|
+
const filterLocalIds = payload.filterLocalIds.flatMap((filterLocalId) => {
|
|
250
|
+
const counterpart = findSelectionCounterpart(ctx, target, filterLocalId);
|
|
251
|
+
return counterpart ? [counterpart.attributeFilter.localIdentifier] : [];
|
|
252
|
+
});
|
|
253
|
+
if (filterLocalIds.length === 0) {
|
|
254
|
+
return undefined;
|
|
255
|
+
}
|
|
256
|
+
return { filterLocalIds, ...(payload.restoreTargetOriginal ? { restoreOriginal: true } : {}) };
|
|
257
|
+
}),
|
|
258
|
+
defineRule(tabsActions.upsertDateFilter, (payload, target) => {
|
|
259
|
+
if (payload.isWorkingSelectionChange || !target.filterContext?.filterContextDefinition) {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
const counterpart = findAppliedDateFilter(target, payload.dataSet);
|
|
263
|
+
// A common date filter always has a counterpart: all time is stored as its absence.
|
|
264
|
+
if (!counterpart && payload.dataSet) {
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
const value = payload.restoreTargetOriginal
|
|
268
|
+
? savedDateFilterPayload(target, counterpart, payload.dataSet)
|
|
269
|
+
: payload;
|
|
270
|
+
if (!value) {
|
|
271
|
+
return undefined;
|
|
272
|
+
}
|
|
273
|
+
// A common date filter created on the target does not take the local identifier of the source.
|
|
274
|
+
const ownValue = payload.restoreTargetOriginal ? value.localIdentifier : undefined;
|
|
275
|
+
return { ...value, localIdentifier: counterpart?.dateFilter.localIdentifier ?? ownValue };
|
|
276
|
+
}),
|
|
277
|
+
defineRule(tabsActions.changeMeasureValueFilterCondition, (payload, target, ctx) => {
|
|
278
|
+
if (payload.isWorkingSelectionChange) {
|
|
279
|
+
return undefined;
|
|
280
|
+
}
|
|
281
|
+
const counterpart = findMeasureValueCounterpart(ctx, target, payload.localIdentifier);
|
|
282
|
+
if (!counterpart) {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
const localIdentifier = counterpart.dashboardMeasureValueFilter.localIdentifier;
|
|
286
|
+
if (!payload.restoreTargetOriginal) {
|
|
287
|
+
return { ...payload, localIdentifier };
|
|
288
|
+
}
|
|
289
|
+
const original = findOriginalFilter(target, counterpart);
|
|
290
|
+
return isDashboardMeasureValueFilter(original)
|
|
291
|
+
? { ...payload, localIdentifier, conditions: original.dashboardMeasureValueFilter.conditions }
|
|
292
|
+
: undefined;
|
|
293
|
+
}),
|
|
294
|
+
defineRule(tabsActions.setMeasureValueFilterDimensionality, (payload, target, ctx) => {
|
|
295
|
+
const counterpart = findMeasureValueCounterpart(ctx, target, payload.localIdentifier);
|
|
296
|
+
if (!counterpart) {
|
|
297
|
+
return undefined;
|
|
298
|
+
}
|
|
299
|
+
const localIdentifier = counterpart.dashboardMeasureValueFilter.localIdentifier;
|
|
300
|
+
if (!payload.restoreTargetOriginal) {
|
|
301
|
+
return { ...payload, localIdentifier };
|
|
302
|
+
}
|
|
303
|
+
const original = findOriginalFilter(target, counterpart);
|
|
304
|
+
return isDashboardMeasureValueFilter(original)
|
|
305
|
+
? {
|
|
306
|
+
...payload,
|
|
307
|
+
localIdentifier,
|
|
308
|
+
dimensionality: original.dashboardMeasureValueFilter.dimensionality,
|
|
309
|
+
}
|
|
310
|
+
: undefined;
|
|
311
|
+
}),
|
|
312
|
+
defineRule(tabsActions.setParameterRuntimeValues, (payload, target) => {
|
|
313
|
+
const values = payload.values.filter((value) => target.parameters?.parameters.some((entry) => areObjRefsEqual(entry.parameter.ref, value.ref)));
|
|
314
|
+
return values.length > 0 ? { ...payload, values } : undefined;
|
|
315
|
+
}),
|
|
316
|
+
// Other tabs receive the committed values of the source tab, not their own staged values.
|
|
317
|
+
defineRule(tabsActions.applyWorkingSelection, (_payload, target, ctx) => {
|
|
318
|
+
const filters = committedFilterValues(ctx, target);
|
|
319
|
+
const parameters = committedParameterValues(ctx, target);
|
|
320
|
+
if (filters.length === 0 && parameters.length === 0) {
|
|
321
|
+
return undefined;
|
|
322
|
+
}
|
|
323
|
+
return { mirroredSelection: { filters, parameters } };
|
|
324
|
+
}),
|
|
325
|
+
];
|
|
326
|
+
/**
|
|
327
|
+
* Tabs slice actions that are mirrored to other tabs when filters persist across tabs, keyed by action type.
|
|
328
|
+
* Actions without a rule apply to their own tab only, which includes every filter configuration change.
|
|
329
|
+
*
|
|
330
|
+
* @internal
|
|
331
|
+
*/
|
|
332
|
+
export const tabSyncRules = new Map([
|
|
333
|
+
...filterContextRules,
|
|
334
|
+
...selectionRules,
|
|
335
|
+
]);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Action } from "@reduxjs/toolkit";
|
|
2
|
+
import { type SagaIterator } from "redux-saga";
|
|
3
|
+
import { type IDashboardCommand } from "../../../commands/base.js";
|
|
4
|
+
import { type DashboardContext } from "../../../types/commonTypes.js";
|
|
5
|
+
import { type IFilterContextByTabSnapshot } from "../common.js";
|
|
6
|
+
import { type ITabSyncScope } from "./tabSyncScope.js";
|
|
7
|
+
/**
|
|
8
|
+
* State of tab sync for one command, from {@link beginTabSync} to {@link endTabSync}.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface ITabSyncSession {
|
|
13
|
+
readonly scope: ITabSyncScope;
|
|
14
|
+
/**
|
|
15
|
+
* Filter contexts of every tab before the command, taken only when sync is enabled.
|
|
16
|
+
*/
|
|
17
|
+
readonly snapshot: IFilterContextByTabSnapshot | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface IBeginTabSyncOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Set to false to keep this command on its own tab even when filters persist across tabs.
|
|
25
|
+
*/
|
|
26
|
+
readonly enabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Tab the command is issued on. Defaults to the active tab.
|
|
29
|
+
*/
|
|
30
|
+
readonly tabLocalIdentifier?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Starts tab sync for a command. Call before reading the state that the command changes.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function beginTabSync(options?: IBeginTabSyncOptions): SagaIterator<ITabSyncSession>;
|
|
38
|
+
/**
|
|
39
|
+
* Dispatches `actions` together with their copies for the other tabs, as one batch.
|
|
40
|
+
*
|
|
41
|
+
* @returns every dispatched action, copies included
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare function putTabSynced(session: ITabSyncSession, actions: readonly Action[]): SagaIterator<Action[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Emits a filter context changed event for the source tab, also when the command changed nothing,
|
|
47
|
+
* and when sync is enabled one more for every other tab the command changed.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare function endTabSync(ctx: DashboardContext, cmd: IDashboardCommand, session: ITabSyncSession, tabLocalIdentifier?: string): SagaIterator<void>;
|
|
52
|
+
//# sourceMappingURL=tabSyncSaga.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabSyncSaga.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncSaga.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAQnE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EACH,KAAK,2BAA2B,EAInC,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,GAAG,SAAS,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAiB,YAAY,CAAC,OAAO,GAAE,oBAAyB,GAAG,YAAY,CAAC,eAAe,CAAC,CA2B/F;AAED;;;;;GAKG;AACH,wBAAiB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAQ1G;AAED;;;;;GAKG;AACH,wBAAiB,UAAU,CACvB,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,OAAO,EAAE,eAAe,EACxB,kBAAkB,CAAC,EAAE,MAAM,GAC5B,YAAY,CAAC,IAAI,CAAC,CAWpB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { batchActions } from "redux-batched-actions";
|
|
3
|
+
import { call, put, select } from "redux-saga/effects";
|
|
4
|
+
import { selectCrossFilteringFiltersLocalIdentifiersByTab } from "../../../store/drill/drillSelectors.js";
|
|
5
|
+
import { selectEnablePersistentFiltersAcrossTabs, selectPersistedDashboardAttributeFilterConfigsByTab, } from "../../../store/meta/metaSelectors.js";
|
|
6
|
+
import { selectActiveTabLocalIdentifier, selectTabsState } from "../../../store/tabs/tabsSelectors.js";
|
|
7
|
+
import { captureFilterContextByTabSnapshot, dispatchFilterContextChanged, dispatchFilterContextChangedForMutatedTabs, } from "../common.js";
|
|
8
|
+
import { expandActionsForTabSync } from "./expandActionsForTabSync.js";
|
|
9
|
+
/**
|
|
10
|
+
* Starts tab sync for a command. Call before reading the state that the command changes.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export function* beginTabSync(options = {}) {
|
|
15
|
+
const enablePersistentFiltersAcrossTabs = yield select(selectEnablePersistentFiltersAcrossTabs);
|
|
16
|
+
const activeTabLocalIdentifier = yield select(selectActiveTabLocalIdentifier);
|
|
17
|
+
const enabled = !!enablePersistentFiltersAcrossTabs && (options.enabled ?? true);
|
|
18
|
+
const sourceTabLocalIdentifier = options.tabLocalIdentifier ?? activeTabLocalIdentifier;
|
|
19
|
+
const crossFilteringLocalIdsByTab = enabled ? yield select(selectCrossFilteringFiltersLocalIdentifiersByTab) : {};
|
|
20
|
+
const persistedAttributeFilterConfigsByTab = enabled ? yield select(selectPersistedDashboardAttributeFilterConfigsByTab) : {};
|
|
21
|
+
const snapshot = enabled
|
|
22
|
+
? yield call(captureFilterContextByTabSnapshot)
|
|
23
|
+
: undefined;
|
|
24
|
+
return {
|
|
25
|
+
scope: {
|
|
26
|
+
enabled,
|
|
27
|
+
sourceTabLocalIdentifier,
|
|
28
|
+
crossFilteringLocalIdsByTab,
|
|
29
|
+
persistedAttributeFilterConfigsByTab,
|
|
30
|
+
},
|
|
31
|
+
snapshot,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Dispatches `actions` together with their copies for the other tabs, as one batch.
|
|
36
|
+
*
|
|
37
|
+
* @returns every dispatched action, copies included
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export function* putTabSynced(session, actions) {
|
|
41
|
+
if (actions.length === 0) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
const tabsState = yield select(selectTabsState);
|
|
45
|
+
const expanded = expandActionsForTabSync(tabsState, actions, session.scope);
|
|
46
|
+
yield put(expanded.length === 1 ? expanded[0] : batchActions(expanded));
|
|
47
|
+
return expanded;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Emits a filter context changed event for the source tab, also when the command changed nothing,
|
|
51
|
+
* and when sync is enabled one more for every other tab the command changed.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export function* endTabSync(ctx, cmd, session, tabLocalIdentifier) {
|
|
56
|
+
yield call(dispatchFilterContextChanged, ctx, cmd, tabLocalIdentifier);
|
|
57
|
+
if (session.snapshot) {
|
|
58
|
+
yield call(dispatchFilterContextChangedForMutatedTabs, ctx, cmd, session.snapshot, session.scope.sourceTabLocalIdentifier);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { type IDashboardAttributeFilterConfig } from "@gooddata/sdk-model";
|
|
3
|
+
import { type CrossFilteringLocalIdsByTab } from "../../../store/tabs/filterContext/filterSync.js";
|
|
4
|
+
import { type ITabState, type ITabsState } from "../../../store/tabs/tabsState.js";
|
|
5
|
+
/**
|
|
6
|
+
* Everything the tab sync planner needs to know about the command being handled.
|
|
7
|
+
* Built once per command by {@link beginTabSync}.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface ITabSyncScope {
|
|
12
|
+
/**
|
|
13
|
+
* False when filters are not persisted across tabs, or when the handler opts out
|
|
14
|
+
* for this command (e.g. cross-filtering virtual filters). Nothing is mirrored then.
|
|
15
|
+
*/
|
|
16
|
+
readonly enabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Tab the command was issued on. Synced actions without `tabLocalIdentifier` in their payload
|
|
19
|
+
* are addressed to this tab; the active tab is used when undefined.
|
|
20
|
+
*/
|
|
21
|
+
readonly sourceTabLocalIdentifier: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Cross-filtering virtual filters, which are never mirrored to or from other tabs.
|
|
24
|
+
*/
|
|
25
|
+
readonly crossFilteringLocalIdsByTab: CrossFilteringLocalIdsByTab;
|
|
26
|
+
/**
|
|
27
|
+
* Attribute filter configs of the saved dashboard keyed by tab local identifier. A tab that is
|
|
28
|
+
* missing has no saved configs, so a reset leaves its display-as labels unchanged.
|
|
29
|
+
*/
|
|
30
|
+
readonly persistedAttributeFilterConfigsByTab?: Readonly<Record<string, readonly IDashboardAttributeFilterConfig[]>>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Input of a single tab sync rule.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export interface ITabSyncRuleContext {
|
|
38
|
+
readonly scope: ITabSyncScope;
|
|
39
|
+
/**
|
|
40
|
+
* Tabs state before the source action is applied. Mirrored actions of previous
|
|
41
|
+
* actions in the same batch are already applied.
|
|
42
|
+
*/
|
|
43
|
+
readonly state: ITabsState;
|
|
44
|
+
/**
|
|
45
|
+
* Source tab before the source action is applied.
|
|
46
|
+
*/
|
|
47
|
+
readonly source: ITabState;
|
|
48
|
+
/**
|
|
49
|
+
* Source tab after the source action is applied.
|
|
50
|
+
*/
|
|
51
|
+
readonly sourceAfter: ITabState;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Translates the payload of an action applied on the source tab into the payload
|
|
55
|
+
* of the same action for `target`. Returns undefined when `target` is left untouched.
|
|
56
|
+
* The planner sets `tabLocalIdentifier` of the returned payload.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export type TabSyncRule<P> = (payload: P, target: ITabState, ctx: ITabSyncRuleContext) => P | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Translates the payload of an action applied on the source tab into the actions that apply it
|
|
63
|
+
* to `target`. Returns an empty array when `target` is left untouched.
|
|
64
|
+
* The planner sets `tabLocalIdentifier` of every returned payload.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export type TabSyncActionsRule<P> = (payload: P, target: ITabState, ctx: ITabSyncRuleContext) => PayloadAction<object>[];
|
|
69
|
+
//# sourceMappingURL=tabSyncScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabSyncScope.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncScope.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,QAAQ,CAAC,2BAA2B,EAAE,2BAA2B,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,oCAAoC,CAAC,EAAE,QAAQ,CACpD,MAAM,CAAC,MAAM,EAAE,SAAS,+BAA+B,EAAE,CAAC,CAC7D,CAAC;CACL;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,KAAK,CAAC,GAAG,SAAS,CAAC;AAExG;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAChC,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,mBAAmB,KACvB,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Action } from "@reduxjs/toolkit";
|
|
2
|
+
import { type IWrittenTabFilters } from "../../../store/tabs/filterContext/filterContextReducers.js";
|
|
3
|
+
import { type IWrittenTabParameters } from "../../../store/tabs/parameters/parametersReducers.js";
|
|
4
|
+
/**
|
|
5
|
+
* The applied filters that `actions` write, per tab. Staged selection changes are not applied, so they
|
|
6
|
+
* are skipped.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function writtenFiltersOf(actions: readonly Action[]): IWrittenTabFilters[];
|
|
11
|
+
/**
|
|
12
|
+
* The parameters that `actions` write, per tab.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function writtenParametersOf(actions: readonly Action[]): IWrittenTabParameters[];
|
|
17
|
+
//# sourceMappingURL=writtenTargets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writtenTargets.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/writtenTargets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK/C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAErG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAMlG;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,EAAE,CA8CjF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,qBAAqB,EAAE,CAgBvF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { BATCH } from "redux-batched-actions";
|
|
3
|
+
import { areObjRefsEqual } from "@gooddata/sdk-model";
|
|
4
|
+
import { tabsActions } from "../../../store/tabs/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* The applied filters that `actions` write, per tab. Staged selection changes are not applied, so they
|
|
7
|
+
* are skipped.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export function writtenFiltersOf(actions) {
|
|
12
|
+
const byTab = new Map();
|
|
13
|
+
const forTab = (tabLocalIdentifier) => {
|
|
14
|
+
let written = byTab.get(tabLocalIdentifier);
|
|
15
|
+
if (!written) {
|
|
16
|
+
written = { tabLocalIdentifier, filterLocalIds: [], dateDataSets: [], commonDateFilter: false };
|
|
17
|
+
byTab.set(tabLocalIdentifier, written);
|
|
18
|
+
}
|
|
19
|
+
return written;
|
|
20
|
+
};
|
|
21
|
+
const addFilters = (tabLocalIdentifier, localIdentifiers) => {
|
|
22
|
+
const written = forTab(tabLocalIdentifier);
|
|
23
|
+
written.filterLocalIds = [...new Set([...written.filterLocalIds, ...localIdentifiers])];
|
|
24
|
+
};
|
|
25
|
+
for (const action of actions.flatMap(unbatched)) {
|
|
26
|
+
if (tabsActions.updateAttributeFilterSelection.match(action) ||
|
|
27
|
+
tabsActions.replaceAttributeFilterItem.match(action) ||
|
|
28
|
+
tabsActions.changeAttributeDisplayForm.match(action)) {
|
|
29
|
+
if (!action.payload.isWorkingSelectionChange) {
|
|
30
|
+
addFilters(action.payload.tabLocalIdentifier, [action.payload.filterLocalId]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else if (tabsActions.clearAttributeFiltersSelection.match(action)) {
|
|
34
|
+
addFilters(action.payload.tabLocalIdentifier, action.payload.filterLocalIds);
|
|
35
|
+
}
|
|
36
|
+
else if (tabsActions.changeMeasureValueFilterCondition.match(action) ||
|
|
37
|
+
tabsActions.setMeasureValueFilterDimensionality.match(action)) {
|
|
38
|
+
if (!("isWorkingSelectionChange" in action.payload && action.payload.isWorkingSelectionChange)) {
|
|
39
|
+
addFilters(action.payload.tabLocalIdentifier, [action.payload.localIdentifier]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (tabsActions.upsertDateFilter.match(action) && !action.payload.isWorkingSelectionChange) {
|
|
43
|
+
const written = forTab(action.payload.tabLocalIdentifier);
|
|
44
|
+
const { dataSet } = action.payload;
|
|
45
|
+
if (!dataSet) {
|
|
46
|
+
written.commonDateFilter = true;
|
|
47
|
+
}
|
|
48
|
+
else if (!written.dateDataSets.some((writtenDataSet) => areObjRefsEqual(writtenDataSet, dataSet))) {
|
|
49
|
+
written.dateDataSets = [...written.dateDataSets, dataSet];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return [...byTab.values()];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The parameters that `actions` write, per tab.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export function writtenParametersOf(actions) {
|
|
61
|
+
const byTab = new Map();
|
|
62
|
+
for (const action of actions.flatMap(unbatched)) {
|
|
63
|
+
if (!tabsActions.setParameterRuntimeValues.match(action)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const { tabLocalIdentifier, values } = action.payload;
|
|
67
|
+
const refs = byTab.get(tabLocalIdentifier) ?? [];
|
|
68
|
+
for (const { ref } of values) {
|
|
69
|
+
if (!refs.some((writtenRef) => areObjRefsEqual(writtenRef, ref))) {
|
|
70
|
+
refs.push(ref);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
byTab.set(tabLocalIdentifier, refs);
|
|
74
|
+
}
|
|
75
|
+
return [...byTab.entries()].map(([tabLocalIdentifier, refs]) => ({ tabLocalIdentifier, refs }));
|
|
76
|
+
}
|
|
77
|
+
function unbatched(action) {
|
|
78
|
+
return action.type === BATCH ? action.payload.flatMap(unbatched) : [action];
|
|
79
|
+
}
|
|
@@ -5,7 +5,8 @@ import { type IChangeParameterValues } from "../../commands/parameters.js";
|
|
|
5
5
|
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
6
6
|
/**
|
|
7
7
|
* Parameters not present on a written tab are ignored by the reducer. When persistent filters
|
|
8
|
-
* across tabs are on, the same values are written to every tab
|
|
8
|
+
* across tabs are on, the same values are written to every tab, or with `restorePerTabOriginals`
|
|
9
|
+
* every other tab resets them to its own reset values. A change event is emitted for
|
|
9
10
|
* each tab whose applied values differ from the snapshot, source tab first.
|
|
10
11
|
*
|
|
11
12
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeParameterValuesHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/changeParameterValuesHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"changeParameterValuesHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/changeParameterValuesHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,sBAAsB,EAAmB,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAY3E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAInE;;;;;;;GAOG;AACH,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,sBAAsB,GAC5B,YAAY,CAAC,IAAI,CAAC,CA2BpB;AAoCD;;;;;GAKG;AACH,wBAAiB,wCAAwC,CACrD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,GAAG,SAAS,CAAC,EAClE,WAAW,EAAE,MAAM,GACpB,YAAY,CAAC,IAAI,CAAC,CAOpB;AAED;;;;;GAKG;AACH,wBAAiB,yBAAyB,CACtC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,EACtB,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,GACnD,YAAY,CAAC,IAAI,CAAC,CASpB"}
|