@itwin/imodel-components-react 4.9.0-dev.1 → 4.10.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +2 -4
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +2 -2
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +10 -11
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +1 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +3 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +6 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +3 -7
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +2 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +2 -2
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +2 -2
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +4 -6
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +2 -4
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +3 -2
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +1 -2
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +2 -2
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +2 -2
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +7 -9
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +2 -4
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +2 -2
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +10 -11
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +1 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +3 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +6 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +3 -7
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +2 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +2 -2
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +4 -6
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +2 -4
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +3 -2
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +1 -2
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +2 -2
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +2 -2
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +7 -9
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/package.json +9 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACE,CACF,CACA,CACJ,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAhlBD,sCAglBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Timeline\n */\n\n// component is in alpha state - it may change after usability testing - test coverage not complete\n/* istanbul ignore file */\n\nimport \"./SolarTimeline.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Slider, Text, Tooltip } from \"@itwin/itwinui-react\";\n\nimport type { HSVColor } from \"@itwin/core-common\";\nimport { ColorByName, ColorDef } from \"@itwin/core-common\";\nimport { RelativePosition, TimeDisplay } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Icon, Popup } from \"@itwin/core-react\";\nimport type { TimeSpec } from \"@itwin/components-react\";\nimport {\n adjustDateToTimezone,\n DatePicker,\n TimeField,\n UiComponents,\n} from \"@itwin/components-react\";\nimport { HueSlider } from \"../color/HueSlider\";\nimport { SaturationPicker } from \"../color/SaturationPicker\";\nimport { ColorSwatch } from \"../color/Swatch\";\nimport type { SolarDataProvider } from \"./interfaces\";\nimport { PlayButton } from \"./PlayerButton\";\nimport { SpeedTimeline } from \"./SpeedTimeline\";\nimport {\n CustomThumb,\n getPercentageOfRectangle,\n RailMarkers,\n useFocusedThumb,\n} from \"./Scrubber\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { SvgCalendar, SvgLoop, SvgSettings } from \"@itwin/itwinui-icons-react\";\n\n// cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs\n\nconst millisecPerMinute = 1000 * 60;\nconst millisecPerHour = millisecPerMinute * 60;\n// const millisecPerDay = millisecPerHour * 24;\nconst defaultPlaybackDuration = 40 * 1000; // 40 seconds\nconst addZero = (i: number) => {\n return i < 10 ? `0${i}` : i;\n};\n\ninterface TimelineProps extends CommonProps {\n dayStartMs: number;\n sunRiseOffsetMs: number;\n sunSetOffsetMs: number;\n currentTimeOffsetMs: number;\n isPlaying: boolean;\n formatTick?: (millisec: number) => string;\n formatTime: (millisec: number) => string;\n onChange?: (values: ReadonlyArray<number>) => void;\n onUpdate?: (values: ReadonlyArray<number>) => void;\n}\n\nfunction Timeline(props: TimelineProps) {\n const [sliderContainer, setSliderContainer] =\n React.useState<HTMLDivElement | null>(null);\n const [pointerPercent, setPointerPercent] = React.useState(0);\n\n const tooltipProps = React.useCallback(() => {\n return { visible: false };\n }, []);\n\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\n\n const handlePointerEnter = React.useCallback(() => {\n setShowRailTooltip(true);\n }, []);\n\n const handlePointerLeave = React.useCallback(() => {\n setShowRailTooltip(false);\n }, []);\n\n const handlePointerMove = React.useCallback(\n (event: React.PointerEvent) => {\n sliderContainer &&\n setPointerPercent(\n getPercentageOfRectangle(\n sliderContainer.getBoundingClientRect(),\n event.clientX\n )\n );\n },\n [sliderContainer]\n );\n\n const {\n formatTick,\n formatTime,\n onChange,\n onUpdate,\n dayStartMs,\n sunSetOffsetMs,\n sunRiseOffsetMs,\n currentTimeOffsetMs,\n isPlaying,\n } = props;\n\n const thumbHasFocus = useFocusedThumb(sliderContainer ?? undefined);\n\n const tickLabel = React.useMemo(() => {\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\n const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;\n const percent =\n isPlaying || thumbHasFocus\n ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration\n : pointerPercent;\n const tooltipText = formatTime(\n isPlaying || thumbHasFocus\n ? dayStartMs + currentTimeOffsetMs\n : dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration)\n );\n return (\n <RailMarkers\n showToolTip={showTip}\n percent={percent}\n tooltipText={tooltipText}\n />\n );\n }, [\n isPlaying,\n showRailTooltip,\n thumbHasFocus,\n sunSetOffsetMs,\n sunRiseOffsetMs,\n currentTimeOffsetMs,\n pointerPercent,\n formatTime,\n dayStartMs,\n ]);\n\n const className = classnames(\n \"solar-timeline\",\n props.className,\n formatTick && \"showticks\"\n );\n const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);\n const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);\n return (\n <div className={className}>\n <Tooltip content={sunRiseFormat}>\n <span className=\"sunrise\">☀</span>\n </Tooltip>\n <Slider\n ref={setSliderContainer}\n className=\"solar-slider\"\n step={millisecPerMinute}\n min={sunRiseOffsetMs}\n max={sunSetOffsetMs}\n minLabel=\"\"\n maxLabel=\"\"\n onUpdate={onUpdate}\n onChange={onChange}\n values={[currentTimeOffsetMs]}\n tooltipProps={tooltipProps}\n thumbProps={() => ({\n className: \"components-timeline-thumb\",\n children: <CustomThumb />,\n })}\n tickLabels={tickLabel}\n onPointerEnter={handlePointerEnter}\n onPointerMove={handlePointerMove}\n onPointerLeave={handlePointerLeave}\n />\n <Tooltip content={sunSetFormat}>\n <span className=\"sunset\">☽</span>\n </Tooltip>\n </div>\n );\n}\n\ninterface SolarTimelineComponentProps {\n dataProvider: SolarDataProvider; // provides date, sunrise, sunset in millisecs, also contains timezone offset from UTC, and updates the display style to current time.\n onPlayPause?: (playing: boolean) => void; // callback triggered when play/pause button is pressed\n duration?: number; // playback duration in milliseconds\n speed?: number;\n}\n\ninterface SolarTimelineComponentState {\n isPlaying: boolean; // timeline is currently playing or paused\n isDateOpened: boolean; // date picker is opened\n isSettingsOpened: boolean; // settings popup is opened\n dayStartMs: number;\n sunRiseOffsetMs: number;\n sunSetOffsetMs: number;\n sunDeltaMs: number;\n currentTimeOffsetMs: number;\n speed: number;\n loop: boolean;\n shadowColor: ColorDef;\n duration: number; // playback duration in milliseconds\n adjustedDuration: number; // playback duration in milliseconds/ speed\n}\n\n/** Solar Timeline\n * @alpha\n */\nexport class SolarTimeline extends React.PureComponent<\n SolarTimelineComponentProps,\n SolarTimelineComponentState\n> {\n private _datePicker: HTMLElement | null = null;\n private _settings: HTMLElement | null = null;\n private _requestFrame = 0;\n private _unmounted = false;\n private _timeLastCycle = 0;\n private _totalPlayTime = 0;\n private _settingsPopupTitle = UiIModelComponents.translate(\n \"solarsettings.shadowcolor\"\n );\n private _playLabel = UiIModelComponents.translate(\"solartimeline.play\");\n private _settingLabel = UiIModelComponents.translate(\n \"solartimeline.settings\"\n );\n private _loopLabel = UiIModelComponents.translate(\"timeline.repeat\");\n private _speedLabel = UiIModelComponents.translate(\"solartimeline.speed\");\n private _dateTimeLabel = UiIModelComponents.translate(\n \"solartimeline.dateTime\"\n );\n\n private _months = [\n UiComponents.translate(\"month.short.january\"),\n UiComponents.translate(\"month.short.february\"),\n UiComponents.translate(\"month.short.march\"),\n UiComponents.translate(\"month.short.april\"),\n UiComponents.translate(\"month.short.may\"),\n UiComponents.translate(\"month.short.june\"),\n UiComponents.translate(\"month.short.july\"),\n UiComponents.translate(\"month.short.august\"),\n UiComponents.translate(\"month.short.september\"),\n UiComponents.translate(\"month.short.october\"),\n UiComponents.translate(\"month.short.november\"),\n UiComponents.translate(\"month.short.december\"),\n ];\n\n private _timeLabel = UiComponents.translate(\"datepicker.time\");\n private _amLabel = UiComponents.translate(\"time.am\");\n private _pmLabel = UiComponents.translate(\"time.pm\");\n private readonly _presetColors = [\n ColorDef.create(ColorByName.grey),\n ColorDef.create(ColorByName.lightGrey),\n ColorDef.create(ColorByName.darkGrey),\n ColorDef.create(ColorByName.lightBlue),\n ColorDef.create(ColorByName.lightGreen),\n ColorDef.create(ColorByName.darkGreen),\n ColorDef.create(ColorByName.tan),\n ColorDef.create(ColorByName.darkBrown),\n ];\n\n constructor(props: SolarTimelineComponentProps) {\n super(props);\n\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunRiseOffsetMs =\n this.props.dataProvider.sunrise.getTime() - dayStartMs;\n const sunSetOffsetMs =\n this.props.dataProvider.sunset.getTime() - dayStartMs;\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\n const sunOffsetMs =\n this.props.dataProvider.timeOfDay.getTime() - dayStartMs;\n const currentTimeOffsetMs = this.ensureRange(\n sunOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs\n );\n const shadowColor = this.props.dataProvider.shadowColor;\n const duration = this.props.duration\n ? this.props.duration\n : defaultPlaybackDuration;\n const speed = this.props.speed ? this.props.speed : 2;\n const adjustedDuration = duration / speed;\n this.setPlaybackTimeBySunTime(\n currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunDeltaMs,\n adjustedDuration\n );\n\n this.state = {\n isDateOpened: false,\n isSettingsOpened: false,\n isPlaying: false,\n dayStartMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n sunDeltaMs,\n currentTimeOffsetMs,\n speed,\n loop: false,\n shadowColor,\n duration,\n adjustedDuration,\n };\n }\n\n public override componentWillUnmount() {\n window.cancelAnimationFrame(this._requestFrame);\n this._unmounted = true;\n }\n\n // recursively update the animation until we hit the end or the pause button is clicked\n private _updateAnimation = (_timestamp: number) => {\n // istanbul ignore else\n if (!this.state.isPlaying || this._unmounted) {\n window.cancelAnimationFrame(this._requestFrame);\n return;\n }\n\n const currentTime = new Date().getTime();\n this._totalPlayTime += currentTime - this._timeLastCycle;\n this._timeLastCycle = currentTime;\n let percentComplete = this._totalPlayTime / this.state.adjustedDuration;\n if (percentComplete > 1) percentComplete = 1;\n\n let newPlayingState = true;\n\n // calculate the next sun time base on the percentage playback complete - should be int value as that is step amount for slider\n let nextSunOffset = Math.floor(\n this.state.sunRiseOffsetMs + percentComplete * this.state.sunDeltaMs\n );\n\n if (percentComplete > 0.99) {\n if (!this.state.loop) {\n newPlayingState = false;\n nextSunOffset = this.state.sunSetOffsetMs;\n window.cancelAnimationFrame(this._requestFrame);\n } else {\n nextSunOffset = this.state.sunRiseOffsetMs;\n this._totalPlayTime = 0;\n }\n }\n\n if (this.props.dataProvider.onTimeChanged) {\n const currentSunTime = new Date(this.state.dayStartMs + nextSunOffset);\n this.props.dataProvider.onTimeChanged(currentSunTime);\n }\n\n this.setState(\n { isPlaying: newPlayingState, currentTimeOffsetMs: nextSunOffset },\n () => {\n if (newPlayingState)\n this._requestFrame = window.requestAnimationFrame(\n this._updateAnimation\n );\n }\n );\n };\n\n private _play(sunTimeMs: number) {\n this._timeLastCycle = new Date().getTime();\n\n // start playing\n this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(true);\n });\n }\n\n // user clicked pause button\n private _onPause = () => {\n // istanbul ignore if\n if (!this.state.isPlaying) return;\n\n const currentTime = new Date().getTime();\n this._totalPlayTime += currentTime - this._timeLastCycle;\n\n // stop requesting frames\n window.cancelAnimationFrame(this._requestFrame);\n\n // stop playing\n this.setState({ isPlaying: false });\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n };\n\n // user clicked play button\n private _onPlay = () => {\n // istanbul ignore if\n if (this.state.isPlaying) return;\n\n if (\n this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||\n this.state.currentTimeOffsetMs <= this.state.sunRiseOffsetMs\n ) {\n this._totalPlayTime = 0;\n this._play(this.state.sunRiseOffsetMs);\n } else {\n this._play(this.state.currentTimeOffsetMs);\n }\n };\n\n private setPlaybackTimeBySunTime(\n sunOffsetMs: number,\n sunRiseOffsetMs: number,\n sunDeltaMs: number,\n adjustedDuration?: number\n ) {\n this._totalPlayTime =\n ((sunOffsetMs - sunRiseOffsetMs) / sunDeltaMs) *\n (adjustedDuration ? adjustedDuration : this.state.adjustedDuration);\n }\n\n /** note the day passed in is in the time of the current user not in project time because the date picker works in\n * local time */\n private _onDayClick = (day: Date) => {\n const selectedDate = new Date(\n day.getTime() + this.state.currentTimeOffsetMs\n );\n this.props.dataProvider.setDateAndTime(selectedDate);\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunRiseOffsetMs =\n this.props.dataProvider.sunrise.getTime() - dayStartMs;\n const sunSetOffsetMs =\n this.props.dataProvider.sunset.getTime() - dayStartMs;\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\n\n const sunOffsetMs = this.ensureRange(\n this.state.currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs\n );\n this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);\n\n /** call dataProvider to update display style */\n if (this.props.dataProvider.onTimeChanged)\n this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);\n\n this.setState(\n {\n dayStartMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n currentTimeOffsetMs: sunOffsetMs,\n sunDeltaMs,\n isDateOpened: false,\n },\n () => {\n this._timeLastCycle = new Date().getTime();\n }\n );\n };\n\n private _onTimeChanged = (time: TimeSpec) => {\n // compute the current date (with time)\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunTime =\n time.hours * millisecPerHour + time.minutes * millisecPerMinute;\n const dateWithNewTime = new Date(dayStartMs + sunTime);\n this.props.dataProvider.setDateAndTime(dateWithNewTime, true);\n\n // notify the provider to update style\n if (this.props.dataProvider.onTimeChanged)\n this.props.dataProvider.onTimeChanged(dateWithNewTime);\n\n const currentTimeOffsetMs = this.ensureRange(\n sunTime,\n this.state.sunRiseOffsetMs,\n this.state.sunSetOffsetMs\n );\n\n this.setPlaybackTimeBySunTime(\n currentTimeOffsetMs,\n this.state.sunRiseOffsetMs,\n this.state.sunDeltaMs\n );\n this._timeLastCycle = new Date().getTime();\n\n // update the timeline\n this.setState({ currentTimeOffsetMs });\n };\n\n private _onCloseDayPicker = () => {\n this.setState({ isDateOpened: false });\n };\n\n private _onOpenDayPicker = () => {\n this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));\n };\n\n private _onCloseSettingsPopup = () => {\n this.setState({ isSettingsOpened: false });\n };\n\n private _onOpenSettingsPopup = () => {\n this.setState((prevState) => ({\n isSettingsOpened: !prevState.isSettingsOpened,\n }));\n };\n\n private ensureRange(value: number, min: number, max: number): number {\n return Math.max(Math.min(value, max), min);\n }\n\n private processSunTimeChange(sunTime: number) {\n if (sunTime === this.state.currentTimeOffsetMs) return;\n\n const currentTimeOffsetMs = this.ensureRange(\n sunTime,\n this.state.sunRiseOffsetMs,\n this.state.sunSetOffsetMs\n );\n\n if (this.props.dataProvider.onTimeChanged) {\n const currentSunTime = new Date(\n this.state.dayStartMs + currentTimeOffsetMs\n );\n this.props.dataProvider.onTimeChanged(currentSunTime);\n }\n\n this.setState({ currentTimeOffsetMs }, () => {\n const currentTime = new Date().getTime();\n this._timeLastCycle = currentTime;\n const percentComplete =\n (currentTimeOffsetMs - this.state.sunRiseOffsetMs) /\n this.state.sunDeltaMs;\n this._totalPlayTime = percentComplete * this.state.adjustedDuration;\n });\n }\n\n private _onUpdate = (values: ReadonlyArray<number>) => {\n if (!this.state.isPlaying) this.processSunTimeChange(values[0]);\n };\n\n private _onChange = (values: ReadonlyArray<number>) => {\n if (!this.state.isPlaying) this.processSunTimeChange(values[0]);\n };\n\n private _onSpeedChange = (value: number) => {\n const adjustedDuration = this.state.duration / value;\n this.setState({ speed: value, adjustedDuration });\n };\n\n private _onToggleLoop = () => {\n this.setState((prevState) => ({ loop: !prevState.loop }));\n };\n\n private _formatTime = (millisec: number) => {\n const date = new Date(millisec);\n // convert project date to browser locale date\n const localTime = adjustDateToTimezone(\n date,\n this.props.dataProvider.timeZoneOffset * 60\n );\n let hours = localTime.getHours();\n const minutes = addZero(date.getMinutes());\n const abbrev =\n hours < 12 ? this._amLabel : hours === 24 ? this._amLabel : this._pmLabel;\n hours = hours > 12 ? hours - 12 : hours;\n return `${hours}:${minutes} ${abbrev}`;\n };\n\n private _onPresetColorPick = (shadowColor: ColorDef) => {\n this.setState(\n { shadowColor },\n () => (this.props.dataProvider.shadowColor = shadowColor)\n );\n };\n\n private _handleHueOrSaturationChange = (hueOrSaturation: HSVColor) => {\n if (hueOrSaturation.s === 0)\n // for a ColorDef to be created from hsv s can't be 0\n hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);\n\n const shadowColor = hueOrSaturation.toColorDef();\n this.setState(\n { shadowColor },\n () => (this.props.dataProvider.shadowColor = shadowColor)\n );\n };\n\n public getLocalTime(ticks: number): Date {\n const projectTime = new Date(ticks);\n // convert project date to browser locale date\n return adjustDateToTimezone(\n projectTime,\n this.props.dataProvider.timeZoneOffset * 60\n );\n }\n\n public override render() {\n const { dataProvider } = this.props;\n const {\n speed,\n loop,\n currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n } = this.state;\n const localTime = this.getLocalTime(\n this.state.dayStartMs + this.state.currentTimeOffsetMs\n );\n const formattedTime = this._formatTime(\n dataProvider.dayStartMs + currentTimeOffsetMs\n );\n const formattedDate = `${\n this._months[localTime.getMonth()]\n }, ${localTime.getDate()}`;\n\n const colorSwatchStyle: React.CSSProperties = {\n width: `100%`,\n height: `100%`,\n };\n\n return (\n <div className={\"solar-timeline-wrapper\"}>\n <div className=\"header\">\n <PlayButton\n tooltip={this._playLabel}\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n />\n <button\n data-testid=\"solar-date-time-button\"\n title={this._dateTimeLabel}\n className=\"current-date\"\n ref={(element) => (this._datePicker = element)}\n onClick={this._onOpenDayPicker}\n >\n <span>{formattedDate}</span>\n <span>/</span>\n <span>{formattedTime}</span>\n <span className=\"icon\">\n <Icon iconSpec={<SvgCalendar />} />\n </span>\n </button>\n <Popup\n style={{ border: \"none\" }}\n offset={11}\n target={this._datePicker}\n isOpen={this.state.isDateOpened}\n onClose={this._onCloseDayPicker}\n position={RelativePosition.Top}\n >\n <div\n className=\"components-date-picker-calendar-popup-panel\"\n data-testid=\"components-date-picker-calendar-popup-panel\"\n >\n <DatePicker\n selected={localTime}\n onDateChange={this._onDayClick}\n showFocusOutline={false}\n />\n <div className=\"time-container\">\n <Text variant=\"body\" className=\"time-label\">\n {this._timeLabel}\n </Text>\n <TimeField\n time={{\n hours: localTime.getHours(),\n minutes: localTime.getMinutes(),\n seconds: 0,\n }}\n timeDisplay={TimeDisplay.H12MC}\n onTimeChange={this._onTimeChanged}\n />\n </div>\n </div>\n </Popup>\n <Timeline\n dayStartMs={dataProvider.dayStartMs}\n sunSetOffsetMs={sunSetOffsetMs}\n sunRiseOffsetMs={sunRiseOffsetMs}\n currentTimeOffsetMs={currentTimeOffsetMs}\n onChange={this._onChange}\n onUpdate={this._onUpdate}\n formatTime={this._formatTime}\n isPlaying={this.state.isPlaying}\n />\n <div className=\"speed-container\">\n <span title={this._speedLabel}>{speed}x</span>\n <SpeedTimeline\n className=\"speed\"\n onChange={this._onSpeedChange}\n speed={this.state.speed}\n />\n </div>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={this._loopLabel}\n className={classnames(\n \"icon\",\n !loop && \"no-loop-playback\",\n loop && \"loop-playback\"\n )}\n onClick={this._onToggleLoop}\n role=\"button\"\n tabIndex={-1}\n >\n <Icon iconSpec={<SvgLoop />} />\n </span>\n <button\n data-testid=\"shadow-settings-button\"\n title={this._settingLabel}\n className=\"shadow-settings-button\"\n ref={(element) => (this._settings = element)}\n onClick={this._onOpenSettingsPopup}\n >\n <span className=\"icon\">\n <Icon iconSpec={<SvgSettings />} />\n </span>\n </button>\n <Popup\n className=\"shadow-settings-popup\"\n target={this._settings}\n offset={11}\n isOpen={this.state.isSettingsOpened}\n onClose={this._onCloseSettingsPopup}\n position={RelativePosition.Top}\n >\n <div className=\"shadow-settings-popup-container\">\n <div className=\"shadow-settings-header\">\n {this._settingsPopupTitle}\n </div>\n <div className=\"shadow-settings-color\">\n <div className=\"shadow-settings-color-top\">\n <SaturationPicker\n hsv={this.state.shadowColor.toHSV()}\n onSaturationChange={this._handleHueOrSaturationChange}\n />\n </div>\n <div className=\"shadow-settings-color-bottom\">\n <div className=\"shadow-settings-color-bottom-left\">\n <HueSlider\n hsv={this.state.shadowColor.toHSV()}\n onHueChange={this._handleHueOrSaturationChange}\n isHorizontal={true}\n />\n </div>\n <div className=\"shadow-settings-color-bottom-right\">\n <ColorSwatch\n style={colorSwatchStyle}\n colorDef={this.state.shadowColor}\n round={false}\n />\n </div>\n </div>\n </div>\n <div className=\"shadow-settings-color-presets\">\n <ColorSwatch\n colorDef={this._presetColors[0]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[1]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[2]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[3]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[4]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[5]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[6]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[7]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n </div>\n </div>\n </Popup>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SolarTimeline.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SolarTimeline.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mGAAmG;AACnG,0BAA0B;AAE1B,gCAA8B;AAC9B,4DAAoC;AACpC,6CAA+B;AAC/B,wDAA6D;AAG7D,oDAA2D;AAC3D,0DAAsE;AAEtE,kDAAgD;AAEhD,8DAKiC;AACjC,kDAA+C;AAC/C,gEAA6D;AAC7D,4CAA8C;AAE9C,iDAA4C;AAC5C,mDAAgD;AAChD,yC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kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC;4BACF,oBAAC,oBAAW,IACV,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACE,CACF,CACA,CACJ,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAhlBD,sCAglBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Timeline\n */\n\n// component is in alpha state - it may change after usability testing - test coverage not complete\n/* istanbul ignore file */\n\nimport \"./SolarTimeline.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Slider, Text, Tooltip } from \"@itwin/itwinui-react\";\n\nimport type { HSVColor } from \"@itwin/core-common\";\nimport { ColorByName, ColorDef } from \"@itwin/core-common\";\nimport { RelativePosition, TimeDisplay } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Icon, Popup } from \"@itwin/core-react\";\nimport type { TimeSpec } from \"@itwin/components-react\";\nimport {\n adjustDateToTimezone,\n DatePicker,\n TimeField,\n UiComponents,\n} from \"@itwin/components-react\";\nimport { HueSlider } from \"../color/HueSlider\";\nimport { SaturationPicker } from \"../color/SaturationPicker\";\nimport { ColorSwatch } from \"../color/Swatch\";\nimport type { SolarDataProvider } from \"./interfaces\";\nimport { PlayButton } from \"./PlayerButton\";\nimport { SpeedTimeline } from \"./SpeedTimeline\";\nimport {\n CustomThumb,\n getPercentageOfRectangle,\n RailMarkers,\n useFocusedThumb,\n} from \"./Scrubber\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { SvgCalendar, SvgLoop, SvgSettings } from \"@itwin/itwinui-icons-react\";\n\n// cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs\n\nconst millisecPerMinute = 1000 * 60;\nconst millisecPerHour = millisecPerMinute * 60;\n// const millisecPerDay = millisecPerHour * 24;\nconst defaultPlaybackDuration = 40 * 1000; // 40 seconds\nconst addZero = (i: number) => {\n return i < 10 ? `0${i}` : i;\n};\n\ninterface TimelineProps extends CommonProps {\n dayStartMs: number;\n sunRiseOffsetMs: number;\n sunSetOffsetMs: number;\n currentTimeOffsetMs: number;\n isPlaying: boolean;\n formatTick?: (millisec: number) => string;\n formatTime: (millisec: number) => string;\n onChange?: (values: ReadonlyArray<number>) => void;\n onUpdate?: (values: ReadonlyArray<number>) => void;\n}\n\nfunction Timeline(props: TimelineProps) {\n const [sliderContainer, setSliderContainer] =\n React.useState<HTMLDivElement | null>(null);\n const [pointerPercent, setPointerPercent] = React.useState(0);\n\n const tooltipProps = React.useCallback(() => {\n return { visible: false };\n }, []);\n\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\n\n const handlePointerEnter = React.useCallback(() => {\n setShowRailTooltip(true);\n }, []);\n\n const handlePointerLeave = React.useCallback(() => {\n setShowRailTooltip(false);\n }, []);\n\n const handlePointerMove = React.useCallback(\n (event: React.PointerEvent) => {\n sliderContainer &&\n setPointerPercent(\n getPercentageOfRectangle(\n sliderContainer.getBoundingClientRect(),\n event.clientX\n )\n );\n },\n [sliderContainer]\n );\n\n const {\n formatTick,\n formatTime,\n onChange,\n onUpdate,\n dayStartMs,\n sunSetOffsetMs,\n sunRiseOffsetMs,\n currentTimeOffsetMs,\n isPlaying,\n } = props;\n\n const thumbHasFocus = useFocusedThumb(sliderContainer ?? undefined);\n\n const tickLabel = React.useMemo(() => {\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\n const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;\n const percent =\n isPlaying || thumbHasFocus\n ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration\n : pointerPercent;\n const tooltipText = formatTime(\n isPlaying || thumbHasFocus\n ? dayStartMs + currentTimeOffsetMs\n : dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration)\n );\n return (\n <RailMarkers\n showToolTip={showTip}\n percent={percent}\n tooltipText={tooltipText}\n />\n );\n }, [\n isPlaying,\n showRailTooltip,\n thumbHasFocus,\n sunSetOffsetMs,\n sunRiseOffsetMs,\n currentTimeOffsetMs,\n pointerPercent,\n formatTime,\n dayStartMs,\n ]);\n\n const className = classnames(\n \"solar-timeline\",\n props.className,\n formatTick && \"showticks\"\n );\n const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);\n const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);\n return (\n <div className={className}>\n <Tooltip content={sunRiseFormat}>\n <span className=\"sunrise\">☀</span>\n </Tooltip>\n <Slider\n ref={setSliderContainer}\n className=\"solar-slider\"\n step={millisecPerMinute}\n min={sunRiseOffsetMs}\n max={sunSetOffsetMs}\n minLabel=\"\"\n maxLabel=\"\"\n onUpdate={onUpdate}\n onChange={onChange}\n values={[currentTimeOffsetMs]}\n tooltipProps={tooltipProps}\n thumbProps={() => ({\n className: \"components-timeline-thumb\",\n children: <CustomThumb />,\n })}\n tickLabels={tickLabel}\n onPointerEnter={handlePointerEnter}\n onPointerMove={handlePointerMove}\n onPointerLeave={handlePointerLeave}\n />\n <Tooltip content={sunSetFormat}>\n <span className=\"sunset\">☽</span>\n </Tooltip>\n </div>\n );\n}\n\ninterface SolarTimelineComponentProps {\n dataProvider: SolarDataProvider; // provides date, sunrise, sunset in millisecs, also contains timezone offset from UTC, and updates the display style to current time.\n onPlayPause?: (playing: boolean) => void; // callback triggered when play/pause button is pressed\n duration?: number; // playback duration in milliseconds\n speed?: number;\n}\n\ninterface SolarTimelineComponentState {\n isPlaying: boolean; // timeline is currently playing or paused\n isDateOpened: boolean; // date picker is opened\n isSettingsOpened: boolean; // settings popup is opened\n dayStartMs: number;\n sunRiseOffsetMs: number;\n sunSetOffsetMs: number;\n sunDeltaMs: number;\n currentTimeOffsetMs: number;\n speed: number;\n loop: boolean;\n shadowColor: ColorDef;\n duration: number; // playback duration in milliseconds\n adjustedDuration: number; // playback duration in milliseconds/ speed\n}\n\n/** Solar Timeline\n * @alpha\n */\nexport class SolarTimeline extends React.PureComponent<\n SolarTimelineComponentProps,\n SolarTimelineComponentState\n> {\n private _datePicker: HTMLElement | null = null;\n private _settings: HTMLElement | null = null;\n private _requestFrame = 0;\n private _unmounted = false;\n private _timeLastCycle = 0;\n private _totalPlayTime = 0;\n private _settingsPopupTitle = UiIModelComponents.translate(\n \"solarsettings.shadowcolor\"\n );\n private _playLabel = UiIModelComponents.translate(\"solartimeline.play\");\n private _settingLabel = UiIModelComponents.translate(\n \"solartimeline.settings\"\n );\n private _loopLabel = UiIModelComponents.translate(\"timeline.repeat\");\n private _speedLabel = UiIModelComponents.translate(\"solartimeline.speed\");\n private _dateTimeLabel = UiIModelComponents.translate(\n \"solartimeline.dateTime\"\n );\n\n private _months = [\n UiComponents.translate(\"month.short.january\"),\n UiComponents.translate(\"month.short.february\"),\n UiComponents.translate(\"month.short.march\"),\n UiComponents.translate(\"month.short.april\"),\n UiComponents.translate(\"month.short.may\"),\n UiComponents.translate(\"month.short.june\"),\n UiComponents.translate(\"month.short.july\"),\n UiComponents.translate(\"month.short.august\"),\n UiComponents.translate(\"month.short.september\"),\n UiComponents.translate(\"month.short.october\"),\n UiComponents.translate(\"month.short.november\"),\n UiComponents.translate(\"month.short.december\"),\n ];\n\n private _timeLabel = UiComponents.translate(\"datepicker.time\");\n private _amLabel = UiComponents.translate(\"time.am\");\n private _pmLabel = UiComponents.translate(\"time.pm\");\n private readonly _presetColors = [\n ColorDef.create(ColorByName.grey),\n ColorDef.create(ColorByName.lightGrey),\n ColorDef.create(ColorByName.darkGrey),\n ColorDef.create(ColorByName.lightBlue),\n ColorDef.create(ColorByName.lightGreen),\n ColorDef.create(ColorByName.darkGreen),\n ColorDef.create(ColorByName.tan),\n ColorDef.create(ColorByName.darkBrown),\n ];\n\n constructor(props: SolarTimelineComponentProps) {\n super(props);\n\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunRiseOffsetMs =\n this.props.dataProvider.sunrise.getTime() - dayStartMs;\n const sunSetOffsetMs =\n this.props.dataProvider.sunset.getTime() - dayStartMs;\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\n const sunOffsetMs =\n this.props.dataProvider.timeOfDay.getTime() - dayStartMs;\n const currentTimeOffsetMs = this.ensureRange(\n sunOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs\n );\n const shadowColor = this.props.dataProvider.shadowColor;\n const duration = this.props.duration\n ? this.props.duration\n : defaultPlaybackDuration;\n const speed = this.props.speed ? this.props.speed : 2;\n const adjustedDuration = duration / speed;\n this.setPlaybackTimeBySunTime(\n currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunDeltaMs,\n adjustedDuration\n );\n\n this.state = {\n isDateOpened: false,\n isSettingsOpened: false,\n isPlaying: false,\n dayStartMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n sunDeltaMs,\n currentTimeOffsetMs,\n speed,\n loop: false,\n shadowColor,\n duration,\n adjustedDuration,\n };\n }\n\n public override componentWillUnmount() {\n window.cancelAnimationFrame(this._requestFrame);\n this._unmounted = true;\n }\n\n // recursively update the animation until we hit the end or the pause button is clicked\n private _updateAnimation = (_timestamp: number) => {\n // istanbul ignore else\n if (!this.state.isPlaying || this._unmounted) {\n window.cancelAnimationFrame(this._requestFrame);\n return;\n }\n\n const currentTime = new Date().getTime();\n this._totalPlayTime += currentTime - this._timeLastCycle;\n this._timeLastCycle = currentTime;\n let percentComplete = this._totalPlayTime / this.state.adjustedDuration;\n if (percentComplete > 1) percentComplete = 1;\n\n let newPlayingState = true;\n\n // calculate the next sun time base on the percentage playback complete - should be int value as that is step amount for slider\n let nextSunOffset = Math.floor(\n this.state.sunRiseOffsetMs + percentComplete * this.state.sunDeltaMs\n );\n\n if (percentComplete > 0.99) {\n if (!this.state.loop) {\n newPlayingState = false;\n nextSunOffset = this.state.sunSetOffsetMs;\n window.cancelAnimationFrame(this._requestFrame);\n } else {\n nextSunOffset = this.state.sunRiseOffsetMs;\n this._totalPlayTime = 0;\n }\n }\n\n if (this.props.dataProvider.onTimeChanged) {\n const currentSunTime = new Date(this.state.dayStartMs + nextSunOffset);\n this.props.dataProvider.onTimeChanged(currentSunTime);\n }\n\n this.setState(\n { isPlaying: newPlayingState, currentTimeOffsetMs: nextSunOffset },\n () => {\n if (newPlayingState)\n this._requestFrame = window.requestAnimationFrame(\n this._updateAnimation\n );\n }\n );\n };\n\n private _play(sunTimeMs: number) {\n this._timeLastCycle = new Date().getTime();\n\n // start playing\n this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(true);\n });\n }\n\n // user clicked pause button\n private _onPause = () => {\n // istanbul ignore if\n if (!this.state.isPlaying) return;\n\n const currentTime = new Date().getTime();\n this._totalPlayTime += currentTime - this._timeLastCycle;\n\n // stop requesting frames\n window.cancelAnimationFrame(this._requestFrame);\n\n // stop playing\n this.setState({ isPlaying: false });\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n };\n\n // user clicked play button\n private _onPlay = () => {\n // istanbul ignore if\n if (this.state.isPlaying) return;\n\n if (\n this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||\n this.state.currentTimeOffsetMs <= this.state.sunRiseOffsetMs\n ) {\n this._totalPlayTime = 0;\n this._play(this.state.sunRiseOffsetMs);\n } else {\n this._play(this.state.currentTimeOffsetMs);\n }\n };\n\n private setPlaybackTimeBySunTime(\n sunOffsetMs: number,\n sunRiseOffsetMs: number,\n sunDeltaMs: number,\n adjustedDuration?: number\n ) {\n this._totalPlayTime =\n ((sunOffsetMs - sunRiseOffsetMs) / sunDeltaMs) *\n (adjustedDuration ? adjustedDuration : this.state.adjustedDuration);\n }\n\n /** note the day passed in is in the time of the current user not in project time because the date picker works in\n * local time */\n private _onDayClick = (day: Date) => {\n const selectedDate = new Date(\n day.getTime() + this.state.currentTimeOffsetMs\n );\n this.props.dataProvider.setDateAndTime(selectedDate);\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunRiseOffsetMs =\n this.props.dataProvider.sunrise.getTime() - dayStartMs;\n const sunSetOffsetMs =\n this.props.dataProvider.sunset.getTime() - dayStartMs;\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\n\n const sunOffsetMs = this.ensureRange(\n this.state.currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs\n );\n this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);\n\n /** call dataProvider to update display style */\n if (this.props.dataProvider.onTimeChanged)\n this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);\n\n this.setState(\n {\n dayStartMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n currentTimeOffsetMs: sunOffsetMs,\n sunDeltaMs,\n isDateOpened: false,\n },\n () => {\n this._timeLastCycle = new Date().getTime();\n }\n );\n };\n\n private _onTimeChanged = (time: TimeSpec) => {\n // compute the current date (with time)\n const dayStartMs = this.props.dataProvider.dayStartMs;\n const sunTime =\n time.hours * millisecPerHour + time.minutes * millisecPerMinute;\n const dateWithNewTime = new Date(dayStartMs + sunTime);\n this.props.dataProvider.setDateAndTime(dateWithNewTime, true);\n\n // notify the provider to update style\n if (this.props.dataProvider.onTimeChanged)\n this.props.dataProvider.onTimeChanged(dateWithNewTime);\n\n const currentTimeOffsetMs = this.ensureRange(\n sunTime,\n this.state.sunRiseOffsetMs,\n this.state.sunSetOffsetMs\n );\n\n this.setPlaybackTimeBySunTime(\n currentTimeOffsetMs,\n this.state.sunRiseOffsetMs,\n this.state.sunDeltaMs\n );\n this._timeLastCycle = new Date().getTime();\n\n // update the timeline\n this.setState({ currentTimeOffsetMs });\n };\n\n private _onCloseDayPicker = () => {\n this.setState({ isDateOpened: false });\n };\n\n private _onOpenDayPicker = () => {\n this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));\n };\n\n private _onCloseSettingsPopup = () => {\n this.setState({ isSettingsOpened: false });\n };\n\n private _onOpenSettingsPopup = () => {\n this.setState((prevState) => ({\n isSettingsOpened: !prevState.isSettingsOpened,\n }));\n };\n\n private ensureRange(value: number, min: number, max: number): number {\n return Math.max(Math.min(value, max), min);\n }\n\n private processSunTimeChange(sunTime: number) {\n if (sunTime === this.state.currentTimeOffsetMs) return;\n\n const currentTimeOffsetMs = this.ensureRange(\n sunTime,\n this.state.sunRiseOffsetMs,\n this.state.sunSetOffsetMs\n );\n\n if (this.props.dataProvider.onTimeChanged) {\n const currentSunTime = new Date(\n this.state.dayStartMs + currentTimeOffsetMs\n );\n this.props.dataProvider.onTimeChanged(currentSunTime);\n }\n\n this.setState({ currentTimeOffsetMs }, () => {\n const currentTime = new Date().getTime();\n this._timeLastCycle = currentTime;\n const percentComplete =\n (currentTimeOffsetMs - this.state.sunRiseOffsetMs) /\n this.state.sunDeltaMs;\n this._totalPlayTime = percentComplete * this.state.adjustedDuration;\n });\n }\n\n private _onUpdate = (values: ReadonlyArray<number>) => {\n if (!this.state.isPlaying) this.processSunTimeChange(values[0]);\n };\n\n private _onChange = (values: ReadonlyArray<number>) => {\n if (!this.state.isPlaying) this.processSunTimeChange(values[0]);\n };\n\n private _onSpeedChange = (value: number) => {\n const adjustedDuration = this.state.duration / value;\n this.setState({ speed: value, adjustedDuration });\n };\n\n private _onToggleLoop = () => {\n this.setState((prevState) => ({ loop: !prevState.loop }));\n };\n\n private _formatTime = (millisec: number) => {\n const date = new Date(millisec);\n // convert project date to browser locale date\n const localTime = adjustDateToTimezone(\n date,\n this.props.dataProvider.timeZoneOffset * 60\n );\n let hours = localTime.getHours();\n const minutes = addZero(date.getMinutes());\n const abbrev =\n hours < 12 ? this._amLabel : hours === 24 ? this._amLabel : this._pmLabel;\n hours = hours > 12 ? hours - 12 : hours;\n return `${hours}:${minutes} ${abbrev}`;\n };\n\n private _onPresetColorPick = (shadowColor: ColorDef) => {\n this.setState(\n { shadowColor },\n () => (this.props.dataProvider.shadowColor = shadowColor)\n );\n };\n\n private _handleHueOrSaturationChange = (hueOrSaturation: HSVColor) => {\n if (hueOrSaturation.s === 0)\n // for a ColorDef to be created from hsv s can't be 0\n hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);\n\n const shadowColor = hueOrSaturation.toColorDef();\n this.setState(\n { shadowColor },\n () => (this.props.dataProvider.shadowColor = shadowColor)\n );\n };\n\n public getLocalTime(ticks: number): Date {\n const projectTime = new Date(ticks);\n // convert project date to browser locale date\n return adjustDateToTimezone(\n projectTime,\n this.props.dataProvider.timeZoneOffset * 60\n );\n }\n\n public override render() {\n const { dataProvider } = this.props;\n const {\n speed,\n loop,\n currentTimeOffsetMs,\n sunRiseOffsetMs,\n sunSetOffsetMs,\n } = this.state;\n const localTime = this.getLocalTime(\n this.state.dayStartMs + this.state.currentTimeOffsetMs\n );\n const formattedTime = this._formatTime(\n dataProvider.dayStartMs + currentTimeOffsetMs\n );\n const formattedDate = `${\n this._months[localTime.getMonth()]\n }, ${localTime.getDate()}`;\n\n const colorSwatchStyle: React.CSSProperties = {\n width: `100%`,\n height: `100%`,\n };\n\n return (\n <div className={\"solar-timeline-wrapper\"}>\n <div className=\"header\">\n <PlayButton\n tooltip={this._playLabel}\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n />\n <button\n data-testid=\"solar-date-time-button\"\n title={this._dateTimeLabel}\n className=\"current-date\"\n ref={(element) => (this._datePicker = element)}\n onClick={this._onOpenDayPicker}\n >\n <span>{formattedDate}</span>\n <span>/</span>\n <span>{formattedTime}</span>\n <span className=\"icon\">\n <Icon iconSpec={<SvgCalendar />} />\n </span>\n </button>\n <Popup\n style={{ border: \"none\" }}\n offset={11}\n target={this._datePicker}\n isOpen={this.state.isDateOpened}\n onClose={this._onCloseDayPicker}\n position={RelativePosition.Top}\n >\n <div\n className=\"components-date-picker-calendar-popup-panel\"\n data-testid=\"components-date-picker-calendar-popup-panel\"\n >\n <DatePicker\n selected={localTime}\n onDateChange={this._onDayClick}\n showFocusOutline={false}\n />\n <div className=\"time-container\">\n <Text variant=\"body\" className=\"time-label\">\n {this._timeLabel}\n </Text>\n <TimeField\n time={{\n hours: localTime.getHours(),\n minutes: localTime.getMinutes(),\n seconds: 0,\n }}\n timeDisplay={TimeDisplay.H12MC}\n onTimeChange={this._onTimeChanged}\n />\n </div>\n </div>\n </Popup>\n <Timeline\n dayStartMs={dataProvider.dayStartMs}\n sunSetOffsetMs={sunSetOffsetMs}\n sunRiseOffsetMs={sunRiseOffsetMs}\n currentTimeOffsetMs={currentTimeOffsetMs}\n onChange={this._onChange}\n onUpdate={this._onUpdate}\n formatTime={this._formatTime}\n isPlaying={this.state.isPlaying}\n />\n <div className=\"speed-container\">\n <span title={this._speedLabel}>{speed}x</span>\n <SpeedTimeline\n className=\"speed\"\n onChange={this._onSpeedChange}\n speed={this.state.speed}\n />\n </div>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={this._loopLabel}\n className={classnames(\n \"icon\",\n !loop && \"no-loop-playback\",\n loop && \"loop-playback\"\n )}\n onClick={this._onToggleLoop}\n role=\"button\"\n tabIndex={-1}\n >\n <Icon iconSpec={<SvgLoop />} />\n </span>\n <button\n data-testid=\"shadow-settings-button\"\n title={this._settingLabel}\n className=\"shadow-settings-button\"\n ref={(element) => (this._settings = element)}\n onClick={this._onOpenSettingsPopup}\n >\n <span className=\"icon\">\n <Icon iconSpec={<SvgSettings />} />\n </span>\n </button>\n <Popup\n className=\"shadow-settings-popup\"\n target={this._settings}\n offset={11}\n isOpen={this.state.isSettingsOpened}\n onClose={this._onCloseSettingsPopup}\n position={RelativePosition.Top}\n >\n <div className=\"shadow-settings-popup-container\">\n <div className=\"shadow-settings-header\">\n {this._settingsPopupTitle}\n </div>\n <div className=\"shadow-settings-color\">\n <div className=\"shadow-settings-color-top\">\n <SaturationPicker\n hsv={this.state.shadowColor.toHSV()}\n onSaturationChange={this._handleHueOrSaturationChange}\n />\n </div>\n <div className=\"shadow-settings-color-bottom\">\n <div className=\"shadow-settings-color-bottom-left\">\n <HueSlider\n hsv={this.state.shadowColor.toHSV()}\n onHueChange={this._handleHueOrSaturationChange}\n isHorizontal={true}\n />\n </div>\n <div className=\"shadow-settings-color-bottom-right\">\n <ColorSwatch\n style={colorSwatchStyle}\n colorDef={this.state.shadowColor}\n round={false}\n />\n </div>\n </div>\n </div>\n <div className=\"shadow-settings-color-presets\">\n <ColorSwatch\n colorDef={this._presetColors[0]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[1]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[2]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[3]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[4]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[5]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[6]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n <ColorSwatch\n colorDef={this._presetColors[7]}\n round={false}\n onColorPick={this._onPresetColorPick}\n />\n </div>\n </div>\n </Popup>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Timeline
|
|
3
3
|
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
4
|
import "./SpeedTimeline.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import type { CommonProps } from "@itwin/core-react";
|
|
7
7
|
interface SpeedProps extends CommonProps {
|
|
8
8
|
speed: number;
|
|
@@ -11,6 +11,6 @@ interface SpeedProps extends CommonProps {
|
|
|
11
11
|
/** Speed Timeline used in Solar Timeline component
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
export declare function SpeedTimeline(props: SpeedProps): JSX.Element;
|
|
14
|
+
export declare function SpeedTimeline(props: SpeedProps): React.JSX.Element;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=SpeedTimeline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeedTimeline.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SpeedTimeline.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"SpeedTimeline.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SpeedTimeline.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,UAAU,UAAW,SAAQ,WAAW;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,qBA2B9C"}
|
|
@@ -125,7 +125,7 @@ export declare class TimelineComponent extends React.Component<TimelineComponent
|
|
|
125
125
|
private _onSetTotalDuration;
|
|
126
126
|
private _createMenuItemNode;
|
|
127
127
|
private _renderSettings;
|
|
128
|
-
render(): JSX.Element;
|
|
128
|
+
render(): React.JSX.Element;
|
|
129
129
|
}
|
|
130
130
|
export {};
|
|
131
131
|
//# sourceMappingURL=TimelineComponent.d.ts.map
|
|
@@ -142,14 +142,14 @@ class TimelineComponent extends React.Component {
|
|
|
142
142
|
};
|
|
143
143
|
// set the current duration, which will call the OnChange callback
|
|
144
144
|
this._setDuration = (currentDuration, updatedTotal) => {
|
|
145
|
-
const actualDuration = Math.min(updatedTotal
|
|
145
|
+
const actualDuration = Math.min(updatedTotal ?? this.state.totalDuration, Math.max(currentDuration, 0));
|
|
146
146
|
this._timeLastCycle = new Date().getTime();
|
|
147
147
|
// istanbul ignore else
|
|
148
148
|
if (!this._unmounted)
|
|
149
149
|
this.setState({ currentDuration: actualDuration });
|
|
150
150
|
// istanbul ignore else
|
|
151
151
|
if (this.props.onChange) {
|
|
152
|
-
const fraction = actualDuration / (updatedTotal
|
|
152
|
+
const fraction = actualDuration / (updatedTotal ?? this.state.totalDuration);
|
|
153
153
|
this.props.onChange(fraction);
|
|
154
154
|
}
|
|
155
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineComponent.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/TimelineComponent.t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,EAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,CAAC,CACpD,CACR;oBACA,YAAY,IAAI,CACf,oBAAC,uBAAU,IACT,SAAS,EAAC,mBAAmB,EAC7B,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,IAAI,CAAC,sBAAsB,GACrC,CACH,CACG;gBACL,SAAS,IAAI,IAAI,CAAC,eAAe,EAAE,CAChC,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAxhBD,8CAwhBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Timeline\n */\nimport type { GenericUiEventArgs } from \"@itwin/appui-abstract\";\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport type { DateFormatOptions } from \"@itwin/components-react\";\nimport {\n toDateString,\n toTimeString,\n UiComponents,\n} from \"@itwin/components-react\";\nimport { Icon } from \"@itwin/core-react\";\nimport {\n SvgCaretLeft,\n SvgCaretRight,\n SvgCheckmark,\n SvgMoreVertical,\n SvgPlayCircular,\n} from \"@itwin/itwinui-icons-react\";\nimport { DropdownMenu, MenuDivider, MenuItem } from \"@itwin/itwinui-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\n\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { InlineEdit } from \"./InlineEdit\";\nimport type { PlaybackSettings, TimelinePausePlayArgs } from \"./interfaces\";\nimport { TimelinePausePlayAction } from \"./interfaces\";\nimport { PlayButton, PlayerButton } from \"./PlayerButton\";\nimport { Scrubber } from \"./Scrubber\";\n\nimport \"./TimelineComponent.scss\";\n\n// cspell:ignore millisec\n\nconst slowSpeed = 60 * 1000;\nconst mediumSpeed = 20 * 1000;\nconst fastSpeed = 10 * 1000;\n/**\n * [[TimelineMenuItemOption]]: specifies how the app wants the timeline speeds to be installed on the TimelineComponent's ContextMenu\n * \"replace\" : use the app-supplied items in place of the standard items\n * \"append\" : add the app-supplied items following the standard items\n * \"prefix\" : add the app-supplied items before the standard items\n *\n * @public\n */\nexport type TimelineMenuItemOption = \"replace\" | \"append\" | \"prefix\";\n/**\n * [[TimelineMenuItemProps]] specifies playback speed entries in the Timeline's ContextMenu\n * @public\n */\nexport interface TimelineMenuItemProps {\n /** localized label for menu item */\n label: string;\n\n /** duration for the entire timeline to play */\n timelineDuration: number;\n}\n/** TimelineDateMarkerProps: Mark a date on the timeline with an indicator\n * @public\n */\nexport interface TimelineDateMarkerProps {\n /** Date to mark. If undefined, today's date will be used. */\n date?: Date;\n /** ReactNode to use as the marker on the timeline. If undefined, a short vertical bar will mark the date. */\n dateMarker?: React.ReactNode;\n}\n/**\n * [[TimelineComponentProps]] configure the timeline\n * @public\n */\nexport interface TimelineComponentProps {\n /** Start date: beginning of the date range of a date-based timeline. */\n startDate?: Date;\n /** End date: end of the date range of a date-based timeline. */\n endDate?: Date;\n /** Total duration: range of the timeline in milliseconds. */\n totalDuration: number;\n /** Initial value for the current duration (the location of the thumb) in milliseconds */\n initialDuration?: number;\n /** Show in minimized mode (For future use. This prop will always be treated as true.) */\n minimized?: boolean;\n /** When playing, repeat indefinitely */\n repeat?: boolean;\n /** Show duration instead of time */\n showDuration?: boolean;\n /** Callback with current duration value (as a fraction) */\n onChange?: (duration: number) => void;\n /** Callback triggered when play/pause button is pressed */\n onPlayPause?: (playing: boolean) => void;\n /** Callback triggered when backward/forward buttons are pressed */\n onJump?: (forward: boolean) => void;\n /** Callback triggered when a setting is changed */\n onSettingsChange?: (arg: PlaybackSettings) => void;\n /** Always display in miniMode with no expand menu (For future use. This prop will always be treated as true) */\n alwaysMinimized?: boolean;\n /** ComponentId -- must be set to use TimelineComponentEvents */\n componentId?: string;\n /** Include the repeat option on the Timeline Context Menu */\n includeRepeat?: boolean;\n /** App-supplied speed entries in the Timeline Context Menu */\n appMenuItems?: TimelineMenuItemProps[];\n /** How to include the supplied app menu items in the Timeline Context Menu (prefix, append, replace)*/\n appMenuItemOption?: TimelineMenuItemOption;\n /** Display date and time offset by the number of minutes specified. When undefined - local timezone will be used */\n timeZoneOffset?: number;\n /** Display a marker on the timeline rail to indicate current date - will only work if starDate and endDate are defined */\n markDate?: TimelineDateMarkerProps;\n /** Options used to format date string. If not defined it will user browser default locale settings. */\n dateFormatOptions?: DateFormatOptions;\n /** Options used to format time string. If not defined it will user browser default locale settings. */\n timeFormatOptions?: DateFormatOptions;\n}\n/** @internal */\ninterface TimelineComponentState {\n /** True if timeline is currently playing, false if paused */\n isPlaying: boolean;\n /** Minimized mode (For future use. This will always be true) */\n minimized?: boolean;\n /** Current duration in milliseconds */\n currentDuration: number;\n /** Total duration in milliseconds */\n totalDuration: number;\n /** If true, automatically restart when the timeline is finished playing */\n repeat: boolean;\n /** If true, include the repeat option in the timeline context menu */\n includeRepeat: boolean;\n}\n\n/**\n * [[TimelineComponent]] is used to playback timeline data\n * @public\n */\nexport class TimelineComponent extends React.Component<\n TimelineComponentProps,\n TimelineComponentState\n> {\n private _timeLastCycle = 0;\n private _requestFrame = 0;\n private _unmounted = false;\n private _repeatLabel: string;\n private _removeListener?: () => void;\n private _standardTimelineMenuItems: TimelineMenuItemProps[] = [\n {\n label: UiIModelComponents.translate(\"timeline.slow\"),\n timelineDuration: slowSpeed,\n },\n {\n label: UiIModelComponents.translate(\"timeline.medium\"),\n timelineDuration: mediumSpeed,\n },\n {\n label: UiIModelComponents.translate(\"timeline.fast\"),\n timelineDuration: fastSpeed,\n },\n ];\n\n constructor(props: TimelineComponentProps) {\n super(props);\n\n this.state = {\n isPlaying: false,\n minimized: true,\n currentDuration: props.initialDuration\n ? props.initialDuration\n : /* istanbul ignore next */ 0,\n totalDuration: this.props.totalDuration,\n repeat: this.props.repeat ? true : false,\n includeRepeat:\n this.props.includeRepeat || this.props.includeRepeat === undefined\n ? true\n : false,\n };\n\n this._repeatLabel = UiIModelComponents.translate(\"timeline.repeat\");\n // istanbul ignore else\n if (this.props.componentId) {\n // can't handle an event if we have no id\n this._removeListener = UiAdmin.onGenericUiEvent.addListener(\n this._handleTimelinePausePlayEvent\n );\n }\n }\n\n public override componentWillUnmount() {\n if (this._removeListener) this._removeListener();\n window.cancelAnimationFrame(this._requestFrame);\n this._unmounted = true;\n }\n\n public override shouldComponentUpdate(\n nextProps: TimelineComponentProps,\n nextState: TimelineComponentState\n ) {\n let result = false;\n\n // istanbul ignore next\n if (\n nextState !== this.state ||\n nextProps !== this.props ||\n nextProps.startDate !== this.props.startDate ||\n nextProps.endDate !== this.props.endDate ||\n nextProps.initialDuration !== this.props.initialDuration ||\n nextProps.repeat !== this.props.repeat\n )\n result = true;\n\n return result;\n }\n\n public override componentDidUpdate(prevProps: TimelineComponentProps) {\n // istanbul ignore else\n if (this.props.initialDuration !== prevProps.initialDuration) {\n this._setDuration(\n this.props.initialDuration\n ? this.props.initialDuration\n : /* istanbul ignore next */ 0,\n this.props.totalDuration !== prevProps.totalDuration\n ? this.props.totalDuration\n : undefined\n );\n }\n\n // istanbul ignore else\n if (this.props.repeat !== prevProps.repeat) {\n this._changeRepeatSetting(this.props.repeat);\n }\n\n // istanbul ignore else\n if (this.props.totalDuration !== prevProps.totalDuration) {\n this._onSetTotalDuration(this.props.totalDuration);\n }\n }\n private _handleTimelinePausePlayEvent = (args: GenericUiEventArgs): void => {\n const timelineArgs = args as TimelinePausePlayArgs;\n // istanbul ignore else\n if (\n !timelineArgs ||\n this.props.componentId !== timelineArgs.uiComponentId ||\n timelineArgs.timelineAction === undefined\n )\n return;\n\n let startPlaying: boolean;\n switch (timelineArgs.timelineAction) {\n case TimelinePausePlayAction.Play:\n startPlaying = true;\n break;\n case TimelinePausePlayAction.Pause:\n startPlaying = false;\n break;\n case TimelinePausePlayAction.Toggle:\n startPlaying = !this.state.isPlaying;\n break;\n // istanbul ignore next\n default:\n return; // throw error?\n }\n if (startPlaying) this._onPlay();\n else this._onPause();\n };\n\n // user clicked backward button\n private _onBackward = () => {\n // istanbul ignore else\n if (this.props.onJump) this.props.onJump(false);\n };\n\n // user clicked forward button\n private _onForward = () => {\n // istanbul ignore else\n if (this.props.onJump) this.props.onJump(true);\n };\n\n // user clicked play button\n private _onPlay = () => {\n // istanbul ignore if\n if (this.state.isPlaying) return;\n\n // timeline was complete, restart from the beginning\n if (this.state.currentDuration >= this.state.totalDuration) {\n this._replay();\n } else this._play();\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(true);\n };\n\n // user clicked pause button\n private _onPause = () => {\n // istanbul ignore if\n if (!this.state.isPlaying) return;\n\n // stop requesting frames\n window.cancelAnimationFrame(this._requestFrame);\n\n // stop playing\n this.setState({ isPlaying: false });\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n };\n\n // user clicked on timeline rail or dragged scrubber handle\n private _onTimelineChange = (values: ReadonlyArray<number>) => {\n const currentDuration = values[0];\n this._setDuration(currentDuration);\n };\n\n // set the current duration, which will call the OnChange callback\n private _setDuration = (currentDuration: number, updatedTotal?: number) => {\n const actualDuration = Math.min(\n updatedTotal ?? this.state.totalDuration,\n Math.max(currentDuration, 0)\n );\n\n this._timeLastCycle = new Date().getTime();\n // istanbul ignore else\n if (!this._unmounted) this.setState({ currentDuration: actualDuration });\n // istanbul ignore else\n if (this.props.onChange) {\n const fraction =\n actualDuration / (updatedTotal ?? this.state.totalDuration);\n this.props.onChange(fraction);\n }\n };\n\n // recursively update the animation until we hit the end or the pause button is clicked\n private _updateAnimation = (_timestamp: number) => {\n // istanbul ignore else\n if (!this.state.isPlaying && !this._unmounted) {\n return;\n }\n\n // update duration\n const currentTime = new Date().getTime();\n const millisecondsElapsed = currentTime - this._timeLastCycle;\n const duration = this.state.currentDuration + millisecondsElapsed;\n this._setDuration(duration);\n\n // stop the animation!\n if (duration >= this.state.totalDuration) {\n window.cancelAnimationFrame(this._requestFrame);\n this.setState({ isPlaying: false });\n if (this.state.repeat) this._replay();\n else {\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n }\n\n return;\n }\n\n // continue the animation - request the next frame\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n };\n\n private _play() {\n // start playing\n this.setState({ isPlaying: true }, () => {\n // request the next frame\n this._timeLastCycle = new Date().getTime();\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n });\n }\n\n private _replay = () => {\n // timeline was complete, restart from the beginning\n this.setState({ currentDuration: 0 }, () => this._play());\n };\n\n private _displayTime(millisec: number) {\n const addZero = (i: number) => {\n return i < 10 ? `0${i}` : i;\n };\n\n const date = new Date(millisec);\n // const hours = date.getUTCHours();\n const minutes = date.getUTCMinutes();\n const seconds = date.getUTCSeconds();\n return `${addZero(minutes)}:${addZero(seconds)}`;\n }\n\n private _getMilliseconds(time: string) {\n // istanbul ignore else - WIP\n if (time.indexOf(\":\") !== -1) {\n return (\n (Number(time.split(\":\")[0]) * 60 + Number(time.split(\":\")[1])) * 1000\n );\n } else {\n return Number(time) * 1000;\n }\n }\n\n // user changed the total duration\n private _onTotalDurationChange = (value: string) => {\n // NOTE: we should reset the current duration to 0\n const milliseconds = this._getMilliseconds(value);\n this._onSetTotalDuration(milliseconds);\n };\n\n private _changeRepeatSetting = (newValue?: boolean) => {\n // istanbul ignore else\n if (newValue !== undefined) {\n this.setState(\n () => ({ repeat: newValue }),\n () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ loop: this.state.repeat });\n }\n }\n );\n }\n };\n\n private _onRepeatChanged = () => {\n this.setState(\n (prevState) => ({ repeat: !prevState.repeat }),\n () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ loop: this.state.repeat });\n }\n }\n );\n };\n\n private _currentDate = (): Date => {\n const fraction = this.state.currentDuration / this.state.totalDuration;\n if (this.props.endDate && this.props.startDate) {\n const timeElapsed =\n (this.props.endDate.getTime() - this.props.startDate.getTime()) *\n fraction;\n return new Date(this.props.startDate.getTime() + timeElapsed);\n }\n return new Date();\n };\n\n private _onSetTotalDuration = (milliseconds: number) => {\n this.setState({ totalDuration: milliseconds }, () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ duration: milliseconds });\n }\n });\n };\n\n private _createMenuItemNode(\n item: TimelineMenuItemProps,\n index: number,\n currentTimelineDuration: number,\n close: () => void\n ): React.ReactElement {\n const label = item.label;\n const checked = currentTimelineDuration === item.timelineDuration;\n const icon = checked ? (\n <span className=\"icon\">\n <Icon iconSpec={<SvgCheckmark />} />{\" \"}\n </span>\n ) : (\n <span />\n );\n return (\n <MenuItem\n key={index}\n startIcon={icon}\n onClick={() => {\n this._onSetTotalDuration(item.timelineDuration);\n close();\n }}\n >\n {label}\n </MenuItem>\n );\n }\n\n private _renderSettings = () => {\n const createMenuItemNodes = (close: () => void): React.ReactElement[] => {\n const { totalDuration } = this.state;\n let contextMenuItems: Array<TimelineMenuItemProps> = [];\n\n if (!this.props.appMenuItems) {\n contextMenuItems = this._standardTimelineMenuItems;\n } else {\n if (this.props.appMenuItemOption === \"append\") {\n contextMenuItems = this._standardTimelineMenuItems.concat(\n this.props.appMenuItems\n );\n } else if (this.props.appMenuItemOption === \"prefix\") {\n contextMenuItems = this.props.appMenuItems.concat(\n this._standardTimelineMenuItems\n );\n } else {\n contextMenuItems = this.props.appMenuItems;\n }\n }\n\n const itemNodes: React.ReactElement[] = [];\n let keyIndex = 0;\n if (this.state.includeRepeat) {\n const checked = this.state.repeat;\n const icon = checked ? (\n <span className=\"icon\">\n <Icon iconSpec={<SvgCheckmark />} />{\" \"}\n </span>\n ) : (\n <span />\n );\n itemNodes.push(\n <MenuItem\n key={++keyIndex}\n onClick={() => {\n this._onRepeatChanged();\n close();\n }}\n startIcon={icon}\n >\n {this._repeatLabel}\n </MenuItem>\n );\n itemNodes.push(<MenuDivider key={++keyIndex} />);\n }\n\n contextMenuItems.forEach((item: TimelineMenuItemProps, index: number) => {\n itemNodes.push(\n this._createMenuItemNode(\n item,\n index + keyIndex + 1,\n totalDuration,\n close\n )\n );\n });\n\n return itemNodes;\n };\n\n return (\n <DropdownMenu menuItems={createMenuItemNodes} placement=\"top-start\">\n <span\n data-testid=\"timeline-settings\"\n className=\"timeline-settings icon\"\n role=\"button\"\n tabIndex={-1}\n title={UiComponents.translate(\"button.label.settings\")}\n >\n <Icon iconSpec={<SvgMoreVertical />} />\n </span>\n </DropdownMenu>\n );\n };\n\n public override render() {\n const {\n startDate,\n endDate,\n showDuration,\n timeZoneOffset,\n dateFormatOptions,\n timeFormatOptions,\n } = this.props;\n const { currentDuration, totalDuration, minimized } = this.state;\n const currentDate = this._currentDate();\n const durationString = this._displayTime(currentDuration);\n const totalDurationString = this._displayTime(totalDuration);\n const hasDates = !!startDate && !!endDate;\n\n return (\n <div\n data-testid=\"timeline-component\"\n className={classnames(\n \"timeline-component\",\n !!minimized && \"minimized\",\n hasDates && \"has-dates\"\n )}\n >\n <div className=\"header\">\n <PlayButton\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n data-testid=\"timeline-play\"\n />\n <PlayerButton\n className=\"play-backward\"\n icon={<SvgCaretLeft />}\n onClick={this._onBackward}\n title={UiIModelComponents.translate(\"timeline.backward\")}\n />\n <PlayerButton\n className=\"play-button-step\"\n icon={<SvgPlayCircular />}\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n title={UiIModelComponents.translate(\"timeline.step\")}\n />\n <PlayerButton\n className=\"play-forward\"\n icon={<SvgCaretRight />}\n onClick={this._onForward}\n title={UiIModelComponents.translate(\"timeline.backward\")}\n />\n <span className=\"current-date\">\n {toDateString(currentDate, timeZoneOffset, dateFormatOptions)}\n </span>\n </div>\n <div className=\"scrubber\">\n <PlayButton\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n />\n <div className=\"start-time-container\">\n {hasDates && (\n <span data-testid=\"test-start-date\" className=\"start-date\">\n {toDateString(startDate, timeZoneOffset, dateFormatOptions)}\n </span>\n )}\n {hasDates && !showDuration && (\n <span data-testid=\"test-start-time\" className=\"start-time\">\n {toTimeString(startDate, timeZoneOffset, timeFormatOptions)}\n </span>\n )}\n {showDuration && (\n <span className=\"duration-start-time\">{durationString}</span>\n )}\n </div>\n <Scrubber\n className=\"slider\"\n currentDuration={this.state.currentDuration}\n totalDuration={totalDuration}\n startDate={startDate}\n endDate={endDate}\n isPlaying={this.state.isPlaying}\n inMiniMode={!!minimized}\n showTime={!showDuration}\n onChange={this._onTimelineChange}\n onUpdate={this._onTimelineChange}\n timeZoneOffset={this.props.timeZoneOffset}\n markDate={this.props.markDate}\n />\n <div className=\"end-time-container\">\n {hasDates && (\n <span className=\"end-date\">\n {toDateString(endDate, timeZoneOffset)}\n </span>\n )}\n {hasDates && !showDuration && (\n <span className=\"end-time\">\n {toTimeString(endDate, timeZoneOffset, timeFormatOptions)}\n </span>\n )}\n {showDuration && (\n <InlineEdit\n className=\"duration-end-time\"\n defaultValue={totalDurationString}\n onChange={this._onTotalDurationChange}\n />\n )}\n </div>\n {minimized && this._renderSettings()}\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TimelineComponent.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/TimelineComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,0DAAgD;AAEhD,8DAIiC;AACjC,kDAAyC;AACzC,oEAMoC;AACpC,wDAA2E;AAC3E,4DAAoC;AACpC,6CAA+B;AAE/B,8DAA2D;AAC3D,6CAA0C;AAE1C,6CAAuD;AACvD,iDAA0D;AAC1D,yCAAsC;AAEtC,oCAAkC;AAElC,yBAAyB;AAEzB,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;AAC5B,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9B,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;AA4F5B;;;GA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,SAAS,EAAC,qBAAqB,IAAE,cAAc,CAAQ,CAC9D,CACG;gBACN,oBAAC,mBAAQ,IACP,SAAS,EAAC,QAAQ,EAClB,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAC3C,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,UAAU,EAAE,CAAC,CAAC,SAAS,EACvB,QAAQ,EAAE,CAAC,YAAY,EACvB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EACzC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAC7B;gBACF,6BAAK,SAAS,EAAC,oBAAoB;oBAChC,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,UAAU,IACvB,IAAA,+BAAY,EAAC,OAAO,EAAE,cAAc,CAAC,CACjC,CACR;oBACA,QAAQ,IAAI,CAAC,YAAY,IAAI,CAC5B,8BAAM,SAAS,EAAC,UAAU,IACvB,IAAA,+BAAY,EAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,CAAC,CACpD,CACR;oBACA,YAAY,IAAI,CACf,oBAAC,uBAAU,IACT,SAAS,EAAC,mBAAmB,EAC7B,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,IAAI,CAAC,sBAAsB,GACrC,CACH,CACG;gBACL,SAAS,IAAI,IAAI,CAAC,eAAe,EAAE,CAChC,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAxhBD,8CAwhBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Timeline\n */\nimport type { GenericUiEventArgs } from \"@itwin/appui-abstract\";\nimport { UiAdmin } from \"@itwin/appui-abstract\";\nimport type { DateFormatOptions } from \"@itwin/components-react\";\nimport {\n toDateString,\n toTimeString,\n UiComponents,\n} from \"@itwin/components-react\";\nimport { Icon } from \"@itwin/core-react\";\nimport {\n SvgCaretLeft,\n SvgCaretRight,\n SvgCheckmark,\n SvgMoreVertical,\n SvgPlayCircular,\n} from \"@itwin/itwinui-icons-react\";\nimport { DropdownMenu, MenuDivider, MenuItem } from \"@itwin/itwinui-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\n\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { InlineEdit } from \"./InlineEdit\";\nimport type { PlaybackSettings, TimelinePausePlayArgs } from \"./interfaces\";\nimport { TimelinePausePlayAction } from \"./interfaces\";\nimport { PlayButton, PlayerButton } from \"./PlayerButton\";\nimport { Scrubber } from \"./Scrubber\";\n\nimport \"./TimelineComponent.scss\";\n\n// cspell:ignore millisec\n\nconst slowSpeed = 60 * 1000;\nconst mediumSpeed = 20 * 1000;\nconst fastSpeed = 10 * 1000;\n/**\n * [[TimelineMenuItemOption]]: specifies how the app wants the timeline speeds to be installed on the TimelineComponent's ContextMenu\n * \"replace\" : use the app-supplied items in place of the standard items\n * \"append\" : add the app-supplied items following the standard items\n * \"prefix\" : add the app-supplied items before the standard items\n *\n * @public\n */\nexport type TimelineMenuItemOption = \"replace\" | \"append\" | \"prefix\";\n/**\n * [[TimelineMenuItemProps]] specifies playback speed entries in the Timeline's ContextMenu\n * @public\n */\nexport interface TimelineMenuItemProps {\n /** localized label for menu item */\n label: string;\n\n /** duration for the entire timeline to play */\n timelineDuration: number;\n}\n/** TimelineDateMarkerProps: Mark a date on the timeline with an indicator\n * @public\n */\nexport interface TimelineDateMarkerProps {\n /** Date to mark. If undefined, today's date will be used. */\n date?: Date;\n /** ReactNode to use as the marker on the timeline. If undefined, a short vertical bar will mark the date. */\n dateMarker?: React.ReactNode;\n}\n/**\n * [[TimelineComponentProps]] configure the timeline\n * @public\n */\nexport interface TimelineComponentProps {\n /** Start date: beginning of the date range of a date-based timeline. */\n startDate?: Date;\n /** End date: end of the date range of a date-based timeline. */\n endDate?: Date;\n /** Total duration: range of the timeline in milliseconds. */\n totalDuration: number;\n /** Initial value for the current duration (the location of the thumb) in milliseconds */\n initialDuration?: number;\n /** Show in minimized mode (For future use. This prop will always be treated as true.) */\n minimized?: boolean;\n /** When playing, repeat indefinitely */\n repeat?: boolean;\n /** Show duration instead of time */\n showDuration?: boolean;\n /** Callback with current duration value (as a fraction) */\n onChange?: (duration: number) => void;\n /** Callback triggered when play/pause button is pressed */\n onPlayPause?: (playing: boolean) => void;\n /** Callback triggered when backward/forward buttons are pressed */\n onJump?: (forward: boolean) => void;\n /** Callback triggered when a setting is changed */\n onSettingsChange?: (arg: PlaybackSettings) => void;\n /** Always display in miniMode with no expand menu (For future use. This prop will always be treated as true) */\n alwaysMinimized?: boolean;\n /** ComponentId -- must be set to use TimelineComponentEvents */\n componentId?: string;\n /** Include the repeat option on the Timeline Context Menu */\n includeRepeat?: boolean;\n /** App-supplied speed entries in the Timeline Context Menu */\n appMenuItems?: TimelineMenuItemProps[];\n /** How to include the supplied app menu items in the Timeline Context Menu (prefix, append, replace)*/\n appMenuItemOption?: TimelineMenuItemOption;\n /** Display date and time offset by the number of minutes specified. When undefined - local timezone will be used */\n timeZoneOffset?: number;\n /** Display a marker on the timeline rail to indicate current date - will only work if starDate and endDate are defined */\n markDate?: TimelineDateMarkerProps;\n /** Options used to format date string. If not defined it will user browser default locale settings. */\n dateFormatOptions?: DateFormatOptions;\n /** Options used to format time string. If not defined it will user browser default locale settings. */\n timeFormatOptions?: DateFormatOptions;\n}\n/** @internal */\ninterface TimelineComponentState {\n /** True if timeline is currently playing, false if paused */\n isPlaying: boolean;\n /** Minimized mode (For future use. This will always be true) */\n minimized?: boolean;\n /** Current duration in milliseconds */\n currentDuration: number;\n /** Total duration in milliseconds */\n totalDuration: number;\n /** If true, automatically restart when the timeline is finished playing */\n repeat: boolean;\n /** If true, include the repeat option in the timeline context menu */\n includeRepeat: boolean;\n}\n\n/**\n * [[TimelineComponent]] is used to playback timeline data\n * @public\n */\nexport class TimelineComponent extends React.Component<\n TimelineComponentProps,\n TimelineComponentState\n> {\n private _timeLastCycle = 0;\n private _requestFrame = 0;\n private _unmounted = false;\n private _repeatLabel: string;\n private _removeListener?: () => void;\n private _standardTimelineMenuItems: TimelineMenuItemProps[] = [\n {\n label: UiIModelComponents.translate(\"timeline.slow\"),\n timelineDuration: slowSpeed,\n },\n {\n label: UiIModelComponents.translate(\"timeline.medium\"),\n timelineDuration: mediumSpeed,\n },\n {\n label: UiIModelComponents.translate(\"timeline.fast\"),\n timelineDuration: fastSpeed,\n },\n ];\n\n constructor(props: TimelineComponentProps) {\n super(props);\n\n this.state = {\n isPlaying: false,\n minimized: true,\n currentDuration: props.initialDuration\n ? props.initialDuration\n : /* istanbul ignore next */ 0,\n totalDuration: this.props.totalDuration,\n repeat: this.props.repeat ? true : false,\n includeRepeat:\n this.props.includeRepeat || this.props.includeRepeat === undefined\n ? true\n : false,\n };\n\n this._repeatLabel = UiIModelComponents.translate(\"timeline.repeat\");\n // istanbul ignore else\n if (this.props.componentId) {\n // can't handle an event if we have no id\n this._removeListener = UiAdmin.onGenericUiEvent.addListener(\n this._handleTimelinePausePlayEvent\n );\n }\n }\n\n public override componentWillUnmount() {\n if (this._removeListener) this._removeListener();\n window.cancelAnimationFrame(this._requestFrame);\n this._unmounted = true;\n }\n\n public override shouldComponentUpdate(\n nextProps: TimelineComponentProps,\n nextState: TimelineComponentState\n ) {\n let result = false;\n\n // istanbul ignore next\n if (\n nextState !== this.state ||\n nextProps !== this.props ||\n nextProps.startDate !== this.props.startDate ||\n nextProps.endDate !== this.props.endDate ||\n nextProps.initialDuration !== this.props.initialDuration ||\n nextProps.repeat !== this.props.repeat\n )\n result = true;\n\n return result;\n }\n\n public override componentDidUpdate(prevProps: TimelineComponentProps) {\n // istanbul ignore else\n if (this.props.initialDuration !== prevProps.initialDuration) {\n this._setDuration(\n this.props.initialDuration\n ? this.props.initialDuration\n : /* istanbul ignore next */ 0,\n this.props.totalDuration !== prevProps.totalDuration\n ? this.props.totalDuration\n : undefined\n );\n }\n\n // istanbul ignore else\n if (this.props.repeat !== prevProps.repeat) {\n this._changeRepeatSetting(this.props.repeat);\n }\n\n // istanbul ignore else\n if (this.props.totalDuration !== prevProps.totalDuration) {\n this._onSetTotalDuration(this.props.totalDuration);\n }\n }\n private _handleTimelinePausePlayEvent = (args: GenericUiEventArgs): void => {\n const timelineArgs = args as TimelinePausePlayArgs;\n // istanbul ignore else\n if (\n !timelineArgs ||\n this.props.componentId !== timelineArgs.uiComponentId ||\n timelineArgs.timelineAction === undefined\n )\n return;\n\n let startPlaying: boolean;\n switch (timelineArgs.timelineAction) {\n case TimelinePausePlayAction.Play:\n startPlaying = true;\n break;\n case TimelinePausePlayAction.Pause:\n startPlaying = false;\n break;\n case TimelinePausePlayAction.Toggle:\n startPlaying = !this.state.isPlaying;\n break;\n // istanbul ignore next\n default:\n return; // throw error?\n }\n if (startPlaying) this._onPlay();\n else this._onPause();\n };\n\n // user clicked backward button\n private _onBackward = () => {\n // istanbul ignore else\n if (this.props.onJump) this.props.onJump(false);\n };\n\n // user clicked forward button\n private _onForward = () => {\n // istanbul ignore else\n if (this.props.onJump) this.props.onJump(true);\n };\n\n // user clicked play button\n private _onPlay = () => {\n // istanbul ignore if\n if (this.state.isPlaying) return;\n\n // timeline was complete, restart from the beginning\n if (this.state.currentDuration >= this.state.totalDuration) {\n this._replay();\n } else this._play();\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(true);\n };\n\n // user clicked pause button\n private _onPause = () => {\n // istanbul ignore if\n if (!this.state.isPlaying) return;\n\n // stop requesting frames\n window.cancelAnimationFrame(this._requestFrame);\n\n // stop playing\n this.setState({ isPlaying: false });\n\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n };\n\n // user clicked on timeline rail or dragged scrubber handle\n private _onTimelineChange = (values: ReadonlyArray<number>) => {\n const currentDuration = values[0];\n this._setDuration(currentDuration);\n };\n\n // set the current duration, which will call the OnChange callback\n private _setDuration = (currentDuration: number, updatedTotal?: number) => {\n const actualDuration = Math.min(\n updatedTotal ?? this.state.totalDuration,\n Math.max(currentDuration, 0)\n );\n\n this._timeLastCycle = new Date().getTime();\n // istanbul ignore else\n if (!this._unmounted) this.setState({ currentDuration: actualDuration });\n // istanbul ignore else\n if (this.props.onChange) {\n const fraction =\n actualDuration / (updatedTotal ?? this.state.totalDuration);\n this.props.onChange(fraction);\n }\n };\n\n // recursively update the animation until we hit the end or the pause button is clicked\n private _updateAnimation = (_timestamp: number) => {\n // istanbul ignore else\n if (!this.state.isPlaying && !this._unmounted) {\n return;\n }\n\n // update duration\n const currentTime = new Date().getTime();\n const millisecondsElapsed = currentTime - this._timeLastCycle;\n const duration = this.state.currentDuration + millisecondsElapsed;\n this._setDuration(duration);\n\n // stop the animation!\n if (duration >= this.state.totalDuration) {\n window.cancelAnimationFrame(this._requestFrame);\n this.setState({ isPlaying: false });\n if (this.state.repeat) this._replay();\n else {\n // istanbul ignore else\n if (this.props.onPlayPause) this.props.onPlayPause(false);\n }\n\n return;\n }\n\n // continue the animation - request the next frame\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n };\n\n private _play() {\n // start playing\n this.setState({ isPlaying: true }, () => {\n // request the next frame\n this._timeLastCycle = new Date().getTime();\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\n });\n }\n\n private _replay = () => {\n // timeline was complete, restart from the beginning\n this.setState({ currentDuration: 0 }, () => this._play());\n };\n\n private _displayTime(millisec: number) {\n const addZero = (i: number) => {\n return i < 10 ? `0${i}` : i;\n };\n\n const date = new Date(millisec);\n // const hours = date.getUTCHours();\n const minutes = date.getUTCMinutes();\n const seconds = date.getUTCSeconds();\n return `${addZero(minutes)}:${addZero(seconds)}`;\n }\n\n private _getMilliseconds(time: string) {\n // istanbul ignore else - WIP\n if (time.indexOf(\":\") !== -1) {\n return (\n (Number(time.split(\":\")[0]) * 60 + Number(time.split(\":\")[1])) * 1000\n );\n } else {\n return Number(time) * 1000;\n }\n }\n\n // user changed the total duration\n private _onTotalDurationChange = (value: string) => {\n // NOTE: we should reset the current duration to 0\n const milliseconds = this._getMilliseconds(value);\n this._onSetTotalDuration(milliseconds);\n };\n\n private _changeRepeatSetting = (newValue?: boolean) => {\n // istanbul ignore else\n if (newValue !== undefined) {\n this.setState(\n () => ({ repeat: newValue }),\n () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ loop: this.state.repeat });\n }\n }\n );\n }\n };\n\n private _onRepeatChanged = () => {\n this.setState(\n (prevState) => ({ repeat: !prevState.repeat }),\n () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ loop: this.state.repeat });\n }\n }\n );\n };\n\n private _currentDate = (): Date => {\n const fraction = this.state.currentDuration / this.state.totalDuration;\n if (this.props.endDate && this.props.startDate) {\n const timeElapsed =\n (this.props.endDate.getTime() - this.props.startDate.getTime()) *\n fraction;\n return new Date(this.props.startDate.getTime() + timeElapsed);\n }\n return new Date();\n };\n\n private _onSetTotalDuration = (milliseconds: number) => {\n this.setState({ totalDuration: milliseconds }, () => {\n // istanbul ignore else\n if (this.props.onSettingsChange) {\n this.props.onSettingsChange({ duration: milliseconds });\n }\n });\n };\n\n private _createMenuItemNode(\n item: TimelineMenuItemProps,\n index: number,\n currentTimelineDuration: number,\n close: () => void\n ): React.ReactElement {\n const label = item.label;\n const checked = currentTimelineDuration === item.timelineDuration;\n const icon = checked ? (\n <span className=\"icon\">\n <Icon iconSpec={<SvgCheckmark />} />{\" \"}\n </span>\n ) : (\n <span />\n );\n return (\n <MenuItem\n key={index}\n startIcon={icon}\n onClick={() => {\n this._onSetTotalDuration(item.timelineDuration);\n close();\n }}\n >\n {label}\n </MenuItem>\n );\n }\n\n private _renderSettings = () => {\n const createMenuItemNodes = (close: () => void): React.ReactElement[] => {\n const { totalDuration } = this.state;\n let contextMenuItems: Array<TimelineMenuItemProps> = [];\n\n if (!this.props.appMenuItems) {\n contextMenuItems = this._standardTimelineMenuItems;\n } else {\n if (this.props.appMenuItemOption === \"append\") {\n contextMenuItems = this._standardTimelineMenuItems.concat(\n this.props.appMenuItems\n );\n } else if (this.props.appMenuItemOption === \"prefix\") {\n contextMenuItems = this.props.appMenuItems.concat(\n this._standardTimelineMenuItems\n );\n } else {\n contextMenuItems = this.props.appMenuItems;\n }\n }\n\n const itemNodes: React.ReactElement[] = [];\n let keyIndex = 0;\n if (this.state.includeRepeat) {\n const checked = this.state.repeat;\n const icon = checked ? (\n <span className=\"icon\">\n <Icon iconSpec={<SvgCheckmark />} />{\" \"}\n </span>\n ) : (\n <span />\n );\n itemNodes.push(\n <MenuItem\n key={++keyIndex}\n onClick={() => {\n this._onRepeatChanged();\n close();\n }}\n startIcon={icon}\n >\n {this._repeatLabel}\n </MenuItem>\n );\n itemNodes.push(<MenuDivider key={++keyIndex} />);\n }\n\n contextMenuItems.forEach((item: TimelineMenuItemProps, index: number) => {\n itemNodes.push(\n this._createMenuItemNode(\n item,\n index + keyIndex + 1,\n totalDuration,\n close\n )\n );\n });\n\n return itemNodes;\n };\n\n return (\n <DropdownMenu menuItems={createMenuItemNodes} placement=\"top-start\">\n <span\n data-testid=\"timeline-settings\"\n className=\"timeline-settings icon\"\n role=\"button\"\n tabIndex={-1}\n title={UiComponents.translate(\"button.label.settings\")}\n >\n <Icon iconSpec={<SvgMoreVertical />} />\n </span>\n </DropdownMenu>\n );\n };\n\n public override render() {\n const {\n startDate,\n endDate,\n showDuration,\n timeZoneOffset,\n dateFormatOptions,\n timeFormatOptions,\n } = this.props;\n const { currentDuration, totalDuration, minimized } = this.state;\n const currentDate = this._currentDate();\n const durationString = this._displayTime(currentDuration);\n const totalDurationString = this._displayTime(totalDuration);\n const hasDates = !!startDate && !!endDate;\n\n return (\n <div\n data-testid=\"timeline-component\"\n className={classnames(\n \"timeline-component\",\n !!minimized && \"minimized\",\n hasDates && \"has-dates\"\n )}\n >\n <div className=\"header\">\n <PlayButton\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n data-testid=\"timeline-play\"\n />\n <PlayerButton\n className=\"play-backward\"\n icon={<SvgCaretLeft />}\n onClick={this._onBackward}\n title={UiIModelComponents.translate(\"timeline.backward\")}\n />\n <PlayerButton\n className=\"play-button-step\"\n icon={<SvgPlayCircular />}\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n title={UiIModelComponents.translate(\"timeline.step\")}\n />\n <PlayerButton\n className=\"play-forward\"\n icon={<SvgCaretRight />}\n onClick={this._onForward}\n title={UiIModelComponents.translate(\"timeline.backward\")}\n />\n <span className=\"current-date\">\n {toDateString(currentDate, timeZoneOffset, dateFormatOptions)}\n </span>\n </div>\n <div className=\"scrubber\">\n <PlayButton\n className=\"play-button\"\n isPlaying={this.state.isPlaying}\n onPlay={this._onPlay}\n onPause={this._onPause}\n />\n <div className=\"start-time-container\">\n {hasDates && (\n <span data-testid=\"test-start-date\" className=\"start-date\">\n {toDateString(startDate, timeZoneOffset, dateFormatOptions)}\n </span>\n )}\n {hasDates && !showDuration && (\n <span data-testid=\"test-start-time\" className=\"start-time\">\n {toTimeString(startDate, timeZoneOffset, timeFormatOptions)}\n </span>\n )}\n {showDuration && (\n <span className=\"duration-start-time\">{durationString}</span>\n )}\n </div>\n <Scrubber\n className=\"slider\"\n currentDuration={this.state.currentDuration}\n totalDuration={totalDuration}\n startDate={startDate}\n endDate={endDate}\n isPlaying={this.state.isPlaying}\n inMiniMode={!!minimized}\n showTime={!showDuration}\n onChange={this._onTimelineChange}\n onUpdate={this._onTimelineChange}\n timeZoneOffset={this.props.timeZoneOffset}\n markDate={this.props.markDate}\n />\n <div className=\"end-time-container\">\n {hasDates && (\n <span className=\"end-date\">\n {toDateString(endDate, timeZoneOffset)}\n </span>\n )}\n {hasDates && !showDuration && (\n <span className=\"end-time\">\n {toTimeString(endDate, timeZoneOffset, timeFormatOptions)}\n </span>\n )}\n {showDuration && (\n <InlineEdit\n className=\"duration-end-time\"\n defaultValue={totalDurationString}\n onChange={this._onTotalDurationChange}\n />\n )}\n </div>\n {minimized && this._renderSettings()}\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -40,5 +40,5 @@ export interface ViewportProps extends CommonProps {
|
|
|
40
40
|
* A viewport React component that creates a ScreenViewport.
|
|
41
41
|
* @public
|
|
42
42
|
*/
|
|
43
|
-
export declare function ViewportComponent(props: ViewportProps): JSX.Element;
|
|
43
|
+
export declare function ViewportComponent(props: ViewportProps): React.JSX.Element;
|
|
44
44
|
//# sourceMappingURL=ViewportComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewportComponent.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,EAEX,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,cAAc,EAGf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQrD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,wBAAwB;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,wDAAwD;IACxD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,gBAAgB;IAChB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/D,sCAAsC;IACtC,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,sCAAsC;IACtC,sBAAsB,CAAC,EAAE,OAAO,cAAc,CAAC;IAC/C,sCAAsC;IACtC,sBAAsB,CAAC,EAAE,cAAc,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"ViewportComponent.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,EAEX,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,cAAc,EAGf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQrD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,wBAAwB;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,wDAAwD;IACxD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,gBAAgB;IAChB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/D,sCAAsC;IACtC,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,sCAAsC;IACtC,sBAAsB,CAAC,EAAE,OAAO,cAAc,CAAC;IAC/C,sCAAsC;IACtC,sBAAsB,CAAC,EAAE,cAAc,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,qBAwUrD"}
|
|
@@ -44,7 +44,7 @@ const ViewportComponentEvents_1 = require("./ViewportComponentEvents");
|
|
|
44
44
|
function ViewportComponent(props) {
|
|
45
45
|
const { viewState, imodel, viewDefinitionId, getViewOverlay, viewManagerOverride, tentativePointOverride, onContextMenu, style, className, screenViewportOverride, controlId, viewportRef, } = props;
|
|
46
46
|
// istanbul ignore next
|
|
47
|
-
const viewManagerRef = React.useRef(viewManagerOverride
|
|
47
|
+
const viewManagerRef = React.useRef(viewManagerOverride ?? core_frontend_1.IModelApp.viewManager);
|
|
48
48
|
const tentativePointOverrideRef = React.useRef(tentativePointOverride);
|
|
49
49
|
const screenViewportCreated = React.useRef(false);
|
|
50
50
|
const viewportDiv = React.useRef(null);
|
|
@@ -102,10 +102,9 @@ function ViewportComponent(props) {
|
|
|
102
102
|
};
|
|
103
103
|
const targetPoint = React.useRef(null);
|
|
104
104
|
const getRotatePoint = (vp) => {
|
|
105
|
-
var _a, _b;
|
|
106
105
|
const lastTargetPoint = targetPoint.current;
|
|
107
106
|
// istanbul ignore next
|
|
108
|
-
const tentativePoint =
|
|
107
|
+
const tentativePoint = tentativePointOverrideRef.current ?? core_frontend_1.IModelApp.tentativePoint;
|
|
109
108
|
// istanbul ignore else
|
|
110
109
|
if (tentativePoint.isActive)
|
|
111
110
|
return tentativePoint.getPoint();
|
|
@@ -123,7 +122,7 @@ function ViewportComponent(props) {
|
|
|
123
122
|
targetPoint.current =
|
|
124
123
|
undefined !== visiblePoint ? visiblePoint : vp.view.getTargetPoint();
|
|
125
124
|
// istanbul ignore next
|
|
126
|
-
return
|
|
125
|
+
return targetPoint.current ?? vp.view.getCenter();
|
|
127
126
|
};
|
|
128
127
|
const handleCubeRotationChangeEvent = (args) => {
|
|
129
128
|
const viewManager = viewManagerRef.current;
|
|
@@ -227,8 +226,8 @@ function ViewportComponent(props) {
|
|
|
227
226
|
}
|
|
228
227
|
// istanbul ignore next
|
|
229
228
|
if (isMounted.current &&
|
|
230
|
-
(
|
|
231
|
-
setInitialViewState(currentViewState
|
|
229
|
+
(currentViewState?.iModel.isOpen || currentViewState?.iModel.isBlank)) {
|
|
230
|
+
setInitialViewState(currentViewState?.clone());
|
|
232
231
|
}
|
|
233
232
|
}
|
|
234
233
|
if (undefined === initialViewState)
|
|
@@ -237,13 +236,12 @@ function ViewportComponent(props) {
|
|
|
237
236
|
const [viewOverlay, setViewOverlay] = React.useState(null);
|
|
238
237
|
// This useEffect connects to ViewManger as soon as initialViewState is available once component is mounted.
|
|
239
238
|
React.useEffect(() => {
|
|
240
|
-
var _a;
|
|
241
239
|
const parentDiv = viewportDiv.current;
|
|
242
240
|
const viewManager = viewManagerRef.current;
|
|
243
241
|
// istanbul ignore next
|
|
244
242
|
if (parentDiv &&
|
|
245
243
|
initialViewState &&
|
|
246
|
-
(
|
|
244
|
+
(initialViewState?.iModel.isOpen || initialViewState?.iModel.isBlank)) {
|
|
247
245
|
if (!screenViewportCreated.current) {
|
|
248
246
|
const screenViewport = getScreenViewport(parentDiv, initialViewState);
|
|
249
247
|
screenViewportRef.current = screenViewport;
|
|
@@ -256,7 +254,7 @@ function ViewportComponent(props) {
|
|
|
256
254
|
}
|
|
257
255
|
else {
|
|
258
256
|
// istanbul ignore next
|
|
259
|
-
|
|
257
|
+
screenViewportRef.current?.changeView(initialViewState);
|
|
260
258
|
}
|
|
261
259
|
}
|
|
262
260
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|