/** @packageDocumentation * @module Timeline */ import "./TimelineComponent.scss"; import * as React from "react"; import type { DateFormatOptions } from "@itwin/components-react"; import type { Slider } from "@itwin/itwinui-react"; import type { PlaybackSettings } from "./interfaces.js"; /** [[TimelineMenuItemOption]]: specifies how the app wants the timeline speeds to be installed on the TimelineComponent's ContextMenu * "replace" : use the app-supplied items in place of the standard items * "append" : add the app-supplied items following the standard items * "prefix" : add the app-supplied items before the standard items * * @public */ export type TimelineMenuItemOption = "replace" | "append" | "prefix"; /** [[TimelineMenuItemProps]] specifies playback speed entries in the Timeline's ContextMenu * @public */ export interface TimelineMenuItemProps { /** localized label for menu item */ label: string; /** duration for the entire timeline to play */ timelineDuration: number; } /** TimelineDateMarkerProps: Mark a date on the timeline with an indicator * @public */ export interface TimelineDateMarkerProps { /** Date to mark. If undefined, today's date will be used. */ date?: Date; /** ReactNode to use as the marker on the timeline. If undefined, a short vertical bar will mark the date. */ dateMarker?: React.ReactNode; } /** [[TimelineComponentProps]] configure the timeline * @public */ export interface TimelineComponentProps { /** Start date: beginning of the date range of a date-based timeline. */ startDate?: Date; /** End date: end of the date range of a date-based timeline. */ endDate?: Date; /** Total duration: range of the timeline in milliseconds. * @note This can be changed by user interaction. See {@link TimelineComponentProps.appMenuItems}. */ totalDuration: number; /** Initial value for the current duration (the location of the thumb) in milliseconds */ initialDuration?: number; /** Show in minimized mode (For future use. This prop will always be treated as true.) * @deprecated in 4.10.0. Has no effect. */ minimized?: boolean; /** When playing, repeat indefinitely. Defaults to `false`. * @note This can be changed by user interaction. See {@link TimelineComponentProps.includeRepeat}. */ repeat?: boolean; /** Show duration instead of time */ showDuration?: boolean; /** Callback with current duration value (as a fraction) */ onChange?: (duration: number) => void; /** Callback triggered when play/pause button is pressed */ onPlayPause?: (playing: boolean) => void; /** Callback triggered when backward/forward buttons are pressed. * @deprecated in 4.10.0. Has no effect. */ onJump?: (forward: boolean) => void; /** Callback triggered when a setting is changed */ onSettingsChange?: (arg: PlaybackSettings) => void; /** Always display in miniMode with no expand menu (For future use. This prop will always be treated as true) * @deprecated in 4.10.0. Has no effect. */ alwaysMinimized?: boolean; /** ComponentId -- must be set to use TimelineComponentEvents * @deprecated in 4.11.0. Use the isPlaying prop instead. */ componentId?: string; /** Include the repeat option on the Timeline Context Menu. Defaults to `true`. */ includeRepeat?: boolean; /** App-supplied speed entries in the Timeline Context Menu. Defaults to `[Slow, Medium, Fast]` items. */ appMenuItems?: TimelineMenuItemProps[]; /** How to include the supplied app menu items in the Timeline Context Menu (prefix, append or replace). Defaults to `replace`. */ appMenuItemOption?: TimelineMenuItemOption; /** Display date and time offset by the number of minutes specified. When undefined - local timezone will be used */ timeZoneOffset?: number; /** Display a marker on the timeline rail to indicate current date - will only work if starDate and endDate are defined */ markDate?: TimelineDateMarkerProps; /** Options used to format date string. If not defined it will user browser default locale settings. */ dateFormatOptions?: DateFormatOptions; /** Options used to format time string. If not defined it will user browser default locale settings. */ timeFormatOptions?: DateFormatOptions; /** Used to control the play/pause state of the Timeline.*/ isPlaying?: boolean; /** Props for a container that holds the slider thumbs and tracks. */ trackContainerProps?: React.ComponentProps["trackContainerProps"]; } /** [[TimelineComponent]] is used to playback timeline data * @public */ export declare function TimelineComponent(props: TimelineComponentProps): React.JSX.Element; //# sourceMappingURL=TimelineComponent.d.ts.map