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

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 (345) hide show
  1. package/CHANGELOG.md +1 -66
  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 -92
  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 -64
  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 -24
  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 -19
  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 -17
  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 -49
  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 -53
  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 -181
  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 -65
  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.d.ts.map +1 -1
  98. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +145 -154
  99. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  100. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  101. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +59 -59
  102. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +47 -47
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +54 -54
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +48 -48
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +50 -50
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +58 -58
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +47 -47
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +56 -56
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +95 -95
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +119 -119
  129. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  130. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  131. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +143 -143
  132. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  133. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  134. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
  135. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  136. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  137. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +81 -81
  138. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  139. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  140. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  141. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +91 -91
  142. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  143. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +31 -26
  144. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  145. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +191 -191
  146. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  147. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +112 -107
  148. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  149. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +424 -424
  150. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  151. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +356 -358
  152. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  153. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +54 -54
  154. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  155. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  156. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  157. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  158. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +358 -358
  159. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  160. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +164 -164
  161. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
  162. package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
  163. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  164. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  165. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +274 -274
  166. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  167. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  168. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
  169. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  170. package/lib/cjs/imodel-components-react.d.ts +82 -82
  171. package/lib/cjs/imodel-components-react.js +101 -101
  172. package/lib/cjs/imodel-components-react.js.map +1 -1
  173. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
  174. package/lib/esm/imodel-components-react/UiIModelComponents.js +75 -75
  175. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  176. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  177. package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
  178. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  179. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  180. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  181. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +82 -82
  182. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  183. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -92
  184. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  185. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
  186. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  187. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  188. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
  189. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  190. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +93 -93
  191. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  192. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +112 -112
  193. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  194. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +63 -64
  195. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
  196. package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
  197. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  198. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  199. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  200. package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
  201. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  202. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  203. package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
  204. package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
  205. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  206. package/lib/esm/imodel-components-react/color/Swatch.scss +23 -24
  207. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  208. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
  209. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  210. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  211. package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
  212. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  213. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -19
  214. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  215. package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
  216. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  217. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -17
  218. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  219. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
  220. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  221. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  222. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +240 -240
  223. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  224. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +107 -107
  225. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  226. package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
  227. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  228. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -49
  229. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  230. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +133 -133
  231. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  232. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +52 -53
  233. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  234. package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
  235. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  236. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  237. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +174 -174
  238. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +606 -606
  239. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  240. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +182 -181
  241. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  242. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +620 -620
  243. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  244. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +134 -134
  245. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  246. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
  247. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  248. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +63 -65
  249. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  250. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +30 -30
  251. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  252. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  253. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +60 -60
  254. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  255. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  256. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +63 -63
  257. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  258. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  259. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +83 -83
  260. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  261. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  262. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +110 -110
  263. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  264. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  265. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +158 -158
  266. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  267. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  268. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -131
  270. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  271. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  272. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
  273. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  274. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  275. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
  276. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  277. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  278. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
  279. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  280. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  281. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
  282. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  283. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  284. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
  285. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  286. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  287. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
  288. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  289. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  290. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
  291. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  292. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  293. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
  294. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  295. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  296. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +69 -69
  297. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  298. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  299. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
  300. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  301. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  302. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +139 -139
  303. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  304. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  305. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
  306. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  307. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  308. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
  309. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  310. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  311. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  312. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +64 -64
  313. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  314. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +31 -26
  315. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  316. package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
  317. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  318. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +112 -107
  319. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  320. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +398 -398
  321. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  322. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +356 -358
  323. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  324. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
  325. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  326. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  327. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  328. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +133 -133
  329. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +332 -332
  330. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  331. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +164 -164
  332. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
  333. package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
  334. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  335. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  336. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +251 -251
  337. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  338. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  339. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +95 -95
  340. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  341. package/lib/esm/imodel-components-react.d.ts +82 -82
  342. package/lib/esm/imodel-components-react.js +87 -87
  343. package/lib/esm/imodel-components-react.js.map +1 -1
  344. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  345. package/package.json +25 -33
@@ -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,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------------------------------------------------\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
+ {"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,OA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,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,65 +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
- @import "~@itwin/core-react/lib/cjs/core-react/select/select";
7
- @import "~@itwin/itwinui-css/scss/style/typography";
8
-
9
- .components-quantityFormat-panel {
10
- display: grid;
11
- grid-template-columns: auto 1fr;
12
- row-gap: 0;
13
- column-gap: 6px;
14
- align-items: center;
15
-
16
- >.uicore-label {
17
- font-size: $iui-font-size;
18
- margin: 4.4px 0;
19
-
20
- /* match margin on other select controls so it spaces properly in grid */
21
- &.uicore-disabled {
22
- color: $buic-text-color-disabled;
23
- }
24
- }
25
-
26
- >span.components-inline {
27
- display: flex;
28
- flex-direction: row;
29
- align-items: center;
30
- gap: 4px;
31
- }
32
-
33
- >label.core-checkbox.core-checkbox-no-label {
34
- min-height: 1.57em;
35
- }
36
-
37
- >button.components-quantityFormat-more-button {
38
- grid-column: 1 / span 2;
39
- border: none;
40
- outline: none;
41
- background: none;
42
- }
43
-
44
- .components-quantityFormat-more-button-label {
45
- margin-right: .25em;
46
- }
47
-
48
- >a.components-quantityFormat-more-less {
49
- font-size: $iui-font-size;
50
- color: $buic-foreground-alert;
51
- -webkit-transition: text-decoration 1s ease;
52
- -moz-transition: text-decoration 1s ease;
53
- -o-transition: text-decoration 1s ease;
54
- transition: text-decoration 0.1s ease;
55
-
56
- &:hover {
57
- text-decoration: underline;
58
- cursor: pointer;
59
- }
60
- }
61
-
62
- .iui-input {
63
- padding: $uicore-iui-input-padding;
64
- }
65
- }
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":["/*---------------------------------------------------------------------------------------------\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
+ {"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,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