import { type DashboardAttributeFilterItem, type IAttributeDescriptorBody, type IDashboardMeasureValueFilter, type IMeasure, type ObjRef } from "@gooddata/sdk-model"; import { type OverlayController } from "@gooddata/sdk-ui-kit"; /** * @internal */ export interface IKdaDialogProps { /** * Locale for the dialog */ locale?: string; /** * CSS class name for the dialog */ className?: string; /** * Whether to show the close button */ showCloseButton?: boolean; /** * Parent overlay controller. If provided, the dialog will be rendered by this controller. * Otherwise, the dialog will be rendered with na internal overlay controller. */ parentOverlayController?: OverlayController; /** * Title element id */ titleElementId?: string; /** * Custom close button handler */ onClose?: () => void; /** * Custom toggle button handler */ onToggle?: (minimized: boolean) => void; } /** * @internal */ export interface IKdaDataPoint { /** * Date string in ISO format related to granularity */ date: string; /** * Valuer of metric for given range */ value: number | undefined; /** * Format of date attribute */ format?: IAttributeDescriptorBody["format"]; } /** * @internal */ export interface IKdaDefinition { /** * Metric to analyze */ metric: IMeasure; /** * Metrics related to main metric */ metrics?: IMeasure[]; /** * Attribute filters to apply. * * Attribute filters drive both the KDA "segment-by attribute" UI in the dialog and the * scope of the change analysis computation. */ filters?: DashboardAttributeFilterItem[]; /** * Measure value filters to apply to the change analysis computation. * * They are not editable in the dialog UI (KDA segments by attribute, not by metric value), * but the dashboard MVFs are propagated to the backend so the computation respects the * same metric-driven scope as the rest of the dashboard. */ measureValueFilters?: IDashboardMeasureValueFilter[]; /** * Date attribute */ dateAttribute: ObjRef; /** * Type of period */ type: KdaPeriodType; /** * Ranges */ range: [IKdaDataPoint, IKdaDataPoint]; } /** * @internal */ export type KdaPeriodType = "same_period_previous_year" | "previous_period"; /** * @internal */ export type DeepReadonly = T extends (infer R)[] ? ReadonlyArray> : T extends Function ? T : T extends object ? DeepReadonlyObject : T; /** * @internal */ export type DeepReadonlyObject = { readonly [P in keyof T]: DeepReadonly; }; //# sourceMappingURL=types.d.ts.map