import { LitElement } from 'lit'; import { TimeProperty } from 'ngeo/datasource/OGC'; /** * Base class for OGC time based input component (slider, datepicker) * The "time" property (config) is mandatory. * Emits a custom event "change" with the selected value. */ export default class GmfTimeInput extends LitElement { private _time?; set time(timeObj: TimeProperty | undefined); get time(): TimeProperty | undefined; protected timeProp?: TimeProperty; protected dateStart?: number; protected dateEnd?: number; /** * Set up the start and the end date based on the time attribute. * @protected */ protected setupMinMaxDefaultValues(): void; /** * Update start time on input change. * @param event input event. * @protected */ protected onDateStartSelected(event: InputEvent): void; /** * Update end time on input change. * @param event input event. * @protected */ protected onDateEndSelected(event: InputEvent): void; /** * Updates the displayed time. * @param dateStart start timestamp. * @param dateEnd optional end timestamp. * @protected */ protected updateTime(dateStart: number, dateEnd?: number): void; /** * Dispatch a "change" event with the new time value. * @protected */ protected emitChangeEvent(): void; /** * Get correct input time object form provided time object. * @protected */ protected getCorrectTimeObject(): void; /** * @param dateTxt a string date like '2006-12-01T00:00:00Z' * @returns a string iso date like '2006-12-01'. * @protected */ protected asIsoDateString(dateTxt: string): string; /** * @returns true if the "time range" mode must be displayed. * @protected */ protected isTimeRange(): boolean; }