@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
|
@@ -2,26 +2,19 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
|
|
6
|
-
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
7
|
-
|
|
8
5
|
.uifw-accudraw-field-container {
|
|
9
6
|
padding: 6px;
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
&.uifw-horizontal {
|
|
9
|
+
max-width: 550px;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
13
12
|
}
|
|
14
|
-
}
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.uifw-accudraw-field-container-vertical {
|
|
23
|
-
max-width: 250px;
|
|
24
|
-
display: grid;
|
|
25
|
-
grid-template-columns: auto 1fr auto;
|
|
26
|
-
row-gap: var(--iui-size-2xs);
|
|
14
|
+
&.uifw-vertical {
|
|
15
|
+
max-width: 250px;
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: auto 1fr auto;
|
|
18
|
+
row-gap: var(--iui-size-2xs);
|
|
19
|
+
}
|
|
27
20
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "~@itwin/core-react/lib/cjs/core-react/base/base";
|
|
6
|
+
@import "~@itwin/core-react/lib/cjs/core-react/inputs/variables";
|
|
6
7
|
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
7
8
|
|
|
8
9
|
.uifw-accudraw-input-label {
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.uifw-accudraw-input-field {
|
|
35
|
+
padding: $uicore-iui-input-padding;
|
|
34
36
|
flex: 1;
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import "./SquareButton.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import type { Omit } from "@itwin/core-react";
|
|
7
|
-
import
|
|
7
|
+
import { Button } from "@itwin/itwinui-react";
|
|
8
|
+
type ButtonProps = React.ComponentPropsWithoutRef<typeof Button>;
|
|
8
9
|
/** @alpha */
|
|
9
10
|
export interface SquareButtonProps// eslint-disable-line @typescript-eslint/no-empty-interface
|
|
10
11
|
extends Omit<ButtonProps, "size" | "styleType"> {
|
|
@@ -13,4 +14,5 @@ export interface SquareButtonProps// eslint-disable-line @typescript-eslint/no-e
|
|
|
13
14
|
export declare class SquareButton extends React.PureComponent<SquareButtonProps> {
|
|
14
15
|
render(): JSX.Element;
|
|
15
16
|
}
|
|
17
|
+
export {};
|
|
16
18
|
//# sourceMappingURL=SquareButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SquareButton.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/SquareButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"SquareButton.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/SquareButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,KAAK,WAAW,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEjE,aAAa;AACb,MAAM,WAAW,iBAAkB,4DAA4D;AAC7F,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC;CAAG;AAEpD,aAAa;AACb,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC;IACtD,MAAM;CAavB"}
|
|
@@ -17,10 +17,7 @@ class SquareButton extends React.PureComponent {
|
|
|
17
17
|
render() {
|
|
18
18
|
const { className, style, ...buttonProps } = this.props;
|
|
19
19
|
const buttonClassNames = (0, classnames_1.default)("uifw-square-button", className);
|
|
20
|
-
|
|
21
|
-
...style,
|
|
22
|
-
};
|
|
23
|
-
return (React.createElement(itwinui_react_1.Button, { ...buttonProps, size: "small", className: buttonClassNames, style: buttonStyle }));
|
|
20
|
+
return (React.createElement(itwinui_react_1.Button, { ...buttonProps, size: "small", className: buttonClassNames, style: style }));
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
exports.SquareButton = SquareButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SquareButton.js","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/SquareButton.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA6B;AAC7B,2CAAoC;AACpC,+BAA+B;
|
|
1
|
+
{"version":3,"file":"SquareButton.js","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/SquareButton.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA6B;AAC7B,2CAAoC;AACpC,+BAA+B;AAE/B,wDAA8C;AAQ9C,aAAa;AACb,MAAa,YAAa,SAAQ,KAAK,CAAC,aAAgC;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAExD,MAAM,gBAAgB,GAAG,IAAA,oBAAU,EAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;QACrE,OAAO,CACL,oBAAC,sBAAM,OACD,WAAW,EACf,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;IACJ,CAAC;CACF;AAdD,oCAcC","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 AccuDraw\n */\n\nimport \"./SquareButton.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { Omit } from \"@itwin/core-react\";\nimport { Button } from \"@itwin/itwinui-react\";\n\ntype ButtonProps = React.ComponentPropsWithoutRef<typeof Button>;\n\n/** @alpha */\nexport interface SquareButtonProps // eslint-disable-line @typescript-eslint/no-empty-interface\n extends Omit<ButtonProps, \"size\" | \"styleType\"> {}\n\n/** @alpha */\nexport class SquareButton extends React.PureComponent<SquareButtonProps> {\n public override render() {\n const { className, style, ...buttonProps } = this.props;\n\n const buttonClassNames = classnames(\"uifw-square-button\", className);\n return (\n <Button\n {...buttonProps}\n size=\"small\"\n className={buttonClassNames}\n style={style}\n />\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AA2B5C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;KAIK;AACL,qBAAa,0BAA2B,YAAW,qBAAqB;IACtE,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,MAAM,CAAwC;IAEtD,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IAEI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IAEH,OAAO,CAAC,MAAM;IAoBd;;;;OAIG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,GAAG,SAAS;IAQlC;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAU3E,OAAO,CAAC,yBAAyB;IAgGjC,gGAAgG;IACzF,QAAQ;IAQf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAgBnC;IAGF,OAAO,CAAC,mBAAmB;IAc3B;;;;;;;;OAQG;IAEI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CA8DhC"}
|
|
@@ -20,6 +20,7 @@ const ModalDialogManager_1 = require("../dialog/ModalDialogManager");
|
|
|
20
20
|
const CursorMenu_1 = require("../cursor/cursormenu/CursorMenu");
|
|
21
21
|
const ThemeManager_1 = require("../theme/ThemeManager");
|
|
22
22
|
const UiFramework_1 = require("../UiFramework");
|
|
23
|
+
const appui_layout_react_1 = require("@itwin/appui-layout-react");
|
|
23
24
|
const childHtml = `<!DOCTYPE html>
|
|
24
25
|
<html>
|
|
25
26
|
<head>
|
|
@@ -37,7 +38,7 @@ const childHtml = `<!DOCTYPE html>
|
|
|
37
38
|
}
|
|
38
39
|
</style>
|
|
39
40
|
</head>
|
|
40
|
-
<body
|
|
41
|
+
<body>
|
|
41
42
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
42
43
|
<div id="root"></div>
|
|
43
44
|
</body>
|
|
@@ -149,17 +150,18 @@ class InternalChildWindowManager {
|
|
|
149
150
|
: childWindow.innerHeight);
|
|
150
151
|
}
|
|
151
152
|
const reactConnectionDiv = childWindow.document.getElementById("root");
|
|
152
|
-
if (reactConnectionDiv) {
|
|
153
|
+
if (reactConnectionDiv && content && React.isValidElement(content)) {
|
|
153
154
|
// set openChildWindows now so components can use it when they mount
|
|
154
155
|
this._openChildWindows.push({
|
|
155
156
|
childWindowId,
|
|
156
157
|
window: childWindow,
|
|
157
158
|
parentWindow: window,
|
|
158
159
|
});
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
let element;
|
|
161
|
+
if (content.props.widgetDef) {
|
|
162
|
+
const tabId = content.props.widgetDef.id;
|
|
163
|
+
element = (React.createElement(react_redux_1.Provider, { store: UiFramework_1.UiFramework.store },
|
|
164
|
+
React.createElement(appui_layout_react_1.TabIdContext.Provider, { value: tabId },
|
|
163
165
|
React.createElement(useUiStateStorage_1.UiStateStorageHandler, null,
|
|
164
166
|
React.createElement(ThemeManager_1.ThemeManager, null,
|
|
165
167
|
React.createElement("div", { className: "uifw-child-window-container-host" },
|
|
@@ -167,7 +169,23 @@ class InternalChildWindowManager {
|
|
|
167
169
|
React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
|
|
168
170
|
React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
|
|
169
171
|
React.createElement(CursorMenu_1.CursorPopupMenu, null),
|
|
170
|
-
React.createElement("div", { className: "uifw-child-window-container nz-widget-widget" }, content)))))
|
|
172
|
+
React.createElement("div", { className: "uifw-child-window-container nz-widget-widget" }, content)))))));
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
element = (React.createElement(react_redux_1.Provider, { store: UiFramework_1.UiFramework.store },
|
|
176
|
+
React.createElement(useUiStateStorage_1.UiStateStorageHandler, null,
|
|
177
|
+
React.createElement(ThemeManager_1.ThemeManager, null,
|
|
178
|
+
React.createElement("div", { className: "uifw-child-window-container-host" },
|
|
179
|
+
React.createElement(PopupManager_1.PopupRenderer, null),
|
|
180
|
+
React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
|
|
181
|
+
React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
|
|
182
|
+
React.createElement(CursorMenu_1.CursorPopupMenu, null),
|
|
183
|
+
React.createElement("div", { className: "uifw-child-window-container nz-widget-widget" }, content))))));
|
|
184
|
+
}
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
(0, CopyStyles_1.copyStyles)(childWindow.document);
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
this.render(element, reactConnectionDiv);
|
|
171
189
|
});
|
|
172
190
|
});
|
|
173
191
|
childWindow.addEventListener("pagehide", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AAEH,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAQ7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QA6JtD;;;;;WAKG;QACI,UAAK,GAAG,CAAC,aAAqB,EAAE,kBAAkB,GAAG,IAAI,EAAE,EAAE;YAClE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACjD,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,KAAK,aAAa,CAC3D,CAAC;YACF,IAAI,CAAC,CAAC,KAAK,WAAW;gB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AAQ,QAAQ,CAAC,GAAG,+DAA+D,CAC3J,CAAC;QACF,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC;QAC/B,WAAW,CAAC,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC7C,WAAW,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QAE3C,+BAA+B;QAC/B,WAAW,CAAC,mBAAmB;YAC7B,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAEzD,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,EAAE;YACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;SACH;aAAM;YACL,WAAW,CAAC,gBAAgB,CAC1B,MAAM,EACN,GAAG,EAAE;gBACH,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;YACJ,CAAC,EACD,KAAK,CACN,CAAC;SACH;QAED,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,GAAG,EAAE;YACH,MAAM,aAAa,GAAG,yBAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApRD,gEAoRC","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\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body class=\"iui-root\">\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerWidth\n : childWindow.innerWidth);\n childWindow.deltaHeight =\n childWindow.expectedHeight -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerHeight\n : childWindow.innerHeight);\n }\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>,\n reactConnectionDiv\n );\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n\n // Edge needs to use outer size\n childWindow.shouldUseOuterSized =\n navigator.userAgent.toLowerCase().indexOf(\"edg/\") > -1;\n\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AAEH,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAO7C,kEAAyD;AAEzD,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QAqLtD;;;;;WAKG;QACI,UAAK,GAAG,CAAC,aAAqB,EAAE,kBAAkB,GAAG,IAAI,EAAE,EAAE;YAClE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACjD,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,KAAK,aAAa,CAC3D,CAAC;YACF,IAAI,CAAC,CAAC,KAAK,WAAW;gBAAE,OAAO,KAAK,CAAC;YACrC,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YACvD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAC7C,IAAI,kBAAkB,EAAE;gBACtB,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;aAC5B;iBAAM;gBACL,wDAAwD;gBACxD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AC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5SD,gEA4SC","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\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\nimport { TabIdContext } from \"@itwin/appui-layout-react\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body>\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n // istanbul ignore next: Used in `open` which is not tested.\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerWidth\n : childWindow.innerWidth);\n childWindow.deltaHeight =\n childWindow.expectedHeight -\n (childWindow.shouldUseOuterSized\n ? childWindow.outerHeight\n : childWindow.innerHeight);\n }\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv && content && React.isValidElement(content)) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n let element: React.FunctionComponentElement<any>;\n if (content.props.widgetDef) {\n const tabId = content.props.widgetDef.id as string;\n element = (\n <Provider store={UiFramework.store}>\n <TabIdContext.Provider value={tabId}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </TabIdContext.Provider>\n </Provider>\n );\n } else {\n element = (\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>\n );\n }\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(element, reactConnectionDiv);\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (-1 === windowIndex) return false;\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n\n // Edge needs to use outer size\n childWindow.shouldUseOuterSized =\n navigator.userAgent.toLowerCase().indexOf(\"edg/\") > -1;\n\n if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module ConfigurableUi
|
|
3
3
|
*/
|
|
4
|
-
import "./
|
|
4
|
+
import "./ConfigurableUiContent.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import type { CommonProps } from "@itwin/core-react";
|
|
7
7
|
/** Properties for [[ConfigurableUiContent]]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqBrD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,eAsDtE"}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.ConfigurableUiContent = void 0;
|
|
11
|
-
require("./
|
|
11
|
+
require("./ConfigurableUiContent.scss");
|
|
12
12
|
const React = require("react");
|
|
13
13
|
const core_react_1 = require("@itwin/core-react");
|
|
14
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
14
15
|
const CursorInformation_1 = require("../cursor/CursorInformation");
|
|
15
16
|
const CursorMenu_1 = require("../cursor/cursormenu/CursorMenu");
|
|
16
17
|
const CursorPopupManager_1 = require("../cursor/cursorpopup/CursorPopupManager");
|
|
@@ -25,11 +26,12 @@ const Frontstage_1 = require("../widget-panels/Frontstage");
|
|
|
25
26
|
const ContentDialogManager_1 = require("../dialog/ContentDialogManager");
|
|
26
27
|
const UiFramework_1 = require("../UiFramework");
|
|
27
28
|
const InternalConfigurableUiManager_1 = require("./InternalConfigurableUiManager");
|
|
28
|
-
const
|
|
29
|
+
const MessageRenderer_1 = require("../messages/MessageRenderer");
|
|
29
30
|
/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
32
33
|
function ConfigurableUiContent(props) {
|
|
34
|
+
const [portalContainer, setPortalContainer] = React.useState();
|
|
33
35
|
React.useEffect(() => {
|
|
34
36
|
UiFramework_1.UiFramework.keyboardShortcuts.setFocusToHome();
|
|
35
37
|
}, []);
|
|
@@ -47,19 +49,21 @@ function ConfigurableUiContent(props) {
|
|
|
47
49
|
CursorInformation_1.CursorInformation.handleMouseMove(point);
|
|
48
50
|
}, []);
|
|
49
51
|
return (React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: props.className, style: props.style, onMouseMove: handleMouseMove },
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
React.createElement(itwinui_react_1.ThemeProvider, { style: { height: "100%" }, portalContainer: portalContainer },
|
|
53
|
+
props.appBackstage,
|
|
54
|
+
React.createElement(Frontstage_1.WidgetPanelsFrontstage, null),
|
|
55
|
+
React.createElement(ContentDialogManager_1.ContentDialogRenderer, null),
|
|
56
|
+
React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
|
|
57
|
+
React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
|
|
58
|
+
React.createElement(ElementTooltip_1.ElementTooltip, null),
|
|
59
|
+
React.createElement(Pointer_1.PointerMessage, null),
|
|
60
|
+
React.createElement(KeyboardShortcutMenu_1.KeyboardShortcutMenu, null),
|
|
61
|
+
React.createElement(InputField_1.InputFieldMessage, null),
|
|
62
|
+
React.createElement(CursorMenu_1.CursorPopupMenu, null),
|
|
63
|
+
React.createElement(CursorPopupManager_1.CursorPopupRenderer, null),
|
|
64
|
+
React.createElement(PopupManager_1.PopupRenderer, null),
|
|
65
|
+
React.createElement(MessageRenderer_1.MessageRenderer, null)),
|
|
66
|
+
React.createElement("div", { style: { position: "relative", zIndex: 99999 }, ref: (instance) => setPortalContainer(instance !== null && instance !== void 0 ? instance : undefined) })));
|
|
63
67
|
}
|
|
64
68
|
exports.ConfigurableUiContent = ConfigurableUiContent;
|
|
65
69
|
//# sourceMappingURL=ConfigurableUiContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wCAAsC;AACtC,+BAA+B;AAE/B,kDAA0C;AAC1C,wDAAqD;AACrD,mEAAgE;AAChE,gEAAkE;AAClE,iFAA+E;AAC/E,qEAAmE;AACnE,2EAAyE;AACzE,+DAA4D;AAC5D,mFAAgF;AAChF,uDAA2D;AAC3D,iDAAqD;AACrD,wDAAsD;AACtD,4DAAqE;AACrE,yEAAuE;AACvE,gDAA6C;AAC7C,mFAAgF;AAChF,iEAA8D;AAiB9D;;GAEG;AACH,SAAgB,qBAAqB,CAAC,KAAiC;IACrE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAEzD,CAAC;IACJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,yBAAW,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP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6BACE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,EAC9C,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,SAAS,CAAC,GAC5D,CACG,CACR,CAAC;AACJ,CAAC;AAtDD,sDAsDC","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 ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\nimport { InputFieldMessage } from \"../messages/InputField\";\nimport { PointerMessage } from \"../messages/Pointer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\nimport { MessageRenderer } from \"../messages/MessageRenderer\";\n\n// cSpell:ignore cursormenu cursorpopup\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n */\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\n * @public\n */\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const [portalContainer, setPortalContainer] = React.useState<\n HTMLElement | undefined\n >();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout: props.idleTimeout,\n intervalTimeout: props.intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [props.idleTimeout, props.intervalTimeout]);\n\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n }, []);\n\n return (\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={props.className}\n style={props.style}\n onMouseMove={handleMouseMove}\n >\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {props.appBackstage}\n <WidgetPanelsFrontstage />\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n <ElementTooltip />\n <PointerMessage />\n <KeyboardShortcutMenu />\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <MessageRenderer />\n </ThemeProvider>\n <div\n style={{ position: \"relative\", zIndex: 99999 }}\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n />\n </main>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalConfigurableUiManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,KAAK,EACV,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAShD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;CAAG;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;CAAG;AAEtE;;GAEG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAG9B;IACJ,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IAEpC,gBAAgB;IAChB,gBAAuB,eAAe,kBAAyB;IAC/D,gBAAgB;IAChB,gBAAuB,iBAAiB,kBAAyB;IACjE,gBAAgB;IAChB,gBAAuB,iBAAiB,kBAAyB;IAEjE;;OAEG;WACW,UAAU;IA2CxB;;;;;;;;;OASG;WACW,QAAQ,CACpB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,gCAAgC,GAC5C,IAAI;
|
|
1
|
+
{"version":3,"file":"InternalConfigurableUiManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,KAAK,EACV,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAShD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;CAAG;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;CAAG;AAEtE;;GAEG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAG9B;IACJ,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IAEpC,gBAAgB;IAChB,gBAAuB,eAAe,kBAAyB;IAC/D,gBAAgB;IAChB,gBAAuB,iBAAiB,kBAAyB;IACjE,gBAAgB;IAChB,gBAAuB,iBAAiB,kBAAyB;IAEjE;;OAEG;WACW,UAAU;IA2CxB;;;;;;;;;OASG;WACW,QAAQ,CACpB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,gCAAgC,GAC5C,IAAI;IAYP;;;OAGG;WACW,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAKpD;;OAEG;WACW,qBAAqB,CACjC,WAAW,EAAE,gCAAgC,GAC5C,MAAM,GAAG,SAAS;IAQrB;;OAEG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;;;OAMG;WACW,MAAM,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,GAAG,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,qBAAqB,GAAG,SAAS;IAmBpC,wDAAwD;WAC1C,iBAAiB,IAAI,WAAW;IAM9C,0CAA0C;WAC5B,OAAO,IAAI,IAAI;CAS9B"}
|
|
@@ -80,6 +80,7 @@ class InternalConfigurableUiManager {
|
|
|
80
80
|
*/
|
|
81
81
|
static register(classId, constructor) {
|
|
82
82
|
if (this._registeredControls.get(classId) !== undefined) {
|
|
83
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
83
84
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `registerControl: classId '${classId}' already registered`);
|
|
84
85
|
}
|
|
85
86
|
this._registeredControls.set(classId, constructor);
|
|
@@ -121,6 +122,7 @@ class InternalConfigurableUiManager {
|
|
|
121
122
|
const info = new ConfigurableUiControl_1.ConfigurableCreateInfo(classId, uniqueId, controlId !== null && controlId !== void 0 ? controlId : uniqueId);
|
|
122
123
|
const constructor = this._registeredControls.get(info.classId);
|
|
123
124
|
if (!constructor) {
|
|
125
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
124
126
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `createControl: classId '${classId}' not registered`);
|
|
125
127
|
}
|
|
126
128
|
const control = new constructor(info, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgD;AAChD,yFAAsF;AACtF,+FAA4F;AAC5F,6EAAiF;AACjF,mGAAuG;AACvG,gDAA6C;AAK7C,mEAAiE;AACjE,+DAA4D;AAC5D,wDAAqD;AACrD,uDAAoD;AACpD,sDAAgD;AAChD,uFAAoF;AACpF,6FAA0F;AAC1F,2FAAwF;AACxF,yFAAsF;AACtF,2FAA+F;AAC/F,qFAAkF;AAClF,2EAAwE;AASxE;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAG;AAAtE,0CAAsE;AAStE;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAG;AAAtE,0CAAsE;AAEtE;;GAEG;AACH,MAAa,6BAA6B;IAcxC;;OAEG;IACI,MAAM,CAAC,UAAU;QACtB,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO;QAE9B,yBAAyB;QACzB,6BAA6B,CAAC,QAAQ,CACpC,oEAAoC,CAAC,eAAe,EACpD,oEAAoC,CACrC,CAAC;QACF,6BAA6B,CAAC,QAAQ,CACpC,8CAAyB,CAAC,eAAe,EACzC,8CAAyB,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C;QACtC,2DAA4B,CAAC,QAAQ,EAAE,CAAC;QACxC,yBAAW,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC1C,yBAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,2BAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AA/Jc,iDAAmB,GAAG,IAAI,GAAG,EAGzC,CAAC;AACW,0CAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,6CAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AAZtD,sEAA6B","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 ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InternalConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/InternalConfigurableUiManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgD;AAChD,yFAAsF;AACtF,+FAA4F;AAC5F,6EAAiF;AACjF,mGAAuG;AACvG,gDAA6C;AAK7C,mEAAiE;AACjE,+DAA4D;AAC5D,wDAAqD;AACrD,uDAAoD;AACpD,sDAAgD;AAChD,uFAAoF;AACpF,6FAA0F;AAC1F,2FAAwF;AACxF,yFAAsF;AACtF,2FAA+F;AAC/F,qFAAkF;AAClF,2EAAwE;AASxE;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAG;AAAtE,0CAAsE;AAStE;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAG;AAAtE,0CAAsE;AAEtE;;GAEG;AACH,MAAa,6BAA6B;IAcxC;;OAEG;IACI,MAAM,CAAC,UAAU;QACtB,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO;QAE9B,yBAAyB;QACzB,6BAA6B,CAAC,QAAQ,CACpC,oEAAoC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,MAAM,CAAC,OAAO;QACnB,+BAAc,CAAC,gBAAgB,EAAE,CAAC;QAClC,6DAA6B,CAAC,QAAQ,EAAE,CAAC;QACzC,uDAA0B,CAAC,QAAQ,EAAE,CAAC;QACtC,2DAA4B,CAAC,QAAQ,EAAE,CAAC;QACxC,yBAAW,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC1C,yBAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,2BAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AAjKc,iDAAmB,GAAG,IAAI,GAAG,EAGzC,CAAC;AACW,0CAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,6CAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,+CAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AAZtD,sEAA6B","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 ConfigurableUi\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ConfigurableUiControlConstructor,\n ConfigurableUiElement,\n} from \"./ConfigurableUiControl\";\nimport { ConfigurableCreateInfo } from \"./ConfigurableUiControl\";\nimport { MessageManager } from \"../messages/MessageManager\";\nimport { PopupManager } from \"../popup/PopupManager\";\nimport { ActivityTracker } from \"./ActivityTracker\";\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { InternalFrontstageManager } from \"../frontstage/InternalFrontstageManager\";\nimport { InternalToolSettingsManager } from \"../toolsettings/InternalToolSettingsManager\";\nimport { InternalModelessDialogManager } from \"../dialog/InternalModelessDialogManager\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\nimport { InternalKeyboardShortcutManager } from \"../keyboardshortcut/InternalKeyboardShortcut\";\nimport { InternalModalDialogManager } from \"../dialog/InternalModalDialogManager\";\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\n\n/** Ui Activity Event Args interface.\n * @internal\n */\nexport interface UiActivityEventArgs {\n event: Event;\n}\n\n/** Ui Activity Event class.\n * @internal\n */\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> {}\n\n/** Ui Interval Event Args interface\n * @internal\n */\nexport interface UiIntervalEventArgs {\n idleTimeout?: number;\n}\n\n/** Ui Interval Event class.\n * @internal\n */\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> {}\n\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\n * @internal\n */\nexport class InternalConfigurableUiManager {\n private static _registeredControls = new Map<\n string,\n ConfigurableUiControlConstructor\n >();\n private static _initialized = false;\n\n /** @internal */\n public static readonly activityTracker = new ActivityTracker();\n /** @internal */\n public static readonly onUiActivityEvent = new UiActivityEvent();\n /** @internal */\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\n\n /** Initializes the InternalConfigurableUiManager and registers core controls.\n * @internal\n */\n public static initialize() {\n if (this._initialized) return;\n\n // Register core controls\n InternalConfigurableUiManager.register(\n StandardRotationNavigationAidControl.navigationAidId,\n StandardRotationNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n SheetNavigationAidControl.navigationAidId,\n SheetNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n DrawingNavigationAidControl.navigationAidId,\n DrawingNavigationAidControl\n );\n InternalConfigurableUiManager.register(\n CubeNavigationAidControl.navigationAidId,\n CubeNavigationAidControl\n );\n\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\n SyncUiEventDispatcher.initialize();\n\n // Initialize the FrontstageManager\n InternalFrontstageManager.initialize();\n\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\n InternalToolSettingsManager.initialize();\n\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\n InternalModelessDialogManager.initialize();\n\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\n InternalContentDialogManager.initialize();\n\n // Initialize the Keyboard Shortcut manager\n InternalKeyboardShortcutManager.initialize();\n\n this._initialized = true;\n }\n\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\n * These controls can be a\n * [[ContentControl]],\n * [[NavigationAidControl]],\n * [[StatusBarWidgetControl]],\n * [[WidgetControl]] or\n * [ToolUiProvider]($appui-react).\n * @param classId the class id of the control to register\n * @param constructor the constructor of the control to register\n */\n public static register(\n classId: string,\n constructor: ConfigurableUiControlConstructor\n ): void {\n if (this._registeredControls.get(classId) !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `registerControl: classId '${classId}' already registered`\n );\n }\n\n this._registeredControls.set(classId, constructor);\n }\n\n /** Determines if a control has been registered based on its classId.\n * @param classId the class id of the control to test\n * @returns true if the control is registered or false if not\n */\n public static isRegistered(classId: string): boolean {\n const constructor = this._registeredControls.get(classId);\n return constructor !== undefined;\n }\n\n /** Determines if a control has been registered.\n * @internal\n */\n public static getConstructorClassId(\n constructor: ConfigurableUiControlConstructor\n ): string | undefined {\n for (const [key, value] of this._registeredControls.entries()) {\n if (value === constructor) return key;\n }\n\n return undefined;\n }\n\n /** Unregisters a control that has been registered.\n * @param classId the class id of the control to unregister\n */\n public static unregister(classId: string): void {\n const constructor = this._registeredControls.get(classId);\n if (constructor) this._registeredControls.delete(classId);\n }\n\n /** Creates a control registered by calling registerControl.\n * @param classId the class id of the control to create\n * @param uniqueId a unique id for the control\n * @param options options passed to the constructor of the control\n * @param controlId controlId which may not be unique across all control instances.\n * @returns the created control\n */\n public static create(\n classId: string,\n uniqueId: string,\n options?: any,\n controlId?: string\n ): ConfigurableUiElement | undefined {\n const info = new ConfigurableCreateInfo(\n classId,\n uniqueId,\n controlId ?? uniqueId\n );\n const constructor = this._registeredControls.get(info.classId);\n if (!constructor) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `createControl: classId '${classId}' not registered`\n );\n }\n\n const control = new constructor(info, options);\n return control;\n }\n\n /** Gets the HTML wrapper element for Configurable UI */\n public static getWrapperElement(): HTMLElement {\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\n const htmlElement = wrapper!;\n return htmlElement;\n }\n\n /** Closes all UI popups currently open */\n public static closeUi(): void {\n MessageManager.closeAllMessages();\n InternalModelessDialogManager.closeAll();\n InternalModalDialogManager.closeAll();\n InternalContentDialogManager.closeAll();\n UiFramework.keyboardShortcuts.closeMenu();\n UiFramework.closeCursorMenu();\n PopupManager.clearPopups();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentControl.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.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,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,EAAE,cAAc,CAAC;IACrC,iBAAiB,CAAC,EAAE,cAAc,CAAC;CACpC;AAED;;GAEG;
|
|
1
|
+
{"version":3,"file":"ContentControl.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.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,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,EAAE,cAAc,CAAC;IACrC,iBAAiB,CAAC,EAAE,cAAc,CAAC;CACpC;AAED;;GAEG;AAEH,qBAAa,4BAA6B,SAAQ,OAAO,CAAC,gCAAgC,CAAC;CAAG;AAE9F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,0BAA0B,EAAE,OAAO,CAAC;IACpC,qCAAqC;IACrC,yBAAyB,CACvB,MAAM,EAAE,gBAAgB,EACxB,gBAAgB,EAAE,UAAU,EAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,qBAAqB;IACvD,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;OAGG;gBACS,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG;IAItD,mDAAmD;IAC5C,WAAW,IAAI,IAAI;IAE1B,qDAAqD;IAC9C,aAAa,IAAI,IAAI;IAE5B,8EAA8E;IACvE,OAAO,IAAI,yBAAyB;IAI3C,0DAA0D;IAC1D,IAAW,UAAU,IAAI,OAAO,CAE/B;IACD,uDAAuD;IACvD,IAAW,QAAQ,IAAI,cAAc,GAAG,SAAS,CAEhD;IAED,SAAS,CAAC,iBAAiB,IAAI,KAAK,CAAC,SAAS;IAa9C,SAAS,CAAC,YAAY,IAAI,KAAK,CAAC,SAAS;IAIzC,mDAAmD;IACnD,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;IAED,IAAW,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAEtC;IAED,uEAAuE;IACvE,IAAW,oBAAoB,IAAI,MAAM,CAExC;CACF;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;gBAC5C,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;CAIlE"}
|
|
@@ -14,6 +14,7 @@ const ConfigurableUiControl_1 = require("../configurableui/ConfigurableUiControl
|
|
|
14
14
|
/** ContentControl Activated Event class.
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
17
18
|
class ContentControlActivatedEvent extends appui_abstract_1.UiEvent {
|
|
18
19
|
}
|
|
19
20
|
exports.ContentControlActivatedEvent = ContentControlActivatedEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAO/B,0DAAgD;AAChD,mFAIiD;AAUjD;;GAEG;AACH,MAAa,4BAA6B,SAAQ,wBAAyC;CAAG;AAA9F,oEAA8F;AAiB9F;;GAEG;AACH,MAAa,cAAe,SAAQ,6CAAqB;IAIvD;;;OAGG;IACH,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAP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,8CAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF;AALD,wDAKC","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 { UiEvent } from \"@itwin/appui-abstract\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControl,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\n\n/** ControlControl Activated Event Args interface.\n * @public\n */\nexport interface ContentControlActivatedEventArgs {\n activeContentControl: ContentControl;\n oldContentControl?: ContentControl;\n}\n\n/** ContentControl Activated Event class.\n * @public\n */\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> {}\n\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\n * @public\n */\nexport interface SupportsViewSelectorChange {\n /** Returns true if this control supports reacting to ViewSelector changes. */\n supportsViewSelectorChange: boolean;\n /** Process a ViewSelector change. */\n processViewSelectorChange(\n iModel: IModelConnection,\n viewDefinitionId: Id64String,\n viewState: ViewState,\n name: string\n ): Promise<void>;\n}\n\n/** The base class for Frontstage content controls.\n * @public\n */\nexport class ContentControl extends ConfigurableUiControl {\n protected _reactNode: React.ReactNode;\n private _keyAdded = false;\n\n /** Creates an instance of ContentControl.\n * @param info An object that the subclass must pass to this base class.\n * @param options Options provided via the applicationData in a [[ContentProps]].\n */\n constructor(info: ConfigurableCreateInfo, options: any) {\n super(info, options);\n }\n\n /** Called when this ContentControl is activated */\n public onActivated(): void {}\n\n /** Called when this ContentControl is deactivated */\n public onDeactivated(): void {}\n\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\n public getType(): ConfigurableUiControlType {\n return ConfigurableUiControlType.Content;\n }\n\n /** Returns true if this control is a Viewport control. */\n public get isViewport(): boolean {\n return false;\n }\n /** Returns the ScreenViewport if isViewport is true */\n public get viewport(): ScreenViewport | undefined {\n return undefined;\n }\n\n protected getKeyedReactNode(): React.ReactNode {\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\n // istanbul ignore else\n if (!(this._reactNode as React.ReactElement<any>).key) {\n const additionalProps: any = { key: this.uniqueId };\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\n }\n this._keyAdded = true;\n }\n\n return this._reactNode;\n }\n\n protected getReactNode(): React.ReactNode {\n return this.getKeyedReactNode();\n }\n\n /** The React node associated with this control. */\n public get reactNode(): React.ReactNode {\n return this.getReactNode();\n }\n\n public set reactNode(r: React.ReactNode) {\n this._reactNode = r;\n }\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public get navigationAidControl(): string {\n return \"\";\n }\n}\n\n/**\n * @beta\n */\nexport class FloatingContentControl extends ContentControl {\n constructor(uniqueId: string, name: string, node: React.ReactNode) {\n super(new ConfigurableCreateInfo(name, uniqueId, name), undefined);\n this._reactNode = node;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAO/B,0DAAgD;AAChD,mFAIiD;AAUjD;;GAEG;AACH,mDAAmD;AACnD,MAAa,4BAA6B,SAAQ,wBAAyC;CAAG;AAA9F,oEAA8F;AAiB9F;;GAEG;AACH,MAAa,cAAe,SAAQ,6CAAqB;IAIvD;;;OAGG;IACH,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAPf,cAAS,GAAG,KAAK,CAAC;IAQ1B,CAA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E,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF;AALD,wDAKC","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 { UiEvent } from \"@itwin/appui-abstract\";\nimport {\n ConfigurableCreateInfo,\n ConfigurableUiControl,\n ConfigurableUiControlType,\n} from \"../configurableui/ConfigurableUiControl\";\n\n/** ControlControl Activated Event Args interface.\n * @public\n */\nexport interface ContentControlActivatedEventArgs {\n activeContentControl: ContentControl;\n oldContentControl?: ContentControl;\n}\n\n/** ContentControl Activated Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> {}\n\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\n * @public\n */\nexport interface SupportsViewSelectorChange {\n /** Returns true if this control supports reacting to ViewSelector changes. */\n supportsViewSelectorChange: boolean;\n /** Process a ViewSelector change. */\n processViewSelectorChange(\n iModel: IModelConnection,\n viewDefinitionId: Id64String,\n viewState: ViewState,\n name: string\n ): Promise<void>;\n}\n\n/** The base class for Frontstage content controls.\n * @public\n */\nexport class ContentControl extends ConfigurableUiControl {\n protected _reactNode: React.ReactNode;\n private _keyAdded = false;\n\n /** Creates an instance of ContentControl.\n * @param info An object that the subclass must pass to this base class.\n * @param options Options provided via the applicationData in a [[ContentProps]].\n */\n constructor(info: ConfigurableCreateInfo, options: any) {\n super(info, options);\n }\n\n /** Called when this ContentControl is activated */\n public onActivated(): void {}\n\n /** Called when this ContentControl is deactivated */\n public onDeactivated(): void {}\n\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\n public getType(): ConfigurableUiControlType {\n return ConfigurableUiControlType.Content;\n }\n\n /** Returns true if this control is a Viewport control. */\n public get isViewport(): boolean {\n return false;\n }\n /** Returns the ScreenViewport if isViewport is true */\n public get viewport(): ScreenViewport | undefined {\n return undefined;\n }\n\n protected getKeyedReactNode(): React.ReactNode {\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\n // istanbul ignore else\n if (!(this._reactNode as React.ReactElement<any>).key) {\n const additionalProps: any = { key: this.uniqueId };\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\n }\n this._keyAdded = true;\n }\n\n return this._reactNode;\n }\n\n protected getReactNode(): React.ReactNode {\n return this.getKeyedReactNode();\n }\n\n /** The React node associated with this control. */\n public get reactNode(): React.ReactNode {\n return this.getReactNode();\n }\n\n public set reactNode(r: React.ReactNode) {\n this._reactNode = r;\n }\n\n /** Get the NavigationAidControl associated with this ContentControl */\n public get navigationAidControl(): string {\n return \"\";\n }\n}\n\n/**\n * @beta\n */\nexport class FloatingContentControl extends ContentControl {\n constructor(uniqueId: string, name: string, node: React.ReactNode) {\n super(new ConfigurableCreateInfo(name, uniqueId, name), undefined);\n this._reactNode = node;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAMhG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EA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OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACxC,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,cAAc,CAAqC;IAE3D,IAAW,EAAE,WAEZ;gBAEW,iBAAiB,EAAE,iBAAiB;IAQhD,sFAAsF;IAC/E,iBAAiB,CACtB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS;IAqD7B,wEAAwE;IACjE,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAIpE,iFAAiF;IAC1E,eAAe,IAAI,KAAK,CAAC,SAAS,EAAE;IAkB3C,kGAAkG;IAC3F,qBAAqB,CAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,GACpB,cAAc,GAAG,SAAS;IAa7B,uFAAuF;IAChF,mBAAmB;IAI1B,4EAA4E;IACrE,kBAAkB,IAAI,cAAc,EAAE;IAe7C,6CAA6C;IACtC,uBAAuB,IAAI,IAAI;IAItC,uCAAuC;IAChC,iBAAiB,IAAI,IAAI;IAEhC,0CAA0C;IACnC,oBAAoB,IAAI,IAAI;IAInC;;OAEG;IACI,MAAM,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,iBAAiB;IA6BnE;;OAEG;IACI,YAAY,IAAI,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC;CAczD"}
|
|
@@ -71,6 +71,7 @@ class ContentGroup {
|
|
|
71
71
|
if (contentControl) {
|
|
72
72
|
if (contentControl.getType() !== ConfigurableUiControl_1.ConfigurableUiControlType.Content &&
|
|
73
73
|
contentControl.getType() !== ConfigurableUiControl_1.ConfigurableUiControlType.Viewport) {
|
|
74
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
74
75
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`);
|
|
75
76
|
}
|
|
76
77
|
contentControl.initialize();
|
|
@@ -147,6 +148,7 @@ class ContentGroup {
|
|
|
147
148
|
const classId = InternalConfigurableUiManager_1.InternalConfigurableUiManager.getConstructorClassId(content.classId);
|
|
148
149
|
if (classId !== undefined)
|
|
149
150
|
content.classId = classId;
|
|
151
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
150
152
|
else
|
|
151
153
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);
|
|
152
154
|
if (contentCallback)
|