import { default as DynamicElement } from './DynamicElement'; import { SelectConfiguration, SelectSelectConfiguration } from './FieldConfigurationTypes'; /** * This class represents a select field with dynamic content (like a standard html-select with dynamic options) */ declare class DynamicSelect extends DynamicElement { /** @param {string} method the http request method for the remote call (async update) */ readonly method: string; /** @param {object} dropdown - property with select related properties */ select: SelectSelectConfiguration; /** @param {object} defaultConfig property with default configuration values */ static defaultConfig: { io: { event: string; }; fetch: { method: string; }; select: { clearOnParentVoid: boolean; }; }; /** * @inheritdoc */ constructor(config: SelectConfiguration, htmlElement: NodeList); private getHtmlSelectElementOrList; /** * Method to clear the select from all its non-empty options */ clear(): void; /** * Method executed before the status update. If it returns false, the update is aborted. * If select.clearOnParentVoid is true and the subject value is empty, this method calls the clear function and aborts the update. * * @param {object} data data useful to the element's status change * @param {string|null} subjectName name of the changed subject * @returns false to abort the update, true otherwise */ protected beforeUpdate(data: any, subjectName: string | null): boolean; /** * Method which execute a pipeline of instructions to update the select content with dynamic options * @param {object} data data to send with the http request * @param {string|null} subjectName name of the subject who changed * * @returns a Promise in fulfilled state when data has been updated */ protected updateStatus(data: object, subjectName: string | null): Promise; /** * Method to filter data returned by the remote call * @param {object} data data to send with the http request */ protected postProcessData(data: object[]): object[]; /** * Method to save data returned by the remote call and filtered with postProcessData method * @param {object} data data to send with the http request * * @see postProcessData */ protected saveData(data: any[]): void; private createOption; } export default DynamicSelect;