@itwin/appui-react 3.0.0-dev.145 → 3.0.0-dev.149

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 (219) hide show
  1. package/lib/cjs/appui-react/UiFramework.d.ts +2 -1
  2. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  3. package/lib/cjs/appui-react/UiFramework.js +2 -2
  4. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  5. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  6. package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
  7. package/lib/cjs/appui-react/backstage/CommandLaunch.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/backstage/CommandLaunch.js.map +1 -1
  9. package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts +1 -1
  10. package/lib/cjs/appui-react/childwindow/ChildWindowManager.js +1 -1
  11. package/lib/cjs/appui-react/childwindow/ChildWindowManager.js.map +1 -1
  12. package/lib/cjs/appui-react/content/ContentControl.d.ts +1 -1
  13. package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
  14. package/lib/cjs/appui-react/content/ContentControl.js +2 -2
  15. package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
  16. package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -2
  17. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  18. package/lib/cjs/appui-react/content/ContentLayout.js +2 -1
  19. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  20. package/lib/cjs/appui-react/content/ContentViewManager.d.ts +1 -1
  21. package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
  22. package/lib/cjs/appui-react/content/ContentViewManager.js +3 -3
  23. package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
  24. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts +1 -2
  25. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  26. package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -1
  27. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  28. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  29. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  30. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
  31. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  32. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -3
  33. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  34. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts +1 -1
  35. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  36. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -2
  37. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  38. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts +2 -2
  39. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  40. package/lib/cjs/appui-react/feedback/ElementTooltip.js +2 -1
  41. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  42. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  43. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  44. package/lib/cjs/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  45. package/lib/cjs/appui-react/hooks/useActiveViewport.js.map +1 -1
  46. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  47. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  48. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
  49. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  50. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -1
  51. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  52. package/lib/cjs/appui-react/messages/MessageManager.d.ts +1 -2
  53. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  54. package/lib/cjs/appui-react/messages/MessageManager.js +8 -8
  55. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  56. package/lib/cjs/appui-react/messages/Pointer.d.ts +2 -2
  57. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  58. package/lib/cjs/appui-react/messages/Pointer.js +2 -2
  59. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  60. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
  61. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +2 -2
  63. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  64. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
  65. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
  67. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  68. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts +1 -1
  69. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/pickers/ViewSelector.js +3 -3
  71. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  72. package/lib/cjs/appui-react/popup/PopupManager.d.ts +2 -2
  73. package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
  74. package/lib/cjs/appui-react/popup/PopupManager.js +1 -1
  75. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  76. package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  77. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  78. package/lib/cjs/appui-react/syncui/BooleanListener.d.ts +2 -2
  79. package/lib/cjs/appui-react/syncui/BooleanListener.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/syncui/BooleanListener.js +2 -1
  81. package/lib/cjs/appui-react/syncui/BooleanListener.js.map +1 -1
  82. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +6 -16
  83. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  84. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +28 -101
  85. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  86. package/lib/cjs/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
  87. package/lib/cjs/appui-react/toolbar/ActionItemButton.js.map +1 -1
  88. package/lib/cjs/appui-react/toolbar/GroupItem.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/toolbar/GroupItem.js.map +1 -1
  90. package/lib/cjs/appui-react/toolbar/ToolButton.js.map +1 -1
  91. package/lib/cjs/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  92. package/lib/cjs/appui-react/toolbar/Toolbar.js +1 -1
  93. package/lib/cjs/appui-react/toolbar/Toolbar.js.map +1 -1
  94. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  95. package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  96. package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
  97. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  98. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  99. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -2
  100. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  101. package/lib/cjs/appui-react/widgets/WidgetDef.js +1 -2
  102. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  103. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
  104. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
  105. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js +3 -2
  106. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
  107. package/lib/cjs/appui-react.d.ts +2 -2
  108. package/lib/cjs/appui-react.js +2 -2
  109. package/lib/cjs/appui-react.js.map +1 -1
  110. package/lib/esm/appui-react/UiFramework.d.ts +2 -1
  111. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  112. package/lib/esm/appui-react/UiFramework.js +2 -2
  113. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  114. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  115. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  116. package/lib/esm/appui-react/backstage/CommandLaunch.d.ts.map +1 -1
  117. package/lib/esm/appui-react/backstage/CommandLaunch.js.map +1 -1
  118. package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts +1 -1
  119. package/lib/esm/appui-react/childwindow/ChildWindowManager.js +1 -1
  120. package/lib/esm/appui-react/childwindow/ChildWindowManager.js.map +1 -1
  121. package/lib/esm/appui-react/content/ContentControl.d.ts +1 -1
  122. package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
  123. package/lib/esm/appui-react/content/ContentControl.js +1 -1
  124. package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
  125. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -2
  126. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  127. package/lib/esm/appui-react/content/ContentLayout.js +2 -1
  128. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  129. package/lib/esm/appui-react/content/ContentViewManager.d.ts +1 -1
  130. package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
  131. package/lib/esm/appui-react/content/ContentViewManager.js +1 -1
  132. package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
  133. package/lib/esm/appui-react/cursor/CursorInformation.d.ts +1 -2
  134. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  135. package/lib/esm/appui-react/cursor/CursorInformation.js +2 -2
  136. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  137. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  138. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  139. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
  140. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  141. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +2 -2
  142. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  143. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts +1 -1
  144. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  145. package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -1
  146. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  147. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts +2 -2
  148. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  149. package/lib/esm/appui-react/feedback/ElementTooltip.js +2 -1
  150. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  151. package/lib/esm/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  152. package/lib/esm/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  153. package/lib/esm/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  154. package/lib/esm/appui-react/hooks/useActiveViewport.js.map +1 -1
  155. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  156. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  157. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
  158. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  159. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +2 -2
  160. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  161. package/lib/esm/appui-react/messages/MessageManager.d.ts +1 -2
  162. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  163. package/lib/esm/appui-react/messages/MessageManager.js +2 -2
  164. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  165. package/lib/esm/appui-react/messages/Pointer.d.ts +2 -2
  166. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  167. package/lib/esm/appui-react/messages/Pointer.js +2 -2
  168. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  169. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
  170. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  171. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -1
  172. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  173. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
  174. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  175. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
  176. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  177. package/lib/esm/appui-react/pickers/ViewSelector.d.ts +1 -1
  178. package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  179. package/lib/esm/appui-react/pickers/ViewSelector.js +1 -1
  180. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  181. package/lib/esm/appui-react/popup/PopupManager.d.ts +2 -2
  182. package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
  183. package/lib/esm/appui-react/popup/PopupManager.js +2 -2
  184. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  185. package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  186. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  187. package/lib/esm/appui-react/syncui/BooleanListener.d.ts +2 -2
  188. package/lib/esm/appui-react/syncui/BooleanListener.d.ts.map +1 -1
  189. package/lib/esm/appui-react/syncui/BooleanListener.js +2 -1
  190. package/lib/esm/appui-react/syncui/BooleanListener.js.map +1 -1
  191. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +6 -16
  192. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  193. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +27 -99
  194. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  195. package/lib/esm/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
  196. package/lib/esm/appui-react/toolbar/ActionItemButton.js.map +1 -1
  197. package/lib/esm/appui-react/toolbar/GroupItem.d.ts.map +1 -1
  198. package/lib/esm/appui-react/toolbar/GroupItem.js.map +1 -1
  199. package/lib/esm/appui-react/toolbar/ToolButton.js.map +1 -1
  200. package/lib/esm/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  201. package/lib/esm/appui-react/toolbar/Toolbar.js +1 -1
  202. package/lib/esm/appui-react/toolbar/Toolbar.js.map +1 -1
  203. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  204. package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  205. package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
  206. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  207. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  208. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -2
  209. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  210. package/lib/esm/appui-react/widgets/WidgetDef.js +1 -2
  211. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  212. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
  213. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
  214. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js +2 -1
  215. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
  216. package/lib/esm/appui-react.d.ts +2 -2
  217. package/lib/esm/appui-react.js +2 -2
  218. package/lib/esm/appui-react.js.map +1 -1
  219. package/package.json +34 -34
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA8B;AAE9B,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,uDAAyC;AACzC,kDAAsE;AACtE,uEAAoE;AACpE,kEAA+D;AAG/D,6DAAyF;AAazF;GACG;AACH,MAAM,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAKpF,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAwBP,qBAAgB,GAAG,CAAC,MAAwC,EAAE,EAAE;YACtE,0BAA0B;YAE1B,uCAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC1D,CAAC,CAAC;QAUM,gCAA2B,GAAG,CAAC,IAAmC,EAAE,EAAE;YAC5E,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,aAAa,CAAC;YAC3D,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACpC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;aAC7B;QACH,CAAC,CAA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AC,cAAc,IAE9E,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF;AAjED,sCAiEC","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 ContentView\r\n */\r\n\r\n// cSpell:ignore contentlayout\r\n\r\nimport \"./ContentLayout.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport SplitPane from \"react-split-pane\";\r\nimport { CommonProps, Orientation, UiEvent } from \"@itwin/core-react\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { UiShowHideManager } from \"../utils/UiShowHideManager\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { ContentLayoutProps, LayoutFragmentProps, LayoutHorizontalSplitProps, LayoutSplitPropsBase, LayoutVerticalSplitProps } from \"@itwin/appui-abstract\";\r\nimport { ActiveContentChangedEventArgs, ContentViewManager } from \"./ContentViewManager\";\r\n\r\n/** Properties for [[ContentWrapper]] */\r\ninterface ContentWrapperProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** State for [[ContentWrapper]] */\r\ninterface ContentWrapperState {\r\n content: React.ReactNode;\r\n isActive: boolean;\r\n}\r\n\r\n/** ContentWrapper React component.\r\n */\r\nclass ContentWrapper extends React.Component<ContentWrapperProps, ContentWrapperState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentWrapperState>;\r\n\r\n constructor(props: ContentWrapperProps) {\r\n super(props);\r\n\r\n this.state = {\r\n content: this.props.content,\r\n isActive: this.props.content === ContentViewManager.getActiveContent(),\r\n };\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n const overlayClassName = classnames(\r\n \"uifw-contentlayout-overlay-div\",\r\n this.state.isActive ? \"uifw-contentlayout-overlay-active\" : \"uifw-contentlayout-overlay-inactive\",\r\n );\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-wrapper\", this.props.className)} style={this.props.style}\r\n onMouseDown={this._handleMouseDown} onMouseMove={UiShowHideManager.handleContentMouseMove} role=\"presentation\"\r\n >\r\n {this.state.content}\r\n <div className={overlayClassName} />\r\n </div>\r\n );\r\n }\r\n\r\n private _handleMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // event.preventDefault();\r\n\r\n ContentViewManager.setActiveContent(this.state.content);\r\n };\r\n\r\n public override componentDidMount() {\r\n ContentViewManager.onActiveContentChangedEvent.addListener(this._handleActiveContentChanged);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n ContentViewManager.onActiveContentChangedEvent.removeListener(this._handleActiveContentChanged);\r\n }\r\n\r\n private _handleActiveContentChanged = (args: ActiveContentChangedEventArgs) => {\r\n const isActive = this.state.content === args.activeContent;\r\n if (this.state.isActive !== isActive) {\r\n this.setState({ isActive });\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n public override componentDidUpdate(prevProps: ContentWrapperProps, _prevState: ContentWrapperState) {\r\n if (this.props.content !== prevProps.content) {\r\n this.setState((_, props) => ({ content: props.content, isActive: props.content === ContentViewManager.getActiveContent() }));\r\n }\r\n }\r\n\r\n}\r\n\r\n/** Properties for the [[SplitContainer]] component */\r\ninterface SplitContainerProps extends CommonProps {\r\n contentA: React.ReactNode;\r\n contentB: React.ReactNode;\r\n orientation: Orientation;\r\n percentage: number;\r\n resizable: boolean;\r\n minSizeTopLeft: number;\r\n minSizeBottomRight: number;\r\n splitterStateId?: string;\r\n onSplitterChange?: (size: number, percentage: number) => void;\r\n}\r\n\r\n/** Split Container class.\r\n */\r\nclass SplitContainer extends React.Component<SplitContainerProps> {\r\n private _containerDiv: HTMLDivElement | null = null;\r\n\r\n constructor(props: SplitContainerProps) {\r\n super(props);\r\n }\r\n\r\n private _onSplitterChange = (size: number): void => {\r\n let percentage = 0;\r\n\r\n // istanbul ignore else\r\n if (this._containerDiv && size > 0) {\r\n if (this.props.orientation === Orientation.Horizontal) {\r\n const height = this._containerDiv.getBoundingClientRect().height;\r\n // istanbul ignore if\r\n if (height > 0)\r\n percentage = size / height;\r\n } else {\r\n const width = this._containerDiv.getBoundingClientRect().width;\r\n // istanbul ignore if\r\n if (width > 0)\r\n percentage = size / width;\r\n }\r\n\r\n // istanbul ignore else\r\n if (this.props.onSplitterChange)\r\n this.props.onSplitterChange(size, percentage);\r\n }\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const orientation = (this.props.orientation === Orientation.Horizontal) ? \"horizontal\" : \"vertical\";\r\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\r\n const minSizeTopLeft = this.props.minSizeTopLeft;\r\n const minSizeBottomRight = -(this.props.minSizeBottomRight);\r\n\r\n return (\r\n <div ref={(e) => { this._containerDiv = e; }}\r\n className={classnames(\"uifw-contentlayout-full-size\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <SplitPane split={orientation}\r\n minSize={minSizeTopLeft} maxSize={minSizeBottomRight} defaultSize={defaultSize}\r\n onChange={this._onSplitterChange} allowResize={this.props.resizable}\r\n >\r\n {this.props.contentA}\r\n {this.props.contentB}\r\n </SplitPane>\r\n </div >\r\n );\r\n }\r\n}\r\n\r\n/** Properties for [[SingleContentContainer]] component\r\n */\r\ninterface SingleContentProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** Single Content Container class.\r\n */\r\nclass SingleContentContainer extends React.Component<SingleContentProps> {\r\n\r\n public override render(): React.ReactNode {\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-full-size\", this.props.className)} style={this.props.style} data-testid=\"single-content-container\"\r\n onMouseMove={UiShowHideManager.handleContentMouseMove}\r\n >\r\n {this.props.content}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Common interface for HorizontalSplit and VerticalSplit\r\n */\r\ninterface LayoutSplit {\r\n createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode;\r\n isLocked: boolean;\r\n}\r\n\r\n/** Minimum split size */\r\nconst MIN_SPLIT_SIZE = 6;\r\n\r\n/** Base Split class.\r\n */\r\nclass BaseSplit {\r\n public defaultPercentage: number;\r\n public stateId: string = \"\";\r\n public isLocked: boolean = false;\r\n\r\n constructor(props: LayoutSplitPropsBase) {\r\n this.defaultPercentage = props.percentage;\r\n\r\n // istanbul ignore else\r\n if (props.id)\r\n this.stateId = props.id;\r\n\r\n // istanbul ignore else\r\n if (props.lock)\r\n this.isLocked = props.lock;\r\n }\r\n}\r\n\r\n/** Horizontal Split class.\r\n */\r\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\r\n private _topIndex: number = -1;\r\n private _bottomIndex: number = -1;\r\n private _topSplit?: LayoutSplit;\r\n private _bottomSplit?: LayoutSplit;\r\n private _props: LayoutHorizontalSplitProps;\r\n private _minSizeTop: number = MIN_SPLIT_SIZE;\r\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutHorizontalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.top === \"number\") {\r\n this._topIndex = props.top;\r\n } else {\r\n this._topSplit = ContentLayoutDef.createSplit(props.top);\r\n }\r\n\r\n if (typeof props.bottom === \"number\") {\r\n this._bottomIndex = props.bottom;\r\n } else {\r\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\r\n }\r\n\r\n if (props.minSizeTop)\r\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeBottom)\r\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const topContent = (!this._topSplit) ?\r\n <ContentWrapper content={contentNodes[this._topIndex]} /> :\r\n this._topSplit.createContentContainer(contentNodes, resizable);\r\n const bottomContent = (!this._bottomSplit) ?\r\n <ContentWrapper content={contentNodes[this._bottomIndex]} /> :\r\n this._bottomSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={topContent}\r\n contentB={bottomContent}\r\n orientation={Orientation.Horizontal}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeTop}\r\n minSizeBottomRight={this._minSizeBottom}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Vertical Split class.\r\n */\r\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\r\n private _leftIndex: number = -1;\r\n private _rightIndex: number = -1;\r\n private _leftSplit?: LayoutSplit;\r\n private _rightSplit?: LayoutSplit;\r\n private _props: LayoutVerticalSplitProps;\r\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\r\n private _minSizeRight: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutVerticalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.left === \"number\") {\r\n this._leftIndex = props.left;\r\n } else {\r\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\r\n }\r\n\r\n if (typeof props.right === \"number\") {\r\n this._rightIndex = props.right;\r\n } else {\r\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\r\n }\r\n\r\n if (props.minSizeLeft)\r\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeRight)\r\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const leftContent = (!this._leftSplit) ?\r\n <ContentWrapper content={contentNodes[this._leftIndex]} /> :\r\n this._leftSplit.createContentContainer(contentNodes, resizable);\r\n const rightContent = (!this._rightSplit) ?\r\n <ContentWrapper content={contentNodes[this._rightIndex]} /> :\r\n this._rightSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={leftContent}\r\n contentB={rightContent}\r\n orientation={Orientation.Vertical}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeLeft}\r\n minSizeBottomRight={this._minSizeRight}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Content Layout Definition class.\r\n * @public\r\n */\r\nexport class ContentLayoutDef {\r\n private _layoutProps: ContentLayoutProps;\r\n private _rootSplit?: LayoutSplit;\r\n\r\n /** ID for this Content Layout */\r\n public id: string = \"\";\r\n /** Description of the layout. */\r\n public description: string = \"\";\r\n constructor(layoutProps: ContentLayoutProps) {\r\n this._layoutProps = layoutProps;\r\n this.id = layoutProps.id;\r\n if (layoutProps.description !== undefined)\r\n this.description = layoutProps.description;\r\n }\r\n\r\n public get rootSplit(): LayoutSplit | undefined { return this._rootSplit; }\r\n\r\n /** Creates [[ContentLayoutProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(): ContentLayoutProps { return this._layoutProps; }\r\n\r\n /** Fill a layout container with React nodes for each content view\r\n */\r\n public fillLayoutContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode | undefined {\r\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\r\n\r\n if (this.rootSplit) {\r\n return this.rootSplit.createContentContainer(contentNodes, resizable);\r\n }\r\n\r\n if (contentNodes.length > 0)\r\n return <SingleContentContainer content={contentNodes[0]} />;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Gets the indexes of content views used in this Content Layout\r\n */\r\n public getUsedContentIndexes(): number[] {\r\n let allContentIndexes: number[] = [];\r\n\r\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\r\n allContentIndexes.push(0);\r\n else {\r\n allContentIndexes = allContentIndexes.concat(this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit));\r\n allContentIndexes = allContentIndexes.concat(this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit));\r\n }\r\n\r\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\r\n\r\n return uniqueContentIndexes;\r\n }\r\n\r\n private getHorizontalSplitContentIndexes(splitProps?: LayoutHorizontalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.top === \"number\")\r\n contentIndexes.push(splitProps.top);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.bottom === \"number\")\r\n contentIndexes.push(splitProps.bottom);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n private getVerticalSplitContentIndexes(splitProps?: LayoutVerticalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.left === \"number\")\r\n contentIndexes.push(splitProps.left);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.right === \"number\")\r\n contentIndexes.push(splitProps.right);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n /** @internal */\r\n public static createSplit(fragmentDef: LayoutFragmentProps): LayoutSplit | undefined {\r\n if (fragmentDef.horizontalSplit) {\r\n return new HorizontalSplit(fragmentDef.horizontalSplit);\r\n } else if (fragmentDef.verticalSplit) {\r\n return new VerticalSplit(fragmentDef.verticalSplit);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Content Layout Activated Event Args class.\r\n * @public\r\n */\r\nexport interface ContentLayoutActivatedEventArgs {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n}\r\n\r\n/** Content Layout Activated Event class.\r\n * @public\r\n */\r\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> { }\r\n\r\n/** State for the [[ContentLayout]].\r\n */\r\ninterface ContentLayoutState {\r\n contentLayoutDef: ContentLayoutDef;\r\n contentContainer?: React.ReactNode;\r\n contentGroupId?: string;\r\n}\r\n\r\n/** Properties for the [[ContentLayout]] React component.\r\n * @public\r\n */\r\nexport interface ContentLayoutComponentProps extends CommonProps {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n isInFooterMode: boolean;\r\n}\r\n\r\n/** Content Layout React component.\r\n * @public\r\n */\r\nexport class ContentLayout extends React.Component<ContentLayoutComponentProps, ContentLayoutState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentLayoutState>;\r\n\r\n constructor(props: ContentLayoutComponentProps) {\r\n super(props);\r\n\r\n const contentLayoutDef = this.props.contentLayout;\r\n const contentGroup = this.props.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.state = {\r\n contentLayoutDef: this.props.contentLayout,\r\n contentContainer,\r\n contentGroupId: this.props.contentGroup.groupId,\r\n };\r\n }\r\n\r\n public override componentDidMount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.addListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.removeListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n private _handleContentLayoutActivated = (args: ContentLayoutActivatedEventArgs) => {\r\n const contentLayoutDef = args.contentLayout;\r\n const contentGroup = args.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.setState({\r\n contentLayoutDef: args.contentLayout,\r\n contentContainer,\r\n contentGroupId: contentGroup.groupId,\r\n });\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n if (this.state.contentContainer) {\r\n return (\r\n <div id=\"uifw-contentlayout-div\" className={this.props.className} style={this.props.style}\r\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\r\n onMouseDown={this._onMouseDown} onMouseUp={this._onMouseUp} role=\"presentation\"\r\n >\r\n {this.state.contentContainer}\r\n </div>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(true);\r\n };\r\n\r\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(false);\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA8B;AAE9B,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,uDAAyC;AACzC,kDAA6D;AAC7D,uEAAoE;AACpE,kEAA+D;AAE/D,0DAAqK;AACrK,6DAAyF;AAaz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CAAC,6BAA6B,CAAC,CAAC;IAClG,CAAC;IAEe,oBAAoB;QAClC,qCAAiB,CAAC,6BAA6B,CAAC,cAAc,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IACrG,CAAC;IAgBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BAAK,EAAE,EAAC,wBAAwB,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvF,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAC,cAAc,IAE9E,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF;AAjED,sCAiEC","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 ContentView\r\n */\r\n\r\n// cSpell:ignore contentlayout\r\n\r\nimport \"./ContentLayout.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport SplitPane from \"react-split-pane\";\r\nimport { CommonProps, Orientation } from \"@itwin/core-react\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { UiShowHideManager } from \"../utils/UiShowHideManager\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { ContentLayoutProps, LayoutFragmentProps, LayoutHorizontalSplitProps, LayoutSplitPropsBase, LayoutVerticalSplitProps, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ActiveContentChangedEventArgs, ContentViewManager } from \"./ContentViewManager\";\r\n\r\n/** Properties for [[ContentWrapper]] */\r\ninterface ContentWrapperProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** State for [[ContentWrapper]] */\r\ninterface ContentWrapperState {\r\n content: React.ReactNode;\r\n isActive: boolean;\r\n}\r\n\r\n/** ContentWrapper React component.\r\n */\r\nclass ContentWrapper extends React.Component<ContentWrapperProps, ContentWrapperState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentWrapperState>;\r\n\r\n constructor(props: ContentWrapperProps) {\r\n super(props);\r\n\r\n this.state = {\r\n content: this.props.content,\r\n isActive: this.props.content === ContentViewManager.getActiveContent(),\r\n };\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n const overlayClassName = classnames(\r\n \"uifw-contentlayout-overlay-div\",\r\n this.state.isActive ? \"uifw-contentlayout-overlay-active\" : \"uifw-contentlayout-overlay-inactive\",\r\n );\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-wrapper\", this.props.className)} style={this.props.style}\r\n onMouseDown={this._handleMouseDown} onMouseMove={UiShowHideManager.handleContentMouseMove} role=\"presentation\"\r\n >\r\n {this.state.content}\r\n <div className={overlayClassName} />\r\n </div>\r\n );\r\n }\r\n\r\n private _handleMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // event.preventDefault();\r\n\r\n ContentViewManager.setActiveContent(this.state.content);\r\n };\r\n\r\n public override componentDidMount() {\r\n ContentViewManager.onActiveContentChangedEvent.addListener(this._handleActiveContentChanged);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n ContentViewManager.onActiveContentChangedEvent.removeListener(this._handleActiveContentChanged);\r\n }\r\n\r\n private _handleActiveContentChanged = (args: ActiveContentChangedEventArgs) => {\r\n const isActive = this.state.content === args.activeContent;\r\n if (this.state.isActive !== isActive) {\r\n this.setState({ isActive });\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n public override componentDidUpdate(prevProps: ContentWrapperProps, _prevState: ContentWrapperState) {\r\n if (this.props.content !== prevProps.content) {\r\n this.setState((_, props) => ({ content: props.content, isActive: props.content === ContentViewManager.getActiveContent() }));\r\n }\r\n }\r\n\r\n}\r\n\r\n/** Properties for the [[SplitContainer]] component */\r\ninterface SplitContainerProps extends CommonProps {\r\n contentA: React.ReactNode;\r\n contentB: React.ReactNode;\r\n orientation: Orientation;\r\n percentage: number;\r\n resizable: boolean;\r\n minSizeTopLeft: number;\r\n minSizeBottomRight: number;\r\n splitterStateId?: string;\r\n onSplitterChange?: (size: number, percentage: number) => void;\r\n}\r\n\r\n/** Split Container class.\r\n */\r\nclass SplitContainer extends React.Component<SplitContainerProps> {\r\n private _containerDiv: HTMLDivElement | null = null;\r\n\r\n constructor(props: SplitContainerProps) {\r\n super(props);\r\n }\r\n\r\n private _onSplitterChange = (size: number): void => {\r\n let percentage = 0;\r\n\r\n // istanbul ignore else\r\n if (this._containerDiv && size > 0) {\r\n if (this.props.orientation === Orientation.Horizontal) {\r\n const height = this._containerDiv.getBoundingClientRect().height;\r\n // istanbul ignore if\r\n if (height > 0)\r\n percentage = size / height;\r\n } else {\r\n const width = this._containerDiv.getBoundingClientRect().width;\r\n // istanbul ignore if\r\n if (width > 0)\r\n percentage = size / width;\r\n }\r\n\r\n // istanbul ignore else\r\n if (this.props.onSplitterChange)\r\n this.props.onSplitterChange(size, percentage);\r\n }\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const orientation = (this.props.orientation === Orientation.Horizontal) ? \"horizontal\" : \"vertical\";\r\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\r\n const minSizeTopLeft = this.props.minSizeTopLeft;\r\n const minSizeBottomRight = -(this.props.minSizeBottomRight);\r\n\r\n return (\r\n <div ref={(e) => { this._containerDiv = e; }}\r\n className={classnames(\"uifw-contentlayout-full-size\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <SplitPane split={orientation}\r\n minSize={minSizeTopLeft} maxSize={minSizeBottomRight} defaultSize={defaultSize}\r\n onChange={this._onSplitterChange} allowResize={this.props.resizable}\r\n >\r\n {this.props.contentA}\r\n {this.props.contentB}\r\n </SplitPane>\r\n </div >\r\n );\r\n }\r\n}\r\n\r\n/** Properties for [[SingleContentContainer]] component\r\n */\r\ninterface SingleContentProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** Single Content Container class.\r\n */\r\nclass SingleContentContainer extends React.Component<SingleContentProps> {\r\n\r\n public override render(): React.ReactNode {\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-full-size\", this.props.className)} style={this.props.style} data-testid=\"single-content-container\"\r\n onMouseMove={UiShowHideManager.handleContentMouseMove}\r\n >\r\n {this.props.content}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Common interface for HorizontalSplit and VerticalSplit\r\n */\r\ninterface LayoutSplit {\r\n createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode;\r\n isLocked: boolean;\r\n}\r\n\r\n/** Minimum split size */\r\nconst MIN_SPLIT_SIZE = 6;\r\n\r\n/** Base Split class.\r\n */\r\nclass BaseSplit {\r\n public defaultPercentage: number;\r\n public stateId: string = \"\";\r\n public isLocked: boolean = false;\r\n\r\n constructor(props: LayoutSplitPropsBase) {\r\n this.defaultPercentage = props.percentage;\r\n\r\n // istanbul ignore else\r\n if (props.id)\r\n this.stateId = props.id;\r\n\r\n // istanbul ignore else\r\n if (props.lock)\r\n this.isLocked = props.lock;\r\n }\r\n}\r\n\r\n/** Horizontal Split class.\r\n */\r\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\r\n private _topIndex: number = -1;\r\n private _bottomIndex: number = -1;\r\n private _topSplit?: LayoutSplit;\r\n private _bottomSplit?: LayoutSplit;\r\n private _props: LayoutHorizontalSplitProps;\r\n private _minSizeTop: number = MIN_SPLIT_SIZE;\r\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutHorizontalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.top === \"number\") {\r\n this._topIndex = props.top;\r\n } else {\r\n this._topSplit = ContentLayoutDef.createSplit(props.top);\r\n }\r\n\r\n if (typeof props.bottom === \"number\") {\r\n this._bottomIndex = props.bottom;\r\n } else {\r\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\r\n }\r\n\r\n if (props.minSizeTop)\r\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeBottom)\r\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const topContent = (!this._topSplit) ?\r\n <ContentWrapper content={contentNodes[this._topIndex]} /> :\r\n this._topSplit.createContentContainer(contentNodes, resizable);\r\n const bottomContent = (!this._bottomSplit) ?\r\n <ContentWrapper content={contentNodes[this._bottomIndex]} /> :\r\n this._bottomSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={topContent}\r\n contentB={bottomContent}\r\n orientation={Orientation.Horizontal}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeTop}\r\n minSizeBottomRight={this._minSizeBottom}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Vertical Split class.\r\n */\r\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\r\n private _leftIndex: number = -1;\r\n private _rightIndex: number = -1;\r\n private _leftSplit?: LayoutSplit;\r\n private _rightSplit?: LayoutSplit;\r\n private _props: LayoutVerticalSplitProps;\r\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\r\n private _minSizeRight: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutVerticalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.left === \"number\") {\r\n this._leftIndex = props.left;\r\n } else {\r\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\r\n }\r\n\r\n if (typeof props.right === \"number\") {\r\n this._rightIndex = props.right;\r\n } else {\r\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\r\n }\r\n\r\n if (props.minSizeLeft)\r\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeRight)\r\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const leftContent = (!this._leftSplit) ?\r\n <ContentWrapper content={contentNodes[this._leftIndex]} /> :\r\n this._leftSplit.createContentContainer(contentNodes, resizable);\r\n const rightContent = (!this._rightSplit) ?\r\n <ContentWrapper content={contentNodes[this._rightIndex]} /> :\r\n this._rightSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={leftContent}\r\n contentB={rightContent}\r\n orientation={Orientation.Vertical}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeLeft}\r\n minSizeBottomRight={this._minSizeRight}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Content Layout Definition class.\r\n * @public\r\n */\r\nexport class ContentLayoutDef {\r\n private _layoutProps: ContentLayoutProps;\r\n private _rootSplit?: LayoutSplit;\r\n\r\n /** ID for this Content Layout */\r\n public id: string = \"\";\r\n /** Description of the layout. */\r\n public description: string = \"\";\r\n constructor(layoutProps: ContentLayoutProps) {\r\n this._layoutProps = layoutProps;\r\n this.id = layoutProps.id;\r\n if (layoutProps.description !== undefined)\r\n this.description = layoutProps.description;\r\n }\r\n\r\n public get rootSplit(): LayoutSplit | undefined { return this._rootSplit; }\r\n\r\n /** Creates [[ContentLayoutProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(): ContentLayoutProps { return this._layoutProps; }\r\n\r\n /** Fill a layout container with React nodes for each content view\r\n */\r\n public fillLayoutContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode | undefined {\r\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\r\n\r\n if (this.rootSplit) {\r\n return this.rootSplit.createContentContainer(contentNodes, resizable);\r\n }\r\n\r\n if (contentNodes.length > 0)\r\n return <SingleContentContainer content={contentNodes[0]} />;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Gets the indexes of content views used in this Content Layout\r\n */\r\n public getUsedContentIndexes(): number[] {\r\n let allContentIndexes: number[] = [];\r\n\r\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\r\n allContentIndexes.push(0);\r\n else {\r\n allContentIndexes = allContentIndexes.concat(this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit));\r\n allContentIndexes = allContentIndexes.concat(this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit));\r\n }\r\n\r\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\r\n\r\n return uniqueContentIndexes;\r\n }\r\n\r\n private getHorizontalSplitContentIndexes(splitProps?: LayoutHorizontalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.top === \"number\")\r\n contentIndexes.push(splitProps.top);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.bottom === \"number\")\r\n contentIndexes.push(splitProps.bottom);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n private getVerticalSplitContentIndexes(splitProps?: LayoutVerticalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.left === \"number\")\r\n contentIndexes.push(splitProps.left);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.right === \"number\")\r\n contentIndexes.push(splitProps.right);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n /** @internal */\r\n public static createSplit(fragmentDef: LayoutFragmentProps): LayoutSplit | undefined {\r\n if (fragmentDef.horizontalSplit) {\r\n return new HorizontalSplit(fragmentDef.horizontalSplit);\r\n } else if (fragmentDef.verticalSplit) {\r\n return new VerticalSplit(fragmentDef.verticalSplit);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Content Layout Activated Event Args class.\r\n * @public\r\n */\r\nexport interface ContentLayoutActivatedEventArgs {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n}\r\n\r\n/** Content Layout Activated Event class.\r\n * @public\r\n */\r\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> { }\r\n\r\n/** State for the [[ContentLayout]].\r\n */\r\ninterface ContentLayoutState {\r\n contentLayoutDef: ContentLayoutDef;\r\n contentContainer?: React.ReactNode;\r\n contentGroupId?: string;\r\n}\r\n\r\n/** Properties for the [[ContentLayout]] React component.\r\n * @public\r\n */\r\nexport interface ContentLayoutComponentProps extends CommonProps {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n isInFooterMode: boolean;\r\n}\r\n\r\n/** Content Layout React component.\r\n * @public\r\n */\r\nexport class ContentLayout extends React.Component<ContentLayoutComponentProps, ContentLayoutState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentLayoutState>;\r\n\r\n constructor(props: ContentLayoutComponentProps) {\r\n super(props);\r\n\r\n const contentLayoutDef = this.props.contentLayout;\r\n const contentGroup = this.props.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.state = {\r\n contentLayoutDef: this.props.contentLayout,\r\n contentContainer,\r\n contentGroupId: this.props.contentGroup.groupId,\r\n };\r\n }\r\n\r\n public override componentDidMount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.addListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.removeListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n private _handleContentLayoutActivated = (args: ContentLayoutActivatedEventArgs) => {\r\n const contentLayoutDef = args.contentLayout;\r\n const contentGroup = args.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.setState({\r\n contentLayoutDef: args.contentLayout,\r\n contentContainer,\r\n contentGroupId: contentGroup.groupId,\r\n });\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n if (this.state.contentContainer) {\r\n return (\r\n <div id=\"uifw-contentlayout-div\" className={this.props.className} style={this.props.style}\r\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\r\n onMouseDown={this._onMouseDown} onMouseUp={this._onMouseUp} role=\"presentation\"\r\n >\r\n {this.state.contentContainer}\r\n </div>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(true);\r\n };\r\n\r\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(false);\r\n };\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module ContentView
3
3
  */
4
4
  import * as React from "react";
5
- import { UiEvent } from "@itwin/core-react";
5
+ import { UiEvent } from "@itwin/appui-abstract";
6
6
  import { ContentControl } from "./ContentControl";
7
7
  /** [[MouseDownChangedEvent]] Args interface.
8
8
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,yBAAyB,CAAC;CAAI;AAEjF;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,oCAAoC;IACpC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,6BAA6B,CAAC;CAAI;AAEzF;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAkB;IAC3C,OAAO,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IAMhF;;;OAGG;WACW,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAMhF;;;OAGG;WACW,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAMrF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAM3E;;;OAGG;WACW,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;CAMlF"}
@@ -8,7 +8,7 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.ContentViewManager = exports.ActiveContentChangedEvent = exports.MouseDownChangedEvent = void 0;
11
- const core_react_1 = require("@itwin/core-react");
11
+ const appui_abstract_1 = require("@itwin/appui-abstract");
12
12
  const FrontstageManager_1 = require("../frontstage/FrontstageManager");
13
13
  const ViewUtilities_1 = require("../utils/ViewUtilities");
14
14
  const ContentLayoutManager_1 = require("./ContentLayoutManager");
@@ -16,13 +16,13 @@ const core_frontend_1 = require("@itwin/core-frontend");
16
16
  /** Mouse Down Changed Event class.
17
17
  * @public
18
18
  */
19
- class MouseDownChangedEvent extends core_react_1.UiEvent {
19
+ class MouseDownChangedEvent extends appui_abstract_1.UiEvent {
20
20
  }
21
21
  exports.MouseDownChangedEvent = MouseDownChangedEvent;
22
22
  /** Active Content Changed Event class.
23
23
  * @public
24
24
  */
25
- class ActiveContentChangedEvent extends core_react_1.UiEvent {
25
+ class ActiveContentChangedEvent extends appui_abstract_1.UiEvent {
26
26
  }
27
27
  exports.ActiveContentChangedEvent = ActiveContentChangedEvent;
28
28
  /** Content View Manager class.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,kDAA4C;AAC5C,uEAAoE;AACpE,0DAAuD;AAEvD,iEAA8D;AAC9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,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;;AArJH,gDAuJC;AAtJgB,6BAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,0CAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,8CAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC","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 ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { UiEvent } from \"@itwin/core-react\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { ContentLayoutManager } from \"./ContentLayoutManager\";\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content View Manager class.\r\n * @public\r\n */\r\nexport class ContentViewManager {\r\n private static _mouseDown: boolean = false;\r\n private static _activeContent?: React.ReactNode;\r\n\r\n /** Gets the [[MouseDownChangedEvent]] */\r\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\r\n\r\n /** Determines if the mouse is down in a content view */\r\n public static get isMouseDown(): boolean {\r\n return this._mouseDown;\r\n }\r\n\r\n /** Sets the mouse down status for a content view */\r\n public static setMouseDown(mouseDown: boolean): void {\r\n this._mouseDown = mouseDown;\r\n this.onMouseDownChangedEvent.emit({ mouseDown });\r\n }\r\n\r\n /** Gets the [[ActiveContentChangedEvent]] */\r\n public static readonly onActiveContentChangedEvent = new ActiveContentChangedEvent();\r\n\r\n /** Gets the active content as a React.ReactNode. */\r\n public static getActiveContent(): React.ReactNode | undefined {\r\n return this._activeContent;\r\n }\r\n\r\n /** Return the active ContentControl. */\r\n public static getActiveContentControl(): ContentControl | undefined {\r\n let activeContentControl: ContentControl | undefined;\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (this._activeContent && activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n activeContentControl = activeContentGroup.getControlFromElement(this._activeContent);\r\n }\r\n }\r\n\r\n return activeContentControl;\r\n }\r\n\r\n /** Sets the active [[ContentControl]] */\r\n public static setActiveContent(activeContent?: React.ReactNode, forceEventProcessing = false): void {\r\n // istanbul ignore else\r\n if (this._activeContent !== activeContent || forceEventProcessing) {\r\n const oldContent = this._activeContent;\r\n this._activeContent = activeContent;\r\n\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n const oldContentControl = oldContent ? activeContentGroup.getControlFromElement(oldContent) : undefined;\r\n const activeContentControl = activeContentGroup.getControlFromElement(this._activeContent);\r\n\r\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\r\n // istanbul ignore else\r\n if (activeContentControl) {\r\n // istanbul ignore next\r\n const doSetActiveView =\r\n forceEventProcessing || (!activeContentControl.viewport ||\r\n (/* istanbul ignore next */ oldContentControl && /* istanbul ignore next */ !oldContentControl.viewport));\r\n\r\n // istanbul ignore else\r\n if (doSetActiveView) {\r\n activeFrontstageDef.setActiveView(activeContentControl, oldContentControl);\r\n this.onActiveContentChangedEvent.emit({ activeContent, oldContent });\r\n } else {\r\n if (activeContentControl.viewport && activeContentControl.viewport !== IModelApp.viewManager.selectedView) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.setSelectedView(activeContentControl.viewport);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Refreshes the active [[ContentControl]] */\r\n public static refreshActiveContent(activeContent: React.ReactNode) {\r\n ContentLayoutManager.refreshActiveLayout();\r\n this.setActiveContent(activeContent, true);\r\n }\r\n\r\n /**\r\n * Determines if content displays a Sheet view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSheetView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSheetView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Drawing view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentDrawingView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isDrawingView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Spatial view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSpatialView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSpatialView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Orthographic view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentOrthographicView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isOrthographicView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a 3d view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContent3dView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.is3dView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if viewport supports use of a camera.\r\n * @param content ContentControl to check\r\n */\r\n public static contentSupportsCamera(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.viewSupportsCamera(content.viewport));\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"ContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0DAAgD;AAChD,uEAAoE;AACpE,0DAAuD;AAEvD,iEAA8D;AAC9D,wDAAiD;AAUjD;;GAEG;AACH,MAAa,qBAAsB,SAAQ,wBAAkC;CAAI;AAAjF,sDAAiF;AAYjF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAsC;CAAI;AAAzF,8DAAyF;AAEzF;;GAEG;AACH,MAAa,kBAAkB;IAO7B,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IAKD,oDAAoD;IAC7C,MAAM,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,wCAAwC;IACjC,MAAM,CAAC,uBAAuB;QACnC,IAAI,oBAAgD,CAAC;QACrD,MAAM,mBAAmB,GAAG,qC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AAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,yBAAyB,CAAC,OAAmC;QACzE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,OAAmC;QAC/D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,6BAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CAAC,OAAmC;QACrE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;;AArJH,gDAuJC;AAtJgB,6BAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,0CAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,8CAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC","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 ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { ContentLayoutManager } from \"./ContentLayoutManager\";\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content View Manager class.\r\n * @public\r\n */\r\nexport class ContentViewManager {\r\n private static _mouseDown: boolean = false;\r\n private static _activeContent?: React.ReactNode;\r\n\r\n /** Gets the [[MouseDownChangedEvent]] */\r\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\r\n\r\n /** Determines if the mouse is down in a content view */\r\n public static get isMouseDown(): boolean {\r\n return this._mouseDown;\r\n }\r\n\r\n /** Sets the mouse down status for a content view */\r\n public static setMouseDown(mouseDown: boolean): void {\r\n this._mouseDown = mouseDown;\r\n this.onMouseDownChangedEvent.emit({ mouseDown });\r\n }\r\n\r\n /** Gets the [[ActiveContentChangedEvent]] */\r\n public static readonly onActiveContentChangedEvent = new ActiveContentChangedEvent();\r\n\r\n /** Gets the active content as a React.ReactNode. */\r\n public static getActiveContent(): React.ReactNode | undefined {\r\n return this._activeContent;\r\n }\r\n\r\n /** Return the active ContentControl. */\r\n public static getActiveContentControl(): ContentControl | undefined {\r\n let activeContentControl: ContentControl | undefined;\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (this._activeContent && activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n activeContentControl = activeContentGroup.getControlFromElement(this._activeContent);\r\n }\r\n }\r\n\r\n return activeContentControl;\r\n }\r\n\r\n /** Sets the active [[ContentControl]] */\r\n public static setActiveContent(activeContent?: React.ReactNode, forceEventProcessing = false): void {\r\n // istanbul ignore else\r\n if (this._activeContent !== activeContent || forceEventProcessing) {\r\n const oldContent = this._activeContent;\r\n this._activeContent = activeContent;\r\n\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n const oldContentControl = oldContent ? activeContentGroup.getControlFromElement(oldContent) : undefined;\r\n const activeContentControl = activeContentGroup.getControlFromElement(this._activeContent);\r\n\r\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\r\n // istanbul ignore else\r\n if (activeContentControl) {\r\n // istanbul ignore next\r\n const doSetActiveView =\r\n forceEventProcessing || (!activeContentControl.viewport ||\r\n (/* istanbul ignore next */ oldContentControl && /* istanbul ignore next */ !oldContentControl.viewport));\r\n\r\n // istanbul ignore else\r\n if (doSetActiveView) {\r\n activeFrontstageDef.setActiveView(activeContentControl, oldContentControl);\r\n this.onActiveContentChangedEvent.emit({ activeContent, oldContent });\r\n } else {\r\n if (activeContentControl.viewport && activeContentControl.viewport !== IModelApp.viewManager.selectedView) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.setSelectedView(activeContentControl.viewport);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Refreshes the active [[ContentControl]] */\r\n public static refreshActiveContent(activeContent: React.ReactNode) {\r\n ContentLayoutManager.refreshActiveLayout();\r\n this.setActiveContent(activeContent, true);\r\n }\r\n\r\n /**\r\n * Determines if content displays a Sheet view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSheetView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSheetView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Drawing view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentDrawingView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isDrawingView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Spatial view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSpatialView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSpatialView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Orthographic view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentOrthographicView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isOrthographicView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a 3d view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContent3dView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.is3dView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if viewport supports use of a camera.\r\n * @param content ContentControl to check\r\n */\r\n public static contentSupportsCamera(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.viewSupportsCamera(content.viewport));\r\n }\r\n\r\n}\r\n"]}
@@ -1,8 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Cursor
3
3
  */
4
- import { PointProps, RelativePosition } from "@itwin/appui-abstract";
5
- import { UiEvent } from "@itwin/core-react";
4
+ import { PointProps, RelativePosition, UiEvent } from "@itwin/appui-abstract";
6
5
  /** Enum for Cursor Direction parts
7
6
  * @public
8
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAS,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;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;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAI;AAE3E;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAsB;IACpD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAgD;IAE/E,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgC;IAEhE,2BAA2B;IAC3B,WAAkB,cAAc,IAAI,UAAU,CAAiC;IAC/E,WAAkB,cAAc,CAAC,EAAE,EAAE,UAAU,EAA8C;IAE7F,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAAmC;IACtE,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAAmC;IAEtE,kDAAkD;IAClD,WAAkB,eAAe,IAAI,eAAe,CAAkC;IAEtF,uCAAuC;IACvC,gBAAuB,oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAUtD,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAQ9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAwB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAkBxC,gEAAgE;WAClD,sCAAsC,CAAC,eAAe,EAAE,eAAe,GAAG,gBAAgB;IAiCxG,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C"}
1
+ {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG9E;;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;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAI;AAE3E;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAsB;IACpD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAgD;IAE/E,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgC;IAEhE,2BAA2B;IAC3B,WAAkB,cAAc,IAAI,UAAU,CAAiC;IAC/E,WAAkB,cAAc,CAAC,EAAE,EAAE,UAAU,EAA8C;IAE7F,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAAmC;IACtE,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAAmC;IAEtE,kDAAkD;IAClD,WAAkB,eAAe,IAAI,eAAe,CAAkC;IAEtF,uCAAuC;IACvC,gBAAuB,oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAUtD,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAQ9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAwB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAkBxC,gEAAgE;WAClD,sCAAsC,CAAC,eAAe,EAAE,eAAe,GAAG,gBAAgB;IAiCxG,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C"}
@@ -38,7 +38,7 @@ var CursorDirection;
38
38
  /** Cursor Updated Event class.
39
39
  * @public
40
40
  */
41
- class CursorUpdatedEvent extends core_react_1.UiEvent {
41
+ class CursorUpdatedEvent extends appui_abstract_1.UiEvent {
42
42
  }
43
43
  exports.CursorUpdatedEvent = CursorUpdatedEvent;
44
44
  /** Cursor Information class
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAqE;AACrE,kDAAmD;AAEnD;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,sDAA8B,CAAA;I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;SACT;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,qBAAqB;QACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;;AAvHH,8CAwHC;AAvHgB,iCAAe,GAAU,IAAI,kBAAK,EAAE,CAAC;AACrC,kCAAgB,GAAoB,eAAe,CAAC,WAAW,CAAC;AAEhE,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAchE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC","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 Cursor\r\n */\r\n\r\nimport { PointProps, RelativePosition } from \"@itwin/appui-abstract\";\r\nimport { Point, UiEvent } from \"@itwin/core-react\";\r\n\r\n/** Enum for Cursor Direction parts\r\n * @public\r\n */\r\nexport enum CursorDirectionParts {\r\n Top = 0x1000,\r\n Left = 0x0100,\r\n Right = 0x0010,\r\n Bottom = 0x0001,\r\n}\r\n\r\n/** Enum for Cursor Direction\r\n * @public\r\n */\r\nexport enum CursorDirection {\r\n None = 0,\r\n Top = CursorDirectionParts.Top,\r\n Left = CursorDirectionParts.Left,\r\n Right = CursorDirectionParts.Right,\r\n Bottom = CursorDirectionParts.Bottom,\r\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\r\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\r\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\r\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\r\n}\r\n\r\n/** Cursor Updated Event Args interface.\r\n * @public\r\n */\r\nexport interface CursorUpdatedEventArgs {\r\n oldPt: PointProps;\r\n newPt: PointProps;\r\n direction: CursorDirection;\r\n}\r\n\r\n/** Cursor Updated Event class.\r\n * @public\r\n */\r\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> { }\r\n\r\n/** Cursor Information class\r\n * @public\r\n */\r\nexport class CursorInformation {\r\n private static _cursorPosition: Point = new Point();\r\n private static _cursorDirection: CursorDirection = CursorDirection.BottomRight;\r\n\r\n private static _cursorDirections = new Array<CursorDirection>();\r\n\r\n /** The cursor position. */\r\n public static get cursorPosition(): PointProps { return this._cursorPosition; }\r\n public static set cursorPosition(pt: PointProps) { this._cursorPosition = Point.create(pt); }\r\n\r\n /** Gets the cursor X position. */\r\n public static get cursorX(): number { return this._cursorPosition.x; }\r\n /** Gets the cursor Y position. */\r\n public static get cursorY(): number { return this._cursorPosition.y; }\r\n\r\n /** Gets the general cursor movement direction. */\r\n public static get cursorDirection(): CursorDirection { return this._cursorDirection; }\r\n\r\n /** Gets the [[CursorUpdatedEvent]]. */\r\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\r\n\r\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\r\n public static handleMouseMove(point: PointProps): void {\r\n const oldPt = CursorInformation.cursorPosition;\r\n const direction = this._determineMostFrequentDirection(this._cursorDirections, this._cursorPosition, Point.create(point));\r\n\r\n this.cursorPosition = point;\r\n this._cursorDirection = direction;\r\n\r\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\r\n }\r\n\r\n private static _determineMostFrequentDirection(cursorDirections: CursorDirection[], oldPt: Point, newPt: Point): CursorDirection {\r\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\r\n cursorDirections.push(cursorDirection);\r\n if (cursorDirections.length > 10)\r\n cursorDirections.shift();\r\n return this._mostFrequent(cursorDirections);\r\n }\r\n\r\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\r\n const hashMap = new Map<CursorDirection, number>();\r\n let maxCount = 0, mostFrequent = CursorDirection.None;\r\n\r\n array.forEach((value: CursorDirection) => {\r\n const key = value;\r\n let frequency = hashMap.get(key);\r\n\r\n if (frequency !== undefined)\r\n frequency++;\r\n else\r\n frequency = 1;\r\n\r\n hashMap.set(key, frequency);\r\n\r\n if (frequency > maxCount) {\r\n mostFrequent = key;\r\n maxCount = frequency;\r\n }\r\n });\r\n\r\n return mostFrequent;\r\n }\r\n\r\n private static _determineCursorDirection(oldPt: Point, newPt: Point): CursorDirection {\r\n let directionParts: number = 0;\r\n\r\n if (newPt.x < oldPt.x)\r\n directionParts |= CursorDirectionParts.Left;\r\n else if (newPt.x > oldPt.x)\r\n directionParts |= CursorDirectionParts.Right;\r\n\r\n if (newPt.y < oldPt.y)\r\n directionParts |= CursorDirectionParts.Top;\r\n else if (newPt.y > oldPt.y)\r\n directionParts |= CursorDirectionParts.Bottom;\r\n\r\n const direction = directionParts as CursorDirection;\r\n\r\n return direction;\r\n }\r\n\r\n /** Gets the relative position based on the cursor direction. */\r\n public static getRelativePositionFromCursorDirection(cursorDirection: CursorDirection): RelativePosition {\r\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\r\n\r\n switch (cursorDirection) {\r\n case CursorDirection.Top:\r\n relativePosition = RelativePosition.Top;\r\n break;\r\n case CursorDirection.Left:\r\n relativePosition = RelativePosition.Left;\r\n break;\r\n case CursorDirection.Right:\r\n relativePosition = RelativePosition.Right;\r\n break;\r\n case CursorDirection.Bottom:\r\n relativePosition = RelativePosition.Bottom;\r\n break;\r\n case CursorDirection.TopLeft:\r\n relativePosition = RelativePosition.TopLeft;\r\n break;\r\n case CursorDirection.TopRight:\r\n relativePosition = RelativePosition.TopRight;\r\n break;\r\n case CursorDirection.BottomLeft:\r\n relativePosition = RelativePosition.BottomLeft;\r\n break;\r\n case CursorDirection.BottomRight:\r\n relativePosition = RelativePosition.BottomRight;\r\n break;\r\n }\r\n\r\n return relativePosition;\r\n }\r\n\r\n /** @internal - for testing */\r\n public static clearCursorDirections(): void {\r\n this._cursorDirections.length = 0;\r\n }\r\n}\r\n"]}
1
+ {"version":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,GAAG,iCAAgB,CAAC,MAAM,CAAC;gBAC3C,MAAM;YACR,KAAK,eAAe,CAAC,OAAO;gBAC1B,gBAAgB,GAAG,iCAAgB,CAAC,OAAO,CAAC;gBAC5C,MAAM;YACR,KAAK,eAAe,CAAC,QAAQ;gBAC3B,gBAAgB,GAAG,iCAAgB,CAAC,QAAQ,CAAC;gBAC7C,MAAM;YACR,KAAK,eAAe,CAAC,UAAU;gBAC7B,gBAAgB,GAAG,iCAAgB,CAAC,UAAU,CAAC;gBAC/C,MAAM;YACR,KAAK,eAAe,CAAC,WAAW;gBAC9B,gBAAgB,GAAG,iCAAgB,CAAC,WAAW,CAAC;gBAChD,MAAM;SACT;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,qBAAqB;QACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;;AAvHH,8CAwHC;AAvHgB,iCAAe,GAAU,IAAI,kBAAK,EAAE,CAAC;AACrC,kCAAgB,GAAoB,eAAe,CAAC,WAAW,CAAC;AAEhE,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAchE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC","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 Cursor\r\n */\r\n\r\nimport { PointProps, RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { Point } from \"@itwin/core-react\";\r\n\r\n/** Enum for Cursor Direction parts\r\n * @public\r\n */\r\nexport enum CursorDirectionParts {\r\n Top = 0x1000,\r\n Left = 0x0100,\r\n Right = 0x0010,\r\n Bottom = 0x0001,\r\n}\r\n\r\n/** Enum for Cursor Direction\r\n * @public\r\n */\r\nexport enum CursorDirection {\r\n None = 0,\r\n Top = CursorDirectionParts.Top,\r\n Left = CursorDirectionParts.Left,\r\n Right = CursorDirectionParts.Right,\r\n Bottom = CursorDirectionParts.Bottom,\r\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\r\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\r\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\r\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\r\n}\r\n\r\n/** Cursor Updated Event Args interface.\r\n * @public\r\n */\r\nexport interface CursorUpdatedEventArgs {\r\n oldPt: PointProps;\r\n newPt: PointProps;\r\n direction: CursorDirection;\r\n}\r\n\r\n/** Cursor Updated Event class.\r\n * @public\r\n */\r\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> { }\r\n\r\n/** Cursor Information class\r\n * @public\r\n */\r\nexport class CursorInformation {\r\n private static _cursorPosition: Point = new Point();\r\n private static _cursorDirection: CursorDirection = CursorDirection.BottomRight;\r\n\r\n private static _cursorDirections = new Array<CursorDirection>();\r\n\r\n /** The cursor position. */\r\n public static get cursorPosition(): PointProps { return this._cursorPosition; }\r\n public static set cursorPosition(pt: PointProps) { this._cursorPosition = Point.create(pt); }\r\n\r\n /** Gets the cursor X position. */\r\n public static get cursorX(): number { return this._cursorPosition.x; }\r\n /** Gets the cursor Y position. */\r\n public static get cursorY(): number { return this._cursorPosition.y; }\r\n\r\n /** Gets the general cursor movement direction. */\r\n public static get cursorDirection(): CursorDirection { return this._cursorDirection; }\r\n\r\n /** Gets the [[CursorUpdatedEvent]]. */\r\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\r\n\r\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\r\n public static handleMouseMove(point: PointProps): void {\r\n const oldPt = CursorInformation.cursorPosition;\r\n const direction = this._determineMostFrequentDirection(this._cursorDirections, this._cursorPosition, Point.create(point));\r\n\r\n this.cursorPosition = point;\r\n this._cursorDirection = direction;\r\n\r\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\r\n }\r\n\r\n private static _determineMostFrequentDirection(cursorDirections: CursorDirection[], oldPt: Point, newPt: Point): CursorDirection {\r\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\r\n cursorDirections.push(cursorDirection);\r\n if (cursorDirections.length > 10)\r\n cursorDirections.shift();\r\n return this._mostFrequent(cursorDirections);\r\n }\r\n\r\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\r\n const hashMap = new Map<CursorDirection, number>();\r\n let maxCount = 0, mostFrequent = CursorDirection.None;\r\n\r\n array.forEach((value: CursorDirection) => {\r\n const key = value;\r\n let frequency = hashMap.get(key);\r\n\r\n if (frequency !== undefined)\r\n frequency++;\r\n else\r\n frequency = 1;\r\n\r\n hashMap.set(key, frequency);\r\n\r\n if (frequency > maxCount) {\r\n mostFrequent = key;\r\n maxCount = frequency;\r\n }\r\n });\r\n\r\n return mostFrequent;\r\n }\r\n\r\n private static _determineCursorDirection(oldPt: Point, newPt: Point): CursorDirection {\r\n let directionParts: number = 0;\r\n\r\n if (newPt.x < oldPt.x)\r\n directionParts |= CursorDirectionParts.Left;\r\n else if (newPt.x > oldPt.x)\r\n directionParts |= CursorDirectionParts.Right;\r\n\r\n if (newPt.y < oldPt.y)\r\n directionParts |= CursorDirectionParts.Top;\r\n else if (newPt.y > oldPt.y)\r\n directionParts |= CursorDirectionParts.Bottom;\r\n\r\n const direction = directionParts as CursorDirection;\r\n\r\n return direction;\r\n }\r\n\r\n /** Gets the relative position based on the cursor direction. */\r\n public static getRelativePositionFromCursorDirection(cursorDirection: CursorDirection): RelativePosition {\r\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\r\n\r\n switch (cursorDirection) {\r\n case CursorDirection.Top:\r\n relativePosition = RelativePosition.Top;\r\n break;\r\n case CursorDirection.Left:\r\n relativePosition = RelativePosition.Left;\r\n break;\r\n case CursorDirection.Right:\r\n relativePosition = RelativePosition.Right;\r\n break;\r\n case CursorDirection.Bottom:\r\n relativePosition = RelativePosition.Bottom;\r\n break;\r\n case CursorDirection.TopLeft:\r\n relativePosition = RelativePosition.TopLeft;\r\n break;\r\n case CursorDirection.TopRight:\r\n relativePosition = RelativePosition.TopRight;\r\n break;\r\n case CursorDirection.BottomLeft:\r\n relativePosition = RelativePosition.BottomLeft;\r\n break;\r\n case CursorDirection.BottomRight:\r\n relativePosition = RelativePosition.BottomRight;\r\n break;\r\n }\r\n\r\n return relativePosition;\r\n }\r\n\r\n /** @internal - for testing */\r\n public static clearCursorDirections(): void {\r\n this._cursorDirections.length = 0;\r\n }\r\n}\r\n"]}
@@ -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,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAmB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKvE;;GAEG;AACH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,oBAAoB,CAAC;IACzF,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAEpC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,oBAAoB,CAKlD;IAEF,OAAO,CAAC,kBAAkB,CAcxB;IAEc,iBAAiB;IAIjB,oBAAoB;IAKpC,OAAO,CAAC,aAAa,CAKnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA0BzC,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;AAE/B,OAAO,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAmB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKvE;;GAEG;AACH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,oBAAoB,CAAC;IACzF,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAEpC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,oBAAoB,CAKlD;IAEF,OAAO,CAAC,kBAAkB,CAcxB;IAEc,iBAAiB;IAIjB,oBAAoB;IAKpC,OAAO,CAAC,aAAa,CAKnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA0BzC,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,WAAW,CAEjB;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"CursorMenu.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,kDAAmE,CAAC,kBAAkB;AACtF,2DAAgE;AAChE,oDAAuE;AACvE,8EAA4F;AAC5F,mDAAgD;AAChD,sDAA6C;AAY7C;;GAEG;AACH,uBAAuB;AACvB,MAAa,eAAgB,SAAQ,KAAK,CAA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AO,EACvB,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,IAEb,0BAAe,CAAC,mBAAmB,CAAC,0BAAe,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAC5E,CAElB,CACP,CAAC;IACJ,CAAC;CASF;AA7ED,0CA6EC","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 Cursor\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps, GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\r\nimport { SessionStateActionId } from \"../../redux/SessionState\";\r\nimport { MenuItemHelpers, MenuItemProps } from \"../../shared/MenuItem\";\r\nimport { SyncUiEventArgs, SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\n\r\n/** State for [[CursorPopupMenu]] component\r\n * @alpha\r\n */\r\ninterface CursorPopupMenuState {\r\n menuX: number;\r\n menuY: number;\r\n menuVisible: boolean;\r\n items?: MenuItemProps[];\r\n}\r\n\r\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\r\n * @alpha\r\n */\r\n// istanbul ignore next\r\nexport class CursorPopupMenu extends React.PureComponent<CommonProps, CursorPopupMenuState> {\r\n private _componentUnmounting = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\r\n private _hostChildWindowId?: string;\r\n\r\n /** @internal */\r\n public override readonly state: CursorPopupMenuState = {\r\n menuX: 0,\r\n menuY: 0,\r\n menuVisible: false,\r\n items: undefined,\r\n };\r\n\r\n private _handleSyncUiEvent = (args: SyncUiEventArgs): void => {\r\n /* istanbul ignore next */\r\n if (this._componentUnmounting)\r\n return;\r\n\r\n /* istanbul ignore else */\r\n if (SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [SessionStateActionId.UpdateCursorMenu])) {\r\n const menuData = UiFramework.getCursorMenuData();\r\n if (menuData && this._hostChildWindowId === menuData.childWindowId) {\r\n this.setState({ menuVisible: menuData.items && menuData.items.length > 0, items: menuData.items, menuX: menuData.position.x, menuY: menuData.position.y });\r\n } else {\r\n this.setState({ menuVisible: false, items: undefined });\r\n }\r\n }\r\n };\r\n\r\n public override componentDidMount() {\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._componentUnmounting = true;\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\r\n }\r\n\r\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\r\n const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;\r\n // if the window is not a pop out set to undefined\r\n this._hostChildWindowId = UiFramework.childWindowManager.findChildWindowId(parentWindow);\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `Cursor Menu for ${this._hostChildWindowId ?? \"main\"} window`);\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const { menuX, menuY, items, menuVisible } = this.state;\r\n const onClose = this._hideContextMenu;\r\n\r\n return (\r\n <div className=\"uifw-cursor-menu-container-div\" ref={this._handleRefSet}>\r\n {items && items.length > 0 && menuVisible &&\r\n <GlobalContextMenu\r\n className={this.props.className}\r\n style={this.props.style}\r\n identifier=\"cursor-popup-menu\"\r\n x={menuX}\r\n y={menuY}\r\n opened={menuVisible}\r\n onEsc={onClose}\r\n onOutsideClick={onClose}\r\n edgeLimit={false}\r\n autoflip={true}\r\n >\r\n {MenuItemHelpers.createMenuItemNodes(MenuItemHelpers.createMenuItems(items, this._itemPicked))}\r\n </GlobalContextMenu>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private _hideContextMenu = () => {\r\n this.setState({ menuVisible: false });\r\n };\r\n\r\n private _itemPicked = (): void => {\r\n this._hideContextMenu();\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"CursorMenu.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,kDAAmE,CAAC,kBAAkB;AACtF,2DAAgE;AAChE,oDAAuE;AACvE,8EAA2E;AAC3E,mDAAgD;AAChD,sDAA6C;AAY7C;;GAEG;AACH,uBAAuB;AACvB,MAAa,eAAgB,SAAQ,KAAK,CAAC,aAAgD;IAA3F;;QACU,yBAAoB,GAAG,KAAK,CAAC,CAAE,mGAAmG;QAG1I,gBAAgB;QACS,UAAK,GAAyB;YACrD,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,KAAK;YAClB,KAAK,EAAE,SAAS;SACjB,CAAC;QAEM,uBAAkB,GAAG,CAAC,IAAqB,EAAQ,EAAE;YAC3D,0BAA0B;YAC1B,IAAI,IAAI,CAAC,oBAAoB;gBAC3B,OAAO;YAET,0BAA0B;YAC1B,IAAI,6CAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,mCAAoB,CAAC,gBAAgB,CAAC,CAAC,EAAE;gBACpG,MAAM,QAAQ,GAAG,yBAAW,CAAC,iBAAiB,EAAE,CAAC;gBACjD,IAAI,QAAQ,IAAI,IAAI,CAAC,kBAAkB,KAAK,QAAQ,CAAC,aAAa,EAAE;oBAClE,IAAI,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;iBAC5J;qBAAM;oBACL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EAAC,GAAG,EAAE,IAAI,CAAC,aAAa,IACpE,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW;YACvC,oBAAC,8BAAiB,IAChB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,UAAU,EAAC,mBAAmB,EAC9B,CAAC,EAAE,KAAK,EACR,CAAC,EAAE,KAAK,EACR,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,OAAO,EACvB,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,IAEb,0BAAe,CAAC,mBAAmB,CAAC,0BAAe,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAC5E,CAElB,CACP,CAAC;IACJ,CAAC;CASF;AA7ED,0CA6EC","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 Cursor\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\r\nimport { SessionStateActionId } from \"../../redux/SessionState\";\r\nimport { MenuItemHelpers, MenuItemProps } from \"../../shared/MenuItem\";\r\nimport { SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\n\r\n/** State for [[CursorPopupMenu]] component\r\n * @alpha\r\n */\r\ninterface CursorPopupMenuState {\r\n menuX: number;\r\n menuY: number;\r\n menuVisible: boolean;\r\n items?: MenuItemProps[];\r\n}\r\n\r\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\r\n * @alpha\r\n */\r\n// istanbul ignore next\r\nexport class CursorPopupMenu extends React.PureComponent<CommonProps, CursorPopupMenuState> {\r\n private _componentUnmounting = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\r\n private _hostChildWindowId?: string;\r\n\r\n /** @internal */\r\n public override readonly state: CursorPopupMenuState = {\r\n menuX: 0,\r\n menuY: 0,\r\n menuVisible: false,\r\n items: undefined,\r\n };\r\n\r\n private _handleSyncUiEvent = (args: UiSyncEventArgs): void => {\r\n /* istanbul ignore next */\r\n if (this._componentUnmounting)\r\n return;\r\n\r\n /* istanbul ignore else */\r\n if (SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [SessionStateActionId.UpdateCursorMenu])) {\r\n const menuData = UiFramework.getCursorMenuData();\r\n if (menuData && this._hostChildWindowId === menuData.childWindowId) {\r\n this.setState({ menuVisible: menuData.items && menuData.items.length > 0, items: menuData.items, menuX: menuData.position.x, menuY: menuData.position.y });\r\n } else {\r\n this.setState({ menuVisible: false, items: undefined });\r\n }\r\n }\r\n };\r\n\r\n public override componentDidMount() {\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._componentUnmounting = true;\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\r\n }\r\n\r\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\r\n const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;\r\n // if the window is not a pop out set to undefined\r\n this._hostChildWindowId = UiFramework.childWindowManager.findChildWindowId(parentWindow);\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `Cursor Menu for ${this._hostChildWindowId ?? \"main\"} window`);\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const { menuX, menuY, items, menuVisible } = this.state;\r\n const onClose = this._hideContextMenu;\r\n\r\n return (\r\n <div className=\"uifw-cursor-menu-container-div\" ref={this._handleRefSet}>\r\n {items && items.length > 0 && menuVisible &&\r\n <GlobalContextMenu\r\n className={this.props.className}\r\n style={this.props.style}\r\n identifier=\"cursor-popup-menu\"\r\n x={menuX}\r\n y={menuY}\r\n opened={menuVisible}\r\n onEsc={onClose}\r\n onOutsideClick={onClose}\r\n edgeLimit={false}\r\n autoflip={true}\r\n >\r\n {MenuItemHelpers.createMenuItemNodes(MenuItemHelpers.createMenuItems(items, this._itemPicked))}\r\n </GlobalContextMenu>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private _hideContextMenu = () => {\r\n this.setState({ menuVisible: false });\r\n };\r\n\r\n private _itemPicked = (): void => {\r\n this._hideContextMenu();\r\n };\r\n}\r\n"]}
@@ -2,8 +2,8 @@
2
2
  * @module Cursor
3
3
  */
4
4
  import * as React from "react";
5
- import { PointProps, RelativePosition } from "@itwin/appui-abstract";
6
- import { Point, Size, UiEvent } from "@itwin/core-react";
5
+ import { PointProps, RelativePosition, UiEvent } from "@itwin/appui-abstract";
6
+ import { Point, Size } from "@itwin/core-react";
7
7
  /** Options for the [[CursorPopupManager]] open method
8
8
  * @public
9
9
  */
@@ -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;AAE/B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAkB,IAAI,EAAa,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIpF;;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,MAA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D9B,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,YAAY;IAqBJ,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAK5C,OAAO,CAAC,wBAAwB,CAE9B;IAEF,OAAO,CAAC,qCAAqC,CAE3C;CACH"}
@@ -17,19 +17,19 @@ const CursorPopup_1 = require("./CursorPopup");
17
17
  /** CursorPopup Update Position Event class.
18
18
  * @internal
19
19
  */
20
- class CursorPopupUpdatePositionEvent extends core_react_1.UiEvent {
20
+ class CursorPopupUpdatePositionEvent extends appui_abstract_1.UiEvent {
21
21
  }
22
22
  exports.CursorPopupUpdatePositionEvent = CursorPopupUpdatePositionEvent;
23
23
  /** CursorPopup FadeOut Event class.
24
24
  * @internal
25
25
  */
26
- class CursorPopupFadeOutEvent extends core_react_1.UiEvent {
26
+ class CursorPopupFadeOutEvent extends appui_abstract_1.UiEvent {
27
27
  }
28
28
  exports.CursorPopupFadeOutEvent = CursorPopupFadeOutEvent;
29
29
  /** Cursor Popups Changed Event class.
30
30
  * @internal
31
31
  */
32
- class CursorPopupsChangedEvent extends core_react_1.UiEvent {
32
+ class CursorPopupsChangedEvent extends appui_abstract_1.UiEvent {
33
33
  }
34
34
  /** CursorPopup component
35
35
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPopupManager.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAC7C,0DAAqE;AACrE,kDAAoF;AACpF,mDAAgD;AAChD,+CAA4C;AAuB5C;;GAEG;AACH,MAAa,8BAA+B,SAAQ,oBAA2C;CAAI;AAAnG,wEAAmG;AASnG;;GAEG;AACH,MAAa,uBAAwB,SAAQ,oBAAoC;CAAI;AAArF,0DAAqF;AAiBrF;;GAEG;AACH,MAAM,wBAAyB,SAAQ,oBAAW;CAAI;AAEtD;;GAEG;AACH,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CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC;gBACnE,MAAM;YACR,KAAK,iCAAgB,CAAC,IAAI,CAAC;YAC3B,KAAK,iCAAgB,CAAC,KAAK;gBACzB,SAAS,GAAG,kBAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnE,MAAM;SACT;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEe,iBAAiB;QAC/B,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACzF,kBAAkB,CAAC,gCAAgC,CAAC,WAAW,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAC9G,CAAC;IAEe,oBAAoB;QAClC,kBAAkB,CAAC,0BAA0B,CAAC,cAAc,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5F,kBAAkB,CAAC,gCAAgC,CAAC,cAAc,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACjH,CAAC;CASF;AAnJD,kDAmJC","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 Cursor\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { PointProps, RelativePosition } from \"@itwin/appui-abstract\";\r\nimport { Point, RectangleProps, Size, SizeProps, UiEvent } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { CursorPopup } from \"./CursorPopup\";\r\n\r\n/** Options for the [[CursorPopupManager]] open method\r\n * @public\r\n */\r\nexport interface CursorPopupOptions {\r\n /** Title of the popup */\r\n title?: string;\r\n /** Called on popup close */\r\n onClose?: () => void;\r\n /** Callback to apply changes */\r\n onApply?: () => void;\r\n /** Draw shadow */\r\n shadow?: boolean;\r\n}\r\n\r\n/** CursorPopup Update Position Event Args interface.\r\n * @internal\r\n */\r\nexport interface CursorPopupUpdatePositionEventArgs {\r\n pt: PointProps;\r\n}\r\n\r\n/** CursorPopup Update Position Event class.\r\n * @internal\r\n */\r\nexport class CursorPopupUpdatePositionEvent extends UiEvent<CursorPopupUpdatePositionEventArgs> { }\r\n\r\n/** CursorPopup FadeOut Event Args interface.\r\n * @internal\r\n */\r\nexport interface CursorPopupFadeOutEventArgs {\r\n id: string;\r\n}\r\n\r\n/** CursorPopup FadeOut Event class.\r\n * @internal\r\n */\r\nexport class CursorPopupFadeOutEvent extends UiEvent<CursorPopupFadeOutEventArgs> { }\r\n\r\n/** Information maintained by CursorPopupManager about a CursorPopup\r\n * @internal\r\n */\r\ninterface CursorPopupInfo {\r\n id: string;\r\n content: React.ReactNode;\r\n relativePosition: RelativePosition;\r\n offset: Point;\r\n priority: number;\r\n options?: CursorPopupOptions;\r\n\r\n renderRelativePosition: RelativePosition;\r\n popupSize?: Size;\r\n}\r\n\r\n/** Cursor Popups Changed Event class.\r\n * @internal\r\n */\r\nclass CursorPopupsChangedEvent extends UiEvent<{}> { }\r\n\r\n/** CursorPopup component\r\n * @public\r\n */\r\nexport class CursorPopupManager {\r\n private static _popups: CursorPopupInfo[] = new Array<CursorPopupInfo>();\r\n\r\n /** @internal */\r\n public static readonly onCursorPopupUpdatePositionEvent = new CursorPopupUpdatePositionEvent();\r\n /** @internal */\r\n public static readonly onCursorPopupFadeOutEvent = new CursorPopupFadeOutEvent();\r\n /** @internal */\r\n public static readonly onCursorPopupsChangedEvent = new CursorPopupsChangedEvent();\r\n /** @internal */\r\n public static clearPopups() {\r\n this._popups.length = 0;\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n\r\n public static get popups() { return this._popups; }\r\n\r\n public static get popupCount() { return this._popups.length; }\r\n\r\n private static _emitPopupsChangedEvent(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.emit({});\r\n }\r\n\r\n private static pushPopup(popupInfo: CursorPopupInfo): void {\r\n CursorPopupManager._popups.push(popupInfo);\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n\r\n /** Called to open popup with a new set of properties\r\n */\r\n public static open(id: string, content: React.ReactNode, pt: PointProps, offset: PointProps, relativePosition: RelativePosition, priority: number = 0, options?: CursorPopupOptions) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n if (popupInfo) {\r\n popupInfo.content = content;\r\n popupInfo.offset = Point.create(offset);\r\n popupInfo.relativePosition = relativePosition;\r\n popupInfo.renderRelativePosition = relativePosition;\r\n popupInfo.priority = priority;\r\n popupInfo.options = options;\r\n } else {\r\n const newPopupInfo: CursorPopupInfo = { id, content, offset: Point.create(offset), relativePosition, options, renderRelativePosition: relativePosition, priority };\r\n CursorPopupManager.pushPopup(newPopupInfo);\r\n }\r\n\r\n CursorPopupManager.updatePosition(pt);\r\n }\r\n\r\n /** Called to update popup with a new set of properties\r\n */\r\n public static update(id: string, content: React.ReactNode, pt: PointProps, offset: PointProps, relativePosition: RelativePosition, priority: number = 0) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n if (popupInfo) {\r\n popupInfo.content = content;\r\n popupInfo.offset = Point.create(offset);\r\n popupInfo.relativePosition = relativePosition;\r\n popupInfo.renderRelativePosition = relativePosition;\r\n popupInfo.priority = priority;\r\n } else {\r\n Logger.logError(UiFramework.loggerCategory(this), `update: Could not find popup with id of '${id}'`);\r\n }\r\n\r\n CursorPopupManager.updatePosition(pt);\r\n }\r\n\r\n /** Called to move the open popup to new location\r\n */\r\n public static updatePosition(pt: PointProps) {\r\n CursorPopupManager.resetPopupsRenderRelativePosition(Point.create(pt));\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.emit({ pt });\r\n }\r\n\r\n /** Called when tool wants to close the popup\r\n */\r\n public static close(id: string, apply: boolean, fadeOut?: boolean) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n\r\n if (popupInfo) {\r\n if (popupInfo.options) {\r\n if (apply && popupInfo.options.onApply)\r\n popupInfo.options.onApply();\r\n\r\n if (popupInfo.options.onClose)\r\n popupInfo.options.onClose();\r\n }\r\n\r\n if (fadeOut) {\r\n CursorPopupManager.onCursorPopupFadeOutEvent.emit({ id });\r\n setTimeout(() => {\r\n CursorPopupManager.removePopup(id);\r\n }, CursorPopup.fadeOutTime);\r\n\r\n } else {\r\n CursorPopupManager.removePopup(id);\r\n }\r\n } else {\r\n Logger.logError(UiFramework.loggerCategory(this), `close: Could not find popup with id of '${id}'`);\r\n }\r\n }\r\n\r\n private static removePopup(id: string): void {\r\n const index = CursorPopupManager._popups.findIndex((popupInfo: CursorPopupInfo) => id === popupInfo.id);\r\n // istanbul ignore else\r\n if (index >= 0) {\r\n CursorPopupManager._popups.splice(index, 1);\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n }\r\n\r\n private static resetPopupsRenderRelativePosition(pt: Point) {\r\n CursorPopupManager.popups.forEach((popupInfo: CursorPopupInfo) => {\r\n popupInfo.renderRelativePosition = popupInfo.relativePosition;\r\n\r\n const flipped = CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\r\n\r\n // If flipped, call again to validate again.\r\n if (flipped) {\r\n CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\r\n }\r\n });\r\n }\r\n\r\n private static validateRenderRelativePosition(pt: Point, popupInfo: CursorPopupInfo): boolean {\r\n const popupRect = CursorPopup.getPopupRect(pt, Point.create(popupInfo.offset), popupInfo.popupSize, popupInfo.renderRelativePosition);\r\n const { outPos, flipped } = CursorPopupManager.autoFlip(popupInfo.renderRelativePosition, popupRect, window.innerWidth, window.innerHeight);\r\n\r\n if (flipped)\r\n popupInfo.renderRelativePosition = outPos;\r\n\r\n return flipped;\r\n }\r\n\r\n private static autoFlip(inPos: RelativePosition, rect: RectangleProps, windowWidth: number, windowHeight: number): { outPos: RelativePosition, flipped: boolean } {\r\n let flipped = false;\r\n let outPos = inPos;\r\n\r\n if (rect.right > windowWidth) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Top:\r\n case RelativePosition.TopRight:\r\n outPos = RelativePosition.TopLeft;\r\n break;\r\n case RelativePosition.Right:\r\n outPos = RelativePosition.Left;\r\n break;\r\n case RelativePosition.Bottom:\r\n case RelativePosition.BottomRight:\r\n outPos = RelativePosition.BottomLeft;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.left < 0) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Top:\r\n case RelativePosition.TopLeft:\r\n outPos = RelativePosition.TopRight;\r\n break;\r\n case RelativePosition.Left:\r\n outPos = RelativePosition.Right;\r\n break;\r\n case RelativePosition.Bottom:\r\n case RelativePosition.BottomLeft:\r\n outPos = RelativePosition.BottomRight;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.bottom > windowHeight) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Left:\r\n case RelativePosition.BottomLeft:\r\n outPos = RelativePosition.TopLeft;\r\n break;\r\n case RelativePosition.Bottom:\r\n outPos = RelativePosition.Top;\r\n break;\r\n case RelativePosition.Right:\r\n case RelativePosition.BottomRight:\r\n outPos = RelativePosition.TopRight;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.top < 0) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Left:\r\n case RelativePosition.TopLeft:\r\n outPos = RelativePosition.BottomLeft;\r\n break;\r\n case RelativePosition.Top:\r\n outPos = RelativePosition.Bottom;\r\n break;\r\n case RelativePosition.Right:\r\n case RelativePosition.TopRight:\r\n outPos = RelativePosition.BottomRight;\r\n break;\r\n }\r\n }\r\n\r\n return { outPos, flipped };\r\n }\r\n\r\n}\r\n\r\n/** State for the [[CursorPopupRenderer]] React component */\r\ninterface CursorPopupRendererState {\r\n pt: Point;\r\n}\r\n\r\n/** CursorPopupRenderer React component.\r\n * @public\r\n */\r\nexport class CursorPopupRenderer extends React.Component<any, CursorPopupRendererState> {\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n pt: new Point(),\r\n };\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n if (CursorPopupManager.popupCount <= 0)\r\n return null;\r\n\r\n return (\r\n <>\r\n {this.renderPositions()}\r\n </>\r\n );\r\n }\r\n\r\n private _handleSizeKnown(popupInfo: CursorPopupInfo, size: SizeProps) {\r\n popupInfo.popupSize = Size.create(size);\r\n }\r\n\r\n private renderPositions(): React.ReactNode[] {\r\n const positions = new Array<React.ReactNode>();\r\n let renderedPosition: React.ReactNode;\r\n const begin = RelativePosition.Left;\r\n const end = RelativePosition.BottomRight;\r\n\r\n for (let position = begin; position <= end; position++) {\r\n renderedPosition = this.renderRelativePosition(position);\r\n if (renderedPosition)\r\n positions.push(renderedPosition);\r\n }\r\n\r\n return positions;\r\n }\r\n\r\n private renderRelativePosition(relativePosition: RelativePosition): React.ReactNode {\r\n const filteredInfo = CursorPopupManager.popups.filter((popupInfo: CursorPopupInfo) => popupInfo.renderRelativePosition === relativePosition);\r\n\r\n if (filteredInfo.length > 0) {\r\n let totalDimension = 0;\r\n const ascending =\r\n relativePosition === RelativePosition.Right ||\r\n relativePosition === RelativePosition.BottomRight ||\r\n relativePosition === RelativePosition.Bottom ||\r\n relativePosition === RelativePosition.BottomLeft;\r\n\r\n const positionPopups = filteredInfo\r\n .sort((a: CursorPopupInfo, b: CursorPopupInfo): number => ascending ? a.priority - b.priority : b.priority - a.priority)\r\n .map((popupInfo: CursorPopupInfo, index: number) => {\r\n\r\n const title = (popupInfo.options !== undefined) ? popupInfo.options.title : \"\";\r\n const shadow = (popupInfo.options !== undefined) ? popupInfo.options.shadow : false;\r\n let offset = popupInfo.offset;\r\n\r\n if (index > 0)\r\n offset = this.adjustOffset(offset, popupInfo.renderRelativePosition, totalDimension);\r\n\r\n if (popupInfo.popupSize)\r\n totalDimension += this.getDimension(popupInfo.popupSize, relativePosition);\r\n\r\n return (\r\n <CursorPopup key={popupInfo.id}\r\n id={popupInfo.id}\r\n content={popupInfo.content}\r\n pt={this.state.pt}\r\n offset={offset}\r\n relativePosition={popupInfo.renderRelativePosition}\r\n title={title}\r\n shadow={shadow}\r\n onSizeKnown={(size: SizeProps) => this._handleSizeKnown(popupInfo, size)} />\r\n );\r\n });\r\n\r\n return (\r\n <React.Fragment key={relativePosition.toString()}>\r\n {positionPopups}\r\n </React.Fragment>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private getDimension(popupSize: Size, relativePosition: RelativePosition): number {\r\n let dimension = 0;\r\n\r\n switch (relativePosition) {\r\n case RelativePosition.Top:\r\n case RelativePosition.Bottom:\r\n case RelativePosition.TopLeft:\r\n case RelativePosition.TopRight:\r\n case RelativePosition.BottomLeft:\r\n case RelativePosition.BottomRight:\r\n dimension = popupSize.height;\r\n break;\r\n case RelativePosition.Left:\r\n case RelativePosition.Right:\r\n dimension = popupSize.width;\r\n break;\r\n }\r\n\r\n return dimension;\r\n }\r\n\r\n private adjustOffset(offset: Point, relativePosition: RelativePosition, dimension: number): Point {\r\n let outOffset = Point.create(offset.toProps());\r\n\r\n switch (relativePosition) {\r\n case RelativePosition.Top:\r\n case RelativePosition.Bottom:\r\n case RelativePosition.TopLeft:\r\n case RelativePosition.TopRight:\r\n case RelativePosition.BottomLeft:\r\n case RelativePosition.BottomRight:\r\n outOffset = Point.create({ x: offset.x, y: offset.y + dimension });\r\n break;\r\n case RelativePosition.Left:\r\n case RelativePosition.Right:\r\n outOffset = Point.create({ x: offset.x + dimension, y: offset.y });\r\n break;\r\n }\r\n\r\n return outOffset;\r\n }\r\n\r\n public override componentDidMount(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.addListener(this._handlePopupChangedEvent);\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.addListener(this._handleCursorPopupUpdatePositionEvent);\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.removeListener(this._handlePopupChangedEvent);\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.removeListener(this._handleCursorPopupUpdatePositionEvent);\r\n }\r\n\r\n private _handlePopupChangedEvent = (_args: any) => {\r\n this.forceUpdate();\r\n };\r\n\r\n private _handleCursorPopupUpdatePositionEvent = (args: CursorPopupUpdatePositionEventArgs) => {\r\n this.setState({ pt: Point.create(args.pt) });\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"CursorPopupManager.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAC7C,0DAA8E;AAC9E,kDAA2E;AAC3E,mDAAgD;AAChD,+CAA4C;AAuB5C;;GAEG;AACH,MAAa,8BAA+B,SAAQ,wBAA2C;CAAI;AAAnG,wEAAmG;AASnG;;GAEG;AACH,MAAa,uBAAwB,SAAQ,wBAAoC;CAAI;AAArF,0DAAqF;AAiBrF;;GAEG;AACH,MAAM,wBAAyB,SAAQ,wBAAW;CAAI;AAEtD;;GAEG;AACH,MAAa,kBAAkB;IAS7B,gBAAgB;IACT,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACxB,kBAAkB,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAEM,MAAM,KAAK,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,KAAK,UAAU,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAEtD,MAAM,CAAC,uBAAuB;QACpC,kBAAkB,CAAC,0BAA0B,CAA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,SAAS,CAAC;IACnB,CAAC;IAEe,iBAAiB;QAC/B,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACzF,kBAAkB,CAAC,gCAAgC,CAAC,WAAW,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAC9G,CAAC;IAEe,oBAAoB;QAClC,kBAAkB,CAAC,0BAA0B,CAAC,cAAc,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5F,kBAAkB,CAAC,gCAAgC,CAAC,cAAc,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACjH,CAAC;CASF;AAnJD,kDAmJC","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 Cursor\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { PointProps, RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { Point, RectangleProps, Size, SizeProps } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { CursorPopup } from \"./CursorPopup\";\r\n\r\n/** Options for the [[CursorPopupManager]] open method\r\n * @public\r\n */\r\nexport interface CursorPopupOptions {\r\n /** Title of the popup */\r\n title?: string;\r\n /** Called on popup close */\r\n onClose?: () => void;\r\n /** Callback to apply changes */\r\n onApply?: () => void;\r\n /** Draw shadow */\r\n shadow?: boolean;\r\n}\r\n\r\n/** CursorPopup Update Position Event Args interface.\r\n * @internal\r\n */\r\nexport interface CursorPopupUpdatePositionEventArgs {\r\n pt: PointProps;\r\n}\r\n\r\n/** CursorPopup Update Position Event class.\r\n * @internal\r\n */\r\nexport class CursorPopupUpdatePositionEvent extends UiEvent<CursorPopupUpdatePositionEventArgs> { }\r\n\r\n/** CursorPopup FadeOut Event Args interface.\r\n * @internal\r\n */\r\nexport interface CursorPopupFadeOutEventArgs {\r\n id: string;\r\n}\r\n\r\n/** CursorPopup FadeOut Event class.\r\n * @internal\r\n */\r\nexport class CursorPopupFadeOutEvent extends UiEvent<CursorPopupFadeOutEventArgs> { }\r\n\r\n/** Information maintained by CursorPopupManager about a CursorPopup\r\n * @internal\r\n */\r\ninterface CursorPopupInfo {\r\n id: string;\r\n content: React.ReactNode;\r\n relativePosition: RelativePosition;\r\n offset: Point;\r\n priority: number;\r\n options?: CursorPopupOptions;\r\n\r\n renderRelativePosition: RelativePosition;\r\n popupSize?: Size;\r\n}\r\n\r\n/** Cursor Popups Changed Event class.\r\n * @internal\r\n */\r\nclass CursorPopupsChangedEvent extends UiEvent<{}> { }\r\n\r\n/** CursorPopup component\r\n * @public\r\n */\r\nexport class CursorPopupManager {\r\n private static _popups: CursorPopupInfo[] = new Array<CursorPopupInfo>();\r\n\r\n /** @internal */\r\n public static readonly onCursorPopupUpdatePositionEvent = new CursorPopupUpdatePositionEvent();\r\n /** @internal */\r\n public static readonly onCursorPopupFadeOutEvent = new CursorPopupFadeOutEvent();\r\n /** @internal */\r\n public static readonly onCursorPopupsChangedEvent = new CursorPopupsChangedEvent();\r\n /** @internal */\r\n public static clearPopups() {\r\n this._popups.length = 0;\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n\r\n public static get popups() { return this._popups; }\r\n\r\n public static get popupCount() { return this._popups.length; }\r\n\r\n private static _emitPopupsChangedEvent(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.emit({});\r\n }\r\n\r\n private static pushPopup(popupInfo: CursorPopupInfo): void {\r\n CursorPopupManager._popups.push(popupInfo);\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n\r\n /** Called to open popup with a new set of properties\r\n */\r\n public static open(id: string, content: React.ReactNode, pt: PointProps, offset: PointProps, relativePosition: RelativePosition, priority: number = 0, options?: CursorPopupOptions) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n if (popupInfo) {\r\n popupInfo.content = content;\r\n popupInfo.offset = Point.create(offset);\r\n popupInfo.relativePosition = relativePosition;\r\n popupInfo.renderRelativePosition = relativePosition;\r\n popupInfo.priority = priority;\r\n popupInfo.options = options;\r\n } else {\r\n const newPopupInfo: CursorPopupInfo = { id, content, offset: Point.create(offset), relativePosition, options, renderRelativePosition: relativePosition, priority };\r\n CursorPopupManager.pushPopup(newPopupInfo);\r\n }\r\n\r\n CursorPopupManager.updatePosition(pt);\r\n }\r\n\r\n /** Called to update popup with a new set of properties\r\n */\r\n public static update(id: string, content: React.ReactNode, pt: PointProps, offset: PointProps, relativePosition: RelativePosition, priority: number = 0) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n if (popupInfo) {\r\n popupInfo.content = content;\r\n popupInfo.offset = Point.create(offset);\r\n popupInfo.relativePosition = relativePosition;\r\n popupInfo.renderRelativePosition = relativePosition;\r\n popupInfo.priority = priority;\r\n } else {\r\n Logger.logError(UiFramework.loggerCategory(this), `update: Could not find popup with id of '${id}'`);\r\n }\r\n\r\n CursorPopupManager.updatePosition(pt);\r\n }\r\n\r\n /** Called to move the open popup to new location\r\n */\r\n public static updatePosition(pt: PointProps) {\r\n CursorPopupManager.resetPopupsRenderRelativePosition(Point.create(pt));\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.emit({ pt });\r\n }\r\n\r\n /** Called when tool wants to close the popup\r\n */\r\n public static close(id: string, apply: boolean, fadeOut?: boolean) {\r\n const popupInfo = CursorPopupManager._popups.find((info: CursorPopupInfo) => id === info.id);\r\n\r\n if (popupInfo) {\r\n if (popupInfo.options) {\r\n if (apply && popupInfo.options.onApply)\r\n popupInfo.options.onApply();\r\n\r\n if (popupInfo.options.onClose)\r\n popupInfo.options.onClose();\r\n }\r\n\r\n if (fadeOut) {\r\n CursorPopupManager.onCursorPopupFadeOutEvent.emit({ id });\r\n setTimeout(() => {\r\n CursorPopupManager.removePopup(id);\r\n }, CursorPopup.fadeOutTime);\r\n\r\n } else {\r\n CursorPopupManager.removePopup(id);\r\n }\r\n } else {\r\n Logger.logError(UiFramework.loggerCategory(this), `close: Could not find popup with id of '${id}'`);\r\n }\r\n }\r\n\r\n private static removePopup(id: string): void {\r\n const index = CursorPopupManager._popups.findIndex((popupInfo: CursorPopupInfo) => id === popupInfo.id);\r\n // istanbul ignore else\r\n if (index >= 0) {\r\n CursorPopupManager._popups.splice(index, 1);\r\n CursorPopupManager._emitPopupsChangedEvent();\r\n }\r\n }\r\n\r\n private static resetPopupsRenderRelativePosition(pt: Point) {\r\n CursorPopupManager.popups.forEach((popupInfo: CursorPopupInfo) => {\r\n popupInfo.renderRelativePosition = popupInfo.relativePosition;\r\n\r\n const flipped = CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\r\n\r\n // If flipped, call again to validate again.\r\n if (flipped) {\r\n CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\r\n }\r\n });\r\n }\r\n\r\n private static validateRenderRelativePosition(pt: Point, popupInfo: CursorPopupInfo): boolean {\r\n const popupRect = CursorPopup.getPopupRect(pt, Point.create(popupInfo.offset), popupInfo.popupSize, popupInfo.renderRelativePosition);\r\n const { outPos, flipped } = CursorPopupManager.autoFlip(popupInfo.renderRelativePosition, popupRect, window.innerWidth, window.innerHeight);\r\n\r\n if (flipped)\r\n popupInfo.renderRelativePosition = outPos;\r\n\r\n return flipped;\r\n }\r\n\r\n private static autoFlip(inPos: RelativePosition, rect: RectangleProps, windowWidth: number, windowHeight: number): { outPos: RelativePosition, flipped: boolean } {\r\n let flipped = false;\r\n let outPos = inPos;\r\n\r\n if (rect.right > windowWidth) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Top:\r\n case RelativePosition.TopRight:\r\n outPos = RelativePosition.TopLeft;\r\n break;\r\n case RelativePosition.Right:\r\n outPos = RelativePosition.Left;\r\n break;\r\n case RelativePosition.Bottom:\r\n case RelativePosition.BottomRight:\r\n outPos = RelativePosition.BottomLeft;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.left < 0) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Top:\r\n case RelativePosition.TopLeft:\r\n outPos = RelativePosition.TopRight;\r\n break;\r\n case RelativePosition.Left:\r\n outPos = RelativePosition.Right;\r\n break;\r\n case RelativePosition.Bottom:\r\n case RelativePosition.BottomLeft:\r\n outPos = RelativePosition.BottomRight;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.bottom > windowHeight) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Left:\r\n case RelativePosition.BottomLeft:\r\n outPos = RelativePosition.TopLeft;\r\n break;\r\n case RelativePosition.Bottom:\r\n outPos = RelativePosition.Top;\r\n break;\r\n case RelativePosition.Right:\r\n case RelativePosition.BottomRight:\r\n outPos = RelativePosition.TopRight;\r\n break;\r\n }\r\n }\r\n\r\n if (rect.top < 0) {\r\n flipped = true;\r\n switch (inPos) {\r\n case RelativePosition.Left:\r\n case RelativePosition.TopLeft:\r\n outPos = RelativePosition.BottomLeft;\r\n break;\r\n case RelativePosition.Top:\r\n outPos = RelativePosition.Bottom;\r\n break;\r\n case RelativePosition.Right:\r\n case RelativePosition.TopRight:\r\n outPos = RelativePosition.BottomRight;\r\n break;\r\n }\r\n }\r\n\r\n return { outPos, flipped };\r\n }\r\n\r\n}\r\n\r\n/** State for the [[CursorPopupRenderer]] React component */\r\ninterface CursorPopupRendererState {\r\n pt: Point;\r\n}\r\n\r\n/** CursorPopupRenderer React component.\r\n * @public\r\n */\r\nexport class CursorPopupRenderer extends React.Component<any, CursorPopupRendererState> {\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n pt: new Point(),\r\n };\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n if (CursorPopupManager.popupCount <= 0)\r\n return null;\r\n\r\n return (\r\n <>\r\n {this.renderPositions()}\r\n </>\r\n );\r\n }\r\n\r\n private _handleSizeKnown(popupInfo: CursorPopupInfo, size: SizeProps) {\r\n popupInfo.popupSize = Size.create(size);\r\n }\r\n\r\n private renderPositions(): React.ReactNode[] {\r\n const positions = new Array<React.ReactNode>();\r\n let renderedPosition: React.ReactNode;\r\n const begin = RelativePosition.Left;\r\n const end = RelativePosition.BottomRight;\r\n\r\n for (let position = begin; position <= end; position++) {\r\n renderedPosition = this.renderRelativePosition(position);\r\n if (renderedPosition)\r\n positions.push(renderedPosition);\r\n }\r\n\r\n return positions;\r\n }\r\n\r\n private renderRelativePosition(relativePosition: RelativePosition): React.ReactNode {\r\n const filteredInfo = CursorPopupManager.popups.filter((popupInfo: CursorPopupInfo) => popupInfo.renderRelativePosition === relativePosition);\r\n\r\n if (filteredInfo.length > 0) {\r\n let totalDimension = 0;\r\n const ascending =\r\n relativePosition === RelativePosition.Right ||\r\n relativePosition === RelativePosition.BottomRight ||\r\n relativePosition === RelativePosition.Bottom ||\r\n relativePosition === RelativePosition.BottomLeft;\r\n\r\n const positionPopups = filteredInfo\r\n .sort((a: CursorPopupInfo, b: CursorPopupInfo): number => ascending ? a.priority - b.priority : b.priority - a.priority)\r\n .map((popupInfo: CursorPopupInfo, index: number) => {\r\n\r\n const title = (popupInfo.options !== undefined) ? popupInfo.options.title : \"\";\r\n const shadow = (popupInfo.options !== undefined) ? popupInfo.options.shadow : false;\r\n let offset = popupInfo.offset;\r\n\r\n if (index > 0)\r\n offset = this.adjustOffset(offset, popupInfo.renderRelativePosition, totalDimension);\r\n\r\n if (popupInfo.popupSize)\r\n totalDimension += this.getDimension(popupInfo.popupSize, relativePosition);\r\n\r\n return (\r\n <CursorPopup key={popupInfo.id}\r\n id={popupInfo.id}\r\n content={popupInfo.content}\r\n pt={this.state.pt}\r\n offset={offset}\r\n relativePosition={popupInfo.renderRelativePosition}\r\n title={title}\r\n shadow={shadow}\r\n onSizeKnown={(size: SizeProps) => this._handleSizeKnown(popupInfo, size)} />\r\n );\r\n });\r\n\r\n return (\r\n <React.Fragment key={relativePosition.toString()}>\r\n {positionPopups}\r\n </React.Fragment>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private getDimension(popupSize: Size, relativePosition: RelativePosition): number {\r\n let dimension = 0;\r\n\r\n switch (relativePosition) {\r\n case RelativePosition.Top:\r\n case RelativePosition.Bottom:\r\n case RelativePosition.TopLeft:\r\n case RelativePosition.TopRight:\r\n case RelativePosition.BottomLeft:\r\n case RelativePosition.BottomRight:\r\n dimension = popupSize.height;\r\n break;\r\n case RelativePosition.Left:\r\n case RelativePosition.Right:\r\n dimension = popupSize.width;\r\n break;\r\n }\r\n\r\n return dimension;\r\n }\r\n\r\n private adjustOffset(offset: Point, relativePosition: RelativePosition, dimension: number): Point {\r\n let outOffset = Point.create(offset.toProps());\r\n\r\n switch (relativePosition) {\r\n case RelativePosition.Top:\r\n case RelativePosition.Bottom:\r\n case RelativePosition.TopLeft:\r\n case RelativePosition.TopRight:\r\n case RelativePosition.BottomLeft:\r\n case RelativePosition.BottomRight:\r\n outOffset = Point.create({ x: offset.x, y: offset.y + dimension });\r\n break;\r\n case RelativePosition.Left:\r\n case RelativePosition.Right:\r\n outOffset = Point.create({ x: offset.x + dimension, y: offset.y });\r\n break;\r\n }\r\n\r\n return outOffset;\r\n }\r\n\r\n public override componentDidMount(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.addListener(this._handlePopupChangedEvent);\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.addListener(this._handleCursorPopupUpdatePositionEvent);\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n CursorPopupManager.onCursorPopupsChangedEvent.removeListener(this._handlePopupChangedEvent);\r\n CursorPopupManager.onCursorPopupUpdatePositionEvent.removeListener(this._handleCursorPopupUpdatePositionEvent);\r\n }\r\n\r\n private _handlePopupChangedEvent = (_args: any) => {\r\n this.forceUpdate();\r\n };\r\n\r\n private _handleCursorPopupUpdatePositionEvent = (args: CursorPopupUpdatePositionEventArgs) => {\r\n this.setState({ pt: Point.create(args.pt) });\r\n };\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Dialog
3
3
  */
4
4
  import * as React from "react";
5
- import { UiEvent } from "@itwin/core-react";
5
+ import { UiEvent } from "@itwin/appui-abstract";
6
6
  /** Dialog Stack Changed Event Args class.
7
7
  * @public
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DialogManagerBase.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAI;AAE3E;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,QAAQ,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAK;IACxB,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,qBAAqB,CAAqB;gBAEtC,oBAAoB,EAAE,kBAAkB;IAIpD,IAAW,OAAO,iBAA4B;IAE9C,IAAW,oBAAoB,IAAI,kBAAkB,CAAuC;IAE5F;;;;;OAKG;IACI,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,QAAQ,GAAG,IAAI;IASxF,gBAAgB;IACT,UAAU,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAKxC,WAAW,CAAC,M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