/** @packageDocumentation * @module Timeline */ import type { ColorDef } from "@itwin/core-common"; import type { ScreenViewport } from "@itwin/core-frontend"; /** The timeline scale. * @public */ export declare enum TimelineScale { /** Show years */ Years = 0, /** Show quarters */ Quarters = 1, /** Show months */ Months = 2, /** Show days */ Days = 3, /** Show hours */ Hours = 4 } /** Determines if data displayed to use is the actual date or the amount of time elapsed since project start. * @public */ export declare enum TimelineDateDisplay { /** Display time axis using actual start/end dates */ ActualTime = 0, /** Display time axis using time relative to actual start/end dates */ ProjectTime = 1 } /** * Playback Settings. * @public */ export interface PlaybackSettings { /** time in milliseconds to play animation from start date to end date */ duration?: number; /** Set to True if animation to restart each time playbackEnd is reached. Defaults to false. */ loop?: boolean; /** If true a minimal set of data is displayed. */ minimized?: boolean; /** Playback start. If defined must be within start-end range. If not define 'start' is used. */ playbackStart?: Date; /** Playback end. If defined must be within start-end range and later than playbackStart. If not define 'end' is used. */ playbackEnd?: Date; /** Set to True if user should be allowed to insert milestone dates. Defaults to false */ allowMilestoneEdits?: boolean; /** Define if actual date/times are used or date/times relative to project are used to draw timeline axis. */ dateDisplay?: TimelineDateDisplay; } /** * An interface used to notify Handlers of the current pointer position in the timeline playback. Valid range is 0 to 1 and it determines percentage complete. * @public */ export type AnimationFractionChangeHandler = (animationFraction: number) => void; /** * An interface used to notify Handlers of Playback Settings changes. * Contains the settings to be used. * @public */ export type PlaybackSettingsChangeHandler = (settingsChange: PlaybackSettings) => void; /** Actions for Pause/Play event * @public */ export declare enum TimelinePausePlayAction { Toggle = 0, Pause = 1, Play = 2 } /** Args for event to pause or play the timeline component * @public */ export interface TimelinePausePlayArgs { uiComponentId: string; timelineAction: TimelinePausePlayAction; } /** Interface for a timeline data provider class * @public */ export interface TimelineDataProvider { /** uniqueId of provider */ id: string; /** view id when viewport is initially assigned */ viewId: string; /** returns true if the provider has timeline animation data available */ supportsTimelineAnimation: boolean; /** Starting date for entire timeline */ start?: Date; /** End date for entire timeline */ end?: Date; /** Current animation fraction from 0.0 to 1.0 */ animationFraction?: number; getSettings(): PlaybackSettings; /** Called to get the initial scrubber location. This must be a value between 0 and the duration in PlaybackSettings. */ initialDuration: number; /** Called to get the duration of the Playback. */ duration: number; /** If true the playback will continuously loop. */ loop: boolean; /** Called to save the playback settings */ updateSettings(settings: PlaybackSettings): void; /** Async call to load milestone and settings data */ loadTimelineData(): Promise; /** Called when an internal process has defined the playback settings and the UI needs to be updated */ onPlaybackSettingChanged?: PlaybackSettingsChangeHandler; /** Called when the an internal process has defined the playback settings and the UI needs to be updated */ onAnimationFractionChanged?: AnimationFractionChangeHandler; /** viewport to show animation */ viewport?: ScreenViewport; } /** * An interface used to notify Handlers of Playback progress. * Contains the settings to be used. * @alpha */ export type SolarPlaybackProgressHandler = (time: Date) => void; /** Data Provider interface for getting and setting solar position * @alpha */ export interface SolarDataProvider { viewId: string; /** returns true if the provider has timeline animation data available */ supportsTimelineAnimation: boolean; readonly shouldShowTimeline: boolean; /** Starting date for entire timeline */ day: Date; /** Starting time for day in milliseconds */ readonly dayStartMs: number; /** Time of day for sun */ readonly timeOfDay: Date; /** Called during playback to update animation */ onTimeChanged?: SolarPlaybackProgressHandler; /** viewport to show animation */ viewport?: ScreenViewport; /** Time of Sunrise to nearest minute */ readonly sunrise: Date; /** time of Sunrise to nearest minute */ readonly sunset: Date; /** shadow color */ shadowColor: ColorDef; /** timezone offset for local project time */ readonly timeZoneOffset: number; /** set date for shadow study. If isProjectDate is false the is assume to be in users * current time and the value is adjusted to be the same date and time at the project location. */ setDateAndTime: (day: Date, isProjectDate?: boolean) => void; } //# sourceMappingURL=interfaces.d.ts.map