UNPKG

@clr/angular

Version:

Angular components for Clarity

49 lines (48 loc) 2.42 kB
import { AfterContentInit, OnDestroy } from '@angular/core'; import { NgControl } from '@angular/forms'; import { Subscription } from 'rxjs'; import { DynamicWrapper } from '../../utils/host-wrapping/dynamic-wrapper'; import { ClrControlError } from './error'; import { ClrControlHelper } from './helper'; import { IfControlStateService } from './if-control-state/if-control-state.service'; import { ClrLabel } from './label'; import { ControlClassService } from './providers/control-class.service'; import { LayoutService } from './providers/layout.service'; import { NgControlService } from './providers/ng-control.service'; import { ClrControlSuccess } from './success'; import * as i0 from "@angular/core"; export declare abstract class ClrAbstractContainer implements DynamicWrapper, OnDestroy, AfterContentInit { protected ifControlStateService: IfControlStateService; protected layoutService: LayoutService; protected controlClassService: ControlClassService; protected ngControlService: NgControlService; label: ClrLabel; controlSuccessComponent: ClrControlSuccess; controlErrorComponent: ClrControlError; controlHelperComponent: ClrControlHelper; control: NgControl; _dynamic: boolean; protected subscriptions: Subscription[]; private state; constructor(ifControlStateService: IfControlStateService, layoutService: LayoutService, controlClassService: ControlClassService, ngControlService: NgControlService); /** * @NOTE * Helper control is a bit different than the others, it must be visible most of the time: * - Helper must NOT be visible when CONTROL_STATE is not NONE and Success or Error components are \ * defined. * * For example user implement only Error control then if CONTROL_STATE is VALID then helper * control must be visible. */ get showHelper(): boolean; get showValid(): boolean; get showInvalid(): boolean; private get touched(); ngAfterContentInit(): void; ngOnDestroy(): void; controlClass(): string; addGrid(): boolean; private updateHelpers; static ɵfac: i0.ɵɵFactoryDeclaration<ClrAbstractContainer, [null, { optional: true; }, null, null]>; static ɵdir: i0.ɵɵDirectiveDeclaration<ClrAbstractContainer, never, never, {}, {}, ["label", "controlSuccessComponent", "controlErrorComponent", "controlHelperComponent"], never, false, never>; }