@itwin/imodel-components-react 4.17.6 → 5.0.0-dev.3
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 +1 -31
- package/README.md +15 -2
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +2 -4
- package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +0 -2
- package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +0 -2
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +2 -4
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +5 -6
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +0 -2
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +9 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +0 -2
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +3 -5
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +0 -2
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +2 -4
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +7 -9
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +2 -4
- package/lib/esm/imodel-components-react/editors/ColorEditor.scss +0 -2
- package/lib/esm/imodel-components-react/editors/WeightEditor.scss +0 -2
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.scss +2 -4
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +5 -6
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +0 -2
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +9 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +0 -2
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +3 -5
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +0 -2
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +2 -4
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +7 -9
- package/lib/{cjs/imodel-components-react → imodel-components-react}/UiIModelComponents.d.ts +1 -1
- package/lib/imodel-components-react/UiIModelComponents.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/UiIModelComponents.js +4 -7
- package/lib/imodel-components-react/UiIModelComponents.js.map +1 -0
- package/lib/imodel-components-react/color/AlphaSlider.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/AlphaSlider.js +1 -1
- package/lib/imodel-components-react/color/AlphaSlider.js.map +1 -0
- package/lib/imodel-components-react/color/AlphaSlider.scss +71 -0
- package/lib/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerButton.js +4 -3
- package/lib/imodel-components-react/color/ColorPickerButton.js.map +1 -0
- package/lib/imodel-components-react/color/ColorPickerButton.scss +88 -0
- package/lib/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -0
- package/lib/imodel-components-react/color/ColorPickerDialog.js.map +1 -0
- package/lib/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerPopup.js +4 -3
- package/lib/imodel-components-react/color/ColorPickerPopup.js.map +1 -0
- package/lib/imodel-components-react/color/ColorPickerPopup.scss +62 -0
- package/lib/imodel-components-react/color/HueSlider.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/HueSlider.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/HueSlider.js.map +1 -1
- package/lib/imodel-components-react/color/HueSlider.scss +78 -0
- package/lib/imodel-components-react/color/SaturationPicker.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/SaturationPicker.js +1 -1
- package/lib/imodel-components-react/color/SaturationPicker.js.map +1 -0
- package/lib/imodel-components-react/color/SaturationPicker.scss +36 -0
- package/lib/imodel-components-react/color/Swatch.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/Swatch.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/color/Swatch.js.map +1 -1
- package/lib/imodel-components-react/color/Swatch.scss +22 -0
- package/lib/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -0
- package/lib/imodel-components-react/color/getCSSColorFromDef.js.map +1 -0
- package/lib/imodel-components-react/editors/ColorEditor.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/editors/ColorEditor.js +3 -4
- package/lib/imodel-components-react/editors/ColorEditor.js.map +1 -0
- package/lib/imodel-components-react/editors/ColorEditor.scss +16 -0
- package/lib/imodel-components-react/editors/WeightEditor.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/editors/WeightEditor.js +3 -4
- package/lib/imodel-components-react/editors/WeightEditor.js.map +1 -0
- package/lib/imodel-components-react/editors/WeightEditor.scss +14 -0
- package/lib/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityInput.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityInput.js.map +1 -1
- package/lib/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -0
- package/lib/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -0
- package/lib/imodel-components-react/inputs/QuantityNumberInput.scss +106 -0
- package/lib/imodel-components-react/lineweight/Swatch.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/Swatch.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/Swatch.js.map +1 -1
- package/lib/imodel-components-react/lineweight/Swatch.scss +46 -0
- package/lib/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/imodel-components-react/lineweight/WeightPickerButton.scss +50 -0
- package/lib/imodel-components-react/navigationaids/Cube.d.ts.map +1 -0
- package/lib/imodel-components-react/navigationaids/Cube.js.map +1 -0
- package/lib/imodel-components-react/navigationaids/Cube.scss +19 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/CubeNavigationAid.d.ts +1 -1
- package/lib/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/CubeNavigationAid.js +3 -3
- package/lib/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -0
- package/lib/imodel-components-react/navigationaids/CubeNavigationAid.scss +177 -0
- package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/DrawingNavigationAid.js +2 -2
- package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -0
- package/lib/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -0
- package/lib/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatPanel.js +6 -6
- package/lib/imodel-components-react/quantityformat/FormatPanel.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/FormatPanel.scss +53 -0
- package/lib/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatPrecision.js +3 -3
- package/lib/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatSample.js +1 -1
- package/lib/imodel-components-react/quantityformat/FormatSample.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatType.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatType.js.map +1 -1
- package/lib/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/FormatUnits.js +2 -2
- package/lib/imodel-components-react/quantityformat/FormatUnits.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/MiscFormatOptions.js +7 -7
- package/lib/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/QuantityFormatPanel.js +1 -1
- package/lib/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.js +1 -1
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalSeparator.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/FractionPrecision.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ScientificType.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/SignOption.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSeparatorSelector.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSizeSelector.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSelector.js +1 -1
- package/lib/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSeparator.js +2 -2
- package/lib/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -0
- package/lib/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -0
- package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.d.ts +1 -1
- package/lib/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/BaseTimelineDataProvider.d.ts +1 -1
- package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -0
- package/lib/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -0
- package/lib/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -0
- package/lib/imodel-components-react/timeline/InlineEdit.js.map +1 -0
- package/lib/imodel-components-react/timeline/InlineEdit.scss +22 -0
- package/lib/imodel-components-react/timeline/PlayButton.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/PlayButton.js +1 -1
- package/lib/imodel-components-react/timeline/PlayButton.js.map +1 -0
- package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/Scrubber.d.ts +2 -4
- package/lib/imodel-components-react/timeline/Scrubber.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/Scrubber.js +19 -12
- package/lib/imodel-components-react/timeline/Scrubber.js.map +1 -0
- package/lib/imodel-components-react/timeline/Scrubber.scss +105 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SolarTimeline.d.ts +1 -1
- package/lib/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SolarTimeline.js +3 -3
- package/lib/imodel-components-react/timeline/SolarTimeline.js.map +1 -0
- package/lib/imodel-components-react/timeline/SolarTimeline.scss +43 -0
- package/lib/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -0
- package/lib/imodel-components-react/timeline/SpeedTimeline.js.map +1 -0
- package/lib/imodel-components-react/timeline/SpeedTimeline.scss +38 -0
- package/lib/imodel-components-react/timeline/Timeline.scss +163 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/TimelineComponent.d.ts +1 -1
- package/lib/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/TimelineComponent.js +5 -5
- package/lib/imodel-components-react/timeline/TimelineComponent.js.map +1 -0
- package/lib/imodel-components-react/timeline/TimelineComponent.scss +48 -0
- package/lib/imodel-components-react/timeline/interfaces.d.ts.map +1 -0
- package/lib/imodel-components-react/timeline/interfaces.js.map +1 -0
- package/lib/imodel-components-react/useTranslation.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/useTranslation.js +2 -2
- package/lib/imodel-components-react/useTranslation.js.map +1 -0
- package/lib/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/viewport/ViewportComponent.js +1 -1
- package/lib/imodel-components-react/viewport/ViewportComponent.js.map +1 -0
- package/lib/{cjs/imodel-components-react → imodel-components-react}/viewport/ViewportComponentEvents.d.ts +1 -1
- package/lib/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -0
- package/lib/{esm/imodel-components-react → imodel-components-react}/viewport/ViewportComponentEvents.js +1 -1
- package/lib/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -0
- package/lib/imodel-components-react.d.ts +77 -0
- package/lib/imodel-components-react.d.ts.map +1 -0
- package/lib/imodel-components-react.js +90 -0
- package/lib/imodel-components-react.js.map +1 -0
- package/lib/internal.d.ts +2 -0
- package/lib/internal.d.ts.map +1 -0
- package/lib/internal.js +6 -0
- package/lib/internal.js.map +1 -0
- package/package.json +51 -46
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +0 -78
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +0 -182
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +0 -119
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +0 -76
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +0 -141
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.js +0 -201
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +0 -197
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/Swatch.js +0 -63
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +0 -24
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +0 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +0 -150
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +0 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +0 -153
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +0 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +0 -94
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +0 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +0 -265
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +0 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +0 -84
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +0 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +0 -160
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +0 -151
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +0 -153
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +0 -683
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +0 -736
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +0 -112
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +0 -56
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +0 -94
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +0 -115
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +0 -117
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +0 -137
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +0 -193
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +0 -145
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +0 -104
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +0 -59
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +0 -87
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +0 -60
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +0 -68
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +0 -76
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +0 -59
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +0 -65
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +0 -106
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +0 -135
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +0 -150
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +0 -64
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +0 -86
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/PlayButton.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/PlayButton.js +0 -50
- package/lib/cjs/imodel-components-react/timeline/PlayButton.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +0 -185
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +0 -60
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +0 -358
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +0 -57
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +0 -100
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +0 -286
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +0 -46
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +0 -1
- package/lib/cjs/imodel-components-react/useTranslation.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/useTranslation.js +0 -52
- package/lib/cjs/imodel-components-react/useTranslation.js.map +0 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +0 -267
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +0 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +0 -119
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +0 -1
- package/lib/cjs/imodel-components-react.d.ts +0 -80
- package/lib/cjs/imodel-components-react.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react.js +0 -103
- package/lib/cjs/imodel-components-react.js.map +0 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +0 -29
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +0 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.json +0 -150
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +0 -36
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +0 -40
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +0 -26
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +0 -47
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +0 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +0 -25
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +0 -23
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +0 -1
- package/lib/esm/imodel-components-react/color/Swatch.d.ts +0 -25
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +0 -7
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +0 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +0 -42
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +0 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +0 -44
- package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +0 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +0 -26
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +0 -47
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +0 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +0 -33
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +0 -59
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +0 -46
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +0 -144
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +0 -29
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +0 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +0 -20
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +0 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +0 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +0 -21
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +0 -23
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +0 -24
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +0 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +0 -19
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +0 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +0 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +0 -53
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +0 -32
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +0 -27
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts +0 -12
- package/lib/esm/imodel-components-react/timeline/PlayButton.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/PlayButton.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +0 -54
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +0 -16
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +0 -146
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +0 -1
- package/lib/esm/imodel-components-react/useTranslation.d.ts +0 -7
- package/lib/esm/imodel-components-react/useTranslation.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/useTranslation.js.map +0 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +0 -43
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +0 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +0 -119
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +0 -1
- package/lib/esm/imodel-components-react.d.ts +0 -80
- package/lib/esm/imodel-components-react.d.ts.map +0 -1
- package/lib/esm/imodel-components-react.js +0 -85
- package/lib/esm/imodel-components-react.js.map +0 -1
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/UiIModelComponents.json +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/AlphaSlider.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerButton.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerDialog.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/color/ColorPickerDialog.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/ColorPickerPopup.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/HueSlider.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/SaturationPicker.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/Swatch.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/color/getCSSColorFromDef.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/color/getCSSColorFromDef.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/ColorEditor.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/editors/WeightEditor.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/inputs/QuantityInput.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/inputs/QuantityNumberInput.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/inputs/QuantityNumberInput.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/lineweight/Swatch.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/lineweight/WeightPickerButton.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/Cube.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/navigationaids/Cube.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/navigationaids/DrawingNavigationAid.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatPanel.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatPrecision.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatSample.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatType.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatUnitLabel.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/FormatUnits.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/MiscFormatOptions.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/QuantityFormatPanel.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalPrecision.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/DecimalSeparator.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/FractionPrecision.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ScientificType.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/SignOption.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSeparatorSelector.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/StationSizeSelector.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSelector.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/ThousandsSeparator.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/quantityformat/misc/UnitDescr.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/quantityformat/misc/UnitDescr.js +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseSolarDataProvider.js +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/BaseTimelineDataProvider.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/InlineEdit.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/InlineEdit.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/PlayButton.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/SpeedTimeline.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/SpeedTimeline.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/timeline/interfaces.d.ts +0 -0
- /package/lib/{esm/imodel-components-react → imodel-components-react}/timeline/interfaces.js +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/useTranslation.d.ts +0 -0
- /package/lib/{cjs/imodel-components-react → imodel-components-react}/viewport/ViewportComponent.d.ts +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Timeline
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.BaseSolarDataProvider = void 0;
|
|
11
|
-
const core_geometry_1 = require("@itwin/core-geometry");
|
|
12
|
-
const core_common_1 = require("@itwin/core-common");
|
|
13
|
-
const millisecPerMinute = 1000 * 60;
|
|
14
|
-
const millisecPerHour = millisecPerMinute * 60;
|
|
15
|
-
// the interface and class are in alpha state - it may change after usability testing - test coverage not complete
|
|
16
|
-
/** Base class that provides solar data for animation control
|
|
17
|
-
* @alpha
|
|
18
|
-
*/
|
|
19
|
-
class BaseSolarDataProvider {
|
|
20
|
-
// projectTimeZoneOffset = zone offset in hours
|
|
21
|
-
initializeData(projectTimeZoneOffset, initialTime) {
|
|
22
|
-
if (!initialTime)
|
|
23
|
-
initialTime = new Date(Date.now()); // users local time
|
|
24
|
-
this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;
|
|
25
|
-
const year = initialTime.getFullYear();
|
|
26
|
-
const month = initialTime.getMonth();
|
|
27
|
-
const date = initialTime.getDate();
|
|
28
|
-
const hours = initialTime.getHours();
|
|
29
|
-
const minutes = initialTime.getMinutes();
|
|
30
|
-
const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);
|
|
31
|
-
const initialProjectMs = initialUtcMs - this._zoneOffsetMs;
|
|
32
|
-
this._projectDateTime = new Date(initialProjectMs);
|
|
33
|
-
const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);
|
|
34
|
-
const utcDay = new Date(utcDayMs);
|
|
35
|
-
this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;
|
|
36
|
-
this._projectDay = new Date(this._projectDayStartMS);
|
|
37
|
-
this._projectSunrise = (0, core_common_1.calculateSunriseOrSunset)(utcDay, this._cartographicCenter, true);
|
|
38
|
-
this._projectSunset = (0, core_common_1.calculateSunriseOrSunset)(utcDay, this._cartographicCenter, false);
|
|
39
|
-
this._projectSunriseMs = this._projectSunrise.getTime();
|
|
40
|
-
this._projectSunsetMs = this._projectSunset.getTime();
|
|
41
|
-
}
|
|
42
|
-
constructor(viewport, longitude, latitude) {
|
|
43
|
-
this._shadowColor = core_common_1.ColorDef.create(core_common_1.ColorByName.gray);
|
|
44
|
-
this.longitude = -75.17035; // long/lat of Philadelphia
|
|
45
|
-
this.latitude = 39.954927;
|
|
46
|
-
this.viewId = ""; // View Id used to determine sunrise and sunset
|
|
47
|
-
this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
|
|
48
|
-
this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
|
|
49
|
-
this._projectDayStartMS = 0;
|
|
50
|
-
this._projectSunriseMs = 0;
|
|
51
|
-
this._projectSunsetMs = 0;
|
|
52
|
-
this._zoneOffsetMs = 0;
|
|
53
|
-
this._projectSunrise = new Date();
|
|
54
|
-
this._projectSunset = new Date();
|
|
55
|
-
this._projectDateTime = new Date();
|
|
56
|
-
this._projectDay = new Date();
|
|
57
|
-
this.onTimeChanged = (_time) => {
|
|
58
|
-
// to be implemented by derived class
|
|
59
|
-
};
|
|
60
|
-
this._viewport = viewport;
|
|
61
|
-
if (longitude)
|
|
62
|
-
this.longitude = longitude;
|
|
63
|
-
if (latitude)
|
|
64
|
-
this.latitude = latitude;
|
|
65
|
-
if (viewport)
|
|
66
|
-
this.viewId = viewport.view.id;
|
|
67
|
-
// project location
|
|
68
|
-
this._cartographicCenter = core_common_1.Cartographic.fromDegrees({
|
|
69
|
-
longitude: this.longitude,
|
|
70
|
-
latitude: this.latitude,
|
|
71
|
-
height: 0.0,
|
|
72
|
-
});
|
|
73
|
-
this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);
|
|
74
|
-
this.initializeData(this._projectTimeZoneOffset);
|
|
75
|
-
}
|
|
76
|
-
get timeZoneOffset() {
|
|
77
|
-
return this._projectTimeZoneOffset;
|
|
78
|
-
}
|
|
79
|
-
get shadowColor() {
|
|
80
|
-
return this._shadowColor;
|
|
81
|
-
}
|
|
82
|
-
set shadowColor(color) {
|
|
83
|
-
this._shadowColor = color;
|
|
84
|
-
}
|
|
85
|
-
get shouldShowTimeline() {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
/** Get time at project location */
|
|
89
|
-
get timeOfDay() {
|
|
90
|
-
return this._projectDateTime;
|
|
91
|
-
}
|
|
92
|
-
/** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time
|
|
93
|
-
* which will be adjusted to the same time at project location. */
|
|
94
|
-
setDateAndTime(date, isProjectDate) {
|
|
95
|
-
let userDay = date;
|
|
96
|
-
// convert date from user date to project location
|
|
97
|
-
if (isProjectDate) {
|
|
98
|
-
const userOffset = date.getTimezoneOffset() * millisecPerMinute;
|
|
99
|
-
userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);
|
|
100
|
-
}
|
|
101
|
-
this.initializeData(this._projectTimeZoneOffset, userDay);
|
|
102
|
-
}
|
|
103
|
-
/** Project Day Start */
|
|
104
|
-
get day() {
|
|
105
|
-
return this._projectDay;
|
|
106
|
-
}
|
|
107
|
-
/** Project Day Start in milliseconds */
|
|
108
|
-
get dayStartMs() {
|
|
109
|
-
return this._projectDayStartMS;
|
|
110
|
-
}
|
|
111
|
-
getCartographicCenter(iModel) {
|
|
112
|
-
if (iModel.isGeoLocated) {
|
|
113
|
-
const projectExtents = iModel.projectExtents;
|
|
114
|
-
const projectCenter = core_geometry_1.Point3d.createAdd2Scaled(projectExtents.low, 0.5, projectExtents.high, 0.5);
|
|
115
|
-
return iModel.spatialToCartographicFromEcef(projectCenter);
|
|
116
|
-
}
|
|
117
|
-
return core_common_1.Cartographic.fromDegrees({
|
|
118
|
-
longitude: this.longitude,
|
|
119
|
-
latitude: this.latitude,
|
|
120
|
-
height: 0.0,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
set viewport(viewport) {
|
|
124
|
-
this._viewport = viewport;
|
|
125
|
-
if (viewport)
|
|
126
|
-
this.viewId = viewport.view.id;
|
|
127
|
-
else
|
|
128
|
-
this.viewId = "";
|
|
129
|
-
}
|
|
130
|
-
get viewport() {
|
|
131
|
-
return this._viewport;
|
|
132
|
-
}
|
|
133
|
-
getZone(location) {
|
|
134
|
-
return Math.floor(0.5 + location.longitudeDegrees / 15.0);
|
|
135
|
-
}
|
|
136
|
-
get sunrise() {
|
|
137
|
-
return this._projectSunrise;
|
|
138
|
-
}
|
|
139
|
-
get sunriseMs() {
|
|
140
|
-
return this._projectSunriseMs;
|
|
141
|
-
}
|
|
142
|
-
get sunset() {
|
|
143
|
-
return this._projectSunset;
|
|
144
|
-
}
|
|
145
|
-
get sunsetMs() {
|
|
146
|
-
return this._projectSunsetMs;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
exports.BaseSolarDataProvider = BaseSolarDataProvider;
|
|
150
|
-
//# sourceMappingURL=BaseSolarDataProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSolarDataProvider.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/BaseSolarDataProvider.ts"],"names":[],"mappings":"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","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\nimport { Point3d } from \"@itwin/core-geometry\";\nimport {\n calculateSunriseOrSunset,\n Cartographic,\n ColorByName,\n ColorDef,\n} from \"@itwin/core-common\";\nimport type { IModelConnection, ScreenViewport } from \"@itwin/core-frontend\";\nimport type { SolarDataProvider } from \"./interfaces\";\n\nconst millisecPerMinute = 1000 * 60;\nconst millisecPerHour = millisecPerMinute * 60;\n\n// the interface and class are in alpha state - it may change after usability testing - test coverage not complete\n\n/** Base class that provides solar data for animation control\n * @alpha\n */\nexport class BaseSolarDataProvider implements SolarDataProvider {\n protected _projectTimeZoneOffset: number; // used to convert between project time and local time\n protected _viewport: ScreenViewport | undefined;\n protected _cartographicCenter: Cartographic;\n protected _shadowColor = ColorDef.create(ColorByName.gray);\n\n public longitude: number = -75.17035; // long/lat of Philadelphia\n public latitude: number = 39.954927;\n public viewId = \"\"; // View Id used to determine sunrise and sunset\n public supportsTimelineAnimation = false; // set to true when provider determines animation data is available.\n public animationFraction: number = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.\n\n private _projectDayStartMS = 0;\n private _projectSunriseMs = 0;\n private _projectSunsetMs = 0;\n private _zoneOffsetMs = 0;\n private _projectSunrise = new Date();\n private _projectSunset = new Date();\n private _projectDateTime = new Date();\n private _projectDay = new Date();\n\n // projectTimeZoneOffset = zone offset in hours\n protected initializeData(projectTimeZoneOffset: number, initialTime?: Date) {\n if (!initialTime) initialTime = new Date(Date.now()); // users local time\n\n this._zoneOffsetMs = projectTimeZoneOffset * millisecPerHour;\n const year = initialTime.getFullYear();\n const month = initialTime.getMonth();\n const date = initialTime.getDate();\n const hours = initialTime.getHours();\n const minutes = initialTime.getMinutes();\n const initialUtcMs = Date.UTC(year, month, date, hours, minutes, 0, 0);\n const initialProjectMs = initialUtcMs - this._zoneOffsetMs;\n this._projectDateTime = new Date(initialProjectMs);\n\n const utcDayMs = Date.UTC(year, month, date, 0, 0, 0, 0);\n const utcDay = new Date(utcDayMs);\n this._projectDayStartMS = utcDayMs - this._zoneOffsetMs;\n this._projectDay = new Date(this._projectDayStartMS);\n this._projectSunrise = calculateSunriseOrSunset(\n utcDay,\n this._cartographicCenter,\n true\n );\n this._projectSunset = calculateSunriseOrSunset(\n utcDay,\n this._cartographicCenter,\n false\n );\n this._projectSunriseMs = this._projectSunrise.getTime();\n this._projectSunsetMs = this._projectSunset.getTime();\n }\n\n constructor(\n viewport?: ScreenViewport,\n longitude?: number,\n latitude?: number\n ) {\n this._viewport = viewport;\n if (longitude) this.longitude = longitude;\n if (latitude) this.latitude = latitude;\n\n if (viewport) this.viewId = viewport.view.id;\n\n // project location\n this._cartographicCenter = Cartographic.fromDegrees({\n longitude: this.longitude,\n latitude: this.latitude,\n height: 0.0,\n });\n this._projectTimeZoneOffset = this.getZone(this._cartographicCenter);\n\n this.initializeData(this._projectTimeZoneOffset);\n }\n\n public get timeZoneOffset(): number {\n return this._projectTimeZoneOffset;\n }\n\n public get shadowColor(): ColorDef {\n return this._shadowColor;\n }\n\n public set shadowColor(color: ColorDef) {\n this._shadowColor = color;\n }\n\n public get shouldShowTimeline() {\n return false;\n }\n\n /** Get time at project location */\n public get timeOfDay(): Date {\n return this._projectDateTime;\n }\n\n /** The date can be in project time or if isProjectDate is false, it is assumed to be users current local time\n * which will be adjusted to the same time at project location. */\n public setDateAndTime(date: Date, isProjectDate?: boolean) {\n let userDay = date;\n\n // convert date from user date to project location\n if (isProjectDate) {\n const userOffset = date.getTimezoneOffset() * millisecPerMinute;\n userDay = new Date(date.getTime() - userOffset - this._zoneOffsetMs);\n }\n\n this.initializeData(this._projectTimeZoneOffset, userDay);\n }\n\n /** Project Day Start */\n public get day(): Date {\n return this._projectDay;\n }\n\n /** Project Day Start in milliseconds */\n public get dayStartMs(): number {\n return this._projectDayStartMS;\n }\n\n public getCartographicCenter(iModel: IModelConnection): Cartographic {\n if (iModel.isGeoLocated) {\n const projectExtents = iModel.projectExtents;\n const projectCenter = Point3d.createAdd2Scaled(\n projectExtents.low,\n 0.5,\n projectExtents.high,\n 0.5\n );\n return iModel.spatialToCartographicFromEcef(projectCenter);\n }\n return Cartographic.fromDegrees({\n longitude: this.longitude,\n latitude: this.latitude,\n height: 0.0,\n });\n }\n\n public set viewport(viewport: ScreenViewport | undefined) {\n this._viewport = viewport;\n if (viewport) this.viewId = viewport.view.id;\n else this.viewId = \"\";\n }\n\n public get viewport(): ScreenViewport | undefined {\n return this._viewport;\n }\n\n protected getZone(location: Cartographic) {\n return Math.floor(0.5 + location.longitudeDegrees / 15.0);\n }\n\n public get sunrise(): Date {\n return this._projectSunrise;\n }\n\n public get sunriseMs(): number {\n return this._projectSunriseMs;\n }\n\n public get sunset(): Date {\n return this._projectSunset;\n }\n\n public get sunsetMs(): number {\n return this._projectSunsetMs;\n }\n\n public onTimeChanged = (_time: Date) => {\n // to be implemented by derived class\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTimelineDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/BaseTimelineDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE3E;;GAEG;AACH,qBAAa,wBAAyB,YAAW,oBAAoB;IACnE,SAAgB,EAAE,8BAA8B;IACzC,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC;IACtB,MAAM,SAAM;IAEZ,yBAAyB,UAAS;IAClC,iBAAiB,EAAE,MAAM,CAAK;IACrC,SAAS,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;gBAEpC,QAAQ,CAAC,EAAE,cAAc;IAKrC,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAGnC;IAEW,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjD,kDAAkD;IAClD,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED,uCAAuC;IACvC,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,EAIvD;IAED,IAAW,QAAQ,IAAI,cAAc,GAAG,SAAS,CAEhD;IAED,IAAW,IAAI,IAAI,OAAO,CAIzB;IAEM,WAAW,IAAI,gBAAgB;IAI/B,cAAc,CAAC,QAAQ,EAAE,gBAAgB;IAIzC,wBAAwB,cAAe,gBAAgB,UAAQ;IAE/D,0BAA0B,uBAAwB,MAAM,UAAQ;CACxE"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Timeline
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.BaseTimelineDataProvider = void 0;
|
|
11
|
-
/** Base Timeline Data Provider
|
|
12
|
-
* @alpha
|
|
13
|
-
*/
|
|
14
|
-
class BaseTimelineDataProvider {
|
|
15
|
-
constructor(viewport) {
|
|
16
|
-
this.id = "TestTimelineDataProvider";
|
|
17
|
-
this.viewId = "";
|
|
18
|
-
this.supportsTimelineAnimation = false; // set to true when provider determines animation data is available.
|
|
19
|
-
this.animationFraction = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.
|
|
20
|
-
this._settings = {
|
|
21
|
-
duration: 20 * 1000,
|
|
22
|
-
loop: true,
|
|
23
|
-
};
|
|
24
|
-
this.onPlaybackSettingChanged = (_settings) => { };
|
|
25
|
-
this.onAnimationFractionChanged = (_animationFraction) => { };
|
|
26
|
-
this._viewport = viewport;
|
|
27
|
-
if (viewport)
|
|
28
|
-
this.viewId = viewport.view.id;
|
|
29
|
-
}
|
|
30
|
-
async loadTimelineData() {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
/** Called to get the initial scrubber location */
|
|
34
|
-
get initialDuration() {
|
|
35
|
-
return this.duration * this.animationFraction;
|
|
36
|
-
}
|
|
37
|
-
/** Called to get playback duration */
|
|
38
|
-
get duration() {
|
|
39
|
-
return this.getSettings().duration ? this.getSettings().duration : 20000;
|
|
40
|
-
}
|
|
41
|
-
set viewport(viewport) {
|
|
42
|
-
this._viewport = viewport;
|
|
43
|
-
if (viewport)
|
|
44
|
-
this.viewId = viewport.view.id;
|
|
45
|
-
else
|
|
46
|
-
this.viewId = "";
|
|
47
|
-
}
|
|
48
|
-
get viewport() {
|
|
49
|
-
return this._viewport;
|
|
50
|
-
}
|
|
51
|
-
get loop() {
|
|
52
|
-
return undefined === this.getSettings().loop
|
|
53
|
-
? false
|
|
54
|
-
: this.getSettings().loop;
|
|
55
|
-
}
|
|
56
|
-
getSettings() {
|
|
57
|
-
return this._settings;
|
|
58
|
-
}
|
|
59
|
-
updateSettings(settings) {
|
|
60
|
-
this._settings = { ...this._settings, ...settings };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.BaseTimelineDataProvider = BaseTimelineDataProvider;
|
|
64
|
-
//# sourceMappingURL=BaseTimelineDataProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTimelineDataProvider.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/BaseTimelineDataProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAKH;;GAEG;AACH,MAAa,wBAAwB;IAUnC,YAAY,QAAyB;QATrB,OAAE,GAAG,0BAA0B,CAAC;QAGzC,WAAM,GAAG,EAAE,CAAC;QAEZ,8BAAyB,GAAG,KAAK,CAAC,CAAC,oEAAoE;QACvG,sBAAiB,GAAW,CAAC,CAAC,CAAC,kFAAkF;QAQ9G,cAAS,GAAqB;YACtC,QAAQ,EAAE,EAAE,GAAG,IAAI;YACnB,IAAI,EAAE,IAAI;SACX,CAAC;QAwCK,6BAAwB,GAAG,CAAC,SAA2B,EAAE,EAAE,GAAE,CAAC,CAAC;QAE/D,+BAA0B,GAAG,CAAC,kBAA0B,EAAE,EAAE,GAAE,CAAC,CAAC;QAjDrE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,QAAQ;YAAE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IAC/C,CAAC;IAOM,KAAK,CAAC,gBAAgB;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,kDAAkD;IAClD,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC;IAChD,CAAC;IAED,uCAAuC;IACvC,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5E,CAAC;IAED,IAAW,QAAQ,CAAC,QAAoC;QACtD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,QAAQ;YAAE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;;YACxC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,SAAS,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI;YAC1C,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAK,CAAC;IAC/B,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEM,cAAc,CAAC,QAA0B;QAC9C,IAAI,CAAC,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,EAAE,CAAC;IACtD,CAAC;CAKF;AA7DD,4DA6DC","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\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { PlaybackSettings, TimelineDataProvider } from \"./interfaces\";\n\n/** Base Timeline Data Provider\n * @alpha\n */\nexport class BaseTimelineDataProvider implements TimelineDataProvider {\n public readonly id = \"TestTimelineDataProvider\";\n public start: Date | undefined;\n public end: Date | undefined;\n public viewId = \"\";\n\n public supportsTimelineAnimation = false; // set to true when provider determines animation data is available.\n public animationFraction: number = 0; // value from 0.0 to 1.0 that specifies the percentage complete for the animation.\n protected _viewport: ScreenViewport | undefined;\n\n constructor(viewport?: ScreenViewport) {\n this._viewport = viewport;\n if (viewport) this.viewId = viewport.view.id;\n }\n\n protected _settings: PlaybackSettings = {\n duration: 20 * 1000,\n loop: true,\n };\n\n public async loadTimelineData(): Promise<boolean> {\n return false;\n }\n\n /** Called to get the initial scrubber location */\n public get initialDuration(): number {\n return this.duration * this.animationFraction;\n }\n\n /** Called to get playback duration */\n public get duration(): number {\n return this.getSettings().duration ? this.getSettings().duration! : 20000;\n }\n\n public set viewport(viewport: ScreenViewport | undefined) {\n this._viewport = viewport;\n if (viewport) this.viewId = viewport.view.id;\n else this.viewId = \"\";\n }\n\n public get viewport(): ScreenViewport | undefined {\n return this._viewport;\n }\n\n public get loop(): boolean {\n return undefined === this.getSettings().loop\n ? false\n : this.getSettings().loop!;\n }\n\n public getSettings(): PlaybackSettings {\n return this._settings;\n }\n\n public updateSettings(settings: PlaybackSettings) {\n this._settings = { ...this._settings, ...settings };\n }\n\n public onPlaybackSettingChanged = (_settings: PlaybackSettings) => {};\n\n public onAnimationFractionChanged = (_animationFraction: number) => {};\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InlineEdit.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/InlineEdit.tsx"],"names":[],"mappings":"AAIA,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,UAAU,eAAgB,SAAQ,WAAW;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAC7C,eAAe,EACf,eAAe,CAChB;IACC,OAAO,CAAC,SAAS,CAAuC;gBAE5C,KAAK,EAAE,eAAe;IASlB,kBAAkB,CAChC,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,eAAe;IAS7B,OAAO,CAAC,OAAO,CAEb;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,UAAU,CAYhB;IAEF,OAAO,CAAC,SAAS,CAEf;IAEF,OAAO,CAAC,WAAW;IAIH,MAAM;CAiBvB"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.InlineEdit = void 0;
|
|
30
|
-
/*---------------------------------------------------------------------------------------------
|
|
31
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
32
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
|
-
*--------------------------------------------------------------------------------------------*/
|
|
34
|
-
require("./InlineEdit.scss");
|
|
35
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
36
|
-
const React = __importStar(require("react"));
|
|
37
|
-
const ts_key_enum_1 = require("ts-key-enum");
|
|
38
|
-
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
39
|
-
/** Duration Inline Editor
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
class InlineEdit extends React.Component {
|
|
43
|
-
constructor(props) {
|
|
44
|
-
super(props);
|
|
45
|
-
this._inputRef = React.createRef();
|
|
46
|
-
this._onBlur = (event) => {
|
|
47
|
-
this._sendChange(event.target.value);
|
|
48
|
-
};
|
|
49
|
-
this._onFocus = (event) => {
|
|
50
|
-
event.target.select();
|
|
51
|
-
};
|
|
52
|
-
this._onKeyDown = (event) => {
|
|
53
|
-
switch (event.key) {
|
|
54
|
-
case ts_key_enum_1.Key.Escape.valueOf():
|
|
55
|
-
this.setState((prevState) => ({ value: prevState.originalValue }), () => this._inputRef.current.select());
|
|
56
|
-
break;
|
|
57
|
-
case ts_key_enum_1.Key.Enter.valueOf():
|
|
58
|
-
this._sendChange(this.state.value);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this._onChange = (event) => {
|
|
63
|
-
this.setState({ value: event.target.value });
|
|
64
|
-
};
|
|
65
|
-
this.state = {
|
|
66
|
-
value: this.props.defaultValue,
|
|
67
|
-
originalValue: this.props.defaultValue,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
componentDidUpdate(prevProps, _prevState) {
|
|
71
|
-
if (prevProps.defaultValue !== this.props.defaultValue) {
|
|
72
|
-
this.setState((_, props) => {
|
|
73
|
-
return { value: props.defaultValue, originalValue: props.defaultValue };
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
_sendChange(value) {
|
|
78
|
-
if (this.props.onChange)
|
|
79
|
-
this.props.onChange(value);
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
return (React.createElement(itwinui_react_1.Input, { "data-testid": "timeline-duration-edit-input", className: (0, classnames_1.default)("inline-edit-input", this.props.className), style: this.props.style, ref: this._inputRef, type: "text", value: this.state.value, size: "small", onFocus: this._onFocus, onBlur: this._onBlur, onKeyDown: this._onKeyDown, onChange: this._onChange }));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.InlineEdit = InlineEdit;
|
|
86
|
-
//# sourceMappingURL=InlineEdit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InlineEdit.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/InlineEdit.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,6BAA2B;AAC3B,4DAAoC;AACpC,6CAA+B;AAC/B,6CAAkC;AAElC,wDAA6C;AAa7C;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK,CAAC,SAGrC;IAGC,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,cAAS,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QAsBhD,YAAO,GAAG,CAAC,KAA0C,EAAE,EAAE;YAC/D,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,KAA0C,EAAE,EAAE;YAChE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACxB,CAAC,CAAC;QAEM,eAAU,GAAG,CAAC,KAA4C,EAAE,EAAE;YACpE,QAAQ,KAAK,CAAC,GAAG,EAAE,CAAC;gBAClB,KAAK,iBAAG,CAAC,MAAM,CAAC,OAAO,EAAE;oBACvB,IAAI,CAAC,QAAQ,CACX,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC,EACnD,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAQ,CAAC,MAAM,EAAE,CACvC,CAAC;oBACF,MAAM;gBACR,KAAK,iBAAG,CAAC,KAAK,CAAC,OAAO,EAAE;oBACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACnC,MAAM;YACV,CAAC;QACH,CAAC,CAAC;QAEM,cAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;YACjE,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC;QAzCA,IAAI,CAAC,KAAK,GAAG;YACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;YAC9B,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;SACvC,CAAC;IACJ,CAAC;IAEe,kBAAkB,CAChC,SAA0B,EAC1B,UAA2B;QAE3B,IAAI,SAAS,CAAC,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;gBACzB,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;YAC1E,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IA4BO,WAAW,CAAC,KAAa;QAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,qBAAK,mBACQ,8BAA8B,EAC1C,SAAS,EAAE,IAAA,oBAAU,EAAC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAChE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,MAAM,EAAE,IAAI,CAAC,OAAO,EACpB,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,QAAQ,EAAE,IAAI,CAAC,SAAS,GACxB,CACH,CAAC;IACJ,CAAC;CACF;AAzED,gCAyEC","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 *--------------------------------------------------------------------------------------------*/\nimport \"./InlineEdit.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Input } from \"@itwin/itwinui-react\";\n\n// eslint-disable-next-line deprecation/deprecation\ninterface InlineEditProps extends CommonProps {\n defaultValue: string;\n onChange?: (value: string) => void;\n}\n\ninterface InlineEditState {\n value: string;\n originalValue: string;\n}\n\n/** Duration Inline Editor\n * @internal\n */\nexport class InlineEdit extends React.Component<\n InlineEditProps,\n InlineEditState\n> {\n private _inputRef = React.createRef<HTMLInputElement>();\n\n constructor(props: InlineEditProps) {\n super(props);\n\n this.state = {\n value: this.props.defaultValue,\n originalValue: this.props.defaultValue,\n };\n }\n\n public override componentDidUpdate(\n prevProps: InlineEditProps,\n _prevState: InlineEditState\n ) {\n if (prevProps.defaultValue !== this.props.defaultValue) {\n this.setState((_, props) => {\n return { value: props.defaultValue, originalValue: props.defaultValue };\n });\n }\n }\n\n private _onBlur = (event: React.ChangeEvent<HTMLInputElement>) => {\n this._sendChange(event.target.value);\n };\n\n private _onFocus = (event: React.ChangeEvent<HTMLInputElement>) => {\n event.target.select();\n };\n\n private _onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n switch (event.key) {\n case Key.Escape.valueOf():\n this.setState(\n (prevState) => ({ value: prevState.originalValue }),\n () => this._inputRef.current!.select()\n );\n break;\n case Key.Enter.valueOf():\n this._sendChange(this.state.value);\n break;\n }\n };\n\n private _onChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n this.setState({ value: event.target.value });\n };\n\n private _sendChange(value: string) {\n if (this.props.onChange) this.props.onChange(value);\n }\n\n public override render() {\n return (\n <Input\n data-testid=\"timeline-duration-edit-input\"\n className={classnames(\"inline-edit-input\", this.props.className)}\n style={this.props.style}\n ref={this._inputRef}\n type=\"text\"\n value={this.state.value}\n size=\"small\"\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n onKeyDown={this._onKeyDown}\n onChange={this._onChange}\n />\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlayButton.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,eAAe;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,eAAe,qBAoBzE"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.PlayButton = void 0;
|
|
27
|
-
/*---------------------------------------------------------------------------------------------
|
|
28
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
-
*--------------------------------------------------------------------------------------------*/
|
|
31
|
-
const React = __importStar(require("react"));
|
|
32
|
-
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
33
|
-
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
34
|
-
const useTranslation_1 = require("../useTranslation");
|
|
35
|
-
/** Play/pause button used in timeline components.
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
function PlayButton({ isPlaying, onPlay, onPause }) {
|
|
39
|
-
const { translate } = (0, useTranslation_1.useTranslation)();
|
|
40
|
-
const label = translate(isPlaying ? "timeline.pause" : "timeline.play");
|
|
41
|
-
return (React.createElement(itwinui_react_1.IconButton, { styleType: "borderless", label: label, onClick: () => {
|
|
42
|
-
if (isPlaying) {
|
|
43
|
-
onPause?.();
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
onPlay?.();
|
|
47
|
-
} }, isPlaying ? React.createElement(itwinui_icons_react_1.SvgPause, null) : React.createElement(itwinui_icons_react_1.SvgPlay, null)));
|
|
48
|
-
}
|
|
49
|
-
exports.PlayButton = PlayButton;
|
|
50
|
-
//# sourceMappingURL=PlayButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlayButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,6CAA+B;AAC/B,oEAA+D;AAC/D,wDAAkD;AAClD,sDAAmD;AAQnD;;GAEG;AACH,SAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAmB;IACxE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAExE,OAAO,CACL,oBAAC,0BAAU,IACT,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,SAAS,EAAE,CAAC;gBACd,OAAO,EAAE,EAAE,CAAC;gBACZ,OAAO;YACT,CAAC;YAED,MAAM,EAAE,EAAE,CAAC;QACb,CAAC,IAEA,SAAS,CAAC,CAAC,CAAC,oBAAC,8BAAQ,OAAG,CAAC,CAAC,CAAC,oBAAC,6BAAO,OAAG,CAC5B,CACd,CAAC;AACJ,CAAC;AApBD,gCAoBC","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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport { SvgPause, SvgPlay } from \"@itwin/itwinui-icons-react\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { useTranslation } from \"../useTranslation\";\n\ninterface PlayButtonProps {\n isPlaying: boolean;\n onPlay?: () => void;\n onPause?: () => void;\n}\n\n/** Play/pause button used in timeline components.\n * @internal\n */\nexport function PlayButton({ isPlaying, onPlay, onPause }: PlayButtonProps) {\n const { translate } = useTranslation();\n const label = translate(isPlaying ? \"timeline.pause\" : \"timeline.play\");\n\n return (\n <IconButton\n styleType=\"borderless\"\n label={label}\n onClick={() => {\n if (isPlaying) {\n onPause?.();\n return;\n }\n\n onPlay?.();\n }}\n >\n {isPlaying ? <SvgPause /> : <SvgPlay />}\n </IconButton>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scrubber.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/Scrubber.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,UAGtE;AA8FD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,OAAO,EACP,WAAW,EACX,QAAQ,GACT,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,qBAsBA;AAED;;;GAGG;AACH,wBAAgB,WAAW,sBAQ1B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,cAAc,GAAG,SAAS,WAuB1E;AAED;;GAEG;AAEH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CACxC,OAAO,MAAM,CACd,CAAC,qBAAqB,CAAC,CAAC;CAC1B;AAED;;GAEG;AACH,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AACD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,qBAsH5C"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Scrubber = exports.useFocusedThumb = exports.CustomThumb = exports.RailMarkers = exports.getPercentageOfRectangle = void 0;
|
|
27
|
-
/*---------------------------------------------------------------------------------------------
|
|
28
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
-
*--------------------------------------------------------------------------------------------*/
|
|
31
|
-
require("./Scrubber.scss");
|
|
32
|
-
const React = __importStar(require("react"));
|
|
33
|
-
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
34
|
-
const core_react_1 = require("@itwin/core-react");
|
|
35
|
-
const components_react_1 = require("@itwin/components-react");
|
|
36
|
-
/**
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
function getPercentageOfRectangle(rect, pointer) {
|
|
40
|
-
const position = Math.min(rect.right, Math.max(rect.left, pointer));
|
|
41
|
-
return (position - rect.left) / rect.width;
|
|
42
|
-
}
|
|
43
|
-
exports.getPercentageOfRectangle = getPercentageOfRectangle;
|
|
44
|
-
const formatDuration = (value) => {
|
|
45
|
-
const addZero = (i) => {
|
|
46
|
-
return i < 10 ? `0${i}` : i;
|
|
47
|
-
};
|
|
48
|
-
const date = new Date(value);
|
|
49
|
-
const minutes = date.getUTCMinutes();
|
|
50
|
-
const seconds = date.getUTCSeconds();
|
|
51
|
-
return `${addZero(minutes)}:${addZero(seconds)}`;
|
|
52
|
-
};
|
|
53
|
-
const formatDate = (startDate, endDate, fraction, timeZoneOffset) => {
|
|
54
|
-
const delta = (endDate.getTime() - startDate.getTime()) * fraction;
|
|
55
|
-
const date = new Date(startDate.getTime() + delta);
|
|
56
|
-
return (0, components_react_1.toDateString)(date, timeZoneOffset);
|
|
57
|
-
};
|
|
58
|
-
const formatTime = (startDate, endDate, fraction, timeZoneOffset) => {
|
|
59
|
-
const delta = (endDate.getTime() - startDate.getTime()) * fraction;
|
|
60
|
-
const date = new Date(startDate.getTime() + delta);
|
|
61
|
-
return ` ${(0, components_react_1.toTimeString)(date, timeZoneOffset)}`;
|
|
62
|
-
};
|
|
63
|
-
function generateToolTipText(showTime, percent, min, max, startDate, endDate, timeZoneOffset = 0) {
|
|
64
|
-
if (startDate && endDate)
|
|
65
|
-
return `${formatDate(startDate, endDate, percent, timeZoneOffset)}${showTime ? formatTime(startDate, endDate, percent, timeZoneOffset) : ""} `;
|
|
66
|
-
const val = Math.round(min + (max - min) * percent);
|
|
67
|
-
return formatDuration(val);
|
|
68
|
-
}
|
|
69
|
-
function getPercentageFromDate(startDate, endDate, date) {
|
|
70
|
-
const newDate = date ? date : new Date();
|
|
71
|
-
const startTime = startDate.getTime();
|
|
72
|
-
const totalDuration = endDate.getTime() - startTime;
|
|
73
|
-
return (newDate.getTime() - startTime) / totalDuration;
|
|
74
|
-
}
|
|
75
|
-
function getDateMarker(dateMarkerPropsIn, startDate, endDate) {
|
|
76
|
-
const percentage = getPercentageFromDate(startDate, endDate, dateMarkerPropsIn.date);
|
|
77
|
-
const marker = dateMarkerPropsIn.dateMarker ? (dateMarkerPropsIn.dateMarker) : (React.createElement("span", { className: "date-marker-default" }));
|
|
78
|
-
return { datePercentage: percentage, dateMarker: marker };
|
|
79
|
-
}
|
|
80
|
-
function markDateInTimelineRange(dateMarkerProps, startDate, endDate) {
|
|
81
|
-
if (dateMarkerProps && startDate && endDate) {
|
|
82
|
-
const inDate = dateMarkerProps.date ? dateMarkerProps.date : new Date();
|
|
83
|
-
if (inDate.getTime() >= startDate.getTime() &&
|
|
84
|
-
inDate.getTime() <= endDate.getTime())
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
/** @internal */
|
|
90
|
-
function RailMarkers({ showToolTip, percent, tooltipText, markDate, }) {
|
|
91
|
-
return (React.createElement("div", { className: "components-timeline-rail-marker-container" },
|
|
92
|
-
showToolTip && (React.createElement("div", { className: "components-timeline-tooltip", style: { left: `${Math.round(percent * 100)}% ` } },
|
|
93
|
-
React.createElement("span", { className: "tooltip-text" }, tooltipText))),
|
|
94
|
-
markDate && (React.createElement("div", { className: "components-timeline-date-marker", "data-testid": "test-date-marker", style: { left: `${Math.round(markDate.datePercentage * 100)}% ` } }, markDate.dateMarker))));
|
|
95
|
-
}
|
|
96
|
-
exports.RailMarkers = RailMarkers;
|
|
97
|
-
/**
|
|
98
|
-
* Custom Timeline Thumb
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
function CustomThumb() {
|
|
102
|
-
return (React.createElement("div", { className: "scrubber-handle" },
|
|
103
|
-
React.createElement("div", null),
|
|
104
|
-
React.createElement("div", null),
|
|
105
|
-
React.createElement("div", null)));
|
|
106
|
-
}
|
|
107
|
-
exports.CustomThumb = CustomThumb;
|
|
108
|
-
/**
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
function useFocusedThumb(sliderContainer) {
|
|
112
|
-
const [thumbElement, setThumbElement] = React.useState();
|
|
113
|
-
React.useLayoutEffect(() => {
|
|
114
|
-
if (!sliderContainer)
|
|
115
|
-
return;
|
|
116
|
-
const element = sliderContainer.querySelector(".components-timeline-thumb");
|
|
117
|
-
if (!element)
|
|
118
|
-
return;
|
|
119
|
-
setThumbElement(element);
|
|
120
|
-
}, [sliderContainer, thumbElement]);
|
|
121
|
-
const [thumbHasFocus, setThumbHasFocus] = React.useState(false);
|
|
122
|
-
const handleThumbFocus = React.useCallback(() => {
|
|
123
|
-
setThumbHasFocus(true);
|
|
124
|
-
}, []);
|
|
125
|
-
const handleThumbBlur = React.useCallback(() => {
|
|
126
|
-
setThumbHasFocus(false);
|
|
127
|
-
}, []);
|
|
128
|
-
(0, core_react_1.useEventListener)("focus", handleThumbFocus, thumbElement);
|
|
129
|
-
(0, core_react_1.useEventListener)("blur", handleThumbBlur, thumbElement);
|
|
130
|
-
return thumbHasFocus;
|
|
131
|
-
}
|
|
132
|
-
exports.useFocusedThumb = useFocusedThumb;
|
|
133
|
-
/** Scrubber/Slider for timeline control
|
|
134
|
-
* @internal
|
|
135
|
-
*/
|
|
136
|
-
function Scrubber(props) {
|
|
137
|
-
const { startDate, endDate, showTime, isPlaying, totalDuration, timeZoneOffset, currentDuration, className, onChange, onUpdate, trackContainerProps, } = props;
|
|
138
|
-
const [sliderContainer, setSliderContainer] = React.useState(null);
|
|
139
|
-
const [pointerPercent, setPointerPercent] = React.useState(0);
|
|
140
|
-
const tooltipProps = React.useCallback(() => {
|
|
141
|
-
return { visible: false };
|
|
142
|
-
}, []);
|
|
143
|
-
const [showRailTooltip, setShowRailTooltip] = React.useState(false);
|
|
144
|
-
const handlePointerEnter = React.useCallback(() => {
|
|
145
|
-
setShowRailTooltip(true);
|
|
146
|
-
}, []);
|
|
147
|
-
const handlePointerLeave = React.useCallback(() => {
|
|
148
|
-
setShowRailTooltip(false);
|
|
149
|
-
}, []);
|
|
150
|
-
const handlePointerMove = React.useCallback((event) => {
|
|
151
|
-
sliderContainer &&
|
|
152
|
-
setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));
|
|
153
|
-
}, [sliderContainer]);
|
|
154
|
-
const thumbHasFocus = useFocusedThumb(sliderContainer ?? undefined);
|
|
155
|
-
const tickLabel = React.useMemo(() => {
|
|
156
|
-
const showTip = isPlaying || showRailTooltip || thumbHasFocus;
|
|
157
|
-
const percent = isPlaying || thumbHasFocus
|
|
158
|
-
? currentDuration / totalDuration
|
|
159
|
-
: pointerPercent;
|
|
160
|
-
const markDateInRange = markDateInTimelineRange(props.markDate, startDate, endDate);
|
|
161
|
-
const currentDateMarker = props.markDate && markDateInRange && startDate && endDate
|
|
162
|
-
? getDateMarker(props.markDate, startDate, endDate)
|
|
163
|
-
: undefined;
|
|
164
|
-
const tooltipText = generateToolTipText(!!showTime, percent, 0, totalDuration, startDate, endDate, timeZoneOffset);
|
|
165
|
-
return (React.createElement(RailMarkers, { showToolTip: showTip, percent: percent, tooltipText: tooltipText, markDate: currentDateMarker }));
|
|
166
|
-
}, [
|
|
167
|
-
isPlaying,
|
|
168
|
-
showRailTooltip,
|
|
169
|
-
currentDuration,
|
|
170
|
-
totalDuration,
|
|
171
|
-
pointerPercent,
|
|
172
|
-
startDate,
|
|
173
|
-
endDate,
|
|
174
|
-
timeZoneOffset,
|
|
175
|
-
showTime,
|
|
176
|
-
thumbHasFocus,
|
|
177
|
-
props.markDate,
|
|
178
|
-
]);
|
|
179
|
-
return (React.createElement(itwinui_react_1.Slider, { ref: setSliderContainer, className: className, step: 1, min: 0, max: totalDuration, minLabel: "", maxLabel: "", onUpdate: onUpdate, onChange: onChange, values: [currentDuration], tooltipProps: tooltipProps, thumbProps: () => ({
|
|
180
|
-
children: React.createElement(CustomThumb, null),
|
|
181
|
-
className: "components-timeline-thumb",
|
|
182
|
-
}), tickLabels: tickLabel, onPointerEnter: handlePointerEnter, onPointerMove: handlePointerMove, onPointerLeave: handlePointerLeave, trackContainerProps: trackContainerProps }));
|
|
183
|
-
}
|
|
184
|
-
exports.Scrubber = Scrubber;
|
|
185
|
-
//# sourceMappingURL=Scrubber.js.map
|