import { type IntlShape } from "react-intl"; import { type ICatalogMeasure, type IDashboardMeasureValueFilter, type IMeasureValueFilter, type ISeparators, type MeasureValueFilterCondition, type ObjRef } from "@gooddata/sdk-model"; import { type IDimensionalityItem } from "@gooddata/sdk-ui-filters"; /** * Normalizes the output of the SDK `` onApply callback into a single * `conditions` array. The SDK can return either `condition` (single comparison/range) or * `conditions` (multi-condition OR); the dashboard model only uses `conditions`. Returns * undefined when the filter is "All" (no condition selected). * * @internal */ export declare function normalizeMeasureValueFilterConditions(updated: IMeasureValueFilter | null): MeasureValueFilterCondition[] | undefined; /** * Derived data shared by every dashboard MVF host (filter bar, automation/scheduling dialog, * any future location). Resolves the catalog metric, computes title/format/percentage/conditions, * builds the execution-level MVF shape the SDK dropdown expects, and produces the condition * label shown on the chip. * * @internal */ export interface IDashboardMeasureValueFilterData { measure: ObjRef; localIdentifier: string; /** Custom title from the filter, if any. */ customTitle: string | undefined; /** Catalog metric the filter references; undefined if not in the catalog. */ catalogMetric: ICatalogMeasure | undefined; /** True when the catalog has loaded and the referenced metric no longer exists in the workspace. */ isMissingMetric: boolean; /** Title fallback when no custom title is set. */ defaultMetricTitle: string; /** Effective title — custom title or catalog title or stringified objRef. */ metricTitle: string; /** Catalog metric format pattern, if any. */ format: string | undefined; /** Whether the format expresses a percentage. */ usePercentage: boolean; /** Conditions from the (possibly working) filter the UI should reflect. */ conditions: MeasureValueFilterCondition[] | undefined; /** Dashboard-level dimensionality refs from the persisted filter. */ dimensionality: ObjRef[] | undefined; /** Dashboard-level dimensionality items selected in the configuration panel. */ dimensionalityItems: IDimensionalityItem[]; /** Catalog dimensionality candidates shown in the configuration panel picker. */ catalogDimensionality: IDimensionalityItem[]; /** Loader for catalog dimensionality items shown in the configuration panel picker. */ loadCatalogDimensionality: (dimensionality: ObjRef[]) => Promise; /** Human-readable condition summary shown on the chip ("> 100 OR ≥ 50%"). */ conditionLabel: string; /** Execution-level MVF that the SDK takes as `filter`. */ dropdownFilter: IMeasureValueFilter; separators: ISeparators; locale: string; intl: IntlShape; } /** * Hook that resolves the shared data needed to render a dashboard MVF dropdown. * * The host owns the choice of which filter to reflect in the UI: the persisted filter * (`filter`), or the working/staged filter when "Apply together" mode is active. Pass * the chosen one as `filterToDisplay`; if omitted, `filter` itself is used. * * @internal */ export declare function useDashboardMeasureValueFilterData(filter: IDashboardMeasureValueFilter, filterToDisplay?: IDashboardMeasureValueFilter): IDashboardMeasureValueFilterData; /** * Props that every dashboard MVF host passes to the SDK `` unchanged. * Host-specific bits — `DropdownButtonComponent`, `onApply`, `onChange`, `onCancel`, * `withoutApply`, `BodyComponent`, `DropdownActionsComponent`, `autoOpen` — are added * by the host on top of this bundle. * * @internal */ export interface ISharedDashboardMvfProps { filter: IMeasureValueFilter; measureIdentifier: string; buttonTitle: string; measureTitle: string; usePercentage: boolean; format: string | undefined; useShortFormat: true; displayTreatNullAsZeroOption: true; separators: ISeparators; locale: string; enableOperatorSelection: true; enableMultipleConditions: true; isDimensionalityEnabled: false; isFilterSummaryEnabled: true; showSimplifiedSummary: true; isHeaderEnabled: true; } /** * Build the shared `` prop bundle from the data hook output. * Spread this into the SDK component and add host-specific props after. * * @internal */ export declare function getSharedDashboardMvfProps(data: IDashboardMeasureValueFilterData): ISharedDashboardMvfProps; //# sourceMappingURL=useDashboardMeasureValueFilterData.d.ts.map