import { FormGroup } from '@angular/forms'; import { OnInit, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { DynamicField } from './fields/dynamic-field'; /** * This component builds a form with input components from fields list. * If any instance is defined in the model, yours attribute values will be applied to the corresponding field. * This component can display an error code if that is defined. * * :fields: List of configurations to build fields. * :model: Model instance to edit [optional]. * :errorCode: This can display an error if is defined. * :editing: Flag to control components state */ export declare class NgXformComponent implements OnInit, OnChanges { fields: DynamicField[]; editing: boolean; horizontalForm: boolean; labelWidth: number; editingChange: EventEmitter<{}>; /** To listening submitSuccessful event */ submit: EventEmitter<{}>; /** To listening submitSuccessful event */ cancel: EventEmitter<{}>; form: FormGroup; /** Store form fields initial values. `null` for and empty form */ initialModel: any; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; createForm(): void; protected createFormGroup(fields: DynamicField[]): FormGroup; unpatchValue(form: FormGroup, model: any): any; isFormValid(): boolean; reset(): void; clear(): void; setEditing(state: boolean): void; /** * Initialize the form with the values in @param value object * @param value object with values to be set to the form * * Note: Calling setValue(null) will not clear the form. Use clear() instead. */ setValue(value: any): void; patchValue(value: any): void; getValue(): any; getModel(): any; /** * Touch all form fields to force field validations to run * * @param formGroup the control group to be touched. */ private touchControls; }