@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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { isEqual, omit } from "lodash-es";
|
|
3
|
-
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterLocalIdentifier, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isExportOverrideFilterContext, isFilterContext, isSingleSelectionFilter, } from "@gooddata/sdk-model";
|
|
3
|
+
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterLocalIdentifier, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isExportOverrideFilterContext, isFilterContext, isSingleSelectionFilter, } from "@gooddata/sdk-model";
|
|
4
4
|
import { filterLocalIdentifiers } from "../../../store/filtering/dashboardFilterSelectors.js";
|
|
5
5
|
import { getRestrictedDashboardFilters } from "../../../store/filtering/restrictedFilterUtils.js";
|
|
6
|
+
import { applyMirroredFilterValue, findCounterpartFilter, } from "../../../store/tabs/filterContext/filterSync.js";
|
|
6
7
|
import { isFilterTypeCompatibleWithSelectionType } from "../../../utils/attributeFilterSelectionTypeCompatibility.js";
|
|
7
8
|
const findMatchingAttributeFilterByLocalIdentifier = (filter, viewFilters) => viewFilters.find((item) => isDashboardAttributeFilter(item) &&
|
|
8
9
|
item.attributeFilter.localIdentifier === filter.attributeFilter.localIdentifier);
|
|
@@ -297,17 +298,43 @@ export const changeFilterContextSelection = (filterContext, filterViewFilters, r
|
|
|
297
298
|
configUpdates,
|
|
298
299
|
};
|
|
299
300
|
};
|
|
301
|
+
/**
|
|
302
|
+
* True when applying the default filter view writes it to other tabs, so the attributes of the attribute
|
|
303
|
+
* filters are needed to match the filters of the tabs, see {@link IApplyDefaultFilterViewOptions}.
|
|
304
|
+
*
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
export function isDefaultFilterViewSharedAcrossTabs(dashboard, filterViews, renderMode, options) {
|
|
308
|
+
const tabs = dashboard.tabs ?? [];
|
|
309
|
+
if (renderMode === "edit" || !options.persistFiltersAcrossTabs || tabs.length < 2) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
const sourceIndex = Math.max(0, tabs.findIndex((tab) => tab.localIdentifier === options.activeTabLocalIdentifier));
|
|
313
|
+
return !!findTabDefaultFilterView(filterViews, tabs[sourceIndex].localIdentifier, sourceIndex === 0);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* The default filter view of a tab. A legacy default view, saved without a tab, belongs to the first tab.
|
|
317
|
+
*
|
|
318
|
+
* @internal
|
|
319
|
+
*/
|
|
320
|
+
export function findTabDefaultFilterView(filterViews, tabLocalIdentifier, isFirstTab) {
|
|
321
|
+
const tabDefaultView = filterViews.find((view) => view.isDefault && view.tabLocalIdentifier === tabLocalIdentifier);
|
|
322
|
+
if (tabDefaultView || !isFirstTab) {
|
|
323
|
+
return tabDefaultView;
|
|
324
|
+
}
|
|
325
|
+
return filterViews.find((view) => view.isDefault && !view.tabLocalIdentifier);
|
|
326
|
+
}
|
|
300
327
|
/**
|
|
301
328
|
* Applies the user's default filter view for the given render mode. The view is the user's own starting
|
|
302
329
|
* point for viewing; edit mode starts from the saved filters, otherwise the view's selection would make
|
|
303
330
|
* the dashboard dirty and get saved into it.
|
|
304
331
|
*/
|
|
305
|
-
export function applyDefaultFilterViewForRenderMode(dashboard, filterViews, exportId, unavailableObjects, renderMode) {
|
|
332
|
+
export function applyDefaultFilterViewForRenderMode(dashboard, filterViews, exportId, unavailableObjects, renderMode, options) {
|
|
306
333
|
return renderMode === "edit"
|
|
307
334
|
? dashboard
|
|
308
|
-
: applyDefaultFilterView(dashboard, filterViews, exportId, unavailableObjects);
|
|
335
|
+
: applyDefaultFilterView(dashboard, filterViews, exportId, unavailableObjects, options);
|
|
309
336
|
}
|
|
310
|
-
export function applyDefaultFilterView(dashboard, filterViews, exportId, unavailableObjects) {
|
|
337
|
+
export function applyDefaultFilterView(dashboard, filterViews, exportId, unavailableObjects, options = {}) {
|
|
311
338
|
// In an export render, the loaded filter context may be synthesized from export metadata,
|
|
312
339
|
// carrying the filters captured at export-request time (they replace the persisted context on
|
|
313
340
|
// the root and on every tab). The user's default filter view must not clobber those filters
|
|
@@ -316,31 +343,13 @@ export function applyDefaultFilterView(dashboard, filterViews, exportId, unavail
|
|
|
316
343
|
if (isExportOverrideFilterContext(dashboard.filterContext, exportId)) {
|
|
317
344
|
return dashboard;
|
|
318
345
|
}
|
|
319
|
-
// If dashboard has tabs, apply default views per tab
|
|
320
346
|
if (dashboard.tabs && dashboard.tabs.length > 0) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
// Find default view specific to this tab
|
|
325
|
-
const tabDefaultView = filterViews.find((view) => view.isDefault && view.tabLocalIdentifier === tab.localIdentifier);
|
|
326
|
-
// Use tab-specific default, or fall back to legacy global default only for the first tab
|
|
327
|
-
const isFirstTab = index === 0;
|
|
328
|
-
const effectiveDefaultView = tabDefaultView ?? (isFirstTab ? legacyDefaultView : undefined);
|
|
329
|
-
const parameters = applyFilterViewParameterValues(tab.parameters, effectiveDefaultView?.parameters);
|
|
330
|
-
if (effectiveDefaultView && tab.filterContext && isFilterContext(tab.filterContext)) {
|
|
331
|
-
const { filterContext: updatedFilterContext, configUpdates } = changeFilterContextSelection(tab.filterContext, effectiveDefaultView.filterContext.filters, filterLocalIdentifiers(getRestrictedDashboardFilters(tab.filterContext.filters, unavailableObjects)), tab.attributeFilterConfigs);
|
|
332
|
-
return {
|
|
333
|
-
...tab,
|
|
334
|
-
...(parameters === undefined ? {} : { parameters }),
|
|
335
|
-
filterContext: updatedFilterContext,
|
|
336
|
-
attributeFilterConfigs: applyConfigUpdates(tab.attributeFilterConfigs, configUpdates),
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
return parameters === undefined ? tab : { ...tab, parameters };
|
|
340
|
-
});
|
|
347
|
+
if (options.persistFiltersAcrossTabs) {
|
|
348
|
+
return applyDefaultFilterViewToSharedTabs(dashboard, dashboard.tabs, filterViews, unavailableObjects, options.activeTabLocalIdentifier, options.attributesWithReferences);
|
|
349
|
+
}
|
|
341
350
|
return {
|
|
342
351
|
...dashboard,
|
|
343
|
-
tabs:
|
|
352
|
+
tabs: dashboard.tabs.map((tab, index) => applyFilterViewToTab(tab, findTabDefaultFilterView(filterViews, tab.localIdentifier, index === 0), unavailableObjects)),
|
|
344
353
|
};
|
|
345
354
|
}
|
|
346
355
|
// Legacy behavior: apply default view to root-level filter context
|
|
@@ -356,6 +365,109 @@ export function applyDefaultFilterView(dashboard, filterViews, exportId, unavail
|
|
|
356
365
|
}
|
|
357
366
|
return dashboard;
|
|
358
367
|
}
|
|
368
|
+
function applyFilterViewToTab(tab, filterView, unavailableObjects) {
|
|
369
|
+
const parameters = applyFilterViewParameterValues(tab.parameters, filterView?.parameters);
|
|
370
|
+
if (filterView && tab.filterContext && isFilterContext(tab.filterContext)) {
|
|
371
|
+
const { filterContext: updatedFilterContext, configUpdates } = changeFilterContextSelection(tab.filterContext, filterView.filterContext.filters, filterLocalIdentifiers(getRestrictedDashboardFilters(tab.filterContext.filters, unavailableObjects)), tab.attributeFilterConfigs);
|
|
372
|
+
return {
|
|
373
|
+
...tab,
|
|
374
|
+
...(parameters === undefined ? {} : { parameters }),
|
|
375
|
+
filterContext: updatedFilterContext,
|
|
376
|
+
attributeFilterConfigs: applyConfigUpdates(tab.attributeFilterConfigs, configUpdates),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
return parameters === undefined ? tab : { ...tab, parameters };
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Applies the default view of the active tab to it and writes the resulting values to the same logical
|
|
383
|
+
* filters and parameters of every other tab, the way a filter change is mirrored while filters persist
|
|
384
|
+
* across tabs. Filters that exist on one tab only keep their own value.
|
|
385
|
+
*/
|
|
386
|
+
function applyDefaultFilterViewToSharedTabs(dashboard, tabs, filterViews, unavailableObjects, activeTabLocalIdentifier, attributesWithReferences) {
|
|
387
|
+
const sourceIndex = Math.max(0, tabs.findIndex((tab) => tab.localIdentifier === activeTabLocalIdentifier));
|
|
388
|
+
const source = tabs[sourceIndex];
|
|
389
|
+
const filterView = findTabDefaultFilterView(filterViews, source.localIdentifier, sourceIndex === 0);
|
|
390
|
+
if (!filterView) {
|
|
391
|
+
return dashboard;
|
|
392
|
+
}
|
|
393
|
+
const updatedSource = applyFilterViewToTab(source, filterView, unavailableObjects);
|
|
394
|
+
return {
|
|
395
|
+
...dashboard,
|
|
396
|
+
tabs: tabs.map((tab) => tab === source
|
|
397
|
+
? updatedSource
|
|
398
|
+
: mirrorTabSelection(source, updatedSource, tab, filterView, unavailableObjects, attributesWithReferences)),
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function mirrorTabSelection(sourceBefore, sourceAfter, target, filterView, unavailableObjects, attributesWithReferences) {
|
|
402
|
+
const parameters = applyFilterViewParameterValues(target.parameters, filterView.parameters);
|
|
403
|
+
const withParameters = parameters === undefined ? target : { ...target, parameters };
|
|
404
|
+
if (!isFilterContext(sourceBefore.filterContext) ||
|
|
405
|
+
!isFilterContext(sourceAfter.filterContext) ||
|
|
406
|
+
!isFilterContext(target.filterContext)) {
|
|
407
|
+
return withParameters;
|
|
408
|
+
}
|
|
409
|
+
const sourceRestricted = filterLocalIdentifiers(getRestrictedDashboardFilters(sourceBefore.filterContext.filters, unavailableObjects));
|
|
410
|
+
const targetRestricted = filterLocalIdentifiers(getRestrictedDashboardFilters(target.filterContext.filters, unavailableObjects));
|
|
411
|
+
const isRestricted = (restricted, filter) => restricted.has(dashboardFilterLocalIdentifier(filter) ?? "");
|
|
412
|
+
const sourceState = toTabSyncState(sourceBefore, sourceBefore.filterContext);
|
|
413
|
+
const targetState = toTabSyncState(target, target.filterContext);
|
|
414
|
+
const replacements = new Map();
|
|
415
|
+
for (const before of sourceBefore.filterContext.filters) {
|
|
416
|
+
if (isCommonDateFilter(before) || isRestricted(sourceRestricted, before)) {
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
const after = findSameTabFilter(sourceAfter.filterContext.filters, before);
|
|
420
|
+
// a list and a text filter hold incompatible values, and their configs stay on their own tab
|
|
421
|
+
if (!after || isDashboardTextAttributeFilter(before) !== isDashboardTextAttributeFilter(after)) {
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
const counterpart = findCounterpartFilter(sourceState, before, targetState, attributesWithReferences);
|
|
425
|
+
if (counterpart && !isRestricted(targetRestricted, counterpart)) {
|
|
426
|
+
replacements.set(counterpart, applyMirroredFilterValue(after, counterpart));
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const mirroredFilters = target.filterContext.filters
|
|
430
|
+
.filter((filter) => !isCommonDateFilter(filter))
|
|
431
|
+
.map((filter) => replacements.get(filter) ?? filter);
|
|
432
|
+
// the common date filter is all time when it is absent, so it is shared even without a counterpart
|
|
433
|
+
const sourceCommonDate = sourceAfter.filterContext.filters.find(isDashboardCommonDateFilter);
|
|
434
|
+
const targetCommonDate = target.filterContext.filters.find(isDashboardCommonDateFilter);
|
|
435
|
+
const commonDate = sourceCommonDate
|
|
436
|
+
? targetCommonDate
|
|
437
|
+
? applyMirroredFilterValue(sourceCommonDate, targetCommonDate)
|
|
438
|
+
: { dateFilter: omit(sourceCommonDate.dateFilter, ["localIdentifier"]) }
|
|
439
|
+
: undefined;
|
|
440
|
+
return {
|
|
441
|
+
...withParameters,
|
|
442
|
+
filterContext: {
|
|
443
|
+
...target.filterContext,
|
|
444
|
+
filters: commonDate ? [commonDate, ...mirroredFilters] : mirroredFilters,
|
|
445
|
+
},
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* The filter of the same tab that `filter` was before a filter view changed its value.
|
|
450
|
+
*/
|
|
451
|
+
function findSameTabFilter(filters, filter) {
|
|
452
|
+
if (isDashboardDateFilter(filter)) {
|
|
453
|
+
return findMatchingDateFilterByDataSet(filter, filters);
|
|
454
|
+
}
|
|
455
|
+
const localIdentifier = dashboardFilterLocalIdentifier(filter);
|
|
456
|
+
return localIdentifier
|
|
457
|
+
? filters.find((item) => dashboardFilterLocalIdentifier(item) === localIdentifier)
|
|
458
|
+
: undefined;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The tab state that the cross-tab filter matching reads. Display form metadata comes from the
|
|
462
|
+
* attributes passed to the matching, as the tab state does not hold it yet.
|
|
463
|
+
*/
|
|
464
|
+
function toTabSyncState(tab, filterContext) {
|
|
465
|
+
return {
|
|
466
|
+
localIdentifier: tab.localIdentifier,
|
|
467
|
+
filterContext: { filtersWithInvalidSelection: [], filterContextDefinition: filterContext },
|
|
468
|
+
attributeFilterConfigs: { attributeFilterConfigs: tab.attributeFilterConfigs },
|
|
469
|
+
};
|
|
470
|
+
}
|
|
359
471
|
/**
|
|
360
472
|
* Default filter views are applied before tab parameters are hydrated into runtime state.
|
|
361
473
|
* Copy captured filter view values into matching dashboard parameters so hydration initializes chips
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { type BatchAction } from "redux-batched-actions";
|
|
2
2
|
import { type SagaIterator } from "redux-saga";
|
|
3
|
-
import { type
|
|
3
|
+
import { type IAttributeWithReferences } from "@gooddata/sdk-backend-spi";
|
|
4
|
+
import { type IDashboard, type IDateHierarchyTemplate, type ObjRef } from "@gooddata/sdk-model";
|
|
4
5
|
import { type InitializeDashboard } from "../../../commands/dashboard.js";
|
|
5
6
|
import { type DashboardContext } from "../../../types/commonTypes.js";
|
|
7
|
+
type IPreloadedAttributeFilters = {
|
|
8
|
+
refs: ObjRef[];
|
|
9
|
+
attributesWithReferences: IAttributeWithReferences[];
|
|
10
|
+
};
|
|
6
11
|
export declare function requestCatalog(ctx: DashboardContext, cmd: InitializeDashboard): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<IDateHierarchyTemplate[]> | import("redux-saga/effects").CallEffect<import("./loadCatalog.js").ILoadedCatalog>> | import("redux-saga/effects").PutEffect<{
|
|
7
12
|
payload: import("../../../../index.js").SetCatalogItemsPayload;
|
|
8
13
|
type: "catalog/setCatalogItems";
|
|
9
14
|
}> | import("redux-saga/effects").SelectEffect, void, boolean & [import("./loadCatalog.js").ILoadedCatalog, IDateHierarchyTemplate[]]>;
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Loads the attributes of the attribute filters, unless the initialization already loaded the attributes
|
|
17
|
+
* of all of them. Applying the default view can switch a filter to another display form, so the dashboard
|
|
18
|
+
* can need more attributes than the initialization loaded.
|
|
19
|
+
*/
|
|
20
|
+
export declare function preloadAttributeFiltersData(ctx: DashboardContext, dashboard: IDashboard, preloaded?: IPreloadedAttributeFilters): Generator<import("redux-saga/effects").CallEffect<IAttributeWithReferences[]> | import("redux-saga/effects").PutEffect<{
|
|
21
|
+
payload: IAttributeWithReferences[];
|
|
12
22
|
type: "tabs/setPreloadedAttributesWithReferences";
|
|
13
|
-
}> | import("redux-saga/effects").SelectEffect, void, import("@gooddata/sdk-model").IUnavailableReference[] &
|
|
23
|
+
}> | import("redux-saga/effects").SelectEffect, void, import("@gooddata/sdk-model").IUnavailableReference[] & IAttributeWithReferences[]>;
|
|
14
24
|
export declare function requestDashboardsList(ctx: DashboardContext): Generator<import("redux-saga/effects").CallEffect<import("@gooddata/sdk-model").IListedDashboard[]> | import("redux-saga/effects").PutEffect<BatchAction>, void, import("@gooddata/sdk-model").IListedDashboard[]>;
|
|
15
25
|
export declare function initializeDashboardHandler(ctx: DashboardContext, cmd: InitializeDashboard): SagaIterator;
|
|
26
|
+
export {};
|
|
16
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACH,KAAK,wBAAwB,EAIhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,UAAU,EAKf,KAAK,sBAAsB,EAK3B,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AA0B1E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AA+JvC,KAAK,0BAA0B,GAAG;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wBAAwB,EAAE,wBAAwB,EAAE,CAAC;CACxD,CAAC;AAuYF,wBAAiB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB;;;uIAyB9E;AAgED;;;;GAIG;AACH,wBAAiB,2BAA2B,CACxC,GAAG,EAAE,gBAAgB,EACrB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,0BAA0B;;;0IAiBzC;AAED,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,sNAW3D;AAqCD,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CA0CzG"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { uniqBy } from "lodash-es";
|
|
3
3
|
import { batchActions } from "redux-batched-actions";
|
|
4
4
|
import { all, call, put, select, spawn } from "redux-saga/effects";
|
|
5
|
-
import { walkLayout } from "@gooddata/sdk-backend-spi";
|
|
6
|
-
import { areObjRefsEqual, isDrillToInsight, isInsightWidget, isVisualizationSwitcherWidget, serializeObjRef, } from "@gooddata/sdk-model";
|
|
5
|
+
import { walkLayout, } from "@gooddata/sdk-backend-spi";
|
|
6
|
+
import { areObjRefsEqual, isDrillToInsight, isInsightWidget, isVisualizationSwitcherWidget, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
7
7
|
import { createDisplayFormMap, createDisplayFormMapFromCatalog, } from "../../../../_staging/catalog/displayFormMap.js";
|
|
8
8
|
import { deriveAbsoluteFormGranularitiesFromRelativeForm } from "../../../../_staging/dateFilterConfig/merge.js";
|
|
9
9
|
import { changeDashboardTimezoneOverride } from "../../../commands/timezone.js";
|
|
@@ -34,7 +34,7 @@ import { userActions } from "../../../store/user/index.js";
|
|
|
34
34
|
import { collectDashboardParameterRoots } from "../../parameters/dashboardParameterRoots.js";
|
|
35
35
|
import { loadParameterDependencies } from "../../parameters/loadParameterDependencies.js";
|
|
36
36
|
import { changeDashboardTimezoneOverrideHandler } from "../../timezone/changeDashboardTimezoneOverrideHandler.js";
|
|
37
|
-
import { applyDefaultFilterViewForRenderMode } from "../common/filterViews.js";
|
|
37
|
+
import { applyDefaultFilterViewForRenderMode, isDefaultFilterViewSharedAcrossTabs, } from "../common/filterViews.js";
|
|
38
38
|
import { actionsToInitializeExistingDashboard, actionsToInitializeNewDashboard, } from "../common/stateInitializers.js";
|
|
39
39
|
import { loadAutomationTimezone } from "./loadAutomationTimezone.js";
|
|
40
40
|
import { loadCatalog } from "./loadCatalog.js";
|
|
@@ -47,7 +47,7 @@ import { loadFilterViews } from "./loadFilterViews.js";
|
|
|
47
47
|
import { dashboardLoadReferenceTypes, loadUnavailableReferences } from "./loadUnavailableReferences.js";
|
|
48
48
|
import { loadUser } from "./loadUser.js";
|
|
49
49
|
import { mergeDateFilterConfigWithOverrides } from "./mergeDateFilterConfigs.js";
|
|
50
|
-
import {
|
|
50
|
+
import { attributeFilterDisplayFormRefs, loadAttributesWithReferences, } from "./preloadAttributeFiltersData.js";
|
|
51
51
|
import { resolveDashboardConfigAndFeatureFlagDependentCalls } from "./resolveDashboardConfig.js";
|
|
52
52
|
import { resolveEntitlements } from "./resolveEntitlements.js";
|
|
53
53
|
import { resolvePermissions } from "./resolvePermissions.js";
|
|
@@ -191,10 +191,18 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
191
191
|
// FF off => nothing is ever marked unavailable and behavior is unchanged
|
|
192
192
|
const unavailableReferences = yield call(loadUnavailableReferences, ctx, loadedDashboard, unavailable, Boolean(config.settings?.enableDashboardPartialRendering), !!cmd.payload.persistedDashboard);
|
|
193
193
|
yield put(unavailableObjectsActions.setUnavailableObjects(unavailableReferences));
|
|
194
|
-
const dashboardWithFilterView = applyDefaultFilterViewForRenderMode(loadedDashboard, filterViews, config.exportId, unavailableReferences, config.initialRenderMode);
|
|
195
194
|
// Resolve active tab: URL's initialTabId takes precedence, otherwise default to first tab
|
|
196
195
|
// Note: activeTabLocalIdentifier is app state only, NOT persisted to/read from dashboard MD
|
|
197
|
-
const resolvedActiveTabId = resolveActiveTabId(
|
|
196
|
+
const resolvedActiveTabId = resolveActiveTabId(loadedDashboard.tabs, cmd.payload.initialTabId, undefined);
|
|
197
|
+
// same rule as selectEnablePersistentFiltersAcrossTabs, which cannot be selected before init
|
|
198
|
+
const persistFiltersAcrossTabs = !!config.settings.enableDashboardPersistentFiltersAcrossTabs &&
|
|
199
|
+
loadedDashboard.disablePersistentFiltersAcrossTabs === false;
|
|
200
|
+
const filterViewOptions = { persistFiltersAcrossTabs, activeTabLocalIdentifier: resolvedActiveTabId };
|
|
201
|
+
const preloadedAttributeFilters = yield call(loadAttributesForSharedDefaultFilterView, ctx, loadedDashboard, filterViews, config.initialRenderMode, filterViewOptions, unavailableReferences);
|
|
202
|
+
const dashboardWithFilterView = applyDefaultFilterViewForRenderMode(loadedDashboard, filterViews, config.exportId, unavailableReferences, config.initialRenderMode, {
|
|
203
|
+
...filterViewOptions,
|
|
204
|
+
attributesWithReferences: preloadedAttributeFilters?.attributesWithReferences,
|
|
205
|
+
});
|
|
198
206
|
const dashboard = dashboardWithFilterView;
|
|
199
207
|
const enableParameters = config.settings?.enableParameters ?? false;
|
|
200
208
|
const [{ tabsAttributeFilterConfigs, tabsDateFilterConfig, tabsDateFilterConfigSource }, workspaceParameters, parameterDependencies,] = yield all([
|
|
@@ -225,6 +233,11 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
225
233
|
catalogActions.mergeCatalogParameterDependencies(parameterDependencies.byRoot),
|
|
226
234
|
catalogActions.markParameterDependenciesFailed(parameterDependencies.failedRoots),
|
|
227
235
|
...initActions,
|
|
236
|
+
...(preloadedAttributeFilters
|
|
237
|
+
? [
|
|
238
|
+
tabsActions.setPreloadedAttributesWithReferences(preloadedAttributeFilters.attributesWithReferences),
|
|
239
|
+
]
|
|
240
|
+
: []),
|
|
228
241
|
// NOTE: Tab configs (dateFilterConfig, dateFilterConfigs, attributeFilterConfigs, filterContext)
|
|
229
242
|
// are now initialized as part of the tabs state in initActions via setTabs action
|
|
230
243
|
uiActions.setMenuButtonItemsVisibility(config.menuButtonItemsVisibility),
|
|
@@ -238,6 +251,7 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
238
251
|
dashboard: ctx.dashboardRef, // should be defined as we are in existing dashboard load fn
|
|
239
252
|
filterViews,
|
|
240
253
|
}),
|
|
254
|
+
filterViewsActions.setDefaultFilterViewAppliedTabs(resolvedActiveTabId ? [resolvedActiveTabId] : []),
|
|
241
255
|
], "@@GDC.DASH/BATCH.INIT.EXISTING");
|
|
242
256
|
const event = dashboardInitialized(ctx, dashboard, insights, config, permissions, cmd.correlationId);
|
|
243
257
|
return {
|
|
@@ -245,6 +259,7 @@ function* loadExistingDashboard(ctx, cmd, dashboardRef) {
|
|
|
245
259
|
event,
|
|
246
260
|
// an export render takes its timezone from the export itself
|
|
247
261
|
automationTimezone: exportTimezone ? undefined : automationTimezone,
|
|
262
|
+
preloadedAttributeFilters,
|
|
248
263
|
};
|
|
249
264
|
}
|
|
250
265
|
function* initializeNewDashboard(ctx, cmd) {
|
|
@@ -361,9 +376,38 @@ function makeCatalogParametersPayload(result) {
|
|
|
361
376
|
}
|
|
362
377
|
return { status: "loaded", parameters: result };
|
|
363
378
|
}
|
|
364
|
-
|
|
379
|
+
/**
|
|
380
|
+
* The attributes of the attribute filters, which match the filters of the tabs when the default view of the
|
|
381
|
+
* active tab is written to the other tabs. The view is not shared, or the attributes fail to load: none,
|
|
382
|
+
* so filters match on equal display form refs.
|
|
383
|
+
*/
|
|
384
|
+
function* loadAttributesForSharedDefaultFilterView(ctx, dashboard, filterViews, renderMode, options, unavailableObjects) {
|
|
385
|
+
if (!isDefaultFilterViewSharedAcrossTabs(dashboard, filterViews, renderMode, options)) {
|
|
386
|
+
return undefined;
|
|
387
|
+
}
|
|
388
|
+
const refs = attributeFilterDisplayFormRefs(dashboard, unavailableObjects);
|
|
389
|
+
try {
|
|
390
|
+
const attributesWithReferences = yield call(loadAttributesWithReferences, ctx, refs);
|
|
391
|
+
return { refs, attributesWithReferences };
|
|
392
|
+
}
|
|
393
|
+
catch (error) {
|
|
394
|
+
console.warn("Loading the attributes of the dashboard filters failed", error);
|
|
395
|
+
return undefined;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Loads the attributes of the attribute filters, unless the initialization already loaded the attributes
|
|
400
|
+
* of all of them. Applying the default view can switch a filter to another display form, so the dashboard
|
|
401
|
+
* can need more attributes than the initialization loaded.
|
|
402
|
+
*/
|
|
403
|
+
export function* preloadAttributeFiltersData(ctx, dashboard, preloaded) {
|
|
365
404
|
const unavailableObjects = yield select(selectUnavailableObjects);
|
|
366
|
-
const
|
|
405
|
+
const refs = attributeFilterDisplayFormRefs(dashboard, unavailableObjects);
|
|
406
|
+
const preloadedRefs = new Set(preloaded?.refs.map(objRefToString));
|
|
407
|
+
if (preloaded && refs.every((ref) => preloadedRefs.has(objRefToString(ref)))) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
const attributesWithReferences = yield call(loadAttributesWithReferences, ctx, refs);
|
|
367
411
|
yield put(tabsActions.setPreloadedAttributesWithReferences(attributesWithReferences));
|
|
368
412
|
}
|
|
369
413
|
export function* requestDashboardsList(ctx) {
|
|
@@ -374,10 +418,10 @@ export function* requestDashboardsList(ctx) {
|
|
|
374
418
|
]);
|
|
375
419
|
yield put(dashboardsListActions);
|
|
376
420
|
}
|
|
377
|
-
function* advancedLoader(ctx, cmd, dashboard) {
|
|
421
|
+
function* advancedLoader(ctx, cmd, dashboard, preloadedAttributeFilters) {
|
|
378
422
|
yield all([
|
|
379
423
|
call(requestCatalog, ctx, cmd),
|
|
380
|
-
call(preloadAttributeFiltersData, ctx, dashboard),
|
|
424
|
+
call(preloadAttributeFiltersData, ctx, dashboard, preloadedAttributeFilters),
|
|
381
425
|
call(requestDashboardsList, ctx),
|
|
382
426
|
]);
|
|
383
427
|
}
|
|
@@ -418,7 +462,7 @@ export function* initializeDashboardHandler(ctx, cmd) {
|
|
|
418
462
|
if (dashboardRef) {
|
|
419
463
|
// let's run effects which are not essential for the existing
|
|
420
464
|
// dashboard to be rendered, such as catalog load
|
|
421
|
-
yield spawn(advancedLoader, ctx, cmd, result.event.payload.dashboard);
|
|
465
|
+
yield spawn(advancedLoader, ctx, cmd, result.event.payload.dashboard, result.preloadedAttributeFilters);
|
|
422
466
|
}
|
|
423
467
|
}
|
|
424
468
|
catch (e) {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type IAttributeWithReferences, type IUnavailableDashboardReference } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IDashboard } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IDashboard, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { type DashboardContext } from "../../../types/commonTypes.js";
|
|
4
4
|
export declare function preloadAttributeFiltersData(ctx: DashboardContext, dashboard?: IDashboard, unavailableObjects?: IUnavailableDashboardReference[]): Promise<IAttributeWithReferences[]>;
|
|
5
|
+
export declare function loadAttributesWithReferences(ctx: DashboardContext, refs: ObjRef[]): Promise<IAttributeWithReferences[]>;
|
|
6
|
+
/**
|
|
7
|
+
* The unique display forms of the attribute filters of the dashboard and its tabs that the user can read.
|
|
8
|
+
*/
|
|
9
|
+
export declare function attributeFilterDisplayFormRefs(dashboard?: IDashboard, unavailableObjects?: IUnavailableDashboardReference[]): ObjRef[];
|
|
5
10
|
//# sourceMappingURL=preloadAttributeFiltersData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preloadAttributeFiltersData.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/preloadAttributeFiltersData.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"preloadAttributeFiltersData.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/preloadAttributeFiltersData.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,UAAU,EACf,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,wBAAgB,2BAA2B,CACvC,GAAG,EAAE,gBAAgB,EACrB,SAAS,CAAC,EAAE,UAAU,EACtB,kBAAkB,GAAE,8BAA8B,EAAO,GAC1D,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAErC;AAED,wBAAgB,4BAA4B,CACxC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAOrC;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC1C,SAAS,CAAC,EAAE,UAAU,EACtB,kBAAkB,GAAE,8BAA8B,EAAO,GAC1D,MAAM,EAAE,CAkBV"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
// (C) 2021-
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { uniqBy } from "lodash-es";
|
|
3
3
|
import { isDashboardAttributeFilter, objRefToString, } from "@gooddata/sdk-model";
|
|
4
4
|
import { isDashboardObjectRestricted } from "../../../store/filtering/restrictedFilterUtils.js";
|
|
5
5
|
export function preloadAttributeFiltersData(ctx, dashboard, unavailableObjects = []) {
|
|
6
|
+
return loadAttributesWithReferences(ctx, attributeFilterDisplayFormRefs(dashboard, unavailableObjects));
|
|
7
|
+
}
|
|
8
|
+
export function loadAttributesWithReferences(ctx, refs) {
|
|
9
|
+
if (!refs.length) {
|
|
10
|
+
return Promise.resolve([]);
|
|
11
|
+
}
|
|
6
12
|
const { backend, workspace } = ctx;
|
|
13
|
+
return backend.workspace(workspace).attributes().getAttributesWithReferences(refs);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The unique display forms of the attribute filters of the dashboard and its tabs that the user can read.
|
|
17
|
+
*/
|
|
18
|
+
export function attributeFilterDisplayFormRefs(dashboard, unavailableObjects = []) {
|
|
7
19
|
const dashboardAttributeFilterRefs = dashboard?.filterContext?.filters
|
|
8
20
|
.filter(isDashboardAttributeFilter)
|
|
9
21
|
.map((filter) => filter.attributeFilter.displayForm);
|
|
@@ -15,9 +27,5 @@ export function preloadAttributeFiltersData(ctx, dashboard, unavailableObjects =
|
|
|
15
27
|
}, []);
|
|
16
28
|
const allRefs = [...(dashboardAttributeFilterRefs ?? []), ...(tabsAttributeFilterRefs ?? [])].filter((ref) => !isDashboardObjectRestricted(ref, "displayForm", unavailableObjects));
|
|
17
29
|
// Remove duplicates by comparing ObjRef string representations
|
|
18
|
-
|
|
19
|
-
if (!uniqueRefs?.length) {
|
|
20
|
-
return Promise.resolve([]);
|
|
21
|
-
}
|
|
22
|
-
return backend.workspace(workspace).attributes().getAttributesWithReferences(uniqueRefs);
|
|
30
|
+
return uniqBy(allRefs, objRefToString);
|
|
23
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDashboardConfig.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAE/B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,kBAAkB,CAAC;AAwHpE;;;;GAIG;AACH,wBAAiB,sBAAsB,CACnC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,GACzB,YAAY,CAAC,uBAAuB,CAAC,CAmEvC;
|
|
1
|
+
{"version":3,"file":"resolveDashboardConfig.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAE/B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,kBAAkB,CAAC;AAwHpE;;;;GAIG;AACH,wBAAiB,sBAAsB,CACnC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,GACzB,YAAY,CAAC,uBAAuB,CAAC,CAmEvC;AAwDD;;;GAGG;AACH,wBAAiB,kDAAkD,CAC/D,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,mBAAmB,EACxB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACpC,YAAY,CAAC;IACZ,cAAc,EAAE,uBAAuB,CAAC;IACxC,cAAc,EAAE;QACZ,yBAAyB,EAAE,MAAM,CAAC;QAClC,yBAAyB,EAAE,MAAM,CAAC;KACrC,CAAC;IACF,aAAa,EAAE,cAAc,GAAG,SAAS,CAAC;CAC7C,CAAC,CAkBD"}
|
package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/resolveDashboardConfig.js
CHANGED
|
@@ -145,14 +145,12 @@ const CONFIG_DEFAULTS = {
|
|
|
145
145
|
isEmbedded: false,
|
|
146
146
|
isExport: false,
|
|
147
147
|
isWhiteLabeled: false,
|
|
148
|
-
isAiMode: false,
|
|
149
|
-
isAiGenerating: false,
|
|
150
|
-
isAiWaiting: false,
|
|
151
148
|
disableDefaultDrills: false,
|
|
152
149
|
enableFilterValuesResolutionInDrillEvents: false,
|
|
153
150
|
menuButtonItemsVisibility: {},
|
|
154
151
|
allowUnfinishedFeatures: false,
|
|
155
152
|
allowCreateInsightRequest: false,
|
|
153
|
+
enableInsightEditing: false,
|
|
156
154
|
initialRenderMode: "view",
|
|
157
155
|
hideSaveAsNewButton: false,
|
|
158
156
|
hideShareButton: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetDashboardHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/resetDashboardHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAa/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"resetDashboardHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/dashboard/resetDashboardHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAa/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,2BAA2B,CAAC;AAsBvF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,qBAAqB,CAClC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,eAAe,GACrB,YAAY,CAAC,kBAAkB,CAAC,CASlC;AAED;;GAEG;AACH,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;GAUzG"}
|
|
@@ -8,8 +8,10 @@ import { selectAllCatalogDisplayFormsMap, selectCatalogParameters, } from "../..
|
|
|
8
8
|
import { selectDateFilterConfig, selectEnableImmediateAttributeFilterDisplayAsLabelMigration, selectSettings, } from "../../store/config/configSelectors.js";
|
|
9
9
|
import { selectCrossFilteringFiltersLocalIdentifiers } from "../../store/drill/drillSelectors.js";
|
|
10
10
|
import { selectDashboardFilterViews } from "../../store/filterViews/filterViewsReducersSelectors.js";
|
|
11
|
-
import {
|
|
11
|
+
import { filterViewsActions } from "../../store/filterViews/index.js";
|
|
12
|
+
import { selectPersistedDashboard, selectPersistedEnablePersistentFiltersAcrossTabs, } from "../../store/meta/metaSelectors.js";
|
|
12
13
|
import { selectRenderMode } from "../../store/renderMode/renderModeSelectors.js";
|
|
14
|
+
import { selectPreloadedAttributesWithReferences } from "../../store/tabs/filterContext/filterContextSelectors.js";
|
|
13
15
|
import { selectActiveTabLocalIdentifier, selectTabs } from "../../store/tabs/tabsSelectors.js";
|
|
14
16
|
import { DEFAULT_TAB_ID } from "../../store/tabs/tabsState.js";
|
|
15
17
|
import { selectUnavailableObjects } from "../../store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
@@ -119,12 +121,6 @@ function* resetDashboardFromPersisted(ctx, renderMode) {
|
|
|
119
121
|
// all tabs are rebuilt, so each needs its own default view, not only the active one
|
|
120
122
|
const filterViews = yield select(selectDashboardFilterViews);
|
|
121
123
|
const unavailableObjects = yield select(selectUnavailableObjects);
|
|
122
|
-
const dashboardWithUpdatedFilterContext = applyDefaultFilterViewForRenderMode(persistedDashboard, filterViews, ctx.config?.exportId, unavailableObjects, renderMode);
|
|
123
|
-
const insightRefsFromWidgets = insightReferencesFromDashboard(dashboardWithUpdatedFilterContext);
|
|
124
|
-
const uniqueInsightRefsFromWidgets = uniqWith(insightRefsFromWidgets, areObjRefsEqual);
|
|
125
|
-
const resolvedInsights = yield call(resolveInsights, ctx, uniqueInsightRefsFromWidgets);
|
|
126
|
-
const displayForms = yield select(selectAllCatalogDisplayFormsMap);
|
|
127
|
-
const resolvedInsightsValues = [...resolvedInsights.resolved.values()];
|
|
128
124
|
const currentActiveTabId = yield select(selectActiveTabLocalIdentifier);
|
|
129
125
|
// Validate that the current active tab exists in the persisted dashboard
|
|
130
126
|
// If not (e.g., user created a new tab but didn't save), fall back to first tab
|
|
@@ -132,8 +128,25 @@ function* resetDashboardFromPersisted(ctx, renderMode) {
|
|
|
132
128
|
const effectiveActiveTabId = activeTabExistsInPersisted
|
|
133
129
|
? currentActiveTabId
|
|
134
130
|
: persistedDashboard.tabs?.[0]?.localIdentifier;
|
|
131
|
+
// the state is rebuilt from the persisted dashboard, so an unsaved change of the setting does not apply
|
|
132
|
+
const persistFiltersAcrossTabs = yield select(selectPersistedEnablePersistentFiltersAcrossTabs);
|
|
133
|
+
const attributesWithReferences = yield select(selectPreloadedAttributesWithReferences);
|
|
134
|
+
const dashboardWithUpdatedFilterContext = applyDefaultFilterViewForRenderMode(persistedDashboard, filterViews, ctx.config?.exportId, unavailableObjects, renderMode, {
|
|
135
|
+
persistFiltersAcrossTabs,
|
|
136
|
+
activeTabLocalIdentifier: effectiveActiveTabId,
|
|
137
|
+
attributesWithReferences,
|
|
138
|
+
});
|
|
139
|
+
const insightRefsFromWidgets = insightReferencesFromDashboard(dashboardWithUpdatedFilterContext);
|
|
140
|
+
const uniqueInsightRefsFromWidgets = uniqWith(insightRefsFromWidgets, areObjRefsEqual);
|
|
141
|
+
const resolvedInsights = yield call(resolveInsights, ctx, uniqueInsightRefsFromWidgets);
|
|
142
|
+
const displayForms = yield select(selectAllCatalogDisplayFormsMap);
|
|
143
|
+
const resolvedInsightsValues = [...resolvedInsights.resolved.values()];
|
|
135
144
|
const workspaceParameters = yield select(selectCatalogParameters);
|
|
136
|
-
|
|
145
|
+
const initActions = yield call(actionsToInitializeExistingDashboard, ctx, dashboardWithUpdatedFilterContext, resolvedInsightsValues, settings, isImmediateAttributeFilterMigrationEnabled, effectiveOriginalFilterContext, migratedAttributeFilters, effectiveAttributeFilterConfigs, dateFilterConfig, tabsDateFilterConfigSource, displayForms, persistedDashboard, effectiveActiveTabId, workspaceParameters);
|
|
146
|
+
batch = [
|
|
147
|
+
...initActions,
|
|
148
|
+
filterViewsActions.setDefaultFilterViewAppliedTabs(effectiveActiveTabId ? [effectiveActiveTabId] : []),
|
|
149
|
+
];
|
|
137
150
|
}
|
|
138
151
|
else {
|
|
139
152
|
const settings = yield select(selectSettings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeAttributeDisplayFormHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"changeAttributeDisplayFormHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAUnF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUtE,wBAAiB,iCAAiC,CAC9C,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,8BAA8B,GACpC,YAAY,CAAC,IAAI,CAAC,CAqEpB"}
|
package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeDisplayFormHandler.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
import { call, put, select } from "redux-saga/effects";
|
|
2
|
+
import { call, select } from "redux-saga/effects";
|
|
4
3
|
import { invariant } from "ts-invariant";
|
|
5
4
|
import { attributeDisplayFormChanged } from "../../../events/filters.js";
|
|
6
5
|
import { invalidArgumentsProvided } from "../../../events/general.js";
|
|
@@ -8,7 +7,7 @@ import { dispatchDashboardEvent } from "../../../store/_infra/eventDispatcher.js
|
|
|
8
7
|
import { selectEnableImmediateAttributeFilterDisplayAsLabelMigration, selectIsApplyFiltersAllAtOnceEnabledAndSet, } from "../../../store/config/configSelectors.js";
|
|
9
8
|
import { selectFilterContextAttributeFilterItemByLocalId } from "../../../store/tabs/filterContext/filterContextSelectors.js";
|
|
10
9
|
import { tabsActions } from "../../../store/tabs/index.js";
|
|
11
|
-
import {
|
|
10
|
+
import { beginTabSync, endTabSync, putTabSynced } from "../tabSync/tabSyncSaga.js";
|
|
12
11
|
import { resolveAndRegisterDisplayFormMetadata } from "./resolveDisplayFormMetadata.js";
|
|
13
12
|
import { computedAttributesDisabledMessage, findDisabledComputedAttributeRef, } from "./validation/computedAttributesEnabledValidation.js";
|
|
14
13
|
import { validateFilterDisplayForm } from "./validation/filterDisplayFormValidation.js";
|
|
@@ -18,7 +17,9 @@ export function* changeAttributeDisplayFormHandler(ctx, cmd) {
|
|
|
18
17
|
if (disabledComputedAttributeRef) {
|
|
19
18
|
throw invalidArgumentsProvided(ctx, cmd, computedAttributesDisabledMessage(disabledComputedAttributeRef));
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
// Every tab migrates its own filters when it loads.
|
|
21
|
+
const session = yield call(beginTabSync, { enabled: !isResultOfMigration });
|
|
22
|
+
const displayFormData = yield call(resolveAndRegisterDisplayFormMetadata, displayForm, session);
|
|
22
23
|
invariant(displayFormData, "Inconsistent state in changeAttributeDisplayFormHandler, cannot update attribute filter with display form not available in the catalog.");
|
|
23
24
|
const attribute = displayFormData?.attribute;
|
|
24
25
|
const validationResult = yield call(validateFilterDisplayForm, ctx, attribute, displayForm);
|
|
@@ -30,7 +31,7 @@ export function* changeAttributeDisplayFormHandler(ctx, cmd) {
|
|
|
30
31
|
}
|
|
31
32
|
const enableImmediateAttributeFilterDisplayAsLabelMigration = yield select(selectEnableImmediateAttributeFilterDisplayAsLabelMigration);
|
|
32
33
|
const isApplyAllAtOnceEnabledAndSet = yield select(selectIsApplyFiltersAllAtOnceEnabledAndSet);
|
|
33
|
-
yield
|
|
34
|
+
yield call(putTabSynced, session, [
|
|
34
35
|
tabsActions.changeAttributeDisplayForm({
|
|
35
36
|
filterLocalId,
|
|
36
37
|
displayForm,
|
|
@@ -40,9 +41,9 @@ export function* changeAttributeDisplayFormHandler(ctx, cmd) {
|
|
|
40
41
|
enableImmediateAttributeFilterDisplayAsLabelMigration,
|
|
41
42
|
isResultOfMigration,
|
|
42
43
|
}),
|
|
43
|
-
])
|
|
44
|
+
]);
|
|
44
45
|
const changedFilter = yield select(selectFilterContextAttributeFilterItemByLocalId(filterLocalId));
|
|
45
46
|
invariant(changedFilter, "Inconsistent state in changeAttributeDisplayFormHandler, cannot update attribute filter for given local identifier.");
|
|
46
47
|
yield dispatchDashboardEvent(attributeDisplayFormChanged(ctx, changedFilter, cmd.correlationId));
|
|
47
|
-
yield call(
|
|
48
|
+
yield call(endTabSync, ctx, cmd, session);
|
|
48
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeAttributeFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"changeAttributeFilterSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAiBnF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,wBAAiB,qCAAqC,CAClD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,8BAA8B,GACpC,YAAY,CAAC,IAAI,CAAC,CA+EpB"}
|