@itwin/appui-react 4.6.4 → 4.7.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 +26 -3
- package/lib/cjs/appui-react/UiFramework.d.ts +29 -14
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +28 -15
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +4 -7
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js +3 -3
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawKeyboardShortcuts.d.ts +8 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawKeyboardShortcuts.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawKeyboardShortcuts.js +8 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawKeyboardShortcuts.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.js +3 -4
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/Calculator.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/Calculator.js +11 -12
- package/lib/cjs/appui-react/accudraw/Calculator.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.d.ts +9 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js +9 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts +2 -2
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +16 -11
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/PopoutWidget.d.ts +2 -4
- package/lib/cjs/appui-react/childwindow/PopoutWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/PopoutWidget.js +6 -3
- package/lib/cjs/appui-react/childwindow/PopoutWidget.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +3 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.js +5 -2
- package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +2 -0
- package/lib/cjs/appui-react/content/IModelViewport.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/feedback/ValidationTextbox.js +3 -3
- package/lib/cjs/appui-react/feedback/ValidationTextbox.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +2 -2
- package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +6 -8
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +26 -16
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/NestedFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/NestedFrontstage.js +1 -2
- package/lib/cjs/appui-react/frontstage/NestedFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useEscapeSetFocusToHome.js +2 -2
- package/lib/cjs/appui-react/hooks/useEscapeSetFocusToHome.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +42 -2
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/cjs/appui-react/messages/AppNotificationManager.d.ts +9 -3
- package/lib/cjs/appui-react/messages/AppNotificationManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/AppNotificationManager.js +9 -3
- package/lib/cjs/appui-react/messages/AppNotificationManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.d.ts +10 -0
- package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +51 -6
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.js +1 -3
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.scss +0 -15
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js +8 -8
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +2 -3
- package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.js +2 -2
- package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +7 -6
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js +2 -2
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.js +2 -2
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.js +2 -2
- package/lib/cjs/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts +47 -0
- package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/PreviewFeatures.js +95 -0
- package/lib/cjs/appui-react/preview/PreviewFeatures.js.map +1 -0
- package/lib/cjs/appui-react/safearea/SafeAreaContext.d.ts +9 -2
- package/lib/cjs/appui-react/safearea/SafeAreaContext.d.ts.map +1 -1
- package/lib/cjs/appui-react/safearea/SafeAreaContext.js +9 -2
- package/lib/cjs/appui-react/safearea/SafeAreaContext.js.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +10 -10
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.d.ts +2 -3
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js +9 -6
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.d.ts +1 -28
- package/lib/cjs/appui-react/statusbar/StatusBar.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.js +1 -69
- package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +1 -3
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SectionsField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SectionsField.js +1 -3
- package/lib/cjs/appui-react/statusfields/SectionsField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts +4 -7
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +2 -7
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +8 -10
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +8 -4
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts +38 -7
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +52 -11
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.js +12 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +21 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +7 -7
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/tools/FrameworkToolAdmin.d.ts +10 -1
- package/lib/cjs/appui-react/tools/FrameworkToolAdmin.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/FrameworkToolAdmin.js +12 -4
- package/lib/cjs/appui-react/tools/FrameworkToolAdmin.js.map +1 -1
- package/lib/cjs/appui-react/tools/KeyinPaletteTools.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/KeyinPaletteTools.js +1 -2
- package/lib/cjs/appui-react/tools/KeyinPaletteTools.js.map +1 -1
- package/lib/cjs/appui-react/tools/OpenSettingsTool.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/OpenSettingsTool.js +1 -2
- package/lib/cjs/appui-react/tools/OpenSettingsTool.js.map +1 -1
- package/lib/cjs/appui-react/tools/RestoreLayoutTool.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/RestoreLayoutTool.js +2 -3
- package/lib/cjs/appui-react/tools/RestoreLayoutTool.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +15 -0
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +133 -105
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts +10 -4
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +80 -65
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.d.ts +30 -4
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.d.ts +11 -2
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.d.ts.map +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +9 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts +5 -4
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/AppUiSettings.js +2 -2
- package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +10 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js +10 -1
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/cjs/appui-react/utils/matchesWords.d.ts +22 -0
- package/lib/cjs/appui-react/utils/matchesWords.d.ts.map +1 -0
- package/lib/cjs/appui-react/utils/matchesWords.js +103 -0
- package/lib/cjs/appui-react/utils/matchesWords.js.map +1 -0
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +25 -13
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.scss +19 -0
- package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts +4 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js +11 -5
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js +2 -7
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js.map +1 -1
- package/lib/cjs/appui-react/widgets/Widget.d.ts +23 -1
- package/lib/cjs/appui-react/widgets/Widget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/Widget.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +1 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +3 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +29 -14
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +29 -16
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +4 -7
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js +3 -3
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawKeyboardShortcuts.d.ts +8 -0
- package/lib/esm/appui-react/accudraw/AccuDrawKeyboardShortcuts.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawKeyboardShortcuts.js +8 -0
- package/lib/esm/appui-react/accudraw/AccuDrawKeyboardShortcuts.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.js +3 -4
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
- package/lib/esm/appui-react/accudraw/Calculator.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/Calculator.js +11 -12
- package/lib/esm/appui-react/accudraw/Calculator.js.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.d.ts +9 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js +9 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts +2 -2
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +16 -11
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/childwindow/PopoutWidget.d.ts +2 -4
- package/lib/esm/appui-react/childwindow/PopoutWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/PopoutWidget.js +6 -3
- package/lib/esm/appui-react/childwindow/PopoutWidget.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +3 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/state.js +5 -2
- package/lib/esm/appui-react/configurableui/state.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +2 -0
- package/lib/esm/appui-react/content/IModelViewport.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/feedback/ValidationTextbox.js +3 -3
- package/lib/esm/appui-react/feedback/ValidationTextbox.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +2 -2
- package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +6 -8
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +27 -17
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +2 -2
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/NestedFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/NestedFrontstage.js +1 -2
- package/lib/esm/appui-react/frontstage/NestedFrontstage.js.map +1 -1
- package/lib/esm/appui-react/hooks/useEscapeSetFocusToHome.js +2 -2
- package/lib/esm/appui-react/hooks/useEscapeSetFocusToHome.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +41 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/esm/appui-react/messages/AppNotificationManager.d.ts +9 -3
- package/lib/esm/appui-react/messages/AppNotificationManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/AppNotificationManager.js +9 -3
- package/lib/esm/appui-react/messages/AppNotificationManager.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.d.ts +10 -0
- package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +52 -7
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.js +1 -3
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.scss +0 -15
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js +9 -9
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +2 -3
- package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.js +2 -2
- package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js +6 -5
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js +2 -2
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/esm/appui-react/popup/ToolSettingsPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/ToolSettingsPopup.js +2 -2
- package/lib/esm/appui-react/popup/ToolSettingsPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.js +2 -2
- package/lib/esm/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/esm/appui-react/preview/PreviewFeatures.d.ts +47 -0
- package/lib/esm/appui-react/preview/PreviewFeatures.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/PreviewFeatures.js +90 -0
- package/lib/esm/appui-react/preview/PreviewFeatures.js.map +1 -0
- package/lib/esm/appui-react/safearea/SafeAreaContext.d.ts +9 -2
- package/lib/esm/appui-react/safearea/SafeAreaContext.d.ts.map +1 -1
- package/lib/esm/appui-react/safearea/SafeAreaContext.js +9 -2
- package/lib/esm/appui-react/safearea/SafeAreaContext.js.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js +11 -11
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.d.ts +2 -3
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js +9 -6
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.d.ts +1 -28
- package/lib/esm/appui-react/statusbar/StatusBar.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.js +1 -69
- package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +2 -4
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SectionsField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SectionsField.js +1 -3
- package/lib/esm/appui-react/statusfields/SectionsField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts +4 -7
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +2 -7
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +8 -10
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +8 -4
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.d.ts +38 -7
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +51 -10
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.js +11 -0
- package/lib/esm/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +21 -0
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +8 -8
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/tools/FrameworkToolAdmin.d.ts +10 -1
- package/lib/esm/appui-react/tools/FrameworkToolAdmin.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/FrameworkToolAdmin.js +12 -4
- package/lib/esm/appui-react/tools/FrameworkToolAdmin.js.map +1 -1
- package/lib/esm/appui-react/tools/KeyinPaletteTools.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/KeyinPaletteTools.js +1 -2
- package/lib/esm/appui-react/tools/KeyinPaletteTools.js.map +1 -1
- package/lib/esm/appui-react/tools/OpenSettingsTool.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/OpenSettingsTool.js +1 -2
- package/lib/esm/appui-react/tools/OpenSettingsTool.js.map +1 -1
- package/lib/esm/appui-react/tools/RestoreLayoutTool.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/RestoreLayoutTool.js +2 -3
- package/lib/esm/appui-react/tools/RestoreLayoutTool.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +15 -0
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +131 -104
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts +10 -4
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +81 -66
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.d.ts +30 -4
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.d.ts +11 -2
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.d.ts.map +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +9 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts +5 -4
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/AppUiSettings.js +2 -2
- package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +10 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.js +10 -1
- package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -1
- package/lib/esm/appui-react/utils/matchesWords.d.ts +22 -0
- package/lib/esm/appui-react/utils/matchesWords.d.ts.map +1 -0
- package/lib/esm/appui-react/utils/matchesWords.js +99 -0
- package/lib/esm/appui-react/utils/matchesWords.js.map +1 -0
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +27 -15
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.scss +19 -0
- package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts +4 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.js +9 -4
- package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.js +2 -7
- package/lib/esm/appui-react/widgets/BackstageAppButton.js.map +1 -1
- package/lib/esm/appui-react/widgets/Widget.d.ts +23 -1
- package/lib/esm/appui-react/widgets/Widget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/Widget.js.map +1 -1
- package/lib/esm/appui-react.d.ts +1 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +1 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +6 -4
- package/package.json +13 -11
|
@@ -48,7 +48,7 @@ class InternalContentViewManager {
|
|
|
48
48
|
}
|
|
49
49
|
floatingControls.forEach((contentControl) => {
|
|
50
50
|
const node = contentControl.reactNode;
|
|
51
|
-
const key = node
|
|
51
|
+
const key = node?.key;
|
|
52
52
|
const nodeId = key && key.split("::", 1)[0];
|
|
53
53
|
if (nodeId === controlId)
|
|
54
54
|
control = contentControl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAChD,0DAAuD;AAEvD,iFAA8E;AAC9E,wDAAiD;AAEjD,sDAA6C;AAC7C,gDAA6C;AAC7C,oEAGuC;AACvC,yFAAsF;AAEtF;;GAEG;AACH,MAAa,0BAA0B;IAOrC,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IAYD,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,MAAM,CAAC,qBAAqB,CAClC,OAAwB,EACxB,kBAA4C,EAC5C,gBAA8C,EAC9C,aAAa,GAAG,KAAK;QAErB,IAAI,gBAAgB,EAAE,MAAM,EAAE;YAC5B,8EAA8E;YAC9E,IAAI,OAAO,GAAG,gBAAgB,CAAC,IAAI,CACjC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,SAAS,KAAK,OAAO,CACzD,CAAC;YACF,IAAI,OAAO;gBAAE,OAAO,OAAO,CAAC;YAE5B,8FAA8F;YAC9F,IAAI,SAAiB,CAAC;YACtB,IAAI,OAAO,IAAK,OAAmC,CAAC,GAAG,EAAE;gBACvD,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EAE/D,CAAC;AA1BM,gEAA0B","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 ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>).key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAChD,0DAAuD;AAEvD,iFAA8E;AAC9E,wDAAiD;AAEjD,sDAA6C;AAC7C,gDAA6C;AAC7C,oEAGuC;AACvC,yFAAsF;AAEtF;;GAEG;AACH,MAAa,0BAA0B;IAOrC,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IA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AO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;IACD;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;;AAnQc,qCAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,kDAAuB,GAAG,IAAI,wCAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,sDAA2B,GAChD,IAAI,4CAAyB,EAAE,CAAC;AAElC,wDAAwD;AAEjC,yDAA8B,GAAG,IAAI,wBAAO,EAE/D,CAAC;AA1BM,gEAA0B","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 ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>)?.key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}
|
|
@@ -11,7 +11,7 @@ exports.ValidationTextbox = exports.InputStatus = void 0;
|
|
|
11
11
|
require("./ValidationTextbox.scss");
|
|
12
12
|
const classnames_1 = require("classnames");
|
|
13
13
|
const React = require("react");
|
|
14
|
-
const
|
|
14
|
+
const ts_key_enum_1 = require("ts-key-enum");
|
|
15
15
|
const MessageManager_1 = require("../messages/MessageManager");
|
|
16
16
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
17
17
|
/** Enum for Input Status used in [[ValidationTextbox]]
|
|
@@ -45,12 +45,12 @@ class ValidationTextbox extends React.PureComponent {
|
|
|
45
45
|
this._handleKeyUp = (event) => {
|
|
46
46
|
this.processValidateText(event.target);
|
|
47
47
|
switch (event.key) {
|
|
48
|
-
case
|
|
48
|
+
case ts_key_enum_1.Key.Escape:
|
|
49
49
|
// istanbul ignore else
|
|
50
50
|
if (this.props.onEscPressed)
|
|
51
51
|
this.props.onEscPressed();
|
|
52
52
|
break;
|
|
53
|
-
case
|
|
53
|
+
case ts_key_enum_1.Key.Enter:
|
|
54
54
|
// istanbul ignore else
|
|
55
55
|
if (this.props.onEnterPressed)
|
|
56
56
|
this.props.onEnterPressed();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationTextbox.js","sourceRoot":"","sources":["../../../../src/appui-react/feedback/ValidationTextbox.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,oCAAkC;AAClC,2CAAoC;AACpC,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"ValidationTextbox.js","sourceRoot":"","sources":["../../../../src/appui-react/feedback/ValidationTextbox.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,oCAAkC;AAClC,2CAAoC;AACpC,+BAA+B;AAC/B,6CAAkC;AAElC,+DAA4D;AAC5D,wDAA6C;AAE7C;;GAEG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,+CAAS,CAAA;IACT,mDAAW,CAAA;AACb,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAA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,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAWD;;;;;OAKG;IACK,iBAAiB,CAAC,KAAa;QACrC,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc;YAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK;gBAC3D,CAAC,CAAC,0BAA0B,CAAC,IAAI;gBACjC,CAAC,CAAC,KAAK,CAAC;QACZ,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,0BAA0B;IAClB,iBAAiB;QACvB,+BAAc,CAAC,qBAAqB,EAAE,CAAC;IACzC,CAAC;IAED,8BAA8B;IACtB,iBAAiB,CAAC,MAAe;QACvC,+BAAc,CAAC,wBAAwB,CACrC,MAAqB,EACrB,IAAI,CAAC,KAAK,CAAC,SAAU,EACrB,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAC7B,CAAC;QACF,OAAO;IACT,CAAC;CAoBF;AAzHD,8CAyHC","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 \"./ValidationTextbox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { Input } from \"@itwin/itwinui-react\";\n\n/** Enum for Input Status used in [[ValidationTextbox]]\n * @alpha\n */\nexport enum InputStatus {\n Valid = 0,\n Invalid = 1,\n}\n\n/** Property interface for ValidationTextbox\n * @alpha\n */\ninterface ValidationTextboxProps extends CommonProps {\n /** value to set ValidationTextbox to initially */\n initialValue?: string;\n /** placeholder value to show in gray before anything is entered in */\n placeholder?: string;\n /** triggered when the content of ValidationTextbox is changed. Return true if valid */\n onValueChanged?: (value: string) => InputStatus;\n /** listens for <Enter> key presses */\n onEnterPressed?: () => void;\n /** listens for <Esc> key presses */\n onEscPressed?: () => void;\n /** width of ValidationTextbox, measured in em */\n size?: number;\n /** Error message to display */\n errorText?: string;\n /** Detailed error message to display */\n detailedErrorText?: string;\n /** Content */\n children?: React.ReactNode;\n}\n\ninterface ValidationTextboxState {\n isValid: boolean;\n}\n\n/**\n * Input box that validates text based on provided criteria. Defaults to checking\n * for empty if no method for onValueChanged is provided.\n * @alpha\n */\nexport class ValidationTextbox extends React.PureComponent<\n ValidationTextboxProps,\n ValidationTextboxState\n> {\n constructor(props: ValidationTextboxProps) {\n super(props);\n\n this.state = { isValid: true };\n }\n\n /** @internal */\n public override render(): React.ReactNode {\n const sizeStyle: React.CSSProperties = {\n width: this.props.size ? `${this.props.size.toString()}em` : \"12em\",\n };\n const divStyle: React.CSSProperties = {\n ...sizeStyle,\n ...this.props.style,\n };\n\n const validClassNames = classnames(\"ValidationTextbox-input\");\n\n const invalidClassNames = classnames(\n \"ValidationTextbox-input\",\n \"ValidationTextbox-invalid\"\n );\n\n return (\n <div\n className={classnames(\"uifw-ValidationTextbox\", this.props.className)}\n style={divStyle}\n >\n <Input\n className={this.state.isValid ? validClassNames : invalidClassNames}\n onChange={this._validateText}\n onKeyUp={this._handleKeyUp}\n onPaste={this._validateText}\n onCut={this._validateText}\n onBlur={this._validateText}\n placeholder={this.props.placeholder ? this.props.placeholder : \"\"}\n style={sizeStyle}\n />\n {this.props.children}\n </div>\n );\n }\n\n private processValidateText(target: HTMLInputElement | undefined): void {\n // istanbul ignore next\n if (undefined === target) return;\n\n const value = target.value;\n const isValid = this._calculateIsValid(value);\n\n this.setState({ isValid }, () => {\n if (this.state.isValid) {\n this._hideErrorMessage();\n } else {\n // istanbul ignore else\n if (this.props.errorText && !this.state.isValid)\n this._showErrorMessage(target);\n }\n });\n }\n\n /**\n * Determines if value is valid and resolves any defined functions.\n * Also will show or hide error message if defined.\n * @param event Button press event that triggers validation\n */\n private _validateText = (event?: any): void => {\n this.processValidateText(event.target as HTMLInputElement);\n };\n\n /**\n * Determines if value provided is valid by calling user defined\n * function. If no function is provided, the default criteria for\n * validity is if the value has been defined.\n * @param value The value provided in textbox\n */\n private _calculateIsValid(value: string): boolean {\n if (this.props.onValueChanged)\n return this.props.onValueChanged(value) === InputStatus.Valid\n ? /* istanbul ignore next */ true\n : false;\n return value.length > 0;\n }\n\n /** Hides error message */\n private _hideErrorMessage() {\n MessageManager.hideInputFieldMessage();\n }\n\n /** Displays error message. */\n private _showErrorMessage(target: Element) {\n MessageManager.displayInputFieldMessage(\n target as HTMLElement,\n this.props.errorText!,\n this.props.detailedErrorText\n );\n return;\n }\n\n /**\n * Manages special key codes by calling user defined functions\n * @param event Keyup event\n */\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLInputElement>) => {\n this.processValidateText(event.target as HTMLInputElement);\n\n switch (event.key) {\n case Key.Escape:\n // istanbul ignore else\n if (this.props.onEscPressed) this.props.onEscPressed();\n break;\n case Key.Enter:\n // istanbul ignore else\n if (this.props.onEnterPressed) this.props.onEnterPressed();\n break;\n }\n };\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module KeyboardShortcut
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Key } from "ts-key-enum";
|
|
5
5
|
import type { ActionButtonItemDef } from "../shared/ActionButtonItemDef";
|
|
6
6
|
import type { ItemDefBase } from "../shared/ItemDefBase";
|
|
7
7
|
import type { ItemProps } from "../shared/ItemProps";
|
|
@@ -12,7 +12,7 @@ export interface KeyboardShortcutProps extends ItemProps {
|
|
|
12
12
|
/** The key that invokes the shortcut.
|
|
13
13
|
* This is either an alphanumeric key, a function key or a special key.
|
|
14
14
|
*/
|
|
15
|
-
key: string |
|
|
15
|
+
key: string | Key;
|
|
16
16
|
/** The item to execute when this shortcut is invoked. Either 'item' or 'shortcuts' must be specified. */
|
|
17
17
|
item?: ActionButtonItemDef;
|
|
18
18
|
/** Nested array of shortcut props. Either 'item' or 'shortcuts' must be specified. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameworkKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkKeyboardShortcuts.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"FrameworkKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkKeyboardShortcuts.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAElB,yGAAyG;IACzG,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,sFAAsF;IACtF,SAAS,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAEpC,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,uCAAuC;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,qCAAqC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IAE/D,oEAAoE;IACpE,WAAW,CAAC,MAAM,EAAE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EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,OAAO,EACzB,gBAAgB,CAAC,EAAE,OAAO,EAC1B,iBAAiB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC;IAEX,qDAAqD;IACrD,QAAQ,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IAE/D,yDAAyD;IACzD,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB,GAAG,SAAS,CAAC;IAEtE,yCAAyC;IACzC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,yBAAyB;IACzB,cAAc,IAAI,IAAI,CAAC;IAEvB,yDAAyD;IACzD,WAAW,IAAI,IAAI,CAAC;IAEpB,yCAAyC;IACzC,SAAS,IAAI,IAAI,CAAC;IAElB,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameworkKeyboardShortcuts.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkKeyboardShortcuts.ts"],"names":[],"mappings":"","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 KeyboardShortcut\n */\nimport type {
|
|
1
|
+
{"version":3,"file":"FrameworkKeyboardShortcuts.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkKeyboardShortcuts.ts"],"names":[],"mappings":"","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 KeyboardShortcut\n */\nimport type { Key } from \"ts-key-enum\";\nimport type { ActionButtonItemDef } from \"../shared/ActionButtonItemDef\";\nimport type { ItemDefBase } from \"../shared/ItemDefBase\";\nimport type { ItemProps } from \"../shared/ItemProps\";\n\n/** Properties for a Keyboard Shortcut\n * @public\n */\nexport interface KeyboardShortcutProps extends ItemProps {\n /** The key that invokes the shortcut.\n * This is either an alphanumeric key, a function key or a special key.\n */\n key: string | Key;\n\n /** The item to execute when this shortcut is invoked. Either 'item' or 'shortcuts' must be specified. */\n item?: ActionButtonItemDef;\n /** Nested array of shortcut props. Either 'item' or 'shortcuts' must be specified. */\n shortcuts?: KeyboardShortcutProps[];\n\n /** Indicates whether the Alt key required. Default - false */\n isAltKeyRequired?: boolean;\n /** Indicates whether the Ctrl key required. Default - false */\n isCtrlKeyRequired?: boolean;\n /** Indicates whether the Shift key required. Default - false */\n isShiftKeyRequired?: boolean;\n}\n\n/** Keyboard Shortcut used to execute an action\n * @public\n */\nexport interface FrameworkKeyboardShortcut extends ItemDefBase {\n /** Returns the id for this shortcut */\n readonly id: string;\n\n /** Returns the shortcut container */\n readonly shortcutContainer: FrameworkKeyboardShortcutContainer;\n\n /** Finds a shortcut with a given key in the shortcut's container */\n getShortcut(mapKey: string): FrameworkKeyboardShortcut | undefined;\n\n /** Returns the shortcut's key map key used as the id */\n readonly keyMapKey: string;\n\n /** Returns the [[ActionButtonItemDef]] associated with this shortcut */\n readonly item: ActionButtonItemDef | undefined;\n\n /** Called when the [[ActionButtonItemDef]] associated with this shortcut is invoked */\n itemPicked(): void;\n\n /** Gets the keyboard key */\n readonly key: string;\n /** Gets whether the Alt key required. */\n readonly isAltKeyRequired: boolean;\n /** Gets whether the Ctrl key required. */\n readonly isCtrlKeyRequired: boolean;\n /** Gets whether the Shift key required. */\n readonly isShiftKeyRequired: boolean;\n /** Gets whether this is a Function key. */\n readonly isFunctionKey: boolean;\n /** Gets whether this is a Special key. */\n readonly isSpecialKey: boolean;\n}\n\n/** Keyboard Shortcut Container\n * @public\n */\nexport interface FrameworkKeyboardShortcutContainer {\n /** Registers a Keyboard Shortcut associated with a given key in the managed list */\n registerKey(\n keyMapKey: string,\n inShortcut: FrameworkKeyboardShortcut\n ): FrameworkKeyboardShortcut | undefined;\n\n /** Finds a Keyboard Shortcut associated with a given key */\n findKey(keyMapKey: string): FrameworkKeyboardShortcut | undefined;\n\n /** Determines if any Keyboard Shortcuts are available in this container */\n areKeyboardShortcutsAvailable(): boolean;\n\n /** Empties any Keyboard Shortcuts from this container */\n emptyData(): void;\n\n getAvailableKeyboardShortcuts(): FrameworkKeyboardShortcut[];\n\n /** Displays a menu for the Keyboard Shortcuts in this container */\n showShortcutsMenu(): void;\n}\n\n/**\n * [[UiFramework.keyboardShortcuts]] interface\n * @public\n */\nexport interface FrameworkKeyboardShortcuts {\n /** Loads Keyboard Shortcuts into the managed list */\n loadShortcuts(shortcutList: KeyboardShortcutProps[]): void;\n\n /** Loads a Keyboard Shortcut into the managed list */\n loadShortcut(shortcutProps: KeyboardShortcutProps): void;\n\n /** Processes a keystroke and invokes a matching Keyboard Shortcut */\n processKey(\n keyboardKey: string,\n isAltKeyPressed?: boolean,\n isCtrlKeyPressed?: boolean,\n isShiftKeyPressed?: boolean\n ): boolean;\n\n /** Returns the managed list of Keyboard Shortcuts */\n readonly shortcutContainer: FrameworkKeyboardShortcutContainer;\n\n /** Returns a Keyboard Shortcut from the managed lists */\n getShortcut(keyMapKey: string): FrameworkKeyboardShortcut | undefined;\n\n /** Determines if focus is set to Home */\n readonly isFocusOnHome: boolean;\n\n /** Sets focus to Home */\n setFocusToHome(): void;\n\n /** Displays the Keyboard Shortcuts menu at the cursor */\n displayMenu(): void;\n\n /** Closes the Keyboard Shortcuts menu */\n closeMenu(): void;\n\n /** Returns the cursor X position, which is mouseEvent.pageX. */\n readonly cursorX: number;\n /** Returns the cursor Y position, which is mouseEvent.pageY. */\n readonly cursorY: number;\n}\n"]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* @module Frontstage
|
|
3
3
|
*/
|
|
4
4
|
import type { ScreenViewport } from "@itwin/core-frontend";
|
|
5
|
-
import type { XAndY } from "@itwin/core-geometry";
|
|
6
5
|
import type { RectangleProps, SizeProps } from "@itwin/core-react";
|
|
7
6
|
import type { NineZoneDispatch, NineZoneState } from "@itwin/appui-layout-react";
|
|
8
7
|
import type { ContentControl } from "../content/ContentControl";
|
|
@@ -16,6 +15,7 @@ import { TimeTracker } from "../configurableui/TimeTracker";
|
|
|
16
15
|
import type { FrontstageConfig } from "./FrontstageConfig";
|
|
17
16
|
import { StagePanelLocation } from "../stagepanels/StagePanelLocation";
|
|
18
17
|
import { WidgetState } from "../widgets/WidgetState";
|
|
18
|
+
import type { XAndY } from "@itwin/core-geometry";
|
|
19
19
|
/** @internal */
|
|
20
20
|
export interface FrontstageEventArgs {
|
|
21
21
|
frontstageDef: FrontstageDef;
|
|
@@ -131,14 +131,13 @@ export declare class FrontstageDef {
|
|
|
131
131
|
* @beta
|
|
132
132
|
*/
|
|
133
133
|
restoreLayout(): void;
|
|
134
|
-
/** Used
|
|
134
|
+
/** Used to determine WidgetState from NinezoneState
|
|
135
135
|
* @internal
|
|
136
136
|
*/
|
|
137
137
|
getWidgetCurrentState(widgetDef: WidgetDef): WidgetState | undefined;
|
|
138
138
|
isPopoutWidget(widgetId: string): boolean;
|
|
139
139
|
isFloatingWidget(widgetId: string): boolean;
|
|
140
|
-
/** Create a new floating panel that contains the widget specified by its Id.
|
|
141
|
-
* UI 2.0 or higher.
|
|
140
|
+
/** Create a new floating panel that contains the widget specified by its Id.
|
|
142
141
|
* @param widgetId case sensitive Widget Id
|
|
143
142
|
* @param position Position of top left corner of floating panel in pixels. If undefined {x:50, y:100} is used.
|
|
144
143
|
* @param size defines the width and height of the floating panel. If undefined and widget has been floated before
|
|
@@ -154,9 +153,8 @@ export declare class FrontstageDef {
|
|
|
154
153
|
/** Opens window for specified PopoutWidget container. Used to reopen popout when running in Electron.
|
|
155
154
|
* @internal
|
|
156
155
|
*/
|
|
157
|
-
openPopoutWidgetContainer(widgetContainerId: string):
|
|
158
|
-
/** Create a new popout/child window that contains the widget specified by its Id.
|
|
159
|
-
* UI 2.0 or higher.
|
|
156
|
+
openPopoutWidgetContainer(widgetContainerId: string, oldState: NineZoneState | undefined): boolean;
|
|
157
|
+
/** Create a new popout/child window that contains the widget specified by its Id.
|
|
160
158
|
* @param widgetId case sensitive Widget Id
|
|
161
159
|
* @param position Position of top left corner of floating panel in pixels. If undefined {x:0, y:0} is used.
|
|
162
160
|
* @param size defines the width and height of the floating panel. If undefined and widget has been floated before
|
|
@@ -173,7 +171,7 @@ export declare class FrontstageDef {
|
|
|
173
171
|
dockWidgetContainerByContainerId(widgetContainerId: string): void;
|
|
174
172
|
/** Finds the container with the specified widget and re-docks all widgets
|
|
175
173
|
* back to the panel zone location that was used when the floating container
|
|
176
|
-
* was generated.
|
|
174
|
+
* was generated.
|
|
177
175
|
* @param widgetId case sensitive Widget Id.
|
|
178
176
|
* @beta
|
|
179
177
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontstageDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/FrontstageDef.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"FrontstageDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/FrontstageDef.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EAEd,MAAM,2BAA2B,CAAC;AAYnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAA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gCAAgC,CACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS;IA2BtC,OAAO,CAAE,WAAW;IAWpB;;OAEG;IACH,IAAW,UAAU;;MAOpB;CACF;AAuCD;;GAEG;AACH,eAAO,MAAM,qBAAqB,cAOjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,8BAYrC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,yBAepD"}
|
|
@@ -188,8 +188,11 @@ class FrontstageDef {
|
|
|
188
188
|
UiFramework_1.UiFramework.childWindows.close(popoutId, true);
|
|
189
189
|
}
|
|
190
190
|
for (const popoutId of popoutsToOpen) {
|
|
191
|
-
this.openPopoutWidgetContainer(popoutId);
|
|
191
|
+
const result = this.openPopoutWidgetContainer(popoutId, oldState);
|
|
192
|
+
if (!result)
|
|
193
|
+
return result;
|
|
192
194
|
}
|
|
195
|
+
return true;
|
|
193
196
|
}
|
|
194
197
|
/** @internal */
|
|
195
198
|
get nineZoneState() {
|
|
@@ -200,13 +203,17 @@ class FrontstageDef {
|
|
|
200
203
|
return;
|
|
201
204
|
const oldState = this._nineZoneState;
|
|
202
205
|
this._nineZoneState = state;
|
|
203
|
-
this.handlePopouts(oldState);
|
|
206
|
+
const popoutResult = this.handlePopouts(oldState);
|
|
204
207
|
if (oldState) {
|
|
205
208
|
this.triggerStateChangeEvents(oldState);
|
|
206
209
|
}
|
|
207
210
|
const isClosing = this._isStageClosing || this._isApplicationClosing;
|
|
208
211
|
if (isClosing && !this.isReady)
|
|
209
212
|
return;
|
|
213
|
+
if (popoutResult === false) {
|
|
214
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, "Widget Failed To Popout", undefined, core_frontend_1.OutputMessageType.Toast));
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
210
217
|
InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageNineZoneStateChangedEvent.emit({
|
|
211
218
|
frontstageDef: this,
|
|
212
219
|
state,
|
|
@@ -527,7 +534,7 @@ class FrontstageDef {
|
|
|
527
534
|
frontstageDef: this,
|
|
528
535
|
});
|
|
529
536
|
}
|
|
530
|
-
/** Used
|
|
537
|
+
/** Used to determine WidgetState from NinezoneState
|
|
531
538
|
* @internal
|
|
532
539
|
*/
|
|
533
540
|
getWidgetCurrentState(widgetDef) {
|
|
@@ -581,8 +588,7 @@ class FrontstageDef {
|
|
|
581
588
|
}
|
|
582
589
|
return false;
|
|
583
590
|
}
|
|
584
|
-
/** Create a new floating panel that contains the widget specified by its Id.
|
|
585
|
-
* UI 2.0 or higher.
|
|
591
|
+
/** Create a new floating panel that contains the widget specified by its Id.
|
|
586
592
|
* @param widgetId case sensitive Widget Id
|
|
587
593
|
* @param position Position of top left corner of floating panel in pixels. If undefined {x:50, y:100} is used.
|
|
588
594
|
* @param size defines the width and height of the floating panel. If undefined and widget has been floated before
|
|
@@ -624,24 +630,24 @@ class FrontstageDef {
|
|
|
624
630
|
/** Opens window for specified PopoutWidget container. Used to reopen popout when running in Electron.
|
|
625
631
|
* @internal
|
|
626
632
|
*/
|
|
627
|
-
openPopoutWidgetContainer(widgetContainerId) {
|
|
633
|
+
openPopoutWidgetContainer(widgetContainerId, oldState) {
|
|
628
634
|
const state = this.nineZoneState;
|
|
629
635
|
if (!state)
|
|
630
|
-
return;
|
|
636
|
+
return false;
|
|
631
637
|
const location = (0, appui_layout_react_1.getWidgetLocation)(state, widgetContainerId);
|
|
632
638
|
if (!location)
|
|
633
|
-
return;
|
|
639
|
+
return false;
|
|
634
640
|
if (!(0, appui_layout_react_1.isPopoutWidgetLocation)(location))
|
|
635
|
-
return;
|
|
641
|
+
return false;
|
|
636
642
|
const widget = state.widgets[widgetContainerId];
|
|
637
643
|
// Popout widget should only contain a single tab.
|
|
638
644
|
if (widget.tabs.length !== 1)
|
|
639
|
-
return;
|
|
645
|
+
return false;
|
|
640
646
|
const tabId = widget.tabs[0];
|
|
641
647
|
const widgetDef = this.findWidgetDef(tabId);
|
|
642
648
|
if (!widgetDef)
|
|
643
|
-
return;
|
|
644
|
-
const popoutContent = (React.createElement(PopoutWidget_1.PopoutWidget, { widgetContainerId: widgetContainerId
|
|
649
|
+
return false;
|
|
650
|
+
const popoutContent = (React.createElement(PopoutWidget_1.PopoutWidget, { widgetContainerId: widgetContainerId }));
|
|
645
651
|
const popoutWidget = state.popoutWidgets.byId[location.popoutWidgetId];
|
|
646
652
|
const bounds = core_react_1.Rectangle.create(popoutWidget.bounds);
|
|
647
653
|
const position = {
|
|
@@ -650,10 +656,14 @@ class FrontstageDef {
|
|
|
650
656
|
left: bounds.left,
|
|
651
657
|
top: bounds.top,
|
|
652
658
|
};
|
|
653
|
-
UiFramework_1.UiFramework.childWindows.open(widgetContainerId, widgetDef.label, popoutContent, position, UiFramework_1.UiFramework.useDefaultPopoutUrl);
|
|
659
|
+
const result = UiFramework_1.UiFramework.childWindows.open(widgetContainerId, widgetDef.label, popoutContent, position, UiFramework_1.UiFramework.useDefaultPopoutUrl);
|
|
660
|
+
if (!result && oldState) {
|
|
661
|
+
this.nineZoneState = oldState;
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
return true;
|
|
654
665
|
}
|
|
655
|
-
/** Create a new popout/child window that contains the widget specified by its Id.
|
|
656
|
-
* UI 2.0 or higher.
|
|
666
|
+
/** Create a new popout/child window that contains the widget specified by its Id.
|
|
657
667
|
* @param widgetId case sensitive Widget Id
|
|
658
668
|
* @param position Position of top left corner of floating panel in pixels. If undefined {x:0, y:0} is used.
|
|
659
669
|
* @param size defines the width and height of the floating panel. If undefined and widget has been floated before
|
|
@@ -735,7 +745,7 @@ class FrontstageDef {
|
|
|
735
745
|
}
|
|
736
746
|
/** Finds the container with the specified widget and re-docks all widgets
|
|
737
747
|
* back to the panel zone location that was used when the floating container
|
|
738
|
-
* was generated.
|
|
748
|
+
* was generated.
|
|
739
749
|
* @param widgetId case sensitive Widget Id.
|
|
740
750
|
* @beta
|
|
741
751
|
*/
|