import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { CreateDateValue, KnoraDate, KnoraPeriod, ReadDateValue, UpdateDateValue } from '@dasch-swiss/dsp-js'; import { Subscription } from 'rxjs'; import { BaseValueComponent } from '../base-value.component'; import { ValueErrorStateMatcher } from '../value-error-state-matcher'; import { DateInputComponent } from './date-input/date-input.component'; export declare class DateValueComponent extends BaseValueComponent implements OnInit, OnChanges, OnDestroy { private _fb; dateInputComponent: DateInputComponent; displayValue?: ReadDateValue; displayOptions?: 'era' | 'calendar' | 'all'; labels: boolean; ontologyDateFormat: string; valueFormControl: FormControl; commentFormControl: FormControl; form: FormGroup; valueChangesSubscription: Subscription; customValidators: any[]; matcher: ValueErrorStateMatcher; constructor(_fb: FormBuilder); /** * Returns true if both dates are the same. * * @param date1 date for comparison with date2 * @param date2 date for comparison with date1 */ sameDate(date1: KnoraDate, date2: KnoraDate): boolean; standardValueComparisonFunc(initValue: KnoraDate | KnoraPeriod, curValue: KnoraDate | KnoraPeriod | null): boolean; getInitValue(): KnoraDate | KnoraPeriod | null; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; /** * Given a value and a period or Date, populates the value. * * @param value the value to be populated. * @param dateOrPeriod the date or period to read from. */ populateValue(value: UpdateDateValue | CreateDateValue, dateOrPeriod: KnoraDate | KnoraPeriod): void; getNewValue(): CreateDateValue | false; getUpdatedValue(): UpdateDateValue | false; }