@itwin/imodel-components-react 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/CHANGELOG.md +335 -327
  2. package/LICENSE.md +9 -9
  3. package/README.md +11 -11
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  5. package/lib/cjs/imodel-components-react/UiIModelComponents.js +13 -10
  6. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +23 -17
  9. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +71 -63
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  13. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +11 -9
  14. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  17. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  18. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +6 -8
  19. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +11 -12
  23. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  25. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +1 -1
  26. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.js +32 -15
  28. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  29. package/lib/cjs/imodel-components-react/color/HueSlider.scss +78 -61
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  32. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +14 -11
  33. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  34. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +36 -35
  35. package/lib/cjs/imodel-components-react/color/Swatch.d.ts.map +1 -1
  36. package/lib/cjs/imodel-components-react/color/Swatch.js +5 -8
  37. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  38. package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -22
  39. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  40. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  41. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  43. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +17 -9
  44. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  45. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  46. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  47. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +8 -6
  48. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  49. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  50. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  51. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  52. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +18 -12
  53. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  54. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  55. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  56. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +36 -22
  57. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  58. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  59. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  60. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +12 -16
  61. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  63. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  64. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  65. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  66. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  67. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  68. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +31 -11
  69. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  70. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  71. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  72. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +103 -49
  73. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  74. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  75. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  76. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +171 -66
  77. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  78. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +20 -13
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +14 -10
  88. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  89. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +33 -11
  91. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  92. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
  94. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  95. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +32 -24
  97. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  98. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
  100. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  101. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  103. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  129. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
  130. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  131. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  132. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  133. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  134. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +15 -7
  136. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  137. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  138. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  139. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  140. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  141. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +7 -4
  142. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  143. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +27 -27
  144. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  145. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +3 -3
  146. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  147. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -28
  148. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  149. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  150. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +32 -17
  151. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  152. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -105
  153. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  154. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +61 -27
  155. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  156. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  157. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  158. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  159. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  160. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
  161. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +165 -165
  162. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  163. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +56 -29
  164. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  165. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -178
  166. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  167. package/lib/cjs/imodel-components-react/timeline/interfaces.js +3 -3
  168. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  169. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  170. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  171. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +45 -33
  172. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  173. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  174. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  175. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  176. package/lib/cjs/imodel-components-react.js +3 -3
  177. package/lib/cjs/imodel-components-react.js.map +1 -1
  178. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  179. package/lib/esm/imodel-components-react/UiIModelComponents.js +13 -10
  180. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  181. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  182. package/lib/esm/imodel-components-react/color/AlphaSlider.js +23 -17
  183. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  184. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +71 -63
  185. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +1 -1
  186. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  187. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +11 -9
  188. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  189. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  190. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +1 -1
  191. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  192. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +7 -9
  193. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  194. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +1 -1
  195. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  196. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +13 -14
  197. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  198. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -62
  199. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +1 -1
  200. package/lib/esm/imodel-components-react/color/HueSlider.d.ts.map +1 -1
  201. package/lib/esm/imodel-components-react/color/HueSlider.js +32 -15
  202. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  203. package/lib/esm/imodel-components-react/color/HueSlider.scss +78 -61
  204. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +1 -1
  205. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts.map +1 -1
  206. package/lib/esm/imodel-components-react/color/SaturationPicker.js +14 -11
  207. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  208. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +36 -35
  209. package/lib/esm/imodel-components-react/color/Swatch.d.ts.map +1 -1
  210. package/lib/esm/imodel-components-react/color/Swatch.js +5 -8
  211. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  212. package/lib/esm/imodel-components-react/color/Swatch.scss +22 -22
  213. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts.map +1 -1
  214. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +3 -3
  215. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  216. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts.map +1 -1
  217. package/lib/esm/imodel-components-react/editors/ColorEditor.js +18 -10
  218. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  219. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  220. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts.map +1 -1
  221. package/lib/esm/imodel-components-react/editors/WeightEditor.js +10 -8
  222. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  223. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  224. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +1 -1
  225. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts.map +1 -1
  226. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +18 -12
  227. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  228. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +1 -1
  229. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  230. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +38 -24
  231. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  232. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -106
  233. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts.map +1 -1
  234. package/lib/esm/imodel-components-react/lineweight/Swatch.js +12 -16
  235. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  236. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  237. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts.map +1 -1
  238. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +14 -10
  239. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  240. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -51
  241. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts.map +1 -1
  242. package/lib/esm/imodel-components-react/navigationaids/Cube.js +31 -11
  243. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  244. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  245. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  246. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +105 -51
  247. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  248. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -178
  249. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  250. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +173 -68
  251. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  252. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -135
  253. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts.map +1 -1
  254. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +20 -13
  255. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  256. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -59
  257. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
  258. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +4 -7
  259. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  261. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +14 -10
  262. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  263. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
  264. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +33 -11
  265. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
  267. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +16 -10
  268. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  269. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts.map +1 -1
  270. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +32 -24
  271. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  272. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  273. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +58 -39
  274. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  275. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  276. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +8 -7
  277. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  278. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts.map +1 -1
  279. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +55 -16
  280. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  281. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts.map +1 -1
  282. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +11 -5
  283. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  284. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts.map +1 -1
  285. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +39 -12
  286. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  287. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts.map +1 -1
  288. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +11 -5
  289. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  290. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts.map +1 -1
  291. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +19 -7
  292. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  293. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts.map +1 -1
  294. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +21 -8
  295. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  296. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts.map +1 -1
  297. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +11 -5
  298. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  299. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts.map +1 -1
  300. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +13 -6
  301. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  302. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
  303. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +22 -12
  304. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  305. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts.map +1 -1
  306. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +30 -13
  307. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  308. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  309. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +16 -8
  310. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  311. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts.map +1 -1
  312. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +11 -9
  313. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  314. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts.map +1 -1
  315. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +7 -4
  316. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  317. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +27 -27
  318. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  319. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +3 -3
  320. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  321. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -28
  322. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +1 -1
  323. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  324. package/lib/esm/imodel-components-react/timeline/Scrubber.js +32 -17
  325. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  326. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -105
  327. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  328. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +63 -29
  329. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  330. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -359
  331. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts.map +1 -1
  332. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +4 -5
  333. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  334. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +40 -40
  335. package/lib/esm/imodel-components-react/timeline/Timeline.scss +165 -165
  336. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  337. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +58 -31
  338. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  339. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -178
  340. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  341. package/lib/esm/imodel-components-react/timeline/interfaces.js +3 -3
  342. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  343. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +2 -2
  344. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  345. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +47 -35
  346. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  347. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  348. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +5 -4
  349. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  350. package/lib/esm/imodel-components-react.js +3 -3
  351. package/lib/esm/imodel-components-react.js.map +1 -1
  352. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  353. package/package.json +15 -24
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module NavigationAids
8
8
  */
@@ -66,7 +66,12 @@ class DrawingNavigationAid extends React.Component {
66
66
  this._rootElement = React.createRef();
67
67
  this._viewContainerElement = React.createRef();
68
68
  this._viewElement = React.createRef();
69
- this._rootOffset = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0 });
69
+ this._rootOffset = DOMRect.fromRect({
70
+ x: 0,
71
+ y: 0,
72
+ width: 0,
73
+ height: 0,
74
+ });
70
75
  this._mounted = false;
71
76
  this._isViewport3D = () => {
72
77
  return this.state.view !== undefined && this.state.view.is3d();
@@ -76,7 +81,8 @@ class DrawingNavigationAid extends React.Component {
76
81
  const delta = this._lastTime ? t - this._lastTime : 16;
77
82
  this._lastTime = t;
78
83
  if (this.state.animation !== 1) {
79
- const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || 0.4)));
84
+ const animation = Math.min(1, this.state.animation +
85
+ delta / (1000 * (this.props.animationTime || 0.4)));
80
86
  this._updateFrustum();
81
87
  // istanbul ignore next
82
88
  if (this._mounted) {
@@ -100,7 +106,13 @@ class DrawingNavigationAid extends React.Component {
100
106
  const startRotation = this.state.rotation;
101
107
  // istanbul ignore next
102
108
  if (this._mounted) {
103
- this.setState({ startMapOrigin, startDrawingZoom, startOrigin, startRotation, startMapExtents }, () => {
109
+ this.setState({
110
+ startMapOrigin,
111
+ startDrawingZoom,
112
+ startOrigin,
113
+ startRotation,
114
+ startMapExtents,
115
+ }, () => {
104
116
  // istanbul ignore else
105
117
  if (this.props.onAnimationEnd)
106
118
  this.props.onAnimationEnd();
@@ -137,11 +149,15 @@ class DrawingNavigationAid extends React.Component {
137
149
  // Synchronize with rotation coming from the Viewport
138
150
  this._handleViewRotationChangeEvent = (args) => {
139
151
  // istanbul ignore else
140
- if (!this.state.isMoving && !this.state.isPanning && this.props.viewport === args.viewport) {
152
+ if (!this.state.isMoving &&
153
+ !this.state.isPanning &&
154
+ this.props.viewport === args.viewport) {
141
155
  const extents = args.viewport.view.getExtents().clone();
142
156
  const rotation = args.viewport.view.getRotation().clone();
143
- const halfExtents = extents.scale(.5);
144
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? rotation.multiplyTransposeVector(halfExtents) : halfExtents;
157
+ const halfExtents = extents.scale(0.5);
158
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
159
+ ? rotation.multiplyTransposeVector(halfExtents)
160
+ : halfExtents;
145
161
  const origin = args.viewport.view.getOrigin().plus(offset);
146
162
  const deltaZoom = (this.state.extents.x - extents.x) / this.state.extents.x;
147
163
  let drawingZoom = this.state.drawingZoom / (1 - deltaZoom);
@@ -149,28 +165,40 @@ class DrawingNavigationAid extends React.Component {
149
165
  let mapOrigin = this.state.mapOrigin.plus(deltaOrigin);
150
166
  mapOrigin = mapOrigin.plus(core_geometry_1.Vector3d.createFrom(origin.minus(mapOrigin)).scale(deltaZoom));
151
167
  if (this.state.viewId !== args.viewport.view.id) {
152
- const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? extents : DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
168
+ const rect = this.state.rotateMinimapWithView || this._isViewport3D()
169
+ ? extents
170
+ : DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
153
171
  const maxRectDim = Math.max(rect.y, rect.x);
154
172
  const maxExtentDim = Math.max(this.state.mapExtents.x, this.state.mapExtents.y);
155
173
  drawingZoom = maxExtentDim / (3 * maxRectDim);
156
174
  mapOrigin = origin.clone();
157
175
  this._viewport = args.viewport;
158
- this.setState({ viewId: args.viewport.view.id, view: args.viewport.view.clone() });
176
+ this.setState({
177
+ viewId: args.viewport.view.id,
178
+ view: args.viewport.view.clone(),
179
+ });
159
180
  }
160
181
  // istanbul ignore next
161
182
  if (this._mounted) {
162
183
  this.setState({
163
- startOrigin: origin, origin, extents,
164
- startRotation: rotation, rotation,
165
- startMapOrigin: mapOrigin, mapOrigin,
166
- startDrawingZoom: drawingZoom, drawingZoom,
184
+ startOrigin: origin,
185
+ origin,
186
+ extents,
187
+ startRotation: rotation,
188
+ rotation,
189
+ startMapOrigin: mapOrigin,
190
+ mapOrigin,
191
+ startDrawingZoom: drawingZoom,
192
+ drawingZoom,
167
193
  });
168
194
  }
169
195
  }
170
196
  };
171
197
  this._updateFrustum = (complete = false) => {
172
- const halfExtents = this.state.extents.scale(.5);
173
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(halfExtents) : halfExtents;
198
+ const halfExtents = this.state.extents.scale(0.5);
199
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
200
+ ? this.state.rotation.multiplyTransposeVector(halfExtents)
201
+ : halfExtents;
174
202
  const origin = this.state.origin.minus(offset);
175
203
  ViewportComponentEvents_1.ViewportComponentEvents.setDrawingViewportState(origin, this.state.rotation, complete);
176
204
  };
@@ -215,7 +243,9 @@ class DrawingNavigationAid extends React.Component {
215
243
  // istanbul ignore else
216
244
  if (this.state.isPanning && this.state.mode === MapMode.Opened) {
217
245
  const vect = core_geometry_1.Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
218
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
246
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
247
+ ? this.state.rotation.multiplyTransposeVector(vect)
248
+ : vect;
219
249
  const mapOrigin = this.state.mapOrigin.minus(offset);
220
250
  this.setState({ startMapOrigin: mapOrigin, mapOrigin });
221
251
  }
@@ -226,7 +256,8 @@ class DrawingNavigationAid extends React.Component {
226
256
  const mouse = core_geometry_1.Point2d.create(event.clientX, event.clientY);
227
257
  if (mouse.isAlmostEqual(this.state.mouseStart) &&
228
258
  this.state.mode === MapMode.Closed &&
229
- (event.target === this._viewContainerElement.current || event.target === this._viewElement.current)) {
259
+ (event.target === this._viewContainerElement.current ||
260
+ event.target === this._viewElement.current)) {
230
261
  this._openLargeMap();
231
262
  }
232
263
  else if (this.state.isMoving) {
@@ -239,7 +270,10 @@ class DrawingNavigationAid extends React.Component {
239
270
  this.setState({ isPanning: false });
240
271
  }
241
272
  }
242
- else if ((!(event.target instanceof Node) || this._rootElement.current && !this._rootElement.current.contains(event.target)) && mouse.isAlmostEqual(this.state.mouseStart)) {
273
+ else if ((!(event.target instanceof Node) ||
274
+ (this._rootElement.current &&
275
+ !this._rootElement.current.contains(event.target))) &&
276
+ mouse.isAlmostEqual(this.state.mouseStart)) {
243
277
  this._closeLargeMap();
244
278
  }
245
279
  this._lastClientXY = core_geometry_1.Point2d.create(event.clientX, event.clientY);
@@ -297,8 +331,10 @@ class DrawingNavigationAid extends React.Component {
297
331
  const mapExtents = this._getOpenedMapSize();
298
332
  this.setState({
299
333
  mode: MapMode.Opened,
300
- isMoving: false, isPanning: false,
301
- mapExtents, startMapExtents,
334
+ isMoving: false,
335
+ isPanning: false,
336
+ mapExtents,
337
+ startMapExtents,
302
338
  animation: 0,
303
339
  }, () => {
304
340
  this._animationFrame = setTimeout(this._animation);
@@ -312,17 +348,23 @@ class DrawingNavigationAid extends React.Component {
312
348
  const mapOrigin = this.state.origin.clone();
313
349
  const startMapExtents = core_geometry_1.Vector3d.createFrom(this.state.mapExtents);
314
350
  const mapExtents = this._getClosedMapSize();
315
- const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
351
+ const rect = this.state.rotateMinimapWithView || this._isViewport3D()
352
+ ? this.state.extents
353
+ : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
316
354
  const maxRectDim = Math.max(rect.y, rect.x);
317
355
  const maxExtentDim = Math.max(mapExtents.x, mapExtents.y);
318
356
  const drawingZoom = maxExtentDim / (3 * maxRectDim);
319
357
  const startDrawingZoom = this.state.drawingZoom;
320
358
  this.setState({
321
359
  mode: MapMode.Closed,
322
- startMapOrigin, mapOrigin,
323
- startDrawingZoom, drawingZoom,
324
- isMoving: false, isPanning: false,
325
- startMapExtents, mapExtents,
360
+ startMapOrigin,
361
+ mapOrigin,
362
+ startDrawingZoom,
363
+ drawingZoom,
364
+ isMoving: false,
365
+ isPanning: false,
366
+ startMapExtents,
367
+ mapExtents,
326
368
  panningDirection: core_geometry_1.Vector3d.createZero(),
327
369
  animation: 0,
328
370
  }, () => {
@@ -332,17 +374,23 @@ class DrawingNavigationAid extends React.Component {
332
374
  };
333
375
  this._getPanVector = () => {
334
376
  const is3D = this._isViewport3D();
335
- const rect = this.state.rotateMinimapWithView || is3D ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
377
+ const rect = this.state.rotateMinimapWithView || is3D
378
+ ? this.state.extents
379
+ : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
336
380
  const mapExtents = this.state.mapExtents.scale(1 / this.state.drawingZoom);
337
381
  const maxMagnitude = 80; // maximum acceleration
338
382
  const magnitudeTravel = 30; // How far, in pixels, that magnitude increases from 0 to max acceleration
339
383
  const diff = core_geometry_1.Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin));
340
- const diffVector = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyVector(diff) : diff;
384
+ const diffVector = this.state.rotateMinimapWithView || is3D
385
+ ? this.state.rotation.multiplyVector(diff)
386
+ : diff;
341
387
  // capture any values
342
388
  const magnitudeVector = core_geometry_1.Vector3d.create(Math.max(0, Math.abs(diffVector.x) - (mapExtents.x - rect.x) / 2), Math.max(0, Math.abs(diffVector.y) - (mapExtents.y - rect.y) / 2));
343
389
  if (magnitudeVector.isAlmostZero)
344
390
  return core_geometry_1.Vector3d.createZero();
345
- const magnitude = Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) / magnitudeTravel * maxMagnitude;
391
+ const magnitude = (Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
392
+ magnitudeTravel) *
393
+ maxMagnitude;
346
394
  const vect = core_geometry_1.Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin)); // vect will never be zero or magnitude would also be zero
347
395
  const norm = vect.normalize();
348
396
  return norm.scale(magnitude); // norm is only undefined when vect is zero, in which it would have returned at magnitudeVector.isAlmostZero
@@ -357,15 +405,19 @@ class DrawingNavigationAid extends React.Component {
357
405
  const is3D = this._isViewport3D();
358
406
  if (event.deltaY < 0) {
359
407
  const zoom = drawingZoom * 1.1;
360
- const vect = core_geometry_1.Vector3d.create(mouseX * 0.1 / zoom, -mouseY * 0.1 / zoom, 0);
361
- const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
408
+ const vect = core_geometry_1.Vector3d.create((mouseX * 0.1) / zoom, (-mouseY * 0.1) / zoom, 0);
409
+ const offset = this.state.rotateMinimapWithView || is3D
410
+ ? this.state.rotation.multiplyTransposeVector(vect)
411
+ : vect;
362
412
  const m = mapOrigin.plus(offset);
363
413
  this.setState({ mapOrigin: m, drawingZoom: zoom });
364
414
  }
365
415
  if (event.deltaY > 0) {
366
416
  const zoom = drawingZoom / 1.1;
367
- const vect = core_geometry_1.Vector3d.create(mouseX * 0.1 / drawingZoom, -mouseY * 0.1 / drawingZoom, 0);
368
- const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
417
+ const vect = core_geometry_1.Vector3d.create((mouseX * 0.1) / drawingZoom, (-mouseY * 0.1) / drawingZoom, 0);
418
+ const offset = this.state.rotateMinimapWithView || is3D
419
+ ? this.state.rotation.multiplyTransposeVector(vect)
420
+ : vect;
369
421
  const m = mapOrigin.minus(offset);
370
422
  this.setState({ mapOrigin: m, drawingZoom: zoom });
371
423
  }
@@ -381,18 +433,32 @@ class DrawingNavigationAid extends React.Component {
381
433
  };
382
434
  this._handleUnrotate = () => {
383
435
  const startRotation = this.state.rotation;
384
- const halfExtents = this.state.extents.scale(.5);
385
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? core_geometry_1.Vector3d.createZero() : this.state.rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
436
+ const halfExtents = this.state.extents.scale(0.5);
437
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
438
+ ? core_geometry_1.Vector3d.createZero()
439
+ : this.state.rotation
440
+ .multiplyTransposeVector(halfExtents)
441
+ .minus(halfExtents);
386
442
  const startOrigin = this.state.origin;
387
443
  const origin = this.state.origin.plus(offset);
388
444
  const startMapOrigin = this.state.mapOrigin;
389
445
  const mapOrigin = this.state.mapOrigin.plus(offset);
390
- this.setState({ animation: 0, startOrigin, origin, startMapOrigin, mapOrigin, startRotation, rotation: core_geometry_1.Matrix3d.createIdentity() }, () => {
446
+ this.setState({
447
+ animation: 0,
448
+ startOrigin,
449
+ origin,
450
+ startMapOrigin,
451
+ mapOrigin,
452
+ startRotation,
453
+ rotation: core_geometry_1.Matrix3d.createIdentity(),
454
+ }, () => {
391
455
  this._animationFrame = setTimeout(this._animation, 16.667);
392
456
  });
393
457
  };
394
458
  const mode = props.initialMapMode || MapMode.Closed;
395
- const mapExtents = mode === MapMode.Closed ? this._getClosedMapSize() : this._getOpenedMapSize();
459
+ const mapExtents = mode === MapMode.Closed
460
+ ? this._getClosedMapSize()
461
+ : this._getOpenedMapSize();
396
462
  const startMapExtents = mapExtents;
397
463
  this.state = {
398
464
  startOrigin: core_geometry_1.Point3d.createZero(),
@@ -414,7 +480,9 @@ class DrawingNavigationAid extends React.Component {
414
480
  view: props.initialView,
415
481
  isMoving: false,
416
482
  isPanning: false,
417
- rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined ? props.initialRotateMinimapWithView : false,
483
+ rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
484
+ ? props.initialRotateMinimapWithView
485
+ : false,
418
486
  };
419
487
  }
420
488
  /** @internal */
@@ -427,12 +495,17 @@ class DrawingNavigationAid extends React.Component {
427
495
  const sz = startMapExtents.interpolate(a, mapExtents);
428
496
  const dz = core_geometry_1.Geometry.interpolate(startDrawingZoom, a, drawingZoom);
429
497
  const rootStyle = {
430
- width: sz.x, height: sz.y,
498
+ width: sz.x,
499
+ height: sz.y,
431
500
  ...this.props.style,
432
501
  };
433
502
  const is3D = this._isViewport3D();
434
- const tOr = rotateMinimapWithView || is3D ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(or)) : core_geometry_1.Vector3d.createFrom(or);
435
- const tMap = rotateMinimapWithView || is3D ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(map)) : core_geometry_1.Vector3d.createFrom(map);
503
+ const tOr = rotateMinimapWithView || is3D
504
+ ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(or))
505
+ : core_geometry_1.Vector3d.createFrom(or);
506
+ const tMap = rotateMinimapWithView || is3D
507
+ ? rotation.multiplyVector(core_geometry_1.Vector3d.createFrom(map))
508
+ : core_geometry_1.Vector3d.createFrom(map);
436
509
  const tPosX = (tOr.x - extents.x / 2 - tMap.x) * dz + sz.x / 2;
437
510
  const tPosY = (-tOr.y - extents.y / 2 + tMap.y) * dz + sz.y / 2;
438
511
  const viewWindowStyle = {
@@ -453,24 +526,34 @@ class DrawingNavigationAid extends React.Component {
453
526
  rootStyle.right = window.innerWidth - this._rootOffset.right;
454
527
  rootStyle.top = this._rootOffset.top;
455
528
  }
456
- const halfExtents = extents.scale(.5);
457
- const offset = rotateMinimapWithView || is3D ? core_geometry_1.Vector3d.createZero() : rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
529
+ const halfExtents = extents.scale(0.5);
530
+ const offset = rotateMinimapWithView || is3D
531
+ ? core_geometry_1.Vector3d.createZero()
532
+ : rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
458
533
  const unrotateLabel = UiIModelComponents_1.UiIModelComponents.translate("drawing.unrotate");
459
534
  const e = sz.scale(1 / dz);
460
- const halfMapExtents = e.scale(.5);
461
- const mapOffset = rotateMinimapWithView || is3D ? rotation.multiplyTransposeVector(halfMapExtents) : halfMapExtents;
462
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
463
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
535
+ const halfMapExtents = e.scale(0.5);
536
+ const mapOffset = rotateMinimapWithView || is3D
537
+ ? rotation.multiplyTransposeVector(halfMapExtents)
538
+ : halfMapExtents;
539
+ const viewManager = this.props.viewManagerOverride
540
+ ? this.props.viewManagerOverride
541
+ : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
542
+ const screenViewport = this.props.screenViewportOverride
543
+ ? this.props.screenViewportOverride
544
+ : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
464
545
  const nodes = (React.createElement("div", { className: (0, classnames_1.default)("components-drawing-navigation-aid", this.props.className), "data-testid": "components-drawing-navigation-aid", ref: this._rootElement, onWheel: this._handleWheel, onMouseDown: this._handleDrawingMouseDown, style: rootStyle, role: "presentation" },
465
546
  React.createElement(DrawingNavigationCanvas, { view: this.state.view, viewManagerOverride: viewManager, screenViewportOverride: screenViewport, viewId: viewId, origin: map.plus(offset).minus(mapOffset), extents: e, zoom: dz, rotation: rotateMinimapWithView || is3D ? rotation : core_geometry_1.Matrix3d.createIdentity() }),
466
547
  React.createElement("div", { className: "drawing-container", "data-testid": "drawing-container", ref: this._viewContainerElement },
467
548
  React.createElement("div", { className: "drawing-view-window", "data-testid": "drawing-view-window", onMouseDown: this._handleWindowMouseDown, onTouchStart: this._handleWindowTouchStart, style: viewWindowStyle, ref: this._viewElement, role: "presentation" }),
468
- !is3D &&
469
- React.createElement("div", { className: (0, classnames_1.default)("toggle-rotate-style", "icon", { checked: rotateMinimapWithView }), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating ? { bottom: 2, left: 2 } : {}, title: UiIModelComponents_1.UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
470
- React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRotateLeft, null) })),
471
- !rot.isIdentity &&
472
- React.createElement("div", { className: "unrotate-button", "data-testid": "drawing-unrotate-button", style: mode === MapMode.Closed && !isAnimating ? { top: 2 } : {}, onClick: this._handleUnrotate, role: "button", tabIndex: -1 }, unrotateLabel),
473
- mode === MapMode.Opened && !isAnimating && React.createElement(React.Fragment, null,
549
+ !is3D && (React.createElement("div", { className: (0, classnames_1.default)("toggle-rotate-style", "icon", {
550
+ checked: rotateMinimapWithView,
551
+ }), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating
552
+ ? { bottom: 2, left: 2 }
553
+ : {}, title: UiIModelComponents_1.UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
554
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRotateLeft, null) }))),
555
+ !rot.isIdentity && (React.createElement("div", { className: "unrotate-button", "data-testid": "drawing-unrotate-button", style: mode === MapMode.Closed && !isAnimating ? { top: 2 } : {}, onClick: this._handleUnrotate, role: "button", tabIndex: -1 }, unrotateLabel)),
556
+ mode === MapMode.Opened && !isAnimating && (React.createElement(React.Fragment, null,
474
557
  React.createElement("div", { className: "close", "data-testid": "drawing-close-button", onClick: this._closeLargeMap, role: "button", tabIndex: -1 },
475
558
  React.createElement("div", { className: "close-icon icon" },
476
559
  React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSortUp, null) }))),
@@ -478,8 +561,9 @@ class DrawingNavigationAid extends React.Component {
478
561
  React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-in-button", onClick: this._handleZoomIn, role: "button", tabIndex: -1 },
479
562
  React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgAdd, null) })),
480
563
  React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-out-button", onClick: this._handleZoomOut, role: "button", tabIndex: -1 },
481
- React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRemove, null) })))))));
482
- if (mode === MapMode.Closed && (animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
564
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgRemove, null) }))))))));
565
+ if (mode === MapMode.Closed &&
566
+ (animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
483
567
  return nodes;
484
568
  }
485
569
  else {
@@ -517,7 +601,9 @@ class DrawingNavigationAid extends React.Component {
517
601
  }
518
602
  _processWindowDrag(movement) {
519
603
  const vect = core_geometry_1.Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
520
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
604
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
605
+ ? this.state.rotation.multiplyTransposeVector(vect)
606
+ : vect;
521
607
  const origin = this.state.origin.plus(offset);
522
608
  const panningDirection = this._getPanVector();
523
609
  const wasAlmostZero = this.state.panningDirection.isAlmostZero;
@@ -545,7 +631,7 @@ class DrawingNavigationAid extends React.Component {
545
631
  }
546
632
  }
547
633
  }
548
- DrawingNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
634
+ DrawingNavigationAid._animationFn = (t) => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
549
635
  /** @internal */
550
636
  DrawingNavigationAid.getDefaultClosedMapSize = () => {
551
637
  return core_geometry_1.Vector3d.create(96, 96);
@@ -603,9 +689,13 @@ class DrawingNavigationCanvas extends React.Component {
603
689
  }
604
690
  componentDidMount() {
605
691
  if (this._canvasElement.current && this.props.view !== undefined) {
606
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
692
+ const viewManager = this.props.viewManagerOverride
693
+ ? this.props.viewManagerOverride
694
+ : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
607
695
  /* istanbul ignore next */
608
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
696
+ const screenViewport = this.props.screenViewportOverride
697
+ ? this.props.screenViewportOverride
698
+ : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
609
699
  const previousView = viewManager.selectedView;
610
700
  this._vp = screenViewport.create(this._canvasElement.current, this.props.view);
611
701
  this.customizeViewport(this._vp);
@@ -623,17 +713,27 @@ class DrawingNavigationCanvas extends React.Component {
623
713
  vp.viewFlags = vp.viewFlags.with("acsTriad", false);
624
714
  }
625
715
  componentDidUpdate(oldProps) {
626
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
716
+ const viewManager = this.props.viewManagerOverride
717
+ ? this.props.viewManagerOverride
718
+ : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
627
719
  if (this.props.view !== undefined) {
628
720
  if (oldProps.view !== this.props.view) {
629
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
630
- if (oldProps !== undefined && oldProps.viewId !== "" && oldProps.viewId !== this.props.viewId && this._vp) {
721
+ const screenViewport = this.props.screenViewportOverride
722
+ ? this.props.screenViewportOverride
723
+ : /* istanbul ignore next */ core_frontend_1.ScreenViewport;
724
+ if (oldProps !== undefined &&
725
+ oldProps.viewId !== "" &&
726
+ oldProps.viewId !== this.props.viewId &&
727
+ this._vp) {
631
728
  viewManager.dropViewport(this._vp, true);
632
729
  }
633
730
  // istanbul ignore else
634
731
  if (this._canvasElement.current &&
635
732
  (this.props.canvasSizeOverride ||
636
- ( /* istanbul ignore next */this._canvasElement.current.clientWidth !== 0 && /* istanbul ignore next */ this._canvasElement.current.clientHeight !== 0))) {
733
+ /* istanbul ignore next */ (this._canvasElement.current
734
+ .clientWidth !== 0 &&
735
+ /* istanbul ignore next */ this._canvasElement.current
736
+ .clientHeight !== 0))) {
637
737
  const previousView = viewManager.selectedView;
638
738
  this._vp = screenViewport.create(this._canvasElement.current, this.props.view.clone());
639
739
  this.customizeViewport(this._vp);
@@ -642,14 +742,19 @@ class DrawingNavigationCanvas extends React.Component {
642
742
  this._update();
643
743
  }
644
744
  }
645
- else if (!this.props.origin.isExactEqual(oldProps.origin) || !this.props.extents.isExactEqual(oldProps.extents) || this.props.zoom !== oldProps.zoom || !this.props.rotation.isExactEqual(oldProps.rotation)) {
745
+ else if (!this.props.origin.isExactEqual(oldProps.origin) ||
746
+ !this.props.extents.isExactEqual(oldProps.extents) ||
747
+ this.props.zoom !== oldProps.zoom ||
748
+ !this.props.rotation.isExactEqual(oldProps.rotation)) {
646
749
  this._update();
647
750
  }
648
751
  }
649
752
  }
650
753
  componentWillUnmount() {
651
754
  if (this._vp) {
652
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
755
+ const viewManager = this.props.viewManagerOverride
756
+ ? this.props.viewManagerOverride
757
+ : /* istanbul ignore next */ core_frontend_1.IModelApp.viewManager;
653
758
  viewManager.dropViewport(this._vp, true);
654
759
  }
655
760
  }