packageDocumentation module import { ColorDef } from "@itwin/core-common" ; import { ScreenViewport } from "@itwin/core-frontend" ; import { GenericUiEventArgs } from "@itwin/appui-abstract" ; public export interface MilestoneRange { start : Date ; end : Date ; } internal deprecated export interface Milestone { /** uniqueId of milestone */ id : string ; /** milestone date */ date : Date ; parentId ? : string ; /** Milestone label that is display if space allows */ label ? : string ; /** Milestone description that is show as tooltip */ description ? : string ; /** animation range that includes milestone */ range ? : MilestoneRange ; /** Set to true if read only. */ readonly ? : boolean ; children ? : Milestone [ ] ; } public export enum TimelineScale { /** Show years */ Years , /** Show quarters */ Quarters , /** Show months */ Months , /** Show days */ Days , /** Show hours */ Hours } public export enum TimelineDateDisplay { /** Display time axis using actual start/end dates */ ActualTime , /** Display time axis using time relative to actual start/end dates */ ProjectTime } 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 ; } public export type AnimationFractionChangeHandler = ( animationFraction : number ) => void ; public export type PlaybackSettingsChangeHandler = ( settingsChange : PlaybackSettings ) => void ; public export enum TimelinePausePlayAction { Toggle , Pause , Play } public export interface TimelinePausePlayArgs extends GenericUiEventArgs { timelineAction : TimelinePausePlayAction ; } 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 ) : void ; /** Async call to load milestone and settings data */ loadTimelineData ( ) : Promise < boolean > ; /** 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 ; } alpha export type SolarPlaybackProgressHandler = ( time : Date ) => void ; 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 ; }