@itwin/appui-react 4.16.5 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/lib/cjs/appui-react/UiFramework.d.ts +5 -0
  3. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/cjs/appui-react/UiFramework.js +5 -0
  5. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  6. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  7. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js +1 -0
  9. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  10. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  11. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  12. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  13. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  14. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  15. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  16. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  17. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts +1 -0
  18. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  19. package/lib/cjs/appui-react/backstage/BackstageComposer.js +2 -0
  20. package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
  21. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  22. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  24. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  25. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  26. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  27. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  28. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  29. package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
  30. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  31. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
  33. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  34. package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
  35. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  36. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
  37. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  38. package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
  39. package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
  40. package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
  41. package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
  42. package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
  43. package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
  44. package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  45. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
  46. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  47. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  48. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  50. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  51. package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
  52. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  53. package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
  54. package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
  56. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
  57. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  58. package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
  59. package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
  60. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  61. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
  63. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  64. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
  65. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  67. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  68. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  69. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  70. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  71. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  72. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
  73. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  74. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  75. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  76. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  77. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  78. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
  79. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
  81. package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
  82. package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
  83. package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
  84. package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  85. package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
  86. package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
  87. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
  88. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
  90. package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
  91. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
  92. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  93. package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
  94. package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
  95. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  96. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  97. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +3 -0
  98. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  99. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  100. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  101. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  102. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  103. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  104. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  105. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  106. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  107. package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  108. package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
  109. package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
  110. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
  111. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  112. package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
  113. package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
  114. package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
  115. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  116. package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
  117. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  118. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  119. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  120. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
  121. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  122. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  123. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  124. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  125. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  126. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  127. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  128. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  129. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  130. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  131. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  132. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  133. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  134. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  135. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  136. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  137. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  138. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  139. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  140. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  141. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  142. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  143. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  144. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  145. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  146. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  147. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  148. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  149. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  150. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  151. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  152. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  153. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  154. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  155. package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
  156. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  157. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  158. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  159. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
  160. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  161. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  162. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  163. package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
  164. package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
  165. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  166. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  167. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  168. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  169. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  170. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  171. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  172. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  173. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  174. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  175. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
  176. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  177. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  178. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  179. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  180. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  181. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
  182. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  183. package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
  184. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  185. package/lib/cjs/appui-react.d.ts +3 -0
  186. package/lib/cjs/appui-react.d.ts.map +1 -1
  187. package/lib/cjs/appui-react.js +3 -0
  188. package/lib/cjs/appui-react.js.map +1 -1
  189. package/lib/esm/appui-react/UiFramework.d.ts +5 -0
  190. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  191. package/lib/esm/appui-react/UiFramework.js +6 -1
  192. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  193. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  194. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  195. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
  196. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  197. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  198. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  199. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  200. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  201. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  202. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  203. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  204. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
  205. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  206. package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
  207. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  208. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  209. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  210. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  211. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  212. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  213. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  214. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  215. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  216. package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
  217. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  218. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  219. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
  220. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  221. package/lib/esm/appui-react/content/ContentLayout.js +45 -11
  222. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  223. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
  224. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  225. package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
  226. package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
  227. package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
  228. package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
  229. package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
  230. package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
  231. package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  232. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
  233. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  234. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  235. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  236. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  237. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  238. package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
  239. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  240. package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
  241. package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
  242. package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
  243. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
  244. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  245. package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
  246. package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
  247. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  248. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  249. package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
  250. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  251. package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
  252. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  253. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  254. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  255. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  256. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  257. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  258. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  259. package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
  260. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  261. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  262. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  263. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  264. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  265. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
  266. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  267. package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
  268. package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
  269. package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
  270. package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
  271. package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  272. package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
  273. package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
  274. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
  275. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  276. package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
  277. package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
  278. package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
  279. package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  280. package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
  281. package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
  282. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  283. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  284. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +3 -0
  285. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  286. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  287. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  288. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  289. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  290. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  291. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  292. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  293. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  294. package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  295. package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
  296. package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
  297. package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
  298. package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  299. package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
  300. package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
  301. package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
  302. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  303. package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
  304. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  305. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  306. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  307. package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
  308. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  309. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  310. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  311. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  312. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  313. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  314. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  315. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  316. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  317. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  318. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  319. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  320. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  321. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  322. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  323. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  324. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  325. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  326. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  327. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  328. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  329. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  330. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  331. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  332. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  333. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  334. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  335. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  336. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  337. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  338. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  339. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  340. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  341. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  342. package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
  343. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  344. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  345. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  346. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
  347. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  348. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  349. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  350. package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
  351. package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
  352. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  353. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  354. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  355. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  356. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  357. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  358. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  359. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  360. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  361. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  362. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
  363. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  364. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  365. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  366. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  367. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  368. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
  369. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  370. package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
  371. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  372. package/lib/esm/appui-react.d.ts +3 -0
  373. package/lib/esm/appui-react.d.ts.map +1 -1
  374. package/lib/esm/appui-react.js +3 -0
  375. package/lib/esm/appui-react.js.map +1 -1
  376. package/package.json +7 -7
@@ -14,12 +14,13 @@ import { Orientation } from "@itwin/components-react";
14
14
  import { SplitPane } from "./split-pane/SplitPane";
15
15
  import { useActiveFrontstageDef } from "../frontstage/FrontstageDef";
16
16
  import { UiFramework } from "../UiFramework";
17
- import { ContentOverlay } from "./ContentOverlay";
17
+ import { ContentOverlay, useContentOverlayStore } from "./ContentOverlay";
18
+ import { useConditionalValue } from "../hooks/useConditionalValue";
18
19
  /** ContentWrapper React component.
19
20
  * @internal
20
21
  */
21
22
  export function ContentWrapper(props) {
22
- const { content } = props;
23
+ const { content, contentIndex } = props;
23
24
  const activeFrontstageDef = useActiveFrontstageDef();
24
25
  const [isActive, setIsActive] = React.useState(() => {
25
26
  // eslint-disable-next-line deprecation/deprecation
@@ -35,6 +36,7 @@ export function ContentWrapper(props) {
35
36
  return controlId;
36
37
  };
37
38
  const [hasMultipleContents, setHasMultipleContents] = React.useState(() => (activeFrontstageDef &&
39
+ // eslint-disable-next-line deprecation/deprecation
38
40
  !!activeFrontstageDef.floatingContentControls?.length) ||
39
41
  // eslint-disable-next-line deprecation/deprecation
40
42
  (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1);
@@ -56,8 +58,8 @@ export function ContentWrapper(props) {
56
58
  setIsActive(!!contentId && contentId === activeContentId);
57
59
  }
58
60
  setHasMultipleContents((activeFrontstageDef &&
59
- !!activeFrontstageDef.floatingContentControls?.length) ||
60
61
  // eslint-disable-next-line deprecation/deprecation
62
+ !!activeFrontstageDef.floatingContentControls?.length) ||
61
63
  (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >
62
64
  1);
63
65
  });
@@ -70,15 +72,42 @@ export function ContentWrapper(props) {
70
72
  React.useEffect(() => {
71
73
  return UiFramework.content.onAvailableContentChangedEvent.addListener(() => {
72
74
  setHasMultipleContents((activeFrontstageDef &&
75
+ // eslint-disable-next-line deprecation/deprecation
73
76
  !!activeFrontstageDef.floatingContentControls?.length) ||
74
77
  // eslint-disable-next-line deprecation/deprecation
75
78
  (activeFrontstageDef?.contentGroup?.getContentControls().length ??
76
79
  0) > 1);
77
80
  });
78
81
  }, [activeFrontstageDef]);
79
- const active = isActive && hasMultipleContents;
82
+ const renderActiveStrip = useRenderActiveStrip(contentIndex);
83
+ const contentOverlays = useContentOverlayStore();
84
+ const active = renderActiveStrip !== undefined
85
+ ? renderActiveStrip
86
+ : isActive && (hasMultipleContents || contentOverlays > 1);
80
87
  return (React.createElement(ContentOverlay, { className: classnames("uifw-contentlayout-wrapper", props.className), style: props.style, active: active, onMouseDown: handleMouseDown, onMouseMove: UiFramework.visibility.handleContentMouseMove, role: "presentation" }, content));
81
88
  }
89
+ function useRenderActiveStrip(contentIndex) {
90
+ const contentGroup = React.useContext(ContentLayoutContext);
91
+ const contentProps = contentIndex === undefined
92
+ ? undefined
93
+ : contentGroup?.contentPropsList[contentIndex];
94
+ const renderActiveStrip = contentProps?.renderActiveStrip;
95
+ const getValue = React.useCallback(() => {
96
+ if (renderActiveStrip === undefined)
97
+ return undefined;
98
+ if (typeof renderActiveStrip === "boolean")
99
+ return renderActiveStrip;
100
+ return renderActiveStrip.getValue();
101
+ }, [renderActiveStrip]);
102
+ const eventIds = React.useMemo(() => {
103
+ if (renderActiveStrip === undefined)
104
+ return [];
105
+ if (typeof renderActiveStrip === "boolean")
106
+ return [];
107
+ return renderActiveStrip.eventIds;
108
+ }, [renderActiveStrip]);
109
+ return useConditionalValue(getValue, eventIds);
110
+ }
82
111
  /** Split Container class.
83
112
  */
84
113
  class SplitContainer extends React.Component {
@@ -122,7 +151,7 @@ class SplitContainer extends React.Component {
122
151
  class SingleContentContainer extends React.Component {
123
152
  render() {
124
153
  return (React.createElement("div", { className: classnames("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container", onMouseMove: UiFramework.visibility.handleContentMouseMove },
125
- React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" } })));
154
+ React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" }, contentIndex: this.props.contentIndex })));
126
155
  }
127
156
  }
128
157
  /** Minimum split size */
@@ -173,8 +202,8 @@ class HorizontalSplit extends BaseSplit {
173
202
  createContentContainer(contentNodes, resizable) {
174
203
  if (this.isLocked)
175
204
  resizable = false;
176
- const topContent = !this._topSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._topIndex] })) : (this._topSplit.createContentContainer(contentNodes, resizable));
177
- const bottomContent = !this._bottomSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._bottomIndex] })) : (this._bottomSplit.createContentContainer(contentNodes, resizable));
205
+ const topContent = !this._topSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._topIndex], contentIndex: this._topIndex })) : (this._topSplit.createContentContainer(contentNodes, resizable));
206
+ const bottomContent = !this._bottomSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._bottomIndex], contentIndex: this._bottomIndex })) : (this._bottomSplit.createContentContainer(contentNodes, resizable));
178
207
  return (React.createElement(SplitContainer, { contentA: topContent, contentB: bottomContent, orientation: Orientation.Horizontal, percentage: this.defaultPercentage, resizable: resizable, minSizeTopLeft: this._minSizeTop, minSizeBottomRight: this._minSizeBottom, splitterStateId: this.stateId, onSplitterChange: this._handleSplitterChange }));
179
208
  }
180
209
  }
@@ -211,8 +240,8 @@ class VerticalSplit extends BaseSplit {
211
240
  createContentContainer(contentNodes, resizable) {
212
241
  if (this.isLocked)
213
242
  resizable = false;
214
- const leftContent = !this._leftSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._leftIndex] })) : (this._leftSplit.createContentContainer(contentNodes, resizable));
215
- const rightContent = !this._rightSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._rightIndex] })) : (this._rightSplit.createContentContainer(contentNodes, resizable));
243
+ const leftContent = !this._leftSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._leftIndex], contentIndex: this._leftIndex })) : (this._leftSplit.createContentContainer(contentNodes, resizable));
244
+ const rightContent = !this._rightSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._rightIndex], contentIndex: this._rightIndex })) : (this._rightSplit.createContentContainer(contentNodes, resizable));
216
245
  return (React.createElement(SplitContainer, { contentA: leftContent, contentB: rightContent, orientation: Orientation.Vertical, percentage: this.defaultPercentage, resizable: resizable, minSizeTopLeft: this._minSizeLeft, minSizeBottomRight: this._minSizeRight, splitterStateId: this.stateId, onSplitterChange: this._handleSplitterChange }));
217
246
  }
218
247
  }
@@ -251,7 +280,7 @@ export class ContentLayoutDef {
251
280
  return this.rootSplit.createContentContainer(contentNodes, resizable);
252
281
  }
253
282
  if (contentNodes.length > 0)
254
- return React.createElement(SingleContentContainer, { content: contentNodes[0] });
283
+ return (React.createElement(SingleContentContainer, { content: contentNodes[0], contentIndex: 0 }));
255
284
  return undefined;
256
285
  }
257
286
  /** Gets the indexes of content views used in this Content Layout. */
@@ -326,6 +355,7 @@ export class ContentLayoutActivatedEvent extends UiEvent {
326
355
  export function ContentLayout(props) {
327
356
  const [contentLayoutDef, setContentLayoutDef] = React.useState(props.contentLayout);
328
357
  const [contentGroupId, setContentGroupId] = React.useState(props.contentGroup.groupId);
358
+ const [contentGroup, setContentGroup] = React.useState(props.contentGroup);
329
359
  const [contentNodes, setContentNodes] = React.useState(() => {
330
360
  // eslint-disable-next-line deprecation/deprecation
331
361
  return props.contentGroup.getContentNodes();
@@ -334,6 +364,7 @@ export function ContentLayout(props) {
334
364
  return UiFramework.frontstages.onContentLayoutActivatedEvent.addListener((args) => {
335
365
  setContentLayoutDef(args.contentLayout);
336
366
  setContentGroupId(args.contentGroup.groupId);
367
+ setContentGroup(args.contentGroup);
337
368
  // eslint-disable-next-line deprecation/deprecation
338
369
  setContentNodes(args.contentGroup.getContentNodes());
339
370
  });
@@ -345,8 +376,11 @@ export function ContentLayout(props) {
345
376
  UiFramework.content.setMouseDown(true);
346
377
  }, onMouseUp: () => {
347
378
  UiFramework.content.setMouseDown(false);
348
- }, role: "presentation" }, contentContainer));
379
+ }, role: "presentation" },
380
+ React.createElement(ContentLayoutContext.Provider, { value: contentGroup }, contentContainer)));
349
381
  }
350
382
  return null;
351
383
  }
384
+ const ContentLayoutContext = React.createContext(undefined);
385
+ ContentLayoutContext.displayName = "uifw:ContentLayoutContext";
352
386
  //# sourceMappingURL=ContentLayout.js.map
@@ -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;AAQ/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQlD;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;QAClD,mDAAmD;QACnD,OAAO,OAAO,KAAK,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,CACxB,cAA+B,EACX,EAAE;QACtB,IAAI,SAA6B,CAAC;QAClC,IAAI,cAAc,IAAK,cAA0C,CAAC,GAAG,EAAE,CAAC;YACtE,MAAM,GAAG,GAAI,cAA0C,CA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KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;IAC9C,CAAC,CACF,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CACtE,CAAC,IAAI,EAAE,EAAE;YACP,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACxC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAC7C,mDAAmD;YACnD,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC;QACvD,CAAC,CACF,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,mDAAmD;IACnD,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,mBAAmB,CAC3D,YAAY,EACZ,IAAI,CACL,CAAC;IACF,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,GAAG,EAAE,GAAG,cAAc,IAAI,gBAAgB,CAAC,EAAE,EAAE,EAC/C,WAAW,EAAE,GAAG,EAAE;gBAChB,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC1C,CAAC,EACD,IAAI,EAAC,cAAc,IAElB,gBAAgB,CACb,CACP,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,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\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/components-react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\nimport { ContentOverlay } from \"./ContentOverlay\";\n\n/** Properties for [[ContentWrapper]] */\n// eslint-disable-next-line deprecation/deprecation\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 activeFrontstageDef = useActiveFrontstageDef();\n const [isActive, setIsActive] = React.useState(() => {\n // eslint-disable-next-line deprecation/deprecation\n return content === UiFramework.content.getActive();\n });\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 const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line deprecation/deprecation\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line deprecation/deprecation\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n // eslint-disable-next-line deprecation/deprecation\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) {\n setIsActive(contentIsIdentical);\n } else {\n const contentId = contentControlKey(content);\n // eslint-disable-next-line deprecation/deprecation\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(!!contentId && contentId === activeContentId);\n }\n\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line deprecation/deprecation\n (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >\n 1\n );\n }\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n () => {\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line deprecation/deprecation\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n }\n );\n }, [activeFrontstageDef]);\n\n const active = isActive && hasMultipleContents;\n return (\n <ContentOverlay\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n active={active}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n </ContentOverlay>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\n// eslint-disable-next-line deprecation/deprecation\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 if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n if (width > 0) percentage = size / width;\n }\n\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 */\n// eslint-disable-next-line deprecation/deprecation\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class. */\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. */\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 if (props.id) this.stateId = props.id;\n\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 /** @deprecated in 4.16.0. Used internally. */\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 * @deprecated in 4.16.0. Used internally.\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.rootSplit) {\n // eslint-disable-next-line deprecation/deprecation\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 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 * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport function ContentLayout(props: ContentLayoutComponentProps) {\n const [contentLayoutDef, setContentLayoutDef] =\n React.useState<ContentLayoutDef>(props.contentLayout);\n const [contentGroupId, setContentGroupId] = React.useState<\n ContentGroup[\"id\"]\n >(props.contentGroup.groupId);\n const [contentNodes, setContentNodes] = React.useState<React.ReactNode[]>(\n () => {\n // eslint-disable-next-line deprecation/deprecation\n return props.contentGroup.getContentNodes();\n }\n );\n\n React.useEffect(() => {\n return UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n (args) => {\n setContentLayoutDef(args.contentLayout);\n setContentGroupId(args.contentGroup.groupId);\n // eslint-disable-next-line deprecation/deprecation\n setContentNodes(args.contentGroup.getContentNodes());\n }\n );\n }, []);\n\n // eslint-disable-next-line deprecation/deprecation\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n if (contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={props.className}\n style={props.style}\n key={`${contentGroupId}-${contentLayoutDef.id}`}\n onMouseDown={() => {\n UiFramework.content.setMouseDown(true);\n }}\n onMouseUp={() => {\n UiFramework.content.setMouseDown(false);\n }}\n role=\"presentation\"\n >\n {contentContainer}\n </div>\n );\n }\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,8BAA8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,SAAS,CACV,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,2BAA2B,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\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/components-react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"./ContentLayoutProps\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\nimport { ContentOverlay, useContentOverlayStore } from \"./ContentOverlay\";\nimport { useConditionalValue } from \"../hooks/useConditionalValue\";\n\n/** Properties for [[ContentWrapper]] */\n// eslint-disable-next-line deprecation/deprecation\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n contentIndex: number | undefined;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content, contentIndex } = props;\n const activeFrontstageDef = useActiveFrontstageDef();\n const [isActive, setIsActive] = React.useState(() => {\n // eslint-disable-next-line deprecation/deprecation\n return content === UiFramework.content.getActive();\n });\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 const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n // eslint-disable-next-line deprecation/deprecation\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line deprecation/deprecation\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line deprecation/deprecation\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n // eslint-disable-next-line deprecation/deprecation\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) {\n setIsActive(contentIsIdentical);\n } else {\n const contentId = contentControlKey(content);\n // eslint-disable-next-line deprecation/deprecation\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(!!contentId && contentId === activeContentId);\n }\n\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line deprecation/deprecation\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >\n 1\n );\n }\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n () => {\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line deprecation/deprecation\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line deprecation/deprecation\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n }\n );\n }, [activeFrontstageDef]);\n\n const renderActiveStrip = useRenderActiveStrip(contentIndex);\n const contentOverlays = useContentOverlayStore();\n\n const active =\n renderActiveStrip !== undefined\n ? renderActiveStrip\n : isActive && (hasMultipleContents || contentOverlays > 1);\n return (\n <ContentOverlay\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n active={active}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n </ContentOverlay>\n );\n}\n\nfunction useRenderActiveStrip(contentIndex: number | undefined) {\n const contentGroup = React.useContext(ContentLayoutContext);\n const contentProps =\n contentIndex === undefined\n ? undefined\n : contentGroup?.contentPropsList[contentIndex];\n const renderActiveStrip = contentProps?.renderActiveStrip;\n const getValue = React.useCallback(() => {\n if (renderActiveStrip === undefined) return undefined;\n if (typeof renderActiveStrip === \"boolean\") return renderActiveStrip;\n return renderActiveStrip.getValue();\n }, [renderActiveStrip]);\n const eventIds = React.useMemo(() => {\n if (renderActiveStrip === undefined) return [];\n if (typeof renderActiveStrip === \"boolean\") return [];\n return renderActiveStrip.eventIds;\n }, [renderActiveStrip]);\n return useConditionalValue(getValue, eventIds);\n}\n\n/** Properties for the [[SplitContainer]] component */\n// eslint-disable-next-line deprecation/deprecation\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 if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n if (width > 0) percentage = size / width;\n }\n\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\n // eslint-disable-next-line deprecation/deprecation\n extends CommonProps,\n Pick<ContentWrapperProps, \"contentIndex\"> {\n content: React.ReactNode;\n}\n\n/** Single Content Container class. */\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 contentIndex={this.props.contentIndex}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit. */\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 if (props.id) this.stateId = props.id;\n\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\n content={contentNodes[this._topIndex]}\n contentIndex={this._topIndex}\n />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper\n content={contentNodes[this._bottomIndex]}\n contentIndex={this._bottomIndex}\n />\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\n content={contentNodes[this._leftIndex]}\n contentIndex={this._leftIndex}\n />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper\n content={contentNodes[this._rightIndex]}\n contentIndex={this._rightIndex}\n />\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 /** @deprecated in 4.16.0. Used internally. */\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 * @deprecated in 4.16.0. Used internally.\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.rootSplit) {\n // eslint-disable-next-line deprecation/deprecation\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return (\n <SingleContentContainer content={contentNodes[0]} contentIndex={0} />\n );\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout. */\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 * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport function ContentLayout(props: ContentLayoutComponentProps) {\n const [contentLayoutDef, setContentLayoutDef] =\n React.useState<ContentLayoutDef>(props.contentLayout);\n const [contentGroupId, setContentGroupId] = React.useState<\n ContentGroup[\"id\"]\n >(props.contentGroup.groupId);\n const [contentGroup, setContentGroup] = React.useState<ContentGroup>(\n props.contentGroup\n );\n const [contentNodes, setContentNodes] = React.useState<React.ReactNode[]>(\n () => {\n // eslint-disable-next-line deprecation/deprecation\n return props.contentGroup.getContentNodes();\n }\n );\n\n React.useEffect(() => {\n return UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n (args) => {\n setContentLayoutDef(args.contentLayout);\n setContentGroupId(args.contentGroup.groupId);\n setContentGroup(args.contentGroup);\n // eslint-disable-next-line deprecation/deprecation\n setContentNodes(args.contentGroup.getContentNodes());\n }\n );\n }, []);\n\n // eslint-disable-next-line deprecation/deprecation\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n if (contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={props.className}\n style={props.style}\n key={`${contentGroupId}-${contentLayoutDef.id}`}\n onMouseDown={() => {\n UiFramework.content.setMouseDown(true);\n }}\n onMouseUp={() => {\n UiFramework.content.setMouseDown(false);\n }}\n role=\"presentation\"\n >\n <ContentLayoutContext.Provider value={contentGroup}>\n {contentContainer}\n </ContentLayoutContext.Provider>\n </div>\n );\n }\n\n return null;\n}\n\nconst ContentLayoutContext = React.createContext<ContentGroup | undefined>(\n undefined\n);\nContentLayoutContext.displayName = \"uifw:ContentLayoutContext\";\n"]}
@@ -0,0 +1,63 @@
1
+ /** @packageDocumentation
2
+ * @module ContentView
3
+ */
4
+ /** Base interface for layout split properties
5
+ * @public
6
+ */
7
+ export interface LayoutSplitPropsBase {
8
+ /** The id used to save the current state of the splitter */
9
+ id: string;
10
+ /** The percentage of this layout that should be occupied by the top/left fragment by default */
11
+ percentage: number;
12
+ /** Used to lock splitter into fixed position. Defaults to false. */
13
+ lock?: boolean;
14
+ }
15
+ /** Properties for a layout fragment
16
+ * @public
17
+ */
18
+ export interface LayoutFragmentProps {
19
+ /** Vertical split layout properties */
20
+ verticalSplit?: LayoutVerticalSplitProps;
21
+ /** Horizontal split layout properties */
22
+ horizontalSplit?: LayoutHorizontalSplitProps;
23
+ }
24
+ /** Properties for a vertical layout split.
25
+ * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.
26
+ * When a number, it represents an index into a [[ContentGroup]].
27
+ * @public
28
+ */
29
+ export interface LayoutVerticalSplitProps extends LayoutSplitPropsBase {
30
+ /** Left layout fragment properties. */
31
+ left: LayoutFragmentProps | number;
32
+ /** Right layout fragment properties. */
33
+ right: LayoutFragmentProps | number;
34
+ /** Minimum size of the left fragment. */
35
+ minSizeLeft?: number;
36
+ /** Minimum size of the right fragment. */
37
+ minSizeRight?: number;
38
+ }
39
+ /** Properties for a horizontal layout split
40
+ * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.
41
+ * When a number, it represents an index into a [[ContentGroup]].
42
+ * @public
43
+ */
44
+ export interface LayoutHorizontalSplitProps extends LayoutSplitPropsBase {
45
+ /** Top layout fragment properties. */
46
+ top: LayoutFragmentProps | number;
47
+ /** Bottom layout fragment properties. */
48
+ bottom: LayoutFragmentProps | number;
49
+ /** Minimum size of the top fragment. */
50
+ minSizeTop?: number;
51
+ /** Minimum size of the bottom fragment. */
52
+ minSizeBottom?: number;
53
+ }
54
+ /** Properties for a [[ContentLayoutDef]]
55
+ * @public
56
+ */
57
+ export interface ContentLayoutProps extends LayoutFragmentProps {
58
+ /** ID for this Content Layout */
59
+ id: string;
60
+ /** Description of the layout*/
61
+ description?: string;
62
+ }
63
+ //# sourceMappingURL=ContentLayoutProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentLayoutProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayoutProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,gGAAgG;IAChG,UAAU,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,uCAAuC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,yCAAyC;IACzC,eAAe,CAAC,EAAE,0BAA0B,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,uCAAuC;IACvC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAAC;IACnC,wCAAwC;IACxC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAAC;IAEpC,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,sCAAsC;IACtC,GAAG,EAAE,mBAAmB,GAAG,MAAM,CAAC;IAClC,yCAAyC;IACzC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAAC;IAErC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,9 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module ContentView
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=ContentLayoutProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentLayoutProps.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayoutProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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/** Base interface for layout split properties\n * @public\n */\nexport interface LayoutSplitPropsBase {\n /** The id used to save the current state of the splitter */\n id: string;\n /** The percentage of this layout that should be occupied by the top/left fragment by default */\n percentage: number;\n /** Used to lock splitter into fixed position. Defaults to false. */\n lock?: boolean;\n}\n\n/** Properties for a layout fragment\n * @public\n */\nexport interface LayoutFragmentProps {\n /** Vertical split layout properties */\n verticalSplit?: LayoutVerticalSplitProps;\n /** Horizontal split layout properties */\n horizontalSplit?: LayoutHorizontalSplitProps;\n}\n\n/** Properties for a vertical layout split.\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\n * When a number, it represents an index into a [[ContentGroup]].\n * @public\n */\nexport interface LayoutVerticalSplitProps extends LayoutSplitPropsBase {\n /** Left layout fragment properties. */\n left: LayoutFragmentProps | number;\n /** Right layout fragment properties. */\n right: LayoutFragmentProps | number;\n\n /** Minimum size of the left fragment. */\n minSizeLeft?: number;\n /** Minimum size of the right fragment. */\n minSizeRight?: number;\n}\n\n/** Properties for a horizontal layout split\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\n * When a number, it represents an index into a [[ContentGroup]].\n * @public\n */\nexport interface LayoutHorizontalSplitProps extends LayoutSplitPropsBase {\n /** Top layout fragment properties. */\n top: LayoutFragmentProps | number;\n /** Bottom layout fragment properties. */\n bottom: LayoutFragmentProps | number;\n\n /** Minimum size of the top fragment. */\n minSizeTop?: number;\n /** Minimum size of the bottom fragment. */\n minSizeBottom?: number;\n}\n\n/** Properties for a [[ContentLayoutDef]]\n * @public\n */\nexport interface ContentLayoutProps extends LayoutFragmentProps {\n /** ID for this Content Layout */\n id: string;\n /** Description of the layout*/\n description?: string;\n}\n"]}
@@ -3,6 +3,10 @@
3
3
  */
4
4
  import "./ContentOverlay.scss";
5
5
  import * as React from "react";
6
+ /** Returns the number of content overlays.
7
+ * @internal
8
+ */
9
+ export declare const useContentOverlayStore: import("zustand").UseBoundStore<import("zustand").StoreApi<number>>;
6
10
  interface ContentOverlayProps extends React.ComponentProps<"div"> {
7
11
  /** Describes if the content is active. */
8
12
  active?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentOverlay.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC/D,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAerB"}
1
+ {"version":3,"file":"ContentOverlay.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;GAEG;AACH,eAAO,MAAM,sBAAsB,qEAA0B,CAAC;AAE9D,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC/D,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAgBrB"}
@@ -8,12 +8,44 @@
8
8
  import "./ContentOverlay.scss";
9
9
  import classnames from "classnames";
10
10
  import * as React from "react";
11
+ import { create } from "zustand";
12
+ import { useOptionalLayout } from "../layout/base/LayoutStore";
13
+ import { getWidgetState } from "../widgets/WidgetDef";
14
+ import { TabIdContext } from "../layout/widget/ContentRenderer";
15
+ import { WidgetState } from "../widgets/WidgetState";
16
+ /** Returns the number of content overlays.
17
+ * @internal
18
+ */
19
+ export const useContentOverlayStore = create(() => 0);
11
20
  /** Overlay used to identify active content views.
12
21
  * @beta
13
22
  */
14
23
  export function ContentOverlay({ className, children, active, ...other }) {
24
+ useTrackContentOverlay();
15
25
  return (React.createElement("div", { className: classnames("uifw-content-contentOverlay", className), ...other },
16
26
  children,
17
27
  React.createElement("div", { className: classnames("uifw-content-contentOverlay_activeStrip", active && "uifw-active") })));
18
28
  }
29
+ function useTrackContentOverlay() {
30
+ const tabId = React.useContext(TabIdContext);
31
+ const visible = useOptionalLayout((state) => {
32
+ if (!state)
33
+ return true;
34
+ if (!tabId)
35
+ return true;
36
+ const widgetState = getWidgetState(tabId, state);
37
+ // Do not track content overlays in hidden widgets.
38
+ if (widgetState === WidgetState.Hidden)
39
+ return false;
40
+ return true;
41
+ });
42
+ React.useEffect(() => {
43
+ if (!visible)
44
+ return;
45
+ useContentOverlayStore.setState((prev) => prev + 1);
46
+ return () => {
47
+ useContentOverlayStore.setState((prev) => prev - 1);
48
+ };
49
+ }, [visible]);
50
+ }
19
51
  //# sourceMappingURL=ContentOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentOverlay.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACY;IACpB,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,6BAA6B,EAAE,SAAS,CAAC,KAC3D,KAAK;QAER,QAAQ;QACT,6BACE,SAAS,EAAE,UAAU,CACnB,yCAAyC,EACzC,MAAM,IAAI,aAAa,CACxB,GACD,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./ContentOverlay.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\n\n// eslint-disable-next-line deprecation/deprecation\ninterface ContentOverlayProps extends React.ComponentProps<\"div\"> {\n /** Describes if the content is active. */\n active?: boolean;\n}\n\n/** Overlay used to identify active content views.\n * @beta\n */\nexport function ContentOverlay({\n className,\n children,\n active,\n ...other\n}: ContentOverlayProps) {\n return (\n <div\n className={classnames(\"uifw-content-contentOverlay\", className)}\n {...other}\n >\n {children}\n <div\n className={classnames(\n \"uifw-content-contentOverlay_activeStrip\",\n active && \"uifw-active\"\n )}\n />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ContentOverlay.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,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AsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE;YACV,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,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 \"./ContentOverlay.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { create } from \"zustand\";\nimport { useOptionalLayout } from \"../layout/base/LayoutStore\";\nimport { getWidgetState } from \"../widgets/WidgetDef\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer\";\nimport { WidgetState } from \"../widgets/WidgetState\";\n\n/** Returns the number of content overlays.\n * @internal\n */\nexport const useContentOverlayStore = create<number>(() => 0);\n\ninterface ContentOverlayProps extends React.ComponentProps<\"div\"> {\n /** Describes if the content is active. */\n active?: boolean;\n}\n\n/** Overlay used to identify active content views.\n * @beta\n */\nexport function ContentOverlay({\n className,\n children,\n active,\n ...other\n}: ContentOverlayProps) {\n useTrackContentOverlay();\n return (\n <div\n className={classnames(\"uifw-content-contentOverlay\", className)}\n {...other}\n >\n {children}\n <div\n className={classnames(\n \"uifw-content-contentOverlay_activeStrip\",\n active && \"uifw-active\"\n )}\n />\n </div>\n );\n}\n\nfunction useTrackContentOverlay() {\n const tabId = React.useContext(TabIdContext);\n const visible = useOptionalLayout((state) => {\n if (!state) return true;\n if (!tabId) return true;\n\n const widgetState = getWidgetState(tabId, state);\n // Do not track content overlays in hidden widgets.\n if (widgetState === WidgetState.Hidden) return false;\n\n return true;\n });\n React.useEffect(() => {\n if (!visible) return;\n useContentOverlayStore.setState((prev) => prev + 1);\n return () => {\n useContentOverlayStore.setState((prev) => prev - 1);\n };\n }, [visible]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUpE;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBAO1E;AAED;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,GACT,EAAE,mCAAmC,qBAarC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,4BAA4B;;EA4ErE"}
1
+ {"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUpE;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBAO1E;AAED;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,GACT,EAAE,mCAAmC,qBAcrC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,4BAA4B;;EA4ErE"}
@@ -26,7 +26,7 @@ export function FloatingViewportContent(props) {
26
26
  */
27
27
  export function FloatingViewportContentWrapper({ children, }) {
28
28
  return (React.createElement("div", { onMouseMove: UiFramework.visibility.handleContentMouseMove, className: "uifw-dialog-imodel-content", style: { height: "100%", position: "relative" } },
29
- React.createElement(ContentWrapper, { content: children, style: { height: "100%", position: "relative" } })));
29
+ React.createElement(ContentWrapper, { content: children, style: { height: "100%", position: "relative" }, contentIndex: undefined })));
30
30
  }
31
31
  /**
32
32
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,E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,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;YACvC,cAAc,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC3C,IAAI,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;gBAC9C,cAAc,CAAC,OAAO,CAAC,SAAS,GAAG,eAAe,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE;YAC1D,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAC5C,mDAAmD;gBACnD,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl\";\nimport { ContentWrapper } from \"./ContentLayout\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useRefs } from \"@itwin/core-react\";\nimport { ContentOverlay } from \"./ContentOverlay\";\n\n/* eslint-disable deprecation/deprecation */\n\n/**\n * @beta\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContent}.\n */\nexport interface FloatingViewportContentProps {\n /** callback used to construct context menu when user right-clicks on canvas/viewport */\n onContextMenu?: (e: React.MouseEvent) => boolean;\n /** viewport/content control uniqueId */\n contentId: string;\n /** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */\n initialViewState: ViewStateProp;\n /** Function to get a reference to the ScreenViewport */\n viewportRef?: React.Ref<ScreenViewport>;\n}\n\n/**\n * @beta\n * @deprecated in 4.16.0. Wrap {@link @itwin/imodel-components-react#ViewportComponent} component with a {@link ContentOverlay} instead.\n */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContentWrapper}.\n */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Use {@link ContentOverlay} component to display the active content indicator instead.\n */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n}\n\n/**\n * @alpha\n * @deprecated in 4.16.0. Use {@link @itwin/imodel-components-react#ViewportComponent} component instead.\n */\nexport function useFloatingViewport(args: FloatingViewportContentProps) {\n const { contentId, initialViewState, onContextMenu, viewportRef } = args;\n const [viewport, setViewport] = React.useState<ScreenViewport | undefined>();\n const contentControl = React.useRef<\n // eslint-disable-next-line deprecation/deprecation\n FloatingViewportContentControl | undefined\n >();\n\n const viewState = React.useMemo(\n () =>\n typeof initialViewState === \"function\"\n ? initialViewState()\n : initialViewState,\n [initialViewState]\n );\n const ref = React.useCallback((v: ScreenViewport) => {\n setViewport(v);\n }, []);\n\n const refs = useRefs(ref, viewportRef);\n const viewportControl = React.useMemo(() => {\n const node = (\n <ViewportComponent\n key={contentId}\n imodel={viewState.iModel}\n viewState={viewState}\n controlId={contentId}\n onContextMenu={onContextMenu}\n viewportRef={refs}\n />\n );\n return node;\n }, [refs, onContextMenu, viewState, contentId]);\n\n React.useEffect(() => {\n if (!contentControl.current) {\n // eslint-disable-next-line deprecation/deprecation\n contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n }, [contentId]);\n\n React.useEffect(() => {\n if (viewport && contentControl.current) {\n contentControl.current.viewport = viewport;\n if (null === contentControl.current.reactNode) {\n contentControl.current.reactNode = viewportControl;\n }\n }\n }, [viewport, viewportControl]);\n\n React.useEffect(() => {\n return IModelApp.viewManager.onViewClose.addListener((vp) => {\n if (contentControl.current?.viewport === vp) {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n });\n }, []);\n\n return {\n viewportControl,\n };\n}\n"]}
1
+ {"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE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,SAAS,CAAC,CAAC,CAAC;IAEhB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;YACvC,cAAc,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC3C,IAAI,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;gBAC9C,cAAc,CAAC,OAAO,CAAC,SAAS,GAAG,eAAe,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE;YAC1D,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAC5C,mDAAmD;gBACnD,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl\";\nimport { ContentWrapper } from \"./ContentLayout\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useRefs } from \"@itwin/core-react\";\nimport { ContentOverlay } from \"./ContentOverlay\";\n\n/* eslint-disable deprecation/deprecation */\n\n/**\n * @beta\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContent}.\n */\nexport interface FloatingViewportContentProps {\n /** callback used to construct context menu when user right-clicks on canvas/viewport */\n onContextMenu?: (e: React.MouseEvent) => boolean;\n /** viewport/content control uniqueId */\n contentId: string;\n /** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */\n initialViewState: ViewStateProp;\n /** Function to get a reference to the ScreenViewport */\n viewportRef?: React.Ref<ScreenViewport>;\n}\n\n/**\n * @beta\n * @deprecated in 4.16.0. Wrap {@link @itwin/imodel-components-react#ViewportComponent} component with a {@link ContentOverlay} instead.\n */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContentWrapper}.\n */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Use {@link ContentOverlay} component to display the active content indicator instead.\n */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n contentIndex={undefined}\n />\n </div>\n );\n}\n\n/**\n * @alpha\n * @deprecated in 4.16.0. Use {@link @itwin/imodel-components-react#ViewportComponent} component instead.\n */\nexport function useFloatingViewport(args: FloatingViewportContentProps) {\n const { contentId, initialViewState, onContextMenu, viewportRef } = args;\n const [viewport, setViewport] = React.useState<ScreenViewport | undefined>();\n const contentControl = React.useRef<\n // eslint-disable-next-line deprecation/deprecation\n FloatingViewportContentControl | undefined\n >();\n\n const viewState = React.useMemo(\n () =>\n typeof initialViewState === \"function\"\n ? initialViewState()\n : initialViewState,\n [initialViewState]\n );\n const ref = React.useCallback((v: ScreenViewport) => {\n setViewport(v);\n }, []);\n\n const refs = useRefs(ref, viewportRef);\n const viewportControl = React.useMemo(() => {\n const node = (\n <ViewportComponent\n key={contentId}\n imodel={viewState.iModel}\n viewState={viewState}\n controlId={contentId}\n onContextMenu={onContextMenu}\n viewportRef={refs}\n />\n );\n return node;\n }, [refs, onContextMenu, viewState, contentId]);\n\n React.useEffect(() => {\n if (!contentControl.current) {\n // eslint-disable-next-line deprecation/deprecation\n contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n }, [contentId]);\n\n React.useEffect(() => {\n if (viewport && contentControl.current) {\n contentControl.current.viewport = viewport;\n if (null === contentControl.current.reactNode) {\n contentControl.current.reactNode = viewportControl;\n }\n }\n }, [viewport, viewportControl]);\n\n React.useEffect(() => {\n return IModelApp.viewManager.onViewClose.addListener((vp) => {\n if (contentControl.current?.viewport === vp) {\n // eslint-disable-next-line deprecation/deprecation\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n });\n }, []);\n\n return {\n viewportControl,\n };\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  /** @packageDocumentation
2
2
  * @module ContentView
3
3
  */
4
- import type { ContentLayoutProps } from "@itwin/appui-abstract";
5
4
  import type { ContentGroup, ContentGroupProps } from "./ContentGroup";
6
5
  import { ContentLayoutDef } from "./ContentLayout";
6
+ import type { ContentLayoutProps } from "./ContentLayoutProps";
7
7
  /** ContentLayout Manager class.
8
8
  * @internal
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContentLayoutManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,MAAM,CAAC,WAAW,CAGtB;IAEJ,qEAAqE;WACvD,MAAM,CAAC,KAAK,EAAE;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,MAAM;IAIV;;OAEG;WACW,WAAW,CACvB,iBAAiB,EAAE,iBAAiB,GAAG,YAAY,EACnD,qBAAqB,CAAC,EAAE,kBAAkB,GACzC,gBAAgB;IAuBnB;;;OAGG;WACW,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAInE;;;OAGG;WACW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAItE,qCAAqC;IACrC,WAAkB,YAAY,IAAI,gBAAgB,GAAG,SAAS,CAO7D;IAED,oCAAoC;IACpC,WAAkB,kBAAkB,IAAI,YAAY,GAAG,SAAS,CAO/D;IAED;;;OAGG;WACiB,SAAS,CAC3B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC;IAOhB;;OAEG;WACiB,qBAAqB,CACvC,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC;IAIhB;OACG;WACW,aAAa,IAAI,IAAI;CAepC"}
1
+ {"version":3,"file":"InternalContentLayoutManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,MAAM,CAAC,WAAW,CAGtB;IAEJ,qEAAqE;WACvD,MAAM,CAAC,KAAK,EAAE;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,MAAM;IAIV;;OAEG;WACW,WAAW,CACvB,iBAAiB,EAAE,iBAAiB,GAAG,YAAY,EACnD,qBAAqB,CAAC,EAAE,kBAAkB,GACzC,gBAAgB;IAuBnB;;;OAGG;WACW,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAInE;;;OAGG;WACW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAItE,qCAAqC;IACrC,WAAkB,YAAY,IAAI,gBAAgB,GAAG,SAAS,CAO7D;IAED,oCAAoC;IACpC,WAAkB,kBAAkB,IAAI,YAAY,GAAG,SAAS,CAO/D;IAED;;;OAGG;WACiB,SAAS,CAC3B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC;IAOhB;;OAEG;WACiB,qBAAqB,CACvC,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC;IAIhB;OACG;WACW,aAAa,IAAI,IAAI;CAepC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContentLayoutManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;A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AAC,mBAAmB,EAAE,CAAC;QACzD,CAAC;IACH,CAAC;;AArHc,wCAAW,GAAkC,IAAI,GAAG,EAGhE,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 type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentGroup, ContentGroupProps } from \"./ContentGroup\";\nimport { ContentLayoutDef } from \"./ContentLayout\";\n\n/** ContentLayout Manager class.\n * @internal\n */\nexport class InternalContentLayoutManager {\n private static _layoutDefs: Map<string, ContentLayoutDef> = new Map<\n string,\n ContentLayoutDef\n >();\n\n /** build a layout key that is unique for group layout combination */\n public static getKey(props: {\n contentGroupId: string;\n layoutId: string;\n }): string {\n return `${props.contentGroupId}-${props.layoutId}`;\n }\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef {\n const layoutId = overrideContentLayout?.id ?? contentGroupProps.layout.id;\n const layoutKey = this.getKey({\n contentGroupId: contentGroupProps.id,\n layoutId,\n });\n\n if (\n !overrideContentLayout &&\n InternalContentLayoutManager._layoutDefs.has(layoutKey)\n ) {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n const newContentLayoutProps = {\n ...contentGroupProps.layout,\n ...overrideContentLayout,\n };\n const newLayoutDef = new ContentLayoutDef(newContentLayoutProps);\n this.add(layoutKey, newLayoutDef);\n return newLayoutDef;\n }\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static find(layoutKey: string): ContentLayoutDef | undefined {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n public static add(layoutId: string, layoutDef: ContentLayoutDef): void {\n InternalContentLayoutManager._layoutDefs.set(layoutId, layoutDef);\n }\n\n /** Gets the active Content Layout */\n public static get activeLayout(): ContentLayoutDef | undefined {\n let layoutDef: ContentLayoutDef | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) layoutDef = activeFrontstageDef.contentLayoutDef;\n\n return layoutDef;\n }\n\n /** Gets the active Content Group */\n public static get activeContentGroup(): ContentGroup | undefined {\n let contentGroup: ContentGroup | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) contentGroup = activeFrontstageDef.contentGroup;\n\n return contentGroup;\n }\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n public static async setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveLayout(\n contentLayoutDef,\n contentGroup\n );\n }\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n public static async setActiveContentGroup(\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveContentGroup(contentGroup);\n }\n\n /** Refreshes the active layout and content group.\n */\n public static refreshActive(): void {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (\n activeFrontstageDef &&\n activeFrontstageDef.contentLayoutDef &&\n activeFrontstageDef.contentGroup\n ) {\n UiFramework.frontstages.onContentLayoutActivatedEvent.emit({\n contentLayout: activeFrontstageDef.contentLayoutDef,\n contentGroup: activeFrontstageDef.contentGroup,\n });\n\n activeFrontstageDef.contentGroup.refreshContentNodes();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"InternalContentLayoutManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD;;GAEG;AACH,MAAM,OAAO,4BAA4B;IAMvC,qEAAqE;IAC9D,MAAM,CAAC,MAAM,CAAC,KAGpB;QACC,OAAO,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,WAAW,CACvB,iBAAmD,EACnD,qBAA0C;QAE1C,MAAM,QAAQ,GAAG,qBAAqB,EAAE,EAAE,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC;YAC5B,cAAc,EAAE,iBAAiB,CAAC,EAAE;YACpC,QAAQ;SACT,CAAC,CAAC;QAEH,IACE,CAAC,qBAAqB;YACtB,4BAA4B,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EACvD,CAAC;YACD,OAAO,4BAA4B,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC;QAClE,CAAC;QAED,MAAM,qBAAqB,GAAG;YAC5B,GAAG,iBAAiB,CAAC,MAAM;YAC3B,GAAG,qBAAqB;SACzB,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QACjE,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAAI,CAAC,SAAiB;QACl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C;gBACzD,aAAa,EAAE,mBAAmB,CAAC,gBAAgB;gBACnD,YAAY,EAAE,mBAAmB,CAAC,YAAY;aAC/C,CAAC,CAAC;YAEH,mBAAmB,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;QACzD,CAAC;IACH,CAAC;;AArHc,wCAAW,GAAkC,IAAI,GAAG,EAGhE,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 { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentGroup, ContentGroupProps } from \"./ContentGroup\";\nimport { ContentLayoutDef } from \"./ContentLayout\";\nimport type { ContentLayoutProps } from \"./ContentLayoutProps\";\n\n/** ContentLayout Manager class.\n * @internal\n */\nexport class InternalContentLayoutManager {\n private static _layoutDefs: Map<string, ContentLayoutDef> = new Map<\n string,\n ContentLayoutDef\n >();\n\n /** build a layout key that is unique for group layout combination */\n public static getKey(props: {\n contentGroupId: string;\n layoutId: string;\n }): string {\n return `${props.contentGroupId}-${props.layoutId}`;\n }\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef {\n const layoutId = overrideContentLayout?.id ?? contentGroupProps.layout.id;\n const layoutKey = this.getKey({\n contentGroupId: contentGroupProps.id,\n layoutId,\n });\n\n if (\n !overrideContentLayout &&\n InternalContentLayoutManager._layoutDefs.has(layoutKey)\n ) {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n const newContentLayoutProps = {\n ...contentGroupProps.layout,\n ...overrideContentLayout,\n };\n const newLayoutDef = new ContentLayoutDef(newContentLayoutProps);\n this.add(layoutKey, newLayoutDef);\n return newLayoutDef;\n }\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static find(layoutKey: string): ContentLayoutDef | undefined {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n public static add(layoutId: string, layoutDef: ContentLayoutDef): void {\n InternalContentLayoutManager._layoutDefs.set(layoutId, layoutDef);\n }\n\n /** Gets the active Content Layout */\n public static get activeLayout(): ContentLayoutDef | undefined {\n let layoutDef: ContentLayoutDef | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) layoutDef = activeFrontstageDef.contentLayoutDef;\n\n return layoutDef;\n }\n\n /** Gets the active Content Group */\n public static get activeContentGroup(): ContentGroup | undefined {\n let contentGroup: ContentGroup | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) contentGroup = activeFrontstageDef.contentGroup;\n\n return contentGroup;\n }\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n public static async setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveLayout(\n contentLayoutDef,\n contentGroup\n );\n }\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n public static async setActiveContentGroup(\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveContentGroup(contentGroup);\n }\n\n /** Refreshes the active layout and content group.\n */\n public static refreshActive(): void {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (\n activeFrontstageDef &&\n activeFrontstageDef.contentLayoutDef &&\n activeFrontstageDef.contentGroup\n ) {\n UiFramework.frontstages.onContentLayoutActivatedEvent.emit({\n contentLayout: activeFrontstageDef.contentLayoutDef,\n contentGroup: activeFrontstageDef.contentGroup,\n });\n\n activeFrontstageDef.contentGroup.refreshContentNodes();\n }\n }\n}\n"]}