@itwin/appui-react 5.0.5 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (530) hide show
  1. package/CHANGELOG.md +57 -38
  2. package/lib/appui-react/UiFramework.d.ts +1 -1
  3. package/lib/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/appui-react/UiFramework.js +48 -46
  5. package/lib/appui-react/UiFramework.js.map +1 -1
  6. package/lib/appui-react/accudraw/AccuDrawCommandItems.js +1 -1
  7. package/lib/appui-react/accudraw/AccuDrawCommandItems.js.map +1 -1
  8. package/lib/appui-react/accudraw/AccuDrawDialog.js +1 -1
  9. package/lib/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  10. package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts +2 -0
  11. package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  12. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js +38 -26
  13. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  14. package/lib/appui-react/accudraw/AccuDrawInputField.d.ts +4 -2
  15. package/lib/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  16. package/lib/appui-react/accudraw/AccuDrawInputField.js +45 -38
  17. package/lib/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  18. package/lib/appui-react/accudraw/AccuDrawInputField.scss +0 -15
  19. package/lib/appui-react/accudraw/AccuDrawPopupManager.js +3 -3
  20. package/lib/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
  21. package/lib/appui-react/accudraw/AccuDrawUiSettings.js.map +1 -1
  22. package/lib/appui-react/accudraw/AccuDrawWidget.js +2 -2
  23. package/lib/appui-react/accudraw/AccuDrawWidget.js.map +1 -1
  24. package/lib/appui-react/accudraw/Calculator.js +1 -1
  25. package/lib/appui-react/accudraw/Calculator.js.map +1 -1
  26. package/lib/appui-react/accudraw/CalculatorPopup.js +1 -1
  27. package/lib/appui-react/accudraw/CalculatorPopup.js.map +1 -1
  28. package/lib/appui-react/accudraw/FrameworkAccuDraw.d.ts +2 -2
  29. package/lib/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
  30. package/lib/appui-react/accudraw/FrameworkAccuDraw.js +18 -15
  31. package/lib/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
  32. package/lib/appui-react/accudraw/MenuButton.js +1 -1
  33. package/lib/appui-react/accudraw/MenuButton.js.map +1 -1
  34. package/lib/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  35. package/lib/appui-react/backstage/BackstageComposer.js +2 -3
  36. package/lib/appui-react/backstage/BackstageComposer.js.map +1 -1
  37. package/lib/appui-react/backstage/BackstageComposerItem.js +6 -6
  38. package/lib/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  39. package/lib/appui-react/backstage/BackstageItem.js.map +1 -1
  40. package/lib/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
  41. package/lib/appui-react/backstage/BackstageManager.js +3 -3
  42. package/lib/appui-react/backstage/BackstageManager.js.map +1 -1
  43. package/lib/appui-react/backstage/InternalBackstageManager.js +2 -2
  44. package/lib/appui-react/backstage/InternalBackstageManager.js.map +1 -1
  45. package/lib/appui-react/configurableui/ActivityTracker.d.ts.map +1 -1
  46. package/lib/appui-react/configurableui/ActivityTracker.js +0 -1
  47. package/lib/appui-react/configurableui/ActivityTracker.js.map +1 -1
  48. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts +3 -1
  49. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  50. package/lib/appui-react/configurableui/ConfigurableUiContent.js +20 -12
  51. package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  52. package/lib/appui-react/configurableui/ConfigurableUiControl.js.map +1 -1
  53. package/lib/appui-react/configurableui/InternalConfigurableUiManager.d.ts +1 -1
  54. package/lib/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
  55. package/lib/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  56. package/lib/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  57. package/lib/appui-react/content/ContentControl.js +1 -1
  58. package/lib/appui-react/content/ContentControl.js.map +1 -1
  59. package/lib/appui-react/content/ContentGroup.js +7 -7
  60. package/lib/appui-react/content/ContentGroup.js.map +1 -1
  61. package/lib/appui-react/content/ContentLayout.d.ts.map +1 -1
  62. package/lib/appui-react/content/ContentLayout.js +16 -17
  63. package/lib/appui-react/content/ContentLayout.js.map +1 -1
  64. package/lib/appui-react/content/DefaultViewOverlay.js +1 -1
  65. package/lib/appui-react/content/DefaultViewOverlay.js.map +1 -1
  66. package/lib/appui-react/content/FloatingViewportContent.js +4 -4
  67. package/lib/appui-react/content/FloatingViewportContent.js.map +1 -1
  68. package/lib/appui-react/content/IModelViewport.d.ts +1 -1
  69. package/lib/appui-react/content/IModelViewport.d.ts.map +1 -1
  70. package/lib/appui-react/content/IModelViewport.js +1 -1
  71. package/lib/appui-react/content/IModelViewport.js.map +1 -1
  72. package/lib/appui-react/content/InternalContentViewManager.js +26 -26
  73. package/lib/appui-react/content/InternalContentViewManager.js.map +1 -1
  74. package/lib/appui-react/content/ViewportContentControl.js +1 -1
  75. package/lib/appui-react/content/ViewportContentControl.js.map +1 -1
  76. package/lib/appui-react/content/split-pane/SplitPane.js +2 -2
  77. package/lib/appui-react/content/split-pane/SplitPane.js.map +1 -1
  78. package/lib/appui-react/cursor/CursorInformation.d.ts +7 -0
  79. package/lib/appui-react/cursor/CursorInformation.d.ts.map +1 -1
  80. package/lib/appui-react/cursor/CursorInformation.js +15 -2
  81. package/lib/appui-react/cursor/CursorInformation.js.map +1 -1
  82. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts +1 -1
  83. package/lib/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
  84. package/lib/appui-react/cursor/cursormenu/CursorMenu.js +3 -3
  85. package/lib/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  86. package/lib/appui-react/cursor/cursorpopup/CursorPopup.d.ts +1 -1
  87. package/lib/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
  88. package/lib/appui-react/cursor/cursorpopup/CursorPopup.js +4 -4
  89. package/lib/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
  90. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +4 -1
  91. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
  92. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js +45 -30
  93. package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
  94. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +12 -15
  95. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  96. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +47 -38
  97. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  98. package/lib/appui-react/dialog/ContentDialog.js.map +1 -1
  99. package/lib/appui-react/dialog/ContentDialogManager.js +2 -2
  100. package/lib/appui-react/dialog/ContentDialogManager.js.map +1 -1
  101. package/lib/appui-react/dialog/DialogManagerBase.js +4 -4
  102. package/lib/appui-react/dialog/DialogManagerBase.js.map +1 -1
  103. package/lib/appui-react/dialog/InternalContentDialogManager.d.ts.map +1 -1
  104. package/lib/appui-react/dialog/InternalContentDialogManager.js +2 -3
  105. package/lib/appui-react/dialog/InternalContentDialogManager.js.map +1 -1
  106. package/lib/appui-react/dialog/InternalModalDialogManager.js +1 -1
  107. package/lib/appui-react/dialog/InternalModalDialogManager.js.map +1 -1
  108. package/lib/appui-react/dialog/InternalModelessDialogManager.d.ts.map +1 -1
  109. package/lib/appui-react/dialog/InternalModelessDialogManager.js +1 -2
  110. package/lib/appui-react/dialog/InternalModelessDialogManager.js.map +1 -1
  111. package/lib/appui-react/dialog/ModalDialogManager.js +2 -2
  112. package/lib/appui-react/dialog/ModalDialogManager.js.map +1 -1
  113. package/lib/appui-react/dialog/ModelessDialog.js +1 -1
  114. package/lib/appui-react/dialog/ModelessDialog.js.map +1 -1
  115. package/lib/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
  116. package/lib/appui-react/dialog/ModelessDialogManager.js +2 -3
  117. package/lib/appui-react/dialog/ModelessDialogManager.js.map +1 -1
  118. package/lib/appui-react/dialog/StandardMessageBox.js +1 -1
  119. package/lib/appui-react/dialog/StandardMessageBox.js.map +1 -1
  120. package/lib/appui-react/dialog/UiDataProvidedDialog.js.map +1 -1
  121. package/lib/appui-react/feedback/ElementTooltip.d.ts +1 -1
  122. package/lib/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
  123. package/lib/appui-react/feedback/ElementTooltip.js.map +1 -1
  124. package/lib/appui-react/feedback/ValidationTextbox.js.map +1 -1
  125. package/lib/appui-react/framework/FrameworkBackstage.js.map +1 -1
  126. package/lib/appui-react/framework/FrameworkContent.js +3 -3
  127. package/lib/appui-react/framework/FrameworkContent.js.map +1 -1
  128. package/lib/appui-react/framework/FrameworkControls.js.map +1 -1
  129. package/lib/appui-react/framework/FrameworkDialogs.js +2 -2
  130. package/lib/appui-react/framework/FrameworkDialogs.js.map +1 -1
  131. package/lib/appui-react/framework/FrameworkFrontstages.js +8 -8
  132. package/lib/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  133. package/lib/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
  134. package/lib/appui-react/framework/FrameworkToolSettings.js +1 -1
  135. package/lib/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  136. package/lib/appui-react/frontstage/Frontstage.js.map +1 -1
  137. package/lib/appui-react/frontstage/FrontstageConfig.d.ts +5 -2
  138. package/lib/appui-react/frontstage/FrontstageConfig.d.ts.map +1 -1
  139. package/lib/appui-react/frontstage/FrontstageConfig.js.map +1 -1
  140. package/lib/appui-react/frontstage/FrontstageDef.d.ts +5 -1
  141. package/lib/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  142. package/lib/appui-react/frontstage/FrontstageDef.js +22 -17
  143. package/lib/appui-react/frontstage/FrontstageDef.js.map +1 -1
  144. package/lib/appui-react/frontstage/InternalFrontstageManager.js +29 -29
  145. package/lib/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  146. package/lib/appui-react/frontstage/ModalFrontstage.js.map +1 -1
  147. package/lib/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
  148. package/lib/appui-react/frontstage/ModalSettingsStage.js +2 -2
  149. package/lib/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  150. package/lib/appui-react/frontstage/NestedFrontstage.js +1 -1
  151. package/lib/appui-react/frontstage/NestedFrontstage.js.map +1 -1
  152. package/lib/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
  153. package/lib/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  154. package/lib/appui-react/hooks/useActiveIModelConnection.js +1 -1
  155. package/lib/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
  156. package/lib/appui-react/hooks/useUiVisibility.js +1 -1
  157. package/lib/appui-react/hooks/useUiVisibility.js.map +1 -1
  158. package/lib/appui-react/keyboardshortcut/InternalKeyboardShortcut.js.map +1 -1
  159. package/lib/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -1
  160. package/lib/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  161. package/lib/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
  162. package/lib/appui-react/keyboardshortcut/KeyboardShortcutProps.js.map +1 -1
  163. package/lib/appui-react/layout/StandardLayout.d.ts.map +1 -1
  164. package/lib/appui-react/layout/StandardLayout.js +5 -1
  165. package/lib/appui-react/layout/StandardLayout.js.map +1 -1
  166. package/lib/appui-react/layout/backstage/Backstage.js.map +1 -1
  167. package/lib/appui-react/layout/backstage/Item.js.map +1 -1
  168. package/lib/appui-react/layout/backstage/Separator.js +1 -1
  169. package/lib/appui-react/layout/backstage/Separator.js.map +1 -1
  170. package/lib/appui-react/layout/base/usePointerCaptor.d.ts +1 -1
  171. package/lib/appui-react/layout/base/usePointerCaptor.d.ts.map +1 -1
  172. package/lib/appui-react/layout/footer/dialog/Dialog.js.map +1 -1
  173. package/lib/appui-react/layout/footer/dialog/TitleBar.js.map +1 -1
  174. package/lib/appui-react/layout/footer/snap-mode/Panel.js.map +1 -1
  175. package/lib/appui-react/layout/footer/snap-mode/Snap.js.map +1 -1
  176. package/lib/appui-react/layout/footer/tool-assistance/Dialog.js.map +1 -1
  177. package/lib/appui-react/layout/footer/tool-assistance/Instruction.js.map +1 -1
  178. package/lib/appui-react/layout/footer/tool-assistance/Item.js.map +1 -1
  179. package/lib/appui-react/layout/footer/tool-assistance/NewDot.js +1 -1
  180. package/lib/appui-react/layout/footer/tool-assistance/NewDot.js.map +1 -1
  181. package/lib/appui-react/layout/footer/tool-assistance/Separator.js.map +1 -1
  182. package/lib/appui-react/layout/outline/SectionOutline.js.map +1 -1
  183. package/lib/appui-react/layout/popup/Tooltip.js.map +1 -1
  184. package/lib/appui-react/layout/state/internal/PanelStateHelpers.js +1 -1
  185. package/lib/appui-react/layout/state/internal/PanelStateHelpers.js.map +1 -1
  186. package/lib/appui-react/layout/state/internal/TabStateHelpers.js +6 -6
  187. package/lib/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
  188. package/lib/appui-react/layout/state/internal/ToolSettingsStateHelpers.js +6 -6
  189. package/lib/appui-react/layout/state/internal/ToolSettingsStateHelpers.js.map +1 -1
  190. package/lib/appui-react/layout/state/internal/WidgetStateHelpers.js +13 -13
  191. package/lib/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
  192. package/lib/appui-react/layout/target/TargetContainer.js.map +1 -1
  193. package/lib/appui-react/layout/target/useAllowedSideTarget.js +1 -1
  194. package/lib/appui-react/layout/target/useAllowedSideTarget.js.map +1 -1
  195. package/lib/appui-react/layout/tool-settings/Docked.js +1 -1
  196. package/lib/appui-react/layout/tool-settings/Docked.js.map +1 -1
  197. package/lib/appui-react/layout/tool-settings/Handle.js.map +1 -1
  198. package/lib/appui-react/layout/tool-settings/Overflow.js.map +1 -1
  199. package/lib/appui-react/layout/tool-settings/Panel.js +1 -1
  200. package/lib/appui-react/layout/tool-settings/Panel.js.map +1 -1
  201. package/lib/appui-react/layout/tool-settings/Setting.js.map +1 -1
  202. package/lib/appui-react/layout/widget/Menu.js +1 -1
  203. package/lib/appui-react/layout/widget/Menu.js.map +1 -1
  204. package/lib/appui-react/layout/widget/MenuTab.js.map +1 -1
  205. package/lib/appui-react/layout/widget/NavigationArea.js.map +1 -1
  206. package/lib/appui-react/layout/widget/Tab.js +1 -1
  207. package/lib/appui-react/layout/widget/Tab.js.map +1 -1
  208. package/lib/appui-react/layout/widget/TabBar.js +1 -1
  209. package/lib/appui-react/layout/widget/TabBar.js.map +1 -1
  210. package/lib/appui-react/layout/widget/ToolsArea.js.map +1 -1
  211. package/lib/appui-react/layout/widget/Widget.js.map +1 -1
  212. package/lib/appui-react/layout/widget/tools/button/Button.js.map +1 -1
  213. package/lib/appui-react/layout/widget/tools/button/Expandable.js.map +1 -1
  214. package/lib/appui-react/layout/widget-panels/Expander.js +1 -1
  215. package/lib/appui-react/layout/widget-panels/Expander.js.map +1 -1
  216. package/lib/appui-react/layout/widget-panels/Grip.d.ts.map +1 -1
  217. package/lib/appui-react/layout/widget-panels/Grip.js +3 -3
  218. package/lib/appui-react/layout/widget-panels/Grip.js.map +1 -1
  219. package/lib/appui-react/layout/widget-panels/Panel.d.ts.map +1 -1
  220. package/lib/appui-react/layout/widget-panels/useAnimatePanel.d.ts.map +1 -1
  221. package/lib/appui-react/messages/InputField.js +2 -2
  222. package/lib/appui-react/messages/InputField.js.map +1 -1
  223. package/lib/appui-react/messages/MessageManager.d.ts +4 -4
  224. package/lib/appui-react/messages/MessageManager.d.ts.map +1 -1
  225. package/lib/appui-react/messages/MessageManager.js +25 -25
  226. package/lib/appui-react/messages/MessageManager.js.map +1 -1
  227. package/lib/appui-react/messages/MessageRenderer.js.map +1 -1
  228. package/lib/appui-react/messages/Pointer.d.ts.map +1 -1
  229. package/lib/appui-react/messages/Pointer.js +7 -7
  230. package/lib/appui-react/messages/Pointer.js.map +1 -1
  231. package/lib/appui-react/messages/ReactNotifyMessageDetails.d.ts +2 -2
  232. package/lib/appui-react/messages/ReactNotifyMessageDetails.d.ts.map +1 -1
  233. package/lib/appui-react/messages/ReactNotifyMessageDetails.js.map +1 -1
  234. package/lib/appui-react/navigationaids/CubeNavigationAidControl.js +2 -2
  235. package/lib/appui-react/navigationaids/CubeNavigationAidControl.js.map +1 -1
  236. package/lib/appui-react/navigationaids/DrawingNavigationAidControl.js +2 -2
  237. package/lib/appui-react/navigationaids/DrawingNavigationAidControl.js.map +1 -1
  238. package/lib/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
  239. package/lib/appui-react/navigationaids/SheetNavigationAid.js +2 -2
  240. package/lib/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
  241. package/lib/appui-react/navigationaids/SheetsModalFrontstage.js +8 -8
  242. package/lib/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  243. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts +1 -1
  244. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
  245. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js +3 -3
  246. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
  247. package/lib/appui-react/pickers/ListPicker.d.ts +1 -0
  248. package/lib/appui-react/pickers/ListPicker.d.ts.map +1 -1
  249. package/lib/appui-react/pickers/ListPicker.js +11 -10
  250. package/lib/appui-react/pickers/ListPicker.js.map +1 -1
  251. package/lib/appui-react/pickers/ViewSelector.d.ts +1 -0
  252. package/lib/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  253. package/lib/appui-react/pickers/ViewSelector.js +7 -6
  254. package/lib/appui-react/pickers/ViewSelector.js.map +1 -1
  255. package/lib/appui-react/popup/CardPopup.js +2 -2
  256. package/lib/appui-react/popup/CardPopup.js.map +1 -1
  257. package/lib/appui-react/popup/ComponentPopup.js.map +1 -1
  258. package/lib/appui-react/popup/HTMLElementPopup.js.map +1 -1
  259. package/lib/appui-react/popup/InputEditorPopup.js.map +1 -1
  260. package/lib/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
  261. package/lib/appui-react/popup/KeyinPalettePanel.js +2 -3
  262. package/lib/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  263. package/lib/appui-react/popup/KeyinPalettePopup.js +1 -1
  264. package/lib/appui-react/popup/KeyinPalettePopup.js.map +1 -1
  265. package/lib/appui-react/popup/PopupManager.d.ts +1 -1
  266. package/lib/appui-react/popup/PopupManager.d.ts.map +1 -1
  267. package/lib/appui-react/popup/PopupManager.js +4 -4
  268. package/lib/appui-react/popup/PopupManager.js.map +1 -1
  269. package/lib/appui-react/popup/PositionPopup.js +2 -2
  270. package/lib/appui-react/popup/PositionPopup.js.map +1 -1
  271. package/lib/appui-react/popup/ToolSettingsPopup.js.map +1 -1
  272. package/lib/appui-react/popup/ToolbarPopup.js +1 -1
  273. package/lib/appui-react/popup/ToolbarPopup.js.map +1 -1
  274. package/lib/appui-react/preview/PreviewFeatures.d.ts +3 -5
  275. package/lib/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
  276. package/lib/appui-react/preview/PreviewFeatures.js +1 -2
  277. package/lib/appui-react/preview/PreviewFeatures.js.map +1 -1
  278. package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.d.ts +5 -0
  279. package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.d.ts.map +1 -0
  280. package/lib/appui-react/preview/{allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.js → allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.js} +5 -5
  281. package/lib/appui-react/preview/allow-bearing-letters-in-accudraw-input-fields/useAllowBearingLettersInAccuDrawInputFields.js.map +1 -0
  282. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.d.ts +1 -1
  283. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.d.ts.map +1 -1
  284. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js +1 -1
  285. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js.map +1 -1
  286. package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts +1 -1
  287. package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.d.ts.map +1 -1
  288. package/lib/appui-react/preview/enable-maximized-widget/MaximizedWidget.js.map +1 -1
  289. package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts +1 -4
  290. package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.d.ts.map +1 -1
  291. package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js +13 -13
  292. package/lib/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -1
  293. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.d.ts +1 -1
  294. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.d.ts.map +1 -1
  295. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js +1 -1
  296. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js.map +1 -1
  297. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.d.ts +1 -1
  298. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.d.ts.map +1 -1
  299. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
  300. package/lib/appui-react/redux/ConfigurableUiState.d.ts.map +1 -1
  301. package/lib/appui-react/redux/ConfigurableUiState.js +1 -1
  302. package/lib/appui-react/redux/ConfigurableUiState.js.map +1 -1
  303. package/lib/appui-react/redux/FrameworkState.d.ts +1 -1
  304. package/lib/appui-react/redux/FrameworkState.js.map +1 -1
  305. package/lib/appui-react/redux/ReducerRegistry.js +1 -1
  306. package/lib/appui-react/redux/ReducerRegistry.js.map +1 -1
  307. package/lib/appui-react/redux/SessionState.d.ts +2 -2
  308. package/lib/appui-react/redux/SessionState.d.ts.map +1 -1
  309. package/lib/appui-react/redux/SessionState.js.map +1 -1
  310. package/lib/appui-react/redux/StateManager.js +2 -2
  311. package/lib/appui-react/redux/StateManager.js.map +1 -1
  312. package/lib/appui-react/redux/connectIModel.js +1 -1
  313. package/lib/appui-react/redux/connectIModel.js.map +1 -1
  314. package/lib/appui-react/redux/redux-ts.js.map +1 -1
  315. package/lib/appui-react/selection/SelectionContextItemDef.js +2 -2
  316. package/lib/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  317. package/lib/appui-react/settings/SettingsManager.js +1 -1
  318. package/lib/appui-react/settings/SettingsManager.js.map +1 -1
  319. package/lib/appui-react/settings/quantityformatting/QuantityFormat.js +3 -3
  320. package/lib/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  321. package/lib/appui-react/settings/ui/UiSettingsPage.js +5 -5
  322. package/lib/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  323. package/lib/appui-react/shared/ActionButtonItemDef.js +1 -1
  324. package/lib/appui-react/shared/ActionButtonItemDef.js.map +1 -1
  325. package/lib/appui-react/shared/AnyItemDef.js.map +1 -1
  326. package/lib/appui-react/shared/AnyToolbarItemDef.js.map +1 -1
  327. package/lib/appui-react/shared/CommandItemDef.js +1 -1
  328. package/lib/appui-react/shared/CommandItemDef.js.map +1 -1
  329. package/lib/appui-react/shared/CustomItemDef.js +1 -1
  330. package/lib/appui-react/shared/CustomItemDef.js.map +1 -1
  331. package/lib/appui-react/shared/CustomItemProps.js.map +1 -1
  332. package/lib/appui-react/shared/GroupItemProps.js.map +1 -1
  333. package/lib/appui-react/shared/ItemDefBase.js.map +1 -1
  334. package/lib/appui-react/shared/ItemMap.js +1 -1
  335. package/lib/appui-react/shared/ItemMap.js.map +1 -1
  336. package/lib/appui-react/shared/ItemProps.js.map +1 -1
  337. package/lib/appui-react/shared/MenuItem.js +1 -1
  338. package/lib/appui-react/shared/MenuItem.js.map +1 -1
  339. package/lib/appui-react/shared/ToolItemDef.js +1 -1
  340. package/lib/appui-react/shared/ToolItemDef.js.map +1 -1
  341. package/lib/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
  342. package/lib/appui-react/stagepanels/StagePanelDef.js +2 -2
  343. package/lib/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  344. package/lib/appui-react/statusbar/Field.js.map +1 -1
  345. package/lib/appui-react/statusbar/Indicator.js +2 -2
  346. package/lib/appui-react/statusbar/Indicator.js.map +1 -1
  347. package/lib/appui-react/statusbar/LabelIndicator.js +2 -2
  348. package/lib/appui-react/statusbar/LabelIndicator.js.map +1 -1
  349. package/lib/appui-react/statusbar/Overflow.js.map +1 -1
  350. package/lib/appui-react/statusbar/Separator.js +1 -1
  351. package/lib/appui-react/statusbar/Separator.js.map +1 -1
  352. package/lib/appui-react/statusbar/StatusBar.js.map +1 -1
  353. package/lib/appui-react/statusbar/StatusBarComposer.js +6 -6
  354. package/lib/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  355. package/lib/appui-react/statusbar/StatusBarItem.js.map +1 -1
  356. package/lib/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
  357. package/lib/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
  358. package/lib/appui-react/statusbar/dialog/Button.js.map +1 -1
  359. package/lib/appui-react/statusbar/dialog/Dialog.js.map +1 -1
  360. package/lib/appui-react/statusbar/dialog/TitleBar.js.map +1 -1
  361. package/lib/appui-react/statusbar/popup/Popup.js +2 -2
  362. package/lib/appui-react/statusbar/popup/Popup.js.map +1 -1
  363. package/lib/appui-react/statusfields/ActivityCenter.js +2 -2
  364. package/lib/appui-react/statusfields/ActivityCenter.js.map +1 -1
  365. package/lib/appui-react/statusfields/SectionsField.js.map +1 -1
  366. package/lib/appui-react/statusfields/SelectionCount.js.map +1 -1
  367. package/lib/appui-react/statusfields/SelectionInfo.js +2 -2
  368. package/lib/appui-react/statusfields/SelectionInfo.js.map +1 -1
  369. package/lib/appui-react/statusfields/SelectionScope.js +3 -3
  370. package/lib/appui-react/statusfields/SelectionScope.js.map +1 -1
  371. package/lib/appui-react/statusfields/SnapMode.js +2 -2
  372. package/lib/appui-react/statusfields/SnapMode.js.map +1 -1
  373. package/lib/appui-react/statusfields/ViewAttributes.d.ts +1 -1
  374. package/lib/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
  375. package/lib/appui-react/statusfields/ViewAttributes.js +1 -1
  376. package/lib/appui-react/statusfields/ViewAttributes.js.map +1 -1
  377. package/lib/appui-react/statusfields/message-center/MessageCenterField.js +1 -1
  378. package/lib/appui-react/statusfields/message-center/MessageCenterField.js.map +1 -1
  379. package/lib/appui-react/statusfields/message-center/MessageCenterMessage.js.map +1 -1
  380. package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts +1 -1
  381. package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  382. package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
  383. package/lib/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  384. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +11 -7
  385. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  386. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +27 -9
  387. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  388. package/lib/appui-react/syncui/InternalSyncUiEventDispatcher.js +2 -2
  389. package/lib/appui-react/syncui/InternalSyncUiEventDispatcher.js.map +1 -1
  390. package/lib/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  391. package/lib/appui-react/syncui/SyncUiEventDispatcher.js +3 -8
  392. package/lib/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  393. package/lib/appui-react/syncui/UiSyncEvent.js +1 -1
  394. package/lib/appui-react/syncui/UiSyncEvent.js.map +1 -1
  395. package/lib/appui-react/theme/ThemeManager.d.ts +1 -1
  396. package/lib/appui-react/theme/ThemeManager.js +2 -2
  397. package/lib/appui-react/theme/ThemeManager.js.map +1 -1
  398. package/lib/appui-react/toolbar/GroupItem.js +1 -1
  399. package/lib/appui-react/toolbar/GroupItem.js.map +1 -1
  400. package/lib/appui-react/toolbar/Toolbar.js.map +1 -1
  401. package/lib/appui-react/toolbar/ToolbarComposer.js +3 -3
  402. package/lib/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  403. package/lib/appui-react/toolbar/ToolbarHelper.js +4 -4
  404. package/lib/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  405. package/lib/appui-react/toolbar/ToolbarItem.js.map +1 -1
  406. package/lib/appui-react/toolbar/ToolbarItemUtilities.js +1 -1
  407. package/lib/appui-react/toolbar/ToolbarItemUtilities.js.map +1 -1
  408. package/lib/appui-react/toolbar/ToolbarItemsManager.js +10 -10
  409. package/lib/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  410. package/lib/appui-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  411. package/lib/appui-react/toolbar/new-toolbars/Badge.d.ts +1 -1
  412. package/lib/appui-react/toolbar/new-toolbars/Badge.d.ts.map +1 -1
  413. package/lib/appui-react/toolbar/new-toolbars/Badge.js +1 -1
  414. package/lib/appui-react/toolbar/new-toolbars/Badge.js.map +1 -1
  415. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js +2 -2
  416. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js.map +1 -1
  417. package/lib/appui-react/toolbar/new-toolbars/Item.js +1 -1
  418. package/lib/appui-react/toolbar/new-toolbars/Item.js.map +1 -1
  419. package/lib/appui-react/toolbar/new-toolbars/ToolGroup.js.map +1 -1
  420. package/lib/appui-react/toolbar/new-toolbars/useOverflow.d.ts.map +1 -1
  421. package/lib/appui-react/toolbar/useDefaultToolbarItems.js +1 -1
  422. package/lib/appui-react/toolbar/useDefaultToolbarItems.js.map +1 -1
  423. package/lib/appui-react/toolbar/useUiItemsProviderToolbarItems.js +1 -1
  424. package/lib/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  425. package/lib/appui-react/tools/CoreToolDefinitions.js +2 -2
  426. package/lib/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  427. package/lib/appui-react/tools/KeyinPaletteTools.d.ts +1 -1
  428. package/lib/appui-react/tools/OpenSettingsTool.d.ts +1 -1
  429. package/lib/appui-react/tools/RestoreLayoutTool.d.ts +2 -2
  430. package/lib/appui-react/tools/ToolbarItems.js +1 -1
  431. package/lib/appui-react/tools/ToolbarItems.js.map +1 -1
  432. package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.d.ts.map +1 -1
  433. package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -3
  434. package/lib/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  435. package/lib/appui-react/toolsettings/InternalToolSettingsManager.js +2 -2
  436. package/lib/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
  437. package/lib/appui-react/toolsettings/ToolInformation.js +1 -1
  438. package/lib/appui-react/toolsettings/ToolInformation.js.map +1 -1
  439. package/lib/appui-react/toolsettings/ToolUiProvider.js +1 -1
  440. package/lib/appui-react/toolsettings/ToolUiProvider.js.map +1 -1
  441. package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +5 -5
  442. package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.js +1 -1
  443. package/lib/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  444. package/lib/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  445. package/lib/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -4
  446. package/lib/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  447. package/lib/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  448. package/lib/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +3 -3
  449. package/lib/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  450. package/lib/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  451. package/lib/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -3
  452. package/lib/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  453. package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  454. package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -1
  455. package/lib/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  456. package/lib/appui-react/ui-items-provider/UiItemsManager.js +3 -3
  457. package/lib/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  458. package/lib/appui-react/uiadmin/FrameworkUiAdmin.js +3 -3
  459. package/lib/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  460. package/lib/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
  461. package/lib/appui-react/uistate/AppUiSettings.js +2 -2
  462. package/lib/appui-react/uistate/AppUiSettings.js.map +1 -1
  463. package/lib/appui-react/uistate/LocalStateStorage.js +1 -1
  464. package/lib/appui-react/uistate/LocalStateStorage.js.map +1 -1
  465. package/lib/appui-react/uistate/UiStateStorage.js +1 -1
  466. package/lib/appui-react/uistate/UiStateStorage.js.map +1 -1
  467. package/lib/appui-react/uistate/useReduxFrameworkState.js +1 -1
  468. package/lib/appui-react/uistate/useReduxFrameworkState.js.map +1 -1
  469. package/lib/appui-react/uistate/useUiStateStorage.js +1 -1
  470. package/lib/appui-react/uistate/useUiStateStorage.js.map +1 -1
  471. package/lib/appui-react/utils/PropsHelper.js +5 -5
  472. package/lib/appui-react/utils/PropsHelper.js.map +1 -1
  473. package/lib/appui-react/utils/RectangleProps.js.map +1 -1
  474. package/lib/appui-react/utils/SizeProps.js.map +1 -1
  475. package/lib/appui-react/utils/ViewUtilities.d.ts.map +1 -1
  476. package/lib/appui-react/utils/ViewUtilities.js.map +1 -1
  477. package/lib/appui-react/utils/getActiveViewport.js +1 -1
  478. package/lib/appui-react/utils/getActiveViewport.js.map +1 -1
  479. package/lib/appui-react/widget-panels/DockedBar.js.map +1 -1
  480. package/lib/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
  481. package/lib/appui-react/widget-panels/Frontstage.js +9 -7
  482. package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
  483. package/lib/appui-react/widget-panels/StatusBar.js +5 -5
  484. package/lib/appui-react/widget-panels/StatusBar.js.map +1 -1
  485. package/lib/appui-react/widget-panels/Tab.js +4 -4
  486. package/lib/appui-react/widget-panels/Tab.js.map +1 -1
  487. package/lib/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
  488. package/lib/appui-react/widget-panels/ToolSettings.js +8 -5
  489. package/lib/appui-react/widget-panels/ToolSettings.js.map +1 -1
  490. package/lib/appui-react/widgets/BackstageAppButton.js +2 -2
  491. package/lib/appui-react/widgets/BackstageAppButton.js.map +1 -1
  492. package/lib/appui-react/widgets/BasicNavigationWidget.js +1 -1
  493. package/lib/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  494. package/lib/appui-react/widgets/BasicToolWidget.js +1 -1
  495. package/lib/appui-react/widgets/BasicToolWidget.js.map +1 -1
  496. package/lib/appui-react/widgets/ContentToolWidgetComposer.js +1 -1
  497. package/lib/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  498. package/lib/appui-react/widgets/NavigationWidgetComposer.js +10 -10
  499. package/lib/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  500. package/lib/appui-react/widgets/StatusBarWidgetComposerControl.js +1 -1
  501. package/lib/appui-react/widgets/StatusBarWidgetComposerControl.js.map +1 -1
  502. package/lib/appui-react/widgets/ToolWidgetComposer.js +1 -1
  503. package/lib/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  504. package/lib/appui-react/widgets/ViewToolWidgetComposer.js +1 -1
  505. package/lib/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  506. package/lib/appui-react/widgets/Widget.d.ts +11 -2
  507. package/lib/appui-react/widgets/Widget.d.ts.map +1 -1
  508. package/lib/appui-react/widgets/Widget.js.map +1 -1
  509. package/lib/appui-react/widgets/WidgetControl.js +1 -1
  510. package/lib/appui-react/widgets/WidgetControl.js.map +1 -1
  511. package/lib/appui-react/widgets/WidgetDef.js +21 -21
  512. package/lib/appui-react/widgets/WidgetDef.js.map +1 -1
  513. package/lib/appui-react/widgets/WidgetManager.d.ts.map +1 -1
  514. package/lib/appui-react/widgets/useWidget.d.ts.map +1 -1
  515. package/lib/appui-react.js +1 -1
  516. package/lib/appui-react.js.map +1 -1
  517. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +0 -15
  518. package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +0 -15
  519. package/package.json +20 -21
  520. package/lib/appui-react/layout/widget/tools/button/Back.d.ts +0 -21
  521. package/lib/appui-react/layout/widget/tools/button/Back.d.ts.map +0 -1
  522. package/lib/appui-react/layout/widget/tools/button/Back.js +0 -23
  523. package/lib/appui-react/layout/widget/tools/button/Back.js.map +0 -1
  524. package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.d.ts +0 -5
  525. package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.d.ts.map +0 -1
  526. package/lib/appui-react/preview/allow-letters-in-accudraw-input-fields/useAllowLettersInAccuDrawInputFields.js.map +0 -1
  527. package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.d.ts +0 -5
  528. package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.d.ts.map +0 -1
  529. package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.js +0 -13
  530. package/lib/appui-react/preview/enable-colorless-accudraw-input-fields/useEnableColorlessAccuDrawInputFields.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-react/ui-items-provider/UiItemsManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAUxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EACL,mCAAmC,EACnC,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AA2CrC;;GAEG;AACH,MAAM,OAAO,cAAc;IAOzB;;OAEG;IACI,MAAM,CAAC,kBAAkB,CAAC,kBAA2B;QAC1D,IAAI,kBAAkB,EAAE,CAAC;YACvB,IAAI,CAAC,gBAAgB,GAAG,mCAAmC,EAAE,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC;IACH,CAAC;IAED;mBACe;IACR,MAAM,CAAC,iBAAiB;QAC7B,IAAI,IAAI,CAAC,gBAAgB;YAAE,OAAO,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;QAE5E,cAAc,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;IAED,wEAAwE;IACxE,mDAAmD;IAC5C,MAAM,KAAK,2BAA2B;QAC3C,IAAI,IAAI,CAAC,gBAAgB;YACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,2BAA2B,CAAC;QAE3D,OAAO,IAAI,CAAC,4BAA4B,CAAC;IAC3C,CAAC;IAED,8CAA8C;IACvC,MAAM,KAAK,qBAAqB;QACrC,IAAI,IAAI,CAAC,gBAAgB;YACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC;QAErD,MAAM,GAAG,GAAG,C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C,CAAC,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;;AA7Rc,0CAA2B,GACxC,IAAI,GAAG,EAA+B,CAAC;AAC1B,2CAA4B,GACzC,IAAI,SAAS,EAAsC,CAAC,CAAC,8CAA8C;AACtF,+BAAgB,GAAG,mCAAmC,EAAE,CAAC;AA4R1E,SAAS,cAAc,CAA2B,KAAmB;IACnE,MAAM,WAAW,GAAQ,EAAE,CAAC;IAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAC;YAAE,OAAO;QAC5E,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,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 UiProvider\n */\n\nimport type { MarkRequired } from \"@itwin/core-bentley\";\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { BackstageItem } from \"../backstage/BackstageItem.js\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation.js\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection.js\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type {\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { Widget } from \"../widgets/Widget.js\";\nimport type { ProviderItem } from \"./ProviderItem.js\";\nimport type { UiItemsProvider } from \"./UiItemsProvider.js\";\nimport {\n createAbstractUiItemsManagerAdapter,\n createGetPropertyAdapter,\n} from \"./AbstractUiItemsManager.js\";\n\n/** UiItemsProvider register event args.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface UiItemsProviderRegisteredEventArgs {\n providerId: string;\n}\n\n/** UiItemsProvider overrides allows the application that registers a provider to limit when it is allowed to provide items\n * @public\n */\nexport interface AllowedUiItemsProviderOverrides {\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages */\n providerId?: string;\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided */\n stageUsages?: string[];\n /** if specified then the current stage's Id will be compared before allowing any items to be provided */\n stageIds?: string[];\n}\n\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\n * items are allowed.\n * @public\n */\nexport type UiItemsProviderOverrides =\n | MarkRequired<AllowedUiItemsProviderOverrides, \"providerId\" | \"stageUsages\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"providerId\" | \"stageIds\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"stageIds\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"stageUsages\">\n | MarkRequired<\n AllowedUiItemsProviderOverrides,\n \"providerId\" | \"stageUsages\" | \"stageIds\"\n >;\n\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\ninterface UiItemProviderEntry {\n provider: UiItemsProvider;\n overrides?: UiItemsProviderOverrides;\n}\n\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\n * @public\n */\nexport class UiItemsManager {\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> =\n new Map<string, UiItemProviderEntry>();\n private static _onUiProviderRegisteredEvent =\n new BeUiEvent<UiItemsProviderRegisteredEventArgs>(); // eslint-disable-line deprecation/deprecation\n private static _abstractAdapter = createAbstractUiItemsManagerAdapter();\n\n /** For use in unit testing\n * @internal\n */\n public static useAbstractAdapter(useAbstractAdapter: boolean) {\n if (useAbstractAdapter) {\n this._abstractAdapter = createAbstractUiItemsManagerAdapter();\n } else {\n this._abstractAdapter = undefined;\n }\n }\n\n /** For use in unit testing\n * @internal */\n public static clearAllProviders() {\n if (this._abstractAdapter) return this._abstractAdapter.clearAllProviders();\n\n UiItemsManager._registeredUiItemsProviders.clear();\n }\n\n /** Event raised any time a UiProvider is registered or unregistered. */\n // eslint-disable-next-line deprecation/deprecation\n public static get onUiProviderRegisteredEvent(): BeUiEvent<UiItemsProviderRegisteredEventArgs> {\n if (this._abstractAdapter)\n return this._abstractAdapter.onUiProviderRegisteredEvent;\n\n return this._onUiProviderRegisteredEvent;\n }\n\n /** Return number of registered UiProvider. */\n public static get registeredProviderIds(): string[] {\n if (this._abstractAdapter)\n return this._abstractAdapter.registeredProviderIds;\n\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\n return ids;\n }\n\n /** Return true if there is any registered UiProvider. */\n public static get hasRegisteredProviders(): boolean {\n if (this._abstractAdapter)\n return this._abstractAdapter.hasRegisteredProviders;\n\n return this._registeredUiItemsProviders.size > 0;\n }\n\n /**\n * Retrieves a previously loaded UiItemsProvider.\n * @param providerId id of the UiItemsProvider to get\n */\n public static getUiItemsProvider(\n providerId: string\n ): UiItemsProvider | undefined {\n if (this._abstractAdapter)\n return this._abstractAdapter.getUiItemsProvider(providerId);\n\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n private static sendRegisteredEvent(args: UiItemsProviderRegisteredEventArgs) {\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(args);\n }\n\n /**\n * Registers a UiItemsProvider with the UiItemsManager.\n * @param uiProvider the UI items provider to register.\n * @param overrides the UI items provider to register.\n */\n public static register(\n uiProvider: UiItemsProvider,\n overrides?: UiItemsProviderOverrides\n ): void {\n if (this._abstractAdapter)\n return this._abstractAdapter.register(uiProvider, overrides);\n\n const providerId = overrides?.providerId ?? uiProvider.id;\n\n if (UiItemsManager.getUiItemsProvider(providerId)) {\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider (${providerId}) is already loaded`\n );\n } else {\n UiItemsManager._registeredUiItemsProviders.set(providerId, {\n provider: uiProvider,\n overrides,\n });\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider ${uiProvider.id} registered as ${providerId} `\n );\n\n UiItemsManager.sendRegisteredEvent({ providerId });\n }\n }\n\n /** Remove a specific UiItemsProvider from the list of available providers. */\n public static unregister(providerId: string): void {\n if (this._abstractAdapter)\n return this._abstractAdapter.unregister(providerId);\n\n const provider = UiItemsManager.getUiItemsProvider(providerId);\n if (!provider) return;\n\n provider.onUnregister && provider.onUnregister();\n\n UiItemsManager._registeredUiItemsProviders.delete(providerId);\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider (${providerId}) unloaded`\n );\n\n // trigger a refresh of the ui\n UiItemsManager.sendRegisteredEvent({ providerId });\n }\n\n private static allowItemsFromProvider(\n entry: UiItemProviderEntry,\n stageId?: string,\n stageUsage?: string\n ) {\n const overrides = entry.overrides;\n if (\n undefined !== stageId &&\n overrides?.stageIds &&\n !overrides.stageIds.some((value: string) => value === stageId)\n )\n return false;\n if (\n undefined !== stageUsage &&\n overrides?.stageUsages &&\n !overrides.stageUsages.some((value: string) => value === stageUsage)\n )\n return false;\n return true;\n }\n\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\n * an action or specify a registered ToolId into toolbar.\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param usage usage of the toolbar\n * @param orientation orientation of the toolbar\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\n */\n public static getToolbarButtonItems(\n stageId: string,\n stageUsage: string,\n usage: ToolbarUsage,\n orientation: ToolbarOrientation\n ): ReadonlyArray<ProviderItem<ToolbarItem>> {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getToolbarButtonItems(\n stageId,\n stageUsage,\n usage,\n orientation\n );\n }\n\n const items: ProviderItem<ToolbarItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n const providerItems = provider\n .provideToolbarItems(stageId, stageUsage, usage, orientation)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\n */\n public static getStatusBarItems(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<ProviderItem<StatusBarItem>> {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getStatusBarItems(stageId, stageUsage);\n }\n\n const items: ProviderItem<StatusBarItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n\n const providerItems = provider\n .provideStatusBarItems(stageId, stageUsage)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\n */\n public static getBackstageItems(): ReadonlyArray<\n ProviderItem<BackstageItem>\n > {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getBackstageItems();\n }\n\n const items: ProviderItem<BackstageItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n // Note: We do not call this.allowItemsFromProvider here as backstage items\n // should not be considered stage specific.\n const providerItems = provider.provideBackstageItems().map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param location the location within the stage.\n * @param section the section within location.\n * @returns An array of widgets.\n */\n public static getWidgets(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection\n ): ReadonlyArray<ProviderItem<Widget>> {\n const items: ProviderItem<Widget>[] = [];\n if (this._abstractAdapter) {\n const abstractWidgets = this._abstractAdapter.getWidgets(\n stageId,\n stageUsage,\n location,\n section\n );\n items.push(...abstractWidgets);\n }\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const provider = createGetPropertyAdapter(uiProvider);\n const providerItems = provider\n .provideWidgets(stageId, stageUsage, location, section)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n}\n\nfunction getUniqueItems<T extends { id: string }>(items: readonly T[]) {\n const uniqueItems: T[] = [];\n items.forEach((item) => {\n if (uniqueItems.find((existingItem) => item.id === existingItem.id)) return;\n uniqueItems.push(item);\n });\n return uniqueItems;\n}\n"]}
1
+ {"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-react/ui-items-provider/UiItemsManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA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sC,CAAC,CAAC,uDAAuD;AAC/F,+BAAgB,GAAG,mCAAmC,EAAE,CAAC;AA4R1E,SAAS,cAAc,CAA2B,KAAmB;IACnE,MAAM,WAAW,GAAQ,EAAE,CAAC;IAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAC;YAAE,OAAO;QAC5E,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,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 UiProvider\n */\n\nimport type { MarkRequired } from \"@itwin/core-bentley\";\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { BackstageItem } from \"../backstage/BackstageItem.js\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation.js\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection.js\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type {\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { Widget } from \"../widgets/Widget.js\";\nimport type { ProviderItem } from \"./ProviderItem.js\";\nimport type { UiItemsProvider } from \"./UiItemsProvider.js\";\nimport {\n createAbstractUiItemsManagerAdapter,\n createGetPropertyAdapter,\n} from \"./AbstractUiItemsManager.js\";\n\n/** UiItemsProvider register event args.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface UiItemsProviderRegisteredEventArgs {\n providerId: string;\n}\n\n/** UiItemsProvider overrides allows the application that registers a provider to limit when it is allowed to provide items\n * @public\n */\nexport interface AllowedUiItemsProviderOverrides {\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages */\n providerId?: string;\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided */\n stageUsages?: string[];\n /** if specified then the current stage's Id will be compared before allowing any items to be provided */\n stageIds?: string[];\n}\n\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\n * items are allowed.\n * @public\n */\nexport type UiItemsProviderOverrides =\n | MarkRequired<AllowedUiItemsProviderOverrides, \"providerId\" | \"stageUsages\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"providerId\" | \"stageIds\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"stageIds\">\n | MarkRequired<AllowedUiItemsProviderOverrides, \"stageUsages\">\n | MarkRequired<\n AllowedUiItemsProviderOverrides,\n \"providerId\" | \"stageUsages\" | \"stageIds\"\n >;\n\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\ninterface UiItemProviderEntry {\n provider: UiItemsProvider;\n overrides?: UiItemsProviderOverrides;\n}\n\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\n * @public\n */\nexport class UiItemsManager {\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> =\n new Map<string, UiItemProviderEntry>();\n private static _onUiProviderRegisteredEvent =\n new BeUiEvent<UiItemsProviderRegisteredEventArgs>(); // eslint-disable-line @typescript-eslint/no-deprecated\n private static _abstractAdapter = createAbstractUiItemsManagerAdapter();\n\n /** For use in unit testing\n * @internal\n */\n public static useAbstractAdapter(useAbstractAdapter: boolean) {\n if (useAbstractAdapter) {\n this._abstractAdapter = createAbstractUiItemsManagerAdapter();\n } else {\n this._abstractAdapter = undefined;\n }\n }\n\n /** For use in unit testing\n * @internal */\n public static clearAllProviders() {\n if (this._abstractAdapter) return this._abstractAdapter.clearAllProviders();\n\n UiItemsManager._registeredUiItemsProviders.clear();\n }\n\n /** Event raised any time a UiProvider is registered or unregistered. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static get onUiProviderRegisteredEvent(): BeUiEvent<UiItemsProviderRegisteredEventArgs> {\n if (this._abstractAdapter)\n return this._abstractAdapter.onUiProviderRegisteredEvent;\n\n return this._onUiProviderRegisteredEvent;\n }\n\n /** Return number of registered UiProvider. */\n public static get registeredProviderIds(): string[] {\n if (this._abstractAdapter)\n return this._abstractAdapter.registeredProviderIds;\n\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\n return ids;\n }\n\n /** Return true if there is any registered UiProvider. */\n public static get hasRegisteredProviders(): boolean {\n if (this._abstractAdapter)\n return this._abstractAdapter.hasRegisteredProviders;\n\n return this._registeredUiItemsProviders.size > 0;\n }\n\n /**\n * Retrieves a previously loaded UiItemsProvider.\n * @param providerId id of the UiItemsProvider to get\n */\n public static getUiItemsProvider(\n providerId: string\n ): UiItemsProvider | undefined {\n if (this._abstractAdapter)\n return this._abstractAdapter.getUiItemsProvider(providerId);\n\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private static sendRegisteredEvent(args: UiItemsProviderRegisteredEventArgs) {\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(args);\n }\n\n /**\n * Registers a UiItemsProvider with the UiItemsManager.\n * @param uiProvider the UI items provider to register.\n * @param overrides the UI items provider to register.\n */\n public static register(\n uiProvider: UiItemsProvider,\n overrides?: UiItemsProviderOverrides\n ): void {\n if (this._abstractAdapter)\n return this._abstractAdapter.register(uiProvider, overrides);\n\n const providerId = overrides?.providerId ?? uiProvider.id;\n\n if (UiItemsManager.getUiItemsProvider(providerId)) {\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider (${providerId}) is already loaded`\n );\n } else {\n UiItemsManager._registeredUiItemsProviders.set(providerId, {\n provider: uiProvider,\n overrides,\n });\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider ${uiProvider.id} registered as ${providerId} `\n );\n\n UiItemsManager.sendRegisteredEvent({ providerId });\n }\n }\n\n /** Remove a specific UiItemsProvider from the list of available providers. */\n public static unregister(providerId: string): void {\n if (this._abstractAdapter)\n return this._abstractAdapter.unregister(providerId);\n\n const provider = UiItemsManager.getUiItemsProvider(providerId);\n if (!provider) return;\n\n provider.onUnregister && provider.onUnregister();\n\n UiItemsManager._registeredUiItemsProviders.delete(providerId);\n Logger.logInfo(\n UiFramework.loggerCategory(\"UiItemsManager\"),\n `UiItemsProvider (${providerId}) unloaded`\n );\n\n // trigger a refresh of the ui\n UiItemsManager.sendRegisteredEvent({ providerId });\n }\n\n private static allowItemsFromProvider(\n entry: UiItemProviderEntry,\n stageId?: string,\n stageUsage?: string\n ) {\n const overrides = entry.overrides;\n if (\n undefined !== stageId &&\n overrides?.stageIds &&\n !overrides.stageIds.some((value: string) => value === stageId)\n )\n return false;\n if (\n undefined !== stageUsage &&\n overrides?.stageUsages &&\n !overrides.stageUsages.some((value: string) => value === stageUsage)\n )\n return false;\n return true;\n }\n\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\n * an action or specify a registered ToolId into toolbar.\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param usage usage of the toolbar\n * @param orientation orientation of the toolbar\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\n */\n public static getToolbarButtonItems(\n stageId: string,\n stageUsage: string,\n usage: ToolbarUsage,\n orientation: ToolbarOrientation\n ): ReadonlyArray<ProviderItem<ToolbarItem>> {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getToolbarButtonItems(\n stageId,\n stageUsage,\n usage,\n orientation\n );\n }\n\n const items: ProviderItem<ToolbarItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n const providerItems = provider\n .provideToolbarItems(stageId, stageUsage, usage, orientation)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\n */\n public static getStatusBarItems(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<ProviderItem<StatusBarItem>> {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getStatusBarItems(stageId, stageUsage);\n }\n\n const items: ProviderItem<StatusBarItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n\n const providerItems = provider\n .provideStatusBarItems(stageId, stageUsage)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\n */\n public static getBackstageItems(): ReadonlyArray<\n ProviderItem<BackstageItem>\n > {\n if (this._abstractAdapter) {\n return this._abstractAdapter.getBackstageItems();\n }\n\n const items: ProviderItem<BackstageItem>[] = [];\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n const provider = createGetPropertyAdapter(uiProvider);\n // Note: We do not call this.allowItemsFromProvider here as backstage items\n // should not be considered stage specific.\n const providerItems = provider.provideBackstageItems().map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\n * @param stageId a string identifier of the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param location the location within the stage.\n * @param section the section within location.\n * @returns An array of widgets.\n */\n public static getWidgets(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection\n ): ReadonlyArray<ProviderItem<Widget>> {\n const items: ProviderItem<Widget>[] = [];\n if (this._abstractAdapter) {\n const abstractWidgets = this._abstractAdapter.getWidgets(\n stageId,\n stageUsage,\n location,\n section\n );\n items.push(...abstractWidgets);\n }\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n if (!this.allowItemsFromProvider(entry, stageId, stageUsage)) return;\n\n const provider = createGetPropertyAdapter(uiProvider);\n const providerItems = provider\n .provideWidgets(stageId, stageUsage, location, section)\n .map((item) => ({\n ...item,\n providerId,\n }));\n items.push(...providerItems);\n });\n\n return getUniqueItems(items);\n }\n}\n\nfunction getUniqueItems<T extends { id: string }>(items: readonly T[]) {\n const uniqueItems: T[] = [];\n items.forEach((item) => {\n if (uniqueItems.find((existingItem) => item.id === existingItem.id)) return;\n uniqueItems.push(item);\n });\n return uniqueItems;\n}\n"]}
@@ -223,11 +223,11 @@ export class FrameworkUiAdmin extends UiAdmin {
223
223
  * @deprecated in 4.11.0. Use {@link UiFramework.showComponent}
224
224
  */
225
225
  showHTMLElement(displayElement, location, offset, onCancel, relativePosition, anchorElement) {
226
- // eslint-disable-next-line deprecation/deprecation
226
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
227
227
  const el = anchorElement ?? UiFramework.controls.getWrapperElement();
228
228
  if (relativePosition === undefined)
229
229
  relativePosition = RelativePosition.TopRight;
230
- // eslint-disable-next-line deprecation/deprecation
230
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
231
231
  return PopupManager.showHTMLElement(displayElement, el, location, offset, onCancel, relativePosition);
232
232
  }
233
233
  /**
@@ -235,7 +235,7 @@ export class FrameworkUiAdmin extends UiAdmin {
235
235
  * @deprecated in 4.11.0. Use {@link UiFramework.hideComponent}
236
236
  */
237
237
  hideHTMLElement() {
238
- // eslint-disable-next-line deprecation/deprecation
238
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
239
239
  return PopupManager.hideHTMLElement();
240
240
  }
241
241
  /** Show a Card containing content, a title and a toolbar at a particular location.
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkUiAdmin.js","sourceRoot":"","sources":["../../../src/appui-react/uiadmin/FrameworkUiAdmin.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAejD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKvD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IAA7C;;QACU,8BAAyB,GAC/B,sBAAsB,CAAC,YAAY,CAAC;IA0exC,CAAC;IAxeC;;OAEG;IACH,IAAW,wBAAwB;QACjC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAED,IAAW,wBAAwB,CAAC,UAAkC;QACpE,IAAI,CAAC,yBAAyB,GAA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CAAC;IAED,yCAAyC;IACzB,sBAAsB;QACpC,OAAO,WAAW,CAAC,sBAAsB,EAAE,CAAC;IAC9C,CAAC;IAED;;;;;;;OAOG;IACa,UAAU,CACxB,cAAwC,EACxC,KAAa,EACb,OAAgB,EAChB,EAAU,EACV,aAA2B;QAE3B,OAAO,WAAW,CAAC,UAAU,CAC3B,cAAc,EACd,KAAK,EACL,OAAO,EACP,EAAE,EACF,aAAa,CACd,CAAC;IACJ,CAAC;IAED,wCAAwC;IACxB,WAAW,CAAC,QAAgB;QAC1C,OAAO,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;CACF;AAED,+CAA+C;AAC/C,SAAS,kCAAkC,CACzC,KAA2B;IAE3B,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,8BAA8B,CAAC;QACtD,MAAM,EAAE,KAAK,CAAC,SAAS;KACxB,CAAC;AACJ,CAAC;AAED,SAAS,8BAA8B,CAAC,IAAuB;IAC7D,OAAO;QACL,GAAG,IAAI;QACP,KAAK,EAAE,IAAI,CAAC,SAAS;KACtB,CAAC;AACJ,CAAC;AAMD,SAAS,YAAY,CAAC,EAAE,OAAO,EAAqB;IAClD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QACzB,OAAO,GAAG,EAAE;YACV,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,6BAAK,GAAG,EAAE,GAAG,GAAI,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 Admin\n */\n\nimport * as React from \"react\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type {\n AbstractMenuItemProps,\n AbstractToolbarProps,\n CommonToolbarItem,\n DialogLayoutDataProvider,\n DialogProps,\n OnCancelFunc,\n OnItemExecutedFunc,\n OnNumberCommitFunc,\n OnValueCommitFunc,\n Primitives,\n PropertyDescription,\n PropertyRecord,\n} from \"@itwin/appui-abstract\";\nimport { RelativePosition, UiAdmin } from \"@itwin/appui-abstract\";\nimport { CursorInformation } from \"../cursor/CursorInformation.js\";\nimport { PopupManager } from \"../popup/PopupManager.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { KeyinEntry } from \"../keyins/Keyins.js\";\nimport {\n getKeyinsFromToolList,\n KeyinFieldLocalization,\n} from \"../keyins/Keyins.js\";\nimport { mapToPlacement } from \"../utils/Placement.js\";\nimport type { ToolbarProps } from \"../toolbar/Toolbar.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type { CursorMenuItemProps } from \"../shared/MenuItem.js\";\n\n/** Subclass of `UiAdmin` in `@itwin/core-frontend` to be used to initialize `IModelApp`.\n *\n * This implementation uses themed react components that blends in AppUI look and feel.\n *\n * ```ts\n * await IModelApp.startup({\n * uiAdmin: new FrameworkUiAdmin()\n * });\n * ```\n * @public\n */\nexport class FrameworkUiAdmin extends UiAdmin {\n private _localizedKeyinPreference: KeyinFieldLocalization =\n KeyinFieldLocalization.NonLocalized;\n\n /**\n * @deprecated in 4.11.0. Gathering and filtering of keyins is now left up to the user.\n */\n public get localizedKeyinPreference(): KeyinFieldLocalization {\n return this._localizedKeyinPreference;\n }\n\n public set localizedKeyinPreference(preference: KeyinFieldLocalization) {\n this._localizedKeyinPreference = preference;\n }\n\n /** Gets the cursor X and Y position, which is mouseEvent.pageX and mouseEvent.pageY.\n * @deprecated in 4.11.0. Please use {@link CursorInformation.cursorPosition}\n */\n public override get cursorPosition(): XAndY {\n return CursorInformation.cursorPosition;\n }\n\n /** Determines if focus is set to Home\n * @deprecated in 4.11.0. Please use {@link UiFramework.keyboardShortcuts().isFocusOnHome}\n */\n public override get isFocusOnHome(): boolean {\n return UiFramework.keyboardShortcuts.isFocusOnHome;\n }\n\n /** Sets focus to Home\n * @deprecated in 4.11.0. Please use {@link UiFramework.keyboardShortcuts().setFocusToHome}\n */\n public override setFocusToHome(): void {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }\n\n /** Show a context menu at a particular location.\n * @param items Properties of the menu items to display.\n * @param location Location of the context menu, relative to the origin of htmlElement or the overall window.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.openContextMenu}\n */\n public override showContextMenu(\n items: AbstractMenuItemProps[],\n location: XAndY,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.openContextMenu(\n items as CursorMenuItemProps[],\n location,\n htmlElement\n );\n }\n\n /**\n * @deprecated in 4.11.0. Construct your own {@link KeyinEntry[]} via {@link @itwin/core-frontend#IModelApp.tools.getToolList}.\n */\n public getKeyins(): KeyinEntry[] {\n const tools = IModelApp.tools.getToolList();\n return getKeyinsFromToolList(tools);\n }\n\n /** Show the Key-in Palette to display key-in from all registered Tools.\n * @param htmlElement The HTMLElement that anchors the Popup. If undefined, the location is relative to the overall window.\n * @return true if the Command Palette was displayed, false if it could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showKeyinPalette}. Please note, the use of feature flags to control whether the KeyinPalette can be opened has been deprecated.\n */\n public override showKeyinPalette(htmlElement?: HTMLElement): boolean {\n if (!this.featureFlags.allowKeyinPalette) return false;\n\n const tools = IModelApp.tools.getToolList();\n const keyIns = getKeyinsFromToolList(tools);\n\n return UiFramework.showKeyinPalette(keyIns, htmlElement);\n }\n\n /**\n * Hides the Key-in Palette.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideKeyinPalette}\n */\n public override hideKeyinPalette(): boolean {\n if (!this.featureFlags.allowKeyinPalette) return false;\n\n return UiFramework.hideKeyinPalette();\n }\n\n /** Show a Toolbar at a particular location.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Toolbar, relative to the origin of htmlElement or the overall window.\n * @param offset Offset of the Toolbar from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\n * @deprecated in 4.11.0. Please use {@link UiFramework.showToolbar}.\n */\n public override showToolbar(\n toolbarProps: AbstractToolbarProps,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n htmlElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n\n return UiFramework.showToolbar(\n toolbarProps,\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n htmlElement\n );\n }\n\n /** Hides the toolbar.\n * @deprecated in 4.11.0. Please use {@link UiFramework.hideToolbar}.\n */\n public override hideToolbar(): boolean {\n return UiFramework.hideToolbar();\n }\n\n /** Show a menu button at a particular location. A menu button opens a context menu.\n * @param id Id of the menu button. Multiple menu buttons may be displayed.\n * @param menuItemsProps Properties of the menu items to display.\n * @param location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Please use {@link UiFramework.showMenuButton}.\n */\n public override showMenuButton(\n id: string,\n menuItemsProps: AbstractMenuItemProps[],\n location: XAndY,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showMenuButton(\n id,\n menuItemsProps as CursorMenuItemProps[],\n location,\n htmlElement\n );\n }\n\n /** Hides a menu button.\n * @param id Id of the menu button. Multiple menu buttons may be displayed.\n * @return true if the menu was hidden, false if the menu could not be hidden.\n * @deprecated in 4.11.0. Please use {@link UiFramework.hideMenuButton}.\n */\n public override hideMenuButton(id: string): boolean {\n return UiFramework.hideMenuButton(id);\n }\n\n /** Show a calculator at a particular location.\n * @param initialValue Value initially displayed in the calculator.\n * @param resultIcon Icon displayed to the left of the value.\n * @param location Location of the calculator, relative to the origin of htmlElement or the window.\n * @param onOk Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showCalculator}.\n */\n public override showCalculator(\n initialValue: number,\n resultIcon: string,\n location: XAndY,\n onOk: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showCalculator(\n initialValue,\n resultIcon,\n location,\n onOk,\n onCancel,\n htmlElement\n );\n }\n\n /** Hides the calculator.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideCalculator}.\n */\n public override hideCalculator(): boolean {\n return UiFramework.hideCalculator();\n }\n\n /** Show an input editor for an angle value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showAngleEditor}.\n */\n public override showAngleEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showAngleEditor(\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a length value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showDimensionEditor(\"length\")}.\n */\n public override showLengthEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showDimensionEditor(\n \"length\",\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a height value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showDimensionEditor(\"height\")}.\n */\n public override showHeightEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showDimensionEditor(\n \"height\",\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a primitive value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param propertyDescription Description of the primitive value property\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public override showInputEditor(\n initialValue: Primitives.Value,\n propertyDescription: PropertyDescription,\n location: XAndY,\n onCommit: OnValueCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showInputEditor({\n initialValue,\n propertyDescription,\n location,\n onCommit,\n onCancel,\n anchorElement: htmlElement,\n });\n }\n\n /** Hides the input editor.*/\n public override hideInputEditor(): boolean {\n return UiFramework.hideInputEditor();\n }\n\n /** Show an HTML element at a particular location.\n * @param displayElement The HTMLElement to display\n * @param location Location of the display element, relative to the origin of htmlElement or the window\n * @param offset Offset of the display element from the location\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\n * @return true if the display element was displayed, false if the display element could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showComponent}\n */\n public override showHTMLElement(\n displayElement: HTMLElement,\n location: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n // eslint-disable-next-line deprecation/deprecation\n const el = anchorElement ?? UiFramework.controls.getWrapperElement();\n\n if (relativePosition === undefined)\n relativePosition = RelativePosition.TopRight;\n\n // eslint-disable-next-line deprecation/deprecation\n return PopupManager.showHTMLElement(\n displayElement,\n el,\n location,\n offset,\n onCancel,\n relativePosition\n );\n }\n\n /**\n * Hides the HTML Element.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideComponent}\n */\n public override hideHTMLElement(): boolean {\n // eslint-disable-next-line deprecation/deprecation\n return PopupManager.hideHTMLElement();\n }\n\n /** Show a Card containing content, a title and a toolbar at a particular location.\n * @param content The HTMLElement of the content to display\n * @param title Title to display at the top of the card.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Card, relative to the origin of htmlElement or the window.\n * @param offset Offset of the Card from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public override showCard(\n content: HTMLElement,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.showCard(\n <CardRenderer content={content} />,\n title,\n toolbarProps\n ? AbstractToolbarPropsToToolbarProps(toolbarProps)\n : { items: [] },\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /** Show a Card containing React-based content, a title and a toolbar at a particular location.\n * @param content The React node of the content to display\n * @param title Title to display at the top of the card.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Card, relative to the origin of htmlElement or the window.\n * @param offset Offset of the Card from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public showReactCard(\n content: React.ReactNode,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.showCard(\n content,\n title,\n toolbarProps\n ? AbstractToolbarPropsToToolbarProps(toolbarProps)\n : { items: [] },\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /**\n * Hides the Card.\n * */\n public override hideCard(): boolean {\n return UiFramework.hideCard();\n }\n\n /** Opens a Tool Settings Ui popup at a particular location.\n * @param dataProvider The DialogLayoutDataProvider for the tool settings popup dialog.\n * @param location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param offset Offset of the tool settings from the location\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public override openToolSettingsPopup(\n dataProvider: DialogLayoutDataProvider,\n location: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.openToolSettingsPopup(\n dataProvider,\n location,\n offset,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /** Closes the Tool Settings Ui popup. */\n public override closeToolSettingsPopup(): boolean {\n return UiFramework.closeToolSettingsPopup();\n }\n\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\n * @param uiDataProvider The UiDataProvider for the tool settings\n * @param title Specify title for dialog.\n * @param isModal Specify if the dialog is opened as a modal or modeless.\n * @param id Id of the dialog that is used to close it.\n * @param optionalProps Optional props for Dialog construction.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public override openDialog(\n uiDataProvider: DialogLayoutDataProvider,\n title: string,\n isModal: boolean,\n id: string,\n optionalProps?: DialogProps\n ): boolean {\n return UiFramework.openDialog(\n uiDataProvider,\n title,\n isModal,\n id,\n optionalProps\n );\n }\n\n /** Closes the Tool Settings Ui popup.*/\n public override closeDialog(dialogId: string): boolean {\n return UiFramework.closeDialog(dialogId);\n }\n}\n\n// utility functions to wean off appui-abstract\nfunction AbstractToolbarPropsToToolbarProps(\n props: AbstractToolbarProps\n): ToolbarProps {\n return {\n items: props.items.map(CommonToolbarItemToToolBarItem),\n itemId: props.toolbarId,\n };\n}\n\nfunction CommonToolbarItemToToolBarItem(item: CommonToolbarItem): ToolbarItem {\n return {\n ...item,\n badge: item.badgeType,\n };\n}\n\ninterface CardRendererProps {\n content: HTMLElement;\n}\n\nfunction CardRenderer({ content }: CardRendererProps) {\n const ref = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const el = ref.current;\n el?.appendChild(content);\n return () => {\n el?.removeChild(content);\n };\n }, [content]);\n\n return <div ref={ref} />;\n}\n"]}
1
+ {"version":3,"file":"FrameworkUiAdmin.js","sourceRoot":"","sources":["../../../src/appui-react/uiadmin/FrameworkUiAdmin.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAejD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKvD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IAA7C;;QACU,8BAAyB,GAC/B,sBAAsB,CAAC,YAAY,CAAC;IA0exC,CAAC;IAxeC;;OAEG;IACH,IAAW,wBAAwB;QACjC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAED,IAAW,wB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---------------------------------------------------------------------------------------------\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 Admin\n */\n\nimport * as React from \"react\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type {\n AbstractMenuItemProps,\n AbstractToolbarProps,\n CommonToolbarItem,\n DialogLayoutDataProvider,\n DialogProps,\n OnCancelFunc,\n OnItemExecutedFunc,\n OnNumberCommitFunc,\n OnValueCommitFunc,\n Primitives,\n PropertyDescription,\n PropertyRecord,\n} from \"@itwin/appui-abstract\";\nimport { RelativePosition, UiAdmin } from \"@itwin/appui-abstract\";\nimport { CursorInformation } from \"../cursor/CursorInformation.js\";\nimport { PopupManager } from \"../popup/PopupManager.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { KeyinEntry } from \"../keyins/Keyins.js\";\nimport {\n getKeyinsFromToolList,\n KeyinFieldLocalization,\n} from \"../keyins/Keyins.js\";\nimport { mapToPlacement } from \"../utils/Placement.js\";\nimport type { ToolbarProps } from \"../toolbar/Toolbar.js\";\nimport type { ToolbarItem } from \"../toolbar/ToolbarItem.js\";\nimport type { CursorMenuItemProps } from \"../shared/MenuItem.js\";\n\n/** Subclass of `UiAdmin` in `@itwin/core-frontend` to be used to initialize `IModelApp`.\n *\n * This implementation uses themed react components that blends in AppUI look and feel.\n *\n * ```ts\n * await IModelApp.startup({\n * uiAdmin: new FrameworkUiAdmin()\n * });\n * ```\n * @public\n */\nexport class FrameworkUiAdmin extends UiAdmin {\n private _localizedKeyinPreference: KeyinFieldLocalization =\n KeyinFieldLocalization.NonLocalized;\n\n /**\n * @deprecated in 4.11.0. Gathering and filtering of keyins is now left up to the user.\n */\n public get localizedKeyinPreference(): KeyinFieldLocalization {\n return this._localizedKeyinPreference;\n }\n\n public set localizedKeyinPreference(preference: KeyinFieldLocalization) {\n this._localizedKeyinPreference = preference;\n }\n\n /** Gets the cursor X and Y position, which is mouseEvent.pageX and mouseEvent.pageY.\n * @deprecated in 4.11.0. Please use {@link CursorInformation.cursorPosition}\n */\n public override get cursorPosition(): XAndY {\n return CursorInformation.cursorPosition;\n }\n\n /** Determines if focus is set to Home\n * @deprecated in 4.11.0. Please use {@link UiFramework.keyboardShortcuts().isFocusOnHome}\n */\n public override get isFocusOnHome(): boolean {\n return UiFramework.keyboardShortcuts.isFocusOnHome;\n }\n\n /** Sets focus to Home\n * @deprecated in 4.11.0. Please use {@link UiFramework.keyboardShortcuts().setFocusToHome}\n */\n public override setFocusToHome(): void {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }\n\n /** Show a context menu at a particular location.\n * @param items Properties of the menu items to display.\n * @param location Location of the context menu, relative to the origin of htmlElement or the overall window.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.openContextMenu}\n */\n public override showContextMenu(\n items: AbstractMenuItemProps[],\n location: XAndY,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.openContextMenu(\n items as CursorMenuItemProps[],\n location,\n htmlElement\n );\n }\n\n /**\n * @deprecated in 4.11.0. Construct your own {@link KeyinEntry[]} via {@link @itwin/core-frontend#IModelApp.tools.getToolList}.\n */\n public getKeyins(): KeyinEntry[] {\n const tools = IModelApp.tools.getToolList();\n return getKeyinsFromToolList(tools);\n }\n\n /** Show the Key-in Palette to display key-in from all registered Tools.\n * @param htmlElement The HTMLElement that anchors the Popup. If undefined, the location is relative to the overall window.\n * @return true if the Command Palette was displayed, false if it could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showKeyinPalette}. Please note, the use of feature flags to control whether the KeyinPalette can be opened has been deprecated.\n */\n public override showKeyinPalette(htmlElement?: HTMLElement): boolean {\n if (!this.featureFlags.allowKeyinPalette) return false;\n\n const tools = IModelApp.tools.getToolList();\n const keyIns = getKeyinsFromToolList(tools);\n\n return UiFramework.showKeyinPalette(keyIns, htmlElement);\n }\n\n /**\n * Hides the Key-in Palette.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideKeyinPalette}\n */\n public override hideKeyinPalette(): boolean {\n if (!this.featureFlags.allowKeyinPalette) return false;\n\n return UiFramework.hideKeyinPalette();\n }\n\n /** Show a Toolbar at a particular location.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Toolbar, relative to the origin of htmlElement or the overall window.\n * @param offset Offset of the Toolbar from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\n * @deprecated in 4.11.0. Please use {@link UiFramework.showToolbar}.\n */\n public override showToolbar(\n toolbarProps: AbstractToolbarProps,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n htmlElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n\n return UiFramework.showToolbar(\n toolbarProps,\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n htmlElement\n );\n }\n\n /** Hides the toolbar.\n * @deprecated in 4.11.0. Please use {@link UiFramework.hideToolbar}.\n */\n public override hideToolbar(): boolean {\n return UiFramework.hideToolbar();\n }\n\n /** Show a menu button at a particular location. A menu button opens a context menu.\n * @param id Id of the menu button. Multiple menu buttons may be displayed.\n * @param menuItemsProps Properties of the menu items to display.\n * @param location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Please use {@link UiFramework.showMenuButton}.\n */\n public override showMenuButton(\n id: string,\n menuItemsProps: AbstractMenuItemProps[],\n location: XAndY,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showMenuButton(\n id,\n menuItemsProps as CursorMenuItemProps[],\n location,\n htmlElement\n );\n }\n\n /** Hides a menu button.\n * @param id Id of the menu button. Multiple menu buttons may be displayed.\n * @return true if the menu was hidden, false if the menu could not be hidden.\n * @deprecated in 4.11.0. Please use {@link UiFramework.hideMenuButton}.\n */\n public override hideMenuButton(id: string): boolean {\n return UiFramework.hideMenuButton(id);\n }\n\n /** Show a calculator at a particular location.\n * @param initialValue Value initially displayed in the calculator.\n * @param resultIcon Icon displayed to the left of the value.\n * @param location Location of the calculator, relative to the origin of htmlElement or the window.\n * @param onOk Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showCalculator}.\n */\n public override showCalculator(\n initialValue: number,\n resultIcon: string,\n location: XAndY,\n onOk: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showCalculator(\n initialValue,\n resultIcon,\n location,\n onOk,\n onCancel,\n htmlElement\n );\n }\n\n /** Hides the calculator.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideCalculator}.\n */\n public override hideCalculator(): boolean {\n return UiFramework.hideCalculator();\n }\n\n /** Show an input editor for an angle value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showAngleEditor}.\n */\n public override showAngleEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showAngleEditor(\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a length value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showDimensionEditor(\"length\")}.\n */\n public override showLengthEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showDimensionEditor(\n \"length\",\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a height value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showDimensionEditor(\"height\")}.\n */\n public override showHeightEditor(\n initialValue: number,\n location: XAndY,\n onCommit: OnNumberCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showDimensionEditor(\n \"height\",\n initialValue,\n location,\n onCommit,\n onCancel,\n htmlElement\n );\n }\n\n /** Show an input editor for a primitive value at a particular location.\n * @param initialValue Value initially displayed in the editor.\n * @param propertyDescription Description of the primitive value property\n * @param location Location of the editor, relative to the origin of htmlElement or the window.\n * @param onCommit Function called when the OK button or the Enter key is pressed.\n * @param onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public override showInputEditor(\n initialValue: Primitives.Value,\n propertyDescription: PropertyDescription,\n location: XAndY,\n onCommit: OnValueCommitFunc,\n onCancel: OnCancelFunc,\n htmlElement?: HTMLElement\n ): boolean {\n return UiFramework.showInputEditor({\n initialValue,\n propertyDescription,\n location,\n onCommit,\n onCancel,\n anchorElement: htmlElement,\n });\n }\n\n /** Hides the input editor.*/\n public override hideInputEditor(): boolean {\n return UiFramework.hideInputEditor();\n }\n\n /** Show an HTML element at a particular location.\n * @param displayElement The HTMLElement to display\n * @param location Location of the display element, relative to the origin of htmlElement or the window\n * @param offset Offset of the display element from the location\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\n * @return true if the display element was displayed, false if the display element could not be displayed.\n * @deprecated in 4.11.0. Use {@link UiFramework.showComponent}\n */\n public override showHTMLElement(\n displayElement: HTMLElement,\n location: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const el = anchorElement ?? UiFramework.controls.getWrapperElement();\n\n if (relativePosition === undefined)\n relativePosition = RelativePosition.TopRight;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return PopupManager.showHTMLElement(\n displayElement,\n el,\n location,\n offset,\n onCancel,\n relativePosition\n );\n }\n\n /**\n * Hides the HTML Element.\n * @deprecated in 4.11.0. Use {@link UiFramework.hideComponent}\n */\n public override hideHTMLElement(): boolean {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return PopupManager.hideHTMLElement();\n }\n\n /** Show a Card containing content, a title and a toolbar at a particular location.\n * @param content The HTMLElement of the content to display\n * @param title Title to display at the top of the card.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Card, relative to the origin of htmlElement or the window.\n * @param offset Offset of the Card from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public override showCard(\n content: HTMLElement,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.showCard(\n <CardRenderer content={content} />,\n title,\n toolbarProps\n ? AbstractToolbarPropsToToolbarProps(toolbarProps)\n : { items: [] },\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /** Show a Card containing React-based content, a title and a toolbar at a particular location.\n * @param content The React node of the content to display\n * @param title Title to display at the top of the card.\n * @param toolbarProps Properties of the Toolbar to display.\n * @param location Location of the Card, relative to the origin of htmlElement or the window.\n * @param offset Offset of the Card from the location.\n * @param onItemExecuted Function invoked after a Toolbar item is executed\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public showReactCard(\n content: React.ReactNode,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n location: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.showCard(\n content,\n title,\n toolbarProps\n ? AbstractToolbarPropsToToolbarProps(toolbarProps)\n : { items: [] },\n location,\n offset,\n onItemExecuted,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /**\n * Hides the Card.\n * */\n public override hideCard(): boolean {\n return UiFramework.hideCard();\n }\n\n /** Opens a Tool Settings Ui popup at a particular location.\n * @param dataProvider The DialogLayoutDataProvider for the tool settings popup dialog.\n * @param location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param offset Offset of the tool settings from the location\n * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\n * @param relativePosition Position relative to the given location. Defaults to TopRight.\n * @param anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public override openToolSettingsPopup(\n dataProvider: DialogLayoutDataProvider,\n location: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition?: RelativePosition,\n anchorElement?: HTMLElement\n ): boolean {\n const placement = mapToPlacement(relativePosition);\n return UiFramework.openToolSettingsPopup(\n dataProvider,\n location,\n offset,\n onCancel,\n placement,\n anchorElement\n );\n }\n\n /** Closes the Tool Settings Ui popup. */\n public override closeToolSettingsPopup(): boolean {\n return UiFramework.closeToolSettingsPopup();\n }\n\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\n * @param uiDataProvider The UiDataProvider for the tool settings\n * @param title Specify title for dialog.\n * @param isModal Specify if the dialog is opened as a modal or modeless.\n * @param id Id of the dialog that is used to close it.\n * @param optionalProps Optional props for Dialog construction.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public override openDialog(\n uiDataProvider: DialogLayoutDataProvider,\n title: string,\n isModal: boolean,\n id: string,\n optionalProps?: DialogProps\n ): boolean {\n return UiFramework.openDialog(\n uiDataProvider,\n title,\n isModal,\n id,\n optionalProps\n );\n }\n\n /** Closes the Tool Settings Ui popup.*/\n public override closeDialog(dialogId: string): boolean {\n return UiFramework.closeDialog(dialogId);\n }\n}\n\n// utility functions to wean off appui-abstract\nfunction AbstractToolbarPropsToToolbarProps(\n props: AbstractToolbarProps\n): ToolbarProps {\n return {\n items: props.items.map(CommonToolbarItemToToolBarItem),\n itemId: props.toolbarId,\n };\n}\n\nfunction CommonToolbarItemToToolBarItem(item: CommonToolbarItem): ToolbarItem {\n return {\n ...item,\n badge: item.badgeType,\n };\n}\n\ninterface CardRendererProps {\n content: HTMLElement;\n}\n\nfunction CardRenderer({ content }: CardRendererProps) {\n const ref = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const el = ref.current;\n el?.appendChild(content);\n return () => {\n el?.removeChild(content);\n };\n }, [content]);\n\n return <div ref={ref} />;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentGenerator.d.ts","sourceRoot":"","sources":["../../../src/appui-react/uiprovider/ComponentGenerator.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAE3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAKV,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAkL1E;;GAEG;AACH,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,SAAS,CAAC;gBADV,eAAe,EAAE,oBAAoB,EACrC,SAAS,CAAC,SAAQ,IAAI,aAAA;IAGhC,IAAW,cAAc,yBAExB;IAED,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,iCAAiC;IA2BzC,OAAO,CAAC,mCAAmC;IAiC3C,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,uBAAuB;IAkB/B,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E;CAKrD"}
@@ -30,7 +30,7 @@ export class AppUiSettings {
30
30
  // always store to local storage to avoid flicker during startup if user is not yet logged-in
31
31
  window.localStorage.setItem("uifw:defaultTheme", theme);
32
32
  };
33
- // eslint-disable-next-line deprecation/deprecation
33
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
34
34
  this.handleSyncUiEvent = async (args) => {
35
35
  if (this._applyingLocalSettings)
36
36
  return;
@@ -75,7 +75,7 @@ export class AppUiSettings {
75
75
  }
76
76
  async apply(storage) {
77
77
  this._applyingLocalSettings = true;
78
- for await (const setting of this._settings) {
78
+ for (const setting of this._settings) {
79
79
  await setting.getSettingAndApplyValue(storage);
80
80
  }
81
81
  this._applyingLocalSettings = false;
@@ -1 +1 @@
1
- {"version":3,"file":"AppUiSettings.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAoBzE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAa;IAsBxB,YAAY,QAAuC;QArBnC,eAAU,GAAG,uBAAuB,CAAC;QAG7C,cAAS,GAA6B,EAAE,CAAC;QACzC,2BAAsB,GAAG,KAAK,CAAC;QAW/B,kBAAa,GAAG,CAAC,KAAc,EAAE,EAAE;YACzC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjC,6FAA6F;YAC7F,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC;QAgFF,mDAAmD;QAC3C,sBAAiB,GAAG,KAAK,EAAE,IAAqB,EAAE,EAAE;YAC1D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IAAI,CAAC,0BAA0B,CAAC,CAAC;QAErD,IAAI,CAAC,cAAc,GAAG,IAAI,YAAY,CACpC,aAAa,CAAC,iBAAiB,EAC/B,aAAa,EACb,GAAG,EAAE,CAAC,WAAW,CAAC,iBAAiB,EAAE,EACrC,CAAC,KAAa,EAAE,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,EACvD,QAAQ,CAAC,cAAc,CACxB,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAEzC,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IA2CM,KAAK,CAAC,KAAK,CAAC,OAAuB;QACxC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC3C,MAAM,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAuB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;;AApJc,+BAAiB,GAAG,eAAe,AAAlB,CAAmB","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 Settings\n */\n\nimport type { UiStateStorage } from \"@itwin/core-react\";\nimport { UiStateEntry } from \"@itwin/core-react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher.js\";\nimport type { UserSettingsProvider } from \"../UiFramework.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent.js\";\nimport type { ThemeId } from \"../theme/ThemeId.js\";\nimport { ConfigurableUiActionId } from \"../redux/ConfigurableUiState.js\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Default values that may be specified for [[AppUiSettings]].\n * @public\n * @deprecated in 4.15.0. Interface used in a deprecated class {@link AppUiSettings}.\n */\nexport interface InitialAppUiSettings {\n colorTheme: ThemeId;\n dragInteraction: boolean;\n widgetOpacity: number;\n showWidgetIcon?: boolean;\n /** @alpha */\n autoCollapseUnpinnedPanels?: boolean;\n animateToolSettings?: boolean;\n useToolAsToolSettingsLabel?: boolean;\n toolbarOpacity: number;\n}\n\n/** These are the UI settings that are stored in the Redux store. They control the color theme,\n * how toolbar group buttons work, and the opacity of floating widget when the cursor\n * is not inside them. It is expect that an IModelApp using App UI components will create and register AppUiSettings with\n * defaults specific to their application. This would be done by calling the following.\n *\n * ```ts\n * UiFramework.registerUserSettingsProvider(new AppUiSettings(defaults));\n * ```\n * @public\n * @deprecated in 4.15.0. Use {@link @itwin/core-react#UiStateStorage} to persist UI settings.\n */\nexport class AppUiSettings implements UserSettingsProvider {\n public readonly providerId = \"AppUiSettingsProvider\";\n\n private static _settingNamespace = \"AppUiSettings\";\n private _settings: Array<UiStateEntry<any>> = [];\n private _applyingLocalSettings = false;\n\n public colorTheme: UiStateEntry<ThemeId>;\n public dragInteraction: UiStateEntry<boolean>;\n public widgetOpacity: UiStateEntry<number>;\n public showWidgetIcon: UiStateEntry<boolean>;\n public autoCollapseUnpinnedPanels: UiStateEntry<boolean>;\n public animateToolSettings: UiStateEntry<boolean>;\n public useToolAsToolSettingsLabel: UiStateEntry<boolean>;\n public toolbarOpacity: UiStateEntry<number>;\n\n private setColorTheme = (theme: ThemeId) => {\n UiFramework.setColorTheme(theme);\n // always store to local storage to avoid flicker during startup if user is not yet logged-in\n window.localStorage.setItem(\"uifw:defaultTheme\", theme);\n };\n\n constructor(defaults: Partial<InitialAppUiSettings>) {\n this._settings = [];\n\n this.colorTheme = new UiStateEntry<ThemeId>(\n AppUiSettings._settingNamespace,\n \"ColorTheme\",\n UiFramework.getColorTheme,\n this.setColorTheme,\n defaults.colorTheme\n );\n this._settings.push(this.colorTheme);\n\n this.dragInteraction = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"DragInteraction\",\n () => UiFramework.useDragInteraction,\n (value: boolean) => UiFramework.setUseDragInteraction(value),\n defaults.dragInteraction\n );\n this._settings.push(this.dragInteraction);\n\n this.showWidgetIcon = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"ShowWidgetIcon\",\n () => UiFramework.showWidgetIcon,\n (value: boolean) => UiFramework.setShowWidgetIcon(value),\n defaults.showWidgetIcon\n );\n this._settings.push(this.showWidgetIcon);\n\n this.autoCollapseUnpinnedPanels = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"AutoCollapseUnpinnedPanels\",\n () => UiFramework.autoCollapseUnpinnedPanels,\n (value: boolean) => UiFramework.setAutoCollapseUnpinnedPanels(value),\n defaults.autoCollapseUnpinnedPanels\n );\n this._settings.push(this.autoCollapseUnpinnedPanels);\n\n this.widgetOpacity = new UiStateEntry<number>(\n AppUiSettings._settingNamespace,\n \"WidgetOpacity\",\n () => UiFramework.getWidgetOpacity(),\n (value: number) => UiFramework.setWidgetOpacity(value),\n defaults.widgetOpacity\n );\n this._settings.push(this.widgetOpacity);\n\n this.animateToolSettings = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"AnimateToolSettings\",\n () => UiFramework.animateToolSettings,\n (value: boolean) => UiFramework.setAnimateToolSettings(value),\n defaults.animateToolSettings\n );\n this._settings.push(this.animateToolSettings);\n\n this.useToolAsToolSettingsLabel = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"UseToolAsToolSettingsLabel\",\n () => UiFramework.useToolAsToolSettingsLabel,\n (value: boolean) => UiFramework.setUseToolAsToolSettingsLabel(value),\n defaults.useToolAsToolSettingsLabel\n );\n this._settings.push(this.useToolAsToolSettingsLabel);\n\n this.toolbarOpacity = new UiStateEntry<number>(\n AppUiSettings._settingNamespace,\n \"ToolOpacity\",\n () => UiFramework.getToolbarOpacity(),\n (value: number) => UiFramework.setToolbarOpacity(value),\n defaults.toolbarOpacity\n );\n this._settings.push(this.toolbarOpacity);\n\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this.handleSyncUiEvent);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n private handleSyncUiEvent = async (args: UiSyncEventArgs) => {\n if (this._applyingLocalSettings) return;\n\n if (args.eventIds.has(ConfigurableUiActionId.SetTheme)) {\n await this.colorTheme.saveSetting(UiFramework.getUiStateStorage());\n // always store as default theme in local storage to avoid flicker during startup if user is not yet logged-in\n window.localStorage.setItem(\n \"uifw:defaultTheme\",\n UiFramework.getColorTheme()\n );\n }\n\n if (args.eventIds.has(ConfigurableUiActionId.SetDragInteraction))\n await this.dragInteraction.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.SetShowWidgetIcon))\n await this.showWidgetIcon.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.AutoCollapseUnpinnedPanels))\n await this.autoCollapseUnpinnedPanels.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.SetWidgetOpacity))\n await this.widgetOpacity.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.AnimateToolSettings))\n await this.animateToolSettings.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.UseToolAsToolSettingsLabel))\n await this.useToolAsToolSettingsLabel.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.SetToolbarOpacity))\n await this.toolbarOpacity.saveSetting(UiFramework.getUiStateStorage());\n };\n\n public async apply(storage: UiStateStorage): Promise<void> {\n this._applyingLocalSettings = true;\n for await (const setting of this._settings) {\n await setting.getSettingAndApplyValue(storage);\n }\n this._applyingLocalSettings = false;\n }\n\n public async loadUserSettings(storage: UiStateStorage): Promise<void> {\n await this.apply(storage);\n }\n}\n"]}
1
+ {"version":3,"file":"AppUiSettings.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAoBzE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAa;IAsBxB,YAAY,QAAuC;QArBnC,eAAU,GAAG,uBAAuB,CAAC;QAG7C,cAAS,GAA6B,EAAE,CAAC;QACzC,2BAAsB,GAAG,KAAK,CAAC;QAW/B,kBAAa,GAAG,CAAC,KAAc,EAAE,EAAE;YACzC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjC,6FAA6F;YAC7F,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC;QAgFF,4DAA4D;QACpD,sBAAiB,GAAG,KAAK,EAAE,IAAqB,EAAE,EAAE;YAC1D,IAAI,IAAI,CAAC,sBAAsB;gBAAE,OAAO;YAExC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACvD,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;gBACnE,8GAA8G;gBAC9G,MAAM,CAAC,YAAY,CAAC,OAAO,CACzB,mBAAmB,EACnB,WAAW,CAAC,aAAa,EAAE,CAC5B,CAAC;YACJ,C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AC,CAAC;QAEzC,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IA2CM,KAAK,CAAC,KAAK,CAAC,OAAuB;QACxC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACrC,MAAM,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAuB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;;AApJc,+BAAiB,GAAG,eAAe,AAAlB,CAAmB","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 Settings\n */\n\nimport type { UiStateStorage } from \"@itwin/core-react\";\nimport { UiStateEntry } from \"@itwin/core-react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher.js\";\nimport type { UserSettingsProvider } from \"../UiFramework.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { UiSyncEventArgs } from \"../syncui/UiSyncEvent.js\";\nimport type { ThemeId } from \"../theme/ThemeId.js\";\nimport { ConfigurableUiActionId } from \"../redux/ConfigurableUiState.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Default values that may be specified for [[AppUiSettings]].\n * @public\n * @deprecated in 4.15.0. Interface used in a deprecated class {@link AppUiSettings}.\n */\nexport interface InitialAppUiSettings {\n colorTheme: ThemeId;\n dragInteraction: boolean;\n widgetOpacity: number;\n showWidgetIcon?: boolean;\n /** @alpha */\n autoCollapseUnpinnedPanels?: boolean;\n animateToolSettings?: boolean;\n useToolAsToolSettingsLabel?: boolean;\n toolbarOpacity: number;\n}\n\n/** These are the UI settings that are stored in the Redux store. They control the color theme,\n * how toolbar group buttons work, and the opacity of floating widget when the cursor\n * is not inside them. It is expect that an IModelApp using App UI components will create and register AppUiSettings with\n * defaults specific to their application. This would be done by calling the following.\n *\n * ```ts\n * UiFramework.registerUserSettingsProvider(new AppUiSettings(defaults));\n * ```\n * @public\n * @deprecated in 4.15.0. Use {@link @itwin/core-react#UiStateStorage} to persist UI settings.\n */\nexport class AppUiSettings implements UserSettingsProvider {\n public readonly providerId = \"AppUiSettingsProvider\";\n\n private static _settingNamespace = \"AppUiSettings\";\n private _settings: Array<UiStateEntry<any>> = [];\n private _applyingLocalSettings = false;\n\n public colorTheme: UiStateEntry<ThemeId>;\n public dragInteraction: UiStateEntry<boolean>;\n public widgetOpacity: UiStateEntry<number>;\n public showWidgetIcon: UiStateEntry<boolean>;\n public autoCollapseUnpinnedPanels: UiStateEntry<boolean>;\n public animateToolSettings: UiStateEntry<boolean>;\n public useToolAsToolSettingsLabel: UiStateEntry<boolean>;\n public toolbarOpacity: UiStateEntry<number>;\n\n private setColorTheme = (theme: ThemeId) => {\n UiFramework.setColorTheme(theme);\n // always store to local storage to avoid flicker during startup if user is not yet logged-in\n window.localStorage.setItem(\"uifw:defaultTheme\", theme);\n };\n\n constructor(defaults: Partial<InitialAppUiSettings>) {\n this._settings = [];\n\n this.colorTheme = new UiStateEntry<ThemeId>(\n AppUiSettings._settingNamespace,\n \"ColorTheme\",\n UiFramework.getColorTheme,\n this.setColorTheme,\n defaults.colorTheme\n );\n this._settings.push(this.colorTheme);\n\n this.dragInteraction = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"DragInteraction\",\n () => UiFramework.useDragInteraction,\n (value: boolean) => UiFramework.setUseDragInteraction(value),\n defaults.dragInteraction\n );\n this._settings.push(this.dragInteraction);\n\n this.showWidgetIcon = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"ShowWidgetIcon\",\n () => UiFramework.showWidgetIcon,\n (value: boolean) => UiFramework.setShowWidgetIcon(value),\n defaults.showWidgetIcon\n );\n this._settings.push(this.showWidgetIcon);\n\n this.autoCollapseUnpinnedPanels = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"AutoCollapseUnpinnedPanels\",\n () => UiFramework.autoCollapseUnpinnedPanels,\n (value: boolean) => UiFramework.setAutoCollapseUnpinnedPanels(value),\n defaults.autoCollapseUnpinnedPanels\n );\n this._settings.push(this.autoCollapseUnpinnedPanels);\n\n this.widgetOpacity = new UiStateEntry<number>(\n AppUiSettings._settingNamespace,\n \"WidgetOpacity\",\n () => UiFramework.getWidgetOpacity(),\n (value: number) => UiFramework.setWidgetOpacity(value),\n defaults.widgetOpacity\n );\n this._settings.push(this.widgetOpacity);\n\n this.animateToolSettings = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"AnimateToolSettings\",\n () => UiFramework.animateToolSettings,\n (value: boolean) => UiFramework.setAnimateToolSettings(value),\n defaults.animateToolSettings\n );\n this._settings.push(this.animateToolSettings);\n\n this.useToolAsToolSettingsLabel = new UiStateEntry<boolean>(\n AppUiSettings._settingNamespace,\n \"UseToolAsToolSettingsLabel\",\n () => UiFramework.useToolAsToolSettingsLabel,\n (value: boolean) => UiFramework.setUseToolAsToolSettingsLabel(value),\n defaults.useToolAsToolSettingsLabel\n );\n this._settings.push(this.useToolAsToolSettingsLabel);\n\n this.toolbarOpacity = new UiStateEntry<number>(\n AppUiSettings._settingNamespace,\n \"ToolOpacity\",\n () => UiFramework.getToolbarOpacity(),\n (value: number) => UiFramework.setToolbarOpacity(value),\n defaults.toolbarOpacity\n );\n this._settings.push(this.toolbarOpacity);\n\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this.handleSyncUiEvent);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private handleSyncUiEvent = async (args: UiSyncEventArgs) => {\n if (this._applyingLocalSettings) return;\n\n if (args.eventIds.has(ConfigurableUiActionId.SetTheme)) {\n await this.colorTheme.saveSetting(UiFramework.getUiStateStorage());\n // always store as default theme in local storage to avoid flicker during startup if user is not yet logged-in\n window.localStorage.setItem(\n \"uifw:defaultTheme\",\n UiFramework.getColorTheme()\n );\n }\n\n if (args.eventIds.has(ConfigurableUiActionId.SetDragInteraction))\n await this.dragInteraction.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.SetShowWidgetIcon))\n await this.showWidgetIcon.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.AutoCollapseUnpinnedPanels))\n await this.autoCollapseUnpinnedPanels.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.SetWidgetOpacity))\n await this.widgetOpacity.saveSetting(UiFramework.getUiStateStorage());\n\n if (args.eventIds.has(ConfigurableUiActionId.AnimateToolSettings))\n await this.animateToolSettings.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.UseToolAsToolSettingsLabel))\n await this.useToolAsToolSettingsLabel.saveSetting(\n UiFramework.getUiStateStorage()\n );\n\n if (args.eventIds.has(ConfigurableUiActionId.SetToolbarOpacity))\n await this.toolbarOpacity.saveSetting(UiFramework.getUiStateStorage());\n };\n\n public async apply(storage: UiStateStorage): Promise<void> {\n this._applyingLocalSettings = true;\n for (const setting of this._settings) {\n await setting.getSettingAndApplyValue(storage);\n }\n this._applyingLocalSettings = false;\n }\n\n public async loadUserSettings(storage: UiStateStorage): Promise<void> {\n await this.apply(storage);\n }\n}\n"]}
@@ -7,6 +7,6 @@
7
7
  */
8
8
  import { LocalStateStorage as _LocalStateStorage } from "@itwin/core-react";
9
9
  /** @public */
10
- // eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation
10
+ // eslint-disable-next-line @typescript-eslint/no-redeclare, @typescript-eslint/no-deprecated
11
11
  export const LocalStateStorage = _LocalStateStorage;
12
12
  //# sourceMappingURL=LocalStateStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/LocalStateStorage.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAS5E,cAAc;AACd,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,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 UiStateStorage\n */\n\nimport { LocalStateStorage as _LocalStateStorage } from \"@itwin/core-react\";\nimport { UiStateStorage } from \"./UiStateStorage.js\";\n\n/**\n * Implementation of {@link UiStateStorage} using `Window.localStorage`.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type LocalStateStorage = _LocalStateStorage;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation\nexport const LocalStateStorage = _LocalStateStorage;\n"]}
1
+ {"version":3,"file":"LocalStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/LocalStateStorage.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAS5E,cAAc;AACd,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,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 UiStateStorage\n */\n\nimport { LocalStateStorage as _LocalStateStorage } from \"@itwin/core-react\";\nimport { UiStateStorage } from \"./UiStateStorage.js\";\n\n/**\n * Implementation of {@link UiStateStorage} using `Window.localStorage`.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type LocalStateStorage = _LocalStateStorage;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare, @typescript-eslint/no-deprecated\nexport const LocalStateStorage = _LocalStateStorage;\n"]}
@@ -7,6 +7,6 @@
7
7
  */
8
8
  import { UiStateStorageStatus as _UiStateStorageStatus } from "@itwin/core-react";
9
9
  /** @public */
10
- // eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation
10
+ // eslint-disable-next-line @typescript-eslint/no-redeclare, @typescript-eslint/no-deprecated
11
11
  export const UiStateStorageStatus = _UiStateStorageStatus;
12
12
  //# sourceMappingURL=UiStateStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/UiStateStorage.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAMH,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAclF,cAAc;AACd,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,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 UiStateStorage\n */\n\nimport type {\n UiStateStorage as _UiStateStorage,\n UiStateStorageResult as _UiStateStorageResult,\n} from \"@itwin/core-react\";\nimport { UiStateStorageStatus as _UiStateStorageStatus } from \"@itwin/core-react\";\n\n/** Interface for getting, saving and deleting settings.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type UiStateStorage = _UiStateStorage;\n\n/**\n * Enum for {@link UiStateStorage} status.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type UiStateStorageStatus = _UiStateStorageStatus;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation\nexport const UiStateStorageStatus = _UiStateStorageStatus;\n\n/**\n * Interface for result of accessing UI state setting in {@link UiStateStorage}.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type UiStateStorageResult = _UiStateStorageResult;\n"]}
1
+ {"version":3,"file":"UiStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/UiStateStorage.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAMH,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAclF,cAAc;AACd,6FAA6F;AAC7F,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,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 UiStateStorage\n */\n\nimport type {\n UiStateStorage as _UiStateStorage,\n UiStateStorageResult as _UiStateStorageResult,\n} from \"@itwin/core-react\";\nimport { UiStateStorageStatus as _UiStateStorageStatus } from \"@itwin/core-react\";\n\n/** Interface for getting, saving and deleting settings.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type UiStateStorage = _UiStateStorage;\n\n/**\n * Enum for {@link UiStateStorage} status.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type UiStateStorageStatus = _UiStateStorageStatus;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare, @typescript-eslint/no-deprecated\nexport const UiStateStorageStatus = _UiStateStorageStatus;\n\n/**\n * Interface for result of accessing UI state setting in {@link UiStateStorage}.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type UiStateStorageResult = _UiStateStorageResult;\n"]}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { useCallback, useSyncExternalStore } from "react";
9
9
  import { UiFramework } from "../UiFramework.js";
10
- /* eslint-disable deprecation/deprecation */
10
+ /* eslint-disable @typescript-eslint/no-deprecated */
11
11
  /** @internal */
12
12
  export function useReduxFrameworkState(selector) {
13
13
  const subscribe = useCallback((onStoreChange) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useReduxFrameworkState.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/useReduxFrameworkState.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,4CAA4C;AAE5C,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CACpC,QAAuD;IAEvD,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,aAAyB,EAAE,EAAE;QAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,IAAI,CAAC,UAAU;YAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;QAEjC,OAAO,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,WAAW,GAAG,WAAW,CAAC,GAAM,EAAE;QACtC,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,MAAM,KAAK,GAAG,UAAU,EAAE,QAAQ,EAAE,CAAC;QACrC,MAAM,cAAc,GAAG,KAAK,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAE/C,CAAC;QACd,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;IAClC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,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 State\n */\n\nimport { useCallback, useSyncExternalStore } from \"react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { FrameworkState as ReduxFrameworkState } from \"../redux/FrameworkState.js\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** @internal */\nexport function useReduxFrameworkState<T>(\n selector: (state: ReduxFrameworkState | undefined) => T\n): T {\n const subscribe = useCallback((onStoreChange: () => void) => {\n const reduxStore = UiFramework.reduxStore;\n if (!reduxStore) return () => {};\n\n return reduxStore.subscribe(onStoreChange);\n }, []);\n const getSnapshot = useCallback((): T => {\n const reduxStore = UiFramework.reduxStore;\n const state = reduxStore?.getState();\n const frameworkState = state?.[UiFramework.frameworkStateKey] as\n | ReduxFrameworkState\n | undefined;\n return selector(frameworkState);\n }, [selector]);\n return useSyncExternalStore(subscribe, getSnapshot);\n}\n"]}
1
+ {"version":3,"file":"useReduxFrameworkState.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/useReduxFrameworkState.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,qDAAqD;AAErD,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CACpC,QAAuD;IAEvD,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,aAAyB,EAAE,EAAE;QAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,IAAI,CAAC,UAAU;YAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;QAEjC,OAAO,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,WAAW,GAAG,WAAW,CAAC,GAAM,EAAE;QACtC,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,MAAM,KAAK,GAAG,UAAU,EAAE,QAAQ,EAAE,CAAC;QACrC,MAAM,cAAc,GAAG,KAAK,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAE/C,CAAC;QACd,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;IAClC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,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 State\n */\n\nimport { useCallback, useSyncExternalStore } from \"react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { FrameworkState as ReduxFrameworkState } from \"../redux/FrameworkState.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** @internal */\nexport function useReduxFrameworkState<T>(\n selector: (state: ReduxFrameworkState | undefined) => T\n): T {\n const subscribe = useCallback((onStoreChange: () => void) => {\n const reduxStore = UiFramework.reduxStore;\n if (!reduxStore) return () => {};\n\n return reduxStore.subscribe(onStoreChange);\n }, []);\n const getSnapshot = useCallback((): T => {\n const reduxStore = UiFramework.reduxStore;\n const state = reduxStore?.getState();\n const frameworkState = state?.[UiFramework.frameworkStateKey] as\n | ReduxFrameworkState\n | undefined;\n return selector(frameworkState);\n }, [selector]);\n return useSyncExternalStore(subscribe, getSnapshot);\n}\n"]}
@@ -28,7 +28,7 @@ UiStateStorageContext.displayName = "uifw:UiStateStorageContext";
28
28
  * ```
29
29
  * @public
30
30
  */
31
- // eslint-disable-next-line deprecation/deprecation
31
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
32
32
  export function UiStateStorageHandler(props) {
33
33
  const [stateStorage, setStateStorage] = React.useState(UiFramework.getUiStateStorage());
34
34
  React.useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useUiStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,cAAc;AACd,MAAM,UAAU,wBAAwB;IACtC,OAAO,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;AACjD,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CACtD,IAAI,iBAAiB,EAAE,CACxB,CAAC;AACF,qBAAqB,CAAC,WAAW,GAAG,4BAA4B,CAAC;AAUjE;;;;;;;;;;;GAWG;AACH,mDAAmD;AACnD,MAAM,UAAU,qBAAqB,CAAC,KAA8B;IAClE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CACpD,WAAW,CAAC,iBAAiB,EAAE,CAChC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,qBAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,aAAa,CAAC,qBAAqB;aACpC,CAAC;gBAEF,eAAe,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,qBAAqB,CAAC,QAAQ,IAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,YAAY,GACnB,CACH,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 UiStateStorage\n */\n\nimport * as React from \"react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport {\n SyncUiEventDispatcher,\n SyncUiEventId,\n} from \"../syncui/SyncUiEventDispatcher.js\";\nimport type { UiStateStorage } from \"./UiStateStorage.js\";\nimport { LocalStateStorage } from \"./LocalStateStorage.js\";\n\n/** @public */\nexport function useUiStateStorageHandler(): UiStateStorage {\n return React.useContext(UiStateStorageContext);\n}\n\n/** @internal */\nexport const UiStateStorageContext = React.createContext<UiStateStorage>(\n new LocalStateStorage()\n);\nUiStateStorageContext.displayName = \"uifw:UiStateStorageContext\";\n\n/** Properties for the [[UiStateStorageHandler]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof UiStateStorageHandler>`\n */\nexport interface UiSettingsProviderProps {\n children?: React.ReactNode;\n}\n\n/** Allows to provide a custom [[UiStateStorage]] implementation to persist UI settings\n * through [[UiFramework.setUiStateStorage]].\n *\n * This component should wrap the [[ConfigurableUiContent]].\n *\n * ```tsx\n * <UiStateStorageHandler>\n * <ConfigurableUiContent />\n * </UiStateStorageHandler>\n * ```\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function UiStateStorageHandler(props: UiSettingsProviderProps) {\n const [stateStorage, setStateStorage] = React.useState(\n UiFramework.getUiStateStorage()\n );\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n SyncUiEventId.UiStateStorageChanged,\n ])\n )\n setStateStorage(UiFramework.getUiStateStorage());\n });\n });\n\n return (\n <UiStateStorageContext.Provider\n children={props.children} // eslint-disable-line react/no-children-prop\n value={stateStorage}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"useUiStateStorage.js","sourceRoot":"","sources":["../../../src/appui-react/uistate/useUiStateStorage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,cAAc;AACd,MAAM,UAAU,wBAAwB;IACtC,OAAO,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;AACjD,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CACtD,IAAI,iBAAiB,EAAE,CACxB,CAAC;AACF,qBAAqB,CAAC,WAAW,GAAG,4BAA4B,CAAC;AAUjE;;;;;;;;;;;GAWG;AACH,4DAA4D;AAC5D,MAAM,UAAU,qBAAqB,CAAC,KAA8B;IAClE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CACpD,WAAW,CAAC,iBAAiB,EAAE,CAChC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,qBAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,aAAa,CAAC,qBAAqB;aACpC,CAAC;gBAEF,eAAe,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,qBAAqB,CAAC,QAAQ,IAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,YAAY,GACnB,CACH,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 UiStateStorage\n */\n\nimport * as React from \"react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport {\n SyncUiEventDispatcher,\n SyncUiEventId,\n} from \"../syncui/SyncUiEventDispatcher.js\";\nimport type { UiStateStorage } from \"./UiStateStorage.js\";\nimport { LocalStateStorage } from \"./LocalStateStorage.js\";\n\n/** @public */\nexport function useUiStateStorageHandler(): UiStateStorage {\n return React.useContext(UiStateStorageContext);\n}\n\n/** @internal */\nexport const UiStateStorageContext = React.createContext<UiStateStorage>(\n new LocalStateStorage()\n);\nUiStateStorageContext.displayName = \"uifw:UiStateStorageContext\";\n\n/** Properties for the [[UiStateStorageHandler]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof UiStateStorageHandler>`\n */\nexport interface UiSettingsProviderProps {\n children?: React.ReactNode;\n}\n\n/** Allows to provide a custom [[UiStateStorage]] implementation to persist UI settings\n * through [[UiFramework.setUiStateStorage]].\n *\n * This component should wrap the [[ConfigurableUiContent]].\n *\n * ```tsx\n * <UiStateStorageHandler>\n * <ConfigurableUiContent />\n * </UiStateStorageHandler>\n * ```\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function UiStateStorageHandler(props: UiSettingsProviderProps) {\n const [stateStorage, setStateStorage] = React.useState(\n UiFramework.getUiStateStorage()\n );\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n SyncUiEventDispatcher.hasEventOfInterest(args.eventIds, [\n SyncUiEventId.UiStateStorageChanged,\n ])\n )\n setStateStorage(UiFramework.getUiStateStorage());\n });\n });\n\n return (\n <UiStateStorageContext.Provider\n children={props.children} // eslint-disable-line react/no-children-prop\n value={stateStorage}\n />\n );\n}\n"]}
@@ -39,9 +39,9 @@ export class PropsHelper {
39
39
  /** Get JSX element that defines an icon. If iconSpec is a string, then a web-font icon class is used otherwise a ReactNode holding an SVG icon is assumed. */
40
40
  static getIcon(iconSpec) {
41
41
  if (iconSpec instanceof ConditionalStringValue)
42
- // eslint-disable-next-line deprecation/deprecation
42
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
43
43
  return React.createElement(Icon, { iconSpec: iconSpec.value });
44
- // eslint-disable-next-line deprecation/deprecation
44
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
45
45
  return iconSpec ? React.createElement(Icon, { iconSpec: iconSpec }) : undefined;
46
46
  }
47
47
  /** returns true if the two objects are the same using a shallow compare of each property */
@@ -54,15 +54,15 @@ export class PropsHelper {
54
54
  }
55
55
  /** @deprecated in 4.0 These abstract props types are obsolete. */
56
56
  static getAbstractPropsForReactIcon(
57
- // eslint-disable-next-line deprecation/deprecation
57
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
58
58
  iconSpec, internalData
59
- // eslint-disable-next-line deprecation/deprecation
59
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
60
60
  ) {
61
61
  if (!iconSpec || !React.isValidElement(iconSpec))
62
62
  return {};
63
63
  if (!internalData)
64
64
  internalData = new Map();
65
- // eslint-disable-next-line deprecation/deprecation
65
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
66
66
  const icon = IconHelper.getIconData(iconSpec, internalData);
67
67
  return icon === "" ? { icon } : { icon, internalData };
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PropsHelper.js","sourceRoot":"","sources":["../../../src/appui-react/utils/PropsHelper.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,sDAAsD;AAEtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,UAAU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G,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kEAAkE;IAC3D,MAAM,CAAC,4BAA4B;IACxC,mDAAmD;IACnD,QAAkB,EAClB,YAA+B;IAC/B,mDAAmD;;QAEnD,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;YAAE,OAAO,EAAE,CAAC;QAE5D,IAAI,CAAC,YAAY;YAAE,YAAY,GAAG,IAAI,GAAG,EAAe,CAAC;QAEzD,mDAAmD;QACnD,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAE5D,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACzD,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 Utilities\n */\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n\nimport * as React from \"react\";\nimport type { IconSpec } from \"@itwin/core-react\";\nimport { Icon, IconHelper } from \"@itwin/core-react\";\nimport type {\n StringGetter,\n // @ts-ignore Removed in 4.0\n AbstractWidgetProps as UIA_AbstractWidgetProps,\n // @ts-ignore Removed in 4.0\n CommonBackstageItem as UIA_CommonBackstageItem,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\n/** A set of helper methods for various props\n * @public\n * @deprecated in 4.16.0. Used internally.\n */\nexport class PropsHelper {\n /** Get spec for returning a string. Could be a simple string of a 'StringGetter' method used to return the string. */\n public static getStringSpec(\n explicitValue: string | StringGetter | ConditionalStringValue | undefined,\n stringKey?: string\n ): string | StringGetter | ConditionalStringValue {\n if (explicitValue) {\n return explicitValue;\n }\n\n const outValue = stringKey\n ? IModelApp.localization.getLocalizedString(stringKey)\n : \"\";\n return outValue;\n }\n\n /** Get the display string. */\n public static getStringFromSpec(\n spec: string | StringGetter | ConditionalStringValue\n ): string {\n let label = \"\";\n if (typeof spec === \"string\") label = spec;\n else if (spec instanceof ConditionalStringValue) label = spec.value;\n else label = spec();\n return label;\n }\n\n /** Get JSX element that defines an icon. If iconSpec is a string, then a web-font icon class is used otherwise a ReactNode holding an SVG icon is assumed. */\n public static getIcon(\n iconSpec: string | ConditionalStringValue | React.ReactNode\n ): React.ReactElement | undefined {\n if (iconSpec instanceof ConditionalStringValue)\n // eslint-disable-next-line deprecation/deprecation\n return <Icon iconSpec={iconSpec.value} />;\n\n // eslint-disable-next-line deprecation/deprecation\n return iconSpec ? <Icon iconSpec={iconSpec} /> : undefined;\n }\n\n /** returns true if the two objects are the same using a shallow compare of each property */\n public static isShallowEqual(newObj: any, prevObj: any) {\n for (const key in newObj) {\n if (newObj[key] !== prevObj[key]) return false;\n }\n return true;\n }\n\n /** @deprecated in 4.0 These abstract props types are obsolete. */\n public static getAbstractPropsForReactIcon(\n // eslint-disable-next-line deprecation/deprecation\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n // eslint-disable-next-line deprecation/deprecation\n ): Partial<UIA_AbstractWidgetProps> | Partial<UIA_CommonBackstageItem> {\n if (!iconSpec || !React.isValidElement(iconSpec)) return {};\n\n if (!internalData) internalData = new Map<string, any>();\n\n // eslint-disable-next-line deprecation/deprecation\n const icon = IconHelper.getIconData(iconSpec, internalData);\n\n return icon === \"\" ? { icon } : { icon, internalData };\n }\n}\n"]}
1
+ {"version":3,"file":"PropsHelper.js","sourceRoot":"","sources":["../../../src/appui-react/utils/PropsHelper.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,sDAAsD;A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AAY;QACpD,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YACzB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kEAAkE;IAC3D,MAAM,CAAC,4BAA4B;IACxC,4DAA4D;IAC5D,QAAkB,EAClB,YAA+B;IAC/B,4DAA4D;;QAE5D,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;YAAE,OAAO,EAAE,CAAC;QAE5D,IAAI,CAAC,YAAY;YAAE,YAAY,GAAG,IAAI,GAAG,EAAe,CAAC;QAEzD,4DAA4D;QAC5D,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAE5D,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACzD,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 Utilities\n */\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n\nimport * as React from \"react\";\nimport type { IconSpec } from \"@itwin/core-react\";\nimport { Icon, IconHelper } from \"@itwin/core-react\";\nimport type {\n StringGetter,\n // @ts-ignore Removed in 4.0\n AbstractWidgetProps as UIA_AbstractWidgetProps,\n // @ts-ignore Removed in 4.0\n CommonBackstageItem as UIA_CommonBackstageItem,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\n/** A set of helper methods for various props\n * @public\n * @deprecated in 4.16.0. Used internally.\n */\nexport class PropsHelper {\n /** Get spec for returning a string. Could be a simple string of a 'StringGetter' method used to return the string. */\n public static getStringSpec(\n explicitValue: string | StringGetter | ConditionalStringValue | undefined,\n stringKey?: string\n ): string | StringGetter | ConditionalStringValue {\n if (explicitValue) {\n return explicitValue;\n }\n\n const outValue = stringKey\n ? IModelApp.localization.getLocalizedString(stringKey)\n : \"\";\n return outValue;\n }\n\n /** Get the display string. */\n public static getStringFromSpec(\n spec: string | StringGetter | ConditionalStringValue\n ): string {\n let label = \"\";\n if (typeof spec === \"string\") label = spec;\n else if (spec instanceof ConditionalStringValue) label = spec.value;\n else label = spec();\n return label;\n }\n\n /** Get JSX element that defines an icon. If iconSpec is a string, then a web-font icon class is used otherwise a ReactNode holding an SVG icon is assumed. */\n public static getIcon(\n iconSpec: string | ConditionalStringValue | React.ReactNode\n ): React.ReactElement | undefined {\n if (iconSpec instanceof ConditionalStringValue)\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <Icon iconSpec={iconSpec.value} />;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return iconSpec ? <Icon iconSpec={iconSpec} /> : undefined;\n }\n\n /** returns true if the two objects are the same using a shallow compare of each property */\n public static isShallowEqual(newObj: any, prevObj: any) {\n for (const key in newObj) {\n if (newObj[key] !== prevObj[key]) return false;\n }\n return true;\n }\n\n /** @deprecated in 4.0 These abstract props types are obsolete. */\n public static getAbstractPropsForReactIcon(\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iconSpec: IconSpec,\n internalData?: Map<string, any>\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ): Partial<UIA_AbstractWidgetProps> | Partial<UIA_CommonBackstageItem> {\n if (!iconSpec || !React.isValidElement(iconSpec)) return {};\n\n if (!internalData) internalData = new Map<string, any>();\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const icon = IconHelper.getIconData(iconSpec, internalData);\n\n return icon === \"\" ? { icon } : { icon, internalData };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RectangleProps.js","sourceRoot":"","sources":["../../../src/appui-react/utils/RectangleProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Utilities\n */\n\nimport type { RectangleProps as _RectangleProps } from \"@itwin/core-react\";\n\n/** Describes 2d bounds.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type RectangleProps = _RectangleProps;\n"]}
1
+ {"version":3,"file":"RectangleProps.js","sourceRoot":"","sources":["../../../src/appui-react/utils/RectangleProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Utilities\n */\n\nimport type { RectangleProps as _RectangleProps } from \"@itwin/core-react\";\n\n/** Describes 2d bounds.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type RectangleProps = _RectangleProps;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SizeProps.js","sourceRoot":"","sources":["../../../src/appui-react/utils/SizeProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Utilities\n */\n\nimport type { SizeProps as _SizeProps } from \"@itwin/core-react\";\n\n/** Describes 2d dimensions.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type SizeProps = _SizeProps;\n"]}
1
+ {"version":3,"file":"SizeProps.js","sourceRoot":"","sources":["../../../src/appui-react/utils/SizeProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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 Utilities\n */\n\nimport type { SizeProps as _SizeProps } from \"@itwin/core-react\";\n\n/** Describes 2d dimensions.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type SizeProps = _SizeProps;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewUtilities.d.ts","sourceRoot":"","sources":["../../../src/appui-react/utils/ViewUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D;;;GAGG;AACH,qBAAa,aAAa;IACxB;;;;OAIG;WACW,eAAe,CAAC,aAAa,EAAE,MAAM;IAOnD;;;OAGG;WACW,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOnD;;;OAGG;WACW,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIxD;;;OAGG;WACW,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAInD;;;OAGG;WACW,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIjD;;;OAGG;WACW,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM5D;;;OAGG;WACW,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM9D;;;OAGG;WACW,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAMnE;;;OAGG;WACW,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM9D;;;OAGG;WACW,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAIzD;;;OAGG;WACW,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;CAMpE"}
1
+ {"version":3,"file":"ViewUtilities.d.ts","sourceRoot":"","sources":["../../../src/appui-react/utils/ViewUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D;;;GAGG;AACH,qBAAa,aAAa;IACxB;;;;OAIG;WACW,eAAe,CAAC,aAAa,EAAE,MAAM;IAOnD;;;OAGG;WACW,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOnD;;;OAGG;WACW,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIxD;;;OAGG;WACW,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAInD;;;OAGG;WACW,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIjD;;;OAGG;WACW,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM5D;;;OAGG;WACW,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM9D;;;OAGG;WACW,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAMnE;;;OAGG;WACW,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAM9D;;;OAGG;WACW,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;IAIzD;;;OAGG;WACW,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO;CAMpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewUtilities.js","sourceRoot":"","sources":["../../../src/appui-react/utils/ViewUtilities.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB;;;;OAIG;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Aa,CAAC,QAAwB;QAClD,OAAO,aAAa,CAAC,SAAS,CAC5B,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAC,QAAwB;QAC7C,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,kBAAkB,CAAC,QAAwB;QACvD,OAAO,CACL,gBAAgB,CAAC,SAAS;YAC1B,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAC3D,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 Utilities\n */\n\n// cSpell:ignore classname\n\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport {\n DrawingViewState,\n OrthographicViewState,\n SheetViewState,\n SpatialViewState,\n} from \"@itwin/core-frontend\";\n\n/**\n * Various View utility methods\n * @public\n */\nexport class ViewUtilities {\n /**\n * Extracts the BisBaseClass from a full class name.\n * @param classFullName full class name\n * @returns BisBaseClass name\n */\n public static getBisBaseClass(classFullName: string) {\n const bisBaseClass = classFullName.substring(\n classFullName.indexOf(\":\") + 1\n );\n return bisBaseClass;\n }\n\n /**\n * Determines if given class is a spatial view.\n * @param classname Name of class to check\n */\n public static isSpatial(classname: string): boolean {\n return (\n classname === SpatialViewState.className ||\n classname === OrthographicViewState.className\n );\n }\n\n /**\n * Determines if given class is a spatial view.\n * @param classname Name of class to check\n */\n public static isOrthographic(classname: string): boolean {\n return classname === OrthographicViewState.className;\n }\n\n /**\n * Determines if given class is a drawing view.\n * @param classname Name of class to check\n */\n public static isDrawing(classname: string): boolean {\n return classname === DrawingViewState.className;\n }\n\n /**\n * Determines if given class is a sheet view.\n * @param classname Name of class to check\n */\n public static isSheet(classname: string): boolean {\n return classname === SheetViewState.className;\n }\n\n /**\n * Determines if viewport displays a Sheet view.\n * @param viewport ScreenViewport to check\n */\n public static isSheetView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isSheet(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Drawing view.\n * @param viewport ScreenViewport to check\n */\n public static isDrawingView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isDrawing(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Orthographic view.\n * @param viewport ScreenViewport to check\n */\n public static isOrthographicView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isOrthographic(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Spatial view.\n * @param viewport ScreenViewport to check\n */\n public static isSpatialView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isSpatial(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a 3d view.\n * @param viewport ScreenViewport to check\n */\n public static is3dView(viewport: ScreenViewport): boolean {\n return viewport.view.is3d();\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param viewport ScreenViewport to check\n */\n public static viewSupportsCamera(viewport: ScreenViewport): boolean {\n return (\n SpatialViewState.className ===\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ViewUtilities.js","sourceRoot":"","sources":["../../../src/appui-react/utils/ViewUtilities.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB;;;;OAIG;IACI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CAAC,QAAwB;QAClD,OAAO,aAAa,CAAC,SAAS,CAC5B,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAC,QAAwB;QAC7C,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,kBAAkB,CAAC,QAAwB;QACvD,OAAO,CACL,gBAAgB,CAAC,SAAS;YAC1B,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAC3D,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 Utilities\n */\n\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport {\n DrawingViewState,\n OrthographicViewState,\n SheetViewState,\n SpatialViewState,\n} from \"@itwin/core-frontend\";\n\n/**\n * Various View utility methods\n * @public\n */\nexport class ViewUtilities {\n /**\n * Extracts the BisBaseClass from a full class name.\n * @param classFullName full class name\n * @returns BisBaseClass name\n */\n public static getBisBaseClass(classFullName: string) {\n const bisBaseClass = classFullName.substring(\n classFullName.indexOf(\":\") + 1\n );\n return bisBaseClass;\n }\n\n /**\n * Determines if given class is a spatial view.\n * @param classname Name of class to check\n */\n public static isSpatial(classname: string): boolean {\n return (\n classname === SpatialViewState.className ||\n classname === OrthographicViewState.className\n );\n }\n\n /**\n * Determines if given class is a spatial view.\n * @param classname Name of class to check\n */\n public static isOrthographic(classname: string): boolean {\n return classname === OrthographicViewState.className;\n }\n\n /**\n * Determines if given class is a drawing view.\n * @param classname Name of class to check\n */\n public static isDrawing(classname: string): boolean {\n return classname === DrawingViewState.className;\n }\n\n /**\n * Determines if given class is a sheet view.\n * @param classname Name of class to check\n */\n public static isSheet(classname: string): boolean {\n return classname === SheetViewState.className;\n }\n\n /**\n * Determines if viewport displays a Sheet view.\n * @param viewport ScreenViewport to check\n */\n public static isSheetView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isSheet(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Drawing view.\n * @param viewport ScreenViewport to check\n */\n public static isDrawingView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isDrawing(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Orthographic view.\n * @param viewport ScreenViewport to check\n */\n public static isOrthographicView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isOrthographic(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a Spatial view.\n * @param viewport ScreenViewport to check\n */\n public static isSpatialView(viewport: ScreenViewport): boolean {\n return ViewUtilities.isSpatial(\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n\n /**\n * Determines if viewport displays a 3d view.\n * @param viewport ScreenViewport to check\n */\n public static is3dView(viewport: ScreenViewport): boolean {\n return viewport.view.is3d();\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param viewport ScreenViewport to check\n */\n public static viewSupportsCamera(viewport: ScreenViewport): boolean {\n return (\n SpatialViewState.className ===\n ViewUtilities.getBisBaseClass(viewport.view.classFullName)\n );\n }\n}\n"]}
@@ -13,7 +13,7 @@ import { UiFramework } from "../UiFramework.js";
13
13
  * @internal
14
14
  */
15
15
  export function getActiveViewport() {
16
- // eslint-disable-next-line deprecation/deprecation
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  const activeContentControl = UiFramework.content.getActiveContentControl();
18
18
  return activeContentControl
19
19
  ? activeContentControl.viewport