@itwin/appui-react 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/lib/cjs/appui-react/UiFramework.js +7 -4
  3. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  4. package/lib/cjs/appui-react/accudraw/MenuButton.d.ts +2 -2
  5. package/lib/cjs/appui-react/accudraw/MenuButton.d.ts.map +1 -1
  6. package/lib/cjs/appui-react/accudraw/MenuButton.js.map +1 -1
  7. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
  9. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +2 -1
  10. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  11. package/lib/cjs/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
  12. package/lib/cjs/appui-react/childwindow/CopyStyles.js +3 -1
  13. package/lib/cjs/appui-react/childwindow/CopyStyles.js.map +1 -1
  14. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  15. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +3 -2
  16. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  17. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  18. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  19. package/lib/cjs/appui-react/configurableui/TimeTracker.js +2 -1
  20. package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
  21. package/lib/cjs/appui-react/content/ContentLayout.js +12 -9
  22. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  23. package/lib/cjs/appui-react/content/DefaultViewOverlay.js +4 -3
  24. package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
  25. package/lib/cjs/appui-react/content/FloatingViewportContent.js +2 -1
  26. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  27. package/lib/cjs/appui-react/content/IModelViewport.js +6 -3
  28. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  29. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +2 -1
  30. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  31. package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -1
  32. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  33. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +12 -10
  34. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  35. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts +6 -6
  36. package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  37. package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
  38. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  39. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +3 -2
  40. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  41. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts +4 -4
  42. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
  43. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
  44. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +5 -5
  45. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  46. package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  47. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +2 -2
  48. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  50. package/lib/cjs/appui-react/dialog/ContentDialog.js +6 -3
  51. package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
  52. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +3 -2
  53. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  54. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts +1 -2
  55. package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  56. package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
  57. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +22 -26
  58. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +177 -216
  60. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  61. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +3 -7
  62. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  63. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +2 -6
  64. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  65. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +3 -2
  66. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  67. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +2 -1
  68. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  69. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  71. package/lib/cjs/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  72. package/lib/cjs/appui-react/hooks/useActiveViewport.js.map +1 -1
  73. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +11 -7
  74. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  75. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +11 -7
  76. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  77. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +13 -8
  78. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  79. package/lib/cjs/appui-react/keyboardshortcut/InternalKeyboardShortcut.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
  81. package/lib/cjs/appui-react/messages/ActivityMessage.js +7 -5
  82. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +1 -1
  83. package/lib/cjs/appui-react/messages/MessageManager.d.ts +0 -1
  84. package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
  85. package/lib/cjs/appui-react/messages/MessageManager.js +1 -2
  86. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  87. package/lib/cjs/appui-react/messages/Pointer.d.ts +1 -2
  88. package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/messages/Pointer.js +1 -1
  90. package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
  91. package/lib/cjs/appui-react/pickers/ViewSelector.js +6 -5
  92. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  93. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +2 -1
  94. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  95. package/lib/cjs/appui-react/popup/PopupManager.js +2 -1
  96. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  97. package/lib/cjs/appui-react/popup/PositionPopup.d.ts +2 -2
  98. package/lib/cjs/appui-react/popup/PositionPopup.d.ts.map +1 -1
  99. package/lib/cjs/appui-react/popup/PositionPopup.js.map +1 -1
  100. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +2 -2
  101. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  102. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +1 -2
  103. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  104. package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  105. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +16 -20
  106. package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  107. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +86 -116
  108. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  109. package/lib/cjs/appui-react/statusbar/Indicator.js +2 -1
  110. package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
  111. package/lib/cjs/appui-react/statusbar/StatusBar.js +5 -3
  112. package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
  113. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  114. package/lib/cjs/appui-react/statusfields/MessageCenter.js +1 -2
  115. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  116. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  117. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  118. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts +36 -0
  119. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts.map +1 -0
  120. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.js +134 -0
  121. package/lib/cjs/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -0
  122. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +1 -1
  123. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  124. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +2 -2
  125. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  126. package/lib/cjs/appui-react/syncui/UiSyncEvent.d.ts +16 -0
  127. package/lib/cjs/appui-react/syncui/UiSyncEvent.d.ts.map +1 -0
  128. package/lib/cjs/appui-react/syncui/UiSyncEvent.js +18 -0
  129. package/lib/cjs/appui-react/syncui/UiSyncEvent.js.map +1 -0
  130. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js +4 -6
  131. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  132. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js +4 -3
  133. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  134. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +17 -10
  135. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  136. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +2 -3
  137. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  138. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +14 -12
  139. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  140. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +10 -9
  141. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  142. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +2 -1
  143. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  144. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +14 -8
  145. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  146. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  147. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  148. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
  149. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  150. package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  151. package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
  152. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  153. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  154. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +3 -3
  155. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  156. package/lib/cjs/appui-react/widget-panels/Content.js +9 -8
  157. package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
  158. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +7 -29
  159. package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  160. package/lib/cjs/appui-react/widget-panels/Frontstage.js +128 -463
  161. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  162. package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
  163. package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
  164. package/lib/cjs/appui-react/widget-panels/Tab.js +1 -1
  165. package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
  166. package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
  167. package/lib/cjs/appui-react/widget-panels/ToolSettings.js +34 -15
  168. package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
  169. package/lib/cjs/appui-react/widget-panels/Toolbars.js +3 -2
  170. package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
  171. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  172. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  173. package/lib/cjs/appui-react/widgets/Widget.d.ts +10 -4
  174. package/lib/cjs/appui-react/widgets/Widget.d.ts.map +1 -1
  175. package/lib/cjs/appui-react/widgets/Widget.js.map +1 -1
  176. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +9 -29
  177. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  178. package/lib/cjs/appui-react/widgets/WidgetDef.js +90 -46
  179. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  180. package/lib/cjs/appui-react/widgets/WidgetHost.js +3 -2
  181. package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
  182. package/lib/cjs/appui-react.d.ts +1 -0
  183. package/lib/cjs/appui-react.d.ts.map +1 -1
  184. package/lib/cjs/appui-react.js +1 -0
  185. package/lib/cjs/appui-react.js.map +1 -1
  186. package/lib/esm/appui-react/UiFramework.js +7 -4
  187. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  188. package/lib/esm/appui-react/accudraw/MenuButton.d.ts +2 -2
  189. package/lib/esm/appui-react/accudraw/MenuButton.d.ts.map +1 -1
  190. package/lib/esm/appui-react/accudraw/MenuButton.js.map +1 -1
  191. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  192. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  193. package/lib/esm/appui-react/backstage/BackstageComposerItem.js +2 -1
  194. package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  195. package/lib/esm/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
  196. package/lib/esm/appui-react/childwindow/CopyStyles.js +3 -1
  197. package/lib/esm/appui-react/childwindow/CopyStyles.js.map +1 -1
  198. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  199. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +3 -2
  200. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  201. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  202. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  203. package/lib/esm/appui-react/configurableui/TimeTracker.js +2 -1
  204. package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
  205. package/lib/esm/appui-react/content/ContentLayout.js +12 -9
  206. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  207. package/lib/esm/appui-react/content/DefaultViewOverlay.js +4 -3
  208. package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
  209. package/lib/esm/appui-react/content/FloatingViewportContent.js +2 -1
  210. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  211. package/lib/esm/appui-react/content/IModelViewport.js +6 -3
  212. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  213. package/lib/esm/appui-react/content/InternalContentLayoutManager.js +2 -1
  214. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  215. package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -1
  216. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  217. package/lib/esm/appui-react/content/split-pane/SplitPane.js +12 -10
  218. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  219. package/lib/esm/appui-react/cursor/CursorInformation.d.ts +6 -6
  220. package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  221. package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
  222. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  223. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +3 -2
  224. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  225. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts +4 -4
  226. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
  227. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
  228. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +5 -5
  229. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  230. package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  231. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +2 -2
  232. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  233. package/lib/esm/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  234. package/lib/esm/appui-react/dialog/ContentDialog.js +6 -3
  235. package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
  236. package/lib/esm/appui-react/dialog/DialogManagerBase.js +3 -2
  237. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  238. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts +1 -2
  239. package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  240. package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
  241. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +22 -26
  242. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  243. package/lib/esm/appui-react/frontstage/FrontstageDef.js +181 -220
  244. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  245. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +3 -7
  246. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  247. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +2 -6
  248. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  249. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +3 -2
  250. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  251. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +2 -1
  252. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  253. package/lib/esm/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
  254. package/lib/esm/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  255. package/lib/esm/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
  256. package/lib/esm/appui-react/hooks/useActiveViewport.js.map +1 -1
  257. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +11 -7
  258. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  259. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +11 -7
  260. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  261. package/lib/esm/appui-react/hooks/useSolarDataProvider.js +13 -8
  262. package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  263. package/lib/esm/appui-react/keyboardshortcut/InternalKeyboardShortcut.d.ts.map +1 -1
  264. package/lib/esm/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
  265. package/lib/esm/appui-react/messages/ActivityMessage.js +7 -5
  266. package/lib/esm/appui-react/messages/ActivityMessage.js.map +1 -1
  267. package/lib/esm/appui-react/messages/MessageManager.d.ts +0 -1
  268. package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
  269. package/lib/esm/appui-react/messages/MessageManager.js +1 -2
  270. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  271. package/lib/esm/appui-react/messages/Pointer.d.ts +1 -2
  272. package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
  273. package/lib/esm/appui-react/messages/Pointer.js +1 -1
  274. package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
  275. package/lib/esm/appui-react/pickers/ViewSelector.js +6 -5
  276. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  277. package/lib/esm/appui-react/popup/KeyinPalettePanel.js +2 -1
  278. package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  279. package/lib/esm/appui-react/popup/PopupManager.js +2 -1
  280. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  281. package/lib/esm/appui-react/popup/PositionPopup.d.ts +2 -2
  282. package/lib/esm/appui-react/popup/PositionPopup.d.ts.map +1 -1
  283. package/lib/esm/appui-react/popup/PositionPopup.js.map +1 -1
  284. package/lib/esm/appui-react/selection/SelectionContextItemDef.js +2 -2
  285. package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  286. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +1 -2
  287. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  288. package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  289. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +16 -20
  290. package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
  291. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +84 -115
  292. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  293. package/lib/esm/appui-react/statusbar/Indicator.js +2 -1
  294. package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
  295. package/lib/esm/appui-react/statusbar/StatusBar.js +5 -3
  296. package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
  297. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  298. package/lib/esm/appui-react/statusfields/MessageCenter.js +1 -2
  299. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  300. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  301. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  302. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts +36 -0
  303. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.d.ts.map +1 -0
  304. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.js +130 -0
  305. package/lib/esm/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -0
  306. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +1 -1
  307. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  308. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +2 -2
  309. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  310. package/lib/esm/appui-react/syncui/UiSyncEvent.d.ts +16 -0
  311. package/lib/esm/appui-react/syncui/UiSyncEvent.d.ts.map +1 -0
  312. package/lib/esm/appui-react/syncui/UiSyncEvent.js +14 -0
  313. package/lib/esm/appui-react/syncui/UiSyncEvent.js.map +1 -0
  314. package/lib/esm/appui-react/toolbar/ToolbarHelper.js +4 -6
  315. package/lib/esm/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  316. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js +4 -3
  317. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  318. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +17 -10
  319. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  320. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +2 -3
  321. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  322. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +14 -12
  323. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  324. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +10 -9
  325. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  326. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +2 -1
  327. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  328. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +14 -8
  329. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  330. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  331. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  332. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
  333. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  334. package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
  335. package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
  336. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  337. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  338. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +3 -3
  339. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  340. package/lib/esm/appui-react/widget-panels/Content.js +9 -8
  341. package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
  342. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +7 -29
  343. package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  344. package/lib/esm/appui-react/widget-panels/Frontstage.js +131 -462
  345. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  346. package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
  347. package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
  348. package/lib/esm/appui-react/widget-panels/Tab.js +1 -1
  349. package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
  350. package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
  351. package/lib/esm/appui-react/widget-panels/ToolSettings.js +34 -15
  352. package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
  353. package/lib/esm/appui-react/widget-panels/Toolbars.js +3 -2
  354. package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
  355. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  356. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  357. package/lib/esm/appui-react/widgets/Widget.d.ts +10 -4
  358. package/lib/esm/appui-react/widgets/Widget.d.ts.map +1 -1
  359. package/lib/esm/appui-react/widgets/Widget.js.map +1 -1
  360. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +9 -29
  361. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  362. package/lib/esm/appui-react/widgets/WidgetDef.js +90 -46
  363. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  364. package/lib/esm/appui-react/widgets/WidgetHost.js +3 -2
  365. package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
  366. package/lib/esm/appui-react.d.ts +1 -0
  367. package/lib/esm/appui-react.d.ts.map +1 -1
  368. package/lib/esm/appui-react.js +1 -0
  369. package/lib/esm/appui-react.js.map +1 -1
  370. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ModalSettingsStage.js","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,eAAe,MAAM,2CAA2C,CAAC;AACxE,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,SAAS,kBAAkB,CAAC,EAC1B,oBAAoB,GAGrB;IACC,MAAM,EAAE,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,EAAE,EAAE,IAAI,MAAM,CAAC;IACrE,MAAM,UAAU,GACd,WAAW,CAAC,WAAW,CAAC,mBAAmB,EAAE,KAAK,IAAI,UAAU,CAAC,OAAO,CAAC;IAC3E,MAAM,UA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AAuB,EACzB;gBACA,IAAI,kBAAkB,EAAE;oBACtB,WAAW,CAAC,eAAe,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;oBACpE,OAAO;iBACR;aACF;YACD,WAAW,CAAC,WAAW,CAAC,mBAAmB,CACzC,IAAI,uBAAuB,CAAC,kBAAkB,CAAC,CAChD,CAAC;SACH;aAAM;YACL,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CACxC,8BAA8B,CAC/B,CAAC;YACF,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAC3C,wCAAwC,CACzC,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,oBAAoB,CACnC,qBAAqB,CAAC,IAAI,EAC1B,YAAY,EACZ,eAAe,EACf,iBAAiB,CAAC,KAAK,CACxB,CAAC;YACF,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;SACnE;IACH,CAAC;;AAnEa,0BAAE,GAAG,gCAAgC,AAAnC,CAAoC;AASrC,2CAAmB,GAAG,GAAG,EAAE,CACxC,IAAI,uBAAuB,CACzB,GAAG,EAAE,CAAC,CAAC,KAAK,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,EACxD,CAAC,aAAa,CAAC,wBAAwB,CAAC,CACzC,AAJ+B,CAI9B;SAdO,uBAAuB","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 */\n\nimport \"./ModalSettingsStage.scss\";\nimport * as React from \"react\";\nimport {\n ConditionalBooleanValue,\n IconSpecUtilities,\n} from \"@itwin/appui-abstract\";\nimport settingsIconSvg from \"@bentley/icons-generic/icons/settings.svg\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n} from \"@itwin/core-frontend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Centered, SettingsContainer } from \"@itwin/core-react\";\nimport type {\n ModalFrontstageInfo,\n ModalFrontstageRequestedCloseEventArgs,\n} from \"../framework/FrameworkFrontstages\";\nimport { UiFramework } from \"../UiFramework\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { StageUsage } from \"./StageUsage\";\nimport { BackstageItemUtilities } from \"../backstage/BackstageItemUtilities\";\n\nfunction ModalSettingsStage({\n initialSettingsTabId,\n}: {\n initialSettingsTabId?: string;\n}) {\n const id = UiFramework.frontstages.activeFrontstageDef?.id ?? \"none\";\n const stageUsage =\n UiFramework.frontstages.activeFrontstageDef?.usage ?? StageUsage.General;\n const tabEntries = UiFramework.settingsManager.getSettingEntries(\n id,\n stageUsage\n );\n const noSettingsAvailableLabel = React.useRef(\n UiFramework.translate(\"settings.noSettingsAvailable\")\n );\n\n const currentSettingsTab = React.useCallback(() => {\n const categoryToFind = initialSettingsTabId\n ? initialSettingsTabId.toLowerCase()\n : tabEntries[0].tabId.toLowerCase();\n let foundTab = tabEntries.find(\n (entry) => entry.tabId.toLowerCase() === categoryToFind\n );\n if (!foundTab)\n foundTab = tabEntries.find(\n (entry) => entry.label.toLowerCase() === categoryToFind\n );\n return foundTab;\n }, [initialSettingsTabId, tabEntries]);\n\n React.useEffect(() => {\n const handleFrontstageCloseRequested = ({\n modalFrontstage,\n stageCloseFunc,\n }: ModalFrontstageRequestedCloseEventArgs) => {\n // istanbul ignore else\n if (\n modalFrontstage instanceof SettingsModalFrontstage &&\n stageCloseFunc\n ) {\n UiFramework.settingsManager.closeSettingsContainer(stageCloseFunc);\n }\n };\n return UiFramework.frontstages.onCloseModalFrontstageRequestedEvent.addListener(\n handleFrontstageCloseRequested\n );\n }, [tabEntries]);\n\n return (\n <div className=\"uifw-settings-container\">\n {tabEntries.length ? (\n <SettingsContainer\n tabs={tabEntries}\n currentSettingsTab={currentSettingsTab()}\n settingsManager={UiFramework.settingsManager}\n />\n ) : (\n <Centered>{noSettingsAvailableLabel.current}</Centered>\n )}\n </div>\n );\n}\n\n/** Modal frontstage displaying and editing settings from registered settings providers. See [SettingsManager]($core-react)\n * and [SettingsContainer]($core-react).\n * @beta\n */\nexport class SettingsModalFrontstage implements ModalFrontstageInfo {\n public static id = \"appui-react.modalSettingsStage\";\n public title: string = UiFramework.translate(\"settings.settingsStageLabel\");\n constructor(public initialSettingsTabId?: string) {}\n public notifyCloseRequest = true;\n public get content(): React.ReactNode {\n return (\n <ModalSettingsStage initialSettingsTabId={this.initialSettingsTabId} />\n );\n }\n private static noSettingsAvailable = () =>\n new ConditionalBooleanValue(\n () => 0 === UiFramework.settingsManager.providers.length,\n [SyncUiEventId.SettingsProvidersChanged]\n );\n\n public static getBackstageActionItem(\n groupPriority: number,\n itemPriority: number\n ) {\n return BackstageItemUtilities.createActionItem(\n SettingsModalFrontstage.id,\n groupPriority,\n itemPriority,\n () =>\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage()\n ),\n UiFramework.translate(\"settings.settingsStageLabel\"),\n undefined,\n IconSpecUtilities.createWebComponentIconSpec(settingsIconSvg),\n { isHidden: SettingsModalFrontstage.noSettingsAvailable() }\n );\n }\n\n public static showSettingsStage(initialSettingsTab?: string) {\n if (UiFramework.settingsManager.providers.length) {\n // Check to see if it is already open\n // istanbul ignore else\n if (\n UiFramework.frontstages.activeModalFrontstage &&\n UiFramework.frontstages.activeModalFrontstage instanceof\n SettingsModalFrontstage\n ) {\n if (initialSettingsTab) {\n UiFramework.settingsManager.activateSettingsTab(initialSettingsTab);\n return;\n }\n }\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage(initialSettingsTab)\n );\n } else {\n const briefMessage = UiFramework.translate(\n \"settings.noSettingsAvailable\"\n );\n const detailedMessage = UiFramework.translate(\n \"settings.noSettingsProvidersRegistered\"\n );\n const info = new NotifyMessageDetails(\n OutputMessagePriority.Info,\n briefMessage,\n detailedMessage,\n OutputMessageType.Toast\n );\n IModelApp.notifications.outputMessage(info);\n Logger.logInfo(UiFramework.loggerCategory(this), detailedMessage);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ModalSettingsStage.js","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,eAAe,MAAM,2CAA2C,CAAC;AACxE,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,SAAS,kBAAkB,CAAC,EAC1B,oBAAoB,GAGrB;;IACC,MAAM,EAAE,GAAG,MAAA,MAAA,WAAW,CAAC,WAAW,CAAC,mBAAmB,0CAAE,EAAE,mCAAI,MAAM,CAAC;IACrE,MAAM,UAAU,GACd,MAAA,MAAA,WAAW,CAAC,WAAW,CAAC,mBAAmB,0CAAE,KAAK,mCAAI,UAAU,CAAC,OAAO,CAAC;IAC3E,MAAM,UAAU,GAAG,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAC9D,EAAE,EACF,UAAU,CACX,CAAC;IACF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AC,kBAAkB,CAAC,CAAC;oBACpE,OAAO;iBACR;aACF;YACD,WAAW,CAAC,WAAW,CAAC,mBAAmB,CACzC,IAAI,uBAAuB,CAAC,kBAAkB,CAAC,CAChD,CAAC;SACH;aAAM;YACL,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CACxC,8BAA8B,CAC/B,CAAC;YACF,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAC3C,wCAAwC,CACzC,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,oBAAoB,CACnC,qBAAqB,CAAC,IAAI,EAC1B,YAAY,EACZ,eAAe,EACf,iBAAiB,CAAC,KAAK,CACxB,CAAC;YACF,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;SACnE;IACH,CAAC;;AAnEa,0BAAE,GAAG,gCAAgC,AAAnC,CAAoC;AASrC,2CAAmB,GAAG,GAAG,EAAE,CACxC,IAAI,uBAAuB,CACzB,GAAG,EAAE,CAAC,CAAC,KAAK,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,EACxD,CAAC,aAAa,CAAC,wBAAwB,CAAC,CACzC,AAJ+B,CAI9B;SAdO,uBAAuB","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 */\n\nimport \"./ModalSettingsStage.scss\";\nimport * as React from \"react\";\nimport {\n ConditionalBooleanValue,\n IconSpecUtilities,\n} from \"@itwin/appui-abstract\";\nimport settingsIconSvg from \"@bentley/icons-generic/icons/settings.svg\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n} from \"@itwin/core-frontend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Centered, SettingsContainer } from \"@itwin/core-react\";\nimport type {\n ModalFrontstageInfo,\n ModalFrontstageRequestedCloseEventArgs,\n} from \"../framework/FrameworkFrontstages\";\nimport { UiFramework } from \"../UiFramework\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { StageUsage } from \"./StageUsage\";\nimport { BackstageItemUtilities } from \"../backstage/BackstageItemUtilities\";\n\nfunction ModalSettingsStage({\n initialSettingsTabId,\n}: {\n initialSettingsTabId?: string;\n}) {\n const id = UiFramework.frontstages.activeFrontstageDef?.id ?? \"none\";\n const stageUsage =\n UiFramework.frontstages.activeFrontstageDef?.usage ?? StageUsage.General;\n const tabEntries = UiFramework.settingsManager.getSettingEntries(\n id,\n stageUsage\n );\n const noSettingsAvailableLabel = React.useRef(\n UiFramework.translate(\"settings.noSettingsAvailable\")\n );\n\n const currentSettingsTab = React.useCallback(() => {\n const categoryToFind = initialSettingsTabId\n ? initialSettingsTabId.toLowerCase()\n : tabEntries[0].tabId.toLowerCase();\n let foundTab = tabEntries.find(\n (entry) => entry.tabId.toLowerCase() === categoryToFind\n );\n if (!foundTab)\n foundTab = tabEntries.find(\n (entry) => entry.label.toLowerCase() === categoryToFind\n );\n return foundTab;\n }, [initialSettingsTabId, tabEntries]);\n\n React.useEffect(() => {\n const handleFrontstageCloseRequested = ({\n modalFrontstage,\n stageCloseFunc,\n }: ModalFrontstageRequestedCloseEventArgs) => {\n // istanbul ignore else\n if (\n modalFrontstage instanceof SettingsModalFrontstage &&\n stageCloseFunc\n ) {\n UiFramework.settingsManager.closeSettingsContainer(stageCloseFunc);\n }\n };\n return UiFramework.frontstages.onCloseModalFrontstageRequestedEvent.addListener(\n handleFrontstageCloseRequested\n );\n }, [tabEntries]);\n\n return (\n <div className=\"uifw-settings-container\">\n {tabEntries.length ? (\n <SettingsContainer\n tabs={tabEntries}\n currentSettingsTab={currentSettingsTab()}\n settingsManager={UiFramework.settingsManager}\n />\n ) : (\n <Centered>{noSettingsAvailableLabel.current}</Centered>\n )}\n </div>\n );\n}\n\n/** Modal frontstage displaying and editing settings from registered settings providers. See [SettingsManager]($core-react)\n * and [SettingsContainer]($core-react).\n * @beta\n */\nexport class SettingsModalFrontstage implements ModalFrontstageInfo {\n public static id = \"appui-react.modalSettingsStage\";\n public title: string = UiFramework.translate(\"settings.settingsStageLabel\");\n constructor(public initialSettingsTabId?: string) {}\n public notifyCloseRequest = true;\n public get content(): React.ReactNode {\n return (\n <ModalSettingsStage initialSettingsTabId={this.initialSettingsTabId} />\n );\n }\n private static noSettingsAvailable = () =>\n new ConditionalBooleanValue(\n () => 0 === UiFramework.settingsManager.providers.length,\n [SyncUiEventId.SettingsProvidersChanged]\n );\n\n public static getBackstageActionItem(\n groupPriority: number,\n itemPriority: number\n ) {\n return BackstageItemUtilities.createActionItem(\n SettingsModalFrontstage.id,\n groupPriority,\n itemPriority,\n () =>\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage()\n ),\n UiFramework.translate(\"settings.settingsStageLabel\"),\n undefined,\n IconSpecUtilities.createWebComponentIconSpec(settingsIconSvg),\n { isHidden: SettingsModalFrontstage.noSettingsAvailable() }\n );\n }\n\n public static showSettingsStage(initialSettingsTab?: string) {\n if (UiFramework.settingsManager.providers.length) {\n // Check to see if it is already open\n // istanbul ignore else\n if (\n UiFramework.frontstages.activeModalFrontstage &&\n UiFramework.frontstages.activeModalFrontstage instanceof\n SettingsModalFrontstage\n ) {\n if (initialSettingsTab) {\n UiFramework.settingsManager.activateSettingsTab(initialSettingsTab);\n return;\n }\n }\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage(initialSettingsTab)\n );\n } else {\n const briefMessage = UiFramework.translate(\n \"settings.noSettingsAvailable\"\n );\n const detailedMessage = UiFramework.translate(\n \"settings.noSettingsProvidersRegistered\"\n );\n const info = new NotifyMessageDetails(\n OutputMessagePriority.Info,\n briefMessage,\n detailedMessage,\n OutputMessageType.Toast\n );\n IModelApp.notifications.outputMessage(info);\n Logger.logInfo(UiFramework.loggerCategory(this), detailedMessage);\n }\n }\n}\n"]}
@@ -26,12 +26,13 @@ export class StandardFrontstageProvider extends FrontstageProvider {
26
26
  return this.props.id;
27
27
  }
28
28
  frontstageConfig() {
29
+ var _a;
29
30
  const contentGroup = this.props.contentGroupProps instanceof ContentGroupProvider
30
31
  ? this.props.contentGroupProps
31
32
  : new ContentGroup(this.props.contentGroupProps);
32
33
  return {
33
34
  id: this.props.id,
34
- version: this.props.version ?? 1.0,
35
+ version: (_a = this.props.version) !== null && _a !== void 0 ? _a : 1.0,
35
36
  contentGroup,
36
37
  usage: this.props.usage,
37
38
  defaultTool: this.props.defaultTool,
@@ -1 +1 @@
1
- {"version":3,"file":"StandardFrontstageProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/StandardFrontstageProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAI/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AA4DnE;;;;GAIG;AACH,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAChE,YAAoB,KAA8B;QAChD,KAAK,EAAE,CAAC;QADU,UAAK,GAAL,KAAK,CAAyB;IAElD,CAAC;IAED,IAAoB,EAAE;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACvB,CAAC;IAEe,gBAAgB;QAC9B,MAAM,YAAY,GAChB,IAAI,CAAC,KAAK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EAAE,eAAe,CAAC,SAAS;gBACvC,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc;aAC7B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,eAAe,CAAC,SAAS;gBACvC,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa;aAC5B;YACD,UAAU,EAAE;gBACV,YAAY,EAAE,eAAe,CAAC,IAAI;gBAClC,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe;aAC9B;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,GAAG;gBACT,YAAY,EAAE,eAAe,CAAC,IAAI;gBAClC,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB;aAC/B;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport type { ContentGroupProps } from \"../content/ContentGroup\";\nimport { ContentGroup, ContentGroupProvider } from \"../content/ContentGroup\";\nimport { FrontstageProvider } from \"./FrontstageProvider\";\nimport { ContentToolWidgetComposer } from \"../widgets/ContentToolWidgetComposer\";\nimport { ViewToolWidgetComposer } from \"../widgets/ViewToolWidgetComposer\";\nimport { StagePanelState } from \"../stagepanels/StagePanelDef\";\nimport type { FrontstageConfig } from \"./FrontstageConfig\";\nimport type { StagePanelConfig } from \"../stagepanels/StagePanelConfig\";\nimport type { StageUsage } from \"./StageUsage\";\nimport { StatusBarComposer } from \"../statusbar/StatusBarComposer\";\n\n/** Properties of a [[WidgetPanelProps]] component\n * @public\n */\nexport type WidgetPanelProps = Omit<\n StagePanelConfig,\n \"widgets\" | \"runtimeProps\" | \"header\" | \"allowedZones\" | \"panelZones\"\n>;\n\n/**\n * Props for [[StandardFrontstageProvider]]\n * @public\n */\nexport interface StandardFrontstageProps {\n /* unique stage id. To ensure uniqueness it is common practice to format id like `appName:stageId` */\n id: string;\n /* version id that is used to store state of stage */\n version?: number;\n // Usage of stage. To allow generic UiItemProvides to populate this stage set to `StageUsage.General`.\n usage: StageUsage | string;\n /** The defaultTool is is started when then frontstage loads and whenever any other tools exit.\n * Most of the time, this is the Element Selection Tool (SelectionTool.toolId).\n * Your app can specify its own tool or another core tool as default with this property.\n */\n defaultTool?: string;\n /** Definition of available content groups or a function that provides them */\n contentGroupProps: ContentGroupProps | ContentGroupProvider;\n /** Specify button to use to open backstage. Leave undefined for no backstage button.\n * ```\n * <BackstageAppButton icon={<SvgBentleySystems />} />\n * ```\n * Custom corner button definition\n * ```\n * const cornerButton = <BackstageAppButton icon={<SvgBentleySystems />}\n * label=\"Toggle Backstage display\",\n * execute={() => UiFramework.backstage.getBackstageToggleCommand().execute()} />;\n * ```\n */\n cornerButton?: React.ReactNode;\n /** Set to true if default Navigation aid is not desired */\n hideNavigationAid?: boolean;\n /** Set to true if no tool setting dock is needed. Typically only used in modal stages. */\n hideToolSettings?: boolean;\n /** Set to true if no status bar is needed in stage */\n hideStatusBar?: boolean;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 300, pinned=false, defaultState:StagePanelState.Minimized} */\n leftPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 90, pinned=false, defaultState:StagePanelState.Minimized} */\n topPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 200, pinned=true, defaultState:StagePanelState.Open} */\n rightPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 180, pinned=true, defaultState:StagePanelState.Open} */\n bottomPanelProps?: WidgetPanelProps;\n}\n\n/**\n * FrontstageProvider that provides an \"empty\" stage. All tool buttons, statusbar items, and widgets must\n * be provided by one or more item providers, see [[UiItemsProvider]].\n * @public\n */\nexport class StandardFrontstageProvider extends FrontstageProvider {\n constructor(private props: StandardFrontstageProps) {\n super();\n }\n\n public override get id(): string {\n return this.props.id;\n }\n\n public override frontstageConfig(): FrontstageConfig {\n const contentGroup =\n this.props.contentGroupProps instanceof ContentGroupProvider\n ? this.props.contentGroupProps\n : new ContentGroup(this.props.contentGroupProps);\n return {\n id: this.props.id,\n version: this.props.version ?? 1.0,\n contentGroup,\n usage: this.props.usage,\n defaultTool: this.props.defaultTool,\n contentManipulation: {\n id: `${this.props.id}-contentManipulationTools`,\n content: (\n <ContentToolWidgetComposer cornerButton={this.props.cornerButton} />\n ),\n },\n viewNavigation: {\n id: `${this.props.id}-viewNavigationTools`,\n content: (\n <ViewToolWidgetComposer\n hideNavigationAid={this.props.hideNavigationAid}\n />\n ),\n },\n toolSettings: this.props.hideToolSettings\n ? undefined\n : {\n id: `${this.props.id}-toolSettings`,\n },\n statusBar: this.props.hideStatusBar\n ? undefined\n : {\n id: `${this.props.id}-statusBar`,\n content: <StatusBarComposer items={[]} />,\n },\n leftPanel: {\n size: 300,\n pinned: false,\n defaultState: StagePanelState.Minimized,\n ...this.props.leftPanelProps,\n },\n topPanel: {\n size: 90,\n pinned: false,\n defaultState: StagePanelState.Minimized,\n ...this.props.topPanelProps,\n },\n rightPanel: {\n defaultState: StagePanelState.Open,\n ...this.props.rightPanelProps,\n },\n bottomPanel: {\n size: 180,\n defaultState: StagePanelState.Open,\n ...this.props.bottomPanelProps,\n },\n };\n }\n}\n"]}
1
+ {"version":3,"file":"StandardFrontstageProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/StandardFrontstageProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,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AY,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB;gBACvC,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC;oBACE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe;iBACpC;YACL,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;gBACjC,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC;oBACE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,YAAY;oBAChC,OAAO,EAAE,oBAAC,iBAAiB,IAAC,KAAK,EAAE,EAAE,GAAI;iBAC1C;YACL,SAAS,EAAE;gBACT,IAAI,EAAE,GAAG;gBACT,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,eAAe,CAAC,SAAS;gBACvC,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc;aAC7B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,eAAe,CAAC,SAAS;gBACvC,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa;aAC5B;YACD,UAAU,EAAE;gBACV,YAAY,EAAE,eAAe,CAAC,IAAI;gBAClC,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe;aAC9B;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,GAAG;gBACT,YAAY,EAAE,eAAe,CAAC,IAAI;gBAClC,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB;aAC/B;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport type { ContentGroupProps } from \"../content/ContentGroup\";\nimport { ContentGroup, ContentGroupProvider } from \"../content/ContentGroup\";\nimport { FrontstageProvider } from \"./FrontstageProvider\";\nimport { ContentToolWidgetComposer } from \"../widgets/ContentToolWidgetComposer\";\nimport { ViewToolWidgetComposer } from \"../widgets/ViewToolWidgetComposer\";\nimport { StagePanelState } from \"../stagepanels/StagePanelDef\";\nimport type { FrontstageConfig } from \"./FrontstageConfig\";\nimport type { StagePanelConfig } from \"../stagepanels/StagePanelConfig\";\nimport type { StageUsage } from \"./StageUsage\";\nimport { StatusBarComposer } from \"../statusbar/StatusBarComposer\";\n\n/** Properties of a [[WidgetPanelProps]] component\n * @public\n */\nexport type WidgetPanelProps = Omit<\n StagePanelConfig,\n \"widgets\" | \"runtimeProps\" | \"header\" | \"allowedZones\" | \"panelZones\"\n>;\n\n/**\n * Props for [[StandardFrontstageProvider]]\n * @public\n */\nexport interface StandardFrontstageProps {\n /* unique stage id. To ensure uniqueness it is common practice to format id like `appName:stageId` */\n id: string;\n /* version id that is used to store state of stage */\n version?: number;\n // Usage of stage. To allow generic UiItemProvides to populate this stage set to `StageUsage.General`.\n usage: StageUsage | string;\n /** The defaultTool is is started when then frontstage loads and whenever any other tools exit.\n * Most of the time, this is the Element Selection Tool (SelectionTool.toolId).\n * Your app can specify its own tool or another core tool as default with this property.\n */\n defaultTool?: string;\n /** Definition of available content groups or a function that provides them */\n contentGroupProps: ContentGroupProps | ContentGroupProvider;\n /** Specify button to use to open backstage. Leave undefined for no backstage button.\n * ```\n * <BackstageAppButton icon={<SvgBentleySystems />} />\n * ```\n * Custom corner button definition\n * ```\n * const cornerButton = <BackstageAppButton icon={<SvgBentleySystems />}\n * label=\"Toggle Backstage display\",\n * execute={() => UiFramework.backstage.getBackstageToggleCommand().execute()} />;\n * ```\n */\n cornerButton?: React.ReactNode;\n /** Set to true if default Navigation aid is not desired */\n hideNavigationAid?: boolean;\n /** Set to true if no tool setting dock is needed. Typically only used in modal stages. */\n hideToolSettings?: boolean;\n /** Set to true if no status bar is needed in stage */\n hideStatusBar?: boolean;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 300, pinned=false, defaultState:StagePanelState.Minimized} */\n leftPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 90, pinned=false, defaultState:StagePanelState.Minimized} */\n topPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 200, pinned=true, defaultState:StagePanelState.Open} */\n rightPanelProps?: WidgetPanelProps;\n /** Props used to set initial size and state of panel. Defaults to:\n * {size: 180, pinned=true, defaultState:StagePanelState.Open} */\n bottomPanelProps?: WidgetPanelProps;\n}\n\n/**\n * FrontstageProvider that provides an \"empty\" stage. All tool buttons, statusbar items, and widgets must\n * be provided by one or more item providers, see [[UiItemsProvider]].\n * @public\n */\nexport class StandardFrontstageProvider extends FrontstageProvider {\n constructor(private props: StandardFrontstageProps) {\n super();\n }\n\n public override get id(): string {\n return this.props.id;\n }\n\n public override frontstageConfig(): FrontstageConfig {\n const contentGroup =\n this.props.contentGroupProps instanceof ContentGroupProvider\n ? this.props.contentGroupProps\n : new ContentGroup(this.props.contentGroupProps);\n return {\n id: this.props.id,\n version: this.props.version ?? 1.0,\n contentGroup,\n usage: this.props.usage,\n defaultTool: this.props.defaultTool,\n contentManipulation: {\n id: `${this.props.id}-contentManipulationTools`,\n content: (\n <ContentToolWidgetComposer cornerButton={this.props.cornerButton} />\n ),\n },\n viewNavigation: {\n id: `${this.props.id}-viewNavigationTools`,\n content: (\n <ViewToolWidgetComposer\n hideNavigationAid={this.props.hideNavigationAid}\n />\n ),\n },\n toolSettings: this.props.hideToolSettings\n ? undefined\n : {\n id: `${this.props.id}-toolSettings`,\n },\n statusBar: this.props.hideStatusBar\n ? undefined\n : {\n id: `${this.props.id}-statusBar`,\n content: <StatusBarComposer items={[]} />,\n },\n leftPanel: {\n size: 300,\n pinned: false,\n defaultState: StagePanelState.Minimized,\n ...this.props.leftPanelProps,\n },\n topPanel: {\n size: 90,\n pinned: false,\n defaultState: StagePanelState.Minimized,\n ...this.props.topPanelProps,\n },\n rightPanel: {\n defaultState: StagePanelState.Open,\n ...this.props.rightPanelProps,\n },\n bottomPanel: {\n size: 180,\n defaultState: StagePanelState.Open,\n ...this.props.bottomPanelProps,\n },\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveIModelConnection.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveIModelConnection.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,gBAAgB,GAAG,SAAS,CAwBxE"}
1
+ {"version":3,"file":"useActiveIModelConnection.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveIModelConnection.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM7D;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,gBAAgB,GAAG,SAAS,CAwBxE"}
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveIModelConnection.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveIModelConnection.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GAIG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CACtD,WAAW,CAAC,mBAAmB,EAAE,CAClC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,iBAAiB,GAAG,CAAC,IAAqB,EAAQ,EAAE;YACxD,MAAM,QAAQ,GAAG,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC5D,uBAAuB;YACvB,IACE,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CACvC,EACD;gBACA,mBAAmB,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC,CAAC;aACxD;QACH,CAAC,CAAC;QAEF,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QACnE,OAAO,GAAG,EAAE;YACV,qBAAqB,CAAC,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;QACxE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport type { UiSyncEventArgs } from \"@itwin/appui-abstract\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** React hook that maintains the active IModelConnection. For this hook to work properly the\n * IModelConnection must be set using UiFramework.setIModelConnection method. This also requires\n * that the host app includes the UiFramework reducer into its Redux store.\n * @public\n */\nexport function useActiveIModelConnection(): IModelConnection | undefined {\n const [activeConnection, setActiveConnection] = useState(\n UiFramework.getIModelConnection()\n );\n useEffect(() => {\n const handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n const eventIds = [SessionStateActionId.SetIModelConnection];\n // istanbul ignore else\n if (\n eventIds.some((value: string): boolean =>\n args.eventIds.has(value.toLowerCase())\n )\n ) {\n setActiveConnection(UiFramework.getIModelConnection());\n }\n };\n\n SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\n return () => {\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(handleSyncUiEvent);\n };\n }, [activeConnection]);\n\n return activeConnection;\n}\n"]}
1
+ {"version":3,"file":"useActiveIModelConnection.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveIModelConnection.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;GAIG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CACtD,WAAW,CAAC,mBAAmB,EAAE,CAClC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,iBAAiB,GAAG,CAAC,IAAqB,EAAQ,EAAE;YACxD,MAAM,QAAQ,GAAG,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC5D,uBAAuB;YACvB,IACE,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CACvC,EACD;gBACA,mBAAmB,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC,CAAC;aACxD;QACH,CAAC,CAAC;QAEF,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QACnE,OAAO,GAAG,EAAE;YACV,qBAAqB,CAAC,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;QACxE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent\";\n\n/** React hook that maintains the active IModelConnection. For this hook to work properly the\n * IModelConnection must be set using UiFramework.setIModelConnection method. This also requires\n * that the host app includes the UiFramework reducer into its Redux store.\n * @public\n */\nexport function useActiveIModelConnection(): IModelConnection | undefined {\n const [activeConnection, setActiveConnection] = useState(\n UiFramework.getIModelConnection()\n );\n useEffect(() => {\n const handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n const eventIds = [SessionStateActionId.SetIModelConnection];\n // istanbul ignore else\n if (\n eventIds.some((value: string): boolean =>\n args.eventIds.has(value.toLowerCase())\n )\n ) {\n setActiveConnection(UiFramework.getIModelConnection());\n }\n };\n\n SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\n return () => {\n SyncUiEventDispatcher.onSyncUiEvent.removeListener(handleSyncUiEvent);\n };\n }, [activeConnection]);\n\n return activeConnection;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAS3D;;GAEG;AAEH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CA+C9D"}
1
+ {"version":3,"file":"useActiveViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAU3D;;GAEG;AAEH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CA+C9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,uBAAuB;AACvB,MAAM,UAAU,iBAAiB;IAC/B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,SAAS,CAAC,WAAW,CAAC,YAAY,CACnC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,sBAAsB,GAAG,CAAC,KAAoC,EAAE,EAAE;YACtE,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACxD,CAAC,CAAC;QAEF,oGAAoG;QACpG,6GAA6G;QAC7G,sEAAsE;QACtE,WAAW,CAAC,OAAO,CAAC,2BAA2B,CAAC,WAAW,CACzD,sBAAsB,CACvB,CAAC;QACF,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,OAAO,CAAC,2BAA2B,CAAC,cAAc,CAC5D,sBAAsB,CACvB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,iBAAiB,GAAG;YACxB,aAAa,CAAC,oBAAoB;YAClC,aAAa,CAAC,uBAAuB;YACrC,aAAa,CAAC,eAAe;SAC9B,CAAC;QACF,MAAM,iBAAiB,GAAG,CAAC,IAAqB,EAAQ,EAAE;YACxD,uBAAuB;YACvB,IACE,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAChD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CACzB,EACD;gBACA,MAAM,oBAAoB,GACxB,WAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC;gBAChD,iBAAiB,CACf,oBAAoB,IAAI,oBAAoB,CAAC,QAAQ,CACtD,CAAC;aACH;QACH,CAAC,CAAC;QAEF,OAAO,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC5E,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport type { UiSyncEventArgs } from \"@itwin/appui-abstract\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport {\n SyncUiEventDispatcher,\n SyncUiEventId,\n} from \"../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** React hook that maintains the active viewport.\n * @public\n */\n// istanbul ignore next\nexport function useActiveViewport(): ScreenViewport | undefined {\n const [activeViewport, setActiveViewport] = useState(\n IModelApp.viewManager.selectedView\n );\n useEffect(() => {\n const onActiveContentChanged = (_args: ActiveContentChangedEventArgs) => {\n setActiveViewport(IModelApp.viewManager.selectedView);\n };\n\n // IModelApp.viewManager.onSelectedViewportChanged will often fire before UI components have mounted\n // so use UiFramework.content.onActiveContentChangedEvent which will always trigger once all stage components\n // are loaded and when the IModelApp.viewManager.selectedView changes.\n UiFramework.content.onActiveContentChangedEvent.addListener(\n onActiveContentChanged\n );\n return () => {\n UiFramework.content.onActiveContentChangedEvent.removeListener(\n onActiveContentChanged\n );\n };\n }, []);\n\n useEffect(() => {\n const syncIdsOfInterest = [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ContentControlActivated,\n SyncUiEventId.FrontstageReady,\n ];\n const handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n // istanbul ignore else\n if (\n syncIdsOfInterest.some((value: string): boolean =>\n args.eventIds.has(value)\n )\n ) {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n setActiveViewport(\n activeContentControl && activeContentControl.viewport\n );\n }\n };\n\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\n }, []);\n\n return activeViewport;\n}\n"]}
1
+ {"version":3,"file":"useActiveViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useActiveViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,uBAAuB;AACvB,MAAM,UAAU,iBAAiB;IAC/B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,SAAS,CAAC,WAAW,CAAC,YAAY,CACnC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,sBAAsB,GAAG,CAAC,KAAoC,EAAE,EAAE;YACtE,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACxD,CAAC,CAAC;QAEF,oGAAoG;QACpG,6GAA6G;QAC7G,sEAAsE;QACtE,WAAW,CAAC,OAAO,CAAC,2BAA2B,CAAC,WAAW,CACzD,sBAAsB,CACvB,CAAC;QACF,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,OAAO,CAAC,2BAA2B,CAAC,cAAc,CAC5D,sBAAsB,CACvB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,iBAAiB,GAAG;YACxB,aAAa,CAAC,oBAAoB;YAClC,aAAa,CAAC,uBAAuB;YACrC,aAAa,CAAC,eAAe;SAC9B,CAAC;QACF,MAAM,iBAAiB,GAAG,CAAC,IAAqB,EAAQ,EAAE;YACxD,uBAAuB;YACvB,IACE,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAChD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CACzB,EACD;gBACA,MAAM,oBAAoB,GACxB,WAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC;gBAChD,iBAAiB,CACf,oBAAoB,IAAI,oBAAoB,CAAC,QAAQ,CACtD,CAAC;aACH;QACH,CAAC,CAAC;QAEF,OAAO,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC5E,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport {\n SyncUiEventDispatcher,\n SyncUiEventId,\n} from \"../syncui/SyncUiEventDispatcher\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent\";\n\n/** React hook that maintains the active viewport.\n * @public\n */\n// istanbul ignore next\nexport function useActiveViewport(): ScreenViewport | undefined {\n const [activeViewport, setActiveViewport] = useState(\n IModelApp.viewManager.selectedView\n );\n useEffect(() => {\n const onActiveContentChanged = (_args: ActiveContentChangedEventArgs) => {\n setActiveViewport(IModelApp.viewManager.selectedView);\n };\n\n // IModelApp.viewManager.onSelectedViewportChanged will often fire before UI components have mounted\n // so use UiFramework.content.onActiveContentChangedEvent which will always trigger once all stage components\n // are loaded and when the IModelApp.viewManager.selectedView changes.\n UiFramework.content.onActiveContentChangedEvent.addListener(\n onActiveContentChanged\n );\n return () => {\n UiFramework.content.onActiveContentChangedEvent.removeListener(\n onActiveContentChanged\n );\n };\n }, []);\n\n useEffect(() => {\n const syncIdsOfInterest = [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ContentControlActivated,\n SyncUiEventId.FrontstageReady,\n ];\n const handleSyncUiEvent = (args: UiSyncEventArgs): void => {\n // istanbul ignore else\n if (\n syncIdsOfInterest.some((value: string): boolean =>\n args.eventIds.has(value)\n )\n ) {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n setActiveViewport(\n activeContentControl && activeContentControl.viewport\n );\n }\n };\n\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\n }, []);\n\n return activeViewport;\n}\n"]}
@@ -10,25 +10,29 @@ import { AnalysisAnimationTimelineDataProvider } from "../timeline/AnalysisAnima
10
10
  /** @internal */
11
11
  // istanbul ignore next
12
12
  function useSupportsAnalysisAnimation(viewport) {
13
- const [supportsAnalysisAnimation, setSupportsAnalysisAnimation] = React.useState(!!viewport?.view?.analysisStyle);
13
+ var _a;
14
+ const [supportsAnalysisAnimation, setSupportsAnalysisAnimation] = React.useState(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.view) === null || _a === void 0 ? void 0 : _a.analysisStyle));
14
15
  React.useEffect(() => {
15
- setSupportsAnalysisAnimation(!!viewport?.view?.analysisStyle);
16
+ var _a;
17
+ setSupportsAnalysisAnimation(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.view) === null || _a === void 0 ? void 0 : _a.analysisStyle));
16
18
  }, [viewport]);
17
19
  React.useEffect(() => {
18
20
  const handleViewChanged = (vp) => {
19
- const hasAnalysisData = !!vp?.view?.analysisStyle;
21
+ var _a;
22
+ const hasAnalysisData = !!((_a = vp === null || vp === void 0 ? void 0 : vp.view) === null || _a === void 0 ? void 0 : _a.analysisStyle);
20
23
  if (hasAnalysisData !== supportsAnalysisAnimation)
21
24
  setSupportsAnalysisAnimation(hasAnalysisData);
22
25
  };
23
- return viewport?.onChangeView.addListener(handleViewChanged);
26
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onChangeView.addListener(handleViewChanged);
24
27
  }, [supportsAnalysisAnimation, viewport]);
25
28
  React.useEffect(() => {
26
29
  const handleDisplayStyleChange = (vp) => {
27
- const hasAnalysisData = !!vp?.view?.analysisStyle;
30
+ var _a;
31
+ const hasAnalysisData = !!((_a = vp === null || vp === void 0 ? void 0 : vp.view) === null || _a === void 0 ? void 0 : _a.analysisStyle);
28
32
  if (hasAnalysisData !== supportsAnalysisAnimation)
29
33
  setSupportsAnalysisAnimation(hasAnalysisData);
30
34
  };
31
- return viewport?.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
35
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
32
36
  }, [viewport, supportsAnalysisAnimation]);
33
37
  return supportsAnalysisAnimation;
34
38
  }
@@ -49,7 +53,7 @@ export function useAnalysisAnimationDataProvider(viewport) {
49
53
  React.useEffect(() => {
50
54
  async function fetchNewDataProvider(vp) {
51
55
  let newProvider = new AnalysisAnimationTimelineDataProvider(vp.view, vp);
52
- if (newProvider?.supportsTimelineAnimation) {
56
+ if (newProvider === null || newProvider === void 0 ? void 0 : newProvider.supportsTimelineAnimation) {
53
57
  const dataLoaded = await newProvider.loadTimelineData();
54
58
  if (!dataLoaded)
55
59
  newProvider = undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useAnalysisAnimationDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useAnalysisAnimationDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAG9F,gBAAgB;AAChB,uBAAuB;AACvB,SAAS,4BAA4B,CAAC,QAA8B;IAClE,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,GAC7D,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;IAElD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,4BAA4B,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,iBAAiB,GAAG,CAAC,EAAY,EAAQ,EAAE;YAC/C,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC;YAClD,IAAI,eAAe,KAAK,yBAAyB;gBAC/C,4BAA4B,CAAC,eAAe,CAAC,CAAC;QAClD,CAAC,CAAC;QACF,OAAO,QAAQ,EAAE,YAAY,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC/D,CAAC,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AAE,CAAC;gBACxD,IAAI,CAAC,UAAU;oBAAE,WAAW,GAAG,SAAS,CAAC;aAC1C;YACD,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,yBAAyB,IAAI,QAAQ;YACvC,KAAK,oBAAoB,CAAC,QAAQ,CAAC,CAAC;;YAEpC,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC,EAAE,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,OAAO,qCAAqC,CAAC;AAC/C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport { AnalysisAnimationTimelineDataProvider } from \"../timeline/AnalysisAnimationProvider\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsAnalysisAnimation(viewport: Viewport | undefined) {\n const [supportsAnalysisAnimation, setSupportsAnalysisAnimation] =\n React.useState(!!viewport?.view?.analysisStyle);\n\n React.useEffect(() => {\n setSupportsAnalysisAnimation(!!viewport?.view?.analysisStyle);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const hasAnalysisData = !!vp?.view?.analysisStyle;\n if (hasAnalysisData !== supportsAnalysisAnimation)\n setSupportsAnalysisAnimation(hasAnalysisData);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [supportsAnalysisAnimation, viewport]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const hasAnalysisData = !!vp?.view?.analysisStyle;\n if (hasAnalysisData !== supportsAnalysisAnimation)\n setSupportsAnalysisAnimation(hasAnalysisData);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsAnalysisAnimation]);\n return supportsAnalysisAnimation;\n}\n\n/** Hook that returns either a AnalysisAnimationTimelineDataProvider or undefined based on if the supplied viewport contains analysis data.\n * @public\n **/\n// istanbul ignore next\nexport function useAnalysisAnimationDataProvider(\n viewport: ScreenViewport | undefined\n) {\n const supportsAnalysisAnimation = useSupportsAnalysisAnimation(viewport);\n const [\n analysisAnimationTimelineDataProvider,\n setAnalysisAnimationTimelineDataProvider,\n ] = React.useState<AnalysisAnimationTimelineDataProvider | undefined>();\n const isMountedRef = React.useRef(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n React.useEffect(() => {\n async function fetchNewDataProvider(vp: ScreenViewport) {\n let newProvider: AnalysisAnimationTimelineDataProvider | undefined =\n new AnalysisAnimationTimelineDataProvider(vp.view, vp);\n if (newProvider?.supportsTimelineAnimation) {\n const dataLoaded = await newProvider.loadTimelineData();\n if (!dataLoaded) newProvider = undefined;\n }\n isMountedRef.current &&\n setAnalysisAnimationTimelineDataProvider(newProvider);\n }\n if (supportsAnalysisAnimation && viewport)\n void fetchNewDataProvider(viewport);\n else\n isMountedRef.current &&\n setAnalysisAnimationTimelineDataProvider(undefined);\n }, [supportsAnalysisAnimation, viewport]);\n\n return analysisAnimationTimelineDataProvider;\n}\n"]}
1
+ {"version":3,"file":"useAnalysisAnimationDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useAnalysisAnimationDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAG9F,gBAAgB;AAChB,uBAAuB;AACvB,SAAS,4BAA4B,CAAC,QAA8B;;IAClE,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,GAC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qCAAqC,CAAC;AAC/C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport { AnalysisAnimationTimelineDataProvider } from \"../timeline/AnalysisAnimationProvider\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsAnalysisAnimation(viewport: Viewport | undefined) {\n const [supportsAnalysisAnimation, setSupportsAnalysisAnimation] =\n React.useState(!!viewport?.view?.analysisStyle);\n\n React.useEffect(() => {\n setSupportsAnalysisAnimation(!!viewport?.view?.analysisStyle);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const hasAnalysisData = !!vp?.view?.analysisStyle;\n if (hasAnalysisData !== supportsAnalysisAnimation)\n setSupportsAnalysisAnimation(hasAnalysisData);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [supportsAnalysisAnimation, viewport]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const hasAnalysisData = !!vp?.view?.analysisStyle;\n if (hasAnalysisData !== supportsAnalysisAnimation)\n setSupportsAnalysisAnimation(hasAnalysisData);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsAnalysisAnimation]);\n return supportsAnalysisAnimation;\n}\n\n/** Hook that returns either a AnalysisAnimationTimelineDataProvider or undefined based on if the supplied viewport contains analysis data.\n * @public\n **/\n// istanbul ignore next\nexport function useAnalysisAnimationDataProvider(\n viewport: ScreenViewport | undefined\n) {\n const supportsAnalysisAnimation = useSupportsAnalysisAnimation(viewport);\n const [\n analysisAnimationTimelineDataProvider,\n setAnalysisAnimationTimelineDataProvider,\n ] = React.useState<AnalysisAnimationTimelineDataProvider | undefined>();\n const isMountedRef = React.useRef(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n React.useEffect(() => {\n async function fetchNewDataProvider(vp: ScreenViewport) {\n let newProvider: AnalysisAnimationTimelineDataProvider | undefined =\n new AnalysisAnimationTimelineDataProvider(vp.view, vp);\n if (newProvider?.supportsTimelineAnimation) {\n const dataLoaded = await newProvider.loadTimelineData();\n if (!dataLoaded) newProvider = undefined;\n }\n isMountedRef.current &&\n setAnalysisAnimationTimelineDataProvider(newProvider);\n }\n if (supportsAnalysisAnimation && viewport)\n void fetchNewDataProvider(viewport);\n else\n isMountedRef.current &&\n setAnalysisAnimationTimelineDataProvider(undefined);\n }, [supportsAnalysisAnimation, viewport]);\n\n return analysisAnimationTimelineDataProvider;\n}\n"]}
@@ -10,25 +10,29 @@ import { ScheduleAnimationTimelineDataProvider } from "../timeline/ScheduleAnima
10
10
  /** @internal */
11
11
  // istanbul ignore next
12
12
  function useSupportsScheduleScript(viewport) {
13
- const [supportsScheduleScript, setSupportsScheduleScript] = React.useState(!!viewport?.view?.scheduleScript);
13
+ var _a;
14
+ const [supportsScheduleScript, setSupportsScheduleScript] = React.useState(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.view) === null || _a === void 0 ? void 0 : _a.scheduleScript));
14
15
  React.useEffect(() => {
15
- setSupportsScheduleScript(!!viewport?.view?.scheduleScript);
16
+ var _a;
17
+ setSupportsScheduleScript(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.view) === null || _a === void 0 ? void 0 : _a.scheduleScript));
16
18
  }, [viewport]);
17
19
  React.useEffect(() => {
18
20
  const handleViewChanged = (vp) => {
19
- const hasScheduleScript = !!vp?.view?.scheduleScript;
21
+ var _a;
22
+ const hasScheduleScript = !!((_a = vp === null || vp === void 0 ? void 0 : vp.view) === null || _a === void 0 ? void 0 : _a.scheduleScript);
20
23
  if (hasScheduleScript !== supportsScheduleScript)
21
24
  setSupportsScheduleScript(hasScheduleScript);
22
25
  };
23
- return viewport?.onChangeView.addListener(handleViewChanged);
26
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onChangeView.addListener(handleViewChanged);
24
27
  }, [supportsScheduleScript, viewport]);
25
28
  React.useEffect(() => {
26
29
  const handleDisplayStyleChange = (vp) => {
27
- const hasScheduleScript = !!vp?.view?.scheduleScript;
30
+ var _a;
31
+ const hasScheduleScript = !!((_a = vp === null || vp === void 0 ? void 0 : vp.view) === null || _a === void 0 ? void 0 : _a.scheduleScript);
28
32
  if (hasScheduleScript !== supportsScheduleScript)
29
33
  setSupportsScheduleScript(hasScheduleScript);
30
34
  };
31
- return viewport?.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
35
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
32
36
  }, [viewport, supportsScheduleScript]);
33
37
  return supportsScheduleScript;
34
38
  }
@@ -49,7 +53,7 @@ export function useScheduleAnimationDataProvider(viewport) {
49
53
  React.useEffect(() => {
50
54
  async function fetchNewDataProvider(vp) {
51
55
  let newProvider = new ScheduleAnimationTimelineDataProvider(vp.view, vp);
52
- if (newProvider?.supportsTimelineAnimation) {
56
+ if (newProvider === null || newProvider === void 0 ? void 0 : newProvider.supportsTimelineAnimation) {
53
57
  const dataLoaded = await newProvider.loadTimelineData();
54
58
  if (!dataLoaded)
55
59
  newProvider = undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useScheduleAnimationDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useScheduleAnimationDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAG9F,gBAAgB;AAChB,uBAAuB;AACvB,SAAS,yBAAyB,CAAC,QAA8B;IAC/D,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,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M,CACJ,qCAAqC,EACrC,wCAAwC,EACzC,GAAG,KAAK,CAAC,QAAQ,EAAqD,CAAC;IACxE,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEzC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;QAC5B,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/B,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,KAAK,UAAU,oBAAoB,CAAC,EAAkB;YACpD,IAAI,WAAW,GACb,IAAI,qCAAqC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzD,IAAI,WAAW,EAAE,yBAAyB,EAAE;gBAC1C,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAC;gBACxD,IAAI,CAAC,UAAU;oBAAE,WAAW,GAAG,SAAS,CAAC;aAC1C;YACD,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,sBAAsB,IAAI,QAAQ;YAAE,KAAK,oBAAoB,CAAC,QAAQ,CAAC,CAAC;;YAE1E,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC,OAAO,qCAAqC,CAAC;AAC/C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport { ScheduleAnimationTimelineDataProvider } from \"../timeline/ScheduleAnimationProvider\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsScheduleScript(viewport: Viewport | undefined) {\n const [supportsScheduleScript, setSupportsScheduleScript] = React.useState(\n !!viewport?.view?.scheduleScript\n );\n\n React.useEffect(() => {\n setSupportsScheduleScript(!!viewport?.view?.scheduleScript);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const hasScheduleScript = !!vp?.view?.scheduleScript;\n if (hasScheduleScript !== supportsScheduleScript)\n setSupportsScheduleScript(hasScheduleScript);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [supportsScheduleScript, viewport]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const hasScheduleScript = !!vp?.view?.scheduleScript;\n if (hasScheduleScript !== supportsScheduleScript)\n setSupportsScheduleScript(hasScheduleScript);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsScheduleScript]);\n return supportsScheduleScript;\n}\n\n/** Hook that returns either a ScheduleAnimationTimelineDataProvider or undefined based on if the supplied viewport contains schedule script.\n * @public\n **/\n// istanbul ignore next\nexport function useScheduleAnimationDataProvider(\n viewport: ScreenViewport | undefined\n) {\n const supportsScheduleScript = useSupportsScheduleScript(viewport);\n const [\n scheduleAnimationTimelineDataProvider,\n setScheduleAnimationTimelineDataProvider,\n ] = React.useState<ScheduleAnimationTimelineDataProvider | undefined>();\n const isMountedRef = React.useRef(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n React.useEffect(() => {\n async function fetchNewDataProvider(vp: ScreenViewport) {\n let newProvider: ScheduleAnimationTimelineDataProvider | undefined =\n new ScheduleAnimationTimelineDataProvider(vp.view, vp);\n if (newProvider?.supportsTimelineAnimation) {\n const dataLoaded = await newProvider.loadTimelineData();\n if (!dataLoaded) newProvider = undefined;\n }\n isMountedRef.current &&\n setScheduleAnimationTimelineDataProvider(newProvider);\n }\n if (supportsScheduleScript && viewport) void fetchNewDataProvider(viewport);\n else\n isMountedRef.current &&\n setScheduleAnimationTimelineDataProvider(undefined);\n }, [supportsScheduleScript, viewport]);\n\n return scheduleAnimationTimelineDataProvider;\n}\n"]}
1
+ {"version":3,"file":"useScheduleAnimationDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useScheduleAnimationDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAG9F,gBAAgB;AAChB,uBAAuB;AACvB,SAAS,yBAAyB,CAAC,QAA8B;;IAC/D,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,KAAK,CAAC,QAAQ,CACxE,CAAC,CAAC,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,0CAAE,cAAc,CAAA,CACjC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;;QACnB,yBAAyB,CAAC,CAAC,CAAC,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,0CAAE,cAAc,CAAA,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,iBAAiB,GAAG,CAAC,EAAY,EAAQ,EAAE;;YAC/C,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAA,MAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,IAAI,0CAAE,cAAc,CAAA,CAAC;YACrD,IAAI,iBAAiB,KAAK,sBAAsB;gBAC9C,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;QACjD,CAAC,CAAC;QACF,OAAO,QAAQ,aAAR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WAAW,GACb,IAAI,qCAAqC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzD,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,EAAE;gBAC1C,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAC;gBACxD,IAAI,CAAC,UAAU;oBAAE,WAAW,GAAG,SAAS,CAAC;aAC1C;YACD,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,sBAAsB,IAAI,QAAQ;YAAE,KAAK,oBAAoB,CAAC,QAAQ,CAAC,CAAC;;YAE1E,YAAY,CAAC,OAAO;gBAClB,wCAAwC,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC,OAAO,qCAAqC,CAAC;AAC/C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport { ScheduleAnimationTimelineDataProvider } from \"../timeline/ScheduleAnimationProvider\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsScheduleScript(viewport: Viewport | undefined) {\n const [supportsScheduleScript, setSupportsScheduleScript] = React.useState(\n !!viewport?.view?.scheduleScript\n );\n\n React.useEffect(() => {\n setSupportsScheduleScript(!!viewport?.view?.scheduleScript);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const hasScheduleScript = !!vp?.view?.scheduleScript;\n if (hasScheduleScript !== supportsScheduleScript)\n setSupportsScheduleScript(hasScheduleScript);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [supportsScheduleScript, viewport]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const hasScheduleScript = !!vp?.view?.scheduleScript;\n if (hasScheduleScript !== supportsScheduleScript)\n setSupportsScheduleScript(hasScheduleScript);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsScheduleScript]);\n return supportsScheduleScript;\n}\n\n/** Hook that returns either a ScheduleAnimationTimelineDataProvider or undefined based on if the supplied viewport contains schedule script.\n * @public\n **/\n// istanbul ignore next\nexport function useScheduleAnimationDataProvider(\n viewport: ScreenViewport | undefined\n) {\n const supportsScheduleScript = useSupportsScheduleScript(viewport);\n const [\n scheduleAnimationTimelineDataProvider,\n setScheduleAnimationTimelineDataProvider,\n ] = React.useState<ScheduleAnimationTimelineDataProvider | undefined>();\n const isMountedRef = React.useRef(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n React.useEffect(() => {\n async function fetchNewDataProvider(vp: ScreenViewport) {\n let newProvider: ScheduleAnimationTimelineDataProvider | undefined =\n new ScheduleAnimationTimelineDataProvider(vp.view, vp);\n if (newProvider?.supportsTimelineAnimation) {\n const dataLoaded = await newProvider.loadTimelineData();\n if (!dataLoaded) newProvider = undefined;\n }\n isMountedRef.current &&\n setScheduleAnimationTimelineDataProvider(newProvider);\n }\n if (supportsScheduleScript && viewport) void fetchNewDataProvider(viewport);\n else\n isMountedRef.current &&\n setScheduleAnimationTimelineDataProvider(undefined);\n }, [supportsScheduleScript, viewport]);\n\n return scheduleAnimationTimelineDataProvider;\n}\n"]}
@@ -11,36 +11,41 @@ import { SolarTimelineDataProvider } from "../timeline/SolarTimelineDataProvider
11
11
  /** @internal */
12
12
  // istanbul ignore next
13
13
  function useSupportsShadowDisplay(viewport) {
14
- const [supportsShadows, setSupportsShadows] = React.useState(!!viewport?.displayStyle?.wantShadows &&
14
+ var _a;
15
+ const [supportsShadows, setSupportsShadows] = React.useState(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.displayStyle) === null || _a === void 0 ? void 0 : _a.wantShadows) &&
15
16
  !!IModelApp.renderSystem.options.displaySolarShadows);
16
17
  React.useEffect(() => {
17
- setSupportsShadows(!!viewport?.displayStyle?.wantShadows &&
18
+ var _a;
19
+ setSupportsShadows(!!((_a = viewport === null || viewport === void 0 ? void 0 : viewport.displayStyle) === null || _a === void 0 ? void 0 : _a.wantShadows) &&
18
20
  !!IModelApp.renderSystem.options.displaySolarShadows);
19
21
  }, [viewport]);
20
22
  React.useEffect(() => {
21
23
  const handleViewChanged = (vp) => {
22
- setSupportsShadows(!!vp?.displayStyle?.wantShadows &&
24
+ var _a;
25
+ setSupportsShadows(!!((_a = vp === null || vp === void 0 ? void 0 : vp.displayStyle) === null || _a === void 0 ? void 0 : _a.wantShadows) &&
23
26
  !!IModelApp.renderSystem.options.displaySolarShadows);
24
27
  };
25
- return viewport?.onChangeView.addListener(handleViewChanged);
28
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onChangeView.addListener(handleViewChanged);
26
29
  }, [viewport]);
27
30
  React.useEffect(() => {
28
31
  const handleViewChanged = (vp) => {
29
- const wantShadows = !!vp.displayStyle?.wantShadows &&
32
+ var _a;
33
+ const wantShadows = !!((_a = vp.displayStyle) === null || _a === void 0 ? void 0 : _a.wantShadows) &&
30
34
  !!IModelApp.renderSystem.options.displaySolarShadows;
31
35
  if (wantShadows !== supportsShadows)
32
36
  setSupportsShadows(wantShadows);
33
37
  };
34
- return viewport?.onChangeView.addListener(handleViewChanged);
38
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onChangeView.addListener(handleViewChanged);
35
39
  }, [viewport, supportsShadows]);
36
40
  React.useEffect(() => {
37
41
  const handleDisplayStyleChange = (vp) => {
38
- const wantShadows = !!vp.displayStyle?.wantShadows &&
42
+ var _a;
43
+ const wantShadows = !!((_a = vp.displayStyle) === null || _a === void 0 ? void 0 : _a.wantShadows) &&
39
44
  !!IModelApp.renderSystem.options.displaySolarShadows;
40
45
  if (wantShadows !== supportsShadows)
41
46
  setSupportsShadows(wantShadows);
42
47
  };
43
- return viewport?.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
48
+ return viewport === null || viewport === void 0 ? void 0 : viewport.onDisplayStyleChanged.addListener(handleDisplayStyleChange);
44
49
  }, [viewport, supportsShadows]);
45
50
  return supportsShadows;
46
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useSolarDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useSolarDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,gBAAgB;AAChB,uBAAuB;AACvB,SAAS,wBAAwB,CAAC,QAAoC;IACpE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC1D,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW;QACnC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CACvD,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,kBAAkB,CAChB,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW;YACnC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CACvD,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,iBAAiB,GAAG,CAAC,EAAY,EAAQ,EAAE;YAC/C,kBAAkB,CAChB,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,WAAW;gBAC7B,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,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AC;IACjE,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;QACpE,OAAO,qBAAqB,IAAI,QAAQ;YACtC,CAAC,CAAC,IAAI,yBAAyB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;YACxD,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,oBAAoB,GACxB,qBAAqB,IAAI,QAAQ;YAC/B,CAAC,CAAC,IAAI,yBAAyB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;YACxD,CAAC,CAAC,SAAS,CAAC;QAChB,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtC,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport type { SolarDataProvider } from \"@itwin/imodel-components-react\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { SolarTimelineDataProvider } from \"../timeline/SolarTimelineDataProvider\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsShadowDisplay(viewport: ScreenViewport | undefined) {\n const [supportsShadows, setSupportsShadows] = React.useState(\n !!viewport?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n\n React.useEffect(() => {\n setSupportsShadows(\n !!viewport?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n setSupportsShadows(\n !!vp?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const wantShadows =\n !!vp.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows;\n if (wantShadows !== supportsShadows) setSupportsShadows(wantShadows);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [viewport, supportsShadows]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const wantShadows =\n !!vp.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows;\n if (wantShadows !== supportsShadows) setSupportsShadows(wantShadows);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsShadows]);\n\n return supportsShadows;\n}\n\n/** Hook that returns either a SolarTimelineDataProvider or undefined based on if the supplied viewport's display style is set to display shadows.\n * @beta\n **/\n// istanbul ignore next\nexport function useSolarDataProvider(\n viewport: ScreenViewport | undefined\n): SolarDataProvider | undefined {\n const supportsShadowDisplay = useSupportsShadowDisplay(viewport);\n const [solarDataProvider, setSolarDataProvider] = React.useState(() => {\n return supportsShadowDisplay && viewport\n ? new SolarTimelineDataProvider(viewport.view, viewport)\n : undefined;\n });\n\n React.useEffect(() => {\n const newSolarDataProvider =\n supportsShadowDisplay && viewport\n ? new SolarTimelineDataProvider(viewport.view, viewport)\n : undefined;\n setSolarDataProvider(newSolarDataProvider);\n }, [supportsShadowDisplay, viewport]);\n\n return solarDataProvider;\n}\n"]}
1
+ {"version":3,"file":"useSolarDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useSolarDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,E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AAE,QAAQ,CAAC;YACxD,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,oBAAoB,GACxB,qBAAqB,IAAI,QAAQ;YAC/B,CAAC,CAAC,IAAI,yBAAyB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;YACxD,CAAC,CAAC,SAAS,CAAC;QAChB,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtC,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport * as React from \"react\";\nimport type { SolarDataProvider } from \"@itwin/imodel-components-react\";\nimport type { ScreenViewport, Viewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { SolarTimelineDataProvider } from \"../timeline/SolarTimelineDataProvider\";\n\n/** @internal */\n// istanbul ignore next\nfunction useSupportsShadowDisplay(viewport: ScreenViewport | undefined) {\n const [supportsShadows, setSupportsShadows] = React.useState(\n !!viewport?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n\n React.useEffect(() => {\n setSupportsShadows(\n !!viewport?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n setSupportsShadows(\n !!vp?.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows\n );\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [viewport]);\n\n React.useEffect(() => {\n const handleViewChanged = (vp: Viewport): void => {\n const wantShadows =\n !!vp.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows;\n if (wantShadows !== supportsShadows) setSupportsShadows(wantShadows);\n };\n return viewport?.onChangeView.addListener(handleViewChanged);\n }, [viewport, supportsShadows]);\n\n React.useEffect(() => {\n const handleDisplayStyleChange = (vp: Viewport): void => {\n const wantShadows =\n !!vp.displayStyle?.wantShadows &&\n !!IModelApp.renderSystem.options.displaySolarShadows;\n if (wantShadows !== supportsShadows) setSupportsShadows(wantShadows);\n };\n return viewport?.onDisplayStyleChanged.addListener(\n handleDisplayStyleChange\n );\n }, [viewport, supportsShadows]);\n\n return supportsShadows;\n}\n\n/** Hook that returns either a SolarTimelineDataProvider or undefined based on if the supplied viewport's display style is set to display shadows.\n * @beta\n **/\n// istanbul ignore next\nexport function useSolarDataProvider(\n viewport: ScreenViewport | undefined\n): SolarDataProvider | undefined {\n const supportsShadowDisplay = useSupportsShadowDisplay(viewport);\n const [solarDataProvider, setSolarDataProvider] = React.useState(() => {\n return supportsShadowDisplay && viewport\n ? new SolarTimelineDataProvider(viewport.view, viewport)\n : undefined;\n });\n\n React.useEffect(() => {\n const newSolarDataProvider =\n supportsShadowDisplay && viewport\n ? new SolarTimelineDataProvider(viewport.view, viewport)\n : undefined;\n setSolarDataProvider(newSolarDataProvider);\n }, [supportsShadowDisplay, viewport]);\n\n return solarDataProvider;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/keyboardshortcut/InternalKeyboardShortcut.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAK5B;;GAEG;AACH,qBAAa,+BAA+B;IAC1C,OAAO,CAAC,MAAM,CAAC,UAAU,CACS;IAElC;;OAEG;WACW,UAAU,IAAI,IAAI;IAMhC,qDAAqD;WACvC,aAAa,CAAC,YAAY,EAAE,qBAAqB,EAAE;IAMjE,sDAAsD;WACxC,YAAY,CAAC,aAAa,EAAE,qBAAqB;IAK/D,qEAAqE;WACvD,UAAU,CACtB,WAAW,EAAE,MAAM,EACnB,eAAe,GAAE,OAAe,EAChC,gBAAgB,GAAE,OAAe,EACjC,iBAAiB,GAAE,OAAe,GACjC,OAAO;IAiBV,qDAAqD;IACrD,WAAkB,iBAAiB,IAAI,yBAAyB,CAE/D;IAED,yDAAyD;WAC3C,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI1E,yCAAyC;IACzC,WAAkB,aAAa,IAAI,OAAO,CAGzC;IAED,yBAAyB;WACX,cAAc,IAAI,IAAI;IAQpC,yDAAyD;WAC3C,WAAW,IAAI,IAAI;IAMjC,yCAAyC;WAC3B,SAAS,IAAI,IAAI;IAS/B,gEAAgE;IAChE,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,gEAAgE;IAChE,WAAkB,OAAO,IAAI,MAAM,CAElC;IAED,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAqB/B;IAEF,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAgB/B;CACH"}
1
+ {"version":3,"file":"InternalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/keyboardshortcut/InternalKeyboardShortcut.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAM5B;;GAEG;AACH,qBAAa,+BAA+B;IAC1C,OAAO,CAAC,MAAM,CAAC,UAAU,CACS;IAElC;;OAEG;WACW,UAAU,IAAI,IAAI;IAMhC,qDAAqD;WACvC,aAAa,CAAC,YAAY,EAAE,qBAAqB,EAAE;IAMjE,sDAAsD;WACxC,YAAY,CAAC,aAAa,EAAE,qBAAqB;IAK/D,qEAAqE;WACvD,UAAU,CACtB,WAAW,EAAE,MAAM,EACnB,eAAe,GAAE,OAAe,EAChC,gBAAgB,GAAE,OAAe,EACjC,iBAAiB,GAAE,OAAe,GACjC,OAAO;IAiBV,qDAAqD;IACrD,WAAkB,iBAAiB,IAAI,yBAAyB,CAE/D;IAED,yDAAyD;WAC3C,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI1E,yCAAyC;IACzC,WAAkB,aAAa,IAAI,OAAO,CAGzC;IAED,yBAAyB;WACX,cAAc,IAAI,IAAI;IAQpC,yDAAyD;WAC3C,WAAW,IAAI,IAAI;IAMjC,yCAAyC;WAC3B,SAAS,IAAI,IAAI;IAS/B,gEAAgE;IAChE,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,gEAAgE;IAChE,WAAkB,OAAO,IAAI,MAAM,CAElC;IAED,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAqB/B;IAEF,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAgB/B;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalKeyboardShortcut.js","sourceRoot":"","sources":["../../../../src/appui-react/keyboardshortcut/InternalKeyboardShortcut.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAIxE;;GAEG;AACH,MAAa,+BAA+B;IAI1C;;OAEG;IACI,MAAM,CAAC,UAAU;QACtB,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAC7C,+BAA+B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C,UAAU,CAAC,CAAC;QAC1C,IAAI,QAAQ,CAAC,QAAQ,YAAY,uBAAuB;YACtD,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,+BAA+B,CAAC,kBAAkB,CAChD,+BAA+B,CAAC,UAAU,CAAC,6BAA6B,EAAE,EAC1E,gBAAgB,CACjB,CAAC;AACJ,CAAC,CAAC;AAEa,kDAAkB,GAAG,CAClC,SAA6B,EAC7B,QAAwB,EACxB,EAAE;IACF,SAAS,CAAC,OAAO,CAAC,CAAC,QAA0B,EAAE,EAAE;QAC/C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEnB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,6BAA6B,EAAE,EAAE;YAC9D,MAAM,cAAc,GAClB,QAAQ,CAAC,iBAAiB,CAAC,6BAA6B,EAAE,CAAC;YAC7D,+BAA+B,CAAC,kBAAkB,CAChD,cAAc,EACd,QAAQ,CACT,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;SA3IS,+BAA+B","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 KeyboardShortcut\n */\n\nimport type { UiSyncEventArgs } from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport type { KeyboardShortcutProps } from \"../framework/FrameworkKeyboardShortcuts\";\nimport { KeyboardShortcutMenu } from \"./KeyboardShortcutMenu\";\nimport {\n KeyboardShortcut,\n KeyboardShortcutContainer,\n} from \"./KeyboardShortcut\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\ntype OnShortcutFunc = (shortcut: KeyboardShortcut) => void;\n\n/** Keyboard Shortcut Manager\n * @internal\n */\nexport class InternalKeyboardShortcutManager {\n private static _shortcuts: KeyboardShortcutContainer =\n new KeyboardShortcutContainer();\n\n /** Initialize the Keyboard Shortcut manager\n * @internal\n */\n public static initialize(): void {\n SyncUiEventDispatcher.onSyncUiEvent.addListener(\n InternalKeyboardShortcutManager._handleSyncUiEvent\n );\n }\n\n /** Loads Keyboard Shortcuts into the managed list */\n public static loadShortcuts(shortcutList: KeyboardShortcutProps[]) {\n shortcutList.forEach((shortcutProps: KeyboardShortcutProps) => {\n this.loadShortcut(shortcutProps);\n });\n }\n\n /** Loads a Keyboard Shortcut into the managed list */\n public static loadShortcut(shortcutProps: KeyboardShortcutProps) {\n const shortcut = new KeyboardShortcut(shortcutProps);\n this._shortcuts.registerKey(shortcut.keyMapKey, shortcut);\n }\n\n /** Processes a keystroke and invokes a matching Keyboard Shortcut */\n public static processKey(\n keyboardKey: string,\n isAltKeyPressed: boolean = false,\n isCtrlKeyPressed: boolean = false,\n isShiftKeyPressed: boolean = false\n ): boolean {\n const keyMapKey = KeyboardShortcutContainer.generateKeyMapKey(\n keyboardKey,\n isAltKeyPressed,\n isCtrlKeyPressed,\n isShiftKeyPressed\n );\n\n const shortcut = this.getShortcut(keyMapKey);\n if (shortcut) {\n shortcut.itemPicked();\n return true;\n }\n\n return false;\n }\n\n /** Returns the managed list of Keyboard Shortcuts */\n public static get shortcutContainer(): KeyboardShortcutContainer {\n return this._shortcuts;\n }\n\n /** Returns a Keyboard Shortcut from the managed lists */\n public static getShortcut(keyMapKey: string): KeyboardShortcut | undefined {\n return this._shortcuts.findKey(keyMapKey);\n }\n\n /** Determines if focus is set to Home */\n public static get isFocusOnHome(): boolean {\n const element = document.activeElement as HTMLElement;\n return element && element === document.body;\n }\n\n /** Sets focus to Home */\n public static setFocusToHome(): void {\n const element = document.activeElement as HTMLElement;\n if (element && element !== document.body) {\n element.blur();\n document.body.focus();\n }\n }\n\n /** Displays the Keyboard Shortcuts menu at the cursor */\n public static displayMenu(): void {\n if (this._shortcuts.areKeyboardShortcutsAvailable()) {\n this._shortcuts.showShortcutsMenu();\n }\n }\n\n /** Closes the Keyboard Shortcuts menu */\n public static closeMenu(): void {\n KeyboardShortcutMenu.onKeyboardShortcutMenuEvent.emit({\n menuVisible: false,\n menuX: 0,\n menuY: 0,\n shortcuts: undefined,\n });\n }\n\n /** Returns the cursor X position, which is mouseEvent.pageX. */\n public static get cursorX(): number {\n return CursorInformation.cursorX;\n }\n /** Returns the cursor Y position, which is mouseEvent.pageY. */\n public static get cursorY(): number {\n return CursorInformation.cursorY;\n }\n\n private static _handleSyncUiEvent = (args: UiSyncEventArgs) => {\n const updateBooleanValue = (booleanValue: ConditionalBooleanValue) => {\n if (\n SyncUiEventDispatcher.hasEventOfInterest(\n args.eventIds,\n booleanValue.syncEventIds\n )\n )\n booleanValue.refresh();\n };\n const handleForSyncIds = (shortcut: KeyboardShortcut) => {\n if (shortcut.isDisabled instanceof ConditionalBooleanValue)\n updateBooleanValue(shortcut.isDisabled);\n if (shortcut.isHidden instanceof ConditionalBooleanValue)\n updateBooleanValue(shortcut.isHidden);\n };\n\n InternalKeyboardShortcutManager._traverseShortcuts(\n InternalKeyboardShortcutManager._shortcuts.getAvailableKeyboardShortcuts(),\n handleForSyncIds\n );\n };\n\n private static _traverseShortcuts = (\n shortcuts: KeyboardShortcut[],\n callback: OnShortcutFunc\n ) => {\n shortcuts.forEach((shortcut: KeyboardShortcut) => {\n callback(shortcut);\n\n if (shortcut.shortcutContainer.areKeyboardShortcutsAvailable()) {\n const childShortcuts =\n shortcut.shortcutContainer.getAvailableKeyboardShortcuts();\n InternalKeyboardShortcutManager._traverseShortcuts(\n childShortcuts,\n callback\n );\n }\n });\n };\n}\n"]}
1
+ {"version":3,"file":"InternalKeyboardShortcut.js","sourceRoot":"","sources":["../../../../src/appui-react/keyboardshortcut/InternalKeyboardShortcut.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBA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,kDAAkB,GAAG,CAAC,IAAqB,EAAE,EAAE;IAC5D,MAAM,kBAAkB,GAAG,CAAC,YAAqC,EAAE,EAAE;QACnE,IACE,qBAAqB,CAAC,kBAAkB,CACtC,IAAI,CAAC,QAAQ,EACb,YAAY,CAAC,YAAY,CAC1B;YAED,YAAY,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CAAC,QAA0B,EAAE,EAAE;QACtD,IAAI,QAAQ,CAAC,UAAU,YAAY,uBAAuB;YACxD,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,QAAQ,CAAC,QAAQ,YAAY,uBAAuB;YACtD,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,+BAA+B,CAAC,kBAAkB,CAChD,+BAA+B,CAAC,UAAU,CAAC,6BAA6B,EAAE,EAC1E,gBAAgB,CACjB,CAAC;AACJ,CAAC,CAAC;AAEa,kDAAkB,GAAG,CAClC,SAA6B,EAC7B,QAAwB,EACxB,EAAE;IACF,SAAS,CAAC,OAAO,CAAC,CAAC,QAA0B,EAAE,EAAE;QAC/C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEnB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,6BAA6B,EAAE,EAAE;YAC9D,MAAM,cAAc,GAClB,QAAQ,CAAC,iBAAiB,CAAC,6BAA6B,EAAE,CAAC;YAC7D,+BAA+B,CAAC,kBAAkB,CAChD,cAAc,EACd,QAAQ,CACT,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;SA3IS,+BAA+B","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 KeyboardShortcut\n */\n\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport type { KeyboardShortcutProps } from \"../framework/FrameworkKeyboardShortcuts\";\nimport { KeyboardShortcutMenu } from \"./KeyboardShortcutMenu\";\nimport {\n KeyboardShortcut,\n KeyboardShortcutContainer,\n} from \"./KeyboardShortcut\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent\";\n\ntype OnShortcutFunc = (shortcut: KeyboardShortcut) => void;\n\n/** Keyboard Shortcut Manager\n * @internal\n */\nexport class InternalKeyboardShortcutManager {\n private static _shortcuts: KeyboardShortcutContainer =\n new KeyboardShortcutContainer();\n\n /** Initialize the Keyboard Shortcut manager\n * @internal\n */\n public static initialize(): void {\n SyncUiEventDispatcher.onSyncUiEvent.addListener(\n InternalKeyboardShortcutManager._handleSyncUiEvent\n );\n }\n\n /** Loads Keyboard Shortcuts into the managed list */\n public static loadShortcuts(shortcutList: KeyboardShortcutProps[]) {\n shortcutList.forEach((shortcutProps: KeyboardShortcutProps) => {\n this.loadShortcut(shortcutProps);\n });\n }\n\n /** Loads a Keyboard Shortcut into the managed list */\n public static loadShortcut(shortcutProps: KeyboardShortcutProps) {\n const shortcut = new KeyboardShortcut(shortcutProps);\n this._shortcuts.registerKey(shortcut.keyMapKey, shortcut);\n }\n\n /** Processes a keystroke and invokes a matching Keyboard Shortcut */\n public static processKey(\n keyboardKey: string,\n isAltKeyPressed: boolean = false,\n isCtrlKeyPressed: boolean = false,\n isShiftKeyPressed: boolean = false\n ): boolean {\n const keyMapKey = KeyboardShortcutContainer.generateKeyMapKey(\n keyboardKey,\n isAltKeyPressed,\n isCtrlKeyPressed,\n isShiftKeyPressed\n );\n\n const shortcut = this.getShortcut(keyMapKey);\n if (shortcut) {\n shortcut.itemPicked();\n return true;\n }\n\n return false;\n }\n\n /** Returns the managed list of Keyboard Shortcuts */\n public static get shortcutContainer(): KeyboardShortcutContainer {\n return this._shortcuts;\n }\n\n /** Returns a Keyboard Shortcut from the managed lists */\n public static getShortcut(keyMapKey: string): KeyboardShortcut | undefined {\n return this._shortcuts.findKey(keyMapKey);\n }\n\n /** Determines if focus is set to Home */\n public static get isFocusOnHome(): boolean {\n const element = document.activeElement as HTMLElement;\n return element && element === document.body;\n }\n\n /** Sets focus to Home */\n public static setFocusToHome(): void {\n const element = document.activeElement as HTMLElement;\n if (element && element !== document.body) {\n element.blur();\n document.body.focus();\n }\n }\n\n /** Displays the Keyboard Shortcuts menu at the cursor */\n public static displayMenu(): void {\n if (this._shortcuts.areKeyboardShortcutsAvailable()) {\n this._shortcuts.showShortcutsMenu();\n }\n }\n\n /** Closes the Keyboard Shortcuts menu */\n public static closeMenu(): void {\n KeyboardShortcutMenu.onKeyboardShortcutMenuEvent.emit({\n menuVisible: false,\n menuX: 0,\n menuY: 0,\n shortcuts: undefined,\n });\n }\n\n /** Returns the cursor X position, which is mouseEvent.pageX. */\n public static get cursorX(): number {\n return CursorInformation.cursorX;\n }\n /** Returns the cursor Y position, which is mouseEvent.pageY. */\n public static get cursorY(): number {\n return CursorInformation.cursorY;\n }\n\n private static _handleSyncUiEvent = (args: UiSyncEventArgs) => {\n const updateBooleanValue = (booleanValue: ConditionalBooleanValue) => {\n if (\n SyncUiEventDispatcher.hasEventOfInterest(\n args.eventIds,\n booleanValue.syncEventIds\n )\n )\n booleanValue.refresh();\n };\n const handleForSyncIds = (shortcut: KeyboardShortcut) => {\n if (shortcut.isDisabled instanceof ConditionalBooleanValue)\n updateBooleanValue(shortcut.isDisabled);\n if (shortcut.isHidden instanceof ConditionalBooleanValue)\n updateBooleanValue(shortcut.isHidden);\n };\n\n InternalKeyboardShortcutManager._traverseShortcuts(\n InternalKeyboardShortcutManager._shortcuts.getAvailableKeyboardShortcuts(),\n handleForSyncIds\n );\n };\n\n private static _traverseShortcuts = (\n shortcuts: KeyboardShortcut[],\n callback: OnShortcutFunc\n ) => {\n shortcuts.forEach((shortcut: KeyboardShortcut) => {\n callback(shortcut);\n\n if (shortcut.shortcutContainer.areKeyboardShortcutsAvailable()) {\n const childShortcuts =\n shortcut.shortcutContainer.getAvailableKeyboardShortcuts();\n InternalKeyboardShortcutManager._traverseShortcuts(\n childShortcuts,\n callback\n );\n }\n });\n };\n}\n"]}
@@ -21,18 +21,19 @@ function useActivityMessage({ activityMessageInfo, dismissActivityMessage, cance
21
21
  toaster.setSettings({ placement: "bottom" });
22
22
  }, []);
23
23
  React.useEffect(() => {
24
- if (activityMessageInfo?.restored) {
24
+ var _a, _b;
25
+ if (activityMessageInfo === null || activityMessageInfo === void 0 ? void 0 : activityMessageInfo.restored) {
25
26
  recentToast.current = toaster.informational(React.createElement(ActivityMessageContent, { initialActivityMessageInfo: activityMessageInfo }), {
26
27
  onRemove: dismissActivityMessage,
27
28
  type: "persisting",
28
- link: activityMessageInfo?.details?.supportsCancellation &&
29
+ link: ((_a = activityMessageInfo === null || activityMessageInfo === void 0 ? void 0 : activityMessageInfo.details) === null || _a === void 0 ? void 0 : _a.supportsCancellation) &&
29
30
  cancelActivityMessage
30
31
  ? { title: cancelLabel, onClick: cancelActivityMessage }
31
32
  : undefined,
32
33
  });
33
34
  }
34
35
  if (!activityMessageInfo) {
35
- recentToast.current?.close();
36
+ (_b = recentToast.current) === null || _b === void 0 ? void 0 : _b.close();
36
37
  }
37
38
  }, [
38
39
  activityMessageInfo,
@@ -68,6 +69,7 @@ export function ActivityMessageRenderer() {
68
69
  * @internal
69
70
  */
70
71
  function ActivityMessageContent({ initialActivityMessageInfo, }) {
72
+ var _a, _b;
71
73
  const [percentCompleteLabel] = React.useState(UiFramework.translate("activityCenter.percentComplete"));
72
74
  const [activityMessageInfo, setActivityMessageInfo] = React.useState(initialActivityMessageInfo);
73
75
  React.useEffect(() => {
@@ -80,7 +82,7 @@ function ActivityMessageContent({ initialActivityMessageInfo, }) {
80
82
  activityMessageInfo.message && (React.createElement(Text, null,
81
83
  React.createElement(React.Fragment, null, activityMessageInfo.message.reactNode ||
82
84
  activityMessageInfo.message))),
83
- !!activityMessageInfo.details?.showPercentInMessage && (React.createElement(Text, { variant: "small" }, `${activityMessageInfo.percentage} ${percentCompleteLabel}`)),
84
- activityMessageInfo.details?.showProgressBar && (React.createElement(ProgressLinear, { value: activityMessageInfo?.percentage }))));
85
+ !!((_a = activityMessageInfo.details) === null || _a === void 0 ? void 0 : _a.showPercentInMessage) && (React.createElement(Text, { variant: "small" }, `${activityMessageInfo.percentage} ${percentCompleteLabel}`)),
86
+ ((_b = activityMessageInfo.details) === null || _b === void 0 ? void 0 : _b.showProgressBar) && (React.createElement(ProgressLinear, { value: activityMessageInfo === null || activityMessageInfo === void 0 ? void 0 : activityMessageInfo.percentage }))));
85
87
  }
86
88
  //# sourceMappingURL=ActivityMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityMessage.js","sourceRoot":"","sources":["../../../../src/appui-react/messages/ActivityMessage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQ5D;;;GAGG;AACH,SAAS,kBAAkB,CAAC,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACG;IACxB,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;IACxE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAqC,CAAC;IACtE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,WAAW,CAAC,EAAE,SAA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CACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport * as React from \"react\";\nimport type { ReactMessage } from \"@itwin/core-react\";\nimport { UiCore } from \"@itwin/core-react\";\nimport { ProgressLinear, Text, toaster } from \"@itwin/itwinui-react\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ActivityMessageEventArgs } from \"../messages/MessageManager\";\nimport { MessageManager } from \"../messages/MessageManager\";\n\ninterface UseActivityMessageProps {\n cancelActivityMessage?: () => void;\n dismissActivityMessage?: () => void;\n activityMessageInfo?: ActivityMessageEventArgs;\n}\n\n/**\n * Hook to render an Activity message.\n * @internal\n */\nfunction useActivityMessage({\n activityMessageInfo,\n dismissActivityMessage,\n cancelActivityMessage,\n}: UseActivityMessageProps) {\n const [cancelLabel] = React.useState(UiCore.translate(\"dialog.cancel\"));\n const recentToast = React.useRef<{ close: () => void } | undefined>();\n React.useEffect(() => {\n toaster.setSettings({ placement: \"bottom\" });\n }, []);\n\n React.useEffect(() => {\n if (activityMessageInfo?.restored) {\n recentToast.current = toaster.informational(\n <ActivityMessageContent\n initialActivityMessageInfo={activityMessageInfo}\n />,\n {\n onRemove: dismissActivityMessage,\n type: \"persisting\",\n link:\n activityMessageInfo?.details?.supportsCancellation &&\n cancelActivityMessage\n ? { title: cancelLabel, onClick: cancelActivityMessage }\n : undefined,\n }\n );\n }\n if (!activityMessageInfo) {\n recentToast.current?.close();\n }\n }, [\n activityMessageInfo,\n cancelActivityMessage,\n cancelLabel,\n dismissActivityMessage,\n ]);\n}\n\n/**\n * Component wrapping the `useActivityMessage` hook to use in class components.\n * @internal\n */\nexport function ActivityMessageRenderer() {\n const [activityMessageInfo, setActivityMessageInfo] = React.useState<\n ActivityMessageEventArgs | undefined\n >();\n React.useEffect(() => {\n return MessageManager.onActivityMessageUpdatedEvent.addListener((args) => {\n setActivityMessageInfo(args);\n });\n }, []);\n\n React.useEffect(() => {\n return MessageManager.onActivityMessageCancelledEvent.addListener(() => {\n setActivityMessageInfo(undefined);\n });\n }, []);\n\n const cancelActivityMessage = React.useCallback(() => {\n MessageManager.endActivityMessage(false);\n }, []);\n\n useActivityMessage({ activityMessageInfo, cancelActivityMessage });\n return <></>;\n}\n\n/**\n * Component used to show and update activity message content.\n * @internal\n */\nfunction ActivityMessageContent({\n initialActivityMessageInfo,\n}: {\n initialActivityMessageInfo: ActivityMessageEventArgs;\n}) {\n const [percentCompleteLabel] = React.useState(\n UiFramework.translate(\"activityCenter.percentComplete\")\n );\n const [activityMessageInfo, setActivityMessageInfo] = React.useState(\n initialActivityMessageInfo\n );\n\n React.useEffect(() => {\n const handleActivityMessageUpdatedEvent = (\n args: ActivityMessageEventArgs\n ) => {\n setActivityMessageInfo(args);\n };\n\n return MessageManager.onActivityMessageUpdatedEvent.addListener(\n handleActivityMessageUpdatedEvent\n );\n }, []);\n\n return (\n <>\n {activityMessageInfo.message && (\n <Text>\n <>\n {(activityMessageInfo.message as ReactMessage).reactNode ||\n activityMessageInfo.message}\n </>\n </Text>\n )}\n {!!activityMessageInfo.details?.showPercentInMessage && (\n <Text variant=\"small\">{`${activityMessageInfo.percentage} ${percentCompleteLabel}`}</Text>\n )}\n {activityMessageInfo.details?.showProgressBar && (\n <ProgressLinear value={activityMessageInfo?.percentage} />\n )}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"ActivityMessage.js","sourceRoot":"","sources":["../../../../src/appui-react/messages/ActivityMessage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACr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BAA6B,CAAC,WAAW,CAC7D,iCAAiC,CAClC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL;QACG,mBAAmB,CAAC,OAAO,IAAI,CAC9B,oBAAC,IAAI;YACH,0CACI,mBAAmB,CAAC,OAAwB,CAAC,SAAS;gBACtD,mBAAmB,CAAC,OAAO,CAC5B,CACE,CACR;QACA,CAAC,CAAC,CAAA,MAAA,mBAAmB,CAAC,OAAO,0CAAE,oBAAoB,CAAA,IAAI,CACtD,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,IAAE,GAAG,mBAAmB,CAAC,UAAU,IAAI,oBAAoB,EAAE,CAAQ,CAC3F;QACA,CAAA,MAAA,mBAAmB,CAAC,OAAO,0CAAE,eAAe,KAAI,CAC/C,oBAAC,cAAc,IAAC,KAAK,EAAE,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,UAAU,GAAI,CAC3D,CACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport * as React from \"react\";\nimport type { ReactMessage } from \"@itwin/core-react\";\nimport { UiCore } from \"@itwin/core-react\";\nimport { ProgressLinear, Text, toaster } from \"@itwin/itwinui-react\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ActivityMessageEventArgs } from \"../messages/MessageManager\";\nimport { MessageManager } from \"../messages/MessageManager\";\n\ninterface UseActivityMessageProps {\n cancelActivityMessage?: () => void;\n dismissActivityMessage?: () => void;\n activityMessageInfo?: ActivityMessageEventArgs;\n}\n\n/**\n * Hook to render an Activity message.\n * @internal\n */\nfunction useActivityMessage({\n activityMessageInfo,\n dismissActivityMessage,\n cancelActivityMessage,\n}: UseActivityMessageProps) {\n const [cancelLabel] = React.useState(UiCore.translate(\"dialog.cancel\"));\n const recentToast = React.useRef<{ close: () => void } | undefined>();\n React.useEffect(() => {\n toaster.setSettings({ placement: \"bottom\" });\n }, []);\n\n React.useEffect(() => {\n if (activityMessageInfo?.restored) {\n recentToast.current = toaster.informational(\n <ActivityMessageContent\n initialActivityMessageInfo={activityMessageInfo}\n />,\n {\n onRemove: dismissActivityMessage,\n type: \"persisting\",\n link:\n activityMessageInfo?.details?.supportsCancellation &&\n cancelActivityMessage\n ? { title: cancelLabel, onClick: cancelActivityMessage }\n : undefined,\n }\n );\n }\n if (!activityMessageInfo) {\n recentToast.current?.close();\n }\n }, [\n activityMessageInfo,\n cancelActivityMessage,\n cancelLabel,\n dismissActivityMessage,\n ]);\n}\n\n/**\n * Component wrapping the `useActivityMessage` hook to use in class components.\n * @internal\n */\nexport function ActivityMessageRenderer() {\n const [activityMessageInfo, setActivityMessageInfo] = React.useState<\n ActivityMessageEventArgs | undefined\n >();\n React.useEffect(() => {\n return MessageManager.onActivityMessageUpdatedEvent.addListener((args) => {\n setActivityMessageInfo(args);\n });\n }, []);\n\n React.useEffect(() => {\n return MessageManager.onActivityMessageCancelledEvent.addListener(() => {\n setActivityMessageInfo(undefined);\n });\n }, []);\n\n const cancelActivityMessage = React.useCallback(() => {\n MessageManager.endActivityMessage(false);\n }, []);\n\n useActivityMessage({ activityMessageInfo, cancelActivityMessage });\n return <></>;\n}\n\n/**\n * Component used to show and update activity message content.\n * @internal\n */\nfunction ActivityMessageContent({\n initialActivityMessageInfo,\n}: {\n initialActivityMessageInfo: ActivityMessageEventArgs;\n}) {\n const [percentCompleteLabel] = React.useState(\n UiFramework.translate(\"activityCenter.percentComplete\")\n );\n const [activityMessageInfo, setActivityMessageInfo] = React.useState(\n initialActivityMessageInfo\n );\n\n React.useEffect(() => {\n const handleActivityMessageUpdatedEvent = (\n args: ActivityMessageEventArgs\n ) => {\n setActivityMessageInfo(args);\n };\n\n return MessageManager.onActivityMessageUpdatedEvent.addListener(\n handleActivityMessageUpdatedEvent\n );\n }, []);\n\n return (\n <>\n {activityMessageInfo.message && (\n <Text>\n <>\n {(activityMessageInfo.message as ReactMessage).reactNode ||\n activityMessageInfo.message}\n </>\n </Text>\n )}\n {!!activityMessageInfo.details?.showPercentInMessage && (\n <Text variant=\"small\">{`${activityMessageInfo.percentage} ${percentCompleteLabel}`}</Text>\n )}\n {activityMessageInfo.details?.showProgressBar && (\n <ProgressLinear value={activityMessageInfo?.percentage} />\n )}\n </>\n );\n}\n"]}
@@ -220,7 +220,6 @@ export declare class MessageManager {
220
220
  static getIconSpecFromDetails(details: NotifyMessageDetailsType): IconSpec;
221
221
  /** Gets an icon CSS class name based on a given NotifyMessageDetailsType.
222
222
  * @public
223
- * @deprecated in 4.0. Please use getIconSpecFromDetails instead.
224
223
  */
225
224
  static getIconClassName(details: NotifyMessageDetailsType): string;
226
225
  /** Gets a MessageSeverity based on a given NotifyMessageDetailsType. */
@@ -1 +1 @@
1
- {"version":3,"file":"MessageManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/messages/MessageManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EAEtB,kBAAkB,EAClB,cAAc,EAEd,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,mBAAmB,CAAC;AAQhE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KA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,OAAO,EAAE,wBAAwB,GAChC,kBAAkB;IA2BrB;;;;;OAKG;WACiB,cAAc,CAChC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,eAAe,CAAC;IA0B3B,gBAAgB;WACF,mBAAmB,CAC/B,cAAc,EAAE,wBAAwB,GACvC,IAAI;IAkBP,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAsBjC;;;OAGG;WACW,iBAAiB,CAC7B,YAAY,EAAE,0BAA0B,GAAG,SAAS;IAKtD;;;;;OAKG;WACW,WAAW,CACvB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,KAAK,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI;IAKP,gBAAgB;WACF,gBAAgB,IAAI,IAAI;CAOvC"}
1
+ {"version":3,"file":"MessageManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/messages/MessageManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EAEtB,kBAAkB,EAClB,cAAc,EAEd,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,mBAAmB,CAAC;AAQhE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,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AwB,GAChC,kBAAkB;IA2BrB;;;;;OAKG;WACiB,cAAc,CAChC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,eAAe,CAAC;IA0B3B,gBAAgB;WACF,mBAAmB,CAC/B,cAAc,EAAE,wBAAwB,GACvC,IAAI;IAkBP,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAsBjC;;;OAGG;WACW,iBAAiB,CAC7B,YAAY,EAAE,0BAA0B,GAAG,SAAS;IAKtD;;;;;OAKG;WACW,WAAW,CACvB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,KAAK,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI;IAKP,gBAAgB;WACF,gBAAgB,IAAI,IAAI;CAOvC"}
@@ -333,11 +333,10 @@ class MessageManager {
333
333
  }
334
334
  /** Gets an icon CSS class name based on a given NotifyMessageDetailsType.
335
335
  * @public
336
- * @deprecated in 4.0. Please use getIconSpecFromDetails instead.
337
336
  */
338
337
  static getIconClassName(details) {
339
338
  const severity = MessageManager.getSeverity(details);
340
- const className = MessageContainer.getIconClassName(severity, false); // eslint-disable-line deprecation/deprecation
339
+ const className = MessageContainer.getIconClassName(severity);
341
340
  const iconClassName = classnames("icon", "notifymessage-icon", className);
342
341
  return iconClassName;
343
342
  }