@itwin/imodel-components-react 3.5.0-dev.16 → 3.5.0-dev.19
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 +6 -1
- package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
- package/lib/cjs/imodel-components-react/UiIModelComponents.js +79 -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 +186 -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.js +107 -107
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +91 -91
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +74 -74
- package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +145 -145
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +93 -93
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +137 -137
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +64 -64
- package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
- package/lib/cjs/imodel-components-react/color/HueSlider.js +199 -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 +213 -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 +60 -60
- package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/Swatch.scss +23 -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 +151 -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 +160 -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 +96 -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.js +265 -265
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
- package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
- package/lib/cjs/imodel-components-react/lineweight/Swatch.js +85 -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 +159 -159
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
- package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
- package/lib/cjs/imodel-components-react/navigationaids/Cube.js +127 -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 +174 -174
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +634 -634
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +647 -647
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +99 -99
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +64 -64
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +53 -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.js +83 -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 +86 -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 +109 -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 +184 -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 +154 -154
- 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 +59 -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 +47 -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 +54 -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 +48 -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 +50 -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 +58 -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 +47 -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 +56 -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 +95 -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 +119 -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.js +143 -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 +81 -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.js +91 -91
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +25 -25
- package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js +191 -191
- package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +106 -106
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +424 -424
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +357 -357
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
- package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +54 -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 +133 -133
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +358 -358
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +163 -163
- package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
- 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.js +274 -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 +82 -82
- package/lib/cjs/imodel-components-react.js +101 -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.js +75 -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.js +82 -82
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +91 -91
- 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/ColorPickerPanel.d.ts +21 -21
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +93 -93
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +112 -112
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +64 -64
- 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 +23 -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.js +240 -240
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
- package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +107 -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 +133 -133
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +52 -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 +174 -174
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +606 -606
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +180 -180
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +620 -620
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
- package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +133 -133
- 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 +64 -64
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +30 -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.js +60 -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 +63 -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 +83 -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 +110 -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 +158 -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 +131 -131
- 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 +69 -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.js +139 -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.js +64 -64
- package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +25 -25
- 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 +106 -106
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +398 -398
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +357 -357
- 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 +133 -133
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +332 -332
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +163 -163
- package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
- 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.js +251 -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 +95 -95
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +82 -82
- package/lib/esm/imodel-components-react.js +87 -87
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/lib/public/locales/en/UiIModelComponents.json +139 -139
- package/package.json +19 -19
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module QuantityFormat
|
|
3
|
-
*/
|
|
4
|
-
import "./FormatPanel.scss";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { FormatProps, FormatterSpec, UnitProps, UnitsProvider } from "@itwin/core-quantity";
|
|
7
|
-
import { CommonProps } from "@itwin/core-react";
|
|
8
|
-
/** Properties of [[FormatPanel]] component.
|
|
9
|
-
* @alpha
|
|
10
|
-
*/
|
|
11
|
-
export interface FormatPanelProps extends CommonProps {
|
|
12
|
-
initialFormat: FormatProps;
|
|
13
|
-
unitsProvider: UnitsProvider;
|
|
14
|
-
persistenceUnit: Promise<UnitProps> | UnitProps;
|
|
15
|
-
showSample?: boolean;
|
|
16
|
-
initialMagnitude?: number;
|
|
17
|
-
enableMinimumProperties?: boolean;
|
|
18
|
-
onFormatChange?: (format: FormatProps) => void;
|
|
19
|
-
provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;
|
|
20
|
-
providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
|
|
21
|
-
provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
/** Component to show/edit Quantity Format.
|
|
24
|
-
* @alpha
|
|
25
|
-
*/
|
|
26
|
-
export declare function FormatPanel(props: FormatPanelProps): JSX.Element;
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module QuantityFormat
|
|
3
|
+
*/
|
|
4
|
+
import "./FormatPanel.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { FormatProps, FormatterSpec, UnitProps, UnitsProvider } from "@itwin/core-quantity";
|
|
7
|
+
import { CommonProps } from "@itwin/core-react";
|
|
8
|
+
/** Properties of [[FormatPanel]] component.
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export interface FormatPanelProps extends CommonProps {
|
|
12
|
+
initialFormat: FormatProps;
|
|
13
|
+
unitsProvider: UnitsProvider;
|
|
14
|
+
persistenceUnit: Promise<UnitProps> | UnitProps;
|
|
15
|
+
showSample?: boolean;
|
|
16
|
+
initialMagnitude?: number;
|
|
17
|
+
enableMinimumProperties?: boolean;
|
|
18
|
+
onFormatChange?: (format: FormatProps) => void;
|
|
19
|
+
provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;
|
|
20
|
+
providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
|
|
21
|
+
provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/** Component to show/edit Quantity Format.
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
export declare function FormatPanel(props: FormatPanelProps): JSX.Element;
|
|
27
27
|
//# sourceMappingURL=FormatPanel.d.ts.map
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module QuantityFormat
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.FormatPanel = void 0;
|
|
30
|
-
require("./FormatPanel.scss");
|
|
31
|
-
const React = __importStar(require("react"));
|
|
32
|
-
const core_quantity_1 = require("@itwin/core-quantity");
|
|
33
|
-
const FormatPrecision_1 = require("./FormatPrecision");
|
|
34
|
-
const FormatSample_1 = require("./FormatSample");
|
|
35
|
-
const FormatType_1 = require("./FormatType");
|
|
36
|
-
const FormatUnitLabel_1 = require("./FormatUnitLabel");
|
|
37
|
-
const FormatUnits_1 = require("./FormatUnits");
|
|
38
|
-
const MiscFormatOptions_1 = require("./MiscFormatOptions");
|
|
39
|
-
async function generateFormatSpec(formatProps, persistenceUnit, unitsProvider) {
|
|
40
|
-
const actualFormat = await core_quantity_1.Format.createFromJSON("custom", unitsProvider, formatProps);
|
|
41
|
-
return core_quantity_1.FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);
|
|
42
|
-
}
|
|
43
|
-
/** Component to show/edit Quantity Format.
|
|
44
|
-
* @alpha
|
|
45
|
-
*/
|
|
46
|
-
function FormatPanel(props) {
|
|
47
|
-
const [formatSpec, setFormatSpec] = React.useState();
|
|
48
|
-
const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;
|
|
49
|
-
const [formatProps, setFormatProps] = React.useState(initialFormat);
|
|
50
|
-
const [showOptions, setShowOptions] = React.useState(false);
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
setFormatProps(initialFormat);
|
|
53
|
-
setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
|
|
54
|
-
}, [initialFormat]);
|
|
55
|
-
const handleUserFormatChanges = React.useCallback((newProps) => {
|
|
56
|
-
setFormatProps(newProps);
|
|
57
|
-
setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
|
|
58
|
-
onFormatChange && onFormatChange(newProps);
|
|
59
|
-
}, [onFormatChange]);
|
|
60
|
-
const isMounted = React.useRef(false);
|
|
61
|
-
// runs returned function only when component is unmounted.
|
|
62
|
-
React.useEffect(() => {
|
|
63
|
-
isMounted.current = true;
|
|
64
|
-
return (() => {
|
|
65
|
-
isMounted.current = false;
|
|
66
|
-
});
|
|
67
|
-
}, []);
|
|
68
|
-
React.useEffect(() => {
|
|
69
|
-
async function fetchFormatSpec() {
|
|
70
|
-
const pu = await persistenceUnit;
|
|
71
|
-
let newFormatSpec;
|
|
72
|
-
if (provideFormatSpec) {
|
|
73
|
-
newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);
|
|
77
|
-
}
|
|
78
|
-
isMounted.current && setFormatSpec(newFormatSpec);
|
|
79
|
-
}
|
|
80
|
-
if (!formatSpec)
|
|
81
|
-
fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
82
|
-
}, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);
|
|
83
|
-
const handleFormatChange = React.useCallback((newFormatProps) => {
|
|
84
|
-
handleUserFormatChanges(newFormatProps);
|
|
85
|
-
}, [handleUserFormatChanges]);
|
|
86
|
-
const handleShowOptions = React.useCallback((show) => {
|
|
87
|
-
setShowOptions(show);
|
|
88
|
-
}, []);
|
|
89
|
-
return (React.createElement("div", { className: "components-quantityFormat-panel" },
|
|
90
|
-
showSample &&
|
|
91
|
-
React.createElement(FormatSample_1.FormatSample, { formatSpec: formatSpec, initialMagnitude: initialMagnitude }),
|
|
92
|
-
React.createElement(FormatUnits_1.FormatUnits, { unitsProvider: unitsProvider, persistenceUnit: formatSpec === null || formatSpec === void 0 ? void 0 : formatSpec.persistenceUnit, initialFormat: formatProps, onUnitsChange: handleFormatChange }),
|
|
93
|
-
React.createElement(FormatUnitLabel_1.FormatUnitLabel, { formatProps: formatProps, onUnitLabelChange: handleFormatChange }),
|
|
94
|
-
React.createElement(FormatType_1.FormatTypeOption, { formatProps: formatProps, onChange: handleFormatChange }),
|
|
95
|
-
React.createElement(FormatPrecision_1.FormatPrecision, { formatProps: formatProps, onChange: handleFormatChange }),
|
|
96
|
-
props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange),
|
|
97
|
-
React.createElement(MiscFormatOptions_1.MiscFormatOptions, { formatProps: formatProps, onChange: handleFormatChange, enableMinimumProperties: enableMinimumProperties, showOptions: showOptions, onShowHideOptions: handleShowOptions }, props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange))));
|
|
98
|
-
}
|
|
99
|
-
exports.FormatPanel = FormatPanel;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module QuantityFormat
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FormatPanel = void 0;
|
|
30
|
+
require("./FormatPanel.scss");
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const core_quantity_1 = require("@itwin/core-quantity");
|
|
33
|
+
const FormatPrecision_1 = require("./FormatPrecision");
|
|
34
|
+
const FormatSample_1 = require("./FormatSample");
|
|
35
|
+
const FormatType_1 = require("./FormatType");
|
|
36
|
+
const FormatUnitLabel_1 = require("./FormatUnitLabel");
|
|
37
|
+
const FormatUnits_1 = require("./FormatUnits");
|
|
38
|
+
const MiscFormatOptions_1 = require("./MiscFormatOptions");
|
|
39
|
+
async function generateFormatSpec(formatProps, persistenceUnit, unitsProvider) {
|
|
40
|
+
const actualFormat = await core_quantity_1.Format.createFromJSON("custom", unitsProvider, formatProps);
|
|
41
|
+
return core_quantity_1.FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);
|
|
42
|
+
}
|
|
43
|
+
/** Component to show/edit Quantity Format.
|
|
44
|
+
* @alpha
|
|
45
|
+
*/
|
|
46
|
+
function FormatPanel(props) {
|
|
47
|
+
const [formatSpec, setFormatSpec] = React.useState();
|
|
48
|
+
const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;
|
|
49
|
+
const [formatProps, setFormatProps] = React.useState(initialFormat);
|
|
50
|
+
const [showOptions, setShowOptions] = React.useState(false);
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
setFormatProps(initialFormat);
|
|
53
|
+
setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
|
|
54
|
+
}, [initialFormat]);
|
|
55
|
+
const handleUserFormatChanges = React.useCallback((newProps) => {
|
|
56
|
+
setFormatProps(newProps);
|
|
57
|
+
setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
|
|
58
|
+
onFormatChange && onFormatChange(newProps);
|
|
59
|
+
}, [onFormatChange]);
|
|
60
|
+
const isMounted = React.useRef(false);
|
|
61
|
+
// runs returned function only when component is unmounted.
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
isMounted.current = true;
|
|
64
|
+
return (() => {
|
|
65
|
+
isMounted.current = false;
|
|
66
|
+
});
|
|
67
|
+
}, []);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
async function fetchFormatSpec() {
|
|
70
|
+
const pu = await persistenceUnit;
|
|
71
|
+
let newFormatSpec;
|
|
72
|
+
if (provideFormatSpec) {
|
|
73
|
+
newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);
|
|
77
|
+
}
|
|
78
|
+
isMounted.current && setFormatSpec(newFormatSpec);
|
|
79
|
+
}
|
|
80
|
+
if (!formatSpec)
|
|
81
|
+
fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
82
|
+
}, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);
|
|
83
|
+
const handleFormatChange = React.useCallback((newFormatProps) => {
|
|
84
|
+
handleUserFormatChanges(newFormatProps);
|
|
85
|
+
}, [handleUserFormatChanges]);
|
|
86
|
+
const handleShowOptions = React.useCallback((show) => {
|
|
87
|
+
setShowOptions(show);
|
|
88
|
+
}, []);
|
|
89
|
+
return (React.createElement("div", { className: "components-quantityFormat-panel" },
|
|
90
|
+
showSample &&
|
|
91
|
+
React.createElement(FormatSample_1.FormatSample, { formatSpec: formatSpec, initialMagnitude: initialMagnitude }),
|
|
92
|
+
React.createElement(FormatUnits_1.FormatUnits, { unitsProvider: unitsProvider, persistenceUnit: formatSpec === null || formatSpec === void 0 ? void 0 : formatSpec.persistenceUnit, initialFormat: formatProps, onUnitsChange: handleFormatChange }),
|
|
93
|
+
React.createElement(FormatUnitLabel_1.FormatUnitLabel, { formatProps: formatProps, onUnitLabelChange: handleFormatChange }),
|
|
94
|
+
React.createElement(FormatType_1.FormatTypeOption, { formatProps: formatProps, onChange: handleFormatChange }),
|
|
95
|
+
React.createElement(FormatPrecision_1.FormatPrecision, { formatProps: formatProps, onChange: handleFormatChange }),
|
|
96
|
+
props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange),
|
|
97
|
+
React.createElement(MiscFormatOptions_1.MiscFormatOptions, { formatProps: formatProps, onChange: handleFormatChange, enableMinimumProperties: enableMinimumProperties, showOptions: showOptions, onShowHideOptions: handleShowOptions }, props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange))));
|
|
98
|
+
}
|
|
99
|
+
exports.FormatPanel = FormatPanel;
|
|
100
100
|
//# sourceMappingURL=FormatPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPanel.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH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vB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC;QAC7C,UAAU;YACT,oBAAC,2BAAY,IAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,GAAI;QAE9E,oBAAC,yBAAW,IAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,GAAI;QAC1J,oBAAC,iCAAe,IAAC,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,GAAI;QACpF,oBAAC,6BAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC5E,oBAAC,iCAAe,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC1E,KAAK,CAAC,sBAAsB,IAAI,KAAK,CAAC,sBAAsB,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9F,oBAAC,qCAAiB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,IACxL,KAAK,CAAC,wBAAwB,IAAI,KAAK,CAAC,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAChF,CAChB,CACP,CAAC;AACJ,CAAC;AAjED,kCAiEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"FormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPanel.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAA4B;AAC5B,6CAA+B;AAC/B,wDAAoG;AAEpG,uDAAoD;AACpD,iDAA8C;AAC9C,6CAAg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,UAAU;YACT,oBAAC,2BAAY,IAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,GAAI;QAE9E,oBAAC,yBAAW,IAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,GAAI;QAC1J,oBAAC,iCAAe,IAAC,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,GAAI;QACpF,oBAAC,6BAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC5E,oBAAC,iCAAe,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC1E,KAAK,CAAC,sBAAsB,IAAI,KAAK,CAAC,sBAAsB,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9F,oBAAC,qCAAiB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,IACxL,KAAK,CAAC,wBAAwB,IAAI,KAAK,CAAC,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAChF,CAChB,CACP,CAAC;AACJ,CAAC;AAjED,kCAiEC","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 QuantityFormat\n */\n\nimport \"./FormatPanel.scss\";\nimport * as React from \"react\";\nimport { Format, FormatProps, FormatterSpec, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { FormatPrecision } from \"./FormatPrecision\";\nimport { FormatSample } from \"./FormatSample\";\nimport { FormatTypeOption } from \"./FormatType\";\nimport { FormatUnitLabel } from \"./FormatUnitLabel\";\nimport { FormatUnits } from \"./FormatUnits\";\nimport { MiscFormatOptions } from \"./MiscFormatOptions\";\n\n/** Properties of [[FormatPanel]] component.\n * @alpha\n */\nexport interface FormatPanelProps extends CommonProps {\n initialFormat: FormatProps;\n unitsProvider: UnitsProvider;\n persistenceUnit: Promise<UnitProps> | UnitProps;\n showSample?: boolean;\n initialMagnitude?: number;\n // if true a only primary format properties are initially displayed and a \"More/Less\" link is added.\n enableMinimumProperties?: boolean;\n onFormatChange?: (format: FormatProps) => void;\n provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;\n providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\n provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\n}\n\nasync function generateFormatSpec(formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) {\n const actualFormat = await Format.createFromJSON(\"custom\", unitsProvider, formatProps);\n return FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);\n}\n\n/** Component to show/edit Quantity Format.\n * @alpha\n */\nexport function FormatPanel(props: FormatPanelProps) {\n const [formatSpec, setFormatSpec] = React.useState<FormatterSpec>();\n const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;\n const [formatProps, setFormatProps] = React.useState(initialFormat);\n const [showOptions, setShowOptions] = React.useState(false);\n\n React.useEffect(() => {\n setFormatProps(initialFormat);\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\n }, [initialFormat]);\n\n const handleUserFormatChanges = React.useCallback((newProps: FormatProps) => {\n setFormatProps(newProps);\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\n onFormatChange && onFormatChange(newProps);\n }, [onFormatChange]);\n\n const isMounted = React.useRef(false);\n\n // runs returned function only when component is unmounted.\n React.useEffect(() => {\n isMounted.current = true;\n return (() => {\n isMounted.current = false;\n });\n }, []);\n\n React.useEffect(() => {\n async function fetchFormatSpec() {\n const pu = await persistenceUnit;\n let newFormatSpec: FormatterSpec;\n if (provideFormatSpec) {\n newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);\n } else {\n newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);\n }\n isMounted.current && setFormatSpec(newFormatSpec);\n }\n if (!formatSpec)\n fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);\n\n const handleFormatChange = React.useCallback((newFormatProps: FormatProps) => {\n handleUserFormatChanges(newFormatProps);\n }, [handleUserFormatChanges]);\n\n const handleShowOptions = React.useCallback((show: boolean) => {\n setShowOptions(show);\n }, []);\n\n return (\n <div className=\"components-quantityFormat-panel\">\n {showSample &&\n <FormatSample formatSpec={formatSpec} initialMagnitude={initialMagnitude} />\n }\n <FormatUnits unitsProvider={unitsProvider} persistenceUnit={formatSpec?.persistenceUnit} initialFormat={formatProps} onUnitsChange={handleFormatChange} />\n <FormatUnitLabel formatProps={formatProps} onUnitLabelChange={handleFormatChange} />\n <FormatTypeOption formatProps={formatProps} onChange={handleFormatChange} />\n <FormatPrecision formatProps={formatProps} onChange={handleFormatChange} />\n {props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange)}\n <MiscFormatOptions formatProps={formatProps} onChange={handleFormatChange} enableMinimumProperties={enableMinimumProperties} showOptions={showOptions} onShowHideOptions={handleShowOptions}>\n {props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange)}\n </MiscFormatOptions>\n </div>\n );\n}\n"]}
|
|
@@ -1,65 +1,65 @@
|
|
|
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
|
-
@import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
|
|
6
|
-
@import "~@itwin/core-react/lib/cjs/core-react/select/select";
|
|
7
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
8
|
-
|
|
9
|
-
.components-quantityFormat-panel {
|
|
10
|
-
display: grid;
|
|
11
|
-
grid-template-columns: auto 1fr;
|
|
12
|
-
row-gap: 0;
|
|
13
|
-
column-gap: 6px;
|
|
14
|
-
align-items: center;
|
|
15
|
-
|
|
16
|
-
>.uicore-label {
|
|
17
|
-
font-size: $iui-font-size;
|
|
18
|
-
margin: 4.4px 0;
|
|
19
|
-
|
|
20
|
-
/* match margin on other select controls so it spaces properly in grid */
|
|
21
|
-
&.uicore-disabled {
|
|
22
|
-
color: $buic-text-color-disabled;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
>span.components-inline {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
align-items: center;
|
|
30
|
-
gap: 4px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
>label.core-checkbox.core-checkbox-no-label {
|
|
34
|
-
min-height: 1.57em;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
>button.components-quantityFormat-more-button {
|
|
38
|
-
grid-column: 1 / span 2;
|
|
39
|
-
border: none;
|
|
40
|
-
outline: none;
|
|
41
|
-
background: none;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.components-quantityFormat-more-button-label {
|
|
45
|
-
margin-right: .25em;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
>a.components-quantityFormat-more-less {
|
|
49
|
-
font-size: $iui-font-size;
|
|
50
|
-
color: $buic-foreground-alert;
|
|
51
|
-
-webkit-transition: text-decoration 1s ease;
|
|
52
|
-
-moz-transition: text-decoration 1s ease;
|
|
53
|
-
-o-transition: text-decoration 1s ease;
|
|
54
|
-
transition: text-decoration 0.1s ease;
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
text-decoration: underline;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.iui-input {
|
|
63
|
-
padding: $uicore-iui-input-padding;
|
|
64
|
-
}
|
|
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
|
+
@import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
|
|
6
|
+
@import "~@itwin/core-react/lib/cjs/core-react/select/select";
|
|
7
|
+
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
8
|
+
|
|
9
|
+
.components-quantityFormat-panel {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: auto 1fr;
|
|
12
|
+
row-gap: 0;
|
|
13
|
+
column-gap: 6px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
>.uicore-label {
|
|
17
|
+
font-size: $iui-font-size;
|
|
18
|
+
margin: 4.4px 0;
|
|
19
|
+
|
|
20
|
+
/* match margin on other select controls so it spaces properly in grid */
|
|
21
|
+
&.uicore-disabled {
|
|
22
|
+
color: $buic-text-color-disabled;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
>span.components-inline {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
>label.core-checkbox.core-checkbox-no-label {
|
|
34
|
+
min-height: 1.57em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
>button.components-quantityFormat-more-button {
|
|
38
|
+
grid-column: 1 / span 2;
|
|
39
|
+
border: none;
|
|
40
|
+
outline: none;
|
|
41
|
+
background: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.components-quantityFormat-more-button-label {
|
|
45
|
+
margin-right: .25em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
>a.components-quantityFormat-more-less {
|
|
49
|
+
font-size: $iui-font-size;
|
|
50
|
+
color: $buic-foreground-alert;
|
|
51
|
+
-webkit-transition: text-decoration 1s ease;
|
|
52
|
+
-moz-transition: text-decoration 1s ease;
|
|
53
|
+
-o-transition: text-decoration 1s ease;
|
|
54
|
+
transition: text-decoration 0.1s ease;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
text-decoration: underline;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.iui-input {
|
|
63
|
+
padding: $uicore-iui-input-padding;
|
|
64
|
+
}
|
|
65
65
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module QuantityFormat
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
|
-
import { CommonProps } from "@itwin/core-react";
|
|
6
|
-
import { FormatProps } from "@itwin/core-quantity";
|
|
7
|
-
/** Properties of [[FormatPrecision]] component.
|
|
8
|
-
* @alpha
|
|
9
|
-
*/
|
|
10
|
-
export interface FormatPrecisionProps extends CommonProps {
|
|
11
|
-
formatProps: FormatProps;
|
|
12
|
-
onChange?: (format: FormatProps) => void;
|
|
13
|
-
}
|
|
14
|
-
/** Component to show/edit Quantity Format Precision.
|
|
15
|
-
* @alpha
|
|
16
|
-
*/
|
|
17
|
-
export declare function FormatPrecision(props: FormatPrecisionProps): JSX.Element;
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module QuantityFormat
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
import { CommonProps } from "@itwin/core-react";
|
|
6
|
+
import { FormatProps } from "@itwin/core-quantity";
|
|
7
|
+
/** Properties of [[FormatPrecision]] component.
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export interface FormatPrecisionProps extends CommonProps {
|
|
11
|
+
formatProps: FormatProps;
|
|
12
|
+
onChange?: (format: FormatProps) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Component to show/edit Quantity Format Precision.
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export declare function FormatPrecision(props: FormatPrecisionProps): JSX.Element;
|
|
18
18
|
//# sourceMappingURL=FormatPrecision.d.ts.map
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module QuantityFormat
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.FormatPrecision = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
|
-
const core_quantity_1 = require("@itwin/core-quantity");
|
|
32
|
-
const DecimalPrecision_1 = require("./misc/DecimalPrecision");
|
|
33
|
-
const FractionPrecision_1 = require("./misc/FractionPrecision");
|
|
34
|
-
const UiIModelComponents_1 = require("../UiIModelComponents");
|
|
35
|
-
/** Component to show/edit Quantity Format Precision.
|
|
36
|
-
* @alpha
|
|
37
|
-
*/
|
|
38
|
-
function FormatPrecision(props) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
const { formatProps, onChange } = props;
|
|
41
|
-
const handlePrecisionChange = React.useCallback((precision) => {
|
|
42
|
-
const newFormatProps = { ...formatProps, precision };
|
|
43
|
-
onChange && onChange(newFormatProps);
|
|
44
|
-
}, [formatProps, onChange]);
|
|
45
|
-
const formatType = (0, core_quantity_1.parseFormatType)(formatProps.type, "format");
|
|
46
|
-
const label = React.useRef(UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.labels.precision"));
|
|
47
|
-
return (React.createElement(React.Fragment, null,
|
|
48
|
-
React.createElement("span", { className: "uicore-label" }, label.current),
|
|
49
|
-
formatType === core_quantity_1.FormatType.Fractional ?
|
|
50
|
-
React.createElement(FractionPrecision_1.FractionPrecisionSelector, { "data-testid": "fraction-precision-selector", precision: (_a = formatProps.precision) !== null && _a !== void 0 ? _a : 0, onChange: handlePrecisionChange }) :
|
|
51
|
-
React.createElement(DecimalPrecision_1.DecimalPrecisionSelector, { "data-testid": "decimal-precision-selector", precision: (_b = formatProps.precision) !== null && _b !== void 0 ? _b : 0, onChange: handlePrecisionChange })));
|
|
52
|
-
}
|
|
53
|
-
exports.FormatPrecision = FormatPrecision;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module QuantityFormat
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FormatPrecision = void 0;
|
|
30
|
+
const React = __importStar(require("react"));
|
|
31
|
+
const core_quantity_1 = require("@itwin/core-quantity");
|
|
32
|
+
const DecimalPrecision_1 = require("./misc/DecimalPrecision");
|
|
33
|
+
const FractionPrecision_1 = require("./misc/FractionPrecision");
|
|
34
|
+
const UiIModelComponents_1 = require("../UiIModelComponents");
|
|
35
|
+
/** Component to show/edit Quantity Format Precision.
|
|
36
|
+
* @alpha
|
|
37
|
+
*/
|
|
38
|
+
function FormatPrecision(props) {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const { formatProps, onChange } = props;
|
|
41
|
+
const handlePrecisionChange = React.useCallback((precision) => {
|
|
42
|
+
const newFormatProps = { ...formatProps, precision };
|
|
43
|
+
onChange && onChange(newFormatProps);
|
|
44
|
+
}, [formatProps, onChange]);
|
|
45
|
+
const formatType = (0, core_quantity_1.parseFormatType)(formatProps.type, "format");
|
|
46
|
+
const label = React.useRef(UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.labels.precision"));
|
|
47
|
+
return (React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement("span", { className: "uicore-label" }, label.current),
|
|
49
|
+
formatType === core_quantity_1.FormatType.Fractional ?
|
|
50
|
+
React.createElement(FractionPrecision_1.FractionPrecisionSelector, { "data-testid": "fraction-precision-selector", precision: (_a = formatProps.precision) !== null && _a !== void 0 ? _a : 0, onChange: handlePrecisionChange }) :
|
|
51
|
+
React.createElement(DecimalPrecision_1.DecimalPrecisionSelector, { "data-testid": "decimal-precision-selector", precision: (_b = formatProps.precision) !== null && _b !== void 0 ? _b : 0, onChange: handlePrecisionChange })));
|
|
52
|
+
}
|
|
53
|
+
exports.FormatPrecision = FormatPrecision;
|
|
54
54
|
//# sourceMappingURL=FormatPrecision.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatPrecision.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPrecision.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,wDAAgF;AAChF,8DAAmE;AACnE,gEAAqE;AACrE,8DAA2D;AAU3D;;GAEG;AACH,SAAgB,eAAe,CAAC,KAA2B;;IACzD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QACpE,MAAM,cAAc,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,CAAC;QACrD,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,UAAU,GAAG,IAAA,+BAAe,EAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,uCAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAC5F,OAAO,CACL;QACE,8BAAM,SAAS,EAAE,cAAc,IAAG,KAAK,CAAC,OAAO,CAAQ;QACtD,UAAU,KAAK,0BAAU,CAAC,UAAU,CAAC,CAAC;YACrC,oBAAC,6CAAyB,mBAAa,6BAA6B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAAC,CAAC;YACjJ,oBAAC,2CAAwB,mBAAa,4BAA4B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAE9I,CACJ,CAAC;AACJ,CAAC;AApBD,0CAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"FormatPrecision.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPrecision.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,wDAAgF;AAChF,8DAAmE;AACnE,gEAAqE;AACrE,8DAA2D;AAU3D;;GAEG;AACH,SAAgB,eAAe,CAAC,KAA2B;;IACzD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QACpE,MAAM,cAAc,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,CAAC;QACrD,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,UAAU,GAAG,IAAA,+BAAe,EAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,uCAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAC5F,OAAO,CACL;QACE,8BAAM,SAAS,EAAE,cAAc,IAAG,KAAK,CAAC,OAAO,CAAQ;QACtD,UAAU,KAAK,0BAAU,CAAC,UAAU,CAAC,CAAC;YACrC,oBAAC,6CAAyB,mBAAa,6BAA6B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAAC,CAAC;YACjJ,oBAAC,2CAAwB,mBAAa,4BAA4B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAE9I,CACJ,CAAC;AACJ,CAAC;AApBD,0CAoBC","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 QuantityFormat\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { FormatProps, FormatType, parseFormatType } from \"@itwin/core-quantity\";\nimport { DecimalPrecisionSelector } from \"./misc/DecimalPrecision\";\nimport { FractionPrecisionSelector } from \"./misc/FractionPrecision\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\n\n/** Properties of [[FormatPrecision]] component.\n * @alpha\n */\nexport interface FormatPrecisionProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n}\n\n/** Component to show/edit Quantity Format Precision.\n * @alpha\n */\nexport function FormatPrecision(props: FormatPrecisionProps) {\n const { formatProps, onChange } = props;\n\n const handlePrecisionChange = React.useCallback((precision: number) => {\n const newFormatProps = { ...formatProps, precision };\n onChange && onChange(newFormatProps);\n }, [formatProps, onChange]);\n\n const formatType = parseFormatType(formatProps.type, \"format\");\n\n const label = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.precision\"));\n return (\n <>\n <span className={\"uicore-label\"}>{label.current}</span>\n {formatType === FormatType.Fractional ?\n <FractionPrecisionSelector data-testid=\"fraction-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} /> :\n <DecimalPrecisionSelector data-testid=\"decimal-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} />\n }\n </>\n );\n}\n"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module QuantityFormat
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
|
-
import { FormatterSpec } from "@itwin/core-quantity";
|
|
6
|
-
import { CommonProps } from "@itwin/core-react";
|
|
7
|
-
/** Properties of [[FormatSample]] component.
|
|
8
|
-
* @alpha
|
|
9
|
-
*/
|
|
10
|
-
export interface FormatSampleProps extends CommonProps {
|
|
11
|
-
formatSpec?: FormatterSpec;
|
|
12
|
-
initialMagnitude?: number;
|
|
13
|
-
hideLabels?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/** Component to show the persistence value and formatted value given a FormatterSpec.
|
|
16
|
-
* @alpha
|
|
17
|
-
*/
|
|
18
|
-
export declare function FormatSample(props: FormatSampleProps): JSX.Element;
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module QuantityFormat
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
import { FormatterSpec } from "@itwin/core-quantity";
|
|
6
|
+
import { CommonProps } from "@itwin/core-react";
|
|
7
|
+
/** Properties of [[FormatSample]] component.
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export interface FormatSampleProps extends CommonProps {
|
|
11
|
+
formatSpec?: FormatterSpec;
|
|
12
|
+
initialMagnitude?: number;
|
|
13
|
+
hideLabels?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Component to show the persistence value and formatted value given a FormatterSpec.
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export declare function FormatSample(props: FormatSampleProps): JSX.Element;
|
|
19
19
|
//# sourceMappingURL=FormatSample.d.ts.map
|