@itwin/imodel-components-react 4.10.0 → 4.12.0
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 +17 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +6 -6
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.json +150 -0
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +2 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +4 -2
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +5 -2
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +5 -5
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.js +4 -3
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +4 -3
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts +2 -0
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.js +2 -0
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +2 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +5 -4
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.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/navigationaids/CubeNavigationAid.js +10 -5
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +1 -2
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.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.js +5 -4
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +6 -7
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +10 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -14
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +13 -9
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +21 -28
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +18 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +7 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +14 -13
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +7 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +9 -8
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +23 -22
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +7 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +15 -14
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +6 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts +3 -15
- package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayButton.js +12 -42
- package/lib/cjs/imodel-components-react/timeline/PlayButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +2 -20
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +111 -202
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +25 -333
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +5 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +39 -30
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +2 -2
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/useTranslation.d.ts +7 -0
- package/lib/cjs/imodel-components-react/useTranslation.d.ts.map +1 -0
- package/lib/cjs/imodel-components-react/useTranslation.js +52 -0
- package/lib/cjs/imodel-components-react/useTranslation.js.map +1 -0
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +13 -8
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +6 -6
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.json +150 -0
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +2 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +4 -2
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +5 -2
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +5 -5
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.js +4 -3
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +4 -3
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.d.ts +2 -0
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.js +2 -0
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +2 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +5 -4
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.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/navigationaids/CubeNavigationAid.js +10 -5
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +1 -2
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.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.js +5 -4
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +6 -7
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +10 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -14
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +13 -9
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +21 -28
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +18 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +7 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +14 -13
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +7 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +9 -8
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +23 -22
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +7 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +15 -14
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +6 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts +3 -15
- package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayButton.js +12 -39
- package/lib/esm/imodel-components-react/timeline/PlayButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +2 -20
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +112 -203
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +25 -333
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +5 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +40 -31
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +2 -2
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/useTranslation.d.ts +7 -0
- package/lib/esm/imodel-components-react/useTranslation.d.ts.map +1 -0
- package/lib/esm/imodel-components-react/useTranslation.js +25 -0
- package/lib/esm/imodel-components-react/useTranslation.js.map +1 -0
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +13 -8
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +14 -3
- package/package.json +11 -12
- package/lib/cjs/imodel-components-react/timeline/PlayButton.scss +0 -28
- package/lib/esm/imodel-components-react/timeline/PlayButton.scss +0 -28
|
@@ -5,84 +5,35 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Timeline
|
|
7
7
|
*/
|
|
8
|
-
// component is in alpha state - it may change after usability testing - test coverage not complete
|
|
9
|
-
/* istanbul ignore file */
|
|
10
8
|
import "./SolarTimeline.scss";
|
|
11
9
|
import classnames from "classnames";
|
|
12
10
|
import * as React from "react";
|
|
13
|
-
import { Slider, Text, Tooltip } from "@itwin/itwinui-react";
|
|
14
11
|
import { ColorByName, ColorDef } from "@itwin/core-common";
|
|
15
|
-
import {
|
|
16
|
-
import { Icon,
|
|
17
|
-
import {
|
|
18
|
-
import { HueSlider } from "../color/HueSlider";
|
|
19
|
-
import { SaturationPicker } from "../color/SaturationPicker";
|
|
20
|
-
import { ColorSwatch } from "../color/Swatch";
|
|
21
|
-
import { PlayButton } from "./PlayButton";
|
|
22
|
-
import { SpeedTimeline } from "./SpeedTimeline";
|
|
23
|
-
import { CustomThumb, getPercentageOfRectangle, RailMarkers, useFocusedThumb, } from "./Scrubber";
|
|
12
|
+
import { adjustDateToTimezone, UiComponents } from "@itwin/components-react";
|
|
13
|
+
import { Button, ColorBuilder, ColorInputPanel, ColorPalette, ColorPicker, DatePicker, Flex, Icon, IconButton, Label, Popover, Select, Slider, Text, Tooltip, VisuallyHidden, } from "@itwin/itwinui-react";
|
|
14
|
+
import { SvgCalendar, SvgLoop, SvgMoon, SvgSettings, SvgSun, } from "@itwin/itwinui-icons-react";
|
|
24
15
|
import { UiIModelComponents } from "../UiIModelComponents";
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const addZero = (i) => {
|
|
32
|
-
return i < 10 ? `0${i}` : i;
|
|
33
|
-
};
|
|
16
|
+
import { PlayButton } from "./PlayButton";
|
|
17
|
+
import { useTranslation } from "../useTranslation";
|
|
18
|
+
const msPerMinute = 1000 * 60;
|
|
19
|
+
const msPerHour = msPerMinute * 60;
|
|
20
|
+
const defaultPlaybackDuration = 40 * 1000;
|
|
21
|
+
const offset = 6;
|
|
34
22
|
function Timeline(props) {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const tooltipProps = React.useCallback(() => {
|
|
38
|
-
return { visible: false };
|
|
39
|
-
}, []);
|
|
40
|
-
const [showRailTooltip, setShowRailTooltip] = React.useState(false);
|
|
41
|
-
const handlePointerEnter = React.useCallback(() => {
|
|
42
|
-
setShowRailTooltip(true);
|
|
43
|
-
}, []);
|
|
44
|
-
const handlePointerLeave = React.useCallback(() => {
|
|
45
|
-
setShowRailTooltip(false);
|
|
46
|
-
}, []);
|
|
47
|
-
const handlePointerMove = React.useCallback((event) => {
|
|
48
|
-
sliderContainer &&
|
|
49
|
-
setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));
|
|
50
|
-
}, [sliderContainer]);
|
|
51
|
-
const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying, } = props;
|
|
52
|
-
const thumbHasFocus = useFocusedThumb(sliderContainer ?? undefined);
|
|
53
|
-
const tickLabel = React.useMemo(() => {
|
|
54
|
-
const showTip = isPlaying || showRailTooltip || thumbHasFocus;
|
|
55
|
-
const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;
|
|
56
|
-
const percent = isPlaying || thumbHasFocus
|
|
57
|
-
? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration
|
|
58
|
-
: pointerPercent;
|
|
59
|
-
const tooltipText = formatTime(isPlaying || thumbHasFocus
|
|
60
|
-
? dayStartMs + currentTimeOffsetMs
|
|
61
|
-
: dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration));
|
|
62
|
-
return (React.createElement(RailMarkers, { showToolTip: showTip, percent: percent, tooltipText: tooltipText }));
|
|
63
|
-
}, [
|
|
64
|
-
isPlaying,
|
|
65
|
-
showRailTooltip,
|
|
66
|
-
thumbHasFocus,
|
|
67
|
-
sunSetOffsetMs,
|
|
68
|
-
sunRiseOffsetMs,
|
|
69
|
-
currentTimeOffsetMs,
|
|
70
|
-
pointerPercent,
|
|
71
|
-
formatTime,
|
|
72
|
-
dayStartMs,
|
|
73
|
-
]);
|
|
23
|
+
const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, } = props;
|
|
24
|
+
const tooltipContent = formatTime(dayStartMs + currentTimeOffsetMs);
|
|
74
25
|
const className = classnames("solar-timeline", props.className, formatTick && "showticks");
|
|
75
|
-
const
|
|
76
|
-
const
|
|
26
|
+
const sunRiseStr = formatTime(dayStartMs + sunRiseOffsetMs);
|
|
27
|
+
const sunSetStr = formatTime(dayStartMs + sunSetOffsetMs);
|
|
77
28
|
return (React.createElement("div", { className: className },
|
|
78
|
-
React.createElement(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
29
|
+
React.createElement(VisuallyHidden, null, "Solar timeline"),
|
|
30
|
+
React.createElement(Slider, { thumbProps: () => ({ "aria-labelledby": "timeline" }), step: msPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: React.createElement(Tooltip, { content: sunRiseStr },
|
|
31
|
+
React.createElement(Icon, null,
|
|
32
|
+
React.createElement(SvgSun, null))), maxLabel: React.createElement(Tooltip, { content: sunSetStr },
|
|
33
|
+
React.createElement(Icon, null,
|
|
34
|
+
React.createElement(SvgMoon, null))), onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: () => ({
|
|
35
|
+
content: tooltipContent,
|
|
36
|
+
}) })));
|
|
86
37
|
}
|
|
87
38
|
/** Solar Timeline
|
|
88
39
|
* @alpha
|
|
@@ -90,35 +41,10 @@ function Timeline(props) {
|
|
|
90
41
|
export class SolarTimeline extends React.PureComponent {
|
|
91
42
|
constructor(props) {
|
|
92
43
|
super(props);
|
|
93
|
-
this._datePicker = null;
|
|
94
|
-
this._settings = null;
|
|
95
44
|
this._requestFrame = 0;
|
|
96
45
|
this._unmounted = false;
|
|
97
46
|
this._timeLastCycle = 0;
|
|
98
47
|
this._totalPlayTime = 0;
|
|
99
|
-
this._settingsPopupTitle = UiIModelComponents.translate("solarsettings.shadowcolor");
|
|
100
|
-
this._playLabel = UiIModelComponents.translate("solartimeline.play");
|
|
101
|
-
this._settingLabel = UiIModelComponents.translate("solartimeline.settings");
|
|
102
|
-
this._loopLabel = UiIModelComponents.translate("timeline.repeat");
|
|
103
|
-
this._speedLabel = UiIModelComponents.translate("solartimeline.speed");
|
|
104
|
-
this._dateTimeLabel = UiIModelComponents.translate("solartimeline.dateTime");
|
|
105
|
-
this._months = [
|
|
106
|
-
UiComponents.translate("month.short.january"),
|
|
107
|
-
UiComponents.translate("month.short.february"),
|
|
108
|
-
UiComponents.translate("month.short.march"),
|
|
109
|
-
UiComponents.translate("month.short.april"),
|
|
110
|
-
UiComponents.translate("month.short.may"),
|
|
111
|
-
UiComponents.translate("month.short.june"),
|
|
112
|
-
UiComponents.translate("month.short.july"),
|
|
113
|
-
UiComponents.translate("month.short.august"),
|
|
114
|
-
UiComponents.translate("month.short.september"),
|
|
115
|
-
UiComponents.translate("month.short.october"),
|
|
116
|
-
UiComponents.translate("month.short.november"),
|
|
117
|
-
UiComponents.translate("month.short.december"),
|
|
118
|
-
];
|
|
119
|
-
this._timeLabel = UiComponents.translate("datepicker.time");
|
|
120
|
-
this._amLabel = UiComponents.translate("time.am");
|
|
121
|
-
this._pmLabel = UiComponents.translate("time.pm");
|
|
122
48
|
this._presetColors = [
|
|
123
49
|
ColorDef.create(ColorByName.grey),
|
|
124
50
|
ColorDef.create(ColorByName.lightGrey),
|
|
@@ -129,9 +55,9 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
129
55
|
ColorDef.create(ColorByName.tan),
|
|
130
56
|
ColorDef.create(ColorByName.darkBrown),
|
|
131
57
|
];
|
|
58
|
+
this._speeds = [1, 2, 3, 4, 5, 6];
|
|
132
59
|
// recursively update the animation until we hit the end or the pause button is clicked
|
|
133
60
|
this._updateAnimation = (_timestamp) => {
|
|
134
|
-
// istanbul ignore else
|
|
135
61
|
if (!this.state.isPlaying || this._unmounted) {
|
|
136
62
|
window.cancelAnimationFrame(this._requestFrame);
|
|
137
63
|
return;
|
|
@@ -167,7 +93,6 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
167
93
|
};
|
|
168
94
|
// user clicked pause button
|
|
169
95
|
this._onPause = () => {
|
|
170
|
-
// istanbul ignore if
|
|
171
96
|
if (!this.state.isPlaying)
|
|
172
97
|
return;
|
|
173
98
|
const currentTime = new Date().getTime();
|
|
@@ -176,13 +101,11 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
176
101
|
window.cancelAnimationFrame(this._requestFrame);
|
|
177
102
|
// stop playing
|
|
178
103
|
this.setState({ isPlaying: false });
|
|
179
|
-
// istanbul ignore else
|
|
180
104
|
if (this.props.onPlayPause)
|
|
181
105
|
this.props.onPlayPause(false);
|
|
182
106
|
};
|
|
183
107
|
// user clicked play button
|
|
184
108
|
this._onPlay = () => {
|
|
185
|
-
// istanbul ignore if
|
|
186
109
|
if (this.state.isPlaying)
|
|
187
110
|
return;
|
|
188
111
|
if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||
|
|
@@ -194,52 +117,34 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
194
117
|
this._play(this.state.currentTimeOffsetMs);
|
|
195
118
|
}
|
|
196
119
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);
|
|
201
|
-
this.props.dataProvider.setDateAndTime(selectedDate);
|
|
120
|
+
this._onDateChange = (newDate) => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
this.props.dataProvider.setDateAndTime(newDate);
|
|
202
123
|
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
203
124
|
const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
|
|
204
125
|
const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;
|
|
205
126
|
const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;
|
|
206
|
-
const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);
|
|
207
|
-
this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);
|
|
208
127
|
/** call dataProvider to update display style */
|
|
209
|
-
|
|
210
|
-
|
|
128
|
+
// this.props.dataProvider.onTimeChanged?.(this.props.dataProvider.timeOfDay);
|
|
129
|
+
// Update time
|
|
130
|
+
const newHours = newDate.getHours();
|
|
131
|
+
const newMinutes = newDate.getMinutes();
|
|
132
|
+
const newSunTime = newHours * msPerHour + newMinutes * msPerMinute;
|
|
133
|
+
const dateWithNewTime = new Date(dayStartMs + newSunTime);
|
|
134
|
+
// this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
|
|
135
|
+
const currentTimeOffsetMs = this.ensureRange(newSunTime, sunRiseOffsetMs, sunSetOffsetMs);
|
|
136
|
+
this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs);
|
|
137
|
+
this._timeLastCycle = new Date().getTime();
|
|
138
|
+
(_b = (_a = this.props.dataProvider).onTimeChanged) === null || _b === void 0 ? void 0 : _b.call(_a, dateWithNewTime);
|
|
211
139
|
this.setState({
|
|
212
140
|
dayStartMs,
|
|
213
141
|
sunRiseOffsetMs,
|
|
214
142
|
sunSetOffsetMs,
|
|
215
|
-
currentTimeOffsetMs
|
|
143
|
+
currentTimeOffsetMs,
|
|
216
144
|
sunDeltaMs,
|
|
217
145
|
isDateOpened: false,
|
|
218
|
-
}, () => {
|
|
219
|
-
this._timeLastCycle = new Date().getTime();
|
|
220
146
|
});
|
|
221
147
|
};
|
|
222
|
-
this._onTimeChanged = (time) => {
|
|
223
|
-
// compute the current date (with time)
|
|
224
|
-
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
225
|
-
const sunTime = time.hours * millisecPerHour + time.minutes * millisecPerMinute;
|
|
226
|
-
const dateWithNewTime = new Date(dayStartMs + sunTime);
|
|
227
|
-
this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
|
|
228
|
-
// notify the provider to update style
|
|
229
|
-
if (this.props.dataProvider.onTimeChanged)
|
|
230
|
-
this.props.dataProvider.onTimeChanged(dateWithNewTime);
|
|
231
|
-
const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);
|
|
232
|
-
this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);
|
|
233
|
-
this._timeLastCycle = new Date().getTime();
|
|
234
|
-
// update the timeline
|
|
235
|
-
this.setState({ currentTimeOffsetMs });
|
|
236
|
-
};
|
|
237
|
-
this._onCloseDayPicker = () => {
|
|
238
|
-
this.setState({ isDateOpened: false });
|
|
239
|
-
};
|
|
240
|
-
this._onOpenDayPicker = () => {
|
|
241
|
-
this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));
|
|
242
|
-
};
|
|
243
148
|
this._onCloseSettingsPopup = () => {
|
|
244
149
|
this.setState({ isSettingsOpened: false });
|
|
245
150
|
};
|
|
@@ -263,25 +168,23 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
263
168
|
this._onToggleLoop = () => {
|
|
264
169
|
this.setState((prevState) => ({ loop: !prevState.loop }));
|
|
265
170
|
};
|
|
266
|
-
this._formatTime = (
|
|
267
|
-
const date = new Date(
|
|
171
|
+
this._formatTime = (ms) => {
|
|
172
|
+
const date = new Date(ms);
|
|
173
|
+
const amLabel = UiComponents.translate("time.am");
|
|
174
|
+
const pmLabel = UiComponents.translate("time.pm");
|
|
268
175
|
// convert project date to browser locale date
|
|
269
176
|
const localTime = adjustDateToTimezone(date, this.props.dataProvider.timeZoneOffset * 60);
|
|
270
177
|
let hours = localTime.getHours();
|
|
271
|
-
const minutes =
|
|
272
|
-
const abbrev = hours < 12 ?
|
|
178
|
+
const minutes = date.getMinutes();
|
|
179
|
+
const abbrev = hours < 12 ? amLabel : hours === 24 ? amLabel : pmLabel;
|
|
273
180
|
hours = hours > 12 ? hours - 12 : hours;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
// for a ColorDef to be created from hsv s can't be 0
|
|
282
|
-
hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);
|
|
283
|
-
const shadowColor = hueOrSaturation.toColorDef();
|
|
284
|
-
this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
|
|
181
|
+
const hoursStr = hours.toLocaleString(undefined, {
|
|
182
|
+
minimumIntegerDigits: 2,
|
|
183
|
+
});
|
|
184
|
+
const minutesStr = minutes.toLocaleString(undefined, {
|
|
185
|
+
minimumIntegerDigits: 2,
|
|
186
|
+
});
|
|
187
|
+
return `${hoursStr}:${minutesStr} ${abbrev}`;
|
|
285
188
|
};
|
|
286
189
|
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
287
190
|
const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
|
|
@@ -321,7 +224,6 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
321
224
|
// start playing
|
|
322
225
|
this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {
|
|
323
226
|
this._requestFrame = window.requestAnimationFrame(this._updateAnimation);
|
|
324
|
-
// istanbul ignore else
|
|
325
227
|
if (this.props.onPlayPause)
|
|
326
228
|
this.props.onPlayPause(true);
|
|
327
229
|
});
|
|
@@ -357,64 +259,71 @@ export class SolarTimeline extends React.PureComponent {
|
|
|
357
259
|
}
|
|
358
260
|
render() {
|
|
359
261
|
const { dataProvider } = this.props;
|
|
360
|
-
const { speed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
|
|
262
|
+
const { speed: currentSpeed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
|
|
263
|
+
const months = [
|
|
264
|
+
UiComponents.translate("month.short.january"),
|
|
265
|
+
UiComponents.translate("month.short.february"),
|
|
266
|
+
UiComponents.translate("month.short.march"),
|
|
267
|
+
UiComponents.translate("month.short.april"),
|
|
268
|
+
UiComponents.translate("month.short.may"),
|
|
269
|
+
UiComponents.translate("month.short.june"),
|
|
270
|
+
UiComponents.translate("month.short.july"),
|
|
271
|
+
UiComponents.translate("month.short.august"),
|
|
272
|
+
UiComponents.translate("month.short.september"),
|
|
273
|
+
UiComponents.translate("month.short.october"),
|
|
274
|
+
UiComponents.translate("month.short.november"),
|
|
275
|
+
UiComponents.translate("month.short.december"),
|
|
276
|
+
];
|
|
361
277
|
const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);
|
|
362
278
|
const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);
|
|
363
|
-
const formattedDate = `${
|
|
364
|
-
const colorSwatchStyle = {
|
|
365
|
-
width: `100%`,
|
|
366
|
-
height: `100%`,
|
|
367
|
-
};
|
|
279
|
+
const formattedDate = `${months[localTime.getMonth()]}, ${localTime.getDate()}`;
|
|
368
280
|
return (React.createElement("div", { className: "solar-timeline-wrapper" },
|
|
369
|
-
React.createElement("
|
|
370
|
-
React.createElement(PlayButton, {
|
|
371
|
-
React.createElement(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
React.createElement(
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
speed
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
React.createElement("
|
|
401
|
-
React.createElement(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
React.createElement(ColorSwatch, { style: colorSwatchStyle, colorDef: this.state.shadowColor, round: false })))),
|
|
409
|
-
React.createElement("div", { className: "shadow-settings-color-presets" },
|
|
410
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[0], round: false, onColorPick: this._onPresetColorPick }),
|
|
411
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[1], round: false, onColorPick: this._onPresetColorPick }),
|
|
412
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[2], round: false, onColorPick: this._onPresetColorPick }),
|
|
413
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[3], round: false, onColorPick: this._onPresetColorPick }),
|
|
414
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[4], round: false, onColorPick: this._onPresetColorPick }),
|
|
415
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[5], round: false, onColorPick: this._onPresetColorPick }),
|
|
416
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[6], round: false, onColorPick: this._onPresetColorPick }),
|
|
417
|
-
React.createElement(ColorSwatch, { colorDef: this._presetColors[7], round: false, onColorPick: this._onPresetColorPick })))))));
|
|
281
|
+
React.createElement(Flex, { flexWrap: "wrap", gap: "none", className: "solar-timeline-start" },
|
|
282
|
+
React.createElement(PlayButton, { isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
|
|
283
|
+
React.createElement(Popover, { content: React.createElement(DatePicker, { date: localTime, onChange: this._onDateChange, showTime: true, use12Hours: true }), visible: this.state.isDateOpened, onVisibleChange: (isDateOpened) => {
|
|
284
|
+
this.setState({ isDateOpened });
|
|
285
|
+
}, placement: "top", middleware: {
|
|
286
|
+
offset,
|
|
287
|
+
} },
|
|
288
|
+
React.createElement(CalendarButton, { onClick: () => {
|
|
289
|
+
const isDateOpened = !this.state.isDateOpened;
|
|
290
|
+
this.setState({ isDateOpened });
|
|
291
|
+
} },
|
|
292
|
+
formattedDate,
|
|
293
|
+
" @ ",
|
|
294
|
+
formattedTime))),
|
|
295
|
+
React.createElement(Timeline, { dayStartMs: dataProvider.dayStartMs, sunSetOffsetMs: sunSetOffsetMs, sunRiseOffsetMs: sunRiseOffsetMs, currentTimeOffsetMs: currentTimeOffsetMs, onChange: this._onChange, onUpdate: this._onUpdate, formatTime: this._formatTime, isPlaying: this.state.isPlaying }),
|
|
296
|
+
React.createElement(Flex, { justifyContent: "flex-end", flexWrap: "wrap", gap: "none", className: "solar-timeline-end" },
|
|
297
|
+
React.createElement(VisuallyHidden, null,
|
|
298
|
+
React.createElement(Label, { htmlFor: "speed" }, "Timeline speed")),
|
|
299
|
+
React.createElement(Tooltip, { content: UiIModelComponents.translate("solartimeline.speed") },
|
|
300
|
+
React.createElement(Select, { native: true, styleType: "borderless", triggerProps: {
|
|
301
|
+
name: "speed",
|
|
302
|
+
}, onChange: (newValue) => this._onSpeedChange(Number(newValue)), value: currentSpeed.toString(), options: this._speeds.map((speed) => ({
|
|
303
|
+
value: speed.toString(),
|
|
304
|
+
label: `${speed}x`,
|
|
305
|
+
})) })),
|
|
306
|
+
React.createElement(IconButton, { styleType: "borderless", label: UiIModelComponents.translate("timeline.repeat"), onClick: this._onToggleLoop, isActive: loop },
|
|
307
|
+
React.createElement(SvgLoop, null)),
|
|
308
|
+
React.createElement(Popover, { content: React.createElement(ColorPicker, { selectedColor: this.state.shadowColor.colors, onChangeComplete: (color) => {
|
|
309
|
+
const colorDef = ColorDef.create(color.toTbgr());
|
|
310
|
+
this.setState({ shadowColor: colorDef }, () => (this.props.dataProvider.shadowColor = colorDef));
|
|
311
|
+
} },
|
|
312
|
+
React.createElement(Text, { variant: "title", as: "h2", style: { textAlign: "center" } }, UiIModelComponents.translate("solarsettings.shadowcolor")),
|
|
313
|
+
React.createElement(ColorBuilder, null),
|
|
314
|
+
React.createElement(ColorInputPanel, { defaultColorFormat: "hsl" }),
|
|
315
|
+
React.createElement(ColorPalette, { colors: this._presetColors.map((color) => color.colors) })), placement: "top", middleware: {
|
|
316
|
+
offset,
|
|
317
|
+
} },
|
|
318
|
+
React.createElement(IconButton, { styleType: "borderless", "data-testid": "shadow-settings-button", label: UiIModelComponents.translate("solartimeline.settings"), onClick: this._onOpenSettingsPopup },
|
|
319
|
+
React.createElement(SvgSettings, null))))));
|
|
418
320
|
}
|
|
419
321
|
}
|
|
322
|
+
const CalendarButton = React.forwardRef(function CalendarButton({ children, onClick }, ref) {
|
|
323
|
+
const { translate } = useTranslation();
|
|
324
|
+
const tooltip = translate("solartimeline.dateTime");
|
|
325
|
+
return (React.createElement(Tooltip, { content: tooltip },
|
|
326
|
+
React.createElement(Button, { styleType: "borderless", startIcon: React.createElement(SvgCalendar, null), "data-testid": "solar-date-time-button", title: tooltip, onClick: onClick, ref: ref },
|
|
327
|
+
React.createElement("span", { className: "solar-timeline-date-time" }, children))));
|
|
328
|
+
});
|
|
420
329
|
//# sourceMappingURL=SolarTimeline.js.map
|