import { IError, IErrorDetails } from "../constants/common-interface"; import { TValue } from "../constants/types"; import MetaForm from "./MetaForm"; /** * Update form data manually */ declare class MetaFormUpdater { private metaformMap; constructor(name: string, metaform: MetaForm | null); /** * Get field value * @param formName * @param section * @param field */ getFieldValue(formName: string, section: string, field: string): TValue | undefined; /** * Get field property * @param formName * @param section * @param field * @param property */ getFieldProperty(formName: string, section: string, field: string, property: string): any | undefined; /** * Updates a form field (for a non-grouped forms) * @param section * @param field * @param value */ updateField(section: string, field: string, value: TValue): void; /** * Sets field error * @param section * @param field * @param error */ setFieldError(section: string, field: string, error: IError): void; /** * Updates a form field * @param formName * @param section * @param field * @param value */ updateFormField(formName: string, section: string, field: string, value: TValue): void; /** * Sets error in a form field * @param formName * @param section * @param field * @param error */ setFormFieldError(formName: string, section: string, field: string, error: IError): void; /** * Validates a given form and return the error details * @param formName * @returns */ validateForm(formName: string): IErrorDetails; /** * @ignore * @param name * @param metaform */ add(name: string, metaform: MetaForm): void; /** * Cleanup * @param name */ destroy(name: string): void; } export default MetaFormUpdater;