@itwin/appui-react 4.16.5 → 4.17.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 (376) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/lib/cjs/appui-react/UiFramework.d.ts +5 -0
  3. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/cjs/appui-react/UiFramework.js +5 -0
  5. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  6. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  7. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js +1 -0
  9. package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  10. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  11. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  12. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  13. package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  14. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  15. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  16. package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  17. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts +1 -0
  18. package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  19. package/lib/cjs/appui-react/backstage/BackstageComposer.js +2 -0
  20. package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
  21. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  22. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  24. package/lib/cjs/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  25. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  26. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  27. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  28. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  29. package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
  30. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  31. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
  33. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  34. package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
  35. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  36. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
  37. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  38. package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
  39. package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
  40. package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
  41. package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
  42. package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
  43. package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
  44. package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  45. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
  46. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  47. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  48. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  50. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  51. package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
  52. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  53. package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
  54. package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
  56. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
  57. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  58. package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
  59. package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
  60. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  61. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
  63. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  64. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
  65. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  67. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  68. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  69. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  70. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  71. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  72. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
  73. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  74. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  75. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  76. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  77. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  78. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
  79. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
  81. package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
  82. package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
  83. package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
  84. package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  85. package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
  86. package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
  87. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
  88. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
  90. package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
  91. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
  92. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  93. package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
  94. package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
  95. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  96. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  97. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +3 -0
  98. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  99. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  100. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  101. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  102. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  103. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  104. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  105. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  106. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  107. package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  108. package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
  109. package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
  110. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
  111. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  112. package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
  113. package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
  114. package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
  115. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  116. package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
  117. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  118. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  119. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  120. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
  121. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  122. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  123. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  124. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  125. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  126. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  127. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  128. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  129. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  130. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  131. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  132. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  133. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  134. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  135. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  136. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  137. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  138. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  139. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  140. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  141. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  142. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  143. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  144. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  145. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  146. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  147. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  148. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  149. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  150. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  151. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  152. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  153. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  154. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  155. package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
  156. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  157. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  158. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  159. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
  160. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  161. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  162. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  163. package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
  164. package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
  165. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  166. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  167. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  168. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  169. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  170. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  171. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  172. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  173. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  174. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  175. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
  176. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  177. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  178. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  179. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  180. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  181. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
  182. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  183. package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
  184. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  185. package/lib/cjs/appui-react.d.ts +3 -0
  186. package/lib/cjs/appui-react.d.ts.map +1 -1
  187. package/lib/cjs/appui-react.js +3 -0
  188. package/lib/cjs/appui-react.js.map +1 -1
  189. package/lib/esm/appui-react/UiFramework.d.ts +5 -0
  190. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  191. package/lib/esm/appui-react/UiFramework.js +6 -1
  192. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  193. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  194. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  195. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
  196. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  197. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  198. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  199. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  200. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  201. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  202. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  203. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  204. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
  205. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  206. package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
  207. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  208. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  209. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  210. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  211. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  212. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  213. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  214. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  215. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  216. package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
  217. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  218. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  219. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
  220. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  221. package/lib/esm/appui-react/content/ContentLayout.js +45 -11
  222. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  223. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
  224. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  225. package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
  226. package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
  227. package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
  228. package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
  229. package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
  230. package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
  231. package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  232. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
  233. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  234. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  235. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  236. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  237. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  238. package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
  239. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  240. package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
  241. package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
  242. package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
  243. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
  244. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  245. package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
  246. package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
  247. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  248. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  249. package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
  250. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  251. package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
  252. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  253. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  254. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  255. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  256. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  257. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  258. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  259. package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
  260. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  261. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  262. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  263. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  264. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  265. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
  266. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  267. package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
  268. package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
  269. package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
  270. package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
  271. package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  272. package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
  273. package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
  274. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
  275. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  276. package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
  277. package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
  278. package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
  279. package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  280. package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
  281. package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
  282. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  283. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  284. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +3 -0
  285. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  286. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  287. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  288. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  289. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  290. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  291. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  292. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  293. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  294. package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  295. package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
  296. package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
  297. package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
  298. package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  299. package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
  300. package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
  301. package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
  302. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  303. package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
  304. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  305. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  306. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  307. package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
  308. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  309. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  310. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  311. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  312. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  313. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  314. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  315. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  316. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  317. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  318. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  319. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  320. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  321. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  322. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  323. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  324. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  325. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  326. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  327. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  328. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  329. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  330. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  331. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  332. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  333. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  334. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  335. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  336. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  337. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  338. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  339. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  340. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  341. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  342. package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
  343. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  344. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  345. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  346. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
  347. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  348. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  349. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  350. package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
  351. package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
  352. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  353. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  354. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  355. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  356. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  357. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  358. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  359. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  360. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  361. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  362. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
  363. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  364. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  365. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  366. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  367. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  368. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
  369. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  370. package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
  371. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  372. package/lib/esm/appui-react.d.ts +3 -0
  373. package/lib/esm/appui-react.d.ts.map +1 -1
  374. package/lib/esm/appui-react.js +3 -0
  375. package/lib/esm/appui-react.js.map +1 -1
  376. package/package.json +7 -7
@@ -25,16 +25,15 @@ const highContrastColorThemes = [
25
25
  ColorTheme.HighContrastDark,
26
26
  ColorTheme.HighContrastLight,
27
27
  ];
28
- /** ThemeManager handles setting color themes and element opacity management. Note that this component will
29
- * affect the entire application by setting the data-theme attribute to the html element.
30
- * It also sets an iTwinUI `ThemeProvider` element locally, so all elements
31
- * within the AppUI tree will have the same theme, and should be using iTwinUI 2.x or later.
32
- * A `ColorTheme` enum values will configure iTwinUI `ThemeProvider` accordingly.
33
- * Any other string will only apply the `data-theme` attribute to the `html` element
28
+ /** `ThemeManager` handles setting color themes. Note that this component will
29
+ * affect the entire application by setting the internal `data-theme` attribute.
30
+ * Component children are wrapped with `v2` and `v3` iTwinUI `ThemeProvider` components, so all nodes within the tree will have the same theme, and should be using iTwinUI 2.x or later.
31
+ * Specified `ThemeId` will be mapped to iTwinUI `theme` accordingly.
32
+ * Any other string will only apply the `data-theme` attribute to the underlying `html` element
34
33
  * and `ThemeProvider` theme will be set to `inherit`, in this case the application is
35
- * responsible for setting the theme by overriding iTwinUI css variables.
34
+ * responsible for setting the theme, i.e. by using iTwinUI css variables.
36
35
  *
37
- * This React component should wrap {@link ConfigurableUiContent}.
36
+ * This component should wrap {@link ConfigurableUiContent}.
38
37
  *
39
38
  * ```tsx
40
39
  * <ThemeManager>
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeManager.js","sourceRoot":"","sources":["../../../../src/appui-react/theme/ThemeManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;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;QAEhB,oBAAC,eAAe,CAAC,iFAAiF,IAChG,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EACzB,KAAK,EAAE,aAAa,IAAI,SAAS,EACjC,YAAY,EAAE,EAAE,YAAY,EAAE,IAE7B,QAAQ,CACO,CACJ,CACjB,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 State\n */\n\nimport \"./ThemeManager.scss\";\nimport * as React from \"react\";\nimport type { ThemeType } from \"@itwin/itwinui-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { ThemeProvider as ThemeProviderV2 } from \"@itwin/itwinui-react-v2\";\nimport type { ThemeId } from \"./ThemeId\";\nimport { ColorTheme, SYSTEM_PREFERRED_COLOR_THEME } from \"./ThemeId\";\nimport { useReduxFrameworkState } from \"../uistate/useReduxFrameworkState\";\nimport type { ConfigurableUiContent } from \"../configurableui/ConfigurableUiContent\";\n\n/** Map of ColorTheme to ThemeType. */\nconst colorThemeToThemeTypeMap: { [x: string]: ThemeType } = {\n [ColorTheme.Light]: \"light\",\n [ColorTheme.HighContrastLight]: \"light\",\n [ColorTheme.Dark]: \"dark\",\n [ColorTheme.HighContrastDark]: \"dark\",\n [ColorTheme.System]: \"os\",\n os: \"os\", // handle \"os\" for backwards compatibility\n};\n\n/** List of high contrast color themes. */\nconst highContrastColorThemes: string[] = [\n ColorTheme.HighContrastDark,\n ColorTheme.HighContrastLight,\n];\n\ninterface ThemeManagerProps {\n children?: React.ReactNode;\n /** Uses redux store as a fallback. Defaults to {@link SYSTEM_PREFERRED_COLOR_THEME}. */\n theme?: ThemeId;\n}\n\n/** ThemeManager handles setting color themes and element opacity management. Note that this component will\n * affect the entire application by setting the data-theme attribute to the html element.\n * It also sets an iTwinUI `ThemeProvider` element locally, so all elements\n * within the AppUI tree will have the same theme, and should be using iTwinUI 2.x or later.\n * A `ColorTheme` enum values will configure iTwinUI `ThemeProvider` accordingly.\n * Any other string will only apply the `data-theme` attribute to the `html` element\n * and `ThemeProvider` theme will be set to `inherit`, in this case the application is\n * responsible for setting the theme by overriding iTwinUI css variables.\n *\n * This React component should wrap {@link ConfigurableUiContent}.\n *\n * ```tsx\n * <ThemeManager>\n * <ConfigurableUiContent />\n * </ThemeManager>\n * ```\n * @public\n */\nexport function ThemeManager({ children, ...props }: ThemeManagerProps) {\n const reduxTheme = useReduxFrameworkState((state) => {\n // eslint-disable-next-line deprecation/deprecation\n return state?.configurableUiState.theme;\n });\n const theme = props.theme ?? reduxTheme ?? SYSTEM_PREFERRED_COLOR_THEME;\n\n React.useEffect(() => {\n document.documentElement.setAttribute(\"data-theme\", theme);\n }, [theme]);\n\n const providerTheme = colorThemeToThemeTypeMap[theme];\n const highContrast = highContrastColorThemes.includes(theme);\n\n return (\n <ThemeProvider\n className=\"uifw-root\"\n theme={providerTheme ?? \"inherit\"}\n themeOptions={{ highContrast }}\n data-root-container=\"appui-root-id\"\n includeCss={true}\n >\n <ThemeProviderV2 /* v2 ThemeProvider is required to fix popup styling issues in widget popouts. */\n style={{ height: \"100%\" }}\n theme={providerTheme ?? \"inherit\"}\n themeOptions={{ highContrast }}\n >\n {children}\n </ThemeProviderV2>\n </ThemeProvider>\n );\n}\n"]}
1
+ {"version":3,"file":"ThemeManager.js","sourceRoot":"","sources":["../../../../src/appui-react/theme/ThemeManager.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,WAAW,CA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E,EAAE,YAAY,EAAE,yBACV,eAAe,EACnC,UAAU,EAAE,IAAI;QAEhB,oBAAC,eAAe,CAAC,iFAAiF,IAChG,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EACzB,KAAK,EAAE,aAAa,IAAI,SAAS,EACjC,YAAY,EAAE,EAAE,YAAY,EAAE,IAE7B,QAAQ,CACO,CACJ,CACjB,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 State\n */\n\nimport \"./ThemeManager.scss\";\nimport * as React from \"react\";\nimport type { ThemeType } from \"@itwin/itwinui-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { ThemeProvider as ThemeProviderV2 } from \"@itwin/itwinui-react-v2\";\nimport type { ThemeId } from \"./ThemeId\";\nimport { ColorTheme, SYSTEM_PREFERRED_COLOR_THEME } from \"./ThemeId\";\nimport { useReduxFrameworkState } from \"../uistate/useReduxFrameworkState\";\nimport type { ConfigurableUiContent } from \"../configurableui/ConfigurableUiContent\";\n\n/** Map of ColorTheme to ThemeType. */\nconst colorThemeToThemeTypeMap: { [x: string]: ThemeType } = {\n [ColorTheme.Light]: \"light\",\n [ColorTheme.HighContrastLight]: \"light\",\n [ColorTheme.Dark]: \"dark\",\n [ColorTheme.HighContrastDark]: \"dark\",\n [ColorTheme.System]: \"os\",\n os: \"os\", // handle \"os\" for backwards compatibility\n};\n\n/** List of high contrast color themes. */\nconst highContrastColorThemes: string[] = [\n ColorTheme.HighContrastDark,\n ColorTheme.HighContrastLight,\n];\n\ninterface ThemeManagerProps {\n children?: React.ReactNode;\n /** Uses redux store as a fallback. Defaults to {@link SYSTEM_PREFERRED_COLOR_THEME}. */\n theme?: ThemeId;\n}\n\n/** `ThemeManager` handles setting color themes. Note that this component will\n * affect the entire application by setting the internal `data-theme` attribute.\n * Component children are wrapped with `v2` and `v3` iTwinUI `ThemeProvider` components, so all nodes within the tree will have the same theme, and should be using iTwinUI 2.x or later.\n * Specified `ThemeId` will be mapped to iTwinUI `theme` accordingly.\n * Any other string will only apply the `data-theme` attribute to the underlying `html` element\n * and `ThemeProvider` theme will be set to `inherit`, in this case the application is\n * responsible for setting the theme, i.e. by using iTwinUI css variables.\n *\n * This component should wrap {@link ConfigurableUiContent}.\n *\n * ```tsx\n * <ThemeManager>\n * <ConfigurableUiContent />\n * </ThemeManager>\n * ```\n * @public\n */\nexport function ThemeManager({ children, ...props }: ThemeManagerProps) {\n const reduxTheme = useReduxFrameworkState((state) => {\n // eslint-disable-next-line deprecation/deprecation\n return state?.configurableUiState.theme;\n });\n const theme = props.theme ?? reduxTheme ?? SYSTEM_PREFERRED_COLOR_THEME;\n\n React.useEffect(() => {\n document.documentElement.setAttribute(\"data-theme\", theme);\n }, [theme]);\n\n const providerTheme = colorThemeToThemeTypeMap[theme];\n const highContrast = highContrastColorThemes.includes(theme);\n\n return (\n <ThemeProvider\n className=\"uifw-root\"\n theme={providerTheme ?? \"inherit\"}\n themeOptions={{ highContrast }}\n data-root-container=\"appui-root-id\"\n includeCss={true}\n >\n <ThemeProviderV2 /* v2 ThemeProvider is required to fix popup styling issues in widget popouts. */\n style={{ height: \"100%\" }}\n theme={providerTheme ?? \"inherit\"}\n themeOptions={{ highContrast }}\n >\n {children}\n </ThemeProviderV2>\n </ThemeProvider>\n );\n}\n"]}
@@ -6,6 +6,7 @@ import type { ToolbarItem } from "./ToolbarItem";
6
6
  import { ToolbarOrientation, ToolbarUsage } from "./ToolbarItem";
7
7
  /** Properties for the [[ToolbarComposer]] React components
8
8
  * @public
9
+ * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ToolbarComposer>`
9
10
  */
10
11
  export interface ExtensibleToolbarProps {
11
12
  /** Toolbar items. */
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAGV,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,kBAAkB,EAClB,YAAY,EACb,MAAM,eAAe,CAAC;AA4JvB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,8FAA8F;IAC9F,KAAK,EAAE,YAAY,CAAC;IACpB,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,sBAAsB,qBA8C5D"}
1
+ {"version":3,"file":"ToolbarComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAGV,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,kBAAkB,EAClB,YAAY,EACb,MAAM,eAAe,CAAC;AA4JvB;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,8FAA8F;IAC9F,KAAK,EAAE,YAAY,CAAC;IACpB,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED;;;;GAIG;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,sBAAsB,qBA8C5D"}
@@ -127,6 +127,7 @@ const useSnapWidgetOpacitySetting = () => {
127
127
  * @note Overrides `isActive` property based on the active tool id.
128
128
  * @public
129
129
  */
130
+ // eslint-disable-next-line deprecation/deprecation
130
131
  export function ToolbarComposer(props) {
131
132
  const { usage, orientation } = props;
132
133
  // process items from addon UI providers
@@ -1 +1 @@
1
-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,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IACtE,MAAM,mBAAmB,GAAG,0BAA0B,EAAE,CAAC;IACzD,MAAM,iBAAiB,GAAG,2BAA2B,EAAE,CAAC;IAExD,OAAO,CACL,oBAAC,OAAO,IACN,cAAc,EAAE,IAAI,EACpB,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,aAAa,EACjC,qBAAqB,EACnB,CAAC,mBAAmB,IAAI,iBAAiB,CAAC;YAC1C,CAAC,eAAe,CAAC,eAAe;YAC9B,CAAC,CAAC,qBAAqB,CAAC,SAAS;YACjC,CAAC,CAAC,qBAAqB,CAAC,QAAQ,GAEpC,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 Toolbar\n */\n\nimport * as React from \"react\";\nimport {\n Direction,\n Orientation,\n ToolbarOpacitySetting,\n ToolbarPanelAlignment,\n} from \"@itwin/components-react\";\nimport { Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport { ToolbarDragInteractionContext } from \"./DragInteraction\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport {\n isToolbarActionItem,\n isToolbarGroupItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"./ToolbarItem\";\nimport { Toolbar } from \"./Toolbar\";\nimport { useActiveToolIdSynchedItems } from \"./useActiveToolIdSynchedItems\";\nimport { useActiveStageProvidedToolbarItems } from \"./useActiveStageProvidedToolbarItems\";\n\nfunction addItemToSpecifiedParentGroup<T extends ToolbarItem>(\n items: readonly T[],\n groupChildren: Array<ToolbarActionItem | ToolbarGroupItem>\n): T[] {\n const outItems: T[] = [];\n for (const toolbarItem of items) {\n if (!isToolbarGroupItem(toolbarItem)) {\n outItems.push(toolbarItem);\n continue;\n }\n\n const newChildren = addItemToSpecifiedParentGroup(\n toolbarItem.items,\n groupChildren\n );\n const foundIndices: number[] = [];\n\n groupChildren.forEach((entry, index) => {\n if (entry.parentGroupItemId === toolbarItem.id) {\n foundIndices.push(index);\n }\n });\n\n if (foundIndices.length) {\n // process in reverse order so groupChildren can be reduced as we find matches\n foundIndices\n .sort((a, b) => a - b)\n .reverse()\n .forEach((foundIndex) => {\n newChildren.push(groupChildren[foundIndex]);\n groupChildren.splice(foundIndex);\n });\n }\n\n outItems.push({ ...toolbarItem, items: newChildren });\n }\n return outItems;\n}\n\nfunction cloneGroup(inGroup: ToolbarGroupItem): ToolbarGroupItem {\n const childItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n inGroup.items.forEach((item) => {\n if (isToolbarGroupItem(item)) childItems.push(cloneGroup(item));\n else childItems.push(item);\n });\n\n const clonedGroup = { ...inGroup, items: childItems };\n return clonedGroup;\n}\n\nfunction getItemSortValue(item: ToolbarItem) {\n const groupValue = undefined === item.groupPriority ? 0 : item.groupPriority;\n return groupValue * 10000 + item.itemPriority;\n}\n\nfunction sortItems(items: ReadonlyArray<ToolbarItem>): ToolbarItem[] {\n return [...items]\n .sort((a, b) => getItemSortValue(a) - getItemSortValue(b))\n .map((i) => {\n if (isToolbarGroupItem(i)) {\n return { ...i, items: sortItems(i.items) };\n }\n return i;\n });\n}\n\n/**\n * Create a forEach handler that will add every element of an array of ToolbarItems\n * to a list of items that can then be replaced in its proper place, ensuring that\n * the same item, from different list, is not added multiple times.\n * @param items Output list of items\n * @param groupChildren Output list of group children to redistribute.\n * @returns Array<ToolbarItem>.forEach handler.\n */\nfunction addIfNotDuplicate(\n items: ToolbarItem[],\n groupChildren: (ToolbarActionItem | ToolbarGroupItem)[]\n): (value: ToolbarItem) => void {\n return (srcItem: ToolbarItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n // if the default item is a group that an addon may insert into copy it so we don't mess with original\n const toolbarItem = isToolbarGroupItem(srcItem)\n ? cloneGroup(srcItem)\n : srcItem;\n if (\n (isToolbarGroupItem(toolbarItem) || isToolbarActionItem(toolbarItem)) &&\n toolbarItem.parentGroupItemId\n )\n groupChildren.push(toolbarItem);\n else items.push(toolbarItem);\n }\n };\n}\n\n/** local function to combine items from Stage and from Extensions */\nfunction combineItems(\n defaultItems: ReadonlyArray<ToolbarItem>,\n addonItems: ReadonlyArray<ToolbarItem>\n): ToolbarItem[] {\n let items: ToolbarItem[] = [];\n const groupChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n\n defaultItems.forEach(addIfNotDuplicate(items, groupChildren));\n addonItems.forEach(addIfNotDuplicate(items, groupChildren));\n\n // if an item from an addon has specified a parent group then try to find it and insert it. If no parent is found, add item at root level.\n if (groupChildren.length) {\n items = addItemToSpecifiedParentGroup(items, groupChildren);\n\n groupChildren.forEach((toolbarItem) => {\n Logger.logWarning(\n \"ToolbarComposer\",\n `Requested Parent Group [${toolbarItem.parentGroupItemId!}] not found, so item [${\n toolbarItem.id\n }] is added directly to toolbar.`\n );\n items.push(toolbarItem);\n });\n }\n\n return sortItems(items);\n}\n\nconst useProximityOpacitySetting = () => {\n const [proximityOpacity, setProximityOpacity] = React.useState(\n UiFramework.visibility.useProximityOpacity // eslint-disable-line deprecation/deprecation\n );\n\n React.useEffect(() => {\n UiFramework.onUiVisibilityChanged.addListener(\n () => setProximityOpacity(UiFramework.visibility.useProximityOpacity) // eslint-disable-line deprecation/deprecation\n );\n }, []);\n\n return proximityOpacity;\n};\n\nconst useSnapWidgetOpacitySetting = () => {\n const [snapWidgetOpacity, setSnapWidgetOpacity] = React.useState(\n UiFramework.visibility.snapWidgetOpacity\n );\n\n React.useEffect(() => {\n UiFramework.onUiVisibilityChanged.addListener(() =>\n setSnapWidgetOpacity(UiFramework.visibility.snapWidgetOpacity)\n );\n }, []);\n\n return snapWidgetOpacity;\n};\n\n/** Properties for the [[ToolbarComposer]] React components\n * @public\n */\nexport interface ExtensibleToolbarProps {\n /** Toolbar items. */\n items: ToolbarItem[];\n /** Toolbar usage based on which additional toolbar items are added from UI item providers. */\n usage: ToolbarUsage;\n /** Toolbar orientation. */\n orientation: ToolbarOrientation;\n}\n\n/**\n * Toolbar that is populated and maintained by UI item providers.\n * @note Overrides `isActive` property based on the active tool id.\n * @public\n */\nexport function ToolbarComposer(props: ExtensibleToolbarProps) {\n const { usage, orientation } = props;\n\n // process items from addon UI providers\n const addonItems = useActiveStageProvidedToolbarItems(usage, orientation);\n\n const allItems = React.useMemo(() => {\n return combineItems(props.items, addonItems);\n }, [props.items, addonItems]);\n\n const items = useActiveToolIdSynchedItems(allItems, UiFramework.frontstages);\n\n const toolbarOrientation =\n orientation === ToolbarOrientation.Horizontal\n ? Orientation.Horizontal\n : Orientation.Vertical;\n const expandsTo =\n toolbarOrientation === Orientation.Horizontal\n ? Direction.Bottom\n : usage === ToolbarUsage.ViewNavigation\n ? Direction.Left\n : Direction.Right;\n const panelAlignment =\n toolbarOrientation === Orientation.Horizontal &&\n usage === ToolbarUsage.ViewNavigation\n ? ToolbarPanelAlignment.End\n : ToolbarPanelAlignment.Start;\n const isDragEnabled = React.useContext(ToolbarDragInteractionContext);\n const useProximityOpacity = useProximityOpacitySetting();\n const snapWidgetOpacity = useSnapWidgetOpacitySetting();\n\n return (\n <Toolbar\n enableOverflow={true}\n expandsTo={expandsTo}\n panelAlignment={panelAlignment}\n items={items}\n useDragInteraction={isDragEnabled}\n toolbarOpacitySetting={\n (useProximityOpacity || snapWidgetOpacity) &&\n !ProcessDetector.isMobileBrowser\n ? ToolbarOpacitySetting.Proximity\n : ToolbarOpacitySetting.Defaults\n }\n />\n );\n}\n"]}
1
+ {"version":3,"file":"ToolbarComposer.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarComposer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO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A2B,EAAE,CAAC;IAExD,OAAO,CACL,oBAAC,OAAO,IACN,cAAc,EAAE,IAAI,EACpB,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,aAAa,EACjC,qBAAqB,EACnB,CAAC,mBAAmB,IAAI,iBAAiB,CAAC;YAC1C,CAAC,eAAe,CAAC,eAAe;YAC9B,CAAC,CAAC,qBAAqB,CAAC,SAAS;YACjC,CAAC,CAAC,qBAAqB,CAAC,QAAQ,GAEpC,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 Toolbar\n */\n\nimport * as React from \"react\";\nimport {\n Direction,\n Orientation,\n ToolbarOpacitySetting,\n ToolbarPanelAlignment,\n} from \"@itwin/components-react\";\nimport { Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport { ToolbarDragInteractionContext } from \"./DragInteraction\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport {\n isToolbarActionItem,\n isToolbarGroupItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"./ToolbarItem\";\nimport { Toolbar } from \"./Toolbar\";\nimport { useActiveToolIdSynchedItems } from \"./useActiveToolIdSynchedItems\";\nimport { useActiveStageProvidedToolbarItems } from \"./useActiveStageProvidedToolbarItems\";\n\nfunction addItemToSpecifiedParentGroup<T extends ToolbarItem>(\n items: readonly T[],\n groupChildren: Array<ToolbarActionItem | ToolbarGroupItem>\n): T[] {\n const outItems: T[] = [];\n for (const toolbarItem of items) {\n if (!isToolbarGroupItem(toolbarItem)) {\n outItems.push(toolbarItem);\n continue;\n }\n\n const newChildren = addItemToSpecifiedParentGroup(\n toolbarItem.items,\n groupChildren\n );\n const foundIndices: number[] = [];\n\n groupChildren.forEach((entry, index) => {\n if (entry.parentGroupItemId === toolbarItem.id) {\n foundIndices.push(index);\n }\n });\n\n if (foundIndices.length) {\n // process in reverse order so groupChildren can be reduced as we find matches\n foundIndices\n .sort((a, b) => a - b)\n .reverse()\n .forEach((foundIndex) => {\n newChildren.push(groupChildren[foundIndex]);\n groupChildren.splice(foundIndex);\n });\n }\n\n outItems.push({ ...toolbarItem, items: newChildren });\n }\n return outItems;\n}\n\nfunction cloneGroup(inGroup: ToolbarGroupItem): ToolbarGroupItem {\n const childItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n inGroup.items.forEach((item) => {\n if (isToolbarGroupItem(item)) childItems.push(cloneGroup(item));\n else childItems.push(item);\n });\n\n const clonedGroup = { ...inGroup, items: childItems };\n return clonedGroup;\n}\n\nfunction getItemSortValue(item: ToolbarItem) {\n const groupValue = undefined === item.groupPriority ? 0 : item.groupPriority;\n return groupValue * 10000 + item.itemPriority;\n}\n\nfunction sortItems(items: ReadonlyArray<ToolbarItem>): ToolbarItem[] {\n return [...items]\n .sort((a, b) => getItemSortValue(a) - getItemSortValue(b))\n .map((i) => {\n if (isToolbarGroupItem(i)) {\n return { ...i, items: sortItems(i.items) };\n }\n return i;\n });\n}\n\n/**\n * Create a forEach handler that will add every element of an array of ToolbarItems\n * to a list of items that can then be replaced in its proper place, ensuring that\n * the same item, from different list, is not added multiple times.\n * @param items Output list of items\n * @param groupChildren Output list of group children to redistribute.\n * @returns Array<ToolbarItem>.forEach handler.\n */\nfunction addIfNotDuplicate(\n items: ToolbarItem[],\n groupChildren: (ToolbarActionItem | ToolbarGroupItem)[]\n): (value: ToolbarItem) => void {\n return (srcItem: ToolbarItem) => {\n if (-1 === items.findIndex((item) => item.id === srcItem.id)) {\n // if the default item is a group that an addon may insert into copy it so we don't mess with original\n const toolbarItem = isToolbarGroupItem(srcItem)\n ? cloneGroup(srcItem)\n : srcItem;\n if (\n (isToolbarGroupItem(toolbarItem) || isToolbarActionItem(toolbarItem)) &&\n toolbarItem.parentGroupItemId\n )\n groupChildren.push(toolbarItem);\n else items.push(toolbarItem);\n }\n };\n}\n\n/** local function to combine items from Stage and from Extensions */\nfunction combineItems(\n defaultItems: ReadonlyArray<ToolbarItem>,\n addonItems: ReadonlyArray<ToolbarItem>\n): ToolbarItem[] {\n let items: ToolbarItem[] = [];\n const groupChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n\n defaultItems.forEach(addIfNotDuplicate(items, groupChildren));\n addonItems.forEach(addIfNotDuplicate(items, groupChildren));\n\n // if an item from an addon has specified a parent group then try to find it and insert it. If no parent is found, add item at root level.\n if (groupChildren.length) {\n items = addItemToSpecifiedParentGroup(items, groupChildren);\n\n groupChildren.forEach((toolbarItem) => {\n Logger.logWarning(\n \"ToolbarComposer\",\n `Requested Parent Group [${toolbarItem.parentGroupItemId!}] not found, so item [${\n toolbarItem.id\n }] is added directly to toolbar.`\n );\n items.push(toolbarItem);\n });\n }\n\n return sortItems(items);\n}\n\nconst useProximityOpacitySetting = () => {\n const [proximityOpacity, setProximityOpacity] = React.useState(\n UiFramework.visibility.useProximityOpacity // eslint-disable-line deprecation/deprecation\n );\n\n React.useEffect(() => {\n UiFramework.onUiVisibilityChanged.addListener(\n () => setProximityOpacity(UiFramework.visibility.useProximityOpacity) // eslint-disable-line deprecation/deprecation\n );\n }, []);\n\n return proximityOpacity;\n};\n\nconst useSnapWidgetOpacitySetting = () => {\n const [snapWidgetOpacity, setSnapWidgetOpacity] = React.useState(\n UiFramework.visibility.snapWidgetOpacity\n );\n\n React.useEffect(() => {\n UiFramework.onUiVisibilityChanged.addListener(() =>\n setSnapWidgetOpacity(UiFramework.visibility.snapWidgetOpacity)\n );\n }, []);\n\n return snapWidgetOpacity;\n};\n\n/** Properties for the [[ToolbarComposer]] React components\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ToolbarComposer>`\n */\nexport interface ExtensibleToolbarProps {\n /** Toolbar items. */\n items: ToolbarItem[];\n /** Toolbar usage based on which additional toolbar items are added from UI item providers. */\n usage: ToolbarUsage;\n /** Toolbar orientation. */\n orientation: ToolbarOrientation;\n}\n\n/**\n * Toolbar that is populated and maintained by UI item providers.\n * @note Overrides `isActive` property based on the active tool id.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ToolbarComposer(props: ExtensibleToolbarProps) {\n const { usage, orientation } = props;\n\n // process items from addon UI providers\n const addonItems = useActiveStageProvidedToolbarItems(usage, orientation);\n\n const allItems = React.useMemo(() => {\n return combineItems(props.items, addonItems);\n }, [props.items, addonItems]);\n\n const items = useActiveToolIdSynchedItems(allItems, UiFramework.frontstages);\n\n const toolbarOrientation =\n orientation === ToolbarOrientation.Horizontal\n ? Orientation.Horizontal\n : Orientation.Vertical;\n const expandsTo =\n toolbarOrientation === Orientation.Horizontal\n ? Direction.Bottom\n : usage === ToolbarUsage.ViewNavigation\n ? Direction.Left\n : Direction.Right;\n const panelAlignment =\n toolbarOrientation === Orientation.Horizontal &&\n usage === ToolbarUsage.ViewNavigation\n ? ToolbarPanelAlignment.End\n : ToolbarPanelAlignment.Start;\n const isDragEnabled = React.useContext(ToolbarDragInteractionContext);\n const useProximityOpacity = useProximityOpacitySetting();\n const snapWidgetOpacity = useSnapWidgetOpacitySetting();\n\n return (\n <Toolbar\n enableOverflow={true}\n expandsTo={expandsTo}\n panelAlignment={panelAlignment}\n items={items}\n useDragInteraction={isDragEnabled}\n toolbarOpacitySetting={\n (useProximityOpacity || snapWidgetOpacity) &&\n !ProcessDetector.isMobileBrowser\n ? ToolbarOpacitySetting.Proximity\n : ToolbarOpacitySetting.Defaults\n }\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItemsManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarItemsManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAA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AM,CAAC,wCAAwC;IAoBvD,OAAO,CAAC,6BAA6B;IAwBrC,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAyBvC,eAAe,CAAC,MAAM,EAAE,MAAM;CAyBtC"}
@@ -7,8 +7,8 @@
7
7
  */
8
8
  import { ConditionalBooleanValue, ConditionalStringValue, } from "@itwin/appui-abstract";
9
9
  import { BeEvent } from "@itwin/core-bentley";
10
+ import { ConditionalIconItem } from "@itwin/core-react";
10
11
  import { isToolbarGroupItem } from "./ToolbarItem";
11
- import { ConditionalIconValue } from "../shared/ConditionalValue";
12
12
  function isInstance(args) {
13
13
  return !Array.isArray(args);
14
14
  }
@@ -91,8 +91,9 @@ export class ToolbarItemsManager {
91
91
  }
92
92
  else if (entry instanceof ConditionalStringValue) {
93
93
  entry.syncEventIds.forEach((eventId) => eventIds.add(eventId.toLowerCase()));
94
+ // eslint-disable-next-line deprecation/deprecation
94
95
  }
95
- else if (entry instanceof ConditionalIconValue) {
96
+ else if (entry instanceof ConditionalIconItem) {
96
97
  entry.syncEventIds.forEach((eventId) => eventIds.add(eventId.toLowerCase()));
97
98
  }
98
99
  }
@@ -130,9 +131,11 @@ export class ToolbarItemsManager {
130
131
  else if (entry instanceof ConditionalStringValue) {
131
132
  if (ConditionalStringValue.refreshValue(entry, eventIds))
132
133
  itemsUpdated = true;
134
+ // eslint-disable-next-line deprecation/deprecation
133
135
  }
134
- else if (entry instanceof ConditionalIconValue) {
135
- if (ConditionalIconValue.refreshValue(entry, eventIds))
136
+ else if (entry instanceof ConditionalIconItem) {
137
+ // eslint-disable-next-line deprecation/deprecation
138
+ if (ConditionalIconItem.refreshValue(entry, eventIds))
136
139
  itemsUpdated = true;
137
140
  }
138
141
  }
@@ -167,9 +170,11 @@ export class ToolbarItemsManager {
167
170
  else if (entry instanceof ConditionalStringValue) {
168
171
  if (ConditionalStringValue.refreshValue(entry, eventIds))
169
172
  updateRequired = true;
173
+ // eslint-disable-next-line deprecation/deprecation
170
174
  }
171
- else if (entry instanceof ConditionalIconValue) {
172
- if (ConditionalIconValue.refreshValue(entry, eventIds))
175
+ else if (entry instanceof ConditionalIconItem) {
176
+ // eslint-disable-next-line deprecation/deprecation
177
+ if (ConditionalIconItem.refreshValue(entry, eventIds))
173
178
  updateRequired = true;
174
179
  }
175
180
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarItemsManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,SAAS,UAAU,CAAI,IAA0B;IAC/C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AASD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAK9B,YAAY,KAAkC;QAJ9C,gIAAgI;QAChI,oJAAoJ;QAC1I,WAAM,GAA+B,EAAE,CAAC;QAMlD;;WAEG;QACa,mBAAc,GAAG,IAAI,OAAO,EAEzC,CAAC;QARF,IAAI,KAAK;YAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IASO,iBAAiB,CACvB,KAAiC,EACjC,iBAA0B,EAC1B,eAAwB;QAExB,IAAI,iBAAiB,IAAI,KAAK,EAAE,CAAC;YAC/B,mDAAmD;YACnD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACjE,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC1B,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,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,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;YACpC,IAAI,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAE9B,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,mDAAmD;oBACnD,KAAK,EAAE,mBAAmB,CAAC,+BAA+B,CACxD,WAAW,EACX,MAAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAAE,OAAO;QAExD,MAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAE9B,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,mDAAmD;oBACnD,KAAK,EAAE,mBAAmB,CAAC,+BAA+B,CACxD,WAAW,EACX,MAAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,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 Toolbar\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarGroupItem } from \"./ToolbarItem\";\nimport { ConditionalIconValue } from \"../shared/ConditionalValue\";\n\nfunction isInstance<T>(args: T | ReadonlyArray<T>): args is T {\n return !Array.isArray(args);\n}\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<ToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n * @deprecated in 4.4.0. This is no longer used internally, left because of an erroneous public dependency that is also deprecated.\n */\nexport class ToolbarItemsManager {\n // This class should be removed once `useDefaultToolbarItems` and `useUiItemsProviderToolbarItems` (public version) get removed.\n // If you are attempting to fix/clean this class, it is probably an error as it is no longer used and should not be reintroduced, use Hooks instead.\n protected _items: ReadonlyArray<ToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<ToolbarItem>) {\n if (items) this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<\n (args: ToolbarItemsChangedArgs) => void\n >();\n\n private loadItemsInternal(\n items: ReadonlyArray<ToolbarItem>,\n processConditions: boolean,\n sendItemChanged: boolean\n ) {\n if (processConditions && items) {\n // eslint-disable-next-line deprecation/deprecation\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } =\n this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n if (itemsUpdated) items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged) this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<ToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<ToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<ToolbarItem>) {\n if (items !== this._items) this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: ToolbarItem | ReadonlyArray<ToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems)) itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter(\n (itemToAdd, index) =>\n itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index\n );\n }\n itemsToAdd = itemsToAdd.filter(\n (itemToAdd) =>\n this._items.find((item) => item.id === itemToAdd.id) === undefined\n );\n if (itemsToAdd.length === 0) return;\n const items = [...this._items, ...itemsToAdd];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(\n itemIdOrItemIds: ToolbarItem[\"id\"] | ReadonlyArray<ToolbarItem[\"id\"]>\n ) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds)\n ? item.id !== itemIdOrItemIds\n : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(\n eventIds: Set<string>,\n items: readonly ToolbarItem[]\n ) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalIconValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n }\n }\n if (isToolbarGroupItem(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly ToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(\n parentItem: ToolbarGroupItem,\n eventIds: Set<string>\n ): {\n childrenUpdated: boolean;\n childItems: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>;\n } {\n const updatedItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n let updatedItem;\n if (isToolbarGroupItem(item)) {\n updatedItem = { ...item };\n const { childrenUpdated, childItems } = this.refreshChildItems(\n updatedItem,\n eventIds\n );\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n } else {\n updatedItem = { ...item };\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalIconValue) {\n if (ConditionalIconValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(\n items: readonly ToolbarItem[],\n eventIds: Set<string>\n ): { itemsUpdated: boolean; updatedItems: ToolbarItem[] } {\n if (0 === eventIds.size) return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: ToolbarItem[] = [];\n for (const item of items) {\n let updatedItem = { ...item };\n if (isToolbarGroupItem(updatedItem)) {\n const { childrenUpdated, childItems } =\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n if (childrenUpdated) {\n updatedItem = {\n ...updatedItem,\n items: childItems,\n };\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalIconValue) {\n if (ConditionalIconValue.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n if (0 === eventIds.size) return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(\n this.items,\n eventIds\n );\n\n if (itemsUpdated) this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(\n children: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>,\n toolId: string\n ): boolean {\n for (const item of children) {\n if (isToolbarGroupItem(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (isToolbarGroupItem(item)) {\n if (\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(\n item.items,\n toolId\n )\n )\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(\n parentItem: ToolbarGroupItem,\n toolId: string\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n const newChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n for (const item of parentItem.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId)) return;\n\n const newItems: ToolbarItem[] = [];\n for (const item of this.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n}\n"]}
1
+ {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarItemsManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,SAAS,UAAU,CAAI,IAA0B;IAC/C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AASD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAK9B,YAAY,KAAkC;QAJ9C,gIAAgI;QAChI,oJAAoJ;QAC1I,WAAM,GAA+B,EAAE,CAAC;QAMlD;;WAEG;QACa,mBAAc,GAAG,IAAI,OAAO,EAEzC,CAAC;QARF,IAAI,KAAK;YAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IASO,iBAAiB,CACvB,K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AAM,CACP;iBACF,CAAC;YACJ,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,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 Toolbar\n */\n\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { ConditionalIconItem } from \"@itwin/core-react\";\nimport type {\n ToolbarActionItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarGroupItem } from \"./ToolbarItem\";\n\nfunction isInstance<T>(args: T | ReadonlyArray<T>): args is T {\n return !Array.isArray(args);\n}\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<ToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n * @deprecated in 4.4.0. This is no longer used internally, left because of an erroneous public dependency that is also deprecated.\n */\nexport class ToolbarItemsManager {\n // This class should be removed once `useDefaultToolbarItems` and `useUiItemsProviderToolbarItems` (public version) get removed.\n // If you are attempting to fix/clean this class, it is probably an error as it is no longer used and should not be reintroduced, use Hooks instead.\n protected _items: ReadonlyArray<ToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<ToolbarItem>) {\n if (items) this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<\n (args: ToolbarItemsChangedArgs) => void\n >();\n\n private loadItemsInternal(\n items: ReadonlyArray<ToolbarItem>,\n processConditions: boolean,\n sendItemChanged: boolean\n ) {\n if (processConditions && items) {\n // eslint-disable-next-line deprecation/deprecation\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } =\n this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n if (itemsUpdated) items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged) this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<ToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<ToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<ToolbarItem>) {\n if (items !== this._items) this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: ToolbarItem | ReadonlyArray<ToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems)) itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter(\n (itemToAdd, index) =>\n itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index\n );\n }\n itemsToAdd = itemsToAdd.filter(\n (itemToAdd) =>\n this._items.find((item) => item.id === itemToAdd.id) === undefined\n );\n if (itemsToAdd.length === 0) return;\n const items = [...this._items, ...itemsToAdd];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(\n itemIdOrItemIds: ToolbarItem[\"id\"] | ReadonlyArray<ToolbarItem[\"id\"]>\n ) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds)\n ? item.id !== itemIdOrItemIds\n : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(\n eventIds: Set<string>,\n items: readonly ToolbarItem[]\n ) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n } else if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n entry.syncEventIds.forEach((eventId: string) =>\n eventIds.add(eventId.toLowerCase())\n );\n }\n }\n if (isToolbarGroupItem(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly ToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(\n parentItem: ToolbarGroupItem,\n eventIds: Set<string>\n ): {\n childrenUpdated: boolean;\n childItems: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>;\n } {\n const updatedItems: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n let updatedItem;\n if (isToolbarGroupItem(item)) {\n updatedItem = { ...item };\n const { childrenUpdated, childItems } = this.refreshChildItems(\n updatedItem,\n eventIds\n );\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n } else {\n updatedItem = { ...item };\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n // eslint-disable-next-line deprecation/deprecation\n if (ConditionalIconItem.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(\n items: readonly ToolbarItem[],\n eventIds: Set<string>\n ): { itemsUpdated: boolean; updatedItems: ToolbarItem[] } {\n if (0 === eventIds.size) return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: ToolbarItem[] = [];\n for (const item of items) {\n let updatedItem = { ...item };\n if (isToolbarGroupItem(updatedItem)) {\n const { childrenUpdated, childItems } =\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n if (childrenUpdated) {\n updatedItem = {\n ...updatedItem,\n items: childItems,\n };\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else if (entry instanceof ConditionalStringValue) {\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n // eslint-disable-next-line deprecation/deprecation\n } else if (entry instanceof ConditionalIconItem) {\n // eslint-disable-next-line deprecation/deprecation\n if (ConditionalIconItem.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n if (0 === eventIds.size) return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(\n this.items,\n eventIds\n );\n\n if (itemsUpdated) this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(\n children: ReadonlyArray<ToolbarActionItem | ToolbarGroupItem>,\n toolId: string\n ): boolean {\n for (const item of children) {\n if (isToolbarGroupItem(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (isToolbarGroupItem(item)) {\n if (\n // eslint-disable-next-line deprecation/deprecation\n ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(\n item.items,\n toolId\n )\n )\n return true;\n } else {\n const isActive = !!item.isActive;\n if (\n (isActive && item.id !== toolId) ||\n (!isActive && item.id === toolId)\n )\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(\n parentItem: ToolbarGroupItem,\n toolId: string\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n const newChildren: Array<ToolbarActionItem | ToolbarGroupItem> = [];\n for (const item of parentItem.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId)) return;\n\n const newItems: ToolbarItem[] = [];\n for (const item of this.items) {\n let updatedItem = { ...item };\n\n if (isToolbarGroupItem(updatedItem)) {\n updatedItem = {\n ...updatedItem,\n // eslint-disable-next-line deprecation/deprecation\n items: ToolbarItemsManager.refreshActiveToolIdInChildItems(\n updatedItem,\n toolId\n ),\n };\n }\n\n updatedItem.isActive = updatedItem.id === toolId;\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n}\n"]}
@@ -10,6 +10,7 @@ import type { UiItemsProvider } from "./UiItemsProvider";
10
10
  /** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
11
11
  * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
12
12
  * @public
13
+ * @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.
13
14
  */
14
15
  export declare class BaseUiItemsProvider implements UiItemsProvider {
15
16
  protected _providerId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAQvD,SAAS,CAAC,WAAW,EAAE,MAAM;IACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO;gBANF,WAAW,EAAE,MAAM,EACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO,aAAA;IAGd,IAAW,EAAE,IAAI,MAAM,CAEtB;IACM,YAAY,IAAI,IAAI;IAEpB,UAAU;IAIV,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,YAAY,EAC3B,mBAAmB,EAAE,kBAAkB,EACvC,aAAa,CAAC,EAAE,GAAG,GAClB,WAAW,EAAE;IAIT,mBAAmB,CACxB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAyBT,6BAA6B,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;IAIX,qBAAqB,CAC1B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,EAAE;IAmBX,sBAAsB,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,aAAa,CAAC,EAAE,GAAG,GAClB,MAAM,EAAE;IAIJ,cAAc,CACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,CAAC,MAAM,CAAC;CAwBzB"}
1
+ {"version":3,"file":"BaseUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAQvD,SAAS,CAAC,WAAW,EAAE,MAAM;IACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO;gBANF,WAAW,EAAE,MAAM,EACtB,gBAAgB,CAAC,aACb,MAAM,cACH,MAAM,iBACH,GAAG,aACP,eAAe,KACvB,OAAO,aAAA;IAGd,IAAW,EAAE,IAAI,MAAM,CAEtB;IACM,YAAY,IAAI,IAAI;IAEpB,UAAU;IAIV,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,YAAY,EAC3B,mBAAmB,EAAE,kBAAkB,EACvC,aAAa,CAAC,EAAE,GAAG,GAClB,WAAW,EAAE;IAIT,mBAAmB,CACxB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAyBT,6BAA6B,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;IAIX,qBAAqB,CAC1B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,EAAE;IAmBX,sBAAsB,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,aAAa,CAAC,EAAE,GAAG,GAClB,MAAM,EAAE;IAIJ,cAAc,CACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,GAAG,GACjB,aAAa,CAAC,MAAM,CAAC;CAwBzB"}
@@ -10,6 +10,7 @@ import { UiItemsManager } from "./UiItemsManager";
10
10
  /** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the
11
11
  * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.
12
12
  * @public
13
+ * @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.
13
14
  */
14
15
  export class BaseUiItemsProvider {
15
16
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAUtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;OAKG;IACH,YACY,WAAmB,EACtB,gBAKK;QANF,gBAAW,GAAX,WAAW,CAAQ;QACtB,qBAAgB,GAAhB,gBAAgB,CAKX;IACX,CAAC;IAEJ,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACM,YAAY,KAAU,CAAC;IAEvB,UAAU;QACf,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAEM,2BAA2B,CAChC,QAAgB,EAChB,WAAmB,EACnB,aAA2B,EAC3B,mBAAuC,EACvC,aAAmB;QAEnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,mBAAmB,CACxB,OAAe,EACf,UAAkB,EAClB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACpC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/D,CAAC;QAED,OAAO,cAAc;YACnB,CAAC,CAAC,IAAI,CAAC,2BAA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EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAY,CACb;YACH,CAAC,CAAC,EAAE,CAAC;IACT,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 UiProvider\n */\n\nimport { StageUsage } from \"../frontstage/StageUsage\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { Widget } from \"../widgets/Widget\";\nimport { UiItemsManager } from \"./UiItemsManager\";\nimport type { UiItemsProvider } from \"./UiItemsProvider\";\n\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\n * @public\n */\nexport class BaseUiItemsProvider implements UiItemsProvider {\n /*\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n constructor(\n protected _providerId: string,\n public isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any,\n provider?: UiItemsProvider\n ) => boolean\n ) {}\n\n public get id(): string {\n return this._providerId;\n }\n public onUnregister(): void {}\n\n public unregister() {\n UiItemsManager.unregister(this._providerId);\n }\n\n public provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _toolbarUsage: ToolbarUsage,\n _toolbarOrientation: ToolbarOrientation,\n _stageAppData?: any\n ): ToolbarItem[] {\n return [];\n }\n\n public provideToolbarItems(\n stageId: string,\n stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideToolbarItemsInternal(\n stageId,\n stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n )\n : [];\n }\n\n public provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n return [];\n }\n\n public provideStatusBarItems(\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ): StatusBarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData)\n : [];\n }\n\n public provideWidgetsInternal(\n _stageId: string,\n _stageUsage: string,\n _location: StagePanelLocation,\n _section?: StagePanelSection,\n _stageAppData?: any\n ): Widget[] {\n return [];\n }\n\n public provideWidgets(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection,\n stageAppData?: any\n ): ReadonlyArray<Widget> {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideWidgetsInternal(\n stageId,\n stageUsage,\n location,\n section,\n stageAppData\n )\n : [];\n }\n}\n"]}
1
+ {"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;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,YAAkB;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACpC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/D,CAAC;QAED,OAAO,cAAc;YACnB,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC;YACvE,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAEM,sBAAsB,CAC3B,QAAgB,EAChB,WAAmB,EACnB,SAA6B,EAC7B,QAA4B,EAC5B,aAAmB;QAEnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,cAAc,CACnB,OAAe,EACf,UAAkB,EAClB,QAA4B,EAC5B,OAA2B,EAC3B,YAAkB;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACpC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/D,CAAC;QAED,OAAO,cAAc;YACnB,CAAC,CAAC,IAAI,CAAC,sBAAsB,CACzB,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAY,CACb;YACH,CAAC,CAAC,EAAE,CAAC;IACT,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 UiProvider\n */\n\nimport { StageUsage } from \"../frontstage/StageUsage\";\nimport type { StagePanelLocation } from \"../stagepanels/StagePanelLocation\";\nimport type { StagePanelSection } from \"../stagepanels/StagePanelSection\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { Widget } from \"../widgets/Widget\";\nimport { UiItemsManager, UiItemsProviderOverrides } from \"./UiItemsManager\";\nimport type { UiItemsProvider } from \"./UiItemsProvider\";\n\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\n * @public\n * @deprecated in 4.17.0. Use {@link UiItemsProviderOverrides} to specify supported frontstages when registering the provider.\n */\nexport class BaseUiItemsProvider implements UiItemsProvider {\n /*\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n constructor(\n protected _providerId: string,\n public isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any,\n provider?: UiItemsProvider\n ) => boolean\n ) {}\n\n public get id(): string {\n return this._providerId;\n }\n public onUnregister(): void {}\n\n public unregister() {\n UiItemsManager.unregister(this._providerId);\n }\n\n public provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _toolbarUsage: ToolbarUsage,\n _toolbarOrientation: ToolbarOrientation,\n _stageAppData?: any\n ): ToolbarItem[] {\n return [];\n }\n\n public provideToolbarItems(\n stageId: string,\n stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideToolbarItemsInternal(\n stageId,\n stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n )\n : [];\n }\n\n public provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n return [];\n }\n\n public provideStatusBarItems(\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ): StatusBarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData)\n : [];\n }\n\n public provideWidgetsInternal(\n _stageId: string,\n _stageUsage: string,\n _location: StagePanelLocation,\n _section?: StagePanelSection,\n _stageAppData?: any\n ): Widget[] {\n return [];\n }\n\n public provideWidgets(\n stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection,\n stageAppData?: any\n ): ReadonlyArray<Widget> {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(\n stageId,\n stageUsage,\n stageAppData,\n this\n );\n } else {\n provideToStage = stageUsage === StageUsage.General.valueOf();\n }\n\n return provideToStage\n ? this.provideWidgetsInternal(\n stageId,\n stageUsage,\n location,\n section,\n stageAppData\n )\n : [];\n }\n}\n"]}
@@ -28,6 +28,7 @@ import type { StatusBarItem } from "../statusbar/StatusBarItem";
28
28
  *
29
29
  * ```
30
30
  * @public
31
+ * @deprecated in 4.17.0. Application data is not supported in frontstages. Instead configure the {@link UiItemsProvider} before registering for a specific frontstage.
31
32
  */
32
33
  export interface DefaultContentToolsAppData {
33
34
  defaultContentTools?: {
@@ -42,9 +43,9 @@ export interface DefaultContentToolsAppData {
42
43
  };
43
44
  };
44
45
  }
45
- /**
46
- * Provide standard tools for the ContentManipulationWidgetComposer.
46
+ /** Provide standard tools for the ContentManipulationWidgetComposer.
47
47
  * @public
48
+ * @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
48
49
  */
49
50
  export declare class StandardContentToolsProvider extends BaseUiItemsProvider {
50
51
  private uiItemsProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"StandardContentToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,CAAC,EAAE;QACpB,QAAQ,CAAC,EAAE;YACT,0BAA0B,CAAC,EAAE,MAAM,CAAC;YACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;YAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;QACF,UAAU,CAAC,EAAE;YACX,2BAA2B,CAAC,EAAE,MAAM,CAAC;YACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE,OAAO,CAAC,eAAe,CAAsC;IAC7D;;;;;;;;OAQG;WACW,QAAQ,CACpB,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,EACzC,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;gBAeZ,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,EACrD,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;IAQE,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAWA,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;CAQnB"}
1
+ {"version":3,"file":"StandardContentToolsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,CAAC,EAAE;QACpB,QAAQ,CAAC,EAAE;YACT,0BAA0B,CAAC,EAAE,MAAM,CAAC;YACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;YAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;QACF,UAAU,CAAC,EAAE;YACX,2BAA2B,CAAC,EAAE,MAAM,CAAC;YACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AAEH,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE,OAAO,CAAC,eAAe,CAAsC;IAC7D;;;;;;;;OAQG;WACW,QAAQ,CACpB,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,EACzC,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;gBAgBZ,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,SAAS,EACrD,gBAAgB,CAAC,EAAE,CACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,GAAG,KACf,OAAO;IAQE,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAWA,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;CAQnB"}
@@ -9,10 +9,11 @@ import { ViewClipByPlaneTool } from "@itwin/core-frontend";
9
9
  import { StandardContentToolsUiItemsProvider } from "./StandardContentToolsUiItemsProvider";
10
10
  import { UiItemsManager } from "./UiItemsManager";
11
11
  import { BaseUiItemsProvider } from "./BaseUiItemsProvider";
12
- /**
13
- * Provide standard tools for the ContentManipulationWidgetComposer.
12
+ /** Provide standard tools for the ContentManipulationWidgetComposer.
14
13
  * @public
14
+ * @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
15
15
  */
16
+ // eslint-disable-next-line deprecation/deprecation
16
17
  export class StandardContentToolsProvider extends BaseUiItemsProvider {
17
18
  /**
18
19
  * static function to register the StandardContentToolsProvider
@@ -24,6 +25,7 @@ export class StandardContentToolsProvider extends BaseUiItemsProvider {
24
25
  * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
25
26
  */
26
27
  static register(providerId, defaultContentTools, isSupportedStage) {
28
+ // eslint-disable-next-line deprecation/deprecation
27
29
  const provider = new StandardContentToolsProvider(providerId, defaultContentTools, isSupportedStage);
28
30
  UiItemsManager.register(provider);
29
31
  // register core commands not automatically registered
@@ -1 +1 @@
1
- {"version":3,"file":"StandardContentToolsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA8C5D;;;GAGG;AACH,MAAM,OAAO,4BAA6B,SAAQ,mBAAmB;IAEnE;;;;;;;;OAQG;IACI,MAAM,CAAC,QAAQ,CACpB,UAAkB,EAClB,mBAAyC,EACzC,gBAIY;QAEZ,MAAM,QAAQ,GAAG,IAAI,4BAA4B,CAC/C,UAAU,EACV,mBAAmB,EACnB,gBAAgB,CACjB,CAAC;QACF,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAElC,sDAAsD;QACtD,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YACE,UAAkB,EAClB,mBAAqD,EACrD,gBAIY;QAEZ,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,IAAI,mCAAmC,CAC5D,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAEe,2BAA2B,CACzC,QAAgB,EAChB,WAAmB,EACnB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC7C,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,YAAY,CACb,CAAC;IACJ,CAAC;IAEe,6BAA6B,CAC3C,QAAgB,EAChB,WAAmB,EACnB,aAAmB;QAEnB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAC/C,QAAQ,EACR,WAAW,EACX,aAAa,CACd,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 StandardUiItemsProvider\n */\n\nimport { ViewClipByPlaneTool } from \"@itwin/core-frontend\";\nimport type { DefaultContentTools } from \"./StandardContentToolsUiItemsProvider\";\nimport { StandardContentToolsUiItemsProvider } from \"./StandardContentToolsUiItemsProvider\";\nimport { UiItemsManager } from \"./UiItemsManager\";\nimport { BaseUiItemsProvider } from \"./BaseUiItemsProvider\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\n\n/**\n * Defines options that may be set in frontstage app data to control what group priorities\n * to use for each tool button that can be added by this extension. Defining groupIds is optional\n * and only required if use wants to override the default grouping. This application data is statically\n * set in the FrontstageProvider.\n * @example\n * ```\n * const applicationData = {\n * defaultContentTools: {\n * vertical: {\n * selectElementGroupPriority: 100,\n * measureGroupPriority: 200,\n * selectionGroupPriority: 300,\n * },\n * horizontal: {\n * clearSelectionGroupPriority: 100,\n * overridesGroupPriority: 200,\n * },\n * },\n * }\n *\n * ```\n * @public\n */\nexport interface DefaultContentToolsAppData {\n defaultContentTools?: {\n vertical?: {\n selectElementGroupPriority?: number;\n measureGroupPriority?: number;\n selectionGroupPriority?: number;\n };\n horizontal?: {\n clearSelectionGroupPriority?: number;\n overridesGroupPriority?: number;\n };\n };\n}\n\n/**\n * Provide standard tools for the ContentManipulationWidgetComposer.\n * @public\n */\nexport class StandardContentToolsProvider extends BaseUiItemsProvider {\n private uiItemsProvider: StandardContentToolsUiItemsProvider;\n /**\n * static function to register the StandardContentToolsProvider\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param defaultContentTools - if undefined all available tools are provided to stage. If defined only those\n * specific tool buttons are shown.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n public static register(\n providerId: string,\n defaultContentTools?: DefaultContentTools,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n const provider = new StandardContentToolsProvider(\n providerId,\n defaultContentTools,\n isSupportedStage\n );\n UiItemsManager.register(provider);\n\n // register core commands not automatically registered\n ViewClipByPlaneTool.register();\n return provider;\n }\n\n constructor(\n providerId: string,\n defaultContentTools?: DefaultContentTools | undefined,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n super(providerId, isSupportedStage);\n this.uiItemsProvider = new StandardContentToolsUiItemsProvider(\n defaultContentTools\n );\n }\n\n public override provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideToolbarItems(\n _stageId,\n _stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n );\n }\n\n public override provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideStatusBarItems(\n _stageId,\n _stageUsage,\n _stageAppData\n );\n }\n}\n"]}
1
+ {"version":3,"file":"StandardContentToolsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAgD5D;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,4BAA6B,SAAQ,mBAAmB;IAEnE;;;;;;;;OAQG;IACI,MAAM,CAAC,QAAQ,CACpB,UAAkB,EAClB,mBAAyC,EACzC,gBAIY;QAEZ,mDAAmD;QACnD,MAAM,QAAQ,GAAG,IAAI,4BAA4B,CAC/C,UAAU,EACV,mBAAmB,EACnB,gBAAgB,CACjB,CAAC;QACF,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAElC,sDAAsD;QACtD,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YACE,UAAkB,EAClB,mBAAqD,EACrD,gBAIY;QAEZ,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,IAAI,mCAAmC,CAC5D,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAEe,2BAA2B,CACzC,QAAgB,EAChB,WAAmB,EACnB,YAA0B,EAC1B,kBAAsC,EACtC,YAAkB;QAElB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC7C,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,YAAY,CACb,CAAC;IACJ,CAAC;IAEe,6BAA6B,CAC3C,QAAgB,EAChB,WAAmB,EACnB,aAAmB;QAEnB,mDAAmD;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAC/C,QAAQ,EACR,WAAW,EACX,aAAa,CACd,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 StandardUiItemsProvider\n */\n\nimport { ViewClipByPlaneTool } from \"@itwin/core-frontend\";\nimport type { DefaultContentTools } from \"./StandardContentToolsUiItemsProvider\";\nimport { StandardContentToolsUiItemsProvider } from \"./StandardContentToolsUiItemsProvider\";\nimport { UiItemsManager } from \"./UiItemsManager\";\nimport { BaseUiItemsProvider } from \"./BaseUiItemsProvider\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"../toolbar/ToolbarItem\";\nimport type { StatusBarItem } from \"../statusbar/StatusBarItem\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\n\n/**\n * Defines options that may be set in frontstage app data to control what group priorities\n * to use for each tool button that can be added by this extension. Defining groupIds is optional\n * and only required if use wants to override the default grouping. This application data is statically\n * set in the FrontstageProvider.\n * @example\n * ```\n * const applicationData = {\n * defaultContentTools: {\n * vertical: {\n * selectElementGroupPriority: 100,\n * measureGroupPriority: 200,\n * selectionGroupPriority: 300,\n * },\n * horizontal: {\n * clearSelectionGroupPriority: 100,\n * overridesGroupPriority: 200,\n * },\n * },\n * }\n *\n * ```\n * @public\n * @deprecated in 4.17.0. Application data is not supported in frontstages. Instead configure the {@link UiItemsProvider} before registering for a specific frontstage.\n */\nexport interface DefaultContentToolsAppData {\n defaultContentTools?: {\n vertical?: {\n selectElementGroupPriority?: number;\n measureGroupPriority?: number;\n selectionGroupPriority?: number;\n };\n horizontal?: {\n clearSelectionGroupPriority?: number;\n overridesGroupPriority?: number;\n };\n };\n}\n\n/** Provide standard tools for the ContentManipulationWidgetComposer.\n * @public\n * @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class StandardContentToolsProvider extends BaseUiItemsProvider {\n private uiItemsProvider: StandardContentToolsUiItemsProvider;\n /**\n * static function to register the StandardContentToolsProvider\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param defaultContentTools - if undefined all available tools are provided to stage. If defined only those\n * specific tool buttons are shown.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n public static register(\n providerId: string,\n defaultContentTools?: DefaultContentTools,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const provider = new StandardContentToolsProvider(\n providerId,\n defaultContentTools,\n isSupportedStage\n );\n UiItemsManager.register(provider);\n\n // register core commands not automatically registered\n ViewClipByPlaneTool.register();\n return provider;\n }\n\n constructor(\n providerId: string,\n defaultContentTools?: DefaultContentTools | undefined,\n isSupportedStage?: (\n stageId: string,\n stageUsage: string,\n stageAppData?: any\n ) => boolean\n ) {\n super(providerId, isSupportedStage);\n this.uiItemsProvider = new StandardContentToolsUiItemsProvider(\n defaultContentTools\n );\n }\n\n public override provideToolbarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation,\n stageAppData?: any\n ): ToolbarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideToolbarItems(\n _stageId,\n _stageUsage,\n toolbarUsage,\n toolbarOrientation,\n stageAppData\n );\n }\n\n public override provideStatusBarItemsInternal(\n _stageId: string,\n _stageUsage: string,\n _stageAppData?: any\n ): StatusBarItem[] {\n // eslint-disable-next-line deprecation/deprecation\n return this.uiItemsProvider.provideStatusBarItems(\n _stageId,\n _stageUsage,\n _stageAppData\n );\n }\n}\n"]}
@@ -27,14 +27,18 @@ export interface DefaultContentTools {
27
27
  sectionGroup?: boolean;
28
28
  };
29
29
  }
30
- /**
31
- * @beta
30
+ /** Provides standard content manipulation items.
31
+ * @public
32
32
  */
33
33
  export declare class StandardContentToolsUiItemsProvider implements UiItemsProvider {
34
34
  private defaultContextTools?;
35
35
  get id(): string;
36
36
  constructor(defaultContextTools?: DefaultContentTools | undefined);
37
+ /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideToolbarItems}. */
37
38
  provideToolbarItems(_stageId: string, _stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): ToolbarItem[];
39
+ getToolbarItems(): readonly ToolbarItem[];
40
+ /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideStatusBarItems}. */
38
41
  provideStatusBarItems(_stageId: string, _stageUsage: string, _stageAppData?: any): StatusBarItem[];
42
+ getStatusBarItems(): readonly StatusBarItem[];
39
43
  }
40
44
  //# sourceMappingURL=StandardContentToolsUiItemsProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StandardContentToolsUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,4FAA4F;QAC5F,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,+FAA+F;QAC/F,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC9B,sDAAsD;QACtD,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACH;AAYD;;GAEG;AACH,qBAAa,mCAAoC,YAAW,eAAe;IAK7D,OAAO,CAAC,mBAAmB,CAAC;IAJxC,IAAW,EAAE,IAAI,MAAM,CAEtB;gBAEmB,mBAAmB,CAAC,iCAAqB;IAEtD,mBAAmB,CACxB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,CAAC,EAAE,GAAG,GACjB,WAAW,EAAE;IAwJT,qBAAqB,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,GAAG,GAClB,aAAa,EAAE;CAiBnB"}
1
+ {"version":3,"file":"StandardContentToolsUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD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