@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.
- package/CHANGELOG.md +8 -1
- package/lib/cjs/appui-react/UiFramework.js +4 -7
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +1 -2
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/TimeTracker.js +1 -2
- package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +9 -12
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/DefaultViewOverlay.js +3 -4
- package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +1 -2
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +3 -6
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +1 -2
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js +10 -12
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialog.js +3 -6
- package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -3
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +33 -51
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +2 -3
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
- package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
- package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +8 -13
- package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/messages/ActivityMessage.js +5 -7
- package/lib/cjs/appui-react/messages/ActivityMessage.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +5 -6
- package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +1 -2
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.js +1 -2
- package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +2 -2
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +11 -16
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/Indicator.js +1 -2
- package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.js +3 -5
- package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarHelper.js +6 -4
- package/lib/cjs/appui-react/toolbar/ToolbarHelper.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
- package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +10 -17
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
- package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +8 -14
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +3 -3
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js +8 -9
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +34 -32
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
- package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Tab.js +1 -1
- package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js +13 -19
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Toolbars.js +2 -3
- package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +2 -2
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +5 -6
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.js +2 -3
- package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +4 -7
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js +1 -2
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/TimeTracker.js +1 -2
- package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +9 -12
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/DefaultViewOverlay.js +3 -4
- package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js +1 -2
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +3 -6
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js +1 -2
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/split-pane/SplitPane.js +10 -12
- package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +2 -3
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialog.js +3 -6
- package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js +2 -3
- package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +33 -51
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +2 -3
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -2
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +7 -11
- package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +7 -11
- package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useSolarDataProvider.js +8 -13
- package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
- package/lib/esm/appui-react/messages/ActivityMessage.js +5 -7
- package/lib/esm/appui-react/messages/ActivityMessage.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +5 -6
- package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js +1 -2
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.js +1 -2
- package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js +2 -2
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +11 -16
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/statusbar/Indicator.js +1 -2
- package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.js +3 -5
- package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarHelper.js +6 -4
- package/lib/esm/appui-react/toolbar/ToolbarHelper.js.map +1 -1
- package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js +3 -4
- package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +10 -17
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +3 -2
- package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +12 -14
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +9 -10
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +1 -2
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +8 -14
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +3 -3
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js +8 -9
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +34 -32
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
- package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Tab.js +1 -1
- package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.js +13 -19
- package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Toolbars.js +2 -3
- package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +2 -2
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +5 -6
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.js +2 -3
- package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAssistanceField.js","sourceRoot":"","sources":["../../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sCAAoC;AACpC,2CAAoC;AACpC,+BAA+B;AAC/B,sDAA6C;AAO7C,wDAI8B;AAC9B,0DAA0D;AAM1D,kDAO2B;AAC3B,kEAOmC;AACnC,wDAA0D;AAC1D,yEAAsE;AAGtE,kEAA+D;AAC/D,mDAAgD;AAChD,uEAAwE;AAExE,yDAAiD;AACjD,yDAAiD;AACjD,+EAA6D;AAC7D,2FAAwE;AACxE,6EAA2D;AAC3D,2DAAoD;AACpD,+EAA6D;AAC7D,6EAA2D;AAC3D,2EAA4D;AAC5D,iEAAmD;AACnD,6EAA8D;AAC9D,mEAAqD;AACrD,6EAAmE;AACnE,mEAA0D;AAC1D,iEA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AI;IACzB,qBAAqB,EAAE,KAAK;CAC7B,AALkC,CAKjC;AA1BS,kDAAmB","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,sCAAoC;AACpC,2CAAoC;AACpC,+BAA+B;AAC/B,sDAA6C;AAO7C,wDAI8B;AAC9B,0DAA0D;AAM1D,kDAO2B;AAC3B,kEAOmC;AACnC,wDAA0D;AAC1D,yEAAsE;AAGtE,kEAA+D;AAC/D,mDAAgD;AAChD,uEAAwE;AAExE,yDAAiD;AACjD,yDAAiD;AACjD,+EAA6D;AAC7D,2FAAwE;AACxE,6EAA2D;AAC3D,2DAAoD;AACpD,+EAA6D;AAC7D,6EAA2D;AAC3D,2EAA4D;AAC5D,iEAAmD;AACnD,6EAA8D;AAC9D,mEAAqD;AACrD,6EAAmE;AACnE,mEAA0D;AAC1D,iEAAyD;AACzD,qEAA0D;AAC1D,0DAAgE;AAChE,oEAA8D;AAgD9D;;GAEG;AACH,MAAa,mBAAoB,SAAQ,KAAK,CAAC,SAG9C;IAyBC,gBAAgB;IAChB,YAAY,CAA2B;QACrC,KAAK,CAAC,CAAC,CAAC,CAAC;QAhBH,YAAO,GAAuB,IAAI,CAAC;QACnC,eAAU,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAE/C,eAAU,GAAG,KAAK,CAAC;QA6GnB,sCAAiC,GAAG,CAC1C,IAAoC,EAC9B,EAAE;YACR,IAAI,kBAAkB,GAAG,KAAK,CAAC;YAC/B,IAAI,qBAAqB,GAAG,KAAK,CAAC;YAClC,IAAI,qBAAqB,GAAG,KAAK,CAAC;YAElC,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;gBACnD,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAC1D,CAAC,OAA8B,EAAE,EAAE;oBACjC,OAAO,OAAO,C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AAM,CAAC,UAAU,CACvB,GAAW,EACX,KAAa,EACb,SAAkB;QAElB,OAAO,CACL,6BACE,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,EACrB,SAAS,EAAE,IAAA,oBAAU,EAAC,yBAAyB,EAAE,SAAS,CAAC;YAE3D,oBAAC,yBAAY,QAAE,GAAG,CAAgB,CAC9B,CACP,CAAC;IACJ,CAAC;;AA3sBD,gBAAgB;AACO,+BAAW,GAAG,yCAAqB,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;AA1BS,kDAAmB","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"]}
|
|
@@ -50,17 +50,19 @@ class ToolbarHelper {
|
|
|
50
50
|
}
|
|
51
51
|
/** Helper method to creates a generic toolbar item entry */
|
|
52
52
|
static createToolbarItemFromItemDef(itemPriority, itemDef, overrides) {
|
|
53
|
-
|
|
54
|
-
const { badgeType, icon, internalData, ...itemOverrides } = overrides !== null && overrides !== void 0 ? overrides : {};
|
|
53
|
+
const { badgeType, icon, internalData, ...itemOverrides } = overrides ?? {};
|
|
55
54
|
const itemBase = {
|
|
56
55
|
id: itemDef.id,
|
|
57
56
|
itemPriority,
|
|
58
57
|
isActive: itemDef.isActive,
|
|
59
58
|
isHidden: itemDef.isHidden,
|
|
60
59
|
isDisabled: itemDef.isDisabled,
|
|
61
|
-
icon:
|
|
60
|
+
icon: internalData?.get(core_react_1.IconHelper.reactIconKey) ??
|
|
61
|
+
internalData?.get(core_react_1.IconHelper.conditionalIconItemKey) ??
|
|
62
|
+
icon ??
|
|
63
|
+
itemDef.iconSpec,
|
|
62
64
|
label: this.getStringOrConditionalString(itemDef.rawLabel),
|
|
63
|
-
badge: badgeType
|
|
65
|
+
badge: badgeType ?? itemDef.badgeType,
|
|
64
66
|
};
|
|
65
67
|
// istanbul ignore else
|
|
66
68
|
if (itemDef instanceof CommandItemDef_1.CommandItemDef || itemDef instanceof ToolItemDef_1.ToolItemDef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarHelper.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/ToolbarHelper.tsx"],"names":[],"mappings":";;;AAeA,0DAA+D;AAC/D,kDAA+C;AAE/C,6DAA0D;AAC1D,2DAAwD;AACxD,uDAAoD;AACpD,2CAA2C;AAO3C,+CAAwE;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,IAAA,iCAAmB,EAAC,IAAI,CAAC,IAAI,IAAA,gCAAkB,EAAC,IAAI,CAAC;YACtE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACpB;IACD,OAAO,KAEwC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAa,aAAa;IACxB,qEAAqE;IAC9D,MAAM,CAAC,iCAAiC,CAC7C,YAAoB,EACpB,OAAsB,EACtB,SAA2C;QAE3C,OAAO,IAAI,CAAC,4BAA4B,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC7E,CAAC;IAED,+FAA+F;IACxF,MAAM,CAAC,0BAA0B,CACtC,QAAsB;QAEtB,OAAO,yBAAyB,CAAC,QAAQ,EAAE,KAAK,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,SAAS,IAAI,OAAO,CAAC,SAAS;SACtC,CAAC;QAEF,uBAAuB;QACvB,IAAI,OAAO,YAAY,+BAAc,IAAI,OAAO,YAAY,yBAAW,EAAE;YACvE,OAAO;gBACL,GAAG,QAAQ;gBACX,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,6BAAa,EAAE;YAC3C,OAAO;gBACL,GAAG,QAAQ;gBACX,YAAY,EAAE,OAAO,CAAC,cAAc;gBACpC,GAAG,aAAa;aACjB,CAAC;SACH;aAAM,IAAI,OAAO,YAAY,wBAAY,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;AAlGD,sCAkGC","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"]}
|
|
@@ -20,10 +20,9 @@ manager, toolbarUsage, toolbarOrientation) => {
|
|
|
20
20
|
const providedItems = (0, useActiveStageProvidedToolbarItems_1.useActiveStageProvidedToolbarItems)(toolbarUsage, toolbarOrientation);
|
|
21
21
|
const [items, setItems] = React.useState(providedItems);
|
|
22
22
|
React.useEffect(() => {
|
|
23
|
-
|
|
24
|
-
manager
|
|
25
|
-
|
|
26
|
-
return manager === null || manager === void 0 ? void 0 : manager.onItemsChanged.addListener((args) => {
|
|
23
|
+
manager?.loadItems(providedItems);
|
|
24
|
+
setItems(manager?.items ?? providedItems);
|
|
25
|
+
return manager?.onItemsChanged.addListener((args) => {
|
|
27
26
|
setItems(args.items);
|
|
28
27
|
});
|
|
29
28
|
}, [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,+BAA+B;AAO/B,6FAA0F;AAE1F;;;GAGG;AACI,MAAM,8BAA8B,GAAG;AAC5C,mDAAmD;AACnD,OAA4B,EAC5B,YAA0B,EAC1B,kBAAsC,EACd,EAAE;IAC1B,MAAM,aAAa,GAAG,IAAA,uEAAkC,EACtD,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
|
|
1
|
+
{"version":3,"file":"useUiItemsProviderToolbarItems.js","sourceRoot":"","sources":["../../../../src/appui-react/toolbar/useUiItemsProviderToolbarItems.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAO/B,6FAA0F;AAE1F;;;GAGG;AACI,MAAM,8BAA8B,GAAG;AAC5C,mDAAmD;AACnD,OAA4B,EAC5B,YAA0B,EAC1B,kBAAsC,EACd,EAAE;IAC1B,MAAM,aAAa,GAAG,IAAA,uEAAkC,EACtD,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;AApBW,QAAA,8BAA8B,kCAoBzC","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"]}
|
|
@@ -80,9 +80,8 @@ class CoreTools {
|
|
|
80
80
|
return new ToolItemDef_1.ToolItemDef({
|
|
81
81
|
toolId: core_frontend_1.RotateViewTool.toolId,
|
|
82
82
|
iconSpec: new appui_abstract_1.ConditionalStringValue(() => {
|
|
83
|
-
var _a;
|
|
84
83
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
85
|
-
if (
|
|
84
|
+
if (activeContentControl?.viewport?.view.is2d())
|
|
86
85
|
return appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(rotate_left_svg_1.default);
|
|
87
86
|
return appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(gyroscope_svg_1.default);
|
|
88
87
|
}, [
|
|
@@ -102,9 +101,8 @@ class CoreTools {
|
|
|
102
101
|
label: core_frontend_1.WalkViewTool.flyover,
|
|
103
102
|
description: core_frontend_1.WalkViewTool.description,
|
|
104
103
|
isHidden: new appui_abstract_1.ConditionalBooleanValue(() => {
|
|
105
|
-
var _a;
|
|
106
104
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
107
|
-
return !!
|
|
105
|
+
return !!activeContentControl?.viewport?.view.is2d();
|
|
108
106
|
}, [
|
|
109
107
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveContentChanged,
|
|
110
108
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveViewportChanged,
|
|
@@ -135,10 +133,9 @@ class CoreTools {
|
|
|
135
133
|
return new ToolItemDef_1.ToolItemDef({
|
|
136
134
|
toolId: core_frontend_1.ViewToggleCameraTool.toolId,
|
|
137
135
|
iconSpec: new appui_abstract_1.ConditionalStringValue(() => {
|
|
138
|
-
var _a, _b;
|
|
139
136
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
140
|
-
if (
|
|
141
|
-
|
|
137
|
+
if (activeContentControl?.viewport?.view.is3d() &&
|
|
138
|
+
activeContentControl?.viewport?.isCameraOn) {
|
|
142
139
|
return appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(camera_animation_svg_1.default);
|
|
143
140
|
}
|
|
144
141
|
return appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(camera_animation_disabled_svg_1.default);
|
|
@@ -148,10 +145,9 @@ class CoreTools {
|
|
|
148
145
|
SyncUiEventDispatcher_1.SyncUiEventId.ViewStateChanged,
|
|
149
146
|
]),
|
|
150
147
|
label: new appui_abstract_1.ConditionalStringValue(() => {
|
|
151
|
-
var _a, _b;
|
|
152
148
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
153
|
-
if (
|
|
154
|
-
|
|
149
|
+
if (activeContentControl?.viewport?.view.is3d() &&
|
|
150
|
+
activeContentControl?.viewport?.isCameraOn) {
|
|
155
151
|
return UiFramework_1.UiFramework.translate("tools.View.ToggleCamera.turnOffFlyover");
|
|
156
152
|
}
|
|
157
153
|
return UiFramework_1.UiFramework.translate("tools.View.ToggleCamera.turnOnFlyover");
|
|
@@ -162,10 +158,9 @@ class CoreTools {
|
|
|
162
158
|
]),
|
|
163
159
|
description: core_frontend_1.ViewToggleCameraTool.description,
|
|
164
160
|
isHidden: new appui_abstract_1.ConditionalBooleanValue(() => {
|
|
165
|
-
var _a, _b;
|
|
166
161
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
167
|
-
return !(
|
|
168
|
-
|
|
162
|
+
return !(activeContentControl?.viewport?.view.is3d() &&
|
|
163
|
+
activeContentControl?.viewport?.view.supportsCamera());
|
|
169
164
|
}, [
|
|
170
165
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveContentChanged,
|
|
171
166
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveViewportChanged,
|
|
@@ -292,9 +287,8 @@ class CoreTools {
|
|
|
292
287
|
labelKey: "UiFramework:tools.sectionTools",
|
|
293
288
|
iconSpec: appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(section_tool_svg_1.default),
|
|
294
289
|
isHidden: new appui_abstract_1.ConditionalBooleanValue(() => {
|
|
295
|
-
var _a;
|
|
296
290
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
297
|
-
return !!
|
|
291
|
+
return !!activeContentControl?.viewport?.view.is2d();
|
|
298
292
|
}, [
|
|
299
293
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveContentChanged,
|
|
300
294
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveViewportChanged,
|
|
@@ -320,9 +314,8 @@ class CoreTools {
|
|
|
320
314
|
panelLabelKey: "UiFramework:tools.sectionPanelLabel",
|
|
321
315
|
iconSpec: appui_abstract_1.IconSpecUtilities.createWebComponentIconSpec(section_tool_svg_1.default),
|
|
322
316
|
isHidden: new appui_abstract_1.ConditionalBooleanValue(() => {
|
|
323
|
-
var _a;
|
|
324
317
|
const activeContentControl = UiFramework_1.UiFramework.content.getActiveContentControl();
|
|
325
|
-
return !!
|
|
318
|
+
return !!activeContentControl?.viewport?.view.is2d();
|
|
326
319
|
}, [
|
|
327
320
|
SyncUiEventDispatcher_1.SyncUiEventId.ActiveContentChanged,
|
|
328
321
|
SyncUiEventDispatcher_1.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,+BAA+B,CAAC,6BAA6B;AAC7D,wDAqB8B;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AAE,CAAC;SACjB,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,KAAK,qBAAqB;QACrC,OAAO,IAAI,+BAAc,CAAC;YACxB,SAAS,EAAE,4BAA4B;YACvC,QAAQ,EAAE,kCAAiB,CAAC,0BAA0B,CAAC,6BAAiB,CAAC;YACzE,QAAQ,EAAE,oCAAoC;YAC9C,QAAQ,EAAE,IAAA,yDAA+B,GAAE;YAC3C,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,gBAAgB,GAAG,yBAAW,CAAC,mBAAmB,EAAE,CAAC;gBAC3D,IAAI,gBAAgB,EAAE;oBACpB,gBAAgB,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;iBAC1C;gBACD,MAAM,IAAI,GAAG,yBAAS,CAAC,SAAS,CAAC,aAAa,CAAC;gBAC/C,IAAI,IAAI;oBAAE,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;;oBAChC,MAAM,yBAAS,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YACpD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,KAAK,qCAAqC;QACrD,OAAO,IAAI,yBAAW,CAAC;YACrB,MAAM,EAAE,+CAA2B,CAAC,MAAM;YAC1C,QAAQ,EAAE,+CAA2B,CAAC,QAAQ;YAC9C,KAAK,EAAE,+CAA2B,CAAC,OAAO;YAC1C,WAAW,EAAE,+CAA2B,CAAC,WAAW;YACpD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,OAAO,yBAAS,CAAC,KAAK,CAAC,GAAG,CAAC,+CAA2B,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA7dD,8BA6dC","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"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B,CAAC,6BAA6B;AAC7D,wDAqB8B;AAC9B,0DAI+B;AAC/B,kFAAuF;AACvF,6DAA0D;AAC1D,uDAAoD;AACpD,2EAAgE;AAChE,oDAAoD;AACpD,2DAAkE;AAClE,gDAA6C;AAC7C,0FAAkF;AAClF,4GAAmG;AACnG,8EAAsE;AACtE,kFAAyE;AACzE,oFAA2E;AAC3E,0FAAiF;AACjF,oEAAoE;AAEpE;;GAEG;AACH,uBAAuB;AACvB,MAAa,SAAS;IACb,MAAM,KAAK,yBAAyB;QACzC,OAAO,IAAI,yBAAW,CAAC;YACrB,MAAM,EAAE,kBAAkB;YAC1B,QAAQ,EAAE,oBAAC,gCAAU,OAAG;YACxB,QAAQ,EAAE,gCAAgC;YAC1C,OAAO,EAAE,GAAG,EAAE;gBACZ,yBAAS,CAAC,OAAO,CAAC,gBAAgB,E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C,KAAK,CAAC,GAAG,CAAC,+CAA2B,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA7dD,8BA6dC","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"]}
|
|
@@ -23,9 +23,10 @@ class ToolSettingsUiDataProvider extends appui_abstract_1.UiLayoutDataProvider {
|
|
|
23
23
|
super(...arguments);
|
|
24
24
|
// send property changes from UI back to tool
|
|
25
25
|
this.applyUiPropertyChange = (syncItem) => {
|
|
26
|
-
var _a;
|
|
27
26
|
// istanbul ignore next
|
|
28
|
-
|
|
27
|
+
core_frontend_1.IModelApp.toolAdmin.activeTool
|
|
28
|
+
?.applyToolSettingPropertyChange(syncItem)
|
|
29
|
+
.catch((err) => core_bentley_1.UnexpectedErrors.handle(err));
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
supplyDialogItems() {
|