@itwin/appui-react 5.3.0 → 5.4.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 (232) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/lib/appui-react/UiFramework.d.ts +6 -2
  3. package/lib/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/appui-react/UiFramework.js +29 -2
  5. package/lib/appui-react/UiFramework.js.map +1 -1
  6. package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  7. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js +4 -4
  8. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  9. package/lib/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
  10. package/lib/appui-react/accudraw/AccuDrawPopupManager.js +10 -6
  11. package/lib/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
  12. package/lib/appui-react/accudraw/Calculator.js +2 -2
  13. package/lib/appui-react/accudraw/Calculator.js.map +1 -1
  14. package/lib/appui-react/childwindow/ChildWindowRenderer.d.ts +2 -0
  15. package/lib/appui-react/childwindow/ChildWindowRenderer.d.ts.map +1 -1
  16. package/lib/appui-react/childwindow/ChildWindowRenderer.js +15 -10
  17. package/lib/appui-react/childwindow/ChildWindowRenderer.js.map +1 -1
  18. package/lib/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  19. package/lib/appui-react/childwindow/InternalChildWindowManager.js +8 -0
  20. package/lib/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  21. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts +23 -1
  22. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  23. package/lib/appui-react/configurableui/ConfigurableUiContent.js +20 -12
  24. package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  25. package/lib/appui-react/content/ContentLayout.d.ts.map +1 -1
  26. package/lib/appui-react/content/ContentLayout.js +10 -11
  27. package/lib/appui-react/content/ContentLayout.js.map +1 -1
  28. package/lib/appui-react/content/ContentOverlay.d.ts +1 -0
  29. package/lib/appui-react/content/ContentOverlay.d.ts.map +1 -1
  30. package/lib/appui-react/content/ContentOverlay.js +3 -1
  31. package/lib/appui-react/content/ContentOverlay.js.map +1 -1
  32. package/lib/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  33. package/lib/appui-react/content/FloatingViewportContent.js +1 -1
  34. package/lib/appui-react/content/FloatingViewportContent.js.map +1 -1
  35. package/lib/appui-react/cursor/CursorInformation.d.ts +4 -1
  36. package/lib/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  37. package/lib/appui-react/cursor/CursorInformation.js +6 -1
  38. package/lib/appui-react/cursor/CursorInformation.js.map +1 -1
  39. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts +1 -24
  40. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  41. package/lib/appui-react/cursor/cursormenu/CursorMenu.js +37 -58
  42. package/lib/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  43. package/lib/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  44. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +8 -22
  45. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  46. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js +109 -116
  47. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  48. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +12 -15
  49. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  50. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +85 -48
  51. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  52. package/lib/appui-react/framework/FrameworkFrontstages.d.ts +47 -0
  53. package/lib/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  54. package/lib/appui-react/framework/FrameworkFrontstages.js +136 -0
  55. package/lib/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  56. package/lib/appui-react/framework/FrameworkVisibility.d.ts +2 -0
  57. package/lib/appui-react/framework/FrameworkVisibility.d.ts.map +1 -1
  58. package/lib/appui-react/framework/FrameworkVisibility.js.map +1 -1
  59. package/lib/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  60. package/lib/appui-react/frontstage/InternalFrontstageManager.js +121 -115
  61. package/lib/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  62. package/lib/appui-react/hooks/useActiveTool.d.ts +9 -0
  63. package/lib/appui-react/hooks/useActiveTool.d.ts.map +1 -0
  64. package/lib/appui-react/hooks/useActiveTool.js +23 -0
  65. package/lib/appui-react/hooks/useActiveTool.js.map +1 -0
  66. package/lib/appui-react/icons/SvgAngle.d.ts +7 -0
  67. package/lib/appui-react/icons/SvgAngle.d.ts.map +1 -0
  68. package/lib/appui-react/icons/SvgAngle.js +15 -0
  69. package/lib/appui-react/icons/SvgAngle.js.map +1 -0
  70. package/lib/appui-react/icons/SvgBackspace.d.ts +7 -0
  71. package/lib/appui-react/icons/SvgBackspace.d.ts.map +1 -0
  72. package/lib/appui-react/icons/SvgBackspace.js +14 -0
  73. package/lib/appui-react/icons/SvgBackspace.js.map +1 -0
  74. package/lib/appui-react/icons/SvgDistance.d.ts +7 -0
  75. package/lib/appui-react/icons/SvgDistance.d.ts.map +1 -0
  76. package/lib/appui-react/icons/SvgDistance.js +16 -0
  77. package/lib/appui-react/icons/SvgDistance.js.map +1 -0
  78. package/lib/appui-react/icons/SvgHeight.d.ts +7 -0
  79. package/lib/appui-react/icons/SvgHeight.d.ts.map +1 -0
  80. package/lib/appui-react/icons/SvgHeight.js +17 -0
  81. package/lib/appui-react/icons/SvgHeight.js.map +1 -0
  82. package/lib/appui-react/icons/SvgMouseClickLeftDrag.d.ts +7 -0
  83. package/lib/appui-react/icons/SvgMouseClickLeftDrag.d.ts.map +1 -0
  84. package/lib/appui-react/icons/SvgMouseClickLeftDrag.js +15 -0
  85. package/lib/appui-react/icons/SvgMouseClickLeftDrag.js.map +1 -0
  86. package/lib/appui-react/icons/SvgMouseClickRightDrag.d.ts +7 -0
  87. package/lib/appui-react/icons/SvgMouseClickRightDrag.d.ts.map +1 -0
  88. package/lib/appui-react/icons/SvgMouseClickRightDrag.js +15 -0
  89. package/lib/appui-react/icons/SvgMouseClickRightDrag.js.map +1 -0
  90. package/lib/appui-react/icons/SvgMouseClickWheelDrag.d.ts +7 -0
  91. package/lib/appui-react/icons/SvgMouseClickWheelDrag.d.ts.map +1 -0
  92. package/lib/appui-react/icons/SvgMouseClickWheelDrag.js +15 -0
  93. package/lib/appui-react/icons/SvgMouseClickWheelDrag.js.map +1 -0
  94. package/lib/appui-react/icons/SvgTouchCursorPan.d.ts +7 -0
  95. package/lib/appui-react/icons/SvgTouchCursorPan.d.ts.map +1 -0
  96. package/lib/appui-react/icons/SvgTouchCursorPan.js +15 -0
  97. package/lib/appui-react/icons/SvgTouchCursorPan.js.map +1 -0
  98. package/lib/appui-react/icons/SvgTouchCursorPoint.d.ts +7 -0
  99. package/lib/appui-react/icons/SvgTouchCursorPoint.d.ts.map +1 -0
  100. package/lib/appui-react/icons/SvgTouchCursorPoint.js +16 -0
  101. package/lib/appui-react/icons/SvgTouchCursorPoint.js.map +1 -0
  102. package/lib/appui-react/layout/StandardLayout.scss +3 -8
  103. package/lib/appui-react/layout/base/DragManager.d.ts.map +1 -1
  104. package/lib/appui-react/layout/base/DragManager.js +10 -15
  105. package/lib/appui-react/layout/base/DragManager.js.map +1 -1
  106. package/lib/appui-react/layout/state/NineZoneAction.d.ts +1 -0
  107. package/lib/appui-react/layout/state/NineZoneAction.d.ts.map +1 -1
  108. package/lib/appui-react/layout/state/NineZoneAction.js.map +1 -1
  109. package/lib/appui-react/layout/state/NineZoneStateReducer.d.ts.map +1 -1
  110. package/lib/appui-react/layout/state/NineZoneStateReducer.js +23 -16
  111. package/lib/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
  112. package/lib/appui-react/layout/widget/NavigationArea.d.ts +1 -2
  113. package/lib/appui-react/layout/widget/NavigationArea.d.ts.map +1 -1
  114. package/lib/appui-react/layout/widget/NavigationArea.js +2 -3
  115. package/lib/appui-react/layout/widget/NavigationArea.js.map +1 -1
  116. package/lib/appui-react/layout/widget/NavigationArea.scss +16 -4
  117. package/lib/appui-react/layout/widget/ToolsArea.d.ts +1 -2
  118. package/lib/appui-react/layout/widget/ToolsArea.d.ts.map +1 -1
  119. package/lib/appui-react/layout/widget/ToolsArea.js +2 -3
  120. package/lib/appui-react/layout/widget/ToolsArea.js.map +1 -1
  121. package/lib/appui-react/layout/widget/ToolsArea.scss +10 -4
  122. package/lib/appui-react/shared/MenuItem.d.ts +3 -0
  123. package/lib/appui-react/shared/MenuItem.d.ts.map +1 -1
  124. package/lib/appui-react/shared/MenuItem.js +2 -3
  125. package/lib/appui-react/shared/MenuItem.js.map +1 -1
  126. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +2 -55
  127. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  128. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +333 -403
  129. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  130. package/lib/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  131. package/lib/appui-react/toolbar/Toolbar.js +4 -3
  132. package/lib/appui-react/toolbar/Toolbar.js.map +1 -1
  133. package/lib/appui-react/toolbar/new-toolbars/ActionItem.d.ts.map +1 -1
  134. package/lib/appui-react/toolbar/new-toolbars/ActionItem.js +3 -0
  135. package/lib/appui-react/toolbar/new-toolbars/ActionItem.js.map +1 -1
  136. package/lib/appui-react/toolbar/new-toolbars/GroupItem.d.ts.map +1 -1
  137. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js +2 -0
  138. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js.map +1 -1
  139. package/lib/appui-react/toolbar/new-toolbars/Toolbar.d.ts +6 -3
  140. package/lib/appui-react/toolbar/new-toolbars/Toolbar.d.ts.map +1 -1
  141. package/lib/appui-react/toolbar/new-toolbars/Toolbar.js +4 -3
  142. package/lib/appui-react/toolbar/new-toolbars/Toolbar.js.map +1 -1
  143. package/lib/appui-react/utils/InternalUiShowHideManager.d.ts +2 -0
  144. package/lib/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  145. package/lib/appui-react/utils/InternalUiShowHideManager.js +6 -0
  146. package/lib/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  147. package/lib/appui-react/widget-panels/Frontstage.d.ts +7 -2
  148. package/lib/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  149. package/lib/appui-react/widget-panels/Frontstage.js +29 -12
  150. package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
  151. package/lib/appui-react/widgets/BackstageAppButton.scss +8 -3
  152. package/lib/appui-react.d.ts +1 -1
  153. package/lib/appui-react.d.ts.map +1 -1
  154. package/lib/appui-react.js +1 -1
  155. package/lib/appui-react.js.map +1 -1
  156. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  157. package/lib/cjs/appui-react/layout/StandardLayout.scss +3 -8
  158. package/lib/cjs/appui-react/layout/widget/NavigationArea.scss +16 -4
  159. package/lib/cjs/appui-react/layout/widget/ToolsArea.scss +10 -4
  160. package/lib/cjs/appui-react/widgets/BackstageAppButton.scss +8 -3
  161. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  162. package/lib/esm/appui-react/layout/StandardLayout.scss +3 -8
  163. package/lib/esm/appui-react/layout/widget/NavigationArea.scss +16 -4
  164. package/lib/esm/appui-react/layout/widget/ToolsArea.scss +10 -4
  165. package/lib/esm/appui-react/widgets/BackstageAppButton.scss +8 -3
  166. package/package.json +8 -10
  167. package/lib/appui-react/accudraw/angle.svg +0 -1
  168. package/lib/appui-react/accudraw/backspace.svg +0 -9
  169. package/lib/appui-react/accudraw/constraint-2d.svg +0 -11
  170. package/lib/appui-react/accudraw/distance.svg +0 -1
  171. package/lib/appui-react/accudraw/height-2.svg +0 -10
  172. package/lib/appui-react/accudraw/height.svg +0 -11
  173. package/lib/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  174. package/lib/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  175. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  176. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  177. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  178. package/lib/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  179. package/lib/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  180. package/lib/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  181. package/lib/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  182. package/lib/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  183. package/lib/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  184. package/lib/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  185. package/lib/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  186. package/lib/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  187. package/lib/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  188. package/lib/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
  189. package/lib/cjs/appui-react/accudraw/angle.svg +0 -1
  190. package/lib/cjs/appui-react/accudraw/backspace.svg +0 -9
  191. package/lib/cjs/appui-react/accudraw/constraint-2d.svg +0 -11
  192. package/lib/cjs/appui-react/accudraw/distance.svg +0 -1
  193. package/lib/cjs/appui-react/accudraw/height-2.svg +0 -10
  194. package/lib/cjs/appui-react/accudraw/height.svg +0 -11
  195. package/lib/cjs/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  196. package/lib/cjs/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  197. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  198. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  199. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  200. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  201. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  202. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  203. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  204. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  205. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  206. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  207. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  208. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  209. package/lib/cjs/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  210. package/lib/cjs/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
  211. package/lib/esm/appui-react/accudraw/angle.svg +0 -1
  212. package/lib/esm/appui-react/accudraw/backspace.svg +0 -9
  213. package/lib/esm/appui-react/accudraw/constraint-2d.svg +0 -11
  214. package/lib/esm/appui-react/accudraw/distance.svg +0 -1
  215. package/lib/esm/appui-react/accudraw/height-2.svg +0 -10
  216. package/lib/esm/appui-react/accudraw/height.svg +0 -11
  217. package/lib/esm/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  218. package/lib/esm/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  219. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  220. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  221. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  222. package/lib/esm/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  223. package/lib/esm/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  224. package/lib/esm/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  225. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  226. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  227. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  228. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  229. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  230. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  231. package/lib/esm/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  232. package/lib/esm/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,OAAS;IACZ,IAAI,MAAS;IACb,KAAK,KAAS;IACd,MAAM,IAAS;CAChB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,IAAI;IACR,GAAG,OAA2B;IAC9B,IAAI,MAA4B;IAChC,KAAK,KAA6B;IAClC,MAAM,IAA8B;IACpC,OAAO,OAAuD;IAC9D,QAAQ,OAAwD;IAChE,UAAU,MAA0D;IACpE,WAAW,KAA2D;CACvE;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;;GAGG;AAEH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAG;AAE1E;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAsB;IACpD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CACD;IAE9B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgC;IAEhE,2BAA2B;IAC3B,WAAkB,cAAc,IAAI,KAAK,CAExC;IACD,WAAkB,cAAc,CAAC,EAAE,EAAE,KAAK,EAEzC;IAED,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IAED,kDAAkD;IAClD,WAAkB,eAAe,IAAI,eAAe,CAEnD;IAED,uCAAuC;IAEvC,gBAAuB,oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAcjD,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAW9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAuB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiBxC,gEAAgE;WAClD,sCAAsC,CAClD,eAAe,EAAE,eAAe,GAC/B,gBAAgB;IAiCnB,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB;oBACpB,OAAO;uBACJ,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;GAU5C,CAAC"}
1
+ {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mapp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oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI;IAetE,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAW9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAuB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiBxC,gEAAgE;WAClD,sCAAsC,CAClD,eAAe,EAAE,eAAe,GAC/B,gBAAgB;IAiCnB,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB;oBACpB,OAAO;uBACJ,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;GAU5C,CAAC"}
@@ -64,11 +64,16 @@ export class CursorInformation {
64
64
  static get cursorDirection() {
65
65
  return this._cursorDirection;
66
66
  }
67
+ /** Gets the cursor document. */
68
+ static get cursorDocument() {
69
+ return this._cursorDocument;
70
+ }
67
71
  /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */
68
- static handleMouseMove(point) {
72
+ static handleMouseMove(point, document) {
69
73
  const oldPt = CursorInformation.cursorPosition;
70
74
  const direction = this._determineMostFrequentDirection(this._cursorDirections, this._cursorPosition, Point.create(point));
71
75
  this.cursorPosition = point;
76
+ this._cursorDocument = document;
72
77
  this._cursorDirection = direction;
73
78
  this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });
74
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,M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B,CAAC,OAAO,CAAC;gBAC5C,MAAM;YACR,KAAK,eAAe,CAAC,QAAQ;gBAC3B,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC;gBAC7C,MAAM;YACR,KAAK,eAAe,CAAC,UAAU;gBAC7B,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,CAAC;gBAC/C,MAAM;YACR,KAAK,eAAe,CAAC,WAAW;gBAC9B,gBAAgB,GAAG,gBAAgB,CAAC,WAAW,CAAC;gBAChD,MAAM;QACV,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,qBAAqB;QACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;;AAzIc,iCAAe,GAAU,IAAI,KAAK,EAAE,CAAC;AACrC,kCAAgB,GAC7B,eAAe,CAAC,WAAW,CAAC;AAEf,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAwBhE,uCAAuC;AACvC,4DAA4D;AACrC,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AA8GzE;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAG5C,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACX,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,CAAC,OAAgB,EAAE,EAAE;QACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACZ,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;YACvB,KAAK,CAAC,cAAc,GAAG,OAAO,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC,CAAC","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 Cursor\n */\n\nimport { create } from \"zustand\";\nimport { produce } from \"immer\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react/internal\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: XAndY;\n newPt: XAndY;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): XAndY {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: XAndY) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: XAndY): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n\n/** Returns additional information about cursor.\n * @internal\n */\nexport const useCursorInformationStore = create<{\n contentHovered: boolean;\n setContentHovered: (hovered: boolean) => void;\n}>((set) => ({\n contentHovered: false,\n setContentHovered: (hovered: boolean) => {\n set((state) =>\n produce(state, (draft) => {\n draft.contentHovered = hovered;\n })\n );\n },\n}));\n"]}
1
+ {"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,KAApB,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K,eAAe,CAAC,QAAQ;gBAC3B,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC;gBAC7C,MAAM;YACR,KAAK,eAAe,CAAC,UAAU;gBAC7B,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,CAAC;gBAC/C,MAAM;YACR,KAAK,eAAe,CAAC,WAAW;gBAC9B,gBAAgB,GAAG,gBAAgB,CAAC,WAAW,CAAC;gBAChD,MAAM;QACV,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,qBAAqB;QACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;;AAhJc,iCAAe,GAAU,IAAI,KAAK,EAAE,CAAC;AAErC,kCAAgB,GAC7B,eAAe,CAAC,WAAW,CAAC;AAEf,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AA6BhE,uCAAuC;AACvC,4DAA4D;AACrC,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AA+GzE;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAG5C,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACX,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,CAAC,OAAgB,EAAE,EAAE;QACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACZ,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;YACvB,KAAK,CAAC,cAAc,GAAG,OAAO,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC,CAAC","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 Cursor\n */\n\nimport { create } from \"zustand\";\nimport { produce } from \"immer\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react/internal\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: XAndY;\n newPt: XAndY;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDocument: Document | undefined;\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): XAndY {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: XAndY) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the cursor document. */\n public static get cursorDocument(): Document | undefined {\n return this._cursorDocument;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: XAndY, document?: Document): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDocument = document;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n\n/** Returns additional information about cursor.\n * @internal\n */\nexport const useCursorInformationStore = create<{\n contentHovered: boolean;\n setContentHovered: (hovered: boolean) => void;\n}>((set) => ({\n contentHovered: false,\n setContentHovered: (hovered: boolean) => {\n set((state) =>\n produce(state, (draft) => {\n draft.contentHovered = hovered;\n })\n );\n },\n}));\n"]}
@@ -3,31 +3,8 @@
3
3
  */
4
4
  import * as React from "react";
5
5
  import type { CommonProps } from "@itwin/core-react";
6
- import type { CursorMenuItemProps } from "../../shared/MenuItem.js";
7
- /** State for [[CursorPopupMenu]] component
8
- * @alpha
9
- */
10
- interface CursorPopupMenuState {
11
- menuX: number;
12
- menuY: number;
13
- menuVisible: boolean;
14
- items?: CursorMenuItemProps[];
15
- }
16
6
  /** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.
17
7
  * @alpha
18
8
  */
19
- export declare class CursorPopupMenu extends React.PureComponent<CommonProps, // eslint-disable-line @typescript-eslint/no-deprecated
20
- CursorPopupMenuState> {
21
- private _isMounted;
22
- private _hostChildWindowId?;
23
- readonly state: CursorPopupMenuState;
24
- private _handleSyncUiEvent;
25
- componentDidMount(): void;
26
- componentWillUnmount(): void;
27
- private _handleRefSet;
28
- render(): React.ReactNode;
29
- private _hideContextMenu;
30
- private _itemPicked;
31
- }
32
- export {};
9
+ export declare function CursorPopupMenu(props: CommonProps): React.JSX.Element;
33
10
  //# sourceMappingURL=CursorMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CursorMenu.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMpE;;GAEG;AACH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK,CAAC,aAAa,CACtD,WAAW,EAAE,uDAAuD;AACpE,oBAAoB,CACrB;IACC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAEpC,SAAyB,KAAK,EAAE,oBAAoB,CAKlD;IAEF,OAAO,CAAC,kBAAkB,CAuBxB;IAEc,iBAAiB;IAKjB,oBAAoB;IAKpC,OAAO,CAAC,aAAa,CAQnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA+BzC,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,WAAW,CAEjB;CACH"}
1
+ {"version":3,"file":"CursorMenu.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASrD;;GAEG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,qBA0EjD"}
@@ -15,66 +15,45 @@ import { Logger } from "@itwin/core-bentley";
15
15
  /** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.
16
16
  * @alpha
17
17
  */
18
- export class CursorPopupMenu extends React.PureComponent {
19
- constructor() {
20
- super(...arguments);
21
- this._isMounted = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called
22
- this.state = {
23
- menuX: 0,
24
- menuY: 0,
25
- menuVisible: false,
26
- items: undefined,
27
- };
28
- this._handleSyncUiEvent = (args) => {
29
- if (!this._isMounted)
30
- return;
31
- if (SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [
18
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
19
+ export function CursorPopupMenu(props) {
20
+ const windowIdRef = React.useRef();
21
+ const [opened, setOpened] = React.useState(false);
22
+ const [x, setX] = React.useState(0);
23
+ const [y, setY] = React.useState(0);
24
+ const [items, setItems] = React.useState(undefined);
25
+ React.useEffect(() => {
26
+ return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {
27
+ if (!SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [
32
28
  // eslint-disable-next-line @typescript-eslint/no-deprecated
33
29
  SessionStateActionId.UpdateCursorMenu,
34
- ])) {
35
- const menuData = UiFramework.getCursorMenuData();
36
- if (menuData && this._hostChildWindowId === menuData.childWindowId) {
37
- this.setState({
38
- menuVisible: menuData.items && menuData.items.length > 0,
39
- items: menuData.items,
40
- menuX: menuData.position.x,
41
- menuY: menuData.position.y,
42
- });
43
- }
44
- else {
45
- this.setState({ menuVisible: false, items: undefined });
46
- }
30
+ ]))
31
+ return;
32
+ const menuData = UiFramework.getCursorMenuData();
33
+ const windowId = windowIdRef.current;
34
+ if (!menuData || windowId !== menuData.childWindowId) {
35
+ setOpened(false);
36
+ setItems(undefined);
37
+ return;
47
38
  }
48
- };
49
- this._handleRefSet = (popupDiv) => {
50
- const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;
51
- // if the window is not a pop out set to undefined
52
- this._hostChildWindowId = UiFramework.childWindows.findId(parentWindow);
53
- Logger.logInfo(UiFramework.loggerCategory("UiFramework"), `Cursor Menu for ${this._hostChildWindowId ?? "main"} window`);
54
- };
55
- this._hideContextMenu = () => {
56
- this.setState({ menuVisible: false });
57
- };
58
- this._itemPicked = () => {
59
- this._hideContextMenu();
60
- };
61
- }
62
- componentDidMount() {
63
- this._isMounted = true;
64
- SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);
65
- }
66
- componentWillUnmount() {
67
- this._isMounted = false;
68
- SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);
69
- }
70
- render() {
71
- const { menuX, menuY, items, menuVisible } = this.state;
72
- const onClose = this._hideContextMenu;
73
- return (React.createElement("div", { className: "uifw-cursor-menu-container-div", ref: this._handleRefSet }, items && items.length > 0 && menuVisible && (
74
- // eslint-disable-next-line @typescript-eslint/no-deprecated
75
- React.createElement(GlobalContextMenu, { className: this.props.className, style: this.props.style, identifier: "cursor-popup-menu", x: menuX, y: menuY, opened: menuVisible, onEsc: onClose, onOutsideClick: onClose, edgeLimit: false, autoflip: true }, MenuItemHelpers.createMenuItemNodes(
76
- // eslint-disable-next-line @typescript-eslint/no-deprecated
77
- MenuItemHelpers.createMenuItems(items, this._itemPicked))))));
78
- }
39
+ setOpened(menuData.items && menuData.items.length > 0);
40
+ setItems(menuData.items);
41
+ setX(menuData.position.x);
42
+ setY(menuData.position.y);
43
+ });
44
+ }, []);
45
+ const onClose = () => {
46
+ setOpened(false);
47
+ };
48
+ return (React.createElement("div", { className: "uifw-cursor-menu-container-div", ref: (el) => {
49
+ const parentWindow = el?.ownerDocument.defaultView ?? undefined;
50
+ const windowId = UiFramework.childWindows.findId(parentWindow);
51
+ windowIdRef.current = windowId;
52
+ Logger.logInfo(UiFramework.loggerCategory("UiFramework"), `Cursor Menu for ${windowId ?? "main"} window`);
53
+ } }, items && items.length > 0 && opened && (
54
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
55
+ React.createElement(GlobalContextMenu, { className: props.className, style: props.style, identifier: "cursor-popup-menu", x: x, y: y, opened: opened, onEsc: onClose, onOutsideClick: onClose, edgeLimit: false, autoflip: true }, MenuItemHelpers.createMenuItemNodes(
56
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
57
+ MenuItemHelpers.createMenuItems(items, onClose))))));
79
58
  }
80
59
  //# sourceMappingURL=CursorMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CursorMenu.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC,CAAC,kBAAkB;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAY7C;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,aAG1C;IAHD;;QAIU,eAAU,GAAG,KAAK,CAAC,CAAC,mGAAmG;QAGtG,UAAK,GAAyB;YACrD,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,KAAK;YAClB,KAAK,EAAE,SAAS;SACjB,CAAC;QAEM,uBAAkB,GAEtB,CAAC,IAAI,EAA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,CAAC;CASF","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 Cursor\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ListenerType } from \"@itwin/core-react/internal\";\nimport { GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\nimport { SessionStateActionId } from \"../../redux/SessionState.js\";\nimport type { CursorMenuItemProps } from \"../../shared/MenuItem.js\";\nimport { MenuItemHelpers } from \"../../shared/MenuItem.js\";\nimport { SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher.js\";\nimport { UiFramework } from \"../../UiFramework.js\";\nimport { Logger } from \"@itwin/core-bentley\";\n\n/** State for [[CursorPopupMenu]] component\n * @alpha\n */\ninterface CursorPopupMenuState {\n menuX: number;\n menuY: number;\n menuVisible: boolean;\n items?: CursorMenuItemProps[];\n}\n\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\n * @alpha\n */\nexport class CursorPopupMenu extends React.PureComponent<\n CommonProps, // eslint-disable-line @typescript-eslint/no-deprecated\n CursorPopupMenuState\n> {\n private _isMounted = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\n private _hostChildWindowId?: string;\n\n public override readonly state: CursorPopupMenuState = {\n menuX: 0,\n menuY: 0,\n menuVisible: false,\n items: undefined,\n };\n\n private _handleSyncUiEvent: ListenerType<\n typeof SyncUiEventDispatcher.onSyncUiEvent\n > = (args) => {\n if (!this._isMounted) return;\n\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n SessionStateActionId.UpdateCursorMenu,\n ])\n ) {\n const menuData = UiFramework.getCursorMenuData();\n if (menuData && this._hostChildWindowId === menuData.childWindowId) {\n this.setState({\n menuVisible: menuData.items && menuData.items.length > 0,\n items: menuData.items as CursorMenuItemProps[],\n menuX: menuData.position.x,\n menuY: menuData.position.y,\n });\n } else {\n this.setState({ menuVisible: false, items: undefined });\n }\n }\n };\n\n public override componentDidMount() {\n this._isMounted = true;\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\n }\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;\n // if the window is not a pop out set to undefined\n this._hostChildWindowId = UiFramework.childWindows.findId(parentWindow);\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiFramework\"),\n `Cursor Menu for ${this._hostChildWindowId ?? \"main\"} window`\n );\n };\n\n public override render(): React.ReactNode {\n const { menuX, menuY, items, menuVisible } = this.state;\n const onClose = this._hideContextMenu;\n\n return (\n <div className=\"uifw-cursor-menu-container-div\" ref={this._handleRefSet}>\n {items && items.length > 0 && menuVisible && (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <GlobalContextMenu\n className={this.props.className}\n style={this.props.style}\n identifier=\"cursor-popup-menu\"\n x={menuX}\n y={menuY}\n opened={menuVisible}\n onEsc={onClose}\n onOutsideClick={onClose}\n edgeLimit={false}\n autoflip={true}\n >\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n {MenuItemHelpers.createMenuItemNodes(\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuItemHelpers.createMenuItems(items, this._itemPicked)\n )}\n </GlobalContextMenu>\n )}\n </div>\n );\n }\n\n private _hideContextMenu = () => {\n this.setState({ menuVisible: false });\n };\n\n private _itemPicked = (): void => {\n this._hideContextMenu();\n };\n}\n"]}
1
+ {"version":3,"file":"CursorMenu.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAE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,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,OAAO,EACvB,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,IAGb,eAAe,CAAC,mBAAmB;IAClC,4DAA4D;IAC5D,eAAe,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAChD,CACiB,CACrB,CACG,CACP,CAAC;AACJ,CAAC","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 Cursor\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\nimport { SessionStateActionId } from \"../../redux/SessionState.js\";\nimport type { CursorMenuItemProps } from \"../../shared/MenuItem.js\";\nimport { MenuItemHelpers } from \"../../shared/MenuItem.js\";\nimport { SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher.js\";\nimport { UiFramework } from \"../../UiFramework.js\";\nimport { Logger } from \"@itwin/core-bentley\";\n\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function CursorPopupMenu(props: CommonProps) {\n const windowIdRef = React.useRef<string | undefined>();\n const [opened, setOpened] = React.useState(false);\n const [x, setX] = React.useState(0);\n const [y, setY] = React.useState(0);\n const [items, setItems] = React.useState<CursorMenuItemProps[] | undefined>(\n undefined\n );\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n SessionStateActionId.UpdateCursorMenu,\n ])\n )\n return;\n\n const menuData = UiFramework.getCursorMenuData();\n const windowId = windowIdRef.current;\n if (!menuData || windowId !== menuData.childWindowId) {\n setOpened(false);\n setItems(undefined);\n return;\n }\n\n setOpened(menuData.items && menuData.items.length > 0);\n setItems(menuData.items);\n setX(menuData.position.x);\n setY(menuData.position.y);\n });\n }, []);\n\n const onClose = () => {\n setOpened(false);\n };\n\n return (\n <div\n className=\"uifw-cursor-menu-container-div\"\n ref={(el) => {\n const parentWindow = el?.ownerDocument.defaultView ?? undefined;\n const windowId = UiFramework.childWindows.findId(parentWindow);\n windowIdRef.current = windowId;\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiFramework\"),\n `Cursor Menu for ${windowId ?? \"main\"} window`\n );\n }}\n >\n {items && items.length > 0 && opened && (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <GlobalContextMenu\n className={props.className}\n style={props.style}\n identifier=\"cursor-popup-menu\"\n x={x}\n y={y}\n opened={opened}\n onEsc={onClose}\n onOutsideClick={onClose}\n edgeLimit={false}\n autoflip={true}\n >\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n {MenuItemHelpers.createMenuItemNodes(\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n MenuItemHelpers.createMenuItems(items, onClose)\n )}\n </GlobalContextMenu>\n )}\n </div>\n );\n}\n"]}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
+ @use "~@itwin/core-react/lib/core-react/z-index" as *;
5
6
  @use "../../variables" as *;
6
7
 
7
8
  .uifw-cursorpopup {
@@ -18,6 +19,8 @@
18
19
  width: fit-content;
19
20
  transition: opacity 500ms;
20
21
 
22
+ @include uicore-z-index(tooltip);
23
+
21
24
  > .uifw-cursorpopup-title {
22
25
  min-height: $uifw-popup-title-bar-min-height;
23
26
  opacity: $uifw-popup-opacity;
@@ -21,7 +21,9 @@ export interface CursorPopupOptions {
21
21
  /** Draw shadow */
22
22
  shadow?: boolean;
23
23
  }
24
- /** Information maintained by CursorPopupManager about a CursorPopup. */
24
+ /** Information maintained by CursorPopupManager about a CursorPopup.
25
+ * @public
26
+ */
25
27
  interface CursorPopupInfo {
26
28
  id: string;
27
29
  content: React.ReactNode;
@@ -29,6 +31,7 @@ interface CursorPopupInfo {
29
31
  offset: Point;
30
32
  priority: number;
31
33
  options?: CursorPopupOptions;
34
+ targetDocument?: Document;
32
35
  renderRelativePosition: RelativePosition;
33
36
  popupSize?: SizeProps;
34
37
  cancelFadeOut?: () => void;
@@ -53,17 +56,16 @@ export declare class CursorPopupManager {
53
56
  static clearPopups(): void;
54
57
  static get popups(): CursorPopupInfo[];
55
58
  static get popupCount(): number;
56
- private static _emitPopupsChangedEvent;
57
59
  private static pushPopup;
58
60
  /** Called to open popup with a new set of properties
59
61
  */
60
- static open(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number, options?: CursorPopupOptions): void;
62
+ static open(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number, options?: CursorPopupOptions, targetDocument?: Document): void;
61
63
  /** Called to update popup with a new set of properties
62
64
  */
63
- static update(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number): void;
65
+ static update(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number, targetDocument?: Document): void;
64
66
  /** Called to move the open popup to new location
65
67
  */
66
- static updatePosition(pt: XAndY): void;
68
+ static updatePosition(pt: XAndY, targetDocument?: Document): void;
67
69
  /** Called when tool wants to close the popup
68
70
  */
69
71
  static close(id: string, apply: boolean, fadeOut?: boolean): void;
@@ -72,25 +74,9 @@ export declare class CursorPopupManager {
72
74
  private static validateRenderRelativePosition;
73
75
  private static autoFlip;
74
76
  }
75
- /** State for the [[CursorPopupRenderer]] React component */
76
- interface CursorPopupRendererState {
77
- pt: Point;
78
- }
79
77
  /** CursorPopupRenderer React component.
80
78
  * @public
81
79
  */
82
- export declare class CursorPopupRenderer extends React.Component<any, CursorPopupRendererState> {
83
- constructor(props: any);
84
- render(): React.ReactNode;
85
- private _handleSizeKnown;
86
- private renderPositions;
87
- private renderRelativePosition;
88
- private getDimension;
89
- private adjustOffset;
90
- componentDidMount(): void;
91
- componentWillUnmount(): void;
92
- private _handlePopupChangedEvent;
93
- private _handleCursorPopupUpdatePositionEvent;
94
- }
80
+ export declare function CursorPopupRenderer(): React.JSX.Element | undefined;
95
81
  export {};
96
82
  //# sourceMappingURL=CursorPopupManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPopupManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAU,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wEAAwE;AACxE,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;I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