@itwin/appui-react 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/lib/cjs/appui-react/UiFramework.js +4 -7
  3. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  4. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +1 -2
  5. package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  6. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +1 -1
  7. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  8. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  9. package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  10. package/lib/cjs/appui-react/configurableui/TimeTracker.js +1 -2
  11. package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
  12. package/lib/cjs/appui-react/content/ContentLayout.js +9 -12
  13. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  14. package/lib/cjs/appui-react/content/DefaultViewOverlay.js +3 -4
  15. package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
  16. package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -2
  17. package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
  18. package/lib/cjs/appui-react/content/IModelViewport.js +3 -6
  19. package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
  20. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +1 -2
  21. package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  22. package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -1
  23. package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
  24. package/lib/cjs/appui-react/content/split-pane/SplitPane.js +10 -12
  25. package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
  26. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  27. package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  28. package/lib/cjs/appui-react/dialog/ContentDialog.js +3 -6
  29. package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
  30. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -3
  31. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  32. package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  33. package/lib/cjs/appui-react/frontstage/FrontstageDef.js +33 -51
  34. package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
  35. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +2 -3
  36. package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  37. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  38. package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  39. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  40. package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  41. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  42. package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  43. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +8 -13
  44. package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  45. package/lib/cjs/appui-react/messages/ActivityMessage.js +5 -7
  46. package/lib/cjs/appui-react/messages/ActivityMessage.js.map +1 -1
  47. package/lib/cjs/appui-react/pickers/ViewSelector.js +5 -6
  48. package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
  49. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +1 -2
  50. package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  51. package/lib/cjs/appui-react/popup/PopupManager.js +1 -2
  52. package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
  53. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +2 -2
  54. package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  55. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  56. package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  57. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +11 -16
  58. package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  59. package/lib/cjs/appui-react/statusbar/Indicator.js +1 -2
  60. package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
  61. package/lib/cjs/appui-react/statusbar/StatusBar.js +3 -5
  62. package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
  63. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  64. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  65. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js +6 -4
  66. package/lib/cjs/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  67. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
  68. package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  69. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +10 -17
  70. package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  71. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  72. package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  73. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
  74. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  75. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  76. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  77. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  78. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  79. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  80. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  81. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  82. package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  83. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
  84. package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  85. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +3 -3
  86. package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  87. package/lib/cjs/appui-react/widget-panels/Content.js +8 -9
  88. package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
  89. package/lib/cjs/appui-react/widget-panels/Frontstage.js +34 -32
  90. package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
  91. package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
  92. package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
  93. package/lib/cjs/appui-react/widget-panels/Tab.js +1 -1
  94. package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
  95. package/lib/cjs/appui-react/widget-panels/ToolSettings.js +13 -19
  96. package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
  97. package/lib/cjs/appui-react/widget-panels/Toolbars.js +2 -3
  98. package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
  99. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  100. package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  101. package/lib/cjs/appui-react/widgets/WidgetDef.js +5 -6
  102. package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
  103. package/lib/cjs/appui-react/widgets/WidgetHost.js +2 -3
  104. package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
  105. package/lib/esm/appui-react/UiFramework.js +4 -7
  106. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  107. package/lib/esm/appui-react/backstage/BackstageComposerItem.js +1 -2
  108. package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
  109. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +1 -1
  110. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  111. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
  112. package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
  113. package/lib/esm/appui-react/configurableui/TimeTracker.js +1 -2
  114. package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
  115. package/lib/esm/appui-react/content/ContentLayout.js +9 -12
  116. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  117. package/lib/esm/appui-react/content/DefaultViewOverlay.js +3 -4
  118. package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
  119. package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -2
  120. package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
  121. package/lib/esm/appui-react/content/IModelViewport.js +3 -6
  122. package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
  123. package/lib/esm/appui-react/content/InternalContentLayoutManager.js +1 -2
  124. package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
  125. package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -1
  126. package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
  127. package/lib/esm/appui-react/content/split-pane/SplitPane.js +10 -12
  128. package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
  129. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
  130. package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
  131. package/lib/esm/appui-react/dialog/ContentDialog.js +3 -6
  132. package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
  133. package/lib/esm/appui-react/dialog/DialogManagerBase.js +2 -3
  134. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  135. package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
  136. package/lib/esm/appui-react/frontstage/FrontstageDef.js +33 -51
  137. package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
  138. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +2 -3
  139. package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  140. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
  141. package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
  142. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
  143. package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
  144. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
  145. package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
  146. package/lib/esm/appui-react/hooks/useSolarDataProvider.js +8 -13
  147. package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
  148. package/lib/esm/appui-react/messages/ActivityMessage.js +5 -7
  149. package/lib/esm/appui-react/messages/ActivityMessage.js.map +1 -1
  150. package/lib/esm/appui-react/pickers/ViewSelector.js +5 -6
  151. package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
  152. package/lib/esm/appui-react/popup/KeyinPalettePanel.js +1 -2
  153. package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
  154. package/lib/esm/appui-react/popup/PopupManager.js +1 -2
  155. package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
  156. package/lib/esm/appui-react/selection/SelectionContextItemDef.js +2 -2
  157. package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  158. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  159. package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  160. package/lib/esm/appui-react/stagepanels/StagePanelDef.js +11 -16
  161. package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
  162. package/lib/esm/appui-react/statusbar/Indicator.js +1 -2
  163. package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
  164. package/lib/esm/appui-react/statusbar/StatusBar.js +3 -5
  165. package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
  166. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
  167. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  168. package/lib/esm/appui-react/toolbar/ToolbarHelper.js +6 -4
  169. package/lib/esm/appui-react/toolbar/ToolbarHelper.js.map +1 -1
  170. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
  171. package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
  172. package/lib/esm/appui-react/tools/CoreToolDefinitions.js +10 -17
  173. package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  174. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
  175. package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
  176. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
  177. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
  178. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
  179. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  180. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
  181. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  182. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +8 -14
  183. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  184. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
  185. package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
  186. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
  187. package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
  188. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +3 -3
  189. package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
  190. package/lib/esm/appui-react/widget-panels/Content.js +8 -9
  191. package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
  192. package/lib/esm/appui-react/widget-panels/Frontstage.js +34 -32
  193. package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
  194. package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
  195. package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
  196. package/lib/esm/appui-react/widget-panels/Tab.js +1 -1
  197. package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
  198. package/lib/esm/appui-react/widget-panels/ToolSettings.js +13 -19
  199. package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
  200. package/lib/esm/appui-react/widget-panels/Toolbars.js +2 -3
  201. package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
  202. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -2
  203. package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
  204. package/lib/esm/appui-react/widgets/WidgetDef.js +5 -6
  205. package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
  206. package/lib/esm/appui-react/widgets/WidgetHost.js +2 -3
  207. package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
  208. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ToolAssistanceField.js","sourceRoot":"","sources":["../../../../../src/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sBD,gBAAgB;AACO,+BAAW,GAAG,qBAAqB,AAAxB,CAAyB;AAI5C,sCAAkB,GAAG,gBAAgB,AAAnB,CAAoB;AACtC,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAC9C,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAS7D,gBAAgB;AACO,gCAAY,GAAoC;IACrE,qBAAqB,EAAE,IAAI;IAC3B,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;CAC7B,AALkC,CAKjC;SA1BS,mBAAmB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport \"./ToolAssistanceField.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type {\n ToolAssistanceInstruction,\n ToolAssistanceInstructions,\n ToolAssistanceKeyboardInfo,\n ToolAssistanceSection,\n} from \"@itwin/core-frontend\";\nimport {\n IModelApp,\n ToolAssistanceImage,\n ToolAssistanceInputMethod,\n} from \"@itwin/core-frontend\";\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\nimport type {\n CommonProps,\n UiStateStorage,\n UiStateStorageResult,\n} from \"@itwin/core-react\";\nimport {\n FillCentered,\n Icon,\n LocalStateStorage,\n UiCore,\n UiStateEntry,\n UiStateStorageStatus,\n} from \"@itwin/core-react\";\nimport {\n FooterPopup,\n ToolAssistanceInstruction as NZ_ToolAssistanceInstruction,\n ToolAssistance,\n ToolAssistanceDialog,\n ToolAssistanceItem,\n ToolAssistanceSeparator,\n} from \"@itwin/appui-layout-react\";\nimport { Tabs, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport { CursorPrompt } from \"../../cursor/cursorprompt/CursorPrompt\";\nimport type { ToolIconChangedEventArgs } from \"../../framework/FrameworkFrontstages\";\nimport type { ToolAssistanceChangedEventArgs } from \"../../messages/MessageManager\";\nimport { MessageManager } from \"../../messages/MessageManager\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { UiStateStorageContext } from \"../../uistate/useUiStateStorage\";\n\nimport acceptPointIcon from \"./accept-point.svg\";\nimport cursorClickIcon from \"./cursor-click.svg\";\nimport oneTouchDragIcon from \"./gesture-one-finger-drag.svg\";\nimport oneTouchDoubleTapIcon from \"./gesture-one-finger-tap-double.svg\";\nimport oneTouchTapIcon from \"./gesture-one-finger-tap.svg\";\nimport twoTouchPinchIcon from \"./gesture-pinch.svg\";\nimport twoTouchDragIcon from \"./gesture-two-finger-drag.svg\";\nimport twoTouchTapIcon from \"./gesture-two-finger-tap.svg\";\nimport clickLeftDragIcon from \"./mouse-click-left-drag.svg\";\nimport clickLeftIcon from \"./mouse-click-left.svg\";\nimport clickRightDragIcon from \"./mouse-click-right-drag.svg\";\nimport clickRightIcon from \"./mouse-click-right.svg\";\nimport clickMouseWheelDragIcon from \"./mouse-click-wheel-drag.svg\";\nimport mouseWheelClickIcon from \"./mouse-click-wheel.svg\";\nimport touchCursorDragIcon from \"./touch-cursor-pan.svg\";\nimport touchCursorTapIcon from \"./touch-cursor-point.svg\";\nimport { StatusBarDialog } from \"../../statusbar/dialog/Dialog\";\nimport { SvgClose, SvgPin } from \"@itwin/itwinui-icons-react\";\n\n// cSpell:ignore cursorprompt\n\n/** Properties of [[ToolAssistanceField]] component.\n * @public\n */\nexport interface ToolAssistanceFieldProps extends CommonProps {\n /** Indicates whether to include promptAtCursor Checkbox. Defaults to true. */\n includePromptAtCursor: boolean;\n /** Optional parameter for persistent UI settings. Defaults to UiStateStorageContext.\n */\n uiStateStorage?: UiStateStorage;\n /** Cursor Prompt Timeout period. Defaults to 5000. */\n cursorPromptTimeout: number;\n /** Fade Out the Cursor Prompt when closed. */\n fadeOutCursorPrompt: boolean;\n /** Indicates whether to show promptAtCursor by default. Defaults to false. */\n defaultPromptAtCursor: boolean;\n}\n\n/** Default properties of [[ToolAssistanceField]] component.\n * @internal\n */\nexport type ToolAssistanceFieldDefaultProps = Pick<\n ToolAssistanceFieldProps,\n | \"includePromptAtCursor\"\n | \"uiStateStorage\"\n | \"cursorPromptTimeout\"\n | \"fadeOutCursorPrompt\"\n | \"defaultPromptAtCursor\"\n>;\n\n/** @internal */\ninterface ToolAssistanceFieldState {\n instructions: ToolAssistanceInstructions | undefined;\n toolIconSpec: string;\n showPromptAtCursor: boolean;\n includeMouseInstructions: boolean;\n includeTouchInstructions: boolean;\n showMouseTouchTabs: boolean;\n showMouseInstructions: boolean;\n showTouchInstructions: boolean;\n mouseTouchTabIndex: number;\n isPinned: boolean;\n isOpen: boolean;\n}\n\n/** Tool Assistance Field React component.\n * @public\n */\nexport class ToolAssistanceField extends React.Component<\n ToolAssistanceFieldProps,\n ToolAssistanceFieldState\n> {\n /** @internal */\n public static override contextType = UiStateStorageContext;\n /** @internal */\n public declare context: React.ContextType<typeof UiStateStorageContext>;\n\n private static _toolAssistanceKey = \"ToolAssistance\";\n private static _showPromptAtCursorKey = \"showPromptAtCursor\";\n private static _mouseTouchTabIndexKey = \"mouseTouchTabIndex\";\n private _showPromptAtCursorSetting: UiStateEntry<boolean>;\n private _mouseTouchTabIndexSetting: UiStateEntry<number>;\n private _target: HTMLElement | null = null;\n private _indicator = React.createRef<HTMLDivElement>();\n private _cursorPrompt: CursorPrompt;\n private _isMounted = false;\n private _uiSettingsStorage: UiStateStorage;\n\n /** @internal */\n public static readonly defaultProps: ToolAssistanceFieldDefaultProps = {\n includePromptAtCursor: true,\n cursorPromptTimeout: 5000,\n fadeOutCursorPrompt: true,\n defaultPromptAtCursor: false,\n };\n\n /** @internal */\n constructor(p: ToolAssistanceFieldProps) {\n super(p);\n\n const mobile = UiFramework.isMobile();\n\n this.state = {\n instructions: undefined,\n toolIconSpec: \"\",\n showPromptAtCursor: p.defaultPromptAtCursor,\n includeMouseInstructions: !mobile,\n includeTouchInstructions: true,\n showMouseTouchTabs: false,\n showMouseInstructions: false,\n showTouchInstructions: false,\n mouseTouchTabIndex: 0,\n isPinned: false,\n isOpen: false,\n };\n\n this._uiSettingsStorage = new LocalStateStorage();\n this._cursorPrompt = new CursorPrompt(\n this.props.cursorPromptTimeout,\n this.props.fadeOutCursorPrompt\n );\n this._showPromptAtCursorSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._showPromptAtCursorKey,\n () => this.state.showPromptAtCursor\n );\n this._mouseTouchTabIndexSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._mouseTouchTabIndexKey,\n () => this.state.mouseTouchTabIndex\n );\n }\n\n /** @internal */\n public override async componentDidMount() {\n this._isMounted = true;\n MessageManager.onToolAssistanceChangedEvent.addListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.addListener(\n this._handleToolIconChangedEvent\n );\n\n // istanbul ignore else\n if (this.props.uiStateStorage)\n this._uiSettingsStorage = this.props.uiStateStorage;\n else if (this.context) this._uiSettingsStorage = this.context;\n\n await this.restoreSettings();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n MessageManager.onToolAssistanceChangedEvent.removeListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.removeListener(\n this._handleToolIconChangedEvent\n );\n }\n\n private async restoreSettings() {\n let getShowPromptAtCursor: Promise<UiStateStorageResult> | undefined;\n // istanbul ignore else\n if (this.props.includePromptAtCursor) {\n getShowPromptAtCursor = this._showPromptAtCursorSetting.getSetting(\n this._uiSettingsStorage\n );\n }\n const getMouseTouchTabIndex = this._mouseTouchTabIndexSetting.getSetting(\n this._uiSettingsStorage\n );\n const [showPromptAtCursorResult, mouseTouchTabIndexResult] =\n await Promise.all([getShowPromptAtCursor, getMouseTouchTabIndex]);\n\n // istanbul ignore else\n if (\n showPromptAtCursorResult !== undefined &&\n showPromptAtCursorResult.status === UiStateStorageStatus.Success\n ) {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ showPromptAtCursor: showPromptAtCursorResult.setting });\n }\n\n // istanbul ignore else\n if (mouseTouchTabIndexResult.status === UiStateStorageStatus.Success) {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ mouseTouchTabIndex: mouseTouchTabIndexResult.setting });\n }\n }\n\n private _handleToolAssistanceChangedEvent = (\n args: ToolAssistanceChangedEventArgs\n ): void => {\n let showMouseTouchTabs = false;\n let showMouseInstructions = false;\n let showTouchInstructions = false;\n\n if (args.instructions && args.instructions.sections) {\n const hasMouseInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isMouseInstruction(instruction)\n );\n }\n );\n const hasTouchInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isTouchInstruction(instruction)\n );\n }\n );\n\n if (\n this.state.includeMouseInstructions &&\n this.state.includeTouchInstructions &&\n hasMouseInstructions &&\n hasTouchInstructions\n ) {\n showMouseTouchTabs = true;\n showMouseInstructions = this.state.mouseTouchTabIndex === 0;\n showTouchInstructions = this.state.mouseTouchTabIndex === 1;\n } else {\n if (this.state.includeMouseInstructions && hasMouseInstructions)\n showMouseInstructions = true;\n else if (this.state.includeTouchInstructions && hasTouchInstructions)\n showTouchInstructions = true;\n }\n }\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n instructions: args.instructions,\n showMouseTouchTabs,\n showMouseInstructions,\n showTouchInstructions,\n },\n () => {\n this._showCursorPrompt();\n }\n );\n };\n\n private _isBothInstruction = (instruction: ToolAssistanceInstruction) => {\n return (\n instruction.inputMethod === undefined ||\n instruction.inputMethod === ToolAssistanceInputMethod.Both\n );\n };\n\n private _isMouseInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Mouse;\n\n private _isTouchInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Touch;\n\n private _handleToolIconChangedEvent = (\n args: ToolIconChangedEventArgs\n ): void => {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ toolIconSpec: args.iconSpec }, () => {\n this._showCursorPrompt();\n });\n };\n\n private _showCursorPrompt() {\n if (this.state.showPromptAtCursor && this.state.instructions)\n this._cursorPrompt.display(\n this.state.toolIconSpec,\n this.state.instructions.mainInstruction\n );\n }\n\n private _sectionHasDisplayableInstructions(\n section: ToolAssistanceSection\n ): boolean {\n const displayableInstructions = this._getDisplayableInstructions(section);\n return displayableInstructions.length > 0;\n }\n\n private _getDisplayableInstructions(\n section: ToolAssistanceSection\n ): ToolAssistanceInstruction[] {\n const displayableInstructions = section.instructions.filter(\n (instruction: ToolAssistanceInstruction) => {\n return (\n this._isBothInstruction(instruction) ||\n (this.state.showMouseInstructions &&\n this._isMouseInstruction(instruction)) ||\n (this.state.showTouchInstructions &&\n this._isTouchInstruction(instruction))\n );\n }\n );\n return displayableInstructions;\n }\n\n private _handleMouseTouchTab = async (index: number) => {\n const showMouseInstructions = index === 0;\n const showTouchInstructions = index === 1;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n mouseTouchTabIndex: index,\n showMouseInstructions,\n showTouchInstructions,\n },\n async () => {\n await this._mouseTouchTabIndexSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n /** @internal */\n public override render(): React.ReactNode {\n const { instructions } = this.state;\n const dialogTitle = IModelApp.toolAdmin.activeTool\n ? /* istanbul ignore next */ IModelApp.toolAdmin.activeTool.flyover\n : UiFramework.translate(\"toolAssistance.title\");\n const mouseLabel = UiFramework.translate(\"toolAssistance.mouse\");\n const touchLabel = UiFramework.translate(\"toolAssistance.touch\");\n let prompt = \"\";\n let tooltip = \"\";\n let toolIcon: React.ReactNode;\n let dialogContent: React.ReactNode;\n\n if (instructions) {\n prompt = instructions.mainInstruction.text;\n toolIcon = <Icon iconSpec={this.state.toolIconSpec} />;\n\n let displayableSections: ToolAssistanceSection[] | undefined;\n if (instructions.sections) {\n displayableSections = instructions.sections.filter(\n (section: ToolAssistanceSection) =>\n this._sectionHasDisplayableInstructions(section)\n );\n }\n\n dialogContent = (\n <div>\n {this.state.showMouseTouchTabs && (\n <Tabs\n orientation=\"horizontal\"\n tabsClassName=\"uifw-toolAssistance-tabs\"\n labels={[mouseLabel, touchLabel]}\n activeIndex={this.state.mouseTouchTabIndex}\n onTabSelected={this._handleMouseTouchTab}\n />\n )}\n\n <div className=\"uifw-toolAssistance-content\">\n <NZ_ToolAssistanceInstruction\n key=\"main\"\n image={ToolAssistanceField.getInstructionImage(\n instructions.mainInstruction\n )}\n text={instructions.mainInstruction.text}\n isNew={instructions.mainInstruction.isNew}\n />\n\n {displayableSections &&\n displayableSections.map(\n (section: ToolAssistanceSection, index1: number) => {\n return (\n <React.Fragment key={index1.toString()}>\n <ToolAssistanceSeparator key={index1.toString()}>\n {section.label}\n </ToolAssistanceSeparator>\n {this._getDisplayableInstructions(section).map(\n (\n instruction: ToolAssistanceInstruction,\n index2: number\n ) => {\n return (\n <NZ_ToolAssistanceInstruction\n key={`${index1.toString()}-${index2.toString()}`}\n image={ToolAssistanceField.getInstructionImage(\n instruction\n )}\n text={instruction.text}\n isNew={instruction.isNew}\n />\n );\n }\n )}\n </React.Fragment>\n );\n }\n )}\n\n {this.props.includePromptAtCursor && (\n <>\n <ToolAssistanceSeparator key=\"prompt-sep\" />\n <ToolAssistanceItem key=\"prompt-item\">\n <ToggleSwitch\n label={UiFramework.translate(\n \"toolAssistance.promptAtCursor\"\n )}\n labelPosition=\"right\"\n checked={this.state.showPromptAtCursor}\n onChange={this._onPromptAtCursorChange}\n />\n </ToolAssistanceItem>\n </>\n )}\n </div>\n </div>\n );\n }\n\n if (prompt) tooltip = prompt;\n\n // istanbul ignore next\n if (IModelApp.toolAdmin.activeTool)\n tooltip = `${IModelApp.toolAdmin.activeTool.flyover} > ${tooltip} `;\n\n if (tooltip) {\n const lineBreak = \"\\u000d\\u000a\";\n tooltip = tooltip + lineBreak;\n }\n\n tooltip += UiFramework.translate(\"toolAssistance.moreInfo\");\n\n return (\n <>\n <div style={{ height: \"100%\" }} ref={this._handleTargetRef}>\n <ToolAssistance\n icons={<>{toolIcon}</>}\n indicatorRef={this._indicator}\n className={classnames(\n \"uifw-statusFields-toolassistance\",\n this.props.className\n )}\n style={this.props.style}\n onClick={this._handleToolAssistanceIndicatorClick}\n title={tooltip}\n >\n {prompt}\n </ToolAssistance>\n </div>\n <FooterPopup\n isOpen={this.state.isOpen}\n onClose={this._handleClose}\n onOutsideClick={this._handleOutsideClick}\n target={this._target}\n isPinned={this.state.isPinned}\n >\n <ToolAssistanceDialog\n buttons={\n <>\n {!this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handlePinButtonClick}\n title={UiFramework.translate(\"toolAssistance.pin\")}\n >\n <Icon iconSpec={<SvgPin />} />\n </StatusBarDialog.TitleBarButton>\n )}\n {this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handleCloseButtonClick}\n title={UiCore.translate(\"dialog.close\")}\n >\n <Icon iconSpec={<SvgClose />} />\n </StatusBarDialog.TitleBarButton>\n )}\n </>\n }\n title={dialogTitle}\n >\n {dialogContent}\n </ToolAssistanceDialog>\n </FooterPopup>\n </>\n );\n }\n\n private _handleTargetRef = (target: HTMLElement | null) => {\n this._target = target;\n };\n\n private _onPromptAtCursorChange = async (\n e: React.ChangeEvent<HTMLInputElement>\n ) => {\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n showPromptAtCursor: e.target.checked,\n },\n async () => {\n await this._showPromptAtCursorSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n private _handleClose = () => {\n this.setIsOpen(false);\n };\n\n private _handleOutsideClick = (e: MouseEvent) => {\n // istanbul ignore if\n if (\n !this._indicator.current ||\n !(e.target instanceof Node) ||\n this._indicator.current.contains(e.target)\n )\n return;\n\n this._handleClose();\n };\n\n private _handleToolAssistanceIndicatorClick = () => {\n this.setIsOpen(!this.state.isOpen);\n };\n\n private _handlePinButtonClick = () => {\n // istanbul ignore else\n if (this._isMounted) this.setState({ isPinned: true });\n };\n\n private _handleCloseButtonClick = () => {\n this._handleClose();\n };\n\n private setIsOpen(isOpen: boolean) {\n let newState = {\n isOpen,\n };\n if (!isOpen && this.state.isPinned && this._isMounted) {\n newState = { ...newState, ...{ isPinned: false } };\n }\n this.setState(newState);\n }\n\n /** @internal */\n public static getInstructionImage(\n instruction: ToolAssistanceInstruction\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (\n (typeof instruction.image === \"string\" ||\n instruction.image !== ToolAssistanceImage.Keyboard) &&\n instruction.keyboardInfo\n ) {\n if (\n instruction.keyboardInfo.keys.length === 1 &&\n !instruction.keyboardInfo.bottomKeys\n ) {\n const key = instruction.keyboardInfo.keys[0];\n const rightImage =\n typeof instruction.image === \"string\" ? (\n <div className=\"uifw-toolassistance-icon-medium\">\n <Icon iconSpec={instruction.image} />\n </div>\n ) : (\n this.getInstructionSvgImage(instruction, true)\n );\n\n image = (\n <FillCentered>\n {ToolAssistanceField.getKeyNode(\n key,\n 0,\n \"uifw-toolassistance-key-modifier\"\n )}\n {rightImage}\n </FillCentered>\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getInstructionImage: Invalid keyboardInfo provided with image`\n );\n }\n } else if (typeof instruction.image === \"string\") {\n if (instruction.image.length > 0) {\n const svgSource = IconSpecUtilities.getWebComponentSource(\n instruction.image\n );\n const className =\n svgSource !== undefined\n ? \"uifw-toolassistance-svg\"\n : \"uifw-toolassistance-icon-large\";\n image = (\n <div className={className}>\n <Icon iconSpec={svgSource ?? instruction.image} />\n </div>\n );\n }\n } else if (instruction.image === ToolAssistanceImage.Keyboard) {\n if (instruction.keyboardInfo) {\n image = ToolAssistanceField.getInstructionKeyboardImage(\n instruction.keyboardInfo\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getInstructionImage: ToolAssistanceImage.Keyboard specified but no keyboardInfo provided`\n );\n }\n } else {\n image = this.getInstructionSvgImage(instruction, false);\n }\n\n return image;\n }\n\n private static getInstructionSvgImage(\n instruction: ToolAssistanceInstruction,\n mediumSize: boolean\n ): React.ReactNode {\n let image: React.ReactNode;\n let className = mediumSize\n ? \"uifw-toolassistance-svg-medium\"\n : \"uifw-toolassistance-svg\";\n\n // istanbul ignore else\n if (\n typeof instruction.image !== \"string\" &&\n instruction.image !== ToolAssistanceImage.Keyboard\n ) {\n const toolAssistanceImage: ToolAssistanceImage = instruction.image;\n let svgImage = \"\";\n\n switch (toolAssistanceImage) {\n case ToolAssistanceImage.AcceptPoint:\n svgImage = acceptPointIcon;\n break;\n case ToolAssistanceImage.CursorClick:\n svgImage = cursorClickIcon;\n break;\n case ToolAssistanceImage.LeftClick:\n svgImage = clickLeftIcon;\n break;\n case ToolAssistanceImage.RightClick:\n svgImage = clickRightIcon;\n break;\n case ToolAssistanceImage.MouseWheel:\n svgImage = mouseWheelClickIcon;\n break;\n case ToolAssistanceImage.LeftClickDrag:\n svgImage = clickLeftDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.RightClickDrag:\n svgImage = clickRightDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.MouseWheelClickDrag:\n svgImage = clickMouseWheelDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.OneTouchTap:\n svgImage = oneTouchTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDoubleTap:\n svgImage = oneTouchDoubleTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDrag:\n svgImage = oneTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchTap:\n svgImage = twoTouchTapIcon;\n break;\n case ToolAssistanceImage.TwoTouchDrag:\n svgImage = twoTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchPinch:\n svgImage = twoTouchPinchIcon;\n break;\n case ToolAssistanceImage.TouchCursorTap:\n svgImage = touchCursorTapIcon;\n break;\n case ToolAssistanceImage.TouchCursorDrag:\n svgImage = touchCursorDragIcon;\n className = mediumSize\n ? /* istanbul ignore next */ \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n }\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(svgImage);\n image = (\n <div className={className}>\n {svgImage && (\n // istanbul ignore next\n <Icon iconSpec={iconSpec} />\n )}\n </div>\n );\n }\n\n return image;\n }\n\n private static getInstructionKeyboardImage(\n keyboardInfo: ToolAssistanceKeyboardInfo\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (keyboardInfo.bottomKeys !== undefined) {\n image = (\n <div className=\"uifw-toolassistance-key-group\">\n <span className=\"row1\">\n {keyboardInfo.keys.map((key: string, index1: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index1,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n <br />\n <span className=\"row2\">\n {keyboardInfo.bottomKeys.map((key: string, index2: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index2,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n </div>\n );\n } else if (keyboardInfo.keys.length === 2) {\n image = (\n <FillCentered>\n {keyboardInfo.keys.map((key: string, index3: number) => {\n let className = \"uifw-toolassistance-key-medium\";\n if (key.length > 1) className = \"uifw-toolassistance-key-modifier\";\n return ToolAssistanceField.getKeyNode(key, index3, className);\n })}\n </FillCentered>\n );\n } else if (keyboardInfo.keys[0]) {\n if (keyboardInfo.keys[0].length > 1)\n image = ToolAssistanceField.getKeyNode(\n keyboardInfo.keys[0],\n 0,\n \"uifw-toolassistance-key-large\"\n );\n else image = ToolAssistanceField.getKeyNode(keyboardInfo.keys[0], 0);\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `ToolAssistanceImage.Keyboard specified but ToolAssistanceKeyboardInfo not valid`\n );\n }\n\n return image;\n }\n\n private static getKeyNode(\n key: string,\n index: number,\n className?: string\n ): React.ReactNode {\n return (\n <div\n key={index.toString()}\n className={classnames(\"uifw-toolassistance-key\", className)}\n >\n <FillCentered>{key}</FillCentered>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ToolAssistanceField.js","sourceRoot":"","sources":["../../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,4BAA4B,CAAC;AACpC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM1D,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EACX,yBAAyB,IAAI,4BAA4B,EACzD,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,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,cAAc,CAAC,IAAI,CAAC,EAChC,iFAAiF,CAClF,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,UAAU,CACvB,GAAW,EACX,KAAa,EACb,SAAkB;QAElB,OAAO,CACL,6BACE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,EACrB,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC;YAE3D,oBAAC,YAAY,QAAE,GAAG,CAAgB,CAC9B,CACP,CAAC;IACJ,CAAC;;AA3sBD,gBAAgB;AACO,+BAAW,GAAG,qBAAqB,AAAxB,CAAyB;AAI5C,sCAAkB,GAAG,gBAAgB,AAAnB,CAAoB;AACtC,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAC9C,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAS7D,gBAAgB;AACO,gCAAY,GAAoC;IACrE,qBAAqB,EAAE,IAAI;IAC3B,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;CAC7B,AALkC,CAKjC;SA1BS,mBAAmB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport \"./ToolAssistanceField.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type {\n ToolAssistanceInstruction,\n ToolAssistanceInstructions,\n ToolAssistanceKeyboardInfo,\n ToolAssistanceSection,\n} from \"@itwin/core-frontend\";\nimport {\n IModelApp,\n ToolAssistanceImage,\n ToolAssistanceInputMethod,\n} from \"@itwin/core-frontend\";\nimport { IconSpecUtilities } from \"@itwin/appui-abstract\";\nimport type {\n CommonProps,\n UiStateStorage,\n UiStateStorageResult,\n} from \"@itwin/core-react\";\nimport {\n FillCentered,\n Icon,\n LocalStateStorage,\n UiCore,\n UiStateEntry,\n UiStateStorageStatus,\n} from \"@itwin/core-react\";\nimport {\n FooterPopup,\n ToolAssistanceInstruction as NZ_ToolAssistanceInstruction,\n ToolAssistance,\n ToolAssistanceDialog,\n ToolAssistanceItem,\n ToolAssistanceSeparator,\n} from \"@itwin/appui-layout-react\";\nimport { Tabs, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport { CursorPrompt } from \"../../cursor/cursorprompt/CursorPrompt\";\nimport type { ToolIconChangedEventArgs } from \"../../framework/FrameworkFrontstages\";\nimport type { ToolAssistanceChangedEventArgs } from \"../../messages/MessageManager\";\nimport { MessageManager } from \"../../messages/MessageManager\";\nimport { UiFramework } from \"../../UiFramework\";\nimport { UiStateStorageContext } from \"../../uistate/useUiStateStorage\";\n\nimport acceptPointIcon from \"./accept-point.svg\";\nimport cursorClickIcon from \"./cursor-click.svg\";\nimport oneTouchDragIcon from \"./gesture-one-finger-drag.svg\";\nimport oneTouchDoubleTapIcon from \"./gesture-one-finger-tap-double.svg\";\nimport oneTouchTapIcon from \"./gesture-one-finger-tap.svg\";\nimport twoTouchPinchIcon from \"./gesture-pinch.svg\";\nimport twoTouchDragIcon from \"./gesture-two-finger-drag.svg\";\nimport twoTouchTapIcon from \"./gesture-two-finger-tap.svg\";\nimport clickLeftDragIcon from \"./mouse-click-left-drag.svg\";\nimport clickLeftIcon from \"./mouse-click-left.svg\";\nimport clickRightDragIcon from \"./mouse-click-right-drag.svg\";\nimport clickRightIcon from \"./mouse-click-right.svg\";\nimport clickMouseWheelDragIcon from \"./mouse-click-wheel-drag.svg\";\nimport mouseWheelClickIcon from \"./mouse-click-wheel.svg\";\nimport touchCursorDragIcon from \"./touch-cursor-pan.svg\";\nimport touchCursorTapIcon from \"./touch-cursor-point.svg\";\nimport { StatusBarDialog } from \"../../statusbar/dialog/Dialog\";\nimport { SvgClose, SvgPin } from \"@itwin/itwinui-icons-react\";\n\n// cSpell:ignore cursorprompt\n\n/** Properties of [[ToolAssistanceField]] component.\n * @public\n */\nexport interface ToolAssistanceFieldProps extends CommonProps {\n /** Indicates whether to include promptAtCursor Checkbox. Defaults to true. */\n includePromptAtCursor: boolean;\n /** Optional parameter for persistent UI settings. Defaults to UiStateStorageContext.\n */\n uiStateStorage?: UiStateStorage;\n /** Cursor Prompt Timeout period. Defaults to 5000. */\n cursorPromptTimeout: number;\n /** Fade Out the Cursor Prompt when closed. */\n fadeOutCursorPrompt: boolean;\n /** Indicates whether to show promptAtCursor by default. Defaults to false. */\n defaultPromptAtCursor: boolean;\n}\n\n/** Default properties of [[ToolAssistanceField]] component.\n * @internal\n */\nexport type ToolAssistanceFieldDefaultProps = Pick<\n ToolAssistanceFieldProps,\n | \"includePromptAtCursor\"\n | \"uiStateStorage\"\n | \"cursorPromptTimeout\"\n | \"fadeOutCursorPrompt\"\n | \"defaultPromptAtCursor\"\n>;\n\n/** @internal */\ninterface ToolAssistanceFieldState {\n instructions: ToolAssistanceInstructions | undefined;\n toolIconSpec: string;\n showPromptAtCursor: boolean;\n includeMouseInstructions: boolean;\n includeTouchInstructions: boolean;\n showMouseTouchTabs: boolean;\n showMouseInstructions: boolean;\n showTouchInstructions: boolean;\n mouseTouchTabIndex: number;\n isPinned: boolean;\n isOpen: boolean;\n}\n\n/** Tool Assistance Field React component.\n * @public\n */\nexport class ToolAssistanceField extends React.Component<\n ToolAssistanceFieldProps,\n ToolAssistanceFieldState\n> {\n /** @internal */\n public static override contextType = UiStateStorageContext;\n /** @internal */\n public declare context: React.ContextType<typeof UiStateStorageContext>;\n\n private static _toolAssistanceKey = \"ToolAssistance\";\n private static _showPromptAtCursorKey = \"showPromptAtCursor\";\n private static _mouseTouchTabIndexKey = \"mouseTouchTabIndex\";\n private _showPromptAtCursorSetting: UiStateEntry<boolean>;\n private _mouseTouchTabIndexSetting: UiStateEntry<number>;\n private _target: HTMLElement | null = null;\n private _indicator = React.createRef<HTMLDivElement>();\n private _cursorPrompt: CursorPrompt;\n private _isMounted = false;\n private _uiSettingsStorage: UiStateStorage;\n\n /** @internal */\n public static readonly defaultProps: ToolAssistanceFieldDefaultProps = {\n includePromptAtCursor: true,\n cursorPromptTimeout: 5000,\n fadeOutCursorPrompt: true,\n defaultPromptAtCursor: false,\n };\n\n /** @internal */\n constructor(p: ToolAssistanceFieldProps) {\n super(p);\n\n const mobile = UiFramework.isMobile();\n\n this.state = {\n instructions: undefined,\n toolIconSpec: \"\",\n showPromptAtCursor: p.defaultPromptAtCursor,\n includeMouseInstructions: !mobile,\n includeTouchInstructions: true,\n showMouseTouchTabs: false,\n showMouseInstructions: false,\n showTouchInstructions: false,\n mouseTouchTabIndex: 0,\n isPinned: false,\n isOpen: false,\n };\n\n this._uiSettingsStorage = new LocalStateStorage();\n this._cursorPrompt = new CursorPrompt(\n this.props.cursorPromptTimeout,\n this.props.fadeOutCursorPrompt\n );\n this._showPromptAtCursorSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._showPromptAtCursorKey,\n () => this.state.showPromptAtCursor\n );\n this._mouseTouchTabIndexSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._mouseTouchTabIndexKey,\n () => this.state.mouseTouchTabIndex\n );\n }\n\n /** @internal */\n public override async componentDidMount() {\n this._isMounted = true;\n MessageManager.onToolAssistanceChangedEvent.addListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.addListener(\n this._handleToolIconChangedEvent\n );\n\n // istanbul ignore else\n if (this.props.uiStateStorage)\n this._uiSettingsStorage = this.props.uiStateStorage;\n else if (this.context) this._uiSettingsStorage = this.context;\n\n await this.restoreSettings();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n MessageManager.onToolAssistanceChangedEvent.removeListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.removeListener(\n this._handleToolIconChangedEvent\n );\n }\n\n private async restoreSettings() {\n let getShowPromptAtCursor: Promise<UiStateStorageResult> | undefined;\n // istanbul ignore else\n if (this.props.includePromptAtCursor) {\n getShowPromptAtCursor = this._showPromptAtCursorSetting.getSetting(\n this._uiSettingsStorage\n );\n }\n const getMouseTouchTabIndex = this._mouseTouchTabIndexSetting.getSetting(\n this._uiSettingsStorage\n );\n const [showPromptAtCursorResult, mouseTouchTabIndexResult] =\n await Promise.all([getShowPromptAtCursor, getMouseTouchTabIndex]);\n\n // istanbul ignore else\n if (\n showPromptAtCursorResult !== undefined &&\n showPromptAtCursorResult.status === UiStateStorageStatus.Success\n ) {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ showPromptAtCursor: showPromptAtCursorResult.setting });\n }\n\n // istanbul ignore else\n if (mouseTouchTabIndexResult.status === UiStateStorageStatus.Success) {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ mouseTouchTabIndex: mouseTouchTabIndexResult.setting });\n }\n }\n\n private _handleToolAssistanceChangedEvent = (\n args: ToolAssistanceChangedEventArgs\n ): void => {\n let showMouseTouchTabs = false;\n let showMouseInstructions = false;\n let showTouchInstructions = false;\n\n if (args.instructions && args.instructions.sections) {\n const hasMouseInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isMouseInstruction(instruction)\n );\n }\n );\n const hasTouchInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isTouchInstruction(instruction)\n );\n }\n );\n\n if (\n this.state.includeMouseInstructions &&\n this.state.includeTouchInstructions &&\n hasMouseInstructions &&\n hasTouchInstructions\n ) {\n showMouseTouchTabs = true;\n showMouseInstructions = this.state.mouseTouchTabIndex === 0;\n showTouchInstructions = this.state.mouseTouchTabIndex === 1;\n } else {\n if (this.state.includeMouseInstructions && hasMouseInstructions)\n showMouseInstructions = true;\n else if (this.state.includeTouchInstructions && hasTouchInstructions)\n showTouchInstructions = true;\n }\n }\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n instructions: args.instructions,\n showMouseTouchTabs,\n showMouseInstructions,\n showTouchInstructions,\n },\n () => {\n this._showCursorPrompt();\n }\n );\n };\n\n private _isBothInstruction = (instruction: ToolAssistanceInstruction) => {\n return (\n instruction.inputMethod === undefined ||\n instruction.inputMethod === ToolAssistanceInputMethod.Both\n );\n };\n\n private _isMouseInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Mouse;\n\n private _isTouchInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Touch;\n\n private _handleToolIconChangedEvent = (\n args: ToolIconChangedEventArgs\n ): void => {\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ toolIconSpec: args.iconSpec }, () => {\n this._showCursorPrompt();\n });\n };\n\n private _showCursorPrompt() {\n if (this.state.showPromptAtCursor && this.state.instructions)\n this._cursorPrompt.display(\n this.state.toolIconSpec,\n this.state.instructions.mainInstruction\n );\n }\n\n private _sectionHasDisplayableInstructions(\n section: ToolAssistanceSection\n ): boolean {\n const displayableInstructions = this._getDisplayableInstructions(section);\n return displayableInstructions.length > 0;\n }\n\n private _getDisplayableInstructions(\n section: ToolAssistanceSection\n ): ToolAssistanceInstruction[] {\n const displayableInstructions = section.instructions.filter(\n (instruction: ToolAssistanceInstruction) => {\n return (\n this._isBothInstruction(instruction) ||\n (this.state.showMouseInstructions &&\n this._isMouseInstruction(instruction)) ||\n (this.state.showTouchInstructions &&\n this._isTouchInstruction(instruction))\n );\n }\n );\n return displayableInstructions;\n }\n\n private _handleMouseTouchTab = async (index: number) => {\n const showMouseInstructions = index === 0;\n const showTouchInstructions = index === 1;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n mouseTouchTabIndex: index,\n showMouseInstructions,\n showTouchInstructions,\n },\n async () => {\n await this._mouseTouchTabIndexSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n /** @internal */\n public override render(): React.ReactNode {\n const { instructions } = this.state;\n const dialogTitle = IModelApp.toolAdmin.activeTool\n ? /* istanbul ignore next */ IModelApp.toolAdmin.activeTool.flyover\n : UiFramework.translate(\"toolAssistance.title\");\n const mouseLabel = UiFramework.translate(\"toolAssistance.mouse\");\n const touchLabel = UiFramework.translate(\"toolAssistance.touch\");\n let prompt = \"\";\n let tooltip = \"\";\n let toolIcon: React.ReactNode;\n let dialogContent: React.ReactNode;\n\n if (instructions) {\n prompt = instructions.mainInstruction.text;\n toolIcon = <Icon iconSpec={this.state.toolIconSpec} />;\n\n let displayableSections: ToolAssistanceSection[] | undefined;\n if (instructions.sections) {\n displayableSections = instructions.sections.filter(\n (section: ToolAssistanceSection) =>\n this._sectionHasDisplayableInstructions(section)\n );\n }\n\n dialogContent = (\n <div>\n {this.state.showMouseTouchTabs && (\n <Tabs\n orientation=\"horizontal\"\n tabsClassName=\"uifw-toolAssistance-tabs\"\n labels={[mouseLabel, touchLabel]}\n activeIndex={this.state.mouseTouchTabIndex}\n onTabSelected={this._handleMouseTouchTab}\n />\n )}\n\n <div className=\"uifw-toolAssistance-content\">\n <NZ_ToolAssistanceInstruction\n key=\"main\"\n image={ToolAssistanceField.getInstructionImage(\n instructions.mainInstruction\n )}\n text={instructions.mainInstruction.text}\n isNew={instructions.mainInstruction.isNew}\n />\n\n {displayableSections &&\n displayableSections.map(\n (section: ToolAssistanceSection, index1: number) => {\n return (\n <React.Fragment key={index1.toString()}>\n <ToolAssistanceSeparator key={index1.toString()}>\n {section.label}\n </ToolAssistanceSeparator>\n {this._getDisplayableInstructions(section).map(\n (\n instruction: ToolAssistanceInstruction,\n index2: number\n ) => {\n return (\n <NZ_ToolAssistanceInstruction\n key={`${index1.toString()}-${index2.toString()}`}\n image={ToolAssistanceField.getInstructionImage(\n instruction\n )}\n text={instruction.text}\n isNew={instruction.isNew}\n />\n );\n }\n )}\n </React.Fragment>\n );\n }\n )}\n\n {this.props.includePromptAtCursor && (\n <>\n <ToolAssistanceSeparator key=\"prompt-sep\" />\n <ToolAssistanceItem key=\"prompt-item\">\n <ToggleSwitch\n label={UiFramework.translate(\n \"toolAssistance.promptAtCursor\"\n )}\n labelPosition=\"right\"\n checked={this.state.showPromptAtCursor}\n onChange={this._onPromptAtCursorChange}\n />\n </ToolAssistanceItem>\n </>\n )}\n </div>\n </div>\n );\n }\n\n if (prompt) tooltip = prompt;\n\n // istanbul ignore next\n if (IModelApp.toolAdmin.activeTool)\n tooltip = `${IModelApp.toolAdmin.activeTool.flyover} > ${tooltip} `;\n\n if (tooltip) {\n const lineBreak = \"\\u000d\\u000a\";\n tooltip = tooltip + lineBreak;\n }\n\n tooltip += UiFramework.translate(\"toolAssistance.moreInfo\");\n\n return (\n <>\n <div style={{ height: \"100%\" }} ref={this._handleTargetRef}>\n <ToolAssistance\n icons={<>{toolIcon}</>}\n indicatorRef={this._indicator}\n className={classnames(\n \"uifw-statusFields-toolassistance\",\n this.props.className\n )}\n style={this.props.style}\n onClick={this._handleToolAssistanceIndicatorClick}\n title={tooltip}\n >\n {prompt}\n </ToolAssistance>\n </div>\n <FooterPopup\n isOpen={this.state.isOpen}\n onClose={this._handleClose}\n onOutsideClick={this._handleOutsideClick}\n target={this._target}\n isPinned={this.state.isPinned}\n >\n <ToolAssistanceDialog\n buttons={\n <>\n {!this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handlePinButtonClick}\n title={UiFramework.translate(\"toolAssistance.pin\")}\n >\n <Icon iconSpec={<SvgPin />} />\n </StatusBarDialog.TitleBarButton>\n )}\n {this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handleCloseButtonClick}\n title={UiCore.translate(\"dialog.close\")}\n >\n <Icon iconSpec={<SvgClose />} />\n </StatusBarDialog.TitleBarButton>\n )}\n </>\n }\n title={dialogTitle}\n >\n {dialogContent}\n </ToolAssistanceDialog>\n </FooterPopup>\n </>\n );\n }\n\n private _handleTargetRef = (target: HTMLElement | null) => {\n this._target = target;\n };\n\n private _onPromptAtCursorChange = async (\n e: React.ChangeEvent<HTMLInputElement>\n ) => {\n // istanbul ignore else\n if (this._isMounted)\n this.setState(\n {\n showPromptAtCursor: e.target.checked,\n },\n async () => {\n await this._showPromptAtCursorSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n private _handleClose = () => {\n this.setIsOpen(false);\n };\n\n private _handleOutsideClick = (e: MouseEvent) => {\n // istanbul ignore if\n if (\n !this._indicator.current ||\n !(e.target instanceof Node) ||\n this._indicator.current.contains(e.target)\n )\n return;\n\n this._handleClose();\n };\n\n private _handleToolAssistanceIndicatorClick = () => {\n this.setIsOpen(!this.state.isOpen);\n };\n\n private _handlePinButtonClick = () => {\n // istanbul ignore else\n if (this._isMounted) this.setState({ isPinned: true });\n };\n\n private _handleCloseButtonClick = () => {\n this._handleClose();\n };\n\n private setIsOpen(isOpen: boolean) {\n let newState = {\n isOpen,\n };\n if (!isOpen && this.state.isPinned && this._isMounted) {\n newState = { ...newState, ...{ isPinned: false } };\n }\n this.setState(newState);\n }\n\n /** @internal */\n public static getInstructionImage(\n instruction: ToolAssistanceInstruction\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (\n (typeof instruction.image === \"string\" ||\n instruction.image !== ToolAssistanceImage.Keyboard) &&\n instruction.keyboardInfo\n ) {\n if (\n instruction.keyboardInfo.keys.length === 1 &&\n !instruction.keyboardInfo.bottomKeys\n ) {\n const key = instruction.keyboardInfo.keys[0];\n const rightImage =\n typeof instruction.image === \"string\" ? (\n <div className=\"uifw-toolassistance-icon-medium\">\n <Icon iconSpec={instruction.image} />\n </div>\n ) : (\n this.getInstructionSvgImage(instruction, true)\n );\n\n image = (\n <FillCentered>\n {ToolAssistanceField.getKeyNode(\n key,\n 0,\n \"uifw-toolassistance-key-modifier\"\n )}\n {rightImage}\n </FillCentered>\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getInstructionImage: Invalid keyboardInfo provided with image`\n );\n }\n } else if (typeof instruction.image === \"string\") {\n if (instruction.image.length > 0) {\n const svgSource = IconSpecUtilities.getWebComponentSource(\n instruction.image\n );\n const className =\n svgSource !== undefined\n ? \"uifw-toolassistance-svg\"\n : \"uifw-toolassistance-icon-large\";\n image = (\n <div className={className}>\n <Icon iconSpec={svgSource ?? instruction.image} />\n </div>\n );\n }\n } else if (instruction.image === ToolAssistanceImage.Keyboard) {\n if (instruction.keyboardInfo) {\n image = ToolAssistanceField.getInstructionKeyboardImage(\n instruction.keyboardInfo\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getInstructionImage: ToolAssistanceImage.Keyboard specified but no keyboardInfo provided`\n );\n }\n } else {\n image = this.getInstructionSvgImage(instruction, false);\n }\n\n return image;\n }\n\n private static getInstructionSvgImage(\n instruction: ToolAssistanceInstruction,\n mediumSize: boolean\n ): React.ReactNode {\n let image: React.ReactNode;\n let className = mediumSize\n ? \"uifw-toolassistance-svg-medium\"\n : \"uifw-toolassistance-svg\";\n\n // istanbul ignore else\n if (\n typeof instruction.image !== \"string\" &&\n instruction.image !== ToolAssistanceImage.Keyboard\n ) {\n const toolAssistanceImage: ToolAssistanceImage = instruction.image;\n let svgImage = \"\";\n\n switch (toolAssistanceImage) {\n case ToolAssistanceImage.AcceptPoint:\n svgImage = acceptPointIcon;\n break;\n case ToolAssistanceImage.CursorClick:\n svgImage = cursorClickIcon;\n break;\n case ToolAssistanceImage.LeftClick:\n svgImage = clickLeftIcon;\n break;\n case ToolAssistanceImage.RightClick:\n svgImage = clickRightIcon;\n break;\n case ToolAssistanceImage.MouseWheel:\n svgImage = mouseWheelClickIcon;\n break;\n case ToolAssistanceImage.LeftClickDrag:\n svgImage = clickLeftDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.RightClickDrag:\n svgImage = clickRightDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.MouseWheelClickDrag:\n svgImage = clickMouseWheelDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.OneTouchTap:\n svgImage = oneTouchTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDoubleTap:\n svgImage = oneTouchDoubleTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDrag:\n svgImage = oneTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchTap:\n svgImage = twoTouchTapIcon;\n break;\n case ToolAssistanceImage.TwoTouchDrag:\n svgImage = twoTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchPinch:\n svgImage = twoTouchPinchIcon;\n break;\n case ToolAssistanceImage.TouchCursorTap:\n svgImage = touchCursorTapIcon;\n break;\n case ToolAssistanceImage.TouchCursorDrag:\n svgImage = touchCursorDragIcon;\n className = mediumSize\n ? /* istanbul ignore next */ \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n }\n const iconSpec = IconSpecUtilities.createWebComponentIconSpec(svgImage);\n image = (\n <div className={className}>\n {svgImage && (\n // istanbul ignore next\n <Icon iconSpec={iconSpec} />\n )}\n </div>\n );\n }\n\n return image;\n }\n\n private static getInstructionKeyboardImage(\n keyboardInfo: ToolAssistanceKeyboardInfo\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (keyboardInfo.bottomKeys !== undefined) {\n image = (\n <div className=\"uifw-toolassistance-key-group\">\n <span className=\"row1\">\n {keyboardInfo.keys.map((key: string, index1: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index1,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n <br />\n <span className=\"row2\">\n {keyboardInfo.bottomKeys.map((key: string, index2: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index2,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n </div>\n );\n } else if (keyboardInfo.keys.length === 2) {\n image = (\n <FillCentered>\n {keyboardInfo.keys.map((key: string, index3: number) => {\n let className = \"uifw-toolassistance-key-medium\";\n if (key.length > 1) className = \"uifw-toolassistance-key-modifier\";\n return ToolAssistanceField.getKeyNode(key, index3, className);\n })}\n </FillCentered>\n );\n } else if (keyboardInfo.keys[0]) {\n if (keyboardInfo.keys[0].length > 1)\n image = ToolAssistanceField.getKeyNode(\n keyboardInfo.keys[0],\n 0,\n \"uifw-toolassistance-key-large\"\n );\n else image = ToolAssistanceField.getKeyNode(keyboardInfo.keys[0], 0);\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `ToolAssistanceImage.Keyboard specified but ToolAssistanceKeyboardInfo not valid`\n );\n }\n\n return image;\n }\n\n private static getKeyNode(\n key: string,\n index: number,\n className?: string\n ): React.ReactNode {\n return (\n <div\n key={index.toString()}\n className={classnames(\"uifw-toolassistance-key\", className)}\n >\n <FillCentered>{key}</FillCentered>\n </div>\n );\n }\n}\n"]}
@@ -47,17 +47,19 @@ export class ToolbarHelper {
47
47
  }
48
48
  /** Helper method to creates a generic toolbar item entry */
49
49
  static createToolbarItemFromItemDef(itemPriority, itemDef, overrides) {
50
- var _a, _b, _c;
51
- const { badgeType, icon, internalData, ...itemOverrides } = overrides !== null && overrides !== void 0 ? overrides : {};
50
+ const { badgeType, icon, internalData, ...itemOverrides } = overrides ?? {};
52
51
  const itemBase = {
53
52
  id: itemDef.id,
54
53
  itemPriority,
55
54
  isActive: itemDef.isActive,
56
55
  isHidden: itemDef.isHidden,
57
56
  isDisabled: itemDef.isDisabled,
58
- icon: (_c = (_b = (_a = internalData === null || internalData === void 0 ? void 0 : internalData.get(IconHelper.reactIconKey)) !== null && _a !== void 0 ? _a : internalData === null || internalData === void 0 ? void 0 : internalData.get(IconHelper.conditionalIconItemKey)) !== null && _b !== void 0 ? _b : icon) !== null && _c !== void 0 ? _c : itemDef.iconSpec,
57
+ icon: internalData?.get(IconHelper.reactIconKey) ??
58
+ internalData?.get(IconHelper.conditionalIconItemKey) ??
59
+ icon ??
60
+ itemDef.iconSpec,
59
61
  label: this.getStringOrConditionalString(itemDef.rawLabel),
60
- badge: badgeType !== null && badgeType !== void 0 ? badgeType : itemDef.badgeType,
62
+ badge: badgeType ?? itemDef.badgeType,
61
63
  };
62
64
  // istanbul ignore else
63
65
  if (itemDef instanceof CommandItemDef || itemDef instanceof ToolItemDef) {
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarHelper.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarHelper.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExE;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAChC,QAAsB,EACtB,WAAc,EACd,oBAAoB,GAAG,EAAE,EACzB,SAAsC;IAEtC,IAAI,QAAQ,GAAG,oBAAoB,CAAC;IACpC,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,4BAA4B,CACrD,QAAQ,EACR,OAAO,EACP,SAAS,CACV,CAAC;QACF,QAAQ,GAAG,QAAQ,GAAG,EAAE,CAAC;QACzB,IAAI,WAAW,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC;YACtE,KAAK,CAAC,IAAI,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AAC,mCAC1C,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,CAAC,UAAU,CAAC,sBAAsB,CAAC,mCACpD,IAAI,mCACJ,OAAO,CAAC,QAAQ;YAClB,KAAK,EAAE,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,QAAQ,CAAC;YAC1D,KAAK,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,SAAS;SACtC,CAAC;QAEF,uBAAuB;QACvB,IAAI,OAAO,YAAY,cAAc,IAAI,OAAO,YAAY,WAAW,EAAE;YACvE,OAAO;gBACL,GAAG,QAAQ;gBACX,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,aAAa,EAAE;YAC3C,OAAO;gBACL,GAAG,QAAQ;gBACX,YAAY,EAAE,OAAO,CAAC,cAAc;gBACpC,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,YAAY,EAAE;YAC1C,OAAO;gBACL,GAAG,QAAQ;gBACX,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;gBACrD,QAAQ,EAAE,KAAK;gBACf,GAAG,aAAa;aACjB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,0CAA0C,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;SACzE;IACH,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,8BAA8B,CAC1C,QAAsB,EACtB,oBAAoB,GAAG,EAAE,EACzB,SAAsC;QAEtC,OAAO,yBAAyB,CAC9B,QAAQ,EACR,IAAI,EACJ,oBAAoB,EACpB,SAAS,CACV,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\nimport type * as React from \"react\";\nimport type {\n ActionButton,\n CommonToolbarItem,\n CustomButtonDefinition,\n GroupButton,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport { IconHelper } from \"@itwin/core-react\";\nimport type { AnyItemDef } from \"../shared/AnyItemDef\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport { CustomItemDef } from \"../shared/CustomItemDef\";\nimport { ToolItemDef } from \"../shared/ToolItemDef\";\nimport { GroupItemDef } from \"./GroupItem\";\nimport type {\n ToolbarActionItem,\n ToolbarCustomItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarActionItem, isToolbarGroupItem } from \"./ToolbarItem\";\n\n/**\n * Common implementation for `constructChildToolbarItems` and `createToolbarItemsFromItemDefs`.\n * @param itemDefs List of itemDefs to convert.\n * @param allowCustom false if we are building children and don't support custom items.\n * @param startingItemPriority defaults to 10.\n * @param overrides Single override to apply to each itemDefs.\n * @returns ToolbarItem[] or (ToolbarActionItem | ToolbarGroupItem) if allowCustom is false.\n */\nfunction constructToolbarItemArray<T extends boolean>(\n itemDefs: AnyItemDef[],\n allowCustom: T,\n startingItemPriority = 10,\n overrides?: Partial<CommonToolbarItem>\n) {\n let priority = startingItemPriority;\n const items = [];\n for (const itemDef of itemDefs) {\n const item = ToolbarHelper.createToolbarItemFromItemDef(\n priority,\n itemDef,\n overrides\n );\n priority = priority + 10;\n if (allowCustom || isToolbarActionItem(item) || isToolbarGroupItem(item))\n items.push(item);\n }\n return items as T extends true\n ? Array<ToolbarItem>\n : Array<ToolbarActionItem | ToolbarGroupItem>;\n}\n\n/** Helper functions for defining a Toolbar items used in `Toolbar`, `ToolbarComposer` and `UiItemsProvider`.\n * @public\n */\nexport class ToolbarHelper {\n /** Construct ToolbarCustomItem definitions given a CustomItemDef. */\n public static createCustomDefinitionToolbarItem(\n itemPriority: number,\n itemDef: CustomItemDef,\n overrides?: Partial<CustomButtonDefinition>\n ): ToolbarCustomItem {\n return this.createToolbarItemFromItemDef(itemPriority, itemDef, overrides);\n }\n\n /** Construct ToolbarActionItem and ToolbarGroupItem definitions given an array of ItemDefs. */\n public static constructChildToolbarItems(\n itemDefs: AnyItemDef[]\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n return constructToolbarItemArray(itemDefs, false);\n }\n\n private static getStringOrConditionalString(\n inString: string | StringGetter | ConditionalStringValue\n ): string | ConditionalStringValue {\n if (\n inString instanceof ConditionalStringValue ||\n typeof inString === \"string\"\n )\n return inString;\n\n return inString();\n }\n\n public static getIconReactNode(\n item: ActionButton | GroupButton\n ): React.ReactNode {\n return IconHelper.getIconReactNode(item.icon, item.internalData);\n }\n\n /** Helper method to creates a generic toolbar item entry */\n public static createToolbarItemFromItemDef(\n itemPriority: number,\n itemDef: AnyItemDef,\n overrides?: Partial<CommonToolbarItem>\n ): ToolbarItem {\n const { badgeType, icon, internalData, ...itemOverrides } = overrides ?? {};\n const itemBase: ToolbarItem = {\n id: itemDef.id,\n itemPriority,\n isActive: itemDef.isActive,\n isHidden: itemDef.isHidden,\n isDisabled: itemDef.isDisabled,\n icon:\n internalData?.get(IconHelper.reactIconKey) ??\n internalData?.get(IconHelper.conditionalIconItemKey) ??\n icon ??\n itemDef.iconSpec,\n label: this.getStringOrConditionalString(itemDef.rawLabel),\n badge: badgeType ?? itemDef.badgeType,\n };\n\n // istanbul ignore else\n if (itemDef instanceof CommandItemDef || itemDef instanceof ToolItemDef) {\n return {\n ...itemBase,\n execute: itemDef.execute,\n ...itemOverrides,\n };\n } else if (itemDef instanceof CustomItemDef) {\n return {\n ...itemBase,\n panelContent: itemDef.popupPanelNode,\n ...itemOverrides,\n };\n } else if (itemDef instanceof GroupItemDef) {\n return {\n ...itemBase,\n panelLabel: itemDef.panelLabel,\n items: this.constructChildToolbarItems(itemDef.items),\n isActive: false,\n ...itemOverrides,\n };\n } else {\n throw new Error(`Invalid Item type encountered, item id=${itemDef.id}`);\n }\n }\n\n /**\n * Helper method to creates a generic toolbar item entry list.\n */\n public static createToolbarItemsFromItemDefs(\n itemDefs: AnyItemDef[],\n startingItemPriority = 10,\n overrides?: Partial<CommonToolbarItem>\n ): ToolbarItem[] {\n return constructToolbarItemArray(\n itemDefs,\n true,\n startingItemPriority,\n overrides\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ToolbarHelper.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarHelper.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExE;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAChC,QAAsB,EACtB,WAAc,EACd,oBAAoB,GAAG,EAAE,EACzB,SAAsC;IAEtC,IAAI,QAAQ,GAAG,oBAAoB,CAAC;IACpC,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,4BAA4B,CACrD,QAAQ,EACR,OAAO,EACP,SAAS,CACV,CAAC;QACF,QAAQ,GAAG,QAAQ,GAAG,EAAE,CAAC;QACzB,IAAI,WAAW,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC;YACtE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACp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AQ;YAClB,KAAK,EAAE,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,QAAQ,CAAC;YAC1D,KAAK,EAAE,SAAS,IAAI,OAAO,CAAC,SAAS;SACtC,CAAC;QAEF,uBAAuB;QACvB,IAAI,OAAO,YAAY,cAAc,IAAI,OAAO,YAAY,WAAW,EAAE;YACvE,OAAO;gBACL,GAAG,QAAQ;gBACX,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,aAAa,EAAE;YAC3C,OAAO;gBACL,GAAG,QAAQ;gBACX,YAAY,EAAE,OAAO,CAAC,cAAc;gBACpC,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,YAAY,EAAE;YAC1C,OAAO;gBACL,GAAG,QAAQ;gBACX,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;gBACrD,QAAQ,EAAE,KAAK;gBACf,GAAG,aAAa;aACjB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,0CAA0C,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;SACzE;IACH,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,8BAA8B,CAC1C,QAAsB,EACtB,oBAAoB,GAAG,EAAE,EACzB,SAAsC;QAEtC,OAAO,yBAAyB,CAC9B,QAAQ,EACR,IAAI,EACJ,oBAAoB,EACpB,SAAS,CACV,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\nimport type * as React from \"react\";\nimport type {\n ActionButton,\n CommonToolbarItem,\n CustomButtonDefinition,\n GroupButton,\n StringGetter,\n} from \"@itwin/appui-abstract\";\nimport { ConditionalStringValue } from \"@itwin/appui-abstract\";\nimport { IconHelper } from \"@itwin/core-react\";\nimport type { AnyItemDef } from \"../shared/AnyItemDef\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport { CustomItemDef } from \"../shared/CustomItemDef\";\nimport { ToolItemDef } from \"../shared/ToolItemDef\";\nimport { GroupItemDef } from \"./GroupItem\";\nimport type {\n ToolbarActionItem,\n ToolbarCustomItem,\n ToolbarGroupItem,\n ToolbarItem,\n} from \"./ToolbarItem\";\nimport { isToolbarActionItem, isToolbarGroupItem } from \"./ToolbarItem\";\n\n/**\n * Common implementation for `constructChildToolbarItems` and `createToolbarItemsFromItemDefs`.\n * @param itemDefs List of itemDefs to convert.\n * @param allowCustom false if we are building children and don't support custom items.\n * @param startingItemPriority defaults to 10.\n * @param overrides Single override to apply to each itemDefs.\n * @returns ToolbarItem[] or (ToolbarActionItem | ToolbarGroupItem) if allowCustom is false.\n */\nfunction constructToolbarItemArray<T extends boolean>(\n itemDefs: AnyItemDef[],\n allowCustom: T,\n startingItemPriority = 10,\n overrides?: Partial<CommonToolbarItem>\n) {\n let priority = startingItemPriority;\n const items = [];\n for (const itemDef of itemDefs) {\n const item = ToolbarHelper.createToolbarItemFromItemDef(\n priority,\n itemDef,\n overrides\n );\n priority = priority + 10;\n if (allowCustom || isToolbarActionItem(item) || isToolbarGroupItem(item))\n items.push(item);\n }\n return items as T extends true\n ? Array<ToolbarItem>\n : Array<ToolbarActionItem | ToolbarGroupItem>;\n}\n\n/** Helper functions for defining a Toolbar items used in `Toolbar`, `ToolbarComposer` and `UiItemsProvider`.\n * @public\n */\nexport class ToolbarHelper {\n /** Construct ToolbarCustomItem definitions given a CustomItemDef. */\n public static createCustomDefinitionToolbarItem(\n itemPriority: number,\n itemDef: CustomItemDef,\n overrides?: Partial<CustomButtonDefinition>\n ): ToolbarCustomItem {\n return this.createToolbarItemFromItemDef(itemPriority, itemDef, overrides);\n }\n\n /** Construct ToolbarActionItem and ToolbarGroupItem definitions given an array of ItemDefs. */\n public static constructChildToolbarItems(\n itemDefs: AnyItemDef[]\n ): Array<ToolbarActionItem | ToolbarGroupItem> {\n return constructToolbarItemArray(itemDefs, false);\n }\n\n private static getStringOrConditionalString(\n inString: string | StringGetter | ConditionalStringValue\n ): string | ConditionalStringValue {\n if (\n inString instanceof ConditionalStringValue ||\n typeof inString === \"string\"\n )\n return inString;\n\n return inString();\n }\n\n public static getIconReactNode(\n item: ActionButton | GroupButton\n ): React.ReactNode {\n return IconHelper.getIconReactNode(item.icon, item.internalData);\n }\n\n /** Helper method to creates a generic toolbar item entry */\n public static createToolbarItemFromItemDef(\n itemPriority: number,\n itemDef: AnyItemDef,\n overrides?: Partial<CommonToolbarItem>\n ): ToolbarItem {\n const { badgeType, icon, internalData, ...itemOverrides } = overrides ?? {};\n const itemBase: ToolbarItem = {\n id: itemDef.id,\n itemPriority,\n isActive: itemDef.isActive,\n isHidden: itemDef.isHidden,\n isDisabled: itemDef.isDisabled,\n icon:\n internalData?.get(IconHelper.reactIconKey) ??\n internalData?.get(IconHelper.conditionalIconItemKey) ??\n icon ??\n itemDef.iconSpec,\n label: this.getStringOrConditionalString(itemDef.rawLabel),\n badge: badgeType ?? itemDef.badgeType,\n };\n\n // istanbul ignore else\n if (itemDef instanceof CommandItemDef || itemDef instanceof ToolItemDef) {\n return {\n ...itemBase,\n execute: itemDef.execute,\n ...itemOverrides,\n };\n } else if (itemDef instanceof CustomItemDef) {\n return {\n ...itemBase,\n panelContent: itemDef.popupPanelNode,\n ...itemOverrides,\n };\n } else if (itemDef instanceof GroupItemDef) {\n return {\n ...itemBase,\n panelLabel: itemDef.panelLabel,\n items: this.constructChildToolbarItems(itemDef.items),\n isActive: false,\n ...itemOverrides,\n };\n } else {\n throw new Error(`Invalid Item type encountered, item id=${itemDef.id}`);\n }\n }\n\n /**\n * Helper method to creates a generic toolbar item entry list.\n */\n public static createToolbarItemsFromItemDefs(\n itemDefs: AnyItemDef[],\n startingItemPriority = 10,\n overrides?: Partial<CommonToolbarItem>\n ): ToolbarItem[] {\n return constructToolbarItemArray(\n itemDefs,\n true,\n startingItemPriority,\n overrides\n );\n }\n}\n"]}
@@ -17,10 +17,9 @@ manager, toolbarUsage, toolbarOrientation) => {
17
17
  const providedItems = useActiveStageProvidedToolbarItems(toolbarUsage, toolbarOrientation);
18
18
  const [items, setItems] = React.useState(providedItems);
19
19
  React.useEffect(() => {
20
- var _a;
21
- manager === null || manager === void 0 ? void 0 : manager.loadItems(providedItems);
22
- setItems((_a = manager === null || manager === void 0 ? void 0 : manager.items) !== null && _a !== void 0 ? _a : providedItems);
23
- return manager === null || manager === void 0 ? void 0 : manager.onItemsChanged.addListener((args) => {
20
+ manager?.loadItems(providedItems);
21
+ setItems(manager?.items ?? providedItems);
22
+ return manager?.onItemsChanged.addListener((args) => {
24
23
  setItems(args.items);
25
24
  });
26
25
  }, [manager, providedItems]);
@@ -1 +1 @@
1
- {"version":3,"file":"useUiItemsProviderToolbarItems.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/useUiItemsProviderToolbarItems.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;AAC5C,mDAAmD;AACnD,OAA4B,EAC5B,YAA0B,EAC1B,kBAAsC,EACd,EAAE;IAC1B,MAAM,aAAa,GAAG,kCAAkC,CACtD,YAAY,EACZ,kBAAkB,CACnB,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACxD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;;QACnB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAClC,QAAQ,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,aAAa,CAAC,CAAC;QAE1C,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport * as React from \"react\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"./ToolbarItem\";\nimport type { ToolbarItemsManager } from \"./ToolbarItemsManager\";\nimport { useActiveStageProvidedToolbarItems } from \"./useActiveStageProvidedToolbarItems\";\n\n/** Hook that retrieves active frontstage toolbar items from UiItemsProviders and manage them through [[ToolbarItemsManager]].\n * @public\n * @deprecated in 4.4.0. This uses ToolbarItemsManager which is internal, directly use [[ToolbarComposer]] instead.\n */\nexport const useUiItemsProviderToolbarItems = (\n // eslint-disable-next-line deprecation/deprecation\n manager: ToolbarItemsManager,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation\n): readonly ToolbarItem[] => {\n const providedItems = useActiveStageProvidedToolbarItems(\n toolbarUsage,\n toolbarOrientation\n );\n const [items, setItems] = React.useState(providedItems);\n React.useEffect(() => {\n manager?.loadItems(providedItems);\n setItems(manager?.items ?? providedItems);\n\n return manager?.onItemsChanged.addListener((args) => {\n setItems(args.items);\n });\n }, [manager, providedItems]);\n return items;\n};\n"]}
1
+ {"version":3,"file":"useUiItemsProviderToolbarItems.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/useUiItemsProviderToolbarItems.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;AAC5C,mDAAmD;AACnD,OAA4B,EAC5B,YAA0B,EAC1B,kBAAsC,EACd,EAAE;IAC1B,MAAM,aAAa,GAAG,kCAAkC,CACtD,YAAY,EACZ,kBAAkB,CACnB,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACxD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAClC,QAAQ,CAAC,OAAO,EAAE,KAAK,IAAI,aAAa,CAAC,CAAC;QAE1C,OAAO,OAAO,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport * as React from \"react\";\nimport type {\n ToolbarItem,\n ToolbarOrientation,\n ToolbarUsage,\n} from \"./ToolbarItem\";\nimport type { ToolbarItemsManager } from \"./ToolbarItemsManager\";\nimport { useActiveStageProvidedToolbarItems } from \"./useActiveStageProvidedToolbarItems\";\n\n/** Hook that retrieves active frontstage toolbar items from UiItemsProviders and manage them through [[ToolbarItemsManager]].\n * @public\n * @deprecated in 4.4.0. This uses ToolbarItemsManager which is internal, directly use [[ToolbarComposer]] instead.\n */\nexport const useUiItemsProviderToolbarItems = (\n // eslint-disable-next-line deprecation/deprecation\n manager: ToolbarItemsManager,\n toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation\n): readonly ToolbarItem[] => {\n const providedItems = useActiveStageProvidedToolbarItems(\n toolbarUsage,\n toolbarOrientation\n );\n const [items, setItems] = React.useState(providedItems);\n React.useEffect(() => {\n manager?.loadItems(providedItems);\n setItems(manager?.items ?? providedItems);\n\n return manager?.onItemsChanged.addListener((args) => {\n setItems(args.items);\n });\n }, [manager, providedItems]);\n return items;\n};\n"]}
@@ -77,9 +77,8 @@ export class CoreTools {
77
77
  return new ToolItemDef({
78
78
  toolId: RotateViewTool.toolId,
79
79
  iconSpec: new ConditionalStringValue(() => {
80
- var _a;
81
80
  const activeContentControl = UiFramework.content.getActiveContentControl();
82
- if ((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is2d())
81
+ if (activeContentControl?.viewport?.view.is2d())
83
82
  return IconSpecUtilities.createWebComponentIconSpec(svgRotateLeft);
84
83
  return IconSpecUtilities.createWebComponentIconSpec(svgGyroscope);
85
84
  }, [
@@ -99,9 +98,8 @@ export class CoreTools {
99
98
  label: WalkViewTool.flyover,
100
99
  description: WalkViewTool.description,
101
100
  isHidden: new ConditionalBooleanValue(() => {
102
- var _a;
103
101
  const activeContentControl = UiFramework.content.getActiveContentControl();
104
- return !!((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is2d());
102
+ return !!activeContentControl?.viewport?.view.is2d();
105
103
  }, [
106
104
  SyncUiEventId.ActiveContentChanged,
107
105
  SyncUiEventId.ActiveViewportChanged,
@@ -132,10 +130,9 @@ export class CoreTools {
132
130
  return new ToolItemDef({
133
131
  toolId: ViewToggleCameraTool.toolId,
134
132
  iconSpec: new ConditionalStringValue(() => {
135
- var _a, _b;
136
133
  const activeContentControl = UiFramework.content.getActiveContentControl();
137
- if (((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is3d()) &&
138
- ((_b = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _b === void 0 ? void 0 : _b.isCameraOn)) {
134
+ if (activeContentControl?.viewport?.view.is3d() &&
135
+ activeContentControl?.viewport?.isCameraOn) {
139
136
  return IconSpecUtilities.createWebComponentIconSpec(cameraAnimationIcon);
140
137
  }
141
138
  return IconSpecUtilities.createWebComponentIconSpec(cameraAnimationDisabledIcon);
@@ -145,10 +142,9 @@ export class CoreTools {
145
142
  SyncUiEventId.ViewStateChanged,
146
143
  ]),
147
144
  label: new ConditionalStringValue(() => {
148
- var _a, _b;
149
145
  const activeContentControl = UiFramework.content.getActiveContentControl();
150
- if (((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is3d()) &&
151
- ((_b = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _b === void 0 ? void 0 : _b.isCameraOn)) {
146
+ if (activeContentControl?.viewport?.view.is3d() &&
147
+ activeContentControl?.viewport?.isCameraOn) {
152
148
  return UiFramework.translate("tools.View.ToggleCamera.turnOffFlyover");
153
149
  }
154
150
  return UiFramework.translate("tools.View.ToggleCamera.turnOnFlyover");
@@ -159,10 +155,9 @@ export class CoreTools {
159
155
  ]),
160
156
  description: ViewToggleCameraTool.description,
161
157
  isHidden: new ConditionalBooleanValue(() => {
162
- var _a, _b;
163
158
  const activeContentControl = UiFramework.content.getActiveContentControl();
164
- return !(((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is3d()) &&
165
- ((_b = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _b === void 0 ? void 0 : _b.view.supportsCamera()));
159
+ return !(activeContentControl?.viewport?.view.is3d() &&
160
+ activeContentControl?.viewport?.view.supportsCamera());
166
161
  }, [
167
162
  SyncUiEventId.ActiveContentChanged,
168
163
  SyncUiEventId.ActiveViewportChanged,
@@ -289,9 +284,8 @@ export class CoreTools {
289
284
  labelKey: "UiFramework:tools.sectionTools",
290
285
  iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),
291
286
  isHidden: new ConditionalBooleanValue(() => {
292
- var _a;
293
287
  const activeContentControl = UiFramework.content.getActiveContentControl();
294
- return !!((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is2d());
288
+ return !!activeContentControl?.viewport?.view.is2d();
295
289
  }, [
296
290
  SyncUiEventId.ActiveContentChanged,
297
291
  SyncUiEventId.ActiveViewportChanged,
@@ -317,9 +311,8 @@ export class CoreTools {
317
311
  panelLabelKey: "UiFramework:tools.sectionPanelLabel",
318
312
  iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),
319
313
  isHidden: new ConditionalBooleanValue(() => {
320
- var _a;
321
314
  const activeContentControl = UiFramework.content.getActiveContentControl();
322
- return !!((_a = activeContentControl === null || activeContentControl === void 0 ? void 0 : activeContentControl.viewport) === null || _a === void 0 ? void 0 : _a.view.is2d());
315
+ return !!activeContentControl?.viewport?.view.is2d();
323
316
  }, [
324
317
  SyncUiEventId.ActiveContentChanged,
325
318
  SyncUiEventId.ActiveViewportChanged,
@@ -1 +1 @@
1
- {"version":3,"file":"CoreToolDefinitions.js","sourceRoot":"","sources":["../../../../src/appui-react/tools/CoreToolDefinitions.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC,CAAC,6BAA6B;AAC7D,OAAO,EACL,WA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E,CAAC;YACpD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,KAAK,qCAAqC;QACrD,OAAO,IAAI,WAAW,CAAC;YACrB,MAAM,EAAE,2BAA2B,CAAC,MAAM;YAC1C,QAAQ,EAAE,2BAA2B,CAAC,QAAQ;YAC9C,KAAK,EAAE,2BAA2B,CAAC,OAAO;YAC1C,WAAW,EAAE,2BAA2B,CAAC,WAAW;YACpD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tools\n */\n\nimport * as React from \"react\"; // cSpell:ignore keyinbrowser\nimport {\n FitViewTool,\n FlyViewTool,\n IModelApp,\n MeasureDistanceTool,\n MeasureLocationTool,\n PanViewTool,\n RotateViewTool,\n SelectionTool,\n SetupWalkCameraTool,\n ViewClipByElementTool,\n ViewClipByPlaneTool,\n ViewClipByRangeTool,\n ViewClipByShapeTool,\n ViewClipDecorationProvider,\n ViewRedoTool,\n ViewToggleCameraTool,\n ViewUndoTool,\n WalkViewTool,\n WindowAreaTool,\n ZoomViewTool,\n} from \"@itwin/core-frontend\";\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n IconSpecUtilities,\n} from \"@itwin/appui-abstract\";\nimport { getIsHiddenIfSelectionNotActive } from \"../selection/SelectionContextItemDef\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport { ToolItemDef } from \"../shared/ToolItemDef\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { RestoreFrontstageLayoutTool } from \"./RestoreLayoutTool\";\nimport { UiFramework } from \"../UiFramework\";\nimport cameraAnimationIcon from \"@itwin/itwinui-icons/icons/camera-animation.svg\";\nimport cameraAnimationDisabledIcon from \"@itwin/itwinui-icons/icons/camera-animation-disabled.svg\";\nimport svgGyroscope from \"@bentley/icons-generic/icons/gyroscope.svg\";\nimport svgRotateLeft from \"@bentley/icons-generic/icons/rotate-left.svg\";\nimport svgSectionTool from \"@bentley/icons-generic/icons/section-tool.svg\";\nimport svgSelectionClear from \"@bentley/icons-generic/icons/selection-clear.svg\";\nimport { SvgMeasure, SvgProcess } from \"@itwin/itwinui-icons-react\";\n\n/** Utility Class that provides definitions of tools provided by the ($core-frontend) core. These definitions can be used to populate the UI.\n * @public\n */\n// istanbul ignore next\nexport class CoreTools {\n public static get keyinPaletteButtonItemDef() {\n return new ToolItemDef({\n toolId: \"uif:keyinpalette\",\n iconSpec: <SvgProcess />,\n labelKey: \"UiFramework:keyinbrowser.label\",\n execute: () => {\n IModelApp.uiAdmin.showKeyinPalette();\n },\n });\n }\n\n public static get fitViewCommand() {\n return new ToolItemDef({\n toolId: FitViewTool.toolId,\n iconSpec: FitViewTool.iconSpec,\n label: FitViewTool.flyover,\n description: FitViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n FitViewTool.toolId,\n IModelApp.viewManager.selectedView,\n true\n ),\n });\n }\n\n public static get windowAreaCommand() {\n return new ToolItemDef({\n toolId: WindowAreaTool.toolId,\n iconSpec: WindowAreaTool.iconSpec,\n label: WindowAreaTool.flyover,\n description: WindowAreaTool.description,\n execute: async () =>\n IModelApp.tools.run(\n WindowAreaTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get zoomViewCommand() {\n return new ToolItemDef({\n toolId: ZoomViewTool.toolId,\n iconSpec: ZoomViewTool.iconSpec,\n label: ZoomViewTool.flyover,\n description: ZoomViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ZoomViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get panViewCommand() {\n return new ToolItemDef({\n toolId: PanViewTool.toolId,\n iconSpec: PanViewTool.iconSpec,\n label: PanViewTool.flyover,\n description: PanViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n PanViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get rotateViewCommand() {\n return new ToolItemDef({\n toolId: RotateViewTool.toolId,\n iconSpec: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl?.viewport?.view.is2d())\n return IconSpecUtilities.createWebComponentIconSpec(svgRotateLeft);\n return IconSpecUtilities.createWebComponentIconSpec(svgGyroscope);\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n label: RotateViewTool.flyover,\n description: RotateViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n RotateViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get walkViewCommand() {\n return new ToolItemDef({\n toolId: WalkViewTool.toolId,\n iconSpec: WalkViewTool.iconSpec,\n label: WalkViewTool.flyover,\n description: WalkViewTool.description,\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n execute: async () =>\n IModelApp.tools.run(\n WalkViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get selectElementCommand() {\n return new ToolItemDef({\n toolId: SelectionTool.toolId,\n iconSpec: SelectionTool.iconSpec,\n label: SelectionTool.flyover,\n description: SelectionTool.description,\n execute: async () => IModelApp.tools.run(SelectionTool.toolId),\n });\n }\n\n public static get setupCameraWalkTool() {\n return new ToolItemDef({\n toolId: SetupWalkCameraTool.toolId,\n iconSpec: SetupWalkCameraTool.iconSpec,\n label: SetupWalkCameraTool.flyover,\n description: SetupWalkCameraTool.description,\n execute: async () => IModelApp.tools.run(SetupWalkCameraTool.toolId),\n });\n }\n\n public static get toggleCameraViewCommand() {\n return new ToolItemDef({\n toolId: ViewToggleCameraTool.toolId,\n iconSpec: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.isCameraOn\n ) {\n return IconSpecUtilities.createWebComponentIconSpec(\n cameraAnimationIcon\n );\n }\n return IconSpecUtilities.createWebComponentIconSpec(\n cameraAnimationDisabledIcon\n );\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n label: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.isCameraOn\n ) {\n return UiFramework.translate(\n \"tools.View.ToggleCamera.turnOffFlyover\"\n );\n }\n return UiFramework.translate(\"tools.View.ToggleCamera.turnOnFlyover\");\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n description: ViewToggleCameraTool.description,\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !(\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.view.supportsCamera()\n );\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n execute: async () =>\n IModelApp.tools.run(\n ViewToggleCameraTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get flyViewCommand() {\n return new ToolItemDef({\n toolId: FlyViewTool.toolId,\n iconSpec: FlyViewTool.iconSpec,\n label: FlyViewTool.flyover,\n description: FlyViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n FlyViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n // TODO - Need to provide a sync message that is fired when the Undo/Redo button needs to be refreshed in the\n // active view.\n public static get viewUndoCommand() {\n return new ToolItemDef({\n toolId: ViewUndoTool.toolId,\n isDisabled: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !activeContentControl.viewport.isUndoPossible;\n return false;\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n iconSpec: ViewUndoTool.iconSpec,\n label: ViewUndoTool.flyover,\n description: ViewUndoTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ViewUndoTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get viewRedoCommand() {\n return new ToolItemDef({\n toolId: ViewRedoTool.toolId,\n iconSpec: ViewRedoTool.iconSpec,\n label: ViewRedoTool.flyover,\n description: ViewRedoTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ViewRedoTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n isDisabled: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !activeContentControl.viewport.isRedoPossible;\n return false;\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n });\n }\n\n private static turnOnClipVolume() {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp || !vp.view.is3d()) return;\n\n // Turn on clip volume flag for section tools\n vp.viewFlags = vp.viewFlags.with(\"clipVolume\", true);\n }\n\n // note current ViewClipByPlaneTool is not automatically registered so the app must call ViewClipByPlaneTool.register();\n public static get sectionByPlaneCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByPlaneTool.toolId,\n iconSpec: ViewClipByPlaneTool.iconSpec,\n label: ViewClipByPlaneTool.flyover,\n description: ViewClipByPlaneTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByPlaneTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByElementTool is not automatically registered so the app must call ViewClipByElementTool.register();\n public static get sectionByElementCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByElementTool.toolId,\n iconSpec: ViewClipByElementTool.iconSpec,\n label: ViewClipByElementTool.flyover,\n description: ViewClipByElementTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByElementTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByRangeTool is not automatically registered so the app must call ViewClipByRangeTool.register();\n public static get sectionByRangeCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByRangeTool.toolId,\n iconSpec: ViewClipByRangeTool.iconSpec,\n label: ViewClipByRangeTool.flyover,\n description: ViewClipByRangeTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByRangeTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByShapeTool is not automatically registered so the app must call ViewClipByShapeTool.register();\n public static get sectionByShapeCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByShapeTool.toolId,\n iconSpec: ViewClipByShapeTool.iconSpec,\n label: ViewClipByShapeTool.flyover,\n description: ViewClipByShapeTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByShapeTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n public static get sectionToolGroup() {\n ViewClipByElementTool.register();\n ViewClipByPlaneTool.register();\n ViewClipByRangeTool.register();\n ViewClipByShapeTool.register();\n\n return new GroupItemDef({\n groupId: \"sectionTools-group\",\n labelKey: \"UiFramework:tools.sectionTools\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n items: [\n this.sectionByPlaneCommandItemDef,\n this.sectionByElementCommandItemDef,\n this.sectionByRangeCommandItemDef,\n this.sectionByShapeCommandItemDef,\n ],\n itemsInColumn: 4,\n });\n }\n\n public static get sectionToolGroupWithPanel() {\n ViewClipByElementTool.register();\n ViewClipByPlaneTool.register();\n ViewClipByRangeTool.register();\n ViewClipByShapeTool.register();\n\n return new GroupItemDef({\n groupId: \"sectionTools-group-with-panel\",\n labelKey: \"UiFramework:tools.sectionTools\",\n panelLabelKey: \"UiFramework:tools.sectionPanelLabel\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n items: [\n new ToolItemDef({\n ...this.sectionByPlaneCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByPlane\",\n }),\n new ToolItemDef({\n ...this.sectionByElementCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByElement\",\n }),\n new ToolItemDef({\n ...this.sectionByRangeCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByRange\",\n }),\n new ToolItemDef({\n ...this.sectionByShapeCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByShape\",\n }),\n ],\n itemsInColumn: 4,\n });\n }\n\n // note current MeasureDistanceTool is not automatically registered so the app must call MeasureDistanceTool.register();\n public static get measureDistanceToolItemDef() {\n return new ToolItemDef({\n toolId: MeasureDistanceTool.toolId,\n iconSpec: MeasureDistanceTool.iconSpec,\n label: MeasureDistanceTool.flyover,\n description: MeasureDistanceTool.description,\n execute: async () => {\n return IModelApp.tools.run(MeasureDistanceTool.toolId);\n },\n });\n }\n\n // note current MeasureLocationTool is not automatically registered so the app must call MeasureLocationTool.register();\n public static get measureLocationToolItemDef() {\n return new ToolItemDef({\n toolId: MeasureLocationTool.toolId,\n iconSpec: MeasureLocationTool.iconSpec,\n label: MeasureLocationTool.flyover,\n description: MeasureLocationTool.description,\n execute: async () => {\n return IModelApp.tools.run(MeasureLocationTool.toolId);\n },\n });\n }\n\n public static get measureToolGroup() {\n MeasureDistanceTool.register();\n MeasureLocationTool.register();\n\n return new GroupItemDef({\n groupId: \"measureTools-group\",\n labelKey: \"UiFramework:tools.measureTools\",\n iconSpec: <SvgMeasure />,\n items: [this.measureDistanceToolItemDef, this.measureLocationToolItemDef],\n itemsInColumn: 2,\n });\n }\n\n public static get clearSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearSelection\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSelectionClear),\n labelKey: \"UiFramework:buttons.clearSelection\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () => {\n const iModelConnection = UiFramework.getIModelConnection();\n if (iModelConnection) {\n iModelConnection.selectionSet.emptyAll();\n }\n const tool = IModelApp.toolAdmin.primitiveTool;\n if (tool) await tool.onRestartTool();\n else await IModelApp.toolAdmin.startDefaultTool();\n },\n });\n }\n\n public static get restoreFrontstageLayoutCommandItemDef() {\n return new ToolItemDef({\n toolId: RestoreFrontstageLayoutTool.toolId,\n iconSpec: RestoreFrontstageLayoutTool.iconSpec,\n label: RestoreFrontstageLayoutTool.flyover,\n description: RestoreFrontstageLayoutTool.description,\n execute: async () => {\n return IModelApp.tools.run(RestoreFrontstageLayoutTool.toolId);\n },\n });\n }\n}\n"]}
1
+ {"version":3,"file":"CoreToolDefinitions.js","sourceRoot":"","sources":["../../../../src/appui-react/tools/CoreToolDefinitions.tsx"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CAAC,GAAG,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tools\n */\n\nimport * as React from \"react\"; // cSpell:ignore keyinbrowser\nimport {\n FitViewTool,\n FlyViewTool,\n IModelApp,\n MeasureDistanceTool,\n MeasureLocationTool,\n PanViewTool,\n RotateViewTool,\n SelectionTool,\n SetupWalkCameraTool,\n ViewClipByElementTool,\n ViewClipByPlaneTool,\n ViewClipByRangeTool,\n ViewClipByShapeTool,\n ViewClipDecorationProvider,\n ViewRedoTool,\n ViewToggleCameraTool,\n ViewUndoTool,\n WalkViewTool,\n WindowAreaTool,\n ZoomViewTool,\n} from \"@itwin/core-frontend\";\nimport {\n ConditionalBooleanValue,\n ConditionalStringValue,\n IconSpecUtilities,\n} from \"@itwin/appui-abstract\";\nimport { getIsHiddenIfSelectionNotActive } from \"../selection/SelectionContextItemDef\";\nimport { CommandItemDef } from \"../shared/CommandItemDef\";\nimport { ToolItemDef } from \"../shared/ToolItemDef\";\nimport { SyncUiEventId } from \"../syncui/SyncUiEventDispatcher\";\nimport { GroupItemDef } from \"../toolbar/GroupItem\";\nimport { RestoreFrontstageLayoutTool } from \"./RestoreLayoutTool\";\nimport { UiFramework } from \"../UiFramework\";\nimport cameraAnimationIcon from \"@itwin/itwinui-icons/icons/camera-animation.svg\";\nimport cameraAnimationDisabledIcon from \"@itwin/itwinui-icons/icons/camera-animation-disabled.svg\";\nimport svgGyroscope from \"@bentley/icons-generic/icons/gyroscope.svg\";\nimport svgRotateLeft from \"@bentley/icons-generic/icons/rotate-left.svg\";\nimport svgSectionTool from \"@bentley/icons-generic/icons/section-tool.svg\";\nimport svgSelectionClear from \"@bentley/icons-generic/icons/selection-clear.svg\";\nimport { SvgMeasure, SvgProcess } from \"@itwin/itwinui-icons-react\";\n\n/** Utility Class that provides definitions of tools provided by the ($core-frontend) core. These definitions can be used to populate the UI.\n * @public\n */\n// istanbul ignore next\nexport class CoreTools {\n public static get keyinPaletteButtonItemDef() {\n return new ToolItemDef({\n toolId: \"uif:keyinpalette\",\n iconSpec: <SvgProcess />,\n labelKey: \"UiFramework:keyinbrowser.label\",\n execute: () => {\n IModelApp.uiAdmin.showKeyinPalette();\n },\n });\n }\n\n public static get fitViewCommand() {\n return new ToolItemDef({\n toolId: FitViewTool.toolId,\n iconSpec: FitViewTool.iconSpec,\n label: FitViewTool.flyover,\n description: FitViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n FitViewTool.toolId,\n IModelApp.viewManager.selectedView,\n true\n ),\n });\n }\n\n public static get windowAreaCommand() {\n return new ToolItemDef({\n toolId: WindowAreaTool.toolId,\n iconSpec: WindowAreaTool.iconSpec,\n label: WindowAreaTool.flyover,\n description: WindowAreaTool.description,\n execute: async () =>\n IModelApp.tools.run(\n WindowAreaTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get zoomViewCommand() {\n return new ToolItemDef({\n toolId: ZoomViewTool.toolId,\n iconSpec: ZoomViewTool.iconSpec,\n label: ZoomViewTool.flyover,\n description: ZoomViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ZoomViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get panViewCommand() {\n return new ToolItemDef({\n toolId: PanViewTool.toolId,\n iconSpec: PanViewTool.iconSpec,\n label: PanViewTool.flyover,\n description: PanViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n PanViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get rotateViewCommand() {\n return new ToolItemDef({\n toolId: RotateViewTool.toolId,\n iconSpec: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl?.viewport?.view.is2d())\n return IconSpecUtilities.createWebComponentIconSpec(svgRotateLeft);\n return IconSpecUtilities.createWebComponentIconSpec(svgGyroscope);\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n label: RotateViewTool.flyover,\n description: RotateViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n RotateViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get walkViewCommand() {\n return new ToolItemDef({\n toolId: WalkViewTool.toolId,\n iconSpec: WalkViewTool.iconSpec,\n label: WalkViewTool.flyover,\n description: WalkViewTool.description,\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n execute: async () =>\n IModelApp.tools.run(\n WalkViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get selectElementCommand() {\n return new ToolItemDef({\n toolId: SelectionTool.toolId,\n iconSpec: SelectionTool.iconSpec,\n label: SelectionTool.flyover,\n description: SelectionTool.description,\n execute: async () => IModelApp.tools.run(SelectionTool.toolId),\n });\n }\n\n public static get setupCameraWalkTool() {\n return new ToolItemDef({\n toolId: SetupWalkCameraTool.toolId,\n iconSpec: SetupWalkCameraTool.iconSpec,\n label: SetupWalkCameraTool.flyover,\n description: SetupWalkCameraTool.description,\n execute: async () => IModelApp.tools.run(SetupWalkCameraTool.toolId),\n });\n }\n\n public static get toggleCameraViewCommand() {\n return new ToolItemDef({\n toolId: ViewToggleCameraTool.toolId,\n iconSpec: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.isCameraOn\n ) {\n return IconSpecUtilities.createWebComponentIconSpec(\n cameraAnimationIcon\n );\n }\n return IconSpecUtilities.createWebComponentIconSpec(\n cameraAnimationDisabledIcon\n );\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n label: new ConditionalStringValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.isCameraOn\n ) {\n return UiFramework.translate(\n \"tools.View.ToggleCamera.turnOffFlyover\"\n );\n }\n return UiFramework.translate(\"tools.View.ToggleCamera.turnOnFlyover\");\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n description: ViewToggleCameraTool.description,\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !(\n activeContentControl?.viewport?.view.is3d() &&\n activeContentControl?.viewport?.view.supportsCamera()\n );\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n execute: async () =>\n IModelApp.tools.run(\n ViewToggleCameraTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get flyViewCommand() {\n return new ToolItemDef({\n toolId: FlyViewTool.toolId,\n iconSpec: FlyViewTool.iconSpec,\n label: FlyViewTool.flyover,\n description: FlyViewTool.description,\n execute: async () =>\n IModelApp.tools.run(\n FlyViewTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n // TODO - Need to provide a sync message that is fired when the Undo/Redo button needs to be refreshed in the\n // active view.\n public static get viewUndoCommand() {\n return new ToolItemDef({\n toolId: ViewUndoTool.toolId,\n isDisabled: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !activeContentControl.viewport.isUndoPossible;\n return false;\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n iconSpec: ViewUndoTool.iconSpec,\n label: ViewUndoTool.flyover,\n description: ViewUndoTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ViewUndoTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n });\n }\n\n public static get viewRedoCommand() {\n return new ToolItemDef({\n toolId: ViewRedoTool.toolId,\n iconSpec: ViewRedoTool.iconSpec,\n label: ViewRedoTool.flyover,\n description: ViewRedoTool.description,\n execute: async () =>\n IModelApp.tools.run(\n ViewRedoTool.toolId,\n IModelApp.viewManager.selectedView\n ),\n isDisabled: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n if (activeContentControl && activeContentControl.viewport)\n return !activeContentControl.viewport.isRedoPossible;\n return false;\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n });\n }\n\n private static turnOnClipVolume() {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp || !vp.view.is3d()) return;\n\n // Turn on clip volume flag for section tools\n vp.viewFlags = vp.viewFlags.with(\"clipVolume\", true);\n }\n\n // note current ViewClipByPlaneTool is not automatically registered so the app must call ViewClipByPlaneTool.register();\n public static get sectionByPlaneCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByPlaneTool.toolId,\n iconSpec: ViewClipByPlaneTool.iconSpec,\n label: ViewClipByPlaneTool.flyover,\n description: ViewClipByPlaneTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByPlaneTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByElementTool is not automatically registered so the app must call ViewClipByElementTool.register();\n public static get sectionByElementCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByElementTool.toolId,\n iconSpec: ViewClipByElementTool.iconSpec,\n label: ViewClipByElementTool.flyover,\n description: ViewClipByElementTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByElementTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByRangeTool is not automatically registered so the app must call ViewClipByRangeTool.register();\n public static get sectionByRangeCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByRangeTool.toolId,\n iconSpec: ViewClipByRangeTool.iconSpec,\n label: ViewClipByRangeTool.flyover,\n description: ViewClipByRangeTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByRangeTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n // note current ViewClipByShapeTool is not automatically registered so the app must call ViewClipByShapeTool.register();\n public static get sectionByShapeCommandItemDef() {\n return new ToolItemDef({\n toolId: ViewClipByShapeTool.toolId,\n iconSpec: ViewClipByShapeTool.iconSpec,\n label: ViewClipByShapeTool.flyover,\n description: ViewClipByShapeTool.description,\n execute: async () => {\n this.turnOnClipVolume();\n return IModelApp.tools.run(\n ViewClipByShapeTool.toolId,\n ViewClipDecorationProvider.create()\n );\n },\n });\n }\n\n public static get sectionToolGroup() {\n ViewClipByElementTool.register();\n ViewClipByPlaneTool.register();\n ViewClipByRangeTool.register();\n ViewClipByShapeTool.register();\n\n return new GroupItemDef({\n groupId: \"sectionTools-group\",\n labelKey: \"UiFramework:tools.sectionTools\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n items: [\n this.sectionByPlaneCommandItemDef,\n this.sectionByElementCommandItemDef,\n this.sectionByRangeCommandItemDef,\n this.sectionByShapeCommandItemDef,\n ],\n itemsInColumn: 4,\n });\n }\n\n public static get sectionToolGroupWithPanel() {\n ViewClipByElementTool.register();\n ViewClipByPlaneTool.register();\n ViewClipByRangeTool.register();\n ViewClipByShapeTool.register();\n\n return new GroupItemDef({\n groupId: \"sectionTools-group-with-panel\",\n labelKey: \"UiFramework:tools.sectionTools\",\n panelLabelKey: \"UiFramework:tools.sectionPanelLabel\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSectionTool),\n isHidden: new ConditionalBooleanValue(() => {\n const activeContentControl =\n UiFramework.content.getActiveContentControl();\n return !!activeContentControl?.viewport?.view.is2d();\n }, [\n SyncUiEventId.ActiveContentChanged,\n SyncUiEventId.ActiveViewportChanged,\n SyncUiEventId.ViewStateChanged,\n ]),\n items: [\n new ToolItemDef({\n ...this.sectionByPlaneCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByPlane\",\n }),\n new ToolItemDef({\n ...this.sectionByElementCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByElement\",\n }),\n new ToolItemDef({\n ...this.sectionByRangeCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByRange\",\n }),\n new ToolItemDef({\n ...this.sectionByShapeCommandItemDef,\n labelKey: \"UiFramework:tools.sectionByShape\",\n }),\n ],\n itemsInColumn: 4,\n });\n }\n\n // note current MeasureDistanceTool is not automatically registered so the app must call MeasureDistanceTool.register();\n public static get measureDistanceToolItemDef() {\n return new ToolItemDef({\n toolId: MeasureDistanceTool.toolId,\n iconSpec: MeasureDistanceTool.iconSpec,\n label: MeasureDistanceTool.flyover,\n description: MeasureDistanceTool.description,\n execute: async () => {\n return IModelApp.tools.run(MeasureDistanceTool.toolId);\n },\n });\n }\n\n // note current MeasureLocationTool is not automatically registered so the app must call MeasureLocationTool.register();\n public static get measureLocationToolItemDef() {\n return new ToolItemDef({\n toolId: MeasureLocationTool.toolId,\n iconSpec: MeasureLocationTool.iconSpec,\n label: MeasureLocationTool.flyover,\n description: MeasureLocationTool.description,\n execute: async () => {\n return IModelApp.tools.run(MeasureLocationTool.toolId);\n },\n });\n }\n\n public static get measureToolGroup() {\n MeasureDistanceTool.register();\n MeasureLocationTool.register();\n\n return new GroupItemDef({\n groupId: \"measureTools-group\",\n labelKey: \"UiFramework:tools.measureTools\",\n iconSpec: <SvgMeasure />,\n items: [this.measureDistanceToolItemDef, this.measureLocationToolItemDef],\n itemsInColumn: 2,\n });\n }\n\n public static get clearSelectionItemDef() {\n return new CommandItemDef({\n commandId: \"UiFramework.ClearSelection\",\n iconSpec: IconSpecUtilities.createWebComponentIconSpec(svgSelectionClear),\n labelKey: \"UiFramework:buttons.clearSelection\",\n isHidden: getIsHiddenIfSelectionNotActive(),\n execute: async () => {\n const iModelConnection = UiFramework.getIModelConnection();\n if (iModelConnection) {\n iModelConnection.selectionSet.emptyAll();\n }\n const tool = IModelApp.toolAdmin.primitiveTool;\n if (tool) await tool.onRestartTool();\n else await IModelApp.toolAdmin.startDefaultTool();\n },\n });\n }\n\n public static get restoreFrontstageLayoutCommandItemDef() {\n return new ToolItemDef({\n toolId: RestoreFrontstageLayoutTool.toolId,\n iconSpec: RestoreFrontstageLayoutTool.iconSpec,\n label: RestoreFrontstageLayoutTool.flyover,\n description: RestoreFrontstageLayoutTool.description,\n execute: async () => {\n return IModelApp.tools.run(RestoreFrontstageLayoutTool.toolId);\n },\n });\n }\n}\n"]}
@@ -20,9 +20,10 @@ class ToolSettingsUiDataProvider extends UiLayoutDataProvider {
20
20
  super(...arguments);
21
21
  // send property changes from UI back to tool
22
22
  this.applyUiPropertyChange = (syncItem) => {
23
- var _a;
24
23
  // istanbul ignore next
25
- (_a = IModelApp.toolAdmin.activeTool) === null || _a === void 0 ? void 0 : _a.applyToolSettingPropertyChange(syncItem).catch((err) => UnexpectedErrors.handle(err));
24
+ IModelApp.toolAdmin.activeTool
25
+ ?.applyToolSettingPropertyChange(syncItem)
26
+ .catch((err) => UnexpectedErrors.handle(err));
26
27
  };
27
28
  }
28
29
  supplyDialogItems() {