@itwin/appui-react 4.16.4 → 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 (420) hide show
  1. package/CHANGELOG.md +32 -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/childwindow/CopyStyles.d.ts.map +1 -1
  26. package/lib/cjs/appui-react/childwindow/CopyStyles.js +10 -5
  27. package/lib/cjs/appui-react/childwindow/CopyStyles.js.map +1 -1
  28. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  29. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  30. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  31. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  32. package/lib/cjs/appui-react/content/ContentGroup.d.ts +8 -4
  33. package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
  34. package/lib/cjs/appui-react/content/ContentGroup.js +1 -1
  35. package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
  36. package/lib/cjs/appui-react/content/ContentLayout.d.ts +2 -1
  37. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  38. package/lib/cjs/appui-react/content/ContentLayout.js +44 -10
  39. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  40. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts +63 -0
  41. package/lib/cjs/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  42. package/lib/cjs/appui-react/content/ContentLayoutProps.js +10 -0
  43. package/lib/cjs/appui-react/content/ContentLayoutProps.js.map +1 -0
  44. package/lib/cjs/appui-react/content/ContentOverlay.d.ts +4 -0
  45. package/lib/cjs/appui-react/content/ContentOverlay.d.ts.map +1 -1
  46. package/lib/cjs/appui-react/content/ContentOverlay.js +33 -1
  47. package/lib/cjs/appui-react/content/ContentOverlay.js.map +1 -1
  48. package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -1
  50. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  51. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  52. package/lib/cjs/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  53. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  54. package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/content/InternalContentViewManager.js +9 -3
  56. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  57. package/lib/cjs/appui-react/content/StageContentLayout.d.ts +1 -1
  58. package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -1
  60. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts +20 -0
  61. package/lib/cjs/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  62. package/lib/cjs/appui-react/content/StandardContentLayouts.js +169 -0
  63. package/lib/cjs/appui-react/content/StandardContentLayouts.js.map +1 -0
  64. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  65. package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  66. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +1 -0
  67. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  68. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +1 -1
  69. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  70. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  71. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  72. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  73. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  74. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  75. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  76. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +2 -1
  77. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  78. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  79. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  80. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  81. package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  82. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts +3 -3
  83. package/lib/cjs/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  84. package/lib/cjs/appui-react/hooks/useConditionalProp.js.map +1 -1
  85. package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +1 -1
  86. package/lib/cjs/appui-react/hooks/useConditionalValue.js +1 -1
  87. package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -1
  88. package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  89. package/lib/cjs/appui-react/hooks/useUiVisibility.js +1 -0
  90. package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -1
  91. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts +3 -1
  92. package/lib/cjs/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  93. package/lib/cjs/appui-react/layout/base/LayoutStore.js +9 -1
  94. package/lib/cjs/appui-react/layout/base/LayoutStore.js.map +1 -1
  95. package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
  96. package/lib/cjs/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
  97. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +27 -25
  98. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  99. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +10 -7
  100. package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  101. package/lib/cjs/appui-react/shared/ConditionalValue.js +3 -4
  102. package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -1
  103. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  104. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  105. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +10 -6
  106. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  107. package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
  108. package/lib/cjs/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
  109. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  110. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  111. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  112. package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  113. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  114. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  115. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  116. package/lib/cjs/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  117. package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  118. package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
  119. package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
  120. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -0
  121. package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  122. package/lib/cjs/appui-react/statusfields/SnapMode.js +59 -83
  123. package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
  124. package/lib/cjs/appui-react/theme/ThemeManager.d.ts +7 -8
  125. package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
  126. package/lib/cjs/appui-react/theme/ThemeManager.js +7 -8
  127. package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
  128. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  129. package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  130. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -0
  131. package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  132. package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +1 -1
  133. package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -1
  134. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  135. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  136. package/lib/cjs/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  137. package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  138. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +23 -25
  139. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  140. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  141. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  142. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  143. package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  144. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  145. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  146. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  147. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  148. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  149. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  150. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  151. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  152. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  153. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  154. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  155. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  156. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  157. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  158. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  159. package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  160. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  161. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  162. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  163. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  164. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  165. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  166. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  167. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  168. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
  169. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +16 -12
  170. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  171. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  172. package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  173. package/lib/cjs/appui-react/uistate/useUiStateStorage.js +1 -0
  174. package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
  175. package/lib/cjs/appui-react/utils/getActiveViewport.d.ts +10 -0
  176. package/lib/cjs/appui-react/utils/getActiveViewport.d.ts.map +1 -0
  177. package/lib/cjs/appui-react/utils/getActiveViewport.js +26 -0
  178. package/lib/cjs/appui-react/utils/getActiveViewport.js.map +1 -0
  179. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  180. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  181. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
  182. package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  183. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  184. package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  185. package/lib/cjs/appui-react/widgets/BasicToolWidget.js +1 -0
  186. package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
  187. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  188. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  189. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  190. package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  191. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  192. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  193. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  194. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  195. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  196. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  197. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -0
  198. package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  199. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  200. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  201. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  202. package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  203. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +1 -1
  204. package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  205. package/lib/cjs/appui-react/widgets/WidgetDef.js +7 -7
  206. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  207. package/lib/cjs/appui-react.d.ts +3 -0
  208. package/lib/cjs/appui-react.d.ts.map +1 -1
  209. package/lib/cjs/appui-react.js +3 -0
  210. package/lib/cjs/appui-react.js.map +1 -1
  211. package/lib/esm/appui-react/UiFramework.d.ts +5 -0
  212. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  213. package/lib/esm/appui-react/UiFramework.js +6 -1
  214. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  215. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts +1 -0
  216. package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
  217. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +1 -0
  218. package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
  219. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +1 -0
  220. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  221. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +1 -0
  222. package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  223. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -0
  224. package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  225. package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  226. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +1 -0
  227. package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
  228. package/lib/esm/appui-react/backstage/BackstageComposer.js +2 -0
  229. package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
  230. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts +2 -1
  231. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.d.ts.map +1 -1
  232. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js +2 -1
  233. package/lib/esm/appui-react/backstage/useUiItemsProviderBackstageItems.js.map +1 -1
  234. package/lib/esm/appui-react/childwindow/CopyStyles.d.ts.map +1 -1
  235. package/lib/esm/appui-react/childwindow/CopyStyles.js +8 -3
  236. package/lib/esm/appui-react/childwindow/CopyStyles.js.map +1 -1
  237. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -0
  238. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  239. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +7 -2
  240. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  241. package/lib/esm/appui-react/content/ContentGroup.d.ts +8 -4
  242. package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
  243. package/lib/esm/appui-react/content/ContentGroup.js +1 -1
  244. package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
  245. package/lib/esm/appui-react/content/ContentLayout.d.ts +2 -1
  246. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  247. package/lib/esm/appui-react/content/ContentLayout.js +45 -11
  248. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  249. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts +63 -0
  250. package/lib/esm/appui-react/content/ContentLayoutProps.d.ts.map +1 -0
  251. package/lib/esm/appui-react/content/ContentLayoutProps.js +9 -0
  252. package/lib/esm/appui-react/content/ContentLayoutProps.js.map +1 -0
  253. package/lib/esm/appui-react/content/ContentOverlay.d.ts +4 -0
  254. package/lib/esm/appui-react/content/ContentOverlay.d.ts.map +1 -1
  255. package/lib/esm/appui-react/content/ContentOverlay.js +32 -0
  256. package/lib/esm/appui-react/content/ContentOverlay.js.map +1 -1
  257. package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
  258. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -1
  259. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  260. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts +1 -1
  261. package/lib/esm/appui-react/content/InternalContentLayoutManager.d.ts.map +1 -1
  262. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  263. package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
  264. package/lib/esm/appui-react/content/InternalContentViewManager.js +9 -3
  265. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  266. package/lib/esm/appui-react/content/StageContentLayout.d.ts +1 -1
  267. package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -1
  268. package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -1
  269. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts +20 -0
  270. package/lib/esm/appui-react/content/StandardContentLayouts.d.ts.map +1 -0
  271. package/lib/esm/appui-react/content/StandardContentLayouts.js +165 -0
  272. package/lib/esm/appui-react/content/StandardContentLayouts.js.map +1 -0
  273. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +1 -0
  274. package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -1
  275. package/lib/esm/appui-react/content/split-pane/SplitPane.js +1 -0
  276. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  277. package/lib/esm/appui-react/framework/FrameworkContent.d.ts +1 -1
  278. package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
  279. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  280. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +3 -0
  281. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
  282. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  283. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -0
  284. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  285. package/lib/esm/appui-react/frontstage/FrontstageDef.js +2 -1
  286. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  287. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +2 -0
  288. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
  289. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -0
  290. package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
  291. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts +3 -3
  292. package/lib/esm/appui-react/hooks/useConditionalProp.d.ts.map +1 -1
  293. package/lib/esm/appui-react/hooks/useConditionalProp.js.map +1 -1
  294. package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +1 -1
  295. package/lib/esm/appui-react/hooks/useConditionalValue.js +1 -1
  296. package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -1
  297. package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -1
  298. package/lib/esm/appui-react/hooks/useUiVisibility.js +1 -0
  299. package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -1
  300. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts +3 -1
  301. package/lib/esm/appui-react/layout/base/LayoutStore.d.ts.map +1 -1
  302. package/lib/esm/appui-react/layout/base/LayoutStore.js +7 -0
  303. package/lib/esm/appui-react/layout/base/LayoutStore.js.map +1 -1
  304. package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.scss +4 -0
  305. package/lib/esm/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
  306. package/lib/esm/appui-react/selection/SelectionContextItemDef.js +27 -25
  307. package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  308. package/lib/esm/appui-react/shared/ConditionalValue.d.ts +10 -7
  309. package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -1
  310. package/lib/esm/appui-react/shared/ConditionalValue.js +2 -3
  311. package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -1
  312. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +1 -0
  313. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  314. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +10 -6
  315. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  316. package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js +2 -0
  317. package/lib/esm/appui-react/statusbar/StatusBarCornerComponentContext.js.map +1 -1
  318. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts +1 -0
  319. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.d.ts.map +1 -1
  320. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js +1 -0
  321. package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
  322. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts +1 -0
  323. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.d.ts.map +1 -1
  324. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js +1 -0
  325. package/lib/esm/appui-react/statusbar/useUiItemsProviderStatusBarItems.js.map +1 -1
  326. package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  327. package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
  328. package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
  329. package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -0
  330. package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  331. package/lib/esm/appui-react/statusfields/SnapMode.js +59 -83
  332. package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
  333. package/lib/esm/appui-react/theme/ThemeManager.d.ts +7 -8
  334. package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
  335. package/lib/esm/appui-react/theme/ThemeManager.js +7 -8
  336. package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
  337. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +1 -0
  338. package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
  339. package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -0
  340. package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
  341. package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +1 -1
  342. package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -1
  343. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.d.ts.map +1 -1
  344. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js +11 -6
  345. package/lib/esm/appui-react/toolbar/ToolbarItemsManager.js.map +1 -1
  346. package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  347. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +23 -25
  348. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  349. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +1 -0
  350. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -1
  351. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +1 -0
  352. package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -1
  353. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +3 -2
  354. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  355. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +4 -2
  356. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  357. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts +6 -2
  358. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  359. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +117 -88
  360. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  361. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +2 -2
  362. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
  363. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +4 -2
  364. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
  365. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts +3 -2
  366. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.d.ts.map +1 -1
  367. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +79 -60
  368. package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
  369. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +1 -0
  370. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  371. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +3 -0
  372. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  373. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts +4 -2
  374. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  375. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +6 -2
  376. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  377. package/lib/esm/appui-react/uiprovider/ComponentGenerator.d.ts.map +1 -1
  378. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +16 -12
  379. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  380. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +1 -0
  381. package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
  382. package/lib/esm/appui-react/uistate/useUiStateStorage.js +1 -0
  383. package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
  384. package/lib/esm/appui-react/utils/getActiveViewport.d.ts +10 -0
  385. package/lib/esm/appui-react/utils/getActiveViewport.d.ts.map +1 -0
  386. package/lib/esm/appui-react/utils/getActiveViewport.js +22 -0
  387. package/lib/esm/appui-react/utils/getActiveViewport.js.map +1 -0
  388. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts +1 -0
  389. package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
  390. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
  391. package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
  392. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +1 -0
  393. package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
  394. package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -0
  395. package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
  396. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +1 -0
  397. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
  398. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +3 -1
  399. package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
  400. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts +2 -0
  401. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
  402. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -0
  403. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  404. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +2 -1
  405. package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
  406. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +1 -0
  407. package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
  408. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +1 -0
  409. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
  410. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -0
  411. package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
  412. package/lib/esm/appui-react/widgets/WidgetDef.d.ts +1 -1
  413. package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
  414. package/lib/esm/appui-react/widgets/WidgetDef.js +7 -7
  415. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  416. package/lib/esm/appui-react.d.ts +3 -0
  417. package/lib/esm/appui-react.d.ts.map +1 -1
  418. package/lib/esm/appui-react.js +3 -0
  419. package/lib/esm/appui-react.js.map +1 -1
  420. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"useConditionalProp.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalProp.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,uDAAoE;AACpE,2EAAwE;AAYxE,iCAAiC;AACjC,SAAS,kBAAkB,CACzB,eAAmC;IAEnC,OAAO,CACL,OAAO,eAAe,KAAK,QAAQ;QACnC,eAAe;QACf,cAAc,IAAI,eAAe;QACjC,SAAS,IAAI,eAAe;QAC5B,OAAO,IAAI,eAAe,CAC3B,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,SAAgB,kBAAkB,CAAI,eAAmC;IACvE,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CACjC,CAAC,aAAyB,EAAE,EAAE;QAC5B,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE,CAAC;YACxC,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CACpD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;gBACf,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,QAAQ,EACR,eAAe,CAAC,YAAY,CAC7B;oBAED,OAAO;gBACT,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;oBAAE,OAAO;gBAEvC,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,eAAe,CAAC,CAClB,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,IAAI,kBAAkB,CAAC,eAAe,CAAC;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC;QACtE,OAAO,eAAe,CAAC;IACzB,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,OAAO,IAAA,2BAAoB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AA5BD,gDA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Define a common interface for conditionals. */\ninterface ConditionalValue<T> {\n syncEventIds: string[];\n refresh: () => boolean;\n value: T;\n}\n\n/** Type that is usually used in a conditional prop. */\ntype ConditionalProp<T> = ConditionalValue<T> | T | undefined;\n\n/** Duck type the conditional. */\nfunction isConditionalValue<T>(\n conditionalProp: ConditionalProp<T>\n): conditionalProp is ConditionalValue<T> {\n return (\n typeof conditionalProp === \"object\" &&\n conditionalProp &&\n \"syncEventIds\" in conditionalProp &&\n \"refresh\" in conditionalProp &&\n \"value\" in conditionalProp\n );\n}\n\n/** @internal */\nexport function useConditionalProp<T>(conditionalProp: ConditionalProp<T>) {\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n if (isConditionalValue(conditionalProp)) {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(\n ({ eventIds }) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n eventIds,\n conditionalProp.syncEventIds\n )\n )\n return;\n if (!conditionalProp.refresh()) return;\n\n onStoreChange();\n }\n );\n }\n return () => {};\n },\n [conditionalProp]\n );\n const getSnapshot = React.useCallback(() => {\n if (isConditionalValue(conditionalProp)) return conditionalProp.value;\n return conditionalProp;\n }, [conditionalProp]);\n return useSyncExternalStore(subscribe, getSnapshot);\n}\n"]}
1
+ {"version":3,"file":"useConditionalProp.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalProp.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,uDAAoE;AACpE,2EAAwE;AAYxE,iCAAiC;AACjC,SAAS,kBAAkB,CACzB,eAAmC;IAEnC,OAAO,CACL,OAAO,eAAe,KAAK,QAAQ;QACnC,eAAe;QACf,cAAc,IAAI,eAAe;QACjC,SAAS,IAAI,eAAe;QAC5B,OAAO,IAAI,eAAe,CAC3B,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,SAAgB,kBAAkB,CAAI,eAAmC;IACvE,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CACjC,CAAC,aAAyB,EAAE,EAAE;QAC5B,IAAI,kBAAkB,CAAC,eAAe,CAAC,EAAE,CAAC;YACxC,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CACpD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;gBACf,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,QAAQ,EACR,eAAe,CAAC,YAAY,CAC7B;oBAED,OAAO;gBACT,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;oBAAE,OAAO;gBAEvC,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC,EACD,CAAC,eAAe,CAAC,CAClB,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,IAAI,kBAAkB,CAAC,eAAe,CAAC;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC;QACtE,OAAO,eAAe,CAAC;IACzB,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,OAAO,IAAA,2BAAoB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AA5BD,gDA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Defines a common interface for existing conditional value classes: `ConditionalBooleanValue`, `ConditionalStringValue`, `ConditionalIconItem`. */\ninterface CommonConditionalValue<T> {\n syncEventIds: string[];\n refresh: () => boolean;\n value: T;\n}\n\n/** Type that is usually used in a conditional prop. */\ntype ConditionalProp<T> = CommonConditionalValue<T> | T | undefined;\n\n/** Duck type the conditional. */\nfunction isConditionalValue<T>(\n conditionalProp: ConditionalProp<T>\n): conditionalProp is CommonConditionalValue<T> {\n return (\n typeof conditionalProp === \"object\" &&\n conditionalProp &&\n \"syncEventIds\" in conditionalProp &&\n \"refresh\" in conditionalProp &&\n \"value\" in conditionalProp\n );\n}\n\n/** @internal */\nexport function useConditionalProp<T>(conditionalProp: ConditionalProp<T>) {\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n if (isConditionalValue(conditionalProp)) {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(\n ({ eventIds }) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n eventIds,\n conditionalProp.syncEventIds\n )\n )\n return;\n if (!conditionalProp.refresh()) return;\n\n onStoreChange();\n }\n );\n }\n return () => {};\n },\n [conditionalProp]\n );\n const getSnapshot = React.useCallback(() => {\n if (isConditionalValue(conditionalProp)) return conditionalProp.value;\n return conditionalProp;\n }, [conditionalProp]);\n return useSyncExternalStore(subscribe, getSnapshot);\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Hook that allows to get a value that depends on some sync UI events.
5
5
  * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.
6
- * @alpha
6
+ * @public
7
7
  */
8
8
  export declare function useConditionalValue<T>(getValue: () => T, eventIds: string[]): T;
9
9
  //# sourceMappingURL=useConditionalValue.d.ts.map
@@ -12,7 +12,7 @@ const React = require("react");
12
12
  const SyncUiEventDispatcher_1 = require("../syncui/SyncUiEventDispatcher");
13
13
  /** Hook that allows to get a value that depends on some sync UI events.
14
14
  * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.
15
- * @alpha
15
+ * @public
16
16
  */
17
17
  function useConditionalValue(getValue, eventIds) {
18
18
  const [value, setValue] = React.useState(() => getValue());
@@ -1 +1 @@
1
- {"version":3,"file":"useConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalValue.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,2EAAwE;AAExE;;;GAGG;AACH,SAAgB,mBAAmB,CAAI,QAAiB,EAAE,QAAkB;IAC1E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE3D,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,IAAI,CAAC,QAAQ,EACb,WAAW,CAAC,OAAO,CACpB;gBAED,OAAO;YACT,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAK,CAAC;AACf,CAAC;AA3BD,kDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Hook that allows to get a value that depends on some sync UI events.\n * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.\n * @alpha\n */\nexport function useConditionalValue<T>(getValue: () => T, eventIds: string[]) {\n const [value, setValue] = React.useState(() => getValue());\n\n const getValueRef = React.useRef(getValue);\n React.useEffect(() => {\n getValueRef.current = getValue;\n }, [getValue]);\n\n const eventIdsRef = React.useRef(eventIds);\n React.useEffect(() => {\n eventIdsRef.current = eventIds;\n }, [eventIds]);\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n args.eventIds,\n eventIdsRef.current\n )\n )\n return;\n setValue(getValueRef.current());\n });\n }, []);\n\n return value;\n}\n"]}
1
+ {"version":3,"file":"useConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useConditionalValue.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,2EAAwE;AAExE;;;GAGG;AACH,SAAgB,mBAAmB,CAAI,QAAiB,EAAE,QAAkB;IAC1E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE3D,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,IACE,CAAC,6CAAqB,CAAC,kBAAkB,CACvC,IAAI,CAAC,QAAQ,EACb,WAAW,CAAC,OAAO,CACpB;gBAED,OAAO;YACT,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAK,CAAC;AACf,CAAC;AA3BD,kDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Hook that allows to get a value that depends on some sync UI events.\n * @note This can be used as a replacement for a deprecated {@link @itwin/core-react#ConditionalIconItem}.\n * @public\n */\nexport function useConditionalValue<T>(getValue: () => T, eventIds: string[]) {\n const [value, setValue] = React.useState(() => getValue());\n\n const getValueRef = React.useRef(getValue);\n React.useEffect(() => {\n getValueRef.current = getValue;\n }, [getValue]);\n\n const eventIdsRef = React.useRef(eventIds);\n React.useEffect(() => {\n eventIdsRef.current = eventIds;\n }, [eventIds]);\n\n React.useEffect(() => {\n return SyncUiEventDispatcher.onSyncUiEvent.addListener((args) => {\n if (\n !SyncUiEventDispatcher.hasEventOfInterest(\n args.eventIds,\n eventIdsRef.current\n )\n )\n return;\n setValue(getValueRef.current());\n });\n }, []);\n\n return value;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useUiVisibility.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,gBAAgB;AAChB,wBAAgB,eAAe,YAQ9B"}
1
+ {"version":3,"file":"useUiVisibility.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,gBAAgB;AAChB,wBAAgB,eAAe,YAS9B"}
@@ -12,6 +12,7 @@ const react_1 = require("react");
12
12
  const UiFramework_1 = require("../UiFramework");
13
13
  /** @internal */
14
14
  function useUiVisibility() {
15
+ // eslint-disable-next-line deprecation/deprecation
15
16
  const [uiIsVisible, setUiIsVisible] = (0, react_1.useState)(UiFramework_1.UiFramework.getIsUiVisible());
16
17
  (0, react_1.useEffect)(() => {
17
18
  return UiFramework_1.UiFramework.onUiVisibilityChanged.addListener((args) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useUiVisibility.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAA4C;AAC5C,gDAA6C;AAE7C,gBAAgB;AAChB,SAAgB,eAAe;IAC7B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,yBAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,yBAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5D,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC;AARD,0CAQC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** @internal */\nexport function useUiVisibility() {\n const [uiIsVisible, setUiIsVisible] = useState(UiFramework.getIsUiVisible());\n useEffect(() => {\n return UiFramework.onUiVisibilityChanged.addListener((args) => {\n setUiIsVisible(args.visible);\n });\n }, []);\n return uiIsVisible;\n}\n"]}
1
+ {"version":3,"file":"useUiVisibility.js","sourceRoot":"","sources":["../../../../src/appui-react/hooks/useUiVisibility.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAA4C;AAC5C,gDAA6C;AAE7C,gBAAgB;AAChB,SAAgB,eAAe;IAC7B,mDAAmD;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,yBAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,yBAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5D,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,WAAW,CAAC;AACrB,CAAC;AATD,0CASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hooks\n */\n\nimport { useEffect, useState } from \"react\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** @internal */\nexport function useUiVisibility() {\n // eslint-disable-next-line deprecation/deprecation\n const [uiIsVisible, setUiIsVisible] = useState(UiFramework.getIsUiVisible());\n useEffect(() => {\n return UiFramework.onUiVisibilityChanged.addListener((args) => {\n setUiIsVisible(args.visible);\n });\n }, []);\n return uiIsVisible;\n}\n"]}
@@ -7,7 +7,7 @@ import type { NineZoneState } from "../state/NineZoneState";
7
7
  /** @internal */
8
8
  export type LayoutState = NineZoneState;
9
9
  /** @internal */
10
- export type LayoutStore = StoreApi<NineZoneState>;
10
+ export type LayoutStore = StoreApi<LayoutState>;
11
11
  /** @internal */
12
12
  export declare const LayoutStoreContext: React.Context<LayoutStore | undefined>;
13
13
  /** @internal */
@@ -16,4 +16,6 @@ export declare function createLayoutStore(args?: Partial<LayoutState>): LayoutSt
16
16
  export declare function useLayoutStore(): LayoutStore;
17
17
  /** @internal */
18
18
  export declare function useLayout<SelectorOutput>(selector: (state: LayoutState) => SelectorOutput, multipleSlices?: boolean): SelectorOutput;
19
+ /** @internal */
20
+ export declare function useOptionalLayout<SelectorOutput>(selector: (state: LayoutState | undefined) => SelectorOutput, multipleSlices?: boolean): SelectorOutput;
19
21
  //# sourceMappingURL=LayoutStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutStore.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AAExC,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAElD,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,wCAE9B,CAAC;AAGF,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAE1E;AAED,gBAAgB;AAChB,wBAAgB,cAAc,gBAI7B;AAED,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,cAAc,EACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,cAAc,EAChD,cAAc,UAAQ,kBAQvB"}
1
+ {"version":3,"file":"LayoutStore.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AAExC,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAEhD,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,wCAE9B,CAAC;AAGF,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAE1E;AAED,gBAAgB;AAChB,wBAAgB,cAAc,gBAI7B;AAED,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,cAAc,EACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,cAAc,EAChD,cAAc,UAAQ,kBAQvB;AAMD,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,cAAc,EAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,KAAK,cAAc,EAC5D,cAAc,UAAQ,kBASvB"}
@@ -7,7 +7,7 @@
7
7
  * @module Base
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.useLayout = exports.useLayoutStore = exports.createLayoutStore = exports.LayoutStoreContext = void 0;
10
+ exports.useOptionalLayout = exports.useLayout = exports.useLayoutStore = exports.createLayoutStore = exports.LayoutStoreContext = void 0;
11
11
  const React = require("react");
12
12
  const zustand_1 = require("zustand");
13
13
  const traditional_1 = require("zustand/traditional");
@@ -35,4 +35,12 @@ function useLayout(selector, multipleSlices = false) {
35
35
  return (0, traditional_1.useStoreWithEqualityFn)(store, selector, multipleSlices ? shallow_1.shallow : undefined);
36
36
  }
37
37
  exports.useLayout = useLayout;
38
+ const optionalLayoutStore = (0, zustand_1.createStore)(() => undefined);
39
+ /** @internal */
40
+ function useOptionalLayout(selector, multipleSlices = false) {
41
+ const store = React.useContext(exports.LayoutStoreContext);
42
+ const slice = (0, traditional_1.useStoreWithEqualityFn)(store ?? optionalLayoutStore, selector, multipleSlices ? shallow_1.shallow : undefined);
43
+ return slice;
44
+ }
45
+ exports.useOptionalLayout = useOptionalLayout;
38
46
  //# sourceMappingURL=LayoutStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutStore.js","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,qCAAsC;AACtC,qDAA6D;AAC7D,6CAA0C;AAC1C,sDAA6C;AAE7C,0DAA6D;AAQ7D,gBAAgB;AACH,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CACnD,SAAS,CACV,CAAC;AACF,0BAAkB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAE5D,gBAAgB;AAChB,SAAgB,iBAAiB,CAAC,IAA2B;IAC3D,OAAO,IAAA,qBAAW,EAAc,GAAG,EAAE,CAAC,IAAA,mCAAmB,EAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,8CAEC;AAED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,IAAA,qBAAM,EAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACf,CAAC;AAJD,wCAIC;AAED,gBAAgB;AAChB,SAAgB,SAAS,CACvB,QAAgD,EAChD,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,IAAA,oCAAsB,EAC3B,KAAK,EACL,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;AACJ,CAAC;AAVD,8BAUC","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 Base\n */\n\nimport * as React from \"react\";\nimport type { StoreApi } from \"zustand\";\nimport { createStore } from \"zustand\";\nimport { useStoreWithEqualityFn } from \"zustand/traditional\";\nimport { shallow } from \"zustand/shallow\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { NineZoneState } from \"../state/NineZoneState\";\nimport { createNineZoneState } from \"../state/NineZoneState\";\n\n/** @internal */\nexport type LayoutState = NineZoneState;\n\n/** @internal */\nexport type LayoutStore = StoreApi<NineZoneState>;\n\n/** @internal */\nexport const LayoutStoreContext = React.createContext<LayoutStore | undefined>(\n undefined\n);\nLayoutStoreContext.displayName = \"appui:LayoutStoreContext\";\n\n/** @internal */\nexport function createLayoutStore(args?: Partial<LayoutState>): LayoutStore {\n return createStore<LayoutState>(() => createNineZoneState(args));\n}\n\n/** @internal */\nexport function useLayoutStore() {\n const store = React.useContext(LayoutStoreContext);\n assert(!!store, \"LayoutStoreContext is not defined\");\n return store;\n}\n\n/** @internal */\nexport function useLayout<SelectorOutput>(\n selector: (state: LayoutState) => SelectorOutput,\n multipleSlices = false\n) {\n const store = useLayoutStore();\n return useStoreWithEqualityFn(\n store,\n selector,\n multipleSlices ? shallow : undefined\n );\n}\n"]}
1
+ {"version":3,"file":"LayoutStore.js","sourceRoot":"","sources":["../../../../../src/appui-react/layout/base/LayoutStore.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,qCAAsC;AACtC,qDAA6D;AAC7D,6CAA0C;AAC1C,sDAA6C;AAE7C,0DAA6D;AAQ7D,gBAAgB;AACH,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CACnD,SAAS,CACV,CAAC;AACF,0BAAkB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAE5D,gBAAgB;AAChB,SAAgB,iBAAiB,CAAC,IAA2B;IAC3D,OAAO,IAAA,qBAAW,EAAc,GAAG,EAAE,CAAC,IAAA,mCAAmB,EAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,8CAEC;AAED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,IAAA,qBAAM,EAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACf,CAAC;AAJD,wCAIC;AAED,gBAAgB;AAChB,SAAgB,SAAS,CACvB,QAAgD,EAChD,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,IAAA,oCAAsB,EAC3B,KAAK,EACL,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;AACJ,CAAC;AAVD,8BAUC;AAED,MAAM,mBAAmB,GAAG,IAAA,qBAAW,EACrC,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;AAEF,gBAAgB;AAChB,SAAgB,iBAAiB,CAC/B,QAA4D,EAC5D,cAAc,GAAG,KAAK;IAEtB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,IAAA,oCAAsB,EAClC,KAAK,IAAI,mBAAmB,EAC5B,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,SAAS,CACrC,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAXD,8CAWC","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 Base\n */\n\nimport * as React from \"react\";\nimport type { StoreApi } from \"zustand\";\nimport { createStore } from \"zustand\";\nimport { useStoreWithEqualityFn } from \"zustand/traditional\";\nimport { shallow } from \"zustand/shallow\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { NineZoneState } from \"../state/NineZoneState\";\nimport { createNineZoneState } from \"../state/NineZoneState\";\n\n/** @internal */\nexport type LayoutState = NineZoneState;\n\n/** @internal */\nexport type LayoutStore = StoreApi<LayoutState>;\n\n/** @internal */\nexport const LayoutStoreContext = React.createContext<LayoutStore | undefined>(\n undefined\n);\nLayoutStoreContext.displayName = \"appui:LayoutStoreContext\";\n\n/** @internal */\nexport function createLayoutStore(args?: Partial<LayoutState>): LayoutStore {\n return createStore<LayoutState>(() => createNineZoneState(args));\n}\n\n/** @internal */\nexport function useLayoutStore() {\n const store = React.useContext(LayoutStoreContext);\n assert(!!store, \"LayoutStoreContext is not defined\");\n return store;\n}\n\n/** @internal */\nexport function useLayout<SelectorOutput>(\n selector: (state: LayoutState) => SelectorOutput,\n multipleSlices = false\n) {\n const store = useLayoutStore();\n return useStoreWithEqualityFn(\n store,\n selector,\n multipleSlices ? shallow : undefined\n );\n}\n\nconst optionalLayoutStore = createStore<LayoutState | undefined>(\n () => undefined\n);\n\n/** @internal */\nexport function useOptionalLayout<SelectorOutput>(\n selector: (state: LayoutState | undefined) => SelectorOutput,\n multipleSlices = false\n) {\n const store = React.useContext(LayoutStoreContext);\n const slice = useStoreWithEqualityFn(\n store ?? optionalLayoutStore,\n selector,\n multipleSlices ? shallow : undefined\n );\n return slice;\n}\n"]}
@@ -40,4 +40,8 @@
40
40
  &:focus-within {
41
41
  border-color: var(--iui-color-border-foreground-hover);
42
42
  }
43
+
44
+ &:empty {
45
+ display: none;
46
+ }
43
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionContextItemDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAgBpD;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,EAAE,CAOzD;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,EAAE,CAU1D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAQrD;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,uBAAuB,CAK7E;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,uBAAuB,CAKzE;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAWf;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAaf;AAED;;;GAGG;AACH,qBAAa,+BAA+B;IAC1C,WAAkB,+BAA+B,mBAQhD;IAED,WAAkB,mCAAmC,mBAQpD;IAED,WAAkB,sBAAsB,mBASvC;IAED,WAAkB,yBAAyB,iBAa1C;IAED,WAAkB,4BAA4B,mBAQ7C;IAED,WAAkB,gCAAgC,mBAQjD;IAED,WAAkB,mBAAmB,mBASpC;IAED,WAAkB,oBAAoB,iBAarC;IAED,WAAkB,wBAAwB,mBASzC;IAED,WAAkB,wCAAwC,mBAYzD;CACF"}
1
+ {"version":3,"file":"SelectionContextItemDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAiBpD;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,EAAE,CAOzD;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,EAAE,CAU1D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CASrD;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,uBAAuB,CAK7E;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,uBAAuB,CAKzE;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAWf;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,GAC7B,aAAa,CAUf;AAED;;;GAGG;AACH,qBAAa,+BAA+B;IAC1C,WAAkB,+BAA+B,mBAQhD;IAED,WAAkB,mCAAmC,mBAQpD;IAED,WAAkB,sBAAsB,mBASvC;IAED,WAAkB,yBAAyB,iBAa1C;IAED,WAAkB,4BAA4B,mBAQ7C;IAED,WAAkB,gCAAgC,mBAQjD;IAED,WAAkB,mBAAmB,mBASpC;IAED,WAAkB,oBAAoB,iBAarC;IAED,WAAkB,wBAAwB,mBASzC;IAED,WAAkB,wCAAwC,mBAYzD;CACF"}
@@ -24,6 +24,7 @@ const asset_classification_hide_svg_1 = require("@bentley/icons-generic/icons/as
24
24
  const visibility_semi_transparent_svg_1 = require("@bentley/icons-generic/icons/visibility-semi-transparent.svg");
25
25
  const visibility_hide_2_svg_1 = require("@bentley/icons-generic/icons/visibility-hide_2.svg");
26
26
  const visibility_svg_1 = require("@bentley/icons-generic/icons/visibility.svg");
27
+ const getActiveViewport_1 = require("../utils/getActiveViewport");
27
28
  /* eslint-disable deprecation/deprecation */
28
29
  /** Return SyncEventIds that trigger selection state function refresh.
29
30
  * @beta
@@ -59,16 +60,18 @@ exports.getSelectionContextSyncEventIds = getSelectionContextSyncEventIds;
59
60
  * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
60
61
  */
61
62
  function isNoSelectionActive() {
62
- const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
63
- const selectionCount = UiFramework_1.UiFramework.getNumItemsSelected();
64
- if (activeContentControl?.viewport) {
65
- const hiddenElementsSet = activeContentControl.viewport.neverDrawn;
66
- const selectedElementsSet = activeContentControl.viewport.view.iModel.selectionSet.elements;
67
- // TODO: add check for categories, subcategories and models
68
- if (selectionCount > 0 ||
69
- ![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))
70
- return false;
63
+ const viewport = (0, getActiveViewport_1.getActiveViewport)();
64
+ if (!viewport) {
65
+ return true;
71
66
  }
67
+ const selectionCount = UiFramework_1.UiFramework.getNumItemsSelected();
68
+ if (selectionCount > 0)
69
+ return false;
70
+ // TODO: add check for categories, subcategories and models
71
+ const hiddenElementsSet = viewport.neverDrawn;
72
+ const selectedElementsSet = viewport.view.iModel.selectionSet.elements;
73
+ if (![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))
74
+ return false;
72
75
  return true;
73
76
  }
74
77
  exports.isNoSelectionActive = isNoSelectionActive;
@@ -77,10 +80,11 @@ exports.isNoSelectionActive = isNoSelectionActive;
77
80
  * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
78
81
  */
79
82
  function areNoFeatureOverridesActive() {
80
- const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
81
- if (activeContentControl && activeContentControl.viewport)
82
- return !UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(activeContentControl.viewport);
83
- return true;
83
+ const viewport = (0, getActiveViewport_1.getActiveViewport)();
84
+ if (!viewport) {
85
+ return true;
86
+ }
87
+ return !UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(viewport);
84
88
  }
85
89
  exports.areNoFeatureOverridesActive = areNoFeatureOverridesActive;
86
90
  /** Return ConditionalBooleanValue object used to show item if feature overrides are active.
@@ -104,11 +108,11 @@ exports.getIsHiddenIfSelectionNotActive = getIsHiddenIfSelectionNotActive;
104
108
  * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
105
109
  */
106
110
  function featureOverridesActiveStateFunc(state) {
107
- const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
108
- let isVisible = false;
109
- if (activeContentControl && activeContentControl.viewport)
110
- isVisible =
111
- UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(activeContentControl.viewport);
111
+ const viewport = (0, getActiveViewport_1.getActiveViewport)();
112
+ if (!viewport) {
113
+ return { ...state, isVisible: false };
114
+ }
115
+ const isVisible = UiFramework_1.UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(viewport);
112
116
  return { ...state, isVisible };
113
117
  }
114
118
  exports.featureOverridesActiveStateFunc = featureOverridesActiveStateFunc;
@@ -117,14 +121,12 @@ exports.featureOverridesActiveStateFunc = featureOverridesActiveStateFunc;
117
121
  * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.
118
122
  */
119
123
  function selectionContextStateFunc(state) {
120
- const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
121
- let isVisible = false;
124
+ const viewport = (0, getActiveViewport_1.getActiveViewport)();
125
+ if (!viewport) {
126
+ return { ...state, isVisible: false };
127
+ }
122
128
  const selectionCount = UiFramework_1.UiFramework.getNumItemsSelected();
123
- if (activeContentControl &&
124
- activeContentControl.viewport &&
125
- (activeContentControl.viewport.view.iModel.selectionSet.size > 0 ||
126
- selectionCount > 0))
127
- isVisible = true;
129
+ const isVisible = viewport.view.iModel.selectionSet.size > 0 || selectionCount > 0;
128
130
  return { ...state, isVisible };
129
131
  }
130
132
  exports.selectionContextStateFunc = selectionContextStateFunc;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionContextItemDef.js","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgE;AAChE,wDAA6D;AAC7D,6DAA0D;AAE1D,2EAAgE;AAChE,oDAAoD;AACpD,gDAA6C;AAC7C,sFAA6E;AAC7E,wFAA+E;AAC/E,sFAA6E;AAC7E,0EAAkE;AAClE,gFAAuE;AACvE,kFAAyE;AACzE,8GAAoG;AACpG,kHAAwG;AACxG,8FAAmF;AACnF,gFAAwE;AAGxE,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,8BAA8B;IAC5C,OAAO;QACL,qCAAa,CAAC,oBAAoB;QAClC,qCAAa,CAAC,qBAAqB;QACnC,qCAAa,CAAC,uBAAuB;QACrC,qCAAa,CAAC,mBAAmB;KAClC,CAAC;AACJ,CAAC;AAPD,wEAOC;AAED;;;GAGG;AACH,SAAgB,+BAA+B;IAC7C,OAAO;QACL,qCAAa,CAAC,mBAAmB;QACjC,qCAAa,CAAC,oBAAoB;QAClC,qCAAa,CAAC,qBAAqB;QACnC,mDAAmD;QACnD,mCAAoB,CAAC,mBAAmB;QACxC,qCAAa,CAAC,uBAAuB;QACrC,qCAAa,CAAC,mBAAmB;KAClC,CAAC;AACJ,CAAC;AAVD,0EAUC;AAED;;;GAGG;AACH,SAAgB,mBAAmB;IACjC,MAAM,oBAAoB,GAAG,yBAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAC3E,MAAM,cAAc,GAAG,yBAAW,CAAC,mBAAmB,EAAE,C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CAAC;IACL,CAAC;CACF;AArHD,0EAqHC","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 Tools\n */\n\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport type { BaseItemState } from \"../shared/ItemDefBase\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { UiFramework } from \"../UiFramework\";\nimport svgModelIsolate from \"@bentley/icons-generic/icons/model-isolate.svg\";\nimport svgLayersIsolate from \"@bentley/icons-generic/icons/layers-isolate.svg\";\nimport svgAssetIsolate from \"@bentley/icons-generic/icons/asset-isolate.svg\";\nimport svgIsolate from \"@bentley/icons-generic/icons/isolate.svg\";\nimport svgModelHide from \"@bentley/icons-generic/icons/model-hide.svg\";\nimport svgLayersHide from \"@bentley/icons-generic/icons/layers-hide.svg\";\nimport svgAssetClassificationHide from \"@bentley/icons-generic/icons/asset-classification-hide.svg\";\nimport svgVisibilitySemiTransparent from \"@bentley/icons-generic/icons/visibility-semi-transparent.svg\";\nimport svgVisibilityHide from \"@bentley/icons-generic/icons/visibility-hide_2.svg\";\nimport svgVisibility from \"@bentley/icons-generic/icons/visibility.svg\";\nimport type { ToolbarItems } from \"../tools/ToolbarItems\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getFeatureOverrideSyncEventIds(): string[] {\n return [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getSelectionContextSyncEventIds(): string[] {\n return [\n SyncUiEventId.SelectionSetChanged,\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n // eslint-disable-next-line deprecation/deprecation\n SessionStateActionId.SetNumItemsSelected,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function isNoSelectionActive(): boolean {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n const selectionCount = UiFramework.getNumItemsSelected();\n\n if (activeContentControl?.viewport) {\n const hiddenElementsSet = activeContentControl.viewport.neverDrawn;\n const selectedElementsSet =\n activeContentControl.viewport.view.iModel.selectionSet.elements;\n // TODO: add check for categories, subcategories and models\n if (\n selectionCount > 0 ||\n ![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value))\n )\n return false;\n }\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function areNoFeatureOverridesActive(): boolean {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n activeContentControl.viewport\n );\n\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show item if feature overrides are active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfFeatureOverridesActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n areNoFeatureOverridesActive,\n getFeatureOverrideSyncEventIds()\n );\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfSelectionNotActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n isNoSelectionActive,\n getSelectionContextSyncEventIds()\n );\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function featureOverridesActiveStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n let isVisible = false;\n\n if (activeContentControl && activeContentControl.viewport)\n isVisible =\n UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n activeContentControl.viewport\n );\n\n return { ...state, isVisible };\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function selectionContextStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const activeContentControl = UiFramework.content.getActiveContentControl();\n let isVisible = false;\n\n const selectionCount = UiFramework.getNumItemsSelected();\n if (\n activeContentControl &&\n activeContentControl.viewport &&\n (activeContentControl.viewport.view.iModel.selectionSet.size > 0 ||\n selectionCount > 0)\n )\n isVisible = true;\n return { ...state, isVisible };\n}\n\n/** Utility Class that provides definitions for tools dependent on current selection. These definitions can be used to populate toolbars.\n * @public\n * @deprecated in 4.15.0. Use {@link ToolbarItems} instead.\n */\nexport class SelectionContextToolDefinitions {\n public static get isolateModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateModel\",\n iconSpec: svgModelIsolate,\n labelKey: \"UiFramework:tools.isolateModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsModel(),\n });\n }\n\n public static get isolateCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateCategory\",\n iconSpec: svgLayersIsolate,\n labelKey: \"UiFramework:tools.isolateCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsCategory(),\n });\n }\n\n public static get isolateElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateSelected\",\n iconSpec: svgAssetIsolate,\n labelKey: \"UiFramework:tools.isolateSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelected(),\n });\n }\n\n public static get isolateSelectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.IsolateSelectionGroup\",\n labelKey: \"UiFramework:tools.isolate\",\n iconSpec: svgIsolate,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.isolateElementsItemDef,\n this.isolateCategoriesInSelectionItemDef,\n this.isolateModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get hideModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideModel\",\n iconSpec: svgModelHide,\n labelKey: \"UiFramework:tools.hideModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsModel(),\n });\n }\n\n public static get hideCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideCategory\",\n iconSpec: svgLayersHide,\n labelKey: \"UiFramework:tools.hideCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsCategory(),\n });\n }\n\n public static get hideElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideSelected\",\n iconSpec: svgAssetClassificationHide,\n labelKey: \"UiFramework:tools.hideSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelected(),\n });\n }\n\n public static get hideSectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.HideSelectionGroup\",\n labelKey: \"UiFramework:tools.hide\",\n iconSpec: svgVisibilityHide,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.hideElementsItemDef,\n this.hideCategoriesInSelectionItemDef,\n this.hideModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get emphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.EmphasizeSelected\",\n iconSpec: svgVisibilitySemiTransparent,\n labelKey: \"UiFramework:tools.emphasizeSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processEmphasizeSelected(),\n });\n }\n\n public static get clearHideIsolateEmphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearHideIsolateEmphasize\",\n iconSpec: svgVisibility,\n labelKey: \"UiFramework:tools.clearVisibility\",\n isHidden: getIsHiddenIfFeatureOverridesActive(),\n execute: async () => {\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearEmphasize();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideModels();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideCategories();\n },\n });\n }\n}\n"]}
1
+ {"version":3,"file":"SelectionContextItemDef.js","sourceRoot":"","sources":["../../../../src/appui-react/selection/SelectionContextItemDef.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgE;AAChE,wDAA6D;AAC7D,6DAA0D;AAE1D,2EAAgE;AAChE,oDAAoD;AACpD,gDAA6C;AAC7C,sFAA6E;AAC7E,wFAA+E;AAC/E,sFAA6E;AAC7E,0EAAkE;AAClE,gFAAuE;AACvE,kFAAyE;AACzE,8GAAoG;AACpG,kHAAwG;AACxG,8FAAmF;AACnF,gFAAwE;AAExE,kEAA+D;AAE/D,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,8BAA8B;IAC5C,OAAO;QACL,qCAAa,CAAC,oBAAoB;QAClC,qCAAa,CAAC,qBAAqB;QACnC,qCAAa,CAAC,uBAAuB;QACrC,qCAAa,CAA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ACxD,OAAO,IAAI,+BAAc,CAAC;YACxB,SAAS,EAAE,uCAAuC;YAClD,QAAQ,EAAE,wBAAa;YACvB,QAAQ,EAAE,mCAAmC;YAC7C,QAAQ,EAAE,mCAAmC,EAAE;YAC/C,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,yBAAW,CAAC,iCAAiC,CAAC,qBAAqB,EAAE,CAAC;gBAC5E,MAAM,yBAAW,CAAC,iCAAiC,CAAC,0BAA0B,EAAE,CAAC;gBACjF,MAAM,yBAAW,CAAC,iCAAiC,CAAC,8BAA8B,EAAE,CAAC;YACvF,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AArHD,0EAqHC","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 Tools\n */\n\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { SessionStateActionId } from \"../redux/SessionState\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport type { BaseItemState } from \"../shared/ItemDefBase\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { UiFramework } from \"../UiFramework\";\nimport svgModelIsolate from \"@bentley/icons-generic/icons/model-isolate.svg\";\nimport svgLayersIsolate from \"@bentley/icons-generic/icons/layers-isolate.svg\";\nimport svgAssetIsolate from \"@bentley/icons-generic/icons/asset-isolate.svg\";\nimport svgIsolate from \"@bentley/icons-generic/icons/isolate.svg\";\nimport svgModelHide from \"@bentley/icons-generic/icons/model-hide.svg\";\nimport svgLayersHide from \"@bentley/icons-generic/icons/layers-hide.svg\";\nimport svgAssetClassificationHide from \"@bentley/icons-generic/icons/asset-classification-hide.svg\";\nimport svgVisibilitySemiTransparent from \"@bentley/icons-generic/icons/visibility-semi-transparent.svg\";\nimport svgVisibilityHide from \"@bentley/icons-generic/icons/visibility-hide_2.svg\";\nimport svgVisibility from \"@bentley/icons-generic/icons/visibility.svg\";\nimport type { ToolbarItems } from \"../tools/ToolbarItems\";\nimport { getActiveViewport } from \"../utils/getActiveViewport\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getFeatureOverrideSyncEventIds(): string[] {\n return [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getSelectionContextSyncEventIds(): string[] {\n return [\n SyncUiEventId.SelectionSetChanged,\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n // eslint-disable-next-line deprecation/deprecation\n SessionStateActionId.SetNumItemsSelected,\n SyncUiEventId.FeatureOverridesChanged,\n SyncUiEventId.ViewedModelsChanged,\n ];\n}\n\n/** Return SyncEventIds that trigger selection state function refresh.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function isNoSelectionActive(): boolean {\n const viewport = getActiveViewport();\n if (!viewport) {\n return true;\n }\n\n const selectionCount = UiFramework.getNumItemsSelected();\n if (selectionCount > 0) return false;\n\n // TODO: add check for categories, subcategories and models\n const hiddenElementsSet = viewport.neverDrawn;\n const selectedElementsSet = viewport.view.iModel.selectionSet.elements;\n if (![...selectedElementsSet].every((value) => hiddenElementsSet?.has(value)))\n return false;\n\n return true;\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function areNoFeatureOverridesActive(): boolean {\n const viewport = getActiveViewport();\n if (!viewport) {\n return true;\n }\n\n return !UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n viewport\n );\n}\n\n/** Return ConditionalBooleanValue object used to show item if feature overrides are active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfFeatureOverridesActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n areNoFeatureOverridesActive,\n getFeatureOverrideSyncEventIds()\n );\n}\n\n/** Return ConditionalBooleanValue object used to show items if selection set is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function getIsHiddenIfSelectionNotActive(): ConditionalBooleanValue {\n return new ConditionalBooleanValue(\n isNoSelectionActive,\n getSelectionContextSyncEventIds()\n );\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function featureOverridesActiveStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const viewport = getActiveViewport();\n if (!viewport) {\n return { ...state, isVisible: false };\n }\n\n const isVisible =\n UiFramework.hideIsolateEmphasizeActionHandler.areFeatureOverridesActive(\n viewport\n );\n return { ...state, isVisible };\n}\n\n/** Return state with isVisible set to true is SectionSet is active.\n * @beta\n * @deprecated in 4.15.0. Use {@link ToolbarItems} or a custom conditional value instead.\n */\nexport function selectionContextStateFunc(\n state: Readonly<BaseItemState>\n): BaseItemState {\n const viewport = getActiveViewport();\n if (!viewport) {\n return { ...state, isVisible: false };\n }\n\n const selectionCount = UiFramework.getNumItemsSelected();\n const isVisible =\n viewport.view.iModel.selectionSet.size > 0 || selectionCount > 0;\n return { ...state, isVisible };\n}\n\n/** Utility Class that provides definitions for tools dependent on current selection. These definitions can be used to populate toolbars.\n * @public\n * @deprecated in 4.15.0. Use {@link ToolbarItems} instead.\n */\nexport class SelectionContextToolDefinitions {\n public static get isolateModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateModel\",\n iconSpec: svgModelIsolate,\n labelKey: \"UiFramework:tools.isolateModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsModel(),\n });\n }\n\n public static get isolateCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateCategory\",\n iconSpec: svgLayersIsolate,\n labelKey: \"UiFramework:tools.isolateCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelectedElementsCategory(),\n });\n }\n\n public static get isolateElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.IsolateSelected\",\n iconSpec: svgAssetIsolate,\n labelKey: \"UiFramework:tools.isolateSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processIsolateSelected(),\n });\n }\n\n public static get isolateSelectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.IsolateSelectionGroup\",\n labelKey: \"UiFramework:tools.isolate\",\n iconSpec: svgIsolate,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.isolateElementsItemDef,\n this.isolateCategoriesInSelectionItemDef,\n this.isolateModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get hideModelsInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideModel\",\n iconSpec: svgModelHide,\n labelKey: \"UiFramework:tools.hideModels\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsModel(),\n });\n }\n\n public static get hideCategoriesInSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideCategory\",\n iconSpec: svgLayersHide,\n labelKey: \"UiFramework:tools.hideCategories\",\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelectedElementsCategory(),\n });\n }\n\n public static get hideElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.HideSelected\",\n iconSpec: svgAssetClassificationHide,\n labelKey: \"UiFramework:tools.hideSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processHideSelected(),\n });\n }\n\n public static get hideSectionToolGroup() {\n return new GroupItemDef({\n groupId: \"UiFramework.HideSelectionGroup\",\n labelKey: \"UiFramework:tools.hide\",\n iconSpec: svgVisibilityHide,\n isHidden: getIsHiddenIfSelectionNotActive(),\n items: [\n this.hideElementsItemDef,\n this.hideCategoriesInSelectionItemDef,\n this.hideModelsInSelectionItemDef,\n ],\n itemsInColumn: 3,\n });\n }\n\n public static get emphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.EmphasizeSelected\",\n iconSpec: svgVisibilitySemiTransparent,\n labelKey: \"UiFramework:tools.emphasizeSelected\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () =>\n UiFramework.hideIsolateEmphasizeActionHandler.processEmphasizeSelected(),\n });\n }\n\n public static get clearHideIsolateEmphasizeElementsItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearHideIsolateEmphasize\",\n iconSpec: svgVisibility,\n labelKey: \"UiFramework:tools.clearVisibility\",\n isHidden: getIsHiddenIfFeatureOverridesActive(),\n execute: async () => {\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearEmphasize();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideModels();\n await UiFramework.hideIsolateEmphasizeActionHandler.processClearOverrideCategories();\n },\n });\n }\n}\n"]}
@@ -2,23 +2,26 @@
2
2
  * @module Item
3
3
  */
4
4
  import { ConditionalBooleanValue as _ConditionalBooleanValue, ConditionalStringValue as _ConditionalStringValue } from "@itwin/appui-abstract";
5
- import { ConditionalIconItem as _ConditionalIconItem } from "@itwin/core-react";
5
+ /** Interface used to track the conditional value of a generic type `T`. The `getValue` function should be called when sync event is emitted that matches one of specified `eventIds` values.
6
+ * @note Use {@link useConditionalValue} hook to get the value.
7
+ * @public
8
+ */
9
+ export interface ConditionalValue<T> {
10
+ eventIds: string[];
11
+ getValue: () => T;
12
+ }
6
13
  /** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The `syncEventIds` define
7
14
  * events that would require the `testFunc` function to be rerun.
8
15
  * @public
9
16
  */
10
17
  export type ConditionalBooleanValue = _ConditionalBooleanValue;
18
+ /** @public */
11
19
  export declare const ConditionalBooleanValue: typeof _ConditionalBooleanValue;
12
20
  /** Class used to return a string value. The string value is refreshed by using the specified function. The `syncEventIds` define
13
21
  * events that would require the `stringGetter` function to be rerun.
14
22
  * @public
15
23
  */
16
24
  export type ConditionalStringValue = _ConditionalStringValue;
25
+ /** @public */
17
26
  export declare const ConditionalStringValue: typeof _ConditionalStringValue;
18
- /** Class used to return an icon value. The value is refreshed by using the specified function. The `syncEventIds` define
19
- * events that would require the `iconGetter` function to be rerun.
20
- * @public
21
- */
22
- export type ConditionalIconValue = _ConditionalIconItem;
23
- export declare const ConditionalIconValue: typeof _ConditionalIconItem;
24
27
  //# sourceMappingURL=ConditionalValue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalValue.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EACL,uBAAuB,IAAI,wBAAwB,EACnD,sBAAsB,IAAI,uBAAuB,EAClD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAE/D,eAAO,MAAM,uBAAuB,iCAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAE7D,eAAO,MAAM,sBAAsB,gCAA0B,CAAC;AAE9D;;;GAGG;AAEH,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD,eAAO,MAAM,oBAAoB,6BAAuB,CAAC"}
1
+ {"version":3,"file":"ConditionalValue.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EACL,uBAAuB,IAAI,wBAAwB,EACnD,sBAAsB,IAAI,uBAAuB,EAClD,MAAM,uBAAuB,CAAC;AAI/B;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAC/D,cAAc;AAEd,eAAO,MAAM,uBAAuB,iCAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC7D,cAAc;AAEd,eAAO,MAAM,sBAAsB,gCAA0B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConditionalIconValue = exports.ConditionalStringValue = exports.ConditionalBooleanValue = void 0;
3
+ exports.ConditionalStringValue = exports.ConditionalBooleanValue = void 0;
4
4
  /*---------------------------------------------------------------------------------------------
5
5
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
6
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -9,11 +9,10 @@ exports.ConditionalIconValue = exports.ConditionalStringValue = exports.Conditio
9
9
  * @module Item
10
10
  */
11
11
  const appui_abstract_1 = require("@itwin/appui-abstract");
12
- const core_react_1 = require("@itwin/core-react");
12
+ /** @public */
13
13
  // eslint-disable-next-line @typescript-eslint/no-redeclare
14
14
  exports.ConditionalBooleanValue = appui_abstract_1.ConditionalBooleanValue;
15
+ /** @public */
15
16
  // eslint-disable-next-line @typescript-eslint/no-redeclare
16
17
  exports.ConditionalStringValue = appui_abstract_1.ConditionalStringValue;
17
- // eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation
18
- exports.ConditionalIconValue = core_react_1.ConditionalIconItem;
19
18
  //# sourceMappingURL=ConditionalValue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAG+B;AAC/B,kDAAgF;AAOhF,2DAA2D;AAC9C,QAAA,uBAAuB,GAAG,wCAAwB,CAAC;AAOhE,2DAA2D;AAC9C,QAAA,sBAAsB,GAAG,uCAAuB,CAAC;AAQ9D,oFAAoF;AACvE,QAAA,oBAAoB,GAAG,gCAAoB,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 Item\n */\nimport {\n ConditionalBooleanValue as _ConditionalBooleanValue,\n ConditionalStringValue as _ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalIconItem as _ConditionalIconItem } from \"@itwin/core-react\";\n\n/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `testFunc` function to be rerun.\n * @public\n */\nexport type ConditionalBooleanValue = _ConditionalBooleanValue;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalBooleanValue = _ConditionalBooleanValue;\n\n/** Class used to return a string value. The string value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `stringGetter` function to be rerun.\n * @public\n */\nexport type ConditionalStringValue = _ConditionalStringValue;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalStringValue = _ConditionalStringValue;\n\n/** Class used to return an icon value. The value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `iconGetter` function to be rerun.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type ConditionalIconValue = _ConditionalIconItem;\n// eslint-disable-next-line @typescript-eslint/no-redeclare, deprecation/deprecation\nexport const ConditionalIconValue = _ConditionalIconItem;\n"]}
1
+ {"version":3,"file":"ConditionalValue.js","sourceRoot":"","sources":["../../../../src/appui-react/shared/ConditionalValue.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,0DAG+B;AAkB/B,cAAc;AACd,2DAA2D;AAC9C,QAAA,uBAAuB,GAAG,wCAAwB,CAAC;AAOhE,cAAc;AACd,2DAA2D;AAC9C,QAAA,sBAAsB,GAAG,uCAAuB,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 Item\n */\nimport {\n ConditionalBooleanValue as _ConditionalBooleanValue,\n ConditionalStringValue as _ConditionalStringValue,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalIconItem as _ConditionalIconItem } from \"@itwin/core-react\";\nimport type { useConditionalValue } from \"../hooks/useConditionalValue\";\n\n/** Interface used to track the conditional value of a generic type `T`. The `getValue` function should be called when sync event is emitted that matches one of specified `eventIds` values.\n * @note Use {@link useConditionalValue} hook to get the value.\n * @public\n */\nexport interface ConditionalValue<T> {\n eventIds: string[];\n getValue: () => T;\n}\n\n/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `testFunc` function to be rerun.\n * @public\n */\nexport type ConditionalBooleanValue = _ConditionalBooleanValue;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalBooleanValue = _ConditionalBooleanValue;\n\n/** Class used to return a string value. The string value is refreshed by using the specified function. The `syncEventIds` define\n * events that would require the `stringGetter` function to be rerun.\n * @public\n */\nexport type ConditionalStringValue = _ConditionalStringValue;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ConditionalStringValue = _ConditionalStringValue;\n"]}
@@ -26,6 +26,7 @@ export interface StatusBarItemProps extends CommonProps {
26
26
  export declare function DockedStatusBarItem(props: StatusBarItemProps): React.JSX.Element;
27
27
  /** Properties for the [[StatusBarComposer]] React components
28
28
  * @public
29
+ * @deprecated in 4.17.0. Use `React.ComponentProps<typeof StatusBarComposer>`
29
30
  */
30
31
  export interface StatusBarComposerProps extends CommonProps {
31
32
  /** Status Bar items */
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarComposer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarComposer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,iBAAiB,CAAC;AAqBzB,UAAU,8BAA8B;IACtC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAMD,gBAAgB;AAChB,wBAAgB,iBAAiB,mCAEhC;AAED;;GAEG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,qBAqB5D;AAoLD;;GAEG;AAEH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,uBAAuB;IACvB,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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AE,MAAM,CAAC;IACzB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AAEH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAsR9D"}
@@ -176,6 +176,7 @@ function isItemInOverflow(id, overflowItemIds) {
176
176
  /** Component to load components into the [[StatusBar]].
177
177
  * @public
178
178
  */
179
+ // eslint-disable-next-line deprecation/deprecation
179
180
  function StatusBarComposer(props) {
180
181
  const { className, style, items, mainClassName, leftClassName, centerClassName, rightClassName, } = props;
181
182
  const [defaultItemsManager, setDefaultItemsManager] = React.useState(() => new StatusBarItemsManager_1.StatusBarItemsManager(items));
@@ -188,10 +189,12 @@ function StatusBarComposer(props) {
188
189
  setDefaultItemsManager(new StatusBarItemsManager_1.StatusBarItemsManager(items));
189
190
  }
190
191
  }, [items]);
192
+ // eslint-disable-next-line deprecation/deprecation
191
193
  const defaultItems = (0, useDefaultStatusBarItems_1.useDefaultStatusBarItems)(defaultItemsManager);
192
194
  const syncIdsOfInterest = React.useMemo(() => StatusBarItemsManager_1.StatusBarItemsManager.getSyncIdsOfInterest(defaultItems), [defaultItems]);
193
195
  useStatusBarItemSyncEffect(defaultItemsManager, syncIdsOfInterest);
194
196
  const [addonItemsManager] = React.useState(() => new StatusBarItemsManager_1.StatusBarItemsManager());
197
+ // eslint-disable-next-line deprecation/deprecation
195
198
  const addonItems = (0, useUiItemsProviderStatusBarItems_1.useUiItemsProviderStatusBarItems)(addonItemsManager);
196
199
  const addonSyncIdsOfInterest = React.useMemo(() => StatusBarItemsManager_1.StatusBarItemsManager.getSyncIdsOfInterest(addonItems), [addonItems]);
197
200
  useStatusBarItemSyncEffect(addonItemsManager, addonSyncIdsOfInterest);
@@ -202,8 +205,10 @@ function StatusBarComposer(props) {
202
205
  const combinedItems = combineItems(defaultItems, addonItems);
203
206
  return sortItems(combinedItems);
204
207
  }, [defaultItems, addonItems]);
205
- const itemsNotInOverflow = React.useMemo(() => {
206
- return statusBarItems.filter((item) => !isItemInOverflow(item.id, overflown));
208
+ const notOverflown = React.useMemo(() => {
209
+ return statusBarItems
210
+ .filter((item) => !isItemInOverflow(item.id, overflown))
211
+ .map((item) => item.id);
207
212
  }, [overflown, statusBarItems]);
208
213
  const calculateOverflow = React.useCallback(() => {
209
214
  const widths = verifiedMapEntries(entryWidths.current);
@@ -256,10 +261,9 @@ function StatusBarComposer(props) {
256
261
  const providerId = (0, isProviderItem_1.isProviderItem)(item) ? item.providerId : undefined;
257
262
  return (React.createElement(DockedStatusBarEntry, { key: key, entryKey: key, getOnResize: handleEntryResize },
258
263
  React.createElement(DockedStatusBarItem, { key: key, itemId: item.id, itemPriority: itemPriority, providerId: providerId, section: getSectionName(section) },
259
- React.createElement(StatusBarCornerComponentContext_1.StatusBarCornerComponentContext.Provider, { value: key === itemsNotInOverflow[0].id
264
+ React.createElement(StatusBarCornerComponentContext_1.StatusBarCornerComponentContext.Provider, { value: key === notOverflown[0]
260
265
  ? "left-corner"
261
- : (key ===
262
- itemsNotInOverflow[itemsNotInOverflow.length - 1].id &&
266
+ : (key === notOverflown[notOverflown.length - 1] &&
263
267
  overflown?.length === 0) ||
264
268
  isItemInOverflow(key, overflown)
265
269
  ? "right-corner"
@@ -267,7 +271,7 @@ function StatusBarComposer(props) {
267
271
  (0, StatusBarItem_1.isStatusBarCustomItem)(item) && item.content,
268
272
  (0, StatusBarItem_1.isStatusBarActionItem)(item) && (React.createElement(StatusBarActionItemComponent, { ...item })),
269
273
  (0, StatusBarItem_1.isStatusBarLabelItem)(item) && (React.createElement(StatusBarLabelItemComponent, { ...item }))))));
270
- }, [handleEntryResize, itemsNotInOverflow, overflown]);
274
+ }, [handleEntryResize, notOverflown, overflown]);
271
275
  const getSectionItems = React.useCallback((section) => {
272
276
  const sectionItems = statusBarItems
273
277
  .filter((item) => item.section.valueOf() === section.valueOf() &&