@itwin/appui-react 4.8.0 → 4.9.0-dev.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 +7 -1
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +6 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +2 -0
- package/lib/cjs/appui-react/accudraw/SquareButton.d.ts +3 -1
- package/lib/cjs/appui-react/accudraw/SquareButton.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/SquareButton.js +1 -4
- package/lib/cjs/appui-react/accudraw/SquareButton.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +25 -7
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +19 -15
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.js +1 -0
- package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js +2 -0
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +1 -0
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +1 -0
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -0
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -0
- package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js +1 -0
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.js +3 -3
- package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.js +2 -0
- package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js +8 -0
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.js +1 -0
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +8 -2
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +25 -8
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +15 -4
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +2 -3
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.scss +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +5 -5
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
- package/lib/cjs/appui-react/messages/InputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/InputField.js +2 -3
- package/lib/cjs/appui-react/messages/InputField.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageLabel.js +2 -2
- package/lib/cjs/appui-react/messages/MessageLabel.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.d.ts +15 -5
- package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +31 -39
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageRenderer.d.ts +8 -0
- package/lib/cjs/appui-react/messages/MessageRenderer.d.ts.map +1 -0
- package/lib/cjs/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +60 -14
- package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -0
- package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/Pointer.js +4 -3
- package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
- package/lib/cjs/appui-react/messages/getToastCategory.d.ts +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +1 -0
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +2 -0
- 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 +1 -2
- package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -2
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.js +1 -0
- package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/cjs/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/ReducerRegistry.js +1 -0
- package/lib/cjs/appui-react/redux/ReducerRegistry.js.map +1 -1
- package/lib/cjs/appui-react/redux/StateManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/StateManager.js +1 -0
- package/lib/cjs/appui-react/redux/StateManager.js.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
- package/lib/cjs/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/MenuItem.js +1 -0
- package/lib/cjs/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +19 -18
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts +13 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.js +21 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.js.map +1 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +6 -5
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.scss +1 -3
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +3 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +8 -8
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolsettings/ToolInformation.js +1 -0
- package/lib/cjs/appui-react/toolsettings/ToolInformation.js.map +1 -1
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +16 -13
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +16 -33
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +243 -386
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.scss +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/useWidget.d.ts +17 -0
- package/lib/cjs/appui-react/widgets/useWidget.d.ts.map +1 -0
- package/lib/cjs/appui-react/widgets/useWidget.js +70 -0
- package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -0
- package/lib/cjs/appui-react.d.ts +2 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +2 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +6 -0
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +2 -0
- package/lib/esm/appui-react/accudraw/SquareButton.d.ts +3 -1
- package/lib/esm/appui-react/accudraw/SquareButton.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/SquareButton.js +1 -4
- package/lib/esm/appui-react/accudraw/SquareButton.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +25 -7
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +19 -15
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.js +1 -0
- package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js +2 -0
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +1 -0
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +1 -0
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -0
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/CursorInformation.js +1 -0
- package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -0
- package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.js +4 -4
- package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.js +2 -0
- package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js +8 -0
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.js +1 -0
- package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +8 -2
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +24 -7
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +15 -4
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js +2 -3
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.scss +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
- package/lib/esm/appui-react/messages/InputField.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/InputField.js +3 -4
- package/lib/esm/appui-react/messages/InputField.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageLabel.js +2 -2
- package/lib/esm/appui-react/messages/MessageLabel.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.d.ts +15 -5
- package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +31 -39
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageRenderer.d.ts +8 -0
- package/lib/esm/appui-react/messages/MessageRenderer.d.ts.map +1 -0
- package/lib/esm/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +58 -12
- package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -0
- package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/Pointer.js +5 -4
- package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
- package/lib/esm/appui-react/messages/getToastCategory.d.ts +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -0
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +2 -0
- 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 -3
- package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.js +2 -3
- package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.js +1 -0
- package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/esm/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/ReducerRegistry.js +1 -0
- package/lib/esm/appui-react/redux/ReducerRegistry.js.map +1 -1
- package/lib/esm/appui-react/redux/StateManager.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/StateManager.js +1 -0
- package/lib/esm/appui-react/redux/StateManager.js.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
- package/lib/esm/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/MenuItem.js +1 -0
- package/lib/esm/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +15 -14
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.js +18 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.js.map +1 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +6 -5
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.scss +1 -3
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +3 -1
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +5 -5
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
- package/lib/esm/appui-react/toolsettings/ToolInformation.js +1 -0
- package/lib/esm/appui-react/toolsettings/ToolInformation.js.map +1 -1
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +16 -13
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +16 -33
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +244 -382
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.scss +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/useWidget.d.ts +17 -0
- package/lib/esm/appui-react/widgets/useWidget.d.ts.map +1 -0
- package/lib/esm/appui-react/widgets/useWidget.js +66 -0
- package/lib/esm/appui-react/widgets/useWidget.js.map +1 -0
- package/lib/esm/appui-react.d.ts +2 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +2 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +16 -17
- package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +0 -10
- package/lib/cjs/appui-react/messages/ActivityMessage.d.ts.map +0 -1
- package/lib/cjs/appui-react/messages/ActivityMessage.js.map +0 -1
- package/lib/cjs/appui-react/messages/MessageSpan.d.ts +0 -15
- package/lib/cjs/appui-react/messages/MessageSpan.d.ts.map +0 -1
- package/lib/cjs/appui-react/messages/MessageSpan.js +0 -23
- package/lib/cjs/appui-react/messages/MessageSpan.js.map +0 -1
- package/lib/esm/appui-react/messages/ActivityMessage.d.ts +0 -10
- package/lib/esm/appui-react/messages/ActivityMessage.d.ts.map +0 -1
- package/lib/esm/appui-react/messages/ActivityMessage.js.map +0 -1
- package/lib/esm/appui-react/messages/MessageSpan.d.ts +0 -15
- package/lib/esm/appui-react/messages/MessageSpan.d.ts.map +0 -1
- package/lib/esm/appui-react/messages/MessageSpan.js +0 -18
- package/lib/esm/appui-react/messages/MessageSpan.js.map +0 -1
- /package/lib/cjs/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
- /package/lib/esm/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EAIpB,MAAM,uBAAuB,CAAC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B;WACF,WAAW,CACvB,WAAW,EAAE,mBAAmB,GAC/B,WAAW,GAAG,SAAS;CAS3B;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AAEH,qBAAa,2BAA4B,SAAQ,OAAO,CAAC,+BAA+B,CAAC;CAAG;AAE5F;GACG;AACH,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAChD,2BAA2B,EAC3B,kBAAkB,CACnB;IACC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAEjD,KAAK,EAAE,2BAA2B;IAmB9B,iBAAiB;IAMjB,oBAAoB;IAMpC,OAAO,CAAC,6BAA6B,CAiBnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAoBzC,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,UAAU,CAEhB;CACH"}
|
|
@@ -325,6 +325,7 @@ exports.ContentLayoutDef = ContentLayoutDef;
|
|
|
325
325
|
/** Content Layout Activated Event class.
|
|
326
326
|
* @public
|
|
327
327
|
*/
|
|
328
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
328
329
|
class ContentLayoutActivatedEvent extends appui_abstract_1.UiEvent {
|
|
329
330
|
}
|
|
330
331
|
exports.ContentLayoutActivatedEvent = ContentLayoutActivatedEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.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AI,CAAC,KAAK,CAAC,aAAa,CAAC;QAClD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QAE7C,MAAM,YAAY,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;QACpD,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,mBAAmB,CAC3D,YAAY,EACZ,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG;YACX,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;YAC1C,gBAAgB;YAChB,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO;SAChD,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,yBAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAC/D,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,yBAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,cAAc,CAClE,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAqBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF;AApFD,sCAoFC","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\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl 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 return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,8BAA8B;AAE9B,gCAA8B;AAC9B,2CAAoC;AACpC,+BAA+B;AAC/B,sDAAmD;AAEnD,kDAAgD;AAShD,0DAAgD;AAEhD,+DAAqE;AACrE,gDAA6C;AAO7C;;GAEG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,OAAO,KAAK,yBAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAC5C,CAAC;IACF,MAAM,mBAAmB,GAAG,IAAA,sCAAsB,GAAE,CAAC;IAErD,MAAM,iBAAiB,GAAG,CACxB,cAA+B,EACX,EAAE;QACtB,IAAI,SAA6B,CAAC;QAClC,IAAI,cAAc,IAAK,cAA0C,CAAC,GAAG,EAAE;YACrE,MAAM,GAAG,GAAI,cAA0C,CAAC,GAAa,CAAC;YACtE,oFAAoF;YACpF,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACnC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,uBAAuB;IACvB,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAClE,GAAG,EAAE;;QACH,OAAA,CAAC,mBAAmB;Y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E,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,cAAc,IAElB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF;AApFD,sCAoFC","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\n// cSpell:ignore contentlayout\n\nimport \"./ContentLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { SplitPane } from \"./split-pane/SplitPane\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport type {\n ContentLayoutProps,\n LayoutFragmentProps,\n LayoutHorizontalSplitProps,\n LayoutSplitPropsBase,\n LayoutVerticalSplitProps,\n} from \"@itwin/appui-abstract\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport type { ActiveContentChangedEventArgs } from \"../framework/FrameworkContent\";\nimport { useActiveFrontstageDef } from \"../frontstage/FrontstageDef\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** Properties for [[ContentWrapper]] */\ninterface ContentWrapperProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** ContentWrapper React component.\n * @internal\n */\nexport function ContentWrapper(props: ContentWrapperProps) {\n const { content } = props;\n const [isActive, setIsActive] = React.useState(\n content === UiFramework.content.getActive()\n );\n const activeFrontstageDef = useActiveFrontstageDef();\n\n const contentControlKey = (\n contentControl: React.ReactNode\n ): string | undefined => {\n let controlId: string | undefined;\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\n const key = (contentControl 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 return controlId;\n };\n\n // istanbul ignore next\n const [hasMultipleContents, setHasMultipleContents] = React.useState(\n () =>\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1\n );\n\n React.useEffect(() => {\n setIsActive(content === UiFramework.content.getActive());\n }, [content]);\n\n React.useEffect(() => {\n const handleActiveContentChanged = (\n args: ActiveContentChangedEventArgs\n ) => {\n const contentIsIdentical = content === args.activeContent;\n if (contentIsIdentical) setIsActive(contentIsIdentical);\n else {\n const contentId = contentControlKey(content);\n const activeContentId = contentControlKey(args.activeContent);\n setIsActive(contentId === activeContentId);\n }\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onActiveContentChangedEvent.addListener(\n handleActiveContentChanged\n );\n }, [activeFrontstageDef, content]);\n\n const handleMouseDown = React.useCallback(() => {\n UiFramework.content.setActive(content);\n setIsActive(true);\n }, [content]);\n\n React.useEffect(() => {\n const onAvailableContentChanged = () => {\n // istanbul ignore next\n setHasMultipleContents(\n (activeFrontstageDef &&\n !!activeFrontstageDef.floatingContentControls?.length) ||\n (activeFrontstageDef?.contentGroup?.getContentControls().length ??\n 0) > 1\n );\n };\n return UiFramework.content.onAvailableContentChangedEvent.addListener(\n onAvailableContentChanged\n );\n }, [activeFrontstageDef]);\n\n const overlayClassName = classnames(\n \"uifw-contentlayout-overlay-div\",\n isActive && hasMultipleContents\n ? \"uifw-contentlayout-overlay-active\"\n : \"uifw-contentlayout-overlay-inactive\"\n );\n\n return (\n <div\n className={classnames(\"uifw-contentlayout-wrapper\", props.className)}\n style={props.style}\n onMouseDown={handleMouseDown}\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n role=\"presentation\"\n >\n {content}\n <div className={overlayClassName} />\n </div>\n );\n}\n\n/** Properties for the [[SplitContainer]] component */\ninterface SplitContainerProps extends CommonProps {\n contentA: React.ReactNode;\n contentB: React.ReactNode;\n orientation: Orientation;\n percentage: number;\n resizable: boolean;\n minSizeTopLeft: number;\n minSizeBottomRight: number;\n splitterStateId?: string;\n onSplitterChange?: (size: number, percentage: number) => void;\n}\n\n/** Split Container class.\n */\nclass SplitContainer extends React.Component<SplitContainerProps> {\n private _containerDiv: HTMLDivElement | null = null;\n\n constructor(props: SplitContainerProps) {\n super(props);\n }\n\n private _onSplitterChange = (size: number): void => {\n let percentage = 0;\n\n // istanbul ignore else\n if (this._containerDiv && size > 0) {\n if (this.props.orientation === Orientation.Horizontal) {\n const height = this._containerDiv.getBoundingClientRect().height;\n // istanbul ignore if\n if (height > 0) percentage = size / height;\n } else {\n const width = this._containerDiv.getBoundingClientRect().width;\n // istanbul ignore if\n if (width > 0) percentage = size / width;\n }\n\n // istanbul ignore else\n if (this.props.onSplitterChange)\n this.props.onSplitterChange(size, percentage);\n }\n };\n\n public override render(): React.ReactNode {\n const orientation =\n this.props.orientation === Orientation.Horizontal\n ? \"horizontal\"\n : \"vertical\";\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\n const minSizeTopLeft = this.props.minSizeTopLeft;\n const minSizeBottomRight = -this.props.minSizeBottomRight;\n\n return (\n <div\n ref={(e) => {\n this._containerDiv = e;\n }}\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n >\n <SplitPane\n split={orientation}\n minSize={minSizeTopLeft}\n maxSize={minSizeBottomRight}\n defaultSize={defaultSize}\n onChange={this._onSplitterChange}\n allowResize={this.props.resizable}\n >\n {this.props.contentA}\n {this.props.contentB}\n </SplitPane>\n </div>\n );\n }\n}\n\n/** Properties for [[SingleContentContainer]] component\n */\ninterface SingleContentProps extends CommonProps {\n content: React.ReactNode;\n}\n\n/** Single Content Container class.\n */\nclass SingleContentContainer extends React.Component<SingleContentProps> {\n public override render(): React.ReactNode {\n return (\n <div\n className={classnames(\n \"uifw-contentlayout-full-size\",\n this.props.className\n )}\n style={this.props.style}\n data-testid=\"single-content-container\"\n onMouseMove={UiFramework.visibility.handleContentMouseMove}\n >\n <ContentWrapper\n content={this.props.content}\n style={{ height: \"100%\", position: \"relative\" }}\n />\n </div>\n );\n }\n}\n\n/** Common interface for HorizontalSplit and VerticalSplit\n */\ninterface LayoutSplit {\n createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode;\n isLocked: boolean;\n}\n\n/** Minimum split size */\nconst MIN_SPLIT_SIZE = 6;\n\n/** Base Split class.\n */\nclass BaseSplit {\n public defaultPercentage: number;\n public stateId: string = \"\";\n public isLocked: boolean = false;\n\n constructor(props: LayoutSplitPropsBase) {\n this.defaultPercentage = props.percentage;\n\n // istanbul ignore else\n if (props.id) this.stateId = props.id;\n\n // istanbul ignore else\n if (props.lock) this.isLocked = props.lock;\n }\n}\n\n/** Horizontal Split class.\n */\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\n private _topIndex: number = -1;\n private _bottomIndex: number = -1;\n private _topSplit?: LayoutSplit;\n private _bottomSplit?: LayoutSplit;\n private _props: LayoutHorizontalSplitProps;\n private _minSizeTop: number = MIN_SPLIT_SIZE;\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutHorizontalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.top === \"number\") {\n this._topIndex = props.top;\n } else {\n this._topSplit = ContentLayoutDef.createSplit(props.top);\n }\n\n if (typeof props.bottom === \"number\") {\n this._bottomIndex = props.bottom;\n } else {\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\n }\n\n if (props.minSizeTop)\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\n\n if (props.minSizeBottom)\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const topContent = !this._topSplit ? (\n <ContentWrapper content={contentNodes[this._topIndex]} />\n ) : (\n this._topSplit.createContentContainer(contentNodes, resizable)\n );\n const bottomContent = !this._bottomSplit ? (\n <ContentWrapper content={contentNodes[this._bottomIndex]} />\n ) : (\n this._bottomSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={topContent}\n contentB={bottomContent}\n orientation={Orientation.Horizontal}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeTop}\n minSizeBottomRight={this._minSizeBottom}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Vertical Split class.\n */\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\n private _leftIndex: number = -1;\n private _rightIndex: number = -1;\n private _leftSplit?: LayoutSplit;\n private _rightSplit?: LayoutSplit;\n private _props: LayoutVerticalSplitProps;\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\n private _minSizeRight: number = MIN_SPLIT_SIZE;\n\n constructor(props: LayoutVerticalSplitProps) {\n super(props);\n\n this._props = props;\n\n if (typeof props.left === \"number\") {\n this._leftIndex = props.left;\n } else {\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\n }\n\n if (typeof props.right === \"number\") {\n this._rightIndex = props.right;\n } else {\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\n }\n\n if (props.minSizeLeft)\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\n\n if (props.minSizeRight)\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\n }\n\n private _handleSplitterChange = (_size: number, percentage: number): void => {\n this._props.percentage = percentage;\n };\n\n public createContentContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode {\n if (this.isLocked) resizable = false;\n\n const leftContent = !this._leftSplit ? (\n <ContentWrapper content={contentNodes[this._leftIndex]} />\n ) : (\n this._leftSplit.createContentContainer(contentNodes, resizable)\n );\n const rightContent = !this._rightSplit ? (\n <ContentWrapper content={contentNodes[this._rightIndex]} />\n ) : (\n this._rightSplit.createContentContainer(contentNodes, resizable)\n );\n\n return (\n <SplitContainer\n contentA={leftContent}\n contentB={rightContent}\n orientation={Orientation.Vertical}\n percentage={this.defaultPercentage}\n resizable={resizable}\n minSizeTopLeft={this._minSizeLeft}\n minSizeBottomRight={this._minSizeRight}\n splitterStateId={this.stateId}\n onSplitterChange={this._handleSplitterChange}\n />\n );\n }\n}\n\n/** Content Layout Definition class.\n * @public\n */\nexport class ContentLayoutDef {\n private _layoutProps: ContentLayoutProps;\n private _rootSplit?: LayoutSplit;\n\n /** ID for this Content Layout */\n public id: string = \"\";\n /** Description of the layout. */\n public description: string = \"\";\n constructor(layoutProps: ContentLayoutProps) {\n this._layoutProps = layoutProps;\n this.id = layoutProps.id;\n if (layoutProps.description !== undefined)\n this.description = layoutProps.description;\n }\n\n public get rootSplit(): LayoutSplit | undefined {\n return this._rootSplit;\n }\n\n /** Creates [[ContentLayoutProps]] for JSON purposes\n * @public\n */\n public toJSON(): ContentLayoutProps {\n return this._layoutProps;\n }\n\n /** Fill a layout container with React nodes for each content view\n */\n public fillLayoutContainer(\n contentNodes: React.ReactNode[],\n resizable: boolean\n ): React.ReactNode | undefined {\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\n\n if (this.rootSplit) {\n return this.rootSplit.createContentContainer(contentNodes, resizable);\n }\n\n if (contentNodes.length > 0)\n return <SingleContentContainer content={contentNodes[0]} />;\n\n return undefined;\n }\n\n /** Gets the indexes of content views used in this Content Layout\n */\n public getUsedContentIndexes(): number[] {\n let allContentIndexes: number[] = [];\n\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\n allContentIndexes.push(0);\n else {\n allContentIndexes = allContentIndexes.concat(\n this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit)\n );\n allContentIndexes = allContentIndexes.concat(\n this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit)\n );\n }\n\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\n\n return uniqueContentIndexes;\n }\n\n private getHorizontalSplitContentIndexes(\n splitProps?: LayoutHorizontalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.top === \"number\") contentIndexes.push(splitProps.top);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit)\n );\n }\n\n if (typeof splitProps.bottom === \"number\")\n contentIndexes.push(splitProps.bottom);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n private getVerticalSplitContentIndexes(\n splitProps?: LayoutVerticalSplitProps\n ): number[] {\n let contentIndexes: number[] = [];\n\n if (!splitProps) return contentIndexes;\n\n if (typeof splitProps.left === \"number\")\n contentIndexes.push(splitProps.left);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit)\n );\n }\n\n if (typeof splitProps.right === \"number\")\n contentIndexes.push(splitProps.right);\n else {\n contentIndexes = contentIndexes.concat(\n this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit)\n );\n contentIndexes = contentIndexes.concat(\n this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit)\n );\n }\n\n return contentIndexes;\n }\n\n /** @internal */\n public static createSplit(\n fragmentDef: LayoutFragmentProps\n ): LayoutSplit | undefined {\n if (fragmentDef.horizontalSplit) {\n return new HorizontalSplit(fragmentDef.horizontalSplit);\n } else if (fragmentDef.verticalSplit) {\n return new VerticalSplit(fragmentDef.verticalSplit);\n }\n\n return undefined;\n }\n}\n\n/** Content Layout Activated Event Args class.\n * @public\n */\nexport interface ContentLayoutActivatedEventArgs {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> {}\n\n/** State for the [[ContentLayout]].\n */\ninterface ContentLayoutState {\n contentLayoutDef: ContentLayoutDef;\n contentContainer?: React.ReactNode;\n contentGroupId?: string;\n}\n\n/** Properties for the [[ContentLayout]] React component.\n * @public\n */\nexport interface ContentLayoutComponentProps extends CommonProps {\n contentLayout: ContentLayoutDef;\n contentGroup: ContentGroup;\n}\n\n/** Content Layout React component.\n * @public\n */\nexport class ContentLayout extends React.Component<\n ContentLayoutComponentProps,\n ContentLayoutState\n> {\n /** @internal */\n public override readonly state: Readonly<ContentLayoutState>;\n\n constructor(props: ContentLayoutComponentProps) {\n super(props);\n\n const contentLayoutDef = this.props.contentLayout;\n const contentGroup = this.props.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.state = {\n contentLayoutDef: this.props.contentLayout,\n contentContainer,\n contentGroupId: this.props.contentGroup.groupId,\n };\n }\n\n public override componentDidMount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.addListener(\n this._handleContentLayoutActivated\n );\n }\n\n public override componentWillUnmount() {\n UiFramework.frontstages.onContentLayoutActivatedEvent.removeListener(\n this._handleContentLayoutActivated\n );\n }\n\n private _handleContentLayoutActivated = (\n args: ContentLayoutActivatedEventArgs\n ) => {\n const contentLayoutDef = args.contentLayout;\n const contentGroup = args.contentGroup;\n\n const contentNodes = contentGroup.getContentNodes();\n const contentContainer = contentLayoutDef.fillLayoutContainer(\n contentNodes,\n true\n );\n\n this.setState({\n contentLayoutDef: args.contentLayout,\n contentContainer,\n contentGroupId: contentGroup.groupId,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.state.contentContainer) {\n return (\n <div\n id=\"uifw-contentlayout-div\"\n className={this.props.className}\n style={this.props.style}\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\n onMouseDown={this._onMouseDown}\n onMouseUp={this._onMouseUp}\n role=\"presentation\"\n >\n {this.state.contentContainer}\n </div>\n );\n }\n\n return null;\n }\n\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(true);\n };\n\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\n UiFramework.content.setMouseDown(false);\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAItF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE;;GAEG;AACH,eAAO,MAAM,uBAAuB,yEAGhB,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,oDAAoD;IACpD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,2CAA2C;IAC3C,gBA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AClC,uBAAuB,EAAE,UAAU,EACnC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,GACZ,KAAK,CAAC,SAAS;IAIlB,+HAA+H;IAC/H,SAAS,CAAC,eAAe,OAAQ,cAAc,KAAG,MAAM,SAAS,CAS/D;IAEF,uEAAuE;IACvE,IAAoB,oBAAoB,IAAI,MAAM,CAGjD;CACF"}
|
|
@@ -66,6 +66,7 @@ class IModelViewportControl extends ViewportContentControl_1.ViewportContentCont
|
|
|
66
66
|
else
|
|
67
67
|
viewState = this._viewState;
|
|
68
68
|
}
|
|
69
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
69
70
|
else
|
|
70
71
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), "No ViewState could be determined");
|
|
71
72
|
return viewState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAQ/B,4EAAmE;AACnE,kDAAiD;AAGjD,0DAA6E;AAC7E,gDAA6C;AAC7C,6DAA0D;AAC1D,qEAAkE;AAClE,mGAAuG;AACvG,0DAAgD;AAChD,6CAA0C;AAG1C;;GAEG;AACU,QAAA,uBAAuB,GAAG,IAAA,mDAAmC,EACxE,IAAI,EACJ,IAAI,CACL,CAAC,2CAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AACvB,SAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,cAAc,EACd,mBAAmB,GACE;IACrB,MAAM,kBAAkB,GAAG,IAAA,yBAAW,EAAC,CAAC,KAAqB,EAAE,EAAE;QAC/D,MAAM,cAAc,GAAoB,KAAa,CACnD,yBAAW,CAAC,iBAAiB,CAC9B,CAAC;QACF,OAAO,cAAc;YACnB,CAAC,CAAC,cAAc,CAAC,mBAAmB,CAAC,kBAAkB;YACvD,CAA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AW,CAAC,WAAW,CAAC,mBAAmB,0CAAE,yBAAyB,CACpE,CAAC,CACF,CAAC;YACN,CAAC,EACD,cAAc,EAAE,IAAI,CAAC,eAAe,GACpC,CACH,CAAC;IACJ,CAAC;IAED,kFAAkF;IACxE,wBAAwB,CAChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,yBAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,yBAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oEAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AArKD,sDAqKC;AAED,yBAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState: FrameworkState = (state as any)[\n UiFramework.frameworkStateKey\n ];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n _options = _options ?? {};\n super(info, _options);\n this._options = _options;\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n } else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
|
|
1
|
+
{"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAQ/B,4EAAmE;AACnE,kDAAiD;AAGjD,0DAA6E;AAC7E,gDAA6C;AAC7C,6DAA0D;AAC1D,qEAAkE;AAClE,mGAAuG;AACvG,0DAAgD;AAChD,6CAA0C;AAG1C;;GAEG;AACU,QAAA,uBAAuB,GAAG,IAAA,mDAAmC,EACxE,IAAI,EACJ,IAAI,CACL,CAAC,2CAAiB,CAAC,CAAC;AA2BrB;;GAEG;AACH,uBAAuB;AACvB,SAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,cAAc,EACd,mBAAmB,GACE;IACrB,MAAM,kBAAkB,GAAG,IAAA,yBAAW,EAAC,CAAC,KAAqB,EAAE,EAAE;QAC/D,MAAM,cAAc,GAAoB,KAAa,CACnD,yBAAW,CAAC,iBAAiB,CAC9B,CAAC;QACF,OAAO,cAAc;YACnB,CAAC,CAAC,cAAc,CAAC,mBAAmB,CAAC,kBAAkB;YACvD,CAAC,CAAC,IAAI,CAAC;IACX,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,kBAAkB;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAC3B,oBAAC,KAAK,CAAC,QAAQ,QAAE,mBAAmB,CAAC,QAA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ChC,QAAsC;QAEtC,MAAM,SAAS,GAAG,yBAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,oBAAC,yBAAY;;YAAG,SAAS;gBAAiB,CAAC;IACpD,CAAC;IAED,uDAAuD;IACvC,oCAAoC,CAClD,gBAAkC,EAClC,uBAAmC,EACnC,SAAoB,EACpB,KAAa;QAEb,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAcD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAChD,OAAO,oEAAoC,CAAC,eAAe,CAAC;IACnE,CAAC;CACF;AAvKD,sDAuKC;AAED,yBAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport * as React from \"react\";\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type {\n IModelConnection,\n ScreenViewport,\n ViewState,\n} from \"@itwin/core-frontend\";\nimport type { ViewStateProp } from \"@itwin/imodel-components-react\";\nimport { ViewportComponent } from \"@itwin/imodel-components-react\";\nimport { FillCentered } from \"@itwin/core-react\";\n\nimport type { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\nimport { UiFramework } from \"../UiFramework\";\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\nimport { ViewportContentControl } from \"./ViewportContentControl\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { useSelector } from \"react-redux\";\nimport type { FrameworkState } from \"../redux/FrameworkState\";\n\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\n * @public\n */\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(\n null,\n null\n)(ViewportComponent);\n\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\n * @public\n */\nexport interface IModelViewportControlOptions {\n /** ViewState or a function to return a ViewState */\n viewState?: ViewStateProp;\n /** IModelConnection of data in Viewport */\n iModelConnection?: IModelConnection | (() => IModelConnection);\n /** Map of options that can be used to enable/disable features within the view */\n featureOptions?: { [key: string]: any };\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\n bgColor?: string;\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\n alwaysUseSuppliedViewState?: boolean;\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n /** Optional property to defer reactNode initialization until first reactNode property is needed. Useful when subclassing the `IModelViewportControl`. */\n deferNodeInitialization?: boolean;\n}\n\ninterface ViewOverlayHostProps {\n viewport: ScreenViewport;\n featureOptions?: { [key: string]: any };\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\n}\n/** View Overlay component -- exported for testing\n * @internal\n */\n// istanbul ignore next\nexport function ViewOverlayHost({\n viewport,\n featureOptions,\n userSuppliedOverlay,\n}: ViewOverlayHostProps) {\n const displayViewOverlay = useSelector((state: FrameworkState) => {\n const frameworkState: FrameworkState = (state as any)[\n UiFramework.frameworkStateKey\n ];\n return frameworkState\n ? frameworkState.configurableUiState.viewOverlayDisplay\n : true;\n });\n if (!displayViewOverlay) return null;\n return userSuppliedOverlay ? (\n <React.Fragment>{userSuppliedOverlay(viewport)}</React.Fragment>\n ) : (\n <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />\n );\n}\n/** iModel Viewport Control\n * @public\n */\n// istanbul ignore next\nexport class IModelViewportControl extends ViewportContentControl {\n public static get id() {\n return \"UiFramework.IModelViewportControl\";\n }\n protected _featureOptions: { [key: string]: boolean | string } = {};\n protected _viewState: ViewStateProp | undefined;\n protected _iModelConnection: IModelConnection | undefined;\n protected _alwaysUseSuppliedViewState: boolean;\n private _userSuppliedViewOverlay?: (\n _viewport: ScreenViewport\n ) => React.ReactNode;\n\n constructor(\n info: ConfigurableCreateInfo,\n protected _options: IModelViewportControlOptions\n ) {\n _options = _options ?? {};\n super(info, _options);\n this._options = _options;\n\n if (_options.featureOptions) this._featureOptions = _options.featureOptions;\n this._alwaysUseSuppliedViewState =\n _options.alwaysUseSuppliedViewState ?? false;\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\n\n if (!_options.deferNodeInitialization) this.initializeReactNode();\n }\n\n protected initializeReactNode() {\n const options = this._options;\n\n if (options.viewState) this._viewState = options.viewState;\n\n const iModelConnection =\n typeof options.iModelConnection === \"function\"\n ? options.iModelConnection()\n : options.iModelConnection;\n\n if (this._viewState && iModelConnection) {\n /** Passing _determineViewState as a function reference; it is not called here. */\n this._reactNode = this.getImodelViewportReactElement(\n iModelConnection,\n this._determineViewState\n );\n } else {\n if (\n UiFramework.getIModelConnection() &&\n UiFramework.getDefaultViewState()\n ) {\n this._reactNode = this.getImodelConnectedViewportReactElement();\n } else {\n this._reactNode = this.getNoContentReactElement(options);\n this.setIsReady();\n }\n }\n }\n\n protected override getReactNode(): React.ReactNode {\n if (\n !React.isValidElement(this._reactNode) &&\n this._options.deferNodeInitialization\n )\n this.initializeReactNode();\n\n return this.getKeyedReactNode();\n }\n\n /**\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\n * It is called by ViewportComponent on a mount to resolve the viewState.\n */\n private _determineViewState = (): ViewState => {\n let viewState: ViewState;\n\n if (this.viewport && !this._alwaysUseSuppliedViewState)\n viewState = this.viewport.view;\n else if (this._viewState) {\n if (typeof this._viewState === \"function\") viewState = this._viewState();\n else viewState = this._viewState;\n }\n // eslint-disable-next-line deprecation/deprecation\n else\n throw new UiError(\n UiFramework.loggerCategory(this),\n \"No ViewState could be determined\"\n );\n\n return viewState!;\n };\n\n /** Get the React component that will contain the Viewport */\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\n return (\n <IModelConnectedViewport\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will contain the Viewport */\n protected getImodelViewportReactElement(\n iModelConnection: IModelConnection,\n viewState: ViewStateProp\n ): React.ReactNode {\n return (\n <ViewportComponent\n viewState={viewState}\n imodel={iModelConnection}\n controlId={this.controlId}\n viewportRef={(v: ScreenViewport) => {\n this.viewport = v;\n // for convenience, if window defined bind viewport to window\n if (undefined !== window) (window as any).viewport = v;\n if (!UiFramework.frontstages.isLoading)\n UiFramework.frontstages.activeFrontstageDef?.setActiveViewFromViewport(\n v\n );\n }}\n getViewOverlay={this._getViewOverlay}\n />\n );\n }\n\n /** Get the React component that will be shown when no iModel data is available */\n protected getNoContentReactElement(\n _options: IModelViewportControlOptions\n ): React.ReactNode {\n const noContent = UiFramework.translate(\"general.no-content\");\n return <FillCentered> {noContent} </FillCentered>;\n }\n\n /** Get the React.Element for a ViewSelector change. */\n public override getReactElementForViewSelectorChange(\n iModelConnection: IModelConnection,\n _unusedViewDefinitionId: Id64String,\n viewState: ViewState,\n _name: string\n ): React.ReactNode {\n return this.getImodelViewportReactElement(iModelConnection, viewState);\n }\n\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\n return (\n <ViewOverlayHost\n viewport={vp}\n featureOptions={this._featureOptions}\n userSuppliedOverlay={this._userSuppliedViewOverlay}\n data-testid=\"ViewOverlay\"\n />\n );\n };\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public override get navigationAidControl(): string {\n if (this.viewport) return super.navigationAidControl;\n else return StandardRotationNavigationAidControl.navigationAidId;\n }\n}\n\nUiFramework.controls.register(IModelViewportControl.id, IModelViewportControl);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAK9E,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF;;GAEG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAkB;IAC3C,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAkB;IAEhD,yCAAyC;IACzC,gBAAuB,uBAAuB,wBAA+B;IAE7E,wDAAwD;IACxD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED,oDAAoD;WACtC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAKpD,6CAA6C;IAC7C,gBAAuB,2BAA2B,4BAChB;IAElC,wDAAwD;
|
|
1
|
+
{"version":3,"file":"InternalContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE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AAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,yBAAyB,CACrC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAK3E;;;OAGG;WACW,qBAAqB,CACjC,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO;IAKV;;;OAGG;IACH,WAAkB,OAAO,wCAExB;IACD;;;OAGG;IACH,WAAkB,OAAO,wCAExB;CACF"}
|
|
@@ -211,6 +211,7 @@ InternalContentViewManager.onMouseDownChangedEvent = new FrameworkContent_1.Mous
|
|
|
211
211
|
/** Gets the [[ActiveContentChangedEvent]] */
|
|
212
212
|
InternalContentViewManager.onActiveContentChangedEvent = new FrameworkContent_1.ActiveContentChangedEvent();
|
|
213
213
|
/** Fires when floating contents are added or removed */
|
|
214
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
214
215
|
InternalContentViewManager.onAvailableContentChangedEvent = new appui_abstract_1.UiEvent();
|
|
215
216
|
exports.InternalContentViewManager = InternalContentViewManager;
|
|
216
217
|
//# sourceMappingURL=InternalContentViewManager.js.map
|
|
@@ -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,S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,CAAC;QAChD,OAAO,6BAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CACjC,OAAmC;QAEnC,IAAI,CAAC,OAAO,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"]}
|
|
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;IAaD,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,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,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,MAAM,GAAG,GAAI,OAAmC,CAAC,GA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,wBAAO,EAE/D,CAAC;AA3BM,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 // eslint-disable-next-line deprecation/deprecation\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,OAAS;IACZ,IAAI,MAAS;IACb,KAAK,KAAS;IACd,MAAM,IAAS;CAChB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,IAAI;IACR,GAAG,OAA2B;IAC9B,IAAI,MAA4B;IAChC,KAAK,KAA6B;IAClC,MAAM,IAA8B;IACpC,OAAO,OAAuD;IAC9D,QAAQ,OAAwD;IAChE,UAAU,MAA0D;IACpE,WAAW,KAA2D;CACvE;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;GAEG;
|
|
1
|
+
{"version":3,"file":"CursorInformation.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,OAAS;IACZ,IAAI,MAAS;IACb,KAAK,KAAS;IACd,MAAM,IAAS;CAChB;AAED;;GAEG;AACH,oBAAY,eAAe;IACzB,IAAI,IAAI;IACR,GAAG,OAA2B;IAC9B,IAAI,MAA4B;IAChC,KAAK,KAA6B;IAClC,MAAM,IAA8B;IACpC,OAAO,OAAuD;IAC9D,QAAQ,OAAwD;IAChE,UAAU,MAA0D;IACpE,WAAW,KAA2D;CACvE;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED;;GAEG;AAEH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,CAAC;CAAG;AAE1E;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAsB;IACpD,OAAO,CAAC,MAAM,CAAC,gBAAgB,CACD;IAE9B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAgC;IAEhE,2BAA2B;IAC3B,WAAkB,cAAc,IAAI,KAAK,CAExC;IACD,WAAkB,cAAc,CAAC,EAAE,EAAE,KAAK,EAEzC;IAED,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IACD,kCAAkC;IAClC,WAAkB,OAAO,IAAI,MAAM,CAElC;IAED,kDAAkD;IAClD,WAAkB,eAAe,IAAI,eAAe,CAEnD;IAED,uCAAuC;IACvC,gBAAuB,oBAAoB,qBAA4B;IAEvE,0GAA0G;WAC5F,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAcjD,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAW9C,OAAO,CAAC,MAAM,CAAC,aAAa;IAuB5B,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiBxC,gEAAgE;WAClD,sCAAsC,CAClD,eAAe,EAAE,eAAe,GAC/B,gBAAgB;IAiCnB,8BAA8B;WAChB,qBAAqB,IAAI,IAAI;CAG5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAkE;AAClE,kDAA0C;AAE1C;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,sDAA8B,CAAA;IAC9B,uDAAgC,CAAA;IAChC,wDAAkC,CAAA;IAClC,yDAAoC,CAAA;IACpC,8DAA8D,CAAA;IAC9D,gEAAgE,CAAA;IAChE,mEAAoE,CAAA;IACpE,oEAAsE,CAAA;AACxE,CAAC,EAVW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAU1B;AAWD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;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EAAmB,CAAC;AAwBhE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AA9B5D,8CAAiB","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 Cursor\n */\n\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: XAndY;\n newPt: XAndY;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n */\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): XAndY {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: XAndY) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: XAndY): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CursorInformation.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/CursorInformation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAkE;AAClE,kDAA0C;AAE1C;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,gEAAY,CAAA;IACZ,iEAAa,CAAA;IACb,kEAAc,CAAA;IACd,mEAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,sDAA8B,CAAA;IAC9B,uDAAgC,CAAA;IAChC,wDAAkC,CAAA;IAClC,yDAAoC,CAAA;IACpC,8DAA8D,CAAA;IAC9D,gEAAgE,CAAA;IAChE,mEAAoE,CAAA;IACpE,oEAAsE,CAAA;AACxE,CAAC,EAVW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAU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AE,CAAC;AACrC,kCAAgB,GAC7B,eAAe,CAAC,WAAW,CAAC;AAEf,mCAAiB,GAAG,IAAI,KAAK,EAAmB,CAAC;AAwBhE,uCAAuC;AAChB,sCAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AA9B5D,8CAAiB","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 Cursor\n */\n\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport { RelativePosition, UiEvent } from \"@itwin/appui-abstract\";\nimport { Point } from \"@itwin/core-react\";\n\n/** Enum for Cursor Direction parts\n * @public\n */\nexport enum CursorDirectionParts {\n Top = 0x1000,\n Left = 0x0100,\n Right = 0x0010,\n Bottom = 0x0001,\n}\n\n/** Enum for Cursor Direction\n * @public\n */\nexport enum CursorDirection {\n None = 0,\n Top = CursorDirectionParts.Top,\n Left = CursorDirectionParts.Left,\n Right = CursorDirectionParts.Right,\n Bottom = CursorDirectionParts.Bottom,\n TopLeft = CursorDirectionParts.Top | CursorDirectionParts.Left,\n TopRight = CursorDirectionParts.Top | CursorDirectionParts.Right,\n BottomLeft = CursorDirectionParts.Bottom | CursorDirectionParts.Left,\n BottomRight = CursorDirectionParts.Bottom | CursorDirectionParts.Right,\n}\n\n/** Cursor Updated Event Args interface.\n * @public\n */\nexport interface CursorUpdatedEventArgs {\n oldPt: XAndY;\n newPt: XAndY;\n direction: CursorDirection;\n}\n\n/** Cursor Updated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class CursorUpdatedEvent extends UiEvent<CursorUpdatedEventArgs> {}\n\n/** Cursor Information class\n * @public\n */\nexport class CursorInformation {\n private static _cursorPosition: Point = new Point();\n private static _cursorDirection: CursorDirection =\n CursorDirection.BottomRight;\n\n private static _cursorDirections = new Array<CursorDirection>();\n\n /** The cursor position. */\n public static get cursorPosition(): XAndY {\n return this._cursorPosition;\n }\n public static set cursorPosition(pt: XAndY) {\n this._cursorPosition = Point.create(pt);\n }\n\n /** Gets the cursor X position. */\n public static get cursorX(): number {\n return this._cursorPosition.x;\n }\n /** Gets the cursor Y position. */\n public static get cursorY(): number {\n return this._cursorPosition.y;\n }\n\n /** Gets the general cursor movement direction. */\n public static get cursorDirection(): CursorDirection {\n return this._cursorDirection;\n }\n\n /** Gets the [[CursorUpdatedEvent]]. */\n public static readonly onCursorUpdatedEvent = new CursorUpdatedEvent();\n\n /** Handles the mouse movement. Sets the cursor position and direction and emits onCursorUpdatedEvent. */\n public static handleMouseMove(point: XAndY): void {\n const oldPt = CursorInformation.cursorPosition;\n const direction = this._determineMostFrequentDirection(\n this._cursorDirections,\n this._cursorPosition,\n Point.create(point)\n );\n\n this.cursorPosition = point;\n this._cursorDirection = direction;\n\n this.onCursorUpdatedEvent.emit({ oldPt, newPt: point, direction });\n }\n\n private static _determineMostFrequentDirection(\n cursorDirections: CursorDirection[],\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n const cursorDirection = this._determineCursorDirection(oldPt, newPt);\n cursorDirections.push(cursorDirection);\n if (cursorDirections.length > 10) cursorDirections.shift();\n return this._mostFrequent(cursorDirections);\n }\n\n private static _mostFrequent(array: CursorDirection[]): CursorDirection {\n const hashMap = new Map<CursorDirection, number>();\n let maxCount = 0,\n mostFrequent = CursorDirection.None;\n\n array.forEach((value: CursorDirection) => {\n const key = value;\n let frequency = hashMap.get(key);\n\n if (frequency !== undefined) frequency++;\n else frequency = 1;\n\n hashMap.set(key, frequency);\n\n if (frequency > maxCount) {\n mostFrequent = key;\n maxCount = frequency;\n }\n });\n\n return mostFrequent;\n }\n\n private static _determineCursorDirection(\n oldPt: Point,\n newPt: Point\n ): CursorDirection {\n let directionParts: number = 0;\n\n if (newPt.x < oldPt.x) directionParts |= CursorDirectionParts.Left;\n else if (newPt.x > oldPt.x) directionParts |= CursorDirectionParts.Right;\n\n if (newPt.y < oldPt.y) directionParts |= CursorDirectionParts.Top;\n else if (newPt.y > oldPt.y) directionParts |= CursorDirectionParts.Bottom;\n\n const direction = directionParts as CursorDirection;\n\n return direction;\n }\n\n /** Gets the relative position based on the cursor direction. */\n public static getRelativePositionFromCursorDirection(\n cursorDirection: CursorDirection\n ): RelativePosition {\n let relativePosition: RelativePosition = RelativePosition.BottomRight;\n\n switch (cursorDirection) {\n case CursorDirection.Top:\n relativePosition = RelativePosition.Top;\n break;\n case CursorDirection.Left:\n relativePosition = RelativePosition.Left;\n break;\n case CursorDirection.Right:\n relativePosition = RelativePosition.Right;\n break;\n case CursorDirection.Bottom:\n relativePosition = RelativePosition.Bottom;\n break;\n case CursorDirection.TopLeft:\n relativePosition = RelativePosition.TopLeft;\n break;\n case CursorDirection.TopRight:\n relativePosition = RelativePosition.TopRight;\n break;\n case CursorDirection.BottomLeft:\n relativePosition = RelativePosition.BottomLeft;\n break;\n case CursorDirection.BottomRight:\n relativePosition = RelativePosition.BottomRight;\n break;\n }\n\n return relativePosition;\n }\n\n /** @internal - for testing */\n public static clearCursorDirections(): void {\n this._cursorDirections.length = 0;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursorPopupManager.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,EAAE,EAAE,KAAK,CAAC;CACX;AAED;;GAEG;
|
|
1
|
+
{"version":3,"file":"CursorPopupManager.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/cursor/cursorpopup/CursorPopupManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,EAAE,EAAE,KAAK,CAAC;CACX;AAED;;GAEG;AAEH,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,kCAAkC,CAAC;CAAG;AAElG;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AAEH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,2BAA2B,CAAC;CAAG;AAEpF;;GAEG;AACH,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,gBAAgB,E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AC,MAAM,CAAC,iCAAiC;IAgBhD,OAAO,CAAC,MAAM,CAAC,8BAA8B;IAsB7C,OAAO,CAAC,MAAM,CAAC,QAAQ;CA+ExB;AAED,4DAA4D;AAC5D,UAAU,wBAAwB;IAChC,EAAE,EAAE,KAAK,CAAC;CACX;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CACtD,GAAG,EACH,wBAAwB,CACzB;gBACa,KAAK,EAAE,GAAG;IAQN,MAAM,IAAI,KAAK,CAAC,SAAS;IAMzC,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,sBAAsB;IAmE9B,OAAO,CAAC,YAAY;IAwBpB,OAAO,CAAC,YAAY;IAyBJ,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IAS5C,OAAO,CAAC,wBAAwB,CAE9B;IAEF,OAAO,CAAC,qCAAqC,CAI3C;CACH"}
|
|
@@ -17,18 +17,21 @@ const CursorPopup_1 = require("./CursorPopup");
|
|
|
17
17
|
/** CursorPopup Update Position Event class.
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
20
21
|
class CursorPopupUpdatePositionEvent extends appui_abstract_1.UiEvent {
|
|
21
22
|
}
|
|
22
23
|
exports.CursorPopupUpdatePositionEvent = CursorPopupUpdatePositionEvent;
|
|
23
24
|
/** CursorPopup FadeOut Event class.
|
|
24
25
|
* @internal
|
|
25
26
|
*/
|
|
27
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
26
28
|
class CursorPopupFadeOutEvent extends appui_abstract_1.UiEvent {
|
|
27
29
|
}
|
|
28
30
|
exports.CursorPopupFadeOutEvent = CursorPopupFadeOutEvent;
|
|
29
31
|
/** Cursor Popups Changed Event class.
|
|
30
32
|
* @internal
|
|
31
33
|
*/
|
|
34
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
32
35
|
class CursorPopupsChangedEvent extends appui_abstract_1.UiEvent {
|
|
33
36
|
}
|
|
34
37
|
/** CursorPopup component
|