@gooddata/sdk-ui-dashboard 11.65.0-alpha.1 → 11.65.0-alpha.10
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 +72077 -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 +7 -4
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -2
- 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/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 +23 -45
- 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/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/parameters/changeParameterValuesHandler.d.ts +2 -1
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +41 -10
- package/esm/model/commands/parameters.d.ts +11 -1
- package/esm/model/commands/parameters.d.ts.map +1 -1
- package/esm/model/commands/parameters.js +2 -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/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 +139 -31
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +314 -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 +10 -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 +0 -5
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +8 -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 +158 -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 +523 -68
- 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 +335 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeMeasureValueFilterConditionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"changeMeasureValueFilterConditionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterConditionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AASvF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,wBAAiB,wCAAwC,CACrD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,kCAAkC,GACxC,YAAY,CAAC,IAAI,CAAC,CA2CpB"}
|
|
@@ -1,37 +1,31 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { call,
|
|
2
|
+
import { call, select } from "redux-saga/effects";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
4
|
import { measureValueFilterConditionChanged } from "../../../events/filters.js";
|
|
5
5
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
6
6
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
7
|
-
import { selectEnablePersistentFiltersAcrossTabs } from "../../../store/meta/metaSelectors.js";
|
|
8
7
|
import { selectFilterContextMeasureValueFilterByLocalId, selectWorkingFilterContextMeasureValueFilterByLocalId, } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
9
8
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
10
|
-
import {
|
|
9
|
+
import { beginTabSync, endTabSync, putTabSynced } from "../tabSync/tabSyncSaga.js";
|
|
11
10
|
export function* changeMeasureValueFilterConditionHandler(ctx, cmd) {
|
|
12
11
|
const { localIdentifier, conditions, isWorkingSelectionChange } = cmd.payload;
|
|
13
12
|
const existingFilter = yield select(selectFilterContextMeasureValueFilterByLocalId(localIdentifier));
|
|
14
|
-
const
|
|
15
|
-
const filterContextSnapshot = yield call(captureFilterContextByTabSnapshot);
|
|
13
|
+
const session = yield call(beginTabSync);
|
|
16
14
|
if (!existingFilter) {
|
|
17
15
|
throw invalidArgumentsProvided(ctx, cmd, `Attempting to change condition of measure value filter ${localIdentifier} that does not exist on the dashboard.`);
|
|
18
16
|
}
|
|
19
|
-
yield
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
yield call(putTabSynced, session, [
|
|
18
|
+
tabsActions.changeMeasureValueFilterCondition({
|
|
19
|
+
localIdentifier,
|
|
20
|
+
conditions,
|
|
21
|
+
...(isWorkingSelectionChange === undefined ? {} : { isWorkingSelectionChange }),
|
|
22
|
+
}),
|
|
23
|
+
]);
|
|
25
24
|
const updatedFilterSelector = isWorkingSelectionChange
|
|
26
25
|
? selectWorkingFilterContextMeasureValueFilterByLocalId(localIdentifier)
|
|
27
26
|
: selectFilterContextMeasureValueFilterByLocalId(localIdentifier);
|
|
28
27
|
const updatedFilter = yield select(updatedFilterSelector);
|
|
29
28
|
invariant(updatedFilter, "Inconsistent state in changeMeasureValueFilterConditionHandler");
|
|
30
29
|
yield dispatchDashboardEvent(measureValueFilterConditionChanged(ctx, localIdentifier, updatedFilter, conditions, cmd.correlationId));
|
|
31
|
-
|
|
32
|
-
yield call(dispatchFilterContextChangedForMutatedTabs, ctx, cmd, filterContextSnapshot);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
yield call(dispatchFilterContextChanged, ctx, cmd);
|
|
36
|
-
}
|
|
30
|
+
yield call(endTabSync, ctx, cmd, session);
|
|
37
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeMeasureValueFilterDimensionalityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"changeMeasureValueFilterDimensionalityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/measureValueFilter/changeMeasureValueFilterDimensionalityHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AAMzF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,wBAAiB,6CAA6C,CAC1D,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,oCAAoC,GAC1C,YAAY,CAAC,IAAI,CAAC,CAmCpB"}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { call,
|
|
2
|
+
import { call, select } from "redux-saga/effects";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
4
|
import { measureValueFilterDimensionalityChanged } from "../../../events/filters.js";
|
|
5
5
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
6
6
|
import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js";
|
|
7
|
-
import { selectEnablePersistentFiltersAcrossTabs } from "../../../store/meta/metaSelectors.js";
|
|
8
7
|
import { selectFilterContextMeasureValueFilterByLocalId } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
9
8
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
10
|
-
import {
|
|
9
|
+
import { beginTabSync, endTabSync, putTabSynced } from "../tabSync/tabSyncSaga.js";
|
|
11
10
|
export function* changeMeasureValueFilterDimensionalityHandler(ctx, cmd) {
|
|
12
11
|
const { localIdentifier, dimensionality } = cmd.payload;
|
|
13
12
|
const existingFilter = yield select(selectFilterContextMeasureValueFilterByLocalId(localIdentifier));
|
|
14
|
-
const
|
|
13
|
+
const session = yield call(beginTabSync);
|
|
15
14
|
if (!existingFilter) {
|
|
16
15
|
throw invalidArgumentsProvided(ctx, cmd, `Attempting to change dimensionality of measure value filter ${localIdentifier} that does not exist on the dashboard.`);
|
|
17
16
|
}
|
|
18
|
-
yield
|
|
19
|
-
localIdentifier,
|
|
20
|
-
|
|
21
|
-
enablePersistentFiltersAcrossTabs,
|
|
22
|
-
}));
|
|
17
|
+
yield call(putTabSynced, session, [
|
|
18
|
+
tabsActions.setMeasureValueFilterDimensionality({ localIdentifier, dimensionality }),
|
|
19
|
+
]);
|
|
23
20
|
const updatedFilter = yield select(selectFilterContextMeasureValueFilterByLocalId(localIdentifier));
|
|
24
21
|
invariant(updatedFilter, "Inconsistent state in changeMeasureValueFilterDimensionalityHandler");
|
|
25
22
|
yield dispatchDashboardEvent(measureValueFilterDimensionalityChanged(ctx, localIdentifier, updatedFilter, dimensionality, cmd.correlationId));
|
|
26
|
-
yield call(
|
|
23
|
+
yield call(endTabSync, ctx, cmd, session);
|
|
27
24
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Action } from "@reduxjs/toolkit";
|
|
2
|
+
import { type ITabsState } from "../../../store/tabs/tabsState.js";
|
|
3
|
+
import { type ITabSyncScope } from "./tabSyncScope.js";
|
|
4
|
+
/**
|
|
5
|
+
* Returns `actions` followed, after each one, by its copies for the other tabs.
|
|
6
|
+
*
|
|
7
|
+
* Every action is planned against the state that the preceding actions and their copies produce,
|
|
8
|
+
* so e.g. removing an ignore-list entry after removing the filter sees which tabs still use it.
|
|
9
|
+
* Actions with a sync rule but without a tab are addressed to the scope source tab, so that they
|
|
10
|
+
* are applied to the tab they are planned for. Nothing is mirrored when the scope is disabled.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function expandActionsForTabSync(state: ITabsState, actions: readonly Action[], scope: ITabSyncScope): Action[];
|
|
15
|
+
//# sourceMappingURL=expandActionsForTabSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandActionsForTabSync.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/expandActionsForTabSync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,kBAAkB,CAAC;AAInE,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,kCAAkC,CAAC;AAGnF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,aAAa,GACrB,MAAM,EAAE,CAiBV"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { BATCH } from "redux-batched-actions";
|
|
3
|
+
import { tabsActions, tabsSliceReducer } from "../../../store/tabs/index.js";
|
|
4
|
+
import { getTabOrActive } from "../../../store/tabs/tabsState.js";
|
|
5
|
+
import { tabSyncRules } from "./tabSyncRules.js";
|
|
6
|
+
/**
|
|
7
|
+
* Returns `actions` followed, after each one, by its copies for the other tabs.
|
|
8
|
+
*
|
|
9
|
+
* Every action is planned against the state that the preceding actions and their copies produce,
|
|
10
|
+
* so e.g. removing an ignore-list entry after removing the filter sees which tabs still use it.
|
|
11
|
+
* Actions with a sync rule but without a tab are addressed to the scope source tab, so that they
|
|
12
|
+
* are applied to the tab they are planned for. Nothing is mirrored when the scope is disabled.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export function expandActionsForTabSync(state, actions, scope) {
|
|
17
|
+
const sourceActions = actions
|
|
18
|
+
.flatMap(unbatched)
|
|
19
|
+
.map((action) => addressedToSourceTab(action, scope.sourceTabLocalIdentifier));
|
|
20
|
+
if (!scope.enabled) {
|
|
21
|
+
return sourceActions;
|
|
22
|
+
}
|
|
23
|
+
const result = [];
|
|
24
|
+
let current = state;
|
|
25
|
+
for (const action of sourceActions) {
|
|
26
|
+
const after = tabsSliceReducer(current, action);
|
|
27
|
+
const mirrored = mirrorAction(current, after, action, scope);
|
|
28
|
+
result.push(action, ...mirrored);
|
|
29
|
+
current = mirrored.reduce(tabsSliceReducer, after);
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
function mirrorAction(state, after, action, scope) {
|
|
34
|
+
const rule = tabSyncRules.get(action.type);
|
|
35
|
+
if (!rule) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const payload = action.payload;
|
|
39
|
+
const sourceTabLocalIdentifier = payload?.tabLocalIdentifier ?? scope.sourceTabLocalIdentifier;
|
|
40
|
+
const source = getTabOrActive(state, sourceTabLocalIdentifier);
|
|
41
|
+
const sourceAfter = getTabOrActive(after, sourceTabLocalIdentifier);
|
|
42
|
+
if (!source || !sourceAfter) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
const ctx = { scope, state, source, sourceAfter };
|
|
46
|
+
return (state.tabs ?? []).flatMap((target) => {
|
|
47
|
+
if (target.localIdentifier === source.localIdentifier) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
return rule(payload, target, ctx).map((targetAction) => ({
|
|
51
|
+
...targetAction,
|
|
52
|
+
payload: { ...targetAction.payload, tabLocalIdentifier: target.localIdentifier },
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Reducers of actions without a tab apply them to the active tab, which is not the source tab
|
|
58
|
+
* when a handler works on another tab.
|
|
59
|
+
*/
|
|
60
|
+
function addressedToSourceTab(action, sourceTabLocalIdentifier) {
|
|
61
|
+
if (!sourceTabLocalIdentifier || !tabSyncRules.has(action.type)) {
|
|
62
|
+
return action;
|
|
63
|
+
}
|
|
64
|
+
if (tabsActions.addAttributeFilterDisplayForm.match(action)) {
|
|
65
|
+
const { payload } = action;
|
|
66
|
+
return "displayForm" in payload
|
|
67
|
+
? tabsActions.addAttributeFilterDisplayForm({
|
|
68
|
+
...payload,
|
|
69
|
+
tabLocalIdentifier: payload.tabLocalIdentifier ?? sourceTabLocalIdentifier,
|
|
70
|
+
})
|
|
71
|
+
: tabsActions.addAttributeFilterDisplayForm({
|
|
72
|
+
displayForm: payload,
|
|
73
|
+
tabLocalIdentifier: sourceTabLocalIdentifier,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const payload = action.payload;
|
|
77
|
+
if (payload?.tabLocalIdentifier) {
|
|
78
|
+
return action;
|
|
79
|
+
}
|
|
80
|
+
return { ...action, payload: { ...payload, tabLocalIdentifier: sourceTabLocalIdentifier } };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The tabs slice reducer ignores batch actions, which the store unpacks, so planning
|
|
84
|
+
* works on their inner actions.
|
|
85
|
+
*/
|
|
86
|
+
function unbatched(action) {
|
|
87
|
+
return action.type === BATCH ? action.payload.flatMap(unbatched) : [action];
|
|
88
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TabSyncActionsRule } from "./tabSyncScope.js";
|
|
2
|
+
type AnyTabSyncRule = TabSyncActionsRule<any>;
|
|
3
|
+
/**
|
|
4
|
+
* Tabs slice actions that are mirrored to other tabs when filters persist across tabs, keyed by action type.
|
|
5
|
+
* Actions without a rule apply to their own tab only, which includes every filter configuration change.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const tabSyncRules: ReadonlyMap<string, AnyTabSyncRule>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=tabSyncRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabSyncRules.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/tabSync/tabSyncRules.ts"],"names":[],"mappings":"AAoCA,OAAO,EAA4B,KAAK,kBAAkB,EAAoB,MAAM,mBAAmB,CAAC;AAExG,KAAK,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAuZ9C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAG3D,CAAC"}
|
|
@@ -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"}
|