@itwin/appui-react 4.8.1 → 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 +8 -7
- 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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Frontstage
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.useItemsManager = exports.useFrontstageManager = exports.getFrontstageStateSettingName = exports.FRONTSTAGE_SETTINGS_NAMESPACE = exports.useSaveFrontstageSettings = exports.useSavedFrontstageState = exports.
|
|
10
|
+
exports.useItemsManager = exports.useFrontstageManager = exports.getFrontstageStateSettingName = exports.FRONTSTAGE_SETTINGS_NAMESPACE = exports.useSaveFrontstageSettings = exports.useSavedFrontstageState = exports.packNineZoneState = exports.restoreNineZoneState = exports.initializeNineZoneState = exports.stateVersion = exports.initializePanel = exports.isFrontstageStateSettingResult = exports.getPanelSectionWidgets = exports.getPanelSectionId = exports.addFrontstageWidgetDefs = exports.addPanelSectionWidgetDefs = exports.useLabels = exports.ActiveFrontstageDefProvider = exports.WidgetPanelsFrontstage = exports.useNineZoneDispatch = exports.useUpdateNineZoneSize = exports.useLayoutStore = void 0;
|
|
11
11
|
// cSpell:ignore popout
|
|
12
12
|
require("./Frontstage.scss");
|
|
13
13
|
const immer_1 = require("immer");
|
|
@@ -40,6 +40,7 @@ const StagePanelLocation_1 = require("../stagepanels/StagePanelLocation");
|
|
|
40
40
|
const UiItemsManager_1 = require("../ui-items-provider/UiItemsManager");
|
|
41
41
|
const PreviewFeatures_1 = require("../preview/PreviewFeatures");
|
|
42
42
|
const classnames_1 = require("classnames");
|
|
43
|
+
const StagePanelState_1 = require("../stagepanels/StagePanelState");
|
|
43
44
|
function WidgetPanelsFrontstageComponent() {
|
|
44
45
|
const activeModalFrontstageInfo = (0, ModalFrontstageComposer_1.useActiveModalFrontstageInfo)();
|
|
45
46
|
const uiIsVisible = (0, useUiVisibility_1.useUiVisibility)();
|
|
@@ -87,8 +88,7 @@ exports.useLayoutStore = useLayoutStore;
|
|
|
87
88
|
function useUpdateNineZoneSize(frontstageDef) {
|
|
88
89
|
React.useEffect(() => {
|
|
89
90
|
const size = InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize;
|
|
90
|
-
|
|
91
|
-
if (!size || !state)
|
|
91
|
+
if (!size)
|
|
92
92
|
return;
|
|
93
93
|
frontstageDef.dispatch({
|
|
94
94
|
type: "RESIZE",
|
|
@@ -100,15 +100,30 @@ function useUpdateNineZoneSize(frontstageDef) {
|
|
|
100
100
|
}, [frontstageDef]);
|
|
101
101
|
}
|
|
102
102
|
exports.useUpdateNineZoneSize = useUpdateNineZoneSize;
|
|
103
|
+
const log = (reducer) => (state, action) => {
|
|
104
|
+
core_bentley_1.Logger.logTrace("appui-react:reducer", `action ${action.type}`, () => ({
|
|
105
|
+
action,
|
|
106
|
+
state,
|
|
107
|
+
}));
|
|
108
|
+
return reducer(state, action);
|
|
109
|
+
};
|
|
103
110
|
/** @internal */
|
|
104
111
|
function useNineZoneDispatch(frontstageDef) {
|
|
105
|
-
|
|
112
|
+
const reducer = React.useMemo(() => log(appui_layout_react_1.NineZoneStateReducer), []);
|
|
113
|
+
return React.useCallback((action) => {
|
|
114
|
+
if (action.type === "RESIZE") {
|
|
115
|
+
InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize = core_react_1.Size.create(action.size);
|
|
116
|
+
}
|
|
117
|
+
const state = frontstageDef.nineZoneState;
|
|
118
|
+
if (!state)
|
|
119
|
+
return;
|
|
120
|
+
frontstageDef.nineZoneState = reducer(state, action);
|
|
121
|
+
}, [frontstageDef, reducer]);
|
|
106
122
|
}
|
|
107
123
|
exports.useNineZoneDispatch = useNineZoneDispatch;
|
|
108
124
|
/** @internal */
|
|
109
125
|
function WidgetPanelsFrontstage() {
|
|
110
126
|
const frontstageDef = (0, FrontstageDef_1.useActiveFrontstageDef)();
|
|
111
|
-
const layout = useLayoutStore(frontstageDef);
|
|
112
127
|
React.useEffect(() => {
|
|
113
128
|
const triggerWidowCloseProcessing = () => {
|
|
114
129
|
frontstageDef && frontstageDef.setIsApplicationClosing(true);
|
|
@@ -120,15 +135,17 @@ function WidgetPanelsFrontstage() {
|
|
|
120
135
|
}, [frontstageDef]);
|
|
121
136
|
if (!frontstageDef)
|
|
122
137
|
return null;
|
|
123
|
-
return
|
|
138
|
+
return React.createElement(ActiveFrontstageDefProvider, { frontstageDef: frontstageDef });
|
|
124
139
|
}
|
|
125
140
|
exports.WidgetPanelsFrontstage = WidgetPanelsFrontstage;
|
|
126
141
|
const defaultNineZone = (0, appui_layout_react_1.createNineZoneState)();
|
|
127
142
|
const tabElement = React.createElement(Tab_1.WidgetPanelsTab, null);
|
|
128
143
|
const floatingWidgetElement = React.createElement(FloatingWidget_1.FloatingWidget, null);
|
|
129
144
|
/** @internal */
|
|
130
|
-
function ActiveFrontstageDefProvider({ frontstageDef,
|
|
145
|
+
function ActiveFrontstageDefProvider({ frontstageDef, }) {
|
|
131
146
|
const dispatch = useNineZoneDispatch(frontstageDef);
|
|
147
|
+
frontstageDef.dispatch = dispatch;
|
|
148
|
+
const layout = useLayoutStore(frontstageDef);
|
|
132
149
|
useUpdateNineZoneSize(frontstageDef);
|
|
133
150
|
useSavedFrontstageState(frontstageDef);
|
|
134
151
|
useSaveFrontstageSettings(frontstageDef, layout);
|
|
@@ -187,186 +204,118 @@ function toTabArgs(widget) {
|
|
|
187
204
|
};
|
|
188
205
|
return args;
|
|
189
206
|
}
|
|
190
|
-
|
|
191
|
-
function addWidgets(state, widgets, side, widgetId) {
|
|
192
|
-
const visibleWidgets = widgets.filter((w) => w.isVisible && w.defaultState !== WidgetState_1.WidgetState.Floating);
|
|
193
|
-
if (visibleWidgets.length === 0)
|
|
194
|
-
return state;
|
|
195
|
-
const tabs = new Array();
|
|
196
|
-
for (const widget of visibleWidgets) {
|
|
197
|
-
state = (0, appui_layout_react_1.addTab)(state, widget.id, toTabArgs(widget));
|
|
198
|
-
tabs.push(widget.id);
|
|
199
|
-
}
|
|
200
|
-
const activeWidget = visibleWidgets.find((widget) => widget.isActive);
|
|
201
|
-
const minimized = false;
|
|
202
|
-
// istanbul ignore else
|
|
203
|
-
if ((activeWidget === null || activeWidget === void 0 ? void 0 : activeWidget.defaultState) !== WidgetState_1.WidgetState.Floating) {
|
|
204
|
-
state = (0, appui_layout_react_1.addPanelWidget)(state, side, widgetId, tabs, {
|
|
205
|
-
activeTabId: activeWidget ? activeWidget.id : tabs[0],
|
|
206
|
-
minimized,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
return state;
|
|
210
|
-
}
|
|
211
|
-
exports.addWidgets = addWidgets;
|
|
212
|
-
/** @internal */
|
|
213
|
-
// istanbul ignore next
|
|
214
|
-
function appendWidgets(state, widgetDefs, location, section) {
|
|
207
|
+
function addWidgetDef(frontstageDef, widgetDef, location, section) {
|
|
215
208
|
const side = (0, StagePanelDef_1.toPanelSide)(location);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
const userSized = saveTab
|
|
227
|
-
? saveTab.userSized ||
|
|
228
|
-
(!!widgetDef.defaultFloatingSize &&
|
|
229
|
-
!!saveTab.preferredFloatingWidgetSize)
|
|
230
|
-
: !!widgetDef.defaultFloatingSize;
|
|
231
|
-
state = (0, appui_layout_react_1.addTab)(state, widgetDef.id, {
|
|
209
|
+
const isFloatingWidget = widgetDef.isFloatingStateSupported &&
|
|
210
|
+
widgetDef.defaultState === WidgetState_1.WidgetState.Floating;
|
|
211
|
+
const floatingWidgetId = widgetDef.floatingContainerId
|
|
212
|
+
? widgetDef.floatingContainerId
|
|
213
|
+
: (0, appui_layout_react_1.getUniqueId)();
|
|
214
|
+
const userSized = !!widgetDef.defaultFloatingSize;
|
|
215
|
+
frontstageDef.dispatch({
|
|
216
|
+
type: "WIDGET_DEF_ADD",
|
|
217
|
+
id: widgetDef.id,
|
|
218
|
+
overrides: {
|
|
232
219
|
...toTabArgs(widgetDef),
|
|
233
|
-
preferredFloatingWidgetSize,
|
|
234
|
-
preferredPanelWidgetSize,
|
|
235
220
|
userSized,
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
const nzBounds = core_react_1.Rectangle.createFromSize(state.size);
|
|
263
|
-
const bounds = core_react_1.Rectangle.createFromSize(size).offset(preferredPoint);
|
|
264
|
-
const containedBounds = bounds.containIn(nzBounds);
|
|
265
|
-
state = (0, appui_layout_react_1.addFloatingWidget)(state, floatingContainerId, [widgetDef.id], {
|
|
266
|
-
bounds: containedBounds.toProps(),
|
|
267
|
-
home: {
|
|
268
|
-
widgetId: widgetContainerId,
|
|
269
|
-
side,
|
|
270
|
-
widgetIndex: 0,
|
|
271
|
-
},
|
|
272
|
-
userSized,
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
const preferredWidgetIndex = section;
|
|
278
|
-
const widgetPanelSectionId = (0, appui_layout_react_1.getWidgetPanelSectionId)(side, preferredWidgetIndex);
|
|
279
|
-
if (widgetPanelSectionId in state.widgets) {
|
|
280
|
-
state = (0, appui_layout_react_1.addTabToWidget)(state, widgetDef.id, widgetPanelSectionId);
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
const panel = state.panels[side];
|
|
284
|
-
if (panel.widgets.length < panel.maxWidgetCount) {
|
|
285
|
-
state = (0, appui_layout_react_1.addPanelWidget)(state, side, widgetPanelSectionId, [
|
|
286
|
-
widgetDef.id,
|
|
287
|
-
]);
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
const widgetIndex = Math.min(preferredWidgetIndex, panel.widgets.length - 1);
|
|
291
|
-
const widgetId = panel.widgets[widgetIndex];
|
|
292
|
-
state = (0, appui_layout_react_1.addTabToWidget)(state, widgetDef.id, widgetId);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if (widgetDef.defaultState === WidgetState_1.WidgetState.Hidden) {
|
|
297
|
-
state = (0, appui_layout_react_1.NineZoneStateReducer)(state, {
|
|
298
|
-
type: "WIDGET_TAB_HIDE",
|
|
299
|
-
id: widgetDef.id,
|
|
300
|
-
});
|
|
301
|
-
}
|
|
221
|
+
},
|
|
222
|
+
location: isFloatingWidget ? "floating" : "panel",
|
|
223
|
+
floatingWidget: {
|
|
224
|
+
id: floatingWidgetId,
|
|
225
|
+
preferredPosition: widgetDef.defaultFloatingPosition,
|
|
226
|
+
},
|
|
227
|
+
panelSection: {
|
|
228
|
+
id: (0, appui_layout_react_1.getWidgetPanelSectionId)(side, section),
|
|
229
|
+
side,
|
|
230
|
+
index: section,
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
// Hide widget if `defaultState` is `Hidden` or `Unloaded`.
|
|
234
|
+
hideWidgetDef(frontstageDef, widgetDef);
|
|
235
|
+
}
|
|
236
|
+
/** Adds missing widgets to the layout.
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
function addPanelSectionWidgetDefs(frontstageDef, location, section) {
|
|
240
|
+
const panelDef = frontstageDef.getStagePanelDef(location);
|
|
241
|
+
if (!panelDef)
|
|
242
|
+
return;
|
|
243
|
+
const sectionDef = panelDef.getPanelSectionDef(section);
|
|
244
|
+
const widgetDefs = determineNewWidgets(frontstageDef, sectionDef.widgetDefs);
|
|
245
|
+
for (const widgetDef of widgetDefs) {
|
|
246
|
+
addWidgetDef(frontstageDef, widgetDef, location, section);
|
|
302
247
|
}
|
|
303
|
-
return state;
|
|
304
248
|
}
|
|
305
|
-
exports.
|
|
306
|
-
function processPopoutWidgets(
|
|
249
|
+
exports.addPanelSectionWidgetDefs = addPanelSectionWidgetDefs;
|
|
250
|
+
function processPopoutWidgets(frontstageDef) {
|
|
307
251
|
// Electron reopens popout windows w/o user interaction.
|
|
308
252
|
if (core_bentley_1.ProcessDetector.isElectronAppFrontend) {
|
|
309
|
-
return
|
|
253
|
+
return;
|
|
310
254
|
}
|
|
311
|
-
|
|
255
|
+
(0, core_bentley_1.assert)(!!frontstageDef.nineZoneState);
|
|
256
|
+
const state = frontstageDef.nineZoneState;
|
|
312
257
|
for (const id of state.popoutWidgets.allIds) {
|
|
313
|
-
|
|
258
|
+
frontstageDef.dispatch({
|
|
314
259
|
type: "POPOUT_WIDGET_SEND_BACK",
|
|
315
260
|
id,
|
|
316
261
|
});
|
|
317
262
|
}
|
|
318
|
-
return state;
|
|
319
263
|
}
|
|
320
264
|
/** Adds frontstageDef widgets that are missing in NineZoneState.
|
|
321
265
|
* @internal
|
|
322
266
|
*/
|
|
323
|
-
function
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
state = (0, appui_layout_react_1.addTab)(state, newToolSettingsWidget.id, toTabArgs(newToolSettingsWidget));
|
|
338
|
-
}
|
|
267
|
+
function addFrontstageWidgetDefs(frontstageDef) {
|
|
268
|
+
[
|
|
269
|
+
StagePanelLocation_1.StagePanelLocation.Left,
|
|
270
|
+
StagePanelLocation_1.StagePanelLocation.Right,
|
|
271
|
+
StagePanelLocation_1.StagePanelLocation.Top,
|
|
272
|
+
StagePanelLocation_1.StagePanelLocation.Bottom,
|
|
273
|
+
].forEach((location) => [StagePanelSection_1.StagePanelSection.Start, StagePanelSection_1.StagePanelSection.End].forEach((section) => addPanelSectionWidgetDefs(frontstageDef, location, section)));
|
|
274
|
+
const toolSettingsWidgetDefs = determineNewWidgets(frontstageDef, frontstageDef.toolSettings ? [frontstageDef.toolSettings] : undefined);
|
|
275
|
+
for (const toolSettingsWidgetDef of toolSettingsWidgetDefs) {
|
|
276
|
+
frontstageDef.dispatch({
|
|
277
|
+
type: "WIDGET_DEF_ADD_TOOL_SETTINGS",
|
|
278
|
+
id: toolSettingsWidgetDef.id,
|
|
279
|
+
overrides: toTabArgs(toolSettingsWidgetDef),
|
|
280
|
+
});
|
|
339
281
|
}
|
|
340
|
-
return state;
|
|
341
282
|
}
|
|
342
|
-
exports.
|
|
343
|
-
/** Hide widgets with Hidden defaultState. */
|
|
344
|
-
function
|
|
283
|
+
exports.addFrontstageWidgetDefs = addFrontstageWidgetDefs;
|
|
284
|
+
/** Hide widgets with `Hidden` or `Unloaded` defaultState. */
|
|
285
|
+
function hideWidgetDefs(frontstageDef) {
|
|
286
|
+
(0, core_bentley_1.assert)(!!frontstageDef.nineZoneState);
|
|
287
|
+
const state = frontstageDef.nineZoneState;
|
|
345
288
|
const tabs = Object.values(state.tabs);
|
|
346
289
|
for (const tab of tabs) {
|
|
347
290
|
const widgetDef = frontstageDef.findWidgetDef(tab.id);
|
|
348
291
|
if (!widgetDef)
|
|
349
292
|
continue;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
293
|
+
hideWidgetDef(frontstageDef, widgetDef);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/** Hide widget with `Hidden` or `Unloaded` defaultState. */
|
|
297
|
+
function hideWidgetDef(frontstageDef, widgetDef) {
|
|
298
|
+
if (widgetDef.defaultState === WidgetState_1.WidgetState.Hidden) {
|
|
299
|
+
frontstageDef.dispatch({
|
|
300
|
+
type: "WIDGET_TAB_HIDE",
|
|
301
|
+
id: widgetDef.id,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if (widgetDef.defaultState === WidgetState_1.WidgetState.Unloaded) {
|
|
305
|
+
frontstageDef.dispatch({
|
|
306
|
+
type: "WIDGET_TAB_UNLOAD",
|
|
307
|
+
id: widgetDef.id,
|
|
308
|
+
});
|
|
362
309
|
}
|
|
363
|
-
return state;
|
|
364
310
|
}
|
|
365
311
|
/** Removes NineZoneState widgets that are missing in frontstageDef.
|
|
366
312
|
* @internal
|
|
367
313
|
*/
|
|
368
|
-
function removeMissingWidgets(frontstageDef
|
|
314
|
+
function removeMissingWidgets(frontstageDef) {
|
|
369
315
|
var _a;
|
|
316
|
+
const state = frontstageDef.nineZoneState;
|
|
317
|
+
if (!state)
|
|
318
|
+
return;
|
|
370
319
|
const toolSettingsTabId = (_a = state.toolSettings) === null || _a === void 0 ? void 0 : _a.tabId;
|
|
371
320
|
for (const [, tab] of Object.entries(state.tabs)) {
|
|
372
321
|
if (tab.id === toolSettingsTabId)
|
|
@@ -374,43 +323,20 @@ function removeMissingWidgets(frontstageDef, state) {
|
|
|
374
323
|
const widgetDef = frontstageDef.findWidgetDef(tab.id);
|
|
375
324
|
if (widgetDef)
|
|
376
325
|
continue;
|
|
377
|
-
|
|
378
|
-
type: "
|
|
326
|
+
frontstageDef.dispatch({
|
|
327
|
+
type: "WIDGET_TAB_REMOVE",
|
|
379
328
|
id: tab.id,
|
|
380
329
|
});
|
|
381
|
-
state = (0, appui_layout_react_1.removeTab)(state, tab.id);
|
|
382
330
|
}
|
|
383
|
-
return state;
|
|
384
331
|
}
|
|
385
332
|
function getWidgetLabel(label) {
|
|
386
333
|
return label === "" ? "Widget" : label;
|
|
387
334
|
}
|
|
388
335
|
/** @internal */
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
case StagePanelLocation_1.StagePanelLocation.Left: {
|
|
392
|
-
if (section === StagePanelSection_1.StagePanelSection.Start)
|
|
393
|
-
return "leftStart";
|
|
394
|
-
return "leftEnd";
|
|
395
|
-
}
|
|
396
|
-
case StagePanelLocation_1.StagePanelLocation.Right: {
|
|
397
|
-
if (section === StagePanelSection_1.StagePanelSection.Start)
|
|
398
|
-
return "rightStart";
|
|
399
|
-
return "rightEnd";
|
|
400
|
-
}
|
|
401
|
-
case StagePanelLocation_1.StagePanelLocation.Top: {
|
|
402
|
-
if (section === StagePanelSection_1.StagePanelSection.Start)
|
|
403
|
-
return "topStart";
|
|
404
|
-
return "topEnd";
|
|
405
|
-
}
|
|
406
|
-
case StagePanelLocation_1.StagePanelLocation.Bottom: {
|
|
407
|
-
if (section === StagePanelSection_1.StagePanelSection.Start)
|
|
408
|
-
return "bottomStart";
|
|
409
|
-
return "bottomEnd";
|
|
410
|
-
}
|
|
411
|
-
}
|
|
336
|
+
function getPanelSectionId(location, section) {
|
|
337
|
+
return `${StagePanelLocation_1.StagePanelLocation[location].toLowerCase()}${StagePanelSection_1.StagePanelSection[section]}`;
|
|
412
338
|
}
|
|
413
|
-
exports.
|
|
339
|
+
exports.getPanelSectionId = getPanelSectionId;
|
|
414
340
|
/** @internal */
|
|
415
341
|
function getPanelSectionWidgets(frontstageDef, location, section) {
|
|
416
342
|
const stagePanel = frontstageDef.getStagePanelDef(location);
|
|
@@ -419,18 +345,6 @@ function getPanelSectionWidgets(frontstageDef, location, section) {
|
|
|
419
345
|
}
|
|
420
346
|
exports.getPanelSectionWidgets = getPanelSectionWidgets;
|
|
421
347
|
/** @internal */
|
|
422
|
-
function addPanelWidgets(state, frontstageDef, location) {
|
|
423
|
-
const side = (0, StagePanelDef_1.toPanelSide)(location);
|
|
424
|
-
const start = getWidgetId(location, StagePanelSection_1.StagePanelSection.Start);
|
|
425
|
-
const startWidgets = getPanelSectionWidgets(frontstageDef, location, StagePanelSection_1.StagePanelSection.Start);
|
|
426
|
-
state = addWidgets(state, determineNewWidgets(startWidgets, state), side, start);
|
|
427
|
-
const end = getWidgetId(location, StagePanelSection_1.StagePanelSection.End);
|
|
428
|
-
const endWidgets = getPanelSectionWidgets(frontstageDef, location, StagePanelSection_1.StagePanelSection.End);
|
|
429
|
-
state = addWidgets(state, determineNewWidgets(endWidgets, state), side, end);
|
|
430
|
-
return state;
|
|
431
|
-
}
|
|
432
|
-
exports.addPanelWidgets = addPanelWidgets;
|
|
433
|
-
/** @internal */
|
|
434
348
|
function isFrontstageStateSettingResult(settingsResult) {
|
|
435
349
|
if (settingsResult.status === core_react_1.UiStateStorageStatus.Success)
|
|
436
350
|
return true;
|
|
@@ -438,70 +352,70 @@ function isFrontstageStateSettingResult(settingsResult) {
|
|
|
438
352
|
}
|
|
439
353
|
exports.isFrontstageStateSettingResult = isFrontstageStateSettingResult;
|
|
440
354
|
/** @internal */
|
|
441
|
-
function initializePanel(
|
|
355
|
+
function initializePanel(frontstageDef, location) {
|
|
356
|
+
var _a, _b;
|
|
442
357
|
const side = (0, StagePanelDef_1.toPanelSide)(location);
|
|
443
|
-
state = addPanelWidgets(state, frontstageDef, location);
|
|
444
358
|
const panelDef = frontstageDef.getStagePanelDef(location);
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
panel.resizable = (_d = panelDef === null || panelDef === void 0 ? void 0 : panelDef.resizable) !== null && _d !== void 0 ? _d : panel.resizable;
|
|
451
|
-
panel.maxSize = (_f = (_e = panelDef === null || panelDef === void 0 ? void 0 : panelDef.initialConfig) === null || _e === void 0 ? void 0 : _e.maxSize) !== null && _f !== void 0 ? _f : panel.maxSize;
|
|
452
|
-
});
|
|
453
|
-
if ((panelDef === null || panelDef === void 0 ? void 0 : panelDef.size) !== undefined) {
|
|
454
|
-
state = (0, appui_layout_react_1.NineZoneStateReducer)(state, {
|
|
359
|
+
if (!panelDef)
|
|
360
|
+
return;
|
|
361
|
+
const size = panelDef.defaultSize;
|
|
362
|
+
size !== undefined &&
|
|
363
|
+
frontstageDef.dispatch({
|
|
455
364
|
type: "PANEL_SET_SIZE",
|
|
456
365
|
side,
|
|
457
|
-
size
|
|
366
|
+
size,
|
|
458
367
|
});
|
|
459
|
-
|
|
460
|
-
|
|
368
|
+
frontstageDef.dispatch({
|
|
369
|
+
type: "PANEL_SET_PINNED",
|
|
370
|
+
side,
|
|
371
|
+
pinned: panelDef.defaultPinned,
|
|
372
|
+
});
|
|
373
|
+
frontstageDef.dispatch({
|
|
374
|
+
type: "PANEL_SET_RESIZABLE",
|
|
375
|
+
side,
|
|
376
|
+
resizable: panelDef.defaultResizable,
|
|
377
|
+
});
|
|
378
|
+
const minSize = (_a = panelDef.initialConfig) === null || _a === void 0 ? void 0 : _a.minSize;
|
|
379
|
+
minSize !== undefined &&
|
|
380
|
+
frontstageDef.dispatch({
|
|
381
|
+
type: "PANEL_SET_MIN_SIZE",
|
|
382
|
+
side,
|
|
383
|
+
minSize,
|
|
384
|
+
});
|
|
385
|
+
const maxSize = (_b = panelDef.initialConfig) === null || _b === void 0 ? void 0 : _b.maxSize;
|
|
386
|
+
maxSize !== undefined &&
|
|
387
|
+
frontstageDef.dispatch({
|
|
388
|
+
type: "PANEL_SET_MAX_SIZE",
|
|
389
|
+
side,
|
|
390
|
+
maxSize,
|
|
391
|
+
});
|
|
392
|
+
const collapsed = panelDef.defaultState !== StagePanelState_1.StagePanelState.Open;
|
|
393
|
+
frontstageDef.dispatch({
|
|
394
|
+
type: "PANEL_SET_COLLAPSED",
|
|
395
|
+
side,
|
|
396
|
+
collapsed,
|
|
397
|
+
});
|
|
461
398
|
}
|
|
462
399
|
exports.initializePanel = initializePanel;
|
|
463
400
|
/** @internal */
|
|
464
401
|
exports.stateVersion = 17; // this needs to be bumped when NineZoneState is changed (to recreate the layout).
|
|
465
402
|
/** @internal */
|
|
466
403
|
function initializeNineZoneState(frontstageDef) {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
nineZone = (0, immer_1.default)(nineZone, (draft) => {
|
|
482
|
-
var _a, _b, _c, _d;
|
|
483
|
-
for (const [, panel] of Object.entries(draft.panels)) {
|
|
484
|
-
const expanded = panel.widgets.find((widgetId) => draft.widgets[widgetId].minimized === false);
|
|
485
|
-
const firstWidget = panel.widgets.length > 0 ? draft.widgets[panel.widgets[0]] : undefined;
|
|
486
|
-
// istanbul ignore next
|
|
487
|
-
if (!expanded && firstWidget) {
|
|
488
|
-
firstWidget.minimized = false;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
draft.panels.left.collapsed = isPanelCollapsed((_a = frontstageDef.leftPanel) === null || _a === void 0 ? void 0 : _a.panelState);
|
|
492
|
-
draft.panels.right.collapsed = isPanelCollapsed((_b = frontstageDef.rightPanel) === null || _b === void 0 ? void 0 : _b.panelState);
|
|
493
|
-
draft.panels.top.collapsed = isPanelCollapsed((_c = frontstageDef.topPanel) === null || _c === void 0 ? void 0 : _c.panelState);
|
|
494
|
-
draft.panels.bottom.collapsed = isPanelCollapsed((_d = frontstageDef.bottomPanel) === null || _d === void 0 ? void 0 : _d.panelState);
|
|
404
|
+
(0, core_bentley_1.assert)(!frontstageDef.nineZoneState);
|
|
405
|
+
frontstageDef.batch(() => {
|
|
406
|
+
frontstageDef.nineZoneState = defaultNineZone;
|
|
407
|
+
const size = InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize;
|
|
408
|
+
size &&
|
|
409
|
+
frontstageDef.dispatch({
|
|
410
|
+
type: "RESIZE",
|
|
411
|
+
size,
|
|
412
|
+
});
|
|
413
|
+
addFrontstageWidgetDefs(frontstageDef);
|
|
414
|
+
initializePanel(frontstageDef, StagePanelLocation_1.StagePanelLocation.Left);
|
|
415
|
+
initializePanel(frontstageDef, StagePanelLocation_1.StagePanelLocation.Right);
|
|
416
|
+
initializePanel(frontstageDef, StagePanelLocation_1.StagePanelLocation.Top);
|
|
417
|
+
initializePanel(frontstageDef, StagePanelLocation_1.StagePanelLocation.Bottom);
|
|
495
418
|
});
|
|
496
|
-
nineZone = addMissingWidgets(frontstageDef, nineZone);
|
|
497
|
-
const toolSettingsWidgetDef = frontstageDef.toolSettings;
|
|
498
|
-
if (toolSettingsWidgetDef) {
|
|
499
|
-
const toolSettingsTabId = toolSettingsWidgetDef.id;
|
|
500
|
-
nineZone = (0, appui_layout_react_1.addDockedToolSettings)(nineZone, toolSettingsTabId);
|
|
501
|
-
}
|
|
502
|
-
nineZone = hideWidgets(nineZone, frontstageDef);
|
|
503
|
-
nineZone = processPopoutWidgets(nineZone);
|
|
504
|
-
return nineZone;
|
|
505
419
|
}
|
|
506
420
|
exports.initializeNineZoneState = initializeNineZoneState;
|
|
507
421
|
/** Converts from saved NineZoneState to NineZoneState.
|
|
@@ -509,75 +423,68 @@ exports.initializeNineZoneState = initializeNineZoneState;
|
|
|
509
423
|
* @note Restores tab labels.
|
|
510
424
|
* @internal
|
|
511
425
|
*/
|
|
512
|
-
function restoreNineZoneState(frontstageDef,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
tabs
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
tabId: tab.id,
|
|
525
|
-
}));
|
|
526
|
-
state = (0, appui_layout_react_1.removeTab)(state, tab.id);
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
state = (0, immer_1.default)(state, (draft) => {
|
|
530
|
-
draft.tabs[tab.id] = {
|
|
531
|
-
...tab,
|
|
532
|
-
...toTabArgs(widgetDef),
|
|
533
|
-
preferredFloatingWidgetSize: tab.preferredFloatingWidgetSize,
|
|
534
|
-
preferredPanelWidgetSize: tab.preferredPanelWidgetSize,
|
|
535
|
-
};
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
state = (0, immer_1.default)(state, (draft) => {
|
|
539
|
-
// remove center panel section if one is found in left or right panels
|
|
540
|
-
const oldLeftMiddleIndex = saved.panels.left.widgets.findIndex((value) => value === "leftMiddle");
|
|
541
|
-
// istanbul ignore next
|
|
542
|
-
if (-1 !== oldLeftMiddleIndex) {
|
|
543
|
-
draft.panels.left.widgets = saved.panels.left.widgets.filter((value) => value !== "leftMiddle");
|
|
544
|
-
if ("leftEnd" in draft.widgets) {
|
|
545
|
-
draft.widgets.leftMiddle.tabs.forEach((tab) => draft.widgets.leftEnd.tabs.push(tab));
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
draft.widgets.leftEnd = { ...draft.widgets.leftMiddle };
|
|
549
|
-
delete draft.widgets.leftMiddle;
|
|
426
|
+
function restoreNineZoneState(frontstageDef, packed) {
|
|
427
|
+
frontstageDef.batch(() => {
|
|
428
|
+
frontstageDef.nineZoneState = packed;
|
|
429
|
+
for (const [, tab] of Object.entries(packed.tabs)) {
|
|
430
|
+
const widgetDef = frontstageDef.findWidgetDef(tab.id);
|
|
431
|
+
if (!widgetDef) {
|
|
432
|
+
core_bentley_1.Logger.logInfo(UiFramework_1.UiFramework.loggerCategory(restoreNineZoneState), "WidgetDef is not found for saved tab.", {
|
|
433
|
+
frontstageId: frontstageDef.id,
|
|
434
|
+
tabId: tab.id,
|
|
435
|
+
});
|
|
436
|
+
frontstageDef.dispatch({ type: "WIDGET_TAB_REMOVE", id: tab.id });
|
|
437
|
+
continue;
|
|
550
438
|
}
|
|
439
|
+
frontstageDef.dispatch({
|
|
440
|
+
type: "WIDGET_TAB_UPDATE",
|
|
441
|
+
id: tab.id,
|
|
442
|
+
overrides: toTabArgs(widgetDef),
|
|
443
|
+
});
|
|
551
444
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
if (
|
|
557
|
-
draft.widgets.
|
|
445
|
+
frontstageDef.nineZoneState = (0, immer_1.default)(frontstageDef.nineZoneState, (draft) => {
|
|
446
|
+
// remove center panel section if one is found in left or right panels
|
|
447
|
+
const oldLeftMiddleIndex = packed.panels.left.widgets.findIndex((value) => value === "leftMiddle");
|
|
448
|
+
// istanbul ignore next
|
|
449
|
+
if (-1 !== oldLeftMiddleIndex) {
|
|
450
|
+
draft.panels.left.widgets = packed.panels.left.widgets.filter((value) => value !== "leftMiddle");
|
|
451
|
+
if ("leftEnd" in draft.widgets) {
|
|
452
|
+
draft.widgets.leftMiddle.tabs.forEach((tab) => draft.widgets.leftEnd.tabs.push(tab));
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
draft.widgets.leftEnd = { ...draft.widgets.leftMiddle };
|
|
456
|
+
delete draft.widgets.leftMiddle;
|
|
457
|
+
}
|
|
558
458
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
459
|
+
const oldRightMiddleIndex = packed.panels.right.widgets.findIndex((value) => value === "rightMiddle");
|
|
460
|
+
// istanbul ignore next
|
|
461
|
+
if (-1 !== oldRightMiddleIndex) {
|
|
462
|
+
draft.panels.right.widgets = packed.panels.right.widgets.filter((value) => value !== "rightMiddle");
|
|
463
|
+
if ("rightEnd" in draft.widgets) {
|
|
464
|
+
draft.widgets.rightMiddle.tabs.forEach((tab) => draft.widgets.rightEnd.tabs.push(tab));
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
draft.widgets.rightEnd = { ...draft.widgets.rightMiddle };
|
|
468
|
+
delete draft.widgets.rightMiddle;
|
|
469
|
+
}
|
|
562
470
|
}
|
|
471
|
+
return;
|
|
472
|
+
});
|
|
473
|
+
if (InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize &&
|
|
474
|
+
(0 !== InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.height ||
|
|
475
|
+
0 !== InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.width)) {
|
|
476
|
+
frontstageDef.dispatch({
|
|
477
|
+
type: "RESIZE",
|
|
478
|
+
size: {
|
|
479
|
+
height: InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.height,
|
|
480
|
+
width: InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.width,
|
|
481
|
+
},
|
|
482
|
+
});
|
|
563
483
|
}
|
|
564
|
-
|
|
484
|
+
addFrontstageWidgetDefs(frontstageDef);
|
|
485
|
+
hideWidgetDefs(frontstageDef);
|
|
486
|
+
processPopoutWidgets(frontstageDef);
|
|
565
487
|
});
|
|
566
|
-
if (InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize &&
|
|
567
|
-
(0 !== InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.height ||
|
|
568
|
-
0 !== InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.width)) {
|
|
569
|
-
state = (0, appui_layout_react_1.NineZoneStateReducer)(state, {
|
|
570
|
-
type: "RESIZE",
|
|
571
|
-
size: {
|
|
572
|
-
height: InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.height,
|
|
573
|
-
width: InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize.width,
|
|
574
|
-
},
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
state = addMissingWidgets(frontstageDef, state);
|
|
578
|
-
state = hideWidgets(state, frontstageDef);
|
|
579
|
-
state = processPopoutWidgets(state);
|
|
580
|
-
return state;
|
|
581
488
|
}
|
|
582
489
|
exports.restoreNineZoneState = restoreNineZoneState;
|
|
583
490
|
/** Prepares NineZoneState to be saved.
|
|
@@ -586,66 +493,17 @@ exports.restoreNineZoneState = restoreNineZoneState;
|
|
|
586
493
|
* @internal
|
|
587
494
|
*/
|
|
588
495
|
function packNineZoneState(state) {
|
|
589
|
-
let packed =
|
|
590
|
-
...state,
|
|
591
|
-
tabs: {},
|
|
592
|
-
};
|
|
496
|
+
let packed = state;
|
|
593
497
|
packed = (0, immer_1.default)(packed, (draft) => {
|
|
594
|
-
for (const [, tab] of Object.entries(
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
preferredFloatingWidgetSize: tab.preferredFloatingWidgetSize,
|
|
598
|
-
userSized: tab.userSized,
|
|
599
|
-
};
|
|
498
|
+
for (const [, tab] of Object.entries(draft.tabs)) {
|
|
499
|
+
tab.label = "";
|
|
500
|
+
delete tab.iconSpec;
|
|
600
501
|
}
|
|
601
502
|
});
|
|
602
503
|
return packed;
|
|
603
504
|
}
|
|
604
505
|
exports.packNineZoneState = packNineZoneState;
|
|
605
506
|
/** @internal */
|
|
606
|
-
function isPanelCollapsed(panelState) {
|
|
607
|
-
return panelState !== StagePanelDef_1.StagePanelState.Open;
|
|
608
|
-
}
|
|
609
|
-
exports.isPanelCollapsed = isPanelCollapsed;
|
|
610
|
-
/** @internal */
|
|
611
|
-
function showWidget(state, id) {
|
|
612
|
-
const location = (0, appui_layout_react_1.getTabLocation)(state, id);
|
|
613
|
-
if (!location)
|
|
614
|
-
return state;
|
|
615
|
-
state = (0, immer_1.default)(state, (draft) => {
|
|
616
|
-
const widget = draft.widgets[location.widgetId];
|
|
617
|
-
widget.activeTabId = id;
|
|
618
|
-
widget.minimized = false;
|
|
619
|
-
if ((0, appui_layout_react_1.isPanelTabLocation)(location)) {
|
|
620
|
-
const panel = draft.panels[location.side];
|
|
621
|
-
panel.collapsed = false;
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
if ((0, appui_layout_react_1.isFloatingTabLocation)(location)) {
|
|
625
|
-
state = (0, appui_layout_react_1.floatingWidgetBringToFront)(state, location.floatingWidgetId);
|
|
626
|
-
}
|
|
627
|
-
return state;
|
|
628
|
-
}
|
|
629
|
-
exports.showWidget = showWidget;
|
|
630
|
-
/** @internal */
|
|
631
|
-
function expandWidget(state, id) {
|
|
632
|
-
const location = (0, appui_layout_react_1.getTabLocation)(state, id);
|
|
633
|
-
if (!location)
|
|
634
|
-
return state;
|
|
635
|
-
return (0, immer_1.default)(state, (draft) => {
|
|
636
|
-
const widget = draft.widgets[location.widgetId];
|
|
637
|
-
if ((0, appui_layout_react_1.isPanelTabLocation)(location)) {
|
|
638
|
-
const panel = draft.panels[location.side];
|
|
639
|
-
panel.splitterPercent =
|
|
640
|
-
panel.widgets.findIndex((wId) => wId === location.widgetId) === 0
|
|
641
|
-
? 100
|
|
642
|
-
: 0;
|
|
643
|
-
}
|
|
644
|
-
widget.minimized = false;
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
exports.expandWidget = expandWidget;
|
|
648
|
-
/** @internal */
|
|
649
507
|
function useSavedFrontstageState(frontstageDef) {
|
|
650
508
|
const uiStateStorage = (0, useUiStateStorage_1.useUiStateStorageHandler)();
|
|
651
509
|
const uiStateStorageRef = React.useRef(uiStateStorage);
|
|
@@ -663,7 +521,7 @@ function useSavedFrontstageState(frontstageDef) {
|
|
|
663
521
|
async function fetchFrontstageState() {
|
|
664
522
|
// Switching to previously initialized frontstage.
|
|
665
523
|
if (frontstageDef.nineZoneState) {
|
|
666
|
-
|
|
524
|
+
processPopoutWidgets(frontstageDef);
|
|
667
525
|
return;
|
|
668
526
|
}
|
|
669
527
|
const id = frontstageDef.id;
|
|
@@ -675,11 +533,11 @@ function useSavedFrontstageState(frontstageDef) {
|
|
|
675
533
|
const setting = settingResult.setting;
|
|
676
534
|
if (setting.version === version &&
|
|
677
535
|
setting.stateVersion === exports.stateVersion) {
|
|
678
|
-
|
|
536
|
+
restoreNineZoneState(frontstageDef, setting.nineZone);
|
|
679
537
|
return;
|
|
680
538
|
}
|
|
681
539
|
}
|
|
682
|
-
|
|
540
|
+
initializeNineZoneState(frontstageDef);
|
|
683
541
|
}
|
|
684
542
|
void fetchFrontstageState();
|
|
685
543
|
}, [frontstageDef]);
|
|
@@ -774,12 +632,10 @@ function useFrontstageManager(frontstageDef, useToolAsToolSettingsLabel) {
|
|
|
774
632
|
// TODO: track restoring frontstages to support workflows: i.e. prevent loading frontstage OR saving layout when delete is pending
|
|
775
633
|
void uiSettingsStorage.deleteSetting(exports.FRONTSTAGE_SETTINGS_NAMESPACE, getFrontstageStateSettingName(args.frontstageDef.id));
|
|
776
634
|
if (frontstageDef.id === args.frontstageDef.id) {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
}
|
|
780
|
-
else {
|
|
781
|
-
args.frontstageDef.nineZoneState = undefined;
|
|
635
|
+
initializeNineZoneState(frontstageDef);
|
|
636
|
+
return;
|
|
782
637
|
}
|
|
638
|
+
args.frontstageDef.nineZoneState = undefined;
|
|
783
639
|
});
|
|
784
640
|
}, [uiSettingsStorage, frontstageDef]);
|
|
785
641
|
const defaultLabel = React.useMemo(() => UiFramework_1.UiFramework.translate("widget.labels.toolSettings"), []);
|
|
@@ -815,20 +671,20 @@ function useFrontstageManager(frontstageDef, useToolAsToolSettingsLabel) {
|
|
|
815
671
|
}, [frontstageDef, useToolAsToolSettingsLabel, defaultLabel]);
|
|
816
672
|
}
|
|
817
673
|
exports.useFrontstageManager = useFrontstageManager;
|
|
674
|
+
function refreshNineZoneState(frontstageDef) {
|
|
675
|
+
// Fired for both registered/unregistered. Update definitions and remove/add missing widgets.
|
|
676
|
+
frontstageDef.updateWidgetDefs();
|
|
677
|
+
frontstageDef.batch(() => {
|
|
678
|
+
addFrontstageWidgetDefs(frontstageDef);
|
|
679
|
+
removeMissingWidgets(frontstageDef);
|
|
680
|
+
});
|
|
681
|
+
}
|
|
818
682
|
/** @internal */
|
|
819
|
-
// istanbul ignore next
|
|
820
683
|
function useItemsManager(frontstageDef) {
|
|
821
|
-
const refreshNineZoneState = (def) => {
|
|
822
|
-
// Fired for both registered/unregistered. Update definitions and remove/add missing widgets.
|
|
823
|
-
def.updateWidgetDefs();
|
|
824
|
-
let state = def.nineZoneState;
|
|
825
|
-
if (!state)
|
|
826
|
-
return;
|
|
827
|
-
state = addMissingWidgets(def, state);
|
|
828
|
-
state = removeMissingWidgets(def, state);
|
|
829
|
-
def.nineZoneState = state;
|
|
830
|
-
};
|
|
831
684
|
React.useEffect(() => {
|
|
685
|
+
// Not initialized yet.
|
|
686
|
+
if (!frontstageDef.nineZoneState)
|
|
687
|
+
return;
|
|
832
688
|
// Need to refresh anytime frontstageDef changes because uiItemsProvider may have added something to
|
|
833
689
|
// another stage before it was possibly unloaded in this stage.
|
|
834
690
|
refreshNineZoneState(frontstageDef);
|
|
@@ -840,8 +696,9 @@ function useItemsManager(frontstageDef) {
|
|
|
840
696
|
}, [frontstageDef]);
|
|
841
697
|
}
|
|
842
698
|
exports.useItemsManager = useItemsManager;
|
|
843
|
-
|
|
844
|
-
|
|
699
|
+
function determineNewWidgets(frontstageDef, defs) {
|
|
700
|
+
const state = frontstageDef.nineZoneState;
|
|
701
|
+
(0, core_bentley_1.assert)(!!state);
|
|
845
702
|
defs = defs || [];
|
|
846
703
|
const uniqueDefs = defs.filter((def, index, array) => {
|
|
847
704
|
return index === array.findIndex((def1) => def.id === def1.id);
|