import * as i0 from '@angular/core'; import { ElementRef, InjectionToken, AfterContentInit, AfterContentChecked, OnDestroy, QueryList, Renderer2, ChangeDetectorRef } from '@angular/core'; import { NgControl } from '@angular/forms'; import { Observable } from 'rxjs'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/tooltip'; import * as i11 from '@aposin/ng-aquila/base'; declare class NxFormfieldAppendixDirective { /** Sets the id of the formfield appendix. */ id: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxFormfieldErrorDirective { /** Sets the id of the formfield error. */ id: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** Type of formfield event that triggers change detection. */ type NxFormfieldUpdateEventType = 'change' | 'blur'; /** @docs-private */ declare abstract class NxFormfieldControl { value: T | null; readonly stateChanges: Observable; readonly empty: boolean; readonly id: string; readonly ngControl: NgControl | null; readonly focused: boolean; readonly required: boolean; readonly disabled: boolean; readonly readonly: boolean; readonly shouldLabelFloat?: boolean; readonly errorState: boolean; /** The placeholder for this control. */ readonly placeholder: string; /** * An optional name for the control type that can be used to distinguish `nx-formfield` elements * based on their control type. The form field will add a class, * `nx-formfield--type-{{controlType}}` to its root element. */ readonly controlType?: string; /** Change detection trigger event of this control. */ updateOn?: NxFormfieldUpdateEventType; abstract setDescribedByIds(ids: string[]): void; abstract setAriaLabel?(value: string): void; abstract get elementRef(): ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never, never, true, never>; } declare class NxFormfieldHintDirective { /** Sets the id of the formfield hint. */ id: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** A directive for passing more complex custom label content. */ declare class NxFormfieldLabelDirective { readonly el: ElementRef; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxFormfieldNoteDirective { /** Sets the id of the formfield note. */ id: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxFormfieldPrefixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxFormfieldSuffixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Represents the default options for the form field that can be configured * using the `FORMFIELD_DEFAULT_OPTIONS` injection token. */ interface FormfieldDefaultOptions { /** Sets the default appearance. (optional) */ appearance?: AppearanceType; /** Sets the default float label type. (optional) */ nxFloatLabel?: FloatLabelType; /** Sets the default change detection trigger event. (optional) */ updateOn?: NxFormfieldUpdateEventType; nxOptionalLabel?: string; } declare const FORMFIELD_DEFAULT_OPTIONS: InjectionToken; /** Type for the available floatLabel values. */ type FloatLabelType = 'always' | 'auto'; /** Type for the appearance of the formfield. */ type AppearanceType = 'outline' | 'auto'; declare class NxFormfieldComponent implements AfterContentInit, AfterContentChecked, OnDestroy { /** @docs-private */ readonly elementRef: ElementRef; private readonly renderer; private readonly _cdr; private readonly _defaultOptions; protected _negative: boolean; private _styles; /** Html id of the formfield label */ readonly labelId: string; _control: NxFormfieldControl; /** * Sets the label which will act as a floating label. * In addition, the component uses input and label to properly support accessibility. */ label?: string | null; /** * Set optional text, which will addtional show in label if a field is not mandatory. */ optionalLabel?: string | undefined; get optional(): string; _labelChild: NxFormfieldLabelDirective; _hintChildren: QueryList; _noteChildren: QueryList; _errorChildren: QueryList; _suffixChildren: QueryList; _prefixChildren: QueryList; _appendixChildren: QueryList; _connectionContainerRef: ElementRef; /** * Whether the label should float once the input is focused or filled (auto, default) * or force it to always float with a value of always to simulate a more static form. */ set floatLabel(value: FloatLabelType); get floatLabel(): FloatLabelType; private _floatLabel; /** * Sets the styling of the formfield. * If 'negative', a negative set of stylings is used. */ set styles(value: string); get styles(): string; /** * **Expert option** * * Sets the appearance of the formfield. */ set appearance(value: AppearanceType); get appearance(): AppearanceType; private _appearance; /** * * Sets the event that triggers change detection in the formfield. */ set updateOn(value: NxFormfieldUpdateEventType); get updateOn(): NxFormfieldUpdateEventType; private _updateOn; get _shouldAlwaysFloat(): boolean; /** @docs-private */ get shouldLabelFloat(): boolean; /** @docs-private */ get control(): NxFormfieldControl; private readonly _destroyed; constructor( /** @docs-private */ elementRef: ElementRef, renderer: Renderer2, _cdr: ChangeDetectorRef, _defaultOptions: FormfieldDefaultOptions | null); ngAfterContentInit(): void; ngAfterContentChecked(): void; ngOnDestroy(): void; /** @docs-private */ getDisplayedMessage(): 'note' | 'error' | ''; private _syncDescribedByIds; protected _validateControlChild(): void; /** Returns an element that overlays can attach to. */ getConnectedOverlayOrigin(): ElementRef; /** @docs-private */ _hasLabel(): boolean; /** * The placeholder is hidden when * - the control is not empty * - The label is not floated * @docs-private */ _hideControlPlaceholder(): boolean; _getTitle(): string; _onBlur(): void; _isRequired(): boolean; _isOutline(): boolean; _isNxInput(): any; /** @docs-private */ get inputValueText(): any; _isEllipsisActive(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxFormfieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { FORMFIELD_DEFAULT_OPTIONS, NxFormfieldAppendixDirective, NxFormfieldComponent, NxFormfieldControl, NxFormfieldErrorDirective, NxFormfieldHintDirective, NxFormfieldLabelDirective, NxFormfieldModule, NxFormfieldNoteDirective, NxFormfieldPrefixDirective, NxFormfieldSuffixDirective }; export type { AppearanceType, FloatLabelType, FormfieldDefaultOptions, NxFormfieldUpdateEventType };