import { OnInit, OnDestroy } from '@angular/core'; import { DynamicFieldConfig } from '../models'; import { Observable, Subscription } from 'rxjs'; import { FormGroup, AbstractControl } from '@angular/forms'; export declare class FieldContainerComponent implements OnInit, OnDestroy { config: DynamicFieldConfig; group: FormGroup; inlineField: boolean; showField: Observable; alignFormWithView$: Observable; subs: Subscription[]; constructor(); ngOnInit(): void; ngOnDestroy(): void; /** * Connects user defined show field function to the the view, so that the UI is shown/hidden * appropriately. It also keeps the form value in line with the view i.e. adds/removes field value * from form value as it is shown/hidden. We call it here because it will effect all form fields and * we have easy access to the form group and field configuration here. * @param group used to get valueChanges from control * @param config configuration object used to */ connectShowField(group: FormGroup, config?: DynamicFieldConfig): Observable; /** * We use this function to align the form values with the changes to the view. i.e. when a value is removed from the view. * We don't want the form to still emit that value when submitted or throw validation errors on a field that has been removed. * @param control the control we want to disable/enable when we are hiding/showing */ alignFormWithView(control: AbstractControl): (shouldShowField: boolean) => void; }