@itwin/appui-react 4.8.0 → 4.9.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +6 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.scss +2 -0
- package/lib/cjs/appui-react/accudraw/SquareButton.d.ts +3 -1
- package/lib/cjs/appui-react/accudraw/SquareButton.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/SquareButton.js +1 -4
- package/lib/cjs/appui-react/accudraw/SquareButton.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +25 -7
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +19 -15
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.js +1 -0
- package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js +2 -0
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +1 -0
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +1 -0
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -0
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -0
- package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js +1 -0
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.js +3 -3
- package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.js +2 -0
- package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js +8 -0
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.js +1 -0
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +8 -2
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +25 -8
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +15 -4
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +2 -3
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.scss +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +5 -5
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
- package/lib/cjs/appui-react/messages/InputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/InputField.js +2 -3
- package/lib/cjs/appui-react/messages/InputField.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageLabel.js +2 -2
- package/lib/cjs/appui-react/messages/MessageLabel.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.d.ts +15 -5
- package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +31 -39
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageRenderer.d.ts +8 -0
- package/lib/cjs/appui-react/messages/MessageRenderer.d.ts.map +1 -0
- package/lib/cjs/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +60 -14
- package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -0
- package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/Pointer.js +4 -3
- package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
- package/lib/cjs/appui-react/messages/getToastCategory.d.ts +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +1 -0
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +2 -0
- package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.js +1 -2
- package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -2
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.js +1 -0
- package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/cjs/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/ReducerRegistry.js +1 -0
- package/lib/cjs/appui-react/redux/ReducerRegistry.js.map +1 -1
- package/lib/cjs/appui-react/redux/StateManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/StateManager.js +1 -0
- package/lib/cjs/appui-react/redux/StateManager.js.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
- package/lib/cjs/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/MenuItem.js +1 -0
- package/lib/cjs/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +19 -18
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts +13 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.js +21 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelState.js.map +1 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +6 -5
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.scss +1 -3
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +3 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +8 -8
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
- package/lib/cjs/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolsettings/ToolInformation.js +1 -0
- package/lib/cjs/appui-react/toolsettings/ToolInformation.js.map +1 -1
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +16 -13
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +16 -33
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +243 -386
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.scss +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/useWidget.d.ts +17 -0
- package/lib/cjs/appui-react/widgets/useWidget.d.ts.map +1 -0
- package/lib/cjs/appui-react/widgets/useWidget.js +70 -0
- package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -0
- package/lib/cjs/appui-react.d.ts +2 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +2 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +6 -0
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +4 -2
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +17 -29
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.scss +10 -17
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.scss +2 -0
- package/lib/esm/appui-react/accudraw/SquareButton.d.ts +3 -1
- package/lib/esm/appui-react/accudraw/SquareButton.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/SquareButton.js +1 -4
- package/lib/esm/appui-react/accudraw/SquareButton.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +25 -7
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +19 -15
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +2 -0
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.js +1 -0
- package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js +2 -0
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +1 -0
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +1 -0
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -0
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/CursorInformation.js +1 -0
- package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -0
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -0
- package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.js +4 -4
- package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.js +2 -0
- package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js +8 -0
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.js +1 -0
- package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +8 -2
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +24 -7
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +15 -4
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +2 -4
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js +2 -3
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.scss +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -0
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -0
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js.map +1 -1
- package/lib/esm/appui-react/messages/InputField.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/InputField.js +3 -4
- package/lib/esm/appui-react/messages/InputField.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageLabel.js +2 -2
- package/lib/esm/appui-react/messages/MessageLabel.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.d.ts +15 -5
- package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +31 -39
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageRenderer.d.ts +8 -0
- package/lib/esm/appui-react/messages/MessageRenderer.d.ts.map +1 -0
- package/lib/esm/appui-react/messages/{ActivityMessage.js → MessageRenderer.js} +58 -12
- package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -0
- package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/Pointer.js +5 -4
- package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
- package/lib/esm/appui-react/messages/getToastCategory.d.ts +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -0
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +1 -0
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +2 -0
- package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.js +2 -3
- package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.js +2 -3
- package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.js +1 -0
- package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/esm/appui-react/redux/ReducerRegistry.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/ReducerRegistry.js +1 -0
- package/lib/esm/appui-react/redux/ReducerRegistry.js.map +1 -1
- package/lib/esm/appui-react/redux/StateManager.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/StateManager.js +1 -0
- package/lib/esm/appui-react/redux/StateManager.js.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.scss +1 -4
- package/lib/esm/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/MenuItem.js +1 -0
- package/lib/esm/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelConfig.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +5 -9
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +15 -14
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.d.ts.map +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.js +18 -0
- package/lib/esm/appui-react/stagepanels/StagePanelState.js.map +1 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +6 -5
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.scss +1 -3
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
- package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.scss +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +3 -12
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +3 -1
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +5 -5
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js +1 -0
- package/lib/esm/appui-react/toolsettings/InternalToolSettingsManager.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/ToolInformation.d.ts.map +1 -1
- package/lib/esm/appui-react/toolsettings/ToolInformation.js +1 -0
- package/lib/esm/appui-react/toolsettings/ToolInformation.js.map +1 -1
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts +1 -0
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.d.ts.map +1 -1
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +16 -13
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +16 -33
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +244 -382
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.scss +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/useWidget.d.ts +17 -0
- package/lib/esm/appui-react/widgets/useWidget.d.ts.map +1 -0
- package/lib/esm/appui-react/widgets/useWidget.js +66 -0
- package/lib/esm/appui-react/widgets/useWidget.js.map +1 -0
- package/lib/esm/appui-react.d.ts +2 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +2 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +16 -17
- package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +0 -10
- package/lib/cjs/appui-react/messages/ActivityMessage.d.ts.map +0 -1
- package/lib/cjs/appui-react/messages/ActivityMessage.js.map +0 -1
- package/lib/cjs/appui-react/messages/MessageSpan.d.ts +0 -15
- package/lib/cjs/appui-react/messages/MessageSpan.d.ts.map +0 -1
- package/lib/cjs/appui-react/messages/MessageSpan.js +0 -23
- package/lib/cjs/appui-react/messages/MessageSpan.js.map +0 -1
- package/lib/esm/appui-react/messages/ActivityMessage.d.ts +0 -10
- package/lib/esm/appui-react/messages/ActivityMessage.d.ts.map +0 -1
- package/lib/esm/appui-react/messages/ActivityMessage.js.map +0 -1
- package/lib/esm/appui-react/messages/MessageSpan.d.ts +0 -15
- package/lib/esm/appui-react/messages/MessageSpan.d.ts.map +0 -1
- package/lib/esm/appui-react/messages/MessageSpan.js +0 -18
- package/lib/esm/appui-react/messages/MessageSpan.js.map +0 -1
- /package/lib/cjs/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
- /package/lib/esm/appui-react/configurableui/{configurableui.scss → ConfigurableUiContent.scss} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardPopup.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/CardPopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,4BAA0B;AAC1B,+BAA+B;AAC/B,2CAAoC;AACpC,6CAAkC;AASlC,
|
|
1
|
+
{"version":3,"file":"CardPopup.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/CardPopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,4BAA0B;AAC1B,+BAA+B;AAC/B,2CAAoC;AACp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O,EAAC,SAAS,IAAE,UAAU,CAAQ,CAAC;SACzD;KACF;IAED,MAAM,OAAO,GAAG,IAAA,6BAAc,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAC9C,KAAK,CAAC,OAAO,CAAC,SAAS,CACxB,CAAC,CAAC,CAAC,CACF,oBAAC,4BAAe,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAC5C,CAAC;IAEF,OAAO,CACL;QACE,6BAAK,SAAS,EAAC,mBAAmB;YAC/B,KAAK,CAAC,KAAK,IAAI,CACd;gBACG,SAAS;gBACV,6BAAK,SAAS,EAAC,eAAe,GAAG,CAChC,CACJ;YACA,OAAO,CACJ;QACL,KAAK,CAAC,KAAK,IAAI,CACd;YACE,6BAAK,SAAS,EAAC,qBAAqB,GAAG;YACvC,oBAAC,sCAAmB,CAAC,8CAA8C;gBACjE,SAAS,EAAE,4BAAS,CAAC,MAAM,EAC3B,cAAc,EAAE,wCAAqB,CAAC,KAAK,EAC3C,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,kBAAkB,EAAE,IAAI,EACxB,qBAAqB,EAAE,wCAAqB,CAAC,WAAW,EACxD,cAAc,EAAE,KAAK,CAAC,cAAc,GACpC,CACD,CACJ,CACA,CACJ,CAAC;AACJ,CAAC;AA9CD,oBA8CC","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 Popup\n */\n\nimport \"./CardPopup.scss\";\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport { Key } from \"ts-key-enum\";\nimport type {\n CommonToolbarItem,\n OnCancelFunc,\n OnItemExecutedFunc,\n PropertyRecord,\n RelativePosition,\n} from \"@itwin/appui-abstract\";\nimport type { Orientation, SizeProps } from \"@itwin/core-react\";\nimport {\n DivWithOutsideClick,\n FocusTrap,\n MessageRenderer,\n Point,\n Size,\n} from \"@itwin/core-react\";\nimport { Text } from \"@itwin/itwinui-react\";\nimport { CursorPopup } from \"../cursor/cursorpopup/CursorPopup\";\nimport type { PopupContentType, PopupPropsBase } from \"./PopupManager\";\nimport { isReactContent, PopupManager } from \"./PopupManager\";\nimport { PositionPopup } from \"./PositionPopup\";\nimport {\n Direction,\n PropertyValueRendererManager,\n ToolbarOpacitySetting,\n ToolbarPanelAlignment,\n ToolbarWithOverflow,\n} from \"@itwin/components-react\";\n\n/** Props for defining a CardPopup editor\n * @beta */\nexport interface CardPopupProps extends PopupPropsBase {\n content: PopupContentType;\n title: string | PropertyRecord | undefined;\n items: CommonToolbarItem[] | undefined;\n relativePosition: RelativePosition;\n orientation: Orientation;\n onCancel: OnCancelFunc;\n onItemExecuted: OnItemExecutedFunc;\n}\n\n/** @internal */\ninterface CardPopupState {\n size: Size;\n}\n\n/** Popup component for Input Editor\n * @beta\n */\nexport class CardPopup extends React.PureComponent<\n CardPopupProps,\n CardPopupState\n> {\n /** @internal */\n public override readonly state = {\n size: new Size(-1, -1),\n };\n\n private _onSizeKnown = (newSize: SizeProps) => {\n // istanbul ignore else\n if (!this.state.size.equals(newSize))\n this.setState({ size: Size.create(newSize) });\n };\n\n private _handleKeyDown = (event: React.KeyboardEvent): void => {\n switch (event.key) {\n case Key.Escape:\n this._cancel();\n break;\n }\n };\n\n private _cancel() {\n // istanbul ignore else\n if (this.props.onCancel) {\n this.props.onCancel();\n }\n }\n\n public override render() {\n let point = PopupManager.getPopupPosition(\n this.props.el,\n this.props.pt,\n new Point(),\n this.state.size\n );\n const popupRect = CursorPopup.getPopupRect(\n point,\n this.props.offset,\n this.state.size,\n this.props.relativePosition\n );\n point = new Point(popupRect.left, popupRect.top);\n\n return (\n <PositionPopup\n key={this.props.id}\n className={classnames(\"uifw-no-border\", \"uifw-card\")}\n point={point}\n onSizeKnown={this._onSizeKnown}\n >\n <DivWithOutsideClick\n onOutsideClick={this.props.onCancel}\n onKeyDown={this._handleKeyDown}\n >\n <FocusTrap active={true} returnFocusOnDeactivate={true}>\n <Card\n content={this.props.content}\n title={this.props.title}\n items={this.props.items}\n onItemExecuted={this.props.onItemExecuted}\n />\n </FocusTrap>\n </DivWithOutsideClick>\n </PositionPopup>\n );\n }\n}\n\n/** Props defining a Card component\n * @beta */\nexport interface CardProps {\n content: PopupContentType;\n title: string | PropertyRecord | undefined;\n items: CommonToolbarItem[] | undefined;\n onItemExecuted: OnItemExecutedFunc;\n}\n\n/** Card component\n * @beta */\nexport function Card(props: CardProps) {\n let titleNode: React.ReactNode;\n // istanbul ignore else\n if (props.title) {\n if (typeof props.title === \"string\")\n titleNode = <Text variant=\"leading\">{props.title}</Text>;\n else {\n const propertyValueRendererManager =\n PropertyValueRendererManager.defaultManager;\n const titleValue = propertyValueRendererManager.render(props.title);\n titleNode = <Text variant=\"leading\">{titleValue}</Text>;\n }\n }\n\n const content = isReactContent(props.content) ? (\n props.content.reactNode\n ) : (\n <MessageRenderer message={props.content} />\n );\n\n return (\n <>\n <div className=\"uifw-card-content\">\n {props.title && (\n <>\n {titleNode}\n <div className=\"uifw-card-gap\" />\n </>\n )}\n {content}\n </div>\n {props.items && (\n <>\n <div className=\"uifw-card-separator\" />\n <ToolbarWithOverflow // eslint-disable-line deprecation/deprecation\n expandsTo={Direction.Bottom}\n panelAlignment={ToolbarPanelAlignment.Start}\n items={props.items}\n useDragInteraction={true}\n toolbarOpacitySetting={ToolbarOpacitySetting.Transparent}\n onItemExecuted={props.onItemExecuted}\n />\n </>\n )}\n </>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLElementPopup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/HTMLElementPopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"HTMLElementPopup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/HTMLElementPopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAIL,IAAI,EACL,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD,aAAa;AACb,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,OAAO,EAAE,WAAW,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,gBAAgB;AAChB,UAAU,qBAAqB;IAC7B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CACvD,qBAAqB,EACrB,qBAAqB,CACtB;IACC,gBAAgB;IAChB,SAAyB,KAAK;;MAE5B;IAEF,OAAO,CAAC,YAAY,CAIlB;IAEc,MAAM;CA4BvB"}
|
|
@@ -13,7 +13,6 @@ const core_react_1 = require("@itwin/core-react");
|
|
|
13
13
|
const CursorPopup_1 = require("../cursor/cursorpopup/CursorPopup");
|
|
14
14
|
const PopupManager_1 = require("./PopupManager");
|
|
15
15
|
const PositionPopup_1 = require("./PositionPopup");
|
|
16
|
-
const MessageSpan_1 = require("../messages/MessageSpan");
|
|
17
16
|
/** Popup component for HTMLElement
|
|
18
17
|
* @alpha
|
|
19
18
|
*/
|
|
@@ -36,7 +35,7 @@ class HTMLElementPopup extends React.PureComponent {
|
|
|
36
35
|
point = new core_react_1.Point(popupRect.left, popupRect.top);
|
|
37
36
|
return (React.createElement(PositionPopup_1.PositionPopup, { key: this.props.id, className: "uifw-no-border", point: point, onSizeKnown: this._onSizeKnown },
|
|
38
37
|
React.createElement(core_react_1.DivWithOutsideClick, { onOutsideClick: this.props.onCancel },
|
|
39
|
-
React.createElement(
|
|
38
|
+
React.createElement(core_react_1.MessageRenderer, { message: this.props.element }))));
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
exports.HTMLElementPopup = HTMLElementPopup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLElementPopup.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/HTMLElementPopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAG/B,
|
|
1
|
+
{"version":3,"file":"HTMLElementPopup.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/HTMLElementPopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAG/B,kDAK2B;AAC3B,mEAAgE;AAEhE,iDAA8C;AAC9C,mDAAgD;AAehD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK,CAAC,aAG3C;IAHD;;QAIE,gBAAgB;QACS,UAAK,GAAG;YAC/B,IAAI,EAAE,IAAI,iBAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACvB,CAAC;QAEM,iBAAY,GAAG,CAAC,OAAkB,EAAE,EAAE;YAC5C,uBAAuB;YACvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;gBAClC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC;IA8BJ,CAAC;IA5BiB,MAAM;QACpB,IAAI,KAAK,GAAG,2BAAY,CAAC,gBAAgB,CACvC,IAAI,CAAC,KAAK,CAAC,EAAE,EACb,IAAI,CAAC,KAAK,CAAC,EAAE,EACb,IAAI,kBAAK,EAAE,EACX,IAAI,CAAC,KAAK,CAAC,IAAI,CAChB,CAAC;QACF,MAAM,SAAS,GAAG,yBAAW,CAAC,YAAY,CACxC,KAAK,EACL,IAAI,CAAC,KAAK,CAAC,MAAM,EACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EACf,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAC5B,CAAC;QACF,KAAK,GAAG,IAAI,kBAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;QAEjD,OAAO,CACL,oBAAC,6BAAa,IACZ,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,SAAS,EAAC,gBAAgB,EAC1B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,YAAY;YAE9B,oBAAC,gCAAmB,IAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBACtD,oBAAC,4BAAe,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAI,CAC5B,CACR,CACjB,CAAC;IACJ,CAAC;CACF;AA3CD,4CA2CC","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 Popup\n */\n\nimport * as React from \"react\";\nimport type { OnCancelFunc, RelativePosition } from \"@itwin/appui-abstract\";\nimport type { Orientation, SizeProps } from \"@itwin/core-react\";\nimport {\n DivWithOutsideClick,\n MessageRenderer,\n Point,\n Size,\n} from \"@itwin/core-react\";\nimport { CursorPopup } from \"../cursor/cursorpopup/CursorPopup\";\nimport type { PopupPropsBase } from \"./PopupManager\";\nimport { PopupManager } from \"./PopupManager\";\nimport { PositionPopup } from \"./PositionPopup\";\n\n/** @alpha */\nexport interface HTMLElementPopupProps extends PopupPropsBase {\n element: HTMLElement;\n relativePosition: RelativePosition;\n orientation: Orientation;\n onCancel: OnCancelFunc;\n}\n\n/** @internal */\ninterface HTMLElementPopupState {\n size: Size;\n}\n\n/** Popup component for HTMLElement\n * @alpha\n */\nexport class HTMLElementPopup extends React.PureComponent<\n HTMLElementPopupProps,\n HTMLElementPopupState\n> {\n /** @internal */\n public override readonly state = {\n size: new Size(-1, -1),\n };\n\n private _onSizeKnown = (newSize: SizeProps) => {\n // istanbul ignore else\n if (!this.state.size.equals(newSize))\n this.setState({ size: Size.create(newSize) });\n };\n\n public override render() {\n let point = PopupManager.getPopupPosition(\n this.props.el,\n this.props.pt,\n new Point(),\n this.state.size\n );\n const popupRect = CursorPopup.getPopupRect(\n point,\n this.props.offset,\n this.state.size,\n this.props.relativePosition\n );\n point = new Point(popupRect.left, popupRect.top);\n\n return (\n <PositionPopup\n key={this.props.id}\n className=\"uifw-no-border\"\n point={point}\n onSizeKnown={this._onSizeKnown}\n >\n <DivWithOutsideClick onOutsideClick={this.props.onCancel}>\n <MessageRenderer message={this.props.element} />\n </DivWithOutsideClick>\n </PositionPopup>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/PopupManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EAEV,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EAEd,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,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BAAwB,EACtC,EAAE,EAAE,WAAW,EACf,EAAE,EAAE,KAAK,EACT,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO;WA0BI,iBAAiB,IAAI,OAAO;WAI5B,gBAAgB,CAC5B,EAAE,EAAE,WAAW,EACf,EAAE,EAAE,KAAK,EACT,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,SAAS,GACd,KAAK;CAYT;AAED,gBAAgB;AAChB,UAAU,kBAAkB;IAC1B,cAAc,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,kBAAkB,CAAC;IACxE,gBAAgB;IAChB,SAAyB,KAAK,EAAE,kBAAkB,CAGhD;IAEc,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAO5C,OAAO,CAAC,aAAa,CAEnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAsBzC,OAAO,CAAC,yBAAyB,CAE/B;CACH"}
|
|
@@ -23,6 +23,7 @@ const ToolSettingsPopup_1 = require("./ToolSettingsPopup");
|
|
|
23
23
|
/** Popups Changed Event class.
|
|
24
24
|
* @public
|
|
25
25
|
*/
|
|
26
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
26
27
|
class PopupsChangedEvent extends appui_abstract_1.UiEvent {
|
|
27
28
|
}
|
|
28
29
|
exports.PopupsChangedEvent = PopupsChangedEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupManager.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/PopupManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAa7C,0DAI+B;AAE/B,kDAA2D;AAC3D,kEAAwE;AAExE,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AAE,CAAC,CAAC;QACrE,CAAC,CAAC;QAwBM,8BAAyB,GAAG,CAAC,IAA4B,EAAE,EAAE;YACnE,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,CAAC;IACJ,CAAC;IA3CiB,iBAAiB;QAC/B,qBAAM,CAAC,OAAO,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC;QACxD,YAAY,CAAC,oBAAoB,CAAC,WAAW,CAC3C,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,qBAAM,CAAC,OAAO,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;QAC3D,YAAY,CAAC,oBAAoB,CAAC,cAAc,CAC9C,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAMe,MAAM;QACpB,IAAI,YAAY,CAAC,UAAU,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAE9C,OAAO,CACL,6BACE,SAAS,EAAC,oCAAoC,EAC9C,GAAG,EAAE,IAAI,CAAC,aAAa,IAEtB,IAAI,CAAC,KAAK,CAAC,cAAc;YACxB,IAAI,CAAC,KAAK,CAAC,MAAM;iBACd,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;iBACnE,GAAG,CAAC,CAAC,SAAoB,EAAE,EAAE;gBAC5B,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,SAAS,CAAC,EAAE,IAC9B,SAAS,CAAC,SAAS,CACL,CAClB,CAAC;YACJ,CAAC,CAAC,CACF,CACP,CAAC;IACJ,CAAC;CAKF;AAlDD,sCAkDC","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 Popup\n */\n\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport type {\n AbstractToolbarProps,\n DialogLayoutDataProvider,\n OnCancelFunc,\n OnItemExecutedFunc,\n OnValueCommitFunc,\n Primitives,\n PrimitiveValue,\n PropertyDescription,\n RelativePosition,\n} from \"@itwin/appui-abstract\";\nimport {\n PropertyRecord,\n PropertyValueFormat,\n UiEvent,\n} from \"@itwin/appui-abstract\";\nimport type { Point, SizeProps } from \"@itwin/core-react\";\nimport { Orientation, Rectangle } from \"@itwin/core-react\";\nimport { offsetAndContainInContainer } from \"@itwin/appui-layout-react\";\nimport type { KeyinEntry } from \"../uiadmin/FrameworkUiAdmin\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CardPopup } from \"./CardPopup\";\nimport { HTMLElementPopup } from \"./HTMLElementPopup\";\nimport { InputEditorCommitHandler, InputEditorPopup } from \"./InputEditorPopup\";\nimport { KeyinPalettePopup } from \"./KeyinPalettePopup\";\nimport { ToolbarPopup } from \"./ToolbarPopup\";\nimport { ToolSettingsPopup } from \"./ToolSettingsPopup\";\n\n// cSpell:ignore uiadmin\n\n/** Information maintained by PopupManager about a Popup\n * @public\n */\nexport interface PopupInfo {\n id: string;\n pt: XAndY;\n component: React.ReactNode;\n parentDocument: Document;\n}\n\n/** @public */\nexport interface PopupsChangedEventArgs {\n popups: ReadonlyArray<PopupInfo>;\n}\n\n/** Popups Changed Event class.\n * @public\n */\nexport class PopupsChangedEvent extends UiEvent<PopupsChangedEventArgs> {}\n\n/** Props for each popup managed by the PopupManager\n * @public\n */\nexport interface PopupPropsBase {\n id: string;\n el: HTMLElement;\n pt: XAndY;\n offset: XAndY;\n}\n\n/** Describes React based content\n * @public\n */\nexport interface ReactContent {\n reactNode: React.ReactNode;\n}\n\n/** Type for Popup Content\n * @public\n */\nexport type PopupContentType = HTMLElement | ReactContent;\n\n/** ReactContent type guard.\n * @internal\n */\nexport const isReactContent = (\n content: PopupContentType\n): content is ReactContent => {\n return (content as ReactContent).reactNode !== undefined;\n};\n\n/** Popup Manager class\n * @public\n */\nexport class PopupManager {\n private static _popups: ReadonlyArray<PopupInfo> = [];\n private static _editorId = \"InputEditor\";\n private static _toolbarId = \"Toolbar\";\n private static _htmlElementId = \"HTMLElement\";\n private static _cardId = \"Card\";\n private static _toolSettingsId = \"ToolSettings\";\n private static _keyPalettePopupId = \"KeyinPalette\";\n\n private static _defaultOffset = { x: 8, y: 8 };\n\n public static readonly onPopupsChangedEvent = new PopupsChangedEvent();\n\n public static get popupCount() {\n return this._popups.length;\n }\n public static get popups() {\n return this._popups;\n }\n\n public static set popups(popups: ReadonlyArray<PopupInfo>) {\n // istanbul ignore if\n if (this._popups === popups) return;\n this._popups = popups;\n this.onPopupsChangedEvent.emit({ popups });\n }\n\n /** @internal */\n public static clearPopups() {\n this.popups = [];\n }\n\n private static addPopup(popupInfo: PopupInfo): void {\n const popups = [...PopupManager._popups, popupInfo];\n this.popups = popups;\n }\n\n private static updatePopup(popupInfo: PopupInfo, itemIndex: number): void {\n // istanbul ignore if\n if (itemIndex < 0) return;\n\n const popups = [\n ...PopupManager._popups.slice(0, itemIndex),\n popupInfo,\n ...PopupManager._popups.slice(itemIndex + 1),\n ];\n this.popups = popups;\n }\n\n public static addOrUpdatePopup(popupInfo: PopupInfo): void {\n const itemIndex = PopupManager._popups.findIndex(\n (info: PopupInfo) => info.id === popupInfo.id\n );\n if (itemIndex >= 0) PopupManager.updatePopup(popupInfo, itemIndex);\n else PopupManager.addPopup(popupInfo);\n }\n\n public static removePopup(id: string): boolean {\n const index = PopupManager._popups.findIndex(\n (info: PopupInfo) => id === info.id\n );\n let result = true;\n\n if (index >= 0) {\n const popups = PopupManager._popups.filter((info: PopupInfo) => {\n return info.id !== id;\n });\n this.popups = popups;\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `removePopup: Could not find popup with id of '${id}'`\n );\n result = false;\n }\n\n return result;\n }\n\n public static get defaultOffset(): XAndY {\n return PopupManager._defaultOffset;\n }\n public static set defaultOffset(offset: XAndY) {\n PopupManager._defaultOffset = offset;\n }\n\n public static showInputEditor(\n el: HTMLElement,\n pt: XAndY,\n value: Primitives.Value,\n propertyDescription: PropertyDescription,\n onCommit: OnValueCommitFunc,\n onCancel: OnCancelFunc\n ): boolean {\n const primitiveValue: PrimitiveValue = {\n value,\n valueFormat: PropertyValueFormat.Primitive,\n };\n const record = new PropertyRecord(primitiveValue, propertyDescription);\n const commitHandler = new InputEditorCommitHandler(onCommit);\n const id = PopupManager._editorId;\n const component = (\n <InputEditorPopup\n id={id}\n el={el}\n pt={pt}\n offset={PopupManager.defaultOffset}\n record={record}\n onCancel={onCancel}\n commitHandler={commitHandler}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideInputEditor(): boolean {\n return PopupManager.removePopup(PopupManager._editorId);\n }\n\n public static showKeyinPalette(\n keyins: KeyinEntry[],\n el: HTMLElement,\n onItemExecuted?: OnItemExecutedFunc,\n onCancel?: OnCancelFunc\n ): boolean {\n const id = PopupManager._keyPalettePopupId;\n const component = (\n <KeyinPalettePopup\n keyins={keyins}\n id={id}\n el={el}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n // since the command palette popup is always at top center of specified HTML element and it does not need to move like\n // cursor popups just set pt to 0,0.\n const pt = { x: 0, y: 0 };\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideKeyinPalette(): boolean {\n return PopupManager.removePopup(PopupManager._keyPalettePopupId);\n }\n\n public static showToolbar(\n toolbarProps: AbstractToolbarProps,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._toolbarId;\n const component = (\n <ToolbarPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n items={toolbarProps.items}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideToolbar(): boolean {\n return PopupManager.removePopup(PopupManager._toolbarId);\n }\n\n public static showHTMLElement(\n displayElement: HTMLElement,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._htmlElementId;\n const component = (\n <HTMLElementPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n element={displayElement}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideHTMLElement(): boolean {\n return PopupManager.removePopup(PopupManager._htmlElementId);\n }\n\n public static showCard(\n content: PopupContentType,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._cardId;\n const component = (\n <CardPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n content={content}\n title={title}\n items={\n toolbarProps\n ? toolbarProps.items\n : /* istanbul ignore next */ undefined\n }\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideCard(): boolean {\n const index = PopupManager._popups.findIndex(\n (info: PopupInfo) => PopupManager._cardId === info.id\n );\n if (index >= 0) return PopupManager.removePopup(PopupManager._cardId);\n return false;\n }\n\n public static openToolSettings(\n dataProvider: DialogLayoutDataProvider,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._toolSettingsId;\n const component = (\n <ToolSettingsPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n dataProvider={dataProvider}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static closeToolSettings(): boolean {\n return PopupManager.removePopup(PopupManager._toolSettingsId);\n }\n\n public static getPopupPosition(\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n size: SizeProps\n ): Point {\n const containerBounds = Rectangle.create(el.getBoundingClientRect());\n const relativeBounds = Rectangle.createFromSize(size).offset(pt);\n const adjustedPosition: Point = offsetAndContainInContainer(\n relativeBounds,\n containerBounds.getSize(),\n offset\n );\n const position = adjustedPosition.offset(containerBounds.topLeft());\n\n return position;\n }\n}\n\n/** @internal */\ninterface PopupRendererState {\n parentDocument: Document | null;\n popups: ReadonlyArray<PopupInfo>;\n}\n\n/** Popup Renderer\n * @public\n */\nexport class PopupRenderer extends React.Component<{}, PopupRendererState> {\n /** @internal */\n public override readonly state: PopupRendererState = {\n parentDocument: null,\n popups: PopupManager.popups,\n };\n\n public override componentDidMount(): void {\n Logger.logInfo(\"PopupManager\", `mounting PopupManager`);\n PopupManager.onPopupsChangedEvent.addListener(\n this._handlePopupsChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n Logger.logInfo(\"PopupManager\", `un-mounting PopupManager`);\n PopupManager.onPopupsChangedEvent.removeListener(\n this._handlePopupsChangedEvent\n );\n }\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });\n };\n\n public override render(): React.ReactNode {\n if (PopupManager.popupCount <= 0) return null;\n\n return (\n <div\n className=\"appui-react-popup-render-container\"\n ref={this._handleRefSet}\n >\n {this.state.parentDocument &&\n this.state.popups\n .filter((info) => info.parentDocument === this.state.parentDocument)\n .map((popupInfo: PopupInfo) => {\n return (\n <React.Fragment key={popupInfo.id}>\n {popupInfo.component}\n </React.Fragment>\n );\n })}\n </div>\n );\n }\n\n private _handlePopupsChangedEvent = (args: PopupsChangedEventArgs) => {\n this.setState({ popups: args.popups });\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PopupManager.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/PopupManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,sDAA6C;AAa7C,0DAI+B;AAE/B,kDAA2D;AAC3D,kEAAwE;AAExE,gDAA6C;AAC7C,2CAAwC;AACxC,yDAAsD;AACtD,yDAAgF;AAChF,2DAAwD;AACxD,iDAA8C;AAC9C,2DAAwD;AAmBxD;;GAEG;AACH,mDAAmD;AACnD,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAwB1E;;GAEG;AACI,MAAM,cAAc,GAAG,CAC5B,OAAyB,EACA,EAAE;IAC3B,OAAQ,OAAwB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC3D,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB;AAEF;;GAEG;AACH,MAAa,YAAY;IAahB,MAAM,KAAK,UAAU;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IACM,MAAM,KAAK,MAAM;QACtB,OAA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C,cAAc,CAC9C,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAMe,MAAM;QACpB,IAAI,YAAY,CAAC,UAAU,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAE9C,OAAO,CACL,6BACE,SAAS,EAAC,oCAAoC,EAC9C,GAAG,EAAE,IAAI,CAAC,aAAa,IAEtB,IAAI,CAAC,KAAK,CAAC,cAAc;YACxB,IAAI,CAAC,KAAK,CAAC,MAAM;iBACd,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;iBACnE,GAAG,CAAC,CAAC,SAAoB,EAAE,EAAE;gBAC5B,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,SAAS,CAAC,EAAE,IAC9B,SAAS,CAAC,SAAS,CACL,CAClB,CAAC;YACJ,CAAC,CAAC,CACF,CACP,CAAC;IACJ,CAAC;CAKF;AAlDD,sCAkDC","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 Popup\n */\n\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { XAndY } from \"@itwin/core-geometry\";\nimport type {\n AbstractToolbarProps,\n DialogLayoutDataProvider,\n OnCancelFunc,\n OnItemExecutedFunc,\n OnValueCommitFunc,\n Primitives,\n PrimitiveValue,\n PropertyDescription,\n RelativePosition,\n} from \"@itwin/appui-abstract\";\nimport {\n PropertyRecord,\n PropertyValueFormat,\n UiEvent,\n} from \"@itwin/appui-abstract\";\nimport type { Point, SizeProps } from \"@itwin/core-react\";\nimport { Orientation, Rectangle } from \"@itwin/core-react\";\nimport { offsetAndContainInContainer } from \"@itwin/appui-layout-react\";\nimport type { KeyinEntry } from \"../uiadmin/FrameworkUiAdmin\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CardPopup } from \"./CardPopup\";\nimport { HTMLElementPopup } from \"./HTMLElementPopup\";\nimport { InputEditorCommitHandler, InputEditorPopup } from \"./InputEditorPopup\";\nimport { KeyinPalettePopup } from \"./KeyinPalettePopup\";\nimport { ToolbarPopup } from \"./ToolbarPopup\";\nimport { ToolSettingsPopup } from \"./ToolSettingsPopup\";\n\n// cSpell:ignore uiadmin\n\n/** Information maintained by PopupManager about a Popup\n * @public\n */\nexport interface PopupInfo {\n id: string;\n pt: XAndY;\n component: React.ReactNode;\n parentDocument: Document;\n}\n\n/** @public */\nexport interface PopupsChangedEventArgs {\n popups: ReadonlyArray<PopupInfo>;\n}\n\n/** Popups Changed Event class.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class PopupsChangedEvent extends UiEvent<PopupsChangedEventArgs> {}\n\n/** Props for each popup managed by the PopupManager\n * @public\n */\nexport interface PopupPropsBase {\n id: string;\n el: HTMLElement;\n pt: XAndY;\n offset: XAndY;\n}\n\n/** Describes React based content\n * @public\n */\nexport interface ReactContent {\n reactNode: React.ReactNode;\n}\n\n/** Type for Popup Content\n * @public\n */\nexport type PopupContentType = HTMLElement | ReactContent;\n\n/** ReactContent type guard.\n * @internal\n */\nexport const isReactContent = (\n content: PopupContentType\n): content is ReactContent => {\n return (content as ReactContent).reactNode !== undefined;\n};\n\n/** Popup Manager class\n * @public\n */\nexport class PopupManager {\n private static _popups: ReadonlyArray<PopupInfo> = [];\n private static _editorId = \"InputEditor\";\n private static _toolbarId = \"Toolbar\";\n private static _htmlElementId = \"HTMLElement\";\n private static _cardId = \"Card\";\n private static _toolSettingsId = \"ToolSettings\";\n private static _keyPalettePopupId = \"KeyinPalette\";\n\n private static _defaultOffset = { x: 8, y: 8 };\n\n public static readonly onPopupsChangedEvent = new PopupsChangedEvent();\n\n public static get popupCount() {\n return this._popups.length;\n }\n public static get popups() {\n return this._popups;\n }\n\n public static set popups(popups: ReadonlyArray<PopupInfo>) {\n // istanbul ignore if\n if (this._popups === popups) return;\n this._popups = popups;\n this.onPopupsChangedEvent.emit({ popups });\n }\n\n /** @internal */\n public static clearPopups() {\n this.popups = [];\n }\n\n private static addPopup(popupInfo: PopupInfo): void {\n const popups = [...PopupManager._popups, popupInfo];\n this.popups = popups;\n }\n\n private static updatePopup(popupInfo: PopupInfo, itemIndex: number): void {\n // istanbul ignore if\n if (itemIndex < 0) return;\n\n const popups = [\n ...PopupManager._popups.slice(0, itemIndex),\n popupInfo,\n ...PopupManager._popups.slice(itemIndex + 1),\n ];\n this.popups = popups;\n }\n\n public static addOrUpdatePopup(popupInfo: PopupInfo): void {\n const itemIndex = PopupManager._popups.findIndex(\n (info: PopupInfo) => info.id === popupInfo.id\n );\n if (itemIndex >= 0) PopupManager.updatePopup(popupInfo, itemIndex);\n else PopupManager.addPopup(popupInfo);\n }\n\n public static removePopup(id: string): boolean {\n const index = PopupManager._popups.findIndex(\n (info: PopupInfo) => id === info.id\n );\n let result = true;\n\n if (index >= 0) {\n const popups = PopupManager._popups.filter((info: PopupInfo) => {\n return info.id !== id;\n });\n this.popups = popups;\n } else {\n Logger.logError(\n UiFramework.loggerCategory(this),\n `removePopup: Could not find popup with id of '${id}'`\n );\n result = false;\n }\n\n return result;\n }\n\n public static get defaultOffset(): XAndY {\n return PopupManager._defaultOffset;\n }\n public static set defaultOffset(offset: XAndY) {\n PopupManager._defaultOffset = offset;\n }\n\n public static showInputEditor(\n el: HTMLElement,\n pt: XAndY,\n value: Primitives.Value,\n propertyDescription: PropertyDescription,\n onCommit: OnValueCommitFunc,\n onCancel: OnCancelFunc\n ): boolean {\n const primitiveValue: PrimitiveValue = {\n value,\n valueFormat: PropertyValueFormat.Primitive,\n };\n const record = new PropertyRecord(primitiveValue, propertyDescription);\n const commitHandler = new InputEditorCommitHandler(onCommit);\n const id = PopupManager._editorId;\n const component = (\n <InputEditorPopup\n id={id}\n el={el}\n pt={pt}\n offset={PopupManager.defaultOffset}\n record={record}\n onCancel={onCancel}\n commitHandler={commitHandler}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideInputEditor(): boolean {\n return PopupManager.removePopup(PopupManager._editorId);\n }\n\n public static showKeyinPalette(\n keyins: KeyinEntry[],\n el: HTMLElement,\n onItemExecuted?: OnItemExecutedFunc,\n onCancel?: OnCancelFunc\n ): boolean {\n const id = PopupManager._keyPalettePopupId;\n const component = (\n <KeyinPalettePopup\n keyins={keyins}\n id={id}\n el={el}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n // since the command palette popup is always at top center of specified HTML element and it does not need to move like\n // cursor popups just set pt to 0,0.\n const pt = { x: 0, y: 0 };\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideKeyinPalette(): boolean {\n return PopupManager.removePopup(PopupManager._keyPalettePopupId);\n }\n\n public static showToolbar(\n toolbarProps: AbstractToolbarProps,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._toolbarId;\n const component = (\n <ToolbarPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n items={toolbarProps.items}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideToolbar(): boolean {\n return PopupManager.removePopup(PopupManager._toolbarId);\n }\n\n public static showHTMLElement(\n displayElement: HTMLElement,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._htmlElementId;\n const component = (\n <HTMLElementPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n element={displayElement}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideHTMLElement(): boolean {\n return PopupManager.removePopup(PopupManager._htmlElementId);\n }\n\n public static showCard(\n content: PopupContentType,\n title: string | PropertyRecord | undefined,\n toolbarProps: AbstractToolbarProps | undefined,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onItemExecuted: OnItemExecutedFunc,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._cardId;\n const component = (\n <CardPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n content={content}\n title={title}\n items={\n toolbarProps\n ? toolbarProps.items\n : /* istanbul ignore next */ undefined\n }\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n onItemExecuted={onItemExecuted}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static hideCard(): boolean {\n const index = PopupManager._popups.findIndex(\n (info: PopupInfo) => PopupManager._cardId === info.id\n );\n if (index >= 0) return PopupManager.removePopup(PopupManager._cardId);\n return false;\n }\n\n public static openToolSettings(\n dataProvider: DialogLayoutDataProvider,\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n onCancel: OnCancelFunc,\n relativePosition: RelativePosition\n ): boolean {\n const id = PopupManager._toolSettingsId;\n const component = (\n <ToolSettingsPopup\n id={id}\n el={el}\n pt={pt}\n offset={offset}\n dataProvider={dataProvider}\n relativePosition={relativePosition}\n orientation={Orientation.Horizontal}\n onCancel={onCancel}\n />\n );\n\n const popupInfo: PopupInfo = {\n id,\n pt,\n component,\n parentDocument: el.ownerDocument,\n };\n PopupManager.addOrUpdatePopup(popupInfo);\n\n return true;\n }\n\n public static closeToolSettings(): boolean {\n return PopupManager.removePopup(PopupManager._toolSettingsId);\n }\n\n public static getPopupPosition(\n el: HTMLElement,\n pt: XAndY,\n offset: XAndY,\n size: SizeProps\n ): Point {\n const containerBounds = Rectangle.create(el.getBoundingClientRect());\n const relativeBounds = Rectangle.createFromSize(size).offset(pt);\n const adjustedPosition: Point = offsetAndContainInContainer(\n relativeBounds,\n containerBounds.getSize(),\n offset\n );\n const position = adjustedPosition.offset(containerBounds.topLeft());\n\n return position;\n }\n}\n\n/** @internal */\ninterface PopupRendererState {\n parentDocument: Document | null;\n popups: ReadonlyArray<PopupInfo>;\n}\n\n/** Popup Renderer\n * @public\n */\nexport class PopupRenderer extends React.Component<{}, PopupRendererState> {\n /** @internal */\n public override readonly state: PopupRendererState = {\n parentDocument: null,\n popups: PopupManager.popups,\n };\n\n public override componentDidMount(): void {\n Logger.logInfo(\"PopupManager\", `mounting PopupManager`);\n PopupManager.onPopupsChangedEvent.addListener(\n this._handlePopupsChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n Logger.logInfo(\"PopupManager\", `un-mounting PopupManager`);\n PopupManager.onPopupsChangedEvent.removeListener(\n this._handlePopupsChangedEvent\n );\n }\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });\n };\n\n public override render(): React.ReactNode {\n if (PopupManager.popupCount <= 0) return null;\n\n return (\n <div\n className=\"appui-react-popup-render-container\"\n ref={this._handleRefSet}\n >\n {this.state.parentDocument &&\n this.state.popups\n .filter((info) => info.parentDocument === this.state.parentDocument)\n .map((popupInfo: PopupInfo) => {\n return (\n <React.Fragment key={popupInfo.id}>\n {popupInfo.component}\n </React.Fragment>\n );\n })}\n </div>\n );\n }\n\n private _handlePopupsChangedEvent = (args: PopupsChangedEventArgs) => {\n this.setState({ popups: args.popups });\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReducerRegistry.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/ReducerRegistry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC;CAClD;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,qBAAqB,CAEf;IACd,OAAO,CAAC,SAAS,CAAmB;IAEpC,sHAAsH;;IAKtH,+CAA+C;IACxC,eAAe,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG;
|
|
1
|
+
{"version":3,"file":"ReducerRegistry.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/ReducerRegistry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC;CAClD;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,qBAAqB,CAEf;IACd,OAAO,CAAC,SAAS,CAAmB;IAEpC,sHAAsH;;IAKtH,+CAA+C;IACxC,eAAe,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG;IAiB3C;;OAEG;IACI,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI;IAIvE,0CAA0C;IACnC,WAAW;IAIlB;;OAEG;IACI,aAAa;CAOrB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,iBAAwB,CAAC"}
|
|
@@ -23,6 +23,7 @@ class ReducerRegistry {
|
|
|
23
23
|
/** Call to register a reducer and its name. */
|
|
24
24
|
registerReducer(name, reducer) {
|
|
25
25
|
if (this._reducers[name]) {
|
|
26
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
26
27
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `Redux Reducer with matching name of '${name}' is already registered`);
|
|
27
28
|
}
|
|
28
29
|
this._reducers = { ...this._reducers, [name]: reducer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReducerRegistry.js","sourceRoot":"","sources":["../../../../src/appui-react/redux/ReducerRegistry.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgD;AAChD,gDAA6C;AAS7C;;;;GAIG;AACH,MAAa,eAAe;IAM1B,sHAAsH;IACtH;QACE,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAED,+CAA+C;IACxC,eAAe,CACpB,IAAY,EACZ,OAAyC;QAEzC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YACxB,MAAM,IAAI,wBAAO,CACf,yBAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAChC,wCAAwC,IAAI,yBAAyB,CACtE,CAAC;SACH;QAED,IAAI,CAAC,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;QACxD,uBAAuB;QACvB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5C;IACH,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,QAA8C;QACrE,IAAI,CAAC,qBAAqB,GAAG,QAAQ,CAAC;IACxC,CAAC;IAED,0CAA0C;IACnC,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,aAAa;QAClB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,uBAAuB;QACvB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5C;IACH,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"ReducerRegistry.js","sourceRoot":"","sources":["../../../../src/appui-react/redux/ReducerRegistry.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,0DAAgD;AAChD,gDAA6C;AAS7C;;;;GAIG;AACH,MAAa,eAAe;IAM1B,sHAAsH;IACtH;QACE,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAED,+CAA+C;IACxC,eAAe,CACpB,IAAY,EACZ,OAAyC;QAEzC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YACxB,mDAAmD;YACnD,MAAM,IAAI,wBAAO,CACf,yBAAW,CAAC,cAAc,CAAC,IAAI,CAAC,EAChC,wCAAwC,IAAI,yBAAyB,CACtE,CAAC;SACH;QAED,IAAI,CAAC,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;QACxD,uBAAuB;QACvB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5C;IACH,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,QAA8C;QACrE,IAAI,CAAC,qBAAqB,GAAG,QAAQ,CAAC;IACxC,CAAC;IAED,0CAA0C;IACnC,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,aAAa;QAClB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,uBAAuB;QACvB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5C;IACH,CAAC;CACF;AArDD,0CAqDC;AAED;;GAEG;AACU,QAAA,uBAAuB,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module State\n */\n\nimport { UiError } from \"@itwin/appui-abstract\";\nimport { UiFramework } from \"../UiFramework\";\n\n/** NameToReducerMap used by Reducer Registry\n * @public\n */\nexport interface NameToReducerMap {\n [name: string]: (state: any, action: any) => any;\n}\n\n/** Redux Reducer Registry.\n * Follows the example at http://nicolasgallagher.com/redux-modules-and-code-splitting/\n * Allows for small modules to provide their own reducers so that the they can manage their own state\n * @beta\n */\nexport class ReducerRegistry {\n private _onReducerListChanged:\n | ((reducers: NameToReducerMap) => void)\n | undefined;\n private _reducers: NameToReducerMap;\n\n /** ReducerRegistry constructor that initializes an empty reducer map to be populated by called to registerReducer. */\n constructor() {\n this._reducers = {};\n }\n\n /** Call to register a reducer and its name. */\n public registerReducer(\n name: string,\n reducer: (state: any, action: any) => any\n ) {\n if (this._reducers[name]) {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `Redux Reducer with matching name of '${name}' is already registered`\n );\n }\n\n this._reducers = { ...this._reducers, [name]: reducer };\n // istanbul ignore else\n if (this._onReducerListChanged) {\n this._onReducerListChanged(this._reducers);\n }\n }\n\n /** Supports a single listener which should be the Redux store, see [[StoreManager]].\n * @internal\n */\n public setChangeListener(listener: (reducers: NameToReducerMap) => void) {\n this._onReducerListChanged = listener;\n }\n\n /** Returns map of registered Reducers. */\n public getReducers() {\n return this._reducers;\n }\n\n /** Clear reducers only required for unit testing\n * @internal\n */\n public clearReducers() {\n this._reducers = {};\n // istanbul ignore else\n if (this._onReducerListChanged) {\n this._onReducerListChanged(this._reducers);\n }\n }\n}\n\n/** ReducerRegistryInstance singleton instance of Reducer Registry\n * @beta\n */\nexport const ReducerRegistryInstance = new ReducerRegistry();\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/StateManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAItD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,cAAc,CAAC;CAChC;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAkB;IAC9C,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,OAAO,CAAC,MAAM,CAAC,eAAe,CAAyB;IAEvD;;;OAGG;gBACS,eAAe,CAAC,EAAE,gBAAgB;IAuC9C;;OAEG;WAEW,aAAa,CAAC,gBAAgB,UAAQ,GAAG,OAAO;IAa9D,+GAA+G;IAC/G,WAAkB,KAAK,IAAI,KAAK,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"StateManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/StateManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAItD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB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AK,KAAK;QACrB,IAAI,YAAY,CAAC,aAAa,EAAE,EAAE;YAChC,OAAO,YAAY,CAAC,eAAgB,CAAC,QAAQ,EAAE,CAAC;SACjD;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IAEO,gCAAgC,CACtC,6BAAgD,EAChD,eAAkC;QAElC,MAAM,WAAW,GAAG;YAClB,GAAG,eAAe;YAClB,GAAG,6BAA6B;SACjC,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,UAAU;QACtB,YAAY,CAAC,eAAe,GAAG,SAAS,CAAC;IAC3C,CAAC;;
|
|
1
|
+
{"version":3,"file":"StateManager.js","sourceRoot":"","sources":["../../../../src/appui-react/redux/StateManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAKH,iCAAqD;AACrD,sDAA6C;AAC7C,0DAAgD;AAEhD,qDAAoD;AAEpD,uDAA4D;AAU5D;;;;;GAKG;AACH,MAAa,YAAY;IAOvB;;;OAGG;IACH,YAAY,eAAkC;QAC5C,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;YACxC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC1C,kEAAkE;YAClE,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,gBAAgB,CAAC;gBAC1D,IAAI,CAAC,gBAAgB,GAAG;oBACtB,GAAG,eAAe;oBAClB,cAAc,EAAE,iCAAgB;iBACjC,CAAC;SACL;aAAM;YACL,IAAI,CAAC,gBAAgB,GAAG,EAAE,cAAc,EAAE,iCAAgB,EAAE,CAAC;SAC9D;QAED,MAAM,6BAA6B,GAAG,yCAAuB,CAAC,WAAW,EAAE,CAAC;QAC5E,IAAI,WAAW,GAAQ,IAAI,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SAClB;IACH,CAAC;IAEO,gCAAgC,CACtC,6BAAgD,EAChD,eAAkC;QAElC,MAAM,WAAW,GAAG;YAClB,GAAG,eAAe;YAClB,GAAG,6BAA6B;SACjC,CAAC;QAEF,OAAO,IAAA,uBAAe,EAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,UAAU;QACtB,YAAY,CAAC,eAAe,GAAG,SAAS,CAAC;IAC3C,CAAC;;AAzGc,0BAAa,GAAG,cAAc,CAAC;AADnC,oCAAY","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 State\n */\n\n// cSpell:ignore DEVTOOLS\n\nimport type { ReducersMapObject, Store } from \"redux\";\nimport { combineReducers, createStore } from \"redux\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiError } from \"@itwin/appui-abstract\";\nimport type { FrameworkState } from \"./FrameworkState\";\nimport { FrameworkReducer } from \"./FrameworkState\";\nimport type { NameToReducerMap } from \"./ReducerRegistry\";\nimport { ReducerRegistryInstance } from \"./ReducerRegistry\";\n\n/** Generic 'root' state for the appui-react package. Since this state contains common values needed by many applications\n * it is automatically added to the Redux store when using [[StateManager]].\n * @beta\n */\nexport interface FrameworkRootState {\n frameworkState: FrameworkState;\n}\n\n/**\n * Centralized state management class using Redux actions, reducers and store. This class monitors the ReducerRegistry and will\n * automatically update the store when a new reducer is registered. This allows the store to be incrementally constructed as modules\n * and/or extensions are loaded.\n * @public\n */\nexport class StateManager {\n private static _LOG_CATEGORY = \"StateManager\";\n private _store: Store<any>;\n private _defaultReducers: NameToReducerMap;\n\n private static _singletonStore: Store<any> | undefined;\n\n /**\n * StateManager construct.\n * @param defaultReducers Default set of Reducers used by the current application. If this object does not contain the [[FrameworkReducer]] it will automatically be added.\n */\n constructor(defaultReducers?: NameToReducerMap) {\n if (defaultReducers) {\n this._defaultReducers = defaultReducers;\n const keys = Object.keys(defaultReducers);\n // ensure frameworkState is included in the set of defaultReducers\n if (-1 === keys.findIndex((key) => key === \"frameworkState\"))\n this._defaultReducers = {\n ...defaultReducers,\n frameworkState: FrameworkReducer,\n };\n } else {\n this._defaultReducers = { frameworkState: FrameworkReducer };\n }\n\n const dynamicallyRegisteredReducers = ReducerRegistryInstance.getReducers();\n let allReducers: any = this.combineDynamicAndDefaultReducers(\n dynamicallyRegisteredReducers,\n this._defaultReducers\n );\n\n // create the Redux Store.\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n this._store = createStore(\n allReducers,\n (window as any).__REDUX_DEVTOOLS_EXTENSION__ &&\n (window as any).__REDUX_DEVTOOLS_EXTENSION__()\n );\n\n ReducerRegistryInstance.setChangeListener((newDynamicReducers) => {\n allReducers = this.combineDynamicAndDefaultReducers(\n newDynamicReducers,\n this._defaultReducers\n );\n this._store.replaceReducer(allReducers);\n });\n StateManager._singletonStore = this._store;\n }\n\n /** Method to test if the StateManager has been initialized.\n * @param suppressErrorLog If true and the StateManager is not initialized a log message will be output.\n */\n\n public static isInitialized(suppressErrorLog = false): boolean {\n if (!StateManager._singletonStore) {\n if (!suppressErrorLog)\n Logger.logError(\n StateManager._LOG_CATEGORY,\n \"Accessing store before it is created.\"\n );\n return false;\n } else {\n return true;\n }\n }\n\n /** Return the current Redux store. Useful when using connect method to connect a Ui Component to the store. */\n public static get store(): Store<any> {\n if (StateManager.isInitialized()) {\n return StateManager._singletonStore!;\n } else {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n StateManager._LOG_CATEGORY,\n `Redux Store has not been initialized`\n );\n }\n }\n\n /** Return the current state from the Redux store. */\n public static get state(): any {\n if (StateManager.isInitialized()) {\n return StateManager._singletonStore!.getState();\n } else {\n return undefined;\n }\n }\n\n private combineDynamicAndDefaultReducers(\n dynamicallyRegisteredReducers: ReducersMapObject,\n defaultReducers: ReducersMapObject\n ) {\n const allReducers = {\n ...defaultReducers,\n ...dynamicallyRegisteredReducers,\n };\n\n return combineReducers(allReducers);\n }\n\n /** To be used only in unit test\n * @internal\n */\n public static clearStore() {\n StateManager._singletonStore = undefined;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/MenuItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAElD;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,WAAW,CAAC,CAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAa;IAElC,uIAAuI;gBAC3H,KAAK,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,IAAI;
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/shared/MenuItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAElD;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,WAAW,CAAC,CAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAa;IAElC,uIAAuI;gBAC3H,KAAK,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,IAAI;IA+B1D,IAAW,EAAE,IAAI,MAAM,CAEtB;IAED,IAAW,OAAO,IAAI,QAAQ,EAAE,CAE/B;IAED,IAAW,UAAU,IAAI,mBAAmB,GAAG,SAAS,CAEvD;IAEM,aAAa,CAAC,EAAE,QAAQ,CAAC;IAEzB,UAAU,IAAI,IAAI;CAS1B;AAED;;GAEG;AACH,qBAAa,eAAe;WACZ,eAAe,CAC3B,aAAa,EAAE,aAAa,EAAE,EAC9B,WAAW,CAAC,EAAE,MAAM,IAAI,GACvB,QAAQ,EAAE;WAQC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE;IAY1E,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAgDlC"}
|
|
@@ -44,6 +44,7 @@ class MenuItem extends ItemDefBase_1.ItemDefBase {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
47
48
|
throw new appui_abstract_1.UiError(UiFramework_1.UiFramework.loggerCategory(this), `Either 'item' or 'submenu' must be specified for '${props.id}'.`);
|
|
48
49
|
}
|
|
49
50
|
this.iconRightSpec = props.iconRight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../../src/appui-react/shared/MenuItem.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA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,CAC1D,IAAI,CAAC,UAAU,CAChB,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,GAAG,CACL,oBAAC,4BAAe,IACd,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,GAAG,EACb,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACU,CACnB,CAAC;SACH;aAAM;YACL,uBAAuB;YACvB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAErD,IAAI,GAAG,CACL,oBAAC,2BAAc,IACb,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,IAEnB,KAAK,CACS,CAClB,CAAC;aACH;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAxED,0CAwEC","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 Item\n */\n\nimport * as React from \"react\";\nimport type { AbstractMenuItemProps } from \"@itwin/appui-abstract\";\nimport { ConditionalBooleanValue, UiError } from \"@itwin/appui-abstract\";\nimport type { IconSpec } from \"@itwin/core-react\";\nimport { ContextMenuItem, ContextSubMenu } from \"@itwin/core-react\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { ActionButtonItemDef } from \"./ActionButtonItemDef\";\nimport { CommandItemDef } from \"./CommandItemDef\";\nimport { ItemDefBase } from \"./ItemDefBase\";\n\n/** Menu Item Properties\n * @public\n */\nexport type MenuItemProps = AbstractMenuItemProps;\n\n/** Menu Item\n * @alpha\n */\nexport class MenuItem extends ItemDefBase {\n private _id = \"\";\n private _actionItem?: ActionButtonItemDef;\n private _submenu: MenuItem[];\n private _onSelection?: () => void;\n\n /** onSelection is an optional parameter typically supplied to allow menu parent to close context menu when a menu item is selected. */\n constructor(props: MenuItemProps, onSelection?: () => void) {\n super(props);\n\n this._id = props.id;\n this._submenu = new Array<MenuItem>();\n this._onSelection = onSelection;\n\n if (props.item) {\n this._actionItem = new CommandItemDef(props.item);\n\n // Copy over icon, label & badgeType from the item\n if (!this.iconSpec) this.iconSpec = this._actionItem.iconSpec;\n if (!this.label) this.setLabel(this._actionItem.label);\n if (!this.badgeType) this.badgeType = this._actionItem.badgeType;\n if (!this.isDisabled) this.isDisabled = this._actionItem.isDisabled;\n } else if (props.submenu) {\n props.submenu.forEach((childProps: MenuItemProps) => {\n const childItem = new MenuItem(childProps, onSelection);\n this._submenu.push(childItem);\n });\n } else {\n // eslint-disable-next-line deprecation/deprecation\n throw new UiError(\n UiFramework.loggerCategory(this),\n `Either 'item' or 'submenu' must be specified for '${props.id}'.`\n );\n }\n\n this.iconRightSpec = props.iconRight;\n }\n\n public get id(): string {\n return this._id;\n }\n\n public get submenu(): MenuItem[] {\n return this._submenu;\n }\n\n public get actionItem(): ActionButtonItemDef | undefined {\n return this._actionItem;\n }\n\n public iconRightSpec?: IconSpec;\n\n public itemPicked(): void {\n setTimeout(() => {\n // istanbul ignore else\n if (this._actionItem) this._actionItem.execute();\n });\n\n // istanbul ignore else\n if (this._onSelection) this._onSelection();\n }\n}\n\n/** Menu Item helper methods\n * @alpha\n */\nexport class MenuItemHelpers {\n public static createMenuItems(\n itemPropsList: MenuItemProps[],\n onSelection?: () => void\n ): MenuItem[] {\n const menuItems = new Array<MenuItem>();\n itemPropsList.forEach((itemProps: MenuItemProps) => {\n menuItems.push(new MenuItem(itemProps, onSelection));\n });\n return menuItems;\n }\n\n public static createMenuItemNodes(itemList: MenuItem[]): React.ReactNode[] {\n const itemNodes: React.ReactNode[] = [];\n\n itemList.forEach((item: MenuItem, index: number) => {\n const reactItem = this.createMenuItemNode(item, index);\n // istanbul ignore else\n if (reactItem) itemNodes.push(reactItem);\n });\n\n return itemNodes;\n }\n\n private static createMenuItemNode(\n item: MenuItem,\n index: number\n ): React.ReactNode {\n let node: React.ReactNode = null;\n const label = item.label;\n const iconSpec = item.iconSpec;\n const iconRightSpec = item.iconRightSpec;\n const badgeType = item.badgeType;\n const isDisabled: boolean = ConditionalBooleanValue.getValue(\n item.isDisabled\n );\n\n if (item.actionItem) {\n const sel = () => item.itemPicked();\n node = (\n <ContextMenuItem\n key={index}\n onSelect={sel}\n icon={iconSpec}\n iconRight={iconRightSpec}\n badgeType={badgeType}\n disabled={isDisabled}\n >\n {label}\n </ContextMenuItem>\n );\n } else {\n // istanbul ignore else\n if (item.submenu && item.submenu.length > 0) {\n const items = this.createMenuItemNodes(item.submenu);\n\n node = (\n <ContextSubMenu\n key={index}\n icon={iconSpec}\n label={label}\n badgeType={badgeType}\n disabled={isDisabled}\n >\n {items}\n </ContextSubMenu>\n );\n }\n }\n\n return node;\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Frontstage
|
|
3
3
|
*/
|
|
4
4
|
import type { WidgetConfig } from "../widgets/WidgetConfig";
|
|
5
|
-
import type { StagePanelState
|
|
5
|
+
import type { StagePanelState } from "./StagePanelState";
|
|
6
6
|
/** Configuration from which a stage panel is created.
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanelConfig.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"StagePanelConfig.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4GAA4G;IAC5G,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC;IACxC,iCAAiC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IACzC,iCAAiC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,uBAAuB,CAAC;IACzC,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanelConfig.js","sourceRoot":"","sources":["../../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","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 Frontstage\n */\n\nimport type { WidgetConfig } from \"../widgets/WidgetConfig\";\nimport type { StagePanelState
|
|
1
|
+
{"version":3,"file":"StagePanelConfig.js","sourceRoot":"","sources":["../../../../src/appui-react/stagepanels/StagePanelConfig.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","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 Frontstage\n */\n\nimport type { WidgetConfig } from \"../widgets/WidgetConfig\";\nimport type { StagePanelState } from \"./StagePanelState\";\n\n/** Configuration from which a stage panel is created.\n * @public\n */\nexport interface StagePanelConfig {\n /** Default Panel state. Controls how the panel is initially displayed. Defaults to StagePanelState.Open. */\n readonly defaultState?: StagePanelState;\n /** Maximum size of the panel. */\n readonly maxSize?: StagePanelMaxSizeSpec;\n /** Minimum size of the panel. */\n readonly minSize?: number;\n /** Indicates whether the panel is pinned. Defaults to true. */\n readonly pinned?: boolean;\n /** Indicates whether the panel is resizable. Defaults to true. */\n readonly resizable?: boolean;\n /** Default size of the panel. */\n readonly size?: number;\n /** Configuration of the panel sections. */\n readonly sections?: StagePanelSectionsConfig;\n}\n\n/** Configuration from which a stage panel section is created.\n * @public\n */\nexport type StagePanelSectionConfig = ReadonlyArray<WidgetConfig>;\n\n/** Configuration from which stage panel sections are created.\n * @public\n */\nexport interface StagePanelSectionsConfig {\n /** Configuration of the `start` section. */\n readonly start?: StagePanelSectionConfig;\n /** Configuration of the `end` section. */\n readonly end?: StagePanelSectionConfig;\n}\n\n/** Available units of panel max size. Pixels or percentage of App size.\n * @note Percentage of App `height` is used for top/bottom panel and percentage of App `width` is used for left/right panel.\n * @public\n */\nexport type StagePanelMaxSizeSpec = number | { percentage: number };\n"]}
|
|
@@ -8,15 +8,7 @@ import { WidgetHost } from "../widgets/WidgetHost";
|
|
|
8
8
|
import type { StagePanelConfig, StagePanelSectionConfig } from "./StagePanelConfig";
|
|
9
9
|
import { StagePanelLocation } from "./StagePanelLocation";
|
|
10
10
|
import { StagePanelSection } from "./StagePanelSection";
|
|
11
|
-
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export declare enum StagePanelState {
|
|
15
|
-
Off = 0,
|
|
16
|
-
Minimized = 1,
|
|
17
|
-
Open = 2,
|
|
18
|
-
Popup = 3
|
|
19
|
-
}
|
|
11
|
+
import { StagePanelState } from "./StagePanelState";
|
|
20
12
|
/** Panel state changed event args interface.
|
|
21
13
|
* @public
|
|
22
14
|
*/
|
|
@@ -84,6 +76,10 @@ export declare class StagePanelDef extends WidgetHost {
|
|
|
84
76
|
get defaultState(): StagePanelState;
|
|
85
77
|
/** @internal */
|
|
86
78
|
get defaultSize(): number | undefined;
|
|
79
|
+
/** @internal */
|
|
80
|
+
get defaultPinned(): boolean;
|
|
81
|
+
/** @internal */
|
|
82
|
+
get defaultResizable(): boolean;
|
|
87
83
|
/** Gets the list of Widgets. */
|
|
88
84
|
get widgetDefs(): ReadonlyArray<WidgetDef>;
|
|
89
85
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagePanelDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/stagepanels/StagePanelDef.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,E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U,IAAI,aAAa,CAAC,SAAS,CAAC,CAMzD;IAED,gBAAgB;IACA,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,kBAAkB,EAAE,SAAS,EAAE;IAkBjC,gBAAgB;IACT,kBAAkB,CAAC,OAAO,EAAE,iBAAiB;CAUrD;AAED,gBAAgB;AAChB,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,gBAAgB;IACT,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,GAAG,SAAS;CAMxE;AAED,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAWnE;AAED,gBAAgB;AAChB,eAAO,MAAM,cAAc,EAAE,CAC3B,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,OAAO,KACZ,aAKJ,CAAC;AAEF,gBAAgB;AAChB,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,oDAGlE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Frontstage
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getPanelState = exports.setPanelPinned = exports.toPanelSide = exports.StagePanelSectionDef = exports.StagePanelDef = exports.PanelSizeChangedEvent = exports.PanelStateChangedEvent =
|
|
10
|
+
exports.getPanelState = exports.setPanelPinned = exports.toPanelSide = exports.StagePanelSectionDef = exports.StagePanelDef = exports.PanelSizeChangedEvent = exports.PanelStateChangedEvent = void 0;
|
|
11
11
|
const immer_1 = require("immer");
|
|
12
12
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
13
13
|
const WidgetDef_1 = require("../widgets/WidgetDef");
|
|
@@ -16,23 +16,16 @@ const StagePanelLocation_1 = require("./StagePanelLocation");
|
|
|
16
16
|
const StagePanelSection_1 = require("./StagePanelSection");
|
|
17
17
|
const InternalFrontstageManager_1 = require("../frontstage/InternalFrontstageManager");
|
|
18
18
|
const UiFramework_1 = require("../UiFramework");
|
|
19
|
-
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
var StagePanelState;
|
|
23
|
-
(function (StagePanelState) {
|
|
24
|
-
StagePanelState[StagePanelState["Off"] = 0] = "Off";
|
|
25
|
-
StagePanelState[StagePanelState["Minimized"] = 1] = "Minimized";
|
|
26
|
-
StagePanelState[StagePanelState["Open"] = 2] = "Open";
|
|
27
|
-
StagePanelState[StagePanelState["Popup"] = 3] = "Popup";
|
|
28
|
-
})(StagePanelState = exports.StagePanelState || (exports.StagePanelState = {}));
|
|
19
|
+
const StagePanelState_1 = require("./StagePanelState");
|
|
29
20
|
/** Panel state changed event class.
|
|
30
21
|
* @beta
|
|
31
22
|
*/
|
|
23
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
32
24
|
class PanelStateChangedEvent extends appui_abstract_1.UiEvent {
|
|
33
25
|
}
|
|
34
26
|
exports.PanelStateChangedEvent = PanelStateChangedEvent;
|
|
35
27
|
/** @internal */
|
|
28
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
36
29
|
class PanelSizeChangedEvent extends appui_abstract_1.UiEvent {
|
|
37
30
|
}
|
|
38
31
|
exports.PanelSizeChangedEvent = PanelSizeChangedEvent;
|
|
@@ -96,16 +89,14 @@ class StagePanelDef extends WidgetHost_1.WidgetHost {
|
|
|
96
89
|
}
|
|
97
90
|
/** Indicates whether the panel is resizable. */
|
|
98
91
|
get resizable() {
|
|
99
|
-
|
|
100
|
-
return (_b = (_a = this._initialConfig) === null || _a === void 0 ? void 0 : _a.resizable) !== null && _b !== void 0 ? _b : true;
|
|
92
|
+
return this.defaultResizable;
|
|
101
93
|
}
|
|
102
94
|
/** Indicates whether the panel is pinned. */
|
|
103
95
|
get pinned() {
|
|
104
|
-
var _a, _b;
|
|
105
96
|
const frontstageDef = UiFramework_1.UiFramework.frontstages.activeFrontstageDef;
|
|
106
97
|
const state = frontstageDef === null || frontstageDef === void 0 ? void 0 : frontstageDef.nineZoneState;
|
|
107
98
|
if (!state)
|
|
108
|
-
return
|
|
99
|
+
return this.defaultPinned;
|
|
109
100
|
const side = toPanelSide(this.location);
|
|
110
101
|
const panel = state.panels[side];
|
|
111
102
|
return panel.pinned;
|
|
@@ -146,7 +137,7 @@ class StagePanelDef extends WidgetHost_1.WidgetHost {
|
|
|
146
137
|
if (!frontstageDef)
|
|
147
138
|
return;
|
|
148
139
|
const side = toPanelSide(this.location);
|
|
149
|
-
const collapsed = panelState === StagePanelState.Open ? false : true;
|
|
140
|
+
const collapsed = panelState === StagePanelState_1.StagePanelState.Open ? false : true;
|
|
150
141
|
frontstageDef.dispatch({
|
|
151
142
|
type: "PANEL_SET_COLLAPSED",
|
|
152
143
|
collapsed,
|
|
@@ -164,13 +155,23 @@ class StagePanelDef extends WidgetHost_1.WidgetHost {
|
|
|
164
155
|
get defaultState() {
|
|
165
156
|
var _a;
|
|
166
157
|
const defaultState = (_a = this._initialConfig) === null || _a === void 0 ? void 0 : _a.defaultState;
|
|
167
|
-
return defaultState !== null && defaultState !== void 0 ? defaultState : StagePanelState.Open;
|
|
158
|
+
return defaultState !== null && defaultState !== void 0 ? defaultState : StagePanelState_1.StagePanelState.Open;
|
|
168
159
|
}
|
|
169
160
|
/** @internal */
|
|
170
161
|
get defaultSize() {
|
|
171
162
|
var _a;
|
|
172
163
|
return (_a = this._initialConfig) === null || _a === void 0 ? void 0 : _a.size;
|
|
173
164
|
}
|
|
165
|
+
/** @internal */
|
|
166
|
+
get defaultPinned() {
|
|
167
|
+
var _a, _b;
|
|
168
|
+
return (_b = (_a = this._initialConfig) === null || _a === void 0 ? void 0 : _a.pinned) !== null && _b !== void 0 ? _b : true;
|
|
169
|
+
}
|
|
170
|
+
/** @internal */
|
|
171
|
+
get defaultResizable() {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
return (_b = (_a = this._initialConfig) === null || _a === void 0 ? void 0 : _a.resizable) !== null && _b !== void 0 ? _b : true;
|
|
174
|
+
}
|
|
174
175
|
/** Gets the list of Widgets. */
|
|
175
176
|
get widgetDefs() {
|
|
176
177
|
return [
|
|
@@ -230,7 +231,7 @@ exports.setPanelPinned = (0, immer_1.default)((nineZone, side, pinned) => {
|
|
|
230
231
|
/** @internal */
|
|
231
232
|
function getPanelState(state, side) {
|
|
232
233
|
const panel = state.panels[side];
|
|
233
|
-
return panel.collapsed ? StagePanelState.Minimized : StagePanelState.Open;
|
|
234
|
+
return panel.collapsed ? StagePanelState_1.StagePanelState.Minimized : StagePanelState_1.StagePanelState.Open;
|
|
234
235
|
}
|
|
235
236
|
exports.getPanelState = getPanelState;
|
|
236
237
|
//# sourceMappingURL=StagePanelDef.js.map
|