@itwin/appui-react 4.8.0 → 4.9.0-dev.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 (380) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  3. package/lib/cjs/appui-react/UiFramework.js +6 -0
  4. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  5. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  6. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  7. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  8. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  9. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  10. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  11. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts +3 -1
  12. package/lib/cjs/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  13. package/lib/cjs/appui-react/accudraw/SquareButton.js +1 -4
  14. package/lib/cjs/appui-react/accudraw/SquareButton.js.map +1 -1
  15. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  16. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +25 -7
  17. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  18. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  19. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  20. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  21. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  22. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
  24. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  25. package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
  26. package/lib/cjs/appui-react/content/ContentControl.js +1 -0
  27. package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
  28. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  29. package/lib/cjs/appui-react/content/ContentGroup.js +2 -0
  30. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  31. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentLayout.js +1 -0
  33. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  34. package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
  35. package/lib/cjs/appui-react/content/IModelViewport.js +1 -0
  36. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  37. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  38. package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -0
  39. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  40. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  41. package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -0
  42. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  43. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  44. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
  45. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  46. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  47. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +1 -0
  48. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  49. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  50. package/lib/cjs/appui-react/feedback/ElementTooltip.js +3 -3
  51. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  52. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  53. package/lib/cjs/appui-react/framework/FrameworkContent.js +2 -0
  54. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  55. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  56. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js +8 -0
  57. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  58. package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/framework/FrameworkToolSettings.js +1 -0
  60. package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  61. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +8 -2
  62. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  63. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +25 -8
  64. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  65. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +15 -4
  67. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  68. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  69. package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +2 -3
  71. package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  72. package/lib/cjs/appui-react/frontstage/ModalFrontstage.scss +1 -1
  73. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
  74. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +5 -5
  75. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  76. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  77. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
  78. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  79. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
  81. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  82. package/lib/cjs/appui-react/messages/InputField.d.ts.map +1 -1
  83. package/lib/cjs/appui-react/messages/InputField.js +2 -3
  84. package/lib/cjs/appui-react/messages/InputField.js.map +1 -1
  85. package/lib/cjs/appui-react/messages/MessageLabel.js +2 -2
  86. package/lib/cjs/appui-react/messages/MessageLabel.js.map +1 -1
  87. package/lib/cjs/appui-react/messages/MessageManager.d.ts +15 -5
  88. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/messages/MessageManager.js +31 -39
  90. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  91. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts +8 -0
  92. package/lib/cjs/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  93. package/lib/cjs/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +60 -14
  94. package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -0
  95. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  96. package/lib/cjs/appui-react/messages/Pointer.js +4 -3
  97. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  98. package/lib/cjs/appui-react/messages/getToastCategory.d.ts +1 -1
  99. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  100. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +1 -0
  101. package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  102. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  103. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
  104. package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  105. package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  106. package/lib/cjs/appui-react/pickers/ViewSelector.js +2 -0
  107. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  108. package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
  109. package/lib/cjs/appui-react/popup/CardPopup.js +1 -2
  110. package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
  111. package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  112. package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -2
  113. package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
  114. package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
  115. package/lib/cjs/appui-react/popup/PopupManager.js +1 -0
  116. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  117. package/lib/cjs/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
  118. package/lib/cjs/appui-react/redux/ReducerRegistry.js +1 -0
  119. package/lib/cjs/appui-react/redux/ReducerRegistry.js.map +1 -1
  120. package/lib/cjs/appui-react/redux/StateManager.d.ts.map +1 -1
  121. package/lib/cjs/appui-react/redux/StateManager.js +1 -0
  122. package/lib/cjs/appui-react/redux/StateManager.js.map +1 -1
  123. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  124. package/lib/cjs/appui-react/shared/MenuItem.d.ts.map +1 -1
  125. package/lib/cjs/appui-react/shared/MenuItem.js +1 -0
  126. package/lib/cjs/appui-react/shared/MenuItem.js.map +1 -1
  127. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
  128. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
  129. package/lib/cjs/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
  130. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
  131. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  132. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +19 -18
  133. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  134. package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts +13 -0
  135. package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
  136. package/lib/cjs/appui-react/stagepanels/StagePanelState.js +21 -0
  137. package/lib/cjs/appui-react/stagepanels/StagePanelState.js.map +1 -0
  138. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  139. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  140. package/lib/cjs/appui-react/statusfields/MessageCenter.js +6 -5
  141. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  142. package/lib/cjs/appui-react/statusfields/SelectionScope.scss +1 -3
  143. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  144. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  145. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  146. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  147. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  148. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
  149. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  150. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  151. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  152. package/lib/cjs/appui-react/theme/ThemeManager.js +3 -1
  153. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  154. package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  155. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +8 -8
  156. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  157. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
  158. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
  159. package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
  160. package/lib/cjs/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
  161. package/lib/cjs/appui-react/toolsettings/ToolInformation.js +1 -0
  162. package/lib/cjs/appui-react/toolsettings/ToolInformation.js.map +1 -1
  163. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  164. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  165. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +16 -13
  166. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  167. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +16 -33
  168. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  169. package/lib/cjs/appui-react/widget-panels/Frontstage.js +243 -386
  170. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  171. package/lib/cjs/appui-react/widget-panels/ToolSettings.scss +1 -1
  172. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  173. package/lib/cjs/appui-react/widgets/WidgetDef.js +2 -0
  174. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  175. package/lib/cjs/appui-react/widgets/useWidget.d.ts +17 -0
  176. package/lib/cjs/appui-react/widgets/useWidget.d.ts.map +1 -0
  177. package/lib/cjs/appui-react/widgets/useWidget.js +70 -0
  178. package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -0
  179. package/lib/cjs/appui-react.d.ts +2 -0
  180. package/lib/cjs/appui-react.d.ts.map +1 -1
  181. package/lib/cjs/appui-react.js +2 -0
  182. package/lib/cjs/appui-react.js.map +1 -1
  183. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  184. package/lib/esm/appui-react/UiFramework.js +6 -0
  185. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  186. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
  187. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  188. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
  189. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  190. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
  191. package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +2 -0
  192. package/lib/esm/appui-react/accudraw/SquareButton.d.ts +3 -1
  193. package/lib/esm/appui-react/accudraw/SquareButton.d.ts.map +1 -1
  194. package/lib/esm/appui-react/accudraw/SquareButton.js +1 -4
  195. package/lib/esm/appui-react/accudraw/SquareButton.js.map +1 -1
  196. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  197. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +25 -7
  198. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  199. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
  200. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  201. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +19 -15
  202. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  203. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
  204. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
  205. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  206. package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
  207. package/lib/esm/appui-react/content/ContentControl.js +1 -0
  208. package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
  209. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  210. package/lib/esm/appui-react/content/ContentGroup.js +2 -0
  211. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  212. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  213. package/lib/esm/appui-react/content/ContentLayout.js +1 -0
  214. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  215. package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
  216. package/lib/esm/appui-react/content/IModelViewport.js +1 -0
  217. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  218. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  219. package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -0
  220. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  221. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  222. package/lib/esm/appui-react/cursor/CursorInformation.js +1 -0
  223. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  224. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  225. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
  226. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  227. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  228. package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -0
  229. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  230. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  231. package/lib/esm/appui-react/feedback/ElementTooltip.js +4 -4
  232. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  233. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  234. package/lib/esm/appui-react/framework/FrameworkContent.js +2 -0
  235. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  236. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  237. package/lib/esm/appui-react/framework/FrameworkFrontstages.js +8 -0
  238. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  239. package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
  240. package/lib/esm/appui-react/framework/FrameworkToolSettings.js +1 -0
  241. package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  242. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +8 -2
  243. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  244. package/lib/esm/appui-react/frontstage/FrontstageDef.js +24 -7
  245. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  246. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  247. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +15 -4
  248. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  249. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
  250. package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
  251. package/lib/esm/appui-react/frontstage/ModalFrontstage.js +2 -3
  252. package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  253. package/lib/esm/appui-react/frontstage/ModalFrontstage.scss +1 -1
  254. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
  255. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
  256. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  257. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  258. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
  259. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  260. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
  261. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
  262. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  263. package/lib/esm/appui-react/messages/InputField.d.ts.map +1 -1
  264. package/lib/esm/appui-react/messages/InputField.js +3 -4
  265. package/lib/esm/appui-react/messages/InputField.js.map +1 -1
  266. package/lib/esm/appui-react/messages/MessageLabel.js +2 -2
  267. package/lib/esm/appui-react/messages/MessageLabel.js.map +1 -1
  268. package/lib/esm/appui-react/messages/MessageManager.d.ts +15 -5
  269. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  270. package/lib/esm/appui-react/messages/MessageManager.js +31 -39
  271. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  272. package/lib/esm/appui-react/messages/MessageRenderer.d.ts +8 -0
  273. package/lib/esm/appui-react/messages/MessageRenderer.d.ts.map +1 -0
  274. package/lib/esm/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +58 -12
  275. package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -0
  276. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  277. package/lib/esm/appui-react/messages/Pointer.js +5 -4
  278. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  279. package/lib/esm/appui-react/messages/getToastCategory.d.ts +1 -1
  280. package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
  281. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -0
  282. package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  283. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  284. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
  285. package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  286. package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  287. package/lib/esm/appui-react/pickers/ViewSelector.js +2 -0
  288. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  289. package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
  290. package/lib/esm/appui-react/popup/CardPopup.js +2 -3
  291. package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
  292. package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
  293. package/lib/esm/appui-react/popup/HTMLElementPopup.js +2 -3
  294. package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
  295. package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
  296. package/lib/esm/appui-react/popup/PopupManager.js +1 -0
  297. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  298. package/lib/esm/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
  299. package/lib/esm/appui-react/redux/ReducerRegistry.js +1 -0
  300. package/lib/esm/appui-react/redux/ReducerRegistry.js.map +1 -1
  301. package/lib/esm/appui-react/redux/StateManager.d.ts.map +1 -1
  302. package/lib/esm/appui-react/redux/StateManager.js +1 -0
  303. package/lib/esm/appui-react/redux/StateManager.js.map +1 -1
  304. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
  305. package/lib/esm/appui-react/shared/MenuItem.d.ts.map +1 -1
  306. package/lib/esm/appui-react/shared/MenuItem.js +1 -0
  307. package/lib/esm/appui-react/shared/MenuItem.js.map +1 -1
  308. package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
  309. package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
  310. package/lib/esm/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
  311. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
  312. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  313. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +15 -14
  314. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  315. package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts +13 -0
  316. package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
  317. package/lib/esm/appui-react/stagepanels/StagePanelState.js +18 -0
  318. package/lib/esm/appui-react/stagepanels/StagePanelState.js.map +1 -0
  319. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  320. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  321. package/lib/esm/appui-react/statusfields/MessageCenter.js +6 -5
  322. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  323. package/lib/esm/appui-react/statusfields/SelectionScope.scss +1 -3
  324. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  325. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  326. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  327. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
  328. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  329. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
  330. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  331. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
  332. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  333. package/lib/esm/appui-react/theme/ThemeManager.js +3 -1
  334. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  335. package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  336. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +5 -5
  337. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  338. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
  339. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
  340. package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
  341. package/lib/esm/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
  342. package/lib/esm/appui-react/toolsettings/ToolInformation.js +1 -0
  343. package/lib/esm/appui-react/toolsettings/ToolInformation.js.map +1 -1
  344. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
  345. package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
  346. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +16 -13
  347. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  348. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +16 -33
  349. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  350. package/lib/esm/appui-react/widget-panels/Frontstage.js +244 -382
  351. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  352. package/lib/esm/appui-react/widget-panels/ToolSettings.scss +1 -1
  353. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  354. package/lib/esm/appui-react/widgets/WidgetDef.js +2 -0
  355. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  356. package/lib/esm/appui-react/widgets/useWidget.d.ts +17 -0
  357. package/lib/esm/appui-react/widgets/useWidget.d.ts.map +1 -0
  358. package/lib/esm/appui-react/widgets/useWidget.js +66 -0
  359. package/lib/esm/appui-react/widgets/useWidget.js.map +1 -0
  360. package/lib/esm/appui-react.d.ts +2 -0
  361. package/lib/esm/appui-react.d.ts.map +1 -1
  362. package/lib/esm/appui-react.js +2 -0
  363. package/lib/esm/appui-react.js.map +1 -1
  364. package/package.json +16 -17
  365. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +0 -10
  366. package/lib/cjs/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  367. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +0 -1
  368. package/lib/cjs/appui-react/messages/MessageSpan.d.ts +0 -15
  369. package/lib/cjs/appui-react/messages/MessageSpan.d.ts.map +0 -1
  370. package/lib/cjs/appui-react/messages/MessageSpan.js +0 -23
  371. package/lib/cjs/appui-react/messages/MessageSpan.js.map +0 -1
  372. package/lib/esm/appui-react/messages/ActivityMessage.d.ts +0 -10
  373. package/lib/esm/appui-react/messages/ActivityMessage.d.ts.map +0 -1
  374. package/lib/esm/appui-react/messages/ActivityMessage.js.map +0 -1
  375. package/lib/esm/appui-react/messages/MessageSpan.d.ts +0 -15
  376. package/lib/esm/appui-react/messages/MessageSpan.d.ts.map +0 -1
  377. package/lib/esm/appui-react/messages/MessageSpan.js +0 -18
  378. package/lib/esm/appui-react/messages/MessageSpan.js.map +0 -1
  379. /package/lib/cjs/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
  380. /package/lib/esm/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPopupManager.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAE7C,0DAAkE;AAElE,kDAAgD;AAChD,mDAAgD;AAChD,+CAA4C;AAuB5C;;GAEG;AACH,MAAa,8BAA+B,SAAQ,wBAA2C;CAAG;AAAlG,wEAAkG;AASlG;;GAEG;AACH,MAAa,uBAAwB,SAAQ,wBAAoC;CAAG;AAApF,0DAAoF;AAiBpF;;GAEG;AACH,MAAM,wBAAyB,SAAQ,wBAAW;CAAG;AAErD;;GAEG;AACH,MAAa,kBAAkB;IAY7B,gBAAgB;IACT,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACxB,kBAAkB,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAEM,MAAM,KAAK,MAAM;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEM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AE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnE,MAAM;SACT;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEe,iBAAiB;QAC/B,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,CACvD,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,kBAAkB,CAAC,gCAAgC,CAAC,WAAW,CAC7D,IAAI,CAAC,qCAAqC,CAC3C,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,kBAAkB,CAAC,0BAA0B,CAAC,cAAc,CAC1D,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,kBAAkB,CAAC,gCAAgC,CAAC,cAAc,CAChE,IAAI,CAAC,qCAAqC,CAC3C,CAAC;IACJ,CAAC;CAWF;AAnLD,kDAmLC","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 { Logger } from \"@itwin/core-bentley\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport type { RectangleProps, SizeProps } from \"@itwin/core-react\";\nimport { Point, Size } from \"@itwin/core-react\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { CursorPopup } from \"./CursorPopup\";\n\n/** Options for the [[CursorPopupManager]] open method\n * @public\n */\nexport interface CursorPopupOptions {\n /** Title of the popup */\n title?: string;\n /** Called on popup close */\n onClose?: () => void;\n /** Callback to apply changes */\n onApply?: () => void;\n /** Draw shadow */\n shadow?: boolean;\n}\n\n/** CursorPopup Update Position Event Args interface.\n * @internal\n */\nexport interface CursorPopupUpdatePositionEventArgs {\n pt: XAndY;\n}\n\n/** CursorPopup Update Position Event class.\n * @internal\n */\nexport class CursorPopupUpdatePositionEvent extends UiEvent<CursorPopupUpdatePositionEventArgs> {}\n\n/** CursorPopup FadeOut Event Args interface.\n * @internal\n */\nexport interface CursorPopupFadeOutEventArgs {\n id: string;\n}\n\n/** CursorPopup FadeOut Event class.\n * @internal\n */\nexport class CursorPopupFadeOutEvent extends UiEvent<CursorPopupFadeOutEventArgs> {}\n\n/** Information maintained by CursorPopupManager about a CursorPopup\n * @internal\n */\ninterface CursorPopupInfo {\n id: string;\n content: React.ReactNode;\n relativePosition: RelativePosition;\n offset: Point;\n priority: number;\n options?: CursorPopupOptions;\n\n renderRelativePosition: RelativePosition;\n popupSize?: Size;\n}\n\n/** Cursor Popups Changed Event class.\n * @internal\n */\nclass CursorPopupsChangedEvent extends UiEvent<{}> {}\n\n/** CursorPopup component\n * @public\n */\nexport class CursorPopupManager {\n private static _popups: CursorPopupInfo[] = new Array<CursorPopupInfo>();\n\n /** @internal */\n public static readonly onCursorPopupUpdatePositionEvent =\n new CursorPopupUpdatePositionEvent();\n /** @internal */\n public static readonly onCursorPopupFadeOutEvent =\n new CursorPopupFadeOutEvent();\n /** @internal */\n public static readonly onCursorPopupsChangedEvent =\n new CursorPopupsChangedEvent();\n /** @internal */\n public static clearPopups() {\n this._popups.length = 0;\n CursorPopupManager._emitPopupsChangedEvent();\n }\n\n public static get popups() {\n return this._popups;\n }\n\n public static get popupCount() {\n return this._popups.length;\n }\n\n private static _emitPopupsChangedEvent(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.emit({});\n }\n\n private static pushPopup(popupInfo: CursorPopupInfo): void {\n CursorPopupManager._popups.push(popupInfo);\n CursorPopupManager._emitPopupsChangedEvent();\n }\n\n /** Called to open popup with a new set of properties\n */\n public static open(\n id: string,\n content: React.ReactNode,\n pt: XAndY,\n offset: XAndY,\n relativePosition: RelativePosition,\n priority: number = 0,\n options?: CursorPopupOptions\n ) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n if (popupInfo) {\n popupInfo.content = content;\n popupInfo.offset = Point.create(offset);\n popupInfo.relativePosition = relativePosition;\n popupInfo.renderRelativePosition = relativePosition;\n popupInfo.priority = priority;\n popupInfo.options = options;\n } else {\n const newPopupInfo: CursorPopupInfo = {\n id,\n content,\n offset: Point.create(offset),\n relativePosition,\n options,\n renderRelativePosition: relativePosition,\n priority,\n };\n CursorPopupManager.pushPopup(newPopupInfo);\n }\n\n CursorPopupManager.updatePosition(pt);\n }\n\n /** Called to update popup with a new set of properties\n */\n public static update(\n id: string,\n content: React.ReactNode,\n pt: XAndY,\n offset: XAndY,\n relativePosition: RelativePosition,\n priority: number = 0\n ) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n if (popupInfo) {\n popupInfo.content = content;\n popupInfo.offset = Point.create(offset);\n popupInfo.relativePosition = relativePosition;\n popupInfo.renderRelativePosition = relativePosition;\n popupInfo.priority = priority;\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `update: Could not find popup with id of '${id}'`\n );\n }\n\n CursorPopupManager.updatePosition(pt);\n }\n\n /** Called to move the open popup to new location\n */\n public static updatePosition(pt: XAndY) {\n CursorPopupManager.resetPopupsRenderRelativePosition(Point.create(pt));\n CursorPopupManager.onCursorPopupUpdatePositionEvent.emit({ pt });\n }\n\n /** Called when tool wants to close the popup\n */\n public static close(id: string, apply: boolean, fadeOut?: boolean) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n\n if (popupInfo) {\n if (popupInfo.options) {\n if (apply && popupInfo.options.onApply) popupInfo.options.onApply();\n\n if (popupInfo.options.onClose) popupInfo.options.onClose();\n }\n\n if (fadeOut) {\n CursorPopupManager.onCursorPopupFadeOutEvent.emit({ id });\n setTimeout(() => {\n CursorPopupManager.removePopup(id);\n }, CursorPopup.fadeOutTime);\n } else {\n CursorPopupManager.removePopup(id);\n }\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `close: Could not find popup with id of '${id}'`\n );\n }\n }\n\n private static removePopup(id: string): void {\n const index = CursorPopupManager._popups.findIndex(\n (popupInfo: CursorPopupInfo) => id === popupInfo.id\n );\n // istanbul ignore else\n if (index >= 0) {\n CursorPopupManager._popups.splice(index, 1);\n CursorPopupManager._emitPopupsChangedEvent();\n }\n }\n\n private static resetPopupsRenderRelativePosition(pt: Point) {\n CursorPopupManager.popups.forEach((popupInfo: CursorPopupInfo) => {\n popupInfo.renderRelativePosition = popupInfo.relativePosition;\n\n const flipped = CursorPopupManager.validateRenderRelativePosition(\n pt,\n popupInfo\n );\n\n // If flipped, call again to validate again.\n if (flipped) {\n CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\n }\n });\n }\n\n private static validateRenderRelativePosition(\n pt: Point,\n popupInfo: CursorPopupInfo\n ): boolean {\n const popupRect = CursorPopup.getPopupRect(\n pt,\n Point.create(popupInfo.offset),\n popupInfo.popupSize,\n popupInfo.renderRelativePosition\n );\n const { outPos, flipped } = CursorPopupManager.autoFlip(\n popupInfo.renderRelativePosition,\n popupRect,\n window.innerWidth,\n window.innerHeight\n );\n\n if (flipped) popupInfo.renderRelativePosition = outPos;\n\n return flipped;\n }\n\n private static autoFlip(\n inPos: RelativePosition,\n rect: RectangleProps,\n windowWidth: number,\n windowHeight: number\n ): { outPos: RelativePosition; flipped: boolean } {\n let flipped = false;\n let outPos = inPos;\n\n if (rect.right > windowWidth) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Top:\n case RelativePosition.TopRight:\n outPos = RelativePosition.TopLeft;\n break;\n case RelativePosition.Right:\n outPos = RelativePosition.Left;\n break;\n case RelativePosition.Bottom:\n case RelativePosition.BottomRight:\n outPos = RelativePosition.BottomLeft;\n break;\n }\n }\n\n if (rect.left < 0) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Top:\n case RelativePosition.TopLeft:\n outPos = RelativePosition.TopRight;\n break;\n case RelativePosition.Left:\n outPos = RelativePosition.Right;\n break;\n case RelativePosition.Bottom:\n case RelativePosition.BottomLeft:\n outPos = RelativePosition.BottomRight;\n break;\n }\n }\n\n if (rect.bottom > windowHeight) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Left:\n case RelativePosition.BottomLeft:\n outPos = RelativePosition.TopLeft;\n break;\n case RelativePosition.Bottom:\n outPos = RelativePosition.Top;\n break;\n case RelativePosition.Right:\n case RelativePosition.BottomRight:\n outPos = RelativePosition.TopRight;\n break;\n }\n }\n\n if (rect.top < 0) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Left:\n case RelativePosition.TopLeft:\n outPos = RelativePosition.BottomLeft;\n break;\n case RelativePosition.Top:\n outPos = RelativePosition.Bottom;\n break;\n case RelativePosition.Right:\n case RelativePosition.TopRight:\n outPos = RelativePosition.BottomRight;\n break;\n }\n }\n\n return { outPos, flipped };\n }\n}\n\n/** State for the [[CursorPopupRenderer]] React component */\ninterface CursorPopupRendererState {\n pt: Point;\n}\n\n/** CursorPopupRenderer React component.\n * @public\n */\nexport class CursorPopupRenderer extends React.Component<\n any,\n CursorPopupRendererState\n> {\n constructor(props: any) {\n super(props);\n\n this.state = {\n pt: new Point(),\n };\n }\n\n public override render(): React.ReactNode {\n if (CursorPopupManager.popupCount <= 0) return null;\n\n return <>{this.renderPositions()}</>;\n }\n\n private _handleSizeKnown(popupInfo: CursorPopupInfo, size: SizeProps) {\n popupInfo.popupSize = Size.create(size);\n }\n\n private renderPositions(): React.ReactNode[] {\n const positions = new Array<React.ReactNode>();\n let renderedPosition: React.ReactNode;\n const begin = RelativePosition.Left;\n const end = RelativePosition.BottomRight;\n\n for (let position = begin; position <= end; position++) {\n renderedPosition = this.renderRelativePosition(position);\n if (renderedPosition) positions.push(renderedPosition);\n }\n\n return positions;\n }\n\n private renderRelativePosition(\n relativePosition: RelativePosition\n ): React.ReactNode {\n const filteredInfo = CursorPopupManager.popups.filter(\n (popupInfo: CursorPopupInfo) =>\n popupInfo.renderRelativePosition === relativePosition\n );\n\n if (filteredInfo.length > 0) {\n let totalDimension = 0;\n const ascending =\n relativePosition === RelativePosition.Right ||\n relativePosition === RelativePosition.BottomRight ||\n relativePosition === RelativePosition.Bottom ||\n relativePosition === RelativePosition.BottomLeft;\n\n const positionPopups = filteredInfo\n .sort((a: CursorPopupInfo, b: CursorPopupInfo): number =>\n ascending ? a.priority - b.priority : b.priority - a.priority\n )\n .map((popupInfo: CursorPopupInfo, index: number) => {\n const title =\n popupInfo.options !== undefined ? popupInfo.options.title : \"\";\n const shadow =\n popupInfo.options !== undefined ? popupInfo.options.shadow : false;\n let offset = popupInfo.offset;\n\n if (index > 0)\n offset = this.adjustOffset(\n offset,\n popupInfo.renderRelativePosition,\n totalDimension\n );\n\n if (popupInfo.popupSize)\n totalDimension += this.getDimension(\n popupInfo.popupSize,\n relativePosition\n );\n\n return (\n <CursorPopup\n key={popupInfo.id}\n id={popupInfo.id}\n content={popupInfo.content}\n pt={this.state.pt}\n offset={offset}\n relativePosition={popupInfo.renderRelativePosition}\n title={title}\n shadow={shadow}\n onSizeKnown={(size: SizeProps) =>\n this._handleSizeKnown(popupInfo, size)\n }\n />\n );\n });\n\n return (\n <React.Fragment key={relativePosition.toString()}>\n {positionPopups}\n </React.Fragment>\n );\n }\n\n return null;\n }\n\n private getDimension(\n popupSize: Size,\n relativePosition: RelativePosition\n ): number {\n let dimension = 0;\n\n switch (relativePosition) {\n case RelativePosition.Top:\n case RelativePosition.Bottom:\n case RelativePosition.TopLeft:\n case RelativePosition.TopRight:\n case RelativePosition.BottomLeft:\n case RelativePosition.BottomRight:\n dimension = popupSize.height;\n break;\n case RelativePosition.Left:\n case RelativePosition.Right:\n dimension = popupSize.width;\n break;\n }\n\n return dimension;\n }\n\n private adjustOffset(\n offset: Point,\n relativePosition: RelativePosition,\n dimension: number\n ): Point {\n let outOffset = Point.create(offset.toProps());\n\n switch (relativePosition) {\n case RelativePosition.Top:\n case RelativePosition.Bottom:\n case RelativePosition.TopLeft:\n case RelativePosition.TopRight:\n case RelativePosition.BottomLeft:\n case RelativePosition.BottomRight:\n outOffset = Point.create({ x: offset.x, y: offset.y + dimension });\n break;\n case RelativePosition.Left:\n case RelativePosition.Right:\n outOffset = Point.create({ x: offset.x + dimension, y: offset.y });\n break;\n }\n\n return outOffset;\n }\n\n public override componentDidMount(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.addListener(\n this._handlePopupChangedEvent\n );\n CursorPopupManager.onCursorPopupUpdatePositionEvent.addListener(\n this._handleCursorPopupUpdatePositionEvent\n );\n }\n\n public override componentWillUnmount(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.removeListener(\n this._handlePopupChangedEvent\n );\n CursorPopupManager.onCursorPopupUpdatePositionEvent.removeListener(\n this._handleCursorPopupUpdatePositionEvent\n );\n }\n\n private _handlePopupChangedEvent = (_args: any) => {\n this.forceUpdate();\n };\n\n private _handleCursorPopupUpdatePositionEvent = (\n args: CursorPopupUpdatePositionEventArgs\n ) => {\n this.setState({ pt: Point.create(args.pt) });\n };\n}\n"]}
1
+ {"version":3,"file":"CursorPopupManager.js","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAE7C,0DAAkE;AAElE,kDAAgD;AAChD,mDAAgD;AAChD,+CAA4C;AAuB5C;;GAEG;AACH,mDAAmD;AACnD,MAAa,8BAA+B,SAAQ,wBAA2C;CAAG;AAAlG,wEAAkG;AASlG;;GAEG;AACH,mDAAmD;AACnD,MAAa,uBAAwB,SAAQ,wBAAoC;CAAG;AAApF,0DAAoF;AAiBpF;;GAEG;AACH,mDAAmD;AACnD,MAAM,wBAAyB,SAAQ,wBAAW;CAAG;AAErD;;GAEG;AACH,MAAa,kBAAkB;IAY7B,gBAAgB;IACT,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACxB,kBAAkB,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAEM,MAAM,KAAK,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M,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnE,MAAM;SACT;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEe,iBAAiB;QAC/B,kBAAkB,CAAC,0BAA0B,CAAC,WAAW,CACvD,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,kBAAkB,CAAC,gCAAgC,CAAC,WAAW,CAC7D,IAAI,CAAC,qCAAqC,CAC3C,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,kBAAkB,CAAC,0BAA0B,CAAC,cAAc,CAC1D,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,kBAAkB,CAAC,gCAAgC,CAAC,cAAc,CAChE,IAAI,CAAC,qCAAqC,CAC3C,CAAC;IACJ,CAAC;CAWF;AAnLD,kDAmLC","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 { Logger } from \"@itwin/core-bentley\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport type { RectangleProps, SizeProps } from \"@itwin/core-react\";\nimport { Point, Size } from \"@itwin/core-react\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { CursorPopup } from \"./CursorPopup\";\n\n/** Options for the [[CursorPopupManager]] open method\n * @public\n */\nexport interface CursorPopupOptions {\n /** Title of the popup */\n title?: string;\n /** Called on popup close */\n onClose?: () => void;\n /** Callback to apply changes */\n onApply?: () => void;\n /** Draw shadow */\n shadow?: boolean;\n}\n\n/** CursorPopup Update Position Event Args interface.\n * @internal\n */\nexport interface CursorPopupUpdatePositionEventArgs {\n pt: XAndY;\n}\n\n/** CursorPopup Update Position Event class.\n * @internal\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class CursorPopupUpdatePositionEvent extends UiEvent<CursorPopupUpdatePositionEventArgs> {}\n\n/** CursorPopup FadeOut Event Args interface.\n * @internal\n */\nexport interface CursorPopupFadeOutEventArgs {\n id: string;\n}\n\n/** CursorPopup FadeOut Event class.\n * @internal\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class CursorPopupFadeOutEvent extends UiEvent<CursorPopupFadeOutEventArgs> {}\n\n/** Information maintained by CursorPopupManager about a CursorPopup\n * @internal\n */\ninterface CursorPopupInfo {\n id: string;\n content: React.ReactNode;\n relativePosition: RelativePosition;\n offset: Point;\n priority: number;\n options?: CursorPopupOptions;\n\n renderRelativePosition: RelativePosition;\n popupSize?: Size;\n}\n\n/** Cursor Popups Changed Event class.\n * @internal\n */\n// eslint-disable-next-line deprecation/deprecation\nclass CursorPopupsChangedEvent extends UiEvent<{}> {}\n\n/** CursorPopup component\n * @public\n */\nexport class CursorPopupManager {\n private static _popups: CursorPopupInfo[] = new Array<CursorPopupInfo>();\n\n /** @internal */\n public static readonly onCursorPopupUpdatePositionEvent =\n new CursorPopupUpdatePositionEvent();\n /** @internal */\n public static readonly onCursorPopupFadeOutEvent =\n new CursorPopupFadeOutEvent();\n /** @internal */\n public static readonly onCursorPopupsChangedEvent =\n new CursorPopupsChangedEvent();\n /** @internal */\n public static clearPopups() {\n this._popups.length = 0;\n CursorPopupManager._emitPopupsChangedEvent();\n }\n\n public static get popups() {\n return this._popups;\n }\n\n public static get popupCount() {\n return this._popups.length;\n }\n\n private static _emitPopupsChangedEvent(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.emit({});\n }\n\n private static pushPopup(popupInfo: CursorPopupInfo): void {\n CursorPopupManager._popups.push(popupInfo);\n CursorPopupManager._emitPopupsChangedEvent();\n }\n\n /** Called to open popup with a new set of properties\n */\n public static open(\n id: string,\n content: React.ReactNode,\n pt: XAndY,\n offset: XAndY,\n relativePosition: RelativePosition,\n priority: number = 0,\n options?: CursorPopupOptions\n ) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n if (popupInfo) {\n popupInfo.content = content;\n popupInfo.offset = Point.create(offset);\n popupInfo.relativePosition = relativePosition;\n popupInfo.renderRelativePosition = relativePosition;\n popupInfo.priority = priority;\n popupInfo.options = options;\n } else {\n const newPopupInfo: CursorPopupInfo = {\n id,\n content,\n offset: Point.create(offset),\n relativePosition,\n options,\n renderRelativePosition: relativePosition,\n priority,\n };\n CursorPopupManager.pushPopup(newPopupInfo);\n }\n\n CursorPopupManager.updatePosition(pt);\n }\n\n /** Called to update popup with a new set of properties\n */\n public static update(\n id: string,\n content: React.ReactNode,\n pt: XAndY,\n offset: XAndY,\n relativePosition: RelativePosition,\n priority: number = 0\n ) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n if (popupInfo) {\n popupInfo.content = content;\n popupInfo.offset = Point.create(offset);\n popupInfo.relativePosition = relativePosition;\n popupInfo.renderRelativePosition = relativePosition;\n popupInfo.priority = priority;\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `update: Could not find popup with id of '${id}'`\n );\n }\n\n CursorPopupManager.updatePosition(pt);\n }\n\n /** Called to move the open popup to new location\n */\n public static updatePosition(pt: XAndY) {\n CursorPopupManager.resetPopupsRenderRelativePosition(Point.create(pt));\n CursorPopupManager.onCursorPopupUpdatePositionEvent.emit({ pt });\n }\n\n /** Called when tool wants to close the popup\n */\n public static close(id: string, apply: boolean, fadeOut?: boolean) {\n const popupInfo = CursorPopupManager._popups.find(\n (info: CursorPopupInfo) => id === info.id\n );\n\n if (popupInfo) {\n if (popupInfo.options) {\n if (apply && popupInfo.options.onApply) popupInfo.options.onApply();\n\n if (popupInfo.options.onClose) popupInfo.options.onClose();\n }\n\n if (fadeOut) {\n CursorPopupManager.onCursorPopupFadeOutEvent.emit({ id });\n setTimeout(() => {\n CursorPopupManager.removePopup(id);\n }, CursorPopup.fadeOutTime);\n } else {\n CursorPopupManager.removePopup(id);\n }\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `close: Could not find popup with id of '${id}'`\n );\n }\n }\n\n private static removePopup(id: string): void {\n const index = CursorPopupManager._popups.findIndex(\n (popupInfo: CursorPopupInfo) => id === popupInfo.id\n );\n // istanbul ignore else\n if (index >= 0) {\n CursorPopupManager._popups.splice(index, 1);\n CursorPopupManager._emitPopupsChangedEvent();\n }\n }\n\n private static resetPopupsRenderRelativePosition(pt: Point) {\n CursorPopupManager.popups.forEach((popupInfo: CursorPopupInfo) => {\n popupInfo.renderRelativePosition = popupInfo.relativePosition;\n\n const flipped = CursorPopupManager.validateRenderRelativePosition(\n pt,\n popupInfo\n );\n\n // If flipped, call again to validate again.\n if (flipped) {\n CursorPopupManager.validateRenderRelativePosition(pt, popupInfo);\n }\n });\n }\n\n private static validateRenderRelativePosition(\n pt: Point,\n popupInfo: CursorPopupInfo\n ): boolean {\n const popupRect = CursorPopup.getPopupRect(\n pt,\n Point.create(popupInfo.offset),\n popupInfo.popupSize,\n popupInfo.renderRelativePosition\n );\n const { outPos, flipped } = CursorPopupManager.autoFlip(\n popupInfo.renderRelativePosition,\n popupRect,\n window.innerWidth,\n window.innerHeight\n );\n\n if (flipped) popupInfo.renderRelativePosition = outPos;\n\n return flipped;\n }\n\n private static autoFlip(\n inPos: RelativePosition,\n rect: RectangleProps,\n windowWidth: number,\n windowHeight: number\n ): { outPos: RelativePosition; flipped: boolean } {\n let flipped = false;\n let outPos = inPos;\n\n if (rect.right > windowWidth) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Top:\n case RelativePosition.TopRight:\n outPos = RelativePosition.TopLeft;\n break;\n case RelativePosition.Right:\n outPos = RelativePosition.Left;\n break;\n case RelativePosition.Bottom:\n case RelativePosition.BottomRight:\n outPos = RelativePosition.BottomLeft;\n break;\n }\n }\n\n if (rect.left < 0) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Top:\n case RelativePosition.TopLeft:\n outPos = RelativePosition.TopRight;\n break;\n case RelativePosition.Left:\n outPos = RelativePosition.Right;\n break;\n case RelativePosition.Bottom:\n case RelativePosition.BottomLeft:\n outPos = RelativePosition.BottomRight;\n break;\n }\n }\n\n if (rect.bottom > windowHeight) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Left:\n case RelativePosition.BottomLeft:\n outPos = RelativePosition.TopLeft;\n break;\n case RelativePosition.Bottom:\n outPos = RelativePosition.Top;\n break;\n case RelativePosition.Right:\n case RelativePosition.BottomRight:\n outPos = RelativePosition.TopRight;\n break;\n }\n }\n\n if (rect.top < 0) {\n flipped = true;\n switch (inPos) {\n case RelativePosition.Left:\n case RelativePosition.TopLeft:\n outPos = RelativePosition.BottomLeft;\n break;\n case RelativePosition.Top:\n outPos = RelativePosition.Bottom;\n break;\n case RelativePosition.Right:\n case RelativePosition.TopRight:\n outPos = RelativePosition.BottomRight;\n break;\n }\n }\n\n return { outPos, flipped };\n }\n}\n\n/** State for the [[CursorPopupRenderer]] React component */\ninterface CursorPopupRendererState {\n pt: Point;\n}\n\n/** CursorPopupRenderer React component.\n * @public\n */\nexport class CursorPopupRenderer extends React.Component<\n any,\n CursorPopupRendererState\n> {\n constructor(props: any) {\n super(props);\n\n this.state = {\n pt: new Point(),\n };\n }\n\n public override render(): React.ReactNode {\n if (CursorPopupManager.popupCount <= 0) return null;\n\n return <>{this.renderPositions()}</>;\n }\n\n private _handleSizeKnown(popupInfo: CursorPopupInfo, size: SizeProps) {\n popupInfo.popupSize = Size.create(size);\n }\n\n private renderPositions(): React.ReactNode[] {\n const positions = new Array<React.ReactNode>();\n let renderedPosition: React.ReactNode;\n const begin = RelativePosition.Left;\n const end = RelativePosition.BottomRight;\n\n for (let position = begin; position <= end; position++) {\n renderedPosition = this.renderRelativePosition(position);\n if (renderedPosition) positions.push(renderedPosition);\n }\n\n return positions;\n }\n\n private renderRelativePosition(\n relativePosition: RelativePosition\n ): React.ReactNode {\n const filteredInfo = CursorPopupManager.popups.filter(\n (popupInfo: CursorPopupInfo) =>\n popupInfo.renderRelativePosition === relativePosition\n );\n\n if (filteredInfo.length > 0) {\n let totalDimension = 0;\n const ascending =\n relativePosition === RelativePosition.Right ||\n relativePosition === RelativePosition.BottomRight ||\n relativePosition === RelativePosition.Bottom ||\n relativePosition === RelativePosition.BottomLeft;\n\n const positionPopups = filteredInfo\n .sort((a: CursorPopupInfo, b: CursorPopupInfo): number =>\n ascending ? a.priority - b.priority : b.priority - a.priority\n )\n .map((popupInfo: CursorPopupInfo, index: number) => {\n const title =\n popupInfo.options !== undefined ? popupInfo.options.title : \"\";\n const shadow =\n popupInfo.options !== undefined ? popupInfo.options.shadow : false;\n let offset = popupInfo.offset;\n\n if (index > 0)\n offset = this.adjustOffset(\n offset,\n popupInfo.renderRelativePosition,\n totalDimension\n );\n\n if (popupInfo.popupSize)\n totalDimension += this.getDimension(\n popupInfo.popupSize,\n relativePosition\n );\n\n return (\n <CursorPopup\n key={popupInfo.id}\n id={popupInfo.id}\n content={popupInfo.content}\n pt={this.state.pt}\n offset={offset}\n relativePosition={popupInfo.renderRelativePosition}\n title={title}\n shadow={shadow}\n onSizeKnown={(size: SizeProps) =>\n this._handleSizeKnown(popupInfo, size)\n }\n />\n );\n });\n\n return (\n <React.Fragment key={relativePosition.toString()}>\n {positionPopups}\n </React.Fragment>\n );\n }\n\n return null;\n }\n\n private getDimension(\n popupSize: Size,\n relativePosition: RelativePosition\n ): number {\n let dimension = 0;\n\n switch (relativePosition) {\n case RelativePosition.Top:\n case RelativePosition.Bottom:\n case RelativePosition.TopLeft:\n case RelativePosition.TopRight:\n case RelativePosition.BottomLeft:\n case RelativePosition.BottomRight:\n dimension = popupSize.height;\n break;\n case RelativePosition.Left:\n case RelativePosition.Right:\n dimension = popupSize.width;\n break;\n }\n\n return dimension;\n }\n\n private adjustOffset(\n offset: Point,\n relativePosition: RelativePosition,\n dimension: number\n ): Point {\n let outOffset = Point.create(offset.toProps());\n\n switch (relativePosition) {\n case RelativePosition.Top:\n case RelativePosition.Bottom:\n case RelativePosition.TopLeft:\n case RelativePosition.TopRight:\n case RelativePosition.BottomLeft:\n case RelativePosition.BottomRight:\n outOffset = Point.create({ x: offset.x, y: offset.y + dimension });\n break;\n case RelativePosition.Left:\n case RelativePosition.Right:\n outOffset = Point.create({ x: offset.x + dimension, y: offset.y });\n break;\n }\n\n return outOffset;\n }\n\n public override componentDidMount(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.addListener(\n this._handlePopupChangedEvent\n );\n CursorPopupManager.onCursorPopupUpdatePositionEvent.addListener(\n this._handleCursorPopupUpdatePositionEvent\n );\n }\n\n public override componentWillUnmount(): void {\n CursorPopupManager.onCursorPopupsChangedEvent.removeListener(\n this._handlePopupChangedEvent\n );\n CursorPopupManager.onCursorPopupUpdatePositionEvent.removeListener(\n this._handleCursorPopupUpdatePositionEvent\n );\n }\n\n private _handlePopupChangedEvent = (_args: any) => {\n this.forceUpdate();\n };\n\n private _handleCursorPopupUpdatePositionEvent = (\n args: CursorPopupUpdatePositionEventArgs\n ) => {\n this.setState({ pt: Point.create(args.pt) });\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogManagerBase.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAG;AAE1E;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,EAAE,EAAE,MAA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able-next-line deprecation/deprecation
19
20
  class DialogChangedEvent extends appui_abstract_1.UiEvent {
20
21
  }
21
22
  exports.DialogChangedEvent = DialogChangedEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogManagerBase.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAC7C,0DAAgD;AAChD,gDAA6C;AAC7C,kDAA2D;AAU3D;;GAEG;AACH,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAW1E,+DAA+D;AAC/D,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B;;GAEG;AACH,MAAa,iBAAiB;IAM5B,YAAY,oBAAwC;QAJ5C,aAAQ,GAAiB,IAAI,KAAK,EAAc,CAAC;QAKvD,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;IACpD,CAAC;IAED,6CAA6C;IACtC,MAAM,CAAC,UAAU;QACtB,iBAAiB,CAAC,UAAU,GAAG,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IAC5E,CAAC;IAEM,MAAM,KAAK,SAAS;QACzB,OAAO,iBAAiB,CAAC,UAAU,CAAC;IACtC,CAAC;IAEM,MAAM,KAAK,SAAS,CAAC,MAAc;QACxC,iBAAiB,CAAC,UAAU,GAAG,MAAM,CAAC;IACxC,CAAC;IACD,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;IAEM,MAAM,CAAC,sBAAsB;QAClC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAA,mCAAsB,EAAC,QAAQ,CAAC,CAAC;QAE/C,uBAAuB;QACvB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,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AAW,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC;IArCiB,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAE3D,OAAO,CACL,6BACE,SAAS,EAAC,qCAAqC,EAC/C,GAAG,EAAE,IAAI,CAAC,aAAa,IAEtB,IAAI,CAAC,KAAK,CAAC,cAAc;YACxB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO;iBAC7B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;iBACnE,GAAG,CAAC,CAAC,UAAsB,EAAE,EAAE;gBAC9B,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,UAAU,CAAC,EAAE,IAC/B,UAAU,CAAC,SAAS,CACN,CAClB,CAAC;YACJ,CAAC,CAAC,CACF,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,WAAW,CACvD,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAC1D,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;CAKF;AAlDD,gDAkDC","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 Dialog\n */\n\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { UiFramework } from \"../UiFramework\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\n\n/** Dialog Stack Changed Event Args class.\n * @public\n */\nexport interface DialogChangedEventArgs {\n dialogCount: number;\n activeDialog: React.ReactNode | undefined;\n}\n\n/** Dialog Changed Event class.\n * @public\n */\nexport class DialogChangedEvent extends UiEvent<DialogChangedEventArgs> {}\n\n/** Information maintained by a Dialog Manager about a dialog\n * @public\n */\nexport interface DialogInfo {\n reactNode: React.ReactNode;\n id: string;\n parentDocument: Document;\n}\n\n/** Used if the 'dialog' z-index CSS variable cannot be read */\nconst ZINDEX_DEFAULT = 12000;\n\n/** Dialog Manager class.\n * @internal\n */\nexport class DialogManagerBase {\n private static _sId = 0;\n private _dialogs: DialogInfo[] = new Array<DialogInfo>();\n private _onDialogChangedEvent: DialogChangedEvent;\n private static _topZIndex = ZINDEX_DEFAULT;\n\n constructor(onDialogChangedEvent: DialogChangedEvent) {\n this._onDialogChangedEvent = onDialogChangedEvent;\n }\n\n /** Initialize the modeless dialog manager */\n public static initialize(): void {\n DialogManagerBase._topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public static get topZIndex(): number {\n return DialogManagerBase._topZIndex;\n }\n\n public static set topZIndex(zIndex: number) {\n DialogManagerBase._topZIndex = zIndex;\n }\n public get dialogs() {\n return this._dialogs;\n }\n\n public get onDialogChangedEvent(): DialogChangedEvent {\n return this._onDialogChangedEvent;\n }\n\n public static getDialogZIndexDefault(): number {\n const variable = \"--uicore-z-index-dialog\";\n const value = getCssVariableAsNumber(variable);\n\n // istanbul ignore next\n if (!isNaN(value)) return value;\n\n Logger.logError(\n UiFramework.loggerCategory(this),\n `'${variable}' CSS variable not found`\n );\n return ZINDEX_DEFAULT;\n }\n\n /**\n * Triggers opening a dialog.\n * @param dialog Dialog React component.\n * @param id The unique Id the identifies the dialog.\n * @param parentDocument Optional document required when displaying a dialog in a child popup window.\n */\n public openDialog(\n dialog: React.ReactNode,\n id?: string,\n parentDocument?: Document\n ): void {\n if (!id) id = `Dialog-${++DialogManagerBase._sId}`;\n\n // istanbul ignore next\n const owningDoc = parentDocument ?? document;\n this.pushDialog({ reactNode: dialog, id, parentDocument: owningDoc });\n }\n\n /** @internal */\n public pushDialog(dialogInfo: DialogInfo): void {\n this._dialogs.push(dialogInfo);\n this.emitDialogChangedEvent();\n }\n\n public closeDialog(dialog?: React.ReactNode): void {\n let targetDialog = dialog;\n if (!dialog) targetDialog = this.activeDialog;\n\n this.removeDialog(targetDialog);\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public closeAll(): void {\n this._dialogs = [];\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public removeDialog(dialog: React.ReactNode): void {\n const index = this._dialogs.findIndex((dialogInfo: DialogInfo) => {\n return dialog === dialogInfo.reactNode;\n });\n if (index >= 0) this._dialogs.splice(index, 1);\n if (this._dialogs.length < 1)\n DialogManagerBase.topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public emitDialogChangedEvent(): void {\n this._onDialogChangedEvent.emit({\n dialogCount: this.dialogCount,\n activeDialog: this.activeDialog,\n });\n }\n\n public update(): void {\n this.emitDialogChangedEvent();\n }\n\n public get activeDialog(): React.ReactNode | undefined {\n if (this._dialogs.length > 0)\n return this._dialogs[this._dialogs.length - 1].reactNode;\n\n return undefined;\n }\n\n public get dialogCount(): number {\n return this._dialogs.length;\n }\n}\n\n/** Properties for the [[DialogRendererBase]] component\n * @internal\n */\nexport interface DialogRendererProps {\n dialogManager: DialogManagerBase;\n style?: React.CSSProperties;\n}\n\n/** @internal */\ninterface DialogRendererState {\n parentDocument: Document | null;\n}\n/** DialogRenderer React component.\n * @internal\n */\nexport class DialogRendererBase extends React.PureComponent<\n DialogRendererProps,\n DialogRendererState\n> {\n /** @internal */\n public override readonly state: DialogRendererState = {\n parentDocument: null,\n };\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });\n };\n\n public override render(): React.ReactNode {\n if (this.props.dialogManager.dialogCount <= 0) return null;\n\n return (\n <div\n className=\"appui-react-dialog-render-container\"\n ref={this._handleRefSet}\n >\n {this.state.parentDocument &&\n this.props.dialogManager.dialogs\n .filter((info) => info.parentDocument === this.state.parentDocument)\n .map((dialogInfo: DialogInfo) => {\n return (\n <React.Fragment key={dialogInfo.id}>\n {dialogInfo.reactNode}\n </React.Fragment>\n );\n })}\n </div>\n );\n }\n\n public override componentDidMount(): void {\n this.props.dialogManager.onDialogChangedEvent.addListener(\n this._handleDialogChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n this.props.dialogManager.onDialogChangedEvent.removeListener(\n this._handleDialogChangedEvent\n );\n }\n\n private _handleDialogChangedEvent = (_args: DialogChangedEventArgs) => {\n this.forceUpdate();\n };\n}\n"]}
1
+ {"version":3,"file":"DialogManagerBase.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAC7C,0DAAgD;AAChD,gDAA6C;AAC7C,kDAA2D;AAU3D;;GAEG;AACH,mDAAmD;AACnD,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAW1E,+DAA+D;AAC/D,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B;;GAEG;AACH,MAAa,iBAAiB;IAM5B,YAAY,oBAAwC;QAJ5C,aAAQ,GAAiB,IAAI,KAAK,EAAc,CAAC;QAKvD,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;IACpD,CAAC;IAED,6CAA6C;IACtC,MAAM,CAAC,UAAU;QACtB,iBAAiB,CAAC,UAAU,GAAG,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IAC5E,CAAC;IAEM,MAAM,KAAK,SAAS;QACzB,OAAO,iBAAiB,CAAC,UAAU,CAAC;IACtC,CAAC;IAEM,MAAM,KAAK,SAAS,CAAC,MAAc;QACxC,iBAAiB,CAAC,UAAU,GAAG,MAAM,CAAC;IACxC,CAAC;IACD,IAAW,OA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;CAKF;AAlDD,gDAkDC","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 Dialog\n */\n\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { UiFramework } from \"../UiFramework\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\n\n/** Dialog Stack Changed Event Args class.\n * @public\n */\nexport interface DialogChangedEventArgs {\n dialogCount: number;\n activeDialog: React.ReactNode | undefined;\n}\n\n/** Dialog Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class DialogChangedEvent extends UiEvent<DialogChangedEventArgs> {}\n\n/** Information maintained by a Dialog Manager about a dialog\n * @public\n */\nexport interface DialogInfo {\n reactNode: React.ReactNode;\n id: string;\n parentDocument: Document;\n}\n\n/** Used if the 'dialog' z-index CSS variable cannot be read */\nconst ZINDEX_DEFAULT = 12000;\n\n/** Dialog Manager class.\n * @internal\n */\nexport class DialogManagerBase {\n private static _sId = 0;\n private _dialogs: DialogInfo[] = new Array<DialogInfo>();\n private _onDialogChangedEvent: DialogChangedEvent;\n private static _topZIndex = ZINDEX_DEFAULT;\n\n constructor(onDialogChangedEvent: DialogChangedEvent) {\n this._onDialogChangedEvent = onDialogChangedEvent;\n }\n\n /** Initialize the modeless dialog manager */\n public static initialize(): void {\n DialogManagerBase._topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public static get topZIndex(): number {\n return DialogManagerBase._topZIndex;\n }\n\n public static set topZIndex(zIndex: number) {\n DialogManagerBase._topZIndex = zIndex;\n }\n public get dialogs() {\n return this._dialogs;\n }\n\n public get onDialogChangedEvent(): DialogChangedEvent {\n return this._onDialogChangedEvent;\n }\n\n public static getDialogZIndexDefault(): number {\n const variable = \"--uicore-z-index-dialog\";\n const value = getCssVariableAsNumber(variable);\n\n // istanbul ignore next\n if (!isNaN(value)) return value;\n\n Logger.logError(\n UiFramework.loggerCategory(this),\n `'${variable}' CSS variable not found`\n );\n return ZINDEX_DEFAULT;\n }\n\n /**\n * Triggers opening a dialog.\n * @param dialog Dialog React component.\n * @param id The unique Id the identifies the dialog.\n * @param parentDocument Optional document required when displaying a dialog in a child popup window.\n */\n public openDialog(\n dialog: React.ReactNode,\n id?: string,\n parentDocument?: Document\n ): void {\n if (!id) id = `Dialog-${++DialogManagerBase._sId}`;\n\n // istanbul ignore next\n const owningDoc = parentDocument ?? document;\n this.pushDialog({ reactNode: dialog, id, parentDocument: owningDoc });\n }\n\n /** @internal */\n public pushDialog(dialogInfo: DialogInfo): void {\n this._dialogs.push(dialogInfo);\n this.emitDialogChangedEvent();\n }\n\n public closeDialog(dialog?: React.ReactNode): void {\n let targetDialog = dialog;\n if (!dialog) targetDialog = this.activeDialog;\n\n this.removeDialog(targetDialog);\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public closeAll(): void {\n this._dialogs = [];\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public removeDialog(dialog: React.ReactNode): void {\n const index = this._dialogs.findIndex((dialogInfo: DialogInfo) => {\n return dialog === dialogInfo.reactNode;\n });\n if (index >= 0) this._dialogs.splice(index, 1);\n if (this._dialogs.length < 1)\n DialogManagerBase.topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public emitDialogChangedEvent(): void {\n this._onDialogChangedEvent.emit({\n dialogCount: this.dialogCount,\n activeDialog: this.activeDialog,\n });\n }\n\n public update(): void {\n this.emitDialogChangedEvent();\n }\n\n public get activeDialog(): React.ReactNode | undefined {\n if (this._dialogs.length > 0)\n return this._dialogs[this._dialogs.length - 1].reactNode;\n\n return undefined;\n }\n\n public get dialogCount(): number {\n return this._dialogs.length;\n }\n}\n\n/** Properties for the [[DialogRendererBase]] component\n * @internal\n */\nexport interface DialogRendererProps {\n dialogManager: DialogManagerBase;\n style?: React.CSSProperties;\n}\n\n/** @internal */\ninterface DialogRendererState {\n parentDocument: Document | null;\n}\n/** DialogRenderer React component.\n * @internal\n */\nexport class DialogRendererBase extends React.PureComponent<\n DialogRendererProps,\n DialogRendererState\n> {\n /** @internal */\n public override readonly state: DialogRendererState = {\n parentDocument: null,\n };\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });\n };\n\n public override render(): React.ReactNode {\n if (this.props.dialogManager.dialogCount <= 0) return null;\n\n return (\n <div\n className=\"appui-react-dialog-render-container\"\n ref={this._handleRefSet}\n >\n {this.state.parentDocument &&\n this.props.dialogManager.dialogs\n .filter((info) => info.parentDocument === this.state.parentDocument)\n .map((dialogInfo: DialogInfo) => {\n return (\n <React.Fragment key={dialogInfo.id}>\n {dialogInfo.reactNode}\n </React.Fragment>\n );\n })}\n </div>\n );\n }\n\n public override componentDidMount(): void {\n this.props.dialogManager.onDialogChangedEvent.addListener(\n this._handleDialogChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n this.props.dialogManager.onDialogChangedEvent.removeListener(\n this._handleDialogChangedEvent\n );\n }\n\n private _handleDialogChangedEvent = (_args: DialogChangedEventArgs) => {\n this.forceUpdate();\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementTooltip.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/feedback/ElementTooltip.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAOvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CA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CACP;IACnC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAU;IAC1C,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAU;IAEzC,WAAkB,4BAA4B,IAAI,0BAA0B,CAE3E;IACD,WAAkB,gBAAgB,IAAI,OAAO,CAE5C;WAEa,WAAW,CACvB,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,iBAAiB,EAC1B,EAAE,CAAC,EAAE,KAAK,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI;WAiBO,WAAW,IAAI,IAAI;IASjC,WAAkB,eAAe,IAAI,OAAO,CAE3C;IAED,WAAkB,eAAe,CAAC,IAAI,EAAE,OAAO,EAG9C;IAED,OAAO,CAAC,KAAK,CAGX;IACF,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B,OAAO,CAAC,SAAS,CAAC,CAAQ;IAE1B,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAO3D;gBAEU,KAAK,EAAE,WAAW;IAId,MAAM;IAkBN,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAM5C,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAwB/B,OAAO,CAAC,iCAAiC,CAUvC;IAGF,OAAO,CAAC,kBAAkB,CAGxB;IAEF,OAAO,CAAC,cAAc;CA4BvB"}
@@ -13,10 +13,10 @@ const React = require("react");
13
13
  const appui_abstract_1 = require("@itwin/appui-abstract");
14
14
  const core_react_1 = require("@itwin/core-react");
15
15
  const appui_layout_react_1 = require("@itwin/appui-layout-react");
16
- const MessageSpan_1 = require("../messages/MessageSpan");
17
16
  /** ElementTooltip Changed Event class.
18
17
  * @public
19
18
  */
19
+ // eslint-disable-next-line deprecation/deprecation
20
20
  class ElementTooltipChangedEvent extends appui_abstract_1.UiEvent {
21
21
  }
22
22
  exports.ElementTooltipChangedEvent = ElementTooltipChangedEvent;
@@ -95,9 +95,9 @@ class ElementTooltip extends React.Component {
95
95
  if (!this.state.isVisible)
96
96
  return null;
97
97
  const className = (0, classnames_1.default)("uifw-element-tooltip", this.props.className);
98
- const messageNode = React.createElement(MessageSpan_1.MessageDiv, { message: this.state.message });
99
98
  return (React.createElement("div", { className: "uifw-element-tooltip-container" },
100
- React.createElement(appui_layout_react_1.Tooltip, { className: className, style: this.props.style, position: this.state.position, onSizeChanged: this._handleSizeChanged }, messageNode)));
99
+ React.createElement(appui_layout_react_1.Tooltip, { className: className, style: this.props.style, position: this.state.position, onSizeChanged: this._handleSizeChanged },
100
+ React.createElement(core_react_1.MessageRenderer, { message: this.state.message }))));
101
101
  }
102
102
  componentDidMount() {
103
103
  ElementTooltip.onElementTooltipChangedEvent.addListener(this._handleElementTooltipChangedEvent);
@@ -1 +1 @@
1
- {"version":3,"file":"ElementTooltip.js","sourceRoot":"","sources":["../../../../src/appui-react/feedback/ElementTooltip.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAG/B,0DAAgD;AAEhD,kDAA8C;AAC9C,kEAGmC;AACnC,yDAAqD;AAwBrD;;GAEG;AACH,MAAa,0BAA2B,SAAQ,wBAAuC;CAAG;AAA1F,gEAA0F;AAE1F;;GAEG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,SAGzC;IAMQ,MAAM,KAAK,4BAA4B;QAC5C,OAAO,cAAc,CAAC,2BAA2B,CAAC;IACpD,CAAC;IACM,MAAM,KAAK,gBAAgB;QAChC,OAAO,cAAc,CAAC,iBAAiB,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,WAAW,CACvB,EAAe,EACf,OAA0B,EAC1B,EAAU,EACV,OAAwB;QAExB,qBAAqB;QACrB,IAAI,cAAc,CAAC,gBAAgB;YAAE,OAAO;QAC5C,cAAc,CAAC,iBAAiB,GAAG,IAAI,CAAC;QACxC,cAAc,CAAC,4BAA4B,CAAC,IAAI,CAAC;YAC/C,gBAAgB,EAAE,IAAI;YACtB,EAAE;Y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E,OAAO,IAAI,CAAC;YAErD,uBAAuB;YACvB,OAAO;gBACL,QAAQ;aACT,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;;AA/Kc,0CAA2B,GACxC,IAAI,0BAA0B,EAAE,AADQ,CACP;AALxB,wCAAc","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 Notification\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport type { ToolTipOptions } from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { CommonProps, Point, SizeProps } from \"@itwin/core-react\";\nimport { Rectangle } from \"@itwin/core-react\";\nimport {\n offsetAndContainInContainer,\n Tooltip,\n} from \"@itwin/appui-layout-react\";\nimport { MessageDiv } from \"../messages/MessageSpan\";\nimport type { NotifyMessageType } from \"../messages/ReactNotifyMessageDetails\";\n\n/** [[ElementTooltip]] State.\n * @internal\n */\ninterface ElementTooltipState {\n isVisible: boolean;\n message: NotifyMessageType;\n position: XAndY;\n options?: ToolTipOptions;\n}\n\n/** [[ElementTooltipChangedEvent]] arguments.\n * @public\n */\nexport interface ElementTooltipChangedEventArgs {\n isTooltipVisible: boolean;\n message: NotifyMessageType;\n el?: HTMLElement;\n pt?: XAndY;\n options?: ToolTipOptions;\n}\n\n/** ElementTooltip Changed Event class.\n * @public\n */\nexport class ElementTooltipChangedEvent extends UiEvent<ElementTooltipChangedEventArgs> {}\n\n/** ElementTooltip React component.\n * @public\n */\nexport class ElementTooltip extends React.Component<\n CommonProps,\n ElementTooltipState\n> {\n private static _elementTooltipChangedEvent: ElementTooltipChangedEvent =\n new ElementTooltipChangedEvent();\n private static _isTooltipVisible: boolean;\n private static _isTooltipHalted: boolean;\n\n public static get onElementTooltipChangedEvent(): ElementTooltipChangedEvent {\n return ElementTooltip._elementTooltipChangedEvent;\n }\n public static get isTooltipVisible(): boolean {\n return ElementTooltip._isTooltipVisible;\n }\n\n public static showTooltip(\n el: HTMLElement,\n message: NotifyMessageType,\n pt?: XAndY,\n options?: ToolTipOptions\n ): void {\n // istanbul ignore if\n if (ElementTooltip._isTooltipHalted) return;\n ElementTooltip._isTooltipVisible = true;\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: true,\n el,\n message,\n pt,\n options,\n });\n el.ownerDocument.addEventListener(\n \"mousemove\",\n ElementTooltip._handleMouseMove\n );\n }\n\n public static hideTooltip(): void {\n ElementTooltip._isTooltipVisible = false;\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: false,\n message: \"\",\n });\n }\n\n // istanbul ignore next\n public static get isTooltipHalted(): boolean {\n return ElementTooltip._isTooltipHalted;\n }\n // istanbul ignore next\n public static set isTooltipHalted(halt: boolean) {\n ElementTooltip._isTooltipHalted = halt;\n if (halt && ElementTooltip._isTooltipVisible) ElementTooltip.hideTooltip();\n }\n\n private _size: SizeProps = {\n height: 0,\n width: 0,\n };\n private _element?: HTMLElement;\n private _position?: XAndY;\n\n /** @internal */\n public override readonly state: Readonly<ElementTooltipState> = {\n message: \"\",\n isVisible: false,\n position: {\n x: 0,\n y: 0,\n },\n };\n\n constructor(props: CommonProps) {\n super(props);\n }\n\n public override render() {\n if (!this.state.isVisible) return null;\n\n const className = classnames(\"uifw-element-tooltip\", this.props.className);\n\n const messageNode = <MessageDiv message={this.state.message} />;\n\n return (\n <div className=\"uifw-element-tooltip-container\">\n <Tooltip\n className={className}\n style={this.props.style}\n position={this.state.position}\n onSizeChanged={this._handleSizeChanged}\n >\n {messageNode}\n </Tooltip>\n </div>\n );\n }\n\n public override componentDidMount(): void {\n ElementTooltip.onElementTooltipChangedEvent.addListener(\n this._handleElementTooltipChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n ElementTooltip.onElementTooltipChangedEvent.removeListener(\n this._handleElementTooltipChangedEvent\n );\n }\n\n private static _handleMouseMove(event: MouseEvent) {\n const el = event.currentTarget as Document;\n /* Only monitor mouse movement when an ElementTooltip is open. */\n if (\n (el && ElementTooltip._isTooltipHalted) ||\n !ElementTooltip._isTooltipVisible\n ) {\n el.removeEventListener(\"mousemove\", ElementTooltip._handleMouseMove);\n return;\n }\n const hoveredElement = el\n ? el.elementFromPoint(event.clientX, event.clientY)\n : undefined;\n /* If the mouse has moved to an element that is not the view canvas, close the ElementTooltip. */\n // istanbul ignore next.\n if (hoveredElement && hoveredElement.localName !== \"canvas\") {\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: false,\n message: \"\",\n });\n el.removeEventListener(\"mousemove\", ElementTooltip._handleMouseMove);\n return;\n }\n }\n private _handleElementTooltipChangedEvent = (\n args: ElementTooltipChangedEventArgs\n ) => {\n this._element = args.el;\n this._position = args.pt;\n this.setState({\n isVisible: args.isTooltipVisible,\n message: args.message,\n });\n this.updatePosition();\n };\n\n // istanbul ignore next\n private _handleSizeChanged = (size: SizeProps) => {\n this._size = size;\n this.updatePosition();\n };\n\n private updatePosition() {\n this.setState((prevState) => {\n if (!this._element) return null;\n // istanbul ignore next\n if (!this._position) return null;\n\n const containerBounds = Rectangle.create(\n this._element.getBoundingClientRect()\n );\n const relativeBounds = Rectangle.createFromSize(this._size).offset(\n this._position\n );\n const adjustedPosition: Point = offsetAndContainInContainer(\n relativeBounds,\n containerBounds.getSize(),\n { x: 8, y: 8 }\n );\n const position = adjustedPosition.offset(containerBounds.topLeft());\n\n // istanbul ignore else\n if (position.equals(prevState.position)) return null;\n\n // istanbul ignore next\n return {\n position,\n };\n });\n }\n}\n"]}
1
+ {"version":3,"file":"ElementTooltip.js","sourceRoot":"","sources":["../../../../src/appui-react/feedback/ElementTooltip.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAG/B,0DAAgD;AAEhD,kDAA+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AAC;YAEjC,MAAM,eAAe,GAAG,sBAAS,CAAC,MAAM,CACtC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CACtC,CAAC;YACF,MAAM,cAAc,GAAG,sBAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAChE,IAAI,CAAC,SAAS,CACf,CAAC;YACF,MAAM,gBAAgB,GAAU,IAAA,gDAA2B,EACzD,cAAc,EACd,eAAe,CAAC,OAAO,EAAE,EACzB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CACf,CAAC;YACF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC;YAEpE,uBAAuB;YACvB,IAAI,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAC;YAErD,uBAAuB;YACvB,OAAO;gBACL,QAAQ;aACT,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;;AA5Kc,0CAA2B,GACxC,IAAI,0BAA0B,EAAE,AADQ,CACP;AALxB,wCAAc","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 Notification\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport type { ToolTipOptions } from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { CommonProps, Point, SizeProps } from \"@itwin/core-react\";\nimport { MessageRenderer, Rectangle } from \"@itwin/core-react\";\nimport {\n offsetAndContainInContainer,\n Tooltip,\n} from \"@itwin/appui-layout-react\";\nimport type { NotifyMessageType } from \"../messages/ReactNotifyMessageDetails\";\n\n/** [[ElementTooltip]] State.\n * @internal\n */\ninterface ElementTooltipState {\n isVisible: boolean;\n message: NotifyMessageType;\n position: XAndY;\n options?: ToolTipOptions;\n}\n\n/** [[ElementTooltipChangedEvent]] arguments.\n * @public\n */\nexport interface ElementTooltipChangedEventArgs {\n isTooltipVisible: boolean;\n message: NotifyMessageType;\n el?: HTMLElement;\n pt?: XAndY;\n options?: ToolTipOptions;\n}\n\n/** ElementTooltip Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ElementTooltipChangedEvent extends UiEvent<ElementTooltipChangedEventArgs> {}\n\n/** ElementTooltip React component.\n * @public\n */\nexport class ElementTooltip extends React.Component<\n CommonProps,\n ElementTooltipState\n> {\n private static _elementTooltipChangedEvent: ElementTooltipChangedEvent =\n new ElementTooltipChangedEvent();\n private static _isTooltipVisible: boolean;\n private static _isTooltipHalted: boolean;\n\n public static get onElementTooltipChangedEvent(): ElementTooltipChangedEvent {\n return ElementTooltip._elementTooltipChangedEvent;\n }\n public static get isTooltipVisible(): boolean {\n return ElementTooltip._isTooltipVisible;\n }\n\n public static showTooltip(\n el: HTMLElement,\n message: NotifyMessageType,\n pt?: XAndY,\n options?: ToolTipOptions\n ): void {\n // istanbul ignore if\n if (ElementTooltip._isTooltipHalted) return;\n ElementTooltip._isTooltipVisible = true;\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: true,\n el,\n message,\n pt,\n options,\n });\n el.ownerDocument.addEventListener(\n \"mousemove\",\n ElementTooltip._handleMouseMove\n );\n }\n\n public static hideTooltip(): void {\n ElementTooltip._isTooltipVisible = false;\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: false,\n message: \"\",\n });\n }\n\n // istanbul ignore next\n public static get isTooltipHalted(): boolean {\n return ElementTooltip._isTooltipHalted;\n }\n // istanbul ignore next\n public static set isTooltipHalted(halt: boolean) {\n ElementTooltip._isTooltipHalted = halt;\n if (halt && ElementTooltip._isTooltipVisible) ElementTooltip.hideTooltip();\n }\n\n private _size: SizeProps = {\n height: 0,\n width: 0,\n };\n private _element?: HTMLElement;\n private _position?: XAndY;\n\n /** @internal */\n public override readonly state: Readonly<ElementTooltipState> = {\n message: \"\",\n isVisible: false,\n position: {\n x: 0,\n y: 0,\n },\n };\n\n constructor(props: CommonProps) {\n super(props);\n }\n\n public override render() {\n if (!this.state.isVisible) return null;\n\n const className = classnames(\"uifw-element-tooltip\", this.props.className);\n return (\n <div className=\"uifw-element-tooltip-container\">\n <Tooltip\n className={className}\n style={this.props.style}\n position={this.state.position}\n onSizeChanged={this._handleSizeChanged}\n >\n <MessageRenderer message={this.state.message} />\n </Tooltip>\n </div>\n );\n }\n\n public override componentDidMount(): void {\n ElementTooltip.onElementTooltipChangedEvent.addListener(\n this._handleElementTooltipChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n ElementTooltip.onElementTooltipChangedEvent.removeListener(\n this._handleElementTooltipChangedEvent\n );\n }\n\n private static _handleMouseMove(event: MouseEvent) {\n const el = event.currentTarget as Document;\n /* Only monitor mouse movement when an ElementTooltip is open. */\n if (\n (el && ElementTooltip._isTooltipHalted) ||\n !ElementTooltip._isTooltipVisible\n ) {\n el.removeEventListener(\"mousemove\", ElementTooltip._handleMouseMove);\n return;\n }\n const hoveredElement = el\n ? el.elementFromPoint(event.clientX, event.clientY)\n : undefined;\n /* If the mouse has moved to an element that is not the view canvas, close the ElementTooltip. */\n // istanbul ignore next.\n if (hoveredElement && hoveredElement.localName !== \"canvas\") {\n ElementTooltip.onElementTooltipChangedEvent.emit({\n isTooltipVisible: false,\n message: \"\",\n });\n el.removeEventListener(\"mousemove\", ElementTooltip._handleMouseMove);\n return;\n }\n }\n private _handleElementTooltipChangedEvent = (\n args: ElementTooltipChangedEventArgs\n ) => {\n this._element = args.el;\n this._position = args.pt;\n this.setState({\n isVisible: args.isTooltipVisible,\n message: args.message,\n });\n this.updatePosition();\n };\n\n // istanbul ignore next\n private _handleSizeChanged = (size: SizeProps) => {\n this._size = size;\n this.updatePosition();\n };\n\n private updatePosition() {\n this.setState((prevState) => {\n if (!this._element) return null;\n // istanbul ignore next\n if (!this._position) return null;\n\n const containerBounds = Rectangle.create(\n this._element.getBoundingClientRect()\n );\n const relativeBounds = Rectangle.createFromSize(this._size).offset(\n this._position\n );\n const adjustedPosition: Point = offsetAndContainInContainer(\n relativeBounds,\n containerBounds.getSize(),\n { x: 8, y: 8 }\n );\n const position = adjustedPosition.offset(containerBounds.topLeft());\n\n // istanbul ignore else\n if (position.equals(prevState.position)) return null;\n\n // istanbul ignore next\n return {\n position,\n };\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkContent.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,yBAAyB,CAAC;CAAG;AAEhF;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,oCAAoC;IACpC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,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AC;KACjE,CAAC;CACH"}
@@ -13,12 +13,14 @@ const DialogManagerBase_1 = require("../dialog/DialogManagerBase");
13
13
  /** Mouse Down Changed Event class.
14
14
  * @public
15
15
  */
16
+ // eslint-disable-next-line deprecation/deprecation
16
17
  class MouseDownChangedEvent extends appui_abstract_1.UiEvent {
17
18
  }
18
19
  exports.MouseDownChangedEvent = MouseDownChangedEvent;
19
20
  /** Active Content Changed Event class.
20
21
  * @public
21
22
  */
23
+ // eslint-disable-next-line deprecation/deprecation
22
24
  class ActiveContentChangedEvent extends appui_abstract_1.UiEvent {
23
25
  }
24
26
  exports.ActiveContentChangedEvent = ActiveContentChangedEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkContent.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkContent.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAIhD,mEAAiE;AAWjE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,wBAAkC;CAAG;AAAhF,sDAAgF;AAYhF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAsC;CAAG;AAAxF,8DAAwF;AAExF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,sCAAkB;CAAG;AAApE,8DAAoE","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ContentControl } from \"../content/ContentControl\";\nimport type { ContentGroup, ContentGroupProps } from \"../content/ContentGroup\";\nimport type { ContentLayoutDef } from \"../content/ContentLayout\";\nimport { DialogChangedEvent } from \"../dialog/DialogManagerBase\";\nimport type { FrameworkStackedDialog } from \"./FrameworkDialogs\";\n\n/** [[MouseDownChangedEvent]] Args interface.\n * @public\n */\nexport interface MouseDownChangedEventArgs {\n /** Indicates whether the mouse is down */\n mouseDown: boolean;\n}\n\n/** Mouse Down Changed Event class.\n * @public\n */\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> {}\n\n/** [[ActiveContentChangedEvent]] Args interface.\n * @public\n */\nexport interface ActiveContentChangedEventArgs {\n /** React node of the old content */\n oldContent?: React.ReactNode;\n /** React node of the newly active content */\n activeContent?: React.ReactNode;\n}\n\n/** Active Content Changed Event class.\n * @public\n */\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> {}\n\n/** Content Dialog Changed Event class.\n * @public\n */\nexport class ContentDialogChangedEvent extends DialogChangedEvent {}\n\n/** @public */\nexport interface ContentDialogInfo {\n reactNode: React.ReactNode;\n zIndex: number;\n parentDocument: Document;\n}\n\n/**\n * [[UiFramework.content]] interface\n * @public\n */\nexport interface FrameworkContent {\n /** Gets the [[MouseDownChangedEvent]] */\n readonly onMouseDownChangedEvent: MouseDownChangedEvent;\n\n /** Determines if the mouse is down in a content view */\n readonly isMouseDown: boolean;\n\n /** Sets the mouse down status for a content view */\n setMouseDown(mouseDown: boolean): void;\n\n /** Gets the [[ActiveContentChangedEvent]] */\n readonly onActiveContentChangedEvent: ActiveContentChangedEvent;\n\n /** Fires when floating contents are added or removed */\n\n readonly onAvailableContentChangedEvent: UiEvent<{ contentId: string }>;\n\n /** Gets the active content as a React.ReactNode. */\n getActive(): React.ReactNode | undefined;\n\n /** Return the active ContentControl. */\n getActiveContentControl(): ContentControl | undefined;\n\n addFloatingContentControl(contentControl?: ContentControl): void;\n\n dropFloatingContentControl(contentControl?: ContentControl): void;\n\n /** Sets the active [[ContentControl]] */\n setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing?: boolean\n ): void;\n\n /** Refreshes the active [[ContentControl]] */\n refreshActive(activeContent: React.ReactNode): void;\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n isContentSheetView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n isContentDrawingView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n isContentSpatialView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n isContentOrthographicView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n isContent3dView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n contentSupportsCamera(content: ContentControl | undefined): boolean;\n\n /**\n * Manage content layouts.\n * @public\n */\n readonly layouts: {\n /** build a layout key that is unique for group layout combination */\n getKey(props: { contentGroupId: string; layoutId: string }): string;\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef;\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n find(layoutKey: string): ContentLayoutDef | undefined;\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n add(layoutId: string, layoutDef: ContentLayoutDef): void;\n\n /** Gets the active Content Layout */\n readonly activeLayout: ContentLayoutDef | undefined;\n\n /** Gets the active Content Group */\n readonly activeContentGroup: ContentGroup | undefined;\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void>;\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n setActiveContentGroup(contentGroup: ContentGroup): Promise<void>;\n\n /** Refreshes the active layout and content group.\n */\n refreshActive(): void;\n };\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n readonly dialogs: FrameworkStackedDialog<ContentDialogInfo> & {\n /** Content Dialog Changed Event */\n readonly onContentDialogChangedEvent: ContentDialogChangedEvent;\n };\n}\n"]}
1
+ {"version":3,"file":"FrameworkContent.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkContent.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAIhD,mEAAiE;AAWjE;;GAEG;AACH,mDAAmD;AACnD,MAAa,qBAAsB,SAAQ,wBAAkC;CAAG;AAAhF,sDAAgF;AAYhF;;GAEG;AACH,mDAAmD;AACnD,MAAa,yBAA0B,SAAQ,wBAAsC;CAAG;AAAxF,8DAAwF;AAExF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,sCAAkB;CAAG;AAApE,8DAAoE","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport type { ContentLayoutProps } from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ContentControl } from \"../content/ContentControl\";\nimport type { ContentGroup, ContentGroupProps } from \"../content/ContentGroup\";\nimport type { ContentLayoutDef } from \"../content/ContentLayout\";\nimport { DialogChangedEvent } from \"../dialog/DialogManagerBase\";\nimport type { FrameworkStackedDialog } from \"./FrameworkDialogs\";\n\n/** [[MouseDownChangedEvent]] Args interface.\n * @public\n */\nexport interface MouseDownChangedEventArgs {\n /** Indicates whether the mouse is down */\n mouseDown: boolean;\n}\n\n/** Mouse Down Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> {}\n\n/** [[ActiveContentChangedEvent]] Args interface.\n * @public\n */\nexport interface ActiveContentChangedEventArgs {\n /** React node of the old content */\n oldContent?: React.ReactNode;\n /** React node of the newly active content */\n activeContent?: React.ReactNode;\n}\n\n/** Active Content Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> {}\n\n/** Content Dialog Changed Event class.\n * @public\n */\nexport class ContentDialogChangedEvent extends DialogChangedEvent {}\n\n/** @public */\nexport interface ContentDialogInfo {\n reactNode: React.ReactNode;\n zIndex: number;\n parentDocument: Document;\n}\n\n/**\n * [[UiFramework.content]] interface\n * @public\n */\nexport interface FrameworkContent {\n /** Gets the [[MouseDownChangedEvent]] */\n readonly onMouseDownChangedEvent: MouseDownChangedEvent;\n\n /** Determines if the mouse is down in a content view */\n readonly isMouseDown: boolean;\n\n /** Sets the mouse down status for a content view */\n setMouseDown(mouseDown: boolean): void;\n\n /** Gets the [[ActiveContentChangedEvent]] */\n readonly onActiveContentChangedEvent: ActiveContentChangedEvent;\n\n /** Fires when floating contents are added or removed */\n\n // eslint-disable-next-line deprecation/deprecation\n readonly onAvailableContentChangedEvent: UiEvent<{ contentId: string }>;\n\n /** Gets the active content as a React.ReactNode. */\n getActive(): React.ReactNode | undefined;\n\n /** Return the active ContentControl. */\n getActiveContentControl(): ContentControl | undefined;\n\n addFloatingContentControl(contentControl?: ContentControl): void;\n\n dropFloatingContentControl(contentControl?: ContentControl): void;\n\n /** Sets the active [[ContentControl]] */\n setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing?: boolean\n ): void;\n\n /** Refreshes the active [[ContentControl]] */\n refreshActive(activeContent: React.ReactNode): void;\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n isContentSheetView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n isContentDrawingView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n isContentSpatialView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n isContentOrthographicView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n isContent3dView(content: ContentControl | undefined): boolean;\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n contentSupportsCamera(content: ContentControl | undefined): boolean;\n\n /**\n * Manage content layouts.\n * @public\n */\n readonly layouts: {\n /** build a layout key that is unique for group layout combination */\n getKey(props: { contentGroupId: string; layoutId: string }): string;\n\n /** Return a LayoutDef that is specific to a content group.\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n getForGroup(\n contentGroupProps: ContentGroupProps | ContentGroup,\n overrideContentLayout?: ContentLayoutProps\n ): ContentLayoutDef;\n\n /** Finds a Content Layout with a given id.\n * @param layoutKey group specific layout id, see `getLayoutKey`\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\n */\n find(layoutKey: string): ContentLayoutDef | undefined;\n\n /** Adds a Content Layout.\n * @param layoutId the id of the Content Layout to add\n * @param layoutDef the Content Layout definition to add\n */\n add(layoutId: string, layoutDef: ContentLayoutDef): void;\n\n /** Gets the active Content Layout */\n readonly activeLayout: ContentLayoutDef | undefined;\n\n /** Gets the active Content Group */\n readonly activeContentGroup: ContentGroup | undefined;\n\n /** Sets the active Content Layout, Content Group and Content Control.\n * @param contentLayoutDef Content layout to make active\n * @param contentGroup Content Group to make active\n */\n setActive(\n contentLayoutDef: ContentLayoutDef,\n contentGroup: ContentGroup\n ): Promise<void>;\n\n /** Sets the active Content Group.\n * @param contentGroup Content Group to make active\n */\n setActiveContentGroup(contentGroup: ContentGroup): Promise<void>;\n\n /** Refreshes the active layout and content group.\n */\n refreshActive(): void;\n };\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n readonly dialogs: FrameworkStackedDialog<ContentDialogInfo> & {\n /** Content Dialog Changed Event */\n readonly onContentDialogChangedEvent: ContentDialogChangedEvent;\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkFrontstages.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkFrontstages.ts"],"names":[],"mappings":";AAIA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,KAAK,EACV,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wBAAwB,CAAC,EAAE,aAAa,CAAC;IACzC,sBAAsB,EAAE,aAAa,CAAC;CACvC;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,OAAO,CAAC,4BAA4B,CAAC;CAAG;AAEtF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mCAAmC;IACnC,wBAAwB,EAAE,aAAa,CAAC;IACxC,iCAAiC;IACjC,sBAAsB,CAAC,EAAE,aAAa,C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B,EAAE,eAAe,GAAG,SAAS,CAAC;IAE5D;;OAEG;IACH,mBAAmB,CAAC,eAAe,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEhE;OACG;IACH,oBAAoB,IAAI,IAAI,CAAC;IAE7B;OACG;IACH,qBAAqB,IAAI,IAAI,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAEtC;;;OAGG;IACH,sBAAsB,CACpB,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,gBAAgB,GACjC,IAAI,CAAC;IAER;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE9D;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAEpD;;OAEG;IACH,oBAAoB,CAAC,gBAAgB,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;OACG;IACH,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,aAAa,GAAG,SAAS,CAAC;IAE3D;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC"}
1
+ {"version":3,"file":"FrameworkFrontstages.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkFrontstages.ts"],"names":[],"mappings":";AAIA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC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AE,gBAAgB,GACjC,IAAI,CAAC;IAER;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE9D;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAEpD;;OAEG;IACH,oBAAoB,CAAC,gBAAgB,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;OACG;IACH,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,aAAa,GAAG,SAAS,CAAC;IAE3D;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC"}
@@ -12,24 +12,28 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
12
12
  /** Frontstage Activated Event class.
13
13
  * @public
14
14
  */
15
+ // eslint-disable-next-line deprecation/deprecation
15
16
  class FrontstageActivatedEvent extends appui_abstract_1.UiEvent {
16
17
  }
17
18
  exports.FrontstageActivatedEvent = FrontstageActivatedEvent;
18
19
  /** Frontstage Deactivated Event class.
19
20
  * @public
20
21
  */
22
+ // eslint-disable-next-line deprecation/deprecation
21
23
  class FrontstageDeactivatedEvent extends appui_abstract_1.UiEvent {
22
24
  }
23
25
  exports.FrontstageDeactivatedEvent = FrontstageDeactivatedEvent;
24
26
  /** Frontstage Ready Event class.
25
27
  * @public
26
28
  */
29
+ // eslint-disable-next-line deprecation/deprecation
27
30
  class FrontstageReadyEvent extends appui_abstract_1.UiEvent {
28
31
  }
29
32
  exports.FrontstageReadyEvent = FrontstageReadyEvent;
30
33
  /** Modal Frontstage Stack Changed Event class.
31
34
  * @public
32
35
  */
36
+ // eslint-disable-next-line deprecation/deprecation
33
37
  class ModalFrontstageChangedEvent extends appui_abstract_1.UiEvent {
34
38
  }
35
39
  exports.ModalFrontstageChangedEvent = ModalFrontstageChangedEvent;
@@ -40,24 +44,28 @@ exports.ModalFrontstageChangedEvent = ModalFrontstageChangedEvent;
40
44
  * any unsaved data.
41
45
  * @alpha
42
46
  */
47
+ // eslint-disable-next-line deprecation/deprecation
43
48
  class ModalFrontstageRequestedCloseEvent extends appui_abstract_1.UiEvent {
44
49
  }
45
50
  exports.ModalFrontstageRequestedCloseEvent = ModalFrontstageRequestedCloseEvent;
46
51
  /** Modal Frontstage Closed Event class.
47
52
  * @public
48
53
  */
54
+ // eslint-disable-next-line deprecation/deprecation
49
55
  class ModalFrontstageClosedEvent extends appui_abstract_1.UiEvent {
50
56
  }
51
57
  exports.ModalFrontstageClosedEvent = ModalFrontstageClosedEvent;
52
58
  /** Tool Activated Event class.
53
59
  * @public
54
60
  */
61
+ // eslint-disable-next-line deprecation/deprecation
55
62
  class ToolActivatedEvent extends appui_abstract_1.UiEvent {
56
63
  }
57
64
  exports.ToolActivatedEvent = ToolActivatedEvent;
58
65
  /** Tool Icon Changed Event class.
59
66
  * @public
60
67
  */
68
+ // eslint-disable-next-line deprecation/deprecation
61
69
  class ToolIconChangedEvent extends appui_abstract_1.UiEvent {
62
70
  }
63
71
  exports.ToolIconChangedEvent = ToolIconChangedEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkFrontstages.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkFrontstages.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAAgD;AAwBhD;;GAEG;AACH,MAAa,wBAAyB,SAAQ,wBAAqC;CAAG;AAAtF,4DAAsF;AAmBtF;;GAEG;AACH,MAAa,0BAA2B,SAAQ,wBAAuC;CAAG;AAA1F,gEAA0F;AAS1F;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wBAAiC;CAAG;AAA9E,oDAA8E;AAS9E;;GAEG;AACH,MAAa,2BAA4B,SAAQ,wBAAwC;CAAG;AAA5F,kEAA4F;AAiB5F;;;;;;GAMG;AACH,MAAa,kCAAmC,SAAQ,wBAA+C;CAAG;AAA1G,gFAA0G;AAY1G;;GAEG;AACH,MAAa,0BAA2B,SAAQ,wBAAuC;CAAG;AAA1F,gEAA0F;AAS1F;;GAEG;AACH,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAS1E;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wBAAiC;CAAG;AAA9E,oDAA8E","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 Frontstage\n */\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { IModelConnection, Tool } from \"@itwin/core-frontend\";\nimport type { ToolInformation } from \"../toolsettings/ToolInformation\";\nimport type { TimeTracker } from \"../configurableui/TimeTracker\";\nimport type { ContentControlActivatedEvent } from \"../content/ContentControl\";\nimport type { ContentLayoutActivatedEvent } from \"../content/ContentLayout\";\nimport type { FrontstageDef } from \"../frontstage/FrontstageDef\";\nimport type { FrontstageProvider } from \"../frontstage/FrontstageProvider\";\nimport type { NavigationAidActivatedEvent } from \"../navigationaids/NavigationAidControl\";\nimport type {\n PanelPinnedChangedEventArgs,\n PanelStateChangedEvent,\n} from \"../stagepanels/StagePanelDef\";\nimport type { WidgetDef, WidgetStateChangedEvent } from \"../widgets/WidgetDef\";\nimport type { WidgetState } from \"../widgets/WidgetState\";\n\n/** Frontstage Activated Event Args interface.\n * @public\n */\nexport interface FrontstageActivatedEventArgs {\n deactivatedFrontstageDef?: FrontstageDef;\n activatedFrontstageDef: FrontstageDef;\n}\n\n/** Frontstage Activated Event class.\n * @public\n */\nexport class FrontstageActivatedEvent extends UiEvent<FrontstageActivatedEventArgs> {}\n\n/** Frontstage Deactivated Event Args interface.\n * @public\n */\nexport interface FrontstageDeactivatedEventArgs {\n /** Frontstage being deactivated */\n deactivatedFrontstageDef: FrontstageDef;\n /** Frontstage being activated */\n activatedFrontstageDef?: FrontstageDef;\n\n /** Total time spent in frontstage */\n totalTime: number;\n /** Engagement time spent in frontstage */\n engagementTime: number;\n /** Idle time spent in frontstage */\n idleTime: number;\n}\n\n/** Frontstage Deactivated Event class.\n * @public\n */\nexport class FrontstageDeactivatedEvent extends UiEvent<FrontstageDeactivatedEventArgs> {}\n\n/** Frontstage Ready Event Args interface.\n * @public\n */\nexport interface FrontstageReadyEventArgs {\n frontstageDef: FrontstageDef;\n}\n\n/** Frontstage Ready Event class.\n * @public\n */\nexport class FrontstageReadyEvent extends UiEvent<FrontstageReadyEventArgs> {}\n\n/** Modal Frontstage Changed Event Args interface.\n * @public\n */\nexport interface ModalFrontstageChangedEventArgs {\n modalFrontstageCount: number;\n}\n\n/** Modal Frontstage Stack Changed Event class.\n * @public\n */\nexport class ModalFrontstageChangedEvent extends UiEvent<ModalFrontstageChangedEventArgs> {}\n\n/** Modal Frontstage Closed Event Args interface.\n * @public\n */\nexport interface ModalFrontstageClosedEventArgs {\n /** Modal Frontstage being closed */\n modalFrontstage: ModalFrontstageInfo;\n\n /** Total time spent in frontstage */\n totalTime: number;\n /** Engagement time spent in frontstage */\n engagementTime: number;\n /** Idle time spent in frontstage */\n idleTime: number;\n}\n\n/** Modal Frontstage Requested Close Event class. Notifies the modal stage that the close button was\n * pressed and passes the function to actually close the modal stage. This allows stage to do any\n * saving of unsaved data prior to closing the stage. If the ModalFrontstageInfo sets notifyCloseRequest\n * to true it is up to the stage to register for this event and call the stageCloseFunc once it has saved\n * any unsaved data.\n * @alpha\n */\nexport class ModalFrontstageRequestedCloseEvent extends UiEvent<ModalFrontstageRequestedCloseEventArgs> {}\n\n/** Modal Frontstage RequestedClose Event Args interface.\n * @alpha\n */\nexport interface ModalFrontstageRequestedCloseEventArgs {\n /** Modal Frontstage that is to be closed */\n modalFrontstage: ModalFrontstageInfo;\n /** Function to call to close the stage */\n stageCloseFunc: () => void;\n}\n\n/** Modal Frontstage Closed Event class.\n * @public\n */\nexport class ModalFrontstageClosedEvent extends UiEvent<ModalFrontstageClosedEventArgs> {}\n\n/** Tool Activated Event Args interface.\n * @public\n */\nexport interface ToolActivatedEventArgs {\n toolId: string;\n}\n\n/** Tool Activated Event class.\n * @public\n */\nexport class ToolActivatedEvent extends UiEvent<ToolActivatedEventArgs> {}\n\n/** Tool Icon Changed Event Args interface.\n * @public\n */\nexport interface ToolIconChangedEventArgs {\n iconSpec: string;\n}\n\n/** Tool Icon Changed Event class.\n * @public\n */\nexport class ToolIconChangedEvent extends UiEvent<ToolIconChangedEventArgs> {}\n\n/** Modal Frontstage information interface.\n * @public\n */\nexport interface ModalFrontstageInfo {\n title: string;\n content: React.ReactNode;\n appBarRight?: React.ReactNode;\n /** Set notifyCloseRequest to true on stages that register to listen for `onCloseModalFrontstageRequestedEvent` so\n * that the stage can save unsaved data before closing. Used by the ModalSettingsStage.\n * @alpha */\n notifyCloseRequest?: boolean;\n}\n\n/** Modal Frontstage array item interface.\n * @internal\n */\nexport interface ModalFrontstageItem {\n modalFrontstage: ModalFrontstageInfo;\n timeTracker: TimeTracker;\n}\n\n/**\n * [[UiFramework.frontstages]] interface\n * @public\n */\nexport interface FrameworkFrontstages {\n /** Returns true if Frontstage is loading its controls. If false the Frontstage content and controls have been created. */\n readonly isLoading: boolean;\n\n /** Get Frontstage Deactivated event. */\n readonly onFrontstageDeactivatedEvent: FrontstageDeactivatedEvent;\n\n /** Get Frontstage Activated event. */\n readonly onFrontstageActivatedEvent: FrontstageActivatedEvent;\n\n /** Get Frontstage Activated event. */\n readonly onFrontstageReadyEvent: FrontstageReadyEvent;\n\n /** Get Modal Frontstage Changed event. */\n readonly onModalFrontstageChangedEvent: ModalFrontstageChangedEvent;\n\n /** Get Modal Frontstage Closed event. */\n readonly onModalFrontstageClosedEvent: ModalFrontstageClosedEvent;\n\n /** Get Modal Frontstage Requested Closed event.\n * @alpha\n */\n readonly onCloseModalFrontstageRequestedEvent: ModalFrontstageRequestedCloseEvent;\n\n /** Get Tool Activated event. */\n readonly onToolActivatedEvent: ToolActivatedEvent;\n\n /** Get ToolSetting Reload event. */\n readonly onToolSettingsReloadEvent: UiEvent<void>;\n\n /** Get Tool Icon Changed event. */\n readonly onToolIconChangedEvent: ToolIconChangedEvent;\n\n /** Get Content Layout Activated event. */\n readonly onContentLayoutActivatedEvent: ContentLayoutActivatedEvent;\n\n /** Get Content Control Activated event. */\n readonly onContentControlActivatedEvent: ContentControlActivatedEvent;\n\n /** Get Navigation Aid Activated event. */\n readonly onNavigationAidActivatedEvent: NavigationAidActivatedEvent;\n\n /** Get Widget State Changed event. */\n readonly onWidgetStateChangedEvent: WidgetStateChangedEvent;\n\n /** Get panel state changed event.\n * @alpha\n */\n readonly onPanelStateChangedEvent: PanelStateChangedEvent;\n\n /** Get panel pinned changed event.\n * @alpha\n */\n readonly onPanelPinnedChangedEvent: UiEvent<PanelPinnedChangedEventArgs>;\n\n /** Clears the Frontstage map.\n */\n clearFrontstageDefs(): void;\n\n /** Clears the Frontstage Providers and the defs that may have been created from them.\n */\n clearFrontstageProviders(): void;\n\n /** Add a Frontstage via a [[FrontstageProvider]].\n * @param frontstageProvider FrontstageProvider representing the Frontstage to add\n */\n addFrontstageProvider(frontstageProvider: FrontstageProvider): void;\n\n /** Find a loaded Frontstage with a given id. If the id is not provided, the active Frontstage is returned. If\n * no cached FrontstageDef is found but a FrontstageProvider is registered a FrontstageDef will be created, cached, and\n * returned.\n * @param id Id of the Frontstage to find\n * @returns FrontstageDef with a given id if found, or undefined if not found.\n */\n getFrontstageDef(id?: string): Promise<FrontstageDef | undefined>;\n\n /** Gets the active FrontstageDef. If a Frontstage is not active, undefined is returned.\n * @return Active FrontstageDef, or undefined if one is not active.\n */\n readonly activeFrontstageDef: FrontstageDef | undefined;\n\n /** Gets the Id of the active FrontstageDef. If a Frontstage is not active, blank is returned.\n * @return Id of the active FrontstageDef, or blank if one is not active.\n */\n readonly activeFrontstageId: string;\n\n hasFrontstage(frontstageId: string): boolean;\n\n /** Sets the active FrontstageDef give the stageId.\n * @param frontstageId Id of the Frontstage to set active.\n * @returns A Promise that is fulfilled when the [[Frontstage]] is ready.\n */\n setActiveFrontstage(frontstageId: string): Promise<void>;\n\n /** Sets the active FrontstageDef.\n * @param frontstageDef FrontstageDef to set active.\n * @returns A Promise that is fulfilled when the [[FrontstageDef]] is ready.\n */\n setActiveFrontstageDef(\n frontstageDef: FrontstageDef | undefined\n ): Promise<void>;\n\n /** Deactivates the active FrontstageDef.\n */\n deactivateFrontstageDef(): Promise<void>;\n\n /** Gets the Id of the active tool. If a tool is not active, blank is returned.\n * @return Id of the active tool, or blank if one is not active.\n */\n readonly activeToolId: string;\n\n /** Sets the active tool id */\n setActiveToolId(toolId: string): void;\n\n /** Sets the active tool */\n setActiveTool(tool: Tool): void;\n\n /** Gets the active tool's [[ToolInformation]] */\n readonly activeToolInformation: ToolInformation | undefined;\n\n /** Opens a modal Frontstage. Modal Frontstages can be stacked.\n * @param modalFrontstage Information about the modal Frontstage\n */\n openModalFrontstage(modalFrontstage: ModalFrontstageInfo): void;\n\n /** Closes the top-most modal Frontstage.\n */\n closeModalFrontstage(): void;\n\n /** Updates the top-most modal Frontstage.\n */\n updateModalFrontstage(): void;\n\n /** Gets the top-most modal Frontstage.\n * @returns Top-most modal Frontstage, or undefined if there is none.\n */\n readonly activeModalFrontstage: ModalFrontstageInfo | undefined;\n\n /** Gets the number of modal Frontstages.\n * @returns Modal Frontstage count\n */\n readonly modalFrontstageCount: number;\n\n /** Sets the active Navigation Aid via its Id.\n * @param navigationAidId Id of the Navigation Aid to set as active\n * @param iModelConnection IModelConnection to query for view data\n */\n setActiveNavigationAid(\n navigationAidId: string,\n iModelConnection: IModelConnection\n ): void;\n\n /** Sets the state of the widget with the given id\n * @param widgetId Id of the Widget for which to set the state\n * @param state New state of the widget\n * @returns true if the widget state was set successfully, or false if not.\n */\n setWidgetState(widgetId: string, state: WidgetState): boolean;\n\n /** Finds a widget with the given id in the active frontstage\n * @param widgetId Id of the Widget to find\n * @returns The WidgetDef with the given id, or undefined if not found.\n */\n findWidget(widgetId: string): WidgetDef | undefined;\n\n /** Opens a nested Frontstage. Nested Frontstages can be stacked.\n * @param nestedFrontstage Information about the nested Frontstage\n */\n openNestedFrontstage(nestedFrontstage: FrontstageDef): Promise<void>;\n\n /** Closes the top-most nested Frontstage.\n */\n closeNestedFrontstage(): Promise<void>;\n\n /** Gets the top-most nested Frontstage.\n * @returns Top-most nested Frontstage, or undefined if there is none.\n */\n readonly activeNestedFrontstage: FrontstageDef | undefined;\n\n /** Gets the number of nested Frontstages.\n * @returns Nested Frontstage count\n */\n readonly nestedFrontstageCount: number;\n}\n"]}
1
+ {"version":3,"file":"FrameworkFrontstages.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkFrontstages.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAAgD;AAwBhD;;GAEG;AACH,mDAAmD;AACnD,MAAa,wBAAyB,SAAQ,wBAAqC;CAAG;AAAtF,4DAAsF;AAmBtF;;GAEG;AACH,mDAAmD;AACnD,MAAa,0BAA2B,SAAQ,wBAAuC;CAAG;AAA1F,gEAA0F;AAS1F;;GAEG;AACH,mDAAmD;AACnD,MAAa,oBAAqB,SAAQ,wBAAiC;CAAG;AAA9E,oDAA8E;AAS9E;;GAEG;AACH,mDAAmD;AACnD,MAAa,2BAA4B,SAAQ,wBAAwC;CAAG;AAA5F,kEAA4F;AAiB5F;;;;;;GAMG;AACH,mDAAmD;AACnD,MAAa,kCAAmC,SAAQ,wBAA+C;CAAG;AAA1G,gFAA0G;AAY1G;;GAEG;AACH,mDAAmD;AACnD,MAAa,0BAA2B,SAAQ,wBAAuC;CAAG;AAA1F,gEAA0F;AAS1F;;GAEG;AACH,mDAAmD;AACnD,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAS1E;;GAEG;AACH,mDAAmD;AACnD,MAAa,oBAAqB,SAAQ,wBAAiC;CAAG;AAA9E,oDAA8E","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 Frontstage\n */\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { IModelConnection, Tool } from \"@itwin/core-frontend\";\nimport type { ToolInformation } from \"../toolsettings/ToolInformation\";\nimport type { TimeTracker } from \"../configurableui/TimeTracker\";\nimport type { ContentControlActivatedEvent } from \"../content/ContentControl\";\nimport type { ContentLayoutActivatedEvent } from \"../content/ContentLayout\";\nimport type { FrontstageDef } from \"../frontstage/FrontstageDef\";\nimport type { FrontstageProvider } from \"../frontstage/FrontstageProvider\";\nimport type { NavigationAidActivatedEvent } from \"../navigationaids/NavigationAidControl\";\nimport type {\n PanelPinnedChangedEventArgs,\n PanelStateChangedEvent,\n} from \"../stagepanels/StagePanelDef\";\nimport type { WidgetDef, WidgetStateChangedEvent } from \"../widgets/WidgetDef\";\nimport type { WidgetState } from \"../widgets/WidgetState\";\n\n/** Frontstage Activated Event Args interface.\n * @public\n */\nexport interface FrontstageActivatedEventArgs {\n deactivatedFrontstageDef?: FrontstageDef;\n activatedFrontstageDef: FrontstageDef;\n}\n\n/** Frontstage Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class FrontstageActivatedEvent extends UiEvent<FrontstageActivatedEventArgs> {}\n\n/** Frontstage Deactivated Event Args interface.\n * @public\n */\nexport interface FrontstageDeactivatedEventArgs {\n /** Frontstage being deactivated */\n deactivatedFrontstageDef: FrontstageDef;\n /** Frontstage being activated */\n activatedFrontstageDef?: FrontstageDef;\n\n /** Total time spent in frontstage */\n totalTime: number;\n /** Engagement time spent in frontstage */\n engagementTime: number;\n /** Idle time spent in frontstage */\n idleTime: number;\n}\n\n/** Frontstage Deactivated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class FrontstageDeactivatedEvent extends UiEvent<FrontstageDeactivatedEventArgs> {}\n\n/** Frontstage Ready Event Args interface.\n * @public\n */\nexport interface FrontstageReadyEventArgs {\n frontstageDef: FrontstageDef;\n}\n\n/** Frontstage Ready Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class FrontstageReadyEvent extends UiEvent<FrontstageReadyEventArgs> {}\n\n/** Modal Frontstage Changed Event Args interface.\n * @public\n */\nexport interface ModalFrontstageChangedEventArgs {\n modalFrontstageCount: number;\n}\n\n/** Modal Frontstage Stack Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ModalFrontstageChangedEvent extends UiEvent<ModalFrontstageChangedEventArgs> {}\n\n/** Modal Frontstage Closed Event Args interface.\n * @public\n */\nexport interface ModalFrontstageClosedEventArgs {\n /** Modal Frontstage being closed */\n modalFrontstage: ModalFrontstageInfo;\n\n /** Total time spent in frontstage */\n totalTime: number;\n /** Engagement time spent in frontstage */\n engagementTime: number;\n /** Idle time spent in frontstage */\n idleTime: number;\n}\n\n/** Modal Frontstage Requested Close Event class. Notifies the modal stage that the close button was\n * pressed and passes the function to actually close the modal stage. This allows stage to do any\n * saving of unsaved data prior to closing the stage. If the ModalFrontstageInfo sets notifyCloseRequest\n * to true it is up to the stage to register for this event and call the stageCloseFunc once it has saved\n * any unsaved data.\n * @alpha\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ModalFrontstageRequestedCloseEvent extends UiEvent<ModalFrontstageRequestedCloseEventArgs> {}\n\n/** Modal Frontstage RequestedClose Event Args interface.\n * @alpha\n */\nexport interface ModalFrontstageRequestedCloseEventArgs {\n /** Modal Frontstage that is to be closed */\n modalFrontstage: ModalFrontstageInfo;\n /** Function to call to close the stage */\n stageCloseFunc: () => void;\n}\n\n/** Modal Frontstage Closed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ModalFrontstageClosedEvent extends UiEvent<ModalFrontstageClosedEventArgs> {}\n\n/** Tool Activated Event Args interface.\n * @public\n */\nexport interface ToolActivatedEventArgs {\n toolId: string;\n}\n\n/** Tool Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ToolActivatedEvent extends UiEvent<ToolActivatedEventArgs> {}\n\n/** Tool Icon Changed Event Args interface.\n * @public\n */\nexport interface ToolIconChangedEventArgs {\n iconSpec: string;\n}\n\n/** Tool Icon Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ToolIconChangedEvent extends UiEvent<ToolIconChangedEventArgs> {}\n\n/** Modal Frontstage information interface.\n * @public\n */\nexport interface ModalFrontstageInfo {\n title: string;\n content: React.ReactNode;\n appBarRight?: React.ReactNode;\n /** Set notifyCloseRequest to true on stages that register to listen for `onCloseModalFrontstageRequestedEvent` so\n * that the stage can save unsaved data before closing. Used by the ModalSettingsStage.\n * @alpha */\n notifyCloseRequest?: boolean;\n}\n\n/** Modal Frontstage array item interface.\n * @internal\n */\nexport interface ModalFrontstageItem {\n modalFrontstage: ModalFrontstageInfo;\n timeTracker: TimeTracker;\n}\n\n/**\n * [[UiFramework.frontstages]] interface\n * @public\n */\nexport interface FrameworkFrontstages {\n /** Returns true if Frontstage is loading its controls. If false the Frontstage content and controls have been created. */\n readonly isLoading: boolean;\n\n /** Get Frontstage Deactivated event. */\n readonly onFrontstageDeactivatedEvent: FrontstageDeactivatedEvent;\n\n /** Get Frontstage Activated event. */\n readonly onFrontstageActivatedEvent: FrontstageActivatedEvent;\n\n /** Get Frontstage Activated event. */\n readonly onFrontstageReadyEvent: FrontstageReadyEvent;\n\n /** Get Modal Frontstage Changed event. */\n readonly onModalFrontstageChangedEvent: ModalFrontstageChangedEvent;\n\n /** Get Modal Frontstage Closed event. */\n readonly onModalFrontstageClosedEvent: ModalFrontstageClosedEvent;\n\n /** Get Modal Frontstage Requested Closed event.\n * @alpha\n */\n readonly onCloseModalFrontstageRequestedEvent: ModalFrontstageRequestedCloseEvent;\n\n /** Get Tool Activated event. */\n readonly onToolActivatedEvent: ToolActivatedEvent;\n\n /** Get ToolSetting Reload event. */\n // eslint-disable-next-line deprecation/deprecation\n readonly onToolSettingsReloadEvent: UiEvent<void>;\n\n /** Get Tool Icon Changed event. */\n readonly onToolIconChangedEvent: ToolIconChangedEvent;\n\n /** Get Content Layout Activated event. */\n readonly onContentLayoutActivatedEvent: ContentLayoutActivatedEvent;\n\n /** Get Content Control Activated event. */\n readonly onContentControlActivatedEvent: ContentControlActivatedEvent;\n\n /** Get Navigation Aid Activated event. */\n readonly onNavigationAidActivatedEvent: NavigationAidActivatedEvent;\n\n /** Get Widget State Changed event. */\n readonly onWidgetStateChangedEvent: WidgetStateChangedEvent;\n\n /** Get panel state changed event.\n * @alpha\n */\n readonly onPanelStateChangedEvent: PanelStateChangedEvent;\n\n /** Get panel pinned changed event.\n * @alpha\n */\n // eslint-disable-next-line deprecation/deprecation\n readonly onPanelPinnedChangedEvent: UiEvent<PanelPinnedChangedEventArgs>;\n\n /** Clears the Frontstage map.\n */\n clearFrontstageDefs(): void;\n\n /** Clears the Frontstage Providers and the defs that may have been created from them.\n */\n clearFrontstageProviders(): void;\n\n /** Add a Frontstage via a [[FrontstageProvider]].\n * @param frontstageProvider FrontstageProvider representing the Frontstage to add\n */\n addFrontstageProvider(frontstageProvider: FrontstageProvider): void;\n\n /** Find a loaded Frontstage with a given id. If the id is not provided, the active Frontstage is returned. If\n * no cached FrontstageDef is found but a FrontstageProvider is registered a FrontstageDef will be created, cached, and\n * returned.\n * @param id Id of the Frontstage to find\n * @returns FrontstageDef with a given id if found, or undefined if not found.\n */\n getFrontstageDef(id?: string): Promise<FrontstageDef | undefined>;\n\n /** Gets the active FrontstageDef. If a Frontstage is not active, undefined is returned.\n * @return Active FrontstageDef, or undefined if one is not active.\n */\n readonly activeFrontstageDef: FrontstageDef | undefined;\n\n /** Gets the Id of the active FrontstageDef. If a Frontstage is not active, blank is returned.\n * @return Id of the active FrontstageDef, or blank if one is not active.\n */\n readonly activeFrontstageId: string;\n\n hasFrontstage(frontstageId: string): boolean;\n\n /** Sets the active FrontstageDef give the stageId.\n * @param frontstageId Id of the Frontstage to set active.\n * @returns A Promise that is fulfilled when the [[Frontstage]] is ready.\n */\n setActiveFrontstage(frontstageId: string): Promise<void>;\n\n /** Sets the active FrontstageDef.\n * @param frontstageDef FrontstageDef to set active.\n * @returns A Promise that is fulfilled when the [[FrontstageDef]] is ready.\n */\n setActiveFrontstageDef(\n frontstageDef: FrontstageDef | undefined\n ): Promise<void>;\n\n /** Deactivates the active FrontstageDef.\n */\n deactivateFrontstageDef(): Promise<void>;\n\n /** Gets the Id of the active tool. If a tool is not active, blank is returned.\n * @return Id of the active tool, or blank if one is not active.\n */\n readonly activeToolId: string;\n\n /** Sets the active tool id */\n setActiveToolId(toolId: string): void;\n\n /** Sets the active tool */\n setActiveTool(tool: Tool): void;\n\n /** Gets the active tool's [[ToolInformation]] */\n readonly activeToolInformation: ToolInformation | undefined;\n\n /** Opens a modal Frontstage. Modal Frontstages can be stacked.\n * @param modalFrontstage Information about the modal Frontstage\n */\n openModalFrontstage(modalFrontstage: ModalFrontstageInfo): void;\n\n /** Closes the top-most modal Frontstage.\n */\n closeModalFrontstage(): void;\n\n /** Updates the top-most modal Frontstage.\n */\n updateModalFrontstage(): void;\n\n /** Gets the top-most modal Frontstage.\n * @returns Top-most modal Frontstage, or undefined if there is none.\n */\n readonly activeModalFrontstage: ModalFrontstageInfo | undefined;\n\n /** Gets the number of modal Frontstages.\n * @returns Modal Frontstage count\n */\n readonly modalFrontstageCount: number;\n\n /** Sets the active Navigation Aid via its Id.\n * @param navigationAidId Id of the Navigation Aid to set as active\n * @param iModelConnection IModelConnection to query for view data\n */\n setActiveNavigationAid(\n navigationAidId: string,\n iModelConnection: IModelConnection\n ): void;\n\n /** Sets the state of the widget with the given id\n * @param widgetId Id of the Widget for which to set the state\n * @param state New state of the widget\n * @returns true if the widget state was set successfully, or false if not.\n */\n setWidgetState(widgetId: string, state: WidgetState): boolean;\n\n /** Finds a widget with the given id in the active frontstage\n * @param widgetId Id of the Widget to find\n * @returns The WidgetDef with the given id, or undefined if not found.\n */\n findWidget(widgetId: string): WidgetDef | undefined;\n\n /** Opens a nested Frontstage. Nested Frontstages can be stacked.\n * @param nestedFrontstage Information about the nested Frontstage\n */\n openNestedFrontstage(nestedFrontstage: FrontstageDef): Promise<void>;\n\n /** Closes the top-most nested Frontstage.\n */\n closeNestedFrontstage(): Promise<void>;\n\n /** Gets the top-most nested Frontstage.\n * @returns Top-most nested Frontstage, or undefined if there is none.\n */\n readonly activeNestedFrontstage: FrontstageDef | undefined;\n\n /** Gets the number of nested Frontstages.\n * @returns Nested Frontstage count\n */\n readonly nestedFrontstageCount: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkToolSettings.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkToolSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,sBAAsB,EAAE,CAAC;CAC1C;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,mCAAmC,CAAC;CAAG;AAEpG;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,qBAAqB,IAAI,IAAI,CAAC;IAE9B,qCAAqC;IACrC,0BAA0B,CACxB,sBAAsB,EAAE,UAAU,EAAE,GAAG,SAAS,EAChD,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC;IAEX;OACG;IACH,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAEnD,iGAAiG;IACjG,QAAQ,CAAC,sBAAsB,EAAE,UAAU,EAAE,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,OAAO,CAAC;IAExC,8FAA8F;IAC9F,eAAe,EAAE,MAAM,CAAC;IAExB,kDAAkD;IAClD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC,8CAA8C;IAC9C,QAAQ,CAAC,4BAA4B,EAAE,+BAA+B,CAAC;IACvE,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,qBAAqB,IAAI,OAAO,CAAC;CAClC"}
1
+ {"version":3,"file":"FrameworkToolSettings.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkToolSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,sBAAsB,EAAE,CAAC;CAC1C;AAED;;GAEG;AAEH,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,mCAAmC,CAAC;CAAG;AAEpG;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,qBAAqB,IAAI,IAAI,CAAC;IAE9B,qCAAqC;IACrC,0BAA0B,CACxB,sBAAsB,EAAE,UAAU,EAAE,GAAG,SAAS,EAChD,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC;IAEX;OACG;IACH,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAEnD,iGAAiG;IACjG,QAAQ,CAAC,sBAAsB,EAAE,UAAU,EAAE,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,OAAO,CAAC;IAExC,8FAA8F;IAC9F,eAAe,EAAE,MAAM,CAAC;IAExB,kDAAkD;IAClD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC,8CAA8C;IAC9C,QAAQ,CAAC,4BAA4B,EAAE,+BAA+B,CAAC;IAEvE,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,qBAAqB,IAAI,OAAO,CAAC;CAClC"}
@@ -5,6 +5,7 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
5
5
  /** Sync Tool Settings Properties Event class.
6
6
  * @public
7
7
  */
8
+ // eslint-disable-next-line deprecation/deprecation
8
9
  class SyncToolSettingsPropertiesEvent extends appui_abstract_1.UiEvent {
9
10
  }
10
11
  exports.SyncToolSettingsPropertiesEvent = SyncToolSettingsPropertiesEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkToolSettings.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkToolSettings.ts"],"names":[],"mappings":";;;AAQA,0DAAgD;AAWhD;;GAEG;AACH,MAAa,+BAAgC,SAAQ,wBAA4C;CAAG;AAApG,0EAAoG","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 ToolSettings\n */\nimport type { DialogItem, DialogPropertySyncItem } from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { InteractiveTool } from \"@itwin/core-frontend\";\n\n/** Sync Tool Settings Properties Event Args interface.\n * @public\n */\nexport interface SyncToolSettingsPropertiesEventArgs {\n toolId: string;\n syncProperties: DialogPropertySyncItem[];\n}\n\n/** Sync Tool Settings Properties Event class.\n * @public\n */\nexport class SyncToolSettingsPropertiesEvent extends UiEvent<SyncToolSettingsPropertiesEventArgs> {}\n\n/**\n * [[UiFramework.toolSettings]] interface\n * @public\n */\nexport interface FrameworkToolSettings {\n /** clear cached Tool Settings properties. */\n clearToolSettingsData(): void;\n\n /** Cache Tool Settings properties */\n initializeToolSettingsData(\n toolSettingsProperties: DialogItem[] | undefined,\n toolId?: string,\n toolLabel?: string,\n toolDescription?: string\n ): boolean;\n\n /** Set of data used in Tool Settings for the specified tool. The tool specified should be the \"active\" tool.\n */\n initializeDataForTool(tool: InteractiveTool): void;\n\n /** Returns the toolSettings properties that can be used to populate the tool settings widget. */\n readonly toolSettingsProperties: DialogItem[];\n\n /** Returns true if the Tool Settings are to be auto populated from the toolSettingsProperties.\n * The setter is chiefly for testing.\n */\n useDefaultToolSettingsProvider: boolean;\n\n /** The name of the active tool. This is typically the flyover text specified for the tool. */\n activeToolLabel: string;\n\n /** Returns the description of the active tool. */\n readonly activeToolDescription: string;\n\n /** Get ToolSettings Properties sync event. */\n readonly onSyncToolSettingsProperties: SyncToolSettingsPropertiesEvent;\n readonly onReloadToolSettingsProperties: UiEvent<void>;\n\n /** Gets the Id of the active tool. If a tool is not active, blank is returned.\n * @return Id of the active tool, or blank if one is not active.\n */\n readonly toolIdForToolSettings: string;\n\n /**\n * Sets the focus on the ToolSettings UI element.\n */\n focusIntoToolSettings(): boolean;\n}\n"]}
1
+ {"version":3,"file":"FrameworkToolSettings.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkToolSettings.ts"],"names":[],"mappings":";;;AAQA,0DAAgD;AAWhD;;GAEG;AACH,mDAAmD;AACnD,MAAa,+BAAgC,SAAQ,wBAA4C;CAAG;AAApG,0EAAoG","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 ToolSettings\n */\nimport type { DialogItem, DialogPropertySyncItem } from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { InteractiveTool } from \"@itwin/core-frontend\";\n\n/** Sync Tool Settings Properties Event Args interface.\n * @public\n */\nexport interface SyncToolSettingsPropertiesEventArgs {\n toolId: string;\n syncProperties: DialogPropertySyncItem[];\n}\n\n/** Sync Tool Settings Properties Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class SyncToolSettingsPropertiesEvent extends UiEvent<SyncToolSettingsPropertiesEventArgs> {}\n\n/**\n * [[UiFramework.toolSettings]] interface\n * @public\n */\nexport interface FrameworkToolSettings {\n /** clear cached Tool Settings properties. */\n clearToolSettingsData(): void;\n\n /** Cache Tool Settings properties */\n initializeToolSettingsData(\n toolSettingsProperties: DialogItem[] | undefined,\n toolId?: string,\n toolLabel?: string,\n toolDescription?: string\n ): boolean;\n\n /** Set of data used in Tool Settings for the specified tool. The tool specified should be the \"active\" tool.\n */\n initializeDataForTool(tool: InteractiveTool): void;\n\n /** Returns the toolSettings properties that can be used to populate the tool settings widget. */\n readonly toolSettingsProperties: DialogItem[];\n\n /** Returns true if the Tool Settings are to be auto populated from the toolSettingsProperties.\n * The setter is chiefly for testing.\n */\n useDefaultToolSettingsProvider: boolean;\n\n /** The name of the active tool. This is typically the flyover text specified for the tool. */\n activeToolLabel: string;\n\n /** Returns the description of the active tool. */\n readonly activeToolDescription: string;\n\n /** Get ToolSettings Properties sync event. */\n readonly onSyncToolSettingsProperties: SyncToolSettingsPropertiesEvent;\n // eslint-disable-next-line deprecation/deprecation\n readonly onReloadToolSettingsProperties: UiEvent<void>;\n\n /** Gets the Id of the active tool. If a tool is not active, blank is returned.\n * @return Id of the active tool, or blank if one is not active.\n */\n readonly toolIdForToolSettings: string;\n\n /**\n * Sets the focus on the ToolSettings UI element.\n */\n focusIntoToolSettings(): boolean;\n}\n"]}
@@ -1,9 +1,10 @@
1
1
  /** @packageDocumentation
2
2
  * @module Frontstage
3
3
  */
4
+ import type { NineZoneDispatch, NineZoneState } from "@itwin/appui-layout-react";
4
5
  import type { ScreenViewport } from "@itwin/core-frontend";
6
+ import type { XAndY } from "@itwin/core-geometry";
5
7
  import type { RectangleProps, SizeProps } from "@itwin/core-react";
6
- import type { NineZoneDispatch, NineZoneState } from "@itwin/appui-layout-react";
7
8
  import type { ContentControl } from "../content/ContentControl";
8
9
  import type { ContentGroup } from "../content/ContentGroup";
9
10
  import { ContentGroupProvider } from "../content/ContentGroup";
@@ -15,7 +16,6 @@ import { TimeTracker } from "../configurableui/TimeTracker";
15
16
  import type { FrontstageConfig } from "./FrontstageConfig";
16
17
  import { StagePanelLocation } from "../stagepanels/StagePanelLocation";
17
18
  import { WidgetState } from "../widgets/WidgetState";
18
- import type { XAndY } from "@itwin/core-geometry";
19
19
  import type { ChildWindow } from "../childwindow/ChildWindowConfig";
20
20
  /** @internal */
21
21
  export interface FrontstageEventArgs {
@@ -53,6 +53,7 @@ export declare class FrontstageDef {
53
53
  private _floatingContentControls?;
54
54
  private _toolAdminDefaultToolId?;
55
55
  private _dispatch?;
56
+ private _batching;
56
57
  get id(): string;
57
58
  get usage(): string;
58
59
  get version(): number;
@@ -78,6 +79,11 @@ export declare class FrontstageDef {
78
79
  set nineZoneState(state: NineZoneState | undefined);
79
80
  /** @internal */
80
81
  get dispatch(): NineZoneDispatch;
82
+ set dispatch(dispatch: NineZoneDispatch);
83
+ /** Dispatch multiple actions inside `fn`, but trigger events once.
84
+ * @internal
85
+ */
86
+ batch(fn: () => void): void;
81
87
  /** @internal */
82
88
  get timeTracker(): TimeTracker;
83
89
  /** Created a [[FrontstageDef]] and initialize it */