import { ITimezoneOffset } from '../../types'; import { EAbsoluteTimePickerMode, IRelativeTimeInput } from '../absolute-time-picker/absolute-time-picker.types'; import { IRelativeTimePickerOption, ITimePickerRelativeTime, ITimePickerTimezone } from '../relative-time-picker/relative-time-picker.types'; import { ITimePickerTime, ITimePickerTimeState, SelectedTimestamp } from './time-picker.types'; /** * Generates the text displayed in the dropdown when the custom interval option is selected * @param range range in timestamp * @param timezone timezone applied to the timestamp * @returns label to be displayed in the dropdown */ export declare const buildCustomIntervalTimeRange: (range: SelectedTimestamp, timezone: string) => string; /** * Generates the text to be displayed by the tooltip when the dropdown input is hovered * @param range selectd range * @param timezones timezones available * @returns tooltip text to be displayed */ export declare const buildTooltipText: (range: SelectedTimestamp, selectdTimezone: ITimePickerTimezone, timezonesByOffset: ITimezoneOffset[]) => string; export declare const createTimestampInTimezoneFromFormattedDate: (date: string, timezone: string, format?: string) => number; /** * Transforms the selected timestamp range in formatted dates to be read by the kv-absolute-time-picker component * @param selectedOption selected ranges and timezone * @param defaultTimezone timezone used when the selected option has none * @param mode calendar mode; in single mode a relative option resolves to its end date * @returns range in the calendar date time format */ export declare const getAbsoluteTimePickerRangeDates: (selectedOption: ITimePickerTimeState, defaultTimezone: ITimePickerTimezone, mode?: EAbsoluteTimePickerMode) => string[]; export declare const getLast24HoursRange: () => SelectedTimestamp; export declare const getRelativeTimeInputText: (options: IRelativeTimePickerOption[][], selectedTimeOption: ITimePickerRelativeTime, timezone: string) => IRelativeTimeInput; export declare const getRelativeTimeLabel: (relativeTimeValue: string | undefined, relativeTimeOptions: IRelativeTimePickerOption[][]) => string | undefined; export declare const getTimestampFromDateRange: (range: SelectedTimestamp, previousTimezone: string, newTimezone: string) => SelectedTimestamp; export declare const hasRangeChanged: (componentRangeState: SelectedTimestamp, propRangeState: SelectedTimestamp) => boolean; export declare const validateNewRange: (range: SelectedTimestamp, expectedSize?: number) => boolean; /** * Computes the natural height of the relative time view so the dropdown wraps its content instead of * always reserving the maximum height. Mirrors the layout constants used by kv-relative-time-picker. * @param options relative time option groups * @param displayCustomizeInterval whether the customize interval option is rendered * @param displayTimezoneDropdown whether the timezone dropdown is rendered * @returns height in pixels, capped at the relative time picker maximum height */ export declare const getRelativeViewHeight: (options: IRelativeTimePickerOption[][] | undefined, displayCustomizeInterval: boolean, displayTimezoneDropdown: boolean) => number; export declare const getTimePickerEventPayload: (timeState: ITimePickerTimeState, timezone: ITimePickerTimezone) => ITimePickerTime;