import { DoCheck, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import { CanUpdateErrorState, CanUpdateErrorStateCtor, ErrorStateMatcher } from '@angular/material/core'; import { ControlValueAccessor, FormBuilder, FormControl, FormGroup, FormGroupDirective, NgControl, NgForm } from '@angular/forms'; import { MatFormFieldControl } from '@angular/material/form-field'; import { KnoraDate, KnoraPeriod } from '@dasch-swiss/dsp-js'; import { Subject } from 'rxjs'; import { FocusMonitor } from '@angular/cdk/a11y'; import { ValueService } from '../../../../services/value.service'; declare class MatInputBase { _defaultErrorStateMatcher: ErrorStateMatcher; _parentForm: NgForm; _parentFormGroup: FormGroupDirective; ngControl: NgControl; constructor(_defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl); } declare const _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase; export declare class DateEditComponent extends _MatInputMixinBase implements ControlValueAccessor, MatFormFieldControl, DoCheck, CanUpdateErrorState, OnDestroy, OnInit, OnChanges { ngControl: NgControl; private _fm; private _elRef; private _valueService; static nextId: number; calendar: string; valueRequiredValidator: boolean; form: FormGroup; stateChanges: Subject; eraControl: FormControl; yearControl: FormControl; monthControl: FormControl; dayControl: FormControl; months: number[]; days: any[]; readonly focused = false; readonly controlType = "dsp-date-edit"; private _subscriptions; get value(): KnoraDate | null; set value(date: KnoraDate | null); get disabled(): boolean; set disabled(value: boolean); private _disabled; get placeholder(): string; set placeholder(plh: string); private _placeholder; get required(): boolean; set required(req: boolean); private _required; get shouldLabelFloat(): boolean; id: string; onChange: (_: any) => void; onTouched: () => void; get empty(): boolean; constructor(fb: FormBuilder, ngControl: NgControl, _fm: FocusMonitor, _elRef: ElementRef, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _defaultErrorStateMatcher: ErrorStateMatcher, _valueService: ValueService); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngDoCheck(): void; ngOnDestroy(): void; writeValue(date: KnoraDate | null): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; _handleInput(): void; onContainerClick(event: MouseEvent): void; setDescribedByIds(ids: string[]): void; /** * * Sets available days for a given year and month. * * @param calendar calendar of the given date. * @param era era of the given date. * @param year year of the given date. * @param month month of the given date. */ private _setDays; /** * Inits the era control depending on the chosen calendar. * * @param calendar active calendar. * @param era era to set. */ private _initEra; } export {};