@itwin/imodel-components-react 4.0.0-dev.9 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +161 -1
- package/README.md +2 -2
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +75 -79
- package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js +190 -186
- package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +112 -107
- 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 +23 -23
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +78 -74
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +143 -137
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -63
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/HueSlider.js +203 -199
- package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js +217 -213
- package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/Swatch.js +64 -60
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
- package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/cjs/imodel-components-react/editors/ColorEditor.js +155 -151
- 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 +47 -47
- package/lib/cjs/imodel-components-react/editors/WeightEditor.js +164 -160
- 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 +25 -25
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +100 -96
- package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +272 -265
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +89 -85
- 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 +60 -60
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +163 -159
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +131 -127
- 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 +154 -174
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +626 -634
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +657 -647
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +103 -99
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +56 -53
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +88 -83
- package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +89 -86
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +112 -109
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +187 -184
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +149 -145
- package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +63 -59
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +51 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +58 -54
- package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +52 -48
- package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +54 -50
- package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +62 -58
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +51 -47
- package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +60 -56
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +98 -95
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +123 -119
- package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +142 -143
- package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
- package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +85 -81
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +99 -91
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -31
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +195 -191
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -112
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +432 -424
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -356
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +58 -54
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +398 -358
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -164
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +145 -174
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
- package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +276 -274
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.d.ts +81 -82
- package/lib/cjs/imodel-components-react.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react.js +104 -101
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/UiIModelComponents.js +72 -75
- package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
- package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
- package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
- package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +83 -82
- 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 +23 -23
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
- package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +114 -112
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -63
- package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
- package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
- package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
- package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
- package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
- package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
- package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
- package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
- package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
- package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/esm/imodel-components-react/color/Swatch.scss +22 -23
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
- package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
- package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
- package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
- 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 +47 -47
- package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
- 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 +25 -25
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
- package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +243 -240
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
- package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
- 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 +60 -60
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +134 -133
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
- package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
- 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 +154 -174
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +596 -606
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +627 -620
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +29 -30
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +61 -60
- package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +62 -63
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +82 -83
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +106 -110
- package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +157 -158
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -122
- package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
- package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
- package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
- package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
- package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +68 -69
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
- package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +138 -139
- package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
- package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
- package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
- package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js +68 -64
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -31
- package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
- package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -112
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +402 -398
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -356
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
- package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +368 -332
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -164
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +145 -174
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
- package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +249 -251
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +96 -95
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +81 -82
- package/lib/esm/imodel-components-react.d.ts.map +1 -1
- package/lib/esm/imodel-components-react.js +86 -87
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +35 -37
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -146
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
|
@@ -1,76 +1,73 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Common
|
|
7
|
-
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
await UiComponents.initialize(localization);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
static get
|
|
52
|
-
return "
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
UiIModelComponents._initialized = false;
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Common
|
|
7
|
+
*/
|
|
8
|
+
import { Logger } from "@itwin/core-bentley";
|
|
9
|
+
import { IModelApp } from "@itwin/core-frontend";
|
|
10
|
+
import { getClassName } from "@itwin/appui-abstract";
|
|
11
|
+
import { UiComponents } from "@itwin/components-react";
|
|
12
|
+
import { EmptyLocalization } from "@itwin/core-common";
|
|
13
|
+
/**
|
|
14
|
+
* Manages the localization service for the imodel-components-react package.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
class UiIModelComponents {
|
|
18
|
+
/**
|
|
19
|
+
* initialize UiIModelComponents.
|
|
20
|
+
*/
|
|
21
|
+
static async initialize() {
|
|
22
|
+
if (UiIModelComponents._initialized) {
|
|
23
|
+
Logger.logInfo(UiIModelComponents.loggerCategory(UiIModelComponents), `UiIModelComponents.initialize already called`);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await IModelApp.localization?.registerNamespace(UiIModelComponents.localizationNamespace);
|
|
27
|
+
if (!IModelApp.localization) {
|
|
28
|
+
// it should only get here in unit test where IModelApp is not setup
|
|
29
|
+
const localization = new EmptyLocalization();
|
|
30
|
+
await localization.initialize();
|
|
31
|
+
await UiComponents.initialize(localization);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
await UiComponents.initialize(IModelApp.localization);
|
|
35
|
+
}
|
|
36
|
+
UiIModelComponents._initialized = true;
|
|
37
|
+
}
|
|
38
|
+
/** Unregisters the UiIModelComponents localization namespace */
|
|
39
|
+
static terminate() {
|
|
40
|
+
IModelApp.localization?.unregisterNamespace(UiIModelComponents.localizationNamespace);
|
|
41
|
+
UiComponents.terminate();
|
|
42
|
+
UiIModelComponents._initialized = false;
|
|
43
|
+
}
|
|
44
|
+
/** Determines if UiIModelComponents has been initialized */
|
|
45
|
+
static get initialized() { return UiIModelComponents._initialized; }
|
|
46
|
+
/** The internationalization service namespace. */
|
|
47
|
+
static get localizationNamespace() {
|
|
48
|
+
return "UiIModelComponents";
|
|
49
|
+
}
|
|
50
|
+
/** @internal */
|
|
51
|
+
static get packageName() {
|
|
52
|
+
return "imodel-components-react";
|
|
53
|
+
}
|
|
54
|
+
/** Calls localization.getLocalizedStringWithNamespace with the "UiIModelComponents" namespace. Do NOT include the namespace in the key.
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
static translate(key) {
|
|
58
|
+
if (!UiIModelComponents.initialized || /* istanbul ignore next */ !IModelApp.localization) {
|
|
59
|
+
Logger.logError(UiIModelComponents.loggerCategory(this), `translate: IModelApp.localization has not been setup. Returning blank string.`);
|
|
60
|
+
return "";
|
|
61
|
+
}
|
|
62
|
+
return IModelApp.localization.getLocalizedString(key, { ns: UiIModelComponents.localizationNamespace });
|
|
63
|
+
}
|
|
64
|
+
/** @internal */
|
|
65
|
+
static loggerCategory(obj) {
|
|
66
|
+
const className = getClassName(obj);
|
|
67
|
+
const category = UiIModelComponents.packageName + (className ? `.${className}` : "");
|
|
68
|
+
return category;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
UiIModelComponents._initialized = false;
|
|
72
|
+
export { UiIModelComponents };
|
|
76
73
|
//# sourceMappingURL=UiIModelComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiIModelComponents.js","sourceRoot":"","sources":["../../../src/imodel-components-react/UiIModelComponents.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"UiIModelComponents.js","sourceRoot":"","sources":["../../../src/imodel-components-react/UiIModelComponents.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAa,kBAAkB;IAG7B;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU;QAC5B,IAAI,kBAAkB,CAAC,YAAY,EAAE;YACnC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,8CAA8C,CAAC,CAAC;YACtH,OAAO;SACR;QAED,MAAM,SAAS,CAAC,YAAY,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;QAE1F,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE;YAC3B,oEAAoE;YACpE,MAAM,YAAY,GAAG,IAAI,iBAAiB,EAAE,CAAC;YAC7C,MAAM,YAAY,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;SAC7C;aAAM;YACL,MAAM,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;SACvD;QAED,kBAAkB,CAAC,YAAY,GAAG,IAAI,CAAC;IACzC,CAAC;IAED,gEAAgE;IACzD,MAAM,CAAC,SAAS;QACrB,SAAS,CAAC,YAAY,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;QACtF,YAAY,CAAC,SAAS,EAAE,CAAC;QACzB,kBAAkB,CAAC,YAAY,GAAG,KAAK,CAAC;IAC1C,CAAC;IAED,4DAA4D;IACrD,MAAM,KAAK,WAAW,KAAc,OAAO,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpF,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,kBAAkB,CAAC,WAAW,IAAI,0BAA0B,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE;YACzF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,+EAA+E,CAAC,CAAC;YAC1I,OAAO,EAAE,CAAC;SACX;QACD,OAAO,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrF,OAAO,QAAQ,CAAC;IAClB,CAAC;;AA7Dc,+BAAY,GAAG,KAAK,CAAC;SADzB,kBAAkB","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 Common\n */\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { getClassName } from \"@itwin/appui-abstract\";\nimport { UiComponents } from \"@itwin/components-react\";\nimport { EmptyLocalization } from \"@itwin/core-common\";\n\n/**\n * Manages the localization service for the imodel-components-react package.\n * @public\n */\nexport class UiIModelComponents {\n private static _initialized = false;\n\n /**\n * initialize UiIModelComponents.\n */\n public static async initialize(): Promise<void> {\n if (UiIModelComponents._initialized) {\n Logger.logInfo(UiIModelComponents.loggerCategory(UiIModelComponents), `UiIModelComponents.initialize already called`);\n return;\n }\n\n await IModelApp.localization?.registerNamespace(UiIModelComponents.localizationNamespace);\n\n if (!IModelApp.localization) {\n // it should only get here in unit test where IModelApp is not setup\n const localization = new EmptyLocalization();\n await localization.initialize();\n await UiComponents.initialize(localization);\n } else {\n await UiComponents.initialize(IModelApp.localization);\n }\n\n UiIModelComponents._initialized = true;\n }\n\n /** Unregisters the UiIModelComponents localization namespace */\n public static terminate() {\n IModelApp.localization?.unregisterNamespace(UiIModelComponents.localizationNamespace);\n UiComponents.terminate();\n UiIModelComponents._initialized = false;\n }\n\n /** Determines if UiIModelComponents has been initialized */\n public static get initialized(): boolean { return UiIModelComponents._initialized; }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiIModelComponents\";\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"imodel-components-react\";\n }\n\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiIModelComponents\" namespace. Do NOT include the namespace in the key.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiIModelComponents.initialized || /* istanbul ignore next */ !IModelApp.localization) {\n Logger.logError(UiIModelComponents.loggerCategory(this), `translate: IModelApp.localization has not been setup. Returning blank string.`);\n return \"\";\n }\n return IModelApp.localization.getLocalizedString(key, { ns: UiIModelComponents.localizationNamespace });\n }\n\n /** @internal */\n public static loggerCategory(obj: any): string {\n const className = getClassName(obj);\n const category = UiIModelComponents.packageName + (className ? `.${className}` : \"\");\n return category;\n }\n\n}\n"]}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Color
|
|
3
|
-
*/
|
|
4
|
-
import "./AlphaSlider.scss";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { CommonProps } from "@itwin/core-react";
|
|
7
|
-
/** Properties for the [[AlphaSlider]] React component
|
|
8
|
-
* @
|
|
9
|
-
*/
|
|
10
|
-
export interface AlphaSliderProps extends React.HTMLAttributes<HTMLDivElement>, CommonProps {
|
|
11
|
-
/** true if slider is oriented horizontal, else vertical orientation is assumed */
|
|
12
|
-
isHorizontal?: boolean;
|
|
13
|
-
/** function to run when user selects color swatch */
|
|
14
|
-
onAlphaChange?: ((alpha: number) => void) | undefined;
|
|
15
|
-
/** Alpha value between 0 (transparent) and 1 (opaque) */
|
|
16
|
-
alpha: number;
|
|
17
|
-
}
|
|
18
|
-
/** AlphaSlider component used to set the alpha value.
|
|
19
|
-
* @
|
|
20
|
-
*/
|
|
21
|
-
export declare class AlphaSlider extends React.PureComponent<AlphaSliderProps> {
|
|
22
|
-
private _container;
|
|
23
|
-
private _transparencyLabel;
|
|
24
|
-
/** @internal */
|
|
25
|
-
constructor(props: AlphaSliderProps);
|
|
26
|
-
private _calculateChange;
|
|
27
|
-
/** @internal */
|
|
28
|
-
componentWillUnmount(): void;
|
|
29
|
-
private _onChange;
|
|
30
|
-
private _onMouseDown;
|
|
31
|
-
private _onKeyDown;
|
|
32
|
-
private _onMouseUp;
|
|
33
|
-
private _unbindEventListeners;
|
|
34
|
-
/** @internal */
|
|
35
|
-
render(): React.ReactNode;
|
|
36
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Color
|
|
3
|
+
*/
|
|
4
|
+
import "./AlphaSlider.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { CommonProps } from "@itwin/core-react";
|
|
7
|
+
/** Properties for the [[AlphaSlider]] React component
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface AlphaSliderProps extends React.HTMLAttributes<HTMLDivElement>, CommonProps {
|
|
11
|
+
/** true if slider is oriented horizontal, else vertical orientation is assumed */
|
|
12
|
+
isHorizontal?: boolean;
|
|
13
|
+
/** function to run when user selects color swatch */
|
|
14
|
+
onAlphaChange?: ((alpha: number) => void) | undefined;
|
|
15
|
+
/** Alpha value between 0 (transparent) and 1 (opaque) */
|
|
16
|
+
alpha: number;
|
|
17
|
+
}
|
|
18
|
+
/** AlphaSlider component used to set the alpha value.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare class AlphaSlider extends React.PureComponent<AlphaSliderProps> {
|
|
22
|
+
private _container;
|
|
23
|
+
private _transparencyLabel;
|
|
24
|
+
/** @internal */
|
|
25
|
+
constructor(props: AlphaSliderProps);
|
|
26
|
+
private _calculateChange;
|
|
27
|
+
/** @internal */
|
|
28
|
+
componentWillUnmount(): void;
|
|
29
|
+
private _onChange;
|
|
30
|
+
private _onMouseDown;
|
|
31
|
+
private _onKeyDown;
|
|
32
|
+
private _onMouseUp;
|
|
33
|
+
private _unbindEventListeners;
|
|
34
|
+
/** @internal */
|
|
35
|
+
render(): React.ReactNode;
|
|
36
|
+
}
|
|
37
37
|
//# sourceMappingURL=AlphaSlider.d.ts.map
|
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Color
|
|
7
|
-
*/
|
|
8
|
-
import "./AlphaSlider.scss";
|
|
9
|
-
import classnames from "classnames";
|
|
10
|
-
import * as React from "react";
|
|
11
|
-
import { UiIModelComponents } from "../UiIModelComponents";
|
|
12
|
-
import { SpecialKey } from "@itwin/appui-abstract";
|
|
13
|
-
/** AlphaSlider component used to set the alpha value.
|
|
14
|
-
* @
|
|
15
|
-
*/
|
|
16
|
-
export class AlphaSlider extends React.PureComponent {
|
|
17
|
-
/** @internal */
|
|
18
|
-
constructor(props) {
|
|
19
|
-
super(props);
|
|
20
|
-
this._container = null;
|
|
21
|
-
this._transparencyLabel = UiIModelComponents.translate("color.transparency");
|
|
22
|
-
this._calculateChange = (e, isHorizontal, alpha, container) => {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
const { width: containerWidth, height: containerHeight } = container.getBoundingClientRect();
|
|
25
|
-
let x = 0;
|
|
26
|
-
if ("pageX" in e) {
|
|
27
|
-
x = e.pageX;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// istanbul ignore if
|
|
31
|
-
if (undefined === e.touches)
|
|
32
|
-
return undefined;
|
|
33
|
-
x = e.touches[0].pageX;
|
|
34
|
-
}
|
|
35
|
-
// istanbul ignore if
|
|
36
|
-
if (undefined === x)
|
|
37
|
-
return undefined;
|
|
38
|
-
let y = 0;
|
|
39
|
-
if ("pageY" in e) {
|
|
40
|
-
y = e.pageY;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
// istanbul ignore if
|
|
44
|
-
if (undefined === e.touches)
|
|
45
|
-
return;
|
|
46
|
-
y = e.touches[0].pageY;
|
|
47
|
-
}
|
|
48
|
-
// istanbul ignore if
|
|
49
|
-
if (undefined === y)
|
|
50
|
-
return undefined;
|
|
51
|
-
const left = x - (container.getBoundingClientRect().left + window.scrollX);
|
|
52
|
-
const top = y - (container.getBoundingClientRect().top + window.scrollY);
|
|
53
|
-
let t = 0;
|
|
54
|
-
if (!isHorizontal) {
|
|
55
|
-
// istanbul ignore next
|
|
56
|
-
if (top < 0) {
|
|
57
|
-
t = 1;
|
|
58
|
-
}
|
|
59
|
-
else if (top > containerHeight) {
|
|
60
|
-
t = 0;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
t = 1 - (top / containerHeight);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else { // horizontal
|
|
67
|
-
// istanbul ignore next
|
|
68
|
-
if (left < 0) {
|
|
69
|
-
t = 0;
|
|
70
|
-
}
|
|
71
|
-
else if (left > containerWidth) {
|
|
72
|
-
t = 1;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
t = left / containerWidth;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// istanbul ignore if
|
|
79
|
-
if (t < 0)
|
|
80
|
-
t = 0;
|
|
81
|
-
// istanbul ignore if
|
|
82
|
-
if (t > 1)
|
|
83
|
-
t = 1;
|
|
84
|
-
// istanbul ignore next
|
|
85
|
-
return (alpha !== t) ? t : undefined;
|
|
86
|
-
};
|
|
87
|
-
this._onChange = (e) => {
|
|
88
|
-
// istanbul ignore else
|
|
89
|
-
if (this._container && this.props.onAlphaChange) {
|
|
90
|
-
const change = this._calculateChange(e, this.props.isHorizontal ? this.props.isHorizontal : false, this.props.alpha, this._container);
|
|
91
|
-
undefined !== change && typeof this.props.onAlphaChange === "function" && this.props.onAlphaChange(change);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
this._onMouseDown = (e) => {
|
|
95
|
-
this._onChange(e);
|
|
96
|
-
// istanbul ignore else
|
|
97
|
-
if (this._container)
|
|
98
|
-
this._container.focus();
|
|
99
|
-
window.addEventListener("mousemove", this._onChange);
|
|
100
|
-
window.addEventListener("mouseup", this._onMouseUp);
|
|
101
|
-
};
|
|
102
|
-
this._onKeyDown = (evt) => {
|
|
103
|
-
let newTransparency;
|
|
104
|
-
if (evt.key === SpecialKey.ArrowLeft || evt.key === SpecialKey.ArrowDown) {
|
|
105
|
-
newTransparency = this.props.alpha - (evt.ctrlKey ? .1 : .05);
|
|
106
|
-
}
|
|
107
|
-
else if (evt.key === SpecialKey.ArrowRight || evt.key === SpecialKey.ArrowUp) {
|
|
108
|
-
newTransparency = this.props.alpha + (evt.ctrlKey ? .1 : .05);
|
|
109
|
-
}
|
|
110
|
-
else if (evt.key === SpecialKey.PageDown) {
|
|
111
|
-
newTransparency = this.props.alpha - (evt.ctrlKey ? .5 : .25);
|
|
112
|
-
}
|
|
113
|
-
else if (evt.key === SpecialKey.PageUp) {
|
|
114
|
-
newTransparency = this.props.alpha + (evt.ctrlKey ? .5 : .25);
|
|
115
|
-
}
|
|
116
|
-
else if (evt.key === SpecialKey.Home) {
|
|
117
|
-
newTransparency = 0;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
// istanbul ignore else
|
|
121
|
-
if (evt.key === SpecialKey.End) {
|
|
122
|
-
newTransparency = 1;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// istanbul ignore else
|
|
126
|
-
if (undefined !== newTransparency) {
|
|
127
|
-
// istanbul ignore if
|
|
128
|
-
if (newTransparency > 1)
|
|
129
|
-
newTransparency = 1;
|
|
130
|
-
// istanbul ignore if
|
|
131
|
-
if (newTransparency < 0)
|
|
132
|
-
newTransparency = 0;
|
|
133
|
-
// istanbul ignore else
|
|
134
|
-
if (this.props.onAlphaChange)
|
|
135
|
-
this.props.onAlphaChange(newTransparency);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
this._onMouseUp = () => {
|
|
139
|
-
this._unbindEventListeners();
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
/** @internal */
|
|
143
|
-
componentWillUnmount() {
|
|
144
|
-
this._unbindEventListeners();
|
|
145
|
-
}
|
|
146
|
-
_unbindEventListeners() {
|
|
147
|
-
window.removeEventListener("mousemove", this._onChange);
|
|
148
|
-
window.removeEventListener("mouseup", this._onMouseUp);
|
|
149
|
-
}
|
|
150
|
-
/** @internal */
|
|
151
|
-
render() {
|
|
152
|
-
const containerClasses = classnames(this.props.isHorizontal ? "components-alpha-container-horizontal" : "components-alpha-container-vertical", this.props.className);
|
|
153
|
-
const pointerStyle = this.props.isHorizontal ?
|
|
154
|
-
{ left: `${(this.props.alpha * 100)}%` } :
|
|
155
|
-
{ left: `0px`, top: `${-(this.props.alpha * 100) + 100}%` };
|
|
156
|
-
return (React.createElement("div", { className: containerClasses, style: this.props.style, "data-testid": "alpha-container" },
|
|
157
|
-
React.createElement("div", { "data-testid": "alpha-slider", role: "slider", "aria-label": this._transparencyLabel, "aria-valuemin": 0, "aria-valuemax": 1, "aria-valuenow": this.props.alpha, className: "components-alpha-slider", ref: (container) => this._container = container, onMouseDown: this._onMouseDown, onTouchMove: this._onChange, onTouchStart: this._onChange, tabIndex: 0, onKeyDown: this._onKeyDown },
|
|
158
|
-
React.createElement("div", { style: pointerStyle, className: "components-alpha-pointer", "data-testid": "alpha-pointer" }))));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Color
|
|
7
|
+
*/
|
|
8
|
+
import "./AlphaSlider.scss";
|
|
9
|
+
import classnames from "classnames";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { UiIModelComponents } from "../UiIModelComponents";
|
|
12
|
+
import { SpecialKey } from "@itwin/appui-abstract";
|
|
13
|
+
/** AlphaSlider component used to set the alpha value.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export class AlphaSlider extends React.PureComponent {
|
|
17
|
+
/** @internal */
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
this._container = null;
|
|
21
|
+
this._transparencyLabel = UiIModelComponents.translate("color.transparency");
|
|
22
|
+
this._calculateChange = (e, isHorizontal, alpha, container) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const { width: containerWidth, height: containerHeight } = container.getBoundingClientRect();
|
|
25
|
+
let x = 0;
|
|
26
|
+
if ("pageX" in e) {
|
|
27
|
+
x = e.pageX;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// istanbul ignore if
|
|
31
|
+
if (undefined === e.touches)
|
|
32
|
+
return undefined;
|
|
33
|
+
x = e.touches[0].pageX;
|
|
34
|
+
}
|
|
35
|
+
// istanbul ignore if
|
|
36
|
+
if (undefined === x)
|
|
37
|
+
return undefined;
|
|
38
|
+
let y = 0;
|
|
39
|
+
if ("pageY" in e) {
|
|
40
|
+
y = e.pageY;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
// istanbul ignore if
|
|
44
|
+
if (undefined === e.touches)
|
|
45
|
+
return;
|
|
46
|
+
y = e.touches[0].pageY;
|
|
47
|
+
}
|
|
48
|
+
// istanbul ignore if
|
|
49
|
+
if (undefined === y)
|
|
50
|
+
return undefined;
|
|
51
|
+
const left = x - (container.getBoundingClientRect().left + window.scrollX);
|
|
52
|
+
const top = y - (container.getBoundingClientRect().top + window.scrollY);
|
|
53
|
+
let t = 0;
|
|
54
|
+
if (!isHorizontal) {
|
|
55
|
+
// istanbul ignore next
|
|
56
|
+
if (top < 0) {
|
|
57
|
+
t = 1;
|
|
58
|
+
}
|
|
59
|
+
else if (top > containerHeight) {
|
|
60
|
+
t = 0;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
t = 1 - (top / containerHeight);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else { // horizontal
|
|
67
|
+
// istanbul ignore next
|
|
68
|
+
if (left < 0) {
|
|
69
|
+
t = 0;
|
|
70
|
+
}
|
|
71
|
+
else if (left > containerWidth) {
|
|
72
|
+
t = 1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
t = left / containerWidth;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// istanbul ignore if
|
|
79
|
+
if (t < 0)
|
|
80
|
+
t = 0;
|
|
81
|
+
// istanbul ignore if
|
|
82
|
+
if (t > 1)
|
|
83
|
+
t = 1;
|
|
84
|
+
// istanbul ignore next
|
|
85
|
+
return (alpha !== t) ? t : undefined;
|
|
86
|
+
};
|
|
87
|
+
this._onChange = (e) => {
|
|
88
|
+
// istanbul ignore else
|
|
89
|
+
if (this._container && this.props.onAlphaChange) {
|
|
90
|
+
const change = this._calculateChange(e, this.props.isHorizontal ? this.props.isHorizontal : false, this.props.alpha, this._container);
|
|
91
|
+
undefined !== change && typeof this.props.onAlphaChange === "function" && this.props.onAlphaChange(change);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
this._onMouseDown = (e) => {
|
|
95
|
+
this._onChange(e);
|
|
96
|
+
// istanbul ignore else
|
|
97
|
+
if (this._container)
|
|
98
|
+
this._container.focus();
|
|
99
|
+
window.addEventListener("mousemove", this._onChange);
|
|
100
|
+
window.addEventListener("mouseup", this._onMouseUp);
|
|
101
|
+
};
|
|
102
|
+
this._onKeyDown = (evt) => {
|
|
103
|
+
let newTransparency;
|
|
104
|
+
if (evt.key === SpecialKey.ArrowLeft || evt.key === SpecialKey.ArrowDown) {
|
|
105
|
+
newTransparency = this.props.alpha - (evt.ctrlKey ? .1 : .05);
|
|
106
|
+
}
|
|
107
|
+
else if (evt.key === SpecialKey.ArrowRight || evt.key === SpecialKey.ArrowUp) {
|
|
108
|
+
newTransparency = this.props.alpha + (evt.ctrlKey ? .1 : .05);
|
|
109
|
+
}
|
|
110
|
+
else if (evt.key === SpecialKey.PageDown) {
|
|
111
|
+
newTransparency = this.props.alpha - (evt.ctrlKey ? .5 : .25);
|
|
112
|
+
}
|
|
113
|
+
else if (evt.key === SpecialKey.PageUp) {
|
|
114
|
+
newTransparency = this.props.alpha + (evt.ctrlKey ? .5 : .25);
|
|
115
|
+
}
|
|
116
|
+
else if (evt.key === SpecialKey.Home) {
|
|
117
|
+
newTransparency = 0;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
// istanbul ignore else
|
|
121
|
+
if (evt.key === SpecialKey.End) {
|
|
122
|
+
newTransparency = 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// istanbul ignore else
|
|
126
|
+
if (undefined !== newTransparency) {
|
|
127
|
+
// istanbul ignore if
|
|
128
|
+
if (newTransparency > 1)
|
|
129
|
+
newTransparency = 1;
|
|
130
|
+
// istanbul ignore if
|
|
131
|
+
if (newTransparency < 0)
|
|
132
|
+
newTransparency = 0;
|
|
133
|
+
// istanbul ignore else
|
|
134
|
+
if (this.props.onAlphaChange)
|
|
135
|
+
this.props.onAlphaChange(newTransparency);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
this._onMouseUp = () => {
|
|
139
|
+
this._unbindEventListeners();
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/** @internal */
|
|
143
|
+
componentWillUnmount() {
|
|
144
|
+
this._unbindEventListeners();
|
|
145
|
+
}
|
|
146
|
+
_unbindEventListeners() {
|
|
147
|
+
window.removeEventListener("mousemove", this._onChange);
|
|
148
|
+
window.removeEventListener("mouseup", this._onMouseUp);
|
|
149
|
+
}
|
|
150
|
+
/** @internal */
|
|
151
|
+
render() {
|
|
152
|
+
const containerClasses = classnames(this.props.isHorizontal ? "components-alpha-container-horizontal" : "components-alpha-container-vertical", this.props.className);
|
|
153
|
+
const pointerStyle = this.props.isHorizontal ?
|
|
154
|
+
{ left: `${(this.props.alpha * 100)}%` } :
|
|
155
|
+
{ left: `0px`, top: `${-(this.props.alpha * 100) + 100}%` };
|
|
156
|
+
return (React.createElement("div", { className: containerClasses, style: this.props.style, "data-testid": "alpha-container" },
|
|
157
|
+
React.createElement("div", { "data-testid": "alpha-slider", role: "slider", "aria-label": this._transparencyLabel, "aria-valuemin": 0, "aria-valuemax": 1, "aria-valuenow": this.props.alpha, className: "components-alpha-slider", ref: (container) => this._container = container, onMouseDown: this._onMouseDown, onTouchMove: this._onChange, onTouchStart: this._onChange, tabIndex: 0, onKeyDown: this._onKeyDown },
|
|
158
|
+
React.createElement("div", { style: pointerStyle, className: "components-alpha-pointer", "data-testid": "alpha-pointer" }))));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
161
|
//# sourceMappingURL=AlphaSlider.js.map
|