import { TemplateResult } from 'lit'; import { FieldChangeEvent } from './Events'; import { FieldClickEvent } from './Events'; import { FieldDefinition, FormDefinition } from './FieldDefinitions'; import { FieldInputEvent } from './Events'; import { InvalidErrors, InvalidEvent } from './InvalidEvent'; import { Layout } from './Layouts'; export declare function resolve(data: { [key: string]: any; }, path: string): any; export interface Resources { id?: string; library?: Library; definition?: D; context?: any; settings?: Settings; value?: V; parentPath?: string; errors?: InvalidErrors; inputHandler?: (e: FieldInputEvent) => void; changeHandler?: (e: FieldChangeEvent) => void; clickHandler?: (e: FieldClickEvent) => void; invalidHandler?: (e: InvalidEvent) => void; } export interface Component { importPath: string | string[]; template: (resources: Resources) => TemplateResult; renderer?: string; module?: string; focusable?: boolean; nestedFields?: (definition: D, value: V) => FieldDefinition[]; } export interface Components { [index: string]: Component; } export declare type Settings = { [key: string]: any; }; export declare class Library { components: Components; icon?: TemplateResult; displayName?: string; settingsEditor?: FieldDefinition; defaultSettings?: Settings; onSettingsChanged?: (settings: Settings) => Settings; themeColor?: (settings: Settings) => string; backgroundColor?: (settings: Settings) => string; registerComponent(type: string, component: Component): void; } export interface Libraries { [index: string]: Library; } export interface Editor extends FormDefinition { title: string; icon: TemplateResult; interaction?: string; summary?: (definition: FieldDefinition) => TemplateResult; prepareFieldsForLayout?: (context: any) => FieldDefinition[]; prepareDefaultLayout?: (context: any) => Layout; } export interface FormEditor extends Editor, FormDefinition { } export interface LayoutEditor extends Editor { parentFields?: FieldDefinition[]; isMatching(layout: Layout): boolean; } export interface Editors { [index: string]: Editor; } export interface Category { name: string; displayName: string; types: string[]; icon?: TemplateResult; } export declare type Categories = Category[]; export interface Icons { [index: string]: TemplateResult; } export interface Formatter { innerBoxStyle?(layout?: Layout, ...context: any): string; outerBoxStyle?(layout?: Layout, ...context: any): string; backgroundStyle?(layout?: Layout, ...context: any): string; elevationStyle?(layout?: Layout, ...context: any): string; containerStyle?(layout?: Layout, ...context: any): string; fieldStyle?(layout?: Layout, ...context: any): string; backgroundStyle?(layout?: Layout, ...context: any): string; } export declare type Formatters = { [index: string]: Formatter; }; export declare function getUniqueElementId(): string; export declare function getLibraries(): Libraries; export declare function getLibrary(name: string): Library; export declare function getDefaultLibrary(): Library | undefined; export declare function getEditors(): Editors; export declare function getEditor(name: string, context?: any): Editor | undefined; export declare function registerEditor(name: string, editor: Editor | ((context: any) => Editor)): void; export declare function getRendererEditors(): { [key: string]: string | undefined; }; export declare function getRendererEditor(name: string): string | undefined; export declare function registerRendererEditor(name: string, rendererEditor: string): void; export declare function getCategories(): Categories; export declare function getCategory(name: string): Category | null; export declare function addCategory(category: Category): void; export declare function getIcons(): Icons; export declare function getIcon(name: string): TemplateResult | undefined; export declare function registerIcon(name: string, template: TemplateResult): void; export declare function getFormatters(): Formatters; export declare function getFormatter(name: string): Formatter | undefined; export declare function registerFormatter(name: string, formatter: Formatter): void; export declare function setLanguage(lang: string): void; export declare type Value = string | number; export declare type Values = { [key: string]: Value; }; export declare function translate(path: string, values?: Values): string; export declare function getMessages(lang: string): Formatters; export declare function registerMessages(locale: string, messages: { [key: string]: any; }): void; export declare function area(field: FieldDefinition, fields: FieldDefinition[]): string; //# sourceMappingURL=Registry.d.ts.map