@itwin/appui-react 3.6.0-dev.7 → 4.0.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 +30 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/appui-react/UiFramework.d.ts +4 -4
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +3 -3
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.d.ts +4 -4
- package/lib/cjs/appui-react/backstage/Backstage.js +2 -2
- package/lib/cjs/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.js +1 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItem.d.ts +43 -0
- package/lib/cjs/appui-react/backstage/BackstageItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/backstage/BackstageItem.js +37 -0
- package/lib/cjs/appui-react/backstage/BackstageItem.js.map +1 -0
- package/lib/cjs/appui-react/backstage/BackstageItemProps.d.ts +3 -3
- package/lib/cjs/appui-react/backstage/BackstageItemProps.js +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItemProps.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.d.ts +7 -35
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js +10 -24
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
- package/lib/cjs/appui-react/backstage/CommandLaunch.d.ts +2 -2
- package/lib/cjs/appui-react/backstage/CommandLaunch.js +1 -1
- package/lib/cjs/appui-react/backstage/CommandLaunch.js.map +1 -1
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.d.ts +2 -2
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.js +1 -1
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.js.map +1 -1
- package/lib/cjs/appui-react/backstage/Separator.d.ts +1 -1
- package/lib/cjs/appui-react/backstage/Separator.js +1 -1
- package/lib/cjs/appui-react/backstage/Separator.js.map +1 -1
- package/lib/cjs/appui-react/backstage/TaskLaunch.d.ts +2 -2
- package/lib/cjs/appui-react/backstage/TaskLaunch.js +1 -1
- package/lib/cjs/appui-react/backstage/TaskLaunch.js.map +1 -1
- package/lib/cjs/appui-react/backstage/useDefaultBackstageItems.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts +3 -3
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +3 -3
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts +3 -3
- package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.js +2 -2
- package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.d.ts +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +18 -1
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +19 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts +6 -3
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +19 -8
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/Frontstage.d.ts +13 -13
- package/lib/cjs/appui-react/frontstage/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/Frontstage.js +1 -1
- package/lib/cjs/appui-react/frontstage/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.d.ts +6 -6
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.js +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +16 -16
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +16 -16
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageProvider.d.ts +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +4 -2
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/StageUsage.d.ts +15 -0
- package/lib/cjs/appui-react/frontstage/StageUsage.d.ts.map +1 -0
- package/lib/cjs/appui-react/frontstage/StageUsage.js +17 -0
- package/lib/cjs/appui-react/frontstage/StageUsage.js.map +1 -0
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useAvailableUiItemsProviders.js +4 -4
- package/lib/cjs/appui-react/hooks/useAvailableUiItemsProviders.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.d.ts +4 -4
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.js +3 -3
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/Common.d.ts +2 -0
- package/lib/cjs/appui-react/imodel-components/Common.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/Common.js +1 -0
- package/lib/cjs/appui-react/imodel-components/Common.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts +6 -0
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.js +2 -0
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeRenderer.d.ts +6 -0
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeRenderer.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeRenderer.js +6 -0
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeRenderer.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoriesTree.d.ts +5 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoriesTree.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoriesTree.js +4 -0
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoriesTree.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts +9 -2
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js +5 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsTree.d.ts +2 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsTree.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsTree.js +2 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsTree.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts +3 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js +2 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.d.ts +2 -0
- package/lib/cjs/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.js +2 -0
- package/lib/cjs/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.js.map +1 -1
- package/lib/cjs/appui-react/keyinbrowser/KeyinBrowser.d.ts +5 -5
- package/lib/cjs/appui-react/keyinbrowser/KeyinBrowser.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyinbrowser/KeyinBrowser.js +1 -1
- package/lib/cjs/appui-react/keyinbrowser/KeyinBrowser.js.map +1 -1
- package/lib/cjs/appui-react/messages/ActivityMessage.d.ts +2 -2
- package/lib/cjs/appui-react/messages/ActivityMessage.js +1 -1
- package/lib/cjs/appui-react/messages/ActivityMessage.js.map +1 -1
- package/lib/cjs/appui-react/messages/ActivityMessagePopup.d.ts +2 -2
- package/lib/cjs/appui-react/messages/ActivityMessagePopup.js +1 -1
- package/lib/cjs/appui-react/messages/ActivityMessagePopup.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +3 -1
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/StatusMessageRenderer.d.ts +2 -2
- package/lib/cjs/appui-react/messages/StatusMessageRenderer.js +1 -1
- package/lib/cjs/appui-react/messages/StatusMessageRenderer.js.map +1 -1
- package/lib/cjs/appui-react/messages/StatusMessagesContainer.d.ts +1 -1
- package/lib/cjs/appui-react/messages/StatusMessagesContainer.js +1 -1
- package/lib/cjs/appui-react/messages/StatusMessagesContainer.js.map +1 -1
- package/lib/cjs/appui-react/messages/StickyMessage.d.ts +2 -2
- package/lib/cjs/appui-react/messages/StickyMessage.js +1 -1
- package/lib/cjs/appui-react/messages/StickyMessage.js.map +1 -1
- package/lib/cjs/appui-react/messages/ToastMessage.d.ts +2 -2
- package/lib/cjs/appui-react/messages/ToastMessage.js +1 -1
- package/lib/cjs/appui-react/messages/ToastMessage.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ListPicker.d.ts +1 -1
- package/lib/cjs/appui-react/pickers/ListPicker.js +1 -1
- package/lib/cjs/appui-react/pickers/ListPicker.js.map +1 -1
- package/lib/cjs/appui-react/safearea/SafeAreaContext.d.ts +1 -1
- package/lib/cjs/appui-react/safearea/SafeAreaContext.js +1 -1
- package/lib/cjs/appui-react/safearea/SafeAreaContext.js.map +1 -1
- package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.d.ts +1 -1
- package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.js +1 -1
- package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.js.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.d.ts +2 -2
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js +2 -2
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/shared/CustomItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/GroupItemProps.d.ts +1 -1
- package/lib/cjs/appui-react/shared/GroupItemProps.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/GroupItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/ItemDefBase.d.ts +4 -4
- package/lib/cjs/appui-react/shared/ItemDefBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ItemDefBase.js +3 -3
- package/lib/cjs/appui-react/shared/ItemDefBase.js.map +1 -1
- package/lib/cjs/appui-react/shared/ItemProps.d.ts +4 -4
- package/lib/cjs/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanel.d.ts +5 -5
- package/lib/cjs/appui-react/stagepanels/StagePanel.js +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanel.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.d.ts +2 -2
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.js +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelLocation.d.ts +13 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelLocation.d.ts.map +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelLocation.js +16 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelLocation.js.map +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelSection.d.ts +13 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelSection.d.ts.map +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelSection.js +16 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelSection.js.map +1 -0
- package/lib/cjs/appui-react/statusbar/LabelIndicator.js +2 -1
- package/lib/cjs/appui-react/statusbar/LabelIndicator.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.d.ts +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +1 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItem.d.ts +52 -2
- package/lib/cjs/appui-react/statusbar/StatusBarItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItem.js +33 -2
- package/lib/cjs/appui-react/statusbar/StatusBarItem.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.d.ts +23 -4
- package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.js +31 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemsManager.d.ts +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemsManager.js +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.d.ts +3 -3
- package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.d.ts +1 -1
- package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.js +1 -1
- package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/withStatusFieldProps.d.ts +1 -1
- package/lib/cjs/appui-react/statusbar/withStatusFieldProps.js +1 -1
- package/lib/cjs/appui-react/statusbar/withStatusFieldProps.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/ConditionalField.d.ts +1 -1
- package/lib/cjs/appui-react/statusfields/ConditionalField.js +1 -1
- package/lib/cjs/appui-react/statusfields/ConditionalField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/FooterModeField.d.ts +1 -1
- package/lib/cjs/appui-react/statusfields/FooterModeField.js +1 -1
- package/lib/cjs/appui-react/statusfields/FooterModeField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.d.ts +4 -4
- package/lib/cjs/appui-react/statusfields/Indicator.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.js +3 -2
- package/lib/cjs/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/PromptField.d.ts +1 -1
- package/lib/cjs/appui-react/statusfields/PromptField.js +1 -1
- package/lib/cjs/appui-react/statusfields/PromptField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.d.ts +3 -3
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.js.map +1 -1
- package/lib/cjs/appui-react/syncui/BooleanListener.d.ts +2 -2
- package/lib/cjs/appui-react/syncui/BooleanListener.js +1 -1
- package/lib/cjs/appui-react/syncui/BooleanListener.js.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +5 -5
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +3 -3
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ActionItemButton.d.ts +2 -2
- package/lib/cjs/appui-react/toolbar/ActionItemButton.js +1 -1
- package/lib/cjs/appui-react/toolbar/ActionItemButton.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.d.ts +1 -1
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.js +4 -4
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupItem.d.ts +5 -5
- package/lib/cjs/appui-react/toolbar/GroupItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupItem.js +2 -2
- package/lib/cjs/appui-react/toolbar/GroupItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/PopupButton.d.ts +4 -4
- package/lib/cjs/appui-react/toolbar/PopupButton.js +1 -1
- package/lib/cjs/appui-react/toolbar/PopupButton.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolButton.d.ts +2 -2
- package/lib/cjs/appui-react/toolbar/ToolButton.js +1 -1
- package/lib/cjs/appui-react/toolbar/ToolButton.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +53 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js +41 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItemUtilities.d.ts +14 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItemUtilities.d.ts.map +1 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItemUtilities.js +28 -0
- package/lib/cjs/appui-react/toolbar/ToolbarItemUtilities.js.map +1 -0
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.d.ts +1 -1
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.js +1 -1
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +11 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js +20 -0
- package/lib/cjs/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/ProviderItem.d.ts +9 -0
- package/lib/cjs/appui-react/ui-items-provider/ProviderItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/ProviderItem.js +10 -0
- package/lib/cjs/appui-react/ui-items-provider/ProviderItem.js.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +1 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +2 -2
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +1 -0
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts +24 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +19 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.d.ts +9 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.d.ts.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.js +10 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsProvider.js.map +1 -0
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts +2 -2
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.d.ts +1 -1
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.js +1 -1
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.js.map +1 -1
- package/lib/cjs/appui-react/utils/PropsHelper.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/DefaultNavigationWidget.d.ts +3 -3
- package/lib/cjs/appui-react/widgets/DefaultNavigationWidget.js +2 -2
- package/lib/cjs/appui-react/widgets/DefaultNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidget.d.ts +3 -3
- package/lib/cjs/appui-react/widgets/NavigationWidget.js +2 -2
- package/lib/cjs/appui-react/widgets/NavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/StableWidgetDef.d.ts +1 -1
- package/lib/cjs/appui-react/widgets/StableWidgetDef.js +1 -1
- package/lib/cjs/appui-react/widgets/StableWidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidget.d.ts +3 -3
- package/lib/cjs/appui-react/widgets/ToolWidget.js +2 -2
- package/lib/cjs/appui-react/widgets/ToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.d.ts +1 -1
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.js +1 -1
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/Widget.d.ts +1 -1
- package/lib/cjs/appui-react/widgets/Widget.js +1 -1
- package/lib/cjs/appui-react/widgets/Widget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetControl.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +14 -14
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +11 -10
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetProps.d.ts +8 -1
- package/lib/cjs/appui-react/widgets/WidgetProps.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetProps.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetState.d.ts +13 -0
- package/lib/cjs/appui-react/widgets/WidgetState.d.ts.map +1 -0
- package/lib/cjs/appui-react/widgets/WidgetState.js +16 -0
- package/lib/cjs/appui-react/widgets/WidgetState.js.map +1 -0
- package/lib/cjs/appui-react/workflow/Task.d.ts +4 -4
- package/lib/cjs/appui-react/workflow/Task.js +2 -2
- package/lib/cjs/appui-react/workflow/Task.js.map +1 -1
- package/lib/cjs/appui-react/workflow/Workflow.d.ts +8 -8
- package/lib/cjs/appui-react/workflow/Workflow.js +4 -4
- package/lib/cjs/appui-react/workflow/Workflow.js.map +1 -1
- package/lib/cjs/appui-react/zones/Zone.d.ts +3 -3
- package/lib/cjs/appui-react/zones/Zone.js +2 -2
- package/lib/cjs/appui-react/zones/Zone.js.map +1 -1
- package/lib/cjs/appui-react/zones/ZoneDef.d.ts +5 -5
- package/lib/cjs/appui-react/zones/ZoneDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/zones/ZoneDef.js +5 -5
- package/lib/cjs/appui-react/zones/ZoneDef.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +16 -5
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +16 -5
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +4 -4
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +3 -3
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.d.ts +4 -4
- package/lib/esm/appui-react/backstage/Backstage.js +2 -2
- package/lib/esm/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.js +1 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageItem.d.ts +43 -0
- package/lib/esm/appui-react/backstage/BackstageItem.d.ts.map +1 -0
- package/lib/esm/appui-react/backstage/BackstageItem.js +32 -0
- package/lib/esm/appui-react/backstage/BackstageItem.js.map +1 -0
- package/lib/esm/appui-react/backstage/BackstageItemProps.d.ts +3 -3
- package/lib/esm/appui-react/backstage/BackstageItemProps.js +1 -1
- package/lib/esm/appui-react/backstage/BackstageItemProps.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.d.ts +7 -35
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.js +7 -21
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
- package/lib/esm/appui-react/backstage/CommandLaunch.d.ts +2 -2
- package/lib/esm/appui-react/backstage/CommandLaunch.js +1 -1
- package/lib/esm/appui-react/backstage/CommandLaunch.js.map +1 -1
- package/lib/esm/appui-react/backstage/FrontstageLaunch.d.ts +2 -2
- package/lib/esm/appui-react/backstage/FrontstageLaunch.js +1 -1
- package/lib/esm/appui-react/backstage/FrontstageLaunch.js.map +1 -1
- package/lib/esm/appui-react/backstage/Separator.d.ts +1 -1
- package/lib/esm/appui-react/backstage/Separator.js +1 -1
- package/lib/esm/appui-react/backstage/Separator.js.map +1 -1
- package/lib/esm/appui-react/backstage/TaskLaunch.d.ts +2 -2
- package/lib/esm/appui-react/backstage/TaskLaunch.js +1 -1
- package/lib/esm/appui-react/backstage/TaskLaunch.js.map +1 -1
- package/lib/esm/appui-react/backstage/useDefaultBackstageItems.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts +3 -3
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +3 -3
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/state.d.ts +3 -3
- package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/state.js +2 -2
- package/lib/esm/appui-react/configurableui/state.js.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.d.ts +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +18 -1
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +19 -1
- package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts +6 -3
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js +19 -8
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/frontstage/Frontstage.d.ts +13 -13
- package/lib/esm/appui-react/frontstage/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/Frontstage.js +1 -1
- package/lib/esm/appui-react/frontstage/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageComposer.d.ts +6 -6
- package/lib/esm/appui-react/frontstage/FrontstageComposer.js +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageComposer.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +16 -16
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +16 -16
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageProvider.d.ts +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +4 -2
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/StageUsage.d.ts +15 -0
- package/lib/esm/appui-react/frontstage/StageUsage.d.ts.map +1 -0
- package/lib/esm/appui-react/frontstage/StageUsage.js +14 -0
- package/lib/esm/appui-react/frontstage/StageUsage.js.map +1 -0
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useAvailableUiItemsProviders.js +4 -4
- package/lib/esm/appui-react/hooks/useAvailableUiItemsProviders.js.map +1 -1
- package/lib/esm/appui-react/hooks/useFrameworkVersion.d.ts +4 -4
- package/lib/esm/appui-react/hooks/useFrameworkVersion.js +3 -3
- package/lib/esm/appui-react/hooks/useFrameworkVersion.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/Common.d.ts +2 -0
- package/lib/esm/appui-react/imodel-components/Common.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/Common.js +1 -0
- package/lib/esm/appui-react/imodel-components/Common.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts +6 -0
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.js +2 -0
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeRenderer.d.ts +6 -0
- package/lib/esm/appui-react/imodel-components/VisibilityTreeRenderer.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeRenderer.js +6 -0
- package/lib/esm/appui-react/imodel-components/VisibilityTreeRenderer.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoriesTree.d.ts +5 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoriesTree.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoriesTree.js +4 -0
- package/lib/esm/appui-react/imodel-components/category-tree/CategoriesTree.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts +9 -2
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js +5 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsTree.d.ts +2 -0
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsTree.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsTree.js +2 -0
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsTree.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts +3 -0
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js +2 -0
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.d.ts +2 -0
- package/lib/esm/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.js +2 -0
- package/lib/esm/appui-react/imodel-components/spatial-tree/SpatialContainmentTree.js.map +1 -1
- package/lib/esm/appui-react/keyinbrowser/KeyinBrowser.d.ts +5 -5
- package/lib/esm/appui-react/keyinbrowser/KeyinBrowser.d.ts.map +1 -1
- package/lib/esm/appui-react/keyinbrowser/KeyinBrowser.js +1 -1
- package/lib/esm/appui-react/keyinbrowser/KeyinBrowser.js.map +1 -1
- package/lib/esm/appui-react/messages/ActivityMessage.d.ts +2 -2
- package/lib/esm/appui-react/messages/ActivityMessage.js +1 -1
- package/lib/esm/appui-react/messages/ActivityMessage.js.map +1 -1
- package/lib/esm/appui-react/messages/ActivityMessagePopup.d.ts +2 -2
- package/lib/esm/appui-react/messages/ActivityMessagePopup.js +1 -1
- package/lib/esm/appui-react/messages/ActivityMessagePopup.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +3 -1
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/messages/StatusMessageRenderer.d.ts +2 -2
- package/lib/esm/appui-react/messages/StatusMessageRenderer.js +1 -1
- package/lib/esm/appui-react/messages/StatusMessageRenderer.js.map +1 -1
- package/lib/esm/appui-react/messages/StatusMessagesContainer.d.ts +1 -1
- package/lib/esm/appui-react/messages/StatusMessagesContainer.js +1 -1
- package/lib/esm/appui-react/messages/StatusMessagesContainer.js.map +1 -1
- package/lib/esm/appui-react/messages/StickyMessage.d.ts +2 -2
- package/lib/esm/appui-react/messages/StickyMessage.js +1 -1
- package/lib/esm/appui-react/messages/StickyMessage.js.map +1 -1
- package/lib/esm/appui-react/messages/ToastMessage.d.ts +2 -2
- package/lib/esm/appui-react/messages/ToastMessage.js +1 -1
- package/lib/esm/appui-react/messages/ToastMessage.js.map +1 -1
- package/lib/esm/appui-react/pickers/ListPicker.d.ts +1 -1
- package/lib/esm/appui-react/pickers/ListPicker.js +1 -1
- package/lib/esm/appui-react/pickers/ListPicker.js.map +1 -1
- package/lib/esm/appui-react/safearea/SafeAreaContext.d.ts +1 -1
- package/lib/esm/appui-react/safearea/SafeAreaContext.js +1 -1
- package/lib/esm/appui-react/safearea/SafeAreaContext.js.map +1 -1
- package/lib/esm/appui-react/selection/ClearEmphasisStatusField.d.ts +1 -1
- package/lib/esm/appui-react/selection/ClearEmphasisStatusField.js +1 -1
- package/lib/esm/appui-react/selection/ClearEmphasisStatusField.js.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.d.ts +2 -2
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js +2 -2
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/shared/CustomItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/GroupItemProps.d.ts +1 -1
- package/lib/esm/appui-react/shared/GroupItemProps.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/GroupItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/ItemDefBase.d.ts +4 -4
- package/lib/esm/appui-react/shared/ItemDefBase.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ItemDefBase.js +3 -3
- package/lib/esm/appui-react/shared/ItemDefBase.js.map +1 -1
- package/lib/esm/appui-react/shared/ItemProps.d.ts +4 -4
- package/lib/esm/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanel.d.ts +5 -5
- package/lib/esm/appui-react/stagepanels/StagePanel.js +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanel.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.d.ts +2 -2
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.js +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelLocation.d.ts +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelLocation.d.ts.map +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanelLocation.js +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelLocation.js.map +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanelSection.d.ts +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelSection.d.ts.map +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanelSection.js +13 -0
- package/lib/esm/appui-react/stagepanels/StagePanelSection.js.map +1 -0
- package/lib/esm/appui-react/statusbar/LabelIndicator.js +2 -1
- package/lib/esm/appui-react/statusbar/LabelIndicator.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.d.ts +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js +1 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItem.d.ts +52 -2
- package/lib/esm/appui-react/statusbar/StatusBarItem.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItem.js +29 -1
- package/lib/esm/appui-react/statusbar/StatusBarItem.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.d.ts +23 -4
- package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.js +31 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemsManager.d.ts +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemsManager.js +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItemsManager.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.d.ts +3 -3
- package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
- package/lib/esm/appui-react/statusbar/useDefaultStatusBarItems.js.map +1 -1
- package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.d.ts +1 -1
- package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.js +1 -1
- package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.js.map +1 -1
- package/lib/esm/appui-react/statusbar/withStatusFieldProps.d.ts +1 -1
- package/lib/esm/appui-react/statusbar/withStatusFieldProps.js +1 -1
- package/lib/esm/appui-react/statusbar/withStatusFieldProps.js.map +1 -1
- package/lib/esm/appui-react/statusfields/ConditionalField.d.ts +1 -1
- package/lib/esm/appui-react/statusfields/ConditionalField.js +1 -1
- package/lib/esm/appui-react/statusfields/ConditionalField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/FooterModeField.d.ts +1 -1
- package/lib/esm/appui-react/statusfields/FooterModeField.js +1 -1
- package/lib/esm/appui-react/statusfields/FooterModeField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.d.ts +4 -4
- package/lib/esm/appui-react/statusfields/Indicator.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.js +3 -2
- package/lib/esm/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/PromptField.d.ts +1 -1
- package/lib/esm/appui-react/statusfields/PromptField.js +1 -1
- package/lib/esm/appui-react/statusfields/PromptField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/StatusFieldProps.d.ts +3 -3
- package/lib/esm/appui-react/statusfields/StatusFieldProps.js.map +1 -1
- package/lib/esm/appui-react/syncui/BooleanListener.d.ts +2 -2
- package/lib/esm/appui-react/syncui/BooleanListener.js +1 -1
- package/lib/esm/appui-react/syncui/BooleanListener.js.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +5 -5
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +3 -3
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ActionItemButton.d.ts +2 -2
- package/lib/esm/appui-react/toolbar/ActionItemButton.js +1 -1
- package/lib/esm/appui-react/toolbar/ActionItemButton.js.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupButtonItem.d.ts +1 -1
- package/lib/esm/appui-react/toolbar/GroupButtonItem.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupButtonItem.js +2 -2
- package/lib/esm/appui-react/toolbar/GroupButtonItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupItem.d.ts +5 -5
- package/lib/esm/appui-react/toolbar/GroupItem.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupItem.js +2 -2
- package/lib/esm/appui-react/toolbar/GroupItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/PopupButton.d.ts +4 -4
- package/lib/esm/appui-react/toolbar/PopupButton.js +1 -1
- package/lib/esm/appui-react/toolbar/PopupButton.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolButton.d.ts +2 -2
- package/lib/esm/appui-react/toolbar/ToolButton.js +1 -1
- package/lib/esm/appui-react/toolbar/ToolButton.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +53 -0
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts.map +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarItem.js +35 -0
- package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarItemUtilities.d.ts +14 -0
- package/lib/esm/appui-react/toolbar/ToolbarItemUtilities.d.ts.map +1 -0
- package/lib/esm/appui-react/toolbar/ToolbarItemUtilities.js +25 -0
- package/lib/esm/appui-react/toolbar/ToolbarItemUtilities.js.map +1 -0
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.d.ts +1 -1
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.js +1 -1
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts +11 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.d.ts.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js +16 -0
- package/lib/esm/appui-react/ui-items-provider/BaseUiItemsProvider.js.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/ProviderItem.d.ts +9 -0
- package/lib/esm/appui-react/ui-items-provider/ProviderItem.d.ts.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/ProviderItem.js +9 -0
- package/lib/esm/appui-react/ui-items-provider/ProviderItem.js.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +1 -0
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js +2 -2
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +1 -0
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts +24 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +15 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.d.ts +9 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.d.ts.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.js +9 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsProvider.js.map +1 -0
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts +2 -2
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/esm/appui-react/uistate/UserSettingsStorage.d.ts +1 -1
- package/lib/esm/appui-react/uistate/UserSettingsStorage.js +1 -1
- package/lib/esm/appui-react/uistate/UserSettingsStorage.js.map +1 -1
- package/lib/esm/appui-react/utils/PropsHelper.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/DefaultNavigationWidget.d.ts +3 -3
- package/lib/esm/appui-react/widgets/DefaultNavigationWidget.js +2 -2
- package/lib/esm/appui-react/widgets/DefaultNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidget.d.ts +3 -3
- package/lib/esm/appui-react/widgets/NavigationWidget.js +2 -2
- package/lib/esm/appui-react/widgets/NavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/StableWidgetDef.d.ts +1 -1
- package/lib/esm/appui-react/widgets/StableWidgetDef.js +1 -1
- package/lib/esm/appui-react/widgets/StableWidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidget.d.ts +3 -3
- package/lib/esm/appui-react/widgets/ToolWidget.js +2 -2
- package/lib/esm/appui-react/widgets/ToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.d.ts +1 -1
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.js +1 -1
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/Widget.d.ts +1 -1
- package/lib/esm/appui-react/widgets/Widget.js +1 -1
- package/lib/esm/appui-react/widgets/Widget.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetControl.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +14 -14
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +11 -10
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetProps.d.ts +8 -1
- package/lib/esm/appui-react/widgets/WidgetProps.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetProps.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetState.d.ts +13 -0
- package/lib/esm/appui-react/widgets/WidgetState.d.ts.map +1 -0
- package/lib/esm/appui-react/widgets/WidgetState.js +13 -0
- package/lib/esm/appui-react/widgets/WidgetState.js.map +1 -0
- package/lib/esm/appui-react/workflow/Task.d.ts +4 -4
- package/lib/esm/appui-react/workflow/Task.js +2 -2
- package/lib/esm/appui-react/workflow/Task.js.map +1 -1
- package/lib/esm/appui-react/workflow/Workflow.d.ts +8 -8
- package/lib/esm/appui-react/workflow/Workflow.js +4 -4
- package/lib/esm/appui-react/workflow/Workflow.js.map +1 -1
- package/lib/esm/appui-react/zones/Zone.d.ts +3 -3
- package/lib/esm/appui-react/zones/Zone.js +2 -2
- package/lib/esm/appui-react/zones/Zone.js.map +1 -1
- package/lib/esm/appui-react/zones/ZoneDef.d.ts +5 -5
- package/lib/esm/appui-react/zones/ZoneDef.d.ts.map +1 -1
- package/lib/esm/appui-react/zones/ZoneDef.js +5 -5
- package/lib/esm/appui-react/zones/ZoneDef.js.map +1 -1
- package/lib/esm/appui-react.d.ts +16 -5
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +16 -5
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +44 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,WAAW,gCAAgC;IA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AO;gDACT,OAAO;kDACL,OAAO;gEACO,OAAO;iCACtC,MAAM;CACpC,CAAC;AAEF;;GAEG;AACH,oBAAY,0BAA0B,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,iCAAoC,EAAE,MAAM,EAAE,0BAA0B,GAAG,mBAAmB,CA2CxI"}
|
|
@@ -20,7 +20,7 @@ export var ConfigurableUiActionId;
|
|
|
20
20
|
ConfigurableUiActionId["SetToolPrompt"] = "configurableui:set_toolprompt";
|
|
21
21
|
ConfigurableUiActionId["SetWidgetOpacity"] = "configurableui:set_widget_opacity";
|
|
22
22
|
ConfigurableUiActionId["SetDragInteraction"] = "configurableui:set-drag-interaction";
|
|
23
|
-
/** @deprecated UI1.0 is deprecated. */
|
|
23
|
+
/** @deprecated in 3.6. UI1.0 is deprecated. */
|
|
24
24
|
ConfigurableUiActionId["SetFrameworkVersion"] = "configurableui:set-framework-version";
|
|
25
25
|
ConfigurableUiActionId["SetShowWidgetIcon"] = "configurableui:set-show-widget-icon";
|
|
26
26
|
ConfigurableUiActionId["AutoCollapseUnpinnedPanels"] = "configurableui:set-auto-collapse-unpinned-panels";
|
|
@@ -59,7 +59,7 @@ export const ConfigurableUiActions = {
|
|
|
59
59
|
// istanbul ignore next
|
|
60
60
|
(opacity) => createAction(ConfigurableUiActionId.SetWidgetOpacity, opacity),
|
|
61
61
|
setDragInteraction: (dragInteraction) => createAction(ConfigurableUiActionId.SetDragInteraction, dragInteraction),
|
|
62
|
-
/** @deprecated UI1.0 is deprecated. */
|
|
62
|
+
/** @deprecated in 3.6. UI1.0 is deprecated. */
|
|
63
63
|
setFrameworkVersion: (frameworkVersion) => createAction(ConfigurableUiActionId.SetFrameworkVersion, frameworkVersion),
|
|
64
64
|
setShowWidgetIcon: (showWidgetIcon) => createAction(ConfigurableUiActionId.SetShowWidgetIcon, showWidgetIcon),
|
|
65
65
|
setAutoCollapseUnpinnedPanels: (autoCollapse) => createAction(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, autoCollapse),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGtH,mDAAmD;AAEnD;;;GAGG;AACH,MAAM,CAAN,IAAY,sBAcX;AAdD,WAAY,sBAAsB;IAChC,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;IACrC,yEAA+C,CAAA;IAC/C,gFAAsD,CAAA;IACtD,oFAA0D,CAAA;IAC1D,uCAAuC;IACvC,sFAA4D,CAAA;IAC5D,mFAAyD,CAAA;IACzD,yGAA+E,CAAA;IAC/E,2FAAiE,CAAA;IACjE,0FAAgE,CAAA;IAChE,2GAAiF,CAAA;IACjF,kFAAwD,CAAA;AAC1D,CAAC,EAdW,sBAAsB,KAAtB,sBAAsB,QAcjC;AAqBD,kDAAkD;AAClD,MAAM,YAAY,GAAwB;IACxC,QAAQ,EAAE,QAAQ,CAAC,eAAyB;IAC5C,UAAU,EAAE,EAAE;IACd,KAAK,EAAE,4BAA4B;IACnC,aAAa,EAAE,sBAAsB;IACrC,kBAAkB,EAAE,KAAK;IACzB,gBAAgB,EAAE,GAAG;IACrB,cAAc,EAAE,IAAI;IACpB,0BAA0B,EAAE,KAAK;IACjC,kBAAkB,EAAE,IAAI;IACxB,mBAAmB,EAAE,KAAK;IAC1B,0BAA0B,EAAE,KAAK;IACjC,cAAc,EAAE,uBAAuB;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE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C,CAAC;YACtD,OAAO,EAAE,GAAG,KAAK,EAAE,0BAA0B,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACjE;QACD,KAAK,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;YACjD,OAAO,EAAE,GAAG,KAAK,EAAE,kBAAkB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACzD;QACD,KAAK,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;YAC/C,OAAO,EAAE,GAAG,KAAK,EAAE,mBAAmB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SAC1D;QACD,KAAK,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;YACtD,OAAO,EAAE,GAAG,KAAK,EAAE,0BAA0B,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACjE;QACD,KAAK,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACrD;KACF;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module State\r\n */\r\n\r\nimport { SnapMode } from \"@itwin/core-frontend\";\r\nimport { ActionsUnion, createAction } from \"../redux/redux-ts\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, TOOLBAR_OPACITY_DEFAULT, WIDGET_OPACITY_DEFAULT } from \"../theme/ThemeManager\";\r\nimport { FrameworkVersionId } from \"../UiFramework\";\r\n\r\n// cSpell:ignore configurableui snapmode toolprompt\r\n\r\n/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.\r\n * Since these are also used as sync ids they should be in lowercase.\r\n * @public\r\n */\r\nexport enum ConfigurableUiActionId {\r\n SetSnapMode = \"configurableui:set_snapmode\",\r\n SetTheme = \"configurableui:set_theme\",\r\n SetToolPrompt = \"configurableui:set_toolprompt\",\r\n SetWidgetOpacity = \"configurableui:set_widget_opacity\",\r\n SetDragInteraction = \"configurableui:set-drag-interaction\",\r\n /** @deprecated UI1.0 is deprecated. */\r\n SetFrameworkVersion = \"configurableui:set-framework-version\",\r\n SetShowWidgetIcon = \"configurableui:set-show-widget-icon\",\r\n AutoCollapseUnpinnedPanels = \"configurableui:set-auto-collapse-unpinned-panels\",\r\n SetViewOverlayDisplay = \"configurableui:set-view-overlay-display\",\r\n AnimateToolSettings = \"configurableui:set-animate-tool-settings\",\r\n UseToolAsToolSettingsLabel = \"configurableui:set-use-tool-as-tool-settings-label\",\r\n SetToolbarOpacity = \"configurableui:set-toolbar-opacity\",\r\n}\r\n\r\n/** The portion of state managed by the ConfigurableUiReducer.\r\n * @public\r\n */\r\nexport interface ConfigurableUiState {\r\n snapMode: number;\r\n toolPrompt: string;\r\n theme: string;\r\n widgetOpacity: number;\r\n useDragInteraction: boolean;\r\n /** @deprecated UI1.0 is deprecated. */\r\n frameworkVersion: FrameworkVersionId; // eslint-disable-line deprecation/deprecation\r\n showWidgetIcon: boolean;\r\n autoCollapseUnpinnedPanels: boolean;\r\n viewOverlayDisplay: boolean;\r\n animateToolSettings: boolean;\r\n useToolAsToolSettingsLabel: boolean;\r\n toolbarOpacity: number;\r\n}\r\n\r\n/** used on first call of ConfigurableUiReducer */\r\nconst initialState: ConfigurableUiState = {\r\n snapMode: SnapMode.NearestKeypoint as number,\r\n toolPrompt: \"\",\r\n theme: SYSTEM_PREFERRED_COLOR_THEME,\r\n widgetOpacity: WIDGET_OPACITY_DEFAULT,\r\n useDragInteraction: false,\r\n frameworkVersion: \"2\",\r\n showWidgetIcon: true,\r\n autoCollapseUnpinnedPanels: false,\r\n viewOverlayDisplay: true,\r\n animateToolSettings: false,\r\n useToolAsToolSettingsLabel: false,\r\n toolbarOpacity: TOOLBAR_OPACITY_DEFAULT,\r\n};\r\n\r\n/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.\r\n * @public\r\n */\r\nexport const ConfigurableUiActions = { // eslint-disable-line @typescript-eslint/naming-convention\r\n setSnapMode: (snapMode: number) => createAction(ConfigurableUiActionId.SetSnapMode, snapMode),\r\n setTheme:\r\n // istanbul ignore next\r\n (theme: string) => createAction(ConfigurableUiActionId.SetTheme, theme),\r\n setToolPrompt:\r\n // istanbul ignore next\r\n (toolPrompt: string) => createAction(ConfigurableUiActionId.SetToolPrompt, toolPrompt),\r\n setWidgetOpacity:\r\n // istanbul ignore next\r\n (opacity: number) => createAction(ConfigurableUiActionId.SetWidgetOpacity, opacity),\r\n setDragInteraction: (dragInteraction: boolean) => createAction(ConfigurableUiActionId.SetDragInteraction, dragInteraction),\r\n /** @deprecated UI1.0 is deprecated. */\r\n setFrameworkVersion: (frameworkVersion: FrameworkVersionId) => createAction(ConfigurableUiActionId.SetFrameworkVersion, frameworkVersion), // eslint-disable-line deprecation/deprecation\r\n setShowWidgetIcon: (showWidgetIcon: boolean) => createAction(ConfigurableUiActionId.SetShowWidgetIcon, showWidgetIcon),\r\n setAutoCollapseUnpinnedPanels: (autoCollapse: boolean) => createAction(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, autoCollapse),\r\n setViewOverlayDisplay: (displayViewOverlay: boolean) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),\r\n setAnimateToolSettings: (animateToolSettings: boolean) => createAction(ConfigurableUiActionId.AnimateToolSettings, animateToolSettings),\r\n setUseToolAsToolSettingsLabel: (useToolAsToolSettingsLabel: boolean) => createAction(ConfigurableUiActionId.UseToolAsToolSettingsLabel, useToolAsToolSettingsLabel),\r\n setToolbarOpacity: (opacity: number) => createAction(ConfigurableUiActionId.SetToolbarOpacity, opacity),\r\n};\r\n\r\n/** Union of ConfigurableUi Redux actions\r\n * @public\r\n */\r\nexport type ConfigurableUiActionsUnion = ActionsUnion<typeof ConfigurableUiActions>;\r\n\r\n/** Handles actions to update ConfigurableUiState.\r\n * @public\r\n */\r\nexport function ConfigurableUiReducer(state: ConfigurableUiState = initialState, action: ConfigurableUiActionsUnion): ConfigurableUiState {\r\n const outState = state;\r\n\r\n switch (action.type) {\r\n case ConfigurableUiActionId.SetSnapMode: {\r\n return { ...state, snapMode: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetToolPrompt: {\r\n return { ...state, toolPrompt: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetTheme: {\r\n return { ...state, theme: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetWidgetOpacity: {\r\n return { ...state, widgetOpacity: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetDragInteraction: {\r\n return { ...state, useDragInteraction: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetFrameworkVersion: { // eslint-disable-line deprecation/deprecation\r\n const frameworkVersion = (action.payload);\r\n return { ...state, frameworkVersion };\r\n }\r\n case ConfigurableUiActionId.SetShowWidgetIcon: {\r\n return { ...state, showWidgetIcon: action.payload };\r\n }\r\n case ConfigurableUiActionId.AutoCollapseUnpinnedPanels: {\r\n return { ...state, autoCollapseUnpinnedPanels: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetViewOverlayDisplay: {\r\n return { ...state, viewOverlayDisplay: action.payload };\r\n }\r\n case ConfigurableUiActionId.AnimateToolSettings: {\r\n return { ...state, animateToolSettings: action.payload };\r\n }\r\n case ConfigurableUiActionId.UseToolAsToolSettingsLabel: {\r\n return { ...state, useToolAsToolSettingsLabel: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetToolbarOpacity: {\r\n return { ...state, toolbarOpacity: action.payload };\r\n }\r\n }\r\n return outState;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAA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C,CAAC;YAC/C,OAAO,EAAE,GAAG,KAAK,EAAE,mBAAmB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SAC1D;QACD,KAAK,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;YACtD,OAAO,EAAE,GAAG,KAAK,EAAE,0BAA0B,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACjE;QACD,KAAK,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACrD;KACF;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module State\r\n */\r\n\r\nimport { SnapMode } from \"@itwin/core-frontend\";\r\nimport { ActionsUnion, createAction } from \"../redux/redux-ts\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, TOOLBAR_OPACITY_DEFAULT, WIDGET_OPACITY_DEFAULT } from \"../theme/ThemeManager\";\r\nimport { FrameworkVersionId } from \"../UiFramework\";\r\n\r\n// cSpell:ignore configurableui snapmode toolprompt\r\n\r\n/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.\r\n * Since these are also used as sync ids they should be in lowercase.\r\n * @public\r\n */\r\nexport enum ConfigurableUiActionId {\r\n SetSnapMode = \"configurableui:set_snapmode\",\r\n SetTheme = \"configurableui:set_theme\",\r\n SetToolPrompt = \"configurableui:set_toolprompt\",\r\n SetWidgetOpacity = \"configurableui:set_widget_opacity\",\r\n SetDragInteraction = \"configurableui:set-drag-interaction\",\r\n /** @deprecated in 3.6. UI1.0 is deprecated. */\r\n SetFrameworkVersion = \"configurableui:set-framework-version\",\r\n SetShowWidgetIcon = \"configurableui:set-show-widget-icon\",\r\n AutoCollapseUnpinnedPanels = \"configurableui:set-auto-collapse-unpinned-panels\",\r\n SetViewOverlayDisplay = \"configurableui:set-view-overlay-display\",\r\n AnimateToolSettings = \"configurableui:set-animate-tool-settings\",\r\n UseToolAsToolSettingsLabel = \"configurableui:set-use-tool-as-tool-settings-label\",\r\n SetToolbarOpacity = \"configurableui:set-toolbar-opacity\",\r\n}\r\n\r\n/** The portion of state managed by the ConfigurableUiReducer.\r\n * @public\r\n */\r\nexport interface ConfigurableUiState {\r\n snapMode: number;\r\n toolPrompt: string;\r\n theme: string;\r\n widgetOpacity: number;\r\n useDragInteraction: boolean;\r\n /** @deprecated in 3.6. UI1.0 is deprecated. */\r\n frameworkVersion: FrameworkVersionId; // eslint-disable-line deprecation/deprecation\r\n showWidgetIcon: boolean;\r\n autoCollapseUnpinnedPanels: boolean;\r\n viewOverlayDisplay: boolean;\r\n animateToolSettings: boolean;\r\n useToolAsToolSettingsLabel: boolean;\r\n toolbarOpacity: number;\r\n}\r\n\r\n/** used on first call of ConfigurableUiReducer */\r\nconst initialState: ConfigurableUiState = {\r\n snapMode: SnapMode.NearestKeypoint as number,\r\n toolPrompt: \"\",\r\n theme: SYSTEM_PREFERRED_COLOR_THEME,\r\n widgetOpacity: WIDGET_OPACITY_DEFAULT,\r\n useDragInteraction: false,\r\n frameworkVersion: \"2\",\r\n showWidgetIcon: true,\r\n autoCollapseUnpinnedPanels: false,\r\n viewOverlayDisplay: true,\r\n animateToolSettings: false,\r\n useToolAsToolSettingsLabel: false,\r\n toolbarOpacity: TOOLBAR_OPACITY_DEFAULT,\r\n};\r\n\r\n/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.\r\n * @public\r\n */\r\nexport const ConfigurableUiActions = { // eslint-disable-line @typescript-eslint/naming-convention\r\n setSnapMode: (snapMode: number) => createAction(ConfigurableUiActionId.SetSnapMode, snapMode),\r\n setTheme:\r\n // istanbul ignore next\r\n (theme: string) => createAction(ConfigurableUiActionId.SetTheme, theme),\r\n setToolPrompt:\r\n // istanbul ignore next\r\n (toolPrompt: string) => createAction(ConfigurableUiActionId.SetToolPrompt, toolPrompt),\r\n setWidgetOpacity:\r\n // istanbul ignore next\r\n (opacity: number) => createAction(ConfigurableUiActionId.SetWidgetOpacity, opacity),\r\n setDragInteraction: (dragInteraction: boolean) => createAction(ConfigurableUiActionId.SetDragInteraction, dragInteraction),\r\n /** @deprecated in 3.6. UI1.0 is deprecated. */\r\n setFrameworkVersion: (frameworkVersion: FrameworkVersionId) => createAction(ConfigurableUiActionId.SetFrameworkVersion, frameworkVersion), // eslint-disable-line deprecation/deprecation\r\n setShowWidgetIcon: (showWidgetIcon: boolean) => createAction(ConfigurableUiActionId.SetShowWidgetIcon, showWidgetIcon),\r\n setAutoCollapseUnpinnedPanels: (autoCollapse: boolean) => createAction(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, autoCollapse),\r\n setViewOverlayDisplay: (displayViewOverlay: boolean) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),\r\n setAnimateToolSettings: (animateToolSettings: boolean) => createAction(ConfigurableUiActionId.AnimateToolSettings, animateToolSettings),\r\n setUseToolAsToolSettingsLabel: (useToolAsToolSettingsLabel: boolean) => createAction(ConfigurableUiActionId.UseToolAsToolSettingsLabel, useToolAsToolSettingsLabel),\r\n setToolbarOpacity: (opacity: number) => createAction(ConfigurableUiActionId.SetToolbarOpacity, opacity),\r\n};\r\n\r\n/** Union of ConfigurableUi Redux actions\r\n * @public\r\n */\r\nexport type ConfigurableUiActionsUnion = ActionsUnion<typeof ConfigurableUiActions>;\r\n\r\n/** Handles actions to update ConfigurableUiState.\r\n * @public\r\n */\r\nexport function ConfigurableUiReducer(state: ConfigurableUiState = initialState, action: ConfigurableUiActionsUnion): ConfigurableUiState {\r\n const outState = state;\r\n\r\n switch (action.type) {\r\n case ConfigurableUiActionId.SetSnapMode: {\r\n return { ...state, snapMode: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetToolPrompt: {\r\n return { ...state, toolPrompt: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetTheme: {\r\n return { ...state, theme: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetWidgetOpacity: {\r\n return { ...state, widgetOpacity: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetDragInteraction: {\r\n return { ...state, useDragInteraction: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetFrameworkVersion: { // eslint-disable-line deprecation/deprecation\r\n const frameworkVersion = (action.payload);\r\n return { ...state, frameworkVersion };\r\n }\r\n case ConfigurableUiActionId.SetShowWidgetIcon: {\r\n return { ...state, showWidgetIcon: action.payload };\r\n }\r\n case ConfigurableUiActionId.AutoCollapseUnpinnedPanels: {\r\n return { ...state, autoCollapseUnpinnedPanels: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetViewOverlayDisplay: {\r\n return { ...state, viewOverlayDisplay: action.payload };\r\n }\r\n case ConfigurableUiActionId.AnimateToolSettings: {\r\n return { ...state, animateToolSettings: action.payload };\r\n }\r\n case ConfigurableUiActionId.UseToolAsToolSettingsLabel: {\r\n return { ...state, useToolAsToolSettingsLabel: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetToolbarOpacity: {\r\n return { ...state, toolbarOpacity: action.payload };\r\n }\r\n }\r\n return outState;\r\n}\r\n"]}
|
|
@@ -36,7 +36,7 @@ export interface ContentGroupProps {
|
|
|
36
36
|
*/
|
|
37
37
|
export declare abstract class ContentGroupProvider {
|
|
38
38
|
/** Return the contentGroup based on the `FrontstageProps`.
|
|
39
|
-
* @deprecated Implement using `contentGroup` instead.
|
|
39
|
+
* @deprecated in 3.5. Implement using `contentGroup` instead.
|
|
40
40
|
*/
|
|
41
41
|
abstract provideContentGroup(props: FrontstageProps): Promise<ContentGroup>;
|
|
42
42
|
/** Return the contentGroup based on the `FrontstageConfig`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"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CAAC;gBAErI,IAAI,eAAe;oBACjB,eAAe,CAAC,OAAO,CAAC,CAAC;aAC5B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,YAAY;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,KAAK,EAA8B,CAAC;QAE1D,eAAe,CAAC,OAAO,CAAC,CAAC,OAAuB,EAAE,EAAE;YAClD,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AAnKc,iBAAI,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { ScreenViewport } from \"@itwin/core-frontend\";\r\nimport { ContentLayoutProps, UiError } from \"@itwin/appui-abstract\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlConstructor, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\nimport { ConfigurableUiManager } from \"../configurableui/ConfigurableUiManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { FrontstageProps } from \"../frontstage/Frontstage\";\r\nimport { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\r\n\r\n/** Properties for content displayed in a content view\r\n * @public\r\n */\r\nexport interface ContentProps {\r\n /** A unique id for the Content View within the group */\r\n id: string;\r\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\r\n classId: string | ConfigurableUiControlConstructor;\r\n /** Optional application data passed down to the Content View */\r\n applicationData?: any;\r\n}\r\n\r\n/** Properties for a [[ContentGroup]]\r\n * @public\r\n */\r\nexport interface ContentGroupProps {\r\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\r\n id: string;\r\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\r\n layout: ContentLayoutProps;\r\n /** A collection of [[ContentProps]], one for each content view */\r\n contents: ContentProps[];\r\n}\r\n\r\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\r\n * content group just prior to activating the frontstage.\r\n * @public\r\n */\r\nexport abstract class ContentGroupProvider {\r\n /** Return the contentGroup based on the `FrontstageProps`.\r\n * @deprecated Implement using `contentGroup` instead.\r\n */\r\n abstract provideContentGroup(props: FrontstageProps): Promise<ContentGroup>; // eslint-disable-line deprecation/deprecation\r\n\r\n /** Return the contentGroup based on the `FrontstageConfig`.\r\n * @beta This method will be required in upcoming version, this method will be prioritized if it exists over `provideContentGroup`.\r\n */\r\n public contentGroup?(config: FrontstageConfig): Promise<ContentGroup>;\r\n\r\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\r\n * be to remove applicationData entries.\r\n */\r\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\r\n return contentGroupProps;\r\n }\r\n\r\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\r\n * Typically this may be to add applicationData to content entries.\r\n */\r\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\r\n return contentGroupProps;\r\n }\r\n\r\n /** Allow provider to save any content group data before the stage deactivated. */\r\n public async onFrontstageDeactivated() { }\r\n}\r\n\r\n/** Callback to process content properties during toJSON method\r\n * @public\r\n */\r\nexport type ContentCallback = (content: ContentProps) => void;\r\n\r\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\r\n * @public\r\n */\r\nexport class ContentGroup {\r\n private static _sId = 0;\r\n public groupId: string;\r\n public propsId: string;\r\n public layout: ContentLayoutProps;\r\n public contentPropsList: ContentProps[];\r\n private _contentControls = new Map<string, ContentControl>();\r\n private _contentSetMap = new Map<string, ContentControl>();\r\n\r\n public get id() {\r\n return this.groupId;\r\n }\r\n\r\n constructor(contentGroupProps: ContentGroupProps) {\r\n this.layout = { ...contentGroupProps.layout };\r\n this.propsId = contentGroupProps.id;\r\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\r\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\r\n this.contentPropsList = contentGroupProps.contents;\r\n }\r\n\r\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\r\n public getContentControl(contentProps: ContentProps, _index: number): ContentControl | undefined {\r\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\r\n const id = `${contentProps.id}::${this.groupId}`;\r\n let contentControl: ContentControl | undefined;\r\n\r\n if (!this._contentControls.get(contentProps.id)) {\r\n let usedClassId: string = \"\";\r\n\r\n if (typeof contentProps.classId === \"string\") {\r\n if (!this._contentControls.get(contentProps.id) && ConfigurableUiManager.isControlRegistered(contentProps.classId)) {\r\n contentControl = ConfigurableUiManager.createControl(contentProps.classId, id, contentProps.applicationData, contentProps.id) as ContentControl;\r\n usedClassId = contentProps.classId;\r\n }\r\n } else {\r\n const info = new ConfigurableCreateInfo(contentProps.classId.name, id, contentProps.id);\r\n contentControl = new contentProps.classId(info, contentProps.applicationData) as ContentControl;\r\n usedClassId = contentProps.classId.name;\r\n }\r\n\r\n if (contentControl) {\r\n if (contentControl.getType() !== ConfigurableUiControlType.Content && contentControl.getType() !== ConfigurableUiControlType.Viewport) {\r\n throw new UiError(UiFramework.loggerCategory(this), `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`);\r\n }\r\n contentControl.initialize();\r\n this._contentControls.set(contentProps.id, contentControl);\r\n }\r\n }\r\n\r\n return this._contentControls.get(contentProps.id);\r\n }\r\n\r\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\r\n public getContentControlById(id: string): ContentControl | undefined {\r\n return this._contentControls.get(id);\r\n }\r\n\r\n /** Gets the React nodes representing the Content Views in this Content Group. */\r\n public getContentNodes(): React.ReactNode[] {\r\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\r\n\r\n this._contentSetMap.clear();\r\n\r\n this.contentPropsList.forEach((contentProps: ContentProps, index: number) => {\r\n const control = this.getContentControl(contentProps, index);\r\n if (control) {\r\n contentNodes.push(control.reactNode);\r\n this._contentSetMap.set(control.controlId, control);\r\n }\r\n });\r\n\r\n return contentNodes;\r\n }\r\n\r\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\r\n public getControlFromElement(node: React.ReactNode): ContentControl | undefined {\r\n if (this._contentSetMap.size === 0)\r\n this.getContentNodes();\r\n\r\n if (node && (node as React.ReactElement<any>).key) {\r\n const key = ((node as React.ReactElement<any>).key as string);\r\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\r\n const controlId = key.split(\"::\", 1)[0];\r\n return this._contentSetMap.get(controlId);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\r\n public refreshContentNodes() {\r\n this._contentSetMap.clear();\r\n }\r\n\r\n /** Gets an array of the content controls representing the Content Views. */\r\n public getContentControls(): ContentControl[] {\r\n const contentControls: ContentControl[] = new Array<ContentControl>();\r\n\r\n this.contentPropsList.forEach((contentProps: ContentProps, index: number) => {\r\n const control = this.getContentControl(contentProps, index);\r\n if (control) {\r\n contentControls.push(control);\r\n }\r\n });\r\n\r\n return contentControls;\r\n }\r\n\r\n /** Called when Frontstage is deactivated. */\r\n public onFrontstageDeactivated(): void {\r\n this.clearContentControls();\r\n }\r\n\r\n /** Called when Frontstage is ready. */\r\n public onFrontstageReady(): void { }\r\n\r\n /** Clears the map of content controls. */\r\n public clearContentControls(): void {\r\n this._contentControls.clear();\r\n }\r\n\r\n /** Creates [[ContentGroupProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\r\n const contentGroupProps: ContentGroupProps = {\r\n id: this.propsId,\r\n layout: this.layout,\r\n contents: this.contentPropsList,\r\n };\r\n\r\n contentGroupProps.contents.forEach((content: ContentProps, index: number) => {\r\n if (typeof content.classId !== \"string\") {\r\n const classId = ConfigurableUiManager.getConstructorClassId(content.classId);\r\n if (classId !== undefined)\r\n content.classId = classId;\r\n else\r\n throw new UiError(UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);\r\n\r\n if (contentCallback)\r\n contentCallback(content);\r\n }\r\n });\r\n\r\n return contentGroupProps;\r\n }\r\n\r\n /** Gets Viewports from Viewport Content Controls\r\n * @internal\r\n */\r\n public getViewports(): Array<ScreenViewport | undefined> {\r\n const contentControls = this.getContentControls();\r\n const viewports = new Array<ScreenViewport | undefined>();\r\n\r\n contentControls.forEach((control: ContentControl) => {\r\n if (control.isViewport && control.viewport) {\r\n viewports.push(control.viewport);\r\n } else {\r\n viewports.push(undefined);\r\n }\r\n });\r\n\r\n return viewports;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContentGroup.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentGroup.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAsB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAoC,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC9I,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA6B7C;;;GAGG;AACH,MAAM,OAAgB,oBAAoB;IAWxC;;OAEG;IACI,kBAAkB,CAAC,iBAAoC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AAO,CAAC,QAAQ,EAAE;gBAC1C,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aAClC;iBAAM;gBACL,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;;AAnKc,iBAAI,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { ScreenViewport } from \"@itwin/core-frontend\";\r\nimport { ContentLayoutProps, UiError } from \"@itwin/appui-abstract\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlConstructor, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\nimport { ConfigurableUiManager } from \"../configurableui/ConfigurableUiManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { FrontstageProps } from \"../frontstage/Frontstage\";\r\nimport { FrontstageConfig } from \"../frontstage/FrontstageConfig\";\r\n\r\n/** Properties for content displayed in a content view\r\n * @public\r\n */\r\nexport interface ContentProps {\r\n /** A unique id for the Content View within the group */\r\n id: string;\r\n /** The class name or [[ConfigurableUiControlConstructor]] of the content control */\r\n classId: string | ConfigurableUiControlConstructor;\r\n /** Optional application data passed down to the Content View */\r\n applicationData?: any;\r\n}\r\n\r\n/** Properties for a [[ContentGroup]]\r\n * @public\r\n */\r\nexport interface ContentGroupProps {\r\n /** An id for the [[ContentGroup]]. This id is used to locate a ContentGroup and it also can be used by an ContentGroupProvider to save/restore content settings */\r\n id: string;\r\n /** Content Layout Id or complete set of [[ContentLayoutProps]] */\r\n layout: ContentLayoutProps;\r\n /** A collection of [[ContentProps]], one for each content view */\r\n contents: ContentProps[];\r\n}\r\n\r\n/** Abstract class that can be implemented and specified by frontstage to dynamically construct\r\n * content group just prior to activating the frontstage.\r\n * @public\r\n */\r\nexport abstract class ContentGroupProvider {\r\n /** Return the contentGroup based on the `FrontstageProps`.\r\n * @deprecated in 3.5. Implement using `contentGroup` instead.\r\n */\r\n abstract provideContentGroup(props: FrontstageProps): Promise<ContentGroup>; // eslint-disable-line deprecation/deprecation\r\n\r\n /** Return the contentGroup based on the `FrontstageConfig`.\r\n * @beta This method will be required in upcoming version, this method will be prioritized if it exists over `provideContentGroup`.\r\n */\r\n public contentGroup?(config: FrontstageConfig): Promise<ContentGroup>;\r\n\r\n /** Allow provider to update any data stored in ContentGroupProps. Typically this may\r\n * be to remove applicationData entries.\r\n */\r\n public prepareToSaveProps(contentGroupProps: ContentGroupProps) {\r\n return contentGroupProps;\r\n }\r\n\r\n /** Allow provider to update any stored ContentGroupProps be it is to be used to create ContentGroup and layouts.\r\n * Typically this may be to add applicationData to content entries.\r\n */\r\n public applyUpdatesToSavedProps(contentGroupProps: ContentGroupProps) {\r\n return contentGroupProps;\r\n }\r\n\r\n /** Allow provider to save any content group data before the stage deactivated. */\r\n public async onFrontstageDeactivated() { }\r\n}\r\n\r\n/** Callback to process content properties during toJSON method\r\n * @public\r\n */\r\nexport type ContentCallback = (content: ContentProps) => void;\r\n\r\n/** ContentGroup class. Content Groups define content displayed in content views that are laid out using a [[ContentLayout]].\r\n * @public\r\n */\r\nexport class ContentGroup {\r\n private static _sId = 0;\r\n public groupId: string;\r\n public propsId: string;\r\n public layout: ContentLayoutProps;\r\n public contentPropsList: ContentProps[];\r\n private _contentControls = new Map<string, ContentControl>();\r\n private _contentSetMap = new Map<string, ContentControl>();\r\n\r\n public get id() {\r\n return this.groupId;\r\n }\r\n\r\n constructor(contentGroupProps: ContentGroupProps) {\r\n this.layout = { ...contentGroupProps.layout };\r\n this.propsId = contentGroupProps.id;\r\n // ensure we have a unique groupId for each instance of a content group - this will be used to generate a key in the React controls\r\n this.groupId = `[${contentGroupProps.id}-${ContentGroup._sId++}]`;\r\n this.contentPropsList = contentGroupProps.contents;\r\n }\r\n\r\n /** Gets a [[ContentControl]] from the Content Group based on its [[ContentProps]]. */\r\n public getContentControl(contentProps: ContentProps, _index: number): ContentControl | undefined {\r\n // ensure we have a unique control Id for each instance of a content control - this will be used as a key for the React control - see `ContentControl.getKeyedReactNode`\r\n const id = `${contentProps.id}::${this.groupId}`;\r\n let contentControl: ContentControl | undefined;\r\n\r\n if (!this._contentControls.get(contentProps.id)) {\r\n let usedClassId: string = \"\";\r\n\r\n if (typeof contentProps.classId === \"string\") {\r\n if (!this._contentControls.get(contentProps.id) && ConfigurableUiManager.isControlRegistered(contentProps.classId)) {\r\n contentControl = ConfigurableUiManager.createControl(contentProps.classId, id, contentProps.applicationData, contentProps.id) as ContentControl;\r\n usedClassId = contentProps.classId;\r\n }\r\n } else {\r\n const info = new ConfigurableCreateInfo(contentProps.classId.name, id, contentProps.id);\r\n contentControl = new contentProps.classId(info, contentProps.applicationData) as ContentControl;\r\n usedClassId = contentProps.classId.name;\r\n }\r\n\r\n if (contentControl) {\r\n if (contentControl.getType() !== ConfigurableUiControlType.Content && contentControl.getType() !== ConfigurableUiControlType.Viewport) {\r\n throw new UiError(UiFramework.loggerCategory(this), `getContentControl error: '${usedClassId}' is NOT a ContentControl or ViewportContentControl`);\r\n }\r\n contentControl.initialize();\r\n this._contentControls.set(contentProps.id, contentControl);\r\n }\r\n }\r\n\r\n return this._contentControls.get(contentProps.id);\r\n }\r\n\r\n /** Gets a [[ContentControl]] from the Content Group with a given ID. */\r\n public getContentControlById(id: string): ContentControl | undefined {\r\n return this._contentControls.get(id);\r\n }\r\n\r\n /** Gets the React nodes representing the Content Views in this Content Group. */\r\n public getContentNodes(): React.ReactNode[] {\r\n const contentNodes: React.ReactNode[] = new Array<React.ReactNode>();\r\n\r\n this._contentSetMap.clear();\r\n\r\n this.contentPropsList.forEach((contentProps: ContentProps, index: number) => {\r\n const control = this.getContentControl(contentProps, index);\r\n if (control) {\r\n contentNodes.push(control.reactNode);\r\n this._contentSetMap.set(control.controlId, control);\r\n }\r\n });\r\n\r\n return contentNodes;\r\n }\r\n\r\n /** Gets the [[ContentControl]] associated with a given React node representing a Content View. */\r\n public getControlFromElement(node: React.ReactNode): ContentControl | undefined {\r\n if (this._contentSetMap.size === 0)\r\n this.getContentNodes();\r\n\r\n if (node && (node as React.ReactElement<any>).key) {\r\n const key = ((node as React.ReactElement<any>).key as string);\r\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\r\n const controlId = key.split(\"::\", 1)[0];\r\n return this._contentSetMap.get(controlId);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Refreshes the React nodes representing the Content Views in this Content Group.. */\r\n public refreshContentNodes() {\r\n this._contentSetMap.clear();\r\n }\r\n\r\n /** Gets an array of the content controls representing the Content Views. */\r\n public getContentControls(): ContentControl[] {\r\n const contentControls: ContentControl[] = new Array<ContentControl>();\r\n\r\n this.contentPropsList.forEach((contentProps: ContentProps, index: number) => {\r\n const control = this.getContentControl(contentProps, index);\r\n if (control) {\r\n contentControls.push(control);\r\n }\r\n });\r\n\r\n return contentControls;\r\n }\r\n\r\n /** Called when Frontstage is deactivated. */\r\n public onFrontstageDeactivated(): void {\r\n this.clearContentControls();\r\n }\r\n\r\n /** Called when Frontstage is ready. */\r\n public onFrontstageReady(): void { }\r\n\r\n /** Clears the map of content controls. */\r\n public clearContentControls(): void {\r\n this._contentControls.clear();\r\n }\r\n\r\n /** Creates [[ContentGroupProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(contentCallback?: ContentCallback): ContentGroupProps {\r\n const contentGroupProps: ContentGroupProps = {\r\n id: this.propsId,\r\n layout: this.layout,\r\n contents: this.contentPropsList,\r\n };\r\n\r\n contentGroupProps.contents.forEach((content: ContentProps, index: number) => {\r\n if (typeof content.classId !== \"string\") {\r\n const classId = ConfigurableUiManager.getConstructorClassId(content.classId);\r\n if (classId !== undefined)\r\n content.classId = classId;\r\n else\r\n throw new UiError(UiFramework.loggerCategory(this), `toJSON: ContentControl at index ${index} is NOT registered with a string id`);\r\n\r\n if (contentCallback)\r\n contentCallback(content);\r\n }\r\n });\r\n\r\n return contentGroupProps;\r\n }\r\n\r\n /** Gets Viewports from Viewport Content Controls\r\n * @internal\r\n */\r\n public getViewports(): Array<ScreenViewport | undefined> {\r\n const contentControls = this.getContentControls();\r\n const viewports = new Array<ScreenViewport | undefined>();\r\n\r\n contentControls.forEach((control: ContentControl) => {\r\n if (control.isViewport && control.viewport) {\r\n viewports.push(control.viewport);\r\n } else {\r\n viewports.push(undefined);\r\n }\r\n });\r\n\r\n return viewports;\r\n }\r\n}\r\n"]}
|
|
@@ -73,7 +73,7 @@ export interface ContentLayoutComponentProps extends CommonProps {
|
|
|
73
73
|
contentLayout: ContentLayoutDef;
|
|
74
74
|
contentGroup: ContentGroup;
|
|
75
75
|
/**
|
|
76
|
-
* @deprecated In upcoming version, widget mode will be removed and footer mode will always be true.
|
|
76
|
+
* @deprecated in 3.3. In upcoming version, widget mode will be removed and footer mode will always be true.
|
|
77
77
|
*/
|
|
78
78
|
isInFooterMode?: boolean;
|
|
79
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAA8E,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIrK,wCAAwC;AACxC,UAAU,mBAAoB,SAAQ,WAAW;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CA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BAAqB,IAAI,MAAM,EAAE;IAexC,OAAO,CAAC,gCAAgC;IAuBxC,OAAO,CAAC,8BAA8B;IAuBtC,gBAAgB;WACF,WAAW,CAAC,WAAW,EAAE,mBAAmB,GAAG,WAAW,GAAG,SAAS;CAUrF;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,OAAO,CAAC,+BAA+B,CAAC;CAAI;AAE7F;GACG;AACH,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B;;MAEE;IACF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,EAAE,kBAAkB,CAAC;IAEjG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAEjD,KAAK,EAAE,2BAA2B;IAgB9B,iBAAiB;IAIjB,oBAAoB;IAIpC,OAAO,CAAC,6BAA6B,CAYnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAezC,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,UAAU,CAEhB;CACH"}
|
|
@@ -23,6 +23,15 @@ export function ContentWrapper(props) {
|
|
|
23
23
|
const { content } = props;
|
|
24
24
|
const [isActive, setIsActive] = React.useState(content === ContentViewManager.getActiveContent());
|
|
25
25
|
const activeFrontstageDef = useActiveFrontstageDef();
|
|
26
|
+
const contentControlKey = (contentControl) => {
|
|
27
|
+
let controlId;
|
|
28
|
+
if (contentControl && contentControl.key) {
|
|
29
|
+
const key = contentControl.key;
|
|
30
|
+
// key has format `${contentProps.id}::${this.groupId}` which is stored as unique id
|
|
31
|
+
controlId = key.split("::", 1)[0];
|
|
32
|
+
}
|
|
33
|
+
return controlId;
|
|
34
|
+
};
|
|
26
35
|
// istanbul ignore next
|
|
27
36
|
const [hasMultipleContents, setHasMultipleContents] = React.useState(() => {
|
|
28
37
|
var _a, _b, _c;
|
|
@@ -35,7 +44,14 @@ export function ContentWrapper(props) {
|
|
|
35
44
|
React.useEffect(() => {
|
|
36
45
|
const handleActiveContentChanged = (args) => {
|
|
37
46
|
var _a, _b, _c;
|
|
38
|
-
|
|
47
|
+
const contentIsIdentical = content === args.activeContent;
|
|
48
|
+
if (contentIsIdentical)
|
|
49
|
+
setIsActive(contentIsIdentical);
|
|
50
|
+
else {
|
|
51
|
+
const contentId = contentControlKey(content);
|
|
52
|
+
const activeContentId = contentControlKey(args.activeContent);
|
|
53
|
+
setIsActive(contentId === activeContentId);
|
|
54
|
+
}
|
|
39
55
|
// istanbul ignore next
|
|
40
56
|
setHasMultipleContents((activeFrontstageDef && (!!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
|
|
41
57
|
((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1));
|
|
@@ -44,6 +60,7 @@ export function ContentWrapper(props) {
|
|
|
44
60
|
}, [activeFrontstageDef, content]);
|
|
45
61
|
const handleMouseDown = React.useCallback(() => {
|
|
46
62
|
ContentViewManager.setActiveContent(content);
|
|
63
|
+
setIsActive(true);
|
|
47
64
|
}, [content]);
|
|
48
65
|
React.useEffect(() => {
|
|
49
66
|
const onAvailableContentChanged = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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AK,CAAC,YAAY,CAAC,OAAO;SAChD,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,iBAAiB,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAClG,CAAC;IAEe,oBAAoB;QAClC,iBAAiB,CAAC,6BAA6B,CAAC,cAAc,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IACrG,CAAC;IAgBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BAAK,EAAE,EAAC,wBAAwB,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvF,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAC,cAAc,IAE9E,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\n// cSpell:ignore contentlayout\r\n\r\nimport \"./ContentLayout.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { SplitPane } from \"./split-pane/SplitPane\";\r\nimport { CommonProps, Orientation } from \"@itwin/core-react\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { UiShowHideManager } from \"../utils/UiShowHideManager\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { ContentLayoutProps, LayoutFragmentProps, LayoutHorizontalSplitProps, LayoutSplitPropsBase, LayoutVerticalSplitProps, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ActiveContentChangedEventArgs, ContentViewManager } from \"./ContentViewManager\";\r\nimport { useActiveFrontstageDef } from \"../frontstage/Frontstage\";\r\n\r\n/** Properties for [[ContentWrapper]] */\r\ninterface ContentWrapperProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** ContentWrapper React component.\r\n * @internal\r\n */\r\nexport function ContentWrapper(props: ContentWrapperProps) {\r\n const { content } = props;\r\n const [isActive, setIsActive] = React.useState(content === ContentViewManager.getActiveContent());\r\n const activeFrontstageDef = useActiveFrontstageDef();\r\n\r\n // istanbul ignore next\r\n const [hasMultipleContents, setHasMultipleContents] = React.useState(() =>\r\n (activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1)\r\n );\r\n\r\n React.useEffect(() => {\r\n setIsActive(content === ContentViewManager.getActiveContent());\r\n }, [content]);\r\n\r\n React.useEffect(() => {\r\n const handleActiveContentChanged = (args: ActiveContentChangedEventArgs) => {\r\n setIsActive(content === args.activeContent);\r\n // istanbul ignore next\r\n setHasMultipleContents((activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1));\r\n };\r\n return ContentViewManager.onActiveContentChangedEvent.addListener(handleActiveContentChanged);\r\n }, [activeFrontstageDef, content]);\r\n\r\n const handleMouseDown = React.useCallback(() => {\r\n ContentViewManager.setActiveContent(content);\r\n }, [content]);\r\n\r\n React.useEffect(() => {\r\n const onAvailableContentChanged = () => {\r\n // istanbul ignore next\r\n setHasMultipleContents((activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1));\r\n };\r\n return ContentViewManager.onAvailableContentChangedEvent.addListener(onAvailableContentChanged);\r\n }, [activeFrontstageDef]);\r\n\r\n const overlayClassName = classnames(\r\n \"uifw-contentlayout-overlay-div\",\r\n isActive && hasMultipleContents ? \"uifw-contentlayout-overlay-active\" : \"uifw-contentlayout-overlay-inactive\",\r\n );\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-wrapper\", props.className)} style={props.style}\r\n onMouseDown={handleMouseDown} onMouseMove={UiShowHideManager.handleContentMouseMove} role=\"presentation\"\r\n >\r\n {content}\r\n <div className={overlayClassName} />\r\n </div>\r\n );\r\n}\r\n\r\n/** Properties for the [[SplitContainer]] component */\r\ninterface SplitContainerProps extends CommonProps {\r\n contentA: React.ReactNode;\r\n contentB: React.ReactNode;\r\n orientation: Orientation;\r\n percentage: number;\r\n resizable: boolean;\r\n minSizeTopLeft: number;\r\n minSizeBottomRight: number;\r\n splitterStateId?: string;\r\n onSplitterChange?: (size: number, percentage: number) => void;\r\n}\r\n\r\n/** Split Container class.\r\n */\r\nclass SplitContainer extends React.Component<SplitContainerProps> {\r\n private _containerDiv: HTMLDivElement | null = null;\r\n\r\n constructor(props: SplitContainerProps) {\r\n super(props);\r\n }\r\n\r\n private _onSplitterChange = (size: number): void => {\r\n let percentage = 0;\r\n\r\n // istanbul ignore else\r\n if (this._containerDiv && size > 0) {\r\n if (this.props.orientation === Orientation.Horizontal) {\r\n const height = this._containerDiv.getBoundingClientRect().height;\r\n // istanbul ignore if\r\n if (height > 0)\r\n percentage = size / height;\r\n } else {\r\n const width = this._containerDiv.getBoundingClientRect().width;\r\n // istanbul ignore if\r\n if (width > 0)\r\n percentage = size / width;\r\n }\r\n\r\n // istanbul ignore else\r\n if (this.props.onSplitterChange)\r\n this.props.onSplitterChange(size, percentage);\r\n }\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const orientation = (this.props.orientation === Orientation.Horizontal) ? \"horizontal\" : \"vertical\";\r\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\r\n const minSizeTopLeft = this.props.minSizeTopLeft;\r\n const minSizeBottomRight = -(this.props.minSizeBottomRight);\r\n\r\n return (\r\n <div ref={(e) => { this._containerDiv = e; }}\r\n className={classnames(\"uifw-contentlayout-full-size\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <SplitPane split={orientation}\r\n minSize={minSizeTopLeft} maxSize={minSizeBottomRight} defaultSize={defaultSize}\r\n onChange={this._onSplitterChange} allowResize={this.props.resizable}\r\n >\r\n {this.props.contentA}\r\n {this.props.contentB}\r\n </SplitPane>\r\n </div >\r\n );\r\n }\r\n}\r\n\r\n/** Properties for [[SingleContentContainer]] component\r\n */\r\ninterface SingleContentProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** Single Content Container class.\r\n */\r\nclass SingleContentContainer extends React.Component<SingleContentProps> {\r\n\r\n public override render(): React.ReactNode {\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-full-size\", this.props.className)} style={this.props.style} data-testid=\"single-content-container\"\r\n onMouseMove={UiShowHideManager.handleContentMouseMove}\r\n >\r\n <ContentWrapper content={this.props.content} style={{ height: \"100%\", position: \"relative\" }} />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Common interface for HorizontalSplit and VerticalSplit\r\n */\r\ninterface LayoutSplit {\r\n createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode;\r\n isLocked: boolean;\r\n}\r\n\r\n/** Minimum split size */\r\nconst MIN_SPLIT_SIZE = 6;\r\n\r\n/** Base Split class.\r\n */\r\nclass BaseSplit {\r\n public defaultPercentage: number;\r\n public stateId: string = \"\";\r\n public isLocked: boolean = false;\r\n\r\n constructor(props: LayoutSplitPropsBase) {\r\n this.defaultPercentage = props.percentage;\r\n\r\n // istanbul ignore else\r\n if (props.id)\r\n this.stateId = props.id;\r\n\r\n // istanbul ignore else\r\n if (props.lock)\r\n this.isLocked = props.lock;\r\n }\r\n}\r\n\r\n/** Horizontal Split class.\r\n */\r\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\r\n private _topIndex: number = -1;\r\n private _bottomIndex: number = -1;\r\n private _topSplit?: LayoutSplit;\r\n private _bottomSplit?: LayoutSplit;\r\n private _props: LayoutHorizontalSplitProps;\r\n private _minSizeTop: number = MIN_SPLIT_SIZE;\r\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutHorizontalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.top === \"number\") {\r\n this._topIndex = props.top;\r\n } else {\r\n this._topSplit = ContentLayoutDef.createSplit(props.top);\r\n }\r\n\r\n if (typeof props.bottom === \"number\") {\r\n this._bottomIndex = props.bottom;\r\n } else {\r\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\r\n }\r\n\r\n if (props.minSizeTop)\r\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeBottom)\r\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const topContent = (!this._topSplit) ?\r\n <ContentWrapper content={contentNodes[this._topIndex]} /> :\r\n this._topSplit.createContentContainer(contentNodes, resizable);\r\n const bottomContent = (!this._bottomSplit) ?\r\n <ContentWrapper content={contentNodes[this._bottomIndex]} /> :\r\n this._bottomSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={topContent}\r\n contentB={bottomContent}\r\n orientation={Orientation.Horizontal}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeTop}\r\n minSizeBottomRight={this._minSizeBottom}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Vertical Split class.\r\n */\r\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\r\n private _leftIndex: number = -1;\r\n private _rightIndex: number = -1;\r\n private _leftSplit?: LayoutSplit;\r\n private _rightSplit?: LayoutSplit;\r\n private _props: LayoutVerticalSplitProps;\r\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\r\n private _minSizeRight: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutVerticalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.left === \"number\") {\r\n this._leftIndex = props.left;\r\n } else {\r\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\r\n }\r\n\r\n if (typeof props.right === \"number\") {\r\n this._rightIndex = props.right;\r\n } else {\r\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\r\n }\r\n\r\n if (props.minSizeLeft)\r\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeRight)\r\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const leftContent = (!this._leftSplit) ?\r\n <ContentWrapper content={contentNodes[this._leftIndex]} /> :\r\n this._leftSplit.createContentContainer(contentNodes, resizable);\r\n const rightContent = (!this._rightSplit) ?\r\n <ContentWrapper content={contentNodes[this._rightIndex]} /> :\r\n this._rightSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={leftContent}\r\n contentB={rightContent}\r\n orientation={Orientation.Vertical}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeLeft}\r\n minSizeBottomRight={this._minSizeRight}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Content Layout Definition class.\r\n * @public\r\n */\r\nexport class ContentLayoutDef {\r\n private _layoutProps: ContentLayoutProps;\r\n private _rootSplit?: LayoutSplit;\r\n\r\n /** ID for this Content Layout */\r\n public id: string = \"\";\r\n /** Description of the layout. */\r\n public description: string = \"\";\r\n constructor(layoutProps: ContentLayoutProps) {\r\n this._layoutProps = layoutProps;\r\n this.id = layoutProps.id;\r\n if (layoutProps.description !== undefined)\r\n this.description = layoutProps.description;\r\n }\r\n\r\n public get rootSplit(): LayoutSplit | undefined { return this._rootSplit; }\r\n\r\n /** Creates [[ContentLayoutProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(): ContentLayoutProps { return this._layoutProps; }\r\n\r\n /** Fill a layout container with React nodes for each content view\r\n */\r\n public fillLayoutContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode | undefined {\r\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\r\n\r\n if (this.rootSplit) {\r\n return this.rootSplit.createContentContainer(contentNodes, resizable);\r\n }\r\n\r\n if (contentNodes.length > 0)\r\n return <SingleContentContainer content={contentNodes[0]} />;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Gets the indexes of content views used in this Content Layout\r\n */\r\n public getUsedContentIndexes(): number[] {\r\n let allContentIndexes: number[] = [];\r\n\r\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\r\n allContentIndexes.push(0);\r\n else {\r\n allContentIndexes = allContentIndexes.concat(this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit));\r\n allContentIndexes = allContentIndexes.concat(this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit));\r\n }\r\n\r\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\r\n\r\n return uniqueContentIndexes;\r\n }\r\n\r\n private getHorizontalSplitContentIndexes(splitProps?: LayoutHorizontalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.top === \"number\")\r\n contentIndexes.push(splitProps.top);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.bottom === \"number\")\r\n contentIndexes.push(splitProps.bottom);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n private getVerticalSplitContentIndexes(splitProps?: LayoutVerticalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.left === \"number\")\r\n contentIndexes.push(splitProps.left);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.right === \"number\")\r\n contentIndexes.push(splitProps.right);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n /** @internal */\r\n public static createSplit(fragmentDef: LayoutFragmentProps): LayoutSplit | undefined {\r\n if (fragmentDef.horizontalSplit) {\r\n return new HorizontalSplit(fragmentDef.horizontalSplit);\r\n } else if (fragmentDef.verticalSplit) {\r\n return new VerticalSplit(fragmentDef.verticalSplit);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Content Layout Activated Event Args class.\r\n * @public\r\n */\r\nexport interface ContentLayoutActivatedEventArgs {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n}\r\n\r\n/** Content Layout Activated Event class.\r\n * @public\r\n */\r\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> { }\r\n\r\n/** State for the [[ContentLayout]].\r\n */\r\ninterface ContentLayoutState {\r\n contentLayoutDef: ContentLayoutDef;\r\n contentContainer?: React.ReactNode;\r\n contentGroupId?: string;\r\n}\r\n\r\n/** Properties for the [[ContentLayout]] React component.\r\n * @public\r\n */\r\nexport interface ContentLayoutComponentProps extends CommonProps {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n /**\r\n * @deprecated In upcoming version, widget mode will be removed and footer mode will always be true.\r\n */\r\n isInFooterMode?: boolean;\r\n}\r\n\r\n/** Content Layout React component.\r\n * @public\r\n */\r\nexport class ContentLayout extends React.Component<ContentLayoutComponentProps, ContentLayoutState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentLayoutState>;\r\n\r\n constructor(props: ContentLayoutComponentProps) {\r\n super(props);\r\n\r\n const contentLayoutDef = this.props.contentLayout;\r\n const contentGroup = this.props.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.state = {\r\n contentLayoutDef: this.props.contentLayout,\r\n contentContainer,\r\n contentGroupId: this.props.contentGroup.groupId,\r\n };\r\n }\r\n\r\n public override componentDidMount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.addListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.removeListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n private _handleContentLayoutActivated = (args: ContentLayoutActivatedEventArgs) => {\r\n const contentLayoutDef = args.contentLayout;\r\n const contentGroup = args.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.setState({\r\n contentLayoutDef: args.contentLayout,\r\n contentContainer,\r\n contentGroupId: contentGroup.groupId,\r\n });\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n if (this.state.contentContainer) {\r\n return (\r\n <div id=\"uifw-contentlayout-div\" className={this.props.className} style={this.props.style}\r\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\r\n onMouseDown={this._onMouseDown} onMouseUp={this._onMouseUp} role=\"presentation\"\r\n >\r\n {this.state.contentContainer}\r\n </div>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(true);\r\n };\r\n\r\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(false);\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContentLayout.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,8BAA8B;AAE9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAe,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAuH,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrK,OAAO,EAAiC,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAOlE;;GAEG;AACH,M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CAAC,KAAK,CAAC,YAAY,CAAC,OAAO;SAChD,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,iBAAiB,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAClG,CAAC;IAEe,oBAAoB;QAClC,iBAAiB,CAAC,6BAA6B,CAAC,cAAc,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IACrG,CAAC;IAgBe,MAAM;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BAAK,EAAE,EAAC,wBAAwB,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvF,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,EACrE,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAC,cAAc,IAE9E,IAAI,CAAC,KAAK,CAAC,gBAAgB,CACxB,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\n// cSpell:ignore contentlayout\r\n\r\nimport \"./ContentLayout.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { SplitPane } from \"./split-pane/SplitPane\";\r\nimport { CommonProps, Orientation } from \"@itwin/core-react\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { UiShowHideManager } from \"../utils/UiShowHideManager\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { ContentLayoutProps, LayoutFragmentProps, LayoutHorizontalSplitProps, LayoutSplitPropsBase, LayoutVerticalSplitProps, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ActiveContentChangedEventArgs, ContentViewManager } from \"./ContentViewManager\";\r\nimport { useActiveFrontstageDef } from \"../frontstage/Frontstage\";\r\n\r\n/** Properties for [[ContentWrapper]] */\r\ninterface ContentWrapperProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** ContentWrapper React component.\r\n * @internal\r\n */\r\nexport function ContentWrapper(props: ContentWrapperProps) {\r\n const { content } = props;\r\n const [isActive, setIsActive] = React.useState(content === ContentViewManager.getActiveContent());\r\n const activeFrontstageDef = useActiveFrontstageDef();\r\n\r\n const contentControlKey = (contentControl: React.ReactNode): string | undefined => {\r\n let controlId: string | undefined;\r\n if (contentControl && (contentControl as React.ReactElement<any>).key) {\r\n const key = ((contentControl as React.ReactElement<any>).key as string);\r\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\r\n controlId = key.split(\"::\", 1)[0];\r\n }\r\n return controlId;\r\n };\r\n\r\n // istanbul ignore next\r\n const [hasMultipleContents, setHasMultipleContents] = React.useState(() =>\r\n (activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1)\r\n );\r\n\r\n React.useEffect(() => {\r\n setIsActive(content === ContentViewManager.getActiveContent());\r\n }, [content]);\r\n\r\n React.useEffect(() => {\r\n const handleActiveContentChanged = (args: ActiveContentChangedEventArgs) => {\r\n const contentIsIdentical = content === args.activeContent;\r\n if (contentIsIdentical)\r\n setIsActive(contentIsIdentical);\r\n else {\r\n const contentId = contentControlKey(content);\r\n const activeContentId = contentControlKey(args.activeContent);\r\n setIsActive(contentId === activeContentId);\r\n }\r\n // istanbul ignore next\r\n setHasMultipleContents((activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1));\r\n };\r\n return ContentViewManager.onActiveContentChangedEvent.addListener(handleActiveContentChanged);\r\n }, [activeFrontstageDef, content]);\r\n\r\n const handleMouseDown = React.useCallback(() => {\r\n ContentViewManager.setActiveContent(content);\r\n setIsActive(true);\r\n }, [content]);\r\n\r\n React.useEffect(() => {\r\n const onAvailableContentChanged = () => {\r\n // istanbul ignore next\r\n setHasMultipleContents((activeFrontstageDef && (!!activeFrontstageDef.floatingContentControls?.length) ||\r\n (activeFrontstageDef?.contentGroup?.getContentControls().length ?? 0) > 1));\r\n };\r\n return ContentViewManager.onAvailableContentChangedEvent.addListener(onAvailableContentChanged);\r\n }, [activeFrontstageDef]);\r\n\r\n const overlayClassName = classnames(\r\n \"uifw-contentlayout-overlay-div\",\r\n isActive && hasMultipleContents ? \"uifw-contentlayout-overlay-active\" : \"uifw-contentlayout-overlay-inactive\",\r\n );\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-wrapper\", props.className)} style={props.style}\r\n onMouseDown={handleMouseDown} onMouseMove={UiShowHideManager.handleContentMouseMove} role=\"presentation\"\r\n >\r\n {content}\r\n <div className={overlayClassName} />\r\n </div>\r\n );\r\n}\r\n\r\n/** Properties for the [[SplitContainer]] component */\r\ninterface SplitContainerProps extends CommonProps {\r\n contentA: React.ReactNode;\r\n contentB: React.ReactNode;\r\n orientation: Orientation;\r\n percentage: number;\r\n resizable: boolean;\r\n minSizeTopLeft: number;\r\n minSizeBottomRight: number;\r\n splitterStateId?: string;\r\n onSplitterChange?: (size: number, percentage: number) => void;\r\n}\r\n\r\n/** Split Container class.\r\n */\r\nclass SplitContainer extends React.Component<SplitContainerProps> {\r\n private _containerDiv: HTMLDivElement | null = null;\r\n\r\n constructor(props: SplitContainerProps) {\r\n super(props);\r\n }\r\n\r\n private _onSplitterChange = (size: number): void => {\r\n let percentage = 0;\r\n\r\n // istanbul ignore else\r\n if (this._containerDiv && size > 0) {\r\n if (this.props.orientation === Orientation.Horizontal) {\r\n const height = this._containerDiv.getBoundingClientRect().height;\r\n // istanbul ignore if\r\n if (height > 0)\r\n percentage = size / height;\r\n } else {\r\n const width = this._containerDiv.getBoundingClientRect().width;\r\n // istanbul ignore if\r\n if (width > 0)\r\n percentage = size / width;\r\n }\r\n\r\n // istanbul ignore else\r\n if (this.props.onSplitterChange)\r\n this.props.onSplitterChange(size, percentage);\r\n }\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const orientation = (this.props.orientation === Orientation.Horizontal) ? \"horizontal\" : \"vertical\";\r\n const defaultSize = `${(this.props.percentage * 100).toString()}%`;\r\n const minSizeTopLeft = this.props.minSizeTopLeft;\r\n const minSizeBottomRight = -(this.props.minSizeBottomRight);\r\n\r\n return (\r\n <div ref={(e) => { this._containerDiv = e; }}\r\n className={classnames(\"uifw-contentlayout-full-size\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <SplitPane split={orientation}\r\n minSize={minSizeTopLeft} maxSize={minSizeBottomRight} defaultSize={defaultSize}\r\n onChange={this._onSplitterChange} allowResize={this.props.resizable}\r\n >\r\n {this.props.contentA}\r\n {this.props.contentB}\r\n </SplitPane>\r\n </div >\r\n );\r\n }\r\n}\r\n\r\n/** Properties for [[SingleContentContainer]] component\r\n */\r\ninterface SingleContentProps extends CommonProps {\r\n content: React.ReactNode;\r\n}\r\n\r\n/** Single Content Container class.\r\n */\r\nclass SingleContentContainer extends React.Component<SingleContentProps> {\r\n\r\n public override render(): React.ReactNode {\r\n\r\n return (\r\n <div className={classnames(\"uifw-contentlayout-full-size\", this.props.className)} style={this.props.style} data-testid=\"single-content-container\"\r\n onMouseMove={UiShowHideManager.handleContentMouseMove}\r\n >\r\n <ContentWrapper content={this.props.content} style={{ height: \"100%\", position: \"relative\" }} />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Common interface for HorizontalSplit and VerticalSplit\r\n */\r\ninterface LayoutSplit {\r\n createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode;\r\n isLocked: boolean;\r\n}\r\n\r\n/** Minimum split size */\r\nconst MIN_SPLIT_SIZE = 6;\r\n\r\n/** Base Split class.\r\n */\r\nclass BaseSplit {\r\n public defaultPercentage: number;\r\n public stateId: string = \"\";\r\n public isLocked: boolean = false;\r\n\r\n constructor(props: LayoutSplitPropsBase) {\r\n this.defaultPercentage = props.percentage;\r\n\r\n // istanbul ignore else\r\n if (props.id)\r\n this.stateId = props.id;\r\n\r\n // istanbul ignore else\r\n if (props.lock)\r\n this.isLocked = props.lock;\r\n }\r\n}\r\n\r\n/** Horizontal Split class.\r\n */\r\nclass HorizontalSplit extends BaseSplit implements LayoutSplit {\r\n private _topIndex: number = -1;\r\n private _bottomIndex: number = -1;\r\n private _topSplit?: LayoutSplit;\r\n private _bottomSplit?: LayoutSplit;\r\n private _props: LayoutHorizontalSplitProps;\r\n private _minSizeTop: number = MIN_SPLIT_SIZE;\r\n private _minSizeBottom: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutHorizontalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.top === \"number\") {\r\n this._topIndex = props.top;\r\n } else {\r\n this._topSplit = ContentLayoutDef.createSplit(props.top);\r\n }\r\n\r\n if (typeof props.bottom === \"number\") {\r\n this._bottomIndex = props.bottom;\r\n } else {\r\n this._bottomSplit = ContentLayoutDef.createSplit(props.bottom);\r\n }\r\n\r\n if (props.minSizeTop)\r\n this._minSizeTop = Math.max(props.minSizeTop, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeBottom)\r\n this._minSizeBottom = Math.max(props.minSizeBottom, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const topContent = (!this._topSplit) ?\r\n <ContentWrapper content={contentNodes[this._topIndex]} /> :\r\n this._topSplit.createContentContainer(contentNodes, resizable);\r\n const bottomContent = (!this._bottomSplit) ?\r\n <ContentWrapper content={contentNodes[this._bottomIndex]} /> :\r\n this._bottomSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={topContent}\r\n contentB={bottomContent}\r\n orientation={Orientation.Horizontal}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeTop}\r\n minSizeBottomRight={this._minSizeBottom}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Vertical Split class.\r\n */\r\nclass VerticalSplit extends BaseSplit implements LayoutSplit {\r\n private _leftIndex: number = -1;\r\n private _rightIndex: number = -1;\r\n private _leftSplit?: LayoutSplit;\r\n private _rightSplit?: LayoutSplit;\r\n private _props: LayoutVerticalSplitProps;\r\n private _minSizeLeft: number = MIN_SPLIT_SIZE;\r\n private _minSizeRight: number = MIN_SPLIT_SIZE;\r\n\r\n constructor(props: LayoutVerticalSplitProps) {\r\n super(props);\r\n\r\n this._props = props;\r\n\r\n if (typeof props.left === \"number\") {\r\n this._leftIndex = props.left;\r\n } else {\r\n this._leftSplit = ContentLayoutDef.createSplit(props.left);\r\n }\r\n\r\n if (typeof props.right === \"number\") {\r\n this._rightIndex = props.right;\r\n } else {\r\n this._rightSplit = ContentLayoutDef.createSplit(props.right);\r\n }\r\n\r\n if (props.minSizeLeft)\r\n this._minSizeLeft = Math.max(props.minSizeLeft, MIN_SPLIT_SIZE);\r\n\r\n if (props.minSizeRight)\r\n this._minSizeRight = Math.max(props.minSizeRight, MIN_SPLIT_SIZE);\r\n }\r\n\r\n private _handleSplitterChange = (_size: number, percentage: number): void => {\r\n this._props.percentage = percentage;\r\n };\r\n\r\n public createContentContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode {\r\n if (this.isLocked)\r\n resizable = false;\r\n\r\n const leftContent = (!this._leftSplit) ?\r\n <ContentWrapper content={contentNodes[this._leftIndex]} /> :\r\n this._leftSplit.createContentContainer(contentNodes, resizable);\r\n const rightContent = (!this._rightSplit) ?\r\n <ContentWrapper content={contentNodes[this._rightIndex]} /> :\r\n this._rightSplit.createContentContainer(contentNodes, resizable);\r\n\r\n return (\r\n <SplitContainer\r\n contentA={leftContent}\r\n contentB={rightContent}\r\n orientation={Orientation.Vertical}\r\n percentage={this.defaultPercentage}\r\n resizable={resizable}\r\n minSizeTopLeft={this._minSizeLeft}\r\n minSizeBottomRight={this._minSizeRight}\r\n splitterStateId={this.stateId}\r\n onSplitterChange={this._handleSplitterChange}\r\n />\r\n );\r\n }\r\n}\r\n\r\n/** Content Layout Definition class.\r\n * @public\r\n */\r\nexport class ContentLayoutDef {\r\n private _layoutProps: ContentLayoutProps;\r\n private _rootSplit?: LayoutSplit;\r\n\r\n /** ID for this Content Layout */\r\n public id: string = \"\";\r\n /** Description of the layout. */\r\n public description: string = \"\";\r\n constructor(layoutProps: ContentLayoutProps) {\r\n this._layoutProps = layoutProps;\r\n this.id = layoutProps.id;\r\n if (layoutProps.description !== undefined)\r\n this.description = layoutProps.description;\r\n }\r\n\r\n public get rootSplit(): LayoutSplit | undefined { return this._rootSplit; }\r\n\r\n /** Creates [[ContentLayoutProps]] for JSON purposes\r\n * @public\r\n */\r\n public toJSON(): ContentLayoutProps { return this._layoutProps; }\r\n\r\n /** Fill a layout container with React nodes for each content view\r\n */\r\n public fillLayoutContainer(contentNodes: React.ReactNode[], resizable: boolean): React.ReactNode | undefined {\r\n this._rootSplit = ContentLayoutDef.createSplit(this._layoutProps);\r\n\r\n if (this.rootSplit) {\r\n return this.rootSplit.createContentContainer(contentNodes, resizable);\r\n }\r\n\r\n if (contentNodes.length > 0)\r\n return <SingleContentContainer content={contentNodes[0]} />;\r\n\r\n return undefined;\r\n }\r\n\r\n /** Gets the indexes of content views used in this Content Layout\r\n */\r\n public getUsedContentIndexes(): number[] {\r\n let allContentIndexes: number[] = [];\r\n\r\n if (!this._layoutProps.horizontalSplit && !this._layoutProps.verticalSplit)\r\n allContentIndexes.push(0);\r\n else {\r\n allContentIndexes = allContentIndexes.concat(this.getHorizontalSplitContentIndexes(this._layoutProps.horizontalSplit));\r\n allContentIndexes = allContentIndexes.concat(this.getVerticalSplitContentIndexes(this._layoutProps.verticalSplit));\r\n }\r\n\r\n const uniqueContentIndexes = [...new Set(allContentIndexes)];\r\n\r\n return uniqueContentIndexes;\r\n }\r\n\r\n private getHorizontalSplitContentIndexes(splitProps?: LayoutHorizontalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.top === \"number\")\r\n contentIndexes.push(splitProps.top);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.top.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.top.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.bottom === \"number\")\r\n contentIndexes.push(splitProps.bottom);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.bottom.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.bottom.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n private getVerticalSplitContentIndexes(splitProps?: LayoutVerticalSplitProps): number[] {\r\n let contentIndexes: number[] = [];\r\n\r\n if (!splitProps)\r\n return contentIndexes;\r\n\r\n if (typeof splitProps.left === \"number\")\r\n contentIndexes.push(splitProps.left);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.left.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.left.verticalSplit));\r\n }\r\n\r\n if (typeof splitProps.right === \"number\")\r\n contentIndexes.push(splitProps.right);\r\n else {\r\n contentIndexes = contentIndexes.concat(this.getHorizontalSplitContentIndexes(splitProps.right.horizontalSplit));\r\n contentIndexes = contentIndexes.concat(this.getVerticalSplitContentIndexes(splitProps.right.verticalSplit));\r\n }\r\n\r\n return contentIndexes;\r\n }\r\n\r\n /** @internal */\r\n public static createSplit(fragmentDef: LayoutFragmentProps): LayoutSplit | undefined {\r\n if (fragmentDef.horizontalSplit) {\r\n return new HorizontalSplit(fragmentDef.horizontalSplit);\r\n } else if (fragmentDef.verticalSplit) {\r\n return new VerticalSplit(fragmentDef.verticalSplit);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n/** Content Layout Activated Event Args class.\r\n * @public\r\n */\r\nexport interface ContentLayoutActivatedEventArgs {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n}\r\n\r\n/** Content Layout Activated Event class.\r\n * @public\r\n */\r\nexport class ContentLayoutActivatedEvent extends UiEvent<ContentLayoutActivatedEventArgs> { }\r\n\r\n/** State for the [[ContentLayout]].\r\n */\r\ninterface ContentLayoutState {\r\n contentLayoutDef: ContentLayoutDef;\r\n contentContainer?: React.ReactNode;\r\n contentGroupId?: string;\r\n}\r\n\r\n/** Properties for the [[ContentLayout]] React component.\r\n * @public\r\n */\r\nexport interface ContentLayoutComponentProps extends CommonProps {\r\n contentLayout: ContentLayoutDef;\r\n contentGroup: ContentGroup;\r\n /**\r\n * @deprecated in 3.3. In upcoming version, widget mode will be removed and footer mode will always be true.\r\n */\r\n isInFooterMode?: boolean;\r\n}\r\n\r\n/** Content Layout React component.\r\n * @public\r\n */\r\nexport class ContentLayout extends React.Component<ContentLayoutComponentProps, ContentLayoutState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContentLayoutState>;\r\n\r\n constructor(props: ContentLayoutComponentProps) {\r\n super(props);\r\n\r\n const contentLayoutDef = this.props.contentLayout;\r\n const contentGroup = this.props.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.state = {\r\n contentLayoutDef: this.props.contentLayout,\r\n contentContainer,\r\n contentGroupId: this.props.contentGroup.groupId,\r\n };\r\n }\r\n\r\n public override componentDidMount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.addListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n public override componentWillUnmount() {\r\n FrontstageManager.onContentLayoutActivatedEvent.removeListener(this._handleContentLayoutActivated);\r\n }\r\n\r\n private _handleContentLayoutActivated = (args: ContentLayoutActivatedEventArgs) => {\r\n const contentLayoutDef = args.contentLayout;\r\n const contentGroup = args.contentGroup;\r\n\r\n const contentNodes = contentGroup.getContentNodes();\r\n const contentContainer = contentLayoutDef.fillLayoutContainer(contentNodes, true);\r\n\r\n this.setState({\r\n contentLayoutDef: args.contentLayout,\r\n contentContainer,\r\n contentGroupId: contentGroup.groupId,\r\n });\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n if (this.state.contentContainer) {\r\n return (\r\n <div id=\"uifw-contentlayout-div\" className={this.props.className} style={this.props.style}\r\n key={`${this.state.contentGroupId}-${this.state.contentLayoutDef.id}`}\r\n onMouseDown={this._onMouseDown} onMouseUp={this._onMouseUp} role=\"presentation\"\r\n >\r\n {this.state.contentContainer}\r\n </div>\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _onMouseDown = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(true);\r\n };\r\n\r\n private _onMouseUp = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n ContentViewManager.setMouseDown(false);\r\n };\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentViewManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,OAAO,EAAE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BAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAM9E;;;OAGG;WACW,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAMhF;;;OAGG;WACW,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAMhF;;;OAGG;WACW,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAMrF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;IAM3E;;;OAGG;WACW,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO;CAKlF"}
|
|
@@ -41,10 +41,28 @@ export class ContentViewManager {
|
|
|
41
41
|
}
|
|
42
42
|
static getControlFromElement(content, activeContentGroup, floatingControls, logIfNotFound = false) {
|
|
43
43
|
if (floatingControls === null || floatingControls === void 0 ? void 0 : floatingControls.length) {
|
|
44
|
-
|
|
44
|
+
// if we find a React node that matches exactly, return its containing control
|
|
45
|
+
let control = floatingControls.find((contentControl) => contentControl.reactNode === content);
|
|
46
|
+
if (control)
|
|
47
|
+
return control;
|
|
48
|
+
// if we don't find a React node that matches exactly, rely on the id specified by the creator
|
|
49
|
+
let controlId;
|
|
50
|
+
if (content && content.key) {
|
|
51
|
+
const key = content.key;
|
|
52
|
+
// key has format `${contentProps.id}::${this.groupId}` which is stored as unique id
|
|
53
|
+
controlId = key.split("::", 1)[0];
|
|
54
|
+
}
|
|
55
|
+
floatingControls.forEach((contentControl) => {
|
|
56
|
+
const node = contentControl.reactNode;
|
|
57
|
+
const key = node.key;
|
|
58
|
+
const nodeId = key && key.split("::", 1)[0];
|
|
59
|
+
if (nodeId === controlId)
|
|
60
|
+
control = contentControl;
|
|
61
|
+
});
|
|
45
62
|
if (control)
|
|
46
63
|
return control;
|
|
47
64
|
}
|
|
65
|
+
// if it's not a floating control, look through the content area views
|
|
48
66
|
// istanbul ignore else
|
|
49
67
|
if (activeContentGroup) {
|
|
50
68
|
const activeContentControl = activeContentGroup.getControlFromElement(content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,OAAkC;CAAI;AAYjF;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAsC;CAAI;AAEzF;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IASD,oDAAoD;IAC7C,MAAM,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,MAAM,CAAC,qBAAqB,CAAC,OAAwB,EAAE,kBAA4C,EAAE,gBAA8C,EAAE,aAAa,GAAG,KAAK;QAChL,IAAI,gBAAgB,aA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QACf,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,OAAmC;QAC/D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CAAC,OAAmC;QACrE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;;AAtLc,6BAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,0CAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,8CAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC;AAErF,wDAAwD;AAEjC,iDAA8B,GAAG,IAAI,OAAO,EAAyB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { ContentLayoutManager } from \"./ContentLayoutManager\";\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { UiFramework } from \"../UiFramework\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content View Manager class.\r\n * @public\r\n */\r\nexport class ContentViewManager {\r\n private static _mouseDown: boolean = false;\r\n private static _activeContent?: React.ReactNode;\r\n\r\n /** Gets the [[MouseDownChangedEvent]] */\r\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\r\n\r\n /** Determines if the mouse is down in a content view */\r\n public static get isMouseDown(): boolean {\r\n return this._mouseDown;\r\n }\r\n\r\n /** Sets the mouse down status for a content view */\r\n public static setMouseDown(mouseDown: boolean): void {\r\n this._mouseDown = mouseDown;\r\n this.onMouseDownChangedEvent.emit({ mouseDown });\r\n }\r\n\r\n /** Gets the [[ActiveContentChangedEvent]] */\r\n public static readonly onActiveContentChangedEvent = new ActiveContentChangedEvent();\r\n\r\n /** Fires when floating contents are added or removed */\r\n\r\n public static readonly onAvailableContentChangedEvent = new UiEvent<{ contentId: string }>();\r\n\r\n /** Gets the active content as a React.ReactNode. */\r\n public static getActiveContent(): React.ReactNode | undefined {\r\n return this._activeContent;\r\n }\r\n\r\n private static getControlFromElement(content: React.ReactNode, activeContentGroup: ContentGroup | undefined, floatingControls: ContentControl[] | undefined, logIfNotFound = false) {\r\n if (floatingControls?.length) {\r\n const control = floatingControls.find((contentControl) => contentControl.reactNode === content);\r\n if (control)\r\n return control;\r\n }\r\n\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n const activeContentControl = activeContentGroup.getControlFromElement(content);\r\n if (activeContentControl)\r\n return activeContentControl;\r\n }\r\n\r\n if (logIfNotFound)\r\n Logger.logError(UiFramework.loggerCategory(this), `getControlFromElement: no control found for element`);\r\n\r\n return undefined;\r\n }\r\n\r\n /** Return the active ContentControl. */\r\n public static getActiveContentControl(): ContentControl | undefined {\r\n let activeContentControl: ContentControl | undefined;\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (this._activeContent && activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n activeContentControl = this.getControlFromElement(this._activeContent, activeContentGroup, activeFrontstageDef.floatingContentControls);\r\n }\r\n\r\n return activeContentControl;\r\n }\r\n\r\n public static addFloatingContentControl(contentControl?: ContentControl) {\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n // istanbul ignore else\r\n if (activeFrontstageDef && contentControl) {\r\n activeFrontstageDef.addFloatingContentControl(contentControl);\r\n }\r\n }\r\n\r\n public static dropFloatingContentControl(contentControl?: ContentControl) {\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n // istanbul ignore else\r\n if (activeFrontstageDef && contentControl)\r\n activeFrontstageDef.dropFloatingContentControl(contentControl);\r\n }\r\n\r\n /** Sets the active [[ContentControl]] */\r\n public static setActiveContent(activeContent?: React.ReactNode, forceEventProcessing = false): void {\r\n // istanbul ignore else\r\n if (this._activeContent !== activeContent || forceEventProcessing) {\r\n const oldContent = this._activeContent;\r\n this._activeContent = activeContent;\r\n\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n\r\n // istanbul ignore else\r\n const oldContentControl = this.getControlFromElement(oldContent, activeContentGroup, activeFrontstageDef.floatingContentControls);\r\n const activeContentControl = this.getControlFromElement(activeContent, activeContentGroup, activeFrontstageDef.floatingContentControls, true);\r\n\r\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\r\n // istanbul ignore else\r\n if (activeContentControl) {\r\n // istanbul ignore next\r\n const doSetActiveView =\r\n forceEventProcessing || (!activeContentControl.viewport ||\r\n (/* istanbul ignore next */ oldContentControl && /* istanbul ignore next */ !oldContentControl.viewport));\r\n\r\n // istanbul ignore else\r\n if (doSetActiveView) {\r\n activeFrontstageDef.setActiveView(activeContentControl, oldContentControl);\r\n this.onActiveContentChangedEvent.emit({ activeContent, oldContent });\r\n } else {\r\n if (activeContentControl.viewport && activeContentControl.viewport !== IModelApp.viewManager.selectedView) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.setSelectedView(activeContentControl.viewport);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Refreshes the active [[ContentControl]] */\r\n public static refreshActiveContent(activeContent: React.ReactNode) {\r\n ContentLayoutManager.refreshActiveLayout();\r\n this.setActiveContent(activeContent, true);\r\n }\r\n\r\n /**\r\n * Determines if content displays a Sheet view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSheetView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSheetView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Drawing view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentDrawingView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isDrawingView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Spatial view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSpatialView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSpatialView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Orthographic view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentOrthographicView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isOrthographicView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a 3d view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContent3dView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.is3dView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if viewport supports use of a camera.\r\n * @param content ContentControl to check\r\n */\r\n public static contentSupportsCamera(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.viewSupportsCamera(content.viewport));\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentViewManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,OAAkC;CAAI;AAYjF;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAsC;CAAI;AAEzF;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,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OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CAAC,OAAmC;QACrE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAC/B,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,CAAC;;AAzMc,6BAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,0CAAuB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,8CAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC;AAErF,wDAAwD;AAEjC,iDAA8B,GAAG,IAAI,OAAO,EAAyB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\r\nimport { ContentControl } from \"./ContentControl\";\r\nimport { ContentLayoutManager } from \"./ContentLayoutManager\";\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { ContentGroup } from \"./ContentGroup\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { UiFramework } from \"../UiFramework\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content View Manager class.\r\n * @public\r\n */\r\nexport class ContentViewManager {\r\n private static _mouseDown: boolean = false;\r\n private static _activeContent?: React.ReactNode;\r\n\r\n /** Gets the [[MouseDownChangedEvent]] */\r\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\r\n\r\n /** Determines if the mouse is down in a content view */\r\n public static get isMouseDown(): boolean {\r\n return this._mouseDown;\r\n }\r\n\r\n /** Sets the mouse down status for a content view */\r\n public static setMouseDown(mouseDown: boolean): void {\r\n this._mouseDown = mouseDown;\r\n this.onMouseDownChangedEvent.emit({ mouseDown });\r\n }\r\n\r\n /** Gets the [[ActiveContentChangedEvent]] */\r\n public static readonly onActiveContentChangedEvent = new ActiveContentChangedEvent();\r\n\r\n /** Fires when floating contents are added or removed */\r\n\r\n public static readonly onAvailableContentChangedEvent = new UiEvent<{ contentId: string }>();\r\n\r\n /** Gets the active content as a React.ReactNode. */\r\n public static getActiveContent(): React.ReactNode | undefined {\r\n return this._activeContent;\r\n }\r\n\r\n private static getControlFromElement(content: React.ReactNode, activeContentGroup: ContentGroup | undefined, floatingControls: ContentControl[] | undefined, logIfNotFound = false) {\r\n if (floatingControls?.length) {\r\n // if we find a React node that matches exactly, return its containing control\r\n let control = floatingControls.find((contentControl) => contentControl.reactNode === content);\r\n if (control)\r\n return control;\r\n\r\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\r\n let controlId: string;\r\n if (content && (content as React.ReactElement<any>).key) {\r\n const key = ((content as React.ReactElement<any>).key as string);\r\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\r\n controlId = key.split(\"::\", 1)[0];\r\n }\r\n floatingControls.forEach ((contentControl: ContentControl) => {\r\n const node = contentControl.reactNode;\r\n const key = ((node as React.ReactElement<any>).key as string);\r\n const nodeId = key && key.split(\"::\", 1)[0];\r\n if (nodeId === controlId)\r\n control = contentControl;\r\n });\r\n if (control)\r\n return control;\r\n }\r\n\r\n // if it's not a floating control, look through the content area views\r\n // istanbul ignore else\r\n if (activeContentGroup) {\r\n const activeContentControl = activeContentGroup.getControlFromElement(content);\r\n if (activeContentControl)\r\n return activeContentControl;\r\n }\r\n\r\n if (logIfNotFound)\r\n Logger.logError(UiFramework.loggerCategory(this), `getControlFromElement: no control found for element`);\r\n\r\n return undefined;\r\n }\r\n\r\n /** Return the active ContentControl. */\r\n public static getActiveContentControl(): ContentControl | undefined {\r\n let activeContentControl: ContentControl | undefined;\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (this._activeContent && activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n activeContentControl = this.getControlFromElement(this._activeContent, activeContentGroup, activeFrontstageDef.floatingContentControls);\r\n }\r\n\r\n return activeContentControl;\r\n }\r\n\r\n public static addFloatingContentControl(contentControl?: ContentControl) {\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n // istanbul ignore else\r\n if (activeFrontstageDef && contentControl) {\r\n activeFrontstageDef.addFloatingContentControl(contentControl);\r\n }\r\n }\r\n\r\n public static dropFloatingContentControl(contentControl?: ContentControl) {\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n // istanbul ignore else\r\n if (activeFrontstageDef && contentControl)\r\n activeFrontstageDef.dropFloatingContentControl(contentControl);\r\n }\r\n\r\n /** Sets the active [[ContentControl]] */\r\n public static setActiveContent(activeContent?: React.ReactNode, forceEventProcessing = false): void {\r\n // istanbul ignore else\r\n if (this._activeContent !== activeContent || forceEventProcessing) {\r\n const oldContent = this._activeContent;\r\n this._activeContent = activeContent;\r\n\r\n const activeFrontstageDef = FrontstageManager.activeFrontstageDef;\r\n\r\n // istanbul ignore else\r\n if (activeFrontstageDef) {\r\n const activeContentGroup = activeFrontstageDef.contentGroup;\r\n\r\n // istanbul ignore else\r\n const oldContentControl = this.getControlFromElement(oldContent, activeContentGroup, activeFrontstageDef.floatingContentControls);\r\n const activeContentControl = this.getControlFromElement(activeContent, activeContentGroup, activeFrontstageDef.floatingContentControls, true);\r\n\r\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\r\n // istanbul ignore else\r\n if (activeContentControl) {\r\n // istanbul ignore next\r\n const doSetActiveView =\r\n forceEventProcessing || (!activeContentControl.viewport ||\r\n (/* istanbul ignore next */ oldContentControl && /* istanbul ignore next */ !oldContentControl.viewport));\r\n\r\n // istanbul ignore else\r\n if (doSetActiveView) {\r\n activeFrontstageDef.setActiveView(activeContentControl, oldContentControl);\r\n this.onActiveContentChangedEvent.emit({ activeContent, oldContent });\r\n } else {\r\n if (activeContentControl.viewport && activeContentControl.viewport !== IModelApp.viewManager.selectedView) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.setSelectedView(activeContentControl.viewport);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Refreshes the active [[ContentControl]] */\r\n public static refreshActiveContent(activeContent: React.ReactNode) {\r\n ContentLayoutManager.refreshActiveLayout();\r\n this.setActiveContent(activeContent, true);\r\n }\r\n\r\n /**\r\n * Determines if content displays a Sheet view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSheetView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSheetView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Drawing view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentDrawingView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isDrawingView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Spatial view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentSpatialView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isSpatialView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a Orthographic view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContentOrthographicView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.isOrthographicView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if content displays a 3d view.\r\n * @param content ContentControl to check\r\n */\r\n public static isContent3dView(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.is3dView(content.viewport));\r\n }\r\n\r\n /**\r\n * Determines if viewport supports use of a camera.\r\n * @param content ContentControl to check\r\n */\r\n public static contentSupportsCamera(content: ContentControl | undefined): boolean {\r\n if (!content || !content.viewport)\r\n return false;\r\n return (ViewUtilities.viewSupportsCamera(content.viewport));\r\n }\r\n}\r\n"]}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./FloatingViewportContent.css";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { ScreenViewport } from "@itwin/core-frontend";
|
|
7
|
+
import { ViewStateProp } from "@itwin/imodel-components-react";
|
|
7
8
|
/**
|
|
8
9
|
* @beta
|
|
9
10
|
*/
|
|
@@ -12,8 +13,10 @@ export interface FloatingViewportContentProps {
|
|
|
12
13
|
onContextMenu?: (e: React.MouseEvent) => boolean;
|
|
13
14
|
/** viewport/content control uniqueId */
|
|
14
15
|
contentId: string;
|
|
15
|
-
/** The initial view state used to create the viewport */
|
|
16
|
-
initialViewState:
|
|
16
|
+
/** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */
|
|
17
|
+
initialViewState: ViewStateProp;
|
|
18
|
+
/** Function to get a reference to the ScreenViewport */
|
|
19
|
+
viewportRef?: React.Ref<ScreenViewport>;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* FloatingViewportContent component that creates its own [FloatingViewportContentControl].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAqB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUlF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;;;GAKG;AAEH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,eAqE1E"}
|