import { type IDashboardExportParameter, type IDashboardParameter, type IInsightParameterValue, type IParameterMetadataObject, type IdentifierRef, type ObjRef, type ParameterValue } from "@gooddata/sdk-model"; import { type DashboardSelector } from "../../types.js"; import { type IParameterReconciliationEntry, type ParameterReconciliation } from "./parametersHelpers.js"; import { type IDashboardParameterEntry } from "./parametersState.js"; /** * Returns the persisted-shape parameter entries currently held by the active tab. * * @alpha */ export declare const selectDashboardParameters: DashboardSelector; /** * Returns currently active parameter references on the active tab. * * @alpha */ export declare const selectActiveParameterRefKeys: DashboardSelector>; /** * Returns the full per-parameter entries (persisted shape + ephemeral `runtimeOverride`) for the * active tab. * * @internal */ export declare const selectDashboardParameterEntries: DashboardSelector; /** * Returns the active tab's parameters in the shape persisted by a filter view. * Runtime overrides become persisted `value`; existing parameter values are kept when no runtime value exists. * * @internal */ export declare const selectFilterViewParameters: DashboardSelector; /** * Runtime parameter values from the active tab, to hand off on a drill. Values equal to the source's * own default are kept (a drill target's default may differ), so the current value always propagates. * * @internal */ export declare const selectActiveTabDrillParameters: DashboardSelector; /** * Returns a selector that yields the entry held by the active tab for a given parameter ref, * or `undefined` if no such entry exists. * * @alpha */ export declare const selectDashboardParameterEntryByRef: (ref: ObjRef) => DashboardSelector; /** * Returns a selector that yields the current `runtimeOverride` for a given parameter ref on the * active tab, or `undefined` if the active tab does not hold an entry for that ref. * * @alpha */ export declare const selectParameterRuntimeOverrideByRef: (ref: ObjRef) => DashboardSelector; /** * Reset value for a parameter chip's dropdown, bound to the kit dropdown's `resetValue` prop. * * Returns `undefined` (Reset hidden) in edit mode when `parameter.value` is unset or already * equals the workspace default — both would be unpin no-ops on next save. * * @alpha */ export declare const selectParameterResetValueByRef: (ref: ObjRef) => DashboardSelector; /** * Computes the dashboard parameters keyed by tab `localIdentifier` in the shape that would be * persisted on save right now. * * @remarks * Smart persistence applies independently per tab: `value` is dropped when equal to the * workspace default, `label` is dropped when equal to the parameter title, all per tab. * Non-resolved entries (catalog not loaded, gated off, ref missing) are emitted verbatim from * the previously persisted entry on the same tab when available. V1 fallback applies when no * tab in the persisted dashboard carries `parameters` — the persisted root array is used as the * persistence source for every tab. * * @internal */ export declare const selectSmartPersistedTabsParameters: DashboardSelector>; /** * Returns true if the dashboard parameters that would be persisted differ from the persisted * version on any tab. * * @alpha */ export declare const selectIsParametersChanged: DashboardSelector; /** * Reset targets for every active-tab parameter whose `runtimeOverride` differs from its computed * reset value (per `computeParameterResetValue`). * * @internal */ export declare const selectActiveTabParameterResetTargets: DashboardSelector<{ ref: ObjRef; value: ParameterValue | undefined; }[]>; /** * True when the active tab has at least one parameter whose `runtimeOverride` differs from * the value it would be reset to (per `computeParameterResetValue`). * * @alpha */ export declare const selectHasAnyResettableParameterOnActiveTab: DashboardSelector; /** * Dashboard-wide list of parameters that no longer reconcile against the workspace parameters * (per {@link classifyParameterReconciliation}), deduped by ref across tabs. * * @internal */ export declare const selectParameterReconciliations: DashboardSelector; /** * Reconciliation status of a parameter's effective value, not its persisted value (which * {@link selectParameterReconciliations} uses). * * @internal */ export declare const selectParameterReconciliationByRef: (ref: ObjRef) => DashboardSelector; interface IWidgetParameterContext { entries: IDashboardParameterEntry[]; measureParameters: Record; workspaceParameterByRef: Map; widgetInsightRef: ObjRef; isStringEnabled: boolean; } /** * Owning-tab parameter entries and the metric → parameter map for a widget, keyed by ref. * * @internal */ export declare const selectWidgetParameterContext: (ref: ObjRef | undefined) => DashboardSelector; /** * Returns the parameter values to inject into the widget's `IExecutionConfig.parameterValues`. * * @remarks * For each parameter referenced by the widget's metrics (via the dashboard-wide MAQL * metric → parameter dependency map), the value is resolved in this order: * * 1. dashboard chip on the widget's tab with `runtimeOverride !== undefined`, * 2. else `insight.parameters` entry for that ref (AD-authored per-insight override), * 3. else nothing (backend uses workspace default). * * Parameters not referenced by the widget's metrics are excluded so that adding/removing * unrelated parameters does not invalidate the widget's `defFingerprint`. Returns `[]` when * `enableParameters` is off or while the dependency map has not been loaded. * * @alpha */ export declare const selectEffectiveParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector; /** * The insight half of {@link selectEffectiveParameterValuesForWidget}: insight-authored values for * the metric-referenced refs, flag-gated and ref-filtered, with no dashboard chip overrides. * * @remarks * Raw CSV export inlines a resolved AFM, so it must carry parameters explicitly rather than letting * the backend re-resolve them. This is the base; the dialog's `content.parametersByTab` overrides go * on top. * * @internal */ export declare const selectReferencedInsightParameterValuesForWidget: (ref: ObjRef | undefined) => DashboardSelector; /** * Returns the effective dashboard parameters (persisted shape with any `runtimeOverride` folded * into `value`) held by the widget's owning tab. * * @internal */ export declare const selectEffectiveDashboardParametersForWidget: (ref: ObjRef | undefined) => DashboardSelector; /** * Returns the per-tab parameter overrides to send on dashboard tabular export, keyed by * tab `localIdentifier`. The shape matches the backend's `dashboardTabsParametersOverrides` * field directly. * * @remarks * Scope rules: * - When `widgetIds` is empty/undefined (whole-dashboard export), every tab in scope contributes * parameter entries with a `runtimeOverride`. * - When `widgetIds` is non-empty, each widget's owning tab contributes only entries with a * `runtimeOverride` whose ref is referenced by the widget's insight metrics via the dashboard-wide * metric → parameter dependency map. Multi-widget across distinct owning tabs yields one * map entry per owning tab; entries for the same tab are unioned and deduplicated by ref. * * Returns `{}` (signalling "omit the field on the wire") when: * - `enableParameters` is off, * - the workspace catalog parameters are not loaded, * - (widget scope only) the `measureParameters` dependency map is not loaded, * - or no in-scope parameter has a `runtimeOverride`. * * @alpha */ export declare const selectExportEffectiveParameters: (widgetIds: string[] | undefined) => DashboardSelector>; /** * Active-tab slice of {@link selectExportEffectiveParameters}. * * @internal */ export declare const selectActiveTabExportParameters: DashboardSelector; export {}; //# sourceMappingURL=parametersSelectors.d.ts.map