UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

40 lines (39 loc) 2.24 kB
import { AfterViewInit, ApplicationRef, ChangeDetectorRef, ComponentFactoryResolver, Injector, OnDestroy } from '@angular/core'; import { FormGroupDirective, NgControl, NgForm } from '@angular/forms'; import { Observable } from 'rxjs'; import { StringMap } from '../../core/public-api'; import { BaseErrorsMapper } from './base-errors-mapper'; import { ErrorsMapperFn } from './types'; import * as i0 from "@angular/core"; export declare class ErrorsMapperDirective extends BaseErrorsMapper implements AfterViewInit, OnDestroy { injector: Injector; private readonly cdr; private readonly cfr; private readonly appRef; private readonly control; private readonly ngForm; private readonly formGroup; aclErrorsMapper: StringMap | ''; aclErrorsMapperFn: ErrorsMapperFn; aclErrorsMapperDisabled: boolean; /** * disable errors mapper */ aclErrorsMapperDisabled$: Observable<boolean>; /** * specify outlet, consider this other than specific control entity to make sure di can always get ngForm */ aclErrorsMapperOutlet: Element; aclErrorsMapperControlName: string; private portal; private portalHost; private portalAttach; private readonly destroy$; constructor(injector: Injector, cdr: ChangeDetectorRef, cfr: ComponentFactoryResolver, appRef: ApplicationRef, control: NgControl, ngForm: NgForm, formGroup: FormGroupDirective); ngAfterViewInit(): void; updateContent(content: string): void; initPortal(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsMapperDirective, [null, null, null, null, { self: true; }, { optional: true; }, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<ErrorsMapperDirective, "[aclErrorsMapper]", never, { "aclErrorsMapper": { "alias": "aclErrorsMapper"; "required": false; }; "aclErrorsMapperFn": { "alias": "aclErrorsMapperFn"; "required": false; }; "aclErrorsMapperDisabled": { "alias": "aclErrorsMapperDisabled"; "required": false; }; "aclErrorsMapperOutlet": { "alias": "aclErrorsMapperOutlet"; "required": false; }; "aclErrorsMapperControlName": { "alias": "aclErrorsMapperControlName"; "required": false; }; }, {}, never, never, true, never>; }