@itwin/imodel-components-react 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +335 -327
- package/LICENSE.md +9 -9
- package/README.md +11 -11
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +13 -10
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +23 -17
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +71 -63
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +11 -9
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +6 -8
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +11 -12
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.js +32 -15
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.scss +78 -61
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +14 -11
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +36 -35
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.js +5 -8
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +3 -3
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +17 -9
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +8 -6
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +18 -12
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +36 -22
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +12 -16
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +31 -11
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +103 -49
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +171 -66
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +20 -13
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +14 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +33 -11
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +32 -24
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +15 -7
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +7 -4
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +27 -27
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +3 -3
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +32 -17
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +61 -27
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +4 -5
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +165 -165
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +56 -29
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -178
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +3 -3
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +45 -33
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.js +3 -3
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +13 -10
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +23 -17
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.scss +71 -63
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +11 -9
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +7 -9
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +13 -14
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.js +32 -15
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.scss +78 -61
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +14 -11
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.scss +36 -35
- package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.js +5 -8
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +3 -3
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +18 -10
- package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
- package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.js +10 -8
- package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +18 -12
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +38 -24
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.js +12 -16
- package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.js +31 -11
- package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +105 -51
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +173 -68
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +20 -13
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +14 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +33 -11
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +32 -24
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +16 -8
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js +7 -4
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +27 -27
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js +3 -3
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +32 -17
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +63 -29
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +4 -5
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +165 -165
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +58 -31
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -178
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js +3 -3
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +47 -35
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.js +3 -3
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +15 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
6
|
/** @packageDocumentation
|
|
7
7
|
* @module NavigationAids
|
|
8
8
|
*/
|
|
@@ -83,12 +83,42 @@ const cubeNavigationFaceRotations = {
|
|
|
83
83
|
};
|
|
84
84
|
// data relating Up/Down/Left/Right directions relative to every surface
|
|
85
85
|
const cubeNavigationRoutes = {
|
|
86
|
-
[Cube_1.Face.Front]: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
[Cube_1.Face.Front]: {
|
|
87
|
+
up: Cube_1.Face.Top,
|
|
88
|
+
down: Cube_1.Face.Bottom,
|
|
89
|
+
left: Cube_1.Face.Left,
|
|
90
|
+
right: Cube_1.Face.Right,
|
|
91
|
+
},
|
|
92
|
+
[Cube_1.Face.Back]: {
|
|
93
|
+
up: Cube_1.Face.Top,
|
|
94
|
+
down: Cube_1.Face.Bottom,
|
|
95
|
+
left: Cube_1.Face.Right,
|
|
96
|
+
right: Cube_1.Face.Left,
|
|
97
|
+
},
|
|
98
|
+
[Cube_1.Face.Top]: {
|
|
99
|
+
up: Cube_1.Face.Back,
|
|
100
|
+
down: Cube_1.Face.Front,
|
|
101
|
+
left: Cube_1.Face.Left,
|
|
102
|
+
right: Cube_1.Face.Right,
|
|
103
|
+
},
|
|
104
|
+
[Cube_1.Face.Bottom]: {
|
|
105
|
+
up: Cube_1.Face.Front,
|
|
106
|
+
down: Cube_1.Face.Back,
|
|
107
|
+
left: Cube_1.Face.Left,
|
|
108
|
+
right: Cube_1.Face.Right,
|
|
109
|
+
},
|
|
110
|
+
[Cube_1.Face.Right]: {
|
|
111
|
+
up: Cube_1.Face.Top,
|
|
112
|
+
down: Cube_1.Face.Bottom,
|
|
113
|
+
left: Cube_1.Face.Front,
|
|
114
|
+
right: Cube_1.Face.Back,
|
|
115
|
+
},
|
|
116
|
+
[Cube_1.Face.Left]: {
|
|
117
|
+
up: Cube_1.Face.Top,
|
|
118
|
+
down: Cube_1.Face.Bottom,
|
|
119
|
+
left: Cube_1.Face.Back,
|
|
120
|
+
right: Cube_1.Face.Front,
|
|
121
|
+
},
|
|
92
122
|
};
|
|
93
123
|
/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */
|
|
94
124
|
const DEFAULT_TOLERANCE = 1.0e-6;
|
|
@@ -131,7 +161,12 @@ class CubeNavigationAid extends React.Component {
|
|
|
131
161
|
if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {
|
|
132
162
|
const newMatrix = this.props.viewport.view.getRotation().clone();
|
|
133
163
|
if (!endRotMatrix.isAlmostEqual(newMatrix)) {
|
|
134
|
-
this.setState({
|
|
164
|
+
this.setState({
|
|
165
|
+
startRotMatrix: newMatrix,
|
|
166
|
+
endRotMatrix: newMatrix,
|
|
167
|
+
animation: 1,
|
|
168
|
+
face: Cube_1.Face.None,
|
|
169
|
+
});
|
|
135
170
|
}
|
|
136
171
|
}
|
|
137
172
|
};
|
|
@@ -140,7 +175,10 @@ class CubeNavigationAid extends React.Component {
|
|
|
140
175
|
const delta = this._lastTime ? t - this._lastTime : 16;
|
|
141
176
|
this._lastTime = t;
|
|
142
177
|
if (this.state.animation !== 1) {
|
|
143
|
-
const animation = Math.min(1, this.state.animation +
|
|
178
|
+
const animation = Math.min(1, this.state.animation +
|
|
179
|
+
delta /
|
|
180
|
+
(1000 *
|
|
181
|
+
(this.props.animationTime || /* istanbul ignore next */ 0.4)));
|
|
144
182
|
// istanbul ignore next
|
|
145
183
|
if (this._mounted) {
|
|
146
184
|
this.setState({ animation }, () => {
|
|
@@ -166,9 +204,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
166
204
|
}
|
|
167
205
|
};
|
|
168
206
|
this._handleCellHoverChange = (vect, state) => {
|
|
169
|
-
var _a, _b;
|
|
170
207
|
if (this._isInteractionLocked()) {
|
|
171
|
-
|
|
208
|
+
this.props.onAnimationEnd?.();
|
|
172
209
|
return;
|
|
173
210
|
}
|
|
174
211
|
const hoverMap = this.state.hoverMap;
|
|
@@ -177,16 +214,16 @@ class CubeNavigationAid extends React.Component {
|
|
|
177
214
|
};
|
|
178
215
|
this._isInteractionLocked = () => {
|
|
179
216
|
// Locked by markup
|
|
180
|
-
if (undefined !== this.props.viewport &&
|
|
217
|
+
if (undefined !== this.props.viewport &&
|
|
218
|
+
this.props.viewport === core_frontend_1.IModelApp.toolAdmin.markupView) {
|
|
181
219
|
return true;
|
|
182
220
|
}
|
|
183
221
|
return false;
|
|
184
222
|
};
|
|
185
223
|
this._onArrowClick = (arrow) => {
|
|
186
|
-
var _a, _b;
|
|
187
224
|
if (this._isInteractionLocked()) {
|
|
188
225
|
// istanbul ignore next
|
|
189
|
-
|
|
226
|
+
this.props.onAnimationEnd?.();
|
|
190
227
|
return;
|
|
191
228
|
}
|
|
192
229
|
const { newRotation, face } = this.getArrowRotationAndFace(arrow);
|
|
@@ -194,9 +231,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
194
231
|
};
|
|
195
232
|
this._lastClientXY = core_geometry_1.Vector2d.createZero();
|
|
196
233
|
this._handleBoxMouseDown = (event) => {
|
|
197
|
-
var _a, _b;
|
|
198
234
|
if (this._isInteractionLocked()) {
|
|
199
|
-
|
|
235
|
+
this.props.onAnimationEnd?.();
|
|
200
236
|
return;
|
|
201
237
|
}
|
|
202
238
|
event.preventDefault();
|
|
@@ -221,9 +257,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
221
257
|
};
|
|
222
258
|
// istanbul ignore next - unable to test touch
|
|
223
259
|
this._handleBoxTouchStart = (event) => {
|
|
224
|
-
var _a, _b;
|
|
225
260
|
if (this._isInteractionLocked()) {
|
|
226
|
-
|
|
261
|
+
this.props.onAnimationEnd?.();
|
|
227
262
|
return;
|
|
228
263
|
}
|
|
229
264
|
if (1 !== event.targetTouches.length)
|
|
@@ -252,9 +287,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
252
287
|
window.removeEventListener("touchend", this._onTouchEnd);
|
|
253
288
|
};
|
|
254
289
|
this._handleFaceCellClick = (pos, face) => {
|
|
255
|
-
var _a, _b;
|
|
256
290
|
if (this._isInteractionLocked()) {
|
|
257
|
-
|
|
291
|
+
this.props.onAnimationEnd?.();
|
|
258
292
|
return;
|
|
259
293
|
}
|
|
260
294
|
const { endRotMatrix } = this.state;
|
|
@@ -262,13 +296,14 @@ class CubeNavigationAid extends React.Component {
|
|
|
262
296
|
// istanbul ignore else
|
|
263
297
|
if (rotMatrix) {
|
|
264
298
|
// if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom
|
|
265
|
-
if (!CubeNavigationAid._isMatrixFace(endRotMatrix) &&
|
|
299
|
+
if (!CubeNavigationAid._isMatrixFace(endRotMatrix) &&
|
|
300
|
+
(face === Cube_1.Face.Top || face === Cube_1.Face.Bottom)) {
|
|
266
301
|
const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();
|
|
267
302
|
// istanbul ignore else
|
|
268
303
|
if (angleAxis.ok) {
|
|
269
304
|
const xAx = endRotMatrix.columnX();
|
|
270
305
|
const a = Math.atan2(xAx.y, xAx.x);
|
|
271
|
-
const r = Math.round(a * 2 / Math.PI) * Math.PI / 2; // round to quarter turn intervals
|
|
306
|
+
const r = (Math.round((a * 2) / Math.PI) * Math.PI) / 2; // round to quarter turn intervals
|
|
272
307
|
const rot = core_geometry_1.Matrix3d.createRotationAroundAxisIndex(core_geometry_1.AxisIndex.Z, core_geometry_1.Angle.createRadians(r));
|
|
273
308
|
rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);
|
|
274
309
|
}
|
|
@@ -283,7 +318,8 @@ class CubeNavigationAid extends React.Component {
|
|
|
283
318
|
// set animation variables, let css transitions animate it.
|
|
284
319
|
this._animationFrame = setTimeout(this._animation, 16.667);
|
|
285
320
|
this.setState((prevState) => ({
|
|
286
|
-
startRotMatrix: prevState.endRotMatrix,
|
|
321
|
+
startRotMatrix: prevState.endRotMatrix,
|
|
322
|
+
endRotMatrix,
|
|
287
323
|
animation: 0,
|
|
288
324
|
face,
|
|
289
325
|
}));
|
|
@@ -306,7 +342,11 @@ class CubeNavigationAid extends React.Component {
|
|
|
306
342
|
// set initial rotation
|
|
307
343
|
if (this.props.viewport) {
|
|
308
344
|
const newMatrix = this.props.viewport.view.getRotation().clone();
|
|
309
|
-
this.setState({
|
|
345
|
+
this.setState({
|
|
346
|
+
startRotMatrix: newMatrix,
|
|
347
|
+
endRotMatrix: newMatrix,
|
|
348
|
+
animation: 1,
|
|
349
|
+
});
|
|
310
350
|
}
|
|
311
351
|
}
|
|
312
352
|
/** @internal */
|
|
@@ -327,8 +367,7 @@ class CubeNavigationAid extends React.Component {
|
|
|
327
367
|
if (this._labels.hasOwnProperty(key)) {
|
|
328
368
|
const f = key;
|
|
329
369
|
const label = this._labels[f];
|
|
330
|
-
faces[f] =
|
|
331
|
-
React.createElement(NavCubeFace, { face: f, label: label, hoverMap: this.state.hoverMap, onFaceCellClick: this._handleFaceCellClick, onFaceCellHoverChange: this._handleCellHoverChange });
|
|
370
|
+
faces[f] = (React.createElement(NavCubeFace, { face: f, label: label, hoverMap: this.state.hoverMap, onFaceCellClick: this._handleFaceCellClick, onFaceCellHoverChange: this._handleCellHoverChange }));
|
|
332
371
|
}
|
|
333
372
|
}
|
|
334
373
|
const cubeClassNames = (0, classnames_1.default)("nav-cube", this.state.dragging && "cube-dragging");
|
|
@@ -438,7 +477,9 @@ class CubeNavigationAid extends React.Component {
|
|
|
438
477
|
const pitch = core_geometry_1.Angle.createRadians(diff.y);
|
|
439
478
|
const matX = core_geometry_1.Matrix3d.createRotationAroundAxisIndex(core_geometry_1.AxisIndex.X, pitch);
|
|
440
479
|
const matZ = core_geometry_1.Matrix3d.createRotationAroundAxisIndex(core_geometry_1.AxisIndex.Z, yaw);
|
|
441
|
-
const mat = matX
|
|
480
|
+
const mat = matX
|
|
481
|
+
.multiplyMatrixMatrix(this.state.startRotMatrix)
|
|
482
|
+
.multiplyMatrixMatrix(matZ);
|
|
442
483
|
this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));
|
|
443
484
|
if (!this.state.dragging)
|
|
444
485
|
this.setState({ dragging: true });
|
|
@@ -446,7 +487,7 @@ class CubeNavigationAid extends React.Component {
|
|
|
446
487
|
this._lastClientXY = mousePos;
|
|
447
488
|
}
|
|
448
489
|
}
|
|
449
|
-
CubeNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
490
|
+
CubeNavigationAid._animationFn = (t) => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
|
|
450
491
|
CubeNavigationAid._isMatrixFace = (matrix) => {
|
|
451
492
|
let sum = 0;
|
|
452
493
|
for (const coff of matrix.coffs) {
|
|
@@ -467,8 +508,10 @@ CubeNavigationAid._getMatrixFace = (rotMatrix) => {
|
|
|
467
508
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Top].coffs[8])
|
|
468
509
|
return Cube_1.Face.Top;
|
|
469
510
|
// istanbul ignore else
|
|
470
|
-
if (rotMatrix.coffs[6] ===
|
|
471
|
-
|
|
511
|
+
if (rotMatrix.coffs[6] ===
|
|
512
|
+
cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[6] &&
|
|
513
|
+
rotMatrix.coffs[7] ===
|
|
514
|
+
cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[7] &&
|
|
472
515
|
rotMatrix.coffs[8] === cubeNavigationFaceRotations[Cube_1.Face.Bottom].coffs[8])
|
|
473
516
|
return Cube_1.Face.Bottom;
|
|
474
517
|
// istanbul ignore else
|
|
@@ -519,7 +562,9 @@ exports.CubeNavigationAid = CubeNavigationAid;
|
|
|
519
562
|
class NavCubeFace extends React.Component {
|
|
520
563
|
includeCell(vector) {
|
|
521
564
|
const { x, y, z } = vector;
|
|
522
|
-
const omittedCell = (y === 0 && x !== 0 && z !== 0) ||
|
|
565
|
+
const omittedCell = (y === 0 && x !== 0 && z !== 0) ||
|
|
566
|
+
(y !== 0 && x === 0 && z !== 0) ||
|
|
567
|
+
(y !== 0 && x !== 0 && z === 0);
|
|
523
568
|
return !omittedCell;
|
|
524
569
|
}
|
|
525
570
|
render() {
|
|
@@ -529,8 +574,7 @@ class NavCubeFace extends React.Component {
|
|
|
529
574
|
const vector = NavCubeFace.faceCellToPos(face, x, y);
|
|
530
575
|
if (this.includeCell(vector)) {
|
|
531
576
|
// return a fully functional cell
|
|
532
|
-
return (React.createElement(FaceCell, { key: x, onFaceCellHoverChange: onFaceCellHoverChange, onFaceCellClick: onFaceCellClick, hoverMap: hoverMap, vector: vector, face: face, center: x === 0 }, x === 0 && y === 0 &&
|
|
533
|
-
label));
|
|
577
|
+
return (React.createElement(FaceCell, { key: x, onFaceCellHoverChange: onFaceCellHoverChange, onFaceCellClick: onFaceCellClick, hoverMap: hoverMap, vector: vector, face: face, center: x === 0 }, x === 0 && y === 0 && label));
|
|
534
578
|
}
|
|
535
579
|
else {
|
|
536
580
|
// return a placeholder cell
|
|
@@ -544,9 +588,13 @@ NavCubeFace.faceCellToPos = (face, x, y) => {
|
|
|
544
588
|
const faceVect = cubeNavigationFaceLocs[face];
|
|
545
589
|
const route = cubeNavigationRoutes[face];
|
|
546
590
|
const faceX = x < 0 ? route.left : x > 0 ? route.right : Cube_1.Face.None;
|
|
547
|
-
const xVect = faceX !== Cube_1.Face.None
|
|
591
|
+
const xVect = faceX !== Cube_1.Face.None
|
|
592
|
+
? cubeNavigationFaceLocs[faceX]
|
|
593
|
+
: core_geometry_1.Vector3d.createZero();
|
|
548
594
|
const faceY = y < 0 ? route.up : y > 0 ? route.down : Cube_1.Face.None;
|
|
549
|
-
const yVect = faceY !== Cube_1.Face.None
|
|
595
|
+
const yVect = faceY !== Cube_1.Face.None
|
|
596
|
+
? cubeNavigationFaceLocs[faceY]
|
|
597
|
+
: core_geometry_1.Vector3d.createZero();
|
|
550
598
|
return faceVect.plus(xVect).plus(yVect);
|
|
551
599
|
};
|
|
552
600
|
exports.NavCubeFace = NavCubeFace;
|
|
@@ -554,7 +602,7 @@ class FaceRow extends React.Component {
|
|
|
554
602
|
render() {
|
|
555
603
|
const { center, children, ...props } = this.props;
|
|
556
604
|
const classNames = (0, classnames_1.default)("face-row", center && "cube-center");
|
|
557
|
-
return React.createElement("div", { className: classNames, ...props }, children);
|
|
605
|
+
return (React.createElement("div", { className: classNames, ...props }, children));
|
|
558
606
|
}
|
|
559
607
|
}
|
|
560
608
|
/** @internal */
|
|
@@ -563,11 +611,13 @@ class FaceCell extends React.Component {
|
|
|
563
611
|
super(...arguments);
|
|
564
612
|
this._handleMouseOver = () => {
|
|
565
613
|
const { vector } = this.props;
|
|
566
|
-
this.props.onFaceCellHoverChange &&
|
|
614
|
+
this.props.onFaceCellHoverChange &&
|
|
615
|
+
this.props.onFaceCellHoverChange(vector, CubeHover.Hover);
|
|
567
616
|
};
|
|
568
617
|
this._handleMouseOut = () => {
|
|
569
618
|
const { vector } = this.props;
|
|
570
|
-
this.props.onFaceCellHoverChange &&
|
|
619
|
+
this.props.onFaceCellHoverChange &&
|
|
620
|
+
this.props.onFaceCellHoverChange(vector, CubeHover.None);
|
|
571
621
|
};
|
|
572
622
|
this._handleMouseDown = (event) => {
|
|
573
623
|
const { clientX, clientY } = event;
|
|
@@ -579,35 +629,39 @@ class FaceCell extends React.Component {
|
|
|
579
629
|
};
|
|
580
630
|
this._handleTouchStart = (event) => {
|
|
581
631
|
event.preventDefault();
|
|
582
|
-
event.targetTouches.length === 1 &&
|
|
632
|
+
event.targetTouches.length === 1 &&
|
|
633
|
+
this.handlePointerDown(event.targetTouches[0].clientX, event.targetTouches[0].clientY);
|
|
583
634
|
};
|
|
584
635
|
this._handleTouchEnd = (event) => {
|
|
585
636
|
event.preventDefault();
|
|
586
|
-
event.changedTouches.length === 1 &&
|
|
637
|
+
event.changedTouches.length === 1 &&
|
|
638
|
+
this.handlePointerUp(event.changedTouches[0].clientX, event.changedTouches[0].clientY);
|
|
587
639
|
};
|
|
588
640
|
}
|
|
589
641
|
render() {
|
|
590
|
-
const { center, children, onFaceCellClick, onFaceCellHoverChange, hoverMap, face, vector, ...props } = this.props;
|
|
642
|
+
const { center, children, onFaceCellClick, onFaceCellHoverChange, hoverMap, face, vector, ...props } = this.props;
|
|
591
643
|
const { x, y, z } = vector;
|
|
592
644
|
const n = `${x}-${y}-${z}`;
|
|
593
645
|
const hover = hoverMap && hoverMap[n] === CubeHover.Hover;
|
|
594
646
|
const active = hoverMap && hoverMap[n] === CubeHover.Active;
|
|
595
647
|
const classNames = (0, classnames_1.default)("face-cell", center && "cube-center", hover && "cube-hover", active && "cube-active");
|
|
596
|
-
|
|
597
|
-
return React.createElement("div", { onMouseDown: this._handleMouseDown, onMouseUp: this._handleMouseUp, onMouseOver: this._handleMouseOver, onMouseOut: this._handleMouseOut, onTouchStart: this._handleTouchStart, onTouchEnd: this._handleTouchEnd, "data-testid": `nav-cube-face-cell-${face}-${n}`, className: classNames, role: "presentation", ...props }, children);
|
|
648
|
+
return (React.createElement("div", { onMouseDown: this._handleMouseDown, onMouseUp: this._handleMouseUp, onMouseOver: this._handleMouseOver, onMouseOut: this._handleMouseOut, onTouchStart: this._handleTouchStart, onTouchEnd: this._handleTouchEnd, "data-testid": `nav-cube-face-cell-${face}-${n}`, className: classNames, role: "presentation", ...props }, children));
|
|
598
649
|
}
|
|
599
650
|
handlePointerDown(x, y) {
|
|
600
651
|
const { vector } = this.props;
|
|
601
652
|
this._startMouse = core_geometry_1.Point2d.create(x, y);
|
|
602
|
-
this.props.onFaceCellHoverChange &&
|
|
653
|
+
this.props.onFaceCellHoverChange &&
|
|
654
|
+
this.props.onFaceCellHoverChange(vector, CubeHover.Active);
|
|
603
655
|
}
|
|
604
656
|
handlePointerUp(x, y) {
|
|
605
657
|
const { vector, face } = this.props;
|
|
606
|
-
this.props.onFaceCellHoverChange &&
|
|
658
|
+
this.props.onFaceCellHoverChange &&
|
|
659
|
+
this.props.onFaceCellHoverChange(vector, CubeHover.None);
|
|
607
660
|
const mouse = core_geometry_1.Point2d.create(x, y);
|
|
608
661
|
if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {
|
|
609
662
|
const isFace = Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;
|
|
610
|
-
this.props.onFaceCellClick &&
|
|
663
|
+
this.props.onFaceCellClick &&
|
|
664
|
+
this.props.onFaceCellClick(vector, isFace ? face : Cube_1.Face.None);
|
|
611
665
|
}
|
|
612
666
|
}
|
|
613
667
|
}
|
|
@@ -642,7 +696,7 @@ class PointerButton extends React.Component {
|
|
|
642
696
|
};
|
|
643
697
|
}
|
|
644
698
|
render() {
|
|
645
|
-
const { visible, pointerType, onArrowClick, title, ...props } = this.props;
|
|
699
|
+
const { visible, pointerType, onArrowClick, title, ...props } = this.props;
|
|
646
700
|
const classes = (0, classnames_1.default)("cube-pointer", "icon", pointerClass[pointerType], visible && "cube-visible");
|
|
647
701
|
return (
|
|
648
702
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|