@gooddata/sdk-ui-dashboard 11.58.0-alpha.1 → 11.58.0-alpha.3
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 +9 -9
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/sharedHooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useFiltersNamings.js +5 -3
- package/esm/index.d.ts +4 -4
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/model/DashboardTester.d.ts.map +1 -1
- package/esm/model/DashboardTester.js +7 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +13 -6
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts +45 -0
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.js +99 -0
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts +11 -0
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.js +71 -0
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts +22 -0
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.js +39 -0
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts +21 -0
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.js +86 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +4 -0
- package/esm/model/react/useIsWidgetRestricted.d.ts.map +1 -1
- package/esm/model/react/useIsWidgetRestricted.js +14 -7
- package/esm/model/react/useWidgetExecConfig.d.ts +4 -4
- package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
- package/esm/model/react/useWidgetExecConfig.js +2 -2
- package/esm/model/store/catalog/catalogReducers.d.ts +16 -4
- package/esm/model/store/catalog/catalogReducers.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogReducers.js +15 -3
- package/esm/model/store/catalog/catalogSelectors.d.ts +21 -6
- package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.js +20 -5
- package/esm/model/store/catalog/catalogState.d.ts +30 -9
- package/esm/model/store/catalog/catalogState.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogState.js +2 -1
- package/esm/model/store/catalog/index.d.ts +4 -1
- package/esm/model/store/catalog/index.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts +10 -0
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutSelectors.js +55 -26
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +42 -8
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +88 -19
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +13 -6
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +24 -13
- package/esm/presentation/automations/shared/automationFilters/components/AutomationAttributeFilter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationAttributeFilter.js +16 -2
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -1
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +5 -3
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +35 -13
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +12 -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 +14 -2
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +3 -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 +5 -2
- package/esm/presentation/widget/common/RestrictedPlaceholder.d.ts +4 -8
- package/esm/presentation/widget/common/RestrictedPlaceholder.d.ts.map +1 -1
- package/esm/presentation/widget/common/RestrictedPlaceholder.js +16 -23
- package/esm/presentation/widget/insight/DefaultInsightBody/DefaultInsightBody.d.ts.map +1 -1
- package/esm/presentation/widget/insight/DefaultInsightBody/DefaultInsightBody.js +2 -4
- package/esm/presentation/widget/insight/LayeredTableView.d.ts +1 -1
- package/esm/presentation/widget/insight/LayeredTableView.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +2 -3
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js +30 -12
- package/esm/presentation/widget/insight/types.d.ts +1 -1
- package/esm/presentation/widget/insight/types.d.ts.map +1 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.js +18 -6
- package/esm/presentation/widget/richText/RestrictedReferencesDialog.d.ts +22 -0
- package/esm/presentation/widget/richText/RestrictedReferencesDialog.d.ts.map +1 -0
- package/esm/presentation/widget/richText/RestrictedReferencesDialog.js +41 -0
- package/esm/presentation/widget/richText/useEditableRichTextMenu.d.ts.map +1 -1
- package/esm/presentation/widget/richText/useEditableRichTextMenu.js +6 -2
- package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcher.js +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/VisualizationsList/VisualizationListItem.d.ts.map +1 -1
- package/esm/presentation/widget/visualizationSwitcher/configuration/VisualizationsList/VisualizationListItem.js +1 -4
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +2 -3
- package/esm/sdk-ui-dashboard.d.ts +99 -42
- package/package.json +23 -23
- package/styles/css/main.css +28 -16
- package/styles/css/main.css.map +1 -1
- package/styles/css/richTextWidget.css +4 -0
- package/styles/css/richTextWidget.css.map +1 -1
- package/styles/scss/richTextWidget.scss +5 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadMeasureParameterDependencies.d.ts +0 -13
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadMeasureParameterDependencies.d.ts.map +0 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadMeasureParameterDependencies.js +0 -98
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.d.ts +0 -5
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.d.ts.map +0 -1
- package/esm/presentation/widget/insight/geoDefaultDisplayFormRefs.js +0 -28
- package/esm/presentation/widget/insight/insightToTable.d.ts +0 -74
- package/esm/presentation/widget/insight/insightToTable.d.ts.map +0 -1
- package/esm/presentation/widget/insight/insightToTable.js +0 -482
|
@@ -2,7 +2,7 @@ import { type IAttributeDisplayFormMetadataObject, type ICatalogAttribute, type
|
|
|
2
2
|
import { type CatalogDateAttributeWithDataset } from "../../../_staging/catalog/dateAttributeWithDatasetMap.js";
|
|
3
3
|
import { type ObjRefMap } from "../../../_staging/metadata/objRefMap.js";
|
|
4
4
|
import { type DashboardSelector } from "../types.js";
|
|
5
|
-
import { type
|
|
5
|
+
import { type CatalogFilterParametersStatus, type CatalogInsightParametersStatus, type CatalogParametersStatus } from "./catalogState.js";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -53,18 +53,33 @@ export declare const selectCatalogParametersStatus: DashboardSelector<CatalogPar
|
|
|
53
53
|
*/
|
|
54
54
|
export declare const selectCatalogParametersIsLoaded: DashboardSelector<boolean>;
|
|
55
55
|
/**
|
|
56
|
-
* Returns the dashboard-wide map from
|
|
57
|
-
* The map is populated during dashboard initialization from the workspace references service
|
|
56
|
+
* Returns the dashboard-wide map from serialized insight ref to the parameter refs the insight depends on.
|
|
57
|
+
* The map is populated during dashboard initialization from the workspace references service and extended
|
|
58
|
+
* when insights are added later.
|
|
58
59
|
*
|
|
59
60
|
* @alpha
|
|
60
61
|
*/
|
|
61
|
-
export declare const
|
|
62
|
+
export declare const selectCatalogInsightParameters: DashboardSelector<Record<string, IdentifierRef[]>>;
|
|
62
63
|
/**
|
|
63
|
-
* Returns the load status of the dashboard-wide
|
|
64
|
+
* Returns the load status of the dashboard-wide insight → parameter dependency map.
|
|
64
65
|
*
|
|
65
66
|
* @alpha
|
|
66
67
|
*/
|
|
67
|
-
export declare const
|
|
68
|
+
export declare const selectCatalogInsightParametersStatus: DashboardSelector<CatalogInsightParametersStatus>;
|
|
69
|
+
/**
|
|
70
|
+
* Returns the dashboard-wide map from the serialized ref of an object a dashboard filter reads (a computed
|
|
71
|
+
* attribute, a metric) to the parameter refs it depends on. Populated during dashboard initialization from
|
|
72
|
+
* the workspace references service and extended when the filter context gains filters on other objects.
|
|
73
|
+
*
|
|
74
|
+
* @alpha
|
|
75
|
+
*/
|
|
76
|
+
export declare const selectCatalogFilterParameters: DashboardSelector<Record<string, IdentifierRef[]>>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the load status of the dashboard-wide dashboard-filter → parameter dependency map.
|
|
79
|
+
*
|
|
80
|
+
* @alpha
|
|
81
|
+
*/
|
|
82
|
+
export declare const selectCatalogFilterParametersStatus: DashboardSelector<CatalogFilterParametersStatus>;
|
|
68
83
|
/**
|
|
69
84
|
* @alpha
|
|
70
85
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/catalogSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KAAK,+BAA+B,EAEvC,MAAM,0DAA0D,CAAC;AAElE,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,yCAAyC,CAAC;AAOjD,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,aAAa,CAAC;AAE1E,OAAO,
|
|
1
|
+
{"version":3,"file":"catalogSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/catalogSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KAAK,+BAA+B,EAEvC,MAAM,0DAA0D,CAAC;AAElE,OAAO,EACH,KAAK,SAAS,EAIjB,MAAM,yCAAyC,CAAC;AAOjD,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,aAAa,CAAC;AAE1E,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC/B,MAAM,mBAAmB,CAAC;AAO3B;;GAEG;AACH,eAAO,MAAM,uBAA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AM,mBAAmB,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAEtF;;GAEG;AACH,eAAO,MAAM,wCAAwC,EAAE,iBAAiB,CAAC,iCAAiC,CAMrG,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,CAKtF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAGxF,CAAC;AAEP;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAC3D,SAAS,CAAC,mCAAmC,CAAC,CAMjD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,CACzD,SAAS,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,CAWvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAAC,CAKrF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,iBAAiB,CAC/D,SAAS,CAAC,+BAA+B,CAAC,CAe5C,CAAC"}
|
|
@@ -64,18 +64,33 @@ export const selectCatalogParametersStatus = createSelector(selectSelf, (state)
|
|
|
64
64
|
*/
|
|
65
65
|
export const selectCatalogParametersIsLoaded = createSelector(selectCatalogParametersStatus, (status) => status === "loaded");
|
|
66
66
|
/**
|
|
67
|
-
* Returns the dashboard-wide map from
|
|
68
|
-
* The map is populated during dashboard initialization from the workspace references service
|
|
67
|
+
* Returns the dashboard-wide map from serialized insight ref to the parameter refs the insight depends on.
|
|
68
|
+
* The map is populated during dashboard initialization from the workspace references service and extended
|
|
69
|
+
* when insights are added later.
|
|
69
70
|
*
|
|
70
71
|
* @alpha
|
|
71
72
|
*/
|
|
72
|
-
export const
|
|
73
|
+
export const selectCatalogInsightParameters = createSelector(selectSelf, (state) => state.insightParameters.byInsight);
|
|
73
74
|
/**
|
|
74
|
-
* Returns the load status of the dashboard-wide
|
|
75
|
+
* Returns the load status of the dashboard-wide insight → parameter dependency map.
|
|
75
76
|
*
|
|
76
77
|
* @alpha
|
|
77
78
|
*/
|
|
78
|
-
export const
|
|
79
|
+
export const selectCatalogInsightParametersStatus = createSelector(selectSelf, (state) => state.insightParameters.status);
|
|
80
|
+
/**
|
|
81
|
+
* Returns the dashboard-wide map from the serialized ref of an object a dashboard filter reads (a computed
|
|
82
|
+
* attribute, a metric) to the parameter refs it depends on. Populated during dashboard initialization from
|
|
83
|
+
* the workspace references service and extended when the filter context gains filters on other objects.
|
|
84
|
+
*
|
|
85
|
+
* @alpha
|
|
86
|
+
*/
|
|
87
|
+
export const selectCatalogFilterParameters = createSelector(selectSelf, (state) => state.filterParameters.byRef);
|
|
88
|
+
/**
|
|
89
|
+
* Returns the load status of the dashboard-wide dashboard-filter → parameter dependency map.
|
|
90
|
+
*
|
|
91
|
+
* @alpha
|
|
92
|
+
*/
|
|
93
|
+
export const selectCatalogFilterParametersStatus = createSelector(selectSelf, (state) => state.filterParameters.status);
|
|
79
94
|
/**
|
|
80
95
|
* @alpha
|
|
81
96
|
*/
|
|
@@ -15,21 +15,40 @@ export interface ICatalogParametersState {
|
|
|
15
15
|
parameters: IParameterMetadataObject[];
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Status of the dashboard-wide
|
|
18
|
+
* Status of the dashboard-wide insight → parameter dependency map.
|
|
19
19
|
*
|
|
20
20
|
* @alpha
|
|
21
21
|
*/
|
|
22
|
-
export type
|
|
22
|
+
export type CatalogInsightParametersStatus = "uninitialized" | "loading" | "loaded" | "failed";
|
|
23
23
|
/**
|
|
24
|
-
* Maps each
|
|
25
|
-
*
|
|
26
|
-
* applicability for widget execution.
|
|
24
|
+
* Maps each dashboard insight (keyed by `serializeObjRef(insightRef)`) to the parameter refs it
|
|
25
|
+
* depends on through its metrics and computed attributes, as reported by the workspace references
|
|
26
|
+
* service. Drives runtime parameter applicability for widget execution.
|
|
27
27
|
*
|
|
28
28
|
* @alpha
|
|
29
29
|
*/
|
|
30
|
-
export interface
|
|
31
|
-
status:
|
|
32
|
-
|
|
30
|
+
export interface ICatalogInsightParametersState {
|
|
31
|
+
status: CatalogInsightParametersStatus;
|
|
32
|
+
byInsight: Record<string, IdentifierRef[]>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Status of the dashboard-wide dashboard-filter → parameter dependency map.
|
|
36
|
+
*
|
|
37
|
+
* @alpha
|
|
38
|
+
*/
|
|
39
|
+
export type CatalogFilterParametersStatus = "uninitialized" | "loading" | "loaded" | "failed";
|
|
40
|
+
/**
|
|
41
|
+
* Maps each object a dashboard filter reads (keyed by `serializeObjRef(ref)`: the computed attribute
|
|
42
|
+
* of an attribute filter, the metric or a computed-attribute dimension of a measure value filter) to
|
|
43
|
+
* the parameter refs it depends on, as reported by the workspace references service. Complements
|
|
44
|
+
* {@link ICatalogInsightParametersState} for the parameters a widget reaches only through dashboard
|
|
45
|
+
* filters, which are not part of its insight.
|
|
46
|
+
*
|
|
47
|
+
* @alpha
|
|
48
|
+
*/
|
|
49
|
+
export interface ICatalogFilterParametersState {
|
|
50
|
+
status: CatalogFilterParametersStatus;
|
|
51
|
+
byRef: Record<string, IdentifierRef[]>;
|
|
33
52
|
}
|
|
34
53
|
/**
|
|
35
54
|
* @public
|
|
@@ -57,7 +76,9 @@ export type CatalogState = {
|
|
|
57
76
|
/** @alpha */
|
|
58
77
|
parameters: ICatalogParametersState;
|
|
59
78
|
/** @alpha */
|
|
60
|
-
|
|
79
|
+
insightParameters: ICatalogInsightParametersState;
|
|
80
|
+
/** @alpha */
|
|
81
|
+
filterParameters: ICatalogFilterParametersState;
|
|
61
82
|
};
|
|
62
83
|
export declare const catalogInitialState: CatalogState;
|
|
63
84
|
//# sourceMappingURL=catalogState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogState.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/catalogState.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EACrB,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEtG;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,EAAE,wBAAwB,EAAE,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC3C,MAAM,EAAE,8BAA8B,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"catalogState.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/catalogState.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EACrB,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;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8BAA8B,CAAC;IAClD,aAAa;IACb,gBAAgB,EAAE,6BAA6B,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAWjC,CAAC"}
|
|
@@ -8,5 +8,6 @@ export const catalogInitialState = {
|
|
|
8
8
|
computedAttributes: undefined,
|
|
9
9
|
dateHierarchyTemplates: undefined,
|
|
10
10
|
parameters: { status: "uninitialized", parameters: [] },
|
|
11
|
-
|
|
11
|
+
insightParameters: { status: "uninitialized", byInsight: {} },
|
|
12
|
+
filterParameters: { status: "uninitialized", byRef: {} },
|
|
12
13
|
};
|
|
@@ -11,6 +11,9 @@ export declare const catalogActions: {
|
|
|
11
11
|
updateAttributeHierarchy: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("@gooddata/sdk-model").ICatalogAttributeHierarchy, "catalog/updateAttributeHierarchy">;
|
|
12
12
|
deleteAttributeHierarchy: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("@gooddata/sdk-model").ICatalogAttributeHierarchy, "catalog/deleteAttributeHierarchy">;
|
|
13
13
|
setCatalogParameters: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./catalogState.js").ICatalogParametersState, "catalog/setCatalogParameters">;
|
|
14
|
-
|
|
14
|
+
setCatalogInsightParameters: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./catalogState.js").ICatalogInsightParametersState, "catalog/setCatalogInsightParameters">;
|
|
15
|
+
mergeCatalogInsightParameters: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, import("@gooddata/sdk-model").IdentifierRef[]>, "catalog/mergeCatalogInsightParameters">;
|
|
16
|
+
setCatalogFilterParameters: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./catalogState.js").ICatalogFilterParametersState, "catalog/setCatalogFilterParameters">;
|
|
17
|
+
mergeCatalogFilterParameters: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, import("@gooddata/sdk-model").IdentifierRef[]>, "catalog/mergeCatalogFilterParameters">;
|
|
15
18
|
};
|
|
16
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAwB,CAAC;AAG/E;;GAEG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/store/catalog/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAwB,CAAC;AAG/E;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAA8B,CAAC"}
|
|
@@ -156,6 +156,16 @@ export declare const selectWidgetDrills: (ref: ObjRef | undefined) => DashboardS
|
|
|
156
156
|
* @internal
|
|
157
157
|
*/
|
|
158
158
|
export declare const selectAllFiltersForWidgetByRef: (ref: ObjRef) => DashboardSelector<[IDashboardFilter[], IDashboardFilter[]]>;
|
|
159
|
+
/**
|
|
160
|
+
* Selects all filters from filter context converted to filters specific for a widget specified by a ref,
|
|
161
|
+
* even if the widget is not on the active tab.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* This does NOT resolve things like ignored filters for a widget, etc.
|
|
165
|
+
*
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
export declare const selectAllFiltersForWidgetByRefAcrossTabs: (ref: ObjRef) => DashboardSelector<[IDashboardFilter[], IDashboardFilter[]]>;
|
|
159
169
|
/**
|
|
160
170
|
* Selects a boolean indicating if the dashboard is empty.
|
|
161
171
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/layout/layoutSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"layoutSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/layout/layoutSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EACX,KAAK,UAAU,EAWlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,4CAA4C,CAAC;AACzG,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5G,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,8BAA8B,CAAC;AAWpG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAqB,KAAK,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAa3F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAC7C,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,GAAG,SAAS,CAAC,CAWvE,CAAC;AAEH;;;;;;;;G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get
|
|
|
8
8
|
import { isCustomWidget, isExtendedDashboardLayoutWidget, } from "../../../types/layoutTypes.js";
|
|
9
9
|
import { createMemoizedSelector } from "../../_infra/selectors.js";
|
|
10
10
|
import { createUndoableCommandsMapping } from "../../_infra/undoEnhancer.js";
|
|
11
|
-
import { selectCrossFilteringFiltersLocalIdentifiers, selectCrossFilteringFiltersLocalIdentifiersByWidgetRef, } from "../../drill/drillSelectors.js";
|
|
12
|
-
import { selectExecutableDashboardFilters } from "../../filtering/dashboardFilterSelectors.js";
|
|
11
|
+
import { selectCrossFilteringFiltersLocalIdentifiers, selectCrossFilteringFiltersLocalIdentifiersByWidgetRef, selectCrossFilteringItemsByTab, } from "../../drill/drillSelectors.js";
|
|
12
|
+
import { selectExecutableDashboardFilters, selectExecutableDashboardFiltersByTab, } from "../../filtering/dashboardFilterSelectors.js";
|
|
13
13
|
import { getWidgetCoordinates, isItemWithBaseWidget } from "../../tabs/layout/layoutUtils.js";
|
|
14
14
|
import { selectActiveTabLocalIdentifier, selectTabs } from "../tabsSelectors.js";
|
|
15
15
|
import { DEFAULT_TAB_ID } from "../tabsState.js";
|
|
@@ -280,6 +280,33 @@ export const selectIgnoredDrillToUrlAttributesByWidgetRef = createMemoizedSelect
|
|
|
280
280
|
* @alpha
|
|
281
281
|
*/
|
|
282
282
|
export const selectWidgetDrills = createMemoizedSelector((ref) => createSelector(selectAnalyticalWidgetByRef(ref), (widget) => widget?.drills ?? []));
|
|
283
|
+
function calculateWidgetFilters(widget, dashboardFilters, crossFilteringFiltersLocalIdentifiers, shouldIgnoreCrossFiltering, allCrossFilteringLocalIdentifiers) {
|
|
284
|
+
if (isExtendedDashboardLayoutWidget(widget)) {
|
|
285
|
+
return [[], []];
|
|
286
|
+
}
|
|
287
|
+
// Widget is the source of cross-filtering, so filtering out the cross-filtering filters
|
|
288
|
+
const filtersWithoutCrossFilteringFilters = dashboardFilters.filter((f) => {
|
|
289
|
+
if (isDashboardAttributeFilterItem(f)) {
|
|
290
|
+
const localId = dashboardAttributeFilterItemLocalIdentifier(f);
|
|
291
|
+
return !crossFilteringFiltersLocalIdentifiers?.includes(localId);
|
|
292
|
+
}
|
|
293
|
+
return true;
|
|
294
|
+
});
|
|
295
|
+
// Widget ignores cross-filtering, so we should remove all cross-filtering filters
|
|
296
|
+
const filtersWithoutAllCrossFiltering = shouldIgnoreCrossFiltering
|
|
297
|
+
? filtersWithoutCrossFilteringFilters.filter((f) => {
|
|
298
|
+
if (isDashboardAttributeFilterItem(f)) {
|
|
299
|
+
const localId = dashboardAttributeFilterItemLocalIdentifier(f);
|
|
300
|
+
return !allCrossFilteringLocalIdentifiers.includes(localId);
|
|
301
|
+
}
|
|
302
|
+
return true;
|
|
303
|
+
})
|
|
304
|
+
: [...filtersWithoutCrossFilteringFilters];
|
|
305
|
+
const [commonDateFilters, otherFilters] = partition(filtersWithoutAllCrossFiltering, isDashboardCommonDateFilter);
|
|
306
|
+
const dateFilters = filterContextItemsToDashboardFiltersByWidget(commonDateFilters, widget);
|
|
307
|
+
const otherFiltersConverted = filterContextItemsToDashboardFiltersByWidget(otherFilters, widget);
|
|
308
|
+
return [dateFilters, otherFiltersConverted];
|
|
309
|
+
}
|
|
283
310
|
/**
|
|
284
311
|
* Selects all filters from filter context converted to filters specific for a widget specified by a ref.
|
|
285
312
|
*
|
|
@@ -291,32 +318,34 @@ export const selectWidgetDrills = createMemoizedSelector((ref) => createSelector
|
|
|
291
318
|
export const selectAllFiltersForWidgetByRef = createMemoizedSelector((ref) => {
|
|
292
319
|
return createSelector(selectWidgetByRef(ref), selectExecutableDashboardFilters, selectCrossFilteringFiltersLocalIdentifiersByWidgetRef(ref), selectWidgetIgnoreCrossFiltering(ref), selectCrossFilteringFiltersLocalIdentifiers, (widget, dashboardFilters, crossFilteringFiltersLocalIdentifiers, shouldIgnoreCrossFiltering, allCrossFilteringLocalIdentifiers) => {
|
|
293
320
|
invariant(widget, `widget with ref ${objRefToString(ref)} does not exist in the state`);
|
|
294
|
-
|
|
321
|
+
return calculateWidgetFilters(widget, dashboardFilters, crossFilteringFiltersLocalIdentifiers, shouldIgnoreCrossFiltering, allCrossFilteringLocalIdentifiers);
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
/**
|
|
325
|
+
* Selects all filters from filter context converted to filters specific for a widget specified by a ref,
|
|
326
|
+
* even if the widget is not on the active tab.
|
|
327
|
+
*
|
|
328
|
+
* @remarks
|
|
329
|
+
* This does NOT resolve things like ignored filters for a widget, etc.
|
|
330
|
+
*
|
|
331
|
+
* @internal
|
|
332
|
+
*/
|
|
333
|
+
export const selectAllFiltersForWidgetByRefAcrossTabs = createMemoizedSelector((ref) => {
|
|
334
|
+
return createSelector(selectAllTabsWidgetContexts, selectExecutableDashboardFiltersByTab, selectCrossFilteringItemsByTab, (contexts, filtersByTab, crossFilteringByTab) => {
|
|
335
|
+
const context = contexts.find((c) => areObjRefsEqual(c.widget.ref, ref));
|
|
336
|
+
if (!context) {
|
|
295
337
|
return [[], []];
|
|
296
338
|
}
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
? filtersWithoutCrossFilteringFilters.filter((f) => {
|
|
308
|
-
if (isDashboardAttributeFilterItem(f)) {
|
|
309
|
-
const localId = dashboardAttributeFilterItemLocalIdentifier(f);
|
|
310
|
-
return !allCrossFilteringLocalIdentifiers.includes(localId);
|
|
311
|
-
}
|
|
312
|
-
return true;
|
|
313
|
-
})
|
|
314
|
-
: [...filtersWithoutCrossFilteringFilters];
|
|
315
|
-
const [commonDateFilters, otherFilters] = partition(filtersWithoutAllCrossFiltering, isDashboardCommonDateFilter);
|
|
316
|
-
return [
|
|
317
|
-
filterContextItemsToDashboardFiltersByWidget(commonDateFilters, widget),
|
|
318
|
-
filterContextItemsToDashboardFiltersByWidget(otherFilters, widget),
|
|
319
|
-
];
|
|
339
|
+
const { tab, widget } = context;
|
|
340
|
+
const tabId = tab.localIdentifier ?? DEFAULT_TAB_ID;
|
|
341
|
+
const dashboardFilters = filtersByTab[tabId] ?? [];
|
|
342
|
+
const crossFilteringItems = crossFilteringByTab[tabId] ?? [];
|
|
343
|
+
const crossFilteringFiltersLocalIdentifiers = crossFilteringItems.find((item) => areObjRefsEqual(ref, item.widgetRef))?.filterLocalIdentifiers;
|
|
344
|
+
const shouldIgnoreCrossFiltering = isInsightWidget(widget)
|
|
345
|
+
? (widget.ignoreCrossFiltering ?? false)
|
|
346
|
+
: false;
|
|
347
|
+
const allCrossFilteringLocalIdentifiers = crossFilteringItems.flatMap((item) => item.filterLocalIdentifiers);
|
|
348
|
+
return calculateWidgetFilters(widget, dashboardFilters, crossFilteringFiltersLocalIdentifiers, shouldIgnoreCrossFiltering, allCrossFilteringLocalIdentifiers);
|
|
320
349
|
});
|
|
321
350
|
});
|
|
322
351
|
const selectAllWidgets = createSelector(selectWidgetsMap, (widgetMap) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IDashboardExportParameter, type IDashboardParameter, type IDashboardTab, type IInsightDefinition, type IInsightParameterValue, type IParameterDefinition, type IParameterMetadataObject, type IdentifierRef, type ObjRef, type ParameterValue } from "@gooddata/sdk-model";
|
|
1
|
+
import { type FilterContextItem, type IDashboardExportParameter, type IDashboardFilterReference, type IDashboardParameter, type IDashboardTab, type IInsight, type IInsightDefinition, type IInsightParameterValue, type IParameterDefinition, type IParameterMetadataObject, type IdentifierRef, type ObjRef, type ParameterValue } from "@gooddata/sdk-model";
|
|
2
2
|
import { type ITabState } from "../tabsState.js";
|
|
3
3
|
import { type IDashboardParameterEntry } from "./parametersState.js";
|
|
4
4
|
/**
|
|
@@ -6,12 +6,44 @@ import { type IDashboardParameterEntry } from "./parametersState.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const EMPTY_EXPORT_PARAMETERS_BY_TAB: Record<string, IDashboardExportParameter[]>;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* deduped by ref string. The order matches the first occurrence in the measure traversal.
|
|
9
|
+
* Concatenates parameter ref lists, keeping the first occurrence of each ref (by `serializeObjRef`).
|
|
11
10
|
*
|
|
12
11
|
* @internal
|
|
13
12
|
*/
|
|
14
|
-
export declare function
|
|
13
|
+
export declare function unionParameterRefs(...lists: ReadonlyArray<ReadonlyArray<IdentifierRef>>): IdentifierRef[];
|
|
14
|
+
/**
|
|
15
|
+
* The objects a dashboard filter reads through which it can depend on a parameter, as roots for the
|
|
16
|
+
* references service: a computed attribute an attribute filter filters on, and a measure value filter's
|
|
17
|
+
* metric plus any computed attribute in its dimensionality. A plain attribute or label has no expression,
|
|
18
|
+
* so it cannot depend on a parameter and is not a root. Date filters never are.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function filterParameterRoots(filter: FilterContextItem): IdentifierRef[];
|
|
23
|
+
/**
|
|
24
|
+
* {@link filterParameterRoots} over many filters, deduped by ref.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function collectFilterParameterRoots(filters: ReadonlyArray<FilterContextItem>): IdentifierRef[];
|
|
29
|
+
/**
|
|
30
|
+
* Whether the widget's `ignoreDashboardFilters` excludes the given dashboard filter from its execution.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Attribute filters are matched by display form. An ignore may instead name the filter's `displayAsLabel`;
|
|
34
|
+
* that is irrelevant here because only computed-attribute filters produce parameter roots and a computed
|
|
35
|
+
* attribute has exactly one (fabricated) display form, so it cannot be shown under another label.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function isDashboardFilterIgnoredByWidget(ignoreDashboardFilters: ReadonlyArray<IDashboardFilterReference>, filter: FilterContextItem): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The parameter refs a widget depends on through the dashboard filters of its tab that it does not
|
|
42
|
+
* ignore, resolved against the filter → parameter dependency map (`catalog.filterParameters.byRef`).
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function collectWidgetFilterParameterRefs(ignoreDashboardFilters: ReadonlyArray<IDashboardFilterReference>, tab: ITabState, filterParameters: Record<string, IdentifierRef[]>): IdentifierRef[];
|
|
15
47
|
/**
|
|
16
48
|
* Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
|
|
17
49
|
* `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
|
|
@@ -24,17 +56,19 @@ export declare function collectReferencedParameterRefs(insight: IInsightDefiniti
|
|
|
24
56
|
export declare function resolveEffectiveParameterValuesForRefs(entries: IDashboardParameterEntry[], referencedRefs: IdentifierRef[], insightParameterValues: IInsightParameterValue[], workspaceParameterByRef: Map<string, IParameterMetadataObject>): IInsightParameterValue[];
|
|
25
57
|
interface IParameterResolutionContext {
|
|
26
58
|
entries: IDashboardParameterEntry[];
|
|
27
|
-
|
|
59
|
+
insightParameters: Record<string, IdentifierRef[]>;
|
|
60
|
+
filterParameterRefs: IdentifierRef[];
|
|
28
61
|
workspaceParameterByRef: Map<string, IParameterMetadataObject>;
|
|
29
62
|
isStringEnabled: boolean;
|
|
30
63
|
}
|
|
31
64
|
/**
|
|
32
|
-
* Effective execution parameters for `insight` given a widget's parameter context:
|
|
33
|
-
* the insight
|
|
65
|
+
* Effective execution parameters for `insight` given a widget's parameter context: looks up the refs
|
|
66
|
+
* the insight depends on, adds those the widget's dashboard filters depend on, then applies
|
|
67
|
+
* {@link resolveEffectiveParameterValuesForRefs}.
|
|
34
68
|
*
|
|
35
69
|
* @internal
|
|
36
70
|
*/
|
|
37
|
-
export declare function resolveEffectiveParameterValuesForInsight(context: IParameterResolutionContext | undefined, insight:
|
|
71
|
+
export declare function resolveEffectiveParameterValuesForInsight(context: IParameterResolutionContext | undefined, insight: IInsight): IInsightParameterValue[];
|
|
38
72
|
/**
|
|
39
73
|
* The value hydration seeds into `runtimeOverride`: the dashboard parameter's `value`, else the
|
|
40
74
|
* workspace default when the workspace parameter is of the matching type, else `undefined`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"parametersHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAetB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAK9B;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAM,CAAC;AAE9F;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,GAAG,aAAa,EAAE,CAazG;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAA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AO,GACtB,cAAc,GAAG,SAAS,CAc5B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,EAAE,wBAAwB,EAAE,EACnC,mBAAmB,EAAE,wBAAwB,EAAE,EAC/C,YAAY,EAAE,OAAO,GACtB,sBAAsB,EAAE,CAqB1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,EAC9B,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAC9D,eAAe,EAAE,OAAO,GACzB,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAS7C"}
|
|
@@ -1,38 +1,106 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { DashboardParameterModeValues,
|
|
2
|
+
import { DashboardParameterModeValues, areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, insightParameters, insightRef, isComputedAttributeRef, isDashboardAttributeFilterItem, isDashboardAttributeFilterReference, isDashboardMeasureValueFilter, isDashboardMeasureValueFilterReference, isIdentifierRef, isValidParameterValue, objRefToString, sanitizeParameterValue, serializeObjRef, } from "@gooddata/sdk-model";
|
|
3
3
|
import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
|
|
4
4
|
const EMPTY_PARAMETERS = [];
|
|
5
5
|
const EMPTY_PARAMETER_VALUES = [];
|
|
6
|
+
const EMPTY_REFS = [];
|
|
6
7
|
/**
|
|
7
8
|
* @internal
|
|
8
9
|
*/
|
|
9
10
|
export const EMPTY_EXPORT_PARAMETERS_BY_TAB = {};
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* deduped by ref string. The order matches the first occurrence in the measure traversal.
|
|
12
|
+
* Concatenates parameter ref lists, keeping the first occurrence of each ref (by `serializeObjRef`).
|
|
13
13
|
*
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export function
|
|
16
|
+
export function unionParameterRefs(...lists) {
|
|
17
17
|
const seen = new Set();
|
|
18
18
|
const result = [];
|
|
19
|
-
for (const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
for (const ref of refs) {
|
|
26
|
-
const key = objRefToString(ref);
|
|
27
|
-
if (seen.has(key)) {
|
|
28
|
-
continue;
|
|
19
|
+
for (const list of lists) {
|
|
20
|
+
for (const ref of list) {
|
|
21
|
+
const key = serializeObjRef(ref);
|
|
22
|
+
if (!seen.has(key)) {
|
|
23
|
+
seen.add(key);
|
|
24
|
+
result.push(ref);
|
|
29
25
|
}
|
|
30
|
-
seen.add(key);
|
|
31
|
-
result.push(ref);
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
28
|
return result;
|
|
35
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The objects a dashboard filter reads through which it can depend on a parameter, as roots for the
|
|
32
|
+
* references service: a computed attribute an attribute filter filters on, and a measure value filter's
|
|
33
|
+
* metric plus any computed attribute in its dimensionality. A plain attribute or label has no expression,
|
|
34
|
+
* so it cannot depend on a parameter and is not a root. Date filters never are.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export function filterParameterRoots(filter) {
|
|
39
|
+
if (isDashboardAttributeFilterItem(filter)) {
|
|
40
|
+
const displayForm = dashboardAttributeFilterItemDisplayForm(filter);
|
|
41
|
+
return isComputedAttributeRef(displayForm) && isIdentifierRef(displayForm)
|
|
42
|
+
? [displayForm]
|
|
43
|
+
: EMPTY_REFS;
|
|
44
|
+
}
|
|
45
|
+
if (isDashboardMeasureValueFilter(filter)) {
|
|
46
|
+
const { measure, dimensionality = [] } = filter.dashboardMeasureValueFilter;
|
|
47
|
+
return [
|
|
48
|
+
...(isIdentifierRef(measure) ? [measureRoot(measure)] : []),
|
|
49
|
+
...dimensionality.filter(isComputedAttributeRef).filter(isIdentifierRef),
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
return EMPTY_REFS;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A measure value filter stores its metric as a plain {@link ObjRef} that usually carries no `type`. The
|
|
56
|
+
* dependency graph resolves an untyped root as an insight, so the metric type is made explicit here; the
|
|
57
|
+
* same normalized ref is the key both when the map is loaded and when a widget reads it.
|
|
58
|
+
*/
|
|
59
|
+
function measureRoot(measure) {
|
|
60
|
+
return measure.type ? measure : { ...measure, type: "measure" };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* {@link filterParameterRoots} over many filters, deduped by ref.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export function collectFilterParameterRoots(filters) {
|
|
68
|
+
return unionParameterRefs(...filters.map(filterParameterRoots));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Whether the widget's `ignoreDashboardFilters` excludes the given dashboard filter from its execution.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Attribute filters are matched by display form. An ignore may instead name the filter's `displayAsLabel`;
|
|
75
|
+
* that is irrelevant here because only computed-attribute filters produce parameter roots and a computed
|
|
76
|
+
* attribute has exactly one (fabricated) display form, so it cannot be shown under another label.
|
|
77
|
+
*
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
export function isDashboardFilterIgnoredByWidget(ignoreDashboardFilters, filter) {
|
|
81
|
+
if (isDashboardAttributeFilterItem(filter)) {
|
|
82
|
+
const displayForm = dashboardAttributeFilterItemDisplayForm(filter);
|
|
83
|
+
return ignoreDashboardFilters.some((ignored) => isDashboardAttributeFilterReference(ignored) &&
|
|
84
|
+
areObjRefsEqual(ignored.displayForm, displayForm));
|
|
85
|
+
}
|
|
86
|
+
if (isDashboardMeasureValueFilter(filter)) {
|
|
87
|
+
const { measure } = filter.dashboardMeasureValueFilter;
|
|
88
|
+
return ignoreDashboardFilters.some((ignored) => isDashboardMeasureValueFilterReference(ignored) && areObjRefsEqual(ignored.measure, measure));
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The parameter refs a widget depends on through the dashboard filters of its tab that it does not
|
|
94
|
+
* ignore, resolved against the filter → parameter dependency map (`catalog.filterParameters.byRef`).
|
|
95
|
+
*
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export function collectWidgetFilterParameterRefs(ignoreDashboardFilters, tab, filterParameters) {
|
|
99
|
+
const filters = tab.filterContext?.filterContextDefinition?.filters ?? [];
|
|
100
|
+
const roots = collectFilterParameterRoots(filters.filter((filter) => !isDashboardFilterIgnoredByWidget(ignoreDashboardFilters, filter)));
|
|
101
|
+
const result = unionParameterRefs(...roots.map((root) => filterParameters[serializeObjRef(root)] ?? EMPTY_REFS));
|
|
102
|
+
return result.length === 0 ? EMPTY_REFS : result;
|
|
103
|
+
}
|
|
36
104
|
/**
|
|
37
105
|
* Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
|
|
38
106
|
* `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
|
|
@@ -75,8 +143,9 @@ export function resolveEffectiveParameterValuesForRefs(entries, referencedRefs,
|
|
|
75
143
|
return result.length === 0 ? EMPTY_PARAMETER_VALUES : result;
|
|
76
144
|
}
|
|
77
145
|
/**
|
|
78
|
-
* Effective execution parameters for `insight` given a widget's parameter context:
|
|
79
|
-
* the insight
|
|
146
|
+
* Effective execution parameters for `insight` given a widget's parameter context: looks up the refs
|
|
147
|
+
* the insight depends on, adds those the widget's dashboard filters depend on, then applies
|
|
148
|
+
* {@link resolveEffectiveParameterValuesForRefs}.
|
|
80
149
|
*
|
|
81
150
|
* @internal
|
|
82
151
|
*/
|
|
@@ -84,7 +153,7 @@ export function resolveEffectiveParameterValuesForInsight(context, insight) {
|
|
|
84
153
|
if (!context) {
|
|
85
154
|
return EMPTY_PARAMETER_VALUES;
|
|
86
155
|
}
|
|
87
|
-
const referencedRefs =
|
|
156
|
+
const referencedRefs = unionParameterRefs(context.insightParameters[serializeObjRef(insightRef(insight))] ?? EMPTY_REFS, context.filterParameterRefs);
|
|
88
157
|
return resolveEffectiveParameterValuesForRefs(context.entries, referencedRefs, ungatedInsightParameterValues(insight, context.isStringEnabled), context.workspaceParameterByRef);
|
|
89
158
|
}
|
|
90
159
|
/**
|