@itwin/appui-react 3.0.0-dev.147 → 3.0.0-dev.152

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 (251) 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 +4 -3
  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/content/split-pane/Pane.d.ts +21 -0
  25. package/lib/cjs/appui-react/content/split-pane/Pane.d.ts.map +1 -0
  26. package/lib/cjs/appui-react/content/split-pane/Pane.js +43 -0
  27. package/lib/cjs/appui-react/content/split-pane/Pane.js.map +1 -0
  28. package/lib/cjs/appui-react/content/split-pane/Resizer.d.ts +23 -0
  29. package/lib/cjs/appui-react/content/split-pane/Resizer.d.ts.map +1 -0
  30. package/lib/cjs/appui-react/content/split-pane/Resizer.js +39 -0
  31. package/lib/cjs/appui-react/content/split-pane/Resizer.js.map +1 -0
  32. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +70 -0
  33. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -0
  34. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +243 -0
  35. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -0
  36. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts +1 -2
  37. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  38. package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -1
  39. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  40. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  41. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  42. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
  43. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  44. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -3
  45. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  46. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts +1 -1
  47. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  48. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -2
  49. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  50. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts +2 -2
  51. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  52. package/lib/cjs/appui-react/feedback/ElementTooltip.js +2 -1
  53. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  54. package/lib/cjs/appui-react/frontstage/Frontstage.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/frontstage/Frontstage.js +2 -0
  56. package/lib/cjs/appui-react/frontstage/Frontstage.js.map +1 -1
  57. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  58. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  59. package/lib/cjs/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  60. package/lib/cjs/appui-react/hooks/useActiveViewport.js.map +1 -1
  61. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  63. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
  64. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  65. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -1
  66. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  67. package/lib/cjs/appui-react/messages/MessageManager.d.ts +1 -2
  68. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  69. package/lib/cjs/appui-react/messages/MessageManager.js +8 -8
  70. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  71. package/lib/cjs/appui-react/messages/Pointer.d.ts +2 -2
  72. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  73. package/lib/cjs/appui-react/messages/Pointer.js +2 -2
  74. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  75. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
  76. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  77. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +2 -2
  78. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  79. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
  80. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  81. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
  82. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  83. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts +1 -1
  84. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  85. package/lib/cjs/appui-react/pickers/ViewSelector.js +3 -3
  86. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  87. package/lib/cjs/appui-react/popup/PopupManager.d.ts +2 -2
  88. package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/popup/PopupManager.js +1 -1
  90. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  91. package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  92. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  93. package/lib/cjs/appui-react/syncui/BooleanListener.d.ts +2 -2
  94. package/lib/cjs/appui-react/syncui/BooleanListener.d.ts.map +1 -1
  95. package/lib/cjs/appui-react/syncui/BooleanListener.js +2 -1
  96. package/lib/cjs/appui-react/syncui/BooleanListener.js.map +1 -1
  97. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +6 -16
  98. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  99. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +28 -101
  100. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  101. package/lib/cjs/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
  102. package/lib/cjs/appui-react/toolbar/ActionItemButton.js.map +1 -1
  103. package/lib/cjs/appui-react/toolbar/GroupItem.d.ts.map +1 -1
  104. package/lib/cjs/appui-react/toolbar/GroupItem.js.map +1 -1
  105. package/lib/cjs/appui-react/toolbar/ToolButton.js.map +1 -1
  106. package/lib/cjs/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  107. package/lib/cjs/appui-react/toolbar/Toolbar.js +1 -1
  108. package/lib/cjs/appui-react/toolbar/Toolbar.js.map +1 -1
  109. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  110. package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  111. package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
  112. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  113. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  114. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -2
  115. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  116. package/lib/cjs/appui-react/widgets/WidgetDef.js +1 -2
  117. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  118. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
  119. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
  120. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js +3 -2
  121. package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
  122. package/lib/cjs/appui-react.d.ts +3 -2
  123. package/lib/cjs/appui-react.d.ts.map +1 -1
  124. package/lib/cjs/appui-react.js +3 -2
  125. package/lib/cjs/appui-react.js.map +1 -1
  126. package/lib/esm/appui-react/UiFramework.d.ts +2 -1
  127. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  128. package/lib/esm/appui-react/UiFramework.js +2 -2
  129. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  130. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  131. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  132. package/lib/esm/appui-react/backstage/CommandLaunch.d.ts.map +1 -1
  133. package/lib/esm/appui-react/backstage/CommandLaunch.js.map +1 -1
  134. package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts +1 -1
  135. package/lib/esm/appui-react/childwindow/ChildWindowManager.js +1 -1
  136. package/lib/esm/appui-react/childwindow/ChildWindowManager.js.map +1 -1
  137. package/lib/esm/appui-react/content/ContentControl.d.ts +1 -1
  138. package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
  139. package/lib/esm/appui-react/content/ContentControl.js +1 -1
  140. package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
  141. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -2
  142. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  143. package/lib/esm/appui-react/content/ContentLayout.js +3 -2
  144. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  145. package/lib/esm/appui-react/content/ContentViewManager.d.ts +1 -1
  146. package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
  147. package/lib/esm/appui-react/content/ContentViewManager.js +1 -1
  148. package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
  149. package/lib/esm/appui-react/content/split-pane/Pane.d.ts +21 -0
  150. package/lib/esm/appui-react/content/split-pane/Pane.d.ts.map +1 -0
  151. package/lib/esm/appui-react/content/split-pane/Pane.js +39 -0
  152. package/lib/esm/appui-react/content/split-pane/Pane.js.map +1 -0
  153. package/lib/esm/appui-react/content/split-pane/Resizer.d.ts +23 -0
  154. package/lib/esm/appui-react/content/split-pane/Resizer.d.ts.map +1 -0
  155. package/lib/esm/appui-react/content/split-pane/Resizer.js +35 -0
  156. package/lib/esm/appui-react/content/split-pane/Resizer.js.map +1 -0
  157. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +70 -0
  158. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -0
  159. package/lib/esm/appui-react/content/split-pane/SplitPane.js +239 -0
  160. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -0
  161. package/lib/esm/appui-react/cursor/CursorInformation.d.ts +1 -2
  162. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  163. package/lib/esm/appui-react/cursor/CursorInformation.js +2 -2
  164. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  165. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  166. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  167. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
  168. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  169. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +2 -2
  170. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  171. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts +1 -1
  172. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  173. package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -1
  174. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  175. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts +2 -2
  176. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  177. package/lib/esm/appui-react/feedback/ElementTooltip.js +2 -1
  178. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  179. package/lib/esm/appui-react/frontstage/Frontstage.d.ts.map +1 -1
  180. package/lib/esm/appui-react/frontstage/Frontstage.js +2 -0
  181. package/lib/esm/appui-react/frontstage/Frontstage.js.map +1 -1
  182. package/lib/esm/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  183. package/lib/esm/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  184. package/lib/esm/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  185. package/lib/esm/appui-react/hooks/useActiveViewport.js.map +1 -1
  186. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  187. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  188. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
  189. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  190. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +2 -2
  191. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  192. package/lib/esm/appui-react/messages/MessageManager.d.ts +1 -2
  193. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  194. package/lib/esm/appui-react/messages/MessageManager.js +2 -2
  195. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  196. package/lib/esm/appui-react/messages/Pointer.d.ts +2 -2
  197. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  198. package/lib/esm/appui-react/messages/Pointer.js +2 -2
  199. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  200. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
  201. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  202. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -1
  203. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  204. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
  205. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  206. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
  207. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  208. package/lib/esm/appui-react/pickers/ViewSelector.d.ts +1 -1
  209. package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  210. package/lib/esm/appui-react/pickers/ViewSelector.js +1 -1
  211. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  212. package/lib/esm/appui-react/popup/PopupManager.d.ts +2 -2
  213. package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
  214. package/lib/esm/appui-react/popup/PopupManager.js +2 -2
  215. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  216. package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  217. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  218. package/lib/esm/appui-react/syncui/BooleanListener.d.ts +2 -2
  219. package/lib/esm/appui-react/syncui/BooleanListener.d.ts.map +1 -1
  220. package/lib/esm/appui-react/syncui/BooleanListener.js +2 -1
  221. package/lib/esm/appui-react/syncui/BooleanListener.js.map +1 -1
  222. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +6 -16
  223. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  224. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +27 -99
  225. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  226. package/lib/esm/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
  227. package/lib/esm/appui-react/toolbar/ActionItemButton.js.map +1 -1
  228. package/lib/esm/appui-react/toolbar/GroupItem.d.ts.map +1 -1
  229. package/lib/esm/appui-react/toolbar/GroupItem.js.map +1 -1
  230. package/lib/esm/appui-react/toolbar/ToolButton.js.map +1 -1
  231. package/lib/esm/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  232. package/lib/esm/appui-react/toolbar/Toolbar.js +1 -1
  233. package/lib/esm/appui-react/toolbar/Toolbar.js.map +1 -1
  234. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  235. package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  236. package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
  237. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  238. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  239. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -2
  240. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  241. package/lib/esm/appui-react/widgets/WidgetDef.js +1 -2
  242. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  243. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
  244. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
  245. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js +2 -1
  246. package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
  247. package/lib/esm/appui-react.d.ts +3 -2
  248. package/lib/esm/appui-react.d.ts.map +1 -1
  249. package/lib/esm/appui-react.js +3 -2
  250. package/lib/esm/appui-react.js.map +1 -1
  251. package/package.json +34 -35
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,qBAAqB,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvH,OAAO,EAAE,kBAAkB,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAmB,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;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nB,CAAC,CAAC,CACH,CAAC,CACW,CAChB,CAAC;AACJ,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 Backstage\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { BackstageItem, BackstageItemsManager, ConditionalBooleanValue, isStageLauncher } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { BackstageSeparator, Backstage as NZ_Backstage } from \"@itwin/appui-layout-react\";\r\nimport { SafeAreaContext } from \"../safearea/SafeAreaContext\";\r\nimport { SyncUiEventArgs, SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { BackstageComposerItem } from \"./BackstageComposerItem\";\r\nimport { useBackstageManager, useIsBackstageOpen } from \"./BackstageManager\";\r\nimport { useDefaultBackstageItems } from \"./useDefaultBackstageItems\";\r\nimport { useUiItemsProviderBackstageItems } from \"./useUiItemsProviderBackstageItems\";\r\n\r\n// cSpell:ignore safearea\r\n\r\n/** Private function to set up sync event monitoring of backstage items */\r\nfunction useBackstageItemSyncEffect(itemsManager: BackstageItemsManager, syncIdsOfInterest: string[]) {\r\n const isInitialMount = React.useRef(true);\r\n\r\n React.useEffect(() => {\r\n const handleSyncUiEvent = (args: SyncUiEventArgs) => {\r\n if (0 === syncIdsOfInterest.length)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (syncIdsOfInterest.some((value: string): boolean => args.eventIds.has(value.toLowerCase()))) {\r\n // process each item that has interest\r\n itemsManager.refreshAffectedItems(args.eventIds);\r\n }\r\n };\r\n\r\n if (isInitialMount.current) {\r\n isInitialMount.current = false;\r\n // initialize the display state of any items with syncIds/condition defined\r\n itemsManager.refreshAffectedItems(new Set(syncIdsOfInterest));\r\n }\r\n\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\r\n return () => {\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(handleSyncUiEvent);\r\n };\r\n }, [itemsManager, itemsManager.items, syncIdsOfInterest]);\r\n}\r\n\r\n/** local function to combine items from Stage and from Extensions */\r\nfunction combineItems(stageItems: ReadonlyArray<BackstageItem>, addonItems: ReadonlyArray<BackstageItem>, hideSoloStageEntry: boolean) {\r\n let items: BackstageItem[] = [];\r\n if (stageItems.length) {\r\n // Walk through each and ensure no duplicate ids are added.\r\n stageItems.forEach((srcItem) => {\r\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\r\n items.push(srcItem);\r\n }\r\n });\r\n }\r\n if (addonItems.length) {\r\n // Walk through each and ensure no duplicate ids are added.\r\n addonItems.forEach((srcItem) => {\r\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\r\n items.push(srcItem);\r\n }\r\n });\r\n }\r\n\r\n if (hideSoloStageEntry) {\r\n // per user request don't show stage launcher if only one stage is available\r\n const numberOfFrontstageItems = items.reduce((accumulator, item) => accumulator + (isStageLauncher(item) ? 1 : 0), 0);\r\n if (1 === numberOfFrontstageItems)\r\n items = items.filter((item) => !isStageLauncher(item));\r\n }\r\n\r\n return items;\r\n}\r\n\r\n/** @internal */\r\nexport type GroupedItems = ReadonlyArray<ReadonlyArray<BackstageItem>>;\r\n\r\n/** @internal */\r\nexport const useGroupedItems = (items: ReadonlyArray<BackstageItem>): GroupedItems => {\r\n return React.useMemo(() => {\r\n const grouped = items.reduce<GroupedItems>((acc, item) => {\r\n if (ConditionalBooleanValue.getValue(item.isHidden))\r\n return acc;\r\n const groupIndex = acc.findIndex((group) => group[0].groupPriority === item.groupPriority);\r\n if (groupIndex >= 0)\r\n return [\r\n ...acc.slice(0, groupIndex),\r\n [\r\n ...acc[groupIndex],\r\n item,\r\n ],\r\n ...acc.slice(groupIndex + 1),\r\n ];\r\n return [\r\n ...acc,\r\n [\r\n item,\r\n ],\r\n ];\r\n }, []);\r\n const sortedGroups = grouped.reduce<GroupedItems>((acc, group) => {\r\n const sortedGroup = [...group].sort((a, b) => a.itemPriority - b.itemPriority);\r\n return [\r\n ...acc,\r\n sortedGroup,\r\n ];\r\n }, []);\r\n return [...sortedGroups].sort((a, b) => a[0].groupPriority - b[0].groupPriority);\r\n }, [items]);\r\n};\r\n\r\n/** Props of [[BackstageComposer]] component.\r\n * @public\r\n */\r\nexport interface BackstageComposerProps extends CommonProps {\r\n /** React node for an optional header item */\r\n readonly header?: React.ReactNode;\r\n /** Indicates whether to place an overlay over the frontstage when the backstage is displayed */\r\n readonly showOverlay?: boolean;\r\n /** List of backstage items to show */\r\n readonly items: BackstageItem[];\r\n /** If true and only one stage launcher item is found, do not show entry in backstage */\r\n readonly hideSoloStageEntry?: boolean;\r\n}\r\n\r\n/** Backstage component composed from [[BackstageManager]] items.\r\n * @public\r\n */\r\nexport function BackstageComposer(props: BackstageComposerProps) {\r\n const [defaultItemsManager, setDefaultItemsManager] = React.useState(new BackstageItemsManager(props.items));\r\n const initialItems = React.useRef(props.items);\r\n\r\n React.useEffect(() => {\r\n if (initialItems.current !== props.items) {\r\n initialItems.current = props.items;\r\n setDefaultItemsManager(new BackstageItemsManager(props.items));\r\n }\r\n }, [props.items]);\r\n\r\n const manager = useBackstageManager();\r\n const isOpen = useIsBackstageOpen(manager);\r\n const safeAreaInsets = React.useContext(SafeAreaContext);\r\n const handleClose = React.useCallback(() => {\r\n manager.close();\r\n }, [manager]);\r\n\r\n const defaultItems = useDefaultBackstageItems(defaultItemsManager);\r\n const syncIdsOfInterest = React.useMemo(() => BackstageItemsManager.getSyncIdsOfInterest(defaultItems), [defaultItems]);\r\n useBackstageItemSyncEffect(defaultItemsManager, syncIdsOfInterest);\r\n\r\n const [addonItemsManager] = React.useState(new BackstageItemsManager());\r\n const addonItems = useUiItemsProviderBackstageItems(addonItemsManager);\r\n const addonSyncIdsOfInterest = React.useMemo(() => BackstageItemsManager.getSyncIdsOfInterest(addonItems), [addonItems]);\r\n useBackstageItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);\r\n\r\n const combinedBackstageItems = React.useMemo(() => combineItems(defaultItems, addonItems, !!props.hideSoloStageEntry), [defaultItems, addonItems, props.hideSoloStageEntry]);\r\n const groups = useGroupedItems(combinedBackstageItems);\r\n\r\n return (\r\n <NZ_Backstage\r\n className={props.className}\r\n header={props.header}\r\n isOpen={isOpen}\r\n onClose={handleClose}\r\n safeAreaInsets={safeAreaInsets}\r\n showOverlay={props.showOverlay}\r\n style={props.style}\r\n >\r\n {groups.map((group, groupIndex) => (\r\n group.map((item, itemIndex) => {\r\n const composerItem = (\r\n <BackstageComposerItem\r\n item={item}\r\n key={item.id}\r\n />\r\n );\r\n return itemIndex === 0 && groupIndex > 0 ? (\r\n <React.Fragment key={groupIndex}>\r\n <BackstageSeparator />\r\n {composerItem}\r\n </React.Fragment>\r\n ) : composerItem;\r\n })\r\n ))}\r\n </NZ_Backstage>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"BackstageComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,qBAAqB,EAAE,uBAAuB,EAAE,eAAe,EAAmB,MAAM,uBAAuB,CAAC;AAExI,OAAO,EAAE,kBAAkB,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gCAAgC,EA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W,CAChB,CAAC;AACJ,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 Backstage\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { BackstageItem, BackstageItemsManager, ConditionalBooleanValue, isStageLauncher, UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { BackstageSeparator, Backstage as NZ_Backstage } from \"@itwin/appui-layout-react\";\r\nimport { SafeAreaContext } from \"../safearea/SafeAreaContext\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { BackstageComposerItem } from \"./BackstageComposerItem\";\r\nimport { useBackstageManager, useIsBackstageOpen } from \"./BackstageManager\";\r\nimport { useDefaultBackstageItems } from \"./useDefaultBackstageItems\";\r\nimport { useUiItemsProviderBackstageItems } from \"./useUiItemsProviderBackstageItems\";\r\n\r\n// cSpell:ignore safearea\r\n\r\n/** Private function to set up sync event monitoring of backstage items */\r\nfunction useBackstageItemSyncEffect(itemsManager: BackstageItemsManager, syncIdsOfInterest: string[]) {\r\n const isInitialMount = React.useRef(true);\r\n\r\n React.useEffect(() => {\r\n const handleSyncUiEvent = (args: UiSyncEventArgs) => {\r\n if (0 === syncIdsOfInterest.length)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (syncIdsOfInterest.some((value: string): boolean => args.eventIds.has(value.toLowerCase()))) {\r\n // process each item that has interest\r\n itemsManager.refreshAffectedItems(args.eventIds);\r\n }\r\n };\r\n\r\n if (isInitialMount.current) {\r\n isInitialMount.current = false;\r\n // initialize the display state of any items with syncIds/condition defined\r\n itemsManager.refreshAffectedItems(new Set(syncIdsOfInterest));\r\n }\r\n\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\r\n return () => {\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(handleSyncUiEvent);\r\n };\r\n }, [itemsManager, itemsManager.items, syncIdsOfInterest]);\r\n}\r\n\r\n/** local function to combine items from Stage and from Extensions */\r\nfunction combineItems(stageItems: ReadonlyArray<BackstageItem>, addonItems: ReadonlyArray<BackstageItem>, hideSoloStageEntry: boolean) {\r\n let items: BackstageItem[] = [];\r\n if (stageItems.length) {\r\n // Walk through each and ensure no duplicate ids are added.\r\n stageItems.forEach((srcItem) => {\r\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\r\n items.push(srcItem);\r\n }\r\n });\r\n }\r\n if (addonItems.length) {\r\n // Walk through each and ensure no duplicate ids are added.\r\n addonItems.forEach((srcItem) => {\r\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\r\n items.push(srcItem);\r\n }\r\n });\r\n }\r\n\r\n if (hideSoloStageEntry) {\r\n // per user request don't show stage launcher if only one stage is available\r\n const numberOfFrontstageItems = items.reduce((accumulator, item) => accumulator + (isStageLauncher(item) ? 1 : 0), 0);\r\n if (1 === numberOfFrontstageItems)\r\n items = items.filter((item) => !isStageLauncher(item));\r\n }\r\n\r\n return items;\r\n}\r\n\r\n/** @internal */\r\nexport type GroupedItems = ReadonlyArray<ReadonlyArray<BackstageItem>>;\r\n\r\n/** @internal */\r\nexport const useGroupedItems = (items: ReadonlyArray<BackstageItem>): GroupedItems => {\r\n return React.useMemo(() => {\r\n const grouped = items.reduce<GroupedItems>((acc, item) => {\r\n if (ConditionalBooleanValue.getValue(item.isHidden))\r\n return acc;\r\n const groupIndex = acc.findIndex((group) => group[0].groupPriority === item.groupPriority);\r\n if (groupIndex >= 0)\r\n return [\r\n ...acc.slice(0, groupIndex),\r\n [\r\n ...acc[groupIndex],\r\n item,\r\n ],\r\n ...acc.slice(groupIndex + 1),\r\n ];\r\n return [\r\n ...acc,\r\n [\r\n item,\r\n ],\r\n ];\r\n }, []);\r\n const sortedGroups = grouped.reduce<GroupedItems>((acc, group) => {\r\n const sortedGroup = [...group].sort((a, b) => a.itemPriority - b.itemPriority);\r\n return [\r\n ...acc,\r\n sortedGroup,\r\n ];\r\n }, []);\r\n return [...sortedGroups].sort((a, b) => a[0].groupPriority - b[0].groupPriority);\r\n }, [items]);\r\n};\r\n\r\n/** Props of [[BackstageComposer]] component.\r\n * @public\r\n */\r\nexport interface BackstageComposerProps extends CommonProps {\r\n /** React node for an optional header item */\r\n readonly header?: React.ReactNode;\r\n /** Indicates whether to place an overlay over the frontstage when the backstage is displayed */\r\n readonly showOverlay?: boolean;\r\n /** List of backstage items to show */\r\n readonly items: BackstageItem[];\r\n /** If true and only one stage launcher item is found, do not show entry in backstage */\r\n readonly hideSoloStageEntry?: boolean;\r\n}\r\n\r\n/** Backstage component composed from [[BackstageManager]] items.\r\n * @public\r\n */\r\nexport function BackstageComposer(props: BackstageComposerProps) {\r\n const [defaultItemsManager, setDefaultItemsManager] = React.useState(new BackstageItemsManager(props.items));\r\n const initialItems = React.useRef(props.items);\r\n\r\n React.useEffect(() => {\r\n if (initialItems.current !== props.items) {\r\n initialItems.current = props.items;\r\n setDefaultItemsManager(new BackstageItemsManager(props.items));\r\n }\r\n }, [props.items]);\r\n\r\n const manager = useBackstageManager();\r\n const isOpen = useIsBackstageOpen(manager);\r\n const safeAreaInsets = React.useContext(SafeAreaContext);\r\n const handleClose = React.useCallback(() => {\r\n manager.close();\r\n }, [manager]);\r\n\r\n const defaultItems = useDefaultBackstageItems(defaultItemsManager);\r\n const syncIdsOfInterest = React.useMemo(() => BackstageItemsManager.getSyncIdsOfInterest(defaultItems), [defaultItems]);\r\n useBackstageItemSyncEffect(defaultItemsManager, syncIdsOfInterest);\r\n\r\n const [addonItemsManager] = React.useState(new BackstageItemsManager());\r\n const addonItems = useUiItemsProviderBackstageItems(addonItemsManager);\r\n const addonSyncIdsOfInterest = React.useMemo(() => BackstageItemsManager.getSyncIdsOfInterest(addonItems), [addonItems]);\r\n useBackstageItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);\r\n\r\n const combinedBackstageItems = React.useMemo(() => combineItems(defaultItems, addonItems, !!props.hideSoloStageEntry), [defaultItems, addonItems, props.hideSoloStageEntry]);\r\n const groups = useGroupedItems(combinedBackstageItems);\r\n\r\n return (\r\n <NZ_Backstage\r\n className={props.className}\r\n header={props.header}\r\n isOpen={isOpen}\r\n onClose={handleClose}\r\n safeAreaInsets={safeAreaInsets}\r\n showOverlay={props.showOverlay}\r\n style={props.style}\r\n >\r\n {groups.map((group, groupIndex) => (\r\n group.map((item, itemIndex) => {\r\n const composerItem = (\r\n <BackstageComposerItem\r\n item={item}\r\n key={item.id}\r\n />\r\n );\r\n return itemIndex === 0 && groupIndex > 0 ? (\r\n <React.Fragment key={groupIndex}>\r\n <BackstageSeparator />\r\n {composerItem}\r\n </React.Fragment>\r\n ) : composerItem;\r\n })\r\n ))}\r\n </NZ_Backstage>\r\n );\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLaunch.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/CommandLaunch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOvD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,kBAAkB,EAAE,cAAc;IACzF,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,KAAK,CAAC,aAAa,CAAC,+BAA+B,EAAE,kBAAkB,CAAC;IAEtH,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC7D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,KAAK,EAAE,+BAA+B;IAUlC,iBAAiB;IAKjB,oBAAoB;IAOpC,OAAO,CAAC,kBAAkB,CAexB;IAEK,OAAO,QAAO,IAAI,CAUvB;IAIc,kBAAkB,CAAC,UAAU,EAAE,+BAA+B;IAQ9D,MAAM,IAAI,KAAK,CAAC,SAAS;CAa1C"}
1
+ {"version":3,"file":"CommandLaunch.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/CommandLaunch.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAmB,MAAM,uBAAuB,CAAC;AAOxE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,kBAAkB,EAAE,cAAc;IACzF,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,KAAK,CAAC,aAAa,CAAC,+BAA+B,EAAE,kBAAkB,CAAC;IAEtH,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC7D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,KAAK,EAAE,+BAA+B;IAUlC,iBAAiB;IAKjB,oBAAoB;IAOpC,OAAO,CAAC,kBAAkB,CAexB;IAEK,OAAO,QAAO,IAAI,CAUvB;IAIc,kBAAkB,CAAC,UAAU,EAAE,+BAA+B;IAQ9D,MAAM,IAAI,KAAK,CAAC,SAAS;CAa1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommandLaunch.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/CommandLaunch.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,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AAa,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChF,CAAC;IA+BD,mBAAmB;IACnB,uBAAuB;IACP,kBAAkB,CAAC,UAA2C;QAC5E,mDAAmD;QACnD,MAAM,YAAY,GAAG,sBAAsB,CAAC,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvF,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,+DAA+D;IAC/C,MAAM;QACpB,OAAO,CACL,oBAAC,aAAa,IACZ,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC9C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,UAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACjC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,IAAI,CAAC,KAAK,CAAC,KAAK,CACH,CACjB,CAAC;IACJ,CAAC;CACF","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 Backstage\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { CommandHandler } from \"@itwin/appui-abstract\";\r\nimport { BackstageItem as NZ_BackstageItem } from \"@itwin/appui-layout-react\";\r\nimport { withSafeArea } from \"../safearea/SafeAreaContext\";\r\nimport { SyncUiEventArgs, SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { PropsHelper } from \"../utils/PropsHelper\";\r\nimport { Backstage } from \"./Backstage\";\r\nimport { BackstageItemProps, BackstageItemState } from \"./BackstageItemProps\";\r\nimport { BackstageItemUtilities } from \"./BackstageItemUtilities\";\r\n\r\n// cspell:ignore safearea\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst BackstageItem = withSafeArea(NZ_BackstageItem);\r\n\r\n/** Properties for a [[CommandLaunchBackstageItem]] component\r\n * @public\r\n * @deprecated Use [BackstageActionItem]($appui-abstract) instead.\r\n */\r\nexport interface CommandLaunchBackstageItemProps extends BackstageItemProps, CommandHandler { // eslint-disable-line deprecation/deprecation\r\n /** Unique Id for this backstage item. */\r\n commandId: string;\r\n}\r\n\r\n/** Backstage item that launches a Command\r\n * @public\r\n * @deprecated Use [BackstageActionItem]($appui-abstract) instead.\r\n */\r\nexport class CommandLaunchBackstageItem extends React.PureComponent<CommandLaunchBackstageItemProps, BackstageItemState> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<BackstageItemState>; // eslint-disable-line deprecation/deprecation\r\n private _componentUnmounting = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\r\n private _stateSyncIds: string[] = []; // local version of syncId that are lower cased\r\n\r\n constructor(props: CommandLaunchBackstageItemProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n if (props.stateSyncIds)\r\n this._stateSyncIds = props.stateSyncIds.map((value) => value.toLowerCase());\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n this.state = BackstageItemUtilities.getBackstageItemStateFromProps(props);\r\n }\r\n\r\n public override componentDidMount() {\r\n if (this.props.stateFunc && this._stateSyncIds.length > 0)\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._componentUnmounting = true;\r\n /* istanbul ignore else */\r\n if (this.props.stateFunc && this._stateSyncIds.length > 0)\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\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, this._stateSyncIds)) {\r\n /* istanbul ignore else */\r\n if (this.props.stateFunc) {\r\n const newState = this.props.stateFunc(this.state);\r\n /* istanbul ignore next */\r\n if (!PropsHelper.isShallowEqual(newState, this.state))\r\n this.setState((_prevState) => newState);\r\n }\r\n }\r\n };\r\n\r\n public execute = (): void => {\r\n Backstage.hide(); // eslint-disable-line deprecation/deprecation\r\n\r\n if (this.props.execute) {\r\n if (this.props.getCommandArgs)\r\n this.props.execute(this.props.getCommandArgs());\r\n else\r\n this.props.execute(this.props.parameters);\r\n } else\r\n Logger.logError(UiFramework.loggerCategory(this), `'${this.props.commandId}' has no execute() function`);\r\n };\r\n\r\n // deprecated class\r\n // istanbul ignore next\r\n public override componentDidUpdate(_prevProps: CommandLaunchBackstageItemProps) { // eslint-disable-line deprecation/deprecation\r\n // eslint-disable-next-line deprecation/deprecation\r\n const updatedState = BackstageItemUtilities.getBackstageItemStateFromProps(this.props);\r\n if (!PropsHelper.isShallowEqual(updatedState, this.state))\r\n this.setState((_prevState) => updatedState);\r\n }\r\n\r\n // TODO: add tooltip, subtitle, aria-label? to NZ_BackstageItem\r\n public override render(): React.ReactNode {\r\n return (\r\n <BackstageItem\r\n icon={PropsHelper.getIcon(this.state.iconSpec)}\r\n isActive={this.state.isActive}\r\n isDisabled={!this.state.isEnabled}\r\n key={this.props.commandId}\r\n onClick={this.execute}\r\n >\r\n {this.state.label}\r\n </BackstageItem>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"CommandLaunch.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/CommandLaunch.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;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S,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACvD,qBAAqB,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChF,CAAC;IA+BD,mBAAmB;IACnB,uBAAuB;IACP,kBAAkB,CAAC,UAA2C;QAC5E,mDAAmD;QACnD,MAAM,YAAY,GAAG,sBAAsB,CAAC,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvF,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,+DAA+D;IAC/C,MAAM;QACpB,OAAO,CACL,oBAAC,aAAa,IACZ,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC9C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,UAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACjC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,IAAI,CAAC,KAAK,CAAC,KAAK,CACH,CACjB,CAAC;IACJ,CAAC;CACF","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 Backstage\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { CommandHandler, UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { BackstageItem as NZ_BackstageItem } from \"@itwin/appui-layout-react\";\r\nimport { withSafeArea } from \"../safearea/SafeAreaContext\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { PropsHelper } from \"../utils/PropsHelper\";\r\nimport { Backstage } from \"./Backstage\";\r\nimport { BackstageItemProps, BackstageItemState } from \"./BackstageItemProps\";\r\nimport { BackstageItemUtilities } from \"./BackstageItemUtilities\";\r\n\r\n// cspell:ignore safearea\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst BackstageItem = withSafeArea(NZ_BackstageItem);\r\n\r\n/** Properties for a [[CommandLaunchBackstageItem]] component\r\n * @public\r\n * @deprecated Use [BackstageActionItem]($appui-abstract) instead.\r\n */\r\nexport interface CommandLaunchBackstageItemProps extends BackstageItemProps, CommandHandler { // eslint-disable-line deprecation/deprecation\r\n /** Unique Id for this backstage item. */\r\n commandId: string;\r\n}\r\n\r\n/** Backstage item that launches a Command\r\n * @public\r\n * @deprecated Use [BackstageActionItem]($appui-abstract) instead.\r\n */\r\nexport class CommandLaunchBackstageItem extends React.PureComponent<CommandLaunchBackstageItemProps, BackstageItemState> { // eslint-disable-line deprecation/deprecation\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<BackstageItemState>; // eslint-disable-line deprecation/deprecation\r\n private _componentUnmounting = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\r\n private _stateSyncIds: string[] = []; // local version of syncId that are lower cased\r\n\r\n constructor(props: CommandLaunchBackstageItemProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n if (props.stateSyncIds)\r\n this._stateSyncIds = props.stateSyncIds.map((value) => value.toLowerCase());\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n this.state = BackstageItemUtilities.getBackstageItemStateFromProps(props);\r\n }\r\n\r\n public override componentDidMount() {\r\n if (this.props.stateFunc && this._stateSyncIds.length > 0)\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n this._componentUnmounting = true;\r\n /* istanbul ignore else */\r\n if (this.props.stateFunc && this._stateSyncIds.length > 0)\r\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\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, this._stateSyncIds)) {\r\n /* istanbul ignore else */\r\n if (this.props.stateFunc) {\r\n const newState = this.props.stateFunc(this.state);\r\n /* istanbul ignore next */\r\n if (!PropsHelper.isShallowEqual(newState, this.state))\r\n this.setState((_prevState) => newState);\r\n }\r\n }\r\n };\r\n\r\n public execute = (): void => {\r\n Backstage.hide(); // eslint-disable-line deprecation/deprecation\r\n\r\n if (this.props.execute) {\r\n if (this.props.getCommandArgs)\r\n this.props.execute(this.props.getCommandArgs());\r\n else\r\n this.props.execute(this.props.parameters);\r\n } else\r\n Logger.logError(UiFramework.loggerCategory(this), `'${this.props.commandId}' has no execute() function`);\r\n };\r\n\r\n // deprecated class\r\n // istanbul ignore next\r\n public override componentDidUpdate(_prevProps: CommandLaunchBackstageItemProps) { // eslint-disable-line deprecation/deprecation\r\n // eslint-disable-next-line deprecation/deprecation\r\n const updatedState = BackstageItemUtilities.getBackstageItemStateFromProps(this.props);\r\n if (!PropsHelper.isShallowEqual(updatedState, this.state))\r\n this.setState((_prevState) => updatedState);\r\n }\r\n\r\n // TODO: add tooltip, subtitle, aria-label? to NZ_BackstageItem\r\n public override render(): React.ReactNode {\r\n return (\r\n <BackstageItem\r\n icon={PropsHelper.getIcon(this.state.iconSpec)}\r\n isActive={this.state.isActive}\r\n isDisabled={!this.state.isEnabled}\r\n key={this.props.commandId}\r\n onClick={this.execute}\r\n >\r\n {this.state.label}\r\n </BackstageItem>\r\n );\r\n }\r\n}\r\n"]}
@@ -18,7 +18,7 @@ export interface ChildWindowLocationProps {
18
18
  }
19
19
  /** Supports opening a child browser window from the main application window. The child window is managed by the main application
20
20
  * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.
21
- * See also: [Child Window Manager]($docs/learning/ui/framework/ChildWindows.md)
21
+ * See also: [Child Window Manager]($docs/learning/ui/appui/appui&#8209;react/ChildWindows.md)
22
22
  * @public */
23
23
  export declare class ChildWindowManager {
24
24
  private _openChildWindows;
@@ -43,7 +43,7 @@ const childHtml = `<!DOCTYPE html>
43
43
  </html>`;
44
44
  /** Supports opening a child browser window from the main application window. The child window is managed by the main application
45
45
  * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.
46
- * See also: [Child Window Manager]($docs/learning/ui/framework/ChildWindows.md)
46
+ * See also: [Child Window Manager]($docs/learning/ui/appui/appui&#8209;react/ChildWindows.md)
47
47
  * @public */
48
48
  export class ChildWindowManager {
49
49
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"ChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBA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AAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;YACtE,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE;YAC3C,MAAM,aAAa,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;YAC5D,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aAC5C;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF","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\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./ChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { FrameworkVersion } from \"../hooks/useFrameworkVersion\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/** @public */\r\nexport interface OpenChildWindowInfo {\r\n childWindowId: string;\r\n window: Window;\r\n parentWindow: Window;\r\n}\r\n\r\n/** @public */\r\nexport interface ChildWindowLocationProps {\r\n width: number;\r\n height: number;\r\n left: number;\r\n top: number;\r\n}\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/framework/ChildWindows.md)\r\n * @public */\r\nexport class ChildWindowManager {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n public findChildWindow(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n public findChildWindowId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode) {\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setImmediate(() => {\r\n ReactDOM.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <FrameworkVersion>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </FrameworkVersion>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n if (frontStageDef) {\r\n void frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow).then(() => {\r\n this.closeChildWindow(childWindowId, false);\r\n });\r\n }\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAllChildWindows() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n public closeChildWindow = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n // istanbul ignore next\r\n public openChildWindow(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n childWindow.document.title = title;\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"beforeunload\", () => {\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.closeChildWindow(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD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,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;SACrE;aAAM;YACL,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACxC,WAAW,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;YACtE,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE;YAC3C,MAAM,aAAa,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;YAC5D,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aAC5C;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF","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\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./ChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { FrameworkVersion } from \"../hooks/useFrameworkVersion\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/** @public */\r\nexport interface OpenChildWindowInfo {\r\n childWindowId: string;\r\n window: Window;\r\n parentWindow: Window;\r\n}\r\n\r\n/** @public */\r\nexport interface ChildWindowLocationProps {\r\n width: number;\r\n height: number;\r\n left: number;\r\n top: number;\r\n}\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/appui/appui&#8209;react/ChildWindows.md)\r\n * @public */\r\nexport class ChildWindowManager {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n public findChildWindow(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n public findChildWindowId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode) {\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setImmediate(() => {\r\n ReactDOM.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <FrameworkVersion>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </FrameworkVersion>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n if (frontStageDef) {\r\n void frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow).then(() => {\r\n this.closeChildWindow(childWindowId, false);\r\n });\r\n }\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAllChildWindows() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n public closeChildWindow = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n // istanbul ignore next\r\n public openChildWindow(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n childWindow.document.title = title;\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"beforeunload\", () => {\r\n const frontStageDef = FrontstageManager.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.closeChildWindow(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
@@ -4,7 +4,7 @@
4
4
  import * as React from "react";
5
5
  import { Id64String } from "@itwin/core-bentley";
6
6
  import { IModelConnection, ScreenViewport, ViewState } from "@itwin/core-frontend";
7
- import { UiEvent } from "@itwin/core-react";
7
+ import { UiEvent } from "@itwin/appui-abstract";
8
8
  import { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
9
9
  /** ControlControl Activated Event Args interface.
10
10
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ContentControl.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEnI;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,EAAE,cAAc,CAAC;IACrC,iBAAiB,CAAC,EAAE,cAAc,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,OAAO,CAAC,gCAAgC,CAAC;CAAI;AAE/F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,0BAA0B,EAAE,OAAO,CAAC;IACpC,qCAAqC;IACrC,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtI;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,qBAAqB;IACvD,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;OAGG;gBACS,IAAI,EAAE,sBAAsB,EAAE,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ACpC,qCAAqC;IACrC,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtI;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,qBAAqB;IACvD,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;OAGG;gBACS,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG;IAItD,mDAAmD;IAC5C,WAAW,IAAI,IAAI;IAG1B,qDAAqD;IAC9C,aAAa,IAAI,IAAI;IAG5B,8EAA8E;IACvE,OAAO,IAAI,yBAAyB;IAE3C,0DAA0D;IAC1D,IAAW,UAAU,IAAI,OAAO,CAAkB;IAClD,uDAAuD;IACvD,IAAW,QAAQ,IAAI,cAAc,GAAG,SAAS,CAAsB;IAEvE,SAAS,CAAC,iBAAiB,IAAI,KAAK,CAAC,SAAS;IAa9C,SAAS,CAAC,YAAY,IAAI,KAAK,CAAC,SAAS;IAIzC,mDAAmD;IACnD,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;IAED,IAAW,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAA0B;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB,IAAI,MAAM,CAExC;CAEF"}
@@ -6,7 +6,7 @@
6
6
  * @module ContentView
7
7
  */
8
8
  import * as React from "react";
9
- import { UiEvent } from "@itwin/core-react";
9
+ import { UiEvent } from "@itwin/appui-abstract";
10
10
  import { ConfigurableUiControl, ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
11
11
  /** ContentControl Activated Event class.
12
12
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/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IAClC,CAAC;IAED,mDAAmD;IACnD,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;IAED,IAAW,SAAS,CAAC,CAAkB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;CAEF","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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, ScreenViewport, ViewState } from \"@itwin/core-frontend\";\r\nimport { UiEvent } from \"@itwin/core-react\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\n\r\n/** ControlControl Activated Event Args interface.\r\n * @public\r\n */\r\nexport interface ContentControlActivatedEventArgs {\r\n activeContentControl: ContentControl;\r\n oldContentControl?: ContentControl;\r\n}\r\n\r\n/** ContentControl Activated Event class.\r\n * @public\r\n */\r\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> { }\r\n\r\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\r\n * @public\r\n */\r\nexport interface SupportsViewSelectorChange {\r\n /** Returns true if this control supports reacting to ViewSelector changes. */\r\n supportsViewSelectorChange: boolean;\r\n /** Process a ViewSelector change. */\r\n processViewSelectorChange(iModel: IModelConnection, viewDefinitionId: Id64String, viewState: ViewState, name: string): Promise<void>;\r\n}\r\n\r\n/** The base class for Frontstage content controls.\r\n * @public\r\n */\r\nexport class ContentControl extends ConfigurableUiControl {\r\n protected _reactNode: React.ReactNode;\r\n private _keyAdded = false;\r\n\r\n /** Creates an instance of ContentControl.\r\n * @param info An object that the subclass must pass to this base class.\r\n * @param options Options provided via the applicationData in a [[ContentProps]].\r\n */\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Called when this ContentControl is activated */\r\n public onActivated(): void {\r\n }\r\n\r\n /** Called when this ContentControl is deactivated */\r\n public onDeactivated(): void {\r\n }\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\r\n public getType(): ConfigurableUiControlType { return ConfigurableUiControlType.Content; }\r\n\r\n /** Returns true if this control is a Viewport control. */\r\n public get isViewport(): boolean { return false; }\r\n /** Returns the ScreenViewport if isViewport is true */\r\n public get viewport(): ScreenViewport | undefined { return undefined; }\r\n\r\n protected getKeyedReactNode(): React.ReactNode {\r\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\r\n // istanbul ignore else\r\n if (!(this._reactNode as React.ReactElement<any>).key) {\r\n const additionalProps: any = { key: this.uniqueId };\r\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\r\n }\r\n this._keyAdded = true;\r\n }\r\n\r\n return this._reactNode;\r\n }\r\n\r\n protected getReactNode(): React.ReactNode {\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /** The React node associated with this control. */\r\n public get reactNode(): React.ReactNode {\r\n return this.getReactNode();\r\n }\r\n\r\n public set reactNode(r: React.ReactNode) { this._reactNode = r; }\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public get navigationAidControl(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAA0B,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;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AC,CAAC;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;CAEF","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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, ScreenViewport, ViewState } from \"@itwin/core-frontend\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\n\r\n/** ControlControl Activated Event Args interface.\r\n * @public\r\n */\r\nexport interface ContentControlActivatedEventArgs {\r\n activeContentControl: ContentControl;\r\n oldContentControl?: ContentControl;\r\n}\r\n\r\n/** ContentControl Activated Event class.\r\n * @public\r\n */\r\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> { }\r\n\r\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\r\n * @public\r\n */\r\nexport interface SupportsViewSelectorChange {\r\n /** Returns true if this control supports reacting to ViewSelector changes. */\r\n supportsViewSelectorChange: boolean;\r\n /** Process a ViewSelector change. */\r\n processViewSelectorChange(iModel: IModelConnection, viewDefinitionId: Id64String, viewState: ViewState, name: string): Promise<void>;\r\n}\r\n\r\n/** The base class for Frontstage content controls.\r\n * @public\r\n */\r\nexport class ContentControl extends ConfigurableUiControl {\r\n protected _reactNode: React.ReactNode;\r\n private _keyAdded = false;\r\n\r\n /** Creates an instance of ContentControl.\r\n * @param info An object that the subclass must pass to this base class.\r\n * @param options Options provided via the applicationData in a [[ContentProps]].\r\n */\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Called when this ContentControl is activated */\r\n public onActivated(): void {\r\n }\r\n\r\n /** Called when this ContentControl is deactivated */\r\n public onDeactivated(): void {\r\n }\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\r\n public getType(): ConfigurableUiControlType { return ConfigurableUiControlType.Content; }\r\n\r\n /** Returns true if this control is a Viewport control. */\r\n public get isViewport(): boolean { return false; }\r\n /** Returns the ScreenViewport if isViewport is true */\r\n public get viewport(): ScreenViewport | undefined { return undefined; }\r\n\r\n protected getKeyedReactNode(): React.ReactNode {\r\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\r\n // istanbul ignore else\r\n if (!(this._reactNode as React.ReactElement<any>).key) {\r\n const additionalProps: any = { key: this.uniqueId };\r\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\r\n }\r\n this._keyAdded = true;\r\n }\r\n\r\n return this._reactNode;\r\n }\r\n\r\n protected getReactNode(): React.ReactNode {\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /** The React node associated with this control. */\r\n public get reactNode(): React.ReactNode {\r\n return this.getReactNode();\r\n }\r\n\r\n public set reactNode(r: React.ReactNode) { this._reactNode = r; }\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public get navigationAidControl(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n"]}
@@ -3,9 +3,9 @@
3
3
  */
4
4
  import "./ContentLayout.scss";
5
5
  import * as React from "react";
6
- import { CommonProps, UiEvent } from "@itwin/core-react";
6
+ import { CommonProps } from "@itwin/core-react";
7
7
  import { ContentGroup } from "./ContentGroup";
8
- import { ContentLayoutProps, LayoutFragmentProps } from "@itwin/appui-abstract";
8
+ import { ContentLayoutProps, LayoutFragmentProps, UiEvent } from "@itwin/appui-abstract";
9
9
  /** Common interface for HorizontalSplit and VerticalSplit
10
10
  */
11
11
  interface LayoutSplit {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;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K,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAEjD,KAAK,EAAE,2BAA2B;IAgB9B,iBAAiB;IAIjB,oBAAoB;IAIpC,OAAO,CAAC,6BAA6B,CAYnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAezC,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,UAAU,CAEhB;CACH"}
@@ -9,10 +9,11 @@
9
9
  import "./ContentLayout.scss";
10
10
  import classnames from "classnames";
11
11
  import * as React from "react";
12
- import SplitPane from "react-split-pane";
13
- import { Orientation, UiEvent } from "@itwin/core-react";
12
+ import { SplitPane } from "./split-pane/SplitPane";
13
+ import { Orientation } from "@itwin/core-react";
14
14
  import { FrontstageManager } from "../frontstage/FrontstageManager";
15
15
  import { UiShowHideManager } from "../utils/UiShowHideManager";
16
+ import { UiEvent } from "@itwin/appui-abstract";
16
17
  import { ContentViewManager } from "./ContentViewManager";
17
18
  /** ContentWrapper React component.
18
19
  */
@@ -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,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAe,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAiC,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAazF;GACG;AACH,MAAM,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAKpF,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,C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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","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,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAuH,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrK,OAAO,EAAiC,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;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,kBAAkB,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,CAAC;QAzCA,IAAI,CA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H;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","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 \"./split-pane/SplitPane\";\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/** 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;A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DAAwD;IACxD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED,oDAAoD;WACtC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAKpD,6CAA6C;IAC7C,gBAAuB,2BAA2B,4BAAmC;IAErF,oDAAoD;WACtC,gBAAgB,IAAI,KAAK,CAAC,SAAS,GAAG,SAAS;IAI7D,wCAAwC;WAC1B,uBAAuB,IAAI,cAAc,GAAG,SAAS;IAgBnE,yCAAyC;WAC3B,gBAAgB,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,oBAAoB,UAAQ,GAAG,IAAI;IAyCnG,8CAA8C;WAChC,oBAAoB,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS;IAKjE;;;OAGG;WACW,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAM9E;;;OAGG;WACW,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;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"}
@@ -5,7 +5,7 @@
5
5
  /** @packageDocumentation
6
6
  * @module ContentView
7
7
  */
8
- import { UiEvent } from "@itwin/core-react";
8
+ import { UiEvent } from "@itwin/appui-abstract";
9
9
  import { FrontstageManager } from "../frontstage/FrontstageManager";
10
10
  import { ViewUtilities } from "../utils/ViewUtilities";
11
11
  import { ContentLayoutManager } from "./ContentLayoutManager";
@@ -1 +1 @@
1
- {"version":3,"file":"ContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/Content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M,CAAC,eAAe,CAAC,OAAmC;QAC/D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,aAAa,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,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;;AApJc,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,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAUjD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,OAAkC;CAAI;AAYjF;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAsC;CAAI;AAEzF;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B,wDAAwD;IACjD,MAAM,K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AqB,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"]}
@@ -0,0 +1,21 @@
1
+ /** @packageDocumentation
2
+ * @module ContentView
3
+ */
4
+ import * as React from "react";
5
+ /** Based on react-split-pane package. See https://github.com/tomkp/react-split-pane/blob/master/LICENSE */
6
+ /**
7
+ * @internal
8
+ */
9
+ export interface PaneProps {
10
+ className?: string;
11
+ size?: string | number;
12
+ split?: "vertical" | "horizontal";
13
+ style?: React.CSSProperties;
14
+ eleRef: React.RefObject<HTMLDivElement>;
15
+ children?: React.ReactNode;
16
+ }
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare function Pane(props: PaneProps): JSX.Element;
21
+ //# sourceMappingURL=Pane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pane.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/content/split-pane/Pane.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,2GAA2G;AAE3G;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAwCpC"}