@gooddata/sdk-ui-dashboard 11.47.0-alpha.1 → 11.47.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 +5 -5
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/automation/index.d.ts +7 -1
- package/esm/_staging/automation/index.d.ts.map +1 -1
- package/esm/_staging/automation/index.js +8 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/kdaDialog/composition/hooks/useDataViewWithConfig.d.ts.map +1 -1
- package/esm/kdaDialog/composition/hooks/useDataViewWithConfig.js +11 -1
- package/esm/model/commandHandlers/dashboard/common/parameterHydration.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +5 -5
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.js +4 -3
- package/esm/model/commandHandlers/filterContext/filterViewParameters.d.ts +2 -2
- package/esm/model/commandHandlers/filterContext/filterViewParameters.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/filterViewParameters.js +6 -11
- package/esm/model/store/config/configSelectors.d.ts +6 -6
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -8
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +43 -10
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +66 -27
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts +3 -3
- package/esm/model/store/tabs/parameters/parametersReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersReducers.js +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +25 -4
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +59 -28
- package/esm/model/store/tabs/parameters/parametersState.d.ts +2 -2
- package/esm/model/store/tabs/parameters/parametersState.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.js +2 -2
- package/esm/presentation/automations/connectors/hooks/useBuildAlertingDialogContext.test.js +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +2 -2
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentSettings.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentSettings.js +6 -10
- package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/automationParameters.js +8 -4
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +2 -2
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js +2 -2
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.js +6 -5
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterPicker.js +4 -5
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +0 -20
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +0 -20
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +0 -8
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +0 -8
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +0 -8
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.js +2 -41
- package/esm/sdk-ui-dashboard.d.ts +5 -11
- package/package.json +21 -21
- package/styles/css/dashboard.css +7 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/drillConfigPanel.css +0 -70
- package/styles/css/drillConfigPanel.css.map +1 -1
- package/styles/css/main.css +12 -71
- package/styles/css/main.css.map +1 -1
- package/styles/css/notifications_channels_dialog.css +7 -0
- package/styles/css/notifications_channels_dialog.css.map +1 -1
- package/styles/css/pdfExportDialog.css +5 -1
- package/styles/css/pdfExportDialog.css.map +1 -1
- package/styles/scss/drillConfigPanel.scss +0 -79
- package/styles/scss/notifications_channels_dialog.scss +9 -0
- package/styles/scss/pdfExportDialog.scss +7 -2
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts +0 -8
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts.map +0 -1
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.js +0 -48
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.d.ts +0 -23
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.d.ts.map +0 -1
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.js +0 -77
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IDashboardExportParameter, type IDashboardParameter, type IDashboardTab, type IInsight, type IInsightDefinition, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
|
|
1
|
+
import { type IDashboardExportParameter, 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 ObjRefMap } from "../../../../_staging/metadata/objRefMap.js";
|
|
3
3
|
import { type IInsightWidgetTabContext } from "../layout/layoutSelectors.js";
|
|
4
4
|
import { type ITabState } from "../tabsState.js";
|
|
@@ -17,8 +17,9 @@ export declare function collectReferencedParameterRefs(insight: IInsightDefiniti
|
|
|
17
17
|
/**
|
|
18
18
|
* Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
|
|
19
19
|
* `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
|
|
20
|
-
* default).
|
|
21
|
-
*
|
|
20
|
+
* default). A value from either source that is invalid for the workspace parameter (out of
|
|
21
|
+
* constraints or of the wrong kind) is replaced by the workspace default (recovery), so the backend
|
|
22
|
+
* never receives a bad value.
|
|
22
23
|
*
|
|
23
24
|
* @internal
|
|
24
25
|
*/
|
|
@@ -27,6 +28,7 @@ interface IParameterResolutionContext {
|
|
|
27
28
|
entries: IDashboardParameterEntry[];
|
|
28
29
|
measureParameters: Record<string, IdentifierRef[]>;
|
|
29
30
|
workspaceParameterByRef: Map<string, IParameterMetadataObject>;
|
|
31
|
+
isStringEnabled: boolean;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Effective execution parameters for `insight` given a widget's parameter context: resolves the refs
|
|
@@ -37,11 +39,20 @@ interface IParameterResolutionContext {
|
|
|
37
39
|
export declare function resolveEffectiveParameterValuesForInsight(context: IParameterResolutionContext | undefined, insight: IInsightDefinition): IInsightParameterValue[];
|
|
38
40
|
/**
|
|
39
41
|
* The value hydration seeds into `runtimeOverride`: the dashboard parameter's `value`, else the
|
|
40
|
-
* workspace
|
|
42
|
+
* workspace default when the workspace parameter is of the matching type, else `undefined`.
|
|
41
43
|
*
|
|
42
44
|
* @internal
|
|
43
45
|
*/
|
|
44
|
-
export declare function computeHydratedRuntimeOverride(parameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined):
|
|
46
|
+
export declare function computeHydratedRuntimeOverride(parameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined): ParameterValue | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The workspace definition a dashboard parameter binds to: the definition when its type matches
|
|
49
|
+
* the parameter's own type tag, `undefined` otherwise (removed or incompatible workspace
|
|
50
|
+
* parameter). The single home of the type-match invariant shared by hydration, reset,
|
|
51
|
+
* reconciliation, and chip rendering.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare function matchingWorkspaceDefinition(parameter: IDashboardParameter, workspaceParameter: IParameterMetadataObject | undefined): IParameterDefinition | undefined;
|
|
45
56
|
/**
|
|
46
57
|
* Why a dashboard parameter no longer matches its workspace catalog entry:
|
|
47
58
|
* - `removed`: the workspace has no parameter for this ref.
|
|
@@ -81,6 +92,28 @@ export declare function classifyParameterReconciliation(dashboardParameter: IDas
|
|
|
81
92
|
* @internal
|
|
82
93
|
*/
|
|
83
94
|
export declare function collectParameterReconciliations(entries: IDashboardParameterEntry[], workspaceParameters: IParameterMetadataObject[]): IParameterReconciliationEntry[];
|
|
95
|
+
/**
|
|
96
|
+
* A STRING entry persisted while `enableStringParameters` was on. Once the flag is off it must not
|
|
97
|
+
* reach executions, exports, or reconciliation: the catalog omits STRING definitions, so the chip
|
|
98
|
+
* is hidden and the value would apply as an invisible override.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export declare function isGatedStringEntry(entry: IDashboardParameterEntry, isStringEnabled: boolean): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The value-shaped twin of {@link isGatedStringEntry}, for insight-level parameter values, which
|
|
105
|
+
* carry no declared type.
|
|
106
|
+
*
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export declare function isGatedStringValue(value: ParameterValue, isStringEnabled: boolean): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The insight-authored parameter values that pass the string gate — the single home of
|
|
112
|
+
* insight-level gating for both the widget-execution hook path and the selector path.
|
|
113
|
+
*
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export declare function ungatedInsightParameterValues(insight: IInsightDefinition, isStringEnabled: boolean): IInsightParameterValue[];
|
|
84
117
|
/**
|
|
85
118
|
* Display title for a dashboard parameter: `parameter.label` → workspace title → `ref.identifier`.
|
|
86
119
|
*
|
|
@@ -131,12 +164,12 @@ export declare function smartPersistResolvedEntry(entry: IDashboardParameterEntr
|
|
|
131
164
|
*/
|
|
132
165
|
export declare function buildPersistedByTabAndRef(persistedTabs: ReadonlyArray<IDashboardTab>, rootPersistedParameters: IDashboardParameter[]): Map<string, Map<string, IDashboardParameter>>;
|
|
133
166
|
/**
|
|
134
|
-
* Returns `undefined` when reset would be a no-op: missing/
|
|
135
|
-
* in edit mode when `parameter.value` is unset / already equals the workspace default.
|
|
167
|
+
* Returns `undefined` when reset would be a no-op: missing/type-mismatched workspace parameter,
|
|
168
|
+
* or in edit mode when `parameter.value` is unset / already equals the workspace default.
|
|
136
169
|
*
|
|
137
170
|
* @internal
|
|
138
171
|
*/
|
|
139
|
-
export declare function computeParameterResetValue(entry: IDashboardParameterEntry, workspaceParameter: IParameterMetadataObject | undefined, isInEditMode: boolean):
|
|
172
|
+
export declare function computeParameterResetValue(entry: IDashboardParameterEntry, workspaceParameter: IParameterMetadataObject | undefined, isInEditMode: boolean): ParameterValue | undefined;
|
|
140
173
|
/**
|
|
141
174
|
* Only `mode: "active"` entries with a defined `runtimeOverride` are considered resettable;
|
|
142
175
|
* HIDDEN and READONLY entries are skipped, and entries with `runtimeOverride === undefined`
|
|
@@ -147,7 +180,7 @@ export declare function computeParameterResetValue(entry: IDashboardParameterEnt
|
|
|
147
180
|
*/
|
|
148
181
|
export declare function computeParameterResetTargets(entries: IDashboardParameterEntry[], workspaceParameters: IParameterMetadataObject[], isInEditMode: boolean): {
|
|
149
182
|
ref: IDashboardParameterEntry["parameter"]["ref"];
|
|
150
|
-
value:
|
|
183
|
+
value: ParameterValue | undefined;
|
|
151
184
|
}[];
|
|
152
185
|
/**
|
|
153
186
|
* Folds per-tab ref selections into the wire shape, dropping entries without a
|
|
@@ -160,7 +193,7 @@ export declare function computeParameterResetTargets(entries: IDashboardParamete
|
|
|
160
193
|
export declare function collectExportOverrides(tabRefSelections: ReadonlyArray<{
|
|
161
194
|
tab: ITabState;
|
|
162
195
|
allowedRefs?: Set<string>;
|
|
163
|
-
}>, workspaceParameterByRef: Map<string, IParameterMetadataObject
|
|
196
|
+
}>, workspaceParameterByRef: Map<string, IParameterMetadataObject>, includeStringEntries: boolean): Record<string, IDashboardExportParameter[]>;
|
|
164
197
|
/**
|
|
165
198
|
* Builds per-tab ref selections for a widget-scope export: each widget's owning tab is restricted
|
|
166
199
|
* to refs referenced by the widget's insight metrics. Multiple widgets on the same tab union their
|
|
@@ -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,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,
|
|
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,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EAMtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,sB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iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,GACnD;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,EAAE,CAuBhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { DashboardParameterModeValues,
|
|
2
|
+
import { DashboardParameterModeValues, insightMeasures, insightParameters, isMeasureDefinition, isValidParameterValue, objRefToString, } from "@gooddata/sdk-model";
|
|
3
3
|
import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
|
|
4
4
|
const EMPTY_PARAMETERS = [];
|
|
5
5
|
const EMPTY_PARAMETER_VALUES = [];
|
|
@@ -36,8 +36,9 @@ export function collectReferencedParameterRefs(insight, measureParameters) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Effective execution parameters, limited to `referencedRefs`. Precedence per ref: the dashboard
|
|
38
38
|
* `runtimeOverride`, else the insight's own parameter value, else nothing (backend uses the workspace
|
|
39
|
-
* default).
|
|
40
|
-
*
|
|
39
|
+
* default). A value from either source that is invalid for the workspace parameter (out of
|
|
40
|
+
* constraints or of the wrong kind) is replaced by the workspace default (recovery), so the backend
|
|
41
|
+
* never receives a bad value.
|
|
41
42
|
*
|
|
42
43
|
* @internal
|
|
43
44
|
*/
|
|
@@ -84,11 +85,11 @@ export function resolveEffectiveParameterValuesForInsight(context, insight) {
|
|
|
84
85
|
return EMPTY_PARAMETER_VALUES;
|
|
85
86
|
}
|
|
86
87
|
const referencedRefs = collectReferencedParameterRefs(insight, context.measureParameters);
|
|
87
|
-
return resolveEffectiveParameterValuesForRefs(context.entries, referencedRefs,
|
|
88
|
+
return resolveEffectiveParameterValuesForRefs(context.entries, referencedRefs, ungatedInsightParameterValues(insight, context.isStringEnabled), context.workspaceParameterByRef);
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* The value hydration seeds into `runtimeOverride`: the dashboard parameter's `value`, else the
|
|
91
|
-
* workspace
|
|
92
|
+
* workspace default when the workspace parameter is of the matching type, else `undefined`.
|
|
92
93
|
*
|
|
93
94
|
* @internal
|
|
94
95
|
*/
|
|
@@ -96,25 +97,34 @@ export function computeHydratedRuntimeOverride(parameter, workspaceParameter) {
|
|
|
96
97
|
if (parameter.value !== undefined) {
|
|
97
98
|
return parameter.value;
|
|
98
99
|
}
|
|
99
|
-
return
|
|
100
|
+
return matchingWorkspaceDefinition(parameter, workspaceParameter)?.defaultValue;
|
|
100
101
|
}
|
|
101
102
|
/**
|
|
102
|
-
* The
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
103
|
+
* The workspace definition a dashboard parameter binds to: the definition when its type matches
|
|
104
|
+
* the parameter's own type tag, `undefined` otherwise (removed or incompatible workspace
|
|
105
|
+
* parameter). The single home of the type-match invariant shared by hydration, reset,
|
|
106
|
+
* reconciliation, and chip rendering.
|
|
107
|
+
*
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
export function matchingWorkspaceDefinition(parameter, workspaceParameter) {
|
|
111
|
+
const definition = workspaceParameter?.definition;
|
|
112
|
+
return definition?.type === parameter.parameterType ? definition : undefined;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The value to execute for a runtime override: a value that is not valid for the workspace
|
|
116
|
+
* parameter (constraint-violating or of the wrong kind) is replaced by the workspace default so
|
|
117
|
+
* the dashboard renders the default instead of failing (recovery), while the chip keeps showing
|
|
118
|
+
* the user's saved value. Valid values, and values of removed parameters (no workspace entry —
|
|
119
|
+
* meant to surface as the standard widget error), pass through unchanged.
|
|
107
120
|
*
|
|
108
121
|
* @internal
|
|
109
122
|
*/
|
|
110
123
|
function recoverParameterExecutionValue(runtimeOverride, workspaceParameter) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return runtimeOverride;
|
|
124
|
+
const definition = workspaceParameter?.definition;
|
|
125
|
+
return definition && !isValidParameterValue(definition, runtimeOverride)
|
|
126
|
+
? definition.defaultValue
|
|
127
|
+
: runtimeOverride;
|
|
118
128
|
}
|
|
119
129
|
/**
|
|
120
130
|
* Classifies one dashboard parameter against its workspace catalog entry — the single source of
|
|
@@ -130,11 +140,11 @@ export function classifyParameterReconciliation(dashboardParameter, workspacePar
|
|
|
130
140
|
if (!workspaceParameter) {
|
|
131
141
|
return "removed";
|
|
132
142
|
}
|
|
133
|
-
if (!
|
|
143
|
+
if (!matchingWorkspaceDefinition(dashboardParameter, workspaceParameter)) {
|
|
134
144
|
return "incompatible";
|
|
135
145
|
}
|
|
136
146
|
if (dashboardParameter.value !== undefined &&
|
|
137
|
-
!
|
|
147
|
+
!isValidParameterValue(workspaceParameter.definition, dashboardParameter.value)) {
|
|
138
148
|
return "reset";
|
|
139
149
|
}
|
|
140
150
|
return undefined;
|
|
@@ -169,6 +179,34 @@ export function collectParameterReconciliations(entries, workspaceParameters) {
|
|
|
169
179
|
}
|
|
170
180
|
return result;
|
|
171
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* A STRING entry persisted while `enableStringParameters` was on. Once the flag is off it must not
|
|
184
|
+
* reach executions, exports, or reconciliation: the catalog omits STRING definitions, so the chip
|
|
185
|
+
* is hidden and the value would apply as an invisible override.
|
|
186
|
+
*
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
export function isGatedStringEntry(entry, isStringEnabled) {
|
|
190
|
+
return entry.parameter.parameterType === "STRING" && !isStringEnabled;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The value-shaped twin of {@link isGatedStringEntry}, for insight-level parameter values, which
|
|
194
|
+
* carry no declared type.
|
|
195
|
+
*
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
export function isGatedStringValue(value, isStringEnabled) {
|
|
199
|
+
return typeof value === "string" && !isStringEnabled;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The insight-authored parameter values that pass the string gate — the single home of
|
|
203
|
+
* insight-level gating for both the widget-execution hook path and the selector path.
|
|
204
|
+
*
|
|
205
|
+
* @internal
|
|
206
|
+
*/
|
|
207
|
+
export function ungatedInsightParameterValues(insight, isStringEnabled) {
|
|
208
|
+
return insightParameters(insight).filter((value) => !isGatedStringValue(value.value, isStringEnabled));
|
|
209
|
+
}
|
|
172
210
|
/**
|
|
173
211
|
* Display title for a dashboard parameter: `parameter.label` → workspace title → `ref.identifier`.
|
|
174
212
|
*
|
|
@@ -229,7 +267,7 @@ export function formatDashboardParameter(entry, workspaceParameter) {
|
|
|
229
267
|
* @internal
|
|
230
268
|
*/
|
|
231
269
|
export function smartPersistResolvedEntry(entry, workspaceParameter) {
|
|
232
|
-
const workspaceDefault =
|
|
270
|
+
const workspaceDefault = workspaceParameter.definition.defaultValue;
|
|
233
271
|
const result = {
|
|
234
272
|
ref: entry.parameter.ref,
|
|
235
273
|
parameterType: entry.parameter.parameterType,
|
|
@@ -263,16 +301,17 @@ export function buildPersistedByTabAndRef(persistedTabs, rootPersistedParameters
|
|
|
263
301
|
return result;
|
|
264
302
|
}
|
|
265
303
|
/**
|
|
266
|
-
* Returns `undefined` when reset would be a no-op: missing/
|
|
267
|
-
* in edit mode when `parameter.value` is unset / already equals the workspace default.
|
|
304
|
+
* Returns `undefined` when reset would be a no-op: missing/type-mismatched workspace parameter,
|
|
305
|
+
* or in edit mode when `parameter.value` is unset / already equals the workspace default.
|
|
268
306
|
*
|
|
269
307
|
* @internal
|
|
270
308
|
*/
|
|
271
309
|
export function computeParameterResetValue(entry, workspaceParameter, isInEditMode) {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
310
|
+
const definition = matchingWorkspaceDefinition(entry.parameter, workspaceParameter);
|
|
311
|
+
if (!definition) {
|
|
274
312
|
return undefined;
|
|
275
313
|
}
|
|
314
|
+
const workspaceDefault = definition.defaultValue;
|
|
276
315
|
const dashboardOverride = entry.parameter.value;
|
|
277
316
|
if (isInEditMode) {
|
|
278
317
|
if (dashboardOverride === undefined || dashboardOverride === workspaceDefault) {
|
|
@@ -316,10 +355,10 @@ export function computeParameterResetTargets(entries, workspaceParameters, isInE
|
|
|
316
355
|
*
|
|
317
356
|
* @internal
|
|
318
357
|
*/
|
|
319
|
-
export function collectExportOverrides(tabRefSelections, workspaceParameterByRef) {
|
|
358
|
+
export function collectExportOverrides(tabRefSelections, workspaceParameterByRef, includeStringEntries) {
|
|
320
359
|
const result = {};
|
|
321
360
|
for (const { tab, allowedRefs } of tabRefSelections) {
|
|
322
|
-
const entries = tab.parameters?.parameters ?? parametersInitialState.parameters;
|
|
361
|
+
const entries = (tab.parameters?.parameters ?? parametersInitialState.parameters).filter((entry) => !isGatedStringEntry(entry, includeStringEntries));
|
|
323
362
|
const scoped = allowedRefs
|
|
324
363
|
? entries.filter((entry) => allowedRefs.has(objRefToString(entry.parameter.ref)))
|
|
325
364
|
: entries;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Action, type CaseReducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { type IDashboardParameter, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IDashboardParameter, type ObjRef, type ParameterValue } from "@gooddata/sdk-model";
|
|
3
3
|
import { type ITabsState } from "../tabsState.js";
|
|
4
4
|
type ParametersReducer<A extends Action> = CaseReducer<ITabsState, A>;
|
|
5
5
|
/**
|
|
@@ -10,14 +10,14 @@ type ParametersReducer<A extends Action> = CaseReducer<ITabsState, A>;
|
|
|
10
10
|
*/
|
|
11
11
|
export interface IAddParameterPayload {
|
|
12
12
|
parameter: IDashboardParameter;
|
|
13
|
-
workspaceDefault:
|
|
13
|
+
workspaceDefault: ParameterValue;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @alpha
|
|
17
17
|
*/
|
|
18
18
|
export interface ISetParameterRuntimeValuePayload {
|
|
19
19
|
ref: ObjRef;
|
|
20
|
-
value:
|
|
20
|
+
value: ParameterValue | undefined;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersReducers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersReducers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAErF,OAAO,
|
|
1
|
+
{"version":3,"file":"parametersReducers.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersReducers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAErF,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,cAAc,EAEtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,UAAU,EAAgC,MAAM,iBAAiB,CAAC;AAIhF,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,EAAE,cAAc,CAAC;CACpC;AAoBD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;CACrC;AASD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAC9C,MAAM,EAAE,gCAAgC,EAAE,CAAC;IAC3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAWD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,GAAG,EAAE,MAAM,CAAC;CACf;AA6BD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAK9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { areObjRefsEqual } from "@gooddata/sdk-model";
|
|
2
|
+
import { areObjRefsEqual, } from "@gooddata/sdk-model";
|
|
3
3
|
import { getActiveTab, getTabOrActive } from "../tabsState.js";
|
|
4
4
|
import { parametersInitialState } from "./parametersState.js";
|
|
5
5
|
const addParameter = (state, action) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IDashboardExportParameter, type IDashboardParameter, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef } from "@gooddata/sdk-model";
|
|
1
|
+
import { type IDashboardExportParameter, type IDashboardParameter, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef, type ParameterValue } from "@gooddata/sdk-model";
|
|
2
2
|
import { type DashboardSelector } from "../../types.js";
|
|
3
3
|
import { type IParameterReconciliationEntry, type ParameterReconciliation } from "./parametersHelpers.js";
|
|
4
4
|
import { type IDashboardParameterEntry } from "./parametersState.js";
|
|
@@ -48,7 +48,7 @@ export declare const selectDashboardParameterEntryByRef: (ref: ObjRef) => Dashbo
|
|
|
48
48
|
*
|
|
49
49
|
* @alpha
|
|
50
50
|
*/
|
|
51
|
-
export declare const selectParameterRuntimeOverrideByRef: (ref: ObjRef) => DashboardSelector<
|
|
51
|
+
export declare const selectParameterRuntimeOverrideByRef: (ref: ObjRef) => DashboardSelector<ParameterValue | undefined>;
|
|
52
52
|
/**
|
|
53
53
|
* Reset value for a parameter chip's dropdown, bound to the kit dropdown's `resetValue` prop.
|
|
54
54
|
*
|
|
@@ -57,7 +57,7 @@ export declare const selectParameterRuntimeOverrideByRef: (ref: ObjRef) => Dashb
|
|
|
57
57
|
*
|
|
58
58
|
* @alpha
|
|
59
59
|
*/
|
|
60
|
-
export declare const selectParameterResetValueByRef: (ref: ObjRef) => DashboardSelector<
|
|
60
|
+
export declare const selectParameterResetValueByRef: (ref: ObjRef) => DashboardSelector<ParameterValue | undefined>;
|
|
61
61
|
/**
|
|
62
62
|
* Computes the dashboard parameters keyed by tab `localIdentifier` in the shape that would be
|
|
63
63
|
* persisted on save right now.
|
|
@@ -88,7 +88,7 @@ export declare const selectIsParametersChanged: DashboardSelector<boolean>;
|
|
|
88
88
|
*/
|
|
89
89
|
export declare const selectActiveTabParameterResetTargets: DashboardSelector<{
|
|
90
90
|
ref: ObjRef;
|
|
91
|
-
value:
|
|
91
|
+
value: ParameterValue | undefined;
|
|
92
92
|
}[]>;
|
|
93
93
|
/**
|
|
94
94
|
* True when the active tab has at least one parameter whose `runtimeOverride` differs from
|
|
@@ -116,6 +116,7 @@ interface IWidgetParameterContext {
|
|
|
116
116
|
measureParameters: Record<string, IdentifierRef[]>;
|
|
117
117
|
workspaceParameterByRef: Map<string, IParameterMetadataObject>;
|
|
118
118
|
widgetInsightRef: ObjRef;
|
|
119
|
+
isStringEnabled: boolean;
|
|
119
120
|
}
|
|
120
121
|
/**
|
|
121
122
|
* Owning-tab parameter entries and the metric → parameter map for a widget, keyed by ref.
|
|
@@ -141,6 +142,16 @@ export declare const selectWidgetParameterContext: (ref: ObjRef | undefined) =>
|
|
|
141
142
|
* @alpha
|
|
142
143
|
*/
|
|
143
144
|
export declare const selectEffectiveParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector<IInsightParameterValue[]>;
|
|
145
|
+
/**
|
|
146
|
+
* {@link selectEffectiveParameterValuesForWidget} minus string values, for seeding an alert's
|
|
147
|
+
* stored execution parameters. Same rationale as
|
|
148
|
+
* {@link selectAutomationExportEffectiveParameters}: the automation dialogs are NUMBER-only until
|
|
149
|
+
* the interactions slice, and a stored string value would be invisible there and deleted by any
|
|
150
|
+
* edit.
|
|
151
|
+
*
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
export declare const selectAutomationParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector<IInsightParameterValue[]>;
|
|
144
155
|
/**
|
|
145
156
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
146
157
|
* the metric-referenced refs, flag-gated and ref-filtered, with no dashboard chip overrides.
|
|
@@ -183,6 +194,16 @@ export declare const selectEffectiveDashboardParametersForWidget: (ref: ObjRef |
|
|
|
183
194
|
* @alpha
|
|
184
195
|
*/
|
|
185
196
|
export declare const selectExportEffectiveParameters: (widgetIds: string[] | undefined) => DashboardSelector<Record<string, IDashboardExportParameter[]>>;
|
|
197
|
+
/**
|
|
198
|
+
* {@link selectExportEffectiveParameters} minus STRING entries, for the wire persisted onto
|
|
199
|
+
* automations. The automation dialogs and restore paths decode NUMBER-only until the interactions
|
|
200
|
+
* slice (F1-2636…F1-2641): a stored STRING row would drive the headless render while being
|
|
201
|
+
* invisible in the dialog, and any edit re-encodes the wire without it — so it must not be
|
|
202
|
+
* persisted at all, regardless of `enableStringParameters`.
|
|
203
|
+
*
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
export declare const selectAutomationExportEffectiveParameters: (widgetIds: string[] | undefined) => DashboardSelector<Record<string, IDashboardExportParameter[]>>;
|
|
186
207
|
/**
|
|
187
208
|
* Active-tab slice of {@link selectExportEffectiveParameters}.
|
|
188
209
|
*
|
|
@@ -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,
|
|
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,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EF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+CAA+C,EAAE,CAC1D,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,sBAAsB,EAAE,CAa9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,mBAAmB,EAAE,CAe3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,+BAA+B,EAAE,CAC1C,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,KAC9B,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAGL,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,yCAAyC,EAAE,CACpD,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,KAC9B,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAGJ,CAAC;AA8D/D;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAI1F,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { createSelector } from "@reduxjs/toolkit";
|
|
3
3
|
import { isEqual } from "lodash-es";
|
|
4
|
-
import { areObjRefsEqual,
|
|
4
|
+
import { areObjRefsEqual, objRefToString, } from "@gooddata/sdk-model";
|
|
5
|
+
import { isAutomationSupportedParameterValue } from "../../../../_staging/automation/index.js";
|
|
5
6
|
import { createMemoizedSelector } from "../../_infra/selectors.js";
|
|
6
7
|
import { selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, selectCatalogParameterByRef, selectCatalogParameters, selectCatalogParametersIsLoaded, } from "../../catalog/catalogSelectors.js";
|
|
7
|
-
import { selectEnableParameters } from "../../config/configSelectors.js";
|
|
8
|
+
import { selectEnableParameters, selectEnableStringParameters } from "../../config/configSelectors.js";
|
|
8
9
|
import { selectInsightsMap } from "../../insights/insightsSelectors.js";
|
|
9
10
|
import { selectIsInEditMode } from "../../renderMode/renderModeSelectors.js";
|
|
10
11
|
import { selectAllTabsInsightWidgetContexts } from "../layout/layoutSelectors.js";
|
|
11
12
|
import { selectActiveOrDefaultTabLocalIdentifier, selectActiveTab, selectTabs } from "../tabsSelectors.js";
|
|
12
13
|
import { DEFAULT_TAB_ID } from "../tabsState.js";
|
|
13
|
-
import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyRuntimeOverride, buildPersistedByTabAndRef, buildWidgetScopeTabRefSelections, buildWorkspaceParametersByRef, classifyParameterReconciliation, collectExportOverrides, collectParameterReconciliations, collectReferencedParameterRefs, computeParameterResetTargets, computeParameterResetValue, resolveEffectiveParameterValuesForRefs, smartPersistResolvedEntry, } from "./parametersHelpers.js";
|
|
14
|
+
import { EMPTY_EXPORT_PARAMETERS_BY_TAB, applyRuntimeOverride, buildPersistedByTabAndRef, buildWidgetScopeTabRefSelections, buildWorkspaceParametersByRef, classifyParameterReconciliation, collectExportOverrides, collectParameterReconciliations, collectReferencedParameterRefs, computeParameterResetTargets, computeParameterResetValue, isGatedStringEntry, resolveEffectiveParameterValuesForRefs, smartPersistResolvedEntry, ungatedInsightParameterValues, } from "./parametersHelpers.js";
|
|
14
15
|
import { parametersInitialState, pickTabParametersSource, } from "./parametersState.js";
|
|
15
16
|
const EMPTY_PARAMETERS = [];
|
|
16
17
|
const EMPTY_EXPORT_PARAMETERS = [];
|
|
@@ -49,11 +50,12 @@ export const selectDashboardParameterEntries = createSelector(selectParametersSt
|
|
|
49
50
|
*
|
|
50
51
|
* @internal
|
|
51
52
|
*/
|
|
52
|
-
export const selectFilterViewParameters = createSelector(selectDashboardParameterEntries, (entries) => {
|
|
53
|
-
|
|
53
|
+
export const selectFilterViewParameters = createSelector(selectDashboardParameterEntries, selectEnableStringParameters, (entries, isStringEnabled) => {
|
|
54
|
+
const persistable = entries.filter((item) => !isGatedStringEntry(item, isStringEnabled));
|
|
55
|
+
if (persistable.length === 0) {
|
|
54
56
|
return undefined;
|
|
55
57
|
}
|
|
56
|
-
return
|
|
58
|
+
return persistable.map(applyRuntimeOverride);
|
|
57
59
|
});
|
|
58
60
|
/**
|
|
59
61
|
* Runtime parameter values from the active tab, to hand off on a drill. Values equal to the source's
|
|
@@ -61,10 +63,10 @@ export const selectFilterViewParameters = createSelector(selectDashboardParamete
|
|
|
61
63
|
*
|
|
62
64
|
* @internal
|
|
63
65
|
*/
|
|
64
|
-
export const selectActiveTabDrillParameters = createSelector(selectDashboardParameterEntries, (entries) => {
|
|
66
|
+
export const selectActiveTabDrillParameters = createSelector(selectDashboardParameterEntries, selectEnableStringParameters, (entries, isStringEnabled) => {
|
|
65
67
|
const result = [];
|
|
66
68
|
for (const entry of entries) {
|
|
67
|
-
if (entry.runtimeOverride === undefined) {
|
|
69
|
+
if (entry.runtimeOverride === undefined || isGatedStringEntry(entry, isStringEnabled)) {
|
|
68
70
|
continue;
|
|
69
71
|
}
|
|
70
72
|
result.push({ ref: entry.parameter.ref, value: entry.runtimeOverride });
|
|
@@ -199,11 +201,13 @@ export const selectHasAnyResettableParameterOnActiveTab = createSelector(selectA
|
|
|
199
201
|
*
|
|
200
202
|
* @internal
|
|
201
203
|
*/
|
|
202
|
-
export const selectParameterReconciliations = createSelector(selectTabs, selectCatalogParameters, selectCatalogParametersIsLoaded, selectEnableParameters, (tabs, workspaceParameters, isCatalogLoaded, isEnabled) => {
|
|
204
|
+
export const selectParameterReconciliations = createSelector(selectTabs, selectCatalogParameters, selectCatalogParametersIsLoaded, selectEnableParameters, selectEnableStringParameters, (tabs, workspaceParameters, isCatalogLoaded, isEnabled, isStringEnabled) => {
|
|
203
205
|
if (!isEnabled || !isCatalogLoaded || !tabs) {
|
|
204
206
|
return EMPTY_RECONCILIATIONS;
|
|
205
207
|
}
|
|
206
|
-
const entries = tabs
|
|
208
|
+
const entries = tabs
|
|
209
|
+
.flatMap((tab) => tab.parameters?.parameters ?? [])
|
|
210
|
+
.filter((entry) => !isGatedStringEntry(entry, isStringEnabled));
|
|
207
211
|
const result = collectParameterReconciliations(entries, workspaceParameters);
|
|
208
212
|
return result.length === 0 ? EMPTY_RECONCILIATIONS : result;
|
|
209
213
|
});
|
|
@@ -213,8 +217,8 @@ export const selectParameterReconciliations = createSelector(selectTabs, selectC
|
|
|
213
217
|
*
|
|
214
218
|
* @internal
|
|
215
219
|
*/
|
|
216
|
-
export const selectParameterReconciliationByRef = createMemoizedSelector((ref) => createSelector(selectDashboardParameterEntryByRef(ref), selectCatalogParameterByRef(ref), selectCatalogParametersIsLoaded, selectEnableParameters, (entry, workspaceParameter, isCatalogLoaded, isEnabled) => {
|
|
217
|
-
if (!isEnabled || !isCatalogLoaded || !entry) {
|
|
220
|
+
export const selectParameterReconciliationByRef = createMemoizedSelector((ref) => createSelector(selectDashboardParameterEntryByRef(ref), selectCatalogParameterByRef(ref), selectCatalogParametersIsLoaded, selectEnableParameters, selectEnableStringParameters, (entry, workspaceParameter, isCatalogLoaded, isEnabled, isStringEnabled) => {
|
|
221
|
+
if (!isEnabled || !isCatalogLoaded || !entry || isGatedStringEntry(entry, isStringEnabled)) {
|
|
218
222
|
return undefined;
|
|
219
223
|
}
|
|
220
224
|
return classifyParameterReconciliation(applyRuntimeOverride(entry), workspaceParameter);
|
|
@@ -224,7 +228,7 @@ export const selectParameterReconciliationByRef = createMemoizedSelector((ref) =
|
|
|
224
228
|
*
|
|
225
229
|
* @internal
|
|
226
230
|
*/
|
|
227
|
-
export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, selectWorkspaceParametersByRef, (contexts, isEnabled, measureParameters, measureParametersStatus, workspaceParameterByRef) => {
|
|
231
|
+
export const selectWidgetParameterContext = createMemoizedSelector((ref) => createSelector(selectAllTabsInsightWidgetContexts, selectEnableParameters, selectEnableStringParameters, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, selectWorkspaceParametersByRef, (contexts, isEnabled, isStringEnabled, measureParameters, measureParametersStatus, workspaceParameterByRef) => {
|
|
228
232
|
if (!isEnabled || !ref || measureParametersStatus !== "loaded") {
|
|
229
233
|
return undefined;
|
|
230
234
|
}
|
|
@@ -232,12 +236,13 @@ export const selectWidgetParameterContext = createMemoizedSelector((ref) => crea
|
|
|
232
236
|
if (!context) {
|
|
233
237
|
return undefined;
|
|
234
238
|
}
|
|
235
|
-
const entries = context.tab.parameters?.parameters ?? parametersInitialState.parameters;
|
|
239
|
+
const entries = (context.tab.parameters?.parameters ?? parametersInitialState.parameters).filter((entry) => !isGatedStringEntry(entry, isStringEnabled));
|
|
236
240
|
return {
|
|
237
241
|
entries,
|
|
238
242
|
measureParameters,
|
|
239
243
|
workspaceParameterByRef,
|
|
240
244
|
widgetInsightRef: context.widget.insight,
|
|
245
|
+
isStringEnabled,
|
|
241
246
|
};
|
|
242
247
|
}));
|
|
243
248
|
// Adds the widget's *own* insight and referenced refs for the ref-based selectors below (alerting and
|
|
@@ -246,13 +251,14 @@ const selectWidgetInsightAndReferencedRefs = createMemoizedSelector((ref) => cre
|
|
|
246
251
|
if (!resolved) {
|
|
247
252
|
return undefined;
|
|
248
253
|
}
|
|
249
|
-
const { entries, measureParameters, workspaceParameterByRef, widgetInsightRef } = resolved;
|
|
254
|
+
const { entries, measureParameters, workspaceParameterByRef, widgetInsightRef, isStringEnabled } = resolved;
|
|
250
255
|
const insight = insights.get(widgetInsightRef);
|
|
251
256
|
if (!insight) {
|
|
252
257
|
return undefined;
|
|
253
258
|
}
|
|
254
259
|
const referencedRefs = collectReferencedParameterRefs(insight, measureParameters);
|
|
255
|
-
|
|
260
|
+
const insightParameterValues = ungatedInsightParameterValues(insight, isStringEnabled);
|
|
261
|
+
return { insightParameterValues, referencedRefs, entries, workspaceParameterByRef };
|
|
256
262
|
}));
|
|
257
263
|
/**
|
|
258
264
|
* Returns the parameter values to inject into the widget's `IExecutionConfig.parameterValues`.
|
|
@@ -275,8 +281,21 @@ export const selectEffectiveParameterValuesForWidget = createMemoizedSelector((r
|
|
|
275
281
|
if (!resolved) {
|
|
276
282
|
return EMPTY_PARAMETER_VALUES;
|
|
277
283
|
}
|
|
278
|
-
const {
|
|
279
|
-
return resolveEffectiveParameterValuesForRefs(entries, referencedRefs,
|
|
284
|
+
const { insightParameterValues, referencedRefs, entries, workspaceParameterByRef } = resolved;
|
|
285
|
+
return resolveEffectiveParameterValuesForRefs(entries, referencedRefs, insightParameterValues, workspaceParameterByRef);
|
|
286
|
+
}));
|
|
287
|
+
/**
|
|
288
|
+
* {@link selectEffectiveParameterValuesForWidget} minus string values, for seeding an alert's
|
|
289
|
+
* stored execution parameters. Same rationale as
|
|
290
|
+
* {@link selectAutomationExportEffectiveParameters}: the automation dialogs are NUMBER-only until
|
|
291
|
+
* the interactions slice, and a stored string value would be invisible there and deleted by any
|
|
292
|
+
* edit.
|
|
293
|
+
*
|
|
294
|
+
* @internal
|
|
295
|
+
*/
|
|
296
|
+
export const selectAutomationParameterValuesForWidget = createMemoizedSelector((ref) => createSelector(selectEffectiveParameterValuesForWidget(ref), (values) => {
|
|
297
|
+
const supportedValues = values.filter((row) => isAutomationSupportedParameterValue(row.value));
|
|
298
|
+
return supportedValues.length === 0 ? EMPTY_PARAMETER_VALUES : supportedValues;
|
|
280
299
|
}));
|
|
281
300
|
/**
|
|
282
301
|
* The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for
|
|
@@ -293,8 +312,8 @@ export const selectReferencedInsightParameterValuesForWidget = createMemoizedSel
|
|
|
293
312
|
if (!resolved) {
|
|
294
313
|
return EMPTY_PARAMETER_VALUES;
|
|
295
314
|
}
|
|
296
|
-
const {
|
|
297
|
-
return resolveEffectiveParameterValuesForRefs([], referencedRefs,
|
|
315
|
+
const { insightParameterValues, referencedRefs, workspaceParameterByRef } = resolved;
|
|
316
|
+
return resolveEffectiveParameterValuesForRefs([], referencedRefs, insightParameterValues, workspaceParameterByRef);
|
|
298
317
|
}));
|
|
299
318
|
/**
|
|
300
319
|
* Returns the effective dashboard parameters (persisted shape with any `runtimeOverride` folded
|
|
@@ -335,24 +354,36 @@ export const selectEffectiveDashboardParametersForWidget = createMemoizedSelecto
|
|
|
335
354
|
* @alpha
|
|
336
355
|
*/
|
|
337
356
|
export const selectExportEffectiveParameters = (widgetIds) => widgetIds?.length
|
|
338
|
-
? selectExportEffectiveParametersForWidgets(widgetIds)
|
|
339
|
-
: selectExportEffectiveParametersDashboardScope;
|
|
340
|
-
|
|
357
|
+
? selectExportEffectiveParametersForWidgets(widgetIds, true)
|
|
358
|
+
: selectExportEffectiveParametersDashboardScope(true);
|
|
359
|
+
/**
|
|
360
|
+
* {@link selectExportEffectiveParameters} minus STRING entries, for the wire persisted onto
|
|
361
|
+
* automations. The automation dialogs and restore paths decode NUMBER-only until the interactions
|
|
362
|
+
* slice (F1-2636…F1-2641): a stored STRING row would drive the headless render while being
|
|
363
|
+
* invisible in the dialog, and any edit re-encodes the wire without it — so it must not be
|
|
364
|
+
* persisted at all, regardless of `enableStringParameters`.
|
|
365
|
+
*
|
|
366
|
+
* @internal
|
|
367
|
+
*/
|
|
368
|
+
export const selectAutomationExportEffectiveParameters = (widgetIds) => widgetIds?.length
|
|
369
|
+
? selectExportEffectiveParametersForWidgets(widgetIds, false)
|
|
370
|
+
: selectExportEffectiveParametersDashboardScope(false);
|
|
371
|
+
const selectExportEffectiveParametersDashboardScope = createMemoizedSelector((includeStringOverrides) => createSelector(selectTabs, selectEnableParameters, selectEnableStringParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, (tabs, isEnabled, isStringEnabled, workspaceParameterByRef, isCatalogLoaded) => {
|
|
341
372
|
if (!isEnabled || !isCatalogLoaded || !tabs?.length) {
|
|
342
373
|
return EMPTY_EXPORT_PARAMETERS_BY_TAB;
|
|
343
374
|
}
|
|
344
|
-
return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceParameterByRef);
|
|
345
|
-
});
|
|
346
|
-
const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds) => createSelector(selectAllTabsInsightWidgetContexts, selectInsightsMap, selectEnableParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (widgetContexts, insights, isEnabled, workspaceParameterByRef, isCatalogLoaded, measureParameters, measureParametersStatus) => {
|
|
375
|
+
return collectExportOverrides(tabs.map((tab) => ({ tab })), workspaceParameterByRef, isStringEnabled && includeStringOverrides);
|
|
376
|
+
}));
|
|
377
|
+
const selectExportEffectiveParametersForWidgets = createMemoizedSelector((widgetIds, includeStringOverrides) => createSelector(selectAllTabsInsightWidgetContexts, selectInsightsMap, selectEnableParameters, selectEnableStringParameters, selectWorkspaceParametersByRef, selectCatalogParametersIsLoaded, selectCatalogMeasureParameters, selectCatalogMeasureParametersStatus, (widgetContexts, insights, isEnabled, isStringEnabled, workspaceParameterByRef, isCatalogLoaded, measureParameters, measureParametersStatus) => {
|
|
347
378
|
if (!isEnabled || !isCatalogLoaded || measureParametersStatus !== "loaded") {
|
|
348
379
|
return EMPTY_EXPORT_PARAMETERS_BY_TAB;
|
|
349
380
|
}
|
|
350
381
|
const tabRefSelections = buildWidgetScopeTabRefSelections(widgetContexts, widgetIds, insights, measureParameters);
|
|
351
|
-
return collectExportOverrides(tabRefSelections, workspaceParameterByRef);
|
|
382
|
+
return collectExportOverrides(tabRefSelections, workspaceParameterByRef, isStringEnabled && includeStringOverrides);
|
|
352
383
|
}));
|
|
353
384
|
/**
|
|
354
385
|
* Active-tab slice of {@link selectExportEffectiveParameters}.
|
|
355
386
|
*
|
|
356
387
|
* @internal
|
|
357
388
|
*/
|
|
358
|
-
export const selectActiveTabExportParameters = createSelector(selectExportEffectiveParametersDashboardScope, selectActiveOrDefaultTabLocalIdentifier, (parametersByTab, activeTabId) => parametersByTab[activeTabId] ?? EMPTY_EXPORT_PARAMETERS);
|
|
389
|
+
export const selectActiveTabExportParameters = createSelector(selectExportEffectiveParametersDashboardScope(true), selectActiveOrDefaultTabLocalIdentifier, (parametersByTab, activeTabId) => parametersByTab[activeTabId] ?? EMPTY_EXPORT_PARAMETERS);
|