@gooddata/sdk-ui-dashboard 11.58.0-alpha.2 → 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 +8 -8
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- 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/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/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/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.js +2 -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/types.d.ts +1 -1
- package/esm/presentation/widget/insight/types.d.ts.map +1 -1
- package/esm/presentation/widget/richText/RestrictedReferencesDialog.d.ts.map +1 -1
- package/esm/presentation/widget/richText/RestrictedReferencesDialog.js +5 -6
- 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 +68 -42
- package/package.json +21 -21
- package/styles/css/main.css +8 -7
- 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
|
@@ -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,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C,EAAE,yBAAyB,EAAE,CAAC;IACjD,YAAY;IACZ,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClD,aAAa;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,aAAa;IACb,iBAAiB,EAAE,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"}
|
|
@@ -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,E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,EAC3C,uBAAuB,EAAE,mBAAmB,EAAE,GAC/C,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAW/C;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,wBAAwB,EAC/B,kBAAkB,EAAE,wBAAwB,GAAG,SAAS,EACxD,YAAY,EAAE,OAAO,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
|
/**
|
|
@@ -152,13 +152,20 @@ export declare const selectParameterReconciliations: DashboardSelector<IParamete
|
|
|
152
152
|
export declare const selectParameterReconciliationByRef: (ref: ObjRef) => DashboardSelector<ParameterReconciliation | undefined>;
|
|
153
153
|
interface IWidgetParameterContext {
|
|
154
154
|
entries: IDashboardParameterEntry[];
|
|
155
|
-
|
|
155
|
+
insightParameters: Record<string, IdentifierRef[]>;
|
|
156
|
+
filterParameterRefs: IdentifierRef[];
|
|
156
157
|
workspaceParameterByRef: Map<string, IParameterMetadataObject>;
|
|
157
158
|
widgetInsightRef: ObjRef;
|
|
158
159
|
isStringEnabled: boolean;
|
|
159
160
|
}
|
|
160
161
|
/**
|
|
161
|
-
* Owning-tab parameter entries
|
|
162
|
+
* Owning-tab parameter entries, the insight → parameter map and the widget's dashboard-filter
|
|
163
|
+
* parameter refs for a widget, keyed by ref.
|
|
164
|
+
*
|
|
165
|
+
* @remarks
|
|
166
|
+
* The filter half degrades to "no filter dependencies" while its map is not loaded (or failed to load),
|
|
167
|
+
* so a dashboard whose filter dependency request failed still injects the parameters its insights
|
|
168
|
+
* depend on.
|
|
162
169
|
*
|
|
163
170
|
* @internal
|
|
164
171
|
*/
|
|
@@ -167,14 +174,14 @@ export declare const selectWidgetParameterContext: (ref: ObjRef | undefined) =>
|
|
|
167
174
|
* Returns the parameter values to inject into the widget's `IExecutionConfig.parameterValues`.
|
|
168
175
|
*
|
|
169
176
|
* @remarks
|
|
170
|
-
* For each parameter
|
|
171
|
-
*
|
|
177
|
+
* For each parameter the widget's insight depends on (via the dashboard-wide
|
|
178
|
+
* insight → parameter dependency map), the value is resolved in this order:
|
|
172
179
|
*
|
|
173
180
|
* 1. dashboard chip on the widget's tab with `runtimeOverride !== undefined`,
|
|
174
181
|
* 2. else `insight.parameters` entry for that ref (AD-authored per-insight override),
|
|
175
182
|
* 3. else nothing (backend uses workspace default).
|
|
176
183
|
*
|
|
177
|
-
* Parameters
|
|
184
|
+
* Parameters the widget's insight does not depend on are excluded so that adding/removing
|
|
178
185
|
* unrelated parameters does not invalidate the widget's `defFingerprint`. Returns `[]` when
|
|
179
186
|
* `enableParameters` is off or while the dependency map has not been loaded.
|
|
180
187
|
*
|
|
@@ -183,7 +190,7 @@ export declare const selectWidgetParameterContext: (ref: ObjRef | undefined) =>
|
|
|
183
190
|
export declare const selectEffectiveParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector<IInsightParameterValue[]>;
|
|
184
191
|
/**
|
|
185
192
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
186
|
-
* the
|
|
193
|
+
* the refs the insight depends on, flag-gated and ref-filtered, with no dashboard chip overrides.
|
|
187
194
|
*
|
|
188
195
|
* @remarks
|
|
189
196
|
* Raw CSV export inlines a resolved AFM, so it must carry parameters explicitly rather than letting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"parametersSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAKtB,MAAM,qBAAqB,CAAC;AAe7B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,OAAO,EAEH,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAoB/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sBAAsB,CAAC;AAgC9B;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,CAG9E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAO9F,CAAC;AAEP;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,CAG/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,wBAAwB,EAAE,CAGzF,CAAC;AAYF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAGvF,CAAC;AAEN;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAG9F,CAAC;AAEN;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,CAOtF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,C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AE,iBAAiB,CAAC,yBAAyB,EAAE,CAI1F,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { createSelector } from "@reduxjs/toolkit";
|
|
3
3
|
import { isEqual, uniq } from "lodash-es";
|
|
4
|
-
import { areObjRefsEqual, objRefToString, } from "@gooddata/sdk-model";
|
|
4
|
+
import { areObjRefsEqual, insightRef, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
5
5
|
import { createMemoizedSelector } from "../../_infra/selectors.js";
|
|
6
|
-
import {
|
|
6
|
+
import { selectCatalogFilterParameters, selectCatalogFilterParametersStatus, selectCatalogInsightParameters, selectCatalogInsightParametersStatus, selectCatalogParameterByRef, selectCatalogParameters, selectCatalogParametersIsLoaded, } from "../../catalog/catalogSelectors.js";
|
|
7
7
|
import { selectEnableParameters, selectEnableStringParameters } from "../../config/configSelectors.js";
|
|
8
8
|
import { selectInsightsMap } from "../../insights/insightsSelectors.js";
|
|
9
9
|
import { selectIsInEditMode } from "../../renderMode/renderModeSelectors.js";
|
|
10
10
|
import { selectAllTabsInsightWidgetContexts, selectAllTabsWidgetContexts, } from "../layout/layoutSelectors.js";
|
|
11
11
|
import { selectActiveOrDefaultTabLocalIdentifier, selectActiveTab, selectTabs } from "../tabsSelectors.js";
|
|
12
12
|
import { DEFAULT_TAB_ID } from "../tabsState.js";
|
|
13
|
-
import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyDisplayOverride, applyRuntimeOverride, buildPersistedByTabAndRef, buildWorkspaceParametersByRef, classifyParameterReconciliation, collectAppliedParameterValues, collectExportOverrides, collectParameterReconciliations,
|
|
13
|
+
import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyDisplayOverride, applyRuntimeOverride, buildPersistedByTabAndRef, buildWorkspaceParametersByRef, classifyParameterReconciliation, collectAppliedParameterValues, collectExportOverrides, collectParameterReconciliations, collectWidgetFilterParameterRefs, computeParameterResetTargets, computeParameterResetValue, displayOverride, hydrateParameterEntry, isGatedStringEntry, resolveEffectiveParameterValuesForRefs, smartPersistResolvedEntry, ungatedInsightParameterValues, ungatedTabEntries, unionParameterRefs, } from "./parametersHelpers.js";
|
|
14
14
|
import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
|
|
15
15
|
const EMPTY_PARAMETERS = [];
|
|
16
16
|
const EMPTY_EXPORT_PARAMETERS = [];
|
|
@@ -18,6 +18,7 @@ const EMPTY_PARAMETER_VALUES = [];
|
|
|
18
18
|
const EMPTY_TABS = [];
|
|
19
19
|
const EMPTY_RESET_TARGETS = [];
|
|
20
20
|
const EMPTY_RECONCILIATIONS = [];
|
|
21
|
+
const EMPTY_REFS = [];
|
|
21
22
|
const EMPTY_WORKSPACE_PARAMETERS_BY_REF = new Map();
|
|
22
23
|
const selectParametersState = createSelector(selectActiveTab, (activeTab) => activeTab?.parameters ?? parametersInitialState);
|
|
23
24
|
const selectPersistedParametersFromMeta = (state) => state.meta?.persistedDashboard?.parameters ?? EMPTY_PARAMETERS;
|
|
@@ -274,21 +275,31 @@ export const selectParameterReconciliationByRef = createMemoizedSelector((ref) =
|
|
|
274
275
|
return classifyParameterReconciliation(applyDisplayOverride(entry), workspaceParameter);
|
|
275
276
|
}));
|
|
276
277
|
/**
|
|
277
|
-
* Owning-tab parameter entries
|
|
278
|
+
* Owning-tab parameter entries, the insight → parameter map and the widget's dashboard-filter
|
|
279
|
+
* parameter refs for a widget, keyed by ref.
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* The filter half degrades to "no filter dependencies" while its map is not loaded (or failed to load),
|
|
283
|
+
* so a dashboard whose filter dependency request failed still injects the parameters its insights
|
|
284
|
+
* depend on.
|
|
278
285
|
*
|
|
279
286
|
* @internal
|
|
280
287
|
*/
|
|
281
|
-
export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectEnableStringParameters,
|
|
282
|
-
if (!isEnabled || !ref ||
|
|
288
|
+
export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectEnableStringParameters, selectCatalogInsightParameters, selectCatalogInsightParametersStatus, selectCatalogFilterParameters, selectCatalogFilterParametersStatus, selectWorkspaceParametersByRef, (contexts, isEnabled, isStringEnabled, insightParameters, insightParametersStatus, filterParameters, filterParametersStatus, workspaceParameterByRef) => {
|
|
289
|
+
if (!isEnabled || !ref || insightParametersStatus !== "loaded") {
|
|
283
290
|
return undefined;
|
|
284
291
|
}
|
|
285
292
|
const context = contexts.find((ctx) => areObjRefsEqual(ctx.widget.ref, ref));
|
|
286
293
|
if (!context) {
|
|
287
294
|
return undefined;
|
|
288
295
|
}
|
|
296
|
+
const filterParameterRefs = filterParametersStatus === "loaded"
|
|
297
|
+
? collectWidgetFilterParameterRefs(context.widget.ignoreDashboardFilters, context.tab, filterParameters)
|
|
298
|
+
: EMPTY_REFS;
|
|
289
299
|
return {
|
|
290
300
|
entries: ungatedTabEntries(context.tab, isStringEnabled),
|
|
291
|
-
|
|
301
|
+
insightParameters,
|
|
302
|
+
filterParameterRefs,
|
|
292
303
|
workspaceParameterByRef,
|
|
293
304
|
widgetInsightRef: context.widget.insight,
|
|
294
305
|
isStringEnabled,
|
|
@@ -300,12 +311,12 @@ const selectWidgetInsightAndReferencedRefs = createMemoizedSelector((ref) => cre
|
|
|
300
311
|
if (!resolved) {
|
|
301
312
|
return undefined;
|
|
302
313
|
}
|
|
303
|
-
const { entries,
|
|
314
|
+
const { entries, insightParameters, filterParameterRefs, workspaceParameterByRef, widgetInsightRef, isStringEnabled, } = resolved;
|
|
304
315
|
const insight = insights.get(widgetInsightRef);
|
|
305
316
|
if (!insight) {
|
|
306
317
|
return undefined;
|
|
307
318
|
}
|
|
308
|
-
const referencedRefs =
|
|
319
|
+
const referencedRefs = unionParameterRefs(insightParameters[serializeObjRef(insightRef(insight))] ?? EMPTY_REFS, filterParameterRefs);
|
|
309
320
|
const insightParameterValues = ungatedInsightParameterValues(insight, isStringEnabled);
|
|
310
321
|
return { insightParameterValues, referencedRefs, entries, workspaceParameterByRef };
|
|
311
322
|
}));
|
|
@@ -313,14 +324,14 @@ const selectWidgetInsightAndReferencedRefs = createMemoizedSelector((ref) => cre
|
|
|
313
324
|
* Returns the parameter values to inject into the widget's `IExecutionConfig.parameterValues`.
|
|
314
325
|
*
|
|
315
326
|
* @remarks
|
|
316
|
-
* For each parameter
|
|
317
|
-
*
|
|
327
|
+
* For each parameter the widget's insight depends on (via the dashboard-wide
|
|
328
|
+
* insight → parameter dependency map), the value is resolved in this order:
|
|
318
329
|
*
|
|
319
330
|
* 1. dashboard chip on the widget's tab with `runtimeOverride !== undefined`,
|
|
320
331
|
* 2. else `insight.parameters` entry for that ref (AD-authored per-insight override),
|
|
321
332
|
* 3. else nothing (backend uses workspace default).
|
|
322
333
|
*
|
|
323
|
-
* Parameters
|
|
334
|
+
* Parameters the widget's insight does not depend on are excluded so that adding/removing
|
|
324
335
|
* unrelated parameters does not invalidate the widget's `defFingerprint`. Returns `[]` when
|
|
325
336
|
* `enableParameters` is off or while the dependency map has not been loaded.
|
|
326
337
|
*
|
|
@@ -335,7 +346,7 @@ export const selectEffectiveParameterValuesForWidget = createMemoizedSelector((r
|
|
|
335
346
|
}));
|
|
336
347
|
/**
|
|
337
348
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
338
|
-
* the
|
|
349
|
+
* the refs the insight depends on, flag-gated and ref-filtered, with no dashboard chip overrides.
|
|
339
350
|
*
|
|
340
351
|
* @remarks
|
|
341
352
|
* Raw CSV export inlines a resolved AFM, so it must carry parameters explicitly rather than letting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationAttributeFilter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationAttributeFilter.tsx"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"AutomationAttributeFilter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationAttributeFilter.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EACH,KAAK,mBAAmB,EAM3B,MAAM,sBAAsB,CAAC;AAW9B,wBAAgB,yBAAyB,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,KAAK,GACR,EAAE;IACC,MAAM,EAAE,4BAA4B,CAAC;IACrC,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,2CAwBA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
|
-
import { useCallback } from "react";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
+
import { isDashboardAttributeFilter, } from "@gooddata/sdk-model";
|
|
6
|
+
import { useBackendStrict } from "@gooddata/sdk-ui";
|
|
5
7
|
import { AttributeFilterButton, } from "@gooddata/sdk-ui-filters";
|
|
6
8
|
import { UiChip, UiSkeleton, UiTooltip, isActionKey, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
9
|
+
import { convertDashboardAttributeFilterElementsUrisToValues } from "../../../../../_staging/dashboard/legacyFilterConvertors.js";
|
|
10
|
+
import { useDashboardComponentsContext } from "../../../../dashboardContexts/DashboardComponentsContext.js";
|
|
7
11
|
import { DefaultDashboardAttributeFilter } from "../../../../filterBar/attributeFilter/DefaultDashboardAttributeFilter.js";
|
|
8
12
|
import { AutomationAttributeFilterProvider, useAutomationAttributeFilterContext, } from "./AutomationAttributeFilterContext.js";
|
|
9
13
|
export function AutomationAttributeFilter({ filter, onChange, onDelete, isLocked, displayAsLabel, overlayPositionType, readonly, tabId, }) {
|
|
@@ -15,10 +19,20 @@ export function AutomationAttributeFilter({ filter, onChange, onDelete, isLocked
|
|
|
15
19
|
}
|
|
16
20
|
function AttributeFilterWrapper({ displayAsLabel, overlayPositionType, readonly, tabId, }) {
|
|
17
21
|
const { onChange, filter } = useAutomationAttributeFilterContext();
|
|
22
|
+
const { AttributeFilterComponentSet } = useDashboardComponentsContext();
|
|
23
|
+
const supportElementUris = useBackendStrict().capabilities.supportsElementUris ?? false;
|
|
18
24
|
const handleFilterChanged = useCallback((newFilter) => {
|
|
19
25
|
onChange(newFilter);
|
|
20
26
|
}, [onChange]);
|
|
21
|
-
|
|
27
|
+
const filterToUse = useMemo(() => {
|
|
28
|
+
if (supportElementUris || !isDashboardAttributeFilter(filter)) {
|
|
29
|
+
return filter;
|
|
30
|
+
}
|
|
31
|
+
return convertDashboardAttributeFilterElementsUrisToValues(filter);
|
|
32
|
+
}, [filter, supportElementUris]);
|
|
33
|
+
// Mirrors the resolution in filterBar/filterBar/DefaultFilterBarItem.tsx
|
|
34
|
+
const DashboardAttributeFilter = AttributeFilterComponentSet?.MainComponentProvider(filterToUse) ?? DefaultDashboardAttributeFilter;
|
|
35
|
+
return (_jsx(DashboardAttributeFilter, { filter: filterToUse, onFilterChanged: handleFilterChanged, displayAsLabel: displayAsLabel, AttributeFilterComponent: AttributeFilter, overlayPositionType: overlayPositionType, readonly: readonly, tabId: tabId }));
|
|
22
36
|
}
|
|
23
37
|
function AttributeFilter(props) {
|
|
24
38
|
return (_jsx(AttributeFilterButton, { ...props, LoadingComponent: AutomationAttributeFilterLoadingComponent, DropdownButtonComponent: AutomationAttributeFilterDropdownButtonComponent }));
|
|
@@ -646,6 +646,9 @@ export declare const de_DE: {
|
|
|
646
646
|
"richText.summaryDashboard.empty": string;
|
|
647
647
|
"richText.deleteDialog.header": string;
|
|
648
648
|
"richText.deleteDialog.message": string;
|
|
649
|
+
"richText.restrictedReferences.dialog.header": string;
|
|
650
|
+
"richText.restrictedReferences.dialog.message": string;
|
|
651
|
+
"richText.restrictedReferences.dialog.submit": string;
|
|
649
652
|
"richText.emptyContent": string;
|
|
650
653
|
"visualizationSwitcher.restrictedEntry": string;
|
|
651
654
|
"visualizationSwitcher.emptyContent": string;
|