@itwin/appui-react 4.16.5 → 4.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/CHANGELOG.md +29 -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/configurableui/ConfigurableUiContent.scss +1 -0
  30. package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
  31. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  33. package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
  34. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  35. package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
  36. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  37. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
  38. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  39. package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
  40. package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
  41. package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
  42. package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
  43. package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
  44. package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
  45. package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  46. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
  47. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  48. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  49. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  50. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  51. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  52. package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
  53. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  54. package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
  55. package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
  56. package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
  57. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
  58. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  59. package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
  60. package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
  61. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  62. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  63. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
  64. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  65. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
  66. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  67. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  68. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  69. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  71. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  72. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  73. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
  74. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  75. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  76. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  77. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  78. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  79. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
  80. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  81. package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
  82. package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
  83. package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
  84. package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
  85. package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  86. package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
  87. package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
  88. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
  89. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  90. package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
  91. package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
  92. package/lib/cjs/appui-react/layout/widget/FloatingTab.scss +1 -0
  93. package/lib/cjs/appui-react/layout/widget/FloatingWidget.scss +1 -0
  94. package/lib/cjs/appui-react/layout/widget/MenuTab.scss +1 -0
  95. package/lib/cjs/appui-react/layout/widget/Overflow.scss +1 -0
  96. package/lib/cjs/appui-react/layout/widget/Tab.scss +1 -0
  97. package/lib/cjs/appui-react/layout/widget/TabBar.scss +1 -0
  98. package/lib/cjs/appui-react/layout/widget-panels/CursorOverlay.scss +1 -0
  99. package/lib/cjs/appui-react/layout/widget-panels/Grip.scss +2 -0
  100. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.scss +1 -0
  101. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
  102. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  103. package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
  104. package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
  105. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  106. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  107. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +3 -0
  108. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  109. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  110. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  111. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  112. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  113. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  114. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  115. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  116. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  117. package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  118. package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
  119. package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
  120. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
  121. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  122. package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
  123. package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
  124. package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
  125. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  126. package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
  127. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  128. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  129. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  130. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
  131. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  132. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  133. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  134. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  135. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  136. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  137. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  138. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  139. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  140. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  141. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  142. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  143. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  144. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  145. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  146. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  147. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  148. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  149. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  150. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  151. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  152. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  153. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  154. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  155. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  156. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  157. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  158. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  159. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  160. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  161. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  162. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  163. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  164. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  165. package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
  166. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  167. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  168. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  169. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
  170. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  171. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  172. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  173. package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
  174. package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
  175. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  176. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  177. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  178. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  179. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  180. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  181. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  182. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  183. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  184. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  185. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
  186. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  187. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  188. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  189. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  190. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  191. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
  192. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  193. package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
  194. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  195. package/lib/cjs/appui-react.d.ts +3 -0
  196. package/lib/cjs/appui-react.d.ts.map +1 -1
  197. package/lib/cjs/appui-react.js +3 -0
  198. package/lib/cjs/appui-react.js.map +1 -1
  199. package/lib/esm/appui-react/UiFramework.d.ts +5 -0
  200. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  201. package/lib/esm/appui-react/UiFramework.js +6 -1
  202. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  203. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  204. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  205. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
  206. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  207. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  208. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  209. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  210. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  211. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  212. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  213. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  214. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
  215. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  216. package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
  217. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  218. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  219. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  220. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  221. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  222. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  223. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  224. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  225. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  226. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.scss +1 -0
  227. package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
  228. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  229. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  230. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
  231. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  232. package/lib/esm/appui-react/content/ContentLayout.js +45 -11
  233. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  234. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
  235. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  236. package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
  237. package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
  238. package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
  239. package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
  240. package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
  241. package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
  242. package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  243. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
  244. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  245. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  246. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  247. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  248. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  249. package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
  250. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  251. package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
  252. package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
  253. package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
  254. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
  255. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  256. package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
  257. package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
  258. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  259. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  260. package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
  261. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  262. package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
  263. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  264. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  265. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  266. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  267. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  268. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  269. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  270. package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
  271. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  272. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  273. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  274. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  275. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  276. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
  277. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  278. package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
  279. package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
  280. package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
  281. package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
  282. package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  283. package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
  284. package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
  285. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
  286. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  287. package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
  288. package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
  289. package/lib/esm/appui-react/layout/widget/FloatingTab.scss +1 -0
  290. package/lib/esm/appui-react/layout/widget/FloatingWidget.scss +1 -0
  291. package/lib/esm/appui-react/layout/widget/MenuTab.scss +1 -0
  292. package/lib/esm/appui-react/layout/widget/Overflow.scss +1 -0
  293. package/lib/esm/appui-react/layout/widget/Tab.scss +1 -0
  294. package/lib/esm/appui-react/layout/widget/TabBar.scss +1 -0
  295. package/lib/esm/appui-react/layout/widget-panels/CursorOverlay.scss +1 -0
  296. package/lib/esm/appui-react/layout/widget-panels/Grip.scss +2 -0
  297. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.scss +1 -0
  298. package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
  299. package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  300. package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
  301. package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
  302. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  303. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  304. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +3 -0
  305. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  306. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  307. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  308. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  309. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  310. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  311. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  312. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  313. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  314. package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  315. package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
  316. package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
  317. package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
  318. package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  319. package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
  320. package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
  321. package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
  322. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  323. package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
  324. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  325. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  326. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  327. package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
  328. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  329. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  330. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  331. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  332. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  333. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  334. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  335. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  336. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  337. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  338. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  339. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  340. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  341. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  342. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  343. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  344. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  345. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  346. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  347. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  348. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  349. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  350. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  351. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  352. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  353. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  354. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  355. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  356. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  357. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  358. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  359. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  360. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  361. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  362. package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
  363. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  364. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  365. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  366. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
  367. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  368. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  369. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  370. package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
  371. package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
  372. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  373. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  374. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  375. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  376. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  377. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  378. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  379. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  380. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  381. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  382. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
  383. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  384. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  385. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  386. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  387. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  388. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
  389. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  390. package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
  391. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  392. package/lib/esm/appui-react.d.ts +3 -0
  393. package/lib/esm/appui-react.d.ts.map +1 -1
  394. package/lib/esm/appui-react.js +3 -0
  395. package/lib/esm/appui-react.js.map +1 -1
  396. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAKH,0DAAgD;AAEhD,mFAGiD;AACjD,gDAA6C;AAE7C,mGAAgG;AAoChG;;;GAGG;AACH,MAAsB,oBAAoB;IAIxC;;OAEG;IACI,kBAAkB,CAAC,iBAAoC;QAC5D,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;OAE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KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,kBAAkB;QACvB,MAAM,eAAe,GAAqB,IAAI,KAAK,EAAkB,CAAC;QAEtE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE;YACpD,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YAC5D,IAAI,CAAC,OAAO;gBAAE,OAAO;YAErB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IACzB,CAAC;;AAvNH,oCA0NC;AAzNgB,iBAAI,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\nimport type { Frontstage } from \"../frontstage/Frontstage\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group. */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control.\n * @deprecated in 4.16.0. Use {@link ContentProps.content} instead and specify an empty string for this property. This will be made optional in 5.0.0.\n */\n // eslint-disable-next-line deprecation/deprecation\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the content view.\n * @deprecated in 4.16.0. Use {@link ContentProps.content} instead.\n */\n applicationData?: any;\n /** Content to be displayed in the content view.\n * @beta\n */\n content?: React.ReactNode;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `Frontstage`. */\n public abstract contentGroup(frontstage: Frontstage): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets the React nodes representing the content views in this content group.\n * @deprecated in 4.16.0. Use {@link ContentGroup.contentPropsList} instead.\n */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach((contentProps, index) => {\n if (contentProps.content) {\n contentNodes.push(contentProps.content);\n return;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const control = this.getContentControl(contentProps, index);\n if (!control) return;\n\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n });\n\n return contentNodes;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes.\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach((content, index) => {\n // eslint-disable-next-line deprecation/deprecation\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n // eslint-disable-next-line deprecation/deprecation\n content.classId\n );\n // eslint-disable-next-line deprecation/deprecation\n if (classId !== undefined) content.classId = classId;\n else\n throw new UiError( // eslint-disable-line deprecation/deprecation\n UiFramework.loggerCategory(this),\n `toJSON: ContentControl at index ${index} is NOT registered with a string id`\n );\n\n if (typeof contentCallback === \"function\") contentCallback(content);\n }\n });\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls.\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n // eslint-disable-next-line deprecation/deprecation\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n\n /* eslint-disable deprecation/deprecation */\n\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]].\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Gets an array of the content controls representing the Content Views.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach((contentProps, index) => {\n const control = this.getContentControl(contentProps, index);\n if (!control) return;\n\n contentControls.push(control);\n });\n\n return contentControls;\n }\n\n /* eslint-enable deprecation/deprecation */\n}\n"]}
1
+ {"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAIH,0DAAgD;AAEhD,mFAGiD;AACjD,gDAA6C;AAE7C,mGAAgG;AAyChG;;;GAGG;AACH,MAAsB,oBAAoB;IAIxC;;OAEG;IACI,kBAAkB,CAAC,iBAAoC;QAC5D,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,wBAAwB,CAAC,iBAAoC;QAClE,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,kFAAkF;IAC3E,KAAK,CAAC,uBAAuB,KAAI,CAAC;CAC1C;AApBD,oDAoBC;AAOD;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SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,kBAAkB;QACvB,MAAM,eAAe,GAAqB,IAAI,KAAK,EAAkB,CAAC;QAEtE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE;YACpD,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YAC5D,IAAI,CAAC,OAAO;gBAAE,OAAO;YAErB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IACzB,CAAC;;AAvNH,oCA0NC;AAzNgB,iBAAI,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\nimport type { Frontstage } from \"../frontstage/Frontstage\";\nimport type { ContentLayoutProps } from \"./ContentLayoutProps\";\nimport type { ConditionalValue } from \"../shared/ConditionalValue\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group. */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control.\n * @deprecated in 4.16.0. Use {@link ContentProps.content} instead and specify an empty string for this property. This will be made optional in 5.0.0.\n */\n // eslint-disable-next-line deprecation/deprecation\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the content view.\n * @deprecated in 4.16.0. Use {@link ContentProps.content} instead.\n */\n applicationData?: any;\n /** Content to be displayed in the content view. */\n content?: React.ReactNode;\n /** Describes if the content should display the active strip.\n * If `undefined` the strip will be displayed only if this content is active and multiple contents are available.\n * Floating content controls (deprecated API) and `ContentOverlay` components are considered as content nodes.\n */\n renderActiveStrip?: boolean | ConditionalValue<boolean | undefined>;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `Frontstage`. */\n public abstract contentGroup(frontstage: Frontstage): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets the React nodes representing the content views in this content group.\n * @deprecated in 4.16.0. Use {@link ContentGroup.contentPropsList} instead.\n */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach((contentProps, index) => {\n if (contentProps.content) {\n contentNodes.push(contentProps.content);\n return;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const control = this.getContentControl(contentProps, index);\n if (!control) return;\n\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n });\n\n return contentNodes;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes.\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach((content, index) => {\n // eslint-disable-next-line deprecation/deprecation\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n // eslint-disable-next-line deprecation/deprecation\n content.classId\n );\n // eslint-disable-next-line deprecation/deprecation\n if (classId !== undefined) content.classId = classId;\n else\n throw new UiError( // eslint-disable-line deprecation/deprecation\n UiFramework.loggerCategory(this),\n `toJSON: ContentControl at index ${index} is NOT registered with a string id`\n );\n\n if (typeof contentCallback === \"function\") contentCallback(content);\n }\n });\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls.\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n // eslint-disable-next-line deprecation/deprecation\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n\n /* eslint-disable deprecation/deprecation */\n\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]].\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Gets an array of the content controls representing the Content Views.\n * @deprecated in 4.16.0. Uses a deprecated class {@link ContentControl}.\n */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach((contentProps, index) => {\n const control = this.getContentControl(contentProps, index);\n if (!control) return;\n\n contentControls.push(control);\n });\n\n return contentControls;\n }\n\n /* eslint-enable deprecation/deprecation */\n}\n"]}
@@ -3,13 +3,14 @@
3
3
  */
4
4
  import "./ContentLayout.scss";
5
5
  import * as React from "react";
6
- import type { ContentLayoutProps, LayoutFragmentProps } from "@itwin/appui-abstract";
7
6
  import { UiEvent } from "@itwin/appui-abstract";
8
7
  import type { CommonProps } from "@itwin/core-react";
9
8
  import type { ContentGroup } from "./ContentGroup";
9
+ import type { ContentLayoutProps, LayoutFragmentProps } from "./ContentLayoutProps";
10
10
  /** Properties for [[ContentWrapper]] */
11
11
  interface ContentWrapperProps extends CommonProps {
12
12
  content: React.ReactNode;
13
+ contentIndex: number | undefined;
13
14
  }
14
15
  /** ContentWrapper React component.
15
16
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"Cont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Def");
19
19
  const UiFramework_1 = require("../UiFramework");
20
20
  const ContentOverlay_1 = require("./ContentOverlay");
21
+ const useConditionalValue_1 = require("../hooks/useConditionalValue");
21
22
  /** ContentWrapper React component.
22
23
  * @internal
23
24
  */
24
25
  function ContentWrapper(props) {
25
- const { content } = props;
26
+ const { content, contentIndex } = props;
26
27
  const activeFrontstageDef = (0, FrontstageDef_1.useActiveFrontstageDef)();
27
28
  const [isActive, setIsActive] = React.useState(() => {
28
29
  // eslint-disable-next-line deprecation/deprecation
@@ -38,6 +39,7 @@ function ContentWrapper(props) {
38
39
  return controlId;
39
40
  };
40
41
  const [hasMultipleContents, setHasMultipleContents] = React.useState(() => (activeFrontstageDef &&
42
+ // eslint-disable-next-line deprecation/deprecation
41
43
  !!activeFrontstageDef.floatingContentControls?.length) ||
42
44
  // eslint-disable-next-line deprecation/deprecation
43
45
  (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1);
@@ -59,8 +61,8 @@ function ContentWrapper(props) {
59
61
  setIsActive(!!contentId && contentId === activeContentId);
60
62
  }
61
63
  setHasMultipleContents((activeFrontstageDef &&
62
- !!activeFrontstageDef.floatingContentControls?.length) ||
63
64
  // eslint-disable-next-line deprecation/deprecation
65
+ !!activeFrontstageDef.floatingContentControls?.length) ||
64
66
  (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >
65
67
  1);
66
68
  });
@@ -73,16 +75,43 @@ function ContentWrapper(props) {
73
75
  React.useEffect(() => {
74
76
  return UiFramework_1.UiFramework.content.onAvailableContentChangedEvent.addListener(() => {
75
77
  setHasMultipleContents((activeFrontstageDef &&
78
+ // eslint-disable-next-line deprecation/deprecation
76
79
  !!activeFrontstageDef.floatingContentControls?.length) ||
77
80
  // eslint-disable-next-line deprecation/deprecation
78
81
  (activeFrontstageDef?.contentGroup?.getContentControls().length ??
79
82
  0) > 1);
80
83
  });
81
84
  }, [activeFrontstageDef]);
82
- const active = isActive && hasMultipleContents;
85
+ const renderActiveStrip = useRenderActiveStrip(contentIndex);
86
+ const contentOverlays = (0, ContentOverlay_1.useContentOverlayStore)();
87
+ const active = renderActiveStrip !== undefined
88
+ ? renderActiveStrip
89
+ : isActive && (hasMultipleContents || contentOverlays > 1);
83
90
  return (React.createElement(ContentOverlay_1.ContentOverlay, { className: (0, classnames_1.default)("uifw-contentlayout-wrapper", props.className), style: props.style, active: active, onMouseDown: handleMouseDown, onMouseMove: UiFramework_1.UiFramework.visibility.handleContentMouseMove, role: "presentation" }, content));
84
91
  }
85
92
  exports.ContentWrapper = ContentWrapper;
93
+ function useRenderActiveStrip(contentIndex) {
94
+ const contentGroup = React.useContext(ContentLayoutContext);
95
+ const contentProps = contentIndex === undefined
96
+ ? undefined
97
+ : contentGroup?.contentPropsList[contentIndex];
98
+ const renderActiveStrip = contentProps?.renderActiveStrip;
99
+ const getValue = React.useCallback(() => {
100
+ if (renderActiveStrip === undefined)
101
+ return undefined;
102
+ if (typeof renderActiveStrip === "boolean")
103
+ return renderActiveStrip;
104
+ return renderActiveStrip.getValue();
105
+ }, [renderActiveStrip]);
106
+ const eventIds = React.useMemo(() => {
107
+ if (renderActiveStrip === undefined)
108
+ return [];
109
+ if (typeof renderActiveStrip === "boolean")
110
+ return [];
111
+ return renderActiveStrip.eventIds;
112
+ }, [renderActiveStrip]);
113
+ return (0, useConditionalValue_1.useConditionalValue)(getValue, eventIds);
114
+ }
86
115
  /** Split Container class.
87
116
  */
88
117
  class SplitContainer extends React.Component {
@@ -126,7 +155,7 @@ class SplitContainer extends React.Component {
126
155
  class SingleContentContainer extends React.Component {
127
156
  render() {
128
157
  return (React.createElement("div", { className: (0, classnames_1.default)("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container", onMouseMove: UiFramework_1.UiFramework.visibility.handleContentMouseMove },
129
- React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" } })));
158
+ React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" }, contentIndex: this.props.contentIndex })));
130
159
  }
131
160
  }
132
161
  /** Minimum split size */
@@ -177,8 +206,8 @@ class HorizontalSplit extends BaseSplit {
177
206
  createContentContainer(contentNodes, resizable) {
178
207
  if (this.isLocked)
179
208
  resizable = false;
180
- const topContent = !this._topSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._topIndex] })) : (this._topSplit.createContentContainer(contentNodes, resizable));
181
- const bottomContent = !this._bottomSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._bottomIndex] })) : (this._bottomSplit.createContentContainer(contentNodes, resizable));
209
+ const topContent = !this._topSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._topIndex], contentIndex: this._topIndex })) : (this._topSplit.createContentContainer(contentNodes, resizable));
210
+ const bottomContent = !this._bottomSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._bottomIndex], contentIndex: this._bottomIndex })) : (this._bottomSplit.createContentContainer(contentNodes, resizable));
182
211
  return (React.createElement(SplitContainer, { contentA: topContent, contentB: bottomContent, orientation: components_react_1.Orientation.Horizontal, percentage: this.defaultPercentage, resizable: resizable, minSizeTopLeft: this._minSizeTop, minSizeBottomRight: this._minSizeBottom, splitterStateId: this.stateId, onSplitterChange: this._handleSplitterChange }));
183
212
  }
184
213
  }
@@ -215,8 +244,8 @@ class VerticalSplit extends BaseSplit {
215
244
  createContentContainer(contentNodes, resizable) {
216
245
  if (this.isLocked)
217
246
  resizable = false;
218
- const leftContent = !this._leftSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._leftIndex] })) : (this._leftSplit.createContentContainer(contentNodes, resizable));
219
- const rightContent = !this._rightSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._rightIndex] })) : (this._rightSplit.createContentContainer(contentNodes, resizable));
247
+ const leftContent = !this._leftSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._leftIndex], contentIndex: this._leftIndex })) : (this._leftSplit.createContentContainer(contentNodes, resizable));
248
+ const rightContent = !this._rightSplit ? (React.createElement(ContentWrapper, { content: contentNodes[this._rightIndex], contentIndex: this._rightIndex })) : (this._rightSplit.createContentContainer(contentNodes, resizable));
220
249
  return (React.createElement(SplitContainer, { contentA: leftContent, contentB: rightContent, orientation: components_react_1.Orientation.Vertical, percentage: this.defaultPercentage, resizable: resizable, minSizeTopLeft: this._minSizeLeft, minSizeBottomRight: this._minSizeRight, splitterStateId: this.stateId, onSplitterChange: this._handleSplitterChange }));
221
250
  }
222
251
  }
@@ -255,7 +284,7 @@ class ContentLayoutDef {
255
284
  return this.rootSplit.createContentContainer(contentNodes, resizable);
256
285
  }
257
286
  if (contentNodes.length > 0)
258
- return React.createElement(SingleContentContainer, { content: contentNodes[0] });
287
+ return (React.createElement(SingleContentContainer, { content: contentNodes[0], contentIndex: 0 }));
259
288
  return undefined;
260
289
  }
261
290
  /** Gets the indexes of content views used in this Content Layout. */
@@ -332,6 +361,7 @@ exports.ContentLayoutActivatedEvent = ContentLayoutActivatedEvent;
332
361
  function ContentLayout(props) {
333
362
  const [contentLayoutDef, setContentLayoutDef] = React.useState(props.contentLayout);
334
363
  const [contentGroupId, setContentGroupId] = React.useState(props.contentGroup.groupId);
364
+ const [contentGroup, setContentGroup] = React.useState(props.contentGroup);
335
365
  const [contentNodes, setContentNodes] = React.useState(() => {
336
366
  // eslint-disable-next-line deprecation/deprecation
337
367
  return props.contentGroup.getContentNodes();
@@ -340,6 +370,7 @@ function ContentLayout(props) {
340
370
  return UiFramework_1.UiFramework.frontstages.onContentLayoutActivatedEvent.addListener((args) => {
341
371
  setContentLayoutDef(args.contentLayout);
342
372
  setContentGroupId(args.contentGroup.groupId);
373
+ setContentGroup(args.contentGroup);
343
374
  // eslint-disable-next-line deprecation/deprecation
344
375
  setContentNodes(args.contentGroup.getContentNodes());
345
376
  });
@@ -351,9 +382,12 @@ function ContentLayout(props) {
351
382
  UiFramework_1.UiFramework.content.setMouseDown(true);
352
383
  }, onMouseUp: () => {
353
384
  UiFramework_1.UiFramework.content.setMouseDown(false);
354
- }, role: "presentation" }, contentContainer));
385
+ }, role: "presentation" },
386
+ React.createElement(ContentLayoutContext.Provider, { value: contentGroup }, contentContainer)));
355
387
  }
356
388
  return null;
357
389
  }
358
390
  exports.ContentLayout = ContentLayout;
391
+ const ContentLayoutContext = React.createContext(undefined);
392
+ ContentLayoutContext.displayName = "uifw:ContentLayoutContext";
359
393
  //# 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,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAQ/B,0DAAgD;AAChD,8DAAsD;AACtD,sDAAmD;AAGnD,+DAAqE;AACrE,gDAA6C;AAC7C,qDAAkD;AAQlD;;GAEG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,mBAAmB,GAAG,IAAA,sCAAsB,GAAE,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;QAClD,mDAAmD;QACnD,OAAO,OAAO,KAAK,yBAAW,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,CAAC,GAAa,CAAC;YACtE,oFAAoF;YACpF,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,MAAM,CAAC,mBAAmB,EAAE,s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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,yBAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,yBAAW,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;AAlDD,sCAkDC","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,8BAA8B;AAE9B,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,0DAAgD;AAChD,8DAAsD;AACtD,sDAAmD;AAUnD,+DAAqE;AACrE,gDA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mD;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,yBAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,yBAAW,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC1C,CAAC,EACD,IAAI,EAAC,cAAc;YAEnB,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC/C,gBAAgB,CACa,CAC5B,CACP,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAxDD,sCAwDC;AAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAC9C,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,10 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module ContentView
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# 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"}
@@ -7,17 +7,49 @@
7
7
  * @module ContentView
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ContentOverlay = void 0;
10
+ exports.ContentOverlay = exports.useContentOverlayStore = void 0;
11
11
  require("./ContentOverlay.scss");
12
12
  const classnames_1 = require("classnames");
13
13
  const React = require("react");
14
+ const zustand_1 = require("zustand");
15
+ const LayoutStore_1 = require("../layout/base/LayoutStore");
16
+ const WidgetDef_1 = require("../widgets/WidgetDef");
17
+ const ContentRenderer_1 = require("../layout/widget/ContentRenderer");
18
+ const WidgetState_1 = require("../widgets/WidgetState");
19
+ /** Returns the number of content overlays.
20
+ * @internal
21
+ */
22
+ exports.useContentOverlayStore = (0, zustand_1.create)(() => 0);
14
23
  /** Overlay used to identify active content views.
15
24
  * @beta
16
25
  */
17
26
  function ContentOverlay({ className, children, active, ...other }) {
27
+ useTrackContentOverlay();
18
28
  return (React.createElement("div", { className: (0, classnames_1.default)("uifw-content-contentOverlay", className), ...other },
19
29
  children,
20
30
  React.createElement("div", { className: (0, classnames_1.default)("uifw-content-contentOverlay_activeStrip", active && "uifw-active") })));
21
31
  }
22
32
  exports.ContentOverlay = ContentOverlay;
33
+ function useTrackContentOverlay() {
34
+ const tabId = React.useContext(ContentRenderer_1.TabIdContext);
35
+ const visible = (0, LayoutStore_1.useOptionalLayout)((state) => {
36
+ if (!state)
37
+ return true;
38
+ if (!tabId)
39
+ return true;
40
+ const widgetState = (0, WidgetDef_1.getWidgetState)(tabId, state);
41
+ // Do not track content overlays in hidden widgets.
42
+ if (widgetState === WidgetState_1.WidgetState.Hidden)
43
+ return false;
44
+ return true;
45
+ });
46
+ React.useEffect(() => {
47
+ if (!visible)
48
+ return;
49
+ exports.useContentOverlayStore.setState((prev) => prev + 1);
50
+ return () => {
51
+ exports.useContentOverlayStore.setState((prev) => prev - 1);
52
+ };
53
+ }, [visible]);
54
+ }
23
55
  //# 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,iCAA+B;AAC/B,2CAAoC;AACpC,+BAA+B;AAQ/B;;GAEG;AACH,SAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACY;IACpB,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,6BAA6B,EAAE,SAAS,CAAC,KAC3D,KAAK;QAER,QAAQ;QACT,6BACE,SAAS,EAAE,IAAA,oBAAU,EACnB,yCAAyC,EACzC,MAAM,IAAI,aAAa,CACxB,GACD,CACE,CACP,CAAC;AACJ,CAAC;AApBD,wCAoBC","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,iCAA+B;AAC/B,2CAAoC;AACpC,+BAA+B;AAC/B,qCAAiC;AACjC,4DAA+D;AAC/D,oDAAsD;AACtD,sEAAgE;AAChE,wDAAqD;AAErD;;GAEG;AACU,QAAA,sBAAsB,GAAG,IAAA,gBAAM,EAA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------------------------------------------------------------------------------------\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"}