@itwin/appui-react 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/lib/cjs/appui-react/accudraw/MenuButton.d.ts +2 -2
  3. package/lib/cjs/appui-react/accudraw/MenuButton.d.ts.map +1 -1
  4. package/lib/cjs/appui-react/accudraw/MenuButton.js.map +1 -1
  5. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  6. package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
  7. package/lib/cjs/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/childwindow/CopyStyles.js +3 -1
  9. package/lib/cjs/appui-react/childwindow/CopyStyles.js.map +1 -1
  10. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  11. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +2 -1
  12. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  13. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts +6 -6
  14. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  15. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  16. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  17. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  18. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts +4 -4
  19. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
  20. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
  21. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +5 -5
  22. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  24. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +2 -2
  25. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  26. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  27. package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
  28. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts +1 -2
  29. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  30. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  31. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +22 -26
  32. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  33. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +185 -254
  34. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  35. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +1 -7
  36. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  37. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +0 -6
  38. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  39. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  40. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  41. package/lib/cjs/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  42. package/lib/cjs/appui-react/hooks/useActiveViewport.js.map +1 -1
  43. package/lib/cjs/appui-react/keyboardshortcut/InternalKeyboardShortcut.d.ts.map +1 -1
  44. package/lib/cjs/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
  45. package/lib/cjs/appui-react/messages/MessageManager.d.ts +0 -1
  46. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  47. package/lib/cjs/appui-react/messages/MessageManager.js +1 -2
  48. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  49. package/lib/cjs/appui-react/messages/Pointer.d.ts +1 -2
  50. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  51. package/lib/cjs/appui-react/messages/Pointer.js +1 -1
  52. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  53. package/lib/cjs/appui-react/popup/PositionPopup.d.ts +2 -2
  54. package/lib/cjs/appui-react/popup/PositionPopup.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/popup/PositionPopup.js.map +1 -1
  56. package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  57. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +16 -20
  58. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +80 -115
  60. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  61. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/statusfields/MessageCenter.js +1 -2
  63. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  64. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts +36 -0
  65. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts.map +1 -0
  66. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.js +134 -0
  67. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -0
  68. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +1 -1
  69. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +2 -2
  71. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  72. package/lib/cjs/appui-react/syncui/UiSyncEvent.d.ts +16 -0
  73. package/lib/cjs/appui-react/syncui/UiSyncEvent.d.ts.map +1 -0
  74. package/lib/cjs/appui-react/syncui/UiSyncEvent.js +18 -0
  75. package/lib/cjs/appui-react/syncui/UiSyncEvent.js.map +1 -0
  76. package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  77. package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
  78. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  79. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  80. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +7 -29
  81. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  82. package/lib/cjs/appui-react/widget-panels/Frontstage.js +101 -434
  83. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  84. package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
  85. package/lib/cjs/appui-react/widget-panels/ToolSettings.js +16 -3
  86. package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
  87. package/lib/cjs/appui-react/widgets/Widget.d.ts +10 -4
  88. package/lib/cjs/appui-react/widgets/Widget.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/widgets/Widget.js.map +1 -1
  90. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +9 -29
  91. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  92. package/lib/cjs/appui-react/widgets/WidgetDef.js +89 -46
  93. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  94. package/lib/cjs/appui-react.d.ts +1 -0
  95. package/lib/cjs/appui-react.d.ts.map +1 -1
  96. package/lib/cjs/appui-react.js +1 -0
  97. package/lib/cjs/appui-react.js.map +1 -1
  98. package/lib/esm/appui-react/accudraw/MenuButton.d.ts +2 -2
  99. package/lib/esm/appui-react/accudraw/MenuButton.d.ts.map +1 -1
  100. package/lib/esm/appui-react/accudraw/MenuButton.js.map +1 -1
  101. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  102. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  103. package/lib/esm/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
  104. package/lib/esm/appui-react/childwindow/CopyStyles.js +3 -1
  105. package/lib/esm/appui-react/childwindow/CopyStyles.js.map +1 -1
  106. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  107. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +2 -1
  108. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  109. package/lib/esm/appui-react/cursor/CursorInformation.d.ts +6 -6
  110. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  111. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  112. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  113. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  114. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts +4 -4
  115. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
  116. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
  117. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +5 -5
  118. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  119. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  120. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +2 -2
  121. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  122. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  123. package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
  124. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts +1 -2
  125. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  126. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  127. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +22 -26
  128. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  129. package/lib/esm/appui-react/frontstage/FrontstageDef.js +189 -258
  130. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  131. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +1 -7
  132. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  133. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +0 -6
  134. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  135. package/lib/esm/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  136. package/lib/esm/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  137. package/lib/esm/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  138. package/lib/esm/appui-react/hooks/useActiveViewport.js.map +1 -1
  139. package/lib/esm/appui-react/keyboardshortcut/InternalKeyboardShortcut.d.ts.map +1 -1
  140. package/lib/esm/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
  141. package/lib/esm/appui-react/messages/MessageManager.d.ts +0 -1
  142. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  143. package/lib/esm/appui-react/messages/MessageManager.js +1 -2
  144. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  145. package/lib/esm/appui-react/messages/Pointer.d.ts +1 -2
  146. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  147. package/lib/esm/appui-react/messages/Pointer.js +1 -1
  148. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  149. package/lib/esm/appui-react/popup/PositionPopup.d.ts +2 -2
  150. package/lib/esm/appui-react/popup/PositionPopup.d.ts.map +1 -1
  151. package/lib/esm/appui-react/popup/PositionPopup.js.map +1 -1
  152. package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  153. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +16 -20
  154. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  155. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +78 -114
  156. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  157. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  158. package/lib/esm/appui-react/statusfields/MessageCenter.js +1 -2
  159. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  160. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts +36 -0
  161. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts.map +1 -0
  162. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.js +130 -0
  163. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -0
  164. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +1 -1
  165. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  166. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +2 -2
  167. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  168. package/lib/esm/appui-react/syncui/UiSyncEvent.d.ts +16 -0
  169. package/lib/esm/appui-react/syncui/UiSyncEvent.d.ts.map +1 -0
  170. package/lib/esm/appui-react/syncui/UiSyncEvent.js +14 -0
  171. package/lib/esm/appui-react/syncui/UiSyncEvent.js.map +1 -0
  172. package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  173. package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
  174. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  175. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  176. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +7 -29
  177. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  178. package/lib/esm/appui-react/widget-panels/Frontstage.js +104 -433
  179. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  180. package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
  181. package/lib/esm/appui-react/widget-panels/ToolSettings.js +16 -3
  182. package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
  183. package/lib/esm/appui-react/widgets/Widget.d.ts +10 -4
  184. package/lib/esm/appui-react/widgets/Widget.d.ts.map +1 -1
  185. package/lib/esm/appui-react/widgets/Widget.js.map +1 -1
  186. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +9 -29
  187. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  188. package/lib/esm/appui-react/widgets/WidgetDef.js +89 -46
  189. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  190. package/lib/esm/appui-react.d.ts +1 -0
  191. package/lib/esm/appui-react.d.ts.map +1 -1
  192. package/lib/esm/appui-react.js +1 -0
  193. package/lib/esm/appui-react.js.map +1 -1
  194. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"appui-react.js","sourceRoot":"","sources":["../../src/appui-react.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;AAEhG,yIAAyI;AAEzI,4DAA0C,CAAC,+DAA+D;AAE1G,8EAA4D;AAC5D,wEAAsD;AACtD,mFAAiE;AACjE,8EAA4D;AAC5D,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,0EAAwD;AACxD,yEAAuD;AACvD,2EAAyD;AACzD,oEAAkD;AAClD,yEAAuD;AAEvD,4EAA0D;AAC1D,gFAA8D;AAC9D,wEAAsD;AACtD,iFAA+D;AAC/D,2EAAyD;AACzD,mFAAiE;AACjE,2FAAyE;AAEzE,qFAAmE;AACnE,qFAAmE;AACnE,qEAAmD;AAEnD,uEAAqD;AACrD,qEAAmD;AACnD,sEAAoD;AACpD,gFAA8D;AAC9D,wEAAsD;AACtD,2EAAyD;AACzD,+EAA6D;AAC7D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D,wEAAsD;AACtD,kFAAgE;AAChE,iFAA+D;AAC/D,wEAAsD;AACtD,uFAAqE;AACrE,2EAAyD;AACzD,+EAA6D;AAC7D,+DAA6C;AAC7C,qEAAmD;AACnD,sEAAoD;AACpD,kEAAgD;AAChD,mEAAiD;AACjD,sEAAoD;AACpD,oEAAkD;AAElD,6EAA2D;AAC3D,4EAA0D;AAC1D,yFAAuE;AAEvE;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n// cSpell:ignore safearea cursormenu clientservices oidc Textbox Modeless configurableui stagepanels dragdrop uiadmin itemsarbiter Popout\n\nexport * from \"./appui-react/UiFramework\"; // Please ensure that this line comes before all other exports.\n\nexport * from \"./appui-react/accudraw/AccuDrawCommandItems\";\nexport * from \"./appui-react/accudraw/AccuDrawDialog\";\nexport * from \"./appui-react/accudraw/AccuDrawKeyboardShortcuts\";\nexport * from \"./appui-react/accudraw/AccuDrawPopupManager\";\nexport * from \"./appui-react/accudraw/AccuDrawUiSettings\";\nexport * from \"./appui-react/accudraw/AccuDrawWidget\";\nexport * from \"./appui-react/accudraw/Calculator\";\nexport * from \"./appui-react/accudraw/CalculatorEngine\";\nexport * from \"./appui-react/accudraw/CalculatorPopup\";\nexport * from \"./appui-react/accudraw/FrameworkAccuDraw\";\nexport * from \"./appui-react/accudraw/MenuButton\";\nexport * from \"./appui-react/accudraw/MenuButtonPopup\";\n\nexport * from \"./appui-react/backstage/BackstageComposer\";\nexport * from \"./appui-react/backstage/BackstageComposerItem\";\nexport * from \"./appui-react/backstage/BackstageItem\";\nexport * from \"./appui-react/backstage/BackstageItemUtilities\";\nexport * from \"./appui-react/backstage/BackstageManager\";\nexport * from \"./appui-react/backstage/useDefaultBackstageItems\";\nexport * from \"./appui-react/backstage/useUiItemsProviderBackstageItems\";\n\nexport * from \"./appui-react/configurableui/ConfigurableUiContent\";\nexport * from \"./appui-react/configurableui/ConfigurableUiControl\";\nexport * from \"./appui-react/configurableui/state\";\n\nexport * from \"./appui-react/content/ContentControl\";\nexport * from \"./appui-react/content/ContentGroup\";\nexport * from \"./appui-react/content/ContentLayout\";\nexport * from \"./appui-react/content/FloatingViewportContent\";\nexport * from \"./appui-react/content/ViewStateHelper\";\nexport * from \"./appui-react/content/StageContentLayout\";\nexport * from \"./appui-react/content/ViewportContentControl\";\nexport * from \"./appui-react/content/IModelViewport\";\nexport * from \"./appui-react/content/DefaultViewOverlay\";\nexport * from \"./appui-react/content/split-pane/SplitPane\";\n\nexport * from \"./appui-react/cursor/CursorInformation\";\nexport * from \"./appui-react/cursor/cursorprompt/CursorPrompt\";\nexport * from \"./appui-react/cursor/cursorpopup/CursorPopup\";\nexport * from \"./appui-react/cursor/cursorpopup/CursorPopupManager\";\nexport * from \"./appui-react/cursor/cursormenu/CursorMenu\";\n\nexport * from \"./appui-react/dialog/DialogManagerBase\";\nexport * from \"./appui-react/dialog/ModalDialogManager\";\nexport * from \"./appui-react/dialog/ContentDialogManager\";\nexport * from \"./appui-react/dialog/ContentDialog\";\nexport * from \"./appui-react/dialog/ModelessDialog\";\nexport * from \"./appui-react/dialog/ModelessDialogManager\";\nexport * from \"./appui-react/dialog/StandardMessageBox\";\nexport * from \"./appui-react/dialog/UiDataProvidedDialog\";\n\nexport * from \"./appui-react/feedback/ValidationTextbox\";\nexport * from \"./appui-react/feedback/ElementTooltip\";\n\nexport * from \"./appui-react/framework/FrameworkBackstage\";\nexport * from \"./appui-react/framework/FrameworkChildWindows\";\nexport * from \"./appui-react/framework/FrameworkContent\";\nexport * from \"./appui-react/framework/FrameworkControls\";\nexport * from \"./appui-react/framework/FrameworkDialogs\";\nexport * from \"./appui-react/framework/FrameworkFrontstages\";\nexport * from \"./appui-react/framework/FrameworkKeyboardShortcuts\";\nexport * from \"./appui-react/framework/FrameworkToolSettings\";\nexport * from \"./appui-react/framework/FrameworkVisibility\";\n\nexport * from \"./appui-react/frontstage/FrontstageConfig\";\nexport * from \"./appui-react/frontstage/FrontstageDef\";\nexport * from \"./appui-react/frontstage/FrontstageProvider\";\nexport * from \"./appui-react/frontstage/ModalFrontstage\";\nexport * from \"./appui-react/frontstage/ModalSettingsStage\";\nexport * from \"./appui-react/frontstage/NestedFrontstage\";\nexport * from \"./appui-react/frontstage/StageUsage\";\nexport * from \"./appui-react/frontstage/StandardFrontstageProvider\";\n\nexport * from \"./appui-react/hooks/useActiveIModelConnection\";\nexport * from \"./appui-react/hooks/useActiveStageId\";\nexport * from \"./appui-react/hooks/useActiveViewport\";\nexport * from \"./appui-react/hooks/useAvailableUiItemsProviders\";\nexport * from \"./appui-react/hooks/useAnalysisAnimationDataProvider\";\nexport * from \"./appui-react/hooks/useScheduleAnimationDataProvider\";\nexport * from \"./appui-react/hooks/useSolarDataProvider\";\nexport * from \"./appui-react/hooks/useUiVisibility\";\n\nexport * from \"./appui-react/keyboardshortcut/KeyboardShortcut\";\nexport * from \"./appui-react/keyboardshortcut/KeyboardShortcutMenu\";\n\nexport * from \"./appui-react/messages/AppNotificationManager\";\nexport * from \"./appui-react/messages/InputField\";\nexport * from \"./appui-react/messages/MessageManager\";\nexport * from \"./appui-react/messages/Pointer\";\nexport * from \"./appui-react/messages/ReactNotifyMessageDetails\";\n\nexport * from \"./appui-react/navigationaids/CubeNavigationAidControl\";\nexport * from \"./appui-react/navigationaids/DrawingNavigationAidControl\";\nexport * from \"./appui-react/navigationaids/NavigationAidControl\";\nexport * from \"./appui-react/navigationaids/SheetNavigationAid\";\nexport * from \"./appui-react/navigationaids/SheetsModalFrontstage\";\nexport * from \"./appui-react/navigationaids/StandardRotationNavigationAid\";\n\nexport * from \"./appui-react/pickers/ListPicker\";\nexport * from \"./appui-react/pickers/ViewSelector\";\n\nexport * from \"./appui-react/popup/KeyinPalettePanel\";\nexport * from \"./appui-react/popup/KeyinPalettePopup\";\nexport * from \"./appui-react/popup/HTMLElementPopup\";\nexport * from \"./appui-react/popup/InputEditorPopup\";\nexport * from \"./appui-react/popup/PopupManager\";\nexport * from \"./appui-react/popup/PositionPopup\";\nexport * from \"./appui-react/popup/ToolbarPopup\";\n\nexport * from \"./appui-react/redux/SessionState\";\nexport * from \"./appui-react/redux/StateManager\";\nexport * from \"./appui-react/redux/FrameworkState\";\nexport * from \"./appui-react/redux/connectIModel\";\nexport * from \"./appui-react/redux/ReducerRegistry\";\nexport * from \"./appui-react/redux/redux-ts\";\n\nexport * from \"./appui-react/safearea/SafeAreaContext\";\nexport * from \"./appui-react/safearea/SafeAreaInsets\";\n\nexport * from \"./appui-react/selection/SelectionContextItemDef\";\nexport * from \"./appui-react/selection/HideIsolateEmphasizeManager\";\n\nexport * from \"./appui-react/settings/ui/UiSettingsPage\";\nexport * from \"./appui-react/settings/quantityformatting/QuantityFormat\";\nexport * from \"./appui-react/settings/quantityformatting/UnitSystemSelector\";\n\nexport * from \"./appui-react/shared/ActionButtonItemDef\";\nexport * from \"./appui-react/shared/AnyItemDef\";\nexport * from \"./appui-react/shared/AnyToolbarItemDef\";\nexport * from \"./appui-react/shared/CommandItemDef\";\nexport * from \"./appui-react/shared/CustomItemDef\";\nexport * from \"./appui-react/shared/CustomItemProps\";\nexport * from \"./appui-react/shared/GroupItemProps\";\nexport * from \"./appui-react/shared/ItemDefBase\";\nexport * from \"./appui-react/shared/ItemMap\";\nexport * from \"./appui-react/shared/ItemProps\";\nexport * from \"./appui-react/shared/MenuItem\";\nexport * from \"./appui-react/shared/SelectionScope\";\nexport * from \"./appui-react/shared/ToolItemDef\";\n\nexport * from \"./appui-react/stagepanels/StagePanelConfig\";\nexport * from \"./appui-react/stagepanels/StagePanelDef\";\nexport * from \"./appui-react/stagepanels/StagePanelLocation\";\nexport * from \"./appui-react/stagepanels/StagePanelSection\";\n\nexport * from \"./appui-react/statusbar/dialog/Dialog\";\nexport * from \"./appui-react/statusbar/Indicator\";\nexport * from \"./appui-react/statusbar/LabelIndicator\";\nexport * from \"./appui-react/statusbar/Separator\";\nexport * from \"./appui-react/statusbar/StatusBar\";\nexport * from \"./appui-react/statusbar/StatusBarWidgetControl\";\nexport * from \"./appui-react/statusbar/StatusBarComposer\";\nexport * from \"./appui-react/statusbar/StatusBarItem\";\nexport * from \"./appui-react/statusbar/StatusBarItemUtilities\";\nexport * from \"./appui-react/statusbar/StatusBarComposer\";\nexport * from \"./appui-react/statusbar/useUiItemsProviderStatusBarItems\";\nexport * from \"./appui-react/statusbar/useDefaultStatusBarItems\";\n\nexport * from \"./appui-react/statusfields/tileloading/TileLoadingIndicator\";\nexport * from \"./appui-react/statusfields/ActivityCenter\";\nexport * from \"./appui-react/statusfields/MessageCenter\";\nexport * from \"./appui-react/statusfields/SectionsField\";\nexport * from \"./appui-react/statusfields/SelectionCount\";\nexport * from \"./appui-react/statusfields/SelectionInfo\";\nexport * from \"./appui-react/statusfields/SelectionScope\";\nexport * from \"./appui-react/statusfields/SnapMode\";\nexport * from \"./appui-react/statusfields/ViewAttributes\";\nexport * from \"./appui-react/statusfields/toolassistance/ToolAssistanceField\";\n\nexport * from \"./appui-react/syncui/SyncUiEventDispatcher\";\n\nexport * from \"./appui-react/theme/ThemeManager\";\n\nexport * from \"./appui-react/timeline/ScheduleAnimationProvider\";\nexport * from \"./appui-react/timeline/AnalysisAnimationProvider\";\nexport * from \"./appui-react/timeline/SolarTimelineDataProvider\";\n\nexport * from \"./appui-react/toolbar/DragInteraction\";\nexport * from \"./appui-react/toolbar/GroupItem\";\nexport * from \"./appui-react/toolbar/Toolbar\";\nexport * from \"./appui-react/toolbar/ToolbarComposer\";\nexport * from \"./appui-react/toolbar/ToolbarHelper\";\nexport * from \"./appui-react/toolbar/ToolbarItem\";\nexport * from \"./appui-react/toolbar/ToolbarItemUtilities\";\nexport * from \"./appui-react/toolbar/ToolbarWithOverflow\";\nexport * from \"./appui-react/toolbar/useDefaultToolbarItems\";\nexport * from \"./appui-react/toolbar/useUiItemsProviderToolbarItems\";\n\nexport * from \"./appui-react/tools/CoreToolDefinitions\";\nexport * from \"./appui-react/tools/FrameworkToolAdmin\";\nexport * from \"./appui-react/tools/RestoreLayoutTool\";\nexport * from \"./appui-react/tools/ToolSettingsTools\";\n\nexport * from \"./appui-react/ui-items-provider/BaseUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/ProviderItem\";\nexport * from \"./appui-react/ui-items-provider/StandardContentToolsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardContentToolsUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardNavigationToolsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardStatusbarItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardStatusbarUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/UiItemsManager\";\nexport * from \"./appui-react/ui-items-provider/UiItemsProvider\";\n\nexport * from \"./appui-react/uiadmin/FrameworkUiAdmin\";\n\nexport * from \"./appui-react/uiprovider/DefaultDialogGridContainer\";\n\nexport * from \"./appui-react/uistate/AppUiSettings\";\nexport * from \"./appui-react/uistate/useUiStateStorage\";\n\nexport * from \"./appui-react/utils/ViewUtilities\";\nexport * from \"./appui-react/utils/PropsHelper\";\nexport * from \"./appui-react/utils/ToolbarButtonHelper\";\n\nexport * from \"./appui-react/widget-panels/Content\";\nexport * from \"./appui-react/widget-panels/Frontstage\";\nexport * from \"./appui-react/widget-panels/FrontstageContent\";\nexport * from \"./appui-react/widget-panels/ModalFrontstageComposer\";\nexport * from \"./appui-react/widget-panels/StatusBar\";\nexport * from \"./appui-react/widget-panels/Tab\";\nexport * from \"./appui-react/widget-panels/Toolbars\";\nexport * from \"./appui-react/widget-panels/ToolSettings\";\nexport * from \"./appui-react/widget-panels/useWidgetDirection\";\nexport * from \"./appui-react/widget-panels/useTransientState\";\n\nexport * from \"./appui-react/widgets/BackstageAppButton\";\nexport * from \"./appui-react/widgets/BasicNavigationWidget\";\nexport * from \"./appui-react/widgets/BasicToolWidget\";\nexport * from \"./appui-react/widgets/ContentToolWidgetComposer\";\nexport * from \"./appui-react/widgets/NavigationWidgetComposer\";\nexport * from \"./appui-react/widgets/StableWidgetDef\";\nexport * from \"./appui-react/widgets/StatusBarWidgetComposerControl\";\nexport * from \"./appui-react/widgets/ToolWidgetComposer\";\nexport * from \"./appui-react/widgets/ViewToolWidgetComposer\";\nexport * from \"./appui-react/widgets/Widget\";\nexport * from \"./appui-react/widgets/WidgetConfig\";\nexport * from \"./appui-react/widgets/WidgetControl\";\nexport * from \"./appui-react/widgets/WidgetDef\";\nexport * from \"./appui-react/widgets/WidgetHost\";\nexport * from \"./appui-react/widgets/WidgetManager\";\nexport * from \"./appui-react/widgets/WidgetState\";\n\nexport * from \"./appui-react/toolsettings/ToolInformation\";\nexport * from \"./appui-react/toolsettings/ToolUiProvider\";\nexport * from \"./appui-react/toolsettings/DefaultToolSettingsProvider\";\n\n/** @docs-package-description\n * The ui-framework package contains classes and components for specifying the application UI consisting of the\n * Backstage, Frontstages, Content Views, Tool Bars, Status Bars, Widgets and Panels.\n * For more information, see [learning about appui-react]($docs/learning/ui/appui-react/index.md).\n */\n/**\n * @docs-group-description AccuDraw\n * Classes and components providing a UI for AccuDraw, an aide for entering coordinate data.\n */\n/**\n * @docs-group-description Admin\n * APIs for various UI components, such as toolbars, buttons and menus.\n */\n/**\n * @docs-group-description Backstage\n * Classes for working with a Backstage\n */\n/**\n * @docs-group-description ConfigurableUi\n * Classes for working with the Application UI Configuration\n */\n/**\n * @docs-group-description ContentView\n * Classes for working with a Content View, Group, Layout or Control\n */\n/**\n * @docs-group-description Cursor\n * Cursor related information, components and events\n */\n/**\n * @docs-group-description Dialog\n * Classes for working with a dialog\n */\n/**\n * @docs-group-description Frontstage\n * Classes for working with a Frontstage\n */\n/**\n * @docs-group-description Hooks\n * Hook functions for use in Functional React Components.\n */\n/**\n * @docs-group-description IModelComponents\n * Classes for displaying information about an iModel\n */\n/**\n * @docs-group-description Item\n * Classes for working with an Item in a Tool Widget, Navigation Widget or Backstage\n */\n/**\n * @docs-group-description KeyboardShortcut\n * Classes for working with Keyboard Shortcuts\n */\n/**\n * @docs-group-description NavigationAids\n * Classes for working with Navigation Aids\n */\n/**\n * @docs-group-description Notification\n * Classes for working with a Notification or Message\n */\n/**\n * @docs-group-description ChildWindowManager\n * Classes for working with child windows.\n */\n/**\n * @docs-group-description Picker\n * Classes for working with various pickers\n */\n/**\n * @docs-group-description Popup\n * Classes for working with popup components\n */\n/**\n * @docs-group-description State\n * Classes for maintaining state\n */\n/**\n * @docs-group-description Settings\n * Classes and components used by settings pages displayed in the modal settings stage\n */\n/**\n * @docs-group-description StandardUiItemsProvider\n * Standard UiItemsProvider classes.\n */\n/**\n * @docs-group-description StatusBar\n * Classes for defining a StatusBar\n */\n/**\n * @docs-group-description SyncUi\n * Classes for informing UI components to sync/refresh their display\n */\n/**\n * @docs-group-description Timeline\n * Classes for working with a TimelineComponent\n */\n/**\n * @docs-group-description Toolbar\n * Classes used to construct a Toolbar\n */\n/**\n * @docs-group-description Tools\n * Core Tool definitions\n */\n/**\n * @docs-group-description ToolSettings\n * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/learning/ui/appui-react/toolsettings.md).\n */\n/**\n * @docs-group-description UiProvider\n * Interfaces and classes for specifying UI items to be inserted at runtime.\n */\n/**\n * @docs-group-description UiStateStorage\n * Interfaces and classes for persisting UI settings.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes for working with a UI and Redux.\n */\n/**\n * @docs-group-description Widget\n * Classes for working with a Widget\n */\n"]}
1
+ {"version":3,"file":"appui-react.js","sourceRoot":"","sources":["../../src/appui-react.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;AAEhG,yIAAyI;AAEzI,4DAA0C,CAAC,+DAA+D;AAE1G,8EAA4D;AAC5D,wEAAsD;AACtD,mFAAiE;AACjE,8EAA4D;AAC5D,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,0EAAwD;AACxD,yEAAuD;AACvD,2EAAyD;AACzD,oEAAkD;AAClD,yEAAuD;AAEvD,4EAA0D;AAC1D,gFAA8D;AAC9D,wEAAsD;AACtD,iFAA+D;AAC/D,2EAAyD;AACzD,mFAAiE;AACjE,2FAAyE;AAEzE,qFAAmE;AACnE,qFAAmE;AACnE,qEAAmD;AAEnD,uEAAqD;AACrD,qEAAmD;AACnD,sEAAoD;AACpD,gFAA8D;AAC9D,wEAAsD;AACtD,2EAAyD;AACzD,+EAA6D;AAC7D,uEAAqD;AACrD,2EAAyD;AACzD,6EAA2D;AAE3D,yEAAuD;AACvD,iFAA+D;AAC/D,+EAA6D;AAC7D,sFAAoE;AACpE,6EAA2D;AAE3D,yEAAuD;AACvD,0EAAwD;AACxD,4EAA0D;AAC1D,qEAAmD;AACnD,sEAAoD;AACpD,6EAA2D;AAC3D,0EAAwD;AACxD,4EAA0D;AAE1D,2EAAyD;AACzD,wEAAsD;AAEtD,6EAA2D;AAC3D,gFAA8D;AAC9D,2EAAyD;AACzD,4EAA0D;AAC1D,2EAAyD;AACzD,+EAA6D;AAC7D,qFAAmE;AACnE,gFAA8D;AAC9D,8EAA4D;AAE5D,4EAA0D;AAC1D,yEAAuD;AACvD,8EAA4D;AAC5D,2EAAyD;AACzD,8EAA4D;AAC5D,4EAA0D;A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ACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n// cSpell:ignore safearea cursormenu clientservices oidc Textbox Modeless configurableui stagepanels dragdrop uiadmin itemsarbiter Popout\n\nexport * from \"./appui-react/UiFramework\"; // Please ensure that this line comes before all other exports.\n\nexport * from \"./appui-react/accudraw/AccuDrawCommandItems\";\nexport * from \"./appui-react/accudraw/AccuDrawDialog\";\nexport * from \"./appui-react/accudraw/AccuDrawKeyboardShortcuts\";\nexport * from \"./appui-react/accudraw/AccuDrawPopupManager\";\nexport * from \"./appui-react/accudraw/AccuDrawUiSettings\";\nexport * from \"./appui-react/accudraw/AccuDrawWidget\";\nexport * from \"./appui-react/accudraw/Calculator\";\nexport * from \"./appui-react/accudraw/CalculatorEngine\";\nexport * from \"./appui-react/accudraw/CalculatorPopup\";\nexport * from \"./appui-react/accudraw/FrameworkAccuDraw\";\nexport * from \"./appui-react/accudraw/MenuButton\";\nexport * from \"./appui-react/accudraw/MenuButtonPopup\";\n\nexport * from \"./appui-react/backstage/BackstageComposer\";\nexport * from \"./appui-react/backstage/BackstageComposerItem\";\nexport * from \"./appui-react/backstage/BackstageItem\";\nexport * from \"./appui-react/backstage/BackstageItemUtilities\";\nexport * from \"./appui-react/backstage/BackstageManager\";\nexport * from \"./appui-react/backstage/useDefaultBackstageItems\";\nexport * from \"./appui-react/backstage/useUiItemsProviderBackstageItems\";\n\nexport * from \"./appui-react/configurableui/ConfigurableUiContent\";\nexport * from \"./appui-react/configurableui/ConfigurableUiControl\";\nexport * from \"./appui-react/configurableui/state\";\n\nexport * from \"./appui-react/content/ContentControl\";\nexport * from \"./appui-react/content/ContentGroup\";\nexport * from \"./appui-react/content/ContentLayout\";\nexport * from \"./appui-react/content/FloatingViewportContent\";\nexport * from \"./appui-react/content/ViewStateHelper\";\nexport * from \"./appui-react/content/StageContentLayout\";\nexport * from \"./appui-react/content/ViewportContentControl\";\nexport * from \"./appui-react/content/IModelViewport\";\nexport * from \"./appui-react/content/DefaultViewOverlay\";\nexport * from \"./appui-react/content/split-pane/SplitPane\";\n\nexport * from \"./appui-react/cursor/CursorInformation\";\nexport * from \"./appui-react/cursor/cursorprompt/CursorPrompt\";\nexport * from \"./appui-react/cursor/cursorpopup/CursorPopup\";\nexport * from \"./appui-react/cursor/cursorpopup/CursorPopupManager\";\nexport * from \"./appui-react/cursor/cursormenu/CursorMenu\";\n\nexport * from \"./appui-react/dialog/DialogManagerBase\";\nexport * from \"./appui-react/dialog/ModalDialogManager\";\nexport * from \"./appui-react/dialog/ContentDialogManager\";\nexport * from \"./appui-react/dialog/ContentDialog\";\nexport * from \"./appui-react/dialog/ModelessDialog\";\nexport * from \"./appui-react/dialog/ModelessDialogManager\";\nexport * from \"./appui-react/dialog/StandardMessageBox\";\nexport * from \"./appui-react/dialog/UiDataProvidedDialog\";\n\nexport * from \"./appui-react/feedback/ValidationTextbox\";\nexport * from \"./appui-react/feedback/ElementTooltip\";\n\nexport * from \"./appui-react/framework/FrameworkBackstage\";\nexport * from \"./appui-react/framework/FrameworkChildWindows\";\nexport * from \"./appui-react/framework/FrameworkContent\";\nexport * from \"./appui-react/framework/FrameworkControls\";\nexport * from \"./appui-react/framework/FrameworkDialogs\";\nexport * from \"./appui-react/framework/FrameworkFrontstages\";\nexport * from \"./appui-react/framework/FrameworkKeyboardShortcuts\";\nexport * from \"./appui-react/framework/FrameworkToolSettings\";\nexport * from \"./appui-react/framework/FrameworkVisibility\";\n\nexport * from \"./appui-react/frontstage/FrontstageConfig\";\nexport * from \"./appui-react/frontstage/FrontstageDef\";\nexport * from \"./appui-react/frontstage/FrontstageProvider\";\nexport * from \"./appui-react/frontstage/ModalFrontstage\";\nexport * from \"./appui-react/frontstage/ModalSettingsStage\";\nexport * from \"./appui-react/frontstage/NestedFrontstage\";\nexport * from \"./appui-react/frontstage/StageUsage\";\nexport * from \"./appui-react/frontstage/StandardFrontstageProvider\";\n\nexport * from \"./appui-react/hooks/useActiveIModelConnection\";\nexport * from \"./appui-react/hooks/useActiveStageId\";\nexport * from \"./appui-react/hooks/useActiveViewport\";\nexport * from \"./appui-react/hooks/useAvailableUiItemsProviders\";\nexport * from \"./appui-react/hooks/useAnalysisAnimationDataProvider\";\nexport * from \"./appui-react/hooks/useScheduleAnimationDataProvider\";\nexport * from \"./appui-react/hooks/useSolarDataProvider\";\nexport * from \"./appui-react/hooks/useUiVisibility\";\n\nexport * from \"./appui-react/keyboardshortcut/KeyboardShortcut\";\nexport * from \"./appui-react/keyboardshortcut/KeyboardShortcutMenu\";\n\nexport * from \"./appui-react/messages/AppNotificationManager\";\nexport * from \"./appui-react/messages/InputField\";\nexport * from \"./appui-react/messages/MessageManager\";\nexport * from \"./appui-react/messages/Pointer\";\nexport * from \"./appui-react/messages/ReactNotifyMessageDetails\";\n\nexport * from \"./appui-react/navigationaids/CubeNavigationAidControl\";\nexport * from \"./appui-react/navigationaids/DrawingNavigationAidControl\";\nexport * from \"./appui-react/navigationaids/NavigationAidControl\";\nexport * from \"./appui-react/navigationaids/SheetNavigationAid\";\nexport * from \"./appui-react/navigationaids/SheetsModalFrontstage\";\nexport * from \"./appui-react/navigationaids/StandardRotationNavigationAid\";\n\nexport * from \"./appui-react/pickers/ListPicker\";\nexport * from \"./appui-react/pickers/ViewSelector\";\n\nexport * from \"./appui-react/popup/KeyinPalettePanel\";\nexport * from \"./appui-react/popup/KeyinPalettePopup\";\nexport * from \"./appui-react/popup/HTMLElementPopup\";\nexport * from \"./appui-react/popup/InputEditorPopup\";\nexport * from \"./appui-react/popup/PopupManager\";\nexport * from \"./appui-react/popup/PositionPopup\";\nexport * from \"./appui-react/popup/ToolbarPopup\";\n\nexport * from \"./appui-react/redux/SessionState\";\nexport * from \"./appui-react/redux/StateManager\";\nexport * from \"./appui-react/redux/FrameworkState\";\nexport * from \"./appui-react/redux/connectIModel\";\nexport * from \"./appui-react/redux/ReducerRegistry\";\nexport * from \"./appui-react/redux/redux-ts\";\n\nexport * from \"./appui-react/safearea/SafeAreaContext\";\nexport * from \"./appui-react/safearea/SafeAreaInsets\";\n\nexport * from \"./appui-react/selection/SelectionContextItemDef\";\nexport * from \"./appui-react/selection/HideIsolateEmphasizeManager\";\n\nexport * from \"./appui-react/settings/ui/UiSettingsPage\";\nexport * from \"./appui-react/settings/quantityformatting/QuantityFormat\";\nexport * from \"./appui-react/settings/quantityformatting/UnitSystemSelector\";\n\nexport * from \"./appui-react/shared/ActionButtonItemDef\";\nexport * from \"./appui-react/shared/AnyItemDef\";\nexport * from \"./appui-react/shared/AnyToolbarItemDef\";\nexport * from \"./appui-react/shared/CommandItemDef\";\nexport * from \"./appui-react/shared/CustomItemDef\";\nexport * from \"./appui-react/shared/CustomItemProps\";\nexport * from \"./appui-react/shared/GroupItemProps\";\nexport * from \"./appui-react/shared/ItemDefBase\";\nexport * from \"./appui-react/shared/ItemMap\";\nexport * from \"./appui-react/shared/ItemProps\";\nexport * from \"./appui-react/shared/MenuItem\";\nexport * from \"./appui-react/shared/SelectionScope\";\nexport * from \"./appui-react/shared/ToolItemDef\";\n\nexport * from \"./appui-react/stagepanels/StagePanelConfig\";\nexport * from \"./appui-react/stagepanels/StagePanelDef\";\nexport * from \"./appui-react/stagepanels/StagePanelLocation\";\nexport * from \"./appui-react/stagepanels/StagePanelSection\";\n\nexport * from \"./appui-react/statusbar/dialog/Dialog\";\nexport * from \"./appui-react/statusbar/Indicator\";\nexport * from \"./appui-react/statusbar/LabelIndicator\";\nexport * from \"./appui-react/statusbar/Separator\";\nexport * from \"./appui-react/statusbar/StatusBar\";\nexport * from \"./appui-react/statusbar/StatusBarWidgetControl\";\nexport * from \"./appui-react/statusbar/StatusBarComposer\";\nexport * from \"./appui-react/statusbar/StatusBarItem\";\nexport * from \"./appui-react/statusbar/StatusBarItemUtilities\";\nexport * from \"./appui-react/statusbar/StatusBarComposer\";\nexport * from \"./appui-react/statusbar/useUiItemsProviderStatusBarItems\";\nexport * from \"./appui-react/statusbar/useDefaultStatusBarItems\";\n\nexport * from \"./appui-react/statusfields/tileloading/TileLoadingIndicator\";\nexport * from \"./appui-react/statusfields/ActivityCenter\";\nexport * from \"./appui-react/statusfields/MessageCenter\";\nexport * from \"./appui-react/statusfields/SectionsField\";\nexport * from \"./appui-react/statusfields/SelectionCount\";\nexport * from \"./appui-react/statusfields/SelectionInfo\";\nexport * from \"./appui-react/statusfields/SelectionScope\";\nexport * from \"./appui-react/statusfields/SnapMode\";\nexport * from \"./appui-react/statusfields/ViewAttributes\";\nexport * from \"./appui-react/statusfields/toolassistance/ToolAssistanceField\";\n\nexport * from \"./appui-react/syncui/SyncUiEventDispatcher\";\nexport * from \"./appui-react/syncui/UiSyncEvent\";\n\nexport * from \"./appui-react/theme/ThemeManager\";\n\nexport * from \"./appui-react/timeline/ScheduleAnimationProvider\";\nexport * from \"./appui-react/timeline/AnalysisAnimationProvider\";\nexport * from \"./appui-react/timeline/SolarTimelineDataProvider\";\n\nexport * from \"./appui-react/toolbar/DragInteraction\";\nexport * from \"./appui-react/toolbar/GroupItem\";\nexport * from \"./appui-react/toolbar/Toolbar\";\nexport * from \"./appui-react/toolbar/ToolbarComposer\";\nexport * from \"./appui-react/toolbar/ToolbarHelper\";\nexport * from \"./appui-react/toolbar/ToolbarItem\";\nexport * from \"./appui-react/toolbar/ToolbarItemUtilities\";\nexport * from \"./appui-react/toolbar/ToolbarWithOverflow\";\nexport * from \"./appui-react/toolbar/useDefaultToolbarItems\";\nexport * from \"./appui-react/toolbar/useUiItemsProviderToolbarItems\";\n\nexport * from \"./appui-react/tools/CoreToolDefinitions\";\nexport * from \"./appui-react/tools/FrameworkToolAdmin\";\nexport * from \"./appui-react/tools/RestoreLayoutTool\";\nexport * from \"./appui-react/tools/ToolSettingsTools\";\n\nexport * from \"./appui-react/ui-items-provider/BaseUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/ProviderItem\";\nexport * from \"./appui-react/ui-items-provider/StandardContentToolsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardContentToolsUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardNavigationToolsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardStatusbarItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/StandardStatusbarUiItemsProvider\";\nexport * from \"./appui-react/ui-items-provider/UiItemsManager\";\nexport * from \"./appui-react/ui-items-provider/UiItemsProvider\";\n\nexport * from \"./appui-react/uiadmin/FrameworkUiAdmin\";\n\nexport * from \"./appui-react/uiprovider/DefaultDialogGridContainer\";\n\nexport * from \"./appui-react/uistate/AppUiSettings\";\nexport * from \"./appui-react/uistate/useUiStateStorage\";\n\nexport * from \"./appui-react/utils/ViewUtilities\";\nexport * from \"./appui-react/utils/PropsHelper\";\nexport * from \"./appui-react/utils/ToolbarButtonHelper\";\n\nexport * from \"./appui-react/widget-panels/Content\";\nexport * from \"./appui-react/widget-panels/Frontstage\";\nexport * from \"./appui-react/widget-panels/FrontstageContent\";\nexport * from \"./appui-react/widget-panels/ModalFrontstageComposer\";\nexport * from \"./appui-react/widget-panels/StatusBar\";\nexport * from \"./appui-react/widget-panels/Tab\";\nexport * from \"./appui-react/widget-panels/Toolbars\";\nexport * from \"./appui-react/widget-panels/ToolSettings\";\nexport * from \"./appui-react/widget-panels/useWidgetDirection\";\nexport * from \"./appui-react/widget-panels/useTransientState\";\n\nexport * from \"./appui-react/widgets/BackstageAppButton\";\nexport * from \"./appui-react/widgets/BasicNavigationWidget\";\nexport * from \"./appui-react/widgets/BasicToolWidget\";\nexport * from \"./appui-react/widgets/ContentToolWidgetComposer\";\nexport * from \"./appui-react/widgets/NavigationWidgetComposer\";\nexport * from \"./appui-react/widgets/StableWidgetDef\";\nexport * from \"./appui-react/widgets/StatusBarWidgetComposerControl\";\nexport * from \"./appui-react/widgets/ToolWidgetComposer\";\nexport * from \"./appui-react/widgets/ViewToolWidgetComposer\";\nexport * from \"./appui-react/widgets/Widget\";\nexport * from \"./appui-react/widgets/WidgetConfig\";\nexport * from \"./appui-react/widgets/WidgetControl\";\nexport * from \"./appui-react/widgets/WidgetDef\";\nexport * from \"./appui-react/widgets/WidgetHost\";\nexport * from \"./appui-react/widgets/WidgetManager\";\nexport * from \"./appui-react/widgets/WidgetState\";\n\nexport * from \"./appui-react/toolsettings/ToolInformation\";\nexport * from \"./appui-react/toolsettings/ToolUiProvider\";\nexport * from \"./appui-react/toolsettings/DefaultToolSettingsProvider\";\n\n/** @docs-package-description\n * The ui-framework package contains classes and components for specifying the application UI consisting of the\n * Backstage, Frontstages, Content Views, Tool Bars, Status Bars, Widgets and Panels.\n * For more information, see [learning about appui-react]($docs/learning/ui/appui-react/index.md).\n */\n/**\n * @docs-group-description AccuDraw\n * Classes and components providing a UI for AccuDraw, an aide for entering coordinate data.\n */\n/**\n * @docs-group-description Admin\n * APIs for various UI components, such as toolbars, buttons and menus.\n */\n/**\n * @docs-group-description Backstage\n * Classes for working with a Backstage\n */\n/**\n * @docs-group-description ConfigurableUi\n * Classes for working with the Application UI Configuration\n */\n/**\n * @docs-group-description ContentView\n * Classes for working with a Content View, Group, Layout or Control\n */\n/**\n * @docs-group-description Cursor\n * Cursor related information, components and events\n */\n/**\n * @docs-group-description Dialog\n * Classes for working with a dialog\n */\n/**\n * @docs-group-description Frontstage\n * Classes for working with a Frontstage\n */\n/**\n * @docs-group-description Hooks\n * Hook functions for use in Functional React Components.\n */\n/**\n * @docs-group-description IModelComponents\n * Classes for displaying information about an iModel\n */\n/**\n * @docs-group-description Item\n * Classes for working with an Item in a Tool Widget, Navigation Widget or Backstage\n */\n/**\n * @docs-group-description KeyboardShortcut\n * Classes for working with Keyboard Shortcuts\n */\n/**\n * @docs-group-description NavigationAids\n * Classes for working with Navigation Aids\n */\n/**\n * @docs-group-description Notification\n * Classes for working with a Notification or Message\n */\n/**\n * @docs-group-description ChildWindowManager\n * Classes for working with child windows.\n */\n/**\n * @docs-group-description Picker\n * Classes for working with various pickers\n */\n/**\n * @docs-group-description Popup\n * Classes for working with popup components\n */\n/**\n * @docs-group-description State\n * Classes for maintaining state\n */\n/**\n * @docs-group-description Settings\n * Classes and components used by settings pages displayed in the modal settings stage\n */\n/**\n * @docs-group-description StandardUiItemsProvider\n * Standard UiItemsProvider classes.\n */\n/**\n * @docs-group-description StatusBar\n * Classes for defining a StatusBar\n */\n/**\n * @docs-group-description SyncUi\n * Classes for informing UI components to sync/refresh their display\n */\n/**\n * @docs-group-description Timeline\n * Classes for working with a TimelineComponent\n */\n/**\n * @docs-group-description Toolbar\n * Classes used to construct a Toolbar\n */\n/**\n * @docs-group-description Tools\n * Core Tool definitions\n */\n/**\n * @docs-group-description ToolSettings\n * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/learning/ui/appui-react/toolsettings.md).\n */\n/**\n * @docs-group-description UiProvider\n * Interfaces and classes for specifying UI items to be inserted at runtime.\n */\n/**\n * @docs-group-description UiStateStorage\n * Interfaces and classes for persisting UI settings.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes for working with a UI and Redux.\n */\n/**\n * @docs-group-description Widget\n * Classes for working with a Widget\n */\n"]}
@@ -3,13 +3,13 @@
3
3
  */
4
4
  import "./MenuButton.scss";
5
5
  import * as React from "react";
6
- import type { PointProps } from "@itwin/appui-abstract";
6
+ import type { XAndY } from "@itwin/core-geometry";
7
7
  import type { SizeProps } from "@itwin/core-react";
8
8
  import type { SquareButtonProps } from "./SquareButton";
9
9
  /** @alpha */
10
10
  export interface MenuButtonProps extends SquareButtonProps {
11
11
  /** Center point */
12
- point: PointProps;
12
+ point: XAndY;
13
13
  /** Function called when size is known. */
14
14
  onSizeKnown?: (size: SizeProps) => void;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/MenuButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,aAAa;AACb,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,mBAAmB;IACnB,KAAK,EAAE,UAAU,CAAC;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAED,gBAAgB;AAChB,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,aAAa;AACb,qBAAa,UAAW,SAAQ,KAAK,CAAC,aAAa,CACjD,eAAe,EACf,eAAe,CAChB;IACC,OAAO,CAAC,KAAK,CAA4B;gBAE7B,KAAK,EAAE,eAAe;IAQlB,MAAM;IAuCtB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,KAAK,CAKX;IAEF,OAAO,CAAC,YAAY,CAOlB;IAGF,OAAO,CAAC,YAAY,CAElB;CACH"}
1
+ {"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/MenuButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CA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ACV,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE;oBACV,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBAClB,CAAC,EACD,aAAa,EAAE,CAAC,EAChB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,cAAc,EAAE,IAAI,CAAC,YAAY,EACjC,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC3B,QAAQ,EAAE,KAAK,IAEd,IAAI,CAAC,KAAK,CAAC,QAAQ,CACR,CACV,CACP,CAAC;IACJ,CAAC;IAEO,SAAS,CAAC,GAA0B;QAC1C,uBAAuB;QACvB,IAAI,GAAG,EAAE;YACP,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;YACzC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAE/C,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW;gBAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC1D;IACH,CAAC;CAsBF","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 AccuDraw\n */\n\nimport \"./MenuButton.scss\";\nimport * as React from \"react\";\nimport type { PointProps } from \"@itwin/appui-abstract\";\nimport type { SizeProps } from \"@itwin/core-react\";\nimport { ContextMenu, Icon, Size } from \"@itwin/core-react\";\nimport type { SquareButtonProps } from \"./SquareButton\";\nimport { SquareButton } from \"./SquareButton\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\n\n/** @alpha */\nexport interface MenuButtonProps extends SquareButtonProps {\n /** Center point */\n point: PointProps;\n /** Function called when size is known. */\n onSizeKnown?: (size: SizeProps) => void;\n}\n\n/** @internal */\ninterface MenuButtonState {\n expanded: boolean;\n}\n\n/** @alpha */\nexport class MenuButton extends React.PureComponent<\n MenuButtonProps,\n MenuButtonState\n> {\n private _menu: ContextMenu | null = null;\n\n constructor(props: MenuButtonProps) {\n super(props);\n\n this.state = {\n expanded: false,\n };\n }\n\n public override render() {\n const { point, className, style, onSizeKnown, ...buttonProps } = this.props;\n\n const divStyle: React.CSSProperties = {\n top: point.y,\n left: point.x,\n };\n\n return (\n <div\n className=\"uifw-menu-button\"\n style={divStyle}\n ref={(e) => this.setDivRef(e)}\n >\n <SquareButton\n {...buttonProps}\n className={className}\n style={style}\n onClick={this._handleClick}\n >\n <Icon iconSpec={<SvgMore />} />\n </SquareButton>\n <ContextMenu\n ref={(el) => {\n this._menu = el;\n }}\n selectedIndex={0}\n onSelect={this._handleClose}\n onOutsideClick={this._handleClose}\n onEsc={this._handleClose}\n opened={this.state.expanded}\n autoflip={false}\n >\n {this.props.children}\n </ContextMenu>\n </div>\n );\n }\n\n private setDivRef(div: HTMLDivElement | null) {\n // istanbul ignore else\n if (div) {\n const rect = div.getBoundingClientRect();\n const size = new Size(rect.width, rect.height);\n\n // istanbul ignore else\n if (this.props.onSizeKnown) this.props.onSizeKnown(size);\n }\n }\n\n private _open = () => {\n this.setState({ expanded: true }, () => {\n // istanbul ignore else\n if (this._menu) this._menu.focus();\n });\n };\n\n private _handleClick = (event: any) => {\n if (this.state.expanded) {\n event.stopPropagation();\n this.setState({ expanded: false });\n } else {\n this._open();\n }\n };\n\n // istanbul ignore next\n private _handleClose = () => {\n this.setState({ expanded: false });\n };\n}\n"]}
1
+ {"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/MenuButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,IAAI,EAA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,EAAE,KAAK,CAAC,CAAC;SACd,CAAC;QAEF,OAAO,CACL,6BACE,SAAS,EAAC,kBAAkB,EAC5B,KAAK,EAAE,QAAQ,EACf,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YAE7B,oBAAC,YAAY,OACP,WAAW,EACf,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,YAAY;gBAE1B,oBAAC,IAAI,IAAC,QAAQ,EAAE,oBAAC,OAAO,OAAG,GAAI,CAClB;YACf,oBAAC,WAAW,IACV,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE;oBACV,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBAClB,CAAC,EACD,aAAa,EAAE,CAAC,EAChB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,cAAc,EAAE,IAAI,CAAC,YAAY,EACjC,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC3B,QAAQ,EAAE,KAAK,IAEd,IAAI,CAAC,KAAK,CAAC,QAAQ,CACR,CACV,CACP,CAAC;IACJ,CAAC;IAEO,SAAS,CAAC,GAA0B;QAC1C,uBAAuB;QACvB,IAAI,GAAG,EAAE;YACP,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;YACzC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAE/C,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW;gBAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC1D;IACH,CAAC;CAsBF","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 AccuDraw\n */\n\nimport \"./MenuButton.scss\";\nimport * as React from \"react\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport type { SizeProps } from \"@itwin/core-react\";\nimport { ContextMenu, Icon, Size } from \"@itwin/core-react\";\nimport type { SquareButtonProps } from \"./SquareButton\";\nimport { SquareButton } from \"./SquareButton\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\n\n/** @alpha */\nexport interface MenuButtonProps extends SquareButtonProps {\n /** Center point */\n point: XAndY;\n /** Function called when size is known. */\n onSizeKnown?: (size: SizeProps) => void;\n}\n\n/** @internal */\ninterface MenuButtonState {\n expanded: boolean;\n}\n\n/** @alpha */\nexport class MenuButton extends React.PureComponent<\n MenuButtonProps,\n MenuButtonState\n> {\n private _menu: ContextMenu | null = null;\n\n constructor(props: MenuButtonProps) {\n super(props);\n\n this.state = {\n expanded: false,\n };\n }\n\n public override render() {\n const { point, className, style, onSizeKnown, ...buttonProps } = this.props;\n\n const divStyle: React.CSSProperties = {\n top: point.y,\n left: point.x,\n };\n\n return (\n <div\n className=\"uifw-menu-button\"\n style={divStyle}\n ref={(e) => this.setDivRef(e)}\n >\n <SquareButton\n {...buttonProps}\n className={className}\n style={style}\n onClick={this._handleClick}\n >\n <Icon iconSpec={<SvgMore />} />\n </SquareButton>\n <ContextMenu\n ref={(el) => {\n this._menu = el;\n }}\n selectedIndex={0}\n onSelect={this._handleClose}\n onOutsideClick={this._handleClose}\n onEsc={this._handleClose}\n opened={this.state.expanded}\n autoflip={false}\n >\n {this.props.children}\n </ContextMenu>\n </div>\n );\n }\n\n private setDivRef(div: HTMLDivElement | null) {\n // istanbul ignore else\n if (div) {\n const rect = div.getBoundingClientRect();\n const size = new Size(rect.width, rect.height);\n\n // istanbul ignore else\n if (this.props.onSizeKnown) this.props.onSizeKnown(size);\n }\n }\n\n private _open = () => {\n this.setState({ expanded: true }, () => {\n // istanbul ignore else\n if (this._menu) this._menu.focus();\n });\n };\n\n private _handleClick = (event: any) => {\n if (this.state.expanded) {\n event.stopPropagation();\n this.setState({ expanded: false });\n } else {\n this._open();\n }\n };\n\n // istanbul ignore next\n private _handleClose = () => {\n this.setState({ expanded: false });\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAYrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ErD,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvE,gBAAgB;AAChB,eAAO,MAAM,eAAe,UACnB,cAAc,aAAa,CAAC,iBA0BpC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,gGAAgG;IAChG,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,mHAAmH;IACnH,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,wFAAwF;IACxF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAmE9D"}
1
+ {"version":3,"file":"BackstageComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC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AAC,CAAC,CAAC,CACF,YAAY,CACb,CAAC;IACJ,CAAC,CAAC,CACH,CACY,CAChB,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 Backstage\n */\n\nimport * as React from \"react\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport {\n BackstageSeparator,\n Backstage as NZ_Backstage,\n} from \"@itwin/appui-layout-react\";\nimport { SafeAreaContext } from \"../safearea/SafeAreaContext\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\nimport { BackstageComposerItem } from \"./BackstageComposerItem\";\nimport { useBackstageManager, useIsBackstageOpen } from \"./BackstageManager\";\nimport { useDefaultBackstageItems } from \"./useDefaultBackstageItems\";\nimport { useUiItemsProviderBackstageItems } from \"./useUiItemsProviderBackstageItems\";\nimport { toLayoutSafeAreaInsets } from \"../safearea/SafeAreaHelpers\";\nimport type { BackstageItem } from \"./BackstageItem\";\nimport { isBackstageStageLauncher } from \"./BackstageItem\";\nimport { BackstageItemsManager } from \"./BackstageItemsManager\";\n\n// cSpell:ignore safearea\n\n/** Private function to set up sync event monitoring of backstage items */\nfunction useBackstageItemSyncEffect(\n itemsManager: BackstageItemsManager,\n syncIdsOfInterest: string[]\n) {\n const isInitialMount = React.useRef(true);\n\n React.useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n // initialize the display state of any items with syncIds/condition defined\n itemsManager.refreshAffectedItems(new Set(syncIdsOfInterest));\n }\n\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (0 === syncIdsOfInterest.length) return;\n\n // istanbul ignore else\n if (\n syncIdsOfInterest.some((value: string): boolean =>\n args.eventIds.has(value.toLowerCase())\n )\n ) {\n // process each item that has interest\n itemsManager.refreshAffectedItems(args.eventIds);\n }\n });\n }, [itemsManager, itemsManager.items, syncIdsOfInterest]);\n}\n\n/** local function to combine items from Stage and from Extensions */\nfunction combineItems(\n stageItems: ReadonlyArray<BackstageItem>,\n addonItems: ReadonlyArray<BackstageItem>,\n hideSoloStageEntry: boolean\n): ReadonlyArray<BackstageItem> {\n let items: Array<BackstageItem> = [];\n if (stageItems.length) {\n // Walk through each and ensure no duplicate ids are added.\n stageItems.forEach((srcItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n items.push(srcItem);\n }\n });\n }\n if (addonItems.length) {\n // Walk through each and ensure no duplicate ids are added.\n addonItems.forEach((srcItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n items.push(srcItem);\n }\n });\n }\n\n if (hideSoloStageEntry) {\n // per user request don't show stage launcher if only one stage is available\n const numberOfFrontstageItems = items.reduce(\n (accumulator, item) =>\n accumulator + (isBackstageStageLauncher(item) ? 1 : 0),\n 0\n );\n if (1 === numberOfFrontstageItems)\n items = items.filter((item) => !isBackstageStageLauncher(item));\n }\n\n return items;\n}\n\n/** @internal */\nexport type GroupedItems = ReadonlyArray<ReadonlyArray<BackstageItem>>;\n\n/** @internal */\nexport const useGroupedItems = (\n items: ReadonlyArray<BackstageItem>\n): GroupedItems => {\n return React.useMemo(() => {\n const grouped = items.reduce<GroupedItems>((acc, item) => {\n if (ConditionalBooleanValue.getValue(item.isHidden)) return acc;\n const groupIndex = acc.findIndex(\n (group) => group[0].groupPriority === item.groupPriority\n );\n if (groupIndex >= 0)\n return [\n ...acc.slice(0, groupIndex),\n [...acc[groupIndex], item],\n ...acc.slice(groupIndex + 1),\n ];\n return [...acc, [item]];\n }, []);\n const sortedGroups = grouped.reduce<GroupedItems>((acc, group) => {\n const sortedGroup = [...group].sort(\n (a, b) => a.itemPriority - b.itemPriority\n );\n return [...acc, sortedGroup];\n }, []);\n return [...sortedGroups].sort(\n (a, b) => a[0].groupPriority - b[0].groupPriority\n );\n }, [items]);\n};\n\n/** Props of [[BackstageComposer]] component.\n * @public\n */\nexport interface BackstageComposerProps extends CommonProps {\n /** React node for an optional header item */\n readonly header?: React.ReactNode;\n /** Indicates whether to place an overlay over the frontstage when the backstage is displayed */\n readonly showOverlay?: boolean;\n /** List of static backstage items to show. Can be undefined in UiItemsProviders are used to populate backstage. */\n readonly items?: BackstageItem[];\n /** If true and only one stage launcher item is found, do not show entry in backstage */\n readonly hideSoloStageEntry?: boolean;\n}\n\n/** Backstage component composed from [[UiFramework.backstage]] items.\n * @public\n */\nexport function BackstageComposer(props: BackstageComposerProps) {\n const [defaultItemsManager, setDefaultItemsManager] = React.useState(\n new BackstageItemsManager(props.items)\n );\n const initialItems = React.useRef(props.items);\n\n React.useEffect(() => {\n if (initialItems.current !== props.items) {\n initialItems.current = props.items;\n setDefaultItemsManager(new BackstageItemsManager(props.items));\n }\n }, [props.items]);\n\n const manager = useBackstageManager();\n const isOpen = useIsBackstageOpen(manager);\n const safeAreaInsets = React.useContext(SafeAreaContext);\n const handleClose = React.useCallback(() => {\n manager.close();\n }, [manager]);\n\n const defaultItems = useDefaultBackstageItems(defaultItemsManager);\n const syncIdsOfInterest = React.useMemo(\n () => BackstageItemsManager.getSyncIdsOfInterest(defaultItems),\n [defaultItems]\n );\n useBackstageItemSyncEffect(defaultItemsManager, syncIdsOfInterest);\n\n const [addonItemsManager] = React.useState(new BackstageItemsManager());\n const addonItems = useUiItemsProviderBackstageItems(addonItemsManager);\n const addonSyncIdsOfInterest = React.useMemo(\n () => BackstageItemsManager.getSyncIdsOfInterest(addonItems),\n [addonItems]\n );\n useBackstageItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);\n\n const combinedBackstageItems = React.useMemo(\n () => combineItems(defaultItems, addonItems, !!props.hideSoloStageEntry),\n [defaultItems, addonItems, props.hideSoloStageEntry]\n );\n const groups = useGroupedItems(combinedBackstageItems);\n return (\n <NZ_Backstage\n className={props.className}\n header={props.header}\n isOpen={isOpen}\n onClose={handleClose}\n safeAreaInsets={toLayoutSafeAreaInsets(safeAreaInsets)}\n showOverlay={props.showOverlay}\n style={props.style}\n >\n {groups.map((group, groupIndex) =>\n group.map((item, itemIndex) => {\n const composerItem = (\n <BackstageComposerItem item={item} key={item.id} />\n );\n return itemIndex === 0 && groupIndex > 0 ? (\n <React.Fragment key={groupIndex}>\n <BackstageSeparator />\n {composerItem}\n </React.Fragment>\n ) : (\n composerItem\n );\n })\n )}\n </NZ_Backstage>\n );\n}\n"]}
1
+ {"version":3,"file":"BackstageComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageComposer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EACL,kBAAkB,EAClB,SAAS,IAAI,YAAY,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,yBAAyB;AAEzB,0EAA0E;AAC1E,SAAS,0BAA0B,CACjC,YAAmC,EACnC,iBAA2B;IAE3B,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI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,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,EACxE,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,kBAAkB,CAAC,CACrD,CAAC;IACF,MAAM,MAAM,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;IACvD,OAAO,CACL,oBAAC,YAAY,IACX,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,sBAAsB,CAAC,cAAc,CAAC,EACtD,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,IAEjB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,CAChC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;QAC5B,MAAM,YAAY,GAAG,CACnB,oBAAC,qBAAqB,IAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAI,CACpD,CAAC;QACF,OAAO,SAAS,KAAK,CAAC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CACzC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,UAAU;YAC7B,oBAAC,kBAAkB,OAAG;YACrB,YAAY,CACE,CAClB,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CAAC;IACJ,CAAC,CAAC,CACH,CACY,CAChB,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 Backstage\n */\n\nimport * as React from \"react\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport {\n BackstageSeparator,\n Backstage as NZ_Backstage,\n} from \"@itwin/appui-layout-react\";\nimport { SafeAreaContext } from \"../safearea/SafeAreaContext\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\nimport { BackstageComposerItem } from \"./BackstageComposerItem\";\nimport { useBackstageManager, useIsBackstageOpen } from \"./BackstageManager\";\nimport { useDefaultBackstageItems } from \"./useDefaultBackstageItems\";\nimport { useUiItemsProviderBackstageItems } from \"./useUiItemsProviderBackstageItems\";\nimport { toLayoutSafeAreaInsets } from \"../safearea/SafeAreaHelpers\";\nimport type { BackstageItem } from \"./BackstageItem\";\nimport { isBackstageStageLauncher } from \"./BackstageItem\";\nimport { BackstageItemsManager } from \"./BackstageItemsManager\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent\";\n\n// cSpell:ignore safearea\n\n/** Private function to set up sync event monitoring of backstage items */\nfunction useBackstageItemSyncEffect(\n itemsManager: BackstageItemsManager,\n syncIdsOfInterest: string[]\n) {\n const isInitialMount = React.useRef(true);\n\n React.useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n // initialize the display state of any items with syncIds/condition defined\n itemsManager.refreshAffectedItems(new Set(syncIdsOfInterest));\n }\n\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(\n (args: UiSyncEventArgs) => {\n if (0 === syncIdsOfInterest.length) return;\n\n // istanbul ignore else\n if (\n syncIdsOfInterest.some((value: string): boolean =>\n args.eventIds.has(value.toLowerCase())\n )\n ) {\n // process each item that has interest\n itemsManager.refreshAffectedItems(args.eventIds);\n }\n }\n );\n }, [itemsManager, itemsManager.items, syncIdsOfInterest]);\n}\n\n/** local function to combine items from Stage and from Extensions */\nfunction combineItems(\n stageItems: ReadonlyArray<BackstageItem>,\n addonItems: ReadonlyArray<BackstageItem>,\n hideSoloStageEntry: boolean\n): ReadonlyArray<BackstageItem> {\n let items: Array<BackstageItem> = [];\n if (stageItems.length) {\n // Walk through each and ensure no duplicate ids are added.\n stageItems.forEach((srcItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n items.push(srcItem);\n }\n });\n }\n if (addonItems.length) {\n // Walk through each and ensure no duplicate ids are added.\n addonItems.forEach((srcItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n items.push(srcItem);\n }\n });\n }\n\n if (hideSoloStageEntry) {\n // per user request don't show stage launcher if only one stage is available\n const numberOfFrontstageItems = items.reduce(\n (accumulator, item) =>\n accumulator + (isBackstageStageLauncher(item) ? 1 : 0),\n 0\n );\n if (1 === numberOfFrontstageItems)\n items = items.filter((item) => !isBackstageStageLauncher(item));\n }\n\n return items;\n}\n\n/** @internal */\nexport type GroupedItems = ReadonlyArray<ReadonlyArray<BackstageItem>>;\n\n/** @internal */\nexport const useGroupedItems = (\n items: ReadonlyArray<BackstageItem>\n): GroupedItems => {\n return React.useMemo(() => {\n const grouped = items.reduce<GroupedItems>((acc, item) => {\n if (ConditionalBooleanValue.getValue(item.isHidden)) return acc;\n const groupIndex = acc.findIndex(\n (group) => group[0].groupPriority === item.groupPriority\n );\n if (groupIndex >= 0)\n return [\n ...acc.slice(0, groupIndex),\n [...acc[groupIndex], item],\n ...acc.slice(groupIndex + 1),\n ];\n return [...acc, [item]];\n }, []);\n const sortedGroups = grouped.reduce<GroupedItems>((acc, group) => {\n const sortedGroup = [...group].sort(\n (a, b) => a.itemPriority - b.itemPriority\n );\n return [...acc, sortedGroup];\n }, []);\n return [...sortedGroups].sort(\n (a, b) => a[0].groupPriority - b[0].groupPriority\n );\n }, [items]);\n};\n\n/** Props of [[BackstageComposer]] component.\n * @public\n */\nexport interface BackstageComposerProps extends CommonProps {\n /** React node for an optional header item */\n readonly header?: React.ReactNode;\n /** Indicates whether to place an overlay over the frontstage when the backstage is displayed */\n readonly showOverlay?: boolean;\n /** List of static backstage items to show. Can be undefined in UiItemsProviders are used to populate backstage. */\n readonly items?: BackstageItem[];\n /** If true and only one stage launcher item is found, do not show entry in backstage */\n readonly hideSoloStageEntry?: boolean;\n}\n\n/** Backstage component composed from [[UiFramework.backstage]] items.\n * @public\n */\nexport function BackstageComposer(props: BackstageComposerProps) {\n const [defaultItemsManager, setDefaultItemsManager] = React.useState(\n new BackstageItemsManager(props.items)\n );\n const initialItems = React.useRef(props.items);\n\n React.useEffect(() => {\n if (initialItems.current !== props.items) {\n initialItems.current = props.items;\n setDefaultItemsManager(new BackstageItemsManager(props.items));\n }\n }, [props.items]);\n\n const manager = useBackstageManager();\n const isOpen = useIsBackstageOpen(manager);\n const safeAreaInsets = React.useContext(SafeAreaContext);\n const handleClose = React.useCallback(() => {\n manager.close();\n }, [manager]);\n\n const defaultItems = useDefaultBackstageItems(defaultItemsManager);\n const syncIdsOfInterest = React.useMemo(\n () => BackstageItemsManager.getSyncIdsOfInterest(defaultItems),\n [defaultItems]\n );\n useBackstageItemSyncEffect(defaultItemsManager, syncIdsOfInterest);\n\n const [addonItemsManager] = React.useState(new BackstageItemsManager());\n const addonItems = useUiItemsProviderBackstageItems(addonItemsManager);\n const addonSyncIdsOfInterest = React.useMemo(\n () => BackstageItemsManager.getSyncIdsOfInterest(addonItems),\n [addonItems]\n );\n useBackstageItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);\n\n const combinedBackstageItems = React.useMemo(\n () => combineItems(defaultItems, addonItems, !!props.hideSoloStageEntry),\n [defaultItems, addonItems, props.hideSoloStageEntry]\n );\n const groups = useGroupedItems(combinedBackstageItems);\n return (\n <NZ_Backstage\n className={props.className}\n header={props.header}\n isOpen={isOpen}\n onClose={handleClose}\n safeAreaInsets={toLayoutSafeAreaInsets(safeAreaInsets)}\n showOverlay={props.showOverlay}\n style={props.style}\n >\n {groups.map((group, groupIndex) =>\n group.map((item, itemIndex) => {\n const composerItem = (\n <BackstageComposerItem item={item} key={item.id} />\n );\n return itemIndex === 0 && groupIndex > 0 ? (\n <React.Fragment key={groupIndex}>\n <BackstageSeparator />\n {composerItem}\n </React.Fragment>\n ) : (\n composerItem\n );\n })\n )}\n </NZ_Backstage>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CopyStyles.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/CopyStyles.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,QAAQ,EACnB,SAAS,GAAE,QAAmB,QA4B/B"}
1
+ {"version":3,"file":"CopyStyles.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/CopyStyles.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,QAAQ,EACnB,SAAS,GAAE,QAAmB,QA+B/B"}
@@ -9,7 +9,9 @@
9
9
  * @internal
10
10
  */
11
11
  export function copyStyles(targetDoc, sourceDoc = document) {
12
- const stylesheets = Array.from(sourceDoc.styleSheets);
12
+ const stylesheets = sourceDoc.adoptedStyleSheets
13
+ ? Array.from([...sourceDoc.styleSheets, ...sourceDoc.adoptedStyleSheets])
14
+ : Array.from(sourceDoc.styleSheets);
13
15
  // istanbul ignore next
14
16
  stylesheets.forEach((stylesheet) => {
15
17
  const css = stylesheet;
@@ -1 +1 @@
1
- {"version":3,"file":"CopyStyles.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/CopyStyles.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,SAAmB,EACnB,YAAsB,QAAQ;IAE9B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACtD,uBAAuB;IACvB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,MAAM,GAAG,GAAG,UAAU,CAAC;QACvB,IAAI,UAAU,CAAC,IAAI,EAAE;YACnB,MAAM,eAAe,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACxD,eAAe,CAAC,GAAG,GAAG,YAAY,CAAC;YACnC,eAAe,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YACvC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;SAC7C;aAAM;YACL,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClD,MAAM,eAAe,GAAG,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBACzD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;oBACxC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtE,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;aAC7C;SACF;IACH,CAAC,CAAC,CAAC;IAEH,eAAe;IACf,MAAM,eAAe,GAAG,SAAS,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;IACxE,uBAAuB;IACvB,IAAI,eAAe,EAAE;QACnB,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAC7D;AACH,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/**\n * Copies the source CSS into the destination\n * @param targetDoc - target document\n * @param sourceDoc - source document\n * @internal\n */\nexport function copyStyles(\n targetDoc: Document,\n sourceDoc: Document = document\n) {\n const stylesheets = Array.from(sourceDoc.styleSheets);\n // istanbul ignore next\n stylesheets.forEach((stylesheet) => {\n const css = stylesheet;\n if (stylesheet.href) {\n const newStyleElement = targetDoc.createElement(\"link\");\n newStyleElement.rel = \"stylesheet\";\n newStyleElement.href = stylesheet.href;\n targetDoc.head.appendChild(newStyleElement);\n } else {\n if (css && css.cssRules && css.cssRules.length > 0) {\n const newStyleElement = targetDoc.createElement(\"style\");\n Array.from(css.cssRules).forEach((rule) => {\n newStyleElement.appendChild(targetDoc.createTextNode(rule.cssText));\n });\n targetDoc.head.appendChild(newStyleElement);\n }\n }\n });\n\n // copy sprites\n const svgSymbolParent = sourceDoc.getElementById(\"__SVG_SPRITE_NODE__\");\n // istanbul ignore else\n if (svgSymbolParent) {\n targetDoc.body.appendChild(svgSymbolParent.cloneNode(true));\n }\n}\n"]}
1
+ {"version":3,"file":"CopyStyles.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/CopyStyles.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,SAAmB,EACnB,YAAsB,QAAQ;IAE9B,MAAM,WAAW,GAAG,SAAS,CAAC,kBAAkB;QAC9C,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACzE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEtC,uBAAuB;IACvB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,MAAM,GAAG,GAAG,UAAU,CAAC;QACvB,IAAI,UAAU,CAAC,IAAI,EAAE;YACnB,MAAM,eAAe,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACxD,eAAe,CAAC,GAAG,GAAG,YAAY,CAAC;YACnC,eAAe,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YACvC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;SAC7C;aAAM;YACL,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClD,MAAM,eAAe,GAAG,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBACzD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;oBACxC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtE,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;aAC7C;SACF;IACH,CAAC,CAAC,CAAC;IAEH,eAAe;IACf,MAAM,eAAe,GAAG,SAAS,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;IACxE,uBAAuB;IACvB,IAAI,eAAe,EAAE;QACnB,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAC7D;AACH,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/**\n * Copies the source CSS into the destination\n * @param targetDoc - target document\n * @param sourceDoc - source document\n * @internal\n */\nexport function copyStyles(\n targetDoc: Document,\n sourceDoc: Document = document\n) {\n const stylesheets = sourceDoc.adoptedStyleSheets\n ? Array.from([...sourceDoc.styleSheets, ...sourceDoc.adoptedStyleSheets])\n : Array.from(sourceDoc.styleSheets);\n\n // istanbul ignore next\n stylesheets.forEach((stylesheet) => {\n const css = stylesheet;\n if (stylesheet.href) {\n const newStyleElement = targetDoc.createElement(\"link\");\n newStyleElement.rel = \"stylesheet\";\n newStyleElement.href = stylesheet.href;\n targetDoc.head.appendChild(newStyleElement);\n } else {\n if (css && css.cssRules && css.cssRules.length > 0) {\n const newStyleElement = targetDoc.createElement(\"style\");\n Array.from(css.cssRules).forEach((rule) => {\n newStyleElement.appendChild(targetDoc.createTextNode(rule.cssText));\n });\n targetDoc.head.appendChild(newStyleElement);\n }\n }\n });\n\n // copy sprites\n const svgSymbolParent = sourceDoc.getElementById(\"__SVG_SPRITE_NODE__\");\n // istanbul ignore else\n if (svgSymbolParent) {\n targetDoc.body.appendChild(svgSymbolParent.cloneNode(true));\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAyB5C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;KAIK;AACL,qBAAa,0BAA2B,YAAW,qBAAqB;IACtE,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IAEI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IAEH,OAAO,CAAC,MAAM;IAWd;;;;OAIG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,GAAG,SAAS;IAQlC;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAU3E,OAAO,CAAC,yBAAyB;IAoDjC,gGAAgG;IACzF,QAAQ;IAQf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAenC;IAGF,OAAO,CAAC,mBAAmB;IAc3B;;;;;;;;OAQG;IAEI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CAuDhC"}
1
+ {"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAyB5C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;KAIK;AACL,qBAAa,0BAA2B,YAAW,qBAAqB;IACtE,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IAEI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IAEH,OAAO,CAAC,MAAM;IAWd;;;;OAIG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,GAAG,SAAS;IAQlC;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAU3E,OAAO,CAAC,yBAAyB;IAoDjC,gGAAgG;IACzF,QAAQ;IAQf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAgBnC;IAGF,OAAO,CAAC,mBAAmB;IAc3B;;;;;;;;OAQG;IAEI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CAuDhC"}
@@ -65,7 +65,8 @@ export class InternalChildWindowManager {
65
65
  else {
66
66
  // call the following to convert popout to docked widget
67
67
  const frontStageDef = UiFramework.frontstages.activeFrontstageDef;
68
- frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);
68
+ frontStageDef &&
69
+ frontStageDef.dockWidgetContainerByContainerId(childWindowId);
69
70
  }
70
71
  return true;
71
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAM,OAAO,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAiItD;;;;;WAKG;QACI,U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,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body class=\"iui-root\">\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to react 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n if (this._createRoot) {\n this._createRoot(container).render(element);\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: Window,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>,\n reactConnectionDiv\n );\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n this.close(childWindowId, false);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,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AAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;SACH;aAAM;YACL,WAAW,CAAC,gBAAgB,CAC1B,MAAM,EACN,GAAG,EAAE;gBACH,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;YACJ,CAAC,EACD,KAAK,CACN,CAAC;SACH;QAED,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,GAAG,EAAE;YACH,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body class=\"iui-root\">\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to react 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n if (this._createRoot) {\n this._createRoot(container).render(element);\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: Window,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>,\n reactConnectionDiv\n );\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n this.close(childWindowId, false);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Cursor
3
3
  */
4
- import type { PointProps } from "@itwin/appui-abstract";
4
+ import type { XAndY } from "@itwin/core-geometry";
5
5
  import { RelativePosition, UiEvent } from "@itwin/appui-abstract";
6
6
  /** Enum for Cursor Direction parts
7
7
  * @public
@@ -30,8 +30,8 @@ export declare enum CursorDirection {
30
30
  * @public
31
31
  */
32
32
  export interface CursorUpdatedEventArgs {
33
- oldPt: PointProps;
34
- newPt: PointProps;
33
+ oldPt: XAndY;
34
+ newPt: XAndY;
35
35
  direction: CursorDirection;
36
36
  }
37
37
  /** Cursor Updated Event class.
@@ -47,8 +47,8 @@ export declare class CursorInformation {
47
47
  private static _cursorDirection;
48
48
  private static _cursorDirections;
49
49
  /** The cursor position. */
50
- static get cursorPosition(): PointProps;
51
- static set cursorPosition(pt: PointProps);
50
+ static get cursorPosition(): XAndY;
51
+ static set cursorPosition(pt: XAndY);
52
52
  /** Gets the cursor X position. */
53
53
  static get cursorX(): number;
54
54
  /** Gets the cursor Y position. */
@@ -58,7 +58,7 @@ export declare class CursorInformation {
58
58
  /** Gets the [[CursorUpdatedEvent]]. */
59
59
  static readonly onCursorUpdatedEvent: CursorUpdatedEvent;
60
60
  /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */
61
- static handleMouseMove(point: PointProps): void;
61
+ static handleMouseMove(point: XAndY): void;
62
62
  private static _determineMostFrequentDirection;
63
63
  private static _mostFrequent;
64
64
  private static _determineCursorDirection;
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.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C,MAAM,CAAC,+BAA+B;IAW9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAuB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiBxC,gEAAgE;WAClD,sCAAsC,CAClD,eAAe,EAAE,eAAe,GAC/B,gBAAgB;IAiCnB,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C"}
1
+ {"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,OAAS;IACZ,IAAI,MAAS;IACb,KAAK,KAAS;IACd,MAAM,IAAS;CAChB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,IAAI;IACR,GAAG,OAA2B;IAC9B,IAAI,MAA4B;IAChC,KAAK,KAA6B;IAClC,MAAM,IAA8B;IACpC,OAAO,OAAuD;IAC9D,QAAQ,OAAwD;IAChE,UAAU,MAA0D;IACpE,WAAW,KAA2D;CACvE;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAG;AAE1E;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAsB;IACpD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CACD;IAE9B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgC;IAEhE,2BAA2B;IAC3B,WAAkB,cAAc,IAAI,KAAK,CAExC;IACD,WAAkB,cAAc,CAAC,EAAE,EAAE,KAAK,EAEzC;IAED,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IAED,kDAAkD;IAClD,WAAkB,eAAe,IAAI,eAAe,CAEnD;IAED,uCAAuC;IACvC,gBAAuB,oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAcjD,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAW9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAuB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiBxC,gEAAgE;WAClD,sCAAsC,CAClD,eAAe,EAAE,eAAe,GAC/B,gBAAgB;IAiCnB,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,sDAA8B,CAAA;IAC9B,uDAAgC,CAAA;IAChC,wDAAkC,CAAA;IAClC,yDAAoC,CAAA;IACpC,8DAA8D,CAAA;IAC9D,gEAAgE,CAAA;IAChE,mEAAoE,CAAA;IACpE,oEAAsE,CAAA;AACxE,CAAC,EAVW,eAAe,KAAf,e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CAAgB,GAC7B,eAAe,CAAC,WAAW,CAAC;AAEf,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAwBhE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;SA9B5D,iBAAiB","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 Cursor\n */\n\nimport type { PointProps } from \"@itwin/appui-abstract\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: PointProps;\n newPt: PointProps;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n */\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): PointProps {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: PointProps) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: PointProps): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n"]}
1
+ {"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,sDAA8B,CAAA;IAC9B,uDAAgC,CAAA;IAChC,wDAAkC,CAAA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C,qBAAqB;QACjC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;;AAxIc,iCAAe,GAAU,IAAI,KAAK,EAAE,CAAC;AACrC,kCAAgB,GAC7B,eAAe,CAAC,WAAW,CAAC;AAEf,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAwBhE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;SA9B5D,iBAAiB","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 Cursor\n */\n\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: XAndY;\n newPt: XAndY;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n */\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): XAndY {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: XAndY) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: XAndY): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CursorMenu.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D;;GAEG;AACH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EA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K,CAAC;QACxB,qBAAqB,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC9E,CAAC;IAYe,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAEtC,OAAO,CACL,6BAAK,SAAS,EAAC,gCAAgC,EAAC,GAAG,EAAE,IAAI,CAAC,aAAa,IACpE,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,IAAI,CAC3C,oBAAC,iBAAiB,IAChB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,UAAU,EAAC,mBAAmB,EAC9B,CAAC,EAAE,KAAK,EACR,CAAC,EAAE,KAAK,EACR,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,OAAO,EACvB,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,IAEb,eAAe,CAAC,mBAAmB,CAClC,eAAe,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CACzD,CACiB,CACrB,CACG,CACP,CAAC;IACJ,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 Cursor\n */\n\nimport * as React from \"react\";\nimport type { UiSyncEventArgs } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\nimport { SessionStateActionId } from \"../../redux/SessionState\";\nimport type { MenuItemProps } from \"../../shared/MenuItem\";\nimport { MenuItemHelpers } from \"../../shared/MenuItem\";\nimport { SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { Logger } from \"@itwin/core-bentley\";\n\n/** State for [[CursorPopupMenu]] component\n * @alpha\n */\ninterface CursorPopupMenuState {\n menuX: number;\n menuY: number;\n menuVisible: boolean;\n items?: MenuItemProps[];\n}\n\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\n * @alpha\n */\n// istanbul ignore next\nexport class CursorPopupMenu extends React.PureComponent<\n CommonProps,\n CursorPopupMenuState\n> {\n private _isMounted = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\n private _hostChildWindowId?: string;\n\n /** @internal */\n public override readonly state: CursorPopupMenuState = {\n menuX: 0,\n menuY: 0,\n menuVisible: false,\n items: undefined,\n };\n\n private _handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n /* istanbul ignore next */\n if (!this._isMounted) return;\n\n /* istanbul ignore else */\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n SessionStateActionId.UpdateCursorMenu,\n ])\n ) {\n const menuData = UiFramework.getCursorMenuData();\n if (menuData && this._hostChildWindowId === menuData.childWindowId) {\n this.setState({\n menuVisible: menuData.items && menuData.items.length > 0,\n items: menuData.items,\n menuX: menuData.position.x,\n menuY: menuData.position.y,\n });\n } else {\n this.setState({ menuVisible: false, items: undefined });\n }\n }\n };\n\n public override componentDidMount() {\n this._isMounted = true;\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\n }\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;\n // if the window is not a pop out set to undefined\n this._hostChildWindowId = UiFramework.childWindows.findId(parentWindow);\n Logger.logInfo(\n UiFramework.loggerCategory(UiFramework),\n `Cursor Menu for ${this._hostChildWindowId ?? \"main\"} window`\n );\n };\n\n public override render(): React.ReactNode {\n const { menuX, menuY, items, menuVisible } = this.state;\n const onClose = this._hideContextMenu;\n\n return (\n <div className=\"uifw-cursor-menu-container-div\" ref={this._handleRefSet}>\n {items && items.length > 0 && menuVisible && (\n <GlobalContextMenu\n className={this.props.className}\n style={this.props.style}\n identifier=\"cursor-popup-menu\"\n x={menuX}\n y={menuY}\n opened={menuVisible}\n onEsc={onClose}\n onOutsideClick={onClose}\n edgeLimit={false}\n autoflip={true}\n >\n {MenuItemHelpers.createMenuItemNodes(\n MenuItemHelpers.createMenuItems(items, this._itemPicked)\n )}\n </GlobalContextMenu>\n )}\n </div>\n );\n }\n\n private _hideContextMenu = () => {\n this.setState({ menuVisible: false });\n };\n\n private _itemPicked = (): void => {\n this._hideContextMenu();\n };\n}\n"]}
1
+ {"version":3,"file":"CursorMenu.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursormenu/CursorMenu.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC,CAAC,kBAAkB;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C;;GAEG;AACH,uBAAuB;AACvB,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,aAG1C;IAHD;;QAIU,eAAU,GAAG,KAAK,CAAC,CAAC,mGAAmG;QAG/H,gBAAgB;QACS,UAAK,GAAyB;YACrD,KAAK,EAAE,C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AK,EAAE,IAAI,CAAC,WAAW,CAAC,CACzD,CACiB,CACrB,CACG,CACP,CAAC;IACJ,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 Cursor\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { GlobalContextMenu } from \"@itwin/core-react\"; // ContextSubMenu,\nimport { SessionStateActionId } from \"../../redux/SessionState\";\nimport type { MenuItemProps } from \"../../shared/MenuItem\";\nimport { MenuItemHelpers } from \"../../shared/MenuItem\";\nimport { SyncUiEventDispatcher } from \"../../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { UiSyncEventArgs } from \"../../syncui/UiSyncEvent\";\n\n/** State for [[CursorPopupMenu]] component\n * @alpha\n */\ninterface CursorPopupMenuState {\n menuX: number;\n menuY: number;\n menuVisible: boolean;\n items?: MenuItemProps[];\n}\n\n/** Popup Menu to show at cursor typically used by tools to provide a right-click context menu.\n * @alpha\n */\n// istanbul ignore next\nexport class CursorPopupMenu extends React.PureComponent<\n CommonProps,\n CursorPopupMenuState\n> {\n private _isMounted = false; // used to ensure _handleSyncUiEvent callback is not processed after componentWillUnmount is called\n private _hostChildWindowId?: string;\n\n /** @internal */\n public override readonly state: CursorPopupMenuState = {\n menuX: 0,\n menuY: 0,\n menuVisible: false,\n items: undefined,\n };\n\n private _handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n /* istanbul ignore next */\n if (!this._isMounted) return;\n\n /* istanbul ignore else */\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n SessionStateActionId.UpdateCursorMenu,\n ])\n ) {\n const menuData = UiFramework.getCursorMenuData();\n if (menuData && this._hostChildWindowId === menuData.childWindowId) {\n this.setState({\n menuVisible: menuData.items && menuData.items.length > 0,\n items: menuData.items,\n menuX: menuData.position.x,\n menuY: menuData.position.y,\n });\n } else {\n this.setState({ menuVisible: false, items: undefined });\n }\n }\n };\n\n public override componentDidMount() {\n this._isMounted = true;\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this._handleSyncUiEvent);\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(this._handleSyncUiEvent);\n }\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n const parentWindow = popupDiv?.ownerDocument.defaultView ?? undefined;\n // if the window is not a pop out set to undefined\n this._hostChildWindowId = UiFramework.childWindows.findId(parentWindow);\n Logger.logInfo(\n UiFramework.loggerCategory(UiFramework),\n `Cursor Menu for ${this._hostChildWindowId ?? \"main\"} window`\n );\n };\n\n public override render(): React.ReactNode {\n const { menuX, menuY, items, menuVisible } = this.state;\n const onClose = this._hideContextMenu;\n\n return (\n <div className=\"uifw-cursor-menu-container-div\" ref={this._handleRefSet}>\n {items && items.length > 0 && menuVisible && (\n <GlobalContextMenu\n className={this.props.className}\n style={this.props.style}\n identifier=\"cursor-popup-menu\"\n x={menuX}\n y={menuY}\n opened={menuVisible}\n onEsc={onClose}\n onOutsideClick={onClose}\n edgeLimit={false}\n autoflip={true}\n >\n {MenuItemHelpers.createMenuItemNodes(\n MenuItemHelpers.createMenuItems(items, this._itemPicked)\n )}\n </GlobalContextMenu>\n )}\n </div>\n );\n }\n\n private _hideContextMenu = () => {\n this.setState({ menuVisible: false });\n };\n\n private _itemPicked = (): void => {\n this._hideContextMenu();\n };\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "./CursorPopup.scss";
5
5
  import * as React from "react";
6
- import type { PointProps } from "@itwin/appui-abstract";
6
+ import type { XAndY } from "@itwin/core-geometry";
7
7
  import { RelativePosition } from "@itwin/appui-abstract";
8
8
  import type { CommonDivProps, CommonProps, RectangleProps, SizeProps } from "@itwin/core-react";
9
9
  import { Size } from "@itwin/core-react";
@@ -13,8 +13,8 @@ import { Size } from "@itwin/core-react";
13
13
  export interface CursorPopupProps extends CommonProps {
14
14
  id: string;
15
15
  content: React.ReactNode;
16
- pt: PointProps;
17
- offset: PointProps;
16
+ pt: XAndY;
17
+ offset: XAndY;
18
18
  relativePosition: RelativePosition;
19
19
  title?: string;
20
20
  shadow?: boolean;
@@ -48,7 +48,7 @@ export declare class CursorPopup extends React.Component<CursorPopupProps, Curso
48
48
  componentWillUnmount(): void;
49
49
  private _handleCursorPopupFadeOutEvent;
50
50
  /** @internal */
51
- static getPopupRect(pt: PointProps, offset: PointProps, popupSize: SizeProps | undefined, relativePosition: RelativePosition): RectangleProps;
51
+ static getPopupRect(pt: XAndY, offset: XAndY, popupSize: SizeProps | undefined, relativePosition: RelativePosition): RectangleProps;
52
52
  private setDivRef;
53
53
  /** @internal */
54
54
  render(): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPopup.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAO,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAK9C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,IAAA;IACJ,OAAO,IAAA;CACR;AAED;;GAEG;AACH,UAAU,gBAAgB;IACxB,SAAS,EAAE,eAAe,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAC9C,gBAAgB,EAChB,gBAAgB,CACjB;IACC,OAAO,CAAC,UAAU,CAAkB;IAEpC,gBAAgB;IAChB,OAAc,WAAW,SAAO;IAEhC,gBAAgB;gBACJ,KAAK,EAAE,gBAAgB;IASnB,iBAAiB;IAOjB,oBAAoB;IAOpC,OAAO,CAAC,8BAA8B,CAQpC;IAEF,gBAAgB;WACF,YAAY,CACxB,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,GAAG,SAAS,EAChC,gBAAgB,EAAE,gBAAgB,GACjC,cAAc;IA2DjB,OAAO,CAAC,SAAS;IAiBjB,gBAAgB;IACA,MAAM;CAoCvB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,eAEvD"}
1
+ {"version":3,"file":"CursorPopup.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,SAAS,EAC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