@itwin/appui-react 4.8.0 → 4.9.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  3. package/lib/cjs/appui-react/UiFramework.js +6 -0
  4. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  5. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  6. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  7. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  8. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  9. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  10. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  11. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts +3 -1
  12. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  13. package/lib/cjs/appui-react/accudraw/SquareButton.js +1 -4
  14. package/lib/cjs/appui-react/accudraw/SquareButton.js.map +1 -1
  15. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  16. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +25 -7
  17. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  18. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  19. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  20. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  21. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  22. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
  24. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  25. package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
  26. package/lib/cjs/appui-react/content/ContentControl.js +1 -0
  27. package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
  28. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  29. package/lib/cjs/appui-react/content/ContentGroup.js +2 -0
  30. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  31. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentLayout.js +1 -0
  33. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  34. package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
  35. package/lib/cjs/appui-react/content/IModelViewport.js +1 -0
  36. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  37. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  38. package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -0
  39. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  40. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  41. package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -0
  42. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  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 -0
  45. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  46. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  47. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +1 -0
  48. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  49. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  50. package/lib/cjs/appui-react/feedback/ElementTooltip.js +3 -3
  51. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  52. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  53. package/lib/cjs/appui-react/framework/FrameworkContent.js +2 -0
  54. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  55. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  56. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js +8 -0
  57. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  58. package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/framework/FrameworkToolSettings.js +1 -0
  60. package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  61. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +8 -2
  62. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  63. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +25 -8
  64. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  65. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +15 -4
  67. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  68. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  69. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +2 -3
  71. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  72. package/lib/cjs/appui-react/frontstage/ModalFrontstage.scss +1 -1
  73. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
  74. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +5 -5
  75. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  76. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  77. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
  78. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  79. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
  81. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  82. package/lib/cjs/appui-react/messages/InputField.d.ts.map +1 -1
  83. package/lib/cjs/appui-react/messages/InputField.js +2 -3
  84. package/lib/cjs/appui-react/messages/InputField.js.map +1 -1
  85. package/lib/cjs/appui-react/messages/MessageLabel.js +2 -2
  86. package/lib/cjs/appui-react/messages/MessageLabel.js.map +1 -1
  87. package/lib/cjs/appui-react/messages/MessageManager.d.ts +15 -5
  88. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/messages/MessageManager.js +31 -39
  90. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  91. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts +8 -0
  92. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  93. package/lib/cjs/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +60 -14
  94. package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -0
  95. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  96. package/lib/cjs/appui-react/messages/Pointer.js +4 -3
  97. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  98. package/lib/cjs/appui-react/messages/getToastCategory.d.ts +1 -1
  99. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  100. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +1 -0
  101. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  102. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  103. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
  104. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  105. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  106. package/lib/cjs/appui-react/pickers/ViewSelector.js +2 -0
  107. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  108. package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
  109. package/lib/cjs/appui-react/popup/CardPopup.js +1 -2
  110. package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
  111. package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  112. package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -2
  113. package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
  114. package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
  115. package/lib/cjs/appui-react/popup/PopupManager.js +1 -0
  116. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  117. package/lib/cjs/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
  118. package/lib/cjs/appui-react/redux/ReducerRegistry.js +1 -0
  119. package/lib/cjs/appui-react/redux/ReducerRegistry.js.map +1 -1
  120. package/lib/cjs/appui-react/redux/StateManager.d.ts.map +1 -1
  121. package/lib/cjs/appui-react/redux/StateManager.js +1 -0
  122. package/lib/cjs/appui-react/redux/StateManager.js.map +1 -1
  123. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  124. package/lib/cjs/appui-react/shared/MenuItem.d.ts.map +1 -1
  125. package/lib/cjs/appui-react/shared/MenuItem.js +1 -0
  126. package/lib/cjs/appui-react/shared/MenuItem.js.map +1 -1
  127. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
  128. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
  129. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
  130. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
  131. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  132. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +19 -18
  133. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  134. package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts +13 -0
  135. package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
  136. package/lib/cjs/appui-react/stagepanels/StagePanelState.js +21 -0
  137. package/lib/cjs/appui-react/stagepanels/StagePanelState.js.map +1 -0
  138. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  139. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  140. package/lib/cjs/appui-react/statusfields/MessageCenter.js +6 -5
  141. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  142. package/lib/cjs/appui-react/statusfields/SelectionScope.scss +1 -3
  143. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  144. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  145. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  146. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  147. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  148. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
  149. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  150. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  151. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  152. package/lib/cjs/appui-react/theme/ThemeManager.js +3 -1
  153. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  154. package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  155. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +8 -8
  156. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  157. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
  158. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
  159. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
  160. package/lib/cjs/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
  161. package/lib/cjs/appui-react/toolsettings/ToolInformation.js +1 -0
  162. package/lib/cjs/appui-react/toolsettings/ToolInformation.js.map +1 -1
  163. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  164. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  165. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +16 -13
  166. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  167. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +16 -33
  168. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  169. package/lib/cjs/appui-react/widget-panels/Frontstage.js +243 -386
  170. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  171. package/lib/cjs/appui-react/widget-panels/ToolSettings.scss +1 -1
  172. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  173. package/lib/cjs/appui-react/widgets/WidgetDef.js +2 -0
  174. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  175. package/lib/cjs/appui-react/widgets/useWidget.d.ts +17 -0
  176. package/lib/cjs/appui-react/widgets/useWidget.d.ts.map +1 -0
  177. package/lib/cjs/appui-react/widgets/useWidget.js +70 -0
  178. package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -0
  179. package/lib/cjs/appui-react.d.ts +2 -0
  180. package/lib/cjs/appui-react.d.ts.map +1 -1
  181. package/lib/cjs/appui-react.js +2 -0
  182. package/lib/cjs/appui-react.js.map +1 -1
  183. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  184. package/lib/esm/appui-react/UiFramework.js +6 -0
  185. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  186. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  187. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  188. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  189. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  190. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  191. package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  192. package/lib/esm/appui-react/accudraw/SquareButton.d.ts +3 -1
  193. package/lib/esm/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  194. package/lib/esm/appui-react/accudraw/SquareButton.js +1 -4
  195. package/lib/esm/appui-react/accudraw/SquareButton.js.map +1 -1
  196. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  197. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +25 -7
  198. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  199. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  200. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  201. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  202. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  203. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
  204. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
  205. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  206. package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
  207. package/lib/esm/appui-react/content/ContentControl.js +1 -0
  208. package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
  209. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  210. package/lib/esm/appui-react/content/ContentGroup.js +2 -0
  211. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  212. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  213. package/lib/esm/appui-react/content/ContentLayout.js +1 -0
  214. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  215. package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
  216. package/lib/esm/appui-react/content/IModelViewport.js +1 -0
  217. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  218. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  219. package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -0
  220. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  221. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  222. package/lib/esm/appui-react/cursor/CursorInformation.js +1 -0
  223. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  224. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  225. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
  226. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  227. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  228. package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -0
  229. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  230. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  231. package/lib/esm/appui-react/feedback/ElementTooltip.js +4 -4
  232. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  233. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  234. package/lib/esm/appui-react/framework/FrameworkContent.js +2 -0
  235. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  236. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  237. package/lib/esm/appui-react/framework/FrameworkFrontstages.js +8 -0
  238. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  239. package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
  240. package/lib/esm/appui-react/framework/FrameworkToolSettings.js +1 -0
  241. package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  242. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +8 -2
  243. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  244. package/lib/esm/appui-react/frontstage/FrontstageDef.js +24 -7
  245. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  246. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  247. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +15 -4
  248. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  249. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  250. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  251. package/lib/esm/appui-react/frontstage/ModalFrontstage.js +2 -3
  252. package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  253. package/lib/esm/appui-react/frontstage/ModalFrontstage.scss +1 -1
  254. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
  255. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
  256. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  257. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  258. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
  259. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  260. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  261. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
  262. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  263. package/lib/esm/appui-react/messages/InputField.d.ts.map +1 -1
  264. package/lib/esm/appui-react/messages/InputField.js +3 -4
  265. package/lib/esm/appui-react/messages/InputField.js.map +1 -1
  266. package/lib/esm/appui-react/messages/MessageLabel.js +2 -2
  267. package/lib/esm/appui-react/messages/MessageLabel.js.map +1 -1
  268. package/lib/esm/appui-react/messages/MessageManager.d.ts +15 -5
  269. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  270. package/lib/esm/appui-react/messages/MessageManager.js +31 -39
  271. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  272. package/lib/esm/appui-react/messages/MessageRenderer.d.ts +8 -0
  273. package/lib/esm/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  274. package/lib/esm/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +58 -12
  275. package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -0
  276. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  277. package/lib/esm/appui-react/messages/Pointer.js +5 -4
  278. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  279. package/lib/esm/appui-react/messages/getToastCategory.d.ts +1 -1
  280. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  281. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -0
  282. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  283. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  284. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
  285. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  286. package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  287. package/lib/esm/appui-react/pickers/ViewSelector.js +2 -0
  288. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  289. package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
  290. package/lib/esm/appui-react/popup/CardPopup.js +2 -3
  291. package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
  292. package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  293. package/lib/esm/appui-react/popup/HTMLElementPopup.js +2 -3
  294. package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
  295. package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
  296. package/lib/esm/appui-react/popup/PopupManager.js +1 -0
  297. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  298. package/lib/esm/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
  299. package/lib/esm/appui-react/redux/ReducerRegistry.js +1 -0
  300. package/lib/esm/appui-react/redux/ReducerRegistry.js.map +1 -1
  301. package/lib/esm/appui-react/redux/StateManager.d.ts.map +1 -1
  302. package/lib/esm/appui-react/redux/StateManager.js +1 -0
  303. package/lib/esm/appui-react/redux/StateManager.js.map +1 -1
  304. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  305. package/lib/esm/appui-react/shared/MenuItem.d.ts.map +1 -1
  306. package/lib/esm/appui-react/shared/MenuItem.js +1 -0
  307. package/lib/esm/appui-react/shared/MenuItem.js.map +1 -1
  308. package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
  309. package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
  310. package/lib/esm/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
  311. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
  312. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  313. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +15 -14
  314. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  315. package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts +13 -0
  316. package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
  317. package/lib/esm/appui-react/stagepanels/StagePanelState.js +18 -0
  318. package/lib/esm/appui-react/stagepanels/StagePanelState.js.map +1 -0
  319. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  320. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  321. package/lib/esm/appui-react/statusfields/MessageCenter.js +6 -5
  322. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  323. package/lib/esm/appui-react/statusfields/SelectionScope.scss +1 -3
  324. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  325. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  326. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  327. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  328. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  329. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
  330. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  331. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  332. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  333. package/lib/esm/appui-react/theme/ThemeManager.js +3 -1
  334. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  335. package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  336. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +5 -5
  337. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  338. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
  339. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
  340. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
  341. package/lib/esm/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
  342. package/lib/esm/appui-react/toolsettings/ToolInformation.js +1 -0
  343. package/lib/esm/appui-react/toolsettings/ToolInformation.js.map +1 -1
  344. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  345. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  346. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +16 -13
  347. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  348. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +16 -33
  349. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  350. package/lib/esm/appui-react/widget-panels/Frontstage.js +244 -382
  351. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  352. package/lib/esm/appui-react/widget-panels/ToolSettings.scss +1 -1
  353. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  354. package/lib/esm/appui-react/widgets/WidgetDef.js +2 -0
  355. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  356. package/lib/esm/appui-react/widgets/useWidget.d.ts +17 -0
  357. package/lib/esm/appui-react/widgets/useWidget.d.ts.map +1 -0
  358. package/lib/esm/appui-react/widgets/useWidget.js +66 -0
  359. package/lib/esm/appui-react/widgets/useWidget.js.map +1 -0
  360. package/lib/esm/appui-react.d.ts +2 -0
  361. package/lib/esm/appui-react.d.ts.map +1 -1
  362. package/lib/esm/appui-react.js +2 -0
  363. package/lib/esm/appui-react.js.map +1 -1
  364. package/package.json +16 -17
  365. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +0 -10
  366. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  367. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +0 -1
  368. package/lib/cjs/appui-react/messages/MessageSpan.d.ts +0 -15
  369. package/lib/cjs/appui-react/messages/MessageSpan.d.ts.map +0 -1
  370. package/lib/cjs/appui-react/messages/MessageSpan.js +0 -23
  371. package/lib/cjs/appui-react/messages/MessageSpan.js.map +0 -1
  372. package/lib/esm/appui-react/messages/ActivityMessage.d.ts +0 -10
  373. package/lib/esm/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  374. package/lib/esm/appui-react/messages/ActivityMessage.js.map +0 -1
  375. package/lib/esm/appui-react/messages/MessageSpan.d.ts +0 -15
  376. package/lib/esm/appui-react/messages/MessageSpan.d.ts.map +0 -1
  377. package/lib/esm/appui-react/messages/MessageSpan.js +0 -18
  378. package/lib/esm/appui-react/messages/MessageSpan.js.map +0 -1
  379. /package/lib/cjs/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
  380. /package/lib/esm/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS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A6B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
1
+ {"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AASxE;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,SAA8B;CAAG;AAStE;;GAEG;AACH,MAAM,OAAO,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D;IACjD,MAAM,CAAC,iBAAiB;QAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,6BAA6B,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,OAAQ,CAAC;QAC7B,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,OAAO;QACnB,cAAc,CAAC,gBAAgB,EAAE,CAAC;QAClC,6BAA6B,CAAC,QAAQ,EAAE,CAAC;QACzC,0BAA0B,CAAC,QAAQ,EAAE,CAAC;QACtC,4BAA4B,CAAC,QAAQ,EAAE,CAAC;QACxC,WAAW,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC1C,WAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,YAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AAjKc,iDAAmB,GAAG,IAAI,GAAG,EAGzC,CAAC;AACW,0CAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,6CAAe,GAAG,IAAI,eAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;SAZtD,6BAA6B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
@@ -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,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CA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AI,MAAM,CAExC;CACF;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;gBAC5C,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;CAIlE"}
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,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,EAAE,cAAc,CAAC;IACrC,iBAAiB,CAAC,EAAE,cAAc,CAAC;CACpC;AAED;;GAEG;AAEH,qBAAa,4BAA6B,SAAQ,OAAO,CAAC,gCAAgC,CAAC;CAAG;AAE9F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,0BAA0B,EAAE,OAAO,CAAC;IACpC,qCAAqC;IACrC,yBAAyB,CACvB,MAAM,EAAE,gBAAgB,EACxB,gBAAgB,EAAE,UAAU,EAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;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;IAE1B,qDAAqD;IAC9C,aAAa,IAAI,IAAI;IAE5B,8EAA8E;IACvE,OAAO,IAAI,yBAAyB;IAI3C,0DAA0D;IAC1D,IAAW,UAAU,IAAI,OAAO,CAE/B;IACD,uDAAuD;IACvD,IAAW,QAAQ,IAAI,cAAc,GAAG,SAAS,CAEhD;IAED,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,EAEtC;IAED,uEAAuE;IACvE,IAAW,oBAAoB,IAAI,MAAM,CAExC;CACF;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;gBAC5C,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;CAIlE"}
@@ -11,6 +11,7 @@ import { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlTyp
11
11
  /** ContentControl Activated Event class.
12
12
  * @public
13
13
  */
14
+ // eslint-disable-next-line deprecation/deprecation
14
15
  export class ContentControlActivatedEvent extends UiEvent {
15
16
  }
16
17
  /** The base class for Frontstage content controls.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AAUjD;;GAEG;AACH,MAAM,OAAO,4BAA6B,SAAQ,OAAyC;CAAG;AAi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C;IACZ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD,YAAY,QAAgB,EAAE,IAAY,EAAE,IAAqB;QAC/D,KAAK,CAAC,IAAI,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControl,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\n\n/** ControlControl Activated Event Args interface.\n * @public\n */\nexport interface ContentControlActivatedEventArgs {\n activeContentControl: ContentControl;\n oldContentControl?: ContentControl;\n}\n\n/** ContentControl Activated Event class.\n * @public\n */\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> {}\n\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\n * @public\n */\nexport interface SupportsViewSelectorChange {\n /** Returns true if this control supports reacting to ViewSelector changes. */\n supportsViewSelectorChange: boolean;\n /** Process a ViewSelector change. */\n processViewSelectorChange(\n iModel: IModelConnection,\n viewDefinitionId: Id64String,\n viewState: ViewState,\n name: string\n ): Promise<void>;\n}\n\n/** The base class for Frontstage content controls.\n * @public\n */\nexport class ContentControl extends ConfigurableUiControl {\n protected _reactNode: React.ReactNode;\n private _keyAdded = false;\n\n /** Creates an instance of ContentControl.\n * @param info An object that the subclass must pass to this base class.\n * @param options Options provided via the applicationData in a [[ContentProps]].\n */\n constructor(info: ConfigurableCreateInfo, options: any) {\n super(info, options);\n }\n\n /** Called when this ContentControl is activated */\n public onActivated(): void {}\n\n /** Called when this ContentControl is deactivated */\n public onDeactivated(): void {}\n\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\n public getType(): ConfigurableUiControlType {\n return ConfigurableUiControlType.Content;\n }\n\n /** Returns true if this control is a Viewport control. */\n public get isViewport(): boolean {\n return false;\n }\n /** Returns the ScreenViewport if isViewport is true */\n public get viewport(): ScreenViewport | undefined {\n return undefined;\n }\n\n protected getKeyedReactNode(): React.ReactNode {\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\n // istanbul ignore else\n if (!(this._reactNode as React.ReactElement<any>).key) {\n const additionalProps: any = { key: this.uniqueId };\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\n }\n this._keyAdded = true;\n }\n\n return this._reactNode;\n }\n\n protected getReactNode(): React.ReactNode {\n return this.getKeyedReactNode();\n }\n\n /** The React node associated with this control. */\n public get reactNode(): React.ReactNode {\n return this.getReactNode();\n }\n\n public set reactNode(r: React.ReactNode) {\n this._reactNode = r;\n }\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public get navigationAidControl(): string {\n return \"\";\n }\n}\n\n/**\n * @beta\n */\nexport class FloatingContentControl extends ContentControl {\n constructor(uniqueId: string, name: string, node: React.ReactNode) {\n super(new ConfigurableCreateInfo(name, uniqueId, name), undefined);\n this._reactNode = node;\n }\n}\n"]}
1
+ {"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AAUjD;;GAEG;AACH,mD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IAED,uEAAuE;IACvE,IAAW,oBAAoB;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD,YAAY,QAAgB,EAAE,IAAY,EAAE,IAAqB;QAC/D,KAAK,CAAC,IAAI,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControl,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\n\n/** ControlControl Activated Event Args interface.\n * @public\n */\nexport interface ContentControlActivatedEventArgs {\n activeContentControl: ContentControl;\n oldContentControl?: ContentControl;\n}\n\n/** ContentControl Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> {}\n\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\n * @public\n */\nexport interface SupportsViewSelectorChange {\n /** Returns true if this control supports reacting to ViewSelector changes. */\n supportsViewSelectorChange: boolean;\n /** Process a ViewSelector change. */\n processViewSelectorChange(\n iModel: IModelConnection,\n viewDefinitionId: Id64String,\n viewState: ViewState,\n name: string\n ): Promise<void>;\n}\n\n/** The base class for Frontstage content controls.\n * @public\n */\nexport class ContentControl extends ConfigurableUiControl {\n protected _reactNode: React.ReactNode;\n private _keyAdded = false;\n\n /** Creates an instance of ContentControl.\n * @param info An object that the subclass must pass to this base class.\n * @param options Options provided via the applicationData in a [[ContentProps]].\n */\n constructor(info: ConfigurableCreateInfo, options: any) {\n super(info, options);\n }\n\n /** Called when this ContentControl is activated */\n public onActivated(): void {}\n\n /** Called when this ContentControl is deactivated */\n public onDeactivated(): void {}\n\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\n public getType(): ConfigurableUiControlType {\n return ConfigurableUiControlType.Content;\n }\n\n /** Returns true if this control is a Viewport control. */\n public get isViewport(): boolean {\n return false;\n }\n /** Returns the ScreenViewport if isViewport is true */\n public get viewport(): ScreenViewport | undefined {\n return undefined;\n }\n\n protected getKeyedReactNode(): React.ReactNode {\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\n // istanbul ignore else\n if (!(this._reactNode as React.ReactElement<any>).key) {\n const additionalProps: any = { key: this.uniqueId };\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\n }\n this._keyAdded = true;\n }\n\n return this._reactNode;\n }\n\n protected getReactNode(): React.ReactNode {\n return this.getKeyedReactNode();\n }\n\n /** The React node associated with this control. */\n public get reactNode(): React.ReactNode {\n return this.getReactNode();\n }\n\n public set reactNode(r: React.ReactNode) {\n this._reactNode = r;\n }\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public get navigationAidControl(): string {\n return \"\";\n }\n}\n\n/**\n * @beta\n */\nexport class FloatingContentControl extends ContentControl {\n constructor(uniqueId: string, name: string, node: React.ReactNode) {\n super(new ConfigurableCreateInfo(name, uniqueId, name), undefined);\n this._reactNode = node;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,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,eAAe,IAAI,KAAK,CAAC,SAAS,EAAE;IAkB3C,kGAAkG;IAC3F,qBAAqB,CAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,GACpB,cAAc,GAAG,SAAS;IAa7B,uFAAuF;IAChF,mBAAmB;IAI1B,4EAA4E;IACrE,kBAAkB,IAAI,cAAc,EAAE;IAe7C,6CAA6C;IACtC,uBAAuB,IAAI,IAAI;IAItC,uCAAuC;IAChC,iBAAiB,IAAI,IAAI;IAEhC,0CAA0C;IACnC,oBAAoB,IAAI,IAAI;IAInC;;OAEG;IACI,MAAM,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,iBAAiB;IA6BnE;;OAEG;IACI,YAAY,IAAI,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC;CAczD"}
@@ -67,6 +67,7 @@ class ContentGroup {
67
67
  if (contentControl) {
68
68
  if (contentControl.getType() !== ConfigurableUiControlType.Content &&
69
69
  contentControl.getType() !== ConfigurableUiControlType.Viewport) {
70
+ // eslint-disable-next-line deprecation/deprecation
70
71
  throw new UiError(UiFramework.loggerCategory(this), `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`);
71
72
  }
72
73
  contentControl.initialize();
@@ -143,6 +144,7 @@ class ContentGroup {
143
144
  const classId = InternalConfigurableUiManager.getConstructorClassId(content.classId);
144
145
  if (classId !== undefined)
145
146
  content.classId = classId;
147
+ // eslint-disable-next-line deprecation/deprecation
146
148
  else
147
149
  throw new UiError(UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);
148
150
  if (contentCallback)
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AACj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AAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,KAAK,EAA8B,CAAC;QAE1D,eAAe,CAAC,OAAO,CAAC,CAAC,OAAuB,EAAE,EAAE;YAClD,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AArMc,iBAAI,GAAG,CAAC,AAAJ,CAAK;SADb,YAAY","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport type { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the Content View */\n applicationData?: any;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `FrontstageConfig`. */\n public abstract contentGroup(config: FrontstageConfig): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the React nodes representing the Content Views in this Content Group. */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n }\n }\n );\n\n return contentNodes;\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Gets an array of the content controls representing the Content Views. */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentControls.push(control);\n }\n }\n );\n\n return contentControls;\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach(\n (content: ContentProps, index: number) => {\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n content.classId\n );\n if (classId !== undefined) content.classId = classId;\n else\n throw new UiError(\n UiFramework.loggerCategory(this),\n `toJSON: ContentControl at index ${index} is NOT registered with a string id`\n );\n\n if (contentCallback) contentCallback(content);\n }\n }\n );\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control: ContentControl) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n}\n"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;;oBAEjD,MAAM,IAAI,OAAO,CACf,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAChC,mCAAmC,KAAK,qCAAqC,CAC9E,CAAC;gBAEJ,IAAI,eAAe;oBAAE,eAAe,CAAC,OAAO,CAAC,CAAC;aAC/C;QACH,CAAC,CACF,CAAC;QAEF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,YAAY;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,KAAK,EAA8B,CAAC;QAE1D,eAAe,CAAC,OAAO,CAAC,CAAC,OAAuB,EAAE,EAAE;YAClD,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AAvMc,iBAAI,GAAG,CAAC,AAAJ,CAAK;SADb,YAAY","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport type { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the Content View */\n applicationData?: any;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `FrontstageConfig`. */\n public abstract contentGroup(config: FrontstageConfig): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the React nodes representing the Content Views in this Content Group. */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n }\n }\n );\n\n return contentNodes;\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Gets an array of the content controls representing the Content Views. */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentControls.push(control);\n }\n }\n );\n\n return contentControls;\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach(\n (content: ContentProps, index: number) => {\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n content.classId\n );\n if (classId !== undefined) content.classId = classId;\n // eslint-disable-next-line deprecation/deprecation\n else\n throw new UiError(\n UiFramework.loggerCategory(this),\n `toJSON: ContentControl at index ${index} is NOT registered with a string id`\n );\n\n if (contentCallback) contentCallback(content);\n }\n }\n );\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control: ContentControl) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EAIpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAKhD,wCAAwC;AACxC,UAAU,mBAAoB,SAAQ,WAAW;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA8FxD;AA8GD;GACG;AACH,UAAU,WAAW;IACnB,sBAAsB,CACpB,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,EAC/B,SAAS,EAAE,OAAO,GACjB,KAAK,CAAC,SAAS,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAuKD;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,UAAU,CAAC,CAAc;IAEjC,iCAAiC;IAC1B,EAA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C/B,SAAS,EAAE,OAAO,GACjB,KAAK,CAAC,SAAS,GAAG,SAAS;IAa9B;OACG;IACI,qBAAqB,IAAI,MAAM,EAAE;IAmBxC,OAAO,CAAC,gCAAgC;IA+BxC,OAAO,CAAC,8BAA8B;IAgCtC,gBAAgB;WACF,WAAW,CACvB,WAAW,EAAE,mBAAmB,GAC/B,WAAW,GAAG,SAAS;CAS3B;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AAEH,qBAAa,2BAA4B,SAAQ,OAAO,CAAC,+BAA+B,CAAC;CAAG;AAE5F;GACG;AACH,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAChD,2BAA2B,EAC3B,kBAAkB,CACnB;IACC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAEjD,KAAK,EAAE,2BAA2B;IAmB9B,iBAAiB;IAMjB,oBAAoB;IAMpC,OAAO,CAAC,6BAA6B,CAiBnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAoBzC,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,UAAU,CAEhB;CACH"}
@@ -320,6 +320,7 @@ export class ContentLayoutDef {
320
320
  /** Content Layout Activated Event class.
321
321
  * @public
322
322
  */
323
+ // eslint-disable-next-line deprecation/deprecation
323
324
  export class ContentLayoutActivatedEvent extends UiEvent {
324
325
  }
325
326
  /** Content Layout React component.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;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;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,OAAO,KAAK,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAC5C,CAAC;IACF,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IAErD,MAAM,iBAAiB,GAAG,CACxB,cAA+B,EACX,EAAE;QACtB,IAAI,SAA6B,CAAC;QAClC,IAAI,cAAc,IAAK,cAA0C,CAAC,GAAG,EAAE;YACrE,MAAM,GAAG,GAAI,cAA0C,CAAC,GAAa,CAAC;YACtE,oFAAoF;YACpF,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACnC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,uBAAuB;IACvB,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAClE,GA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AS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;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;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,OAAO,KAAK,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAC5C,CAAC;IACF,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IAErD,MAAM,iBAAiB,G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CAClE,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAqBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IModelViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,O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
+ // eslint-disable-next-line deprecation/deprecation
65
66
  else
66
67
  throw new UiError(UiFramework.loggerCategory(this), "No ViewState could be determined");
67
68
  return viewState;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CACxE,IAAI,EACJ,IAAI,CACL,CAAC,iBAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AACvB,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,cAAc,EACd,mBAAmB,GACE;IACrB,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC,KAAqB,EAAE,EAAE;QAC/D,MAAM,cAAc,GAAoB,KAAa,CACnD,WAAW,CAAC,iBAAiB,CAC9B,CAAC;QACF,OAAO,cAAc;YACnB,CAAC,CAAC,cAAc,CAAC,mBAAmB,CAAC,kBAAkB;YACvD,CAAC,CAAC,IAAI,CAAC;IACX,CAAC,CAAC,CAAC;IACH,IAAI,CAA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C,EACD,cAAc,EAAE,IAAI,CAAC,eAAe,GACpC,CACH,CAAC;IACJ,CAAC;IAED,kFAAkF;IACxE,wBAAwB,CAChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,YAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oCAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AAED,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState: FrameworkState = (state as any)[\n UiFramework.frameworkStateKey\n ];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n _options = _options ?? {};\n super(info, _options);\n this._options = _options;\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n } else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
1
+ {"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CACxE,IAAI,EACJ,IAAI,CACL,CAAC,iBAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AACvB,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,cAAc,EACd,mBAAmB,GACE;IACrB,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC,KAAqB,EAAE,EAAE;QAC/D,MAAM,cAAc,GAAoB,KAAa,CACnD,WAAW,CAAC,iBAAiB,CAC9B,CAAC;QACF,OAA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C;gBACvD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS;oBACpC,MAAA,WAAW,CAAC,WAAW,CAAC,mBAAmB,0CAAE,yBAAyB,CACpE,CAAC,CACF,CAAC;YACN,CAAC,EACD,cAAc,EAAE,IAAI,CAAC,eAAe,GACpC,CACH,CAAC;IACJ,CAAC;IAED,kFAAkF;IACxE,wBAAwB,CAChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,YAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oCAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AAED,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState: FrameworkState = (state as any)[\n UiFramework.frameworkStateKey\n ];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n _options = _options ?? {};\n super(info, _options);\n this._options = _options;\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n }\n // eslint-disable-next-line deprecation/deprecation\n else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAK9E,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAkB;IAC3C,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAkB;IAEhD,yCAAyC;IACzC,gBAAuB,uBAAuB,wBAA+B;IAE7E,wDAAwD;IACxD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED,oDAAoD;WACtC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAKpD,6CAA6C;IAC7C,gBAAuB,2BAA2B,4BAChB;IAElC,wDAAwD;IAExD,gBAAuB,8BAA8B;mBACxC,MAAM;OACd;IAEL,oDAAoD;WACtC,SAAS,IAAI,KAAK,CAAC,SAAS,GAAG,SAAS;IAItD,OAAO,CAAC,MAAM,CAAC,qBAAqB;IA8CpC,wCAAwC;WAC1B,uBAAuB,IAAI,cAAc,GAAG,SAAS;WAiBrD,yBAAyB,CAAC,cAAc,CAAC,EAAE,cAAc;WAQzD,0BAA0B,CAAC,cAAc,CAAC,EAAE,cAAc;IAOxE,yCAAyC;WAC3B,SAAS,CACrB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,EAC/B,oBAAoB,UAAQ,GAC3B,IAAI;IA6DP,8CAA8C;WAChC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS;IAK1D;;;OAGG;WACW,kBAAkB,CAC9B,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,oBAAoB,CAChC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,oBAAoB,CAChC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,yBAAyB,CACrC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAK3E;;;OAGG;WACW,qBAAqB,CACjC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;IACH,WAAkB,OAAO,wCAExB;IACD;;;OAGG;IACH,WAAkB,OAAO,wCAExB;CACF"}
1
+ {"version":3,"file":"InternalContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAA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ClC,OAAO;IAKV;;;OAGG;WACW,yBAAyB,CACrC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAK3E;;;OAGG;WACW,qBAAqB,CACjC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;IACH,WAAkB,OAAO,wCAExB;IACD;;;OAGG;IACH,WAAkB,OAAO,wCAExB;CACF"}
@@ -208,6 +208,7 @@ InternalContentViewManager.onMouseDownChangedEvent = new MouseDownChangedEvent()
208
208
  /** Gets the [[ActiveContentChangedEvent]] */
209
209
  InternalContentViewManager.onActiveContentChangedEvent = new ActiveContentChangedEvent();
210
210
  /** Fires when floating contents are added or removed */
211
+ // eslint-disable-next-line deprecation/deprecation
211
212
  InternalContentViewManager.onAvailableContentChangedEvent = new UiEvent();
212
213
  export { InternalContentViewManager };
213
214
  //# sourceMappingURL=InternalContentViewManager.js.map