import React from "react"; import FormContext from "../form-context"; import { IField, IOption } from "../../constants/model-interfaces"; import { IError, IFormField, IRenderField } from "../../constants/common-interface"; import { TMouseEvent, TValue } from "../../constants/types"; interface IState { error: IError; componentError: IError; form: IFormField; loading: boolean; } /** * This is the base form control that contains methods that render fields depending upon `displayType` property. * Control rendering methods must be implemented in libs implementing metaform-core * @category To be implemented */ export default abstract class BaseFormControl extends React.Component { props: IRenderField; /** @internal */ static contextType: React.Context; context: React.ContextType; displayType?: string; field: IField; isFormControl: boolean; uuid: string; section: string; validation: { required: boolean | undefined; pattern: string | undefined; }; state: IState; constructor(props: IRenderField); setLoading(loading: boolean): void; initConfig(): void; /** @internal */ componentDidUpdate(props: IRenderField): void; /** @internal */ componentDidCatch(error: Error): void; /** @internal */ componentDidMount(): void; render(): React.JSX.Element; control(): React.JSX.Element; abstract month(): JSX.Element; abstract phone(): JSX.Element; abstract date(): JSX.Element; abstract search(): JSX.Element; /** * Input text control */ abstract text(): JSX.Element; abstract inputMask(): JSX.Element; abstract label(): JSX.Element; abstract password(): JSX.Element; abstract email(): JSX.Element; abstract number(): JSX.Element; abstract radio(): JSX.Element; abstract checkbox(): JSX.Element; abstract select(): JSX.Element; abstract multiselect(): JSX.Element; abstract button(): JSX.Element; abstract hint(): JSX.Element; abstract file(): JSX.Element; radioButton(): JSX.Element; multitext(): JSX.Element; header(): React.JSX.Element; modalsearch(): JSX.Element; paragraph(): JSX.Element; customControl(): JSX.Element; templateControl(): JSX.Element; customTextControl(): JSX.Element; currency(): JSX.Element; handleChange(e: TMouseEvent, val?: TValue, ref?: IOption): void; handleOpen(): void; handleDependencies(value: TValue): void; getWrapperClassName(): string; handleValidation(): void; validate(value: TValue): void; setError(hasError: boolean, errorMsg: string): void; getDisplayLabel(): string | undefined; } export {};