import * as i8 from '@angular/cdk/a11y'; import { Highlightable, FocusMonitor, ActiveDescendantKeyManager } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i6 from '@angular/cdk/overlay'; import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay'; import * as i0 from '@angular/core'; import { ChangeDetectorRef, InjectionToken, AfterViewInit, OnDestroy, DoCheck, OnInit, OnChanges, WritableSignal, EventEmitter, ElementRef, QueryList, Injector, SimpleChanges } from '@angular/core'; import * as i2 from '@angular/forms'; import { ControlValueAccessor, Validator, NgControl, NgForm, FormGroupDirective, AbstractControl, ValidationErrors } from '@angular/forms'; import { NxErrorComponent } from '@aposin/ng-aquila/base'; import * as i9 from '@aposin/ng-aquila/formfield'; import { NxFormfieldControl, NxFormfieldComponent, AppearanceType, FormfieldDefaultOptions, NxFormfieldUpdateEventType } from '@aposin/ng-aquila/formfield'; import { ErrorStateMatcher } from '@aposin/ng-aquila/utils'; import { Subject } from 'rxjs'; import * as i1 from '@angular/common'; import * as i3 from '@aposin/ng-aquila/radio-button'; import * as i4 from '@aposin/ng-aquila/icon'; import * as i5 from '@aposin/ng-aquila/button'; import * as i7 from '@aposin/ng-aquila/radio-toggle'; import * as i10 from '@aposin/ng-aquila/input'; declare class NxTimefieldIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** Label that should replace the 'hours' aria-label of the input field. */ inputFieldHoursAriaLabel: string; /** Label that should replace the 'minutes' input field of the aria-label. */ inputFieldMinutesAriaLabel: string; /** Label for the time picker button. */ buttonOpenTimepickerAriaLabel: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class NxTimefieldOption implements Highlightable { private readonly _cdr; protected _active: boolean; value: string; selected: boolean; /** The id of the option's host element. */ get id(): string; set id(value: string); private _id; private _generatedId; /** The option's host element */ readonly element: HTMLElement; constructor(_cdr: ChangeDetectorRef); setActiveStyles(): void; setInactiveStyles(): void; disabled?: boolean | undefined; getLabel?(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const DEFAULT_END_TIME = "24:00"; declare const DEFAULT_START_TIME = "00:00"; declare const DEFAULT_TIME_SPAN = 30; type TimepickerOption = { value: string; label: string; }; type InputModeType = 'decimal' | 'numeric' | 'tel' | 'text'; declare function TIMEFIELD_DEFAULT_OPTIONS_FACTORY(): TimefieldDefaultOptions; declare const TIMEFIELD_DEFAULT_OPTIONS: InjectionToken; declare class TimefieldDefaultOptions { withTimepicker: boolean; } declare class NxTimefieldControl implements NxFormfieldControl { timefield: NxTimefieldComponent; ngControl: NgControl | null; value: string | null; readonly stateChanges: Subject; get empty(): boolean; id: string; focused: boolean; required: boolean; disabled: boolean; readonly: boolean; readonly shouldLabelFloat = true; errorState: boolean; placeholder: string; controlType: string; updateOn: NxFormfieldUpdateEventType; setDescribedByIds(ids: string[]): void; setAriaLabel?(value: string): void; get elementRef(): ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxTimefieldComponent implements ControlValueAccessor, AfterViewInit, OnDestroy, DoCheck, OnInit, OnChanges, Validator { private readonly _cdr; private readonly _errorStateMatcher; private readonly _parentForm; private readonly _parentFormGroup; readonly _intl: NxTimefieldIntl; private readonly _elementRef; private injector; private readonly _formfieldDefaultOptions?; private readonly _timefieldDefaultOptions?; /** @docs-private */ errorState: WritableSignal; formfield: NxFormfieldComponent; error: NxErrorComponent | undefined; _toggleAMPM: string | null; protected isOpen: boolean; protected readonly intl: NxTimefieldIntl; protected readonly focusMonitor: FocusMonitor; ngControl: NgControl | null; appearance: AppearanceType; hint: string; optionalLabel: string; /** The inputmode for the formfield. */ inputMode: InputModeType; private _withTimepicker; set withTimepicker(value: boolean); get withTimepicker(): boolean; enableTimeValidation: boolean; readonly valueChange: EventEmitter; timePickerList?: ElementRef; toggleButton: ElementRef; overlayOrigin: CdkOverlayOrigin; inputMinutes: ElementRef; inputHours: ElementRef; overlay?: CdkConnectedOverlay; timepickerOptions: QueryList; private destroyRef; timeList: TimepickerOption[]; pickerValue: any; protected _keyManager?: ActiveDescendantKeyManager; handleKeyDown(event: KeyboardEvent): void; private readonly _idMinutes; /** The id of the minutes input field. */ get idMinutes(): string; private readonly _idHours; /** The id of the hours input field. */ get idHours(): string; private readonly _idRadioGroup; /** The id of the am/pm selection. */ get idRadioGroup(): string; private readonly _idOptionList; /** The id of option list in the timepicker overlay. */ get idOptionList(): string; private _maxHours; /** @docs-private */ get maxHours(): number; private _minHours; /** @docs-private */ get minHours(): number; private readonly _maxMinutes; /** @docs-private */ get maxMinutes(): number; private readonly _minMinutes; /** @docs-private */ get minMinutes(): number; private _time; /** @docs-private */ set time(value: string); get time(): string; /** Whether to show the time in 12-hour format with AM/PM toggle. Default: false. */ set twelveHourFormat(value: BooleanInput); get twelveHourFormat(): boolean; private _twelveHourFormat; /** Sets the label which is displayed on top of timefield. */ set label(value: string); get label(): string; private _label; /** Sets the AM radio button label which is displayed in radio group. */ set labelAM(value: string); get labelAM(): string; private _labelAM; /** Sets the PM radio button label which is displayed in radio group. */ set labelPM(value: string); get labelPM(): string; private _labelPM; /** Sets the placeholder of hours field. Default: 'hh' */ set placeholderHours(value: string); get placeholderHours(): string; private _placeholderHours; /** Sets the placeholder of minutes field. Default: 'mm' */ set placeholderMinutes(value: string); get placeholderMinutes(): string; private _placeholderMinutes; /** Whether the timefield is required. */ set required(value: BooleanInput); get required(): boolean; private _required; /** Whether the timefield uses the negative set of styling. */ set negative(value: BooleanInput); get negative(): BooleanInput; private _negative; pickerStartTime: string; pickerEndTime: string; pickerTimeInterval: number; /** Whether the timefield is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; private _hours; /** @docs-private */ set hours(value: string); get hours(): string; private _minutes; /** @docs-private */ set minutes(value: string); get minutes(): string; protected hasFocus: boolean; get elementRef(): ElementRef; protected _overlayWidth: string | number; constructor(_cdr: ChangeDetectorRef, _errorStateMatcher: ErrorStateMatcher, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, _intl: NxTimefieldIntl, _elementRef: ElementRef, injector: Injector, _formfieldDefaultOptions?: FormfieldDefaultOptions | undefined, _timefieldDefaultOptions?: TimefieldDefaultOptions | undefined); validate(control: AbstractControl): ValidationErrors | null; ngAfterViewInit(): void; ngDoCheck(): void; ngOnInit(): void; private _createTimelist; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; /** @docs-private */ updateErrorState(): void; toggleOverlay(): void; openOverlay(): void; closeOverlay(): void; toggleButtonClick(): void; private _convertToISOFormat; _updateTime(): void; _onFocus(): void; _getAriaLabel(type: string): string; _onInput(event: Event, type: string): void; _onBlur(event: FocusEvent): void; _onInputBlur(element: 'hours' | 'minutes'): void; private _timeInTwentyFourHourFormat; private _isValidInput; private _isValidTime; private _parseAndSetTime; selectOption(value?: string): void; preventFocus(event: Event): void; scrollSelectedItemIntoView(): void; findClosestOption(time: string): NxTimefieldOption | undefined; scrollOptionIntoView(option: NxTimefieldOption): void; writeValue(value: string): void; private _onTouchedCallback; private _onChangeCallback; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; getLabelledBy(): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_withTimepicker: unknown; static ngAcceptInputType_enableTimeValidation: unknown; static ngAcceptInputType_pickerTimeInterval: unknown; } declare class NxTimefieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { DEFAULT_END_TIME, DEFAULT_START_TIME, DEFAULT_TIME_SPAN, NxTimefieldComponent, NxTimefieldControl, NxTimefieldIntl, NxTimefieldModule, NxTimefieldOption, TIMEFIELD_DEFAULT_OPTIONS, TIMEFIELD_DEFAULT_OPTIONS_FACTORY, TimefieldDefaultOptions }; export type { InputModeType, TimepickerOption };