import { BooleanInput } from '@angular/cdk/coercion'; import { Platform } from '@angular/cdk/platform'; import { AutofillMonitor } from '@angular/cdk/text-field'; import * as i0 from '@angular/core'; import { InjectionToken, OnInit, DoCheck, OnChanges, OnDestroy, ElementRef, AfterViewInit, ChangeDetectorRef } from '@angular/core'; import { NgControl, NgForm, FormGroupDirective } from '@angular/forms'; import * as i2 from '@aposin/ng-aquila/formfield'; import { NxFormfieldControl, NxFormfieldUpdateEventType } from '@aposin/ng-aquila/formfield'; import { NxAbstractControl } from '@aposin/ng-aquila/shared'; import { ErrorStateMatcher } from '@aposin/ng-aquila/utils'; import { Subject } from 'rxjs'; import * as i1 from '@angular/common'; import * as i3 from '@aposin/ng-aquila/icon'; import { FocusMonitor } from '@angular/cdk/a11y'; declare const NX_INPUT_VALUE_ACCESSOR: InjectionToken; interface NxInputValueAccessor { value: any; setReadonly?(value: boolean): void; } declare class NxInputDirective implements OnInit, DoCheck, OnChanges, OnDestroy, NxFormfieldControl, NxAbstractControl { protected readonly _elementRef: ElementRef; protected readonly _platform: Platform; /** @docs-private */ readonly ngControl: NgControl | null; private readonly _parentForm; private readonly _parentFormGroup; private readonly _errorStateMatcher; private inputValueAccessor; private readonly _autofillMonitor; protected _uid: string; protected _previousNativeValue: any; private _inputValueAccessor; _ariaDescribedby: string; _ariaLabel: string; /** @docs-private */ errorState: boolean; /** * Name of this control that is used inside the formfield component * @docs-private */ controlType: string; /** @docs-private */ autofilled: boolean; /** @docs-private */ readonly stateChanges: Subject; /** @docs-private */ focused: boolean; /** The id of the input. */ set id(value: string); get id(): string; protected _id: string; /** The input element's value. */ set value(value: any); get value(): any; /** Whether the element is readonly. */ set readonly(value: BooleanInput); get readonly(): boolean; private _readonly; /** set readonly state */ setReadonly(value: boolean): void; /** Whether the input is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; protected _disabled: boolean; /** Whether the element is required. */ set required(value: any); get required(): any; protected _required: boolean | undefined; /** Sets the type of the input element (e.g. password, text etc). */ set type(value: string); get type(): string; protected _type: string; /** * Sets the text for the input placeholder. */ set placeholder(value: string); get placeholder(): string; private _placeholder; /** * * Sets the event that triggers change detection in the input. */ set updateOn(value: NxFormfieldUpdateEventType); get updateOn(): NxFormfieldUpdateEventType; private _updateOn; private readonly _destroyed; constructor(_elementRef: ElementRef, _platform: Platform, /** @docs-private */ ngControl: NgControl | null, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, _errorStateMatcher: ErrorStateMatcher, inputValueAccessor: NxInputValueAccessor | null, _autofillMonitor: AutofillMonitor); ngOnInit(): void; /** @docs-private */ get elementRef(): ElementRef; _focusChanged(isFocused: boolean): void; _detectInputChanges(): void; ngOnChanges(): void; ngOnDestroy(): void; ngDoCheck(): void; /** @docs-private */ updateErrorState(): void; /** * Set a list of ids that is currently describing this input * (if you have hints and errors for example). */ setDescribedByIds(ids: string[]): void; /** * Method to set the aria label. * This is required if you use the input outside of a formfield * where you don't have a label connected. */ setAriaLabel(value: string): void; protected _isBadInput(): boolean; /** @docs-private */ get empty(): boolean; protected _isNeverEmpty(): boolean; protected _isTextarea(): boolean; protected _validateType(): void; /** @docs-private */ get shouldLabelFloat(): boolean; protected _dirtyCheckNativeValue(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxPasswordToggleComponent implements AfterViewInit, OnDestroy { private readonly _cdr; private readonly _elementRef; private readonly _focusMonitor; /** Input element using the toggle functionality. */ control: HTMLInputElement; /** @docs-private */ _currentIcon: string; /** @docs-private */ _pressed: boolean; /** * Sets the aria-label needed for accessibility. * Notice that this `aria-label` should describe the initial action according to the status of the visibility. * E.g if you have an `input[type=password]` at the beginning then the * password will be hidden and the correct aria-label would be 'Show password.' */ set ariaLabel(value: string); get ariaLabel(): string; private _ariaLabel; constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngOnDestroy(): void; /** Toggles the type of the input. */ toggleInputType(): void; /** @docs-private */ toggleIcon(): void; /** @docs-private */ _onKeydown($event: KeyboardEvent): void; /** @docs-private */ get tabindex(): number | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NX_INPUT_VALUE_ACCESSOR, NxInputDirective, NxInputModule, NxPasswordToggleComponent }; export type { NxInputValueAccessor };