@itwin/imodel-components-react 4.10.0 → 4.11.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 +12 -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/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 +10 -0
- package/lib/cjs/imodel-components-react/useTranslation.d.ts.map +1 -0
- package/lib/cjs/imodel-components-react/useTranslation.js +20 -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/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 +10 -0
- package/lib/esm/imodel-components-react/useTranslation.d.ts.map +1 -0
- package/lib/esm/imodel-components-react/useTranslation.js +16 -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 +10 -10
- package/lib/cjs/imodel-components-react/timeline/PlayButton.scss +0 -28
- package/lib/esm/imodel-components-react/timeline/PlayButton.scss +0 -28
|
@@ -34,84 +34,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.SolarTimeline = void 0;
|
|
37
|
-
// component is in alpha state - it may change after usability testing - test coverage not complete
|
|
38
|
-
/* istanbul ignore file */
|
|
39
37
|
require("./SolarTimeline.scss");
|
|
40
38
|
const classnames_1 = __importDefault(require("classnames"));
|
|
41
39
|
const React = __importStar(require("react"));
|
|
42
|
-
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
43
40
|
const core_common_1 = require("@itwin/core-common");
|
|
44
|
-
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
45
|
-
const core_react_1 = require("@itwin/core-react");
|
|
46
41
|
const components_react_1 = require("@itwin/components-react");
|
|
47
|
-
const
|
|
48
|
-
const SaturationPicker_1 = require("../color/SaturationPicker");
|
|
49
|
-
const Swatch_1 = require("../color/Swatch");
|
|
50
|
-
const PlayButton_1 = require("./PlayButton");
|
|
51
|
-
const SpeedTimeline_1 = require("./SpeedTimeline");
|
|
52
|
-
const Scrubber_1 = require("./Scrubber");
|
|
53
|
-
const UiIModelComponents_1 = require("../UiIModelComponents");
|
|
42
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
54
43
|
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
};
|
|
44
|
+
const UiIModelComponents_1 = require("../UiIModelComponents");
|
|
45
|
+
const PlayButton_1 = require("./PlayButton");
|
|
46
|
+
const useTranslation_1 = require("../useTranslation");
|
|
47
|
+
const msPerMinute = 1000 * 60;
|
|
48
|
+
const msPerHour = msPerMinute * 60;
|
|
49
|
+
const defaultPlaybackDuration = 40 * 1000;
|
|
50
|
+
const offset = 6;
|
|
63
51
|
function Timeline(props) {
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const tooltipProps = React.useCallback(() => {
|
|
67
|
-
return { visible: false };
|
|
68
|
-
}, []);
|
|
69
|
-
const [showRailTooltip, setShowRailTooltip] = React.useState(false);
|
|
70
|
-
const handlePointerEnter = React.useCallback(() => {
|
|
71
|
-
setShowRailTooltip(true);
|
|
72
|
-
}, []);
|
|
73
|
-
const handlePointerLeave = React.useCallback(() => {
|
|
74
|
-
setShowRailTooltip(false);
|
|
75
|
-
}, []);
|
|
76
|
-
const handlePointerMove = React.useCallback((event) => {
|
|
77
|
-
sliderContainer &&
|
|
78
|
-
setPointerPercent((0, Scrubber_1.getPercentageOfRectangle)(sliderContainer.getBoundingClientRect(), event.clientX));
|
|
79
|
-
}, [sliderContainer]);
|
|
80
|
-
const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying, } = props;
|
|
81
|
-
const thumbHasFocus = (0, Scrubber_1.useFocusedThumb)(sliderContainer ?? undefined);
|
|
82
|
-
const tickLabel = React.useMemo(() => {
|
|
83
|
-
const showTip = isPlaying || showRailTooltip || thumbHasFocus;
|
|
84
|
-
const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;
|
|
85
|
-
const percent = isPlaying || thumbHasFocus
|
|
86
|
-
? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration
|
|
87
|
-
: pointerPercent;
|
|
88
|
-
const tooltipText = formatTime(isPlaying || thumbHasFocus
|
|
89
|
-
? dayStartMs + currentTimeOffsetMs
|
|
90
|
-
: dayStartMs + (sunRiseOffsetMs + pointerPercent * totalDuration));
|
|
91
|
-
return (React.createElement(Scrubber_1.RailMarkers, { showToolTip: showTip, percent: percent, tooltipText: tooltipText }));
|
|
92
|
-
}, [
|
|
93
|
-
isPlaying,
|
|
94
|
-
showRailTooltip,
|
|
95
|
-
thumbHasFocus,
|
|
96
|
-
sunSetOffsetMs,
|
|
97
|
-
sunRiseOffsetMs,
|
|
98
|
-
currentTimeOffsetMs,
|
|
99
|
-
pointerPercent,
|
|
100
|
-
formatTime,
|
|
101
|
-
dayStartMs,
|
|
102
|
-
]);
|
|
52
|
+
const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, } = props;
|
|
53
|
+
const tooltipContent = formatTime(dayStartMs + currentTimeOffsetMs);
|
|
103
54
|
const className = (0, classnames_1.default)("solar-timeline", props.className, formatTick && "showticks");
|
|
104
|
-
const
|
|
105
|
-
const
|
|
55
|
+
const sunRiseStr = formatTime(dayStartMs + sunRiseOffsetMs);
|
|
56
|
+
const sunSetStr = formatTime(dayStartMs + sunSetOffsetMs);
|
|
106
57
|
return (React.createElement("div", { className: className },
|
|
107
|
-
React.createElement(itwinui_react_1.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
58
|
+
React.createElement(itwinui_react_1.VisuallyHidden, null, "Solar timeline"),
|
|
59
|
+
React.createElement(itwinui_react_1.Slider, { thumbProps: () => ({ "aria-labelledby": "timeline" }), step: msPerMinute, min: sunRiseOffsetMs, max: sunSetOffsetMs, minLabel: React.createElement(itwinui_react_1.Tooltip, { content: sunRiseStr },
|
|
60
|
+
React.createElement(itwinui_react_1.Icon, null,
|
|
61
|
+
React.createElement(itwinui_icons_react_1.SvgSun, null))), maxLabel: React.createElement(itwinui_react_1.Tooltip, { content: sunSetStr },
|
|
62
|
+
React.createElement(itwinui_react_1.Icon, null,
|
|
63
|
+
React.createElement(itwinui_icons_react_1.SvgMoon, null))), onUpdate: onUpdate, onChange: onChange, values: [currentTimeOffsetMs], tooltipProps: () => ({
|
|
64
|
+
content: tooltipContent,
|
|
65
|
+
}) })));
|
|
115
66
|
}
|
|
116
67
|
/** Solar Timeline
|
|
117
68
|
* @alpha
|
|
@@ -119,35 +70,10 @@ function Timeline(props) {
|
|
|
119
70
|
class SolarTimeline extends React.PureComponent {
|
|
120
71
|
constructor(props) {
|
|
121
72
|
super(props);
|
|
122
|
-
this._datePicker = null;
|
|
123
|
-
this._settings = null;
|
|
124
73
|
this._requestFrame = 0;
|
|
125
74
|
this._unmounted = false;
|
|
126
75
|
this._timeLastCycle = 0;
|
|
127
76
|
this._totalPlayTime = 0;
|
|
128
|
-
this._settingsPopupTitle = UiIModelComponents_1.UiIModelComponents.translate("solarsettings.shadowcolor");
|
|
129
|
-
this._playLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.play");
|
|
130
|
-
this._settingLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.settings");
|
|
131
|
-
this._loopLabel = UiIModelComponents_1.UiIModelComponents.translate("timeline.repeat");
|
|
132
|
-
this._speedLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.speed");
|
|
133
|
-
this._dateTimeLabel = UiIModelComponents_1.UiIModelComponents.translate("solartimeline.dateTime");
|
|
134
|
-
this._months = [
|
|
135
|
-
components_react_1.UiComponents.translate("month.short.january"),
|
|
136
|
-
components_react_1.UiComponents.translate("month.short.february"),
|
|
137
|
-
components_react_1.UiComponents.translate("month.short.march"),
|
|
138
|
-
components_react_1.UiComponents.translate("month.short.april"),
|
|
139
|
-
components_react_1.UiComponents.translate("month.short.may"),
|
|
140
|
-
components_react_1.UiComponents.translate("month.short.june"),
|
|
141
|
-
components_react_1.UiComponents.translate("month.short.july"),
|
|
142
|
-
components_react_1.UiComponents.translate("month.short.august"),
|
|
143
|
-
components_react_1.UiComponents.translate("month.short.september"),
|
|
144
|
-
components_react_1.UiComponents.translate("month.short.october"),
|
|
145
|
-
components_react_1.UiComponents.translate("month.short.november"),
|
|
146
|
-
components_react_1.UiComponents.translate("month.short.december"),
|
|
147
|
-
];
|
|
148
|
-
this._timeLabel = components_react_1.UiComponents.translate("datepicker.time");
|
|
149
|
-
this._amLabel = components_react_1.UiComponents.translate("time.am");
|
|
150
|
-
this._pmLabel = components_react_1.UiComponents.translate("time.pm");
|
|
151
77
|
this._presetColors = [
|
|
152
78
|
core_common_1.ColorDef.create(core_common_1.ColorByName.grey),
|
|
153
79
|
core_common_1.ColorDef.create(core_common_1.ColorByName.lightGrey),
|
|
@@ -158,9 +84,9 @@ class SolarTimeline extends React.PureComponent {
|
|
|
158
84
|
core_common_1.ColorDef.create(core_common_1.ColorByName.tan),
|
|
159
85
|
core_common_1.ColorDef.create(core_common_1.ColorByName.darkBrown),
|
|
160
86
|
];
|
|
87
|
+
this._speeds = [1, 2, 3, 4, 5, 6];
|
|
161
88
|
// recursively update the animation until we hit the end or the pause button is clicked
|
|
162
89
|
this._updateAnimation = (_timestamp) => {
|
|
163
|
-
// istanbul ignore else
|
|
164
90
|
if (!this.state.isPlaying || this._unmounted) {
|
|
165
91
|
window.cancelAnimationFrame(this._requestFrame);
|
|
166
92
|
return;
|
|
@@ -196,7 +122,6 @@ class SolarTimeline extends React.PureComponent {
|
|
|
196
122
|
};
|
|
197
123
|
// user clicked pause button
|
|
198
124
|
this._onPause = () => {
|
|
199
|
-
// istanbul ignore if
|
|
200
125
|
if (!this.state.isPlaying)
|
|
201
126
|
return;
|
|
202
127
|
const currentTime = new Date().getTime();
|
|
@@ -205,13 +130,11 @@ class SolarTimeline extends React.PureComponent {
|
|
|
205
130
|
window.cancelAnimationFrame(this._requestFrame);
|
|
206
131
|
// stop playing
|
|
207
132
|
this.setState({ isPlaying: false });
|
|
208
|
-
// istanbul ignore else
|
|
209
133
|
if (this.props.onPlayPause)
|
|
210
134
|
this.props.onPlayPause(false);
|
|
211
135
|
};
|
|
212
136
|
// user clicked play button
|
|
213
137
|
this._onPlay = () => {
|
|
214
|
-
// istanbul ignore if
|
|
215
138
|
if (this.state.isPlaying)
|
|
216
139
|
return;
|
|
217
140
|
if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs ||
|
|
@@ -223,52 +146,34 @@ class SolarTimeline extends React.PureComponent {
|
|
|
223
146
|
this._play(this.state.currentTimeOffsetMs);
|
|
224
147
|
}
|
|
225
148
|
};
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);
|
|
230
|
-
this.props.dataProvider.setDateAndTime(selectedDate);
|
|
149
|
+
this._onDateChange = (newDate) => {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
this.props.dataProvider.setDateAndTime(newDate);
|
|
231
152
|
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
232
153
|
const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
|
|
233
154
|
const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;
|
|
234
155
|
const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;
|
|
235
|
-
const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);
|
|
236
|
-
this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);
|
|
237
156
|
/** call dataProvider to update display style */
|
|
238
|
-
|
|
239
|
-
|
|
157
|
+
// this.props.dataProvider.onTimeChanged?.(this.props.dataProvider.timeOfDay);
|
|
158
|
+
// Update time
|
|
159
|
+
const newHours = newDate.getHours();
|
|
160
|
+
const newMinutes = newDate.getMinutes();
|
|
161
|
+
const newSunTime = newHours * msPerHour + newMinutes * msPerMinute;
|
|
162
|
+
const dateWithNewTime = new Date(dayStartMs + newSunTime);
|
|
163
|
+
// this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
|
|
164
|
+
const currentTimeOffsetMs = this.ensureRange(newSunTime, sunRiseOffsetMs, sunSetOffsetMs);
|
|
165
|
+
this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs);
|
|
166
|
+
this._timeLastCycle = new Date().getTime();
|
|
167
|
+
(_b = (_a = this.props.dataProvider).onTimeChanged) === null || _b === void 0 ? void 0 : _b.call(_a, dateWithNewTime);
|
|
240
168
|
this.setState({
|
|
241
169
|
dayStartMs,
|
|
242
170
|
sunRiseOffsetMs,
|
|
243
171
|
sunSetOffsetMs,
|
|
244
|
-
currentTimeOffsetMs
|
|
172
|
+
currentTimeOffsetMs,
|
|
245
173
|
sunDeltaMs,
|
|
246
174
|
isDateOpened: false,
|
|
247
|
-
}, () => {
|
|
248
|
-
this._timeLastCycle = new Date().getTime();
|
|
249
175
|
});
|
|
250
176
|
};
|
|
251
|
-
this._onTimeChanged = (time) => {
|
|
252
|
-
// compute the current date (with time)
|
|
253
|
-
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
254
|
-
const sunTime = time.hours * millisecPerHour + time.minutes * millisecPerMinute;
|
|
255
|
-
const dateWithNewTime = new Date(dayStartMs + sunTime);
|
|
256
|
-
this.props.dataProvider.setDateAndTime(dateWithNewTime, true);
|
|
257
|
-
// notify the provider to update style
|
|
258
|
-
if (this.props.dataProvider.onTimeChanged)
|
|
259
|
-
this.props.dataProvider.onTimeChanged(dateWithNewTime);
|
|
260
|
-
const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);
|
|
261
|
-
this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);
|
|
262
|
-
this._timeLastCycle = new Date().getTime();
|
|
263
|
-
// update the timeline
|
|
264
|
-
this.setState({ currentTimeOffsetMs });
|
|
265
|
-
};
|
|
266
|
-
this._onCloseDayPicker = () => {
|
|
267
|
-
this.setState({ isDateOpened: false });
|
|
268
|
-
};
|
|
269
|
-
this._onOpenDayPicker = () => {
|
|
270
|
-
this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));
|
|
271
|
-
};
|
|
272
177
|
this._onCloseSettingsPopup = () => {
|
|
273
178
|
this.setState({ isSettingsOpened: false });
|
|
274
179
|
};
|
|
@@ -292,25 +197,23 @@ class SolarTimeline extends React.PureComponent {
|
|
|
292
197
|
this._onToggleLoop = () => {
|
|
293
198
|
this.setState((prevState) => ({ loop: !prevState.loop }));
|
|
294
199
|
};
|
|
295
|
-
this._formatTime = (
|
|
296
|
-
const date = new Date(
|
|
200
|
+
this._formatTime = (ms) => {
|
|
201
|
+
const date = new Date(ms);
|
|
202
|
+
const amLabel = components_react_1.UiComponents.translate("time.am");
|
|
203
|
+
const pmLabel = components_react_1.UiComponents.translate("time.pm");
|
|
297
204
|
// convert project date to browser locale date
|
|
298
205
|
const localTime = (0, components_react_1.adjustDateToTimezone)(date, this.props.dataProvider.timeZoneOffset * 60);
|
|
299
206
|
let hours = localTime.getHours();
|
|
300
|
-
const minutes =
|
|
301
|
-
const abbrev = hours < 12 ?
|
|
207
|
+
const minutes = date.getMinutes();
|
|
208
|
+
const abbrev = hours < 12 ? amLabel : hours === 24 ? amLabel : pmLabel;
|
|
302
209
|
hours = hours > 12 ? hours - 12 : hours;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
// for a ColorDef to be created from hsv s can't be 0
|
|
311
|
-
hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);
|
|
312
|
-
const shadowColor = hueOrSaturation.toColorDef();
|
|
313
|
-
this.setState({ shadowColor }, () => (this.props.dataProvider.shadowColor = shadowColor));
|
|
210
|
+
const hoursStr = hours.toLocaleString(undefined, {
|
|
211
|
+
minimumIntegerDigits: 2,
|
|
212
|
+
});
|
|
213
|
+
const minutesStr = minutes.toLocaleString(undefined, {
|
|
214
|
+
minimumIntegerDigits: 2,
|
|
215
|
+
});
|
|
216
|
+
return `${hoursStr}:${minutesStr} ${abbrev}`;
|
|
314
217
|
};
|
|
315
218
|
const dayStartMs = this.props.dataProvider.dayStartMs;
|
|
316
219
|
const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;
|
|
@@ -350,7 +253,6 @@ class SolarTimeline extends React.PureComponent {
|
|
|
350
253
|
// start playing
|
|
351
254
|
this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {
|
|
352
255
|
this._requestFrame = window.requestAnimationFrame(this._updateAnimation);
|
|
353
|
-
// istanbul ignore else
|
|
354
256
|
if (this.props.onPlayPause)
|
|
355
257
|
this.props.onPlayPause(true);
|
|
356
258
|
});
|
|
@@ -386,65 +288,72 @@ class SolarTimeline extends React.PureComponent {
|
|
|
386
288
|
}
|
|
387
289
|
render() {
|
|
388
290
|
const { dataProvider } = this.props;
|
|
389
|
-
const { speed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
|
|
291
|
+
const { speed: currentSpeed, loop, currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs, } = this.state;
|
|
292
|
+
const months = [
|
|
293
|
+
components_react_1.UiComponents.translate("month.short.january"),
|
|
294
|
+
components_react_1.UiComponents.translate("month.short.february"),
|
|
295
|
+
components_react_1.UiComponents.translate("month.short.march"),
|
|
296
|
+
components_react_1.UiComponents.translate("month.short.april"),
|
|
297
|
+
components_react_1.UiComponents.translate("month.short.may"),
|
|
298
|
+
components_react_1.UiComponents.translate("month.short.june"),
|
|
299
|
+
components_react_1.UiComponents.translate("month.short.july"),
|
|
300
|
+
components_react_1.UiComponents.translate("month.short.august"),
|
|
301
|
+
components_react_1.UiComponents.translate("month.short.september"),
|
|
302
|
+
components_react_1.UiComponents.translate("month.short.october"),
|
|
303
|
+
components_react_1.UiComponents.translate("month.short.november"),
|
|
304
|
+
components_react_1.UiComponents.translate("month.short.december"),
|
|
305
|
+
];
|
|
390
306
|
const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);
|
|
391
307
|
const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);
|
|
392
|
-
const formattedDate = `${
|
|
393
|
-
const colorSwatchStyle = {
|
|
394
|
-
width: `100%`,
|
|
395
|
-
height: `100%`,
|
|
396
|
-
};
|
|
308
|
+
const formattedDate = `${months[localTime.getMonth()]}, ${localTime.getDate()}`;
|
|
397
309
|
return (React.createElement("div", { className: "solar-timeline-wrapper" },
|
|
398
|
-
React.createElement("
|
|
399
|
-
React.createElement(PlayButton_1.PlayButton, {
|
|
400
|
-
React.createElement(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
React.createElement(
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
speed
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
React.createElement("
|
|
430
|
-
React.createElement(
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
React.createElement(Swatch_1.ColorSwatch, { style: colorSwatchStyle, colorDef: this.state.shadowColor, round: false })))),
|
|
438
|
-
React.createElement("div", { className: "shadow-settings-color-presets" },
|
|
439
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[0], round: false, onColorPick: this._onPresetColorPick }),
|
|
440
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[1], round: false, onColorPick: this._onPresetColorPick }),
|
|
441
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[2], round: false, onColorPick: this._onPresetColorPick }),
|
|
442
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[3], round: false, onColorPick: this._onPresetColorPick }),
|
|
443
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[4], round: false, onColorPick: this._onPresetColorPick }),
|
|
444
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[5], round: false, onColorPick: this._onPresetColorPick }),
|
|
445
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[6], round: false, onColorPick: this._onPresetColorPick }),
|
|
446
|
-
React.createElement(Swatch_1.ColorSwatch, { colorDef: this._presetColors[7], round: false, onColorPick: this._onPresetColorPick })))))));
|
|
310
|
+
React.createElement(itwinui_react_1.Flex, { flexWrap: "wrap", gap: "none", className: "solar-timeline-start" },
|
|
311
|
+
React.createElement(PlayButton_1.PlayButton, { isPlaying: this.state.isPlaying, onPlay: this._onPlay, onPause: this._onPause }),
|
|
312
|
+
React.createElement(itwinui_react_1.Popover, { content: React.createElement(itwinui_react_1.DatePicker, { date: localTime, onChange: this._onDateChange, showTime: true, use12Hours: true }), visible: this.state.isDateOpened, onVisibleChange: (isDateOpened) => {
|
|
313
|
+
this.setState({ isDateOpened });
|
|
314
|
+
}, placement: "top", middleware: {
|
|
315
|
+
offset,
|
|
316
|
+
} },
|
|
317
|
+
React.createElement(CalendarButton, { onClick: () => {
|
|
318
|
+
const isDateOpened = !this.state.isDateOpened;
|
|
319
|
+
this.setState({ isDateOpened });
|
|
320
|
+
} },
|
|
321
|
+
formattedDate,
|
|
322
|
+
" @ ",
|
|
323
|
+
formattedTime))),
|
|
324
|
+
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 }),
|
|
325
|
+
React.createElement(itwinui_react_1.Flex, { justifyContent: "flex-end", flexWrap: "wrap", gap: "none", className: "solar-timeline-end" },
|
|
326
|
+
React.createElement(itwinui_react_1.VisuallyHidden, null,
|
|
327
|
+
React.createElement(itwinui_react_1.Label, { htmlFor: "speed" }, "Timeline speed")),
|
|
328
|
+
React.createElement(itwinui_react_1.Tooltip, { content: UiIModelComponents_1.UiIModelComponents.translate("solartimeline.speed") },
|
|
329
|
+
React.createElement(itwinui_react_1.Select, { native: true, styleType: "borderless", triggerProps: {
|
|
330
|
+
name: "speed",
|
|
331
|
+
}, onChange: (newValue) => this._onSpeedChange(Number(newValue)), value: currentSpeed.toString(), options: this._speeds.map((speed) => ({
|
|
332
|
+
value: speed.toString(),
|
|
333
|
+
label: `${speed}x`,
|
|
334
|
+
})) })),
|
|
335
|
+
React.createElement(itwinui_react_1.IconButton, { styleType: "borderless", label: UiIModelComponents_1.UiIModelComponents.translate("timeline.repeat"), onClick: this._onToggleLoop, isActive: loop },
|
|
336
|
+
React.createElement(itwinui_icons_react_1.SvgLoop, null)),
|
|
337
|
+
React.createElement(itwinui_react_1.Popover, { content: React.createElement(itwinui_react_1.ColorPicker, { selectedColor: this.state.shadowColor.colors, onChangeComplete: (color) => {
|
|
338
|
+
const colorDef = core_common_1.ColorDef.create(color.toTbgr());
|
|
339
|
+
this.setState({ shadowColor: colorDef }, () => (this.props.dataProvider.shadowColor = colorDef));
|
|
340
|
+
} },
|
|
341
|
+
React.createElement(itwinui_react_1.Text, { variant: "title", as: "h2", style: { textAlign: "center" } }, UiIModelComponents_1.UiIModelComponents.translate("solarsettings.shadowcolor")),
|
|
342
|
+
React.createElement(itwinui_react_1.ColorBuilder, null),
|
|
343
|
+
React.createElement(itwinui_react_1.ColorInputPanel, { defaultColorFormat: "hsl" }),
|
|
344
|
+
React.createElement(itwinui_react_1.ColorPalette, { colors: this._presetColors.map((color) => color.colors) })), placement: "top", middleware: {
|
|
345
|
+
offset,
|
|
346
|
+
} },
|
|
347
|
+
React.createElement(itwinui_react_1.IconButton, { styleType: "borderless", "data-testid": "shadow-settings-button", label: UiIModelComponents_1.UiIModelComponents.translate("solartimeline.settings"), onClick: this._onOpenSettingsPopup },
|
|
348
|
+
React.createElement(itwinui_icons_react_1.SvgSettings, null))))));
|
|
447
349
|
}
|
|
448
350
|
}
|
|
449
351
|
exports.SolarTimeline = SolarTimeline;
|
|
352
|
+
const CalendarButton = React.forwardRef(function CalendarButton({ children, onClick }, ref) {
|
|
353
|
+
const { translate } = (0, useTranslation_1.useTranslation)();
|
|
354
|
+
const tooltip = translate("solartimeline.dateTime");
|
|
355
|
+
return (React.createElement(itwinui_react_1.Tooltip, { content: tooltip },
|
|
356
|
+
React.createElement(itwinui_react_1.Button, { styleType: "borderless", startIcon: React.createElement(itwinui_icons_react_1.SvgCalendar, null), "data-testid": "solar-date-time-button", title: tooltip, onClick: onClick, ref: ref },
|
|
357
|
+
React.createElement("span", { className: "solar-timeline-date-time" }, children))));
|
|
358
|
+
});
|
|
450
359
|
//# sourceMappingURL=SolarTimeline.js.map
|