@gooddata/sdk-ui-dashboard 11.65.0-alpha.9 → 11.66.0-alpha.0
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 +536 -2137
- package/README.md +1 -1
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +6 -4
- 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 -0
- 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/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +9 -3
- 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/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.map +1 -1
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +7 -3
- 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 +10 -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/store/config/configSelectors.d.ts +12 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +12 -0
- 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/filterContext/filterContextReducers.d.ts +24 -0
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +75 -0
- package/esm/model/store/tabs/index.d.ts +8 -0
- package/esm/model/store/tabs/index.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts +16 -0
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +25 -0
- 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 +18 -0
- 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/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContent.js +1 -4
- package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useAutomationManagementEditRouting.js +2 -6
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/RecipientsSelect/RecipientsSelectRenderer.js +6 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContent.js +2 -5
- 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/automations/shared/utils/automationUtils.d.ts +1 -2
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/utils/automationUtils.js +0 -1
- 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 +0 -10
- 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/DashboardInner.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardInner.js +13 -9
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js +3 -2
- 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 +23 -0
- package/esm/presentation/insightEditor/useExploreFilterTransfer.d.ts.map +1 -0
- package/esm/presentation/insightEditor/useExploreFilterTransfer.js +194 -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 +10 -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 +11 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +10 -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 +16 -6
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +32 -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 +32 -0
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +10 -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 +50 -40
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +10 -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 +12 -2
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +10 -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 +186 -176
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +10 -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 +11 -1
- package/esm/presentation/shareDialog/DefaultShareDialog.d.ts.map +1 -1
- package/esm/presentation/shareDialog/DefaultShareDialog.js +2 -5
- 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/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 +301 -5
- package/package.json +23 -21
- package/styles/css/dashboard.css +40 -1
- 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/insightEditor.css +46 -0
- package/styles/css/insightEditor.css.map +1 -0
- package/styles/css/main.css +86 -1
- package/styles/css/main.css.map +1 -1
- package/styles/scss/dashboard.scss +2 -1
- package/styles/scss/dashboardContentLoader.scss +45 -0
- package/styles/scss/insightEditor.scss +53 -0
- package/styles/scss/main.scss +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type IAnalyticalBackend, type IBackendCapabilities } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type AttributeFilterItem, type DateFilterItem, type IMeasureValueFilter as IEmbeddingMeasureValueFilter } from "@gooddata/sdk-embedding";
|
|
3
|
+
import { type ICatalogAttribute, type IDashboardDateFilter, type IDashboardMeasureValueFilter, type IFilter, type IInsight, type IInsightWidget, type ObjRef } from "@gooddata/sdk-model";
|
|
4
|
+
export type InsightEditorFilterItem = DateFilterItem | AttributeFilterItem | IEmbeddingMeasureValueFilter;
|
|
5
|
+
export interface IInsightEditorFilterContextInput {
|
|
6
|
+
widget: IInsightWidget;
|
|
7
|
+
insight: IInsight;
|
|
8
|
+
appliedFilters: IFilter[];
|
|
9
|
+
availableAttributes: ICatalogAttribute[];
|
|
10
|
+
attributeFilterConfigsDisplayAsLabelMap: Map<string, ObjRef> | undefined;
|
|
11
|
+
capabilities: IBackendCapabilities;
|
|
12
|
+
dateFilter: IDashboardDateFilter | undefined;
|
|
13
|
+
isMeasureValueFilterEnabled: boolean;
|
|
14
|
+
measureValueFilters: IDashboardMeasureValueFilter[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Builds the filters that the explore flow passes to Analytical Designer, so the explored insight
|
|
18
|
+
* shows the same data as the widget on the dashboard.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildInsightEditorFilterContext(input: IInsightEditorFilterContextInput): InsightEditorFilterItem[];
|
|
21
|
+
/**
|
|
22
|
+
* Loads the attributes that can filter the insight. Dashboard filters on other attributes do not
|
|
23
|
+
* pass to Analytical Designer.
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadInsightAvailableAttributes(backend: IAnalyticalBackend, workspace: string, insight: IInsight, enableComputedAttributes: boolean): Promise<ICatalogAttribute[]>;
|
|
26
|
+
//# sourceMappingURL=insightFilterContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightFilterContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/insightFilterContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,mBAAmB,IAAI,4BAA4B,EAC3D,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEb,KAAK,cAAc,EACnB,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,mBAAmB,GAAG,4BAA4B,CAAC;AAE1G,MAAM,WAAW,gCAAgC;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC;IAClB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;IACzC,uCAAuC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACzE,YAAY,EAAE,oBAAoB,CAAC;IACnC,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,2BAA2B,EAAE,OAAO,CAAC;IACrC,mBAAmB,EAAE,4BAA4B,EAAE,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,gCAAgC,GACxC,uBAAuB,EAAE,CAoB3B;AAKD;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,QAAQ,EACjB,wBAAwB,EAAE,OAAO,GAClC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAa9B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// (C) 2020-2026 GoodData Corporation
|
|
2
|
+
import { compact } from "lodash-es";
|
|
3
|
+
import { catalogComputedAttributeAsCatalogAttribute, } from "@gooddata/sdk-model";
|
|
4
|
+
import { isComputedAttributesUnavailableError } from "../../../_staging/catalog/computedAttributes.js";
|
|
5
|
+
import { getAttributeFilterItems } from "./attributeFilters.js";
|
|
6
|
+
import { getDateFilterItems, getWidgetDateFilterItem } from "./dateFilters.js";
|
|
7
|
+
import { filterDashboardMvfsForWidget, toMeasureValueFilterItems } from "./measureValueFilters.js";
|
|
8
|
+
/**
|
|
9
|
+
* Builds the filters that the explore flow passes to Analytical Designer, so the explored insight
|
|
10
|
+
* shows the same data as the widget on the dashboard.
|
|
11
|
+
*/
|
|
12
|
+
export function buildInsightEditorFilterContext(input) {
|
|
13
|
+
const { widget, insight, appliedFilters, capabilities } = input;
|
|
14
|
+
const attributeFilters = getAttributeFilterItems(appliedFilters, insight, input.availableAttributes, input.attributeFilterConfigsDisplayAsLabelMap, !!capabilities.supportsElementUris);
|
|
15
|
+
const measureValueFilters = input.isMeasureValueFilterEnabled
|
|
16
|
+
? toMeasureValueFilterItems(filterDashboardMvfsForWidget(widget, input.measureValueFilters, insight))
|
|
17
|
+
: [];
|
|
18
|
+
const dateFilters = capabilities.supportsMultipleDateFilters
|
|
19
|
+
? getDateFilterItems(appliedFilters, insight)
|
|
20
|
+
: compact([getWidgetDateFilterItem(widget, input.dateFilter)]);
|
|
21
|
+
return [...dateFilters, ...attributeFilters, ...measureValueFilters];
|
|
22
|
+
}
|
|
23
|
+
// The production dataset needs no ref. Its presence is represented by undefined.
|
|
24
|
+
const PRODUCTION_DATASET_REF = undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Loads the attributes that can filter the insight. Dashboard filters on other attributes do not
|
|
27
|
+
* pass to Analytical Designer.
|
|
28
|
+
*/
|
|
29
|
+
export async function loadInsightAvailableAttributes(backend, workspace, insight, enableComputedAttributes) {
|
|
30
|
+
const nonDateDataSetRefs = await getNonDateDataSetRefs(backend, workspace, insight);
|
|
31
|
+
// Computed attributes load separately, so they can never fail a plain attributes request.
|
|
32
|
+
// The listing is skipped when the setting is off: the backend then refuses it (400).
|
|
33
|
+
const loads = [
|
|
34
|
+
...nonDateDataSetRefs.map((dataSetRef) => loadDataSetAttributes(backend, workspace, dataSetRef, insight)),
|
|
35
|
+
...(enableComputedAttributes ? [loadComputedAttributes(backend, workspace, insight)] : []),
|
|
36
|
+
];
|
|
37
|
+
const attributesPerDataSet = await Promise.all(loads);
|
|
38
|
+
return attributesPerDataSet.flat();
|
|
39
|
+
}
|
|
40
|
+
async function getNonDateDataSetRefs(backend, workspace, insight) {
|
|
41
|
+
if (!backend.capabilities.supportsNonProductionDatasets) {
|
|
42
|
+
return [PRODUCTION_DATASET_REF];
|
|
43
|
+
}
|
|
44
|
+
const referencedObjects = await backend
|
|
45
|
+
.workspace(workspace)
|
|
46
|
+
.insights()
|
|
47
|
+
.getInsightReferencedObjects(insight, ["dataSet"]);
|
|
48
|
+
const dataSetMeta = referencedObjects.dataSetMeta ?? [];
|
|
49
|
+
const nonProductionRefs = dataSetMeta.filter((meta) => !meta.production).map((meta) => meta.ref);
|
|
50
|
+
const containsProduction = dataSetMeta.some((meta) => meta.production);
|
|
51
|
+
return containsProduction ? [PRODUCTION_DATASET_REF, ...nonProductionRefs] : nonProductionRefs;
|
|
52
|
+
}
|
|
53
|
+
async function loadDataSetAttributes(backend, workspace, dataSetRef, insight) {
|
|
54
|
+
const loader = backend.workspace(workspace).catalog().forTypes(["attribute"]);
|
|
55
|
+
const catalog = await (dataSetRef ? loader.forDataset(dataSetRef) : loader.withOptions({ production: true })).load();
|
|
56
|
+
const availableItems = await catalog.availableItems().forInsight(insight).load();
|
|
57
|
+
return availableItems.availableAttributes();
|
|
58
|
+
}
|
|
59
|
+
async function loadComputedAttributes(backend, workspace, insight) {
|
|
60
|
+
try {
|
|
61
|
+
const catalog = await backend.workspace(workspace).catalog().forTypes(["computedAttribute"]).load();
|
|
62
|
+
const availableItems = await catalog.availableItems().forInsight(insight).load();
|
|
63
|
+
return availableItems.availableComputedAttributes().map(catalogComputedAttributeAsCatalogAttribute);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
// Degrade only when computed attributes are not available. A genuine failure propagates.
|
|
67
|
+
if (isComputedAttributesUnavailableError(error)) {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type IMeasureValueFilter as IEmbeddingMeasureValueFilter } from "@gooddata/sdk-embedding";
|
|
2
|
+
import { type IDashboardMeasureValueFilter, type IInsight, type IInsightWidget } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Drops dashboard MVFs the widget is configured to ignore (mirrors `resolveDashboardMeasureValueFilters`
|
|
5
|
+
* in `queryWidgetFilters`) and emits a `console.warn` when the insight already has its own MVF on the
|
|
6
|
+
* same metric. The dashboard MVF is still emitted in the overlap case — both filters apply via logical
|
|
7
|
+
* AND at execution and warning keeps parity with that runtime behavior so the embedding caller can
|
|
8
|
+
* observe the clash without changing semantics.
|
|
9
|
+
*/
|
|
10
|
+
export declare function filterDashboardMvfsForWidget(widget: IInsightWidget, dashboardMvfs: IDashboardMeasureValueFilter[], insight: IInsight | undefined): IDashboardMeasureValueFilter[];
|
|
11
|
+
/**
|
|
12
|
+
* Converts dashboard measure value filters to the embedding {@link IEmbeddingMeasureValueFilter}
|
|
13
|
+
* format used by the AD `SetFilterContext` command. The target measure is forwarded as the
|
|
14
|
+
* catalog identifier (Tiger; URI refs are unsupported and such MVFs are skipped). Each filter
|
|
15
|
+
* carries its dashboard `localIdentifier` so AD can disambiguate individual filter instances
|
|
16
|
+
* (currently the dashboard model permits at most one MVF per metric, but `localIdentifier`
|
|
17
|
+
* is part of the contract in preparation for multi-MVF-per-metric support).
|
|
18
|
+
*/
|
|
19
|
+
export declare function toMeasureValueFilterItems(dashboardMvfs: IDashboardMeasureValueFilter[]): IEmbeddingMeasureValueFilter[];
|
|
20
|
+
//# sourceMappingURL=measureValueFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureValueFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/measureValueFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,QAAQ,EACb,KAAK,cAAc,EAetB,MAAM,qBAAqB,CAAC;AAkB7B;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CACxC,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,4BAA4B,EAAE,EAC7C,OAAO,EAAE,QAAQ,GAAG,SAAS,GAC9B,4BAA4B,EAAE,CAgChC;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACrC,aAAa,EAAE,4BAA4B,EAAE,GAC9C,4BAA4B,EAAE,CAmBhC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { areObjRefsEqual, dashboardFilterObjRef, insightFilters, insightMeasures, isDashboardMeasureValueFilterReference, isIdentifierRef, isLocalIdRef, isMeasureValueFilter, measureItem, measureLocalId, measureValueFilterMeasure, objRefToString, } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the metric ObjRef behind an insight MVF's measure reference. Insight MVFs reference
|
|
5
|
+
* their target measure either directly (`ObjRef`) or via a bucket-local id (`LocalIdRef`); the
|
|
6
|
+
* latter must be looked up in the insight's measures and mapped to the catalog `ObjRef` carried
|
|
7
|
+
* on the simple measure definition. Returns `undefined` when the local id does not resolve or
|
|
8
|
+
* the matched measure is non-simple (arithmetic, previous-period, …) and therefore has no LDM
|
|
9
|
+
* item to compare against.
|
|
10
|
+
*/
|
|
11
|
+
function resolveInsightMvfMetric(ref, insight) {
|
|
12
|
+
if (!isLocalIdRef(ref)) {
|
|
13
|
+
return ref;
|
|
14
|
+
}
|
|
15
|
+
const matched = insightMeasures(insight).find((m) => measureLocalId(m) === ref.localIdentifier);
|
|
16
|
+
return matched ? measureItem(matched) : undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Drops dashboard MVFs the widget is configured to ignore (mirrors `resolveDashboardMeasureValueFilters`
|
|
20
|
+
* in `queryWidgetFilters`) and emits a `console.warn` when the insight already has its own MVF on the
|
|
21
|
+
* same metric. The dashboard MVF is still emitted in the overlap case — both filters apply via logical
|
|
22
|
+
* AND at execution and warning keeps parity with that runtime behavior so the embedding caller can
|
|
23
|
+
* observe the clash without changing semantics.
|
|
24
|
+
*/
|
|
25
|
+
export function filterDashboardMvfsForWidget(widget, dashboardMvfs, insight) {
|
|
26
|
+
const ignoredRefs = widget.ignoreDashboardFilters?.filter(isDashboardMeasureValueFilterReference) ?? [];
|
|
27
|
+
const widgetEffective = ignoredRefs.length === 0
|
|
28
|
+
? dashboardMvfs
|
|
29
|
+
: dashboardMvfs.filter((mvf) => !ignoredRefs.some((ref) => areObjRefsEqual(ref.measure, dashboardFilterObjRef(mvf))));
|
|
30
|
+
// Insight MVFs may reference their measure by LocalIdRef (bucket-local) — resolve those to the
|
|
31
|
+
// catalog ObjRef via the insight's measures so we can compare against dashboard MVFs (which
|
|
32
|
+
// always reference the catalog metric directly).
|
|
33
|
+
const insightMvfMetrics = insight
|
|
34
|
+
? insightFilters(insight)
|
|
35
|
+
.filter(isMeasureValueFilter)
|
|
36
|
+
.map((f) => resolveInsightMvfMetric(measureValueFilterMeasure(f), insight))
|
|
37
|
+
.filter((ref) => ref !== undefined)
|
|
38
|
+
: [];
|
|
39
|
+
if (insightMvfMetrics.length > 0) {
|
|
40
|
+
widgetEffective.forEach((mvf) => {
|
|
41
|
+
const dashMeasure = dashboardFilterObjRef(mvf);
|
|
42
|
+
if (insightMvfMetrics.some((m) => areObjRefsEqual(m, dashMeasure))) {
|
|
43
|
+
console.warn(`Dashboard MVF on metric ${objRefToString(dashMeasure)} overlaps with an insight-level MVF on the same metric; both will be transferred to AD and applied together.`);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return widgetEffective;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Converts dashboard measure value filters to the embedding {@link IEmbeddingMeasureValueFilter}
|
|
51
|
+
* format used by the AD `SetFilterContext` command. The target measure is forwarded as the
|
|
52
|
+
* catalog identifier (Tiger; URI refs are unsupported and such MVFs are skipped). Each filter
|
|
53
|
+
* carries its dashboard `localIdentifier` so AD can disambiguate individual filter instances
|
|
54
|
+
* (currently the dashboard model permits at most one MVF per metric, but `localIdentifier`
|
|
55
|
+
* is part of the contract in preparation for multi-MVF-per-metric support).
|
|
56
|
+
*/
|
|
57
|
+
export function toMeasureValueFilterItems(dashboardMvfs) {
|
|
58
|
+
if (!dashboardMvfs.length) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
return dashboardMvfs.flatMap((mvf) => {
|
|
62
|
+
const { measure, localIdentifier, conditions } = mvf.dashboardMeasureValueFilter;
|
|
63
|
+
if (!isIdentifierRef(measure)) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
return [
|
|
67
|
+
{
|
|
68
|
+
measureValueFilter: {
|
|
69
|
+
measure: { identifier: measure.identifier },
|
|
70
|
+
localIdentifier,
|
|
71
|
+
...(conditions && conditions.length > 0 ? { conditions } : {}),
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IObjIdentifierQualifier } from "@gooddata/sdk-embedding";
|
|
2
|
+
import { type ObjRef } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Converts a model ref to the identifier qualifier of the embedding API.
|
|
5
|
+
*
|
|
6
|
+
* The ref type is kept: it is the only thing telling a computed attribute reference from a label
|
|
7
|
+
* reference (a computed attribute has no labels and is referenced directly), so dropping it would make
|
|
8
|
+
* a filter on a computed attribute indistinguishable from a filter on a label of the same identifier.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toObjIdentifierQualifier(ref: ObjRef): IObjIdentifierQualifier;
|
|
11
|
+
//# sourceMappingURL=objQualifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objQualifiers.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/objQualifiers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,qBAAqB,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAQ7E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { isIdentifierRef } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Converts a model ref to the identifier qualifier of the embedding API.
|
|
5
|
+
*
|
|
6
|
+
* The ref type is kept: it is the only thing telling a computed attribute reference from a label
|
|
7
|
+
* reference (a computed attribute has no labels and is referenced directly), so dropping it would make
|
|
8
|
+
* a filter on a computed attribute indistinguishable from a filter on a label of the same identifier.
|
|
9
|
+
*/
|
|
10
|
+
export function toObjIdentifierQualifier(ref) {
|
|
11
|
+
if (isIdentifierRef(ref)) {
|
|
12
|
+
return {
|
|
13
|
+
identifier: ref.identifier,
|
|
14
|
+
...(ref.type ? { type: ref.type } : {}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
throw new Error("Expected identifier ref");
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tells whether the insight overlay is the TOPMOST open ui-kit overlay in the document.
|
|
3
|
+
*
|
|
4
|
+
* With AD running in-process, its nested UI (filter dropdowns, save dialogs, tooltips) portals
|
|
5
|
+
* into the same document as this overlay. Every ui-kit Overlay with closeOnEscape listens on
|
|
6
|
+
* window with no stack awareness, so a single Escape aimed at a nested AD dropdown would also
|
|
7
|
+
* cancel the whole editing session (the iframe transport used to shield this — AD key events
|
|
8
|
+
* never left the iframe document). That is why the insight overlay handles Escape itself, gated
|
|
9
|
+
* by this check.
|
|
10
|
+
*
|
|
11
|
+
* Overlay portals append to document.body in mount order, so the last .gd-overlay-content node is
|
|
12
|
+
* the topmost overlay; the insight overlay may only close itself when that node is its own.
|
|
13
|
+
* Nested overlays unmount asynchronously (React re-render), so during the very Escape press that
|
|
14
|
+
* closes a nested overlay this still sees its node and correctly skips — Escape peels one layer
|
|
15
|
+
* per press.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isInsightOverlayTopmost(doc?: Document): boolean;
|
|
18
|
+
//# sourceMappingURL=insightEditorEscapeGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightEditorEscapeGuard.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/insightEditorEscapeGuard.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,QAAmB,GAAG,OAAO,CAIzE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
const OVERLAY_CONTENT_SELECTOR = ".gd-overlay-content";
|
|
3
|
+
const INSIGHT_OVERLAY_CONTENT_SELECTOR = ".s-edit-insight-overlay-content";
|
|
4
|
+
/**
|
|
5
|
+
* Tells whether the insight overlay is the TOPMOST open ui-kit overlay in the document.
|
|
6
|
+
*
|
|
7
|
+
* With AD running in-process, its nested UI (filter dropdowns, save dialogs, tooltips) portals
|
|
8
|
+
* into the same document as this overlay. Every ui-kit Overlay with closeOnEscape listens on
|
|
9
|
+
* window with no stack awareness, so a single Escape aimed at a nested AD dropdown would also
|
|
10
|
+
* cancel the whole editing session (the iframe transport used to shield this — AD key events
|
|
11
|
+
* never left the iframe document). That is why the insight overlay handles Escape itself, gated
|
|
12
|
+
* by this check.
|
|
13
|
+
*
|
|
14
|
+
* Overlay portals append to document.body in mount order, so the last .gd-overlay-content node is
|
|
15
|
+
* the topmost overlay; the insight overlay may only close itself when that node is its own.
|
|
16
|
+
* Nested overlays unmount asynchronously (React re-render), so during the very Escape press that
|
|
17
|
+
* closes a nested overlay this still sees its node and correctly skips — Escape peels one layer
|
|
18
|
+
* per press.
|
|
19
|
+
*/
|
|
20
|
+
export function isInsightOverlayTopmost(doc = document) {
|
|
21
|
+
const contents = doc.querySelectorAll(OVERLAY_CONTENT_SELECTOR);
|
|
22
|
+
const topmost = contents[contents.length - 1];
|
|
23
|
+
return !!topmost?.querySelector(INSIGHT_OVERLAY_CONTENT_SELECTOR);
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type InsightEditorTarget } from "../../model/types/insightEditorTypes.js";
|
|
3
|
+
type HiddenAction = "open" | "clear" | "export" | "save" | "saveAs" | "openInAnalyticalDesigner";
|
|
4
|
+
export interface IInsightEditorRouteInput {
|
|
5
|
+
target: InsightEditorTarget;
|
|
6
|
+
/**
|
|
7
|
+
* The insight of the widget target. Undefined for the other targets, or when the widget has no
|
|
8
|
+
* insight.
|
|
9
|
+
*/
|
|
10
|
+
widgetInsightRef: ObjRef | undefined;
|
|
11
|
+
isWidgetInsightLocked: boolean;
|
|
12
|
+
dashboardId: string | undefined;
|
|
13
|
+
isEditMode: boolean;
|
|
14
|
+
isEmbedded: boolean;
|
|
15
|
+
canManageWorkspace: boolean;
|
|
16
|
+
canCreateVisualization: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The part of the Analytical Designer props that selects the flow: edit, explore or create.
|
|
20
|
+
*/
|
|
21
|
+
export interface IInsightEditorRoute {
|
|
22
|
+
insight: ObjRef | undefined;
|
|
23
|
+
config: {
|
|
24
|
+
isEmbedded: boolean;
|
|
25
|
+
hiddenActions: HiddenAction[];
|
|
26
|
+
displayedActions?: Array<"cancel">;
|
|
27
|
+
sourceDashboard?: string;
|
|
28
|
+
sourceInsight?: ObjRef;
|
|
29
|
+
allowDashboardLinks?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare function getInsightEditorRoute(input: IInsightEditorRouteInput): IInsightEditorRoute;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=insightEditorRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightEditorRoute.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/insightEditorRoute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,0BAA0B,CAAC;AAEjG,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE;QACJ,UAAU,EAAE,OAAO,CAAC;QACpB,aAAa,EAAE,YAAY,EAAE,CAAC;QAC9B,gBAAgB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACnC,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KACjC,CAAC;CACL;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,CAiD1F"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// (C) 2020-2026 GoodData Corporation
|
|
2
|
+
export function getInsightEditorRoute(input) {
|
|
3
|
+
const { target, widgetInsightRef, isEditMode, isEmbedded } = input;
|
|
4
|
+
const externalInsightRef = target.type === "insight" ? target.ref : undefined;
|
|
5
|
+
const isEmbeddedFromDashboard = !isEmbedded;
|
|
6
|
+
if (externalInsightRef || (widgetInsightRef && isEditMode)) {
|
|
7
|
+
const hiddenActions = ["open", "clear", "export"];
|
|
8
|
+
const canSaveInsight = input.canManageWorkspace || !input.isWidgetInsightLocked;
|
|
9
|
+
if (!canSaveInsight) {
|
|
10
|
+
hiddenActions.push("save");
|
|
11
|
+
}
|
|
12
|
+
else if (!input.canCreateVisualization) {
|
|
13
|
+
hiddenActions.push("saveAs");
|
|
14
|
+
}
|
|
15
|
+
if (isEmbedded) {
|
|
16
|
+
hiddenActions.push("openInAnalyticalDesigner");
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
insight: externalInsightRef ?? widgetInsightRef,
|
|
20
|
+
config: {
|
|
21
|
+
isEmbedded: isEmbeddedFromDashboard,
|
|
22
|
+
hiddenActions,
|
|
23
|
+
// The presence of the source dashboard starts the edit-from-dashboard flow in AD. A
|
|
24
|
+
// dashboard that was never saved has no identifier, so an empty string marks it.
|
|
25
|
+
sourceDashboard: input.dashboardId ?? "",
|
|
26
|
+
allowDashboardLinks: !isEmbedded,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
if (widgetInsightRef) {
|
|
31
|
+
return {
|
|
32
|
+
insight: undefined,
|
|
33
|
+
config: {
|
|
34
|
+
isEmbedded: isEmbeddedFromDashboard,
|
|
35
|
+
hiddenActions: ["saveAs"],
|
|
36
|
+
sourceInsight: widgetInsightRef,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
insight: undefined,
|
|
42
|
+
config: {
|
|
43
|
+
isEmbedded: isEmbeddedFromDashboard,
|
|
44
|
+
hiddenActions: ["open", "export", "saveAs"],
|
|
45
|
+
displayedActions: ["cancel"],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCanCreateInsightInEditor.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/useCanCreateInsightInEditor.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAMrD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useDashboardSelector } from "../../model/react/DashboardStoreProvider.js";
|
|
3
|
+
import { selectEnableInsightEditing, selectSettings } from "../../model/store/config/configSelectors.js";
|
|
4
|
+
import { selectCanCreateVisualization } from "../../model/store/permissions/permissionsSelectors.js";
|
|
5
|
+
/**
|
|
6
|
+
* Tells whether the user can create a new insight in the embedded Analytical Designer.
|
|
7
|
+
*/
|
|
8
|
+
export function useCanCreateInsightInEditor() {
|
|
9
|
+
const isEnabled = useDashboardSelector(selectEnableInsightEditing);
|
|
10
|
+
const settings = useDashboardSelector(selectSettings);
|
|
11
|
+
const canCreateVisualization = useDashboardSelector(selectCanCreateVisualization);
|
|
12
|
+
const isNewInsightEnabled = settings?.["enableKPIDashboardNewInsight"] ?? true;
|
|
13
|
+
return isEnabled && !!isNewInsightEnabled && canCreateVisualization;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type ICommandFailedBody } from "@gooddata/sdk-embedding";
|
|
3
|
+
import type { IAnalyticalDesignerApi } from "@gooddata/sdk-ui-analytical-designer";
|
|
4
|
+
import { type InsightEditorTarget } from "../../model/types/insightEditorTypes.js";
|
|
5
|
+
export interface IExploreFilterTransfer {
|
|
6
|
+
onInsightOpened: () => void;
|
|
7
|
+
onInsightRendered: () => void;
|
|
8
|
+
onCommandFailed: (data: ICommandFailedBody, contextId?: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Passes the dashboard filters and timezone of the explored widget to Analytical Designer, so the
|
|
12
|
+
* explored insight shows the same data as the widget.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The transfer starts when the opened insight first renders. Analytical Designer replaces its filters
|
|
16
|
+
* with each answer of the visualization to a reference point change. An answer that the opened
|
|
17
|
+
* insight requested can arrive after the filters were set, and then removes them without an error.
|
|
18
|
+
* When Analytical Designer is not ready yet (its date datasets still load), the command fails and the
|
|
19
|
+
* transfer retries until it succeeds or takes too long. A later render starts the transfer again if
|
|
20
|
+
* the retries stopped too early.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useExploreFilterTransfer(target: InsightEditorTarget, isExplore: boolean, apiRef: RefObject<IAnalyticalDesignerApi | null>): IExploreFilterTransfer;
|
|
23
|
+
//# sourceMappingURL=useExploreFilterTransfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExploreFilterTransfer.d.ts","sourceRoot":"","sources":["../../../src/presentation/insightEditor/useExploreFilterTransfer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAIhF,OAAO,EAKH,KAAK,kBAAkB,EAC1B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAoBnF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAmBnF,MAAM,WAAW,sBAAsB;IACnC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC,GACjD,sBAAsB,CAqLxB"}
|