@itwin/appui-react 4.2.0-dev.1 → 4.2.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 (194) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/lib/cjs/appui-react/UiFramework.js +5 -9
  3. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  4. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +1 -2
  5. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  6. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +1 -1
  7. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  8. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  9. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  10. package/lib/cjs/appui-react/configurableui/TimeTracker.js +1 -2
  11. package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
  12. package/lib/cjs/appui-react/content/ContentLayout.js +9 -12
  13. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  14. package/lib/cjs/appui-react/content/DefaultViewOverlay.js +3 -4
  15. package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
  16. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -2
  17. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  18. package/lib/cjs/appui-react/content/IModelViewport.js +3 -6
  19. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  20. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +1 -2
  21. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  22. package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -1
  23. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  24. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +10 -12
  25. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  26. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  27. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  28. package/lib/cjs/appui-react/dialog/ContentDialog.js +3 -6
  29. package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
  30. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -3
  31. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  32. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +3 -4
  33. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  34. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +2 -3
  35. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  36. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  37. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  38. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  39. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  40. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  41. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  42. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +8 -13
  43. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  44. package/lib/cjs/appui-react/messages/ActivityMessage.js +5 -7
  45. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +1 -1
  46. package/lib/cjs/appui-react/pickers/ViewSelector.js +5 -6
  47. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  48. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +1 -2
  49. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  50. package/lib/cjs/appui-react/popup/PopupManager.js +1 -2
  51. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  52. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  53. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  54. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +5 -7
  55. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  56. package/lib/cjs/appui-react/statusbar/Indicator.js +1 -2
  57. package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
  58. package/lib/cjs/appui-react/statusbar/StatusBar.js +3 -5
  59. package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
  60. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  61. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  62. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +10 -17
  63. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  64. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  65. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  66. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
  67. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  68. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  69. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  70. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  71. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  72. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  73. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  74. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  75. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  76. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
  77. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  78. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +3 -3
  79. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  80. package/lib/cjs/appui-react/widget-panels/Content.js +8 -9
  81. package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
  82. package/lib/cjs/appui-react/widget-panels/Frontstage.js +38 -39
  83. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  84. package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
  85. package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
  86. package/lib/cjs/appui-react/widget-panels/Tab.js +1 -1
  87. package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
  88. package/lib/cjs/appui-react/widget-panels/ToolSettings.js +12 -17
  89. package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
  90. package/lib/cjs/appui-react/widget-panels/Toolbars.js +2 -3
  91. package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
  92. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  93. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  94. package/lib/cjs/appui-react/widgets/WidgetDef.js +1 -1
  95. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  96. package/lib/cjs/appui-react/widgets/WidgetHost.js +2 -3
  97. package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
  98. package/lib/esm/appui-react/UiFramework.js +5 -9
  99. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  100. package/lib/esm/appui-react/backstage/BackstageComposerItem.js +1 -2
  101. package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  102. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +1 -1
  103. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  104. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  105. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  106. package/lib/esm/appui-react/configurableui/TimeTracker.js +1 -2
  107. package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
  108. package/lib/esm/appui-react/content/ContentLayout.js +9 -12
  109. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  110. package/lib/esm/appui-react/content/DefaultViewOverlay.js +3 -4
  111. package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
  112. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -2
  113. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  114. package/lib/esm/appui-react/content/IModelViewport.js +3 -6
  115. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  116. package/lib/esm/appui-react/content/InternalContentLayoutManager.js +1 -2
  117. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  118. package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -1
  119. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  120. package/lib/esm/appui-react/content/split-pane/SplitPane.js +10 -12
  121. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  122. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  123. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  124. package/lib/esm/appui-react/dialog/ContentDialog.js +3 -6
  125. package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
  126. package/lib/esm/appui-react/dialog/DialogManagerBase.js +2 -3
  127. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  128. package/lib/esm/appui-react/frontstage/FrontstageDef.js +3 -4
  129. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  130. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +2 -3
  131. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  132. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  133. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  134. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  135. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  136. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  137. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  138. package/lib/esm/appui-react/hooks/useSolarDataProvider.js +8 -13
  139. package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  140. package/lib/esm/appui-react/messages/ActivityMessage.js +5 -7
  141. package/lib/esm/appui-react/messages/ActivityMessage.js.map +1 -1
  142. package/lib/esm/appui-react/pickers/ViewSelector.js +5 -6
  143. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  144. package/lib/esm/appui-react/popup/KeyinPalettePanel.js +1 -2
  145. package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  146. package/lib/esm/appui-react/popup/PopupManager.js +1 -2
  147. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  148. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  149. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  150. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +5 -7
  151. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  152. package/lib/esm/appui-react/statusbar/Indicator.js +1 -2
  153. package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
  154. package/lib/esm/appui-react/statusbar/StatusBar.js +3 -5
  155. package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
  156. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  157. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  158. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +10 -17
  159. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  160. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  161. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  162. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
  163. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  164. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  165. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  166. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  167. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  168. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  169. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  170. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  171. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  172. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
  173. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  174. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +3 -3
  175. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  176. package/lib/esm/appui-react/widget-panels/Content.js +8 -9
  177. package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
  178. package/lib/esm/appui-react/widget-panels/Frontstage.js +38 -39
  179. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  180. package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
  181. package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
  182. package/lib/esm/appui-react/widget-panels/Tab.js +1 -1
  183. package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
  184. package/lib/esm/appui-react/widget-panels/ToolSettings.js +12 -17
  185. package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
  186. package/lib/esm/appui-react/widget-panels/Toolbars.js +2 -3
  187. package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
  188. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  189. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  190. package/lib/esm/appui-react/widgets/WidgetDef.js +1 -1
  191. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  192. package/lib/esm/appui-react/widgets/WidgetHost.js +2 -3
  193. package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
  194. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,8BAA8B;AAE9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,OAAO,KAAK,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAC5C,CAAC;IACF,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ClC,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,cAAc,CAClE,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAqBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,8BAA8B;AAE9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAA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AAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO;SAChD,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAC/D,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,cAAc,CAClE,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAqBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
@@ -19,7 +19,6 @@ import { useAnalysisAnimationDataProvider } from "../hooks/useAnalysisAnimationD
19
19
  */
20
20
  // istanbul ignore next
21
21
  export function DefaultViewOverlay({ viewport, onPlayPause, featureOptions, }) {
22
- var _a, _b, _c;
23
22
  const solarDataTimelineProvider = useSolarDataProvider(viewport);
24
23
  const analysisAnimationTimelineDataProvider = useAnalysisAnimationDataProvider(viewport);
25
24
  const scheduleTimelineDataProvider = useScheduleAnimationDataProvider(viewport);
@@ -28,19 +27,19 @@ export function DefaultViewOverlay({ viewport, onPlayPause, featureOptions, }) {
28
27
  return null;
29
28
  // Solar gets first shot
30
29
  if (solarDataTimelineProvider &&
31
- !!((_a = featureOptions === null || featureOptions === void 0 ? void 0 : featureOptions.defaultViewOverlay) === null || _a === void 0 ? void 0 : _a.enableSolarTimelineViewOverlay)) {
30
+ !!featureOptions?.defaultViewOverlay?.enableSolarTimelineViewOverlay) {
32
31
  return (React.createElement("div", { className: "uifw-view-overlay" },
33
32
  React.createElement("div", { className: "uifw-animation-overlay" },
34
33
  React.createElement(SolarTimeline, { dataProvider: solarDataTimelineProvider }))));
35
34
  }
36
35
  if (analysisAnimationTimelineDataProvider &&
37
- !!((_b = featureOptions === null || featureOptions === void 0 ? void 0 : featureOptions.defaultViewOverlay) === null || _b === void 0 ? void 0 : _b.enableAnalysisTimelineViewOverlay)) {
36
+ !!featureOptions?.defaultViewOverlay?.enableAnalysisTimelineViewOverlay) {
38
37
  return (React.createElement("div", { className: "uifw-view-overlay" },
39
38
  React.createElement("div", { className: "uifw-animation-overlay" },
40
39
  React.createElement(TimelineComponent, { startDate: analysisAnimationTimelineDataProvider.start, endDate: analysisAnimationTimelineDataProvider.end, initialDuration: analysisAnimationTimelineDataProvider.initialDuration, totalDuration: analysisAnimationTimelineDataProvider.duration, minimized: true, onChange: analysisAnimationTimelineDataProvider.onAnimationFractionChanged, onPlayPause: onPlayPause }))));
41
40
  }
42
41
  if (scheduleTimelineDataProvider &&
43
- !!((_c = featureOptions === null || featureOptions === void 0 ? void 0 : featureOptions.defaultViewOverlay) === null || _c === void 0 ? void 0 : _c.enableScheduleAnimationViewOverlay)) {
42
+ !!featureOptions?.defaultViewOverlay?.enableScheduleAnimationViewOverlay) {
44
43
  return (React.createElement("div", { className: "uifw-view-overlay" },
45
44
  React.createElement("div", { className: "uifw-animation-overlay" },
46
45
  React.createElement(TimelineComponent, { startDate: scheduleTimelineDataProvider.start, endDate: scheduleTimelineDataProvider.end, initialDuration: scheduleTimelineDataProvider.initialDuration, totalDuration: scheduleTimelineDataProvider.duration, minimized: true, onChange: scheduleTimelineDataProvider.onAnimationFractionChanged, onPlayPause: onPlayPause }))));
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultViewOverlay.js","sourceRoot":"","sources":["../../../../src/appui-react/content/DefaultViewOverlay.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAW7F;;;;GAIG;AACH,uBAAuB;AACvB,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,WAAW,EACX,cAAc,GACG;;IACjB,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACjE,MAAM,qCAAqC,GACzC,gCAAgC,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,4BAA4B,GAChC,gCAAgC,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,eAAe,GAAG,iBAAiB,EAAE,CAAC;IAE5C,IAAI,CAAC,eAAe;QAAE,OAAO,IAAI,CAAC;IAElC,wBAAwB;IACxB,IACE,yBAAyB;QACzB,CAAC,CAAC,CAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAA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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 \"./DefaultViewOverlay.scss\";\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport {\n SolarTimeline,\n TimelineComponent,\n} from \"@itwin/imodel-components-react\";\nimport { useScheduleAnimationDataProvider } from \"../hooks/useScheduleAnimationDataProvider\";\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\nimport { useSolarDataProvider } from \"../hooks/useSolarDataProvider\";\nimport { useAnalysisAnimationDataProvider } from \"../hooks/useAnalysisAnimationDataProvider\";\n\n/** Props of Viewport Overlay Control that show timelines\n * @public\n */\nexport interface ViewOverlayProps {\n viewport: ScreenViewport;\n onPlayPause?: (playing: boolean) => void; // callback with play/pause button is pressed\n featureOptions?: { [key: string]: any };\n}\n\n/**\n * Default viewport overlay that examines ViewState of the active view for a schedule script, analysis data, or solar data. If one of these is detected, the corresponding\n * data provider is attached to the TimelineComponent and the overlay is made visible.\n * @public\n */\n// istanbul ignore next\nexport function DefaultViewOverlay({\n viewport,\n onPlayPause,\n featureOptions,\n}: ViewOverlayProps) {\n const solarDataTimelineProvider = useSolarDataProvider(viewport);\n const analysisAnimationTimelineDataProvider =\n useAnalysisAnimationDataProvider(viewport);\n const scheduleTimelineDataProvider =\n useScheduleAnimationDataProvider(viewport);\n const currentViewport = useActiveViewport();\n\n if (!currentViewport) return null;\n\n // Solar gets first shot\n if (\n solarDataTimelineProvider &&\n !!featureOptions?.defaultViewOverlay?.enableSolarTimelineViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <SolarTimeline dataProvider={solarDataTimelineProvider} />\n </div>\n </div>\n );\n }\n\n if (\n analysisAnimationTimelineDataProvider &&\n !!featureOptions?.defaultViewOverlay?.enableAnalysisTimelineViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <TimelineComponent\n startDate={analysisAnimationTimelineDataProvider.start}\n endDate={analysisAnimationTimelineDataProvider.end}\n initialDuration={\n analysisAnimationTimelineDataProvider.initialDuration\n }\n totalDuration={analysisAnimationTimelineDataProvider.duration}\n minimized={true}\n onChange={\n analysisAnimationTimelineDataProvider.onAnimationFractionChanged\n }\n onPlayPause={onPlayPause}\n />\n </div>\n </div>\n );\n }\n\n if (\n scheduleTimelineDataProvider &&\n !!featureOptions?.defaultViewOverlay?.enableScheduleAnimationViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <TimelineComponent\n startDate={scheduleTimelineDataProvider.start}\n endDate={scheduleTimelineDataProvider.end}\n initialDuration={scheduleTimelineDataProvider.initialDuration}\n totalDuration={scheduleTimelineDataProvider.duration}\n minimized={true}\n onChange={scheduleTimelineDataProvider.onAnimationFractionChanged}\n onPlayPause={onPlayPause}\n />\n </div>\n </div>\n );\n }\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"DefaultViewOverlay.js","sourceRoot":"","sources":["../../../../src/appui-react/content/DefaultViewOverlay.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAW7F;;;;GAIG;AACH,uBAAuB;AACvB,MAAM,UAAU,kBAAkB,CAAC,EACjC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C7C,OAAO,EAAE,4BAA4B,CAAC,GAAG,EACzC,eAAe,EAAE,4BAA4B,CAAC,eAAe,EAC7D,aAAa,EAAE,4BAA4B,CAAC,QAAQ,EACpD,SAAS,EAAE,IAAI,EACf,QAAQ,EAAE,4BAA4B,CAAC,0BAA0B,EACjE,WAAW,EAAE,WAAW,GACxB,CACE,CACF,CACP,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport \"./DefaultViewOverlay.scss\";\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport {\n SolarTimeline,\n TimelineComponent,\n} from \"@itwin/imodel-components-react\";\nimport { useScheduleAnimationDataProvider } from \"../hooks/useScheduleAnimationDataProvider\";\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\nimport { useSolarDataProvider } from \"../hooks/useSolarDataProvider\";\nimport { useAnalysisAnimationDataProvider } from \"../hooks/useAnalysisAnimationDataProvider\";\n\n/** Props of Viewport Overlay Control that show timelines\n * @public\n */\nexport interface ViewOverlayProps {\n viewport: ScreenViewport;\n onPlayPause?: (playing: boolean) => void; // callback with play/pause button is pressed\n featureOptions?: { [key: string]: any };\n}\n\n/**\n * Default viewport overlay that examines ViewState of the active view for a schedule script, analysis data, or solar data. If one of these is detected, the corresponding\n * data provider is attached to the TimelineComponent and the overlay is made visible.\n * @public\n */\n// istanbul ignore next\nexport function DefaultViewOverlay({\n viewport,\n onPlayPause,\n featureOptions,\n}: ViewOverlayProps) {\n const solarDataTimelineProvider = useSolarDataProvider(viewport);\n const analysisAnimationTimelineDataProvider =\n useAnalysisAnimationDataProvider(viewport);\n const scheduleTimelineDataProvider =\n useScheduleAnimationDataProvider(viewport);\n const currentViewport = useActiveViewport();\n\n if (!currentViewport) return null;\n\n // Solar gets first shot\n if (\n solarDataTimelineProvider &&\n !!featureOptions?.defaultViewOverlay?.enableSolarTimelineViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <SolarTimeline dataProvider={solarDataTimelineProvider} />\n </div>\n </div>\n );\n }\n\n if (\n analysisAnimationTimelineDataProvider &&\n !!featureOptions?.defaultViewOverlay?.enableAnalysisTimelineViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <TimelineComponent\n startDate={analysisAnimationTimelineDataProvider.start}\n endDate={analysisAnimationTimelineDataProvider.end}\n initialDuration={\n analysisAnimationTimelineDataProvider.initialDuration\n }\n totalDuration={analysisAnimationTimelineDataProvider.duration}\n minimized={true}\n onChange={\n analysisAnimationTimelineDataProvider.onAnimationFractionChanged\n }\n onPlayPause={onPlayPause}\n />\n </div>\n </div>\n );\n }\n\n if (\n scheduleTimelineDataProvider &&\n !!featureOptions?.defaultViewOverlay?.enableScheduleAnimationViewOverlay\n ) {\n return (\n <div className=\"uifw-view-overlay\">\n <div className=\"uifw-animation-overlay\">\n <TimelineComponent\n startDate={scheduleTimelineDataProvider.start}\n endDate={scheduleTimelineDataProvider.end}\n initialDuration={scheduleTimelineDataProvider.initialDuration}\n totalDuration={scheduleTimelineDataProvider.duration}\n minimized={true}\n onChange={scheduleTimelineDataProvider.onAnimationFractionChanged}\n onPlayPause={onPlayPause}\n />\n </div>\n </div>\n );\n }\n\n return null;\n}\n"]}
@@ -61,8 +61,7 @@ export function useFloatingViewport(args) {
61
61
  }, [viewState, viewport, viewportControl]);
62
62
  React.useEffect(() => {
63
63
  const onViewClose = (vp) => {
64
- var _a;
65
- if (((_a = contentControl.current) === null || _a === void 0 ? void 0 : _a.viewport) === vp) {
64
+ if (contentControl.current?.viewport === vp) {
66
65
  UiFramework.content.dropFloatingContentControl(contentControl.current);
67
66
  contentControl.current = undefined;
68
67
  }
@@ -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,0BAA0B,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAgB5C,YAAY;AACZ,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACzE,MAAM,EAAE,eAAe,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACvD,OAAO,CACL,oBAAC,8BAA8B,QAC5B,eAAe,CACe,CAClC,CAAC;AACJ,CAAC;AAOD,aAAa;AACb,MAAM,UAAU,8BAA8B,CAAC,EAC7C,QAAQ,GAC4B;IACpC,OAAO,CACL,6BACE,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAC1D,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE;QAE/C,oBAAC,cAAc,IACb,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAC/C,CACE,CACP,CAAC;AACJ,CAAC;AAED,aAAa;AACb,MAAM,UAAU,mBAAmB,CAAC,IAAkC;IACpE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IACzE,MAAM,CAAC,QAA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AC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;aACpC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,IAAI,cAAc,CAAC,OAAO,EAAE;YACtC,cAAc,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC3C,IAAI,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE;gBAC7C,cAAc,CAAC,OAAO,CAAC,SAAS,GAAG,eAAe,CAAC;aACpD;YACD,KAAK,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SAC5D;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAE3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE;;YACzC,IAAI,CAAA,MAAA,cAAc,CAAC,OAAO,0CAAE,QAAQ,MAAK,EAAE,EAAE;gBAC3C,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;aACpC;QACH,CAAC,CAAC;QACF,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl\";\nimport { ContentWrapper } from \"./ContentLayout\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useRefs } from \"@itwin/core-react\";\n\n/**\n * @beta\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/** @beta */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/** @alpha */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/** @alpha */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n}\n\n/** @alpha */\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 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 contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\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 void contentControl.current.viewport.changeView(viewState);\n }\n }, [viewState, viewport, viewportControl]);\n\n React.useEffect(() => {\n const onViewClose = (vp: ScreenViewport) => {\n if (contentControl.current?.viewport === vp) {\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n return IModelApp.viewManager.onViewClose.addListener(onViewClose);\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,0BAA0B,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAA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D,KAAK,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SAC5D;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAE3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE;YACzC,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,KAAK,EAAE,EAAE;gBAC3C,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACvE,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;aACpC;QACH,CAAC,CAAC;QACF,OAAO,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FloatingViewportContentControl } from \"./ViewportContentControl\";\nimport { ContentWrapper } from \"./ContentLayout\";\nimport { UiFramework } from \"../UiFramework\";\nimport { useRefs } from \"@itwin/core-react\";\n\n/**\n * @beta\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/** @beta */\nexport function FloatingViewportContent(props: FloatingViewportContentProps) {\n const { viewportControl } = useFloatingViewport(props);\n return (\n <FloatingViewportContentWrapper>\n {viewportControl}\n </FloatingViewportContentWrapper>\n );\n}\n\n/** @alpha */\nexport interface FloatingViewportContentWrapperProps {\n readonly children?: React.ReactNode;\n}\n\n/** @alpha */\nexport function FloatingViewportContentWrapper({\n children,\n}: FloatingViewportContentWrapperProps) {\n return (\n <div\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n className=\"uifw-dialog-imodel-content\"\n style={{ height: \"100%\", position: \"relative\" }}\n >\n <ContentWrapper\n content={children}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n}\n\n/** @alpha */\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 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 contentControl.current = new FloatingViewportContentControl(\n contentId,\n contentId,\n null\n );\n UiFramework.content.addFloatingContentControl(contentControl.current);\n }\n return () => {\n if (contentControl.current) {\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 void contentControl.current.viewport.changeView(viewState);\n }\n }, [viewState, viewport, viewportControl]);\n\n React.useEffect(() => {\n const onViewClose = (vp: ScreenViewport) => {\n if (contentControl.current?.viewport === vp) {\n UiFramework.content.dropFloatingContentControl(contentControl.current);\n contentControl.current = undefined;\n }\n };\n return IModelApp.viewManager.onViewClose.addListener(onViewClose);\n }, []);\n\n return {\n viewportControl,\n };\n}\n"]}
@@ -43,7 +43,6 @@ export class IModelViewportControl extends ViewportContentControl {
43
43
  return "UiFramework.IModelViewportControl";
44
44
  }
45
45
  constructor(info, _options) {
46
- var _a;
47
46
  super(info, _options);
48
47
  this._options = _options;
49
48
  this._featureOptions = {};
@@ -72,7 +71,7 @@ export class IModelViewportControl extends ViewportContentControl {
72
71
  if (_options.featureOptions)
73
72
  this._featureOptions = _options.featureOptions;
74
73
  this._alwaysUseSuppliedViewState =
75
- (_a = _options.alwaysUseSuppliedViewState) !== null && _a !== void 0 ? _a : false;
74
+ _options.alwaysUseSuppliedViewState ?? false;
76
75
  this._userSuppliedViewOverlay = _options.supplyViewOverlay;
77
76
  if (!_options.deferNodeInitialization)
78
77
  this.initializeReactNode();
@@ -108,25 +107,23 @@ export class IModelViewportControl extends ViewportContentControl {
108
107
  /** Get the React component that will contain the Viewport */
109
108
  getImodelConnectedViewportReactElement() {
110
109
  return (React.createElement(IModelConnectedViewport, { viewportRef: (v) => {
111
- var _a;
112
110
  this.viewport = v;
113
111
  // for convenience, if window defined bind viewport to window
114
112
  if (undefined !== window)
115
113
  window.viewport = v;
116
114
  if (!UiFramework.frontstages.isLoading)
117
- (_a = UiFramework.frontstages.activeFrontstageDef) === null || _a === void 0 ? void 0 : _a.setActiveViewFromViewport(v);
115
+ UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(v);
118
116
  }, getViewOverlay: this._getViewOverlay }));
119
117
  }
120
118
  /** Get the React component that will contain the Viewport */
121
119
  getImodelViewportReactElement(iModelConnection, viewState) {
122
120
  return (React.createElement(ViewportComponent, { viewState: viewState, imodel: iModelConnection, controlId: this.controlId, viewportRef: (v) => {
123
- var _a;
124
121
  this.viewport = v;
125
122
  // for convenience, if window defined bind viewport to window
126
123
  if (undefined !== window)
127
124
  window.viewport = v;
128
125
  if (!UiFramework.frontstages.isLoading)
129
- (_a = UiFramework.frontstages.activeFrontstageDef) === null || _a === void 0 ? void 0 : _a.setActiveViewFromViewport(v);
126
+ UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(v);
130
127
  }, getViewOverlay: this._getViewOverlay }));
131
128
  }
132
129
  /** Get the React component that will be shown when no iModel data is available */
@@ -1 +1 @@
1
- {"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CACxE,IAAI,EACJ,IAAI,CACL,CAAC,iBAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AAC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AA6D;gBAC7D,IAAI,SAAS,KAAK,MAAM;oBAAG,MAAc,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACvD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS;oBACpC,MAAA,WAAW,CAAC,WAAW,CAAC,mBAAmB,0CAAE,yBAAyB,CACpE,CAAC,CACF,CAAC;YACN,CAAC,EACD,cAAc,EAAE,IAAI,CAAC,eAAe,GACpC,CACH,CAAC;IACJ,CAAC;IAED,kFAAkF;IACxE,wBAAwB,CAChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,YAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oCAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AAED,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState = (state as any)[UiFramework.frameworkStateKey];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n super(info, _options);\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n } else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
1
+ {"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CACxE,IAAI,EACJ,IAAI,CACL,CAAC,iBAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AACvB,MAAM,UAAU,eAAe,CAAC,EA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Ac,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACvD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS;oBACpC,WAAW,CAAC,WAAW,CAAC,mBAAmB,EAAE,yBAAyB,CACpE,CAAC,CACF,CAAC;YACN,CAAC,EACD,cAAc,EAAE,IAAI,CAAC,eAAe,GACpC,CACH,CAAC;IACJ,CAAC;IAED,kFAAkF;IACxE,wBAAwB,CAChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,YAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oCAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AAED,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState = (state as any)[UiFramework.frameworkStateKey];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n super(info, _options);\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n } else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
@@ -20,8 +20,7 @@ class InternalContentLayoutManager {
20
20
  * @returns the [[ContentLayoutDef]] if found, or undefined otherwise
21
21
  */
22
22
  static getForGroup(contentGroupProps, overrideContentLayout) {
23
- var _a;
24
- const layoutId = (_a = overrideContentLayout === null || overrideContentLayout === void 0 ? void 0 : overrideContentLayout.id) !== null && _a !== void 0 ? _a : contentGroupProps.layout.id;
23
+ const layoutId = overrideContentLayout?.id ?? contentGroupProps.layout.id;
25
24
  const layoutKey = this.getKey({
26
25
  contentGroupId: contentGroupProps.id,
27
26
  layoutId,
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContentLayoutManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,MAAa,4BAA4B;IAMvC,qEAAqE;IAC9D,MAAM,CAAC,MAAM,CAAC,KAGpB;QACC,OAAO,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,WAAW,CACvB,iBAA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BAAkB;QAClC,IAAI,YAAsC,CAAC;QAC3C,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;QAExE,IAAI,mBAAmB;YAAE,YAAY,GAAG,mBAAmB,CAAC,YAAY,CAAC;QAEzE,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3B,gBAAkC,EAClC,YAA0B;QAE1B,MAAM,yBAAyB,CAAC,eAAe,CAC7C,gBAAgB,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CACvC,YAA0B;QAE1B,MAAM,yBAAyB,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;OACG;IACI,MAAM,CAAC,aAAa;QACzB,uBAAuB;QACvB,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;QACxE,IACE,mBAAmB;YACnB,mBAAmB,CAAC,gBAAgB;YACpC,mBAAmB,CAAC,YAAY,EAChC;YACA,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,IAAI,CAAC;gBACzD,aAAa,EAAE,mBAAmB,CAAC,gBAAgB;gBACnD,YAAY,EAAE,mBAAmB,CAAC,YAAY;aAC/C,CAAC,CAAC;YAEH,mBAAmB,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;SACxD;IACH,CAAC;;AAtHc,wCAAW,GAAkC,IAAI,GAAG,EAGhE,CAAC;SAJO,4BAA4B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentGroup, ContentGroupProps } from \"./ContentGroup\";\nimport { ContentLayoutDef } from \"./ContentLayout\";\n\n/** ContentLayout Manager class.\n * @internal\n */\nexport class InternalContentLayoutManager {\n private static _layoutDefs: Map<string, ContentLayoutDef> = new Map<\n string,\n ContentLayoutDef\n >();\n\n /** build a layout key that is unique for group layout combination */\n public static getKey(props: {\n contentGroupId: string;\n layoutId: string;\n }): string {\n return `${props.contentGroupId}-${props.layoutId}`;\n }\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef {\n const layoutId = overrideContentLayout?.id ?? contentGroupProps.layout.id;\n const layoutKey = this.getKey({\n contentGroupId: contentGroupProps.id,\n layoutId,\n });\n\n if (\n !overrideContentLayout &&\n InternalContentLayoutManager._layoutDefs.has(layoutKey)\n ) {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n const newContentLayoutProps = {\n ...contentGroupProps.layout,\n ...overrideContentLayout,\n };\n const newLayoutDef = new ContentLayoutDef(newContentLayoutProps);\n this.add(layoutKey, newLayoutDef);\n return newLayoutDef;\n }\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static find(layoutKey: string): ContentLayoutDef | undefined {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n public static add(layoutId: string, layoutDef: ContentLayoutDef): void {\n InternalContentLayoutManager._layoutDefs.set(layoutId, layoutDef);\n }\n\n /** Gets the active Content Layout */\n public static get activeLayout(): ContentLayoutDef | undefined {\n let layoutDef: ContentLayoutDef | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) layoutDef = activeFrontstageDef.contentLayoutDef;\n\n return layoutDef;\n }\n\n /** Gets the active Content Group */\n public static get activeContentGroup(): ContentGroup | undefined {\n let contentGroup: ContentGroup | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) contentGroup = activeFrontstageDef.contentGroup;\n\n return contentGroup;\n }\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n public static async setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveLayout(\n contentLayoutDef,\n contentGroup\n );\n }\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n public static async setActiveContentGroup(\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveContentGroup(contentGroup);\n }\n\n /** Refreshes the active layout and content group.\n */\n public static refreshActive(): void {\n // istanbul ignore else\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (\n activeFrontstageDef &&\n activeFrontstageDef.contentLayoutDef &&\n activeFrontstageDef.contentGroup\n ) {\n UiFramework.frontstages.onContentLayoutActivatedEvent.emit({\n contentLayout: activeFrontstageDef.contentLayoutDef,\n contentGroup: activeFrontstageDef.contentGroup,\n });\n\n activeFrontstageDef.contentGroup.refreshContentNodes();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"InternalContentLayoutManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentLayoutManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,MAAa,4BAA4B;I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CAAC;QAExE,IAAI,mBAAmB;YAAE,SAAS,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;QAE1E,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,oCAAoC;IAC7B,MAAM,KAAK,kBAAkB;QAClC,IAAI,YAAsC,CAAC;QAC3C,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;QAExE,IAAI,mBAAmB;YAAE,YAAY,GAAG,mBAAmB,CAAC,YAAY,CAAC;QAEzE,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3B,gBAAkC,EAClC,YAA0B;QAE1B,MAAM,yBAAyB,CAAC,eAAe,CAC7C,gBAAgB,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CACvC,YAA0B;QAE1B,MAAM,yBAAyB,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;OACG;IACI,MAAM,CAAC,aAAa;QACzB,uBAAuB;QACvB,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;QACxE,IACE,mBAAmB;YACnB,mBAAmB,CAAC,gBAAgB;YACpC,mBAAmB,CAAC,YAAY,EAChC;YACA,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,IAAI,CAAC;gBACzD,aAAa,EAAE,mBAAmB,CAAC,gBAAgB;gBACnD,YAAY,EAAE,mBAAmB,CAAC,YAAY;aAC/C,CAAC,CAAC;YAEH,mBAAmB,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;SACxD;IACH,CAAC;;AAtHc,wCAAW,GAAkC,IAAI,GAAG,EAGhE,CAAC;SAJO,4BAA4B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ContentGroup, ContentGroupProps } from \"./ContentGroup\";\nimport { ContentLayoutDef } from \"./ContentLayout\";\n\n/** ContentLayout Manager class.\n * @internal\n */\nexport class InternalContentLayoutManager {\n private static _layoutDefs: Map<string, ContentLayoutDef> = new Map<\n string,\n ContentLayoutDef\n >();\n\n /** build a layout key that is unique for group layout combination */\n public static getKey(props: {\n contentGroupId: string;\n layoutId: string;\n }): string {\n return `${props.contentGroupId}-${props.layoutId}`;\n }\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef {\n const layoutId = overrideContentLayout?.id ?? contentGroupProps.layout.id;\n const layoutKey = this.getKey({\n contentGroupId: contentGroupProps.id,\n layoutId,\n });\n\n if (\n !overrideContentLayout &&\n InternalContentLayoutManager._layoutDefs.has(layoutKey)\n ) {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n const newContentLayoutProps = {\n ...contentGroupProps.layout,\n ...overrideContentLayout,\n };\n const newLayoutDef = new ContentLayoutDef(newContentLayoutProps);\n this.add(layoutKey, newLayoutDef);\n return newLayoutDef;\n }\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n public static find(layoutKey: string): ContentLayoutDef | undefined {\n return InternalContentLayoutManager._layoutDefs.get(layoutKey)!;\n }\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n public static add(layoutId: string, layoutDef: ContentLayoutDef): void {\n InternalContentLayoutManager._layoutDefs.set(layoutId, layoutDef);\n }\n\n /** Gets the active Content Layout */\n public static get activeLayout(): ContentLayoutDef | undefined {\n let layoutDef: ContentLayoutDef | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) layoutDef = activeFrontstageDef.contentLayoutDef;\n\n return layoutDef;\n }\n\n /** Gets the active Content Group */\n public static get activeContentGroup(): ContentGroup | undefined {\n let contentGroup: ContentGroup | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n if (activeFrontstageDef) contentGroup = activeFrontstageDef.contentGroup;\n\n return contentGroup;\n }\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n public static async setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveLayout(\n contentLayoutDef,\n contentGroup\n );\n }\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n public static async setActiveContentGroup(\n contentGroup: ContentGroup\n ): Promise<void> {\n await InternalFrontstageManager.setActiveContentGroup(contentGroup);\n }\n\n /** Refreshes the active layout and content group.\n */\n public static refreshActive(): void {\n // istanbul ignore else\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n if (\n activeFrontstageDef &&\n activeFrontstageDef.contentLayoutDef &&\n activeFrontstageDef.contentGroup\n ) {\n UiFramework.frontstages.onContentLayoutActivatedEvent.emit({\n contentLayout: activeFrontstageDef.contentLayoutDef,\n contentGroup: activeFrontstageDef.contentGroup,\n });\n\n activeFrontstageDef.contentGroup.refreshContentNodes();\n }\n }\n}\n"]}
@@ -31,7 +31,7 @@ class InternalContentViewManager {
31
31
  return this._activeContent;
32
32
  }
33
33
  static getControlFromElement(content, activeContentGroup, floatingControls, logIfNotFound = false) {
34
- if (floatingControls === null || floatingControls === void 0 ? void 0 : floatingControls.length) {
34
+ if (floatingControls?.length) {
35
35
  // if we find a React node that matches exactly, return its containing control
36
36
  let control = floatingControls.find((contentControl) => contentControl.reactNode === content);
37
37
  if (control)
@@ -1 +1 @@
1
- {"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAa,0BAA0B;IAOrC,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IAYD,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,MAAM,CAAC,qBAAqB,CAClC,OAAwB,EACxB,kBAA4C,EAC5C,gBAA8C,EAC9C,aAAa,GAAG,KAAK;QAErB,IAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,EAAE;YAC5B,8EAA8E;YA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ACvB,OAAO,4BAA4B,CAAC;IACtC,CAAC;;AAnQc,qCAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,kDAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,sDAA2B,GAChD,IAAI,yBAAyB,EAAE,CAAC;AAElC,wDAAwD;AAEjC,yDAA8B,GAAG,IAAI,OAAO,EAE/D,CAAC;SA1BM,0BAA0B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content 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 floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>).key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,sB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AQ,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,yBAAyB,CACrC,OAAmC;QAEnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,OAAmC;QAC/D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CACjC,OAAmC;QAEnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,4BAA4B,CAAC;IACtC,CAAC;IACD;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,4BAA4B,CAAC;IACtC,CAAC;;AAnQc,qCAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,kDAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,sDAA2B,GAChD,IAAI,yBAAyB,EAAE,CAAC;AAElC,wDAAwD;AAEjC,yDAA8B,GAAG,IAAI,OAAO,EAE/D,CAAC;SA1BM,0BAA0B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content 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 floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>).key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}