import { EventEmitter } from '../../stencil-public-runtime'; import { ITextField } from '../text-field/text-field.types'; import { ETimePickerView } from './time-picker.types'; import { ComputePositionConfig } from '@floating-ui/dom'; import { EAbsoluteTimePickerMode, ETooltipPosition, ITimezoneOffset } from '../../types'; import { IRelativeTimePickerOption } from '../relative-time-picker/relative-time-picker.types'; import { ITimePicker, ITimePickerEvents, ITimePickerTimeState, ITimePickerTime } from './time-picker.types'; export declare class KvTimePicker implements ITimePicker, ITimePickerEvents { /** @inheritdoc */ inputConfig?: Partial; /** @inheritdoc */ dropdownPositionOptions?: Partial; /** @inheritdoc */ isOpen?: boolean; /** @inheritdoc */ actionElement?: HTMLElement | null; /** @inheritdoc */ disabled?: boolean; /** @inheritdoc */ showCalendar?: boolean; /** @inheritdoc */ selectedTimeOption?: ITimePickerTimeState | ITimePickerTime; /** @inheritdoc */ relativeTimePickerOptions?: IRelativeTimePickerOption[][]; /** @inheritdoc */ timezones?: ITimezoneOffset[]; /** @inheritdoc */ disableTimezoneSelection?: boolean; /** @inheritdoc */ displayCustomizeInterval?: boolean; /** @inheritdoc */ displayTimezoneDropdown?: boolean; /** @inheritdoc */ displayCalendarToggle?: boolean; /** @inheritdoc */ calendarMode?: EAbsoluteTimePickerMode; /** @inheritdoc */ calendarInputMinDate?: number; /** @inheritdoc */ calendarInputMaxDate?: number; /** @inheritdoc */ zIndex?: number; /** @inheritdoc */ tooltipPosition?: ETooltipPosition; timePickerView: ETimePickerView; selectedTimeState: ITimePickerTimeState; applyButtontooltipText: string; calendarViewLocked: boolean; timezoneSelectionContentVisible: boolean; internalDropdownsOpen: boolean; /** @inheritdoc */ timeRangeChange: EventEmitter; /** @inheritdoc */ dropdownStateChange: EventEmitter; /** @inheritdoc */ cancelClicked: EventEmitter>; /** @inheritdoc */ showCalendarStateChange: EventEmitter; handleSelectTimeStateChange(): void; handleShowCalendarChange(value: boolean): void; componentWillLoad(): void; private syncShowCalendarViewState; /** * Keeps `selectedTimeState` coherent with the prop, on mount and on every change. * * Clearing the prop resets to the default state rather than spreading nothing. The * watcher used to assign `{ ...timeState, timezone }` unconditionally, so a consumer * setting `selectedTimeOption` back to `undefined` left an object with no `range` — * and everything that reads `selectedTimeState.range` (the calendar range, the * tooltip, `hasRangeChanged`) then saw `undefined`. The render threw, and because a * throwing render never patches the vdom, `isOpen` stopped reaching the panel and the * dropdown could not be opened again for the life of that instance. */ private syncTimeState; private syncTimeStateWithTimeOption; private resetDefaultSelectedTimeState; private getSelectedTimezone; private onDropdownChange; /** * Syncs the draft selection. Also fires from `kv-relative-time-picker`'s periodic refresh as a * "now"-relative range moves, so it must never commit — see `onRelativeTimeOptionClicked`. */ private onSelectedRelativeTimeChange; /** * A click on a relative option is the confirmation, so it commits and closes — unless a calendar is * on screen, where Apply confirms instead. */ private onRelativeTimeOptionClicked; private onClickSeeCustomInterval; private onSelectedTimezoneChange; /** * Re-anchors the selected range to a newly picked timezone. A custom interval keeps its wall-clock * dates; a relative option is recomputed from its definition so its boundaries land in the new zone. */ private getRangeInTimezone; private onClickApply; /** Publishes a selection without dismissing the panel */ private emitTimeRangeChange; /** Publishes a selection and dismisses the panel */ private commitTimeState; private onClickBack; private onClickCancel; private undoLastChanges; private onShowCalendarClick; private getRelativeTimeInputConfig; private handleRelativeTimeConfigReset; private handleAbsoluteDatesChange; private displayInputWrapperContent; private getCalendarLimitDatesFormatted; /** * Apply/Cancel exist to confirm a calendar selection, where a half-picked range is not yet a valid * choice. In the plain option list the click is itself the confirmation, so they are dropped. */ private isCalendarVisible; private isCalendarToggleVisible; private isFooterVisible; private isSingleCustomInterval; private getExpectedRangeSize; private isApplyButtonDisabled; private updateApplyButtonConfig; private getDropdownInputValue; private getTextFieldTooltip; private getFormattedSelectedTime; private getInputConfig; /** * Returns the apply button tooltip helptext * @returns apply button help text */ private getApplyButtonTooltipText; /** * Transforms the timestamp into absolute-time-picker dates in the format: YYYY/MM/DD HH:mm:ss * @returns formatted dates to the absolute time picker component */ private getAbsoluteRange; private onInternalDropdownsStateChange; render(): any; }