@itwin/imodel-components-react 4.0.0-dev.9 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/CHANGELOG.md +161 -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.d.ts.map +1 -1
  5. package/lib/cjs/imodel-components-react/UiIModelComponents.js +75 -79
  6. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  8. package/lib/cjs/imodel-components-react/color/AlphaSlider.js +190 -186
  9. package/lib/cjs/imodel-components-react/color/AlphaSlider.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/color/AlphaSlider.scss +63 -63
  11. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  12. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  13. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +112 -107
  14. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  15. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +90 -90
  16. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  17. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js +78 -74
  18. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  19. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  20. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  21. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +143 -137
  22. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +62 -63
  24. package/lib/cjs/imodel-components-react/color/HueSlider.d.ts +22 -22
  25. package/lib/cjs/imodel-components-react/color/HueSlider.js +203 -199
  26. package/lib/cjs/imodel-components-react/color/HueSlider.js.map +1 -1
  27. package/lib/cjs/imodel-components-react/color/HueSlider.scss +61 -61
  28. package/lib/cjs/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  29. package/lib/cjs/imodel-components-react/color/SaturationPicker.js +217 -213
  30. package/lib/cjs/imodel-components-react/color/SaturationPicker.js.map +1 -1
  31. package/lib/cjs/imodel-components-react/color/SaturationPicker.scss +35 -35
  32. package/lib/cjs/imodel-components-react/color/Swatch.d.ts +22 -22
  33. package/lib/cjs/imodel-components-react/color/Swatch.js +64 -60
  34. package/lib/cjs/imodel-components-react/color/Swatch.js.map +1 -1
  35. package/lib/cjs/imodel-components-react/color/Swatch.scss +22 -23
  36. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  37. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js +23 -23
  38. package/lib/cjs/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  40. package/lib/cjs/imodel-components-react/editors/ColorEditor.js +155 -151
  41. package/lib/cjs/imodel-components-react/editors/ColorEditor.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +18 -18
  43. package/lib/cjs/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  44. package/lib/cjs/imodel-components-react/editors/WeightEditor.js +164 -160
  45. package/lib/cjs/imodel-components-react/editors/WeightEditor.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +16 -16
  47. package/lib/cjs/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  48. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js +100 -96
  49. package/lib/cjs/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  50. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  51. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  52. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +272 -265
  53. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  54. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
  55. package/lib/cjs/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  56. package/lib/cjs/imodel-components-react/lineweight/Swatch.js +89 -85
  57. package/lib/cjs/imodel-components-react/lineweight/Swatch.js.map +1 -1
  58. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +48 -48
  59. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  60. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js +163 -159
  61. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  62. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
  63. package/lib/cjs/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  64. package/lib/cjs/imodel-components-react/navigationaids/Cube.js +131 -127
  65. package/lib/cjs/imodel-components-react/navigationaids/Cube.js.map +1 -1
  66. package/lib/cjs/imodel-components-react/navigationaids/Cube.scss +19 -19
  67. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +154 -174
  68. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  69. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +626 -634
  70. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  71. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
  72. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  73. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  74. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +657 -647
  75. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  76. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
  77. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  78. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +103 -99
  79. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  80. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
  81. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  82. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +56 -53
  83. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  84. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  85. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  86. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +88 -83
  87. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  88. package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  89. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +89 -86
  90. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  91. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  92. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +112 -109
  93. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  94. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  95. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +133 -133
  96. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  97. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  98. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +187 -184
  99. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  100. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  101. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +149 -145
  102. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  103. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  104. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js +63 -59
  105. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  106. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  107. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js +51 -47
  108. package/lib/cjs/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  109. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  110. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js +58 -54
  111. package/lib/cjs/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  112. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  113. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js +52 -48
  114. package/lib/cjs/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  115. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  116. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js +54 -50
  117. package/lib/cjs/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  118. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  119. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +62 -58
  120. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  121. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  122. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js +51 -47
  123. package/lib/cjs/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  124. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  125. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js +60 -56
  126. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  127. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  128. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +98 -95
  129. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  130. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  131. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js +123 -119
  132. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  133. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  134. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  135. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js +142 -143
  136. package/lib/cjs/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  137. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  138. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js +69 -69
  139. package/lib/cjs/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  140. package/lib/cjs/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  141. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js +85 -81
  142. package/lib/cjs/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  143. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +26 -26
  144. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  145. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  146. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +99 -91
  147. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  148. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +28 -31
  149. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  150. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +195 -191
  151. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  152. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +105 -112
  153. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  154. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  155. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +432 -424
  156. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  157. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +359 -356
  158. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  159. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js +58 -54
  160. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  161. package/lib/cjs/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  162. package/lib/cjs/imodel-components-react/timeline/Timeline.scss +164 -164
  163. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
  164. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  165. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +398 -358
  166. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  167. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +178 -164
  168. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +145 -174
  169. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  170. package/lib/cjs/imodel-components-react/timeline/interfaces.js +45 -45
  171. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  172. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  173. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  174. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +276 -274
  175. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  176. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  177. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +105 -105
  178. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  179. package/lib/cjs/imodel-components-react.d.ts +81 -82
  180. package/lib/cjs/imodel-components-react.d.ts.map +1 -1
  181. package/lib/cjs/imodel-components-react.js +104 -101
  182. package/lib/cjs/imodel-components-react.js.map +1 -1
  183. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +28 -28
  184. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts.map +1 -1
  185. package/lib/esm/imodel-components-react/UiIModelComponents.js +72 -75
  186. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  187. package/lib/esm/imodel-components-react/color/AlphaSlider.d.ts +36 -36
  188. package/lib/esm/imodel-components-react/color/AlphaSlider.js +160 -160
  189. package/lib/esm/imodel-components-react/color/AlphaSlider.js.map +1 -1
  190. package/lib/esm/imodel-components-react/color/AlphaSlider.scss +63 -63
  191. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts +37 -37
  192. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  193. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +83 -82
  194. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  195. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +90 -90
  196. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts +23 -23
  197. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js +51 -51
  198. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  199. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts +44 -44
  200. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  201. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +114 -112
  202. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  203. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +62 -63
  204. package/lib/esm/imodel-components-react/color/HueSlider.d.ts +22 -22
  205. package/lib/esm/imodel-components-react/color/HueSlider.js +173 -173
  206. package/lib/esm/imodel-components-react/color/HueSlider.js.map +1 -1
  207. package/lib/esm/imodel-components-react/color/HueSlider.scss +61 -61
  208. package/lib/esm/imodel-components-react/color/SaturationPicker.d.ts +20 -20
  209. package/lib/esm/imodel-components-react/color/SaturationPicker.js +187 -187
  210. package/lib/esm/imodel-components-react/color/SaturationPicker.js.map +1 -1
  211. package/lib/esm/imodel-components-react/color/SaturationPicker.scss +35 -35
  212. package/lib/esm/imodel-components-react/color/Swatch.d.ts +22 -22
  213. package/lib/esm/imodel-components-react/color/Swatch.js +34 -34
  214. package/lib/esm/imodel-components-react/color/Swatch.js.map +1 -1
  215. package/lib/esm/imodel-components-react/color/Swatch.scss +22 -23
  216. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.d.ts +6 -6
  217. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js +19 -19
  218. package/lib/esm/imodel-components-react/color/getCSSColorFromDef.js.map +1 -1
  219. package/lib/esm/imodel-components-react/editors/ColorEditor.d.ts +44 -44
  220. package/lib/esm/imodel-components-react/editors/ColorEditor.js +124 -124
  221. package/lib/esm/imodel-components-react/editors/ColorEditor.js.map +1 -1
  222. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +18 -18
  223. package/lib/esm/imodel-components-react/editors/WeightEditor.d.ts +47 -47
  224. package/lib/esm/imodel-components-react/editors/WeightEditor.js +133 -133
  225. package/lib/esm/imodel-components-react/editors/WeightEditor.js.map +1 -1
  226. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +16 -16
  227. package/lib/esm/imodel-components-react/inputs/QuantityInput.d.ts +25 -25
  228. package/lib/esm/imodel-components-react/inputs/QuantityInput.js +70 -70
  229. package/lib/esm/imodel-components-react/inputs/QuantityInput.js.map +1 -1
  230. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +44 -44
  231. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  232. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +243 -240
  233. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  234. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +106 -107
  235. package/lib/esm/imodel-components-react/lineweight/Swatch.d.ts +33 -33
  236. package/lib/esm/imodel-components-react/lineweight/Swatch.js +59 -59
  237. package/lib/esm/imodel-components-react/lineweight/Swatch.js.map +1 -1
  238. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +48 -48
  239. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.d.ts +60 -60
  240. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js +134 -133
  241. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.js.map +1 -1
  242. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +51 -52
  243. package/lib/esm/imodel-components-react/navigationaids/Cube.d.ts +45 -45
  244. package/lib/esm/imodel-components-react/navigationaids/Cube.js +100 -100
  245. package/lib/esm/imodel-components-react/navigationaids/Cube.js.map +1 -1
  246. package/lib/esm/imodel-components-react/navigationaids/Cube.scss +19 -19
  247. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +154 -174
  248. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  249. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +596 -606
  250. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  251. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +178 -182
  252. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts +145 -145
  253. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  254. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +627 -620
  255. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  256. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +135 -134
  257. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.d.ts +26 -26
  258. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +76 -76
  259. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  260. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +59 -63
  261. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts +17 -17
  262. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +29 -30
  263. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  264. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts +18 -18
  265. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  266. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +61 -60
  267. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  268. package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts +17 -17
  269. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +62 -63
  270. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  271. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts +17 -17
  272. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +82 -83
  273. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  274. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.d.ts +19 -19
  275. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +106 -110
  276. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  277. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts +21 -21
  278. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +157 -158
  279. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  280. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts +22 -22
  281. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +122 -122
  282. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  283. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.d.ts +17 -17
  284. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js +36 -36
  285. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalPrecision.js.map +1 -1
  286. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.d.ts +17 -17
  287. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js +24 -24
  288. package/lib/esm/imodel-components-react/quantityformat/misc/DecimalSeparator.js.map +1 -1
  289. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.d.ts +16 -16
  290. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js +31 -31
  291. package/lib/esm/imodel-components-react/quantityformat/misc/FractionPrecision.js.map +1 -1
  292. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.d.ts +18 -18
  293. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js +25 -25
  294. package/lib/esm/imodel-components-react/quantityformat/misc/ScientificType.js.map +1 -1
  295. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.d.ts +17 -17
  296. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js +27 -27
  297. package/lib/esm/imodel-components-react/quantityformat/misc/SignOption.js.map +1 -1
  298. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.d.ts +17 -17
  299. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js +35 -35
  300. package/lib/esm/imodel-components-react/quantityformat/misc/StationSeparatorSelector.js.map +1 -1
  301. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.d.ts +17 -17
  302. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js +24 -24
  303. package/lib/esm/imodel-components-react/quantityformat/misc/StationSizeSelector.js.map +1 -1
  304. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.d.ts +17 -17
  305. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js +33 -33
  306. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  307. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts +17 -17
  308. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +68 -69
  309. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  310. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.d.ts +23 -23
  311. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js +96 -96
  312. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  313. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts +52 -52
  314. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.d.ts.map +1 -1
  315. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js +138 -139
  316. package/lib/esm/imodel-components-react/timeline/BaseSolarDataProvider.js.map +1 -1
  317. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.d.ts +31 -31
  318. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js +65 -65
  319. package/lib/esm/imodel-components-react/timeline/BaseTimelineDataProvider.js.map +1 -1
  320. package/lib/esm/imodel-components-react/timeline/InlineEdit.d.ts +27 -27
  321. package/lib/esm/imodel-components-react/timeline/InlineEdit.js +55 -55
  322. package/lib/esm/imodel-components-react/timeline/InlineEdit.js.map +1 -1
  323. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +26 -26
  324. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts +33 -33
  325. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  326. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +68 -64
  327. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  328. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +28 -31
  329. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts +54 -54
  330. package/lib/esm/imodel-components-react/timeline/Scrubber.js +164 -164
  331. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  332. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +105 -112
  333. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts +77 -77
  334. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  335. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +402 -398
  336. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  337. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +359 -356
  338. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.d.ts +15 -15
  339. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js +28 -28
  340. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.js.map +1 -1
  341. package/lib/esm/imodel-components-react/timeline/SpeedTimeline.scss +39 -39
  342. package/lib/esm/imodel-components-react/timeline/Timeline.scss +164 -164
  343. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +130 -133
  344. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  345. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +368 -332
  346. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  347. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +178 -164
  348. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +145 -174
  349. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts.map +1 -1
  350. package/lib/esm/imodel-components-react/timeline/interfaces.js +42 -42
  351. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  352. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts +42 -42
  353. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  354. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +249 -251
  355. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  356. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +106 -106
  357. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +96 -95
  358. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  359. package/lib/esm/imodel-components-react.d.ts +81 -82
  360. package/lib/esm/imodel-components-react.d.ts.map +1 -1
  361. package/lib/esm/imodel-components-react.js +86 -87
  362. package/lib/esm/imodel-components-react.js.map +1 -1
  363. package/lib/public/locales/en/UiIModelComponents.json +139 -139
  364. package/package.json +35 -37
  365. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  366. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  367. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +0 -146
  368. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  369. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +0 -94
  370. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +0 -22
  371. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts.map +0 -1
  372. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +0 -123
  373. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +0 -1
  374. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +0 -94
@@ -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,oCAAkC;AAClC,4DAAoC;AACpC,6CAA+B;AAC/B,wDAA4H;AAC5H,wDAA6E;AAE7E,8DAA2D;AAC3D,iFAA2G;AAC3G,iCAAoC;AAEpC,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,mEAAS,CAAA;IACT,kEAAS,CAAA;AACX,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AACD;+CAC+C;AAC/C,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,qCAAQ,CAAA;IACR,uCAAS,CAAA;IACT,sCAAS,CAAA;AACX,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,iEAAQ,CAAA;IACR,oEAAU,CAAA;AACZ,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AACD;+CAC+C;AAC/C,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,qCAAQ,CAAA;IACR,qCAAQ,CAAA;IACR,wCAAU,CAAA;AACZ,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB;AAED,cAAc;AACd,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAQ,CAAA;IACR,+DAAO,CAAA;IACP,sEAAW,CAAA;AACb,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AACD;2CAC2C;AAC3C,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,qCAAQ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E,SAAS;IACvB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW;IAC3B,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW;IAC3B,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,YAAY;CAC9B,CAAC;AAUF,MAAM,aAAc,SAAQ,KAAK,CAAC,SAAuB;IAAzD;;QAgBU,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;IApBiB,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,IAAA,oBAAU,EACxB,cAAc,EAAE,MAAM,EACtB,YAAY,CAAC,WAAW,CAAC,EACzB,gBAAgB,CAAC,WAAW,CAAC,EAC7B,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,GAAI,CACjC,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 } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { ViewportComponentEvents, ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\r\nimport { Cube, Face } from \"./Cube\";\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 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 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 [[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 pointerIconClass: { [key: number]: string } = {\r\n [Pointer.Up]: \"icon-caret-down\",\r\n [Pointer.Down]: \"icon-caret-up\",\r\n [Pointer.Left]: \"icon-caret-right\",\r\n [Pointer.Right]: \"icon-caret-left\",\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 pointerIconClass[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} />\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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I,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,EAC1E,OAAO,EAAE,IAAI,CAAC,YAAY;YAAE,oBAAC,iBAAI,IAAC,QAAQ,EAAE,eAAe,CAAC,WAAW,CAAC,GAAI;gBAAO,CACtF,CAAC;IACJ,CAAC;CAMF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NavigationAids\n */\n\nimport \"./CubeNavigationAid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Angle, AxisIndex, AxisOrder, Geometry, Matrix3d, Point2d, Vector2d, Vector3d, XYAndZ } from \"@itwin/core-geometry\";\nimport { IModelApp, IModelConnection, Viewport } from \"@itwin/core-frontend\";\nimport { CommonProps, Icon, IconSpec } from \"@itwin/core-react\";\nimport { UiIModelComponents } from \"../UiIModelComponents\";\nimport { ViewportComponentEvents, ViewRotationChangeEventArgs } from \"../viewport/ViewportComponentEvents\";\nimport { Cube, Face } from \"./Cube\";\nimport { SvgCaretDown, SvgCaretLeft, SvgCaretRight, SvgCaretUp } from \"@itwin/itwinui-icons-react\";\n\n/** @public */\nexport enum CubeNavigationHitBoxX {\n None = 0,\n Right = 1,\n Left = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxY {\n None = 0,\n Back = 1,\n Front = -1,\n}\n\n/** @public */\nexport enum CubeNavigationHitBoxZ {\n None = 0,\n Top = 1,\n Bottom = -1,\n}\n\ninterface CubeNavigationRotationMap {\n up: Face;\n down: Face;\n left: Face;\n right: Face;\n}\n\nconst cubeNavigationFaceLocs: { [key: string]: Vector3d } = {\n [Face.Left]: Vector3d.create(CubeNavigationHitBoxX.Left, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\n [Face.Right]: Vector3d.create(CubeNavigationHitBoxX.Right, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.None),\n [Face.Back]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Back, CubeNavigationHitBoxZ.None),\n [Face.Front]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.Front, CubeNavigationHitBoxZ.None),\n [Face.Bottom]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Bottom),\n [Face.Top]: Vector3d.create(CubeNavigationHitBoxX.None, CubeNavigationHitBoxY.None, CubeNavigationHitBoxZ.Top),\n};\n\nconst cubeNavigationFaceRotations: { [key: string]: Matrix3d } = {\n [Face.Left]: Matrix3d.createRowValues(0, -1, 0, 0, 0, 1, -1, 0, 0),\n [Face.Right]: Matrix3d.createRowValues(0, 1, 0, 0, 0, 1, 1, 0, 0),\n [Face.Back]: Matrix3d.createRowValues(-1, 0, 0, 0, 0, 1, 0, 1, 0),\n [Face.Front]: Matrix3d.createRowValues(1, 0, 0, 0, 0, 1, 0, -1, 0),\n [Face.Bottom]: Matrix3d.createRowValues(1, 0, 0, 0, -1, 0, 0, 0, -1),\n [Face.Top]: Matrix3d.createRowValues(1, 0, 0, 0, 1, 0, 0, 0, 1),\n};\n\n// data relating Up/Down/Left/Right directions relative to every surface\nconst cubeNavigationRoutes: { [key: string]: CubeNavigationRotationMap } = {\n [Face.Front]: { up: Face.Top, down: Face.Bottom, left: Face.Left, right: Face.Right },\n [Face.Back]: { up: Face.Top, down: Face.Bottom, left: Face.Right, right: Face.Left },\n [Face.Top]: { up: Face.Back, down: Face.Front, left: Face.Left, right: Face.Right },\n [Face.Bottom]: { up: Face.Front, down: Face.Back, left: Face.Left, right: Face.Right },\n [Face.Right]: { up: Face.Top, down: Face.Bottom, left: Face.Front, right: Face.Back },\n [Face.Left]: { up: Face.Top, down: Face.Bottom, left: Face.Back, right: Face.Front },\n};\n\n/** The default tolerance (1.0e-6) is appropriate if very dirty viewing operations are expected. */\nconst DEFAULT_TOLERANCE = 1.0e-6;\n\n/** @internal */\nexport enum CubeHover {\n None = 0,\n Hover,\n Active,\n}\n\n/** Properties for the [[CubeNavigationAid]] component\n * @public\n */\nexport interface CubeNavigationAidProps extends CommonProps {\n iModelConnection: IModelConnection;\n viewport?: Viewport;\n\n // used only in testing\n\n /** @internal */\n onAnimationEnd?: () => void;\n /** @internal */\n animationTime?: number;\n}\n\n/** @public */\ninterface CubeNavigationAidState {\n dragging: boolean;\n startRotMatrix: Matrix3d;\n endRotMatrix: Matrix3d;\n animation: number;\n hoverMap: { [key: string]: CubeHover };\n face: Face;\n}\n\n/** Cube Navigation Aid Component\n * @public\n */\nexport class CubeNavigationAid extends React.Component<CubeNavigationAidProps, CubeNavigationAidState> {\n private _start: Vector2d = Vector2d.createZero();\n /** @internal */\n public override readonly state: Readonly<CubeNavigationAidState> = {\n dragging: false,\n startRotMatrix: Matrix3d.createIdentity(),\n endRotMatrix: Matrix3d.createIdentity(),\n animation: 1,\n hoverMap: {},\n face: Face.Top,\n };\n\n private _lastTime: number | undefined;\n private _animationFrame: any;\n private _mounted: boolean = false;\n private _labels: { [key: string]: string } = {\n [Face.Right]: UiIModelComponents.translate(\"cube.right\"),\n [Face.Left]: UiIModelComponents.translate(\"cube.left\"),\n [Face.Back]: UiIModelComponents.translate(\"cube.back\"),\n [Face.Front]: UiIModelComponents.translate(\"cube.front\"),\n [Face.Top]: UiIModelComponents.translate(\"cube.top\"),\n [Face.Bottom]: UiIModelComponents.translate(\"cube.bottom\"),\n };\n\n /** @internal */\n public override componentDidMount() {\n this._mounted = true;\n ViewportComponentEvents.onViewRotationChangeEvent.addListener(this._handleViewRotationChangeEvent);\n\n // set initial rotation\n if (this.props.viewport) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1 });\n }\n }\n\n /** @internal */\n public override componentWillUnmount() {\n ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);\n clearTimeout(this._animationFrame);\n this._mounted = false;\n }\n\n // Synchronize with rotation coming from the Viewport\n private _handleViewRotationChangeEvent = (args: ViewRotationChangeEventArgs) => {\n const { animation, dragging, endRotMatrix } = this.state;\n // istanbul ignore else\n if (this.props.viewport === args.viewport && animation >= 1 && !dragging) {\n const newMatrix = this.props.viewport.view.getRotation().clone();\n if (!endRotMatrix.isAlmostEqual(newMatrix)) {\n this.setState({ startRotMatrix: newMatrix, endRotMatrix: newMatrix, animation: 1, face: Face.None });\n }\n }\n };\n\n private _animation = () => {\n const t = Date.now();\n const delta = this._lastTime ? t - this._lastTime : 16;\n this._lastTime = t;\n if (this.state.animation !== 1) {\n const animation = Math.min(1, this.state.animation + delta / (1000 * (this.props.animationTime || /* istanbul ignore next */ 0.4)));\n\n // istanbul ignore next\n if (this._mounted) {\n this.setState({ animation }, () => {\n this._animationFrame = setTimeout(this._animation, 16.667);\n });\n }\n } else {\n this._lastTime = undefined;\n this._animationEnd();\n }\n };\n\n private _animationEnd = () => {\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, this.state.face, true);\n const startRotMatrix = this.state.endRotMatrix.clone();\n // istanbul ignore next\n if (this._mounted) {\n this.setState({ startRotMatrix }, () => {\n // istanbul ignore else\n if (this.props.onAnimationEnd)\n this.props.onAnimationEnd();\n });\n }\n };\n\n private static _animationFn = (t: number) => t < .5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t;\n\n private static _isMatrixFace = (matrix: Matrix3d): boolean => {\n let sum = 0;\n for (const coff of matrix.coffs) {\n if (Geometry.isAlmostEqualNumber(Math.abs(coff), 1))\n sum++;\n }\n // Assuming matrix is a proper rotation matrix:\n // if matrix viewing a face, there will be a total of 3 values either almost -1, or almost 1.\n return sum === 3;\n };\n\n public override render(): React.ReactNode {\n const { animation, startRotMatrix, endRotMatrix } = this.state;\n const visible = CubeNavigationAid._isMatrixFace(endRotMatrix) && animation === 1.0;\n const rotMatrix = CubeNavigationAid._interpolateRotMatrix(startRotMatrix, animation, endRotMatrix);\n if (rotMatrix !== startRotMatrix && rotMatrix !== endRotMatrix)\n ViewportComponentEvents.setCubeMatrix(rotMatrix, Face.None);\n\n const faces: { [key: string]: React.ReactNode } = {};\n for (const key in this._labels) {\n // istanbul ignore else\n if (this._labels.hasOwnProperty(key)) {\n const f = key as Face;\n const label = this._labels[f];\n faces[f] =\n <NavCubeFace\n face={f}\n label={label}\n hoverMap={this.state.hoverMap}\n onFaceCellClick={this._handleFaceCellClick}\n onFaceCellHoverChange={this._handleCellHoverChange} />;\n }\n }\n\n const cubeClassNames = classnames(\n \"nav-cube\",\n this.state.dragging && \"cube-dragging\",\n );\n\n const upTitle = this.getArrowTitle(Pointer.Up);\n const downTitle = this.getArrowTitle(Pointer.Down);\n const leftTitle = this.getArrowTitle(Pointer.Left);\n const rightTitle = this.getArrowTitle(Pointer.Right);\n\n return (\n <div className={classnames(\"components-cube-container\", this.props.className)}\n style={this.props.style}\n data-testid=\"components-cube-navigation-aid\"\n onMouseDown={this._handleBoxMouseDown}\n onTouchStart={this._handleBoxTouchStart}\n role=\"presentation\"\n >\n <div className={\"cube-element-container\"}>\n <Cube\n className={cubeClassNames}\n rotMatrix={rotMatrix}\n faces={faces} />\n </div>\n <PointerButton data-testid=\"cube-pointer-button-up\"\n visible={visible} pointerType={Pointer.Up} onArrowClick={this._onArrowClick} title={upTitle} />\n <PointerButton data-testid=\"cube-pointer-button-down\"\n visible={visible} pointerType={Pointer.Down} onArrowClick={this._onArrowClick} title={downTitle} />\n <PointerButton data-testid=\"cube-pointer-button-left\"\n visible={visible} pointerType={Pointer.Left} onArrowClick={this._onArrowClick} title={leftTitle} />\n <PointerButton data-testid=\"cube-pointer-button-right\"\n visible={visible} pointerType={Pointer.Right} onArrowClick={this._onArrowClick} title={rightTitle} />\n </div>\n );\n }\n\n private _handleCellHoverChange = (vect: Vector3d, state: CubeHover) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const hoverMap = this.state.hoverMap;\n hoverMap[`${vect.x}-${vect.y}-${vect.z}`] = state;\n this.setState({ hoverMap });\n };\n\n private _isInteractionLocked = () => {\n // Locked by markup\n if(undefined !== this.props.viewport && this.props.viewport === IModelApp.toolAdmin.markupView) {\n return true;\n }\n return false;\n };\n\n private static _getMatrixFace = (rotMatrix: Matrix3d): Face => {\n if (!CubeNavigationAid._isMatrixFace(rotMatrix)) {\n return Face.None;\n }\n\n let matrixFace = Face.None;\n\n for (const face in cubeNavigationFaceRotations) {\n // istanbul ignore else\n if (face in cubeNavigationFaceRotations) {\n const loc = cubeNavigationFaceRotations[face];\n if (rotMatrix.isAlmostEqual(loc)) {\n matrixFace = face as Face;\n break;\n }\n }\n }\n\n return matrixFace;\n };\n\n private static _interpolateRotMatrix = (start: Matrix3d, anim: number, end: Matrix3d): Matrix3d => {\n if (anim === 0)\n return start;\n if (anim === 1 || start.isAlmostEqual(end))\n return end;\n const startInverse = start.transpose();\n const diff = end.multiplyMatrixMatrix(startInverse);\n const angleAxis = diff.getAxisAndAngleOfRotation();\n // istanbul ignore else\n if (angleAxis.ok) {\n const angle = Angle.createRadians(angleAxis.angle.radians * CubeNavigationAid._animationFn(anim));\n const newDiff = Matrix3d.createRotationAroundVector(angleAxis.axis, angle);\n // istanbul ignore else\n if (newDiff) {\n const newMatrix = newDiff.multiplyMatrixMatrix(start);\n return newMatrix;\n }\n }\n // istanbul ignore next\n return end;\n };\n\n private static correctSmallNumber(value: number, tolerance: number): number {\n return Math.abs(value) < tolerance ? 0 : value;\n }\n\n /**\n * Snap coordinates of a vector to zero and to each other so that the vector prefers to be\n * * perpendicular to a face of the unit cube.\n * * or pass through a nearby vertex or edge of the unit cube.\n * @param zVector existing z vector.\n * @param tolerance tolerance to determine if a z vector component is close to zero or 1.\n */\n private static snapVectorToCubeFeatures(zVector: XYAndZ, tolerance: number): Vector3d {\n const x = CubeNavigationAid.correctSmallNumber(zVector.x, tolerance);\n let y = CubeNavigationAid.correctSmallNumber(zVector.y, tolerance);\n let z = CubeNavigationAid.correctSmallNumber(zVector.z, tolerance);\n\n const xx = Math.abs(x);\n const yy = Math.abs(y);\n const zz = Math.abs(z);\n\n // adjust any adjacent pair of near equal values to the first.\n // istanbul ignore next\n if (Geometry.isSameCoordinate(xx, yy, tolerance)) {\n y = Geometry.split3WaySign(y, -xx, xx, xx);\n }\n if (Geometry.isSameCoordinate(yy, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -yy, yy, yy);\n }\n if (Geometry.isSameCoordinate(xx, zz, tolerance)) {\n z = Geometry.split3WaySign(z, -xx, xx, xx);\n }\n return Vector3d.create(x, y, z);\n }\n\n /**\n * Adjust a worldToView matrix to favor both\n * * direct view at faces, edges, and corners of a view cube.\n * * heads up\n * @param worldToView candidate matrix\n * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected.\n * @param result optional result.\n */\n private static snapWorldToViewMatrixToCubeFeatures(worldToView: Matrix3d, tolerance: number, result?: Matrix3d): Matrix3d {\n const oldZ = worldToView.rowZ();\n const newZ = CubeNavigationAid.snapVectorToCubeFeatures(oldZ, tolerance);\n // If newZ is true up or down, it will have true 0 for x and y.\n // special case this to take x direction from the input.\n // istanbul ignore next\n if (newZ.x === 0.0 && newZ.y === 0) {\n const perpVector = worldToView.rowX();\n result = Matrix3d.createRigidFromColumns(newZ, perpVector, AxisOrder.ZXY, result)!;\n } else {\n result = Matrix3d.createRigidViewAxesZTowardsEye(newZ.x, newZ.y, newZ.z, result);\n }\n // istanbul ignore else\n if (result)\n result.transposeInPlace();\n return result;\n }\n\n private getArrowRotationAndFace(arrow: Pointer): { newRotation: Matrix3d, face: Face } {\n const localRotationAxis = Vector3d.create(0, 0, 0);\n switch (arrow) {\n case Pointer.Up:\n localRotationAxis.x = -1.0;\n break;\n case Pointer.Down:\n localRotationAxis.x = 1.0;\n break;\n case Pointer.Left:\n localRotationAxis.y = -1.0;\n break;\n default:\n localRotationAxis.y = 1.0;\n break;\n }\n const localRotation = Matrix3d.createRotationAroundVector(localRotationAxis, Angle.createDegrees(-90))!;\n const newRotation = localRotation.multiplyMatrixMatrix(this.state.endRotMatrix);\n CubeNavigationAid.snapWorldToViewMatrixToCubeFeatures(newRotation, DEFAULT_TOLERANCE, newRotation);\n const face = CubeNavigationAid._getMatrixFace(newRotation);\n return { newRotation, face };\n }\n\n private _onArrowClick = (arrow: Pointer) => {\n if (this._isInteractionLocked()) {\n // istanbul ignore next\n this.props.onAnimationEnd?.();\n return;\n }\n const { newRotation, face } = this.getArrowRotationAndFace(arrow);\n this._animateRotation(newRotation, face);\n };\n\n private getArrowTitle(arrow: Pointer) {\n const { face } = this.getArrowRotationAndFace(arrow);\n return this._labels[face];\n }\n\n private _lastClientXY: Vector2d = Vector2d.createZero();\n private _processDrag(mousePos: Vector2d) {\n // istanbul ignore else\n if (!this._start.isAlmostEqual(mousePos)) {\n const movement = mousePos.minus(this._lastClientXY);\n const diff = movement.scale(0.05);\n\n const yaw = Angle.createRadians(diff.x);\n const pitch = Angle.createRadians(diff.y);\n\n const matX = Matrix3d.createRotationAroundAxisIndex(AxisIndex.X, pitch);\n const matZ = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, yaw);\n\n const mat = matX.multiplyMatrixMatrix(this.state.startRotMatrix).multiplyMatrixMatrix(matZ);\n this._setRotation(mat, CubeNavigationAid._getMatrixFace(mat));\n if (!this.state.dragging)\n this.setState({ dragging: true });\n }\n this._lastClientXY = mousePos;\n }\n\n private _handleBoxMouseDown = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n event.preventDefault();\n // only start listening after drag is confirmed. Ie. the 3D box is clicked.\n window.addEventListener(\"mousemove\", this._onMouseMove, false);\n window.addEventListener(\"mouseup\", this._onMouseUp, false);\n this._lastClientXY = Vector2d.create(event.clientX, event.clientY);\n this._start = this._lastClientXY;\n };\n\n private _onMouseMove = (event: MouseEvent) => {\n const mousePos = Vector2d.create(event.clientX, event.clientY);\n this._processDrag(mousePos);\n };\n\n private _onMouseUp = () => {\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\n }\n\n // remove so event only triggers after this.onMouseStartDrag\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n window.removeEventListener(\"mouseup\", this._onMouseUp);\n };\n\n // istanbul ignore next - unable to test touch\n private _handleBoxTouchStart = (event: any) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n if (1 !== event.targetTouches.length)\n return;\n window.addEventListener(\"touchmove\", this._onTouchMove, false);\n window.addEventListener(\"touchend\", this._onTouchEnd, false);\n this._lastClientXY = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\n this._start = this._lastClientXY;\n };\n\n // istanbul ignore next - unable to test touch\n private _onTouchMove = (event: TouchEvent) => {\n if (1 !== event.targetTouches.length)\n return;\n const mousePos = Vector2d.create(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\n this._processDrag(mousePos);\n };\n\n // istanbul ignore next - unable to test touch\n private _onTouchEnd = (event: TouchEvent) => {\n if (0 !== event.targetTouches.length)\n return;\n\n if (this.state.dragging) {\n this.setState({ dragging: false });\n ViewportComponentEvents.setCubeMatrix(this.state.endRotMatrix, CubeNavigationAid._getMatrixFace(this.state.endRotMatrix), true);\n }\n\n window.removeEventListener(\"touchmove\", this._onTouchMove);\n window.removeEventListener(\"touchend\", this._onTouchEnd);\n };\n\n private _handleFaceCellClick = (pos: Vector3d, face: Face) => {\n if (this._isInteractionLocked()) {\n this.props.onAnimationEnd?.();\n return;\n }\n const { endRotMatrix } = this.state;\n let rotMatrix = Matrix3d.createRigidViewAxesZTowardsEye(pos.x, pos.y, pos.z).inverse();\n // istanbul ignore else\n if (rotMatrix) {\n // if isMatrixFace and user is clicking on top/bottom, the current matrix face must be top or bottom\n if (!CubeNavigationAid._isMatrixFace(endRotMatrix) && (face === Face.Top || face === Face.Bottom)) {\n const angleAxis = endRotMatrix.getAxisAndAngleOfRotation();\n // istanbul ignore else\n if (angleAxis.ok) {\n const xAx = endRotMatrix.columnX();\n const a = Math.atan2(xAx.y, xAx.x);\n const r = Math.round(a * 2 / Math.PI) * Math.PI / 2; // round to quarter turn intervals\n const rot = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, Angle.createRadians(r));\n rotMatrix = rot.multiplyMatrixMatrix(rotMatrix);\n }\n }\n this._animateRotation(rotMatrix, face);\n }\n window.removeEventListener(\"mousemove\", this._onMouseMove);\n };\n\n private _animateRotation = (endRotMatrix: Matrix3d, face: Face) => {\n if (this.state.endRotMatrix.isAlmostEqual(endRotMatrix))\n return;\n // set animation variables, let css transitions animate it.\n this._animationFrame = setTimeout(this._animation, 16.667);\n this.setState((prevState) => ({\n startRotMatrix: prevState.endRotMatrix, endRotMatrix,\n animation: 0,\n face,\n }));\n };\n\n private _setRotation = (endRotMatrix: Matrix3d, face: Face) => {\n ViewportComponentEvents.setCubeMatrix(endRotMatrix, face);\n // set variables, with animTime at 0 to prevent animation.\n this.setState({\n startRotMatrix: endRotMatrix,\n endRotMatrix,\n animation: 1,\n face,\n });\n };\n}\n\n/** @internal */\nexport interface NavCubeFaceProps extends React.AllHTMLAttributes<HTMLDivElement> {\n face: Face;\n label: string;\n hoverMap: { [key: string]: CubeHover };\n onFaceCellClick: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void;\n}\n\n/** @internal */\nexport class NavCubeFace extends React.Component<NavCubeFaceProps> {\n private includeCell(vector: Vector3d): boolean {\n const { x, y, z } = vector;\n const omittedCell = (y === 0 && x !== 0 && z !== 0) || (y !== 0 && x === 0 && z !== 0) || (y !== 0 && x !== 0 && z === 0);\n return !omittedCell;\n }\n public override render(): React.ReactNode {\n const { face, hoverMap, onFaceCellClick, onFaceCellHoverChange, label } = this.props;\n return (\n <div className=\"nav-cube-face\" data-testid=\"nav-cube-face\">\n {[-1, 0, 1].map((y: number) => {\n return (\n <FaceRow key={y} center={y === 0}>\n {[-1, 0, 1].map((x: number) => {\n const vector = NavCubeFace.faceCellToPos(face, x, y);\n if (this.includeCell(vector)) {\n // return a fully functional cell\n return (\n <FaceCell\n key={x}\n onFaceCellHoverChange={onFaceCellHoverChange}\n onFaceCellClick={onFaceCellClick}\n hoverMap={hoverMap}\n vector={vector}\n face={face}\n center={x === 0}>\n {x === 0 && y === 0 &&\n label}\n </FaceCell>\n );\n } else {\n // return a placeholder cell\n return (\n <FaceCell\n key={x}\n vector={vector}\n face={face}\n center={x === 0}/>\n );\n }\n })}\n </FaceRow>\n );\n })}\n </div>\n );\n }\n public static faceCellToPos = (face: Face, x: number, y: number) => {\n const faceVect = cubeNavigationFaceLocs[face];\n const route = cubeNavigationRoutes[face];\n\n const faceX = x < 0 ? route.left : x > 0 ? route.right : Face.None;\n const xVect = faceX !== Face.None ? cubeNavigationFaceLocs[faceX] : Vector3d.createZero();\n\n const faceY = y < 0 ? route.up : y > 0 ? route.down : Face.None;\n const yVect = faceY !== Face.None ? cubeNavigationFaceLocs[faceY] : Vector3d.createZero();\n\n return faceVect.plus(xVect).plus(yVect);\n };\n}\n\ninterface FaceRowProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n}\n\nclass FaceRow extends React.Component<FaceRowProps> {\n public override render(): React.ReactNode {\n const { center, children, ...props } = this.props;\n const classNames = classnames(\n \"face-row\",\n center && \"cube-center\",\n );\n return <div className={classNames} {...props}>{children}</div>;\n }\n}\n\n/** @internal */\nexport interface FaceCellProps extends React.AllHTMLAttributes<HTMLDivElement> {\n center?: boolean;\n onFaceCellClick?: (vector: Vector3d, face: Face) => void;\n onFaceCellHoverChange?: (vector: Vector3d, state: CubeHover) => void;\n hoverMap?: { [key: string]: CubeHover };\n vector: Vector3d;\n face: Face;\n}\n\n/** @internal */\nexport class FaceCell extends React.Component<FaceCellProps> {\n private _startMouse: Point2d | undefined;\n public override render(): React.ReactNode {\n const { center, children, onFaceCellClick, onFaceCellHoverChange, hoverMap, face, vector, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const { x, y, z } = vector;\n const n = `${x}-${y}-${z}`;\n const hover = hoverMap && hoverMap[n] === CubeHover.Hover;\n const active = hoverMap && hoverMap[n] === CubeHover.Active;\n const classNames = classnames(\n \"face-cell\",\n center && \"cube-center\",\n hover && \"cube-hover\",\n active && \"cube-active\",\n );\n\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\n return <div\n onMouseDown={this._handleMouseDown}\n onMouseUp={this._handleMouseUp}\n onMouseOver={this._handleMouseOver}\n onMouseOut={this._handleMouseOut}\n onTouchStart={this._handleTouchStart}\n onTouchEnd={this._handleTouchEnd}\n data-testid={`nav-cube-face-cell-${face}-${n}`}\n className={classNames}\n role=\"presentation\"\n {...props}\n >\n {children}\n </div>;\n }\n private _handleMouseOver = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.Hover);\n };\n private _handleMouseOut = () => {\n const { vector } = this.props;\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.None);\n };\n private _handleMouseDown = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerDown(clientX, clientY);\n };\n private _handleMouseUp = (event: React.MouseEvent) => {\n const { clientX, clientY } = event;\n this.handlePointerUp(clientX, clientY);\n };\n\n private _handleTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.targetTouches.length === 1 && this.handlePointerDown(event.targetTouches[0].clientX, event.targetTouches[0].clientY);\n };\n\n private _handleTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.changedTouches.length === 1 && this.handlePointerUp(event.changedTouches[0].clientX, event.changedTouches[0].clientY);\n };\n\n private handlePointerDown(x: number, y: number) {\n const { vector } = this.props;\n this._startMouse = Point2d.create(x, y);\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.Active);\n }\n\n private handlePointerUp(x: number, y: number) {\n const { vector, face } = this.props;\n this.props.onFaceCellHoverChange && this.props.onFaceCellHoverChange(vector, CubeHover.None);\n const mouse = Point2d.create(x, y);\n if (this._startMouse && this._startMouse.isAlmostEqual(mouse)) {\n const isFace = Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z) === 1;\n this.props.onFaceCellClick && this.props.onFaceCellClick(vector, isFace ? face : Face.None);\n }\n }\n}\n\nenum Pointer {\n None = 0,\n Up,\n Down,\n Left,\n Right,\n}\n\nconst pointerIconSpec: { [key: number]: IconSpec } = {\n [Pointer.Up]: <SvgCaretDown />,\n [Pointer.Down]: <SvgCaretUp />,\n [Pointer.Left]: <SvgCaretRight />,\n [Pointer.Right]: <SvgCaretLeft />,\n};\n\nconst pointerClass: { [key: number]: string } = {\n [Pointer.Up]: \"cube-up\",\n [Pointer.Down]: \"cube-down\",\n [Pointer.Left]: \"cube-left\",\n [Pointer.Right]: \"cube-right\",\n};\n\ninterface PointerProps extends React.AllHTMLAttributes<HTMLDivElement> {\n visible: boolean;\n pointerType: Pointer;\n onArrowClick(pointer: Pointer): void;\n title: string;\n [\"data-testid\"]?: string;\n}\n\nclass PointerButton extends React.Component<PointerProps> {\n public override render(): React.ReactNode {\n const { visible, pointerType, onArrowClick, title, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const classes = classnames(\n \"cube-pointer\", \"icon\",\n pointerClass[pointerType],\n visible && \"cube-visible\",\n );\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <div className={classes} role=\"button\" tabIndex={-1} title={title} {...props}\n onClick={this._handleClick}><Icon iconSpec={pointerIconSpec[pointerType]} /> </div>\n );\n }\n private _handleClick = (event: React.MouseEvent) => {\n const { pointerType } = this.props;\n event.preventDefault();\n this.props.onArrowClick(pointerType);\n };\n}\n"]}
@@ -1,182 +1,178 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
-
7
- $cube-outer-width: 96px;
8
- $button-width: 20px;
9
- $nav-cube-width: 64px;
10
- $nav-cube-side-width: 14px;
11
-
12
- $grad-start: $buic-background-1;
13
- $grad-end: $buic-background-4;
14
-
15
- $grad-start-highlight: $buic-background-2;
16
- $grad-end-highlight: $buic-background-5;
17
-
18
- $arrow-margin: -3px;
19
-
20
- .components-cube-container {
21
- position: relative;
22
- width: $cube-outer-width;
23
- height: $cube-outer-width;
24
-
25
- .cube-element-container {
26
- position: absolute;
27
- left: 0;
28
- top: 0;
29
- width: $cube-outer-width;
30
- height: $cube-outer-width;
31
- display: flex;
32
- justify-content: center;
33
- align-items: center;
34
-
35
- .nav-cube {
36
- width: $nav-cube-width;
37
- height: $nav-cube-width;
38
-
39
- .nav-cube-face {
40
- display: flex;
41
- flex-direction: column;
42
- width: 100%;
43
- height: 100%;
44
- font-size: var(--iui-font-size-1);
45
- font-weight: var(--iui-font-weight-semibold);
46
- color: $buic-text-color;
47
- box-shadow: inset 0px 0px 1px 0.2px #000;
48
-
49
- .face-row {
50
- display: flex;
51
- flex-direction: row;
52
- height: $nav-cube-side-width;
53
- width: 100%;
54
-
55
- &.cube-center {
56
- height: auto;
57
- flex-grow: 1;
58
- }
59
-
60
- .face-cell {
61
- cursor: pointer;
62
- user-select: none;
63
- width: $nav-cube-side-width;
64
-
65
- &.cube-center {
66
- width: auto;
67
- flex-grow: 1;
68
- }
69
-
70
- &.cube-hover {
71
- color: $buic-foreground-activehover;
72
- background: $buic-background-active-overlay;
73
- }
74
-
75
- &.cube-active {
76
- color: $buic-foreground-activehover;
77
- background: $buic-background-pressed-overlay;
78
- }
79
- }
80
-
81
- &.cube-center .face-cell.cube-center {
82
- display: flex;
83
- justify-content: center;
84
- align-items: center;
85
- }
86
- }
87
- }
88
-
89
- .cube-left,
90
- .cube-right,
91
- .cube-front,
92
- .cube-back {
93
- background: linear-gradient(#{$grad-start}, #{$grad-end});
94
- }
95
-
96
- .cube-top {
97
- background: $grad-start;
98
- }
99
-
100
- .cube-bottom {
101
- background: $grad-end;
102
- }
103
-
104
- &.cube-dragging {
105
- .face-row .face-cell {
106
- &.cube-hover,
107
- &.cube-active {
108
- background: transparent;
109
- }
110
- }
111
-
112
- .cube-left,
113
- .cube-right,
114
- .cube-front,
115
- .cube-back {
116
- background: linear-gradient(
117
- #{$grad-start-highlight},
118
- #{$grad-end-highlight}
119
- );
120
- }
121
-
122
- .cube-top {
123
- background: $grad-start-highlight;
124
- }
125
-
126
- .cube-bottom {
127
- background: $grad-end-highlight;
128
- }
129
- }
130
- }
131
- }
132
-
133
- .cube-pointer {
134
- position: absolute;
135
- height: $button-width;
136
- width: $button-width;
137
- font-size: $button-width;
138
- color: $buic-background-2;
139
- text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
140
- cursor: pointer;
141
-
142
- &:not(.cube-visible) {
143
- display: none;
144
- }
145
-
146
- &:hover {
147
- color: $buic-row-selection;
148
- }
149
-
150
- &:focus {
151
- outline: none;
152
- }
153
-
154
- &.cube-up {
155
- margin: $arrow-margin auto;
156
- left: 0px;
157
- right: 0px;
158
- top: 0px;
159
- }
160
-
161
- &.cube-down {
162
- margin: $arrow-margin auto;
163
- left: 0px;
164
- right: 0px;
165
- bottom: 0px;
166
- }
167
-
168
- &.cube-left {
169
- margin: auto $arrow-margin;
170
- top: 0px;
171
- bottom: 0px;
172
- left: 0px;
173
- }
174
-
175
- &.cube-right {
176
- margin: auto $arrow-margin;
177
- top: 0px;
178
- bottom: 0px;
179
- right: 0px;
180
- }
181
- }
182
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
+
7
+ $cube-outer-width: 96px;
8
+ $button-width: 20px;
9
+ $nav-cube-width: 64px;
10
+ $nav-cube-side-width: 14px;
11
+
12
+ $grad-start: var(--iui-color-background);
13
+ $grad-end: var(--iui-color-background-zebra);
14
+
15
+ $arrow-margin: -3px;
16
+
17
+ .components-cube-container {
18
+ position: relative;
19
+ width: $cube-outer-width;
20
+ height: $cube-outer-width;
21
+
22
+ .cube-element-container {
23
+ position: absolute;
24
+ left: 0;
25
+ top: 0;
26
+ width: $cube-outer-width;
27
+ height: $cube-outer-width;
28
+ display: flex;
29
+ justify-content: center;
30
+ align-items: center;
31
+
32
+ .nav-cube {
33
+ width: $nav-cube-width;
34
+ height: $nav-cube-width;
35
+
36
+ .nav-cube-face {
37
+ display: flex;
38
+ flex-direction: column;
39
+ width: 100%;
40
+ height: 100%;
41
+ font-size: var(--iui-font-size-1);
42
+ font-weight: var(--iui-font-weight-semibold);
43
+ color: var(--iui-color-text);
44
+ box-shadow: inset 0px 0px 1px 0.2px var(--iui-color-border);
45
+
46
+ .face-row {
47
+ display: flex;
48
+ flex-direction: row;
49
+ height: $nav-cube-side-width;
50
+ width: 100%;
51
+
52
+ &.cube-center {
53
+ height: auto;
54
+ flex-grow: 1;
55
+ }
56
+
57
+ .face-cell {
58
+ cursor: pointer;
59
+ user-select: none;
60
+ width: $nav-cube-side-width;
61
+
62
+ &.cube-center {
63
+ width: auto;
64
+ flex-grow: 1;
65
+ }
66
+
67
+ &.cube-hover {
68
+ height: auto;
69
+ background-color: var(--iui-color-background-accent-muted);
70
+ }
71
+
72
+ &.cube-active {
73
+ background-color: var(--iui-color-background-accent-muted);
74
+ }
75
+ }
76
+
77
+ &.cube-center .face-cell.cube-center {
78
+ display: flex;
79
+ justify-content: center;
80
+ align-items: center;
81
+ }
82
+ }
83
+ }
84
+
85
+ .cube-left,
86
+ .cube-right,
87
+ .cube-front,
88
+ .cube-back {
89
+ background: linear-gradient(#{$grad-start}, #{$grad-end});
90
+ }
91
+
92
+ .cube-top {
93
+ background: $grad-start;
94
+ }
95
+
96
+ .cube-bottom {
97
+ background: $grad-end;
98
+ }
99
+
100
+ &.cube-dragging {
101
+ .face-row .face-cell {
102
+ &.cube-hover,
103
+ &.cube-active {
104
+ background: transparent;
105
+ }
106
+ }
107
+
108
+ .cube-left,
109
+ .cube-right,
110
+ .cube-front,
111
+ .cube-back {
112
+ background: linear-gradient(
113
+ var(--iui-color-background),
114
+ var(--iui-color-background-backdrop)
115
+ );
116
+ }
117
+
118
+ .cube-top {
119
+ background: var(--iui-color-background);
120
+ }
121
+
122
+ .cube-bottom {
123
+ background: var(--iui-color-background-backdrop);
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ .cube-pointer {
130
+ position: absolute;
131
+ height: $button-width;
132
+ width: $button-width;
133
+ font-size: $button-width;
134
+ color: var(--iui-color-background);
135
+ text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
136
+ cursor: pointer;
137
+
138
+ &:not(.cube-visible) {
139
+ display: none;
140
+ }
141
+
142
+ &:hover {
143
+ color: var(--iui-color-background-hover);
144
+ }
145
+
146
+ &:focus {
147
+ outline: none;
148
+ }
149
+
150
+ &.cube-up {
151
+ margin: $arrow-margin auto;
152
+ left: 0px;
153
+ right: 0px;
154
+ top: 0px;
155
+ }
156
+
157
+ &.cube-down {
158
+ margin: $arrow-margin auto;
159
+ left: 0px;
160
+ right: 0px;
161
+ bottom: 0px;
162
+ }
163
+
164
+ &.cube-left {
165
+ margin: auto $arrow-margin;
166
+ top: 0px;
167
+ bottom: 0px;
168
+ left: 0px;
169
+ }
170
+
171
+ &.cube-right {
172
+ margin: auto $arrow-margin;
173
+ top: 0px;
174
+ bottom: 0px;
175
+ right: 0px;
176
+ }
177
+ }
178
+ }