@gooddata/sdk-ui-dashboard 11.47.0-alpha.2 → 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/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/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 -0
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +8 -0
- 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 -5
- 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 -5
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +0 -5
- 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 -5
- package/esm/sdk-ui-dashboard.d.ts +5 -4
- package/package.json +21 -21
- package/styles/css/dashboard.css +7 -0
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/main.css +12 -1
- 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/notifications_channels_dialog.scss +9 -0
- package/styles/scss/pdfExportDialog.scss +7 -2
|
@@ -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":"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"}
|
|
@@ -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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IDashboardParameter, type IDashboardTab } from "@gooddata/sdk-model";
|
|
1
|
+
import { type IDashboardParameter, type IDashboardTab, type ParameterValue } from "@gooddata/sdk-model";
|
|
2
2
|
/**
|
|
3
3
|
* Per-parameter state tracked by the dashboard store.
|
|
4
4
|
*
|
|
@@ -17,7 +17,7 @@ export interface IDashboardParameterEntry {
|
|
|
17
17
|
* off, failed, or missing for the ref). Such entries are skipped when building widget
|
|
18
18
|
* execution overrides so the backend keeps using the parameter's own default.
|
|
19
19
|
*/
|
|
20
|
-
runtimeOverride:
|
|
20
|
+
runtimeOverride: ParameterValue | undefined;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametersState.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"parametersState.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/parameters/parametersState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAExG;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;;OAKG;IACH,eAAe,EAAE,cAAc,GAAG,SAAS,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,wBAAwB,EAAE,CAAC;CAC1C;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAEpC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACnC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,EACrC,cAAc,EAAE,mBAAmB,EAAE,GAAG,SAAS,GAClD,mBAAmB,EAAE,GAAG,SAAS,CAMnC"}
|
|
@@ -7,7 +7,7 @@ import { selectExecutionResultEntities } from "../../../../model/store/execution
|
|
|
7
7
|
import { selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectDashboardHiddenFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
|
|
8
8
|
import { selectDashboardId, selectEvaluationFrequency } from "../../../../model/store/meta/metaSelectors.js";
|
|
9
9
|
import { selectWidgetLocalIdToTabIdMap } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
10
|
-
import {
|
|
10
|
+
import { selectAutomationParameterValuesForWidget } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
11
11
|
import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
|
|
12
12
|
import { useCommandAsPromise, useDeleteAutomation } from "./useCommandAsPromise.js";
|
|
13
13
|
export function useBuildAlertingDialogContext(opts) {
|
|
@@ -19,7 +19,7 @@ export function useBuildAlertingDialogContext(opts) {
|
|
|
19
19
|
const executionResultEntities = useDashboardSelector(selectExecutionResultEntities);
|
|
20
20
|
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
21
21
|
const dashboardEvaluationFrequency = useDashboardSelector(selectEvaluationFrequency);
|
|
22
|
-
const parameterValues = useDashboardSelector(
|
|
22
|
+
const parameterValues = useDashboardSelector(selectAutomationParameterValuesForWidget(widget?.ref));
|
|
23
23
|
const widgetTitle = useMemo(() => {
|
|
24
24
|
if (widget) {
|
|
25
25
|
return getWidgetTitle(widget);
|
|
@@ -43,7 +43,7 @@ vi.mock("../../../../model/store/tabs/layout/layoutSelectors.js", () => ({
|
|
|
43
43
|
selectWidgetLocalIdToTabIdMap: () => ({}),
|
|
44
44
|
}));
|
|
45
45
|
vi.mock("../../../../model/store/tabs/parameters/parametersSelectors.js", () => ({
|
|
46
|
-
|
|
46
|
+
selectAutomationParameterValuesForWidget: () => () => [],
|
|
47
47
|
}));
|
|
48
48
|
vi.mock("../../../../model/utils/dashboardItemUtils.js", () => ({
|
|
49
49
|
getWidgetTitle: () => "widget title",
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js
CHANGED
|
@@ -12,7 +12,7 @@ import { selectEffectiveAttributeFiltersModeMap } from "../../../../model/store/
|
|
|
12
12
|
import { selectEffectiveDateFilterMode } from "../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
|
|
13
13
|
import { selectEffectiveDateFiltersModeMap } from "../../../../model/store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
|
|
14
14
|
import { selectWidgetLocalIdToTabIdMap } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
15
|
-
import {
|
|
15
|
+
import { selectAutomationExportEffectiveParameters } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
16
16
|
import { selectTabs } from "../../../../model/store/tabs/tabsSelectors.js";
|
|
17
17
|
import { getWidgetTitle } from "../../../../model/utils/dashboardItemUtils.js";
|
|
18
18
|
import { useCommandAsPromise, useDeleteAutomation } from "./useCommandAsPromise.js";
|
|
@@ -24,7 +24,7 @@ export function useBuildScheduledEmailDialogContext(opts) {
|
|
|
24
24
|
const dashboardTitle = useDashboardSelector(selectDashboardTitle);
|
|
25
25
|
const widgetLocalIdToTabIdMap = useDashboardSelector(selectWidgetLocalIdToTabIdMap);
|
|
26
26
|
const commonDateFilterId = useDashboardSelector(selectAutomationCommonDateFilterId);
|
|
27
|
-
const exportParametersByTab = useDashboardSelector(
|
|
27
|
+
const exportParametersByTab = useDashboardSelector(selectAutomationExportEffectiveParameters(widget ? [objRefToString(widget.ref)] : undefined));
|
|
28
28
|
const exportTemplates = useExportTemplates();
|
|
29
29
|
const dateFormat = useDashboardSelector(selectDateFormat);
|
|
30
30
|
const isCrossFiltering = useDashboardSelector(selectIsCrossFiltering);
|
package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js
CHANGED
|
@@ -60,7 +60,7 @@ vi.mock("../../../../model/store/tabs/tabsSelectors.js", () => ({
|
|
|
60
60
|
selectTabs: () => [],
|
|
61
61
|
}));
|
|
62
62
|
vi.mock("../../../../model/store/tabs/parameters/parametersSelectors.js", () => ({
|
|
63
|
-
|
|
63
|
+
selectAutomationExportEffectiveParameters: () => () => ({}),
|
|
64
64
|
}));
|
|
65
65
|
vi.mock("../../../../model/react/useExportTemplates.js", () => ({
|
|
66
66
|
useExportTemplates: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentSettings.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,4CAA4C,EAIpD,MAAM,qBAAqB,CAAC;AAkC7B,KAAK,WAAW,GAAG,WAAW,CAAC,4CAA4C,CAAC,UAAU,CAAC,CAAC,CAAC;AAIzF,KAAK,uBAAuB,GAAG,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,SAAS,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,4CAA4C,CAAC;IACvD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACnF,kBAAkB,CAAC,EAAE,WAAW,CAAC;CACpC;AA6BD,wBAAgB,kBAAkB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EACrB,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"AttachmentSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentSettings.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,4CAA4C,EAIpD,MAAM,qBAAqB,CAAC;AAkC7B,KAAK,WAAW,GAAG,WAAW,CAAC,4CAA4C,CAAC,UAAU,CAAC,CAAC,CAAC;AAIzF,KAAK,uBAAuB,GAAG,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,SAAS,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,4CAA4C,CAAC;IACvD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,IAAI,CAAC;IACnF,kBAAkB,CAAC,EAAE,WAAW,CAAC;CACpC;AA6BD,wBAAgB,kBAAkB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EACrB,EAAE,wBAAwB,2CA2W1B"}
|
|
@@ -52,7 +52,9 @@ export function AttachmentSettings({ type, settings, onSettingsChange, defaultPd
|
|
|
52
52
|
const [pageSize, setPageSize] = useState(resolvedDefaultPageSize);
|
|
53
53
|
const [pageOrientation, setPageOrientation] = useState(legacyPageOrientation ?? DEFAULT_PDF_PAGE_ORIENTATION);
|
|
54
54
|
const [csvDelimiterValue, setCsvDelimiterValue] = useState(resolvedCsvState);
|
|
55
|
+
const pageSizeDropdownButtonId = useId();
|
|
55
56
|
const pageSizeMenuId = useId();
|
|
57
|
+
const orientationDropdownButtonId = useId();
|
|
56
58
|
const orientationMenuId = useId();
|
|
57
59
|
const settingsLabel = isPdfTabular
|
|
58
60
|
? intl.formatMessage({ id: "dialogs.export.pdf.headline" })
|
|
@@ -140,12 +142,9 @@ export function AttachmentSettings({ type, settings, onSettingsChange, defaultPd
|
|
|
140
142
|
ariaLabel: intl.formatMessage({ id: "close" }),
|
|
141
143
|
ariaDescribedBy: AUTOMATION_ATTACHMENT_SETTINGS_DIALOG_TITLE_ID,
|
|
142
144
|
} }) }), _jsx("div", { className: "gd-attachment-settings-dropdown-content", children: isPdfTabular ? (_jsxs(_Fragment, { children: [
|
|
143
|
-
_jsxs("div", { className: "gd-pdf-export-dialog-item", children: [
|
|
144
|
-
_jsx("
|
|
145
|
+
_jsxs("div", { className: "gd-input gd-pdf-export-dialog-item", children: [
|
|
146
|
+
_jsx("label", { className: "gd-label", htmlFor: pageSizeDropdownButtonId, children: _jsx(FormattedMessage, { id: "dialogs.export.pdf.pageSize" }) }), _jsx(Dropdown, { fullscreenOnMobile: false, renderButton: ({ isOpen, toggleDropdown }) => (_jsx(DropdownButton, { id: pageSizeDropdownButtonId, value: pageSizeMenuItems.find((item) => item.data === pageSize)
|
|
145
147
|
?.stringTitle, isOpen: isOpen, onClick: toggleDropdown, accessibilityConfig: {
|
|
146
|
-
ariaLabel: intl.formatMessage({
|
|
147
|
-
id: "dialogs.export.pdf.pageSize",
|
|
148
|
-
}),
|
|
149
148
|
ariaHaspopup: "true",
|
|
150
149
|
ariaExpanded: isOpen,
|
|
151
150
|
...(isOpen
|
|
@@ -163,11 +162,8 @@ export function AttachmentSettings({ type, settings, onSettingsChange, defaultPd
|
|
|
163
162
|
id: "dialogs.export.pdf.pageSize",
|
|
164
163
|
}),
|
|
165
164
|
id: `pdf-page-size-menu-${pageSizeMenuId}`,
|
|
166
|
-
}, maxWidth: 150 })), autofocusOnOpen: true })] }), _jsxs("div", { className: "gd-pdf-export-dialog-item", children: [
|
|
167
|
-
_jsx("
|
|
168
|
-
ariaLabel: intl.formatMessage({
|
|
169
|
-
id: "dialogs.export.pdf.pageOrientation",
|
|
170
|
-
}),
|
|
165
|
+
}, maxWidth: 150 })), autofocusOnOpen: true })] }), _jsxs("div", { className: "gd-input gd-pdf-export-dialog-item", children: [
|
|
166
|
+
_jsx("label", { className: "gd-label", htmlFor: orientationDropdownButtonId, children: _jsx(FormattedMessage, { id: "dialogs.export.pdf.pageOrientation" }) }), _jsx(Dropdown, { fullscreenOnMobile: false, renderButton: ({ isOpen, toggleDropdown }) => (_jsx(DropdownButton, { id: orientationDropdownButtonId, value: orientationMenuItems.find((item) => item.data === pageOrientation)?.stringTitle, isOpen: isOpen, onClick: toggleDropdown, accessibilityConfig: {
|
|
171
167
|
ariaHaspopup: "true",
|
|
172
168
|
ariaExpanded: isOpen,
|
|
173
169
|
...(isOpen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automationParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/automationParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAE3B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAIrB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"automationParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/automationParameters.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAE3B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAIrB,MAAM,qBAAqB,CAAC;AAO7B;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,CAAC,EAAE,2BAA2B,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACrD,MAAM,EAAE,sBAAsB,EAAE,EAChC,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,OAAO,EAAE,wBAAwB,EAAE,GACpC,oBAAoB,EAAE,CAqBxB;AAED;;;;;;;GAOG;AACH,wBAAgB,mDAAmD,CAC/D,MAAM,EAAE,yBAAyB,EAAE,EACnC,mBAAmB,EAAE,mBAAmB,EAAE,EAC1C,OAAO,EAAE,wBAAwB,EAAE,GACpC,oBAAoB,EAAE,CAMxB;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CACzC,OAAO,EAAE,wBAAwB,EAAE,EACnC,QAAQ,EAAE,oBAAoB,EAAE,EAChC,mBAAmB,GAAE,mBAAmB,EAAO,EAC/C,qBAAqB,GAAE,sBAAsB,EAAO,GACrD,oBAAoB,EAAE,CAsCxB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,UAAU,EAAE,mCAAmC,EAC/C,UAAU,EAAE,sBAAsB,EAAE,GACrC,mCAAmC,CAcrC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAC5C,OAAO,EAAE,wBAAwB,EAAE,GACpC,OAAO,CAMT;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,sBAAsB,EAAE,EAChC,OAAO,EAAE,wBAAwB,EAAE,GACpC,sBAAsB,EAAE,CAG1B;AAED;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAClD,UAAU,EAAE,oBAAoB,EAAE,GACnC,yBAAyB,EAAE,CAM7B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,EACvD,WAAW,EAAE,OAAO,GACrB,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,CASzD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,OAAO,EAAE,YAAY,UAAQ,GAAG,OAAO,CAEpG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { DashboardParameterModeValues, isIdentifierRef, isNumberParameterDefinition, objRefToString, } from "@gooddata/sdk-model";
|
|
3
|
-
import { exportParametersToValues } from "../../../../_staging/automation/index.js";
|
|
3
|
+
import { exportParametersToValues, isAutomationSupportedParameterValue, } from "../../../../_staging/automation/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Stored {@link IInsightParameterValue} overrides carry only {ref, value}; title, mode and
|
|
6
6
|
* constraints are re-derived from the current dashboard and workspace catalog.
|
|
@@ -10,7 +10,10 @@ import { exportParametersToValues } from "../../../../_staging/automation/index.
|
|
|
10
10
|
export function reconstructAutomationParametersFromValues(stored, dashboardParameters, catalog) {
|
|
11
11
|
const dashboardByRef = new Map(dashboardParameters.map((parameter) => [objRefToString(parameter.ref), parameter]));
|
|
12
12
|
const workspaceByRef = new Map(catalog.map((parameter) => [objRefToString(parameter.ref), parameter]));
|
|
13
|
-
return stored.
|
|
13
|
+
return stored.flatMap((row) => {
|
|
14
|
+
if (!isAutomationSupportedParameterValue(row.value)) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
14
17
|
const refKey = objRefToString(row.ref);
|
|
15
18
|
const dashboardParameter = dashboardByRef.get(refKey);
|
|
16
19
|
const workspaceParameter = workspaceByRef.get(refKey);
|
|
@@ -63,11 +66,12 @@ export function availableAutomationParameters(catalog, selected, dashboardParame
|
|
|
63
66
|
continue;
|
|
64
67
|
}
|
|
65
68
|
const { defaultValue, constraints } = workspaceParameter.definition;
|
|
69
|
+
// mirror the live-render precedence: runtimeOverride/insight value > dashboard value > default
|
|
70
|
+
const effectiveValue = widgetValueByRef.get(refKey) ?? dashboardParameter?.value ?? defaultValue;
|
|
66
71
|
result.push({
|
|
67
72
|
ref,
|
|
68
73
|
title: dashboardParameter?.label ?? workspaceParameter.title,
|
|
69
|
-
|
|
70
|
-
value: widgetValueByRef.get(refKey) ?? dashboardParameter?.value ?? defaultValue,
|
|
74
|
+
value: isAutomationSupportedParameterValue(effectiveValue) ? effectiveValue : defaultValue,
|
|
71
75
|
mode: DashboardParameterModeValues.ACTIVE,
|
|
72
76
|
...(constraints ? { constraints } : {}),
|
|
73
77
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomationParameter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationParameter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,
|
|
1
|
+
{"version":3,"file":"AutomationParameter.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/components/AutomationParameter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAGH,KAAK,mBAAmB,EAK3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,oBAAoB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACb,EAAE,yBAAyB,GAAG,SAAS,CA0FvC"}
|
package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIntl } from "react-intl";
|
|
3
3
|
import { DashboardParameterModeValues } from "@gooddata/sdk-model";
|
|
4
|
-
import { Dropdown,
|
|
4
|
+
import { Dropdown, NumberParameterControlDropdown, UiChip, UiTooltip, isActionKey, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
5
5
|
/**
|
|
6
6
|
* Workspace parameter as an editable chip in automation dialogs.
|
|
7
7
|
*
|
|
@@ -33,7 +33,7 @@ export function AutomationParameter({ parameter, onChange, onDelete, overlayPosi
|
|
|
33
33
|
if (isActionKey(event)) {
|
|
34
34
|
event.stopPropagation();
|
|
35
35
|
}
|
|
36
|
-
} })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(
|
|
36
|
+
} })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(NumberParameterControlDropdown, { name: title, value: value, constraints: constraints, inputId: valueInputId, ariaAttributes: ariaAttributes, onApply: (next) => {
|
|
37
37
|
onChange?.(ref, next);
|
|
38
38
|
closeDropdown();
|
|
39
39
|
}, onCancel: closeDropdown })) }));
|
package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationExportParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationExportParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAG9B,KAAK,aAAa,EAGrB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EACH,KAAK,oBAAoB,EAK5B,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAChD,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CAC9F;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,8BAA8B;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C;;OAEG;IACH,wBAAwB,EAAE,qBAAqB,CAAC;IAChD;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,cAAc,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,iBAAiB,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACpE;;;OAGG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB;;;OAGG;IACH,uBAAuB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/D;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,iBAAiB,EACpB,EAAE,mCAAmC,GAAG,8BAA8B,
|
|
1
|
+
{"version":3,"file":"useAutomationExportParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/useAutomationExportParameters.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAG9B,KAAK,aAAa,EAGrB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EACH,KAAK,oBAAoB,EAK5B,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAChD,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CAC9F;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,8BAA8B;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C;;OAEG;IACH,wBAAwB,EAAE,qBAAqB,CAAC;IAChD;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,cAAc,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAE,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,iBAAiB,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACjE,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACpE;;;OAGG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB;;;OAGG;IACH,uBAAuB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/D;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,iBAAiB,EACpB,EAAE,mCAAmC,GAAG,8BAA8B,CAyLtE"}
|
package/esm/presentation/automations/shared/automationFilters/useAutomationExportParameters.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useDashboardSelector } from "../../../../model/react/DashboardStoreProv
|
|
|
7
7
|
import { selectCatalogParameters } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
8
8
|
import { selectEnableParameters } from "../../../../model/store/config/configSelectors.js";
|
|
9
9
|
import { selectWidgetLocalIdToTabIdMap } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
10
|
-
import {
|
|
10
|
+
import { selectAutomationExportEffectiveParameters, selectSmartPersistedTabsParameters, } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
11
11
|
import { selectTabs } from "../../../../model/store/tabs/tabsSelectors.js";
|
|
12
12
|
import { availableAutomationParameters, reconstructAutomationParametersFromExportParameters, shouldStoreExportParameters, toEffectiveParametersByTab, } from "./automationParameters.js";
|
|
13
13
|
/**
|
|
@@ -20,7 +20,7 @@ export function useAutomationExportParameters({ automationToEdit, widget, storeP
|
|
|
20
20
|
const tabs = useDashboardSelector(selectTabs);
|
|
21
21
|
const widgetTabMap = useDashboardSelector(selectWidgetLocalIdToTabIdMap);
|
|
22
22
|
const widgetIds = widget ? [objRefToString(widget.ref)] : undefined;
|
|
23
|
-
const effectiveParametersByTab = useDashboardSelector(
|
|
23
|
+
const effectiveParametersByTab = useDashboardSelector(selectAutomationExportEffectiveParameters(widgetIds));
|
|
24
24
|
const flatTabId = resolveFlatTabId(widget, widgetTabMap, tabs);
|
|
25
25
|
const shouldStore = shouldStoreExportParameters(!!widget, storeParameters);
|
|
26
26
|
const [editedParametersByTab, setEditedParametersByTab] = useState(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardParameterFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,
|
|
1
|
+
{"version":3,"file":"DashboardParameterFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAgC,KAAK,mBAAmB,EAAkB,MAAM,qBAAqB,CAAC;AAmB7G;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,SAAS,EAAE,mBAAmB,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE,8BAA8B,GAAG,YAAY,GAAG,IAAI,CA0E3G"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { defineMessages, useIntl } from "react-intl";
|
|
3
|
-
import { DashboardParameterModeValues,
|
|
4
|
-
import { Dropdown,
|
|
3
|
+
import { DashboardParameterModeValues, objRefToString } from "@gooddata/sdk-model";
|
|
4
|
+
import { Dropdown, ParameterControl, ParameterControlButton, useIdPrefixed } from "@gooddata/sdk-ui-kit";
|
|
5
5
|
import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
6
6
|
import { selectCatalogParameterByRef } from "../../../model/store/catalog/catalogSelectors.js";
|
|
7
7
|
import { selectIsInEditMode } from "../../../model/store/renderMode/renderModeSelectors.js";
|
|
8
8
|
import { tabsActions } from "../../../model/store/tabs/index.js";
|
|
9
|
+
import { matchingWorkspaceDefinition } from "../../../model/store/tabs/parameters/parametersHelpers.js";
|
|
9
10
|
import { selectParameterReconciliationByRef, selectParameterResetValueByRef, selectParameterRuntimeOverrideByRef, } from "../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
10
11
|
import { DraggableChipSource } from "../../dragAndDrop/DraggableChipSource.js";
|
|
11
12
|
const messages = defineMessages({
|
|
@@ -28,17 +29,17 @@ export function DashboardParameterFilter({ parameter }) {
|
|
|
28
29
|
if (parameter.mode === DashboardParameterModeValues.HIDDEN || runtimeOverride === undefined) {
|
|
29
30
|
return null;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
const definition = matchingWorkspaceDefinition(parameter, workspaceParameter);
|
|
33
|
+
if (!workspaceParameter || !definition) {
|
|
32
34
|
return null;
|
|
33
35
|
}
|
|
34
36
|
const name = parameter.label ?? workspaceParameter.title;
|
|
35
|
-
const { constraints } = workspaceParameter.definition;
|
|
36
37
|
const dragItem = { type: "parameter", ref: parameter.ref };
|
|
37
38
|
const warningTooltip = reconciliation === "reset" ? intl.formatMessage(messages.resetWarning) : undefined;
|
|
38
39
|
if (parameter.mode === DashboardParameterModeValues.READONLY) {
|
|
39
40
|
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: false, isDraggable: isInEditMode, warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` }) }));
|
|
40
41
|
}
|
|
41
|
-
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { autofocusOnOpen: true, initialFocus: valueInputId, closeOnEscape: true, renderButton: ({ isOpen, toggleDropdown, dropdownId }) => (_jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: isOpen, isDraggable: isInEditMode, dropdownId: dropdownId, onClick: () => toggleDropdown(), warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(
|
|
42
|
+
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { autofocusOnOpen: true, initialFocus: valueInputId, closeOnEscape: true, renderButton: ({ isOpen, toggleDropdown, dropdownId }) => (_jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: isOpen, isDraggable: isInEditMode, dropdownId: dropdownId, onClick: () => toggleDropdown(), warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(ParameterControl, { name: name, definition: definition, value: runtimeOverride, resetValue: resetValue, inputId: valueInputId, ariaAttributes: ariaAttributes, onApply: (value) => {
|
|
42
43
|
dispatch(tabsActions.setParameterRuntimeValue({ ref: parameter.ref, value }));
|
|
43
44
|
closeDropdown();
|
|
44
45
|
}, onCancel: closeDropdown })) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardParameterPicker.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardParameterPicker.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAe1C;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,8BAA8B,GAAG,YAAY,CAmC1G"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DashboardParameterModeValues,
|
|
2
|
+
import { DashboardParameterModeValues, isIdentifierRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { ParameterPicker } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
5
5
|
import { selectCatalogParameters, selectCatalogParametersStatus, } from "../../../model/store/catalog/catalogSelectors.js";
|
|
@@ -19,17 +19,16 @@ export function DashboardParameterPicker({ onAdd, onCancel }) {
|
|
|
19
19
|
const isLoading = status === "loading" || status === "uninitialized";
|
|
20
20
|
return (_jsx(ParameterPicker, { parameters: parameters, excludedKeys: excludedKeys, isLoading: isLoading, maxListHeight: PICKER_MAX_LIST_HEIGHT, onAdd: (selected) => {
|
|
21
21
|
for (const { ref, definition } of selected) {
|
|
22
|
-
|
|
23
|
-
if (!isIdentifierRef(ref) || workspaceDefault === undefined) {
|
|
22
|
+
if (!isIdentifierRef(ref)) {
|
|
24
23
|
continue;
|
|
25
24
|
}
|
|
26
25
|
dispatch(tabsActions.addParameter({
|
|
27
26
|
parameter: {
|
|
28
27
|
ref,
|
|
29
|
-
parameterType:
|
|
28
|
+
parameterType: definition.type,
|
|
30
29
|
mode: DashboardParameterModeValues.ACTIVE,
|
|
31
30
|
},
|
|
32
|
-
workspaceDefault,
|
|
31
|
+
workspaceDefault: definition.defaultValue,
|
|
33
32
|
}));
|
|
34
33
|
}
|
|
35
34
|
onAdd?.();
|