import type { JSX } from 'react'; import { FieldNamePickerConfigSettings, NumberFieldConfigSettings, SelectFieldConfigSettings, SliderFieldConfigSettings, StringFieldConfigSettings, UnitFieldConfigSettings } from '../field/overrides/processors'; import { StandardEditorContext, StandardEditorProps } from '../field/standardFieldConfigEditorRegistry'; import { PanelOptionsSupplier } from '../panel/PanelPlugin'; import { OptionsEditorItem, OptionsUIRegistryBuilder } from '../types/OptionsUIRegistryBuilder'; import { FieldConfigPropertyItem, FieldConfigEditorConfig } from '../types/fieldOverrides'; import { PanelOptionsEditorConfig, PanelOptionsEditorItem } from '../types/panel'; /** * Fluent API for declarative creation of field config option editors */ export declare class FieldConfigEditorBuilder extends OptionsUIRegistryBuilder> { addNumberInput(config: FieldConfigEditorConfig): this; addSliderInput(config: FieldConfigEditorConfig): this; addTextInput(config: FieldConfigEditorConfig): this; addSelect>(config: FieldConfigEditorConfig): this; addRadio(config: FieldConfigEditorConfig): this; addBooleanSwitch(config: FieldConfigEditorConfig): this; addColorPicker(config: FieldConfigEditorConfig): this; addUnitPicker(config: FieldConfigEditorConfig): this; addFieldNamePicker(config: FieldConfigEditorConfig): this; addGenericEditor(config: FieldConfigEditorConfig, // & any... i give up! editor: (props: StandardEditorProps) => JSX.Element): this; } export interface NestedValueAccess { getValue: (path: string) => any; onChange: (path: string, value: any) => void; getContext?: (parent: StandardEditorContext) => StandardEditorContext; } export interface NestedPanelOptions { path: string; category?: string[]; defaultValue?: TSub; build: PanelOptionsSupplier; values?: (parent: NestedValueAccess) => NestedValueAccess; } export declare class NestedPanelOptionsBuilder implements OptionsEditorItem { cfg: NestedPanelOptions; path: string; category?: string[]; defaultValue?: TSub; id: string; name: string; editor: () => null; constructor(cfg: NestedPanelOptions); private getDefaultValue; getBuilder: () => PanelOptionsSupplier; getNestedValueAccess: (parent: NestedValueAccess) => NestedValueAccess; } export declare function isNestedPanelOptions(item: unknown): item is NestedPanelOptionsBuilder; /** * Fluent API for declarative creation of panel options */ export declare class PanelOptionsEditorBuilder extends OptionsUIRegistryBuilder> { addNestedOptions(opts: NestedPanelOptions): this; addNumberInput(config: PanelOptionsEditorConfig): this; addSliderInput(config: PanelOptionsEditorConfig): this; addTextInput(config: PanelOptionsEditorConfig): this; addStringArray(config: PanelOptionsEditorConfig): this; addSelect>(config: PanelOptionsEditorConfig): this; addMultiSelect>(config: PanelOptionsEditorConfig): this; addRadio>(config: PanelOptionsEditorConfig): this; addBooleanSwitch(config: PanelOptionsEditorConfig): this; addColorPicker(config: PanelOptionsEditorConfig): this; addTimeZonePicker(config: PanelOptionsEditorConfig): this; addUnitPicker(config: PanelOptionsEditorConfig): this; addFieldNamePicker(config: PanelOptionsEditorConfig): this; addDashboardPicker(config: PanelOptionsEditorConfig): this; }