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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/CHANGELOG.md +327 -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 +11 -6
  6. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +23 -17
  9. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +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 +10 -8
  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 +35 -21
  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 +98 -39
  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 +19 -12
  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 -6
  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 +12 -8
  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 +31 -10
  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 +15 -8
  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 +34 -22
  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 +61 -38
  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 +21 -10
  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 +40 -26
  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 +11 -6
  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 +10 -8
  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 +37 -23
  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 +100 -41
  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 +19 -12
  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 -6
  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 +12 -8
  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 +31 -10
  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 +15 -8
  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 +34 -22
  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 +61 -38
  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 +21 -10
  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 +42 -28
  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,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module NavigationAids
7
7
  */
@@ -9,13 +9,13 @@ import "./DrawingNavigationAid.scss";
9
9
  import classnames from "classnames";
10
10
  import * as React from "react";
11
11
  import * as ReactDOM from "react-dom";
12
- import { Constant, Geometry, Matrix3d, Point2d, Point3d, Point4d, Vector3d } from "@itwin/core-geometry";
12
+ import { Constant, Geometry, Matrix3d, Point2d, Point3d, Point4d, Vector3d, } from "@itwin/core-geometry";
13
13
  import { IModelApp, ScreenViewport } from "@itwin/core-frontend";
14
14
  import { SpecialKey } from "@itwin/appui-abstract";
15
15
  import { Icon } from "@itwin/core-react";
16
16
  import { UiIModelComponents } from "../UiIModelComponents";
17
17
  import { ViewportComponentEvents } from "../viewport/ViewportComponentEvents";
18
- import { SvgAdd, SvgRemove, SvgRotateLeft, SvgSortUp } from "@itwin/itwinui-icons-react";
18
+ import { SvgAdd, SvgRemove, SvgRotateLeft, SvgSortUp, } from "@itwin/itwinui-icons-react";
19
19
  // cSpell:ignore Quaternion Quaternions unrotate
20
20
  /* eslint-disable jsx-a11y/click-events-have-key-events */
21
21
  /**
@@ -37,7 +37,12 @@ class DrawingNavigationAid extends React.Component {
37
37
  this._rootElement = React.createRef();
38
38
  this._viewContainerElement = React.createRef();
39
39
  this._viewElement = React.createRef();
40
- this._rootOffset = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0 });
40
+ this._rootOffset = DOMRect.fromRect({
41
+ x: 0,
42
+ y: 0,
43
+ width: 0,
44
+ height: 0,
45
+ });
41
46
  this._mounted = false;
42
47
  this._isViewport3D = () => {
43
48
  return this.state.view !== undefined && this.state.view.is3d();
@@ -47,7 +52,8 @@ class DrawingNavigationAid extends React.Component {
47
52
  const delta = this._lastTime ? t - this._lastTime : 16;
48
53
  this._lastTime = t;
49
54
  if (this.state.animation !== 1) {
50
- const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || 0.4)));
55
+ const animation = Math.min(1, this.state.animation +
56
+ delta / (1000 * (this.props.animationTime || 0.4)));
51
57
  this._updateFrustum();
52
58
  // istanbul ignore next
53
59
  if (this._mounted) {
@@ -71,7 +77,13 @@ class DrawingNavigationAid extends React.Component {
71
77
  const startRotation = this.state.rotation;
72
78
  // istanbul ignore next
73
79
  if (this._mounted) {
74
- this.setState({ startMapOrigin, startDrawingZoom, startOrigin, startRotation, startMapExtents }, () => {
80
+ this.setState({
81
+ startMapOrigin,
82
+ startDrawingZoom,
83
+ startOrigin,
84
+ startRotation,
85
+ startMapExtents,
86
+ }, () => {
75
87
  // istanbul ignore else
76
88
  if (this.props.onAnimationEnd)
77
89
  this.props.onAnimationEnd();
@@ -108,11 +120,15 @@ class DrawingNavigationAid extends React.Component {
108
120
  // Synchronize with rotation coming from the Viewport
109
121
  this._handleViewRotationChangeEvent = (args) => {
110
122
  // istanbul ignore else
111
- if (!this.state.isMoving && !this.state.isPanning && this.props.viewport === args.viewport) {
123
+ if (!this.state.isMoving &&
124
+ !this.state.isPanning &&
125
+ this.props.viewport === args.viewport) {
112
126
  const extents = args.viewport.view.getExtents().clone();
113
127
  const rotation = args.viewport.view.getRotation().clone();
114
- const halfExtents = extents.scale(.5);
115
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? rotation.multiplyTransposeVector(halfExtents) : halfExtents;
128
+ const halfExtents = extents.scale(0.5);
129
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
130
+ ? rotation.multiplyTransposeVector(halfExtents)
131
+ : halfExtents;
116
132
  const origin = args.viewport.view.getOrigin().plus(offset);
117
133
  const deltaZoom = (this.state.extents.x - extents.x) / this.state.extents.x;
118
134
  let drawingZoom = this.state.drawingZoom / (1 - deltaZoom);
@@ -120,28 +136,40 @@ class DrawingNavigationAid extends React.Component {
120
136
  let mapOrigin = this.state.mapOrigin.plus(deltaOrigin);
121
137
  mapOrigin = mapOrigin.plus(Vector3d.createFrom(origin.minus(mapOrigin)).scale(deltaZoom));
122
138
  if (this.state.viewId !== args.viewport.view.id) {
123
- const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? extents : DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
139
+ const rect = this.state.rotateMinimapWithView || this._isViewport3D()
140
+ ? extents
141
+ : DrawingNavigationAid.findRotatedWindowDimensions(extents, rotation);
124
142
  const maxRectDim = Math.max(rect.y, rect.x);
125
143
  const maxExtentDim = Math.max(this.state.mapExtents.x, this.state.mapExtents.y);
126
144
  drawingZoom = maxExtentDim / (3 * maxRectDim);
127
145
  mapOrigin = origin.clone();
128
146
  this._viewport = args.viewport;
129
- this.setState({ viewId: args.viewport.view.id, view: args.viewport.view.clone() });
147
+ this.setState({
148
+ viewId: args.viewport.view.id,
149
+ view: args.viewport.view.clone(),
150
+ });
130
151
  }
131
152
  // istanbul ignore next
132
153
  if (this._mounted) {
133
154
  this.setState({
134
- startOrigin: origin, origin, extents,
135
- startRotation: rotation, rotation,
136
- startMapOrigin: mapOrigin, mapOrigin,
137
- startDrawingZoom: drawingZoom, drawingZoom,
155
+ startOrigin: origin,
156
+ origin,
157
+ extents,
158
+ startRotation: rotation,
159
+ rotation,
160
+ startMapOrigin: mapOrigin,
161
+ mapOrigin,
162
+ startDrawingZoom: drawingZoom,
163
+ drawingZoom,
138
164
  });
139
165
  }
140
166
  }
141
167
  };
142
168
  this._updateFrustum = (complete = false) => {
143
- const halfExtents = this.state.extents.scale(.5);
144
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(halfExtents) : halfExtents;
169
+ const halfExtents = this.state.extents.scale(0.5);
170
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
171
+ ? this.state.rotation.multiplyTransposeVector(halfExtents)
172
+ : halfExtents;
145
173
  const origin = this.state.origin.minus(offset);
146
174
  ViewportComponentEvents.setDrawingViewportState(origin, this.state.rotation, complete);
147
175
  };
@@ -186,7 +214,9 @@ class DrawingNavigationAid extends React.Component {
186
214
  // istanbul ignore else
187
215
  if (this.state.isPanning && this.state.mode === MapMode.Opened) {
188
216
  const vect = Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
189
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
217
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
218
+ ? this.state.rotation.multiplyTransposeVector(vect)
219
+ : vect;
190
220
  const mapOrigin = this.state.mapOrigin.minus(offset);
191
221
  this.setState({ startMapOrigin: mapOrigin, mapOrigin });
192
222
  }
@@ -197,7 +227,8 @@ class DrawingNavigationAid extends React.Component {
197
227
  const mouse = Point2d.create(event.clientX, event.clientY);
198
228
  if (mouse.isAlmostEqual(this.state.mouseStart) &&
199
229
  this.state.mode === MapMode.Closed &&
200
- (event.target === this._viewContainerElement.current || event.target === this._viewElement.current)) {
230
+ (event.target === this._viewContainerElement.current ||
231
+ event.target === this._viewElement.current)) {
201
232
  this._openLargeMap();
202
233
  }
203
234
  else if (this.state.isMoving) {
@@ -210,7 +241,10 @@ class DrawingNavigationAid extends React.Component {
210
241
  this.setState({ isPanning: false });
211
242
  }
212
243
  }
213
- else if ((!(event.target instanceof Node) || this._rootElement.current && !this._rootElement.current.contains(event.target)) && mouse.isAlmostEqual(this.state.mouseStart)) {
244
+ else if ((!(event.target instanceof Node) ||
245
+ (this._rootElement.current &&
246
+ !this._rootElement.current.contains(event.target))) &&
247
+ mouse.isAlmostEqual(this.state.mouseStart)) {
214
248
  this._closeLargeMap();
215
249
  }
216
250
  this._lastClientXY = Point2d.create(event.clientX, event.clientY);
@@ -268,8 +302,10 @@ class DrawingNavigationAid extends React.Component {
268
302
  const mapExtents = this._getOpenedMapSize();
269
303
  this.setState({
270
304
  mode: MapMode.Opened,
271
- isMoving: false, isPanning: false,
272
- mapExtents, startMapExtents,
305
+ isMoving: false,
306
+ isPanning: false,
307
+ mapExtents,
308
+ startMapExtents,
273
309
  animation: 0,
274
310
  }, () => {
275
311
  this._animationFrame = setTimeout(this._animation);
@@ -283,17 +319,23 @@ class DrawingNavigationAid extends React.Component {
283
319
  const mapOrigin = this.state.origin.clone();
284
320
  const startMapExtents = Vector3d.createFrom(this.state.mapExtents);
285
321
  const mapExtents = this._getClosedMapSize();
286
- const rect = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
322
+ const rect = this.state.rotateMinimapWithView || this._isViewport3D()
323
+ ? this.state.extents
324
+ : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
287
325
  const maxRectDim = Math.max(rect.y, rect.x);
288
326
  const maxExtentDim = Math.max(mapExtents.x, mapExtents.y);
289
327
  const drawingZoom = maxExtentDim / (3 * maxRectDim);
290
328
  const startDrawingZoom = this.state.drawingZoom;
291
329
  this.setState({
292
330
  mode: MapMode.Closed,
293
- startMapOrigin, mapOrigin,
294
- startDrawingZoom, drawingZoom,
295
- isMoving: false, isPanning: false,
296
- startMapExtents, mapExtents,
331
+ startMapOrigin,
332
+ mapOrigin,
333
+ startDrawingZoom,
334
+ drawingZoom,
335
+ isMoving: false,
336
+ isPanning: false,
337
+ startMapExtents,
338
+ mapExtents,
297
339
  panningDirection: Vector3d.createZero(),
298
340
  animation: 0,
299
341
  }, () => {
@@ -303,17 +345,23 @@ class DrawingNavigationAid extends React.Component {
303
345
  };
304
346
  this._getPanVector = () => {
305
347
  const is3D = this._isViewport3D();
306
- const rect = this.state.rotateMinimapWithView || is3D ? this.state.extents : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
348
+ const rect = this.state.rotateMinimapWithView || is3D
349
+ ? this.state.extents
350
+ : DrawingNavigationAid.findRotatedWindowDimensions(this.state.extents, this.state.rotation);
307
351
  const mapExtents = this.state.mapExtents.scale(1 / this.state.drawingZoom);
308
352
  const maxMagnitude = 80; // maximum acceleration
309
353
  const magnitudeTravel = 30; // How far, in pixels, that magnitude increases from 0 to max acceleration
310
354
  const diff = Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin));
311
- const diffVector = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyVector(diff) : diff;
355
+ const diffVector = this.state.rotateMinimapWithView || is3D
356
+ ? this.state.rotation.multiplyVector(diff)
357
+ : diff;
312
358
  // capture any values
313
359
  const magnitudeVector = 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));
314
360
  if (magnitudeVector.isAlmostZero)
315
361
  return Vector3d.createZero();
316
- const magnitude = Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) / magnitudeTravel * maxMagnitude;
362
+ const magnitude = (Math.min(magnitudeVector.magnitude() * this.state.drawingZoom, magnitudeTravel) /
363
+ magnitudeTravel) *
364
+ maxMagnitude;
317
365
  const vect = Vector3d.createFrom(this.state.origin.minus(this.state.mapOrigin)); // vect will never be zero or magnitude would also be zero
318
366
  const norm = vect.normalize();
319
367
  return norm.scale(magnitude); // norm is only undefined when vect is zero, in which it would have returned at magnitudeVector.isAlmostZero
@@ -328,15 +376,19 @@ class DrawingNavigationAid extends React.Component {
328
376
  const is3D = this._isViewport3D();
329
377
  if (event.deltaY < 0) {
330
378
  const zoom = drawingZoom * 1.1;
331
- const vect = Vector3d.create(mouseX * 0.1 / zoom, -mouseY * 0.1 / zoom, 0);
332
- const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
379
+ const vect = Vector3d.create((mouseX * 0.1) / zoom, (-mouseY * 0.1) / zoom, 0);
380
+ const offset = this.state.rotateMinimapWithView || is3D
381
+ ? this.state.rotation.multiplyTransposeVector(vect)
382
+ : vect;
333
383
  const m = mapOrigin.plus(offset);
334
384
  this.setState({ mapOrigin: m, drawingZoom: zoom });
335
385
  }
336
386
  if (event.deltaY > 0) {
337
387
  const zoom = drawingZoom / 1.1;
338
- const vect = Vector3d.create(mouseX * 0.1 / drawingZoom, -mouseY * 0.1 / drawingZoom, 0);
339
- const offset = this.state.rotateMinimapWithView || is3D ? this.state.rotation.multiplyTransposeVector(vect) : vect;
388
+ const vect = Vector3d.create((mouseX * 0.1) / drawingZoom, (-mouseY * 0.1) / drawingZoom, 0);
389
+ const offset = this.state.rotateMinimapWithView || is3D
390
+ ? this.state.rotation.multiplyTransposeVector(vect)
391
+ : vect;
340
392
  const m = mapOrigin.minus(offset);
341
393
  this.setState({ mapOrigin: m, drawingZoom: zoom });
342
394
  }
@@ -352,18 +404,32 @@ class DrawingNavigationAid extends React.Component {
352
404
  };
353
405
  this._handleUnrotate = () => {
354
406
  const startRotation = this.state.rotation;
355
- const halfExtents = this.state.extents.scale(.5);
356
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? Vector3d.createZero() : this.state.rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
407
+ const halfExtents = this.state.extents.scale(0.5);
408
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
409
+ ? Vector3d.createZero()
410
+ : this.state.rotation
411
+ .multiplyTransposeVector(halfExtents)
412
+ .minus(halfExtents);
357
413
  const startOrigin = this.state.origin;
358
414
  const origin = this.state.origin.plus(offset);
359
415
  const startMapOrigin = this.state.mapOrigin;
360
416
  const mapOrigin = this.state.mapOrigin.plus(offset);
361
- this.setState({ animation: 0, startOrigin, origin, startMapOrigin, mapOrigin, startRotation, rotation: Matrix3d.createIdentity() }, () => {
417
+ this.setState({
418
+ animation: 0,
419
+ startOrigin,
420
+ origin,
421
+ startMapOrigin,
422
+ mapOrigin,
423
+ startRotation,
424
+ rotation: Matrix3d.createIdentity(),
425
+ }, () => {
362
426
  this._animationFrame = setTimeout(this._animation, 16.667);
363
427
  });
364
428
  };
365
429
  const mode = props.initialMapMode || MapMode.Closed;
366
- const mapExtents = mode === MapMode.Closed ? this._getClosedMapSize() : this._getOpenedMapSize();
430
+ const mapExtents = mode === MapMode.Closed
431
+ ? this._getClosedMapSize()
432
+ : this._getOpenedMapSize();
367
433
  const startMapExtents = mapExtents;
368
434
  this.state = {
369
435
  startOrigin: Point3d.createZero(),
@@ -385,7 +451,9 @@ class DrawingNavigationAid extends React.Component {
385
451
  view: props.initialView,
386
452
  isMoving: false,
387
453
  isPanning: false,
388
- rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined ? props.initialRotateMinimapWithView : false,
454
+ rotateMinimapWithView: props.initialRotateMinimapWithView !== undefined
455
+ ? props.initialRotateMinimapWithView
456
+ : false,
389
457
  };
390
458
  }
391
459
  /** @internal */
@@ -398,12 +466,17 @@ class DrawingNavigationAid extends React.Component {
398
466
  const sz = startMapExtents.interpolate(a, mapExtents);
399
467
  const dz = Geometry.interpolate(startDrawingZoom, a, drawingZoom);
400
468
  const rootStyle = {
401
- width: sz.x, height: sz.y,
469
+ width: sz.x,
470
+ height: sz.y,
402
471
  ...this.props.style,
403
472
  };
404
473
  const is3D = this._isViewport3D();
405
- const tOr = rotateMinimapWithView || is3D ? rotation.multiplyVector(Vector3d.createFrom(or)) : Vector3d.createFrom(or);
406
- const tMap = rotateMinimapWithView || is3D ? rotation.multiplyVector(Vector3d.createFrom(map)) : Vector3d.createFrom(map);
474
+ const tOr = rotateMinimapWithView || is3D
475
+ ? rotation.multiplyVector(Vector3d.createFrom(or))
476
+ : Vector3d.createFrom(or);
477
+ const tMap = rotateMinimapWithView || is3D
478
+ ? rotation.multiplyVector(Vector3d.createFrom(map))
479
+ : Vector3d.createFrom(map);
407
480
  const tPosX = (tOr.x - extents.x / 2 - tMap.x) * dz + sz.x / 2;
408
481
  const tPosY = (-tOr.y - extents.y / 2 + tMap.y) * dz + sz.y / 2;
409
482
  const viewWindowStyle = {
@@ -424,24 +497,34 @@ class DrawingNavigationAid extends React.Component {
424
497
  rootStyle.right = window.innerWidth - this._rootOffset.right;
425
498
  rootStyle.top = this._rootOffset.top;
426
499
  }
427
- const halfExtents = extents.scale(.5);
428
- const offset = rotateMinimapWithView || is3D ? Vector3d.createZero() : rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
500
+ const halfExtents = extents.scale(0.5);
501
+ const offset = rotateMinimapWithView || is3D
502
+ ? Vector3d.createZero()
503
+ : rotation.multiplyTransposeVector(halfExtents).minus(halfExtents);
429
504
  const unrotateLabel = UiIModelComponents.translate("drawing.unrotate");
430
505
  const e = sz.scale(1 / dz);
431
- const halfMapExtents = e.scale(.5);
432
- const mapOffset = rotateMinimapWithView || is3D ? rotation.multiplyTransposeVector(halfMapExtents) : halfMapExtents;
433
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ IModelApp.viewManager;
434
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ ScreenViewport;
506
+ const halfMapExtents = e.scale(0.5);
507
+ const mapOffset = rotateMinimapWithView || is3D
508
+ ? rotation.multiplyTransposeVector(halfMapExtents)
509
+ : halfMapExtents;
510
+ const viewManager = this.props.viewManagerOverride
511
+ ? this.props.viewManagerOverride
512
+ : /* istanbul ignore next */ IModelApp.viewManager;
513
+ const screenViewport = this.props.screenViewportOverride
514
+ ? this.props.screenViewportOverride
515
+ : /* istanbul ignore next */ ScreenViewport;
435
516
  const nodes = (React.createElement("div", { className: classnames("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" },
436
517
  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 : Matrix3d.createIdentity() }),
437
518
  React.createElement("div", { className: "drawing-container", "data-testid": "drawing-container", ref: this._viewContainerElement },
438
519
  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" }),
439
- !is3D &&
440
- React.createElement("div", { className: classnames("toggle-rotate-style", "icon", { checked: rotateMinimapWithView }), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating ? { bottom: 2, left: 2 } : {}, title: UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
441
- React.createElement(Icon, { iconSpec: React.createElement(SvgRotateLeft, null) })),
442
- !rot.isIdentity &&
443
- 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),
444
- mode === MapMode.Opened && !isAnimating && React.createElement(React.Fragment, null,
520
+ !is3D && (React.createElement("div", { className: classnames("toggle-rotate-style", "icon", {
521
+ checked: rotateMinimapWithView,
522
+ }), "data-testid": "toggle-rotate-style", style: mode === MapMode.Closed && !isAnimating
523
+ ? { bottom: 2, left: 2 }
524
+ : {}, title: UiIModelComponents.translate("drawing.rotateStyle"), onClick: this._toggleRotationMode, role: "presentation" },
525
+ React.createElement(Icon, { iconSpec: React.createElement(SvgRotateLeft, null) }))),
526
+ !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)),
527
+ mode === MapMode.Opened && !isAnimating && (React.createElement(React.Fragment, null,
445
528
  React.createElement("div", { className: "close", "data-testid": "drawing-close-button", onClick: this._closeLargeMap, role: "button", tabIndex: -1 },
446
529
  React.createElement("div", { className: "close-icon icon" },
447
530
  React.createElement(Icon, { iconSpec: React.createElement(SvgSortUp, null) }))),
@@ -449,8 +532,9 @@ class DrawingNavigationAid extends React.Component {
449
532
  React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-in-button", onClick: this._handleZoomIn, role: "button", tabIndex: -1 },
450
533
  React.createElement(Icon, { iconSpec: React.createElement(SvgAdd, null) })),
451
534
  React.createElement("div", { className: "zoom-button icon", "data-testid": "drawing-zoom-out-button", onClick: this._handleZoomOut, role: "button", tabIndex: -1 },
452
- React.createElement(Icon, { iconSpec: React.createElement(SvgRemove, null) })))))));
453
- if (mode === MapMode.Closed && (animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
535
+ React.createElement(Icon, { iconSpec: React.createElement(SvgRemove, null) }))))))));
536
+ if (mode === MapMode.Closed &&
537
+ (animation === 1.0 || startMapExtents.isExactEqual(mapExtents))) {
454
538
  return nodes;
455
539
  }
456
540
  else {
@@ -488,7 +572,9 @@ class DrawingNavigationAid extends React.Component {
488
572
  }
489
573
  _processWindowDrag(movement) {
490
574
  const vect = Vector3d.create(movement.x / this.state.drawingZoom, -movement.y / this.state.drawingZoom, 0);
491
- const offset = this.state.rotateMinimapWithView || this._isViewport3D() ? this.state.rotation.multiplyTransposeVector(vect) : vect;
575
+ const offset = this.state.rotateMinimapWithView || this._isViewport3D()
576
+ ? this.state.rotation.multiplyTransposeVector(vect)
577
+ : vect;
492
578
  const origin = this.state.origin.plus(offset);
493
579
  const panningDirection = this._getPanVector();
494
580
  const wasAlmostZero = this.state.panningDirection.isAlmostZero;
@@ -516,7 +602,7 @@ class DrawingNavigationAid extends React.Component {
516
602
  }
517
603
  }
518
604
  }
519
- DrawingNavigationAid._animationFn = (t) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
605
+ DrawingNavigationAid._animationFn = (t) => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;
520
606
  /** @internal */
521
607
  DrawingNavigationAid.getDefaultClosedMapSize = () => {
522
608
  return Vector3d.create(96, 96);
@@ -574,9 +660,13 @@ export class DrawingNavigationCanvas extends React.Component {
574
660
  }
575
661
  componentDidMount() {
576
662
  if (this._canvasElement.current && this.props.view !== undefined) {
577
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ IModelApp.viewManager;
663
+ const viewManager = this.props.viewManagerOverride
664
+ ? this.props.viewManagerOverride
665
+ : /* istanbul ignore next */ IModelApp.viewManager;
578
666
  /* istanbul ignore next */
579
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ ScreenViewport;
667
+ const screenViewport = this.props.screenViewportOverride
668
+ ? this.props.screenViewportOverride
669
+ : /* istanbul ignore next */ ScreenViewport;
580
670
  const previousView = viewManager.selectedView;
581
671
  this._vp = screenViewport.create(this._canvasElement.current, this.props.view);
582
672
  this.customizeViewport(this._vp);
@@ -594,17 +684,27 @@ export class DrawingNavigationCanvas extends React.Component {
594
684
  vp.viewFlags = vp.viewFlags.with("acsTriad", false);
595
685
  }
596
686
  componentDidUpdate(oldProps) {
597
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ IModelApp.viewManager;
687
+ const viewManager = this.props.viewManagerOverride
688
+ ? this.props.viewManagerOverride
689
+ : /* istanbul ignore next */ IModelApp.viewManager;
598
690
  if (this.props.view !== undefined) {
599
691
  if (oldProps.view !== this.props.view) {
600
- const screenViewport = this.props.screenViewportOverride ? this.props.screenViewportOverride : /* istanbul ignore next */ ScreenViewport;
601
- if (oldProps !== undefined && oldProps.viewId !== "" && oldProps.viewId !== this.props.viewId && this._vp) {
692
+ const screenViewport = this.props.screenViewportOverride
693
+ ? this.props.screenViewportOverride
694
+ : /* istanbul ignore next */ ScreenViewport;
695
+ if (oldProps !== undefined &&
696
+ oldProps.viewId !== "" &&
697
+ oldProps.viewId !== this.props.viewId &&
698
+ this._vp) {
602
699
  viewManager.dropViewport(this._vp, true);
603
700
  }
604
701
  // istanbul ignore else
605
702
  if (this._canvasElement.current &&
606
703
  (this.props.canvasSizeOverride ||
607
- ( /* istanbul ignore next */this._canvasElement.current.clientWidth !== 0 && /* istanbul ignore next */ this._canvasElement.current.clientHeight !== 0))) {
704
+ /* istanbul ignore next */ (this._canvasElement.current
705
+ .clientWidth !== 0 &&
706
+ /* istanbul ignore next */ this._canvasElement.current
707
+ .clientHeight !== 0))) {
608
708
  const previousView = viewManager.selectedView;
609
709
  this._vp = screenViewport.create(this._canvasElement.current, this.props.view.clone());
610
710
  this.customizeViewport(this._vp);
@@ -613,14 +713,19 @@ export class DrawingNavigationCanvas extends React.Component {
613
713
  this._update();
614
714
  }
615
715
  }
616
- 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)) {
716
+ else if (!this.props.origin.isExactEqual(oldProps.origin) ||
717
+ !this.props.extents.isExactEqual(oldProps.extents) ||
718
+ this.props.zoom !== oldProps.zoom ||
719
+ !this.props.rotation.isExactEqual(oldProps.rotation)) {
617
720
  this._update();
618
721
  }
619
722
  }
620
723
  }
621
724
  componentWillUnmount() {
622
725
  if (this._vp) {
623
- const viewManager = this.props.viewManagerOverride ? this.props.viewManagerOverride : /* istanbul ignore next */ IModelApp.viewManager;
726
+ const viewManager = this.props.viewManagerOverride
727
+ ? this.props.viewManagerOverride
728
+ : /* istanbul ignore next */ IModelApp.viewManager;
624
729
  viewManager.dropViewport(this._vp, true);
625
730
  }
626
731
  }