@itwin/imodel-components-react 4.0.0-dev.12 → 4.0.0-dev.14

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 (282) hide show
  1. package/CHANGELOG.md +113 -1
  2. package/README.md +2 -2
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +28 -28
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js +75 -77
  5. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  6. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +190 -186
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  9. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  10. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +112 -108
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  13. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +78 -74
  14. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  16. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +149 -145
  17. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  18. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +143 -139
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  21. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
  22. package/lib/cjs/imodel-components-react/color/HueSlider.js +203 -199
  23. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  25. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +217 -213
  26. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
  28. package/lib/cjs/imodel-components-react/color/Swatch.js +64 -60
  29. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  30. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  31. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
  32. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  33. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +155 -151
  34. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  36. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +164 -160
  37. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  38. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  39. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +100 -96
  40. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  41. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  42. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  43. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +272 -268
  44. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  45. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  46. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +89 -85
  47. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  48. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  49. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +163 -159
  50. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  51. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +1 -2
  52. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  53. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +131 -127
  54. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  55. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +175 -174
  56. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  57. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +650 -638
  58. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  59. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  60. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +657 -653
  61. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  63. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +103 -99
  64. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  65. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +0 -4
  66. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  67. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +56 -53
  68. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  69. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  70. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +88 -84
  71. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  72. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  73. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +89 -86
  74. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  75. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  76. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +112 -109
  77. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  78. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  81. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  82. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +187 -184
  83. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  85. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +149 -145
  86. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  87. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  88. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +63 -59
  89. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  90. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  91. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +51 -47
  92. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  93. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  94. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +58 -54
  95. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  96. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  97. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +52 -48
  98. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  99. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  100. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +54 -50
  101. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  102. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +62 -58
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +51 -47
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +60 -56
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +98 -95
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +123 -119
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  117. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  118. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  119. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +142 -143
  120. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  121. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  122. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
  123. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  124. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +85 -81
  125. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  126. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  127. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +99 -95
  128. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  129. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  130. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +195 -191
  131. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  132. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  133. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +432 -428
  134. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  136. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +58 -54
  137. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  138. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
  139. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  140. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +398 -365
  141. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  142. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +17 -0
  143. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +174 -174
  144. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  145. package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
  146. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  147. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  148. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +276 -274
  149. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  150. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  151. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
  152. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  153. package/lib/cjs/imodel-components-react.d.ts +82 -82
  154. package/lib/cjs/imodel-components-react.js +105 -101
  155. package/lib/cjs/imodel-components-react.js.map +1 -1
  156. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
  157. package/lib/esm/imodel-components-react/UiIModelComponents.js +72 -73
  158. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  159. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  160. package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
  161. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  162. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +83 -83
  163. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  164. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  165. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
  166. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +21 -21
  167. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +122 -122
  168. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  169. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  170. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +114 -114
  171. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
  172. package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
  173. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  174. package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
  175. package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
  176. package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
  177. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  178. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
  179. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  180. package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
  181. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  182. package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
  183. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  184. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
  185. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  186. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  187. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +243 -243
  188. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  189. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  190. package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
  191. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  192. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +134 -133
  193. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  194. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +1 -2
  195. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  196. package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
  197. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +175 -174
  198. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  199. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +620 -610
  200. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  201. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  202. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +627 -626
  203. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  204. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  205. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
  206. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  207. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +0 -4
  208. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  209. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +29 -30
  210. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  211. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  212. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +61 -61
  213. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  214. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  215. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +62 -63
  216. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  217. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  218. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +82 -83
  219. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  220. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  221. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +106 -110
  222. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  223. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  224. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +157 -158
  225. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  226. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  227. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -122
  228. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  229. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
  230. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  231. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
  232. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  233. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
  234. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  235. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
  236. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  237. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
  238. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  239. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
  240. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  241. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
  242. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  243. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
  244. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  245. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +68 -69
  246. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  247. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  248. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
  249. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  250. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  251. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +138 -139
  252. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  253. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  254. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
  255. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  256. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
  257. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  258. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +68 -68
  259. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  260. package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
  261. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  262. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +402 -402
  263. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  264. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
  265. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
  266. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  267. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +368 -339
  268. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  269. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +17 -0
  270. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +174 -174
  271. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  272. package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
  273. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  274. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  275. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +249 -251
  276. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  277. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  278. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +96 -95
  279. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  280. package/lib/esm/imodel-components-react.d.ts +82 -82
  281. package/lib/esm/imodel-components-react.js +87 -87
  282. package/package.json +26 -24
@@ -1 +1 @@
1
- {"version":3,"file":"CubeNavigationAid.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/CubeNavigationAid.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAU,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EAAE,SAAS,EAA8B,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAe,IAAI,EAAY,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAA+B,MAAM,qCAAqC,CAAC;AAC3G,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,iB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Ac,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;IAnBiB,MAAM;QACpB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;QACpI,MAAM,OAAO,GAAG,UAAU,CACxB,cAAc,EAAE,MAAM,EACtB,YAAY,CAAC,WAAW,CAAC,EACzB,OAAO,IAAI,cAAc,CAC1B,CAAC;QAEF,OAAO;QACL,iEAAiE;QACjE,6BAAK,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,EAC1E,OAAO,EAAE,IAAI,CAAC,YAAY;YAAE,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,CAAC,WAAW,CAAC,GAAI;gBAAO,CACtF,CAAC;IACJ,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NavigationAids\r\n */\r\n\r\nimport \"./CubeNavigationAid.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Angle, AxisIndex, AxisOrder, Geometry, Matrix3d, Point2d, Vector2d, Vector3d, XYAndZ } from \"@itwin/core-geometry\";\r\nimport { IModelApp, IModelConnection, Viewport } from \"@itwin/core-frontend\";\r\nimport { CommonProps, Icon, IconSpec } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { ViewportComponentEvents, ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\r\nimport { Cube, Face } from \"./Cube\";\r\nimport { SvgCaretDownSmall, SvgCaretLeftSmall, SvgCaretRightSmall, SvgCaretUpSmall } from \"@itwin/itwinui-icons-react\";\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxX {\r\n None = 0,\r\n Right = 1,\r\n Left = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. Use [[CubeNavigationHitBoxX]] */\r\nexport enum HitBoxX {\r\n None = 0,\r\n Right = 1,\r\n Left = -1,\r\n}\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxY {\r\n None = 0,\r\n Back = 1,\r\n Front = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. Use [[CubeNavigationHitBoxY]] */\r\nexport enum HitBoxY {\r\n None = 0,\r\n Back = 1,\r\n Front = -1,\r\n}\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxZ {\r\n None = 0,\r\n Top = 1,\r\n Bottom = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. [[CubeNavigationHitBoxZ]] */\r\nexport enum HitBoxZ {\r\n None = 0,\r\n Top = 1,\r\n Bottom = -1,\r\n}\r\n\r\ninterface CubeNavigationRotationMap {\r\n up: Face;\r\n down: Face;\r\n left: Face;\r\n right: Face;\r\n}\r\n\r\nconst cubeNavigationFaceLocs: { [key: string]: Vector3d } = {\r\n [Face.Left]: Vector3d.create(CubeNavigationHitBoxX.Left, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\r\n [Face.Right]: Vector3d.create(CubeNavigationHitBoxX.Right, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\r\n [Face.Back]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Back, CubeNavigationHitBoxZ.None),\r\n [Face.Front]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Front, CubeNavigationHitBoxZ.None),\r\n [Face.Bottom]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Bottom),\r\n [Face.Top]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Top),\r\n};\r\n\r\nconst cubeNavigationFaceRotations: { [key: string]: Matrix3d } = {\r\n [Face.Left]: Matrix3d.createRowValues(0, -1, 0, 0, 0, 1, -1, 0, 0),\r\n [Face.Right]: Matrix3d.createRowValues(0, 1, 0, 0, 0, 1, 1, 0, 0),\r\n [Face.Back]: Matrix3d.createRowValues(-1, 0, 0, 0, 0, 1, 0, 1, 0),\r\n [Face.Front]: Matrix3d.createRowValues(1, 0, 0, 0, 0, 1, 0, -1, 0),\r\n [Face.Bottom]: Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1),\r\n [Face.Top]: Matrix3d.createRowValues(1, 0, 0, 0, 1, 0, 0, 0, 1),\r\n};\r\n\r\n// data relating Up/Down/Left/Right directions relative to every surface\r\nconst cubeNavigationRoutes: { [key: string]: CubeNavigationRotationMap } = {\r\n [Face.Front]: { up: Face.Top, down: Face.Bottom, left: Face.Left, right: Face.Right },\r\n [Face.Back]: { up: Face.Top, down: Face.Bottom, left: Face.Right, right: Face.Left },\r\n [Face.Top]: { up: Face.Back, down: Face.Front, left: Face.Left, right: Face.Right },\r\n [Face.Bottom]: { up: Face.Front, down: Face.Back, left: Face.Left, right: Face.Right },\r\n [Face.Right]: { up: Face.Top, down: Face.Bottom, left: Face.Front, right: Face.Back },\r\n [Face.Left]: { up: Face.Top, down: Face.Bottom, left: Face.Back, right: Face.Front },\r\n};\r\n\r\n/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */\r\nconst DEFAULT_TOLERANCE = 1.0e-6;\r\n\r\n/** @internal */\r\nexport enum CubeHover {\r\n None = 0,\r\n Hover,\r\n Active,\r\n}\r\n\r\n/** Properties for the [[CubeNavigationAid]] component\r\n * @public\r\n */\r\nexport interface CubeNavigationAidProps extends CommonProps {\r\n iModelConnection: IModelConnection;\r\n viewport?: Viewport;\r\n\r\n // used only in testing\r\n\r\n /** @internal */\r\n onAnimationEnd?: () => void;\r\n /** @internal */\r\n animationTime?: number;\r\n}\r\n\r\n/** @public */\r\ninterface CubeNavigationAidState {\r\n dragging: boolean;\r\n startRotMatrix: Matrix3d;\r\n endRotMatrix: Matrix3d;\r\n animation: number;\r\n hoverMap: { [key: string]: CubeHover };\r\n face: Face;\r\n}\r\n\r\n/** Cube Navigation Aid Component\r\n * @public\r\n */\r\nexport class CubeNavigationAid extends React.Component<CubeNavigationAidProps, CubeNavigationAidState> {\r\n private _start: Vector2d = Vector2d.createZero();\r\n /** @internal */\r\n public override readonly state: Readonly<CubeNavigationAidState> = {\r\n dragging: false,\r\n startRotMatrix: Matrix3d.createIdentity(),\r\n endRotMatrix: Matrix3d.createIdentity(),\r\n animation: 1,\r\n hoverMap: {},\r\n face: Face.Top,\r\n };\r\n\r\n private _lastTime: number | undefined;\r\n private _animationFrame: any;\r\n private _mounted: boolean = false;\r\n private _labels: { [key: string]: string } = {\r\n [Face.Right]: UiIModelComponents.translate(\"cube.right\"),\r\n [Face.Left]: UiIModelComponents.translate(\"cube.left\"),\r\n [Face.Back]: UiIModelComponents.translate(\"cube.back\"),\r\n [Face.Front]: UiIModelComponents.translate(\"cube.front\"),\r\n [Face.Top]: UiIModelComponents.translate(\"cube.top\"),\r\n [Face.Bottom]: UiIModelComponents.translate(\"cube.bottom\"),\r\n };\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._mounted = true;\r\n ViewportComponentEvents.onViewRotationChangeEvent.addListener(this._handleViewRotationChangeEvent);\r\n\r\n // set initial rotation\r\n if (this.props.viewport) {\r\n const newMatrix = this.props.viewport.view.getRotation().clone();\r\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1 });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);\r\n clearTimeout(this._animationFrame);\r\n this._mounted = false;\r\n }\r\n\r\n // Synchronize with rotation coming from the Viewport\r\n private _handleViewRotationChangeEvent = (args: ViewRotationChangeEventArgs) => {\r\n const { animation, dragging, endRotMatrix } = this.state;\r\n // istanbul ignore else\r\n if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {\r\n const newMatrix = this.props.viewport.view.getRotation().clone();\r\n if (!endRotMatrix.isAlmostEqual(newMatrix)) {\r\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1, face: Face.None });\r\n }\r\n }\r\n };\r\n\r\n private _animation = () => {\r\n const t = Date.now();\r\n const delta = this._lastTime ? t - this._lastTime : 16;\r\n this._lastTime = t;\r\n if (this.state.animation !== 1) {\r\n const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || /* istanbul ignore next */ 0.4)));\r\n\r\n // istanbul ignore next\r\n if (this._mounted) {\r\n this.setState({ animation }, () => {\r\n this._animationFrame = setTimeout(this._animation, 16.667);\r\n });\r\n }\r\n } else {\r\n this._lastTime = undefined;\r\n this._animationEnd();\r\n }\r\n };\r\n\r\n private _animationEnd = () => {\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, this.state.face, true);\r\n const startRotMatrix = this.state.endRotMatrix.clone();\r\n // istanbul ignore next\r\n if (this._mounted) {\r\n this.setState({ startRotMatrix }, () => {\r\n // istanbul ignore else\r\n if (this.props.onAnimationEnd)\r\n this.props.onAnimationEnd();\r\n });\r\n }\r\n };\r\n\r\n private static _animationFn = (t: number) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;\r\n\r\n private static _isMatrixFace = (matrix: Matrix3d): boolean => {\r\n let sum = 0;\r\n for (const coff of matrix.coffs) {\r\n if (Geometry.isAlmostEqualNumber(Math.abs(coff), 1))\r\n sum++;\r\n }\r\n // Assuming matrix is a proper rotation matrix:\r\n // if matrix viewing a face, there will be a total of 3 values either almost -1, or almost 1.\r\n return sum === 3;\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const { animation, startRotMatrix, endRotMatrix } = this.state;\r\n const visible = CubeNavigationAid._isMatrixFace(endRotMatrix) && animation === 1.0;\r\n const rotMatrix = CubeNavigationAid._interpolateRotMatrix(startRotMatrix, animation, endRotMatrix);\r\n if (rotMatrix !== startRotMatrix && rotMatrix !== endRotMatrix)\r\n ViewportComponentEvents.setCubeMatrix(rotMatrix, Face.None);\r\n\r\n const faces: { [key: string]: React.ReactNode } = {};\r\n for (const key in this._labels) {\r\n // istanbul ignore else\r\n if (this._labels.hasOwnProperty(key)) {\r\n const f = key as Face;\r\n const label = this._labels[f];\r\n faces[f] =\r\n <NavCubeFace\r\n face={f}\r\n label={label}\r\n hoverMap={this.state.hoverMap}\r\n onFaceCellClick={this._handleFaceCellClick}\r\n onFaceCellHoverChange={this._handleCellHoverChange} />;\r\n }\r\n }\r\n\r\n const cubeClassNames = classnames(\r\n \"nav-cube\",\r\n this.state.dragging && \"cube-dragging\",\r\n );\r\n\r\n const upTitle = this.getArrowTitle(Pointer.Up);\r\n const downTitle = this.getArrowTitle(Pointer.Down);\r\n const leftTitle = this.getArrowTitle(Pointer.Left);\r\n const rightTitle = this.getArrowTitle(Pointer.Right);\r\n\r\n return (\r\n <div className={classnames(\"components-cube-container\", this.props.className)}\r\n style={this.props.style}\r\n data-testid=\"components-cube-navigation-aid\"\r\n onMouseDown={this._handleBoxMouseDown}\r\n onTouchStart={this._handleBoxTouchStart}\r\n role=\"presentation\"\r\n >\r\n <div className={\"cube-element-container\"}>\r\n <Cube\r\n className={cubeClassNames}\r\n rotMatrix={rotMatrix}\r\n faces={faces} />\r\n </div>\r\n <PointerButton data-testid=\"cube-pointer-button-up\"\r\n visible={visible} pointerType={Pointer.Up} onArrowClick={this._onArrowClick} title={upTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-down\"\r\n visible={visible} pointerType={Pointer.Down} onArrowClick={this._onArrowClick} title={downTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-left\"\r\n visible={visible} pointerType={Pointer.Left} onArrowClick={this._onArrowClick} title={leftTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-right\"\r\n visible={visible} pointerType={Pointer.Right} onArrowClick={this._onArrowClick} title={rightTitle} />\r\n </div>\r\n );\r\n }\r\n\r\n private _handleCellHoverChange = (vect: Vector3d, state: CubeHover) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const hoverMap = this.state.hoverMap;\r\n hoverMap[`${vect.x}-${vect.y}-${vect.z}`] = state;\r\n this.setState({ hoverMap });\r\n };\r\n\r\n private _isInteractionLocked = () => {\r\n // Locked by markup\r\n if(undefined !== this.props.viewport && this.props.viewport === IModelApp.toolAdmin.markupView) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n private static _getMatrixFace = (rotMatrix: Matrix3d): Face => {\r\n if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {\r\n return Face.None;\r\n }\r\n\r\n let matrixFace = Face.None;\r\n\r\n for (const face in cubeNavigationFaceRotations) {\r\n // istanbul ignore else\r\n if (face in cubeNavigationFaceRotations) {\r\n const loc = cubeNavigationFaceRotations[face];\r\n if (rotMatrix.isAlmostEqual(loc)) {\r\n matrixFace = face as Face;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return matrixFace;\r\n };\r\n\r\n private static _interpolateRotMatrix = (start: Matrix3d, anim: number, end: Matrix3d): Matrix3d => {\r\n if (anim === 0)\r\n return start;\r\n if (anim === 1 || start.isAlmostEqual(end))\r\n return end;\r\n const startInverse = start.transpose();\r\n const diff = end.multiplyMatrixMatrix(startInverse);\r\n const angleAxis = diff.getAxisAndAngleOfRotation();\r\n // istanbul ignore else\r\n if (angleAxis.ok) {\r\n const angle = Angle.createRadians(angleAxis.angle.radians * CubeNavigationAid._animationFn(anim));\r\n const newDiff = Matrix3d.createRotationAroundVector(angleAxis.axis, angle);\r\n // istanbul ignore else\r\n if (newDiff) {\r\n const newMatrix = newDiff.multiplyMatrixMatrix(start);\r\n return newMatrix;\r\n }\r\n }\r\n // istanbul ignore next\r\n return end;\r\n };\r\n\r\n private static correctSmallNumber(value: number, tolerance: number): number {\r\n return Math.abs(value) < tolerance ? 0 : value;\r\n }\r\n\r\n /**\r\n * Snap coordinates of a vector to zero and to each other so that the vector prefers to be\r\n * * perpendicular to a face of the unit cube.\r\n * * or pass through a nearby vertex or edge of the unit cube.\r\n * @param zVector existing z vector.\r\n * @param tolerance tolerance to determine if a z vector component is close to zero or 1.\r\n */\r\n private static snapVectorToCubeFeatures(zVector: XYAndZ, tolerance: number): Vector3d {\r\n const x = CubeNavigationAid.correctSmallNumber(zVector.x, tolerance);\r\n let y = CubeNavigationAid.correctSmallNumber(zVector.y, tolerance);\r\n let z = CubeNavigationAid.correctSmallNumber(zVector.z, tolerance);\r\n\r\n const xx = Math.abs(x);\r\n const yy = Math.abs(y);\r\n const zz = Math.abs(z);\r\n\r\n // adjust any adjacent pair of near equal values to the first.\r\n // istanbul ignore next\r\n if (Geometry.isSameCoordinate(xx, yy, tolerance)) {\r\n y = Geometry.split3WaySign(y, -xx, xx, xx);\r\n }\r\n if (Geometry.isSameCoordinate(yy, zz, tolerance)) {\r\n z = Geometry.split3WaySign(z, -yy, yy, yy);\r\n }\r\n if (Geometry.isSameCoordinate(xx, zz, tolerance)) {\r\n z = Geometry.split3WaySign(z, -xx, xx, xx);\r\n }\r\n return Vector3d.create(x, y, z);\r\n }\r\n\r\n /**\r\n * Adjust a worldToView matrix to favor both\r\n * * direct view at faces, edges, and corners of a view cube.\r\n * * heads up\r\n * @param worldToView candidate matrix\r\n * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected.\r\n * @param result optional result.\r\n */\r\n private static snapWorldToViewMatrixToCubeFeatures(worldToView: Matrix3d, tolerance: number, result?: Matrix3d): Matrix3d {\r\n const oldZ = worldToView.rowZ();\r\n const newZ = CubeNavigationAid.snapVectorToCubeFeatures(oldZ, tolerance);\r\n // If newZ is true up or down, it will have true 0 for x and y.\r\n // special case this to take x direction from the input.\r\n // istanbul ignore next\r\n if (newZ.x === 0.0 && newZ.y === 0) {\r\n const perpVector = worldToView.rowX();\r\n result = Matrix3d.createRigidFromColumns(newZ, perpVector, AxisOrder.ZXY, result)!;\r\n } else {\r\n result = Matrix3d.createRigidViewAxesZTowardsEye(newZ.x, newZ.y, newZ.z, result);\r\n }\r\n // istanbul ignore else\r\n if (result)\r\n result.transposeInPlace();\r\n return result;\r\n }\r\n\r\n private getArrowRotationAndFace(arrow: Pointer): { newRotation: Matrix3d, face: Face } {\r\n const localRotationAxis = Vector3d.create(0, 0, 0);\r\n switch (arrow) {\r\n case Pointer.Up:\r\n localRotationAxis.x = -1.0;\r\n break;\r\n case Pointer.Down:\r\n localRotationAxis.x = 1.0;\r\n break;\r\n case Pointer.Left:\r\n localRotationAxis.y = -1.0;\r\n break;\r\n default:\r\n localRotationAxis.y = 1.0;\r\n break;\r\n }\r\n const localRotation = Matrix3d.createRotationAroundVector(localRotationAxis, Angle.createDegrees(-90))!;\r\n const newRotation = localRotation.multiplyMatrixMatrix(this.state.endRotMatrix);\r\n CubeNavigationAid.snapWorldToViewMatrixToCubeFeatures(newRotation, DEFAULT_TOLERANCE, newRotation);\r\n const face = CubeNavigationAid._getMatrixFace(newRotation);\r\n return { newRotation, face };\r\n }\r\n\r\n private _onArrowClick = (arrow: Pointer) => {\r\n if (this._isInteractionLocked()) {\r\n // istanbul ignore next\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const { newRotation, face } = this.getArrowRotationAndFace(arrow);\r\n this._animateRotation(newRotation, face);\r\n };\r\n\r\n private getArrowTitle(arrow: Pointer) {\r\n const { face } = this.getArrowRotationAndFace(arrow);\r\n return this._labels[face];\r\n }\r\n\r\n private _lastClientXY: Vector2d = Vector2d.createZero();\r\n private _processDrag(mousePos: Vector2d) {\r\n // istanbul ignore else\r\n if (!this._start.isAlmostEqual(mousePos)) {\r\n const movement = mousePos.minus(this._lastClientXY);\r\n const diff = movement.scale(0.05);\r\n\r\n const yaw = Angle.createRadians(diff.x);\r\n const pitch = Angle.createRadians(diff.y);\r\n\r\n const matX = Matrix3d.createRotationAroundAxisIndex(AxisIndex.X, pitch);\r\n const matZ = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, yaw);\r\n\r\n const mat = matX.multiplyMatrixMatrix(this.state.startRotMatrix).multiplyMatrixMatrix(matZ);\r\n this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));\r\n if (!this.state.dragging)\r\n this.setState({ dragging: true });\r\n }\r\n this._lastClientXY = mousePos;\r\n }\r\n\r\n private _handleBoxMouseDown = (event: any) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n event.preventDefault();\r\n // only start listening after drag is confirmed. Ie. the 3D box is clicked.\r\n window.addEventListener(\"mousemove\", this._onMouseMove, false);\r\n window.addEventListener(\"mouseup\", this._onMouseUp, false);\r\n this._lastClientXY = Vector2d.create(event.clientX, event.clientY);\r\n this._start = this._lastClientXY;\r\n };\r\n\r\n private _onMouseMove = (event: MouseEvent) => {\r\n const mousePos = Vector2d.create(event.clientX, event.clientY);\r\n this._processDrag(mousePos);\r\n };\r\n\r\n private _onMouseUp = () => {\r\n if (this.state.dragging) {\r\n this.setState({ dragging: false });\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\r\n }\r\n\r\n // remove so event only triggers after this.onMouseStartDrag\r\n window.removeEventListener(\"mousemove\", this._onMouseMove);\r\n window.removeEventListener(\"mouseup\", this._onMouseUp);\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _handleBoxTouchStart = (event: any) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n if (1 !== event.targetTouches.length)\r\n return;\r\n window.addEventListener(\"touchmove\", this._onTouchMove, false);\r\n window.addEventListener(\"touchend\", this._onTouchEnd, false);\r\n this._lastClientXY = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n this._start = this._lastClientXY;\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _onTouchMove = (event: TouchEvent) => {\r\n if (1 !== event.targetTouches.length)\r\n return;\r\n const mousePos = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n this._processDrag(mousePos);\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _onTouchEnd = (event: TouchEvent) => {\r\n if (0 !== event.targetTouches.length)\r\n return;\r\n\r\n if (this.state.dragging) {\r\n this.setState({ dragging: false });\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\r\n }\r\n\r\n window.removeEventListener(\"touchmove\", this._onTouchMove);\r\n window.removeEventListener(\"touchend\", this._onTouchEnd);\r\n };\r\n\r\n private _handleFaceCellClick = (pos: Vector3d, face: Face) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const { endRotMatrix } = this.state;\r\n let rotMatrix = Matrix3d.createRigidViewAxesZTowardsEye(pos.x, pos.y, pos.z).inverse();\r\n // istanbul ignore else\r\n if (rotMatrix) {\r\n // if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom\r\n if (!CubeNavigationAid._isMatrixFace(endRotMatrix) && (face === Face.Top || face === Face.Bottom)) {\r\n const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();\r\n // istanbul ignore else\r\n if (angleAxis.ok) {\r\n const xAx = endRotMatrix.columnX();\r\n const a = Math.atan2(xAx.y, xAx.x);\r\n const r = Math.round(a * 2 / Math.PI) * Math.PI / 2; // round to quarter turn intervals\r\n const rot = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(r));\r\n rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);\r\n }\r\n }\r\n this._animateRotation(rotMatrix, face);\r\n }\r\n window.removeEventListener(\"mousemove\", this._onMouseMove);\r\n };\r\n\r\n private _animateRotation = (endRotMatrix: Matrix3d, face: Face) => {\r\n if (this.state.endRotMatrix.isAlmostEqual(endRotMatrix))\r\n return;\r\n // set animation variables, let css transitions animate it.\r\n this._animationFrame = setTimeout(this._animation, 16.667);\r\n this.setState((prevState) => ({\r\n startRotMatrix: prevState.endRotMatrix, endRotMatrix,\r\n animation: 0,\r\n face,\r\n }));\r\n };\r\n\r\n private _setRotation = (endRotMatrix: Matrix3d, face: Face) => {\r\n ViewportComponentEvents.setCubeMatrix(endRotMatrix, face);\r\n // set variables, with animTime at 0 to prevent animation.\r\n this.setState({\r\n startRotMatrix: endRotMatrix,\r\n endRotMatrix,\r\n animation: 1,\r\n face,\r\n });\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface NavCubeFaceProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n face: Face;\r\n label: string;\r\n hoverMap: { [key: string]: CubeHover };\r\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\r\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\r\n}\r\n\r\n/** @internal */\r\nexport class NavCubeFace extends React.Component<NavCubeFaceProps> {\r\n public override render(): React.ReactNode {\r\n const { face, hoverMap, onFaceCellClick, onFaceCellHoverChange, label } = this.props;\r\n return (\r\n <div className=\"nav-cube-face\" data-testid=\"nav-cube-face\">\r\n {[-1, 0, 1].map((y: number) => {\r\n return (\r\n <FaceRow key={y} center={y === 0}>\r\n {[-1, 0, 1].map((x: number) => {\r\n return (\r\n <FaceCell\r\n key={x}\r\n onFaceCellHoverChange={onFaceCellHoverChange}\r\n onFaceCellClick={onFaceCellClick}\r\n hoverMap={hoverMap}\r\n vector={NavCubeFace.faceCellToPos(face, x, y)}\r\n face={face}\r\n center={x === 0}>\r\n {x === 0 && y === 0 &&\r\n label}\r\n </FaceCell>\r\n );\r\n })}\r\n </FaceRow>\r\n );\r\n })}\r\n </div>\r\n );\r\n }\r\n public static faceCellToPos = (face: Face, x: number, y: number) => {\r\n const faceVect = cubeNavigationFaceLocs[face];\r\n const route = cubeNavigationRoutes[face];\r\n\r\n const faceX = x < 0 ? route.left : x > 0 ? route.right : Face.None;\r\n const xVect = faceX !== Face.None ? cubeNavigationFaceLocs[faceX] : Vector3d.createZero();\r\n\r\n const faceY = y < 0 ? route.up : y > 0 ? route.down : Face.None;\r\n const yVect = faceY !== Face.None ? cubeNavigationFaceLocs[faceY] : Vector3d.createZero();\r\n\r\n return faceVect.plus(xVect).plus(yVect);\r\n };\r\n}\r\n\r\ninterface FaceRowProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n center?: boolean;\r\n}\r\n\r\nclass FaceRow extends React.Component<FaceRowProps> {\r\n public override render(): React.ReactNode {\r\n const { center, children, ...props } = this.props;\r\n const classNames = classnames(\r\n \"face-row\",\r\n center && \"cube-center\",\r\n );\r\n return <div className={classNames} {...props}>{children}</div>;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface FaceCellProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n center?: boolean;\r\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\r\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\r\n hoverMap: { [key: string]: CubeHover };\r\n vector: Vector3d;\r\n face: Face;\r\n}\r\n\r\n/** @internal */\r\nexport class FaceCell extends React.Component<FaceCellProps> {\r\n private _startMouse: Point2d | undefined;\r\n public override render(): React.ReactNode {\r\n const { center, children, onFaceCellClick, onFaceCellHoverChange, hoverMap, face, vector, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const { x, y, z } = vector;\r\n const n = `${x}-${y}-${z}`;\r\n const hover = hoverMap[n] === CubeHover.Hover;\r\n const active = hoverMap[n] === CubeHover.Active;\r\n const classNames = classnames(\r\n \"face-cell\",\r\n center && \"cube-center\",\r\n hover && \"cube-hover\",\r\n active && \"cube-active\",\r\n );\r\n\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n return <div\r\n onMouseDown={this._handleMouseDown}\r\n onMouseUp={this._handleMouseUp}\r\n onMouseOver={this._handleMouseOver}\r\n onMouseOut={this._handleMouseOut}\r\n onTouchStart={this._handleTouchStart}\r\n onTouchEnd={this._handleTouchEnd}\r\n data-testid={`nav-cube-face-cell-${face}-${n}`}\r\n className={classNames}\r\n role=\"presentation\"\r\n {...props}\r\n >\r\n {children}\r\n </div>;\r\n }\r\n private _handleMouseOver = () => {\r\n const { vector } = this.props;\r\n this.props.onFaceCellHoverChange(vector, CubeHover.Hover);\r\n };\r\n private _handleMouseOut = () => {\r\n const { vector } = this.props;\r\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\r\n };\r\n private _handleMouseDown = (event: React.MouseEvent) => {\r\n const { clientX, clientY } = event;\r\n this.handlePointerDown(clientX, clientY);\r\n };\r\n private _handleMouseUp = (event: React.MouseEvent) => {\r\n const { clientX, clientY } = event;\r\n this.handlePointerUp(clientX, clientY);\r\n };\r\n\r\n private _handleTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n event.targetTouches.length === 1 && this.handlePointerDown(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n };\r\n\r\n private _handleTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n event.changedTouches.length === 1 && this.handlePointerUp(event.changedTouches[0].clientX, event.changedTouches[0].clientY);\r\n };\r\n\r\n private handlePointerDown(x: number, y: number) {\r\n const { vector } = this.props;\r\n this._startMouse = Point2d.create(x, y);\r\n this.props.onFaceCellHoverChange(vector, CubeHover.Active);\r\n }\r\n\r\n private handlePointerUp(x: number, y: number) {\r\n const { vector, face } = this.props;\r\n this.props.onFaceCellHoverChange(vector, CubeHover.None);\r\n const mouse = Point2d.create(x, y);\r\n if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {\r\n const isFace = Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;\r\n this.props.onFaceCellClick(vector, isFace ? face : Face.None);\r\n }\r\n }\r\n}\r\n\r\nenum Pointer {\r\n None = 0,\r\n Up,\r\n Down,\r\n Left,\r\n Right,\r\n}\r\n\r\nconst pointerIconSpec: { [key: number]: IconSpec } = {\r\n [Pointer.Up]: <SvgCaretDownSmall />,\r\n [Pointer.Down]: <SvgCaretUpSmall />,\r\n [Pointer.Left]: <SvgCaretRightSmall />,\r\n [Pointer.Right]: <SvgCaretLeftSmall />,\r\n};\r\n\r\nconst pointerClass: { [key: number]: string } = {\r\n [Pointer.Up]: \"cube-up\",\r\n [Pointer.Down]: \"cube-down\",\r\n [Pointer.Left]: \"cube-left\",\r\n [Pointer.Right]: \"cube-right\",\r\n};\r\n\r\ninterface PointerProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n visible: boolean;\r\n pointerType: Pointer;\r\n onArrowClick(pointer: Pointer): void;\r\n title: string;\r\n [\"data-testid\"]?: string;\r\n}\r\n\r\nclass PointerButton extends React.Component<PointerProps> {\r\n public override render(): React.ReactNode {\r\n const { visible, pointerType, onArrowClick, title, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const classes = classnames(\r\n \"cube-pointer\", \"icon\",\r\n pointerClass[pointerType],\r\n visible && \"cube-visible\",\r\n );\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\r\n <div className={classes} role=\"button\" tabIndex={-1} title={title} {...props}\r\n onClick={this._handleClick}><Icon iconSpec={pointerIconSpec[pointerType]} /> </div>\r\n );\r\n }\r\n private _handleClick = (event: React.MouseEvent) => {\r\n const { pointerType } = this.props;\r\n event.preventDefault();\r\n this.props.onArrowClick(pointerType);\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"CubeNavigationAid.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/navigationaids/CubeNavigationAid.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,UAAU,MAAM,Y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B,CAAC;AAUF,MAAM,aAAc,SAAQ,KAAK,CAAC,SAAuB;IAAzD;;QAeU,iBAAY,GAAG,CAAC,KAAuB,EAAE,EAAE;YACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACnC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;IAnBiB,MAAM;QACpB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;QACpI,MAAM,OAAO,GAAG,UAAU,CACxB,cAAc,EAAE,MAAM,EACtB,YAAY,CAAC,WAAW,CAAC,EACzB,OAAO,IAAI,cAAc,CAC1B,CAAC;QAEF,OAAO;QACL,iEAAiE;QACjE,6BAAK,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,EAC1E,OAAO,EAAE,IAAI,CAAC,YAAY;YAAE,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,CAAC,WAAW,CAAC,GAAI;gBAAO,CACtF,CAAC;IACJ,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NavigationAids\r\n */\r\n\r\nimport \"./CubeNavigationAid.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Angle, AxisIndex, AxisOrder, Geometry, Matrix3d, Point2d, Vector2d, Vector3d, XYAndZ } from \"@itwin/core-geometry\";\r\nimport { IModelApp, IModelConnection, Viewport } from \"@itwin/core-frontend\";\r\nimport { CommonProps, Icon, IconSpec } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { ViewportComponentEvents, ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\r\nimport { Cube, Face } from \"./Cube\";\r\nimport { SvgCaretDown, SvgCaretLeft, SvgCaretRight, SvgCaretUp } from \"@itwin/itwinui-icons-react\";\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxX {\r\n None = 0,\r\n Right = 1,\r\n Left = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. Use [[CubeNavigationHitBoxX]] */\r\nexport enum HitBoxX {\r\n None = 0,\r\n Right = 1,\r\n Left = -1,\r\n}\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxY {\r\n None = 0,\r\n Back = 1,\r\n Front = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. Use [[CubeNavigationHitBoxY]] */\r\nexport enum HitBoxY {\r\n None = 0,\r\n Back = 1,\r\n Front = -1,\r\n}\r\n\r\n/** @public */\r\nexport enum CubeNavigationHitBoxZ {\r\n None = 0,\r\n Top = 1,\r\n Bottom = -1,\r\n}\r\n/** @internal\r\n * @deprecated in 2.x. [[CubeNavigationHitBoxZ]] */\r\nexport enum HitBoxZ {\r\n None = 0,\r\n Top = 1,\r\n Bottom = -1,\r\n}\r\n\r\ninterface CubeNavigationRotationMap {\r\n up: Face;\r\n down: Face;\r\n left: Face;\r\n right: Face;\r\n}\r\n\r\nconst cubeNavigationFaceLocs: { [key: string]: Vector3d } = {\r\n [Face.Left]: Vector3d.create(CubeNavigationHitBoxX.Left, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\r\n [Face.Right]: Vector3d.create(CubeNavigationHitBoxX.Right, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\r\n [Face.Back]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Back, CubeNavigationHitBoxZ.None),\r\n [Face.Front]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Front, CubeNavigationHitBoxZ.None),\r\n [Face.Bottom]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Bottom),\r\n [Face.Top]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Top),\r\n};\r\n\r\nconst cubeNavigationFaceRotations: { [key: string]: Matrix3d } = {\r\n [Face.Left]: Matrix3d.createRowValues(0, -1, 0, 0, 0, 1, -1, 0, 0),\r\n [Face.Right]: Matrix3d.createRowValues(0, 1, 0, 0, 0, 1, 1, 0, 0),\r\n [Face.Back]: Matrix3d.createRowValues(-1, 0, 0, 0, 0, 1, 0, 1, 0),\r\n [Face.Front]: Matrix3d.createRowValues(1, 0, 0, 0, 0, 1, 0, -1, 0),\r\n [Face.Bottom]: Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1),\r\n [Face.Top]: Matrix3d.createRowValues(1, 0, 0, 0, 1, 0, 0, 0, 1),\r\n};\r\n\r\n// data relating Up/Down/Left/Right directions relative to every surface\r\nconst cubeNavigationRoutes: { [key: string]: CubeNavigationRotationMap } = {\r\n [Face.Front]: { up: Face.Top, down: Face.Bottom, left: Face.Left, right: Face.Right },\r\n [Face.Back]: { up: Face.Top, down: Face.Bottom, left: Face.Right, right: Face.Left },\r\n [Face.Top]: { up: Face.Back, down: Face.Front, left: Face.Left, right: Face.Right },\r\n [Face.Bottom]: { up: Face.Front, down: Face.Back, left: Face.Left, right: Face.Right },\r\n [Face.Right]: { up: Face.Top, down: Face.Bottom, left: Face.Front, right: Face.Back },\r\n [Face.Left]: { up: Face.Top, down: Face.Bottom, left: Face.Back, right: Face.Front },\r\n};\r\n\r\n/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */\r\nconst DEFAULT_TOLERANCE = 1.0e-6;\r\n\r\n/** @internal */\r\nexport enum CubeHover {\r\n None = 0,\r\n Hover,\r\n Active,\r\n}\r\n\r\n/** Properties for the [[CubeNavigationAid]] component\r\n * @public\r\n */\r\nexport interface CubeNavigationAidProps extends CommonProps {\r\n iModelConnection: IModelConnection;\r\n viewport?: Viewport;\r\n\r\n // used only in testing\r\n\r\n /** @internal */\r\n onAnimationEnd?: () => void;\r\n /** @internal */\r\n animationTime?: number;\r\n}\r\n\r\n/** @public */\r\ninterface CubeNavigationAidState {\r\n dragging: boolean;\r\n startRotMatrix: Matrix3d;\r\n endRotMatrix: Matrix3d;\r\n animation: number;\r\n hoverMap: { [key: string]: CubeHover };\r\n face: Face;\r\n}\r\n\r\n/** Cube Navigation Aid Component\r\n * @public\r\n */\r\nexport class CubeNavigationAid extends React.Component<CubeNavigationAidProps, CubeNavigationAidState> {\r\n private _start: Vector2d = Vector2d.createZero();\r\n /** @internal */\r\n public override readonly state: Readonly<CubeNavigationAidState> = {\r\n dragging: false,\r\n startRotMatrix: Matrix3d.createIdentity(),\r\n endRotMatrix: Matrix3d.createIdentity(),\r\n animation: 1,\r\n hoverMap: {},\r\n face: Face.Top,\r\n };\r\n\r\n private _lastTime: number | undefined;\r\n private _animationFrame: any;\r\n private _mounted: boolean = false;\r\n private _labels: { [key: string]: string } = {\r\n [Face.Right]: UiIModelComponents.translate(\"cube.right\"),\r\n [Face.Left]: UiIModelComponents.translate(\"cube.left\"),\r\n [Face.Back]: UiIModelComponents.translate(\"cube.back\"),\r\n [Face.Front]: UiIModelComponents.translate(\"cube.front\"),\r\n [Face.Top]: UiIModelComponents.translate(\"cube.top\"),\r\n [Face.Bottom]: UiIModelComponents.translate(\"cube.bottom\"),\r\n };\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._mounted = true;\r\n ViewportComponentEvents.onViewRotationChangeEvent.addListener(this._handleViewRotationChangeEvent);\r\n\r\n // set initial rotation\r\n if (this.props.viewport) {\r\n const newMatrix = this.props.viewport.view.getRotation().clone();\r\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1 });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);\r\n clearTimeout(this._animationFrame);\r\n this._mounted = false;\r\n }\r\n\r\n // Synchronize with rotation coming from the Viewport\r\n private _handleViewRotationChangeEvent = (args: ViewRotationChangeEventArgs) => {\r\n const { animation, dragging, endRotMatrix } = this.state;\r\n // istanbul ignore else\r\n if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {\r\n const newMatrix = this.props.viewport.view.getRotation().clone();\r\n if (!endRotMatrix.isAlmostEqual(newMatrix)) {\r\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1, face: Face.None });\r\n }\r\n }\r\n };\r\n\r\n private _animation = () => {\r\n const t = Date.now();\r\n const delta = this._lastTime ? t - this._lastTime : 16;\r\n this._lastTime = t;\r\n if (this.state.animation !== 1) {\r\n const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || /* istanbul ignore next */ 0.4)));\r\n\r\n // istanbul ignore next\r\n if (this._mounted) {\r\n this.setState({ animation }, () => {\r\n this._animationFrame = setTimeout(this._animation, 16.667);\r\n });\r\n }\r\n } else {\r\n this._lastTime = undefined;\r\n this._animationEnd();\r\n }\r\n };\r\n\r\n private _animationEnd = () => {\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, this.state.face, true);\r\n const startRotMatrix = this.state.endRotMatrix.clone();\r\n // istanbul ignore next\r\n if (this._mounted) {\r\n this.setState({ startRotMatrix }, () => {\r\n // istanbul ignore else\r\n if (this.props.onAnimationEnd)\r\n this.props.onAnimationEnd();\r\n });\r\n }\r\n };\r\n\r\n private static _animationFn = (t: number) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;\r\n\r\n private static _isMatrixFace = (matrix: Matrix3d): boolean => {\r\n let sum = 0;\r\n for (const coff of matrix.coffs) {\r\n if (Geometry.isAlmostEqualNumber(Math.abs(coff), 1))\r\n sum++;\r\n }\r\n // Assuming matrix is a proper rotation matrix:\r\n // if matrix viewing a face, there will be a total of 3 values either almost -1, or almost 1.\r\n return sum === 3;\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const { animation, startRotMatrix, endRotMatrix } = this.state;\r\n const visible = CubeNavigationAid._isMatrixFace(endRotMatrix) && animation === 1.0;\r\n const rotMatrix = CubeNavigationAid._interpolateRotMatrix(startRotMatrix, animation, endRotMatrix);\r\n if (rotMatrix !== startRotMatrix && rotMatrix !== endRotMatrix)\r\n ViewportComponentEvents.setCubeMatrix(rotMatrix, Face.None);\r\n\r\n const faces: { [key: string]: React.ReactNode } = {};\r\n for (const key in this._labels) {\r\n // istanbul ignore else\r\n if (this._labels.hasOwnProperty(key)) {\r\n const f = key as Face;\r\n const label = this._labels[f];\r\n faces[f] =\r\n <NavCubeFace\r\n face={f}\r\n label={label}\r\n hoverMap={this.state.hoverMap}\r\n onFaceCellClick={this._handleFaceCellClick}\r\n onFaceCellHoverChange={this._handleCellHoverChange} />;\r\n }\r\n }\r\n\r\n const cubeClassNames = classnames(\r\n \"nav-cube\",\r\n this.state.dragging && \"cube-dragging\",\r\n );\r\n\r\n const upTitle = this.getArrowTitle(Pointer.Up);\r\n const downTitle = this.getArrowTitle(Pointer.Down);\r\n const leftTitle = this.getArrowTitle(Pointer.Left);\r\n const rightTitle = this.getArrowTitle(Pointer.Right);\r\n\r\n return (\r\n <div className={classnames(\"components-cube-container\", this.props.className)}\r\n style={this.props.style}\r\n data-testid=\"components-cube-navigation-aid\"\r\n onMouseDown={this._handleBoxMouseDown}\r\n onTouchStart={this._handleBoxTouchStart}\r\n role=\"presentation\"\r\n >\r\n <div className={\"cube-element-container\"}>\r\n <Cube\r\n className={cubeClassNames}\r\n rotMatrix={rotMatrix}\r\n faces={faces} />\r\n </div>\r\n <PointerButton data-testid=\"cube-pointer-button-up\"\r\n visible={visible} pointerType={Pointer.Up} onArrowClick={this._onArrowClick} title={upTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-down\"\r\n visible={visible} pointerType={Pointer.Down} onArrowClick={this._onArrowClick} title={downTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-left\"\r\n visible={visible} pointerType={Pointer.Left} onArrowClick={this._onArrowClick} title={leftTitle} />\r\n <PointerButton data-testid=\"cube-pointer-button-right\"\r\n visible={visible} pointerType={Pointer.Right} onArrowClick={this._onArrowClick} title={rightTitle} />\r\n </div>\r\n );\r\n }\r\n\r\n private _handleCellHoverChange = (vect: Vector3d, state: CubeHover) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const hoverMap = this.state.hoverMap;\r\n hoverMap[`${vect.x}-${vect.y}-${vect.z}`] = state;\r\n this.setState({ hoverMap });\r\n };\r\n\r\n private _isInteractionLocked = () => {\r\n // Locked by markup\r\n if(undefined !== this.props.viewport && this.props.viewport === IModelApp.toolAdmin.markupView) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n private static _getMatrixFace = (rotMatrix: Matrix3d): Face => {\r\n if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {\r\n return Face.None;\r\n }\r\n\r\n let matrixFace = Face.None;\r\n\r\n for (const face in cubeNavigationFaceRotations) {\r\n // istanbul ignore else\r\n if (face in cubeNavigationFaceRotations) {\r\n const loc = cubeNavigationFaceRotations[face];\r\n if (rotMatrix.isAlmostEqual(loc)) {\r\n matrixFace = face as Face;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return matrixFace;\r\n };\r\n\r\n private static _interpolateRotMatrix = (start: Matrix3d, anim: number, end: Matrix3d): Matrix3d => {\r\n if (anim === 0)\r\n return start;\r\n if (anim === 1 || start.isAlmostEqual(end))\r\n return end;\r\n const startInverse = start.transpose();\r\n const diff = end.multiplyMatrixMatrix(startInverse);\r\n const angleAxis = diff.getAxisAndAngleOfRotation();\r\n // istanbul ignore else\r\n if (angleAxis.ok) {\r\n const angle = Angle.createRadians(angleAxis.angle.radians * CubeNavigationAid._animationFn(anim));\r\n const newDiff = Matrix3d.createRotationAroundVector(angleAxis.axis, angle);\r\n // istanbul ignore else\r\n if (newDiff) {\r\n const newMatrix = newDiff.multiplyMatrixMatrix(start);\r\n return newMatrix;\r\n }\r\n }\r\n // istanbul ignore next\r\n return end;\r\n };\r\n\r\n private static correctSmallNumber(value: number, tolerance: number): number {\r\n return Math.abs(value) < tolerance ? 0 : value;\r\n }\r\n\r\n /**\r\n * Snap coordinates of a vector to zero and to each other so that the vector prefers to be\r\n * * perpendicular to a face of the unit cube.\r\n * * or pass through a nearby vertex or edge of the unit cube.\r\n * @param zVector existing z vector.\r\n * @param tolerance tolerance to determine if a z vector component is close to zero or 1.\r\n */\r\n private static snapVectorToCubeFeatures(zVector: XYAndZ, tolerance: number): Vector3d {\r\n const x = CubeNavigationAid.correctSmallNumber(zVector.x, tolerance);\r\n let y = CubeNavigationAid.correctSmallNumber(zVector.y, tolerance);\r\n let z = CubeNavigationAid.correctSmallNumber(zVector.z, tolerance);\r\n\r\n const xx = Math.abs(x);\r\n const yy = Math.abs(y);\r\n const zz = Math.abs(z);\r\n\r\n // adjust any adjacent pair of near equal values to the first.\r\n // istanbul ignore next\r\n if (Geometry.isSameCoordinate(xx, yy, tolerance)) {\r\n y = Geometry.split3WaySign(y, -xx, xx, xx);\r\n }\r\n if (Geometry.isSameCoordinate(yy, zz, tolerance)) {\r\n z = Geometry.split3WaySign(z, -yy, yy, yy);\r\n }\r\n if (Geometry.isSameCoordinate(xx, zz, tolerance)) {\r\n z = Geometry.split3WaySign(z, -xx, xx, xx);\r\n }\r\n return Vector3d.create(x, y, z);\r\n }\r\n\r\n /**\r\n * Adjust a worldToView matrix to favor both\r\n * * direct view at faces, edges, and corners of a view cube.\r\n * * heads up\r\n * @param worldToView candidate matrix\r\n * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected.\r\n * @param result optional result.\r\n */\r\n private static snapWorldToViewMatrixToCubeFeatures(worldToView: Matrix3d, tolerance: number, result?: Matrix3d): Matrix3d {\r\n const oldZ = worldToView.rowZ();\r\n const newZ = CubeNavigationAid.snapVectorToCubeFeatures(oldZ, tolerance);\r\n // If newZ is true up or down, it will have true 0 for x and y.\r\n // special case this to take x direction from the input.\r\n // istanbul ignore next\r\n if (newZ.x === 0.0 && newZ.y === 0) {\r\n const perpVector = worldToView.rowX();\r\n result = Matrix3d.createRigidFromColumns(newZ, perpVector, AxisOrder.ZXY, result)!;\r\n } else {\r\n result = Matrix3d.createRigidViewAxesZTowardsEye(newZ.x, newZ.y, newZ.z, result);\r\n }\r\n // istanbul ignore else\r\n if (result)\r\n result.transposeInPlace();\r\n return result;\r\n }\r\n\r\n private getArrowRotationAndFace(arrow: Pointer): { newRotation: Matrix3d, face: Face } {\r\n const localRotationAxis = Vector3d.create(0, 0, 0);\r\n switch (arrow) {\r\n case Pointer.Up:\r\n localRotationAxis.x = -1.0;\r\n break;\r\n case Pointer.Down:\r\n localRotationAxis.x = 1.0;\r\n break;\r\n case Pointer.Left:\r\n localRotationAxis.y = -1.0;\r\n break;\r\n default:\r\n localRotationAxis.y = 1.0;\r\n break;\r\n }\r\n const localRotation = Matrix3d.createRotationAroundVector(localRotationAxis, Angle.createDegrees(-90))!;\r\n const newRotation = localRotation.multiplyMatrixMatrix(this.state.endRotMatrix);\r\n CubeNavigationAid.snapWorldToViewMatrixToCubeFeatures(newRotation, DEFAULT_TOLERANCE, newRotation);\r\n const face = CubeNavigationAid._getMatrixFace(newRotation);\r\n return { newRotation, face };\r\n }\r\n\r\n private _onArrowClick = (arrow: Pointer) => {\r\n if (this._isInteractionLocked()) {\r\n // istanbul ignore next\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const { newRotation, face } = this.getArrowRotationAndFace(arrow);\r\n this._animateRotation(newRotation, face);\r\n };\r\n\r\n private getArrowTitle(arrow: Pointer) {\r\n const { face } = this.getArrowRotationAndFace(arrow);\r\n return this._labels[face];\r\n }\r\n\r\n private _lastClientXY: Vector2d = Vector2d.createZero();\r\n private _processDrag(mousePos: Vector2d) {\r\n // istanbul ignore else\r\n if (!this._start.isAlmostEqual(mousePos)) {\r\n const movement = mousePos.minus(this._lastClientXY);\r\n const diff = movement.scale(0.05);\r\n\r\n const yaw = Angle.createRadians(diff.x);\r\n const pitch = Angle.createRadians(diff.y);\r\n\r\n const matX = Matrix3d.createRotationAroundAxisIndex(AxisIndex.X, pitch);\r\n const matZ = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, yaw);\r\n\r\n const mat = matX.multiplyMatrixMatrix(this.state.startRotMatrix).multiplyMatrixMatrix(matZ);\r\n this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));\r\n if (!this.state.dragging)\r\n this.setState({ dragging: true });\r\n }\r\n this._lastClientXY = mousePos;\r\n }\r\n\r\n private _handleBoxMouseDown = (event: any) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n event.preventDefault();\r\n // only start listening after drag is confirmed. Ie. the 3D box is clicked.\r\n window.addEventListener(\"mousemove\", this._onMouseMove, false);\r\n window.addEventListener(\"mouseup\", this._onMouseUp, false);\r\n this._lastClientXY = Vector2d.create(event.clientX, event.clientY);\r\n this._start = this._lastClientXY;\r\n };\r\n\r\n private _onMouseMove = (event: MouseEvent) => {\r\n const mousePos = Vector2d.create(event.clientX, event.clientY);\r\n this._processDrag(mousePos);\r\n };\r\n\r\n private _onMouseUp = () => {\r\n if (this.state.dragging) {\r\n this.setState({ dragging: false });\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\r\n }\r\n\r\n // remove so event only triggers after this.onMouseStartDrag\r\n window.removeEventListener(\"mousemove\", this._onMouseMove);\r\n window.removeEventListener(\"mouseup\", this._onMouseUp);\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _handleBoxTouchStart = (event: any) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n if (1 !== event.targetTouches.length)\r\n return;\r\n window.addEventListener(\"touchmove\", this._onTouchMove, false);\r\n window.addEventListener(\"touchend\", this._onTouchEnd, false);\r\n this._lastClientXY = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n this._start = this._lastClientXY;\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _onTouchMove = (event: TouchEvent) => {\r\n if (1 !== event.targetTouches.length)\r\n return;\r\n const mousePos = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n this._processDrag(mousePos);\r\n };\r\n\r\n // istanbul ignore next - unable to test touch\r\n private _onTouchEnd = (event: TouchEvent) => {\r\n if (0 !== event.targetTouches.length)\r\n return;\r\n\r\n if (this.state.dragging) {\r\n this.setState({ dragging: false });\r\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\r\n }\r\n\r\n window.removeEventListener(\"touchmove\", this._onTouchMove);\r\n window.removeEventListener(\"touchend\", this._onTouchEnd);\r\n };\r\n\r\n private _handleFaceCellClick = (pos: Vector3d, face: Face) => {\r\n if (this._isInteractionLocked()) {\r\n this.props.onAnimationEnd?.();\r\n return;\r\n }\r\n const { endRotMatrix } = this.state;\r\n let rotMatrix = Matrix3d.createRigidViewAxesZTowardsEye(pos.x, pos.y, pos.z).inverse();\r\n // istanbul ignore else\r\n if (rotMatrix) {\r\n // if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom\r\n if (!CubeNavigationAid._isMatrixFace(endRotMatrix) && (face === Face.Top || face === Face.Bottom)) {\r\n const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();\r\n // istanbul ignore else\r\n if (angleAxis.ok) {\r\n const xAx = endRotMatrix.columnX();\r\n const a = Math.atan2(xAx.y, xAx.x);\r\n const r = Math.round(a * 2 / Math.PI) * Math.PI / 2; // round to quarter turn intervals\r\n const rot = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(r));\r\n rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);\r\n }\r\n }\r\n this._animateRotation(rotMatrix, face);\r\n }\r\n window.removeEventListener(\"mousemove\", this._onMouseMove);\r\n };\r\n\r\n private _animateRotation = (endRotMatrix: Matrix3d, face: Face) => {\r\n if (this.state.endRotMatrix.isAlmostEqual(endRotMatrix))\r\n return;\r\n // set animation variables, let css transitions animate it.\r\n this._animationFrame = setTimeout(this._animation, 16.667);\r\n this.setState((prevState) => ({\r\n startRotMatrix: prevState.endRotMatrix, endRotMatrix,\r\n animation: 0,\r\n face,\r\n }));\r\n };\r\n\r\n private _setRotation = (endRotMatrix: Matrix3d, face: Face) => {\r\n ViewportComponentEvents.setCubeMatrix(endRotMatrix, face);\r\n // set variables, with animTime at 0 to prevent animation.\r\n this.setState({\r\n startRotMatrix: endRotMatrix,\r\n endRotMatrix,\r\n animation: 1,\r\n face,\r\n });\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport interface NavCubeFaceProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n face: Face;\r\n label: string;\r\n hoverMap: { [key: string]: CubeHover };\r\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\r\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\r\n}\r\n\r\n/** @internal */\r\nexport class NavCubeFace extends React.Component<NavCubeFaceProps> {\r\n private includeCell(vector: Vector3d): boolean {\r\n const { x, y, z } = vector;\r\n const omittedCell = (y === 0 && x !== 0 && z !== 0) || (y !== 0 && x === 0 && z !== 0) || (y !== 0 && x !== 0 && z === 0);\r\n return !omittedCell;\r\n }\r\n public override render(): React.ReactNode {\r\n const { face, hoverMap, onFaceCellClick, onFaceCellHoverChange, label } = this.props;\r\n return (\r\n <div className=\"nav-cube-face\" data-testid=\"nav-cube-face\">\r\n {[-1, 0, 1].map((y: number) => {\r\n return (\r\n <FaceRow key={y} center={y === 0}>\r\n {[-1, 0, 1].map((x: number) => {\r\n const vector = NavCubeFace.faceCellToPos(face, x, y);\r\n if (this.includeCell(vector)) {\r\n // return a fully functional cell\r\n return (\r\n <FaceCell\r\n key={x}\r\n onFaceCellHoverChange={onFaceCellHoverChange}\r\n onFaceCellClick={onFaceCellClick}\r\n hoverMap={hoverMap}\r\n vector={vector}\r\n face={face}\r\n center={x === 0}>\r\n {x === 0 && y === 0 &&\r\n label}\r\n </FaceCell>\r\n );\r\n } else {\r\n // return a placeholder cell\r\n return (\r\n <FaceCell\r\n key={x}\r\n vector={vector}\r\n face={face}\r\n center={x === 0}/>\r\n );\r\n }\r\n })}\r\n </FaceRow>\r\n );\r\n })}\r\n </div>\r\n );\r\n }\r\n public static faceCellToPos = (face: Face, x: number, y: number) => {\r\n const faceVect = cubeNavigationFaceLocs[face];\r\n const route = cubeNavigationRoutes[face];\r\n\r\n const faceX = x < 0 ? route.left : x > 0 ? route.right : Face.None;\r\n const xVect = faceX !== Face.None ? cubeNavigationFaceLocs[faceX] : Vector3d.createZero();\r\n\r\n const faceY = y < 0 ? route.up : y > 0 ? route.down : Face.None;\r\n const yVect = faceY !== Face.None ? cubeNavigationFaceLocs[faceY] : Vector3d.createZero();\r\n\r\n return faceVect.plus(xVect).plus(yVect);\r\n };\r\n}\r\n\r\ninterface FaceRowProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n center?: boolean;\r\n}\r\n\r\nclass FaceRow extends React.Component<FaceRowProps> {\r\n public override render(): React.ReactNode {\r\n const { center, children, ...props } = this.props;\r\n const classNames = classnames(\r\n \"face-row\",\r\n center && \"cube-center\",\r\n );\r\n return <div className={classNames} {...props}>{children}</div>;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface FaceCellProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n center?: boolean;\r\n onFaceCellClick?: (vector: Vector3d, face: Face) => void;\r\n onFaceCellHoverChange?: (vector: Vector3d, state: CubeHover) => void;\r\n hoverMap?: { [key: string]: CubeHover };\r\n vector: Vector3d;\r\n face: Face;\r\n}\r\n\r\n/** @internal */\r\nexport class FaceCell extends React.Component<FaceCellProps> {\r\n private _startMouse: Point2d | undefined;\r\n public override render(): React.ReactNode {\r\n const { center, children, onFaceCellClick, onFaceCellHoverChange, hoverMap, face, vector, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const { x, y, z } = vector;\r\n const n = `${x}-${y}-${z}`;\r\n const hover = hoverMap && hoverMap[n] === CubeHover.Hover;\r\n const active = hoverMap && hoverMap[n] === CubeHover.Active;\r\n const classNames = classnames(\r\n \"face-cell\",\r\n center && \"cube-center\",\r\n hover && \"cube-hover\",\r\n active && \"cube-active\",\r\n );\r\n\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n return <div\r\n onMouseDown={this._handleMouseDown}\r\n onMouseUp={this._handleMouseUp}\r\n onMouseOver={this._handleMouseOver}\r\n onMouseOut={this._handleMouseOut}\r\n onTouchStart={this._handleTouchStart}\r\n onTouchEnd={this._handleTouchEnd}\r\n data-testid={`nav-cube-face-cell-${face}-${n}`}\r\n className={classNames}\r\n role=\"presentation\"\r\n {...props}\r\n >\r\n {children}\r\n </div>;\r\n }\r\n private _handleMouseOver = () => {\r\n const { vector } = this.props;\r\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.Hover);\r\n };\r\n private _handleMouseOut = () => {\r\n const { vector } = this.props;\r\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.None);\r\n };\r\n private _handleMouseDown = (event: React.MouseEvent) => {\r\n const { clientX, clientY } = event;\r\n this.handlePointerDown(clientX, clientY);\r\n };\r\n private _handleMouseUp = (event: React.MouseEvent) => {\r\n const { clientX, clientY } = event;\r\n this.handlePointerUp(clientX, clientY);\r\n };\r\n\r\n private _handleTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n event.targetTouches.length === 1 && this.handlePointerDown(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\r\n };\r\n\r\n private _handleTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n event.changedTouches.length === 1 && this.handlePointerUp(event.changedTouches[0].clientX, event.changedTouches[0].clientY);\r\n };\r\n\r\n private handlePointerDown(x: number, y: number) {\r\n const { vector } = this.props;\r\n this._startMouse = Point2d.create(x, y);\r\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.Active);\r\n }\r\n\r\n private handlePointerUp(x: number, y: number) {\r\n const { vector, face } = this.props;\r\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.None);\r\n const mouse = Point2d.create(x, y);\r\n if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {\r\n const isFace = Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;\r\n this.props.onFaceCellClick && this.props.onFaceCellClick(vector, isFace ? face : Face.None);\r\n }\r\n }\r\n}\r\n\r\nenum Pointer {\r\n None = 0,\r\n Up,\r\n Down,\r\n Left,\r\n Right,\r\n}\r\n\r\nconst pointerIconSpec: { [key: number]: IconSpec } = {\r\n [Pointer.Up]: <SvgCaretDown />,\r\n [Pointer.Down]: <SvgCaretUp />,\r\n [Pointer.Left]: <SvgCaretRight />,\r\n [Pointer.Right]: <SvgCaretLeft />,\r\n};\r\n\r\nconst pointerClass: { [key: number]: string } = {\r\n [Pointer.Up]: \"cube-up\",\r\n [Pointer.Down]: \"cube-down\",\r\n [Pointer.Left]: \"cube-left\",\r\n [Pointer.Right]: \"cube-right\",\r\n};\r\n\r\ninterface PointerProps extends React.AllHTMLAttributes<HTMLDivElement> {\r\n visible: boolean;\r\n pointerType: Pointer;\r\n onArrowClick(pointer: Pointer): void;\r\n title: string;\r\n [\"data-testid\"]?: string;\r\n}\r\n\r\nclass PointerButton extends React.Component<PointerProps> {\r\n public override render(): React.ReactNode {\r\n const { visible, pointerType, onArrowClick, title, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n const classes = classnames(\r\n \"cube-pointer\", \"icon\",\r\n pointerClass[pointerType],\r\n visible && \"cube-visible\",\r\n );\r\n\r\n return (\r\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\r\n <div className={classes} role=\"button\" tabIndex={-1} title={title} {...props}\r\n onClick={this._handleClick}><Icon iconSpec={pointerIconSpec[pointerType]} /> </div>\r\n );\r\n }\r\n private _handleClick = (event: React.MouseEvent) => {\r\n const { pointerType } = this.props;\r\n event.preventDefault();\r\n this.props.onArrowClick(pointerType);\r\n };\r\n}\r\n"]}
@@ -1,146 +1,146 @@
1
- /** @packageDocumentation
2
- * @module NavigationAids
3
- */
4
- import "./DrawingNavigationAid.scss";
5
- import * as React from "react";
6
- import { Matrix3d, Point2d, Point3d, Vector3d } from "@itwin/core-geometry";
7
- import { IModelConnection, ScreenViewport, ViewManager, Viewport, ViewState } from "@itwin/core-frontend";
8
- import { CommonProps } from "@itwin/core-react";
9
- /**
10
- * Enum for mode that minimap is currently in
11
- * @internal
12
- */
13
- export declare enum MapMode {
14
- Opened = "map-opened",
15
- Closed = "map-closed"
16
- }
17
- /** Properties for the [[DrawingNavigationAid]] component
18
- * @public
19
- */
20
- export interface DrawingNavigationAidProps extends CommonProps {
21
- iModelConnection: IModelConnection;
22
- viewport?: Viewport;
23
- /** @internal */
24
- animationTime?: number;
25
- /** @internal */
26
- openSize?: Vector3d;
27
- /** @internal */
28
- closeSize?: Vector3d;
29
- /** @internal */
30
- initialMapMode?: MapMode;
31
- /** @internal */
32
- onAnimationEnd?: () => void;
33
- /** @internal */
34
- initialRotateMinimapWithView?: boolean;
35
- /** @internal */
36
- initialView?: ViewState;
37
- /** @internal */
38
- viewManagerOverride?: ViewManager;
39
- /** @internal */
40
- screenViewportOverride?: typeof ScreenViewport;
41
- }
42
- /** @internal */
43
- interface DrawingNavigationAidState {
44
- startOrigin: Point3d;
45
- origin: Point3d;
46
- extents: Vector3d;
47
- startRotation: Matrix3d;
48
- rotation: Matrix3d;
49
- startMapOrigin: Point3d;
50
- mapOrigin: Point3d;
51
- startMapExtents: Vector3d;
52
- mapExtents: Vector3d;
53
- mouseStart: Point2d;
54
- panningDirection: Vector3d;
55
- startDrawingZoom: number;
56
- drawingZoom: number;
57
- mode: MapMode;
58
- animation: number;
59
- isMoving: boolean;
60
- isPanning: boolean;
61
- viewId: string;
62
- view: ViewState | undefined;
63
- rotateMinimapWithView: boolean;
64
- }
65
- /**
66
- * A Drawing Navigation Aid.
67
- * @public
68
- */
69
- export declare class DrawingNavigationAid extends React.Component<DrawingNavigationAidProps, DrawingNavigationAidState> {
70
- private _rootElement;
71
- private _viewContainerElement;
72
- private _viewElement;
73
- private _rootOffset;
74
- private _viewport;
75
- private _animationFrame;
76
- private _mounted;
77
- /** @internal */
78
- readonly state: Readonly<DrawingNavigationAidState>;
79
- constructor(props: DrawingNavigationAidProps);
80
- /** @internal */
81
- render(): React.ReactNode;
82
- private _isViewport3D;
83
- private _lastTime;
84
- private static _animationFn;
85
- private _animation;
86
- private _animationEnd;
87
- private _lastPanTime;
88
- private _panAnimation;
89
- componentDidMount(): void;
90
- componentWillUnmount(): void;
91
- private _handleViewRotationChangeEvent;
92
- private _updateFrustum;
93
- private _toggleRotationMode;
94
- private _handleKeyUp;
95
- private _lastClientXY;
96
- private _processWindowDrag;
97
- private _processWindowEndDrag;
98
- private _handleMouseDown;
99
- private _handleDrawingMouseDown;
100
- private _handleWindowMouseDown;
101
- private _handleMouseDrag;
102
- private _handleMouseDragEnd;
103
- private _handleWindowTouchStart;
104
- private _onTouchMove;
105
- private _onTouchEnd;
106
- /** @internal */
107
- static getDefaultClosedMapSize: () => Vector3d;
108
- /** @internal */
109
- static getDefaultOpenedMapSize: (paddingX?: number, paddingY?: number) => Vector3d;
110
- private _getClosedMapSize;
111
- private _getOpenedMapSize;
112
- private _openLargeMap;
113
- private _closeLargeMap;
114
- private _getPanVector;
115
- private _handleWheel;
116
- private _handleZoomIn;
117
- private _handleZoomOut;
118
- private _handleUnrotate;
119
- /** @internal */
120
- static findRotatedWindowDimensions: (extents: Vector3d, rotation: Matrix3d) => Vector3d;
121
- }
122
- /** @internal */
123
- export interface DrawingNavigationCanvasProps {
124
- view: ViewState | undefined;
125
- viewId?: string;
126
- origin: Point3d;
127
- extents: Vector3d;
128
- zoom: number;
129
- rotation: Matrix3d;
130
- viewManagerOverride?: ViewManager;
131
- screenViewportOverride?: typeof ScreenViewport;
132
- canvasSizeOverride?: boolean;
133
- }
134
- /** @internal */
135
- export declare class DrawingNavigationCanvas extends React.Component<DrawingNavigationCanvasProps> {
136
- private _canvasElement;
137
- private _vp?;
138
- render(): React.ReactNode;
139
- componentDidMount(): void;
140
- private customizeViewport;
141
- private _update;
142
- componentDidUpdate(oldProps: DrawingNavigationCanvasProps): void;
143
- componentWillUnmount(): void;
144
- }
145
- export {};
1
+ /** @packageDocumentation
2
+ * @module NavigationAids
3
+ */
4
+ import "./DrawingNavigationAid.scss";
5
+ import * as React from "react";
6
+ import { Matrix3d, Point2d, Point3d, Vector3d } from "@itwin/core-geometry";
7
+ import { IModelConnection, ScreenViewport, ViewManager, Viewport, ViewState } from "@itwin/core-frontend";
8
+ import { CommonProps } from "@itwin/core-react";
9
+ /**
10
+ * Enum for mode that minimap is currently in
11
+ * @internal
12
+ */
13
+ export declare enum MapMode {
14
+ Opened = "map-opened",
15
+ Closed = "map-closed"
16
+ }
17
+ /** Properties for the [[DrawingNavigationAid]] component
18
+ * @public
19
+ */
20
+ export interface DrawingNavigationAidProps extends CommonProps {
21
+ iModelConnection: IModelConnection;
22
+ viewport?: Viewport;
23
+ /** @internal */
24
+ animationTime?: number;
25
+ /** @internal */
26
+ openSize?: Vector3d;
27
+ /** @internal */
28
+ closeSize?: Vector3d;
29
+ /** @internal */
30
+ initialMapMode?: MapMode;
31
+ /** @internal */
32
+ onAnimationEnd?: () => void;
33
+ /** @internal */
34
+ initialRotateMinimapWithView?: boolean;
35
+ /** @internal */
36
+ initialView?: ViewState;
37
+ /** @internal */
38
+ viewManagerOverride?: ViewManager;
39
+ /** @internal */
40
+ screenViewportOverride?: typeof ScreenViewport;
41
+ }
42
+ /** @internal */
43
+ interface DrawingNavigationAidState {
44
+ startOrigin: Point3d;
45
+ origin: Point3d;
46
+ extents: Vector3d;
47
+ startRotation: Matrix3d;
48
+ rotation: Matrix3d;
49
+ startMapOrigin: Point3d;
50
+ mapOrigin: Point3d;
51
+ startMapExtents: Vector3d;
52
+ mapExtents: Vector3d;
53
+ mouseStart: Point2d;
54
+ panningDirection: Vector3d;
55
+ startDrawingZoom: number;
56
+ drawingZoom: number;
57
+ mode: MapMode;
58
+ animation: number;
59
+ isMoving: boolean;
60
+ isPanning: boolean;
61
+ viewId: string;
62
+ view: ViewState | undefined;
63
+ rotateMinimapWithView: boolean;
64
+ }
65
+ /**
66
+ * A Drawing Navigation Aid.
67
+ * @public
68
+ */
69
+ export declare class DrawingNavigationAid extends React.Component<DrawingNavigationAidProps, DrawingNavigationAidState> {
70
+ private _rootElement;
71
+ private _viewContainerElement;
72
+ private _viewElement;
73
+ private _rootOffset;
74
+ private _viewport;
75
+ private _animationFrame;
76
+ private _mounted;
77
+ /** @internal */
78
+ readonly state: Readonly<DrawingNavigationAidState>;
79
+ constructor(props: DrawingNavigationAidProps);
80
+ /** @internal */
81
+ render(): React.ReactNode;
82
+ private _isViewport3D;
83
+ private _lastTime;
84
+ private static _animationFn;
85
+ private _animation;
86
+ private _animationEnd;
87
+ private _lastPanTime;
88
+ private _panAnimation;
89
+ componentDidMount(): void;
90
+ componentWillUnmount(): void;
91
+ private _handleViewRotationChangeEvent;
92
+ private _updateFrustum;
93
+ private _toggleRotationMode;
94
+ private _handleKeyUp;
95
+ private _lastClientXY;
96
+ private _processWindowDrag;
97
+ private _processWindowEndDrag;
98
+ private _handleMouseDown;
99
+ private _handleDrawingMouseDown;
100
+ private _handleWindowMouseDown;
101
+ private _handleMouseDrag;
102
+ private _handleMouseDragEnd;
103
+ private _handleWindowTouchStart;
104
+ private _onTouchMove;
105
+ private _onTouchEnd;
106
+ /** @internal */
107
+ static getDefaultClosedMapSize: () => Vector3d;
108
+ /** @internal */
109
+ static getDefaultOpenedMapSize: (paddingX?: number, paddingY?: number) => Vector3d;
110
+ private _getClosedMapSize;
111
+ private _getOpenedMapSize;
112
+ private _openLargeMap;
113
+ private _closeLargeMap;
114
+ private _getPanVector;
115
+ private _handleWheel;
116
+ private _handleZoomIn;
117
+ private _handleZoomOut;
118
+ private _handleUnrotate;
119
+ /** @internal */
120
+ static findRotatedWindowDimensions: (extents: Vector3d, rotation: Matrix3d) => Vector3d;
121
+ }
122
+ /** @internal */
123
+ export interface DrawingNavigationCanvasProps {
124
+ view: ViewState | undefined;
125
+ viewId?: string;
126
+ origin: Point3d;
127
+ extents: Vector3d;
128
+ zoom: number;
129
+ rotation: Matrix3d;
130
+ viewManagerOverride?: ViewManager;
131
+ screenViewportOverride?: typeof ScreenViewport;
132
+ canvasSizeOverride?: boolean;
133
+ }
134
+ /** @internal */
135
+ export declare class DrawingNavigationCanvas extends React.Component<DrawingNavigationCanvasProps> {
136
+ private _canvasElement;
137
+ private _vp?;
138
+ render(): React.ReactNode;
139
+ componentDidMount(): void;
140
+ private customizeViewport;
141
+ private _update;
142
+ componentDidUpdate(oldProps: DrawingNavigationCanvasProps): void;
143
+ componentWillUnmount(): void;
144
+ }
145
+ export {};
146
146
  //# sourceMappingURL=DrawingNavigationAid.d.ts.map