@itwin/appui-react 4.9.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (807) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/appui-react/UiFramework.js +4 -7
  3. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  4. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  5. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  6. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  7. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  8. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  9. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js +2 -2
  10. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  11. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  12. package/lib/cjs/appui-react/accudraw/Calculator.js +9 -9
  13. package/lib/cjs/appui-react/accudraw/Calculator.js.map +1 -1
  14. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts +3 -1
  15. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  16. package/lib/cjs/appui-react/accudraw/SquareButton.js +1 -4
  17. package/lib/cjs/appui-react/accudraw/SquareButton.js.map +1 -1
  18. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +1 -2
  19. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  20. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +2 -2
  21. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  22. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  23. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  24. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  25. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  26. package/lib/cjs/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +14 -0
  27. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  28. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  29. package/lib/cjs/appui-react/configurableui/TimeTracker.js +1 -2
  30. package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
  31. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentGroup.js +2 -2
  33. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  34. package/lib/cjs/appui-react/content/ContentLayout.js +9 -12
  35. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  36. package/lib/cjs/appui-react/content/DefaultViewOverlay.js +3 -4
  37. package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
  38. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -2
  39. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  40. package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
  41. package/lib/cjs/appui-react/content/IModelViewport.js +6 -9
  42. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  43. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +1 -2
  44. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  45. package/lib/cjs/appui-react/content/InternalContentViewManager.js +2 -2
  46. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  47. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +10 -12
  48. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  49. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  50. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  51. package/lib/cjs/appui-react/dialog/ContentDialog.js +3 -6
  52. package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
  53. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -3
  54. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  55. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  56. package/lib/cjs/appui-react/feedback/ElementTooltip.js +2 -3
  57. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  58. package/lib/cjs/appui-react/feedback/ValidationTextbox.js +2 -2
  59. package/lib/cjs/appui-react/feedback/ValidationTextbox.js.map +1 -1
  60. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +10 -14
  61. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  62. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  63. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  64. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +2 -3
  65. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  66. package/lib/cjs/appui-react/frontstage/ModalFrontstage.scss +1 -1
  67. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +2 -3
  68. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  69. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  70. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  71. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  72. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  73. package/lib/cjs/appui-react/hooks/useEscapeSetFocusToHome.js +1 -1
  74. package/lib/cjs/appui-react/hooks/useEscapeSetFocusToHome.js.map +1 -1
  75. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  76. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  77. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +8 -13
  78. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  79. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  80. package/lib/cjs/appui-react/{layout/widget-panels/CenterContent.scss → layers.scss} +6 -2
  81. package/lib/cjs/appui-react/layout/StandardLayout.d.ts +24 -0
  82. package/lib/cjs/appui-react/layout/StandardLayout.d.ts.map +1 -0
  83. package/lib/cjs/appui-react/layout/StandardLayout.js +56 -0
  84. package/lib/cjs/appui-react/layout/StandardLayout.js.map +1 -0
  85. package/lib/cjs/appui-react/layout/StandardLayout.scss +94 -0
  86. package/lib/cjs/appui-react/layout/backstage/Backstage.js +1 -1
  87. package/lib/cjs/appui-react/layout/backstage/Backstage.js.map +1 -1
  88. package/lib/cjs/appui-react/layout/base/DragManager.js +1 -2
  89. package/lib/cjs/appui-react/layout/base/DragManager.js.map +1 -1
  90. package/lib/cjs/appui-react/layout/base/NineZone.js +1 -1
  91. package/lib/cjs/appui-react/layout/base/NineZone.js.map +1 -1
  92. package/lib/cjs/appui-react/layout/base/SafeAreaInsets.js +4 -4
  93. package/lib/cjs/appui-react/layout/base/SafeAreaInsets.js.map +1 -1
  94. package/lib/cjs/appui-react/layout/outline/PanelOutline.scss +1 -10
  95. package/lib/cjs/appui-react/layout/outline/TabOutline.js +1 -1
  96. package/lib/cjs/appui-react/layout/outline/TabOutline.js.map +1 -1
  97. package/lib/cjs/appui-react/layout/outline/WidgetOutline.js +1 -1
  98. package/lib/cjs/appui-react/layout/outline/WidgetOutline.js.map +1 -1
  99. package/lib/cjs/appui-react/layout/state/NineZoneStateReducer.js +12 -14
  100. package/lib/cjs/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
  101. package/lib/cjs/appui-react/layout/state/internal/NineZoneStateHelpers.js +1 -2
  102. package/lib/cjs/appui-react/layout/state/internal/NineZoneStateHelpers.js.map +1 -1
  103. package/lib/cjs/appui-react/layout/state/internal/PanelStateHelpers.d.ts.map +1 -1
  104. package/lib/cjs/appui-react/layout/state/internal/PanelStateHelpers.js +1 -0
  105. package/lib/cjs/appui-react/layout/state/internal/PanelStateHelpers.js.map +1 -1
  106. package/lib/cjs/appui-react/layout/state/internal/TabStateHelpers.d.ts.map +1 -1
  107. package/lib/cjs/appui-react/layout/state/internal/TabStateHelpers.js +7 -3
  108. package/lib/cjs/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
  109. package/lib/cjs/appui-react/layout/state/internal/ToolSettingsStateHelpers.d.ts.map +1 -1
  110. package/lib/cjs/appui-react/layout/state/internal/ToolSettingsStateHelpers.js +6 -0
  111. package/lib/cjs/appui-react/layout/state/internal/ToolSettingsStateHelpers.js.map +1 -1
  112. package/lib/cjs/appui-react/layout/state/internal/WidgetStateHelpers.d.ts.map +1 -1
  113. package/lib/cjs/appui-react/layout/state/internal/WidgetStateHelpers.js +6 -4
  114. package/lib/cjs/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
  115. package/lib/cjs/appui-react/layout/target/PanelTargets.scss +2 -0
  116. package/lib/cjs/appui-react/layout/target/TitleBarTarget.js +1 -1
  117. package/lib/cjs/appui-react/layout/target/TitleBarTarget.js.map +1 -1
  118. package/lib/cjs/appui-react/layout/tool-settings/Docked.d.ts +12 -6
  119. package/lib/cjs/appui-react/layout/tool-settings/Docked.d.ts.map +1 -1
  120. package/lib/cjs/appui-react/layout/tool-settings/Docked.js +52 -21
  121. package/lib/cjs/appui-react/layout/tool-settings/Docked.js.map +1 -1
  122. package/lib/cjs/appui-react/layout/tool-settings/Docked.scss +15 -23
  123. package/lib/cjs/appui-react/layout/tool-settings/Handle.d.ts.map +1 -1
  124. package/lib/cjs/appui-react/layout/tool-settings/Handle.js +3 -1
  125. package/lib/cjs/appui-react/layout/tool-settings/Handle.js.map +1 -1
  126. package/lib/cjs/appui-react/layout/tool-settings/Handle.scss +6 -12
  127. package/lib/cjs/appui-react/layout/tool-settings/Overflow.d.ts.map +1 -1
  128. package/lib/cjs/appui-react/layout/tool-settings/Overflow.js +4 -5
  129. package/lib/cjs/appui-react/layout/tool-settings/Overflow.js.map +1 -1
  130. package/lib/cjs/appui-react/layout/tool-settings/Overflow.scss +0 -15
  131. package/lib/cjs/appui-react/layout/tool-settings/Setting.scss +1 -12
  132. package/lib/cjs/appui-react/layout/widget/Button.d.ts +2 -9
  133. package/lib/cjs/appui-react/layout/widget/Button.d.ts.map +1 -1
  134. package/lib/cjs/appui-react/layout/widget/Button.js.map +1 -1
  135. package/lib/cjs/appui-react/layout/widget/Buttons.d.ts +4 -4
  136. package/lib/cjs/appui-react/layout/widget/Buttons.d.ts.map +1 -1
  137. package/lib/cjs/appui-react/layout/widget/Buttons.js +8 -31
  138. package/lib/cjs/appui-react/layout/widget/Buttons.js.map +1 -1
  139. package/lib/cjs/appui-react/layout/widget/ContentContainer.d.ts.map +1 -1
  140. package/lib/cjs/appui-react/layout/widget/ContentContainer.js +2 -0
  141. package/lib/cjs/appui-react/layout/widget/ContentContainer.js.map +1 -1
  142. package/lib/cjs/appui-react/layout/widget/ContentManager.d.ts +1 -1
  143. package/lib/cjs/appui-react/layout/widget/ContentManager.d.ts.map +1 -1
  144. package/lib/cjs/appui-react/layout/widget/ContentManager.js +1 -1
  145. package/lib/cjs/appui-react/layout/widget/ContentManager.js.map +1 -1
  146. package/lib/cjs/appui-react/layout/widget/ContentRenderer.d.ts.map +1 -1
  147. package/lib/cjs/appui-react/layout/widget/ContentRenderer.js +8 -2
  148. package/lib/cjs/appui-react/layout/widget/ContentRenderer.js.map +1 -1
  149. package/lib/cjs/appui-react/layout/widget/Dock.d.ts +2 -0
  150. package/lib/cjs/appui-react/layout/widget/Dock.d.ts.map +1 -1
  151. package/lib/cjs/appui-react/layout/widget/Dock.js +10 -1
  152. package/lib/cjs/appui-react/layout/widget/Dock.js.map +1 -1
  153. package/lib/cjs/appui-react/layout/widget/FloatingTab.js +5 -6
  154. package/lib/cjs/appui-react/layout/widget/FloatingTab.js.map +1 -1
  155. package/lib/cjs/appui-react/layout/widget/FloatingWidget.d.ts.map +1 -1
  156. package/lib/cjs/appui-react/layout/widget/FloatingWidget.js +17 -21
  157. package/lib/cjs/appui-react/layout/widget/FloatingWidget.js.map +1 -1
  158. package/lib/cjs/appui-react/layout/widget/FloatingWidget.scss +92 -105
  159. package/lib/cjs/appui-react/layout/widget/PanelWidget.js +1 -1
  160. package/lib/cjs/appui-react/layout/widget/PanelWidget.js.map +1 -1
  161. package/lib/cjs/appui-react/layout/widget/PinToggle.d.ts +2 -0
  162. package/lib/cjs/appui-react/layout/widget/PinToggle.d.ts.map +1 -1
  163. package/lib/cjs/appui-react/layout/widget/PinToggle.js +10 -1
  164. package/lib/cjs/appui-react/layout/widget/PinToggle.js.map +1 -1
  165. package/lib/cjs/appui-react/layout/widget/SendBack.d.ts.map +1 -1
  166. package/lib/cjs/appui-react/layout/widget/SendBack.js +4 -5
  167. package/lib/cjs/appui-react/layout/widget/SendBack.js.map +1 -1
  168. package/lib/cjs/appui-react/layout/widget/Tab.d.ts.map +1 -1
  169. package/lib/cjs/appui-react/layout/widget/Tab.js +9 -14
  170. package/lib/cjs/appui-react/layout/widget/Tab.js.map +1 -1
  171. package/lib/cjs/appui-react/layout/widget/TabBar.d.ts.map +1 -1
  172. package/lib/cjs/appui-react/layout/widget/TabBar.js +4 -1
  173. package/lib/cjs/appui-react/layout/widget/TabBar.js.map +1 -1
  174. package/lib/cjs/appui-react/layout/widget/TabBar.scss +17 -19
  175. package/lib/cjs/appui-react/layout/widget/Widget.js +2 -2
  176. package/lib/cjs/appui-react/layout/widget/Widget.js.map +1 -1
  177. package/lib/cjs/appui-react/layout/widget/useIsToolSettingsTab.js +1 -1
  178. package/lib/cjs/appui-react/layout/widget/useIsToolSettingsTab.js.map +1 -1
  179. package/lib/cjs/appui-react/layout/widget/usePanelWidgetId.d.ts +8 -0
  180. package/lib/cjs/appui-react/layout/widget/usePanelWidgetId.d.ts.map +1 -0
  181. package/lib/cjs/appui-react/layout/widget/usePanelWidgetId.js +39 -0
  182. package/lib/cjs/appui-react/layout/widget/usePanelWidgetId.js.map +1 -0
  183. package/lib/cjs/appui-react/layout/widget-panels/Grip.d.ts +1 -1
  184. package/lib/cjs/appui-react/layout/widget-panels/Grip.d.ts.map +1 -1
  185. package/lib/cjs/appui-react/layout/widget-panels/Grip.js +4 -0
  186. package/lib/cjs/appui-react/layout/widget-panels/Grip.js.map +1 -1
  187. package/lib/cjs/appui-react/layout/widget-panels/Grip.scss +106 -104
  188. package/lib/cjs/appui-react/layout/widget-panels/Panel.d.ts +1 -1
  189. package/lib/cjs/appui-react/layout/widget-panels/Panel.d.ts.map +1 -1
  190. package/lib/cjs/appui-react/layout/widget-panels/Panel.js +10 -16
  191. package/lib/cjs/appui-react/layout/widget-panels/Panel.js.map +1 -1
  192. package/lib/cjs/appui-react/layout/widget-panels/Panel.scss +175 -243
  193. package/lib/cjs/appui-react/layout/widget-panels/PanelSections.d.ts +1 -0
  194. package/lib/cjs/appui-react/layout/widget-panels/PanelSections.d.ts.map +1 -1
  195. package/lib/cjs/appui-react/layout/widget-panels/PanelSections.js +39 -38
  196. package/lib/cjs/appui-react/layout/widget-panels/PanelSections.js.map +1 -1
  197. package/lib/cjs/appui-react/layout/widget-panels/{Panels.scss → PanelSections.scss} +1 -11
  198. package/lib/cjs/appui-react/layout/widget-panels/useAnimatePanel.js +1 -2
  199. package/lib/cjs/appui-react/layout/widget-panels/useAnimatePanel.js.map +1 -1
  200. package/lib/cjs/appui-react/layout/widget-panels/usePanelsAutoCollapse.d.ts +7 -0
  201. package/lib/cjs/appui-react/layout/widget-panels/usePanelsAutoCollapse.d.ts.map +1 -0
  202. package/lib/cjs/appui-react/layout/widget-panels/{AppContent.js → usePanelsAutoCollapse.js} +3 -26
  203. package/lib/cjs/appui-react/layout/widget-panels/usePanelsAutoCollapse.js.map +1 -0
  204. package/lib/cjs/appui-react/messages/InputField.d.ts.map +1 -1
  205. package/lib/cjs/appui-react/messages/InputField.js +2 -3
  206. package/lib/cjs/appui-react/messages/InputField.js.map +1 -1
  207. package/lib/cjs/appui-react/messages/MessageLabel.js +2 -2
  208. package/lib/cjs/appui-react/messages/MessageLabel.js.map +1 -1
  209. package/lib/cjs/appui-react/messages/MessageManager.d.ts +15 -5
  210. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  211. package/lib/cjs/appui-react/messages/MessageManager.js +22 -41
  212. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  213. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts +8 -0
  214. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  215. package/lib/cjs/appui-react/messages/MessageRenderer.js +136 -0
  216. package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -0
  217. package/lib/cjs/appui-react/messages/Pointer.d.ts +2 -2
  218. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  219. package/lib/cjs/appui-react/messages/Pointer.js +5 -6
  220. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  221. package/lib/cjs/appui-react/messages/getToastCategory.d.ts +1 -1
  222. package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js +1 -1
  223. package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
  224. package/lib/cjs/appui-react/pickers/ViewSelector.js +5 -6
  225. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  226. package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
  227. package/lib/cjs/appui-react/popup/CardPopup.js +2 -3
  228. package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
  229. package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  230. package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -2
  231. package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
  232. package/lib/cjs/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
  233. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +7 -6
  234. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  235. package/lib/cjs/appui-react/popup/KeyinPalettePopup.js +1 -1
  236. package/lib/cjs/appui-react/popup/KeyinPalettePopup.js.map +1 -1
  237. package/lib/cjs/appui-react/popup/PopupManager.js +1 -2
  238. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  239. package/lib/cjs/appui-react/popup/ToolSettingsPopup.js +1 -1
  240. package/lib/cjs/appui-react/popup/ToolSettingsPopup.js.map +1 -1
  241. package/lib/cjs/appui-react/popup/ToolbarPopup.js +1 -1
  242. package/lib/cjs/appui-react/popup/ToolbarPopup.js.map +1 -1
  243. package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts +6 -1
  244. package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
  245. package/lib/cjs/appui-react/preview/PreviewFeatures.js +2 -1
  246. package/lib/cjs/appui-react/preview/PreviewFeatures.js.map +1 -1
  247. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizeToggle.d.ts +9 -0
  248. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizeToggle.d.ts.map +1 -0
  249. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizeToggle.js +51 -0
  250. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizeToggle.js.map +1 -0
  251. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts +18 -0
  252. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts.map +1 -0
  253. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizedWidget.js +27 -0
  254. package/lib/cjs/appui-react/preview/enable-maximized-widget/MaximizedWidget.js.map +1 -0
  255. package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts +50 -0
  256. package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts.map +1 -0
  257. package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js +115 -0
  258. package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js.map +1 -0
  259. package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.scss +36 -0
  260. package/lib/{esm/appui-react/layout/widget → cjs/appui-react/preview/horizontal-panel-alignment}/PreviewHorizontalPanelAlign.d.ts +4 -6
  261. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts.map +1 -0
  262. package/lib/cjs/appui-react/{layout/widget → preview/horizontal-panel-alignment}/PreviewHorizontalPanelAlign.js +18 -22
  263. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -0
  264. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.d.ts +19 -0
  265. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.d.ts.map +1 -0
  266. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js +30 -0
  267. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js.map +1 -0
  268. package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.scss +49 -0
  269. package/lib/cjs/appui-react/preview/widget-action-dropdown/Button.d.ts +1 -1
  270. package/lib/cjs/appui-react/preview/widget-action-dropdown/Button.js +1 -1
  271. package/lib/cjs/appui-react/preview/widget-action-dropdown/Button.js.map +1 -1
  272. package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.d.ts +3 -2
  273. package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.d.ts.map +1 -1
  274. package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.js +10 -10
  275. package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
  276. package/lib/cjs/appui-react/redux/SessionState.d.ts +2 -2
  277. package/lib/cjs/appui-react/redux/SessionState.d.ts.map +1 -1
  278. package/lib/cjs/appui-react/redux/SessionState.js.map +1 -1
  279. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +2 -2
  280. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  281. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  282. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  283. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  284. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +11 -16
  285. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  286. package/lib/cjs/appui-react/statusbar/Indicator.js +1 -2
  287. package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
  288. package/lib/cjs/appui-react/statusbar/StatusBar.js +3 -5
  289. package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
  290. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +1 -1
  291. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  292. package/lib/cjs/appui-react/statusbar/StatusBarItem.js.map +1 -1
  293. package/lib/cjs/appui-react/statusfields/ActivityCenter.d.ts.map +1 -1
  294. package/lib/cjs/appui-react/statusfields/ActivityCenter.js +1 -0
  295. package/lib/cjs/appui-react/statusfields/ActivityCenter.js.map +1 -1
  296. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts +1 -1
  297. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  298. package/lib/cjs/appui-react/statusfields/MessageCenter.js +5 -4
  299. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  300. package/lib/cjs/appui-react/statusfields/SelectionScope.scss +1 -3
  301. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  302. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  303. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  304. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  305. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  306. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +3 -2
  307. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  308. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  309. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  310. package/lib/cjs/appui-react/theme/ThemeManager.js +3 -1
  311. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  312. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js +6 -4
  313. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  314. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
  315. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  316. package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  317. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +18 -25
  318. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  319. package/lib/cjs/appui-react/tools/FrameworkToolAdmin.d.ts.map +1 -1
  320. package/lib/cjs/appui-react/tools/FrameworkToolAdmin.js +2 -1
  321. package/lib/cjs/appui-react/tools/FrameworkToolAdmin.js.map +1 -1
  322. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  323. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  324. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +20 -22
  325. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  326. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +3 -3
  327. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  328. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  329. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  330. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  331. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  332. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  333. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  334. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  335. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  336. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
  337. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  338. package/lib/cjs/appui-react/uiprovider/DefaultDialogGridContainer.scss +0 -7
  339. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  340. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  341. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +19 -16
  342. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  343. package/lib/cjs/appui-react/utils/matchesWords.js +4 -4
  344. package/lib/cjs/appui-react/utils/matchesWords.js.map +1 -1
  345. package/lib/cjs/appui-react/widget-panels/Content.js +8 -9
  346. package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
  347. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  348. package/lib/cjs/appui-react/widget-panels/Frontstage.js +23 -30
  349. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  350. package/lib/cjs/appui-react/widget-panels/Frontstage.scss +0 -23
  351. package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
  352. package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
  353. package/lib/cjs/appui-react/widget-panels/Tab.js +1 -1
  354. package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
  355. package/lib/cjs/appui-react/widget-panels/ToolSettings.js +15 -23
  356. package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
  357. package/lib/cjs/appui-react/widget-panels/ToolSettings.scss +1 -7
  358. package/lib/cjs/appui-react/widget-panels/Toolbars.js +2 -3
  359. package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
  360. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  361. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  362. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
  363. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  364. package/lib/cjs/appui-react/widgets/WidgetDef.js +4 -5
  365. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  366. package/lib/cjs/appui-react/widgets/WidgetHost.js +2 -3
  367. package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
  368. package/lib/cjs/appui-react/widgets/useWidget.js +1 -1
  369. package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -1
  370. package/lib/cjs/appui-react.d.ts +1 -0
  371. package/lib/cjs/appui-react.d.ts.map +1 -1
  372. package/lib/cjs/appui-react.js +1 -0
  373. package/lib/cjs/appui-react.js.map +1 -1
  374. package/lib/esm/appui-react/UiFramework.js +4 -7
  375. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  376. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  377. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  378. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  379. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  380. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  381. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js +2 -2
  382. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  383. package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  384. package/lib/esm/appui-react/accudraw/Calculator.js +9 -9
  385. package/lib/esm/appui-react/accudraw/Calculator.js.map +1 -1
  386. package/lib/esm/appui-react/accudraw/SquareButton.d.ts +3 -1
  387. package/lib/esm/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  388. package/lib/esm/appui-react/accudraw/SquareButton.js +1 -4
  389. package/lib/esm/appui-react/accudraw/SquareButton.js.map +1 -1
  390. package/lib/esm/appui-react/backstage/BackstageComposerItem.js +1 -2
  391. package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  392. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +2 -2
  393. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  394. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  395. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  396. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  397. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  398. package/lib/esm/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +14 -0
  399. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  400. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  401. package/lib/esm/appui-react/configurableui/TimeTracker.js +1 -2
  402. package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
  403. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  404. package/lib/esm/appui-react/content/ContentGroup.js +2 -2
  405. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  406. package/lib/esm/appui-react/content/ContentLayout.js +9 -12
  407. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  408. package/lib/esm/appui-react/content/DefaultViewOverlay.js +3 -4
  409. package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
  410. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -2
  411. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  412. package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
  413. package/lib/esm/appui-react/content/IModelViewport.js +6 -9
  414. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  415. package/lib/esm/appui-react/content/InternalContentLayoutManager.js +1 -2
  416. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  417. package/lib/esm/appui-react/content/InternalContentViewManager.js +2 -2
  418. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  419. package/lib/esm/appui-react/content/split-pane/SplitPane.js +10 -12
  420. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  421. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  422. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  423. package/lib/esm/appui-react/dialog/ContentDialog.js +3 -6
  424. package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
  425. package/lib/esm/appui-react/dialog/DialogManagerBase.js +2 -3
  426. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  427. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  428. package/lib/esm/appui-react/feedback/ElementTooltip.js +3 -4
  429. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  430. package/lib/esm/appui-react/feedback/ValidationTextbox.js +2 -2
  431. package/lib/esm/appui-react/feedback/ValidationTextbox.js.map +1 -1
  432. package/lib/esm/appui-react/frontstage/FrontstageDef.js +10 -14
  433. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  434. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  435. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  436. package/lib/esm/appui-react/frontstage/ModalFrontstage.js +2 -3
  437. package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  438. package/lib/esm/appui-react/frontstage/ModalFrontstage.scss +1 -1
  439. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +2 -3
  440. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  441. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  442. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  443. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  444. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  445. package/lib/esm/appui-react/hooks/useEscapeSetFocusToHome.js +1 -1
  446. package/lib/esm/appui-react/hooks/useEscapeSetFocusToHome.js.map +1 -1
  447. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  448. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  449. package/lib/esm/appui-react/hooks/useSolarDataProvider.js +8 -13
  450. package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  451. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  452. package/lib/esm/appui-react/{layout/widget-panels/CenterContent.scss → layers.scss} +6 -2
  453. package/lib/esm/appui-react/layout/StandardLayout.d.ts +24 -0
  454. package/lib/esm/appui-react/layout/StandardLayout.d.ts.map +1 -0
  455. package/lib/esm/appui-react/layout/StandardLayout.js +52 -0
  456. package/lib/esm/appui-react/layout/StandardLayout.js.map +1 -0
  457. package/lib/esm/appui-react/layout/StandardLayout.scss +94 -0
  458. package/lib/esm/appui-react/layout/backstage/Backstage.js +1 -1
  459. package/lib/esm/appui-react/layout/backstage/Backstage.js.map +1 -1
  460. package/lib/esm/appui-react/layout/base/DragManager.js +1 -2
  461. package/lib/esm/appui-react/layout/base/DragManager.js.map +1 -1
  462. package/lib/esm/appui-react/layout/base/NineZone.js +1 -1
  463. package/lib/esm/appui-react/layout/base/NineZone.js.map +1 -1
  464. package/lib/esm/appui-react/layout/base/SafeAreaInsets.js +4 -4
  465. package/lib/esm/appui-react/layout/base/SafeAreaInsets.js.map +1 -1
  466. package/lib/esm/appui-react/layout/outline/PanelOutline.scss +1 -10
  467. package/lib/esm/appui-react/layout/outline/TabOutline.js +1 -1
  468. package/lib/esm/appui-react/layout/outline/TabOutline.js.map +1 -1
  469. package/lib/esm/appui-react/layout/outline/WidgetOutline.js +1 -1
  470. package/lib/esm/appui-react/layout/outline/WidgetOutline.js.map +1 -1
  471. package/lib/esm/appui-react/layout/state/NineZoneStateReducer.js +12 -14
  472. package/lib/esm/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
  473. package/lib/esm/appui-react/layout/state/internal/NineZoneStateHelpers.js +1 -2
  474. package/lib/esm/appui-react/layout/state/internal/NineZoneStateHelpers.js.map +1 -1
  475. package/lib/esm/appui-react/layout/state/internal/PanelStateHelpers.d.ts.map +1 -1
  476. package/lib/esm/appui-react/layout/state/internal/PanelStateHelpers.js +1 -0
  477. package/lib/esm/appui-react/layout/state/internal/PanelStateHelpers.js.map +1 -1
  478. package/lib/esm/appui-react/layout/state/internal/TabStateHelpers.d.ts.map +1 -1
  479. package/lib/esm/appui-react/layout/state/internal/TabStateHelpers.js +7 -3
  480. package/lib/esm/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
  481. package/lib/esm/appui-react/layout/state/internal/ToolSettingsStateHelpers.d.ts.map +1 -1
  482. package/lib/esm/appui-react/layout/state/internal/ToolSettingsStateHelpers.js +6 -0
  483. package/lib/esm/appui-react/layout/state/internal/ToolSettingsStateHelpers.js.map +1 -1
  484. package/lib/esm/appui-react/layout/state/internal/WidgetStateHelpers.d.ts.map +1 -1
  485. package/lib/esm/appui-react/layout/state/internal/WidgetStateHelpers.js +6 -4
  486. package/lib/esm/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
  487. package/lib/esm/appui-react/layout/target/PanelTargets.scss +2 -0
  488. package/lib/esm/appui-react/layout/target/TitleBarTarget.js +1 -1
  489. package/lib/esm/appui-react/layout/target/TitleBarTarget.js.map +1 -1
  490. package/lib/esm/appui-react/layout/tool-settings/Docked.d.ts +12 -6
  491. package/lib/esm/appui-react/layout/tool-settings/Docked.d.ts.map +1 -1
  492. package/lib/esm/appui-react/layout/tool-settings/Docked.js +53 -22
  493. package/lib/esm/appui-react/layout/tool-settings/Docked.js.map +1 -1
  494. package/lib/esm/appui-react/layout/tool-settings/Docked.scss +15 -23
  495. package/lib/esm/appui-react/layout/tool-settings/Handle.d.ts.map +1 -1
  496. package/lib/esm/appui-react/layout/tool-settings/Handle.js +3 -1
  497. package/lib/esm/appui-react/layout/tool-settings/Handle.js.map +1 -1
  498. package/lib/esm/appui-react/layout/tool-settings/Handle.scss +6 -12
  499. package/lib/esm/appui-react/layout/tool-settings/Overflow.d.ts.map +1 -1
  500. package/lib/esm/appui-react/layout/tool-settings/Overflow.js +4 -5
  501. package/lib/esm/appui-react/layout/tool-settings/Overflow.js.map +1 -1
  502. package/lib/esm/appui-react/layout/tool-settings/Overflow.scss +0 -15
  503. package/lib/esm/appui-react/layout/tool-settings/Setting.scss +1 -12
  504. package/lib/esm/appui-react/layout/widget/Button.d.ts +2 -9
  505. package/lib/esm/appui-react/layout/widget/Button.d.ts.map +1 -1
  506. package/lib/esm/appui-react/layout/widget/Button.js.map +1 -1
  507. package/lib/esm/appui-react/layout/widget/Buttons.d.ts +4 -4
  508. package/lib/esm/appui-react/layout/widget/Buttons.d.ts.map +1 -1
  509. package/lib/esm/appui-react/layout/widget/Buttons.js +8 -30
  510. package/lib/esm/appui-react/layout/widget/Buttons.js.map +1 -1
  511. package/lib/esm/appui-react/layout/widget/ContentContainer.d.ts.map +1 -1
  512. package/lib/esm/appui-react/layout/widget/ContentContainer.js +2 -0
  513. package/lib/esm/appui-react/layout/widget/ContentContainer.js.map +1 -1
  514. package/lib/esm/appui-react/layout/widget/ContentManager.d.ts +1 -1
  515. package/lib/esm/appui-react/layout/widget/ContentManager.d.ts.map +1 -1
  516. package/lib/esm/appui-react/layout/widget/ContentManager.js +1 -1
  517. package/lib/esm/appui-react/layout/widget/ContentManager.js.map +1 -1
  518. package/lib/esm/appui-react/layout/widget/ContentRenderer.d.ts.map +1 -1
  519. package/lib/esm/appui-react/layout/widget/ContentRenderer.js +8 -2
  520. package/lib/esm/appui-react/layout/widget/ContentRenderer.js.map +1 -1
  521. package/lib/esm/appui-react/layout/widget/Dock.d.ts +2 -0
  522. package/lib/esm/appui-react/layout/widget/Dock.d.ts.map +1 -1
  523. package/lib/esm/appui-react/layout/widget/Dock.js +8 -0
  524. package/lib/esm/appui-react/layout/widget/Dock.js.map +1 -1
  525. package/lib/esm/appui-react/layout/widget/FloatingTab.js +5 -6
  526. package/lib/esm/appui-react/layout/widget/FloatingTab.js.map +1 -1
  527. package/lib/esm/appui-react/layout/widget/FloatingWidget.d.ts.map +1 -1
  528. package/lib/esm/appui-react/layout/widget/FloatingWidget.js +17 -21
  529. package/lib/esm/appui-react/layout/widget/FloatingWidget.js.map +1 -1
  530. package/lib/esm/appui-react/layout/widget/FloatingWidget.scss +92 -105
  531. package/lib/esm/appui-react/layout/widget/PanelWidget.js +1 -1
  532. package/lib/esm/appui-react/layout/widget/PanelWidget.js.map +1 -1
  533. package/lib/esm/appui-react/layout/widget/PinToggle.d.ts +2 -0
  534. package/lib/esm/appui-react/layout/widget/PinToggle.d.ts.map +1 -1
  535. package/lib/esm/appui-react/layout/widget/PinToggle.js +8 -0
  536. package/lib/esm/appui-react/layout/widget/PinToggle.js.map +1 -1
  537. package/lib/esm/appui-react/layout/widget/SendBack.d.ts.map +1 -1
  538. package/lib/esm/appui-react/layout/widget/SendBack.js +4 -5
  539. package/lib/esm/appui-react/layout/widget/SendBack.js.map +1 -1
  540. package/lib/esm/appui-react/layout/widget/Tab.d.ts.map +1 -1
  541. package/lib/esm/appui-react/layout/widget/Tab.js +9 -14
  542. package/lib/esm/appui-react/layout/widget/Tab.js.map +1 -1
  543. package/lib/esm/appui-react/layout/widget/TabBar.d.ts.map +1 -1
  544. package/lib/esm/appui-react/layout/widget/TabBar.js +4 -1
  545. package/lib/esm/appui-react/layout/widget/TabBar.js.map +1 -1
  546. package/lib/esm/appui-react/layout/widget/TabBar.scss +17 -19
  547. package/lib/esm/appui-react/layout/widget/Widget.js +2 -2
  548. package/lib/esm/appui-react/layout/widget/Widget.js.map +1 -1
  549. package/lib/esm/appui-react/layout/widget/useIsToolSettingsTab.js +1 -1
  550. package/lib/esm/appui-react/layout/widget/useIsToolSettingsTab.js.map +1 -1
  551. package/lib/esm/appui-react/layout/widget/usePanelWidgetId.d.ts +8 -0
  552. package/lib/esm/appui-react/layout/widget/usePanelWidgetId.d.ts.map +1 -0
  553. package/lib/esm/appui-react/layout/widget/usePanelWidgetId.js +34 -0
  554. package/lib/esm/appui-react/layout/widget/usePanelWidgetId.js.map +1 -0
  555. package/lib/esm/appui-react/layout/widget-panels/Grip.d.ts +1 -1
  556. package/lib/esm/appui-react/layout/widget-panels/Grip.d.ts.map +1 -1
  557. package/lib/esm/appui-react/layout/widget-panels/Grip.js +4 -0
  558. package/lib/esm/appui-react/layout/widget-panels/Grip.js.map +1 -1
  559. package/lib/esm/appui-react/layout/widget-panels/Grip.scss +106 -104
  560. package/lib/esm/appui-react/layout/widget-panels/Panel.d.ts +1 -1
  561. package/lib/esm/appui-react/layout/widget-panels/Panel.d.ts.map +1 -1
  562. package/lib/esm/appui-react/layout/widget-panels/Panel.js +10 -16
  563. package/lib/esm/appui-react/layout/widget-panels/Panel.js.map +1 -1
  564. package/lib/esm/appui-react/layout/widget-panels/Panel.scss +175 -243
  565. package/lib/esm/appui-react/layout/widget-panels/PanelSections.d.ts +1 -0
  566. package/lib/esm/appui-react/layout/widget-panels/PanelSections.d.ts.map +1 -1
  567. package/lib/esm/appui-react/layout/widget-panels/PanelSections.js +38 -37
  568. package/lib/esm/appui-react/layout/widget-panels/PanelSections.js.map +1 -1
  569. package/lib/esm/appui-react/layout/widget-panels/{Panels.scss → PanelSections.scss} +1 -11
  570. package/lib/esm/appui-react/layout/widget-panels/useAnimatePanel.js +1 -2
  571. package/lib/esm/appui-react/layout/widget-panels/useAnimatePanel.js.map +1 -1
  572. package/lib/esm/appui-react/layout/widget-panels/usePanelsAutoCollapse.d.ts +7 -0
  573. package/lib/esm/appui-react/layout/widget-panels/usePanelsAutoCollapse.d.ts.map +1 -0
  574. package/lib/esm/appui-react/layout/widget-panels/{AppContent.js → usePanelsAutoCollapse.js} +3 -25
  575. package/lib/esm/appui-react/layout/widget-panels/usePanelsAutoCollapse.js.map +1 -0
  576. package/lib/esm/appui-react/messages/InputField.d.ts.map +1 -1
  577. package/lib/esm/appui-react/messages/InputField.js +3 -4
  578. package/lib/esm/appui-react/messages/InputField.js.map +1 -1
  579. package/lib/esm/appui-react/messages/MessageLabel.js +2 -2
  580. package/lib/esm/appui-react/messages/MessageLabel.js.map +1 -1
  581. package/lib/esm/appui-react/messages/MessageManager.d.ts +15 -5
  582. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  583. package/lib/esm/appui-react/messages/MessageManager.js +22 -41
  584. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  585. package/lib/esm/appui-react/messages/MessageRenderer.d.ts +8 -0
  586. package/lib/esm/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  587. package/lib/esm/appui-react/messages/MessageRenderer.js +132 -0
  588. package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -0
  589. package/lib/esm/appui-react/messages/Pointer.d.ts +2 -2
  590. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  591. package/lib/esm/appui-react/messages/Pointer.js +6 -7
  592. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  593. package/lib/esm/appui-react/messages/getToastCategory.d.ts +1 -1
  594. package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js +1 -1
  595. package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
  596. package/lib/esm/appui-react/pickers/ViewSelector.js +5 -6
  597. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  598. package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
  599. package/lib/esm/appui-react/popup/CardPopup.js +3 -4
  600. package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
  601. package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  602. package/lib/esm/appui-react/popup/HTMLElementPopup.js +2 -3
  603. package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
  604. package/lib/esm/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
  605. package/lib/esm/appui-react/popup/KeyinPalettePanel.js +7 -6
  606. package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  607. package/lib/esm/appui-react/popup/KeyinPalettePopup.js +1 -1
  608. package/lib/esm/appui-react/popup/KeyinPalettePopup.js.map +1 -1
  609. package/lib/esm/appui-react/popup/PopupManager.js +1 -2
  610. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  611. package/lib/esm/appui-react/popup/ToolSettingsPopup.js +1 -1
  612. package/lib/esm/appui-react/popup/ToolSettingsPopup.js.map +1 -1
  613. package/lib/esm/appui-react/popup/ToolbarPopup.js +1 -1
  614. package/lib/esm/appui-react/popup/ToolbarPopup.js.map +1 -1
  615. package/lib/esm/appui-react/preview/PreviewFeatures.d.ts +6 -1
  616. package/lib/esm/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
  617. package/lib/esm/appui-react/preview/PreviewFeatures.js +2 -1
  618. package/lib/esm/appui-react/preview/PreviewFeatures.js.map +1 -1
  619. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizeToggle.d.ts +9 -0
  620. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizeToggle.d.ts.map +1 -0
  621. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizeToggle.js +46 -0
  622. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizeToggle.js.map +1 -0
  623. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts +18 -0
  624. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts.map +1 -0
  625. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizedWidget.js +23 -0
  626. package/lib/esm/appui-react/preview/enable-maximized-widget/MaximizedWidget.js.map +1 -0
  627. package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts +50 -0
  628. package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts.map +1 -0
  629. package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js +106 -0
  630. package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js.map +1 -0
  631. package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.scss +36 -0
  632. package/lib/{cjs/appui-react/layout/widget → esm/appui-react/preview/horizontal-panel-alignment}/PreviewHorizontalPanelAlign.d.ts +4 -6
  633. package/lib/esm/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts.map +1 -0
  634. package/lib/esm/appui-react/{layout/widget → preview/horizontal-panel-alignment}/PreviewHorizontalPanelAlign.js +16 -19
  635. package/lib/esm/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -0
  636. package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.d.ts +19 -0
  637. package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.d.ts.map +1 -0
  638. package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js +26 -0
  639. package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js.map +1 -0
  640. package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.scss +49 -0
  641. package/lib/esm/appui-react/preview/widget-action-dropdown/Button.d.ts +1 -1
  642. package/lib/esm/appui-react/preview/widget-action-dropdown/Button.js +1 -1
  643. package/lib/esm/appui-react/preview/widget-action-dropdown/Button.js.map +1 -1
  644. package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.d.ts +3 -2
  645. package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.d.ts.map +1 -1
  646. package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.js +10 -10
  647. package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
  648. package/lib/esm/appui-react/redux/SessionState.d.ts +2 -2
  649. package/lib/esm/appui-react/redux/SessionState.d.ts.map +1 -1
  650. package/lib/esm/appui-react/redux/SessionState.js.map +1 -1
  651. package/lib/esm/appui-react/selection/SelectionContextItemDef.js +2 -2
  652. package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  653. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  654. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  655. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  656. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +11 -16
  657. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  658. package/lib/esm/appui-react/statusbar/Indicator.js +1 -2
  659. package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
  660. package/lib/esm/appui-react/statusbar/StatusBar.js +3 -5
  661. package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
  662. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +1 -1
  663. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  664. package/lib/esm/appui-react/statusbar/StatusBarItem.js.map +1 -1
  665. package/lib/esm/appui-react/statusfields/ActivityCenter.d.ts.map +1 -1
  666. package/lib/esm/appui-react/statusfields/ActivityCenter.js +1 -0
  667. package/lib/esm/appui-react/statusfields/ActivityCenter.js.map +1 -1
  668. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts +1 -1
  669. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  670. package/lib/esm/appui-react/statusfields/MessageCenter.js +6 -5
  671. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  672. package/lib/esm/appui-react/statusfields/SelectionScope.scss +1 -3
  673. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  674. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  675. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  676. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  677. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  678. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +3 -2
  679. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  680. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  681. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  682. package/lib/esm/appui-react/theme/ThemeManager.js +3 -1
  683. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  684. package/lib/esm/appui-react/toolbar/ToolbarHelper.js +6 -4
  685. package/lib/esm/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  686. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
  687. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  688. package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  689. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +15 -22
  690. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  691. package/lib/esm/appui-react/tools/FrameworkToolAdmin.d.ts.map +1 -1
  692. package/lib/esm/appui-react/tools/FrameworkToolAdmin.js +2 -1
  693. package/lib/esm/appui-react/tools/FrameworkToolAdmin.js.map +1 -1
  694. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  695. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  696. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +20 -22
  697. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  698. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +3 -3
  699. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  700. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  701. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  702. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  703. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  704. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  705. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  706. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  707. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  708. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
  709. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  710. package/lib/esm/appui-react/uiprovider/DefaultDialogGridContainer.scss +0 -7
  711. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  712. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  713. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +19 -16
  714. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  715. package/lib/esm/appui-react/utils/matchesWords.js +4 -4
  716. package/lib/esm/appui-react/utils/matchesWords.js.map +1 -1
  717. package/lib/esm/appui-react/widget-panels/Content.js +8 -9
  718. package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
  719. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  720. package/lib/esm/appui-react/widget-panels/Frontstage.js +25 -32
  721. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  722. package/lib/esm/appui-react/widget-panels/Frontstage.scss +0 -23
  723. package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
  724. package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
  725. package/lib/esm/appui-react/widget-panels/Tab.js +1 -1
  726. package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
  727. package/lib/esm/appui-react/widget-panels/ToolSettings.js +15 -23
  728. package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
  729. package/lib/esm/appui-react/widget-panels/ToolSettings.scss +1 -7
  730. package/lib/esm/appui-react/widget-panels/Toolbars.js +2 -3
  731. package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
  732. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  733. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  734. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
  735. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  736. package/lib/esm/appui-react/widgets/WidgetDef.js +4 -5
  737. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  738. package/lib/esm/appui-react/widgets/WidgetHost.js +2 -3
  739. package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
  740. package/lib/esm/appui-react/widgets/useWidget.js +1 -1
  741. package/lib/esm/appui-react/widgets/useWidget.js.map +1 -1
  742. package/lib/esm/appui-react.d.ts +1 -0
  743. package/lib/esm/appui-react.d.ts.map +1 -1
  744. package/lib/esm/appui-react.js +1 -0
  745. package/lib/esm/appui-react.js.map +1 -1
  746. package/lib/public/locales/en/UiFramework.json +1 -1
  747. package/package.json +24 -26
  748. package/lib/cjs/appui-react/layout/widget/PreviewHorizontalPanelAlign.d.ts.map +0 -1
  749. package/lib/cjs/appui-react/layout/widget/PreviewHorizontalPanelAlign.js.map +0 -1
  750. package/lib/cjs/appui-react/layout/widget/PreviewMaximizeToggle.d.ts +0 -30
  751. package/lib/cjs/appui-react/layout/widget/PreviewMaximizeToggle.d.ts.map +0 -1
  752. package/lib/cjs/appui-react/layout/widget/PreviewMaximizeToggle.js +0 -65
  753. package/lib/cjs/appui-react/layout/widget/PreviewMaximizeToggle.js.map +0 -1
  754. package/lib/cjs/appui-react/layout/widget-panels/AppContent.d.ts +0 -11
  755. package/lib/cjs/appui-react/layout/widget-panels/AppContent.d.ts.map +0 -1
  756. package/lib/cjs/appui-react/layout/widget-panels/AppContent.js.map +0 -1
  757. package/lib/cjs/appui-react/layout/widget-panels/CenterContent.d.ts +0 -10
  758. package/lib/cjs/appui-react/layout/widget-panels/CenterContent.d.ts.map +0 -1
  759. package/lib/cjs/appui-react/layout/widget-panels/CenterContent.js +0 -23
  760. package/lib/cjs/appui-react/layout/widget-panels/CenterContent.js.map +0 -1
  761. package/lib/cjs/appui-react/layout/widget-panels/Content.d.ts +0 -21
  762. package/lib/cjs/appui-react/layout/widget-panels/Content.d.ts.map +0 -1
  763. package/lib/cjs/appui-react/layout/widget-panels/Content.js +0 -21
  764. package/lib/cjs/appui-react/layout/widget-panels/Content.js.map +0 -1
  765. package/lib/cjs/appui-react/layout/widget-panels/Content.scss +0 -37
  766. package/lib/cjs/appui-react/layout/widget-panels/Panels.d.ts +0 -24
  767. package/lib/cjs/appui-react/layout/widget-panels/Panels.d.ts.map +0 -1
  768. package/lib/cjs/appui-react/layout/widget-panels/Panels.js +0 -48
  769. package/lib/cjs/appui-react/layout/widget-panels/Panels.js.map +0 -1
  770. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +0 -10
  771. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  772. package/lib/cjs/appui-react/messages/ActivityMessage.js +0 -92
  773. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +0 -1
  774. package/lib/cjs/appui-react/messages/MessageSpan.d.ts +0 -15
  775. package/lib/cjs/appui-react/messages/MessageSpan.d.ts.map +0 -1
  776. package/lib/cjs/appui-react/messages/MessageSpan.js +0 -23
  777. package/lib/cjs/appui-react/messages/MessageSpan.js.map +0 -1
  778. package/lib/esm/appui-react/layout/widget/PreviewHorizontalPanelAlign.d.ts.map +0 -1
  779. package/lib/esm/appui-react/layout/widget/PreviewHorizontalPanelAlign.js.map +0 -1
  780. package/lib/esm/appui-react/layout/widget/PreviewMaximizeToggle.d.ts +0 -30
  781. package/lib/esm/appui-react/layout/widget/PreviewMaximizeToggle.d.ts.map +0 -1
  782. package/lib/esm/appui-react/layout/widget/PreviewMaximizeToggle.js +0 -58
  783. package/lib/esm/appui-react/layout/widget/PreviewMaximizeToggle.js.map +0 -1
  784. package/lib/esm/appui-react/layout/widget-panels/AppContent.d.ts +0 -11
  785. package/lib/esm/appui-react/layout/widget-panels/AppContent.d.ts.map +0 -1
  786. package/lib/esm/appui-react/layout/widget-panels/AppContent.js.map +0 -1
  787. package/lib/esm/appui-react/layout/widget-panels/CenterContent.d.ts +0 -10
  788. package/lib/esm/appui-react/layout/widget-panels/CenterContent.d.ts.map +0 -1
  789. package/lib/esm/appui-react/layout/widget-panels/CenterContent.js +0 -19
  790. package/lib/esm/appui-react/layout/widget-panels/CenterContent.js.map +0 -1
  791. package/lib/esm/appui-react/layout/widget-panels/Content.d.ts +0 -21
  792. package/lib/esm/appui-react/layout/widget-panels/Content.d.ts.map +0 -1
  793. package/lib/esm/appui-react/layout/widget-panels/Content.js +0 -18
  794. package/lib/esm/appui-react/layout/widget-panels/Content.js.map +0 -1
  795. package/lib/esm/appui-react/layout/widget-panels/Content.scss +0 -37
  796. package/lib/esm/appui-react/layout/widget-panels/Panels.d.ts +0 -24
  797. package/lib/esm/appui-react/layout/widget-panels/Panels.d.ts.map +0 -1
  798. package/lib/esm/appui-react/layout/widget-panels/Panels.js +0 -44
  799. package/lib/esm/appui-react/layout/widget-panels/Panels.js.map +0 -1
  800. package/lib/esm/appui-react/messages/ActivityMessage.d.ts +0 -10
  801. package/lib/esm/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  802. package/lib/esm/appui-react/messages/ActivityMessage.js +0 -88
  803. package/lib/esm/appui-react/messages/ActivityMessage.js.map +0 -1
  804. package/lib/esm/appui-react/messages/MessageSpan.d.ts +0 -15
  805. package/lib/esm/appui-react/messages/MessageSpan.d.ts.map +0 -1
  806. package/lib/esm/appui-react/messages/MessageSpan.js +0 -18
  807. package/lib/esm/appui-react/messages/MessageSpan.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageComposerItem.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposerItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAMrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAOzD,gBAAgB;AAChB,MAAM,UAAU,2BAA2B,CAAC,EAC1C,IAAI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,oBAAC,8BAA8B,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;KACvD;IACD,OAAO,oBAAC,2BAA2B,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACrD,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 Backstage\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { BadgeUtilities, Icon } from \"@itwin/core-react\";\nimport * as React from \"react\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useActiveFrontstageId } from \"../frontstage/FrontstageDef\";\nimport { BackstageItem as NZ_BackstageItem } from \"../layout/backstage/Item\";\nimport { isProviderItem } from \"../ui-items-provider/isProviderItem\";\nimport type {\n BackstageActionItem,\n BackstageItem,\n BackstageStageLauncher,\n} from \"./BackstageItem\";\nimport { isBackstageStageLauncher } from \"./BackstageItem\";\nimport { useBackstageManager } from \"./BackstageManager\";\n\n/** @internal */\nexport interface BackstageComposerActionItemProps {\n readonly item: BackstageActionItem;\n}\n\n/** @internal */\nexport function BackstageComposerActionItem({\n item,\n}: BackstageComposerActionItemProps) {\n const manager = useBackstageManager();\n const handleClick = React.useCallback(() => {\n manager.close();\n item.execute();\n }, [manager, item]);\n return (\n <NZ_BackstageItem\n itemId={item.id}\n providerId={isProviderItem(item) ? item.providerId : undefined}\n itemPriority={item.itemPriority}\n groupPriority={item.groupPriority}\n icon={<Icon iconSpec={item.icon} />}\n isActive={ConditionalBooleanValue.getValue(item.isActive)}\n isDisabled={ConditionalBooleanValue.getValue(item.isDisabled)}\n onClick={handleClick}\n subtitle={ConditionalStringValue.getValue(item.subtitle)}\n badge={BadgeUtilities.getComponentForBadgeType(item.badge)}\n >\n {ConditionalStringValue.getValue(item.label)}\n </NZ_BackstageItem>\n );\n}\n\n/** @internal */\nexport interface BackstageComposerStageLauncherProps {\n readonly item: BackstageStageLauncher;\n}\n\n/** @internal */\nexport function BackstageComposerStageLauncher({\n item,\n}: BackstageComposerStageLauncherProps) {\n const manager = useBackstageManager();\n const handleClick = React.useCallback(() => {\n manager.close();\n if (!UiFramework.frontstages.hasFrontstage(item.stageId))\n return Logger.logError(\n \"BackstageComposerStageLauncher\",\n `Frontstage with id '${item.stageId}' not found`\n );\n void UiFramework.frontstages.setActiveFrontstage(item.stageId);\n }, [manager, item.stageId]);\n const activeFrontstageId = useActiveFrontstageId();\n const isActive = ConditionalBooleanValue.getValue(\n item.isActive ?? item.stageId === activeFrontstageId\n );\n return (\n <NZ_BackstageItem\n itemId={item.id}\n providerId={isProviderItem(item) ? item.providerId : undefined}\n itemPriority={item.itemPriority}\n groupPriority={item.groupPriority}\n icon={<Icon iconSpec={item.icon} />}\n isActive={isActive}\n isDisabled={ConditionalBooleanValue.getValue(item.isDisabled)}\n onClick={handleClick}\n subtitle={ConditionalStringValue.getValue(item.subtitle)}\n badge={BadgeUtilities.getComponentForBadgeType(item.badge)}\n >\n {ConditionalStringValue.getValue(item.label)}\n </NZ_BackstageItem>\n );\n}\n\n/** Props of [[BackstageComposerItem]] component.\n * @internal\n */\nexport interface BackstageComposerItemProps {\n /** Backstage item to render */\n readonly item: BackstageItem;\n}\n\n/** Item of [[BackstageComposer]].\n * @internal\n */\nexport function BackstageComposerItem({ item }: BackstageComposerItemProps) {\n if (isBackstageStageLauncher(item)) {\n return <BackstageComposerStageLauncher item={item} />;\n }\n return <BackstageComposerActionItem item={item} />;\n}\n"]}
1
+ {"version":3,"file":"BackstageComposerItem.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposerItem.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM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,IAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,GAAI,EACnC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAC7D,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxD,KAAK,EAAE,cAAc,CAAC,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,IAEzD,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAC3B,CACpB,CAAC;AACJ,CAAC;AAUD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAA8B;IACxE,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAAE;QAClC,OAAO,oBAAC,8BAA8B,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;KACvD;IACD,OAAO,oBAAC,2BAA2B,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACrD,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 Backstage\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { BadgeUtilities, Icon } from \"@itwin/core-react\";\nimport * as React from \"react\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useActiveFrontstageId } from \"../frontstage/FrontstageDef\";\nimport { BackstageItem as NZ_BackstageItem } from \"../layout/backstage/Item\";\nimport { isProviderItem } from \"../ui-items-provider/isProviderItem\";\nimport type {\n BackstageActionItem,\n BackstageItem,\n BackstageStageLauncher,\n} from \"./BackstageItem\";\nimport { isBackstageStageLauncher } from \"./BackstageItem\";\nimport { useBackstageManager } from \"./BackstageManager\";\n\n/** @internal */\nexport interface BackstageComposerActionItemProps {\n readonly item: BackstageActionItem;\n}\n\n/** @internal */\nexport function BackstageComposerActionItem({\n item,\n}: BackstageComposerActionItemProps) {\n const manager = useBackstageManager();\n const handleClick = React.useCallback(() => {\n manager.close();\n item.execute();\n }, [manager, item]);\n return (\n <NZ_BackstageItem\n itemId={item.id}\n providerId={isProviderItem(item) ? item.providerId : undefined}\n itemPriority={item.itemPriority}\n groupPriority={item.groupPriority}\n icon={<Icon iconSpec={item.icon} />}\n isActive={ConditionalBooleanValue.getValue(item.isActive)}\n isDisabled={ConditionalBooleanValue.getValue(item.isDisabled)}\n onClick={handleClick}\n subtitle={ConditionalStringValue.getValue(item.subtitle)}\n badge={BadgeUtilities.getComponentForBadgeType(item.badge)}\n >\n {ConditionalStringValue.getValue(item.label)}\n </NZ_BackstageItem>\n );\n}\n\n/** @internal */\nexport interface BackstageComposerStageLauncherProps {\n readonly item: BackstageStageLauncher;\n}\n\n/** @internal */\nexport function BackstageComposerStageLauncher({\n item,\n}: BackstageComposerStageLauncherProps) {\n const manager = useBackstageManager();\n const handleClick = React.useCallback(() => {\n manager.close();\n if (!UiFramework.frontstages.hasFrontstage(item.stageId))\n return Logger.logError(\n \"BackstageComposerStageLauncher\",\n `Frontstage with id '${item.stageId}' not found`\n );\n void UiFramework.frontstages.setActiveFrontstage(item.stageId);\n }, [manager, item.stageId]);\n const activeFrontstageId = useActiveFrontstageId();\n const isActive = ConditionalBooleanValue.getValue(\n item.isActive ?? item.stageId === activeFrontstageId\n );\n return (\n <NZ_BackstageItem\n itemId={item.id}\n providerId={isProviderItem(item) ? item.providerId : undefined}\n itemPriority={item.itemPriority}\n groupPriority={item.groupPriority}\n icon={<Icon iconSpec={item.icon} />}\n isActive={isActive}\n isDisabled={ConditionalBooleanValue.getValue(item.isDisabled)}\n onClick={handleClick}\n subtitle={ConditionalStringValue.getValue(item.subtitle)}\n badge={BadgeUtilities.getComponentForBadgeType(item.badge)}\n >\n {ConditionalStringValue.getValue(item.label)}\n </NZ_BackstageItem>\n );\n}\n\n/** Props of [[BackstageComposerItem]] component.\n * @internal\n */\nexport interface BackstageComposerItemProps {\n /** Backstage item to render */\n readonly item: BackstageItem;\n}\n\n/** Item of [[BackstageComposer]].\n * @internal\n */\nexport function BackstageComposerItem({ item }: BackstageComposerItemProps) {\n if (isBackstageStageLauncher(item)) {\n return <BackstageComposerStageLauncher item={item} />;\n }\n return <BackstageComposerActionItem item={item} />;\n}\n"]}
@@ -35,7 +35,7 @@ const childHtml = `<!DOCTYPE html>
35
35
  }
36
36
  </style>
37
37
  </head>
38
- <body class="iui-root">
38
+ <body>
39
39
  <noscript>You need to enable JavaScript to run this app.</noscript>
40
40
  <div id="root"></div>
41
41
  </body>
@@ -129,7 +129,7 @@ export class InternalChildWindowManager {
129
129
  if (!contentWindow)
130
130
  return undefined;
131
131
  const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);
132
- return childWindow === null || childWindow === void 0 ? void 0 : childWindow.childWindowId;
132
+ return childWindow?.childWindowId;
133
133
  }
134
134
  // istanbul ignore next: Used in `open` which is not tested.
135
135
  renderChildWindowContents(childWindow, childWindowId, content, title) {
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAMzE,OAAO,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AAuB,MAAM,CAAC,IAAI,CACjD,GAAG,EACH,EAAE,EACF,SAAS,QAAQ,CAAC,KAAK,WAAW,QAAQ,CAAC,MAAM,SAAS,QAAQ,CAAC,IAAI,QAAQ,QAAQ,CAAC,GAAG,+DAA+D,CAC3J,CAAC;QACF,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC;QAC/B,WAAW,CAAC,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC7C,WAAW,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QAE3C,+BAA+B;QAC/B,WAAW,CAAC,mBAAmB;YAC7B,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAEzD,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,EAAE;YACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;SACH;aAAM;YACL,WAAW,CAAC,gBAAgB,CAC1B,MAAM,EACN,GAAG,EAAE;gBACH,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;YACJ,CAAC,EACD,KAAK,CACN,CAAC;SACH;QAED,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,GAAG,EAAE;YACH,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\nimport { copyStyles } from \"./CopyStyles\";\nimport \"./InternalChildWindowManager.scss\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body class=\"iui-root\">\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerWidth\n : childWindow.innerWidth);\n childWindow.deltaHeight =\n childWindow.expectedHeight -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerHeight\n : childWindow.innerHeight);\n }\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv && content && React.isValidElement(content)) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n let element: React.FunctionComponentElement<any>;\n if (content.props.widgetDef) {\n const tabId = content.props.widgetDef.id as string;\n element = (\n <Provider store={UiFramework.store}>\n <TabIdContext.Provider value={tabId}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </TabIdContext.Provider>\n </Provider>\n );\n } else {\n element = (\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>\n );\n }\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(element, reactConnectionDiv);\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n\n // Edge needs to use outer size\n childWindow.shouldUseOuterSized =\n navigator.userAgent.toLowerCase().indexOf(\"edg/\") > -1;\n\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAMzE,OAAO,EAAE,YAAY,EAAE,MAAM,kC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SAAS,QAAQ,CAAC,KAAK,WAAW,QAAQ,CAAC,MAAM,SAAS,QAAQ,CAAC,IAAI,QAAQ,QAAQ,CAAC,GAAG,+DAA+D,CAC3J,CAAC;QACF,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC;QAC/B,WAAW,CAAC,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC7C,WAAW,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QAE3C,+BAA+B;QAC/B,WAAW,CAAC,mBAAmB;YAC7B,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAEzD,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,EAAE;YACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;SACH;aAAM;YACL,WAAW,CAAC,gBAAgB,CAC1B,MAAM,EACN,GAAG,EAAE;gBACH,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;YACJ,CAAC,EACD,KAAK,CACN,CAAC;SACH;QAED,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,GAAG,EAAE;YACH,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\nimport { copyStyles } from \"./CopyStyles\";\nimport \"./InternalChildWindowManager.scss\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body>\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerWidth\n : childWindow.innerWidth);\n childWindow.deltaHeight =\n childWindow.expectedHeight -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerHeight\n : childWindow.innerHeight);\n }\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv && content && React.isValidElement(content)) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n let element: React.FunctionComponentElement<any>;\n if (content.props.widgetDef) {\n const tabId = content.props.widgetDef.id as string;\n element = (\n <Provider store={UiFramework.store}>\n <TabIdContext.Provider value={tabId}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </TabIdContext.Provider>\n </Provider>\n );\n } else {\n element = (\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>\n );\n }\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(element, reactConnectionDiv);\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n\n // Edge needs to use outer size\n childWindow.shouldUseOuterSized =\n navigator.userAgent.toLowerCase().indexOf(\"edg/\") > -1;\n\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module ConfigurableUi
3
3
  */
4
- import "./configurableui.scss";
4
+ import "./ConfigurableUiContent.scss";
5
5
  import * as React from "react";
6
6
  import type { CommonProps } from "@itwin/core-react";
7
7
  /** Properties for [[ConfigurableUiContent]]
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBrD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBA0CtE"}
1
+ {"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqBrD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAsDtE"}
@@ -5,9 +5,10 @@
5
5
  /** @packageDocumentation
6
6
  * @module ConfigurableUi
7
7
  */
8
- import "./configurableui.scss";
8
+ import "./ConfigurableUiContent.scss";
9
9
  import * as React from "react";
10
10
  import { Point } from "@itwin/core-react";
11
+ import { ThemeProvider } from "@itwin/itwinui-react";
11
12
  import { CursorInformation } from "../cursor/CursorInformation";
12
13
  import { CursorPopupMenu } from "../cursor/cursormenu/CursorMenu";
13
14
  import { CursorPopupRenderer } from "../cursor/cursorpopup/CursorPopupManager";
@@ -22,11 +23,12 @@ import { WidgetPanelsFrontstage } from "../widget-panels/Frontstage";
22
23
  import { ContentDialogRenderer } from "../dialog/ContentDialogManager";
23
24
  import { UiFramework } from "../UiFramework";
24
25
  import { InternalConfigurableUiManager } from "./InternalConfigurableUiManager";
25
- import { ActivityMessageRenderer } from "../messages/ActivityMessage";
26
+ import { MessageRenderer } from "../messages/MessageRenderer";
26
27
  /** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi
27
28
  * @public
28
29
  */
29
30
  export function ConfigurableUiContent(props) {
31
+ const [portalContainer, setPortalContainer] = React.useState();
30
32
  React.useEffect(() => {
31
33
  UiFramework.keyboardShortcuts.setFocusToHome();
32
34
  }, []);
@@ -44,18 +46,20 @@ export function ConfigurableUiContent(props) {
44
46
  CursorInformation.handleMouseMove(point);
45
47
  }, []);
46
48
  return (React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: props.className, style: props.style, onMouseMove: handleMouseMove },
47
- props.appBackstage,
48
- React.createElement(WidgetPanelsFrontstage, null),
49
- React.createElement(ContentDialogRenderer, null),
50
- React.createElement(ModelessDialogRenderer, null),
51
- React.createElement(ModalDialogRenderer, null),
52
- React.createElement(ElementTooltip, null),
53
- React.createElement(PointerMessage, null),
54
- React.createElement(KeyboardShortcutMenu, null),
55
- React.createElement(InputFieldMessage, null),
56
- React.createElement(CursorPopupMenu, null),
57
- React.createElement(CursorPopupRenderer, null),
58
- React.createElement(PopupRenderer, null),
59
- React.createElement(ActivityMessageRenderer, null)));
49
+ React.createElement(ThemeProvider, { style: { height: "100%" }, portalContainer: portalContainer },
50
+ props.appBackstage,
51
+ React.createElement(WidgetPanelsFrontstage, null),
52
+ React.createElement(ContentDialogRenderer, null),
53
+ React.createElement(ModelessDialogRenderer, null),
54
+ React.createElement(ModalDialogRenderer, null),
55
+ React.createElement(ElementTooltip, null),
56
+ React.createElement(PointerMessage, null),
57
+ React.createElement(KeyboardShortcutMenu, null),
58
+ React.createElement(InputFieldMessage, null),
59
+ React.createElement(CursorPopupMenu, null),
60
+ React.createElement(CursorPopupRenderer, null),
61
+ React.createElement(PopupRenderer, null),
62
+ React.createElement(MessageRenderer, null)),
63
+ React.createElement("div", { className: "uifw-configurableui-portalContainer", ref: (instance) => setPortalContainer(instance ?? undefined) })));
60
64
  }
61
65
  //# sourceMappingURL=ConfigurableUiContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAiBtE;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiC;IACrE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,6BAA6B,CAAC,eAAe,CAAC,UAAU,CAAC;YACvD,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACV,6BAA6B,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;QAC5D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAE/C,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAmB,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1C,iBAAiB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,8BACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,6BAA6B,EAChC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,eAAe;QAE3B,KAAK,CAAC,YAAY;QACnB,oBAAC,sBAAsB,OAAG;QAC1B,oBAAC,qBAAqB,OAAG;QACzB,oBAAC,sBAAsB,OAAG;QAC1B,oBAAC,mBAAmB,OAAG;QACvB,oBAAC,cAAc,OAAG;QAClB,oBAAC,cAAc,OAAG;QAClB,oBAAC,oBAAoB,OAAG;QACxB,oBAAC,iBAAiB,OAAG;QACrB,oBAAC,eAAe,OAAG;QACnB,oBAAC,mBAAmB,OAAG;QACvB,oBAAC,aAAa,OAAG;QACjB,oBAAC,uBAAuB,OAAG,CACtB,CACR,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./configurableui.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\nimport { InputFieldMessage } from \"../messages/InputField\";\nimport { PointerMessage } from \"../messages/Pointer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\nimport { ActivityMessageRenderer } from \"../messages/ActivityMessage\";\n\n// cSpell:ignore cursormenu cursorpopup\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n */\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\n * @public\n */\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout: props.idleTimeout,\n intervalTimeout: props.intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [props.idleTimeout, props.intervalTimeout]);\n\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n }, []);\n\n return (\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={props.className}\n style={props.style}\n onMouseMove={handleMouseMove}\n >\n {props.appBackstage}\n <WidgetPanelsFrontstage />\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n <ElementTooltip />\n <PointerMessage />\n <KeyboardShortcutMenu />\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <ActivityMessageRenderer />\n </main>\n );\n}\n"]}
1
+ {"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MA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AAI,EAAC,MAAM,EACX,EAAE,EAAC,6BAA6B,EAChC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,eAAe;QAE5B,oBAAC,aAAa,IACZ,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EACzB,eAAe,EAAE,eAAe;YAE/B,KAAK,CAAC,YAAY;YACnB,oBAAC,sBAAsB,OAAG;YAC1B,oBAAC,qBAAqB,OAAG;YACzB,oBAAC,sBAAsB,OAAG;YAC1B,oBAAC,mBAAmB,OAAG;YACvB,oBAAC,cAAc,OAAG;YAClB,oBAAC,cAAc,OAAG;YAClB,oBAAC,oBAAoB,OAAG;YACxB,oBAAC,iBAAiB,OAAG;YACrB,oBAAC,eAAe,OAAG;YACnB,oBAAC,mBAAmB,OAAG;YACvB,oBAAC,aAAa,OAAG;YACjB,oBAAC,eAAe,OAAG,CACL;QAChB,6BACE,SAAS,EAAC,qCAAqC,EAC/C,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAAQ,IAAI,SAAS,CAAC,GAC5D,CACG,CACR,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\nimport { InputFieldMessage } from \"../messages/InputField\";\nimport { PointerMessage } from \"../messages/Pointer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\nimport { MessageRenderer } from \"../messages/MessageRenderer\";\n\n// cSpell:ignore cursormenu cursorpopup\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n */\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\n * @public\n */\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const [portalContainer, setPortalContainer] = React.useState<\n HTMLElement | undefined\n >();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout: props.idleTimeout,\n intervalTimeout: props.intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [props.idleTimeout, props.intervalTimeout]);\n\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n }, []);\n\n return (\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={props.className}\n style={props.style}\n onMouseMove={handleMouseMove}\n >\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {props.appBackstage}\n <WidgetPanelsFrontstage />\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n <ElementTooltip />\n <PointerMessage />\n <KeyboardShortcutMenu />\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <MessageRenderer />\n </ThemeProvider>\n <div\n className=\"uifw-configurableui-portalContainer\"\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n />\n </main>\n );\n}\n"]}
@@ -72,3 +72,17 @@
72
72
  .uifw-app-button-small {
73
73
  margin-bottom: 6px;
74
74
  }
75
+
76
+ .uifw-configurableui-portalContainer {
77
+ position: absolute;
78
+ top: 0;
79
+ left: 0;
80
+ width: 100%;
81
+ height: 100%;
82
+ z-index: 99999;
83
+ pointer-events: none;
84
+
85
+ > * {
86
+ pointer-events: all;
87
+ }
88
+ }
@@ -114,7 +114,7 @@ class InternalConfigurableUiManager {
114
114
  * @returns the created control
115
115
  */
116
116
  static create(classId, uniqueId, options, controlId) {
117
- const info = new ConfigurableCreateInfo(classId, uniqueId, controlId !== null && controlId !== void 0 ? controlId : uniqueId);
117
+ const info = new ConfigurableCreateInfo(classId, uniqueId, controlId ?? uniqueId);
118
118
  const constructor = this._registeredControls.get(info.classId);
119
119
  if (!constructor) {
120
120
  // eslint-disable-next-line deprecation/deprecation
@@ -1 +1 @@
1
- {"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB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;;AAjKc,iDAAmB,GAAG,IAAI,GAAG,EAGzC,CAAC;AACW,0CAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,6CAAe,GAAG,IAAI,eAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;SAZtD,6BAA6B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
1
+ {"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAA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OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,WAAW,EAAE;YAChB,mDAAmD;YACnD,MAAM,IAAI,OAAO,CACf,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAChC,2BAA2B,OAAO,kBAAkB,CACrD,CAAC;SACH;QAED,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,wDAAwD;IACjD,MAAM,CAAC,iBAAiB;QAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,6BAA6B,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,OAAQ,CAAC;QAC7B,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,OAAO;QACnB,cAAc,CAAC,gBAAgB,EAAE,CAAC;QAClC,6BAA6B,CAAC,QAAQ,EAAE,CAAC;QACzC,0BAA0B,CAAC,QAAQ,EAAE,CAAC;QACtC,4BAA4B,CAAC,QAAQ,EAAE,CAAC;QACxC,WAAW,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC1C,WAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,YAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AAjKc,iDAAmB,GAAG,IAAI,GAAG,EAGzC,CAAC;AACW,0CAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,6CAAe,GAAG,IAAI,eAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;SAZtD,6BAA6B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
@@ -20,9 +20,8 @@ export class TimeTracker {
20
20
  this._totalTime = 0;
21
21
  this._idleTime = 0;
22
22
  this._idleTimeCounter = (args) => {
23
- var _a;
24
23
  // istanbul ignore next
25
- const idleTimeout = (_a = args.idleTimeout) !== null && _a !== void 0 ? _a : this._idleTimeout;
24
+ const idleTimeout = args.idleTimeout ?? this._idleTimeout;
26
25
  // istanbul ignore else
27
26
  if (this._lastActiveTimestamp > 0 &&
28
27
  this._idleStartTimestamp === 0 &&
@@ -1 +1 @@
1
- {"version":3,"file":"TimeTracker.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/TimeTracker.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAMH,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF;;GAEG;AACH,MAAM,OAAO,WAAW;IAAxB;QACU,0BAAqB,GAAW,CAAC,CAAC;QAClC,wBAAmB,GAAW,CAAC,CAAC;QAChC,yBAAoB,GAAW,CAAC,CAAC;QACjC,mBAAc,GAAW,CAAC,CAAC;QAC3B,eAAU,GAAW,CAAC,CAAC;QACvB,iBAAY,GAAW,IAAI,CAAC;QAC5B,eAAU,GAAW,CAAC,CAAC;QACvB,cAAS,GAAW,CAAC,CAAC;QAsDtB,qBAAgB,GAAG,CAAC,IAAyB,EAAQ,EAAE;;YAC7D,uBAAuB;YACvB,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,WAAW,mCAAI,IAAI,CAAC,YAAY,CAAC;YAC1D,uBAAuB;YACvB,IACE,IAAI,CAAC,oBAAoB,GAAG,CAAC;gBAC7B,IAAI,CAAC,mBAAmB,KAAK,CAAC;gBAC9B,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,oBAAoB,IAAI,WAAW,EACrD;gBACA,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACtC,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;QACH,CAAC,CAAC;QAEM,mBAAc,GAAG,CAAC,KAA0B,EAAQ,EAAE;YAC5D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IACI,wBAAwB;QAC7B,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACnD,CAAC;IAED;OACG;IACI,mBAAmB;QACxB,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAChC,CAAC;IAED;OACG;IACI,kBAAkB;QACvB,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC/B,CAAC;CAyBF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport type {\n UiActivityEventArgs,\n UiIntervalEventArgs,\n} from \"./InternalConfigurableUiManager\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\n\n/** Time Tracker utility class\n * @internal\n */\nexport class TimeTracker {\n private _firstActiveTimestamp: number = 0;\n private _idleStartTimestamp: number = 0;\n private _lastActiveTimestamp: number = 0;\n private _totalIdleTime: number = 0;\n private _idleCount: number = 0;\n private _idleTimeout: number = 5000;\n private _totalTime: number = 0;\n private _idleTime: number = 0;\n\n /** Starts time tracking\n */\n public startTiming(): void {\n this._totalIdleTime = 0;\n this._idleStartTimestamp = 0;\n this._idleCount = 0;\n this._totalTime = 0;\n this._idleTime = 0;\n\n this._firstActiveTimestamp = Date.now();\n this._lastActiveTimestamp = this._firstActiveTimestamp;\n\n InternalConfigurableUiManager.onUiIntervalEvent.addListener(\n this._idleTimeCounter\n );\n InternalConfigurableUiManager.onUiActivityEvent.addListener(\n this._trackActivity\n );\n }\n\n /** Stops time tracking\n */\n public stopTiming(): void {\n InternalConfigurableUiManager.onUiIntervalEvent.removeListener(\n this._idleTimeCounter\n );\n InternalConfigurableUiManager.onUiActivityEvent.removeListener(\n this._trackActivity\n );\n\n this._totalTime = Date.now() - this._firstActiveTimestamp;\n this._idleTime = this._totalIdleTime + this._idleCount * this._idleTimeout;\n }\n\n /** Gets engagement time in seconds\n */\n public getEngagementTimeSeconds(): number {\n return (this._totalTime - this._idleTime) / 1000;\n }\n\n /** Gets total time in seconds\n */\n public getTotalTimeSeconds(): number {\n return this._totalTime / 1000;\n }\n\n /** Gets idle time in seconds\n */\n public getIdleTimeSeconds(): number {\n return this._idleTime / 1000;\n }\n\n private _idleTimeCounter = (args: UiIntervalEventArgs): void => {\n // istanbul ignore next\n const idleTimeout = args.idleTimeout ?? this._idleTimeout;\n // istanbul ignore else\n if (\n this._lastActiveTimestamp > 0 &&\n this._idleStartTimestamp === 0 &&\n Date.now() - this._lastActiveTimestamp >= idleTimeout\n ) {\n this._idleStartTimestamp = Date.now();\n this._idleCount++;\n }\n };\n\n private _trackActivity = (_args: UiActivityEventArgs): void => {\n this._lastActiveTimestamp = Date.now();\n\n if (this._idleStartTimestamp > 0) {\n const lastIdleTime = this._lastActiveTimestamp - this._idleStartTimestamp;\n this._totalIdleTime += lastIdleTime;\n this._idleStartTimestamp = 0;\n }\n };\n}\n"]}
1
+ {"version":3,"file":"TimeTracker.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/TimeTracker.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAMH,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF;;GAEG;AACH,MAAM,OAAO,WAAW;IAAxB;QACU,0BAAqB,GAAW,CAAC,CAAC;QAClC,wBAAmB,GAAW,CAAC,CAAC;QAChC,yBAAoB,GAAW,CAAC,CAAC;QACjC,mBAAc,GAAW,CAAC,CAAC;QAC3B,eAAU,GAAW,CAAC,CAAC;QACvB,iBAAY,GAAW,IAAI,CAAC;QAC5B,eAAU,GAAW,CAAC,CAAC;QACvB,cAAS,GAAW,CAAC,CAAC;QAsDtB,qBAAgB,GAAG,CAAC,IAAyB,EAAQ,EAAE;YAC7D,uBAAuB;YACvB,MAAM,WAAW,GAAG,IAAI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AAC;IAED;OACG;IACI,UAAU;QACf,6BAA6B,CAAC,iBAAiB,CAAC,cAAc,CAC5D,IAAI,CAAC,gBAAgB,CACtB,CAAC;QACF,6BAA6B,CAAC,iBAAiB,CAAC,cAAc,CAC5D,IAAI,CAAC,cAAc,CACpB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC;IAC7E,CAAC;IAED;OACG;IACI,wBAAwB;QAC7B,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACnD,CAAC;IAED;OACG;IACI,mBAAmB;QACxB,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAChC,CAAC;IAED;OACG;IACI,kBAAkB;QACvB,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC/B,CAAC;CAyBF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport type {\n UiActivityEventArgs,\n UiIntervalEventArgs,\n} from \"./InternalConfigurableUiManager\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\n\n/** Time Tracker utility class\n * @internal\n */\nexport class TimeTracker {\n private _firstActiveTimestamp: number = 0;\n private _idleStartTimestamp: number = 0;\n private _lastActiveTimestamp: number = 0;\n private _totalIdleTime: number = 0;\n private _idleCount: number = 0;\n private _idleTimeout: number = 5000;\n private _totalTime: number = 0;\n private _idleTime: number = 0;\n\n /** Starts time tracking\n */\n public startTiming(): void {\n this._totalIdleTime = 0;\n this._idleStartTimestamp = 0;\n this._idleCount = 0;\n this._totalTime = 0;\n this._idleTime = 0;\n\n this._firstActiveTimestamp = Date.now();\n this._lastActiveTimestamp = this._firstActiveTimestamp;\n\n InternalConfigurableUiManager.onUiIntervalEvent.addListener(\n this._idleTimeCounter\n );\n InternalConfigurableUiManager.onUiActivityEvent.addListener(\n this._trackActivity\n );\n }\n\n /** Stops time tracking\n */\n public stopTiming(): void {\n InternalConfigurableUiManager.onUiIntervalEvent.removeListener(\n this._idleTimeCounter\n );\n InternalConfigurableUiManager.onUiActivityEvent.removeListener(\n this._trackActivity\n );\n\n this._totalTime = Date.now() - this._firstActiveTimestamp;\n this._idleTime = this._totalIdleTime + this._idleCount * this._idleTimeout;\n }\n\n /** Gets engagement time in seconds\n */\n public getEngagementTimeSeconds(): number {\n return (this._totalTime - this._idleTime) / 1000;\n }\n\n /** Gets total time in seconds\n */\n public getTotalTimeSeconds(): number {\n return this._totalTime / 1000;\n }\n\n /** Gets idle time in seconds\n */\n public getIdleTimeSeconds(): number {\n return this._idleTime / 1000;\n }\n\n private _idleTimeCounter = (args: UiIntervalEventArgs): void => {\n // istanbul ignore next\n const idleTimeout = args.idleTimeout ?? this._idleTimeout;\n // istanbul ignore else\n if (\n this._lastActiveTimestamp > 0 &&\n this._idleStartTimestamp === 0 &&\n Date.now() - this._lastActiveTimestamp >= idleTimeout\n ) {\n this._idleStartTimestamp = Date.now();\n this._idleCount++;\n }\n };\n\n private _trackActivity = (_args: UiActivityEventArgs): void => {\n this._lastActiveTimestamp = Date.now();\n\n if (this._idleStartTimestamp > 0) {\n const lastIdleTime = this._lastActiveTimestamp - this._idleStartTimestamp;\n this._totalIdleTime += lastIdleTime;\n this._idleStartTimestamp = 0;\n }\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAC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AE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAIpE,iFAAiF;IAC1E,eAAe,IAAI,KAAK,CAAC,SAAS,EAAE;IAkB3C,kGAAkG;IAC3F,qBAAqB,CAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,GACpB,cAAc,GAAG,SAAS;IAa7B,uFAAuF;IAChF,mBAAmB;IAI1B,4EAA4E;IACrE,kBAAkB,IAAI,cAAc,EAAE;IAe7C,6CAA6C;IACtC,uBAAuB,IAAI,IAAI;IAItC,uCAAuC;IAChC,iBAAiB,IAAI,IAAI;IAEhC,0CAA0C;IACnC,oBAAoB,IAAI,IAAI;IAInC;;OAEG;IACI,MAAM,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,iBAAiB;IA4BnE;;OAEG;IACI,YAAY,IAAI,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC;CAczD"}
@@ -144,9 +144,9 @@ class ContentGroup {
144
144
  const classId = InternalConfigurableUiManager.getConstructorClassId(content.classId);
145
145
  if (classId !== undefined)
146
146
  content.classId = classId;
147
- // eslint-disable-next-line deprecation/deprecation
148
147
  else
149
- throw new UiError(UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);
148
+ throw new UiError(// eslint-disable-line deprecation/deprecation
149
+ UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);
150
150
  if (contentCallback)
151
151
  contentCallback(content);
152
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,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SAAS,GAAG,IAAI,KAAK,EAA8B,CAAC;QAE1D,eAAe,CAAC,OAAO,CAAC,CAAC,OAAuB,EAAE,EAAE;YAClD,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AAvMc,iBAAI,GAAG,CAAC,AAAJ,CAAK;SADb,YAAY","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport type { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the Content View */\n applicationData?: any;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `FrontstageConfig`. */\n public abstract contentGroup(config: FrontstageConfig): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the React nodes representing the Content Views in this Content Group. */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n }\n }\n );\n\n return contentNodes;\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Gets an array of the content controls representing the Content Views. */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentControls.push(control);\n }\n }\n );\n\n return contentControls;\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach(\n (content: ContentProps, index: number) => {\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n content.classId\n );\n if (classId !== undefined) content.classId = classId;\n // eslint-disable-next-line deprecation/deprecation\n else\n throw new UiError(\n UiFramework.loggerCategory(this),\n `toJSON: ContentControl at index ${index} is NOT registered with a string id`\n );\n\n if (contentCallback) contentCallback(content);\n }\n }\n );\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control: ContentControl) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n}\n"]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IAAI,OAAO,CAAE,8CAA8C;oBAC/D,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAChC,mCAAmC,KAAK,qCAAqC,CAC9E,CAAC;gBAEJ,IAAI,eAAe;oBAAE,eAAe,CAAC,OAAO,CAAC,CAAC;aAC/C;QACH,CAAC,CACF,CAAC;QAEF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,YAAY;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,KAAK,EAA8B,CAAC;QAE1D,eAAe,CAAC,OAAO,CAAC,CAAC,OAAuB,EAAE,EAAE;YAClD,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AAtMc,iBAAI,GAAG,CAAC,AAAJ,CAAK;SADb,YAAY","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { ConfigurableUiControlConstructor } from \"../configurableui/ConfigurableUiControl\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentControl } from \"./ContentControl\";\nimport type { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\nimport { InternalConfigurableUiManager } from \"../configurableui/InternalConfigurableUiManager\";\n\n/** Properties for content displayed in a content view\n * @public\n */\nexport interface ContentProps {\n /** A unique id for the Content View within the group */\n id: string;\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\n classId: string | ConfigurableUiControlConstructor;\n /** Optional application data passed down to the Content View */\n applicationData?: any;\n}\n\n/** Properties for a [[ContentGroup]]\n * @public\n */\nexport interface ContentGroupProps {\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\n id: string;\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\n layout: ContentLayoutProps;\n /** A collection of [[ContentProps]], one for each content view */\n contents: ContentProps[];\n}\n\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\n * content group just prior to activating the frontstage.\n * @public\n */\nexport abstract class ContentGroupProvider {\n /** Return the contentGroup based on the `FrontstageConfig`. */\n public abstract contentGroup(config: FrontstageConfig): Promise<ContentGroup>;\n\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\n * be to remove applicationData entries.\n */\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\n * Typically this may be to add applicationData to content entries.\n */\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\n return contentGroupProps;\n }\n\n /** Allow provider to save any content group data before the stage deactivated. */\n public async onFrontstageDeactivated() {}\n}\n\n/** Callback to process content properties during toJSON method\n * @public\n */\nexport type ContentCallback = (content: ContentProps) => void;\n\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\n * @public\n */\nexport class ContentGroup {\n private static _sId = 0;\n public groupId: string;\n public propsId: string;\n public layout: ContentLayoutProps;\n public contentPropsList: ContentProps[];\n private _contentControls = new Map<string, ContentControl>();\n private _contentSetMap = new Map<string, ContentControl>();\n\n public get id() {\n return this.groupId;\n }\n\n constructor(contentGroupProps: ContentGroupProps) {\n this.layout = { ...contentGroupProps.layout };\n this.propsId = contentGroupProps.id;\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\n this.contentPropsList = contentGroupProps.contents;\n }\n\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\n public getContentControl(\n contentProps: ContentProps,\n _index: number\n ): ContentControl | undefined {\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\n const id = `${contentProps.id}::${this.groupId}`;\n let contentControl: ContentControl | undefined;\n\n if (!this._contentControls.get(contentProps.id)) {\n let usedClassId: string = \"\";\n\n if (typeof contentProps.classId === \"string\") {\n if (\n !this._contentControls.get(contentProps.id) &&\n UiFramework.controls.isRegistered(contentProps.classId)\n ) {\n contentControl = UiFramework.controls.create(\n contentProps.classId,\n id,\n contentProps.applicationData,\n contentProps.id\n ) as ContentControl;\n usedClassId = contentProps.classId;\n }\n } else {\n const info = new ConfigurableCreateInfo(\n contentProps.classId.name,\n id,\n contentProps.id\n );\n contentControl = new contentProps.classId(\n info,\n contentProps.applicationData\n ) as ContentControl;\n usedClassId = contentProps.classId.name;\n }\n\n if (contentControl) {\n if (\n contentControl.getType() !== ConfigurableUiControlType.Content &&\n contentControl.getType() !== ConfigurableUiControlType.Viewport\n ) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`\n );\n }\n contentControl.initialize();\n this._contentControls.set(contentProps.id, contentControl);\n }\n }\n\n return this._contentControls.get(contentProps.id);\n }\n\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\n public getContentControlById(id: string): ContentControl | undefined {\n return this._contentControls.get(id);\n }\n\n /** Gets the React nodes representing the Content Views in this Content Group. */\n public getContentNodes(): React.ReactNode[] {\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\n\n this._contentSetMap.clear();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentNodes.push(control.reactNode);\n this._contentSetMap.set(control.controlId, control);\n }\n }\n );\n\n return contentNodes;\n }\n\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\n public getControlFromElement(\n node: React.ReactNode\n ): ContentControl | undefined {\n if (this._contentSetMap.size === 0) this.getContentNodes();\n\n if (node && (node as React.ReactElement<any>).key) {\n const key = (node as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n const controlId = key.split(\"::\", 1)[0];\n return this._contentSetMap.get(controlId);\n }\n\n return undefined;\n }\n\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\n public refreshContentNodes() {\n this._contentSetMap.clear();\n }\n\n /** Gets an array of the content controls representing the Content Views. */\n public getContentControls(): ContentControl[] {\n const contentControls: ContentControl[] = new Array<ContentControl>();\n\n this.contentPropsList.forEach(\n (contentProps: ContentProps, index: number) => {\n const control = this.getContentControl(contentProps, index);\n if (control) {\n contentControls.push(control);\n }\n }\n );\n\n return contentControls;\n }\n\n /** Called when Frontstage is deactivated. */\n public onFrontstageDeactivated(): void {\n this.clearContentControls();\n }\n\n /** Called when Frontstage is ready. */\n public onFrontstageReady(): void {}\n\n /** Clears the map of content controls. */\n public clearContentControls(): void {\n this._contentControls.clear();\n }\n\n /** Creates [[ContentGroupProps]] for JSON purposes\n * @public\n */\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\n const contentGroupProps: ContentGroupProps = {\n id: this.propsId,\n layout: this.layout,\n contents: this.contentPropsList,\n };\n\n contentGroupProps.contents.forEach(\n (content: ContentProps, index: number) => {\n if (typeof content.classId !== \"string\") {\n const classId = InternalConfigurableUiManager.getConstructorClassId(\n content.classId\n );\n if (classId !== undefined) content.classId = classId;\n 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 (contentCallback) contentCallback(content);\n }\n }\n );\n\n return contentGroupProps;\n }\n\n /** Gets Viewports from Viewport Content Controls\n * @internal\n */\n public getViewports(): Array<ScreenViewport | undefined> {\n const contentControls = this.getContentControls();\n const viewports = new Array<ScreenViewport | undefined>();\n\n contentControls.forEach((control: ContentControl) => {\n if (control.isViewport && control.viewport) {\n viewports.push(control.viewport);\n } else {\n viewports.push(undefined);\n }\n });\n\n return viewports;\n }\n}\n"]}
@@ -31,18 +31,14 @@ export function ContentWrapper(props) {
31
31
  return controlId;
32
32
  };
33
33
  // istanbul ignore next
34
- const [hasMultipleContents, setHasMultipleContents] = React.useState(() => {
35
- var _a, _b, _c;
36
- return (activeFrontstageDef &&
37
- !!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
38
- ((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1;
39
- });
34
+ const [hasMultipleContents, setHasMultipleContents] = React.useState(() => (activeFrontstageDef &&
35
+ !!activeFrontstageDef.floatingContentControls?.length) ||
36
+ (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1);
40
37
  React.useEffect(() => {
41
38
  setIsActive(content === UiFramework.content.getActive());
42
39
  }, [content]);
43
40
  React.useEffect(() => {
44
41
  const handleActiveContentChanged = (args) => {
45
- var _a, _b, _c;
46
42
  const contentIsIdentical = content === args.activeContent;
47
43
  if (contentIsIdentical)
48
44
  setIsActive(contentIsIdentical);
@@ -53,8 +49,9 @@ export function ContentWrapper(props) {
53
49
  }
54
50
  // istanbul ignore next
55
51
  setHasMultipleContents((activeFrontstageDef &&
56
- !!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
57
- ((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1);
52
+ !!activeFrontstageDef.floatingContentControls?.length) ||
53
+ (activeFrontstageDef?.contentGroup?.getContentControls().length ??
54
+ 0) > 1);
58
55
  };
59
56
  return UiFramework.content.onActiveContentChangedEvent.addListener(handleActiveContentChanged);
60
57
  }, [activeFrontstageDef, content]);
@@ -64,11 +61,11 @@ export function ContentWrapper(props) {
64
61
  }, [content]);
65
62
  React.useEffect(() => {
66
63
  const onAvailableContentChanged = () => {
67
- var _a, _b, _c;
68
64
  // istanbul ignore next
69
65
  setHasMultipleContents((activeFrontstageDef &&
70
- !!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
71
- ((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1);
66
+ !!activeFrontstageDef.floatingContentControls?.length) ||
67
+ (activeFrontstageDef?.contentGroup?.getContentControls().length ??
68
+ 0) > 1);
72
69
  };
73
70
  return UiFramework.content.onAvailableContentChangedEvent.addListener(onAvailableContentChanged);
74
71
  }, [activeFrontstageDef]);