import type { ComponentType, MouseEvent as ReactMouseEvent } from 'react'; import type { DataContract, RequestParams, SearchData } from './Search'; import type { ItemAppearance, VisualizationDefinitionAndPropsCommon, VisualizationDefinition } from './DashboardJSON'; import type { Mode } from './DashboardState'; import type { VisualizationApi } from './ApiRegistry'; import type { ItemShouldAnnounceChangeFunction } from './Preset'; import type { ExtendableString } from './Helpers'; export interface VizConfig { size?: { initialWidth: number; initialHeight: number; }; getInputName?: (props: { input?: VisualizationDefinition; }) => string | undefined; } export interface VizContract { initialDimension?: { width: number; height: number; }; [key: string]: unknown; } export type VizDataSources = Record; export type VizBehavior = ExtendableString<'dynamic-options' | 'events' | 'downsampling' | 'placeholder' | 'page-and-sort' | 'trellis' | 'gradient-style'>; export interface VizProps = Record> extends VisualizationDefinitionAndPropsCommon { dataSources: VizDataSources; appearance?: ItemAppearance; hasEventHandlers?: boolean; width: string | number; height?: string | number; loading: boolean; onRequestParamsChange: (binding: string, newRequestParams: RequestParams) => void; onComputedProps: (props: Record) => void; id: string; mode?: Mode; onEventTrigger: (e: { type: string; originalEvent: MouseEvent; payload: Record; }) => void; vizActionHandlerRef: (ref: VisualizationApi) => void; visualizationApiRef: (ref: VisualizationApi) => void; onOptionsChange: (newOptions: Record) => void; onSelected: (e: ReactMouseEvent, visualizationIds: string[]) => void; isFullscreen: boolean; /** * Content-height callback for dynamic height. Provided whenever the * allowDynamicItemHeight feature flag is enabled. The viz reports its * natural CONTENT height; the framework adds sibling heights (title, * description, progress bar) before forwarding to the layout, and only * applies the resulting height change to the layout item in view mode. * * Whether a visualization grows to fit its content and calls this * callback is up to the visualization itself, typically driven by a * viz-owned `dynamicHeight` option in its `options` */ onRequestHeight?: (contentHeight: number) => void; } export interface VizStatics> { showTitleAndDescription?: boolean; showProgressBar?: boolean; showLastUpdated?: boolean; showDragHandle?: boolean; showDrilldown?: boolean; showCornerRadiusEditor?: boolean; showSkipButton?: boolean; shouldAnnounceChange?: ItemShouldAnnounceChangeFunction; hideVisibilitySection?: boolean; config?: { key?: string; name?: string; category?: string; placeholderIcon?: ComponentType; icon?: ComponentType; dataContract?: DataContract; optionsSchema?: OptionsSchema; editorConfig?: unknown[]; supports?: VizBehavior[]; }; vizContract?: VizContract; includeInToolbar?: boolean; includeInVizSwitcher?: boolean; canSetCustomUrl?: boolean; canSetTokens?: ('static' | 'dynamic')[]; canSetTimeRange?: boolean; canResetTokens?: boolean; canUnsetTokens?: boolean; canSwitchToTab?: boolean; canChooseDatasourceFields?: boolean; interactionsFilterMetadata?: string[]; tokenMetadataProp?: string; /** * @deprecated */ dataContract?: DataContract; /** * @deprecated */ initialRequestParams?: RequestParams; } //# sourceMappingURL=Visualizations.d.ts.map