UNPKG

2.26 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Akveo. All Rights Reserved.
4 * Licensed under the MIT License. See License.txt in the project root for license information.
5 */
6import { AfterContentChecked, ChangeDetectorRef, QueryList, AfterContentInit, OnDestroy, NgZone, ElementRef, Renderer2, AfterViewInit } from '@angular/core';
7import { Subject, Observable, ReplaySubject } from 'rxjs';
8import { NbPrefixDirective } from './prefix.directive';
9import { NbSuffixDirective } from './suffix.directive';
10import { NbFormFieldControl, NbFormControlState, NbFormFieldControlConfig } from './form-field-control';
11import * as i0 from "@angular/core";
12export type NbFormControlAddon = 'prefix' | 'suffix';
13export declare class NbFormFieldComponent implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
14 protected cd: ChangeDetectorRef;
15 protected zone: NgZone;
16 protected elementRef: ElementRef;
17 protected renderer: Renderer2;
18 protected readonly destroy$: Subject<void>;
19 protected formControlState$: ReplaySubject<NbFormControlState>;
20 prefixClasses$: Observable<string[]>;
21 suffixClasses$: Observable<string[]>;
22 prefix: QueryList<NbPrefixDirective>;
23 suffix: QueryList<NbSuffixDirective>;
24 formControl: NbFormFieldControl;
25 formControlConfig: NbFormFieldControlConfig;
26 formFieldClasses: any;
27 constructor(cd: ChangeDetectorRef, zone: NgZone, elementRef: ElementRef, renderer: Renderer2);
28 ngAfterContentChecked(): void;
29 ngAfterContentInit(): void;
30 ngAfterViewInit(): void;
31 ngOnDestroy(): void;
32 shouldShowPrefix(): boolean;
33 shouldShowSuffix(): boolean;
34 protected subscribeToFormControlStateChange(): void;
35 protected subscribeToAddonChange(): void;
36 protected getAddonClasses(addon: NbFormControlAddon, state: NbFormControlState): string[];
37 protected getFormControlConfig(): NbFormFieldControlConfig;
38 protected isStatesEqual(oldState: NbFormControlState, state: NbFormControlState): boolean;
39 static ɵfac: i0.ɵɵFactoryDeclaration<NbFormFieldComponent, never>;
40 static ɵcmp: i0.ɵɵComponentDeclaration<NbFormFieldComponent, "nb-form-field", never, {}, {}, ["formControl", "formControlConfig", "prefix", "suffix"], ["[nbPrefix]", "*", "[nbSuffix]"], false, never>;
41}