@itwin/imodel-components-react 4.0.0-dev.2 → 4.0.0-dev.3

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 (343) hide show
  1. package/LICENSE.md +1 -1
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.js +79 -79
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  6. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +186 -186
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
  9. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  10. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +107 -107
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  13. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  14. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +74 -74
  15. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  17. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +145 -145
  18. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +93 -93
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +137 -137
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +63 -63
  24. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
  25. package/lib/cjs/imodel-components-react/color/HueSlider.js +199 -199
  26. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
  28. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  29. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +213 -213
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
  32. package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
  33. package/lib/cjs/imodel-components-react/color/Swatch.js +60 -60
  34. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/color/Swatch.scss +23 -23
  36. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  37. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
  38. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  40. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +151 -151
  41. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  43. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  44. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +160 -160
  45. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  47. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  48. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +96 -96
  49. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  50. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  51. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +265 -265
  52. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  53. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
  54. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  55. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +85 -85
  56. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  57. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  58. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  59. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +159 -159
  60. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  61. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
  62. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  63. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +127 -127
  64. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  65. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  66. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +174 -174
  67. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +634 -634
  68. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  69. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +182 -182
  70. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  71. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +647 -647
  72. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  73. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +134 -134
  74. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  75. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +99 -99
  76. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  77. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +63 -63
  78. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +53 -53
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +83 -83
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +86 -86
  86. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  88. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +109 -109
  89. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  91. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
  92. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  94. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +184 -184
  95. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  97. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +145 -145
  98. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  100. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +59 -59
  101. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +47 -47
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +54 -54
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +48 -48
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +50 -50
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +58 -58
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +47 -47
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +56 -56
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +95 -95
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +119 -119
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  129. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  130. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +143 -143
  131. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  132. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  133. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
  134. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  136. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +81 -81
  137. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  138. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  139. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  140. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +91 -91
  141. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  142. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +31 -31
  143. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  144. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +191 -191
  145. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  146. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +112 -112
  147. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  148. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +424 -424
  149. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  150. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +356 -356
  151. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  152. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +54 -54
  153. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  154. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  155. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  156. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  157. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +358 -358
  158. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  159. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +164 -164
  160. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
  161. package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
  162. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  163. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  164. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +274 -274
  165. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  166. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  167. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
  168. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  169. package/lib/cjs/imodel-components-react.d.ts +82 -82
  170. package/lib/cjs/imodel-components-react.js +101 -101
  171. package/lib/cjs/imodel-components-react.js.map +1 -1
  172. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
  173. package/lib/esm/imodel-components-react/UiIModelComponents.js +75 -75
  174. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  175. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  176. package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
  177. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  178. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  179. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  180. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +82 -82
  181. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  182. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  183. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  184. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
  185. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  186. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  187. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
  188. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  189. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +93 -93
  190. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  191. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +112 -112
  192. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  193. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +63 -63
  194. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
  195. package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
  196. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  197. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  198. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  199. package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
  200. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  201. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  202. package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
  203. package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
  204. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  205. package/lib/esm/imodel-components-react/color/Swatch.scss +23 -23
  206. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  207. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
  208. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  209. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  210. package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
  211. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  212. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  213. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  214. package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
  215. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  216. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  217. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  218. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
  219. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  220. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  221. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +240 -240
  222. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  223. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
  224. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  225. package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
  226. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  227. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  228. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  229. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +133 -133
  230. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  231. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +52 -52
  232. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  233. package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
  234. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  235. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  236. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +174 -174
  237. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +606 -606
  238. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  239. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +182 -182
  240. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  241. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +620 -620
  242. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  243. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +134 -134
  244. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  245. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
  246. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  247. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +63 -63
  248. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  249. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +30 -30
  250. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  251. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  252. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +60 -60
  253. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  254. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  255. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +63 -63
  256. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  257. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  258. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +83 -83
  259. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  261. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +110 -110
  262. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  263. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  264. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +158 -158
  265. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  267. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -122
  268. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  270. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
  271. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  272. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  273. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
  274. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  275. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  276. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
  277. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  278. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  279. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
  280. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  281. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  282. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
  283. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  284. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  285. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
  286. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  287. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  288. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
  289. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  290. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  291. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
  292. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  293. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  294. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +69 -69
  295. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  296. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  297. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
  298. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  299. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  300. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +139 -139
  301. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  302. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  303. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
  304. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  305. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  306. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
  307. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  308. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  309. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  310. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +64 -64
  311. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  312. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +31 -31
  313. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  314. package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
  315. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  316. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +112 -112
  317. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  318. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +398 -398
  319. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  320. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +356 -356
  321. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  322. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
  323. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  324. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  325. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  326. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  327. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +332 -332
  328. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  329. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +164 -164
  330. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
  331. package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
  332. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  333. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  334. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +251 -251
  335. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  336. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  337. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +95 -95
  338. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  339. package/lib/esm/imodel-components-react.d.ts +82 -82
  340. package/lib/esm/imodel-components-react.js +87 -87
  341. package/lib/esm/imodel-components-react.js.map +1 -1
  342. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  343. package/package.json +7 -7
@@ -1,27 +1,27 @@
1
- /** @packageDocumentation
2
- * @module QuantityFormat
3
- */
4
- import "./FormatPanel.scss";
5
- import * as React from "react";
6
- import { FormatProps, FormatterSpec, UnitProps, UnitsProvider } from "@itwin/core-quantity";
7
- import { CommonProps } from "@itwin/core-react";
8
- /** Properties of [[FormatPanel]] component.
9
- * @alpha
10
- */
11
- export interface FormatPanelProps extends CommonProps {
12
- initialFormat: FormatProps;
13
- unitsProvider: UnitsProvider;
14
- persistenceUnit: Promise<UnitProps> | UnitProps;
15
- showSample?: boolean;
16
- initialMagnitude?: number;
17
- enableMinimumProperties?: boolean;
18
- onFormatChange?: (format: FormatProps) => void;
19
- provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;
20
- providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
21
- provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
22
- }
23
- /** Component to show/edit Quantity Format.
24
- * @alpha
25
- */
26
- export declare function FormatPanel(props: FormatPanelProps): JSX.Element;
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ import "./FormatPanel.scss";
5
+ import * as React from "react";
6
+ import { FormatProps, FormatterSpec, UnitProps, UnitsProvider } from "@itwin/core-quantity";
7
+ import { CommonProps } from "@itwin/core-react";
8
+ /** Properties of [[FormatPanel]] component.
9
+ * @alpha
10
+ */
11
+ export interface FormatPanelProps extends CommonProps {
12
+ initialFormat: FormatProps;
13
+ unitsProvider: UnitsProvider;
14
+ persistenceUnit: Promise<UnitProps> | UnitProps;
15
+ showSample?: boolean;
16
+ initialMagnitude?: number;
17
+ enableMinimumProperties?: boolean;
18
+ onFormatChange?: (format: FormatProps) => void;
19
+ provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;
20
+ providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
21
+ provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;
22
+ }
23
+ /** Component to show/edit Quantity Format.
24
+ * @alpha
25
+ */
26
+ export declare function FormatPanel(props: FormatPanelProps): JSX.Element;
27
27
  //# sourceMappingURL=FormatPanel.d.ts.map
@@ -1,77 +1,77 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module QuantityFormat
7
- */
8
- import "./FormatPanel.scss";
9
- import * as React from "react";
10
- import { Format, FormatterSpec } from "@itwin/core-quantity";
11
- import { FormatPrecision } from "./FormatPrecision";
12
- import { FormatSample } from "./FormatSample";
13
- import { FormatTypeOption } from "./FormatType";
14
- import { FormatUnitLabel } from "./FormatUnitLabel";
15
- import { FormatUnits } from "./FormatUnits";
16
- import { MiscFormatOptions } from "./MiscFormatOptions";
17
- async function generateFormatSpec(formatProps, persistenceUnit, unitsProvider) {
18
- const actualFormat = await Format.createFromJSON("custom", unitsProvider, formatProps);
19
- return FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);
20
- }
21
- /** Component to show/edit Quantity Format.
22
- * @alpha
23
- */
24
- export function FormatPanel(props) {
25
- const [formatSpec, setFormatSpec] = React.useState();
26
- const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;
27
- const [formatProps, setFormatProps] = React.useState(initialFormat);
28
- const [showOptions, setShowOptions] = React.useState(false);
29
- React.useEffect(() => {
30
- setFormatProps(initialFormat);
31
- setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
32
- }, [initialFormat]);
33
- const handleUserFormatChanges = React.useCallback((newProps) => {
34
- setFormatProps(newProps);
35
- setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
36
- onFormatChange && onFormatChange(newProps);
37
- }, [onFormatChange]);
38
- const isMounted = React.useRef(false);
39
- // runs returned function only when component is unmounted.
40
- React.useEffect(() => {
41
- isMounted.current = true;
42
- return (() => {
43
- isMounted.current = false;
44
- });
45
- }, []);
46
- React.useEffect(() => {
47
- async function fetchFormatSpec() {
48
- const pu = await persistenceUnit;
49
- let newFormatSpec;
50
- if (provideFormatSpec) {
51
- newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);
52
- }
53
- else {
54
- newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);
55
- }
56
- isMounted.current && setFormatSpec(newFormatSpec);
57
- }
58
- if (!formatSpec)
59
- fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises
60
- }, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);
61
- const handleFormatChange = React.useCallback((newFormatProps) => {
62
- handleUserFormatChanges(newFormatProps);
63
- }, [handleUserFormatChanges]);
64
- const handleShowOptions = React.useCallback((show) => {
65
- setShowOptions(show);
66
- }, []);
67
- return (React.createElement("div", { className: "components-quantityFormat-panel" },
68
- showSample &&
69
- React.createElement(FormatSample, { formatSpec: formatSpec, initialMagnitude: initialMagnitude }),
70
- React.createElement(FormatUnits, { unitsProvider: unitsProvider, persistenceUnit: formatSpec === null || formatSpec === void 0 ? void 0 : formatSpec.persistenceUnit, initialFormat: formatProps, onUnitsChange: handleFormatChange }),
71
- React.createElement(FormatUnitLabel, { formatProps: formatProps, onUnitLabelChange: handleFormatChange }),
72
- React.createElement(FormatTypeOption, { formatProps: formatProps, onChange: handleFormatChange }),
73
- React.createElement(FormatPrecision, { formatProps: formatProps, onChange: handleFormatChange }),
74
- props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange),
75
- React.createElement(MiscFormatOptions, { formatProps: formatProps, onChange: handleFormatChange, enableMinimumProperties: enableMinimumProperties, showOptions: showOptions, onShowHideOptions: handleShowOptions }, props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange))));
76
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module QuantityFormat
7
+ */
8
+ import "./FormatPanel.scss";
9
+ import * as React from "react";
10
+ import { Format, FormatterSpec } from "@itwin/core-quantity";
11
+ import { FormatPrecision } from "./FormatPrecision";
12
+ import { FormatSample } from "./FormatSample";
13
+ import { FormatTypeOption } from "./FormatType";
14
+ import { FormatUnitLabel } from "./FormatUnitLabel";
15
+ import { FormatUnits } from "./FormatUnits";
16
+ import { MiscFormatOptions } from "./MiscFormatOptions";
17
+ async function generateFormatSpec(formatProps, persistenceUnit, unitsProvider) {
18
+ const actualFormat = await Format.createFromJSON("custom", unitsProvider, formatProps);
19
+ return FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);
20
+ }
21
+ /** Component to show/edit Quantity Format.
22
+ * @alpha
23
+ */
24
+ export function FormatPanel(props) {
25
+ const [formatSpec, setFormatSpec] = React.useState();
26
+ const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;
27
+ const [formatProps, setFormatProps] = React.useState(initialFormat);
28
+ const [showOptions, setShowOptions] = React.useState(false);
29
+ React.useEffect(() => {
30
+ setFormatProps(initialFormat);
31
+ setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
32
+ }, [initialFormat]);
33
+ const handleUserFormatChanges = React.useCallback((newProps) => {
34
+ setFormatProps(newProps);
35
+ setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook
36
+ onFormatChange && onFormatChange(newProps);
37
+ }, [onFormatChange]);
38
+ const isMounted = React.useRef(false);
39
+ // runs returned function only when component is unmounted.
40
+ React.useEffect(() => {
41
+ isMounted.current = true;
42
+ return (() => {
43
+ isMounted.current = false;
44
+ });
45
+ }, []);
46
+ React.useEffect(() => {
47
+ async function fetchFormatSpec() {
48
+ const pu = await persistenceUnit;
49
+ let newFormatSpec;
50
+ if (provideFormatSpec) {
51
+ newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);
52
+ }
53
+ else {
54
+ newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);
55
+ }
56
+ isMounted.current && setFormatSpec(newFormatSpec);
57
+ }
58
+ if (!formatSpec)
59
+ fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises
60
+ }, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);
61
+ const handleFormatChange = React.useCallback((newFormatProps) => {
62
+ handleUserFormatChanges(newFormatProps);
63
+ }, [handleUserFormatChanges]);
64
+ const handleShowOptions = React.useCallback((show) => {
65
+ setShowOptions(show);
66
+ }, []);
67
+ return (React.createElement("div", { className: "components-quantityFormat-panel" },
68
+ showSample &&
69
+ React.createElement(FormatSample, { formatSpec: formatSpec, initialMagnitude: initialMagnitude }),
70
+ React.createElement(FormatUnits, { unitsProvider: unitsProvider, persistenceUnit: formatSpec === null || formatSpec === void 0 ? void 0 : formatSpec.persistenceUnit, initialFormat: formatProps, onUnitsChange: handleFormatChange }),
71
+ React.createElement(FormatUnitLabel, { formatProps: formatProps, onUnitLabelChange: handleFormatChange }),
72
+ React.createElement(FormatTypeOption, { formatProps: formatProps, onChange: handleFormatChange }),
73
+ React.createElement(FormatPrecision, { formatProps: formatProps, onChange: handleFormatChange }),
74
+ props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange),
75
+ React.createElement(MiscFormatOptions, { formatProps: formatProps, onChange: handleFormatChange, enableMinimumProperties: enableMinimumProperties, showOptions: showOptions, onShowHideOptions: handleShowOptions }, props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange))));
76
+ }
77
77
  //# sourceMappingURL=FormatPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPanel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAe,aAAa,EAA4B,MAAM,sBAAsB,CAAC;AAEpG,OAAO,EAAE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CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAE9B,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,IAAa,EAAE,EAAE;QAC5D,cAAc,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC;QAC7C,UAAU;YACT,oBAAC,YAAY,IAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,GAAI;QAE9E,oBAAC,WAAW,IAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,GAAI;QAC1J,oBAAC,eAAe,IAAC,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,GAAI;QACpF,oBAAC,gBAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC5E,oBAAC,eAAe,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,GAAI;QAC1E,KAAK,CAAC,sBAAsB,IAAI,KAAK,CAAC,sBAAsB,CAAC,WAAW,EAAE,kBAAkB,CAAC;QAC9F,oBAAC,iBAAiB,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,IACxL,KAAK,CAAC,wBAAwB,IAAI,KAAK,CAAC,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAChF,CAChB,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module QuantityFormat\n */\n\nimport \"./FormatPanel.scss\";\nimport * as React from \"react\";\nimport { Format, FormatProps, FormatterSpec, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { FormatPrecision } from \"./FormatPrecision\";\nimport { FormatSample } from \"./FormatSample\";\nimport { FormatTypeOption } from \"./FormatType\";\nimport { FormatUnitLabel } from \"./FormatUnitLabel\";\nimport { FormatUnits } from \"./FormatUnits\";\nimport { MiscFormatOptions } from \"./MiscFormatOptions\";\n\n/** Properties of [[FormatPanel]] component.\n * @alpha\n */\nexport interface FormatPanelProps extends CommonProps {\n initialFormat: FormatProps;\n unitsProvider: UnitsProvider;\n persistenceUnit: Promise<UnitProps> | UnitProps;\n showSample?: boolean;\n initialMagnitude?: number;\n // if true a only primary format properties are initially displayed and a \"More/Less\" link is added.\n enableMinimumProperties?: boolean;\n onFormatChange?: (format: FormatProps) => void;\n provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;\n providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\n provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\n}\n\nasync function generateFormatSpec(formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) {\n const actualFormat = await Format.createFromJSON(\"custom\", unitsProvider, formatProps);\n return FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);\n}\n\n/** Component to show/edit Quantity Format.\n * @alpha\n */\nexport function FormatPanel(props: FormatPanelProps) {\n const [formatSpec, setFormatSpec] = React.useState<FormatterSpec>();\n const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;\n const [formatProps, setFormatProps] = React.useState(initialFormat);\n const [showOptions, setShowOptions] = React.useState(false);\n\n React.useEffect(() => {\n setFormatProps(initialFormat);\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\n }, [initialFormat]);\n\n const handleUserFormatChanges = React.useCallback((newProps: FormatProps) => {\n setFormatProps(newProps);\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\n onFormatChange && onFormatChange(newProps);\n }, [onFormatChange]);\n\n const isMounted = React.useRef(false);\n\n // runs returned function only when component is unmounted.\n React.useEffect(() => {\n isMounted.current = true;\n return (() => {\n isMounted.current = false;\n });\n }, []);\n\n React.useEffect(() => {\n async function fetchFormatSpec() {\n const pu = await persistenceUnit;\n let newFormatSpec: FormatterSpec;\n if (provideFormatSpec) {\n newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);\n } else {\n newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);\n }\n isMounted.current && setFormatSpec(newFormatSpec);\n }\n if (!formatSpec)\n fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);\n\n const handleFormatChange = React.useCallback((newFormatProps: FormatProps) => {\n handleUserFormatChanges(newFormatProps);\n }, [handleUserFormatChanges]);\n\n const handleShowOptions = React.useCallback((show: boolean) => {\n setShowOptions(show);\n }, []);\n\n return (\n <div className=\"components-quantityFormat-panel\">\n {showSample &&\n <FormatSample formatSpec={formatSpec} initialMagnitude={initialMagnitude} />\n }\n <FormatUnits unitsProvider={unitsProvider} persistenceUnit={formatSpec?.persistenceUnit} initialFormat={formatProps} onUnitsChange={handleFormatChange} />\n <FormatUnitLabel formatProps={formatProps} onUnitLabelChange={handleFormatChange} />\n <FormatTypeOption formatProps={formatProps} onChange={handleFormatChange} />\n <FormatPrecision formatProps={formatProps} onChange={handleFormatChange} />\n {props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange)}\n <MiscFormatOptions formatProps={formatProps} onChange={handleFormatChange} enableMinimumProperties={enableMinimumProperties} showOptions={showOptions} onShowHideOptions={handleShowOptions}>\n {props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange)}\n </MiscFormatOptions>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"FormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPanel.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAe,aAAa,EAA4B,MAAM,sBAAsB,CAAC;AAEpG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAmBxD,KAAK,UAAU,kBAAkB,CAAC,WAAwB,EAAE,eAA0B,EAAE,aAA4B;IAClH,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IACvF,OAAO,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAiB,CAAC;IACpE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,GAAG,KAAK,CAAC;IAC1J,M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W,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,IACxL,KAAK,CAAC,wBAAwB,IAAI,KAAK,CAAC,wBAAwB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAChF,CAChB,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport \"./FormatPanel.scss\";\r\nimport * as React from \"react\";\r\nimport { Format, FormatProps, FormatterSpec, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { FormatPrecision } from \"./FormatPrecision\";\r\nimport { FormatSample } from \"./FormatSample\";\r\nimport { FormatTypeOption } from \"./FormatType\";\r\nimport { FormatUnitLabel } from \"./FormatUnitLabel\";\r\nimport { FormatUnits } from \"./FormatUnits\";\r\nimport { MiscFormatOptions } from \"./MiscFormatOptions\";\r\n\r\n/** Properties of [[FormatPanel]] component.\r\n * @alpha\r\n */\r\nexport interface FormatPanelProps extends CommonProps {\r\n initialFormat: FormatProps;\r\n unitsProvider: UnitsProvider;\r\n persistenceUnit: Promise<UnitProps> | UnitProps;\r\n showSample?: boolean;\r\n initialMagnitude?: number;\r\n // if true a only primary format properties are initially displayed and a \"More/Less\" link is added.\r\n enableMinimumProperties?: boolean;\r\n onFormatChange?: (format: FormatProps) => void;\r\n provideFormatSpec?: (formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>;\r\n providePrimaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\r\n provideSecondaryChildren?: (formatProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => React.ReactNode;\r\n}\r\n\r\nasync function generateFormatSpec(formatProps: FormatProps, persistenceUnit: UnitProps, unitsProvider: UnitsProvider) {\r\n const actualFormat = await Format.createFromJSON(\"custom\", unitsProvider, formatProps);\r\n return FormatterSpec.create(actualFormat.name, actualFormat, unitsProvider, persistenceUnit);\r\n}\r\n\r\n/** Component to show/edit Quantity Format.\r\n * @alpha\r\n */\r\nexport function FormatPanel(props: FormatPanelProps) {\r\n const [formatSpec, setFormatSpec] = React.useState<FormatterSpec>();\r\n const { initialFormat, showSample, initialMagnitude, unitsProvider, persistenceUnit, onFormatChange, provideFormatSpec, enableMinimumProperties } = props;\r\n const [formatProps, setFormatProps] = React.useState(initialFormat);\r\n const [showOptions, setShowOptions] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n setFormatProps(initialFormat);\r\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\r\n }, [initialFormat]);\r\n\r\n const handleUserFormatChanges = React.useCallback((newProps: FormatProps) => {\r\n setFormatProps(newProps);\r\n setFormatSpec(undefined); // this will trigger the new spec to be created in the useEffect hook\r\n onFormatChange && onFormatChange(newProps);\r\n }, [onFormatChange]);\r\n\r\n const isMounted = React.useRef(false);\r\n\r\n // runs returned function only when component is unmounted.\r\n React.useEffect(() => {\r\n isMounted.current = true;\r\n return (() => {\r\n isMounted.current = false;\r\n });\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n async function fetchFormatSpec() {\r\n const pu = await persistenceUnit;\r\n let newFormatSpec: FormatterSpec;\r\n if (provideFormatSpec) {\r\n newFormatSpec = await provideFormatSpec(formatProps, pu, unitsProvider);\r\n } else {\r\n newFormatSpec = await generateFormatSpec(formatProps, pu, unitsProvider);\r\n }\r\n isMounted.current && setFormatSpec(newFormatSpec);\r\n }\r\n if (!formatSpec)\r\n fetchFormatSpec(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }, [formatProps, formatSpec, persistenceUnit, provideFormatSpec, unitsProvider]);\r\n\r\n const handleFormatChange = React.useCallback((newFormatProps: FormatProps) => {\r\n handleUserFormatChanges(newFormatProps);\r\n }, [handleUserFormatChanges]);\r\n\r\n const handleShowOptions = React.useCallback((show: boolean) => {\r\n setShowOptions(show);\r\n }, []);\r\n\r\n return (\r\n <div className=\"components-quantityFormat-panel\">\r\n {showSample &&\r\n <FormatSample formatSpec={formatSpec} initialMagnitude={initialMagnitude} />\r\n }\r\n <FormatUnits unitsProvider={unitsProvider} persistenceUnit={formatSpec?.persistenceUnit} initialFormat={formatProps} onUnitsChange={handleFormatChange} />\r\n <FormatUnitLabel formatProps={formatProps} onUnitLabelChange={handleFormatChange} />\r\n <FormatTypeOption formatProps={formatProps} onChange={handleFormatChange} />\r\n <FormatPrecision formatProps={formatProps} onChange={handleFormatChange} />\r\n {props.providePrimaryChildren && props.providePrimaryChildren(formatProps, handleFormatChange)}\r\n <MiscFormatOptions formatProps={formatProps} onChange={handleFormatChange} enableMinimumProperties={enableMinimumProperties} showOptions={showOptions} onShowHideOptions={handleShowOptions}>\r\n {props.provideSecondaryChildren && props.provideSecondaryChildren(formatProps, handleFormatChange)}\r\n </MiscFormatOptions>\r\n </div>\r\n );\r\n}\r\n"]}
@@ -1,63 +1,63 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
6
-
7
- .components-quantityFormat-panel {
8
- display: grid;
9
- grid-template-columns: auto 1fr;
10
- row-gap: 0;
11
- column-gap: 6px;
12
- align-items: center;
13
-
14
- > .uicore-label {
15
- font-size: var(--iui-font-size-1);
16
- margin: 4.4px 0;
17
-
18
- /* match margin on other select controls so it spaces properly in grid */
19
- &.uicore-disabled {
20
- color: $buic-text-color-disabled;
21
- }
22
- }
23
-
24
- > span.components-inline {
25
- display: flex;
26
- flex-direction: row;
27
- align-items: center;
28
- gap: 4px;
29
- }
30
-
31
- > label.core-checkbox.core-checkbox-no-label {
32
- min-height: 1.57em;
33
- }
34
-
35
- > button.components-quantityFormat-more-button {
36
- grid-column: 1 / span 2;
37
- border: none;
38
- outline: none;
39
- background: none;
40
- }
41
-
42
- .components-quantityFormat-more-button-label {
43
- margin-right: 0.25em;
44
- }
45
-
46
- > a.components-quantityFormat-more-less {
47
- font-size: var(--iui-font-size-1);
48
- color: $buic-foreground-alert;
49
- -webkit-transition: text-decoration 1s ease;
50
- -moz-transition: text-decoration 1s ease;
51
- -o-transition: text-decoration 1s ease;
52
- transition: text-decoration 0.1s ease;
53
-
54
- &:hover {
55
- text-decoration: underline;
56
- cursor: pointer;
57
- }
58
- }
59
-
60
- .iui-input {
61
- padding: $uicore-iui-input-padding;
62
- }
63
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
6
+
7
+ .components-quantityFormat-panel {
8
+ display: grid;
9
+ grid-template-columns: auto 1fr;
10
+ row-gap: 0;
11
+ column-gap: 6px;
12
+ align-items: center;
13
+
14
+ > .uicore-label {
15
+ font-size: var(--iui-font-size-1);
16
+ margin: 4.4px 0;
17
+
18
+ /* match margin on other select controls so it spaces properly in grid */
19
+ &.uicore-disabled {
20
+ color: $buic-text-color-disabled;
21
+ }
22
+ }
23
+
24
+ > span.components-inline {
25
+ display: flex;
26
+ flex-direction: row;
27
+ align-items: center;
28
+ gap: 4px;
29
+ }
30
+
31
+ > label.core-checkbox.core-checkbox-no-label {
32
+ min-height: 1.57em;
33
+ }
34
+
35
+ > button.components-quantityFormat-more-button {
36
+ grid-column: 1 / span 2;
37
+ border: none;
38
+ outline: none;
39
+ background: none;
40
+ }
41
+
42
+ .components-quantityFormat-more-button-label {
43
+ margin-right: 0.25em;
44
+ }
45
+
46
+ > a.components-quantityFormat-more-less {
47
+ font-size: var(--iui-font-size-1);
48
+ color: $buic-foreground-alert;
49
+ -webkit-transition: text-decoration 1s ease;
50
+ -moz-transition: text-decoration 1s ease;
51
+ -o-transition: text-decoration 1s ease;
52
+ transition: text-decoration 0.1s ease;
53
+
54
+ &:hover {
55
+ text-decoration: underline;
56
+ cursor: pointer;
57
+ }
58
+ }
59
+
60
+ .iui-input {
61
+ padding: $uicore-iui-input-padding;
62
+ }
63
+ }
@@ -1,18 +1,18 @@
1
- /** @packageDocumentation
2
- * @module QuantityFormat
3
- */
4
- /// <reference types="react" />
5
- import { CommonProps } from "@itwin/core-react";
6
- import { FormatProps } from "@itwin/core-quantity";
7
- /** Properties of [[FormatPrecision]] component.
8
- * @alpha
9
- */
10
- export interface FormatPrecisionProps extends CommonProps {
11
- formatProps: FormatProps;
12
- onChange?: (format: FormatProps) => void;
13
- }
14
- /** Component to show/edit Quantity Format Precision.
15
- * @alpha
16
- */
17
- export declare function FormatPrecision(props: FormatPrecisionProps): JSX.Element;
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { CommonProps } from "@itwin/core-react";
6
+ import { FormatProps } from "@itwin/core-quantity";
7
+ /** Properties of [[FormatPrecision]] component.
8
+ * @alpha
9
+ */
10
+ export interface FormatPrecisionProps extends CommonProps {
11
+ formatProps: FormatProps;
12
+ onChange?: (format: FormatProps) => void;
13
+ }
14
+ /** Component to show/edit Quantity Format Precision.
15
+ * @alpha
16
+ */
17
+ export declare function FormatPrecision(props: FormatPrecisionProps): JSX.Element;
18
18
  //# sourceMappingURL=FormatPrecision.d.ts.map
@@ -1,31 +1,31 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module QuantityFormat
7
- */
8
- import * as React from "react";
9
- import { FormatType, parseFormatType } from "@itwin/core-quantity";
10
- import { DecimalPrecisionSelector } from "./misc/DecimalPrecision";
11
- import { FractionPrecisionSelector } from "./misc/FractionPrecision";
12
- import { UiIModelComponents } from "../UiIModelComponents";
13
- /** Component to show/edit Quantity Format Precision.
14
- * @alpha
15
- */
16
- export function FormatPrecision(props) {
17
- var _a, _b;
18
- const { formatProps, onChange } = props;
19
- const handlePrecisionChange = React.useCallback((precision) => {
20
- const newFormatProps = { ...formatProps, precision };
21
- onChange && onChange(newFormatProps);
22
- }, [formatProps, onChange]);
23
- const formatType = parseFormatType(formatProps.type, "format");
24
- const label = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.precision"));
25
- return (React.createElement(React.Fragment, null,
26
- React.createElement("span", { className: "uicore-label" }, label.current),
27
- formatType === FormatType.Fractional ?
28
- React.createElement(FractionPrecisionSelector, { "data-testid": "fraction-precision-selector", precision: (_a = formatProps.precision) !== null && _a !== void 0 ? _a : 0, onChange: handlePrecisionChange }) :
29
- React.createElement(DecimalPrecisionSelector, { "data-testid": "decimal-precision-selector", precision: (_b = formatProps.precision) !== null && _b !== void 0 ? _b : 0, onChange: handlePrecisionChange })));
30
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module QuantityFormat
7
+ */
8
+ import * as React from "react";
9
+ import { FormatType, parseFormatType } from "@itwin/core-quantity";
10
+ import { DecimalPrecisionSelector } from "./misc/DecimalPrecision";
11
+ import { FractionPrecisionSelector } from "./misc/FractionPrecision";
12
+ import { UiIModelComponents } from "../UiIModelComponents";
13
+ /** Component to show/edit Quantity Format Precision.
14
+ * @alpha
15
+ */
16
+ export function FormatPrecision(props) {
17
+ var _a, _b;
18
+ const { formatProps, onChange } = props;
19
+ const handlePrecisionChange = React.useCallback((precision) => {
20
+ const newFormatProps = { ...formatProps, precision };
21
+ onChange && onChange(newFormatProps);
22
+ }, [formatProps, onChange]);
23
+ const formatType = parseFormatType(formatProps.type, "format");
24
+ const label = React.useRef(UiIModelComponents.translate("QuantityFormat.labels.precision"));
25
+ return (React.createElement(React.Fragment, null,
26
+ React.createElement("span", { className: "uicore-label" }, label.current),
27
+ formatType === FormatType.Fractional ?
28
+ React.createElement(FractionPrecisionSelector, { "data-testid": "fraction-precision-selector", precision: (_a = formatProps.precision) !== null && _a !== void 0 ? _a : 0, onChange: handlePrecisionChange }) :
29
+ React.createElement(DecimalPrecisionSelector, { "data-testid": "decimal-precision-selector", precision: (_b = formatProps.precision) !== null && _b !== void 0 ? _b : 0, onChange: handlePrecisionChange })));
30
+ }
31
31
  //# sourceMappingURL=FormatPrecision.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormatPrecision.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAe,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAU3D;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;;IACzD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QACpE,MAAM,cAAc,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,CAAC;QACrD,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,UAAU,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAC5F,OAAO,CACL;QACE,8BAAM,SAAS,EAAE,cAAc,IAAG,KAAK,CAAC,OAAO,CAAQ;QACtD,UAAU,KAAK,UAAU,CAAC,UAAU,CAAC,CAAC;YACrC,oBAAC,yBAAyB,mBAAa,6BAA6B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAAC,CAAC;YACjJ,oBAAC,wBAAwB,mBAAa,4BAA4B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAE9I,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module QuantityFormat\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { FormatProps, FormatType, parseFormatType } from \"@itwin/core-quantity\";\nimport { DecimalPrecisionSelector } from \"./misc/DecimalPrecision\";\nimport { FractionPrecisionSelector } from \"./misc/FractionPrecision\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\n\n/** Properties of [[FormatPrecision]] component.\n * @alpha\n */\nexport interface FormatPrecisionProps extends CommonProps {\n formatProps: FormatProps;\n onChange?: (format: FormatProps) => void;\n}\n\n/** Component to show/edit Quantity Format Precision.\n * @alpha\n */\nexport function FormatPrecision(props: FormatPrecisionProps) {\n const { formatProps, onChange } = props;\n\n const handlePrecisionChange = React.useCallback((precision: number) => {\n const newFormatProps = { ...formatProps, precision };\n onChange && onChange(newFormatProps);\n }, [formatProps, onChange]);\n\n const formatType = parseFormatType(formatProps.type, \"format\");\n\n const label = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.precision\"));\n return (\n <>\n <span className={\"uicore-label\"}>{label.current}</span>\n {formatType === FormatType.Fractional ?\n <FractionPrecisionSelector data-testid=\"fraction-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} /> :\n <DecimalPrecisionSelector data-testid=\"decimal-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} />\n }\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"FormatPrecision.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/FormatPrecision.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAe,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAU3D;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;;IACzD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,EAAE;QACpE,MAAM,cAAc,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,CAAC;QACrD,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,UAAU,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAC5F,OAAO,CACL;QACE,8BAAM,SAAS,EAAE,cAAc,IAAG,KAAK,CAAC,OAAO,CAAQ;QACtD,UAAU,KAAK,UAAU,CAAC,UAAU,CAAC,CAAC;YACrC,oBAAC,yBAAyB,mBAAa,6BAA6B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAAC,CAAC;YACjJ,oBAAC,wBAAwB,mBAAa,4BAA4B,EAAC,SAAS,EAAE,MAAA,WAAW,CAAC,SAAS,mCAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAI,CAE9I,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { FormatProps, FormatType, parseFormatType } from \"@itwin/core-quantity\";\r\nimport { DecimalPrecisionSelector } from \"./misc/DecimalPrecision\";\r\nimport { FractionPrecisionSelector } from \"./misc/FractionPrecision\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\n\r\n/** Properties of [[FormatPrecision]] component.\r\n * @alpha\r\n */\r\nexport interface FormatPrecisionProps extends CommonProps {\r\n formatProps: FormatProps;\r\n onChange?: (format: FormatProps) => void;\r\n}\r\n\r\n/** Component to show/edit Quantity Format Precision.\r\n * @alpha\r\n */\r\nexport function FormatPrecision(props: FormatPrecisionProps) {\r\n const { formatProps, onChange } = props;\r\n\r\n const handlePrecisionChange = React.useCallback((precision: number) => {\r\n const newFormatProps = { ...formatProps, precision };\r\n onChange && onChange(newFormatProps);\r\n }, [formatProps, onChange]);\r\n\r\n const formatType = parseFormatType(formatProps.type, \"format\");\r\n\r\n const label = React.useRef(UiIModelComponents.translate(\"QuantityFormat.labels.precision\"));\r\n return (\r\n <>\r\n <span className={\"uicore-label\"}>{label.current}</span>\r\n {formatType === FormatType.Fractional ?\r\n <FractionPrecisionSelector data-testid=\"fraction-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} /> :\r\n <DecimalPrecisionSelector data-testid=\"decimal-precision-selector\" precision={formatProps.precision ?? 0} onChange={handlePrecisionChange} />\r\n }\r\n </>\r\n );\r\n}\r\n"]}
@@ -1,19 +1,19 @@
1
- /** @packageDocumentation
2
- * @module QuantityFormat
3
- */
4
- /// <reference types="react" />
5
- import { FormatterSpec } from "@itwin/core-quantity";
6
- import { CommonProps } from "@itwin/core-react";
7
- /** Properties of [[FormatSample]] component.
8
- * @alpha
9
- */
10
- export interface FormatSampleProps extends CommonProps {
11
- formatSpec?: FormatterSpec;
12
- initialMagnitude?: number;
13
- hideLabels?: boolean;
14
- }
15
- /** Component to show the persistence value and formatted value given a FormatterSpec.
16
- * @alpha
17
- */
18
- export declare function FormatSample(props: FormatSampleProps): JSX.Element;
1
+ /** @packageDocumentation
2
+ * @module QuantityFormat
3
+ */
4
+ /// <reference types="react" />
5
+ import { FormatterSpec } from "@itwin/core-quantity";
6
+ import { CommonProps } from "@itwin/core-react";
7
+ /** Properties of [[FormatSample]] component.
8
+ * @alpha
9
+ */
10
+ export interface FormatSampleProps extends CommonProps {
11
+ formatSpec?: FormatterSpec;
12
+ initialMagnitude?: number;
13
+ hideLabels?: boolean;
14
+ }
15
+ /** Component to show the persistence value and formatted value given a FormatterSpec.
16
+ * @alpha
17
+ */
18
+ export declare function FormatSample(props: FormatSampleProps): JSX.Element;
19
19
  //# sourceMappingURL=FormatSample.d.ts.map