import { ParsedElement } from './ftl.mjs'; declare class LocalStorage extends Storage { static save(k: any, v: any): void; static load(k: any): any; static remove(k: any): void; static pop(k: any): any; } declare class SessionStorage extends Storage { static save(k: any, v: any): void; static load(k: any): any; static remove(k: any): void; static pop(k: any): any; } declare class VersionedLocalStorage { static save(key: any, revision: any, data: any): void; static load(key: any, revision: any): any; } declare class VersionedSessionStorage { static save(key: any, revision: any, data: any): void; static load(key: any, revision: any): any; } export type AsyncExtension = { promises: Promise[]; }; export type AsyncEvent = Event & { async?: AsyncExtension; }; /** * @typedef {Object} AsyncExtension * @property {Promise[]} promises * @typedef {Event & { async?: AsyncExtension }} AsyncEvent */ declare class AsyncEvents { /** * Dispatches an event and handles asynchronous resolution based on the execution mode. * @param {HTMLElement} el - The target element dispatching the event. * @param {AsyncEvent} evt - The event instance. * @param {{mode?: 'broadcast' | 'pipeline' | 'delegate'}} [options] - Configuration options (defaults to 'broadcast'). * @returns {Promise} Resolves with an array of values for broadcasts, a single value for pipelines/delegates, or undefined. */ static fireAsync(el: HTMLElement, evt: AsyncEvent, options?: { mode?: 'broadcast' | 'pipeline' | 'delegate'; }): Promise; /** * Registers an asynchronous event listener wrapper. * @param {HTMLElement} el - The target element. * @param {string} type - The event name/type. * @param {Function} fn - The async listener middleware function returning the execution result. * @param {AddEventListenerOptions} [options] - Native addEventListener options. * @returns {EventListener} The underlying proxy listener function needed for cleanup via asyncOff. */ static asyncOn(el: HTMLElement, type: string, fn: Function, options?: AddEventListenerOptions): EventListener; /** * Unregisters an asynchronous event listener proxy. * @param {HTMLElement} el - The target element. * @param {string} type - The event name/type. * @param {EventListener} listener - The proxy listener instance previously returned by asyncOn. * @param {EventListenerOptions} [options] - Native removeEventListener options. */ static asyncOff(el: HTMLElement, type: string, listener: EventListener, options?: EventListenerOptions): void; /** * Mixes the asynchronous execution engine extensions into target class prototypes. * @param {...Function} classes - The target class constructors to decorate. */ static mixInto(...classes: Function[]): void; } declare class Timing { static sleep(ms: any): Promise; static DEBOUNCE_DEFAULT: number; static DEBOUNCE_IMMEDIATE: number; /** * Executes only after a period of inactivity (pause in events). * Respond to the "end" of a series of events. * @param {*} timeoutMs * @param {*} func * @param {*} [options] * @returns {[function, function]} */ static debounce(timeoutMs: any, func: any, options?: any): [Function, Function]; static THROTTLE_DEFAULT: number; static THROTTLE_NO_LEADING: number; static THROTTLE_NO_TRAILING: number; /** * Executes at most once per specified time interval, regardless of ongoing events. * @param {*} timeoutMs * @param {*} func * @param {*} [options] * @returns {[function, function]} */ static throttle(timeoutMs: any, func: any, options?: any): [Function, Function]; } declare class Bindings { /** * @param {{ [x: string]: any; }} obj * @param {string} prefix * @param {Set} stops * @return {{ [x: string]: any; }} */ static flatten(obj: { [x: string]: any; }, prefix: string, stops: Set): { [x: string]: any; }; /** * @param {any} result * @param {string} path * @param {any} value */ static providePath(result: any, path: string, value: any): any; /** * * @param {Element & {dataset?: any} & {checked?: boolean} & {value?: any}} el * @returns */ static extract(el: Element & { dataset?: any; } & { checked?: boolean; } & { value?: any; }): any; /** * * @param {HTMLFormElement} form * @param {HTMLElement} [submitter] * @returns */ static extractFrom(form: HTMLFormElement, submitter?: HTMLElement): {}; /** * * @param {Element & {checked?: boolean} & {value?: any}} el * @returns */ static mutate(el: Element & { checked?: boolean; } & { value?: any; }, raw: any): void; static mutateIn(form: any, values: any): void; static errors(form: any, es: any, scrollOnError: any): void; } declare class RemoteJsonFormLoader { #private; constructor(http: any, url: any, method: any, requestMapper: any, responseMapper: any); prepare(values: any, form: any): any; submit(values: any, form: any): Promise; transform(response: any, form: any): any; } declare class LocalFormLoader { #private; constructor(requestMapper: any, responseMapper: any); prepare(values: any, form: any): Promise; submit(values: any, form: any, response: any): Promise; transform(response: any, form: any): Promise; } declare class FormLoader { static create(el: any, conf: any): LocalFormLoader | RemoteJsonFormLoader; } declare class Form extends ParsedElement { form: any; render(): void; /** * * @param {HTMLElement} [submitter] * @returns */ submit(submitter?: HTMLElement): Promise; reset(): void; spinner(spin: any): void; set values(vs: {}); get values(): {}; set errors(es: any); } declare class Input extends ParsedElement { internals: ElementInternals; static observed: string[]; static slots: boolean; static template: string; static formAssociated: boolean; _input: any; _fieldError: any; constructor(); _type(): string; _fragment(type: any, slots: any): any; render({ slots, observed, disabled, skipObservedSetup }: { disabled: any; observed: any; skipObservedSetup: any; slots: any; }): void; get value(): any; set value(value: any); get readonly(): any; set readonly(v: any); get disabled(): any; set disabled(d: any); get required(): boolean; set required(d: boolean); focus(options: any): void; setCustomValidity(error: any): void; formResetCallback(): void; } declare class LocalDate extends ParsedElement { render(): void; } declare class Instant extends ParsedElement { render(): void; static isoToLocal(iso: any): string; } declare class InputLocalDate extends Input { #private; static observed: string[]; _type(): string; render(conf: any): void; get min(): any; set min(v: any); get max(): any; set max(v: any); get step(): any; set step(v: any); } declare class InputLocalTime extends InputLocalDate { _type(): string; } declare class InputInstant extends Input { static observed: string[]; _type(): string; render(conf: any): void; get value(): string | null; set value(v: string | null); get min(): string | null; set min(v: string | null); get max(): string | null; set max(v: string | null); get step(): any; set step(v: any); } declare class InputFile extends Input { #private; static l10n: { en: { dropzonelabel: string; unaccepptablefiletype: string; maxfilesizeexceeded: string; maxtotalsizeexceeded: string; maxfilesexceeded: string; }; it: { dropzonelabel: string; unaccepptablefiletype: string; maxfilesizeexceeded: string; maxtotalsizeexceeded: string; maxfilesexceeded: string; }; es: { dropzonelabel: string; unaccepptablefiletype: string; maxfilesizeexceeded: string; maxtotalsizeexceeded: string; maxfilesexceeded: string; }; fr: { dropzonelabel: string; unaccepptablefiletype: string; maxfilesizeexceeded: string; maxtotalsizeexceeded: string; maxfilesexceeded: string; }; }; static observed: string[]; _type(): string; static template: string; static templates: { items: string; warning: string; }; render(conf: any): void; warning(key: any, args: any): void; get accept(): any; set accept(vs: any); get multiple(): any; set multiple(v: any); get files(): any; set files(vs: any); get file(): any; set file(v: any); get value(): any; set value(v: any); get totalsize(): any; get maxfiles(): any; set maxfiles(v: any); get maxfilesize(): any; set maxfilesize(v: any); get maxtotalsize(): any; set maxtotalsize(v: any); get itemlist(): any; set itemlist(v: any); get dropzone(): any; set dropzone(v: any); } declare class RemoteLoader { #private; constructor({ http, url, method, responseMapper, prefetch, revision }: { http: any; method: any; prefetch: any; responseMapper: any; revision: any; url: any; }); prefetch(): Promise; exact(...keys: any[]): Promise; load(needle: any): Promise; reconfigureUrl(url: any): Promise; } declare class PartialRemoteLoader { #private; constructor({ http, url, method, responseMapper }: { http: any; method: any; responseMapper: any; url: any; }); exact(...keys: any[]): Promise; load(needle: any): Promise; } declare class InMemoryLoader { #private; constructor(data: any); update(data: any): void; exact(...keys: any[]): any; load(needle: any): any; } declare class SelectLoader { #private; static create(el: any, conf: any): InMemoryLoader | PartialRemoteLoader | RemoteLoader; } declare class Dropdown extends ParsedElement { #private; static slots: boolean; static template: string; static templates: { options: string; }; render({ slots }: { slots: any; }): void; acceptSelection(): void; update(values: any): void; hide(): void; get shown(): boolean; show(loader: any): Promise; moveOrShow(forward: any, loader: any): Promise; } declare class Select extends ParsedElement { #private; static observed: string[]; static slots: boolean; static template: string; static templates: { items: string; }; static formAssociated: boolean; internals: ElementInternals; constructor(); render({ slots, observed, disabled }: { disabled: any; observed: any; slots: any; }): Promise; withLoader(fn: any): Promise; set value(vs: any); get value(): any; get entry(): [any, any][] | [any, any]; get disabled(): any; set disabled(d: any); get readonly(): any; set readonly(v: any); get required(): boolean; set required(d: boolean); get itemlist(): any; set itemlist(v: any); focus(options: any): void; setCustomValidity(error: any): void; } declare class RadioGroup extends ParsedElement { #private; internals: ElementInternals; static observed: string[]; static slots: boolean; static template: string; static formAssociated: boolean; constructor(); render({ slots, observed, disabled }: { disabled: any; observed: any; slots: any; }): void; get value(): string | boolean | null; set value(value: string | boolean | null); get readonly(): any; set readonly(v: any); get disabled(): any; set disabled(d: any); get required(): boolean; set required(d: boolean); focus(options: any): void; setCustomValidity(error: any): void; } declare class Checkbox extends ParsedElement { #private; internals: ElementInternals; static observed: string[]; static slots: boolean; static template: string; static formAssociated: boolean; constructor(); render({ slots, observed, disabled }: { disabled: any; observed: any; slots: any; }): void; get value(): any; set value(value: any); get readonly(): any; set readonly(v: any); get disabled(): any; set disabled(d: any); get required(): boolean; set required(d: boolean); focus(options: any): void; setCustomValidity(error: any): void; } declare class Spinner extends ParsedElement { static slots: boolean; static template: string; render({ slots }: { slots: any; }): void; } declare class SortButton extends ParsedElement { #private; static observed: string[]; render(): void; get order(): any; set order(value: any); } declare class Pagination extends ParsedElement { #private; static observed: string[]; static l10n: { en: { showing: string; navigation: string; previous: string; next: string; }; it: { showing: string; navigation: string; previous: string; next: string; }; es: { showing: string; navigation: string; previous: string; next: string; }; fr: { showing: string; navigation: string; previous: string; next: string; }; }; static config: { prevIcon: string; nextIcon: string; reloadIcon: string; }; static template: string; render({ observed }: { observed: any; }): void; update(current: any, total: any): void; get total(): number; set total(value: number); get current(): number; set current(value: number); } declare class TableSchemaParser { static parse(nodeOrFragment: any, template: any): { headersTemplate: any; rowsTemplate: any; sort: { sorter: string | null; order: string | null; }; length: number; }; } declare class Table extends ParsedElement { #private; static slots: boolean; static l10n: { en: { initial: string; error: string; nodata: string; }; it: { initial: string; error: string; nodata: string; }; es: { initial: string; error: string; nodata: string; }; fr: { initial: string; error: string; nodata: string; }; }; static config: { searchIcon: string; }; static template: string; static templates: { row: string; }; render({ slots, observed }: { observed: any; slots: any; }): Promise; reload(): Promise; load(pageRequest: any, sortRequest: any, filterRequest: any): Promise; withLoader(fn: any): Promise; resetWithFilter(filterRequest: any): Promise; } declare class InstantFilter extends Input { #private; static observed: string[]; static template: string; render(conf: any): void; get value(): any[] | undefined; set value(v: any[] | undefined); set readonly(v: any); set disabled(d: any); } declare class LocalDateFilter extends Input { #private; static observed: string[]; static template: string; render(conf: any): void; get value(): any[] | undefined; set value(v: any[] | undefined); set readonly(v: any); set disabled(d: any); } declare class TextFilter extends Input { #private; static observed: string[]; static template: string; render(conf: any): void; get value(): any[] | undefined; set value(v: any[] | undefined); } declare class LocalizationModule { static t(k: any, ...args: any[]): any; static tl(k: any, args?: any[]): any; } declare class Plugin { configure(registry: any): void; } export { AsyncEvents, Bindings, Checkbox, Dropdown, Form, FormLoader, Input, InputFile, InputInstant, InputLocalDate, InputLocalTime, Instant, InstantFilter, LocalDate, LocalDateFilter, LocalStorage, LocalizationModule, Pagination, Plugin, RadioGroup, Select, SelectLoader, SessionStorage, SortButton, Spinner, Table, TableSchemaParser, TextFilter, Timing, VersionedLocalStorage, VersionedSessionStorage }; export as namespace ful;