import { Instance as Instance$1 } from '@popperjs/core'; declare class EditionSession { private instance; private type; private renderer; private markup; constructor(instance: Instance, type: FlyterType, renderer: FlyterRenderer); getType(): FlyterType; getInstance(): Instance; getRenderer(): FlyterRenderer; getFlyterElement(): HTMLElement; getSessionMarkup(): HTMLElement; initialize(): Promise; openEdition(): Promise; cancel(): Promise; closeSession(): Promise; submit(): Promise; private setRendererLoading; private getElement; } type anyConfigObject = { [key: string]: any; }; type DeepPartial = { [P in keyof T]?: DeepPartial | T[P]; }; type TypeConstructor = new (getSession: () => EditionSession, config: C) => FlyterType; type RendererConstructor = new (getSession: () => EditionSession, config: anyConfigObject) => FlyterRenderer; type rendererData = { rendererConfig: anyConfigObject; renderer: RendererConstructor; }; type typeData = { typeConfig: anyConfigObject; type: TypeConstructor; }; declare abstract class FlyterType { protected getSession: () => EditionSession; protected config: Config; constructor(getSession: () => EditionSession, config: Config); getTypeConfig(): Config; abstract init(): Promise | any; abstract show(container: HTMLElement, value: any): Promise | any; abstract getCurrentValue(): any; abstract getReadableValue(val: any): Promise | string; abstract disable(status: boolean): any; abstract onDestroy(): Promise | any; } declare abstract class FlyterRenderer { protected getSession: () => EditionSession; protected config: Config; constructor(getSession: () => EditionSession, config: Config); getRendererConfig(): Config; abstract getMarkup(): HTMLElement | null; abstract init(): Promise | any; abstract error(error: Error): any; abstract show(markup: HTMLElement): Promise | any; abstract hide(): Promise | any; abstract destroy(): Promise | any; abstract setLoading(loading: boolean): any; } declare class Instance { private domTarget; private config; private typeGetter; private rendererGetter; private session; flyterElement: HTMLElement; private value; private loading; private disabled; private listener; private keyListener; private configResolver; constructor(domTarget: HTMLElement, config: Config, typeGetter: (name: string) => typeData, rendererGetter: (name: string) => rendererData); getDomTarget(): HTMLElement; getConfig(key: string, callback?: boolean): any; getRawConfig(): Config; updateConfig(config: DeepPartial): void; getCurrentSession(): EditionSession | null; getFlyterElement(): HTMLElement; open(): Promise; close(): Promise; getValue(): any; setValue(val: any): Promise; refresh(): Promise; buildStandardReadableValue(val: any | null): Promise; deleteSession(): void; disable(): Promise; enable(): Promise; destroy(): Promise; buildType(): FlyterType; buildRenderer(): FlyterRenderer; private attachKeyEvent; private createSession; private setInstanceLoading; private buildFlyterTarget; } interface Config { themes: anyConfigObject; trigger: "click" | "hover" | "none" | ((instance: Instance) => "click" | "hover" | "none"); submitOnEnter: boolean | ((instance: Instance) => boolean); triggerOnTarget: boolean | ((instance: Instance) => boolean); emptyValue: any | ((instance: Instance) => any); initialValue: any | ((instance: Instance) => any); emptyValueDisplay: string | ((instance: Instance) => string); valueFormatter: (value: any, instance: Instance) => string | Promise; onOpen: (instance: Instance) => Promise | any; onDisabled: (instance: Instance) => Promise | any; onEnabled: (Instance: Instance) => Promise | any; onClose: (instance: Instance) => Promise | any; onDestroy: (instance: Instance) => Promise | any; onSubmit: (value: any, instance: Instance) => Promise | any; onLoading: (status: boolean, instance: Instance) => void; onRendererLoading: (status: boolean, instance: Instance) => any; onError: (error: Error, instance: Instance) => Promise | any; onCancel: (instance: Instance) => Promise | any; validate: (value: any, instance: Instance) => Promise | Error | boolean; server: { url: string | null | ((instance: Instance) => string); queryParams: anyConfigObject | ((instance: Instance) => anyConfigObject); method: string | ((instance: Instance) => string); resultFormatter: (data: any, value: any) => any; }; type: { name: string | ((instance: Instance) => string); config: any | ((instance: Instance) => any); }; renderer: { name: string | ((instance: Instance) => string); config: any | ((instance: Instance) => any); }; okButton: { enabled: boolean | ((instance: Instance) => boolean); text: string | ((instance: Instance) => string); }; cancelButton: { enabled: boolean | ((instance: Instance) => boolean); text: string | ((instance: Instance) => string); }; template: { edit: string | ((instance: Instance) => string); buttons: string | ((instance: Instance) => string); read: string | ((instance: Instance) => string); loading: string | ((instance: Instance) => string); }; } declare class ManyInstance { private instances; constructor(instances: Instance[]); getInstances(): Instance[]; updateAllConfig(config: DeepPartial): void; getCurrentSessions(): EditionSession[]; openAll(): Promise; closeAll(): Promise; refreshAll(): Promise; destroyAll(): Promise; enableAll(): Promise; disableAll(): void; private asyncBatch; private batch; } declare class Flyter { private renderers; private types; private themes; registerRenderer(name: string, renderer: any, baseRendererConfig: anyConfigObject): void; registerType(name: string, type: TypeConstructor, baseTypeConfig: C): void; registerTheme(name: string, theme: any, baseThemeConfig: anyConfigObject): void; attach(target: HTMLElement | string | HTMLElement[] | NodeList, givenConfig?: DeepPartial | string): Instance | ManyInstance; private attachMultiple; private buildInstance; private getType; private getRenderer; private resolveThemeConfig; } type Theme = { renderers?: { [rendererName: string]: anyConfigObject; }; types?: { [typeName: string]: anyConfigObject; }; config?: DeepPartial; }; interface BootstrapThemeConfig { size: "xs" | "md" | "lg" | "xl" | "sm"; okBtntnTheme: string; cancelBtnTheme: string; spinnerTheme: string; inline: boolean; } declare const parseTemplate: (markup: string | HTMLElement | (() => string)) => HTMLElement; type valOrAsync$1 = T | ((renderer: PopupRenderer) => T) | ((renderer: PopupRenderer) => Promise); type PopupConfigType = { popper: (...args: any[]) => Instance$1 | Instance$1; popperConfig: valOrAsync$1<{ placement: string | anyConfigObject; }>; transitionDuration: valOrAsync$1; title: valOrAsync$1; closeOnClickOutside: valOrAsync$1; popupTemplate: valOrAsync$1; popupContainer: valOrAsync$1; popupClass: valOrAsync$1; onInit: ((renderer: PopupRenderer) => any) | ((renderer: PopupRenderer) => Promise); onShow: ((renderer: PopupRenderer) => any) | ((renderer: PopupRenderer) => Promise); onHide: ((renderer: PopupRenderer) => any) | ((renderer: PopupRenderer) => Promise); }; declare class PopupRenderer extends FlyterRenderer { private loading; private markup; private transitionDuration; private closeOnClickOutside; private listener; private popperInstance; getPopperInstance(): Instance$1 | null; getMarkup(): HTMLElement | null; init(): Promise; error(error: Error): void; show(markup: HTMLElement): Promise; hide(): Promise; destroy(): Promise; setLoading(loading: boolean): void; private getElement; private getPopupContainer; } type valOrAsync = T | ((renderer: InlineRenderer) => T) | ((renderer: InlineRenderer) => Promise); type InlineConfigType = { closeOnClickOutside: valOrAsync; inlineTemplate: valOrAsync; containerClass: valOrAsync; onInit: ((renderer: InlineRenderer) => any) | ((renderer: InlineRenderer) => Promise); onShow: ((renderer: InlineRenderer) => any) | ((renderer: InlineRenderer) => Promise); onHide: ((renderer: InlineRenderer) => any) | ((renderer: InlineRenderer) => Promise); }; declare class InlineRenderer extends FlyterRenderer { private loading; private markup; private closeOnClickOutside; private listener; private originDisplay; getMarkup(): HTMLElement | null; init(): Promise; error(error: Error): void; show(markup: HTMLElement): Promise; hide(): Promise; destroy(): Promise; setLoading(loading: boolean): void; private getElement; } type TextTypeConfig = { class: string; type: string; attributes: string; treatEmptyAsNull: boolean; }; declare class TextType extends FlyterType { private textElement; init(): void; show(container: HTMLElement, value: any): void; getCurrentValue(): any; getReadableValue(val: any): any; disable(status: boolean): void; onDestroy(): void; private getTemplate; } type DataSource = Array<{ value: any; label: string; }>; interface BaseChoiceConfig { dataSource: DataSource | (() => DataSource) | (() => Promise); class: string; } declare abstract class BaseChoiceType extends FlyterType { protected dataSource: DataSource; protected markup: U; init(): Promise; show(container: HTMLElement, value: any): void; disable(status: boolean): void; onDestroy(): void; abstract setValue(value: any): any; abstract getTemplate(): string; } interface SelectTypeConfig extends BaseChoiceConfig { multiple: boolean; displaySeparator: string; showEmptyValue: boolean; } declare class SelectType extends BaseChoiceType { setValue(value: any): void; getCurrentValue(): any; getReadableValue(value: any[]): string; getTemplate(): string; } interface RadioTypeConfig extends BaseChoiceConfig { labelClass: string; radioClass: string; inputContainerClass: string; } declare class RadioType extends BaseChoiceType { setValue(value: any): void; getCurrentValue(): any; getReadableValue(value: any[]): string; getTemplate(): string; getRadios(): HTMLInputElement[]; } interface CheckboxTypeConfig extends BaseChoiceConfig { displaySeparator: string; checkboxClass: string; labelClass: string; inputContainerClass: string; } declare class CheckboxType extends BaseChoiceType { setValue(value: any): void; getCurrentValue(): any; getReadableValue(value: any | any[]): string; getTemplate(): string; getCheckbox(): HTMLInputElement[]; } declare const flyter: Flyter; declare const withBootstrapTheme: (config?: DeepPartial) => void; declare const withPopupRenderer: (config?: DeepPartial) => void; declare const withInlineRenderer: (config?: DeepPartial) => void; declare const withTextType: () => void; declare const withSelectType: () => void; declare const withCheckboxType: () => void; declare const withRadioType: () => void; export { CheckboxType, type CheckboxTypeConfig, Flyter as FlyterBuilder, FlyterRenderer, FlyterType, InlineRenderer, Instance, ManyInstance, PopupRenderer, RadioType, type RadioTypeConfig, SelectType, type SelectTypeConfig, TextType, type TextTypeConfig, type Theme, flyter as default, parseTemplate, withBootstrapTheme, withCheckboxType, withInlineRenderer, withPopupRenderer, withRadioType, withSelectType, withTextType };