import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { AbstractControl } from '@angular/forms'; import { AnnotationIndicatorStatus, IndicatorStatusRepeater } from '@mtna/annotations-ui'; import { MtnaLogger } from '@mtna/lib-ui'; import { ValueItem } from '../../models/form/item/value-item'; import { BaseFormItem } from '../base-form-item'; import { MtnaWfManagerService } from '../core/services/form-manager.service'; import { FormItemDirective } from '../form-item.directive'; import { MtnaWfItemWhiteList } from '../white-list'; export declare class ValueItemComponent implements AfterViewInit, IndicatorStatusRepeater, OnChanges, OnDestroy { private cdf; private cfResolver; private formManager; private logger; private whiteList; /** the container for adding dynamic form items */ itemHost: FormItemDirective; control: AbstractControl; indicatorStatus: AnnotationIndicatorStatus; item: ValueItem; inList: boolean; parentIds: Array; readonly: boolean; /** the reference to a dynamically rendered component */ componentRef: ComponentRef; /** The list of pre-existing(non-dynamic) item types * If this item's itemId does not match one of the following, then * this item is a dynamic component registered by the client application * & requires the ComponentFactory to create the component. */ fixedItemTypes: string[]; constructor(cdf: ChangeDetectorRef, cfResolver: ComponentFactoryResolver, formManager: MtnaWfManagerService, logger: MtnaLogger, whiteList: MtnaWfItemWhiteList); /** * Sets a value on the control for any components that only emit a value & * do not directly manipulate their control themselves, i.e. a FileUploadItem * * @param item the value to be set on the control */ setValue(item: any): void; /** * Renders a dynamic component from a relevant type in the FormService (registered)components; * ONLY if the item type(using itemId) does not match one of the existing fixedItemTypes * */ ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Used to destroy the componentRef to a dynamic component, if it was rendered. * */ ngOnDestroy(): void; }