@itwin/appui-react 5.3.0 → 5.4.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 (232) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/lib/appui-react/UiFramework.d.ts +6 -2
  3. package/lib/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/appui-react/UiFramework.js +29 -2
  5. package/lib/appui-react/UiFramework.js.map +1 -1
  6. package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  7. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js +4 -4
  8. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  9. package/lib/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
  10. package/lib/appui-react/accudraw/AccuDrawPopupManager.js +10 -6
  11. package/lib/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
  12. package/lib/appui-react/accudraw/Calculator.js +2 -2
  13. package/lib/appui-react/accudraw/Calculator.js.map +1 -1
  14. package/lib/appui-react/childwindow/ChildWindowRenderer.d.ts +2 -0
  15. package/lib/appui-react/childwindow/ChildWindowRenderer.d.ts.map +1 -1
  16. package/lib/appui-react/childwindow/ChildWindowRenderer.js +15 -10
  17. package/lib/appui-react/childwindow/ChildWindowRenderer.js.map +1 -1
  18. package/lib/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  19. package/lib/appui-react/childwindow/InternalChildWindowManager.js +8 -0
  20. package/lib/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  21. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts +23 -1
  22. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  23. package/lib/appui-react/configurableui/ConfigurableUiContent.js +20 -12
  24. package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  25. package/lib/appui-react/content/ContentLayout.d.ts.map +1 -1
  26. package/lib/appui-react/content/ContentLayout.js +10 -11
  27. package/lib/appui-react/content/ContentLayout.js.map +1 -1
  28. package/lib/appui-react/content/ContentOverlay.d.ts +1 -0
  29. package/lib/appui-react/content/ContentOverlay.d.ts.map +1 -1
  30. package/lib/appui-react/content/ContentOverlay.js +3 -1
  31. package/lib/appui-react/content/ContentOverlay.js.map +1 -1
  32. package/lib/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  33. package/lib/appui-react/content/FloatingViewportContent.js +1 -1
  34. package/lib/appui-react/content/FloatingViewportContent.js.map +1 -1
  35. package/lib/appui-react/cursor/CursorInformation.d.ts +4 -1
  36. package/lib/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  37. package/lib/appui-react/cursor/CursorInformation.js +6 -1
  38. package/lib/appui-react/cursor/CursorInformation.js.map +1 -1
  39. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts +1 -24
  40. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  41. package/lib/appui-react/cursor/cursormenu/CursorMenu.js +37 -58
  42. package/lib/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  43. package/lib/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  44. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +8 -22
  45. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  46. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js +109 -116
  47. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  48. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +12 -15
  49. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  50. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +85 -48
  51. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  52. package/lib/appui-react/framework/FrameworkFrontstages.d.ts +47 -0
  53. package/lib/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  54. package/lib/appui-react/framework/FrameworkFrontstages.js +136 -0
  55. package/lib/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  56. package/lib/appui-react/framework/FrameworkVisibility.d.ts +2 -0
  57. package/lib/appui-react/framework/FrameworkVisibility.d.ts.map +1 -1
  58. package/lib/appui-react/framework/FrameworkVisibility.js.map +1 -1
  59. package/lib/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  60. package/lib/appui-react/frontstage/InternalFrontstageManager.js +121 -115
  61. package/lib/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  62. package/lib/appui-react/hooks/useActiveTool.d.ts +9 -0
  63. package/lib/appui-react/hooks/useActiveTool.d.ts.map +1 -0
  64. package/lib/appui-react/hooks/useActiveTool.js +23 -0
  65. package/lib/appui-react/hooks/useActiveTool.js.map +1 -0
  66. package/lib/appui-react/icons/SvgAngle.d.ts +7 -0
  67. package/lib/appui-react/icons/SvgAngle.d.ts.map +1 -0
  68. package/lib/appui-react/icons/SvgAngle.js +15 -0
  69. package/lib/appui-react/icons/SvgAngle.js.map +1 -0
  70. package/lib/appui-react/icons/SvgBackspace.d.ts +7 -0
  71. package/lib/appui-react/icons/SvgBackspace.d.ts.map +1 -0
  72. package/lib/appui-react/icons/SvgBackspace.js +14 -0
  73. package/lib/appui-react/icons/SvgBackspace.js.map +1 -0
  74. package/lib/appui-react/icons/SvgDistance.d.ts +7 -0
  75. package/lib/appui-react/icons/SvgDistance.d.ts.map +1 -0
  76. package/lib/appui-react/icons/SvgDistance.js +16 -0
  77. package/lib/appui-react/icons/SvgDistance.js.map +1 -0
  78. package/lib/appui-react/icons/SvgHeight.d.ts +7 -0
  79. package/lib/appui-react/icons/SvgHeight.d.ts.map +1 -0
  80. package/lib/appui-react/icons/SvgHeight.js +17 -0
  81. package/lib/appui-react/icons/SvgHeight.js.map +1 -0
  82. package/lib/appui-react/icons/SvgMouseClickLeftDrag.d.ts +7 -0
  83. package/lib/appui-react/icons/SvgMouseClickLeftDrag.d.ts.map +1 -0
  84. package/lib/appui-react/icons/SvgMouseClickLeftDrag.js +15 -0
  85. package/lib/appui-react/icons/SvgMouseClickLeftDrag.js.map +1 -0
  86. package/lib/appui-react/icons/SvgMouseClickRightDrag.d.ts +7 -0
  87. package/lib/appui-react/icons/SvgMouseClickRightDrag.d.ts.map +1 -0
  88. package/lib/appui-react/icons/SvgMouseClickRightDrag.js +15 -0
  89. package/lib/appui-react/icons/SvgMouseClickRightDrag.js.map +1 -0
  90. package/lib/appui-react/icons/SvgMouseClickWheelDrag.d.ts +7 -0
  91. package/lib/appui-react/icons/SvgMouseClickWheelDrag.d.ts.map +1 -0
  92. package/lib/appui-react/icons/SvgMouseClickWheelDrag.js +15 -0
  93. package/lib/appui-react/icons/SvgMouseClickWheelDrag.js.map +1 -0
  94. package/lib/appui-react/icons/SvgTouchCursorPan.d.ts +7 -0
  95. package/lib/appui-react/icons/SvgTouchCursorPan.d.ts.map +1 -0
  96. package/lib/appui-react/icons/SvgTouchCursorPan.js +15 -0
  97. package/lib/appui-react/icons/SvgTouchCursorPan.js.map +1 -0
  98. package/lib/appui-react/icons/SvgTouchCursorPoint.d.ts +7 -0
  99. package/lib/appui-react/icons/SvgTouchCursorPoint.d.ts.map +1 -0
  100. package/lib/appui-react/icons/SvgTouchCursorPoint.js +16 -0
  101. package/lib/appui-react/icons/SvgTouchCursorPoint.js.map +1 -0
  102. package/lib/appui-react/layout/StandardLayout.scss +3 -8
  103. package/lib/appui-react/layout/base/DragManager.d.ts.map +1 -1
  104. package/lib/appui-react/layout/base/DragManager.js +10 -15
  105. package/lib/appui-react/layout/base/DragManager.js.map +1 -1
  106. package/lib/appui-react/layout/state/NineZoneAction.d.ts +1 -0
  107. package/lib/appui-react/layout/state/NineZoneAction.d.ts.map +1 -1
  108. package/lib/appui-react/layout/state/NineZoneAction.js.map +1 -1
  109. package/lib/appui-react/layout/state/NineZoneStateReducer.d.ts.map +1 -1
  110. package/lib/appui-react/layout/state/NineZoneStateReducer.js +23 -16
  111. package/lib/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
  112. package/lib/appui-react/layout/widget/NavigationArea.d.ts +1 -2
  113. package/lib/appui-react/layout/widget/NavigationArea.d.ts.map +1 -1
  114. package/lib/appui-react/layout/widget/NavigationArea.js +2 -3
  115. package/lib/appui-react/layout/widget/NavigationArea.js.map +1 -1
  116. package/lib/appui-react/layout/widget/NavigationArea.scss +16 -4
  117. package/lib/appui-react/layout/widget/ToolsArea.d.ts +1 -2
  118. package/lib/appui-react/layout/widget/ToolsArea.d.ts.map +1 -1
  119. package/lib/appui-react/layout/widget/ToolsArea.js +2 -3
  120. package/lib/appui-react/layout/widget/ToolsArea.js.map +1 -1
  121. package/lib/appui-react/layout/widget/ToolsArea.scss +10 -4
  122. package/lib/appui-react/shared/MenuItem.d.ts +3 -0
  123. package/lib/appui-react/shared/MenuItem.d.ts.map +1 -1
  124. package/lib/appui-react/shared/MenuItem.js +2 -3
  125. package/lib/appui-react/shared/MenuItem.js.map +1 -1
  126. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +2 -55
  127. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  128. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +333 -403
  129. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  130. package/lib/appui-react/toolbar/Toolbar.d.ts.map +1 -1
  131. package/lib/appui-react/toolbar/Toolbar.js +4 -3
  132. package/lib/appui-react/toolbar/Toolbar.js.map +1 -1
  133. package/lib/appui-react/toolbar/new-toolbars/ActionItem.d.ts.map +1 -1
  134. package/lib/appui-react/toolbar/new-toolbars/ActionItem.js +3 -0
  135. package/lib/appui-react/toolbar/new-toolbars/ActionItem.js.map +1 -1
  136. package/lib/appui-react/toolbar/new-toolbars/GroupItem.d.ts.map +1 -1
  137. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js +2 -0
  138. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js.map +1 -1
  139. package/lib/appui-react/toolbar/new-toolbars/Toolbar.d.ts +6 -3
  140. package/lib/appui-react/toolbar/new-toolbars/Toolbar.d.ts.map +1 -1
  141. package/lib/appui-react/toolbar/new-toolbars/Toolbar.js +4 -3
  142. package/lib/appui-react/toolbar/new-toolbars/Toolbar.js.map +1 -1
  143. package/lib/appui-react/utils/InternalUiShowHideManager.d.ts +2 -0
  144. package/lib/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  145. package/lib/appui-react/utils/InternalUiShowHideManager.js +6 -0
  146. package/lib/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  147. package/lib/appui-react/widget-panels/Frontstage.d.ts +7 -2
  148. package/lib/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  149. package/lib/appui-react/widget-panels/Frontstage.js +29 -12
  150. package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
  151. package/lib/appui-react/widgets/BackstageAppButton.scss +8 -3
  152. package/lib/appui-react.d.ts +1 -1
  153. package/lib/appui-react.d.ts.map +1 -1
  154. package/lib/appui-react.js +1 -1
  155. package/lib/appui-react.js.map +1 -1
  156. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  157. package/lib/cjs/appui-react/layout/StandardLayout.scss +3 -8
  158. package/lib/cjs/appui-react/layout/widget/NavigationArea.scss +16 -4
  159. package/lib/cjs/appui-react/layout/widget/ToolsArea.scss +10 -4
  160. package/lib/cjs/appui-react/widgets/BackstageAppButton.scss +8 -3
  161. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.scss +3 -0
  162. package/lib/esm/appui-react/layout/StandardLayout.scss +3 -8
  163. package/lib/esm/appui-react/layout/widget/NavigationArea.scss +16 -4
  164. package/lib/esm/appui-react/layout/widget/ToolsArea.scss +10 -4
  165. package/lib/esm/appui-react/widgets/BackstageAppButton.scss +8 -3
  166. package/package.json +8 -10
  167. package/lib/appui-react/accudraw/angle.svg +0 -1
  168. package/lib/appui-react/accudraw/backspace.svg +0 -9
  169. package/lib/appui-react/accudraw/constraint-2d.svg +0 -11
  170. package/lib/appui-react/accudraw/distance.svg +0 -1
  171. package/lib/appui-react/accudraw/height-2.svg +0 -10
  172. package/lib/appui-react/accudraw/height.svg +0 -11
  173. package/lib/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  174. package/lib/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  175. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  176. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  177. package/lib/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  178. package/lib/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  179. package/lib/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  180. package/lib/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  181. package/lib/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  182. package/lib/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  183. package/lib/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  184. package/lib/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  185. package/lib/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  186. package/lib/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  187. package/lib/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  188. package/lib/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
  189. package/lib/cjs/appui-react/accudraw/angle.svg +0 -1
  190. package/lib/cjs/appui-react/accudraw/backspace.svg +0 -9
  191. package/lib/cjs/appui-react/accudraw/constraint-2d.svg +0 -11
  192. package/lib/cjs/appui-react/accudraw/distance.svg +0 -1
  193. package/lib/cjs/appui-react/accudraw/height-2.svg +0 -10
  194. package/lib/cjs/appui-react/accudraw/height.svg +0 -11
  195. package/lib/cjs/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  196. package/lib/cjs/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  197. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  198. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  199. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  200. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  201. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  202. package/lib/cjs/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  203. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  204. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  205. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  206. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  207. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  208. package/lib/cjs/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  209. package/lib/cjs/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  210. package/lib/cjs/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
  211. package/lib/esm/appui-react/accudraw/angle.svg +0 -1
  212. package/lib/esm/appui-react/accudraw/backspace.svg +0 -9
  213. package/lib/esm/appui-react/accudraw/constraint-2d.svg +0 -11
  214. package/lib/esm/appui-react/accudraw/distance.svg +0 -1
  215. package/lib/esm/appui-react/accudraw/height-2.svg +0 -10
  216. package/lib/esm/appui-react/accudraw/height.svg +0 -11
  217. package/lib/esm/appui-react/statusfields/toolassistance/accept-point.svg +0 -1
  218. package/lib/esm/appui-react/statusfields/toolassistance/cursor-click.svg +0 -1
  219. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-drag.svg +0 -1
  220. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-tap-double.svg +0 -1
  221. package/lib/esm/appui-react/statusfields/toolassistance/gesture-one-finger-tap.svg +0 -1
  222. package/lib/esm/appui-react/statusfields/toolassistance/gesture-pinch.svg +0 -1
  223. package/lib/esm/appui-react/statusfields/toolassistance/gesture-two-finger-drag.svg +0 -1
  224. package/lib/esm/appui-react/statusfields/toolassistance/gesture-two-finger-tap.svg +0 -1
  225. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-left-drag.svg +0 -1
  226. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-left.svg +0 -1
  227. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-right-drag.svg +0 -1
  228. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-right.svg +0 -1
  229. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-wheel-drag.svg +0 -1
  230. package/lib/esm/appui-react/statusfields/toolassistance/mouse-click-wheel.svg +0 -1
  231. package/lib/esm/appui-react/statusfields/toolassistance/touch-cursor-pan.svg +0 -1
  232. package/lib/esm/appui-react/statusfields/toolassistance/touch-cursor-point.svg +0 -1
@@ -4,10 +4,13 @@
4
4
  import "./ConfigurableUiContent.scss";
5
5
  import * as React from "react";
6
6
  import type { CommonProps } from "@itwin/core-react";
7
+ import type { StagePanelSection } from "../stagepanels/StagePanelSection.js";
8
+ import type { StagePanelLocation } from "../stagepanels/StagePanelLocation.js";
7
9
  /** @internal */
8
10
  export declare const ConfigurableUiContext: React.Context<ConfigurableUiContentProps & {
9
11
  contentElementRef?: React.RefObject<HTMLElement>;
10
- widgetActions?: React.ReactNode;
12
+ widgetActions?: StandardLayoutProps["widgetActions"];
13
+ toolSettings?: StandardLayoutProps["toolSettings"];
11
14
  }>;
12
15
  /** Properties for [[ConfigurableUiContent]]
13
16
  * @public
@@ -49,11 +52,30 @@ export declare const WrapperContext: React.Context<HTMLElement>;
49
52
  * @public
50
53
  */
51
54
  export declare function ConfigurableUiContent(props: ConfigurableUiContentProps): React.JSX.Element;
55
+ interface ToolSettingsLocation {
56
+ section: StagePanelSection;
57
+ location: StagePanelLocation;
58
+ }
52
59
  interface StandardLayoutProps {
53
60
  /** Overrides widget specific actions displayed in the title bar area.
54
61
  * Use {@link WidgetActions} component to customize widget actions.
62
+ * @alpha
55
63
  */
56
64
  widgetActions?: React.ReactNode;
65
+ /** When enabled keeps the tool settings visible to the end user.
66
+ * This is especially useful when the tool settings is undocked as a regular widget.
67
+ * @alpha
68
+ */
69
+ visibleToolSettings?: boolean;
70
+ /** Tool settings related configuration.
71
+ * @alpha
72
+ */
73
+ toolSettings?: {
74
+ /** The default location of the tool settings. Only used when initializing the layout and ignored when restoring a saved layout.
75
+ * @alpha
76
+ */
77
+ defaultLocation?: ToolSettingsLocation;
78
+ };
57
79
  }
58
80
  /** The standard widget based layout used as a default layout for all frontstages.
59
81
  * @alpha
@@ -1 +1 @@
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;AA+BrD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB;wBAGV,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;oBAChC,KAAK,CAAC,SAAS;EAE9B,CAAC;AAEN;;;GAGG;AAEH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oHAAoH;IACpH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4GAA4G;IAC5G,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8HAA8H;IAC9H,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6GAA6G;IAC7G,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sIAAsI;IACtI,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sHAAsH;IACtH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAElC,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,4BAAkD,CAAC;AAE9E;;GAEG;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAWtE;AAED,UAAU,mBAAmB;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBA8FxD"}
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;AA2BrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,gBAAgB;AAChB,eAAO,MAAM,qBAAqB;wBAGV,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;oBAChC,mBAAmB,CAAC,eAAe,CAAC;mBACrC,mBAAmB,CAAC,cAAc,CAAC;EAEjD,CAAC;AAEN;;;GAGG;AAEH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oHAAoH;IACpH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4GAA4G;IAC5G,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8HAA8H;IAC9H,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6GAA6G;IAC7G,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sIAAsI;IACtI,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sHAAsH;IACtH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAElC,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,4BAAkD,CAAC;AAE9E;;GAEG;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAWtE;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,UAAU,mBAAmB;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,eAAe,CAAC,EAAE,oBAAoB,CAAC;KACxC,CAAC;CACH;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAsFxD"}
@@ -9,7 +9,7 @@ import "./ConfigurableUiContent.scss";
9
9
  import * as React from "react";
10
10
  import { Point } from "@itwin/core-react/internal";
11
11
  import { ThemeProvider } from "@itwin/itwinui-react";
12
- import { CursorInformation, useCursorInformationStore, } from "../cursor/CursorInformation.js";
12
+ import { CursorInformation } from "../cursor/CursorInformation.js";
13
13
  import { CursorPopupMenu } from "../cursor/cursormenu/CursorMenu.js";
14
14
  import { CursorPopupRenderer } from "../cursor/cursorpopup/CursorPopupManager.js";
15
15
  import { ModalDialogRenderer } from "../dialog/ModalDialogManager.js";
@@ -52,7 +52,7 @@ export function ConfigurableUiContent(props) {
52
52
  * @alpha
53
53
  */
54
54
  export function StandardLayout(props) {
55
- const { widgetActions } = props;
55
+ const { widgetActions, visibleToolSettings = false, toolSettings } = props;
56
56
  const context = React.useContext(ConfigurableUiContext);
57
57
  const { appBackstage, widgetOpacity, toolbarOpacity, idleTimeout, intervalTimeout, } = context;
58
58
  const contentElementRef = React.useRef(null);
@@ -72,33 +72,28 @@ export function StandardLayout(props) {
72
72
  InternalConfigurableUiManager.activityTracker.terminate();
73
73
  };
74
74
  }, [idleTimeout, intervalTimeout]);
75
- const setContentHovered = useCursorInformationStore((state) => state.setContentHovered);
75
+ useVisibleToolSettings(visibleToolSettings);
76
76
  return (React.createElement(ConfigurableUiContext.Provider, { value: React.useMemo(() => ({
77
77
  ...context,
78
78
  contentElementRef,
79
79
  widgetActions,
80
- }), [context, widgetActions]) },
80
+ toolSettings,
81
+ }), [context, widgetActions, toolSettings]) },
81
82
  React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: context.className, style: context.style, onMouseMove: (e) => {
82
83
  const point = new Point(e.pageX, e.pageY);
83
- CursorInformation.handleMouseMove(point);
84
- if (!(e.target instanceof Node))
85
- return;
86
- const contentHovered = contentElementRef.current?.contains(e.target);
87
- setContentHovered(contentHovered ?? false);
88
- }, onMouseLeave: () => {
89
- setContentHovered(false);
84
+ CursorInformation.handleMouseMove(point, e.view.document);
90
85
  }, ref: (el) => setMainElement(el ?? undefined) },
91
86
  React.createElement(WrapperContext.Provider, { value: mainElement ?? document.body },
92
87
  React.createElement(ThemeProvider, { style: { height: "100%" }, portalContainer: portalContainer },
93
88
  appBackstage,
94
89
  React.createElement(WidgetPanelsFrontstage, null),
95
- React.createElement(ElementTooltip, null),
96
90
  React.createElement(PointerMessage, null),
97
91
  React.createElement(KeyboardShortcutMenu, null),
98
92
  React.createElement(InputFieldMessage, null),
99
93
  React.createElement(CursorPopupMenu, null),
100
94
  React.createElement(CursorPopupRenderer, null),
101
95
  React.createElement(PopupRenderer, null),
96
+ React.createElement(ElementTooltip, null),
102
97
  React.createElement(MessageRenderer, null),
103
98
  React.createElement(ChildWindowRenderer, { windowManager: appUi.windowManager }),
104
99
  React.createElement("div", { className: "uifw-configurableui-portalContainer", ref: (instance) => setPortalContainer(instance ?? undefined) },
@@ -142,4 +137,17 @@ toolbarOpacity) {
142
137
  };
143
138
  }, [opacity]);
144
139
  }
140
+ function useVisibleToolSettings(enabled) {
141
+ React.useEffect(() => {
142
+ if (!enabled)
143
+ return;
144
+ return UiFramework.frontstages.onToolSettingsReloadEvent.addListener(() => {
145
+ const frontstage = UiFramework.frontstages.activeFrontstageDef;
146
+ const toolSettings = frontstage?.toolSettings;
147
+ if (!toolSettings)
148
+ return;
149
+ toolSettings.show();
150
+ });
151
+ }, [enabled]);
152
+ }
145
153
  //# 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,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,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QACF,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;QACzE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB;AACxB,+DAA+D;AAC/D,cAA4D;IAE5D,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3D,4DAA4D;QAC5D,OAAO,KAAK,EAAE,mBAAmB,CAAC,cAAc,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,cAAc,IAAI,mBAAmB,IAAI,uBAAuB,CAAC;IAEnE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,qBAAqB,GACzB,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;QAC5E,IAAI,qBAAqB,KAAK,OAAO,CAAC,QAAQ,EAAE;YAAE,OAAO;QACzD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACxC,wBAAwB,EACxB,OAAO,CAAC,QAAQ,EAAE,CACnB,CAAC;QACF,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QAC1E,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react/internal\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport {\n CursorInformation,\n useCursorInformationStore,\n} from \"../cursor/CursorInformation.js\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu.js\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager.js\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager.js\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager.js\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip.js\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu.js\";\nimport { InputFieldMessage } from \"../messages/InputField.js\";\nimport { PointerMessage } from \"../messages/Pointer.js\";\nimport { PopupRenderer } from \"../popup/PopupManager.js\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage.js\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager.js\";\nimport { appUi, UiFramework } from \"../UiFramework.js\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager.js\";\nimport { MessageRenderer } from \"../messages/MessageRenderer.js\";\nimport {\n TOOLBAR_OPACITY_DEFAULT,\n WIDGET_OPACITY_DEFAULT,\n} from \"../theme/ThemeId.js\";\nimport { useReduxFrameworkState } from \"../uistate/useReduxFrameworkState.js\";\nimport type { ContentProps } from \"../content/ContentGroup.js\";\nimport { ChildWindowRenderer } from \"../childwindow/ChildWindowRenderer.js\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef.js\";\nimport type { WidgetActions } from \"../layout/widget/WidgetActions.js\";\n\n/** @internal */\nexport const ConfigurableUiContext = React.createContext<\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n ConfigurableUiContentProps & {\n contentElementRef?: React.RefObject<HTMLElement>;\n widgetActions?: React.ReactNode;\n }\n>({});\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ConfigurableUiContent>`\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n /** Controls if the view overlay should be displayed. Uses redux store as a fallback. Defaults to `true`.\n * @note Only used by configurable control APIs. See {@link ContentProps.classId}.\n * @deprecated in 4.16.0. View overlay visibility should be controlled by the components used in {@link ContentProps.content}.\n */\n viewOverlay?: boolean;\n /** Describes the opacity of widgets. Uses redux store as a fallback. Defaults to {@link WIDGET_OPACITY_DEFAULT}. */\n widgetOpacity?: number;\n /** Controls if the widget icons should be displayed. Uses redux store as a fallback. Defaults to `true`. */\n widgetIcon?: boolean;\n /** Controls if the unpinned panels should be collapsed automatically. Uses redux store as a fallback. Defaults to `false`. */\n collapsePanels?: boolean;\n /** Controls if the tool settings should be animated. Uses redux store as a fallback. Defaults to `false`. */\n animateToolSettings?: boolean;\n /** Controls if the tool settings label should be set based on activated tool. Uses redux store as a fallback. Defaults to `false`. */\n toolAsToolSettingsLabel?: boolean;\n /** Describes the opacity of toolbars. Uses redux store as a fallback. Defaults to {@link TOOLBAR_OPACITY_DEFAULT}. */\n toolbarOpacity?: number;\n /** Component to wrap all popout widgets and other child windows opened via {@link UiFramework.childWindows}. */\n childWindow?: React.ComponentType;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/**\n * Allows children to get the bounds or other properties of the wrapper element.\n * @internal\n */\nexport const WrapperContext = React.createContext<HTMLElement>(document.body);\n\n/** The main component of `AppUI` that sets up the configurable UI.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const frontstageDef = useActiveFrontstageDef();\n const layout = frontstageDef?.initialConfig?.layout;\n return (\n <ConfigurableUiContext.Provider\n // eslint-disable-next-line react-hooks/exhaustive-deps\n value={React.useMemo(() => props, [...Object.values(props)])}\n >\n {layout ?? <StandardLayout />}\n </ConfigurableUiContext.Provider>\n );\n}\n\ninterface StandardLayoutProps {\n /** Overrides widget specific actions displayed in the title bar area.\n * Use {@link WidgetActions} component to customize widget actions.\n */\n widgetActions?: React.ReactNode;\n}\n\n/** The standard widget based layout used as a default layout for all frontstages.\n * @alpha\n */\nexport function StandardLayout(props: StandardLayoutProps) {\n const { widgetActions } = props;\n const context = React.useContext(ConfigurableUiContext);\n const {\n appBackstage,\n widgetOpacity,\n toolbarOpacity,\n idleTimeout,\n intervalTimeout,\n } = context;\n\n const contentElementRef = React.useRef<HTMLElement>(null);\n useWidgetOpacity(widgetOpacity);\n useToolbarOpacity(toolbarOpacity);\n const [mainElement, setMainElement] = React.useState<HTMLElement>();\n const [portalContainer, setPortalContainer] = React.useState<HTMLElement>();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout,\n intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [idleTimeout, intervalTimeout]);\n\n const setContentHovered = useCursorInformationStore(\n (state) => state.setContentHovered\n );\n return (\n <ConfigurableUiContext.Provider\n value={React.useMemo(\n () => ({\n ...context,\n contentElementRef,\n widgetActions,\n }),\n [context, widgetActions]\n )}\n >\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={context.className}\n style={context.style}\n onMouseMove={(e) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n\n if (!(e.target instanceof Node)) return;\n const contentHovered = contentElementRef.current?.contains(e.target);\n setContentHovered(contentHovered ?? false);\n }}\n onMouseLeave={() => {\n setContentHovered(false);\n }}\n ref={(el) => setMainElement(el ?? undefined)}\n >\n <WrapperContext.Provider value={mainElement ?? document.body}>\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {appBackstage}\n <WidgetPanelsFrontstage />\n\n <ElementTooltip />\n <PointerMessage />\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <KeyboardShortcutMenu />\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <MessageRenderer />\n <ChildWindowRenderer windowManager={appUi.windowManager} />\n <div\n className=\"uifw-configurableui-portalContainer\"\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n >\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n </div>\n </ThemeProvider>\n </WrapperContext.Provider>\n </main>\n </ConfigurableUiContext.Provider>\n );\n}\n\nfunction useWidgetOpacity(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n widgetOpacity: ConfigurableUiContentProps[\"widgetOpacity\"]\n) {\n const reduxWidgetOpacity = useReduxFrameworkState((state) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return state?.configurableUiState.widgetOpacity;\n });\n const opacity = widgetOpacity ?? reduxWidgetOpacity ?? WIDGET_OPACITY_DEFAULT;\n\n React.useEffect(() => {\n const currentWidgetOpacity =\n document.documentElement.style.getPropertyValue(\"--buic-widget-opacity\");\n if (currentWidgetOpacity === opacity.toString()) return;\n document.documentElement.style.setProperty(\n \"--buic-widget-opacity\",\n opacity.toString()\n );\n return () => {\n document.documentElement.style.removeProperty(\"--buic-widget-opacity\");\n };\n }, [opacity]);\n}\n\nfunction useToolbarOpacity(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n toolbarOpacity: ConfigurableUiContentProps[\"toolbarOpacity\"]\n) {\n const reduxToolbarOpacity = useReduxFrameworkState((state) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return state?.configurableUiState.toolbarOpacity;\n });\n\n const opacity =\n toolbarOpacity ?? reduxToolbarOpacity ?? TOOLBAR_OPACITY_DEFAULT;\n\n React.useEffect(() => {\n const currentToolbarOpacity =\n document.documentElement.style.getPropertyValue(\"--buic-toolbar-opacity\");\n if (currentToolbarOpacity === opacity.toString()) return;\n document.documentElement.style.setProperty(\n \"--buic-toolbar-opacity\",\n opacity.toString()\n );\n return () => {\n document.documentElement.style.removeProperty(\"--buic-toolbar-opacity\");\n };\n }, [opacity]);\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,4BAA4B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,M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S,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,OAAO,WAAW,CAAC,WAAW,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAAG,EAAE;YACxE,MAAM,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAC/D,MAAM,YAAY,GAAG,UAAU,EAAE,YAAY,CAAC;YAC9C,IAAI,CAAC,YAAY;gBAAE,OAAO;YAC1B,YAAY,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react/internal\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation.js\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu.js\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager.js\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager.js\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager.js\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip.js\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu.js\";\nimport { InputFieldMessage } from \"../messages/InputField.js\";\nimport { PointerMessage } from \"../messages/Pointer.js\";\nimport { PopupRenderer } from \"../popup/PopupManager.js\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage.js\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager.js\";\nimport { appUi, UiFramework } from \"../UiFramework.js\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager.js\";\nimport { MessageRenderer } from \"../messages/MessageRenderer.js\";\nimport {\n TOOLBAR_OPACITY_DEFAULT,\n WIDGET_OPACITY_DEFAULT,\n} from \"../theme/ThemeId.js\";\nimport { useReduxFrameworkState } from \"../uistate/useReduxFrameworkState.js\";\nimport type { ContentProps } from \"../content/ContentGroup.js\";\nimport { ChildWindowRenderer } from \"../childwindow/ChildWindowRenderer.js\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef.js\";\nimport type { WidgetActions } from \"../layout/widget/WidgetActions.js\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection.js\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation.js\";\n\n/** @internal */\nexport const ConfigurableUiContext = React.createContext<\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n ConfigurableUiContentProps & {\n contentElementRef?: React.RefObject<HTMLElement>;\n widgetActions?: StandardLayoutProps[\"widgetActions\"];\n toolSettings?: StandardLayoutProps[\"toolSettings\"];\n }\n>({});\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ConfigurableUiContent>`\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n /** Controls if the view overlay should be displayed. Uses redux store as a fallback. Defaults to `true`.\n * @note Only used by configurable control APIs. See {@link ContentProps.classId}.\n * @deprecated in 4.16.0. View overlay visibility should be controlled by the components used in {@link ContentProps.content}.\n */\n viewOverlay?: boolean;\n /** Describes the opacity of widgets. Uses redux store as a fallback. Defaults to {@link WIDGET_OPACITY_DEFAULT}. */\n widgetOpacity?: number;\n /** Controls if the widget icons should be displayed. Uses redux store as a fallback. Defaults to `true`. */\n widgetIcon?: boolean;\n /** Controls if the unpinned panels should be collapsed automatically. Uses redux store as a fallback. Defaults to `false`. */\n collapsePanels?: boolean;\n /** Controls if the tool settings should be animated. Uses redux store as a fallback. Defaults to `false`. */\n animateToolSettings?: boolean;\n /** Controls if the tool settings label should be set based on activated tool. Uses redux store as a fallback. Defaults to `false`. */\n toolAsToolSettingsLabel?: boolean;\n /** Describes the opacity of toolbars. Uses redux store as a fallback. Defaults to {@link TOOLBAR_OPACITY_DEFAULT}. */\n toolbarOpacity?: number;\n /** Component to wrap all popout widgets and other child windows opened via {@link UiFramework.childWindows}. */\n childWindow?: React.ComponentType;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/**\n * Allows children to get the bounds or other properties of the wrapper element.\n * @internal\n */\nexport const WrapperContext = React.createContext<HTMLElement>(document.body);\n\n/** The main component of `AppUI` that sets up the configurable UI.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const frontstageDef = useActiveFrontstageDef();\n const layout = frontstageDef?.initialConfig?.layout;\n return (\n <ConfigurableUiContext.Provider\n // eslint-disable-next-line react-hooks/exhaustive-deps\n value={React.useMemo(() => props, [...Object.values(props)])}\n >\n {layout ?? <StandardLayout />}\n </ConfigurableUiContext.Provider>\n );\n}\n\ninterface ToolSettingsLocation {\n section: StagePanelSection;\n location: StagePanelLocation;\n}\n\ninterface StandardLayoutProps {\n /** Overrides widget specific actions displayed in the title bar area.\n * Use {@link WidgetActions} component to customize widget actions.\n * @alpha\n */\n widgetActions?: React.ReactNode;\n /** When enabled keeps the tool settings visible to the end user.\n * This is especially useful when the tool settings is undocked as a regular widget.\n * @alpha\n */\n visibleToolSettings?: boolean;\n /** Tool settings related configuration.\n * @alpha\n */\n toolSettings?: {\n /** The default location of the tool settings. Only used when initializing the layout and ignored when restoring a saved layout.\n * @alpha\n */\n defaultLocation?: ToolSettingsLocation;\n };\n}\n\n/** The standard widget based layout used as a default layout for all frontstages.\n * @alpha\n */\nexport function StandardLayout(props: StandardLayoutProps) {\n const { widgetActions, visibleToolSettings = false, toolSettings } = props;\n const context = React.useContext(ConfigurableUiContext);\n const {\n appBackstage,\n widgetOpacity,\n toolbarOpacity,\n idleTimeout,\n intervalTimeout,\n } = context;\n\n const contentElementRef = React.useRef<HTMLElement>(null);\n useWidgetOpacity(widgetOpacity);\n useToolbarOpacity(toolbarOpacity);\n const [mainElement, setMainElement] = React.useState<HTMLElement>();\n const [portalContainer, setPortalContainer] = React.useState<HTMLElement>();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout,\n intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [idleTimeout, intervalTimeout]);\n useVisibleToolSettings(visibleToolSettings);\n\n return (\n <ConfigurableUiContext.Provider\n value={React.useMemo(\n () => ({\n ...context,\n contentElementRef,\n widgetActions,\n toolSettings,\n }),\n [context, widgetActions, toolSettings]\n )}\n >\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={context.className}\n style={context.style}\n onMouseMove={(e) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point, e.view.document);\n }}\n ref={(el) => setMainElement(el ?? undefined)}\n >\n <WrapperContext.Provider value={mainElement ?? document.body}>\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {appBackstage}\n <WidgetPanelsFrontstage />\n\n <PointerMessage />\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <KeyboardShortcutMenu />\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <ElementTooltip />\n <MessageRenderer />\n <ChildWindowRenderer windowManager={appUi.windowManager} />\n <div\n className=\"uifw-configurableui-portalContainer\"\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n >\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n </div>\n </ThemeProvider>\n </WrapperContext.Provider>\n </main>\n </ConfigurableUiContext.Provider>\n );\n}\n\nfunction useWidgetOpacity(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n widgetOpacity: ConfigurableUiContentProps[\"widgetOpacity\"]\n) {\n const reduxWidgetOpacity = useReduxFrameworkState((state) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return state?.configurableUiState.widgetOpacity;\n });\n const opacity = widgetOpacity ?? reduxWidgetOpacity ?? WIDGET_OPACITY_DEFAULT;\n\n React.useEffect(() => {\n const currentWidgetOpacity =\n document.documentElement.style.getPropertyValue(\"--buic-widget-opacity\");\n if (currentWidgetOpacity === opacity.toString()) return;\n document.documentElement.style.setProperty(\n \"--buic-widget-opacity\",\n opacity.toString()\n );\n return () => {\n document.documentElement.style.removeProperty(\"--buic-widget-opacity\");\n };\n }, [opacity]);\n}\n\nfunction useToolbarOpacity(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n toolbarOpacity: ConfigurableUiContentProps[\"toolbarOpacity\"]\n) {\n const reduxToolbarOpacity = useReduxFrameworkState((state) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return state?.configurableUiState.toolbarOpacity;\n });\n\n const opacity =\n toolbarOpacity ?? reduxToolbarOpacity ?? TOOLBAR_OPACITY_DEFAULT;\n\n React.useEffect(() => {\n const currentToolbarOpacity =\n document.documentElement.style.getPropertyValue(\"--buic-toolbar-opacity\");\n if (currentToolbarOpacity === opacity.toString()) return;\n document.documentElement.style.setProperty(\n \"--buic-toolbar-opacity\",\n opacity.toString()\n );\n return () => {\n document.documentElement.style.removeProperty(\"--buic-toolbar-opacity\");\n };\n }, [opacity]);\n}\n\nfunction useVisibleToolSettings(enabled: boolean) {\n React.useEffect(() => {\n if (!enabled) return;\n return UiFramework.frontstages.onToolSettingsReloadEvent.addListener(() => {\n const frontstage = UiFramework.frontstages.activeFrontstageDef;\n const toolSettings = frontstage?.toolSettings;\n if (!toolSettings) return;\n toolSettings.show();\n });\n }, [enabled]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EAIpB,MAAM,yBAAyB,CAAC;AAMjC,wCAAwC;AAExC,UAAU,mBAAoB,SAAQ,WAAW;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAmGxD;AAkID,8DAA8D;AAC9D,UAAU,WAAW;IACnB,sBAAsB,CACpB,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,EAC/B,SAAS,EAAE,OAAO,GACjB,KAAK,CAAC,SAAS,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAiLD;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,UAAU,CAAC,CAAc;IAEjC,iCAAiC;IAC1B,EAAE,EAAE,MAAM,CAAM;IACvB,iCAAiC;IAC1B,WAAW,EAAE,MAAM,CAAM;gBACpB,WAAW,EAAE,kBAAkB;IAO3C,8CAA8C;IAC9C,IAAW,SAAS,IAAI,WAAW,GAAG,SAAS,CAE9C;IAED;;OAEG;IACI,MAAM,IAAI,kBAAkB;IAInC;;OAEG;I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;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,2BAA2B,4BAsD/D"}
@@ -83,7 +83,7 @@ export function ContentWrapper(props) {
83
83
  const active = renderActiveStrip !== undefined
84
84
  ? renderActiveStrip
85
85
  : isActive && (hasMultipleContents || contentOverlays > 1);
86
- return (React.createElement(ContentOverlay, { className: classnames("uifw-contentlayout-wrapper", props.className), style: props.style, active: active, onMouseDown: handleMouseDown, onMouseMove: UiFramework.visibility.handleContentMouseMove, role: "presentation" }, content));
86
+ return (React.createElement(ContentOverlay, { className: classnames("uifw-contentlayout-wrapper", props.className), style: props.style, active: active, onMouseDown: handleMouseDown, role: "presentation" }, content));
87
87
  }
88
88
  function useRenderActiveStrip(contentIndex) {
89
89
  const contentGroup = React.useContext(ContentLayoutContext);
@@ -149,7 +149,7 @@ class SplitContainer extends React.Component {
149
149
  /** Single Content Container class. */
150
150
  class SingleContentContainer extends React.Component {
151
151
  render() {
152
- return (React.createElement("div", { className: classnames("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container", onMouseMove: UiFramework.visibility.handleContentMouseMove },
152
+ return (React.createElement("div", { className: classnames("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container" },
153
153
  React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" }, contentIndex: this.props.contentIndex })));
154
154
  }
155
155
  }
@@ -370,15 +370,14 @@ export function ContentLayout(props) {
370
370
  }, []);
371
371
  // eslint-disable-next-line @typescript-eslint/no-deprecated
372
372
  const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);
373
- if (contentContainer) {
374
- return (React.createElement("div", { id: "uifw-contentlayout-div", className: props.className, style: props.style, key: `${contentGroupId}-${contentLayoutDef.id}`, onMouseDown: () => {
375
- UiFramework.content.setMouseDown(true);
376
- }, onMouseUp: () => {
377
- UiFramework.content.setMouseDown(false);
378
- }, role: "presentation" },
379
- React.createElement(ContentLayoutContext.Provider, { value: contentGroup }, contentContainer)));
380
- }
381
- return null;
373
+ if (!contentContainer)
374
+ return null;
375
+ return (React.createElement("div", { id: "uifw-contentlayout-div", className: props.className, style: props.style, key: `${contentGroupId}-${contentLayoutDef.id}`, onMouseDown: () => {
376
+ UiFramework.content.setMouseDown(true);
377
+ }, onMouseUp: () => {
378
+ UiFramework.content.setMouseDown(false);
379
+ }, role: "presentation" },
380
+ React.createElement(ContentLayoutContext.Provider, { value: contentGroup }, contentContainer)));
382
381
  }
383
382
  const ContentLayoutContext = React.createContext(undefined);
384
383
  ContentLayoutContext.displayName = "uifw:ContentLayoutContext";
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAStE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;QAClD,4DAA4D;Q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,KAAK,CAAC,KAAK,EAClB,GAAG,EAAE,GAAG,cAAc,IAAI,gBAAgB,CAAC,EAAE,EAAE,EAC/C,WAAW,EAAE,GAAG,EAAE;gBAChB,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC1C,CAAC,EACD,IAAI,EAAC,cAAc;YAEnB,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC/C,gBAAgB,CACa,CAC5B,CACP,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAC9C,SAAS,CACV,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,2BAA2B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/components-react\";\nimport { SplitPane } from \"./split-pane/SplitPane.js\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup.js\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"./ContentLayoutProps.js\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { ContentOverlay, useContentOverlayStore } from \"./ContentOverlay.js\";\nimport { useConditionalValue } from \"../hooks/useConditionalValue.js\";\n\n/** Properties for [[ContentWrapper]] */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n contentIndex: number | undefined;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content, contentIndex } = props;\n const activeFrontstageDef = useActiveFrontstageDef();\n const [isActive, setIsActive] = React.useState(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return content === UiFramework.content.getActive();\n });\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) {\n setIsActive(contentIsIdentical);\n } else {\n const contentId = contentControlKey(content);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(!!contentId && contentId === activeContentId);\n }\n\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >\n 1\n );\n }\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n () => {\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n }\n );\n }, [activeFrontstageDef]);\n\n const renderActiveStrip = useRenderActiveStrip(contentIndex);\n const contentOverlays = useContentOverlayStore();\n\n const active =\n renderActiveStrip !== undefined\n ? renderActiveStrip\n : isActive && (hasMultipleContents || contentOverlays > 1);\n return (\n <ContentOverlay\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n active={active}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n </ContentOverlay>\n );\n}\n\nfunction useRenderActiveStrip(contentIndex: number | undefined) {\n const contentGroup = React.useContext(ContentLayoutContext);\n const contentProps =\n contentIndex === undefined\n ? undefined\n : contentGroup?.contentPropsList[contentIndex];\n const renderActiveStrip = contentProps?.renderActiveStrip;\n const getValue = React.useCallback(() => {\n if (renderActiveStrip === undefined) return undefined;\n if (typeof renderActiveStrip === \"boolean\") return renderActiveStrip;\n return renderActiveStrip.getValue();\n }, [renderActiveStrip]);\n const eventIds = React.useMemo(() => {\n if (renderActiveStrip === undefined) return [];\n if (typeof renderActiveStrip === \"boolean\") return [];\n return renderActiveStrip.eventIds;\n }, [renderActiveStrip]);\n return useConditionalValue(getValue, eventIds);\n}\n\n/** Properties for the [[SplitContainer]] component */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n if (width > 0) percentage = size / width;\n }\n\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extends CommonProps,\n Pick<ContentWrapperProps, \"contentIndex\"> {\n content: React.ReactNode;\n}\n\n/** Single Content Container class. */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n contentIndex={this.props.contentIndex}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit. */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n if (props.id) this.stateId = props.id;\n\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper\n content={contentNodes[this._topIndex]}\n contentIndex={this._topIndex}\n />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper\n content={contentNodes[this._bottomIndex]}\n contentIndex={this._bottomIndex}\n />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper\n content={contentNodes[this._leftIndex]}\n contentIndex={this._leftIndex}\n />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper\n content={contentNodes[this._rightIndex]}\n contentIndex={this._rightIndex}\n />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n /** @deprecated in 4.16.0. Used internally. */\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view.\n * @deprecated in 4.16.0. Used internally.\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (this.rootSplit) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return (\n <SingleContentContainer content={contentNodes[0]} contentIndex={0} />\n );\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout. */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport function ContentLayout(props: ContentLayoutComponentProps) {\n const [contentLayoutDef, setContentLayoutDef] =\n React.useState<ContentLayoutDef>(props.contentLayout);\n const [contentGroupId, setContentGroupId] = React.useState<\n ContentGroup[\"id\"]\n >(props.contentGroup.groupId);\n const [contentGroup, setContentGroup] = React.useState<ContentGroup>(\n props.contentGroup\n );\n const [contentNodes, setContentNodes] = React.useState<React.ReactNode[]>(\n () => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return props.contentGroup.getContentNodes();\n }\n );\n\n React.useEffect(() => {\n return UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n (args) => {\n setContentLayoutDef(args.contentLayout);\n setContentGroupId(args.contentGroup.groupId);\n setContentGroup(args.contentGroup);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n setContentNodes(args.contentGroup.getContentNodes());\n }\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n if (contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={props.className}\n style={props.style}\n key={`${contentGroupId}-${contentLayoutDef.id}`}\n onMouseDown={() => {\n UiFramework.content.setMouseDown(true);\n }}\n onMouseUp={() => {\n UiFramework.content.setMouseDown(false);\n }}\n role=\"presentation\"\n >\n <ContentLayoutContext.Provider value={contentGroup}>\n {contentContainer}\n </ContentLayoutContext.Provider>\n </div>\n );\n }\n\n return null;\n}\n\nconst ContentLayoutContext = React.createContext<ContentGroup | undefined>(\n undefined\n);\nContentLayoutContext.displayName = \"uifw:ContentLayoutContext\";\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAStE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE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EnC,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,GAAG,EAAE,GAAG,cAAc,IAAI,gBAAgB,CAAC,EAAE,EAAE,EAC/C,WAAW,EAAE,GAAG,EAAE;YAChB,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;YACd,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC,EACD,IAAI,EAAC,cAAc;QAEnB,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC/C,gBAAgB,CACa,CAC5B,CACP,CAAC;AACJ,CAAC;AAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAC9C,SAAS,CACV,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,2BAA2B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/components-react\";\nimport { SplitPane } from \"./split-pane/SplitPane.js\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup.js\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"./ContentLayoutProps.js\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { ContentOverlay, useContentOverlayStore } from \"./ContentOverlay.js\";\nimport { useConditionalValue } from \"../hooks/useConditionalValue.js\";\n\n/** Properties for [[ContentWrapper]] */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n contentIndex: number | undefined;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content, contentIndex } = props;\n const activeFrontstageDef = useActiveFrontstageDef();\n const [isActive, setIsActive] = React.useState(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return content === UiFramework.content.getActive();\n });\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n (args) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) {\n setIsActive(contentIsIdentical);\n } else {\n const contentId = contentControlKey(content);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(!!contentId && contentId === activeContentId);\n }\n\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.contentPropsList.length ?? 0) >\n 1\n );\n }\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n () => {\n setHasMultipleContents(\n (activeFrontstageDef &&\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n !!activeFrontstageDef.floatingContentControls?.length) ||\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n }\n );\n }, [activeFrontstageDef]);\n\n const renderActiveStrip = useRenderActiveStrip(contentIndex);\n const contentOverlays = useContentOverlayStore();\n\n const active =\n renderActiveStrip !== undefined\n ? renderActiveStrip\n : isActive && (hasMultipleContents || contentOverlays > 1);\n return (\n <ContentOverlay\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n active={active}\n onMouseDown={handleMouseDown}\n role=\"presentation\"\n >\n {content}\n </ContentOverlay>\n );\n}\n\nfunction useRenderActiveStrip(contentIndex: number | undefined) {\n const contentGroup = React.useContext(ContentLayoutContext);\n const contentProps =\n contentIndex === undefined\n ? undefined\n : contentGroup?.contentPropsList[contentIndex];\n const renderActiveStrip = contentProps?.renderActiveStrip;\n const getValue = React.useCallback(() => {\n if (renderActiveStrip === undefined) return undefined;\n if (typeof renderActiveStrip === \"boolean\") return renderActiveStrip;\n return renderActiveStrip.getValue();\n }, [renderActiveStrip]);\n const eventIds = React.useMemo(() => {\n if (renderActiveStrip === undefined) return [];\n if (typeof renderActiveStrip === \"boolean\") return [];\n return renderActiveStrip.eventIds;\n }, [renderActiveStrip]);\n return useConditionalValue(getValue, eventIds);\n}\n\n/** Properties for the [[SplitContainer]] component */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n if (width > 0) percentage = size / width;\n }\n\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extends CommonProps,\n Pick<ContentWrapperProps, \"contentIndex\"> {\n content: React.ReactNode;\n}\n\n/** Single Content Container class. */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n contentIndex={this.props.contentIndex}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit. */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n if (props.id) this.stateId = props.id;\n\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper\n content={contentNodes[this._topIndex]}\n contentIndex={this._topIndex}\n />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper\n content={contentNodes[this._bottomIndex]}\n contentIndex={this._bottomIndex}\n />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper\n content={contentNodes[this._leftIndex]}\n contentIndex={this._leftIndex}\n />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper\n content={contentNodes[this._rightIndex]}\n contentIndex={this._rightIndex}\n />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n /** @deprecated in 4.16.0. Used internally. */\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view.\n * @deprecated in 4.16.0. Used internally.\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (this.rootSplit) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return (\n <SingleContentContainer content={contentNodes[0]} contentIndex={0} />\n );\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout. */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport function ContentLayout(props: ContentLayoutComponentProps) {\n const [contentLayoutDef, setContentLayoutDef] =\n React.useState<ContentLayoutDef>(props.contentLayout);\n const [contentGroupId, setContentGroupId] = React.useState<\n ContentGroup[\"id\"]\n >(props.contentGroup.groupId);\n const [contentGroup, setContentGroup] = React.useState<ContentGroup>(\n props.contentGroup\n );\n const [contentNodes, setContentNodes] = React.useState<React.ReactNode[]>(\n () => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return props.contentGroup.getContentNodes();\n }\n );\n\n React.useEffect(() => {\n return UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n (args) => {\n setContentLayoutDef(args.contentLayout);\n setContentGroupId(args.contentGroup.groupId);\n setContentGroup(args.contentGroup);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n setContentNodes(args.contentGroup.getContentNodes());\n }\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n if (!contentContainer) return null;\n\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={props.className}\n style={props.style}\n key={`${contentGroupId}-${contentLayoutDef.id}`}\n onMouseDown={() => {\n UiFramework.content.setMouseDown(true);\n }}\n onMouseUp={() => {\n UiFramework.content.setMouseDown(false);\n }}\n role=\"presentation\"\n >\n <ContentLayoutContext.Provider value={contentGroup}>\n {contentContainer}\n </ContentLayoutContext.Provider>\n </div>\n );\n}\n\nconst ContentLayoutContext = React.createContext<ContentGroup | undefined>(\n undefined\n);\nContentLayoutContext.displayName = \"uifw:ContentLayoutContext\";\n"]}
@@ -12,6 +12,7 @@ interface ContentOverlayProps extends React.ComponentProps<"div"> {
12
12
  active?: boolean;
13
13
  }
14
14
  /** Overlay used to identify active content views.
15
+ * This component is treated as part of the application content and integrates with the `UiFramework.visibility` system to handle mouse events appropriately.
15
16
  * @beta
16
17
  */
17
18
  export declare function ContentOverlay({ className, children, active, ...other }: ContentOverlayProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentOverlay.d.ts","sourceRoot":"","sources":["../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;GAEG;AACH,eAAO,MAAM,sBAAsB,qEAA0B,CAAC;AAE9D,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC/D,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAgBrB"}
1
+ {"version":3,"file":"ContentOverlay.d.ts","sourceRoot":"","sources":["../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B;;GAEG;AACH,eAAO,MAAM,sBAAsB,qEAA0B,CAAC;AAE9D,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC/D,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAkBrB"}
@@ -13,16 +13,18 @@ import { useOptionalLayout } from "../layout/base/LayoutStore.js";
13
13
  import { getWidgetState } from "../widgets/WidgetDef.js";
14
14
  import { TabIdContext } from "../layout/widget/ContentRenderer.js";
15
15
  import { WidgetState } from "../widgets/WidgetState.js";
16
+ import { UiFramework } from "../UiFramework.js";
16
17
  /** Returns the number of content overlays.
17
18
  * @internal
18
19
  */
19
20
  export const useContentOverlayStore = create(() => 0);
20
21
  /** Overlay used to identify active content views.
22
+ * This component is treated as part of the application content and integrates with the `UiFramework.visibility` system to handle mouse events appropriately.
21
23
  * @beta
22
24
  */
23
25
  export function ContentOverlay({ className, children, active, ...other }) {
24
26
  useTrackContentOverlay();
25
- return (React.createElement("div", { className: classnames("uifw-content-contentOverlay", className), ...other },
27
+ return (React.createElement("div", { className: classnames("uifw-content-contentOverlay", className), onMouseMove: UiFramework.visibility.handleContentMouseMove, onMouseLeave: UiFramework.visibility.handleContentMouseLeave, ...other },
26
28
  children,
27
29
  React.createElement("div", { className: classnames("uifw-content-contentOverlay_activeStrip", active && "uifw-active") })));
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentOverlay.js","sourceRoot":"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C,MAAM;YAAE,OAAO,KAAK,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE;YACV,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./ContentOverlay.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { create } from \"zustand\";\nimport { useOptionalLayout } from \"../layout/base/LayoutStore.js\";\nimport { getWidgetState } from \"../widgets/WidgetDef.js\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer.js\";\nimport { WidgetState } from \"../widgets/WidgetState.js\";\n\n/** Returns the number of content overlays.\n * @internal\n */\nexport const useContentOverlayStore = create<number>(() => 0);\n\ninterface ContentOverlayProps extends React.ComponentProps<\"div\"> {\n /** Describes if the content is active. */\n active?: boolean;\n}\n\n/** Overlay used to identify active content views.\n * @beta\n */\nexport function ContentOverlay({\n className,\n children,\n active,\n ...other\n}: ContentOverlayProps) {\n useTrackContentOverlay();\n return (\n <div\n className={classnames(\"uifw-content-contentOverlay\", className)}\n {...other}\n >\n {children}\n <div\n className={classnames(\n \"uifw-content-contentOverlay_activeStrip\",\n active && \"uifw-active\"\n )}\n />\n </div>\n );\n}\n\nfunction useTrackContentOverlay() {\n const tabId = React.useContext(TabIdContext);\n const visible = useOptionalLayout((state) => {\n if (!state) return true;\n if (!tabId) return true;\n\n const widgetState = getWidgetState(tabId, state);\n // Do not track content overlays in hidden widgets.\n if (widgetState === WidgetState.Hidden) return false;\n\n return true;\n });\n React.useEffect(() => {\n if (!visible) return;\n useContentOverlayStore.setState((prev) => prev + 1);\n return () => {\n useContentOverlayStore.setState((prev) => prev - 1);\n };\n }, [visible]);\n}\n"]}
1
+ {"version":3,"file":"ContentOverlay.js","sourceRoot":"","sources":["../../../src/appui-react/content/ContentOverlay.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAS,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAO9D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACY;IACpB,sBAAsB,EAAE,CAAC;IACzB,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAC/D,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAC1D,YAAY,EAAE,WAAW,CAAC,UAAU,CAAC,uBAAuB,KACxD,KAAK;QAER,QAAQ;QACT,6BACE,SAAS,EAAE,UAAU,CACnB,yCAAyC,EACzC,MAAM,IAAI,aAAa,CACxB,GACD,CACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB;IAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,iBAAiB,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1C,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACjD,mDAAmD;QACnD,IAAI,WAAW,KAAK,WAAW,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE;YACV,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./ContentOverlay.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { create } from \"zustand\";\nimport { useOptionalLayout } from \"../layout/base/LayoutStore.js\";\nimport { getWidgetState } from \"../widgets/WidgetDef.js\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer.js\";\nimport { WidgetState } from \"../widgets/WidgetState.js\";\nimport { UiFramework } from \"../UiFramework.js\";\n\n/** Returns the number of content overlays.\n * @internal\n */\nexport const useContentOverlayStore = create<number>(() => 0);\n\ninterface ContentOverlayProps extends React.ComponentProps<\"div\"> {\n /** Describes if the content is active. */\n active?: boolean;\n}\n\n/** Overlay used to identify active content views.\n * This component is treated as part of the application content and integrates with the `UiFramework.visibility` system to handle mouse events appropriately.\n * @beta\n */\nexport function ContentOverlay({\n className,\n children,\n active,\n ...other\n}: ContentOverlayProps) {\n useTrackContentOverlay();\n return (\n <div\n className={classnames(\"uifw-content-contentOverlay\", className)}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n onMouseLeave={UiFramework.visibility.handleContentMouseLeave}\n {...other}\n >\n {children}\n <div\n className={classnames(\n \"uifw-content-contentOverlay_activeStrip\",\n active && \"uifw-active\"\n )}\n />\n </div>\n );\n}\n\nfunction useTrackContentOverlay() {\n const tabId = React.useContext(TabIdContext);\n const visible = useOptionalLayout((state) => {\n if (!state) return true;\n if (!tabId) return true;\n\n const widgetState = getWidgetState(tabId, state);\n // Do not track content overlays in hidden widgets.\n if (widgetState === WidgetState.Hidden) return false;\n\n return true;\n });\n React.useEffect(() => {\n if (!visible) return;\n useContentOverlayStore.setState((prev) => prev + 1);\n return () => {\n useContentOverlayStore.setState((prev) => prev - 1);\n };\n }, [visible]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUpE;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBAO1E;AAED;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,GACT,EAAE,mCAAmC,qBAcrC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,4BAA4B;;EA4ErE"}
1
+ {"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUpE;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBAO1E;AAED;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,GACT,EAAE,mCAAmC,qBAarC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,4BAA4B;;EA4ErE"}
@@ -25,7 +25,7 @@ export function FloatingViewportContent(props) {
25
25
  * @deprecated in 4.16.0. Use {@link ContentOverlay} component to display the active content indicator instead.
26
26
  */
27
27
  export function FloatingViewportContentWrapper({ children, }) {
28
- return (React.createElement("div", { onMouseMove: UiFramework.visibility.handleContentMouseMove, className: "uifw-dialog-imodel-content", style: { height: "100%", position: "relative" } },
28
+ return (React.createElement("div", { className: "uifw-dialog-imodel-content", style: { height: "100%", position: "relative" } },
29
29
  React.createElement(ContentWrapper, { content: children, style: { height: "100%", position: "relative" }, contentIndex: undefined })));
30
30
  }
31
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAoBrD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACzE,MAAM,EAAE,eAAe,EAAE,GAAG,mBAAmB,C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AE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE;YAC1D,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAC5C,4DAA4D;gBAC5D,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl.js\";\nimport { ContentWrapper } from \"./ContentLayout.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { useRefs } from \"@itwin/core-react/internal\";\nimport { ContentOverlay } from \"./ContentOverlay.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/**\n * @beta\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContent}.\n */\nexport interface FloatingViewportContentProps {\n /** callback used to construct context menu when user right-clicks on canvas/viewport */\n onContextMenu?: (e: React.MouseEvent) => boolean;\n /** viewport/content control uniqueId */\n contentId: string;\n /** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */\n initialViewState: ViewStateProp;\n /** Function to get a reference to the ScreenViewport */\n viewportRef?: React.Ref<ScreenViewport>;\n}\n\n/**\n * @beta\n * @deprecated in 4.16.0. Wrap {@link @itwin/imodel-components-react#ViewportComponent} component with a {@link ContentOverlay} instead.\n */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContentWrapper}.\n */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Use {@link ContentOverlay} component to display the active content indicator instead.\n */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n contentIndex={undefined}\n />\n </div>\n );\n}\n\n/**\n * @alpha\n * @deprecated in 4.16.0. Use {@link @itwin/imodel-components-react#ViewportComponent} component instead.\n */\nexport function useFloatingViewport(args: FloatingViewportContentProps) {\n const { contentId, initialViewState, onContextMenu, viewportRef } = args;\n const [viewport, setViewport] = React.useState<ScreenViewport | undefined>();\n const contentControl = React.useRef<\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n FloatingViewportContentControl | undefined\n >();\n\n const viewState = React.useMemo(\n () =>\n typeof initialViewState === \"function\"\n ? initialViewState()\n : initialViewState,\n [initialViewState]\n );\n const ref = React.useCallback((v: ScreenViewport) => {\n setViewport(v);\n }, []);\n\n const refs = useRefs(ref, viewportRef);\n const viewportControl = React.useMemo(() => {\n const node = (\n <ViewportComponent\n key={contentId}\n imodel={viewState.iModel}\n viewState={viewState}\n controlId={contentId}\n onContextMenu={onContextMenu}\n viewportRef={refs}\n />\n );\n return node;\n }, [refs, onContextMenu, viewState, contentId]);\n\n React.useEffect(() => {\n if (!contentControl.current) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n }, [contentId]);\n\n React.useEffect(() => {\n if (viewport && contentControl.current) {\n contentControl.current.viewport = viewport;\n if (null === contentControl.current.reactNode) {\n contentControl.current.reactNode = viewportControl;\n }\n }\n }, [viewport, viewportControl]);\n\n React.useEffect(() => {\n return IModelApp.viewManager.onViewClose.addListener((vp) => {\n if (contentControl.current?.viewport === vp) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n });\n }, []);\n\n return {\n viewportControl,\n };\n}\n"]}
1
+ {"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAoBrD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC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EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE;YAC1D,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAC5C,4DAA4D;gBAC5D,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl.js\";\nimport { ContentWrapper } from \"./ContentLayout.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { useRefs } from \"@itwin/core-react/internal\";\nimport type { ContentOverlay } from \"./ContentOverlay.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/**\n * @beta\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContent}.\n */\nexport interface FloatingViewportContentProps {\n /** callback used to construct context menu when user right-clicks on canvas/viewport */\n onContextMenu?: (e: React.MouseEvent) => boolean;\n /** viewport/content control uniqueId */\n contentId: string;\n /** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */\n initialViewState: ViewStateProp;\n /** Function to get a reference to the ScreenViewport */\n viewportRef?: React.Ref<ScreenViewport>;\n}\n\n/**\n * @beta\n * @deprecated in 4.16.0. Wrap {@link @itwin/imodel-components-react#ViewportComponent} component with a {@link ContentOverlay} instead.\n */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Props of deprecated component {@link FloatingViewportContentWrapper}.\n */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/**\n * @public\n * @deprecated in 4.16.0. Use {@link ContentOverlay} component to display the active content indicator instead.\n */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n contentIndex={undefined}\n />\n </div>\n );\n}\n\n/**\n * @alpha\n * @deprecated in 4.16.0. Use {@link @itwin/imodel-components-react#ViewportComponent} component instead.\n */\nexport function useFloatingViewport(args: FloatingViewportContentProps) {\n const { contentId, initialViewState, onContextMenu, viewportRef } = args;\n const [viewport, setViewport] = React.useState<ScreenViewport | undefined>();\n const contentControl = React.useRef<\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n FloatingViewportContentControl | undefined\n >();\n\n const viewState = React.useMemo(\n () =>\n typeof initialViewState === \"function\"\n ? initialViewState()\n : initialViewState,\n [initialViewState]\n );\n const ref = React.useCallback((v: ScreenViewport) => {\n setViewport(v);\n }, []);\n\n const refs = useRefs(ref, viewportRef);\n const viewportControl = React.useMemo(() => {\n const node = (\n <ViewportComponent\n key={contentId}\n imodel={viewState.iModel}\n viewState={viewState}\n controlId={contentId}\n onContextMenu={onContextMenu}\n viewportRef={refs}\n />\n );\n return node;\n }, [refs, onContextMenu, viewState, contentId]);\n\n React.useEffect(() => {\n if (!contentControl.current) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n }, [contentId]);\n\n React.useEffect(() => {\n if (viewport && contentControl.current) {\n contentControl.current.viewport = viewport;\n if (null === contentControl.current.reactNode) {\n contentControl.current.reactNode = viewportControl;\n }\n }\n }, [viewport, viewportControl]);\n\n React.useEffect(() => {\n return IModelApp.viewManager.onViewClose.addListener((vp) => {\n if (contentControl.current?.viewport === vp) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n });\n }, []);\n\n return {\n viewportControl,\n };\n}\n"]}
@@ -46,6 +46,7 @@ export declare class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs>
46
46
  */
47
47
  export declare class CursorInformation {
48
48
  private static _cursorPosition;
49
+ private static _cursorDocument;
49
50
  private static _cursorDirection;
50
51
  private static _cursorDirections;
51
52
  /** The cursor position. */
@@ -57,10 +58,12 @@ export declare class CursorInformation {
57
58
  static get cursorY(): number;
58
59
  /** Gets the general cursor movement direction. */
59
60
  static get cursorDirection(): CursorDirection;
61
+ /** Gets the cursor document. */
62
+ static get cursorDocument(): Document | undefined;
60
63
  /** Gets the [[CursorUpdatedEvent]]. */
61
64
  static readonly onCursorUpdatedEvent: CursorUpdatedEvent;
62
65
  /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */
63
- static handleMouseMove(point: XAndY): void;
66
+ static handleMouseMove(point: XAndY, document?: Document): void;
64
67
  private static _determineMostFrequentDirection;
65
68
  private static _mostFrequent;
66
69
  private static _determineCursorDirection;