import type { SetStateAction, ComponentType } from 'react'; import type { DashboardJSON, DataSourceDefinition, DataSourceOptions } from './DashboardJSON'; import type { DashboardApi } from './DashboardApi'; export type LayoutEditorOptions = Record; export interface LayoutEditorSubmitOptions { debounce?: boolean; } export type LayoutOptionsUpdater = SetStateAction<{ options: LayoutEditorOptions; }>; export type LayoutEditorOnOptionsChange = (updater: LayoutOptionsUpdater, submitOptions?: LayoutEditorSubmitOptions) => void; export interface LayoutEditorProps { options: LayoutEditorOptions; onOptionsChange: LayoutEditorOnOptionsChange; } export type Editor = ({ options, onOptionsChange, }: LayoutEditorProps) => JSX.Element; export type LayoutEditor = ({ options, onOptionsChange, }: LayoutEditorProps) => JSX.Element; export interface DSOptionsEditorProps { dataSource?: DataSourceDefinition; dataSourceId: string; dataSourceName: string; meta?: Record; defaultOptions?: DataSourceOptions; dataSourceMetaData?: Record; options?: DataSourceOptions; onOptionsChange: (options: DataSourceOptions) => void; definition?: DashboardJSON; dashboardApi: DashboardApi; setAreOptionsValid?: ({ optionName, isValid, }: { optionName: string; isValid: boolean; }) => void; showRefreshEditor?: boolean; } export type DSOptionsEditor = (props: DSOptionsEditorProps) => JSX.Element; export type DynamicEditorItem = { label: string; option: string; filterKeywords?: string[]; editor: string | ComponentType; editorProps?: Record; }; export type EditorSection = { label: string; layout: DynamicEditorItem[][]; open?: boolean; }; //# sourceMappingURL=Editor.d.ts.map