@itwin/imodel-components-react 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/CHANGELOG.md +335 -327
  2. package/LICENSE.md +9 -9
  3. package/README.md +11 -11
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  5. package/lib/cjs/imodel-components-react/UiIModelComponents.js +13 -10
  6. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +23 -17
  9. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +71 -63
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  13. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +11 -9
  14. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  17. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  18. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +6 -8
  19. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +11 -12
  23. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  25. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
  26. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.js +32 -15
  28. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  29. package/lib/cjs/imodel-components-react/color/HueSlider.scss +78 -61
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  32. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +14 -11
  33. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  34. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +36 -35
  35. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
  36. package/lib/cjs/imodel-components-react/color/Swatch.js +5 -8
  37. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  38. package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
  39. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  40. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  41. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  43. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +17 -9
  44. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  45. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  46. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  47. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +8 -6
  48. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  50. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  51. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  52. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +18 -12
  53. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  54. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  55. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  56. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +36 -22
  57. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  58. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  59. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  60. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +12 -16
  61. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  63. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  64. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  65. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  66. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  67. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  68. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +31 -11
  69. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  70. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  71. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  72. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +103 -49
  73. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  74. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  75. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  76. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +171 -66
  77. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  78. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +20 -13
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +14 -10
  88. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  89. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +33 -11
  91. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  92. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
  94. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  95. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +32 -24
  97. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  98. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
  100. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  101. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  103. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  129. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
  130. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  131. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  132. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  133. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  134. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +15 -7
  136. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  137. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  138. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  139. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  140. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  141. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +7 -4
  142. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  143. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +27 -27
  144. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  145. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +3 -3
  146. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  147. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
  148. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  149. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  150. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +32 -17
  151. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  152. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
  153. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  154. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +61 -27
  155. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  156. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  157. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  158. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  159. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  160. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
  161. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +165 -165
  162. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  163. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +56 -29
  164. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  165. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -178
  166. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  167. package/lib/cjs/imodel-components-react/timeline/interfaces.js +3 -3
  168. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  169. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  170. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  171. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +45 -33
  172. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  173. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  174. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  175. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  176. package/lib/cjs/imodel-components-react.js +3 -3
  177. package/lib/cjs/imodel-components-react.js.map +1 -1
  178. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  179. package/lib/esm/imodel-components-react/UiIModelComponents.js +13 -10
  180. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  181. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  182. package/lib/esm/imodel-components-react/color/AlphaSlider.js +23 -17
  183. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  184. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +71 -63
  185. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
  186. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  187. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +11 -9
  188. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  189. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  190. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  191. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  192. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +7 -9
  193. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  194. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  195. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  196. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +13 -14
  197. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  198. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  199. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
  200. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  201. package/lib/esm/imodel-components-react/color/HueSlider.js +32 -15
  202. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  203. package/lib/esm/imodel-components-react/color/HueSlider.scss +78 -61
  204. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  205. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  206. package/lib/esm/imodel-components-react/color/SaturationPicker.js +14 -11
  207. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  208. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +36 -35
  209. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
  210. package/lib/esm/imodel-components-react/color/Swatch.js +5 -8
  211. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  212. package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
  213. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  214. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  215. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  216. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  217. package/lib/esm/imodel-components-react/editors/ColorEditor.js +18 -10
  218. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  219. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  220. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  221. package/lib/esm/imodel-components-react/editors/WeightEditor.js +10 -8
  222. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  223. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  224. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  225. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  226. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +18 -12
  227. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  228. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  229. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  230. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +38 -24
  231. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  232. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  233. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  234. package/lib/esm/imodel-components-react/lineweight/Swatch.js +12 -16
  235. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  236. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  237. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  238. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  239. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  240. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  241. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  242. package/lib/esm/imodel-components-react/navigationaids/Cube.js +31 -11
  243. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  244. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  245. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  246. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +105 -51
  247. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  248. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  249. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  250. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +173 -68
  251. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  252. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  253. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  254. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +20 -13
  255. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  256. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  257. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  258. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
  259. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  261. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +14 -10
  262. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  263. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  264. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +33 -11
  265. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  267. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
  268. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  270. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +32 -24
  271. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  272. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  273. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
  274. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  275. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  276. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  277. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  278. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  279. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  280. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  281. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  282. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  283. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  284. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  285. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  286. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  287. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  288. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  289. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  290. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  291. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  292. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  293. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  294. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  295. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  296. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  297. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  298. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  299. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  300. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  301. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  302. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  303. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
  304. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  305. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  306. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  307. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  308. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  309. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +16 -8
  310. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  311. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  312. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  313. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  314. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  315. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +7 -4
  316. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  317. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +27 -27
  318. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  319. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +3 -3
  320. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  321. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
  322. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  323. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  324. package/lib/esm/imodel-components-react/timeline/Scrubber.js +32 -17
  325. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  326. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
  327. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  328. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +63 -29
  329. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  330. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  331. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  332. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  333. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  334. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
  335. package/lib/esm/imodel-components-react/timeline/Timeline.scss +165 -165
  336. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  337. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +58 -31
  338. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  339. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -178
  340. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  341. package/lib/esm/imodel-components-react/timeline/interfaces.js +3 -3
  342. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  343. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  344. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  345. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +47 -35
  346. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  347. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  348. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  349. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  350. package/lib/esm/imodel-components-react.js +3 -3
  351. package/lib/esm/imodel-components-react.js.map +1 -1
  352. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  353. package/package.json +15 -24
@@ -1 +1 @@
1
- {"version":3,"file":"QuantityFormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,8BAA8B,EAAE,8BAA8B,EACpG,+BAA+B,EAAE,gCAAgC,GAClE,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,SAAS,+BAA+B,CAAC,GAAW,EAAE,KAAa,EAAE,OAAoB,EACvF,SAAyC,EAAE,SAA6D,EAAE,gBAAiD;IAC3J,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,GAAG,GAAG,EAAE;QAC3B,8BAAM,GAAG,EAAE,GAAG,GAAG,QAAQ,EAAE,SAAS,EAAE,cAAc,IAAG,KAAK,CAAQ;QACpE,oBAAC,KAAK,mBAAc,GAAG,GAAG,S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iBAAiB,EAAE,iBAAiB,GACpC,CACA,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type {\r\n CustomFormatPropEditorSpec, QuantityTypeArg} from \"@itwin/core-frontend\";\r\nimport { getQuantityTypeKey, IModelApp, isCheckboxFormatPropEditorSpec, isCustomQuantityTypeDefinition,\r\n isTextInputFormatPropEditorSpec, isTextSelectFormatPropEditorSpec,\r\n} from \"@itwin/core-frontend\";\r\nimport type { FormatProps, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { Checkbox, Input, Select } from \"@itwin/itwinui-react\";\r\nimport { FormatPanel } from \"./FormatPanel\";\r\nimport { DeepCompare } from \"@itwin/core-geometry\";\r\n\r\nfunction createTextInputFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Input data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n size=\"small\"\r\n onChange={(e) => {\r\n const newProps = setString(inProps, e.currentTarget.value);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\nfunction createSelectFormatPropEditor(key: string, label: string, options: { label: string, value: string }[], inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Select data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n options={options}\r\n size={\"small\"}\r\n onChange={(newValue) => {\r\n const newProps = setString(inProps, newValue);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction createCheckboxFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getBool: (props: FormatProps) => boolean, setBool: (props: FormatProps, isChecked: boolean) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const isChecked = getBool(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Checkbox data-testid={`${key}-editor`} key={`${key}-editor`}\r\n checked={isChecked}\r\n onChange={(e) => {\r\n const newProps = setBool(inProps, e.target.checked);\r\n fireFormatChange(newProps);\r\n }} />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction formatAreEqual(obj1: FormatProps, obj2: FormatProps) {\r\n const compare = new DeepCompare();\r\n return compare.compare(obj1, obj2);\r\n}\r\n\r\n/** Properties of [[QuantityFormatPanel]] component.\r\n * @alpha\r\n */\r\nexport interface QuantityFormatPanelProps extends CommonProps {\r\n quantityType: QuantityTypeArg;\r\n onFormatChange?: (format: FormatProps) => void;\r\n /** props below are to be passed on to FormatPanel */\r\n showSample?: boolean;\r\n initialMagnitude?: number;\r\n enableMinimumProperties?: boolean;\r\n}\r\n\r\n/** Component to set properties that control Quantity Formatting.\r\n * @alpha\r\n */\r\nexport function QuantityFormatPanel(props: QuantityFormatPanelProps) {\r\n const { quantityType, onFormatChange, ...otherProps } = props;\r\n const [formatProps, setFormatProps] = React.useState<FormatProps>();\r\n const initialFormatProps = React.useRef<FormatProps>();\r\n\r\n const [persistenceUnit, setPersistenceUnit] = React.useState<UnitProps>();\r\n\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (!initialFormatProps.current)\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n // istanbul ignore else\r\n if (quantityTypeDefinition)\r\n setPersistenceUnit(quantityTypeDefinition.persistenceUnit);\r\n else\r\n throw Error(`Unable to locate a quantity type with type ${quantityType}`);\r\n }, [quantityType]); // no dependencies defined as we want this to run on every render\r\n\r\n // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (initialFormatProps.current && newFormatProps) {\r\n if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n }\r\n }\r\n }); // no dependencies defined as we want this to run on every render\r\n\r\n const handleOnFormatChanged = React.useCallback(async (newProps: FormatProps) => {\r\n setFormatProps(newProps);\r\n onFormatChange && onFormatChange(newProps);\r\n }, [onFormatChange]);\r\n\r\n const createCustomPropEditors = React.useCallback((specs: CustomFormatPropEditorSpec[], inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n return specs.map((spec, index) => {\r\n if (isCheckboxFormatPropEditorSpec(spec))\r\n return createCheckboxFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getBool, spec.setBool, fireFormatChange);\r\n if (isTextSelectFormatPropEditorSpec(spec))\r\n return createSelectFormatPropEditor(`${spec.editorType}-${index}`, spec.label, spec.selectOptions, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore else */\r\n if (isTextInputFormatPropEditorSpec(spec))\r\n return createTextInputFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore next */\r\n return <div key={index} />;\r\n });\r\n }, []);\r\n\r\n const providePrimaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.primaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.primaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideSecondaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.secondaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.secondaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideFormatSpec = React.useCallback(\r\n async (inProps: FormatProps, _persistenceUnit: UnitProps, _unitsProvider: UnitsProvider) => {\r\n return IModelApp.quantityFormatter.generateFormatterSpecByType(quantityType, inProps);\r\n }, [quantityType]);\r\n\r\n return (\r\n <div className=\"components-quantityFormat-quantityPanel\">\r\n {persistenceUnit && formatProps &&\r\n <FormatPanel onFormatChange={handleOnFormatChanged} {...otherProps}\r\n initialFormat={formatProps}\r\n unitsProvider={IModelApp.quantityFormatter.unitsProvider}\r\n persistenceUnit={persistenceUnit}\r\n providePrimaryChildren={providePrimaryChildren}\r\n provideSecondaryChildren={provideSecondaryChildren}\r\n provideFormatSpec={provideFormatSpec}\r\n />}\r\n </div>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"QuantityFormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,SAAS,+BAA+B,CACtC,GAAW,EACX,KAAa,EACb,OAAoB,EACpB,SAAyC,EACzC,SAA6D,EAC7D,gBAAiD;IAEjD,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,GAAG,GAAG,EAAE;QAC3B,8BAAM,GAAG,EAAE,GAAG,GAAG,QAAQ,EAAE,SAAS,EAAE,cAAc,IACjD,KAAK,CACD;QACP,oBAAC,KAAK,mBACS,GAAG,GAAG,SAAS,EAC5B,GAAG,EAAE,GAAG,GAAG,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAA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;QACzD,MAAM,sBAAsB,GAC1B,SAAS,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACzE,IACE,sBAAsB;YACtB,8BAA8B,CAAC,sBAAsB,CAAC;YACtD,sBAAsB,CAAC,uBAAuB,CAAC,OAAO,CAAC,EACvD;YACA,uBAAuB;YACvB,IAAI,sBAAsB,CAAC,wBAAwB;gBACjD,OAAO,uBAAuB,CAC5B,sBAAsB,CAAC,wBAAwB,EAC/C,OAAO,EACP,gBAAgB,CACjB,CAAC;SACL;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EACD,CAAC,uBAAuB,EAAE,YAAY,CAAC,CACxC,CAAC;IAEF,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACzC,KAAK,EACH,OAAoB,EACpB,gBAA2B,EAC3B,cAA6B,EAC7B,EAAE;QACF,OAAO,SAAS,CAAC,iBAAiB,CAAC,2BAA2B,CAC5D,YAAY,EACZ,OAAO,CACR,CAAC;IACJ,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,yCAAyC,IACrD,eAAe,IAAI,WAAW,IAAI,CACjC,oBAAC,WAAW,IACV,cAAc,EAAE,qBAAqB,KACjC,UAAU,EACd,aAAa,EAAE,WAAW,EAC1B,aAAa,EAAE,SAAS,CAAC,iBAAiB,CAAC,aAAa,EACxD,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CACG,CACP,CAAC;AACJ,CAAC","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 type {\n CustomFormatPropEditorSpec,\n QuantityTypeArg,\n} from \"@itwin/core-frontend\";\nimport {\n getQuantityTypeKey,\n IModelApp,\n isCheckboxFormatPropEditorSpec,\n isCustomQuantityTypeDefinition,\n isTextInputFormatPropEditorSpec,\n isTextSelectFormatPropEditorSpec,\n} from \"@itwin/core-frontend\";\nimport type {\n FormatProps,\n UnitProps,\n UnitsProvider,\n} from \"@itwin/core-quantity\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Checkbox, Input, Select } from \"@itwin/itwinui-react\";\nimport { FormatPanel } from \"./FormatPanel\";\nimport { DeepCompare } from \"@itwin/core-geometry\";\n\nfunction createTextInputFormatPropEditor(\n key: string,\n label: string,\n inProps: FormatProps,\n getString: (props: FormatProps) => string,\n setString: (props: FormatProps, value: string) => FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n) {\n const value = getString(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>\n {label}\n </span>\n <Input\n data-testid={`${key}-editor`}\n key={`${key}-editor`}\n value={value}\n size=\"small\"\n onChange={(e) => {\n const newProps = setString(inProps, e.currentTarget.value);\n fireFormatChange(newProps);\n }}\n />\n </React.Fragment>\n );\n}\nfunction createSelectFormatPropEditor(\n key: string,\n label: string,\n options: { label: string; value: string }[],\n inProps: FormatProps,\n getString: (props: FormatProps) => string,\n setString: (props: FormatProps, value: string) => FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n) {\n const value = getString(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>\n {label}\n </span>\n <Select\n data-testid={`${key}-editor`}\n key={`${key}-editor`}\n value={value}\n options={options}\n size={\"small\"}\n onChange={(newValue) => {\n const newProps = setString(inProps, newValue);\n fireFormatChange(newProps);\n }}\n />\n </React.Fragment>\n );\n}\n\nfunction createCheckboxFormatPropEditor(\n key: string,\n label: string,\n inProps: FormatProps,\n getBool: (props: FormatProps) => boolean,\n setBool: (props: FormatProps, isChecked: boolean) => FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n) {\n const isChecked = getBool(inProps);\n return (\n <React.Fragment key={`${key}`}>\n <span key={`${key}-label`} className={\"uicore-label\"}>\n {label}\n </span>\n <Checkbox\n data-testid={`${key}-editor`}\n key={`${key}-editor`}\n checked={isChecked}\n onChange={(e) => {\n const newProps = setBool(inProps, e.target.checked);\n fireFormatChange(newProps);\n }}\n />\n </React.Fragment>\n );\n}\n\nfunction formatAreEqual(obj1: FormatProps, obj2: FormatProps) {\n const compare = new DeepCompare();\n return compare.compare(obj1, obj2);\n}\n\n/** Properties of [[QuantityFormatPanel]] component.\n * @alpha\n */\nexport interface QuantityFormatPanelProps extends CommonProps {\n quantityType: QuantityTypeArg;\n onFormatChange?: (format: FormatProps) => void;\n /** props below are to be passed on to FormatPanel */\n showSample?: boolean;\n initialMagnitude?: number;\n enableMinimumProperties?: boolean;\n}\n\n/** Component to set properties that control Quantity Formatting.\n * @alpha\n */\nexport function QuantityFormatPanel(props: QuantityFormatPanelProps) {\n const { quantityType, onFormatChange, ...otherProps } = props;\n const [formatProps, setFormatProps] = React.useState<FormatProps>();\n const initialFormatProps = React.useRef<FormatProps>();\n\n const [persistenceUnit, setPersistenceUnit] = React.useState<UnitProps>();\n\n React.useEffect(() => {\n const newFormatProps =\n IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\n // istanbul ignore else\n if (!initialFormatProps.current)\n initialFormatProps.current = newFormatProps;\n setFormatProps(newFormatProps);\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition =\n IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n // istanbul ignore else\n if (quantityTypeDefinition)\n setPersistenceUnit(quantityTypeDefinition.persistenceUnit);\n else\n throw Error(`Unable to locate a quantity type with type ${quantityType}`);\n }, [quantityType]); // no dependencies defined as we want this to run on every render\n\n // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useEffect(() => {\n const newFormatProps =\n IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\n // istanbul ignore else\n if (initialFormatProps.current && newFormatProps) {\n if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {\n initialFormatProps.current = newFormatProps;\n setFormatProps(newFormatProps);\n }\n }\n }); // no dependencies defined as we want this to run on every render\n\n const handleOnFormatChanged = React.useCallback(\n async (newProps: FormatProps) => {\n setFormatProps(newProps);\n onFormatChange && onFormatChange(newProps);\n },\n [onFormatChange]\n );\n\n const createCustomPropEditors = React.useCallback(\n (\n specs: CustomFormatPropEditorSpec[],\n inProps: FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n ) => {\n return specs.map((spec, index) => {\n if (isCheckboxFormatPropEditorSpec(spec))\n return createCheckboxFormatPropEditor(\n `${spec.editorType}-${index}`,\n spec.label,\n inProps,\n spec.getBool,\n spec.setBool,\n fireFormatChange\n );\n if (isTextSelectFormatPropEditorSpec(spec))\n return createSelectFormatPropEditor(\n `${spec.editorType}-${index}`,\n spec.label,\n spec.selectOptions,\n inProps,\n spec.getString,\n spec.setString,\n fireFormatChange\n );\n /* istanbul ignore else */\n if (isTextInputFormatPropEditorSpec(spec))\n return createTextInputFormatPropEditor(\n `${spec.editorType}-${index}`,\n spec.label,\n inProps,\n spec.getString,\n spec.setString,\n fireFormatChange\n );\n /* istanbul ignore next */\n return <div key={index} />;\n });\n },\n []\n );\n\n const providePrimaryChildren = React.useCallback(\n (\n inProps: FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n ) => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition =\n IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n if (\n quantityTypeDefinition &&\n isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\n quantityTypeDefinition.isCompatibleFormatProps(inProps)\n ) {\n // istanbul ignore else\n if (quantityTypeDefinition.primaryPropEditorSpecs)\n return createCustomPropEditors(\n quantityTypeDefinition.primaryPropEditorSpecs,\n inProps,\n fireFormatChange\n );\n }\n return null;\n },\n [createCustomPropEditors, quantityType]\n );\n\n const provideSecondaryChildren = React.useCallback(\n (\n inProps: FormatProps,\n fireFormatChange: (newProps: FormatProps) => void\n ) => {\n const quantityTypeKey = getQuantityTypeKey(quantityType);\n const quantityTypeDefinition =\n IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\n if (\n quantityTypeDefinition &&\n isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\n quantityTypeDefinition.isCompatibleFormatProps(inProps)\n ) {\n // istanbul ignore else\n if (quantityTypeDefinition.secondaryPropEditorSpecs)\n return createCustomPropEditors(\n quantityTypeDefinition.secondaryPropEditorSpecs,\n inProps,\n fireFormatChange\n );\n }\n return null;\n },\n [createCustomPropEditors, quantityType]\n );\n\n const provideFormatSpec = React.useCallback(\n async (\n inProps: FormatProps,\n _persistenceUnit: UnitProps,\n _unitsProvider: UnitsProvider\n ) => {\n return IModelApp.quantityFormatter.generateFormatterSpecByType(\n quantityType,\n inProps\n );\n },\n [quantityType]\n );\n\n return (\n <div className=\"components-quantityFormat-quantityPanel\">\n {persistenceUnit && formatProps && (\n <FormatPanel\n onFormatChange={handleOnFormatChanged}\n {...otherProps}\n initialFormat={formatProps}\n unitsProvider={IModelApp.quantityFormatter.unitsProvider}\n persistenceUnit={persistenceUnit}\n providePrimaryChildren={providePrimaryChildren}\n provideSecondaryChildren={provideSecondaryChildren}\n provideFormatSpec={provideFormatSpec}\n />\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAyB5E"}
1
+ {"version":3,"file":"DecimalPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAmG5E"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -15,19 +15,58 @@ import { Select } from "@itwin/itwinui-react";
15
15
  export function DecimalPrecisionSelector(props) {
16
16
  const { precision, onChange, ...otherProps } = props;
17
17
  const options = React.useRef([
18
- { value: 0, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.zero") },
19
- { value: 1, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.one") },
20
- { value: 2, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.two") },
21
- { value: 3, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.three") },
22
- { value: 4, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.four") },
23
- { value: 5, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.five") },
24
- { value: 6, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.six") },
25
- { value: 7, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.seven") },
26
- { value: 8, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eight") },
27
- { value: 9, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.nine") },
28
- { value: 10, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.ten") },
29
- { value: 11, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eleven") },
30
- { value: 12, label: UiIModelComponents.translate("QuantityFormat.decimal_precision.twelve") },
18
+ {
19
+ value: 0,
20
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.zero"),
21
+ },
22
+ {
23
+ value: 1,
24
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.one"),
25
+ },
26
+ {
27
+ value: 2,
28
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.two"),
29
+ },
30
+ {
31
+ value: 3,
32
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.three"),
33
+ },
34
+ {
35
+ value: 4,
36
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.four"),
37
+ },
38
+ {
39
+ value: 5,
40
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.five"),
41
+ },
42
+ {
43
+ value: 6,
44
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.six"),
45
+ },
46
+ {
47
+ value: 7,
48
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.seven"),
49
+ },
50
+ {
51
+ value: 8,
52
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eight"),
53
+ },
54
+ {
55
+ value: 9,
56
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.nine"),
57
+ },
58
+ {
59
+ value: 10,
60
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.ten"),
61
+ },
62
+ {
63
+ value: 11,
64
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.eleven"),
65
+ },
66
+ {
67
+ value: 12,
68
+ label: UiIModelComponents.translate("QuantityFormat.decimal_precision.twelve"),
69
+ },
31
70
  ]);
32
71
  const handleOnChange = React.useCallback((newValue) => {
33
72
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QACzF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QACzF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QACzF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAAE;QAC1F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;KAC9F,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CAC9G,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[DecimalPrecisionSelector]] component.\r\n * @internal\r\n */\r\nexport interface DecimalPrecisionSelectorProps extends CommonProps {\r\n precision: number;\r\n onChange: (value: number) => void;\r\n}\r\n\r\n/** Component use to set Decimal Precision\r\n * the unit label.\r\n * @internal\r\n */\r\nexport function DecimalPrecisionSelector(props: DecimalPrecisionSelectorProps) {\r\n const { precision, onChange, ...otherProps } = props;\r\n const options = React.useRef<SelectOption<number>[]>([\r\n { value: 0, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.zero\") },\r\n { value: 1, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.one\") },\r\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.two\") },\r\n { value: 3, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.three\") },\r\n { value: 4, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.four\") },\r\n { value: 5, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.five\") },\r\n { value: 6, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.six\") },\r\n { value: 7, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.seven\") },\r\n { value: 8, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.eight\") },\r\n { value: 9, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.nine\") },\r\n { value: 10, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.ten\") },\r\n { value: 11, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.eleven\") },\r\n { value: 12, label: UiIModelComponents.translate(\"QuantityFormat.decimal_precision.twelve\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: number) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n return (\r\n <Select options={options.current} value={precision} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"DecimalPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalPrecision.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,sCAAsC,CACvC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,sCAAsC,CACvC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,sCAAsC,CACvC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,sCAAsC,CACvC;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,QAAgB,EAAE,EAAE;QACnB,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[DecimalPrecisionSelector]] component.\n * @internal\n */\nexport interface DecimalPrecisionSelectorProps extends CommonProps {\n precision: number;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Decimal Precision\n * the unit label.\n * @internal\n */\nexport function DecimalPrecisionSelector(props: DecimalPrecisionSelectorProps) {\n const { precision, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<number>[]>([\n {\n value: 0,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.zero\"\n ),\n },\n {\n value: 1,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.one\"\n ),\n },\n {\n value: 2,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.two\"\n ),\n },\n {\n value: 3,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.three\"\n ),\n },\n {\n value: 4,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.four\"\n ),\n },\n {\n value: 5,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.five\"\n ),\n },\n {\n value: 6,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.six\"\n ),\n },\n {\n value: 7,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.seven\"\n ),\n },\n {\n value: 8,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.eight\"\n ),\n },\n {\n value: 9,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.nine\"\n ),\n },\n {\n value: 10,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.ten\"\n ),\n },\n {\n value: 11,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.eleven\"\n ),\n },\n {\n value: 12,\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_precision.twelve\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: number) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={options.current}\n value={precision}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalSeparator.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAc5E"}
1
+ {"version":3,"file":"DecimalSeparator.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAiC5E"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -14,8 +14,14 @@ import { Select } from "@itwin/itwinui-react";
14
14
  export function DecimalSeparatorSelector(props) {
15
15
  const { separator, onChange, ...otherProps } = props;
16
16
  const options = React.useRef([
17
- { value: ".", label: UiIModelComponents.translate("QuantityFormat.decimal_separator.point") },
18
- { value: ",", label: UiIModelComponents.translate("QuantityFormat.decimal_separator.comma") },
17
+ {
18
+ value: ".",
19
+ label: UiIModelComponents.translate("QuantityFormat.decimal_separator.point"),
20
+ },
21
+ {
22
+ value: ",",
23
+ label: UiIModelComponents.translate("QuantityFormat.decimal_separator.comma"),
24
+ },
19
25
  ]);
20
26
  const handleOnChange = React.useCallback((newValue) => {
21
27
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalSeparator.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;KAC9F,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CAC9G,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[DecimalSeparatorSelector]] component.\r\n * @internal\r\n */\r\nexport interface DecimalSeparatorSelectorProps extends CommonProps {\r\n separator: string;\r\n disabled?: boolean;\r\n onChange: (value: string) => void;\r\n}\r\n\r\n/** Component use to set Decimal Separator\r\n * @internal\r\n */\r\nexport function DecimalSeparatorSelector(props: DecimalSeparatorSelectorProps) {\r\n const { separator, onChange, ...otherProps } = props;\r\n const options = React.useRef<SelectOption<string>[]>([\r\n { value: \".\", label: UiIModelComponents.translate(\"QuantityFormat.decimal_separator.point\") },\r\n { value: \",\", label: UiIModelComponents.translate(\"QuantityFormat.decimal_separator.comma\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: string) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n return (\r\n <Select options={options.current} value={separator} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"DecimalSeparator.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/DecimalSeparator.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,QAAgB,EAAE,EAAE;QACnB,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[DecimalSeparatorSelector]] component.\n * @internal\n */\nexport interface DecimalSeparatorSelectorProps extends CommonProps {\n separator: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n}\n\n/** Component use to set Decimal Separator\n * @internal\n */\nexport function DecimalSeparatorSelector(props: DecimalSeparatorSelectorProps) {\n const { separator, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<string>[]>([\n {\n value: \".\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_separator.point\"\n ),\n },\n {\n value: \",\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.decimal_separator.comma\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: string) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={options.current}\n value={separator}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FractionPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,WAAW;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,eAqB9E"}
1
+ {"version":3,"file":"FractionPrecision.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,WAAW;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,eA4EtC"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -14,15 +14,42 @@ import { Select } from "@itwin/itwinui-react";
14
14
  export function FractionPrecisionSelector(props) {
15
15
  const { precision, onChange, ...otherProps } = props;
16
16
  const options = React.useRef([
17
- { value: 1, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.whole") },
18
- { value: 2, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.half") },
19
- { value: 4, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.quarter") },
20
- { value: 8, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.eighth") },
21
- { value: 16, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.sixteenth") },
22
- { value: 32, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over32") },
23
- { value: 64, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over64") },
24
- { value: 128, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over128") },
25
- { value: 256, label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over256") },
17
+ {
18
+ value: 1,
19
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.whole"),
20
+ },
21
+ {
22
+ value: 2,
23
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.half"),
24
+ },
25
+ {
26
+ value: 4,
27
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.quarter"),
28
+ },
29
+ {
30
+ value: 8,
31
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.eighth"),
32
+ },
33
+ {
34
+ value: 16,
35
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.sixteenth"),
36
+ },
37
+ {
38
+ value: 32,
39
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over32"),
40
+ },
41
+ {
42
+ value: 64,
43
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over64"),
44
+ },
45
+ {
46
+ value: 128,
47
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over128"),
48
+ },
49
+ {
50
+ value: 256,
51
+ label: UiIModelComponents.translate("QuantityFormat.fraction_precision.over256"),
52
+ },
26
53
  ]);
27
54
  const handleOnChange = React.useCallback((newValue) => {
28
55
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"FractionPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAqC;IAC7E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAyB;QACnD,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QAC5F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,6CAA6C,CAAC,EAAE;QACjG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAChG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;KACjG,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CAC9G,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[FractionPrecisionSelector]] component.\r\n * @internal\r\n */\r\nexport interface FractionPrecisionSelectorProps extends CommonProps {\r\n precision: number;\r\n onChange: (value: number) => void;\r\n}\r\n\r\n/** Component use to set Fraction precision\r\n * @internal\r\n */\r\nexport function FractionPrecisionSelector(props: FractionPrecisionSelectorProps) {\r\n const { precision, onChange, ...otherProps } = props;\r\n const options = React.useRef<SelectOption<number>[]>([\r\n { value: 1, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.whole\") },\r\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.half\") },\r\n { value: 4, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.quarter\") },\r\n { value: 8, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.eighth\") },\r\n { value: 16, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.sixteenth\") },\r\n { value: 32, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over32\") },\r\n { value: 64, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over64\") },\r\n { value: 128, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over128\") },\r\n { value: 256, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over256\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: number) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n return (\r\n <Select options={options.current} value={precision} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"FractionPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAA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O,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[FractionPrecisionSelector]] component.\n * @internal\n */\nexport interface FractionPrecisionSelectorProps extends CommonProps {\n precision: number;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Fraction precision\n * @internal\n */\nexport function FractionPrecisionSelector(\n props: FractionPrecisionSelectorProps\n) {\n const { precision, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<number>[]>([\n {\n value: 1,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.whole\"\n ),\n },\n {\n value: 2,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.half\"\n ),\n },\n {\n value: 4,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.quarter\"\n ),\n },\n {\n value: 8,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.eighth\"\n ),\n },\n {\n value: 16,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.sixteenth\"\n ),\n },\n {\n value: 32,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.over32\"\n ),\n },\n {\n value: 64,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.over64\"\n ),\n },\n {\n value: 128,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.over128\"\n ),\n },\n {\n value: 256,\n label: UiIModelComponents.translate(\n \"QuantityFormat.fraction_precision.over256\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: number) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={options.current}\n value={precision}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ScientificType.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ScientificType.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,eAcxE"}
1
+ {"version":3,"file":"ScientificType.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ScientificType.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,eAiCxE"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -15,8 +15,14 @@ import { Select } from "@itwin/itwinui-react";
15
15
  export function ScientificTypeSelector(props) {
16
16
  const { type, onChange, ...otherProps } = props;
17
17
  const formatOptions = React.useRef([
18
- { value: ScientificType.Normalized, label: UiIModelComponents.translate("QuantityFormat.scientific-type.normalized") },
19
- { value: ScientificType.ZeroNormalized, label: UiIModelComponents.translate("QuantityFormat.scientific-type.zero-normalized") },
18
+ {
19
+ value: ScientificType.Normalized,
20
+ label: UiIModelComponents.translate("QuantityFormat.scientific-type.normalized"),
21
+ },
22
+ {
23
+ value: ScientificType.ZeroNormalized,
24
+ label: UiIModelComponents.translate("QuantityFormat.scientific-type.zero-normalized"),
25
+ },
20
26
  ]);
21
27
  const handleOnChange = React.useCallback((newValue) => {
22
28
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"ScientificType.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ScientificType.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACvE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAChD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAiC;QACjE,EAAE,KAAK,EAAE,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QACtH,EAAE,KAAK,EAAE,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,gDAAgD,CAAC,EAAE;KAChI,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAwB,EAAE,EAAE;QACpE,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CAC/G,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport { ScientificType } from \"@itwin/core-quantity\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[ScientificTypeSelector]] component.\r\n * @internal\r\n */\r\nexport interface ScientificTypeSelectorProps extends CommonProps {\r\n type: ScientificType;\r\n onChange: (value: ScientificType) => void;\r\n disabled?: boolean;\r\n}\r\n\r\n/** Component use to set Scientific type.\r\n * @internal\r\n */\r\nexport function ScientificTypeSelector(props: ScientificTypeSelectorProps) {\r\n const { type, onChange, ...otherProps } = props;\r\n const formatOptions = React.useRef<SelectOption<ScientificType>[]>([\r\n { value: ScientificType.Normalized, label: UiIModelComponents.translate(\"QuantityFormat.scientific-type.normalized\") },\r\n { value: ScientificType.ZeroNormalized, label: UiIModelComponents.translate(\"QuantityFormat.scientific-type.zero-normalized\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: ScientificType) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n return (\r\n <Select options={formatOptions.current} value={type} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"ScientificType.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ScientificType.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACvE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAChD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAiC;QACjE;YACE,KAAK,EAAE,cAAc,CAAC,UAAU;YAChC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,2CAA2C,CAC5C;SACF;QACD;YACE,KAAK,EAAE,cAAc,CAAC,cAAc;YACpC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,gDAAgD,CACjD;SACF;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,QAAwB,EAAE,EAAE;QAC3B,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,aAAa,CAAC,OAAO,EAC9B,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport { ScientificType } from \"@itwin/core-quantity\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[ScientificTypeSelector]] component.\n * @internal\n */\nexport interface ScientificTypeSelectorProps extends CommonProps {\n type: ScientificType;\n onChange: (value: ScientificType) => void;\n disabled?: boolean;\n}\n\n/** Component use to set Scientific type.\n * @internal\n */\nexport function ScientificTypeSelector(props: ScientificTypeSelectorProps) {\n const { type, onChange, ...otherProps } = props;\n const formatOptions = React.useRef<SelectOption<ScientificType>[]>([\n {\n value: ScientificType.Normalized,\n label: UiIModelComponents.translate(\n \"QuantityFormat.scientific-type.normalized\"\n ),\n },\n {\n value: ScientificType.ZeroNormalized,\n label: UiIModelComponents.translate(\n \"QuantityFormat.scientific-type.zero-normalized\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: ScientificType) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={formatOptions.current}\n value={type}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SignOption.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/SignOption.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAgBhE"}
1
+ {"version":3,"file":"SignOption.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/SignOption.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eA2ChE"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -15,10 +15,22 @@ import { Select } from "@itwin/itwinui-react";
15
15
  export function SignOptionSelector(props) {
16
16
  const { signOption, onChange, ...otherProps } = props;
17
17
  const options = React.useRef([
18
- { value: ShowSignOption.NoSign, label: UiIModelComponents.translate("QuantityFormat.sign_option.noSign") },
19
- { value: ShowSignOption.OnlyNegative, label: UiIModelComponents.translate("QuantityFormat.sign_option.onlyNegative") },
20
- { value: ShowSignOption.SignAlways, label: UiIModelComponents.translate("QuantityFormat.sign_option.signAlways") },
21
- { value: ShowSignOption.NegativeParentheses, label: UiIModelComponents.translate("QuantityFormat.sign_option.negativeParentheses") },
18
+ {
19
+ value: ShowSignOption.NoSign,
20
+ label: UiIModelComponents.translate("QuantityFormat.sign_option.noSign"),
21
+ },
22
+ {
23
+ value: ShowSignOption.OnlyNegative,
24
+ label: UiIModelComponents.translate("QuantityFormat.sign_option.onlyNegative"),
25
+ },
26
+ {
27
+ value: ShowSignOption.SignAlways,
28
+ label: UiIModelComponents.translate("QuantityFormat.sign_option.signAlways"),
29
+ },
30
+ {
31
+ value: ShowSignOption.NegativeParentheses,
32
+ label: UiIModelComponents.translate("QuantityFormat.sign_option.negativeParentheses"),
33
+ },
22
34
  ]);
23
35
  const handleOnChange = React.useCallback((newValue) => {
24
36
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"SignOption.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/SignOption.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiC;QAC3D,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC,EAAE;QAC1G,EAAE,KAAK,EAAE,cAAc,CAAC,YAAY,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QACtH,EAAE,KAAK,EAAE,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAClH,EAAE,KAAK,EAAE,cAAc,CAAC,mBAAmB,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,gDAAgD,CAAC,EAAE;KACrI,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAwB,EAAE,EAAE;QACpE,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CAC/G,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport { ShowSignOption } from \"@itwin/core-quantity\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[SignOptionSelector]] component.\r\n * @internal\r\n */\r\nexport interface SignOptionSelectorProps extends CommonProps {\r\n signOption: ShowSignOption;\r\n onChange: (value: ShowSignOption) => void;\r\n}\r\n\r\n/** Component use to set Sign option.\r\n * @internal\r\n */\r\nexport function SignOptionSelector(props: SignOptionSelectorProps) {\r\n const { signOption, onChange, ...otherProps } = props;\r\n const options = React.useRef<SelectOption<ShowSignOption>[]>([\r\n { value: ShowSignOption.NoSign, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.noSign\") },\r\n { value: ShowSignOption.OnlyNegative, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.onlyNegative\") },\r\n { value: ShowSignOption.SignAlways, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.signAlways\") },\r\n { value: ShowSignOption.NegativeParentheses, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.negativeParentheses\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: ShowSignOption) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n return (\r\n <Select options={options.current} value={signOption} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"SignOption.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/SignOption.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiC;QAC3D;YACE,KAAK,EAAE,cAAc,CAAC,MAAM;YAC5B,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC;SACzE;QACD;YACE,KAAK,EAAE,cAAc,CAAC,YAAY;YAClC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;QACD;YACE,KAAK,EAAE,cAAc,CAAC,UAAU;YAChC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,cAAc,CAAC,mBAAmB;YACzC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CACjC,gDAAgD,CACjD;SACF;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,QAAwB,EAAE,EAAE;QAC3B,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport { ShowSignOption } from \"@itwin/core-quantity\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[SignOptionSelector]] component.\n * @internal\n */\nexport interface SignOptionSelectorProps extends CommonProps {\n signOption: ShowSignOption;\n onChange: (value: ShowSignOption) => void;\n}\n\n/** Component use to set Sign option.\n * @internal\n */\nexport function SignOptionSelector(props: SignOptionSelectorProps) {\n const { signOption, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<ShowSignOption>[]>([\n {\n value: ShowSignOption.NoSign,\n label: UiIModelComponents.translate(\"QuantityFormat.sign_option.noSign\"),\n },\n {\n value: ShowSignOption.OnlyNegative,\n label: UiIModelComponents.translate(\n \"QuantityFormat.sign_option.onlyNegative\"\n ),\n },\n {\n value: ShowSignOption.SignAlways,\n label: UiIModelComponents.translate(\n \"QuantityFormat.sign_option.signAlways\"\n ),\n },\n {\n value: ShowSignOption.NegativeParentheses,\n label: UiIModelComponents.translate(\n \"QuantityFormat.sign_option.negativeParentheses\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: ShowSignOption) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n return (\n <Select\n options={options.current}\n value={signOption}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StationSeparatorSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSeparatorSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eA0B5E"}
1
+ {"version":3,"file":"StationSeparatorSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSeparatorSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eA2D5E"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -14,10 +14,22 @@ import { Select } from "@itwin/itwinui-react";
14
14
  export function StationSeparatorSelector(props) {
15
15
  const { separator, disabled, onChange, ...otherProps } = props;
16
16
  const uomDefaultEntries = React.useRef([
17
- { value: "+", label: UiIModelComponents.translate("QuantityFormat.station_separator.plus") },
18
- { value: "-", label: UiIModelComponents.translate("QuantityFormat.station_separator.minus") },
19
- { value: " ", label: UiIModelComponents.translate("QuantityFormat.station_separator.blank") },
20
- { value: "^", label: UiIModelComponents.translate("QuantityFormat.station_separator.caret") },
17
+ {
18
+ value: "+",
19
+ label: UiIModelComponents.translate("QuantityFormat.station_separator.plus"),
20
+ },
21
+ {
22
+ value: "-",
23
+ label: UiIModelComponents.translate("QuantityFormat.station_separator.minus"),
24
+ },
25
+ {
26
+ value: " ",
27
+ label: UiIModelComponents.translate("QuantityFormat.station_separator.blank"),
28
+ },
29
+ {
30
+ value: "^",
31
+ label: UiIModelComponents.translate("QuantityFormat.station_separator.caret"),
32
+ },
21
33
  ]);
22
34
  const handleOnChange = React.useCallback((newValue) => {
23
35
  onChange && onChange(newValue);
@@ -25,7 +37,8 @@ export function StationSeparatorSelector(props) {
25
37
  const separatorOptions = React.useMemo(() => {
26
38
  const completeListOfEntries = [];
27
39
  // istanbul ignore next (only used if format already has a character that does not match standard options)
28
- if (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {
40
+ if (undefined ===
41
+ uomDefaultEntries.current.find((option) => option.value === separator)) {
29
42
  completeListOfEntries.push({ value: separator, label: separator });
30
43
  }
31
44
  completeListOfEntries.push(...uomDefaultEntries.current);
@@ -1 +1 @@
1
- {"version":3,"file":"StationSeparatorSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSeparatorSelector.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAyB;QAC7D,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC5F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;KAC9F,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;QAC5D,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,qBAAqB,GAA2B,EAAE,CAAC;QACzD,0GAA0G;QAC1G,IAAI,SAAS,KAAK,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE;YACxF,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;SACpE;QACD,qBAAqB,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACzD,OAAO,qBAAqB,CAAC;IAC/B,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACL,oBAAC,MAAM,IAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CACnI,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\r\nimport type { SelectOption } from \"@itwin/itwinui-react\";\r\nimport { Select } from \"@itwin/itwinui-react\";\r\n\r\n/** Properties of [[StationSeparatorSelector]] component.\r\n * @internal\r\n */\r\nexport interface StationSeparatorSelectorProps extends CommonProps {\r\n separator: string;\r\n disabled: boolean;\r\n onChange: (value: string) => void;\r\n}\r\n\r\n/** Component use to setStation separator.\r\n * @internal\r\n */\r\nexport function StationSeparatorSelector(props: StationSeparatorSelectorProps) {\r\n const { separator, disabled, onChange, ...otherProps } = props;\r\n const uomDefaultEntries = React.useRef<SelectOption<string>[]>([\r\n { value: \"+\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.plus\") },\r\n { value: \"-\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.minus\") },\r\n { value: \" \", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.blank\") },\r\n { value: \"^\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.caret\") },\r\n ]);\r\n\r\n const handleOnChange = React.useCallback((newValue: string) => {\r\n onChange && onChange(newValue);\r\n }, [onChange]);\r\n\r\n const separatorOptions = React.useMemo(() => {\r\n const completeListOfEntries: SelectOption<string>[] = [];\r\n // istanbul ignore next (only used if format already has a character that does not match standard options)\r\n if (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {\r\n completeListOfEntries.push({ value: separator, label: separator });\r\n }\r\n completeListOfEntries.push(...uomDefaultEntries.current);\r\n return completeListOfEntries;\r\n }, [separator]);\r\n\r\n return (\r\n <Select options={separatorOptions} disabled={disabled} value={separator} onChange={handleOnChange} size=\"small\" {...otherProps} />\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"StationSeparatorSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSeparatorSelector.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAW9C;;GAEG;AACH,MAAM,UAAU,wBAAwB,CA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AC,MAAM,IACL,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC","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 type { CommonProps } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Select } from \"@itwin/itwinui-react\";\n\n/** Properties of [[StationSeparatorSelector]] component.\n * @internal\n */\nexport interface StationSeparatorSelectorProps extends CommonProps {\n separator: string;\n disabled: boolean;\n onChange: (value: string) => void;\n}\n\n/** Component use to setStation separator.\n * @internal\n */\nexport function StationSeparatorSelector(props: StationSeparatorSelectorProps) {\n const { separator, disabled, onChange, ...otherProps } = props;\n const uomDefaultEntries = React.useRef<SelectOption<string>[]>([\n {\n value: \"+\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.station_separator.plus\"\n ),\n },\n {\n value: \"-\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.station_separator.minus\"\n ),\n },\n {\n value: \" \",\n label: UiIModelComponents.translate(\n \"QuantityFormat.station_separator.blank\"\n ),\n },\n {\n value: \"^\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.station_separator.caret\"\n ),\n },\n ]);\n\n const handleOnChange = React.useCallback(\n (newValue: string) => {\n onChange && onChange(newValue);\n },\n [onChange]\n );\n\n const separatorOptions = React.useMemo(() => {\n const completeListOfEntries: SelectOption<string>[] = [];\n // istanbul ignore next (only used if format already has a character that does not match standard options)\n if (\n undefined ===\n uomDefaultEntries.current.find((option) => option.value === separator)\n ) {\n completeListOfEntries.push({ value: separator, label: separator });\n }\n completeListOfEntries.push(...uomDefaultEntries.current);\n return completeListOfEntries;\n }, [separator]);\n\n return (\n <Select\n options={separatorOptions}\n disabled={disabled}\n value={separator}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StationSizeSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSizeSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAclE"}
1
+ {"version":3,"file":"StationSizeSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSizeSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eA8BlE"}
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  /** @packageDocumentation
6
6
  * @module QuantityFormat
7
7
  */
@@ -14,8 +14,14 @@ import { Select } from "@itwin/itwinui-react";
14
14
  export function StationSizeSelector(props) {
15
15
  const { value, disabled, onChange, ...otherProps } = props;
16
16
  const separatorOptions = React.useRef([
17
- { value: 2, label: UiIModelComponents.translate("QuantityFormat.station_size.two") },
18
- { value: 3, label: UiIModelComponents.translate("QuantityFormat.station_size.three") },
17
+ {
18
+ value: 2,
19
+ label: UiIModelComponents.translate("QuantityFormat.station_size.two"),
20
+ },
21
+ {
22
+ value: 3,
23
+ label: UiIModelComponents.translate("QuantityFormat.station_size.three"),
24
+ },
19
25
  ]);
20
26
  const handleOnChange = React.useCallback((newValue) => {
21
27
  onChange && onChange(newValue);