@itwin/imodel-components-react 4.1.0-dev.1 → 4.2.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/CHANGELOG.md +327 -319
  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 +11 -6
  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 +15 -7
  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 +10 -8
  14. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  17. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +6 -8
  18. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +11 -12
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
  24. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  25. package/lib/cjs/imodel-components-react/color/HueSlider.js +32 -15
  26. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.scss +27 -10
  28. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  29. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +14 -11
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  32. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +5 -4
  33. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
  34. package/lib/cjs/imodel-components-react/color/Swatch.js +5 -8
  35. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  36. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  37. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  38. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  40. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +17 -9
  41. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  43. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +8 -6
  44. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  45. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  46. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  47. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +18 -12
  48. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  50. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  51. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +35 -21
  52. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  53. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  54. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +12 -16
  55. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  56. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  57. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  58. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  59. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  60. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +31 -11
  61. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  63. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +98 -39
  64. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  65. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  66. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +171 -66
  67. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  68. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  69. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +19 -12
  70. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  71. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  72. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -6
  73. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  74. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  75. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +12 -8
  76. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  77. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  78. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +31 -10
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -8
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +34 -22
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +61 -38
  88. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  89. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  91. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  92. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  94. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  95. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  97. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  98. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  100. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  101. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +21 -10
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  122. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  123. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +15 -7
  124. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  125. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  126. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  127. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  128. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  129. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +7 -4
  130. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  131. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +4 -4
  132. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  133. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +3 -3
  134. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  136. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  137. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +32 -17
  138. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  139. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  140. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +61 -27
  141. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  142. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  143. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  144. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  145. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +4 -4
  146. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +124 -124
  147. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  148. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +56 -29
  149. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  150. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +4 -4
  151. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  152. package/lib/cjs/imodel-components-react/timeline/interfaces.js +3 -3
  153. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  154. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  155. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  156. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +40 -26
  157. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  158. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  159. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  160. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  161. package/lib/cjs/imodel-components-react.js +3 -3
  162. package/lib/cjs/imodel-components-react.js.map +1 -1
  163. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  164. package/lib/esm/imodel-components-react/UiIModelComponents.js +11 -6
  165. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  166. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  167. package/lib/esm/imodel-components-react/color/AlphaSlider.js +23 -17
  168. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  169. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +15 -7
  170. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
  171. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  172. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +10 -8
  173. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  174. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  175. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  176. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +7 -9
  177. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  178. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  179. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  180. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +13 -14
  181. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  182. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
  183. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  184. package/lib/esm/imodel-components-react/color/HueSlider.js +32 -15
  185. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  186. package/lib/esm/imodel-components-react/color/HueSlider.scss +27 -10
  187. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  188. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  189. package/lib/esm/imodel-components-react/color/SaturationPicker.js +14 -11
  190. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  191. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +5 -4
  192. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
  193. package/lib/esm/imodel-components-react/color/Swatch.js +5 -8
  194. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  195. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  196. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  197. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  198. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  199. package/lib/esm/imodel-components-react/editors/ColorEditor.js +18 -10
  200. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  201. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  202. package/lib/esm/imodel-components-react/editors/WeightEditor.js +10 -8
  203. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  204. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  205. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  206. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +18 -12
  207. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  208. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  209. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  210. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +37 -23
  211. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  212. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  213. package/lib/esm/imodel-components-react/lineweight/Swatch.js +12 -16
  214. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  215. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  216. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  217. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  218. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  219. package/lib/esm/imodel-components-react/navigationaids/Cube.js +31 -11
  220. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  221. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  222. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +100 -41
  223. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  224. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  225. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +173 -68
  226. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  227. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  228. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +19 -12
  229. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  230. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  231. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -6
  232. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  233. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  234. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +12 -8
  235. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  236. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  237. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +31 -10
  238. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  239. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  240. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +15 -8
  241. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  242. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  243. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +34 -22
  244. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  245. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  246. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +61 -38
  247. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  248. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  249. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  250. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  251. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  252. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  253. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  254. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  255. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  256. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  257. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  258. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  259. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  261. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  262. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  263. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  264. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  265. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  267. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  268. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  270. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  271. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  272. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  273. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  274. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  275. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  276. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +21 -10
  277. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  278. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  279. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  280. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  281. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  282. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +16 -8
  283. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  284. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  285. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  286. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  287. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  288. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +7 -4
  289. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  290. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +4 -4
  291. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  292. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +3 -3
  293. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  294. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  295. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  296. package/lib/esm/imodel-components-react/timeline/Scrubber.js +32 -17
  297. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  298. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  299. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +63 -29
  300. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  301. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  302. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  303. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  304. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +4 -4
  305. package/lib/esm/imodel-components-react/timeline/Timeline.scss +124 -124
  306. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  307. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +58 -31
  308. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  309. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +4 -4
  310. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  311. package/lib/esm/imodel-components-react/timeline/interfaces.js +3 -3
  312. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  313. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  314. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  315. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +42 -28
  316. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  317. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  318. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  319. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  320. package/lib/esm/imodel-components-react.js +3 -3
  321. package/lib/esm/imodel-components-react.js.map +1 -1
  322. package/package.json +15 -24
@@ -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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -40,15 +40,42 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
40
40
  function FractionPrecisionSelector(props) {
41
41
  const { precision, onChange, ...otherProps } = props;
42
42
  const options = React.useRef([
43
- { value: 1, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.whole") },
44
- { value: 2, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.half") },
45
- { value: 4, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.quarter") },
46
- { value: 8, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.eighth") },
47
- { value: 16, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.sixteenth") },
48
- { value: 32, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over32") },
49
- { value: 64, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over64") },
50
- { value: 128, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over128") },
51
- { value: 256, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over256") },
43
+ {
44
+ value: 1,
45
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.whole"),
46
+ },
47
+ {
48
+ value: 2,
49
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.half"),
50
+ },
51
+ {
52
+ value: 4,
53
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.quarter"),
54
+ },
55
+ {
56
+ value: 8,
57
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.eighth"),
58
+ },
59
+ {
60
+ value: 16,
61
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.sixteenth"),
62
+ },
63
+ {
64
+ value: 32,
65
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over32"),
66
+ },
67
+ {
68
+ value: 64,
69
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over64"),
70
+ },
71
+ {
72
+ value: 128,
73
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over128"),
74
+ },
75
+ {
76
+ value: 256,
77
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.fraction_precision.over256"),
78
+ },
52
79
  ]);
53
80
  const handleOnChange = React.useCallback((newValue) => {
54
81
  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,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAU9C;;GAEG;AACH,SAAgB,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,uCAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QAC5F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC3F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,6CAA6C,CAAC,EAAE;QACjG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,0CAA0C,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QAChG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,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,sBAAM,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;AArBD,8DAqBC","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(props: FractionPrecisionSelectorProps) {\n const { precision, onChange, ...otherProps } = props;\n const options = React.useRef<SelectOption<number>[]>([\n { value: 1, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.whole\") },\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.half\") },\n { value: 4, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.quarter\") },\n { value: 8, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.eighth\") },\n { value: 16, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.sixteenth\") },\n { value: 32, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over32\") },\n { value: 64, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over64\") },\n { value: 128, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over128\") },\n { value: 256, label: UiIModelComponents.translate(\"QuantityFormat.fraction_precision.over256\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: number) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={options.current} value={precision} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"FractionPrecision.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/FractionPrecision.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAU9C;;GAEG;AACH,SAAgB,yBAAyB,CACvC,KAAqC;IAErC,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,uCAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,2CAA2C,CAC5C;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,0CAA0C,CAC3C;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,6CAA6C,CAC9C;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,0CAA0C,CAC3C;SACF;QACD;YACE,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,0CAA0C,CAC3C;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,2CAA2C,CAC5C;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,2CAA2C,CAC5C;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,sBAAM,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;AA7ED,8DA6EC","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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -41,8 +41,14 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
41
41
  function ScientificTypeSelector(props) {
42
42
  const { type, onChange, ...otherProps } = props;
43
43
  const formatOptions = React.useRef([
44
- { value: core_quantity_1.ScientificType.Normalized, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.scientific-type.normalized") },
45
- { value: core_quantity_1.ScientificType.ZeroNormalized, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.scientific-type.zero-normalized") },
44
+ {
45
+ value: core_quantity_1.ScientificType.Normalized,
46
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.scientific-type.normalized"),
47
+ },
48
+ {
49
+ value: core_quantity_1.ScientificType.ZeroNormalized,
50
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.scientific-type.zero-normalized"),
51
+ },
46
52
  ]);
47
53
  const handleOnChange = React.useCallback((newValue) => {
48
54
  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,6CAA+B;AAE/B,iEAA8D;AAC9D,wDAAsD;AAEtD,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,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,8BAAc,CAAC,UAAU,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,2CAA2C,CAAC,EAAE;QACtH,EAAE,KAAK,EAAE,8BAAc,CAAC,cAAc,EAAE,KAAK,EAAE,uCAAkB,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,sBAAM,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;AAdD,wDAcC","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 { value: ScientificType.Normalized, label: UiIModelComponents.translate(\"QuantityFormat.scientific-type.normalized\") },\n { value: ScientificType.ZeroNormalized, label: UiIModelComponents.translate(\"QuantityFormat.scientific-type.zero-normalized\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: ScientificType) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={formatOptions.current} value={type} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"ScientificType.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ScientificType.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAC9D,wDAAsD;AAEtD,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,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,8BAAc,CAAC,UAAU;YAChC,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,2CAA2C,CAC5C;SACF;QACD;YACE,KAAK,EAAE,8BAAc,CAAC,cAAc;YACpC,KAAK,EAAE,uCAAkB,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,sBAAM,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;AAjCD,wDAiCC","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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -41,10 +41,22 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
41
41
  function SignOptionSelector(props) {
42
42
  const { signOption, onChange, ...otherProps } = props;
43
43
  const options = React.useRef([
44
- { value: core_quantity_1.ShowSignOption.NoSign, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.noSign") },
45
- { value: core_quantity_1.ShowSignOption.OnlyNegative, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.onlyNegative") },
46
- { value: core_quantity_1.ShowSignOption.SignAlways, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.signAlways") },
47
- { value: core_quantity_1.ShowSignOption.NegativeParentheses, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.negativeParentheses") },
44
+ {
45
+ value: core_quantity_1.ShowSignOption.NoSign,
46
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.noSign"),
47
+ },
48
+ {
49
+ value: core_quantity_1.ShowSignOption.OnlyNegative,
50
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.onlyNegative"),
51
+ },
52
+ {
53
+ value: core_quantity_1.ShowSignOption.SignAlways,
54
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.signAlways"),
55
+ },
56
+ {
57
+ value: core_quantity_1.ShowSignOption.NegativeParentheses,
58
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.sign_option.negativeParentheses"),
59
+ },
48
60
  ]);
49
61
  const handleOnChange = React.useCallback((newValue) => {
50
62
  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,6CAA+B;AAE/B,iEAA8D;AAC9D,wDAAsD;AAEtD,wDAA8C;AAU9C;;GAEG;AACH,SAAgB,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,8BAAc,CAAC,MAAM,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC,EAAE;QAC1G,EAAE,KAAK,EAAE,8BAAc,CAAC,YAAY,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QACtH,EAAE,KAAK,EAAE,8BAAc,CAAC,UAAU,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAClH,EAAE,KAAK,EAAE,8BAAc,CAAC,mBAAmB,EAAE,KAAK,EAAE,uCAAkB,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,sBAAM,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;AAhBD,gDAgBC","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 { value: ShowSignOption.NoSign, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.noSign\") },\n { value: ShowSignOption.OnlyNegative, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.onlyNegative\") },\n { value: ShowSignOption.SignAlways, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.signAlways\") },\n { value: ShowSignOption.NegativeParentheses, label: UiIModelComponents.translate(\"QuantityFormat.sign_option.negativeParentheses\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: ShowSignOption) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={options.current} value={signOption} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"SignOption.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/SignOption.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAC9D,wDAAsD;AAEtD,wDAA8C;AAU9C;;GAEG;AACH,SAAgB,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,8BAAc,CAAC,MAAM;YAC5B,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC;SACzE;QACD;YACE,KAAK,EAAE,8BAAc,CAAC,YAAY;YAClC,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;QACD;YACE,KAAK,EAAE,8BAAc,CAAC,UAAU;YAChC,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,8BAAc,CAAC,mBAAmB;YACzC,KAAK,EAAE,uCAAkB,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,sBAAM,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;AA3CD,gDA2CC","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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -40,10 +40,22 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
40
40
  function StationSeparatorSelector(props) {
41
41
  const { separator, disabled, onChange, ...otherProps } = props;
42
42
  const uomDefaultEntries = React.useRef([
43
- { value: "+", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.plus") },
44
- { value: "-", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.minus") },
45
- { value: " ", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.blank") },
46
- { value: "^", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.caret") },
43
+ {
44
+ value: "+",
45
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.plus"),
46
+ },
47
+ {
48
+ value: "-",
49
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.minus"),
50
+ },
51
+ {
52
+ value: " ",
53
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.blank"),
54
+ },
55
+ {
56
+ value: "^",
57
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_separator.caret"),
58
+ },
47
59
  ]);
48
60
  const handleOnChange = React.useCallback((newValue) => {
49
61
  onChange && onChange(newValue);
@@ -51,7 +63,8 @@ function StationSeparatorSelector(props) {
51
63
  const separatorOptions = React.useMemo(() => {
52
64
  const completeListOfEntries = [];
53
65
  // istanbul ignore next (only used if format already has a character that does not match standard options)
54
- if (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {
66
+ if (undefined ===
67
+ uomDefaultEntries.current.find((option) => option.value === separator)) {
55
68
  completeListOfEntries.push({ value: separator, label: separator });
56
69
  }
57
70
  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,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,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,uCAAkB,CAAC,SAAS,CAAC,uCAAuC,CAAC,EAAE;QAC5F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAAE;QAC7F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,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,sBAAM,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;AA1BD,4DA0BC","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 { value: \"+\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.plus\") },\n { value: \"-\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.minus\") },\n { value: \" \", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.blank\") },\n { value: \"^\", label: UiIModelComponents.translate(\"QuantityFormat.station_separator.caret\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: string) => {\n onChange && onChange(newValue);\n }, [onChange]);\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 (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {\n completeListOfEntries.push({ value: separator, label: separator });\n }\n completeListOfEntries.push(...uomDefaultEntries.current);\n return completeListOfEntries;\n }, [separator]);\n\n return (\n <Select options={separatorOptions} disabled={disabled} value={separator} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"StationSeparatorSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSeparatorSelector.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,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;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,uCAAuC,CACxC;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,wCAAwC,CACzC;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,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,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,qBAAqB,GAA2B,EAAE,CAAC;QACzD,0GAA0G;QAC1G,IACE,SAAS;YACT,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,EACtE;YACA,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,sBAAM,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;AA3DD,4DA2DC","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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -40,8 +40,14 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
40
40
  function StationSizeSelector(props) {
41
41
  const { value, disabled, onChange, ...otherProps } = props;
42
42
  const separatorOptions = React.useRef([
43
- { value: 2, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_size.two") },
44
- { value: 3, label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_size.three") },
43
+ {
44
+ value: 2,
45
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_size.two"),
46
+ },
47
+ {
48
+ value: 3,
49
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.station_size.three"),
50
+ },
45
51
  ]);
46
52
  const handleOnChange = React.useCallback((newValue) => {
47
53
  onChange && onChange(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"StationSizeSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSizeSelector.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,mBAAmB,CAAC,KAA+B;IACjE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3D,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAyB;QAC5D,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC,EAAE;QACpF,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC,EAAE;KACvF,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,sBAAM,IAAC,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAC,OAAO,KAAK,UAAU,GAAI,CACvI,CAAC;AACJ,CAAC;AAdD,kDAcC","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 [[StationSizeSelector]] component.\n * @internal\n */\nexport interface StationSizeSelectorProps extends CommonProps {\n value: number;\n disabled: boolean;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Station size (number of digits from right until '+').\n * @internal\n */\nexport function StationSizeSelector(props: StationSizeSelectorProps) {\n const { value, disabled, onChange, ...otherProps } = props;\n const separatorOptions = React.useRef<SelectOption<number>[]>([\n { value: 2, label: UiIModelComponents.translate(\"QuantityFormat.station_size.two\") },\n { value: 3, label: UiIModelComponents.translate(\"QuantityFormat.station_size.three\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: number) => {\n onChange && onChange(newValue);\n }, [onChange]);\n\n return (\n <Select options={separatorOptions.current} disabled={disabled} value={value} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"StationSizeSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/StationSizeSelector.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,mBAAmB,CAAC,KAA+B;IACjE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3D,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAyB;QAC5D;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC;SACvE;QACD;YACE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,mCAAmC,CAAC;SACzE;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,sBAAM,IACL,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAC;AACJ,CAAC;AA9BD,kDA8BC","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 [[StationSizeSelector]] component.\n * @internal\n */\nexport interface StationSizeSelectorProps extends CommonProps {\n value: number;\n disabled: boolean;\n onChange: (value: number) => void;\n}\n\n/** Component use to set Station size (number of digits from right until '+').\n * @internal\n */\nexport function StationSizeSelector(props: StationSizeSelectorProps) {\n const { value, disabled, onChange, ...otherProps } = props;\n const separatorOptions = React.useRef<SelectOption<number>[]>([\n {\n value: 2,\n label: UiIModelComponents.translate(\"QuantityFormat.station_size.two\"),\n },\n {\n value: 3,\n label: UiIModelComponents.translate(\"QuantityFormat.station_size.three\"),\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={separatorOptions.current}\n disabled={disabled}\n value={value}\n onChange={handleOnChange}\n size=\"small\"\n {...otherProps}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ThousandsSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAwB9D"}
1
+ {"version":3,"file":"ThousandsSelector.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSelector.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eA+C9D"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -40,8 +40,14 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
40
40
  function ThousandsSelector(props) {
41
41
  const { separator, disabled, onChange, ...otherProps } = props;
42
42
  const uomDefaultEntries = React.useRef([
43
- { value: ",", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.thousand_separator.comma") },
44
- { value: ".", label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.thousand_separator.point") },
43
+ {
44
+ value: ",",
45
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.thousand_separator.comma"),
46
+ },
47
+ {
48
+ value: ".",
49
+ label: UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.thousand_separator.point"),
50
+ },
45
51
  ]);
46
52
  const handleOnChange = React.useCallback((newValue) => {
47
53
  onChange && onChange(newValue);
@@ -49,7 +55,8 @@ function ThousandsSelector(props) {
49
55
  const separatorOptions = React.useMemo(() => {
50
56
  const completeListOfEntries = [];
51
57
  // istanbul ignore next (only used if format already has a character that does not match standard options)
52
- if (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {
58
+ if (undefined ===
59
+ uomDefaultEntries.current.find((option) => option.value === separator)) {
53
60
  completeListOfEntries.push({ value: separator, label: separator });
54
61
  }
55
62
  completeListOfEntries.push(...uomDefaultEntries.current);
@@ -1 +1 @@
1
- {"version":3,"file":"ThousandsSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSelector.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,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,uCAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;QAC9F,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uCAAkB,CAAC,SAAS,CAAC,yCAAyC,CAAC,EAAE;KAC/F,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,sBAAM,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;AAxBD,8CAwBC","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 [[ThousandsSelector]] component.\n * @internal\n */\nexport interface ThousandsSelectorProps extends CommonProps {\n separator: string;\n disabled: boolean;\n onChange: (value: string) => void;\n}\n\n/** Component use to set Quantity Format thousand group separator.\n * @internal\n */\nexport function ThousandsSelector(props: ThousandsSelectorProps) {\n const { separator, disabled, onChange, ...otherProps } = props;\n const uomDefaultEntries = React.useRef<SelectOption<string>[]>([\n { value: \",\", label: UiIModelComponents.translate(\"QuantityFormat.thousand_separator.comma\") },\n { value: \".\", label: UiIModelComponents.translate(\"QuantityFormat.thousand_separator.point\") },\n ]);\n\n const handleOnChange = React.useCallback((newValue: string) => {\n onChange && onChange(newValue);\n }, [onChange]);\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 (undefined === uomDefaultEntries.current.find((option) => option.value === separator)) {\n completeListOfEntries.push({ value: separator, label: separator });\n }\n completeListOfEntries.push(...uomDefaultEntries.current);\n return completeListOfEntries;\n }, [separator]);\n\n return (\n <Select options={separatorOptions} disabled={disabled} value={separator} onChange={handleOnChange} size=\"small\" {...otherProps} />\n );\n}\n"]}
1
+ {"version":3,"file":"ThousandsSelector.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSelector.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,iEAA8D;AAE9D,wDAA8C;AAW9C;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAyB;QAC7D;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,CAAC,SAAS,CACjC,yCAAyC,CAC1C;SACF;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,uCAAkB,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,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,qBAAqB,GAA2B,EAAE,CAAC;QACzD,0GAA0G;QAC1G,IACE,SAAS;YACT,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,EACtE;YACA,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,sBAAM,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;AA/CD,8CA+CC","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 [[ThousandsSelector]] component.\n * @internal\n */\nexport interface ThousandsSelectorProps extends CommonProps {\n separator: string;\n disabled: boolean;\n onChange: (value: string) => void;\n}\n\n/** Component use to set Quantity Format thousand group separator.\n * @internal\n */\nexport function ThousandsSelector(props: ThousandsSelectorProps) {\n const { separator, disabled, onChange, ...otherProps } = props;\n const uomDefaultEntries = React.useRef<SelectOption<string>[]>([\n {\n value: \",\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.thousand_separator.comma\"\n ),\n },\n {\n value: \".\",\n label: UiIModelComponents.translate(\n \"QuantityFormat.thousand_separator.point\"\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":"ThousandsSeparator.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAMvD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eA4DhE"}
1
+ {"version":3,"file":"ThousandsSeparator.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSeparator.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMxD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAgHhE"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module QuantityFormat
8
8
  */
@@ -52,17 +52,23 @@ function ThousandsSeparator(props) {
52
52
  const setFormatTrait = React.useCallback((trait, setActive) => {
53
53
  const traitStr = (0, core_quantity_1.getTraitString)(trait);
54
54
  let formatTraits = [traitStr];
55
- if (setActive) { // setting trait
55
+ if (setActive) {
56
+ // setting trait
56
57
  // istanbul ignore else
57
58
  if (formatProps.formatTraits) {
58
- const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
59
+ const traits = Array.isArray(formatProps.formatTraits)
60
+ ? formatProps.formatTraits
61
+ : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
59
62
  formatTraits = [...traits, traitStr];
60
63
  }
61
64
  }
62
- else { // clearing trait
65
+ else {
66
+ // clearing trait
63
67
  // istanbul ignore else
64
68
  if (formatProps.formatTraits) {
65
- const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
69
+ const traits = Array.isArray(formatProps.formatTraits)
70
+ ? formatProps.formatTraits
71
+ : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\|/);
66
72
  formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);
67
73
  }
68
74
  }
@@ -82,10 +88,15 @@ function ThousandsSeparator(props) {
82
88
  if (isFormatTraitSet(core_quantity_1.FormatTraits.Use1000Separator)) {
83
89
  if (thousandSeparator === ".")
84
90
  decimalSeparator = ",";
85
- else // thousandSeparator === ","
91
+ // thousandSeparator === ","
92
+ else
86
93
  decimalSeparator = ".";
87
94
  }
88
- const newFormatProps = { ...formatProps, thousandSeparator, decimalSeparator };
95
+ const newFormatProps = {
96
+ ...formatProps,
97
+ thousandSeparator,
98
+ decimalSeparator,
99
+ };
89
100
  handleSetFormatProps(newFormatProps);
90
101
  }, [formatProps, isFormatTraitSet, handleSetFormatProps]);
91
102
  const useThousandSeparatorLabel = React.useRef(UiIModelComponents_1.UiIModelComponents.translate("QuantityFormat.labels.useThousandSeparatorLabel"));
@@ -93,7 +104,7 @@ function ThousandsSeparator(props) {
93
104
  return (React.createElement(React.Fragment, null,
94
105
  React.createElement("span", { className: "uicore-label" }, useThousandSeparatorLabel.current),
95
106
  React.createElement(itwinui_react_1.Checkbox, { "data-testid": "use-thousands-separator", checked: isFormatTraitSet(core_quantity_1.FormatTraits.Use1000Separator), onChange: handleUseThousandsSeparatorChange }),
96
- React.createElement("span", { className: (0, classnames_1.default)("uicore-label", !(isFormatTraitSet(core_quantity_1.FormatTraits.Use1000Separator)) && "uicore-disabled") }, thousandSeparatorLabel.current),
107
+ React.createElement("span", { className: (0, classnames_1.default)("uicore-label", !isFormatTraitSet(core_quantity_1.FormatTraits.Use1000Separator) && "uicore-disabled") }, thousandSeparatorLabel.current),
97
108
  React.createElement(ThousandsSelector_1.ThousandsSelector, { "data-testid": "thousands-separator-selector", separator: (_a = formatProps.thousandSeparator) !== null && _a !== void 0 ? _a : ",", disabled: !isFormatTraitSet(core_quantity_1.FormatTraits.Use1000Separator), onChange: handleThousandSeparatorChange })));
98
109
  }
99
110
  exports.ThousandsSeparator = ThousandsSeparator;
@@ -1 +1 @@
1
- {"version":3,"file":"ThousandsSeparator.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSeparator.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module QuantityFormat\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { FormatProps} from \"@itwin/core-quantity\";\nimport { Format, FormatTraits, getTraitString } from \"@itwin/core-quantity\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport { ThousandsSelector } from \"./ThousandsSelector\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\n\n/** Properties of [[ThousandsSeparator]] component.\n * @internal\n */\nexport interface ThousandsSeparatorProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n}\n\n/** Component use to set Quantity Format thousand group separator.\n * @internal\n */\nexport function ThousandsSeparator(props: ThousandsSeparatorProps) {\n const { formatProps, onChange } = props;\n\n const handleSetFormatProps = React.useCallback((newProps: FormatProps) => {\n onChange && onChange(newProps);\n }, [onChange]);\n\n const setFormatTrait = React.useCallback((trait: FormatTraits, setActive: boolean) => {\n const traitStr = getTraitString(trait);\n let formatTraits: string[] = [traitStr];\n if (setActive) {// setting trait\n // istanbul ignore else\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\\|/);\n formatTraits = [...traits, traitStr];\n }\n } else { // clearing trait\n // istanbul ignore else\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits) ? formatProps.formatTraits : /* istanbul ignore next */ formatProps.formatTraits.split(/,|;|\\|/);\n formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);\n }\n }\n const newFormatProps = { ...formatProps, formatTraits };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, handleSetFormatProps]);\n\n const handleUseThousandsSeparatorChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.Use1000Separator, e.target.checked);\n }, [setFormatTrait]);\n\n const isFormatTraitSet = React.useCallback((trait: FormatTraits) => {\n return Format.isFormatTraitSetInProps(formatProps, trait);\n }, [formatProps]);\n\n const handleThousandSeparatorChange = React.useCallback((thousandSeparator: string) => {\n let decimalSeparator = formatProps.decimalSeparator;\n // make sure 1000 and decimal separator do not match\n // istanbul ignore else\n if (isFormatTraitSet(FormatTraits.Use1000Separator)) {\n if (thousandSeparator === \".\")\n decimalSeparator = \",\";\n else // thousandSeparator === \",\"\n decimalSeparator = \".\";\n }\n const newFormatProps = { ...formatProps, thousandSeparator, decimalSeparator };\n handleSetFormatProps(newFormatProps);\n }, [formatProps, isFormatTraitSet, handleSetFormatProps]);\n\n const useThousandSeparatorLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.useThousandSeparatorLabel\"));\n const thousandSeparatorLabel = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.thousandSeparatorLabel\"));\n\n return (\n <>\n <span className={\"uicore-label\"}>{useThousandSeparatorLabel.current}</span>\n <Checkbox data-testid=\"use-thousands-separator\" checked={isFormatTraitSet(FormatTraits.Use1000Separator)} onChange={handleUseThousandsSeparatorChange} />\n <span className={classnames(\"uicore-label\", !(isFormatTraitSet(FormatTraits.Use1000Separator)) && \"uicore-disabled\")}>{thousandSeparatorLabel.current}</span>\n <ThousandsSelector data-testid=\"thousands-separator-selector\" separator={formatProps.thousandSeparator ?? \",\"} disabled={!isFormatTraitSet(FormatTraits.Use1000Separator)} onChange={handleThousandSeparatorChange} />\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"ThousandsSeparator.js","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/ThousandsSeparator.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module QuantityFormat\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { FormatProps } from \"@itwin/core-quantity\";\nimport { Format, FormatTraits, getTraitString } from \"@itwin/core-quantity\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport { ThousandsSelector } from \"./ThousandsSelector\";\nimport { UiIModelComponents } from \"../../UiIModelComponents\";\n\n/** Properties of [[ThousandsSeparator]] component.\n * @internal\n */\nexport interface ThousandsSeparatorProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n}\n\n/** Component use to set Quantity Format thousand group separator.\n * @internal\n */\nexport function ThousandsSeparator(props: ThousandsSeparatorProps) {\n const { formatProps, onChange } = props;\n\n const handleSetFormatProps = React.useCallback(\n (newProps: FormatProps) => {\n onChange && onChange(newProps);\n },\n [onChange]\n );\n\n const setFormatTrait = React.useCallback(\n (trait: FormatTraits, setActive: boolean) => {\n const traitStr = getTraitString(trait);\n let formatTraits: string[] = [traitStr];\n if (setActive) {\n // setting trait\n // istanbul ignore else\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits)\n ? formatProps.formatTraits\n : /* istanbul ignore next */ formatProps.formatTraits.split(\n /,|;|\\|/\n );\n formatTraits = [...traits, traitStr];\n }\n } else {\n // clearing trait\n // istanbul ignore else\n if (formatProps.formatTraits) {\n const traits = Array.isArray(formatProps.formatTraits)\n ? formatProps.formatTraits\n : /* istanbul ignore next */ formatProps.formatTraits.split(\n /,|;|\\|/\n );\n formatTraits = traits.filter((traitEntry) => traitEntry !== traitStr);\n }\n }\n const newFormatProps = { ...formatProps, formatTraits };\n handleSetFormatProps(newFormatProps);\n },\n [formatProps, handleSetFormatProps]\n );\n\n const handleUseThousandsSeparatorChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setFormatTrait(FormatTraits.Use1000Separator, e.target.checked);\n },\n [setFormatTrait]\n );\n\n const isFormatTraitSet = React.useCallback(\n (trait: FormatTraits) => {\n return Format.isFormatTraitSetInProps(formatProps, trait);\n },\n [formatProps]\n );\n\n const handleThousandSeparatorChange = React.useCallback(\n (thousandSeparator: string) => {\n let decimalSeparator = formatProps.decimalSeparator;\n // make sure 1000 and decimal separator do not match\n // istanbul ignore else\n if (isFormatTraitSet(FormatTraits.Use1000Separator)) {\n if (thousandSeparator === \".\") decimalSeparator = \",\";\n // thousandSeparator === \",\"\n else decimalSeparator = \".\";\n }\n const newFormatProps = {\n ...formatProps,\n thousandSeparator,\n decimalSeparator,\n };\n handleSetFormatProps(newFormatProps);\n },\n [formatProps, isFormatTraitSet, handleSetFormatProps]\n );\n\n const useThousandSeparatorLabel = React.useRef(\n UiIModelComponents.translate(\n \"QuantityFormat.labels.useThousandSeparatorLabel\"\n )\n );\n const thousandSeparatorLabel = React.useRef(\n UiIModelComponents.translate(\"QuantityFormat.labels.thousandSeparatorLabel\")\n );\n\n return (\n <>\n <span className={\"uicore-label\"}>\n {useThousandSeparatorLabel.current}\n </span>\n <Checkbox\n data-testid=\"use-thousands-separator\"\n checked={isFormatTraitSet(FormatTraits.Use1000Separator)}\n onChange={handleUseThousandsSeparatorChange}\n />\n <span\n className={classnames(\n \"uicore-label\",\n !isFormatTraitSet(FormatTraits.Use1000Separator) && \"uicore-disabled\"\n )}\n >\n {thousandSeparatorLabel.current}\n </span>\n <ThousandsSelector\n data-testid=\"thousands-separator-selector\"\n separator={formatProps.thousandSeparator ?? \",\"}\n disabled={!isFormatTraitSet(FormatTraits.Use1000Separator)}\n onChange={handleThousandSeparatorChange}\n />\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UnitDescr.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/UnitDescr.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAa,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAiCD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,eAqE9C"}
1
+ {"version":3,"file":"UnitDescr.d.ts","sourceRoot":"","sources":["../../../../../src/imodel-components-react/quantityformat/misc/UnitDescr.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,KAAK,EAAa,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAgDD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,eAuH9C"}