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

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