@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":"Common.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/Common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/Common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,iCAAiC;IACjC,yDAAE,CAAA;IACF,gCAAgC;IAChC,2DAAG,CAAA;IACH,4EAA4E;IAC5E,+EAAa,CAAA;AACf,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B","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 IModelComponents\r\n */\r\n\r\n/**\r\n * An option of how class grouping should work in a component.\r\n * @beta\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport enum ClassGroupingOption {\r\n /** Class grouping is disabled */\r\n No,\r\n /** Class grouping is enabled */\r\n Yes,\r\n /** Class grouping is enabled and grouping node shows grouped items count */\r\n YesWithCounts,\r\n}\r\n\r\n/**\r\n * Data structure that describes info used to filter visibility tree.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface VisibilityTreeFilterInfo {\r\n filter: string;\r\n activeMatchIndex?: number;\r\n}\r\n"]}
|
|
@@ -8,6 +8,7 @@ import { UnifiedSelectionTreeEventHandler, UnifiedSelectionTreeEventHandlerParam
|
|
|
8
8
|
/**
|
|
9
9
|
* Data structure that describes instance visibility status.
|
|
10
10
|
* @alpha
|
|
11
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
11
12
|
*/
|
|
12
13
|
export interface VisibilityStatus {
|
|
13
14
|
state: "visible" | "partial" | "hidden";
|
|
@@ -17,11 +18,13 @@ export interface VisibilityStatus {
|
|
|
17
18
|
/**
|
|
18
19
|
* Type definition of visibility change event listener.
|
|
19
20
|
* @alpha
|
|
21
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
20
22
|
*/
|
|
21
23
|
export declare type VisibilityChangeListener = (nodeIds?: string[], visibilityStatus?: Map<string, VisibilityStatus>) => void;
|
|
22
24
|
/**
|
|
23
25
|
* Visibility handler used to change or get visibility of instances represented by the tree node.
|
|
24
26
|
* @alpha
|
|
27
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
25
28
|
*/
|
|
26
29
|
export interface IVisibilityHandler extends IDisposable {
|
|
27
30
|
getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus | Promise<VisibilityStatus>;
|
|
@@ -31,11 +34,13 @@ export interface IVisibilityHandler extends IDisposable {
|
|
|
31
34
|
/**
|
|
32
35
|
* Type definition of predicate used to decide if node can be selected.
|
|
33
36
|
* @alpha
|
|
37
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
34
38
|
*/
|
|
35
39
|
export declare type VisibilityTreeSelectionPredicate = (key: NodeKey, node: TreeNodeItem) => boolean;
|
|
36
40
|
/**
|
|
37
41
|
* Parameters for [[VisibilityTreeEventHandler]]
|
|
38
42
|
* @alpha
|
|
43
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
39
44
|
*/
|
|
40
45
|
export interface VisibilityTreeEventHandlerParams extends UnifiedSelectionTreeEventHandlerParams {
|
|
41
46
|
visibilityHandler: IVisibilityHandler | undefined;
|
|
@@ -44,6 +49,7 @@ export interface VisibilityTreeEventHandlerParams extends UnifiedSelectionTreeEv
|
|
|
44
49
|
/**
|
|
45
50
|
* Base event handler for visibility tree.
|
|
46
51
|
* @alpha
|
|
52
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
47
53
|
*/
|
|
48
54
|
export declare class VisibilityTreeEventHandler extends UnifiedSelectionTreeEventHandler {
|
|
49
55
|
private _visibilityHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityTreeEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeEventHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"VisibilityTreeEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeEventHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,EACgD,gCAAgC,EAAiB,YAAY,EAClH,kCAAkC,EAAE,iCAAiC,EACtE,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AAE1H;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,oBAAY,wBAAwB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,IAAI,CAAC;AAEtH;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxG,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9F,kBAAkB,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,oBAAY,gCAAgC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;AAE7F;;;;GAIG;AACH,MAAM,WAAW,gCAAiC,SAAQ,sCAAsC;IAC9F,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAClD,kBAAkB,CAAC,EAAE,gCAAgC,CAAC;CACvD;AAED;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,gCAAgC;IAC9E,OAAO,CAAC,kBAAkB,CAAiC;IAC3D,OAAO,CAAC,mBAAmB,CAAC,CAAmC;IAC/D,OAAO,CAAC,UAAU,CAA2B;gBAEjC,MAAM,EAAE,gCAAgC;IAapC,OAAO;IAKvB,OAAO,CAAC,oBAAoB;IAQZ,mBAAmB,CAAC,EAAE,aAAa,EAAE,EAAE,kCAAkC;IAYzE,mBAAmB,CAAC,EAAE,YAAY,EAAE,EAAE,iCAAiC;IAWvE,sBAAsB,CAAC,KAAK,EAAE,gCAAgC;IAa9E,OAAO,CAAC,gBAAgB;YAYV,gBAAgB;IAK9B,OAAO,CAAC,WAAW;YAgBL,iCAAiC;YAcjC,4BAA4B;YAQ5B,mBAAmB;IAWjC,OAAO,CAAC,kBAAkB;CAQ3B"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module IModelComponents
|
|
7
7
|
*/
|
|
8
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
9
|
import { EMPTY } from "rxjs/internal/observable/empty";
|
|
9
10
|
import { from } from "rxjs/internal/observable/from";
|
|
10
11
|
import { map } from "rxjs/internal/operators/map";
|
|
@@ -15,6 +16,7 @@ import { UnifiedSelectionTreeEventHandler } from "@itwin/presentation-components
|
|
|
15
16
|
/**
|
|
16
17
|
* Base event handler for visibility tree.
|
|
17
18
|
* @alpha
|
|
19
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
18
20
|
*/
|
|
19
21
|
export class VisibilityTreeEventHandler extends UnifiedSelectionTreeEventHandler {
|
|
20
22
|
constructor(params) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityTreeEventHandler.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeEventHandler.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAC8B,gBAAgB,GAEpD,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,gCAAgC,EAA0C,MAAM,gCAAgC,CAAC;AA2C1H;;;GAGG;AACH,MAAM,OAAO,0BAA2B,SAAQ,gCAAgC;IAK9E,YAAY,MAAwC;QAClD,KAAK,CAAC,MAAM,CAAC,CAAC;QAHR,eAAU,GAAG,IAAI,KAAK,EAAc,CAAC;QAI3C,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAErD,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;SACrK;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBA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AAC,EAAE,CAAC;QAC1B,uBAAuB;QACvB,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,OAAO,CAAC;QAC/B,KAAK,QAAQ,CAAC;QACd;YACE,OAAO,aAAa,CAAC,GAAG,CAAC;KAC5B;AACH,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 IModelComponents\r\n */\r\n\r\nimport { EMPTY } from \"rxjs/internal/observable/empty\";\r\nimport { from } from \"rxjs/internal/observable/from\";\r\nimport { map } from \"rxjs/internal/operators/map\";\r\nimport { mergeMap } from \"rxjs/internal/operators/mergeMap\";\r\nimport {\r\n CheckBoxInfo, CheckboxStateChange, toRxjsObservable, TreeCheckboxStateChangeEventArgs, TreeModelNode, TreeNodeItem,\r\n TreeSelectionModificationEventArgs, TreeSelectionReplacementEventArgs,\r\n} from \"@itwin/components-react\";\r\nimport { BeEvent, IDisposable } from \"@itwin/core-bentley\";\r\nimport { CheckBoxState, isPromiseLike } from \"@itwin/core-react\";\r\nimport { NodeKey } from \"@itwin/presentation-common\";\r\nimport { UnifiedSelectionTreeEventHandler, UnifiedSelectionTreeEventHandlerParams } from \"@itwin/presentation-components\";\r\n\r\n/**\r\n * Data structure that describes instance visibility status.\r\n * @alpha\r\n */\r\nexport interface VisibilityStatus {\r\n state: \"visible\" | \"partial\" | \"hidden\";\r\n isDisabled?: boolean;\r\n tooltip?: string;\r\n}\r\n\r\n/**\r\n * Type definition of visibility change event listener.\r\n * @alpha\r\n */\r\nexport type VisibilityChangeListener = (nodeIds?: string[], visibilityStatus?: Map<string, VisibilityStatus>) => void;\r\n\r\n/**\r\n * Visibility handler used to change or get visibility of instances represented by the tree node.\r\n * @alpha\r\n */\r\nexport interface IVisibilityHandler extends IDisposable {\r\n getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus | Promise<VisibilityStatus>;\r\n changeVisibility(node: TreeNodeItem, nodeKey: NodeKey, shouldDisplay: boolean): Promise<void>;\r\n onVisibilityChange: BeEvent<VisibilityChangeListener>;\r\n}\r\n\r\n/**\r\n * Type definition of predicate used to decide if node can be selected.\r\n * @alpha\r\n */\r\nexport type VisibilityTreeSelectionPredicate = (key: NodeKey, node: TreeNodeItem) => boolean;\r\n\r\n/**\r\n * Parameters for [[VisibilityTreeEventHandler]]\r\n * @alpha\r\n */\r\nexport interface VisibilityTreeEventHandlerParams extends UnifiedSelectionTreeEventHandlerParams {\r\n visibilityHandler: IVisibilityHandler | undefined;\r\n selectionPredicate?: VisibilityTreeSelectionPredicate;\r\n}\r\n\r\n/**\r\n * Base event handler for visibility tree.\r\n * @alpha\r\n */\r\nexport class VisibilityTreeEventHandler extends UnifiedSelectionTreeEventHandler {\r\n private _visibilityHandler: IVisibilityHandler | undefined;\r\n private _selectionPredicate?: VisibilityTreeSelectionPredicate;\r\n private _listeners = new Array<() => void>();\r\n\r\n constructor(params: VisibilityTreeEventHandlerParams) {\r\n super(params);\r\n this._visibilityHandler = params.visibilityHandler;\r\n this._selectionPredicate = params.selectionPredicate;\r\n\r\n if (this._visibilityHandler) {\r\n this._listeners.push(this._visibilityHandler.onVisibilityChange.addListener(async (nodeIds, visibilityStatus) => this.updateCheckboxes(nodeIds, visibilityStatus)));\r\n }\r\n\r\n this._listeners.push(this.modelSource.onModelChanged.addListener(async ([_, changes]) => this.updateCheckboxes([...changes.addedNodeIds, ...changes.modifiedNodeIds])));\r\n this.updateCheckboxes(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n this._listeners.forEach((disposeFunc) => disposeFunc());\r\n }\r\n\r\n private filterSelectionItems(items: TreeNodeItem[]) {\r\n // istanbul ignore if\r\n if (!this._selectionPredicate)\r\n return items;\r\n\r\n return items.filter((item) => this._selectionPredicate!(this.getNodeKey(item), item));\r\n }\r\n\r\n public override onSelectionModified({ modifications }: TreeSelectionModificationEventArgs) {\r\n const filteredModification = toRxjsObservable(modifications).pipe(\r\n map(({ selectedNodeItems, deselectedNodeItems }) => {\r\n return {\r\n selectedNodeItems: this.filterSelectionItems(selectedNodeItems),\r\n deselectedNodeItems: this.filterSelectionItems(deselectedNodeItems),\r\n };\r\n }),\r\n );\r\n return super.onSelectionModified({ modifications: filteredModification });\r\n }\r\n\r\n public override onSelectionReplaced({ replacements }: TreeSelectionReplacementEventArgs) {\r\n const filteredReplacements = toRxjsObservable(replacements).pipe(\r\n map(({ selectedNodeItems }) => {\r\n return {\r\n selectedNodeItems: this.filterSelectionItems(selectedNodeItems),\r\n };\r\n }),\r\n );\r\n return super.onSelectionReplaced({ replacements: filteredReplacements });\r\n }\r\n\r\n public override onCheckboxStateChanged(event: TreeCheckboxStateChangeEventArgs) {\r\n // istanbul ignore if\r\n if (!this._visibilityHandler)\r\n return undefined;\r\n\r\n from(event.stateChanges)\r\n .pipe(\r\n mergeMap((changes) => this.changeVisibility(changes)),\r\n )\r\n .subscribe();\r\n return undefined;\r\n }\r\n\r\n private changeVisibility(changes: CheckboxStateChange[]) {\r\n return from(changes)\r\n .pipe(\r\n mergeMap(({ nodeItem, newState }) => {\r\n // istanbul ignore if\r\n if (!this._visibilityHandler)\r\n return EMPTY;\r\n return from(this._visibilityHandler.changeVisibility(nodeItem, this.getNodeKey(nodeItem), newState === CheckBoxState.On));\r\n }),\r\n );\r\n }\r\n\r\n private async updateCheckboxes(affectedNodes?: string[], visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const changes = await (affectedNodes ? this.collectAffectedNodesCheckboxInfos(affectedNodes, visibilityStatus) : this.collectAllNodesCheckboxInfos(visibilityStatus));\r\n this.updateModel(changes);\r\n }\r\n\r\n private updateModel(changes: Map<string, CheckBoxInfo>) {\r\n this.modelSource.modifyModel((model) => {\r\n for (const [nodeId, checkboxInfo] of changes) {\r\n const node = model.getNode(nodeId);\r\n // istanbul ignore if\r\n if (!node)\r\n continue;\r\n\r\n node.checkbox.isDisabled = checkboxInfo.isDisabled;\r\n node.checkbox.isVisible = checkboxInfo.isVisible;\r\n node.checkbox.state = checkboxInfo.state;\r\n node.checkbox.tooltip = checkboxInfo.tooltip;\r\n }\r\n });\r\n }\r\n\r\n private async collectAffectedNodesCheckboxInfos(affectedNodes: string[], visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const nodeStates = new Map<string, CheckBoxInfo>();\r\n if (affectedNodes.length === 0)\r\n return nodeStates;\r\n\r\n await Promise.all(affectedNodes.map(async (nodeId) => {\r\n const node = this.modelSource.getModel().getNode(nodeId);\r\n // istanbul ignore else\r\n if (node)\r\n nodeStates.set(nodeId, await this.getNodeCheckBoxInfo(node, visibilityStatus));\r\n }));\r\n return nodeStates;\r\n }\r\n\r\n private async collectAllNodesCheckboxInfos(visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const nodeStates = new Map<string, CheckBoxInfo>();\r\n for (const node of this.modelSource.getModel().iterateTreeModelNodes()) {\r\n nodeStates.set(node.id, await this.getNodeCheckBoxInfo(node, visibilityStatus));\r\n }\r\n return nodeStates;\r\n }\r\n\r\n private async getNodeCheckBoxInfo(node: TreeModelNode, visibilityStatus?: Map<string, VisibilityStatus>): Promise<CheckBoxInfo> {\r\n if (!this._visibilityHandler)\r\n return { ...node.checkbox, isVisible: false };\r\n\r\n const result = visibilityStatus?.get(node.id) ?? this._visibilityHandler.getVisibilityStatus(node.item, this.getNodeKey(node.item));\r\n\r\n if (isPromiseLike(result))\r\n return this.createCheckboxInfo(await result);\r\n return this.createCheckboxInfo(result);\r\n }\r\n\r\n private createCheckboxInfo(status: VisibilityStatus): CheckBoxInfo {\r\n return {\r\n state: visibilityStateToCheckboxState(status),\r\n isDisabled: status.isDisabled || false,\r\n isVisible: true,\r\n tooltip: status.tooltip,\r\n };\r\n }\r\n}\r\n\r\nconst visibilityStateToCheckboxState = (status: VisibilityStatus) => {\r\n switch (status.state) {\r\n case \"visible\":\r\n return CheckBoxState.On;\r\n // istanbul ignore next\r\n case \"partial\":\r\n return CheckBoxState.Partial;\r\n case \"hidden\":\r\n default:\r\n return CheckBoxState.Off;\r\n }\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"VisibilityTreeEventHandler.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeEventHandler.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAC8B,gBAAgB,GAEpD,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,gCAAgC,EAA0C,MAAM,gCAAgC,CAAC;AAgD1H;;;;GAIG;AACH,MAAM,OAAO,0BAA2B,SAAQ,gCAAgC;IAK9E,YAAY,MAAwC;QAClD,KAAK,CAAC,MAAM,CAAC,CAAC;QAHR,eAAU,GAAG,IAAI,KAAK,EAAc,CAAC;QAI3C,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAErD,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;SACrK;QAED,IAAI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;SACxB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,8BAA8B,GAAG,CAAC,MAAwB,EAAE,EAAE;IAClE,QAAQ,MAAM,CAAC,KAAK,EAAE;QACpB,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,EAAE,CAAC;QAC1B,uBAAuB;QACvB,KAAK,SAAS;YACZ,OAAO,aAAa,CAAC,OAAO,CAAC;QAC/B,KAAK,QAAQ,CAAC;QACd;YACE,OAAO,aAAa,CAAC,GAAG,CAAC;KAC5B;AACH,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 IModelComponents\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport { EMPTY } from \"rxjs/internal/observable/empty\";\r\nimport { from } from \"rxjs/internal/observable/from\";\r\nimport { map } from \"rxjs/internal/operators/map\";\r\nimport { mergeMap } from \"rxjs/internal/operators/mergeMap\";\r\nimport {\r\n CheckBoxInfo, CheckboxStateChange, toRxjsObservable, TreeCheckboxStateChangeEventArgs, TreeModelNode, TreeNodeItem,\r\n TreeSelectionModificationEventArgs, TreeSelectionReplacementEventArgs,\r\n} from \"@itwin/components-react\";\r\nimport { BeEvent, IDisposable } from \"@itwin/core-bentley\";\r\nimport { CheckBoxState, isPromiseLike } from \"@itwin/core-react\";\r\nimport { NodeKey } from \"@itwin/presentation-common\";\r\nimport { UnifiedSelectionTreeEventHandler, UnifiedSelectionTreeEventHandlerParams } from \"@itwin/presentation-components\";\r\n\r\n/**\r\n * Data structure that describes instance visibility status.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface VisibilityStatus {\r\n state: \"visible\" | \"partial\" | \"hidden\";\r\n isDisabled?: boolean;\r\n tooltip?: string;\r\n}\r\n\r\n/**\r\n * Type definition of visibility change event listener.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport type VisibilityChangeListener = (nodeIds?: string[], visibilityStatus?: Map<string, VisibilityStatus>) => void;\r\n\r\n/**\r\n * Visibility handler used to change or get visibility of instances represented by the tree node.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface IVisibilityHandler extends IDisposable {\r\n getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus | Promise<VisibilityStatus>;\r\n changeVisibility(node: TreeNodeItem, nodeKey: NodeKey, shouldDisplay: boolean): Promise<void>;\r\n onVisibilityChange: BeEvent<VisibilityChangeListener>;\r\n}\r\n\r\n/**\r\n * Type definition of predicate used to decide if node can be selected.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport type VisibilityTreeSelectionPredicate = (key: NodeKey, node: TreeNodeItem) => boolean;\r\n\r\n/**\r\n * Parameters for [[VisibilityTreeEventHandler]]\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface VisibilityTreeEventHandlerParams extends UnifiedSelectionTreeEventHandlerParams {\r\n visibilityHandler: IVisibilityHandler | undefined;\r\n selectionPredicate?: VisibilityTreeSelectionPredicate;\r\n}\r\n\r\n/**\r\n * Base event handler for visibility tree.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport class VisibilityTreeEventHandler extends UnifiedSelectionTreeEventHandler {\r\n private _visibilityHandler: IVisibilityHandler | undefined;\r\n private _selectionPredicate?: VisibilityTreeSelectionPredicate;\r\n private _listeners = new Array<() => void>();\r\n\r\n constructor(params: VisibilityTreeEventHandlerParams) {\r\n super(params);\r\n this._visibilityHandler = params.visibilityHandler;\r\n this._selectionPredicate = params.selectionPredicate;\r\n\r\n if (this._visibilityHandler) {\r\n this._listeners.push(this._visibilityHandler.onVisibilityChange.addListener(async (nodeIds, visibilityStatus) => this.updateCheckboxes(nodeIds, visibilityStatus)));\r\n }\r\n\r\n this._listeners.push(this.modelSource.onModelChanged.addListener(async ([_, changes]) => this.updateCheckboxes([...changes.addedNodeIds, ...changes.modifiedNodeIds])));\r\n this.updateCheckboxes(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n this._listeners.forEach((disposeFunc) => disposeFunc());\r\n }\r\n\r\n private filterSelectionItems(items: TreeNodeItem[]) {\r\n // istanbul ignore if\r\n if (!this._selectionPredicate)\r\n return items;\r\n\r\n return items.filter((item) => this._selectionPredicate!(this.getNodeKey(item), item));\r\n }\r\n\r\n public override onSelectionModified({ modifications }: TreeSelectionModificationEventArgs) {\r\n const filteredModification = toRxjsObservable(modifications).pipe(\r\n map(({ selectedNodeItems, deselectedNodeItems }) => {\r\n return {\r\n selectedNodeItems: this.filterSelectionItems(selectedNodeItems),\r\n deselectedNodeItems: this.filterSelectionItems(deselectedNodeItems),\r\n };\r\n }),\r\n );\r\n return super.onSelectionModified({ modifications: filteredModification });\r\n }\r\n\r\n public override onSelectionReplaced({ replacements }: TreeSelectionReplacementEventArgs) {\r\n const filteredReplacements = toRxjsObservable(replacements).pipe(\r\n map(({ selectedNodeItems }) => {\r\n return {\r\n selectedNodeItems: this.filterSelectionItems(selectedNodeItems),\r\n };\r\n }),\r\n );\r\n return super.onSelectionReplaced({ replacements: filteredReplacements });\r\n }\r\n\r\n public override onCheckboxStateChanged(event: TreeCheckboxStateChangeEventArgs) {\r\n // istanbul ignore if\r\n if (!this._visibilityHandler)\r\n return undefined;\r\n\r\n from(event.stateChanges)\r\n .pipe(\r\n mergeMap((changes) => this.changeVisibility(changes)),\r\n )\r\n .subscribe();\r\n return undefined;\r\n }\r\n\r\n private changeVisibility(changes: CheckboxStateChange[]) {\r\n return from(changes)\r\n .pipe(\r\n mergeMap(({ nodeItem, newState }) => {\r\n // istanbul ignore if\r\n if (!this._visibilityHandler)\r\n return EMPTY;\r\n return from(this._visibilityHandler.changeVisibility(nodeItem, this.getNodeKey(nodeItem), newState === CheckBoxState.On));\r\n }),\r\n );\r\n }\r\n\r\n private async updateCheckboxes(affectedNodes?: string[], visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const changes = await (affectedNodes ? this.collectAffectedNodesCheckboxInfos(affectedNodes, visibilityStatus) : this.collectAllNodesCheckboxInfos(visibilityStatus));\r\n this.updateModel(changes);\r\n }\r\n\r\n private updateModel(changes: Map<string, CheckBoxInfo>) {\r\n this.modelSource.modifyModel((model) => {\r\n for (const [nodeId, checkboxInfo] of changes) {\r\n const node = model.getNode(nodeId);\r\n // istanbul ignore if\r\n if (!node)\r\n continue;\r\n\r\n node.checkbox.isDisabled = checkboxInfo.isDisabled;\r\n node.checkbox.isVisible = checkboxInfo.isVisible;\r\n node.checkbox.state = checkboxInfo.state;\r\n node.checkbox.tooltip = checkboxInfo.tooltip;\r\n }\r\n });\r\n }\r\n\r\n private async collectAffectedNodesCheckboxInfos(affectedNodes: string[], visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const nodeStates = new Map<string, CheckBoxInfo>();\r\n if (affectedNodes.length === 0)\r\n return nodeStates;\r\n\r\n await Promise.all(affectedNodes.map(async (nodeId) => {\r\n const node = this.modelSource.getModel().getNode(nodeId);\r\n // istanbul ignore else\r\n if (node)\r\n nodeStates.set(nodeId, await this.getNodeCheckBoxInfo(node, visibilityStatus));\r\n }));\r\n return nodeStates;\r\n }\r\n\r\n private async collectAllNodesCheckboxInfos(visibilityStatus?: Map<string, VisibilityStatus>) {\r\n const nodeStates = new Map<string, CheckBoxInfo>();\r\n for (const node of this.modelSource.getModel().iterateTreeModelNodes()) {\r\n nodeStates.set(node.id, await this.getNodeCheckBoxInfo(node, visibilityStatus));\r\n }\r\n return nodeStates;\r\n }\r\n\r\n private async getNodeCheckBoxInfo(node: TreeModelNode, visibilityStatus?: Map<string, VisibilityStatus>): Promise<CheckBoxInfo> {\r\n if (!this._visibilityHandler)\r\n return { ...node.checkbox, isVisible: false };\r\n\r\n const result = visibilityStatus?.get(node.id) ?? this._visibilityHandler.getVisibilityStatus(node.item, this.getNodeKey(node.item));\r\n\r\n if (isPromiseLike(result))\r\n return this.createCheckboxInfo(await result);\r\n return this.createCheckboxInfo(result);\r\n }\r\n\r\n private createCheckboxInfo(status: VisibilityStatus): CheckBoxInfo {\r\n return {\r\n state: visibilityStateToCheckboxState(status),\r\n isDisabled: status.isDisabled || false,\r\n isVisible: true,\r\n tooltip: status.tooltip,\r\n };\r\n }\r\n}\r\n\r\nconst visibilityStateToCheckboxState = (status: VisibilityStatus) => {\r\n switch (status.state) {\r\n case \"visible\":\r\n return CheckBoxState.On;\r\n // istanbul ignore next\r\n case \"partial\":\r\n return CheckBoxState.Partial;\r\n case \"hidden\":\r\n default:\r\n return CheckBoxState.Off;\r\n }\r\n};\r\n"]}
|
|
@@ -9,21 +9,25 @@ import { VisibilityTreeFilterInfo } from "./Common";
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates Visibility tree renderer which renders nodes with eye checkbox.
|
|
11
11
|
* @alpha
|
|
12
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
12
13
|
*/
|
|
13
14
|
export declare const useVisibilityTreeRenderer: (iconsEnabled: boolean, descriptionsEnabled: boolean) => (props: TreeRendererProps) => JSX.Element;
|
|
14
15
|
/**
|
|
15
16
|
* Creates node renderer which renders node with eye checkbox.
|
|
16
17
|
* @alpha
|
|
18
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
17
19
|
*/
|
|
18
20
|
export declare const createVisibilityTreeNodeRenderer: (iconsEnabled: boolean, descriptionEnabled: boolean) => (props: TreeNodeRendererProps) => JSX.Element;
|
|
19
21
|
/**
|
|
20
22
|
* Checkbox renderer that renders an eye.
|
|
21
23
|
* @alpha
|
|
24
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
22
25
|
*/
|
|
23
26
|
export declare const visibilityTreeNodeCheckboxRenderer: (props: NodeCheckboxRenderProps) => JSX.Element;
|
|
24
27
|
/**
|
|
25
28
|
* Filters data provider used in supplied node loader and invokes onFilterApplied when filtering is completed.
|
|
26
29
|
* @alpha
|
|
30
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
27
31
|
*/
|
|
28
32
|
export declare const useVisibilityTreeFiltering: (nodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider>, filterInfo?: VisibilityTreeFilterInfo | undefined, onFilterApplied?: ((filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void) | undefined) => {
|
|
29
33
|
filteredNodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider>;
|
|
@@ -33,6 +37,7 @@ export declare const useVisibilityTreeFiltering: (nodeLoader: AbstractTreeNodeLo
|
|
|
33
37
|
/**
|
|
34
38
|
* Properties for [[VisibilityTreeNoFilteredData]] component.
|
|
35
39
|
* @alpha
|
|
40
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
36
41
|
*/
|
|
37
42
|
export interface VisibilityTreeNoFilteredDataProps {
|
|
38
43
|
title: string;
|
|
@@ -41,6 +46,7 @@ export interface VisibilityTreeNoFilteredDataProps {
|
|
|
41
46
|
/**
|
|
42
47
|
* Renders message that no nodes was found for filter.
|
|
43
48
|
* @alpha
|
|
49
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
44
50
|
*/
|
|
45
51
|
export declare function VisibilityTreeNoFilteredData(props: VisibilityTreeNoFilteredDataProps): JSX.Element;
|
|
46
52
|
//# sourceMappingURL=VisibilityTreeRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityTreeRenderer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"VisibilityTreeRenderer.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAKH,OAAO,EAAE,6BAA6B,EAA0C,MAAM,gCAAgC,CAAC;AACvH,OAAO,EACL,kCAAkC,EAAqC,qBAAqB,EAAgB,iBAAiB,EAC9H,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiB,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,iBAAkB,OAAO,uBAAuB,OAAO,aAG1D,iBAAiB,gBAMnD,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,iBAAkB,OAAO,sBAAsB,OAAO,aAClF,qBAAqB,gBASrC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,UAAW,uBAAuB,gBAShF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,eACzB,mCAAmC,6BAA6B,CAAC,+FAEpC,6BAA6B,gBAAgB,MAAM,KAAK,IAAI;;;;CAmBtG,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iCAAiC,eAOpF"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module IModelComponents
|
|
7
7
|
*/
|
|
8
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { useControlledPresentationTreeFiltering } from "@itwin/presentation-components";
|
|
10
11
|
import { TreeImageLoader, TreeNodeRenderer, TreeRenderer, } from "@itwin/components-react";
|
|
@@ -12,6 +13,7 @@ import { ImageCheckBox } from "@itwin/core-react";
|
|
|
12
13
|
/**
|
|
13
14
|
* Creates Visibility tree renderer which renders nodes with eye checkbox.
|
|
14
15
|
* @alpha
|
|
16
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
15
17
|
*/
|
|
16
18
|
export const useVisibilityTreeRenderer = (iconsEnabled, descriptionsEnabled) => {
|
|
17
19
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -22,6 +24,7 @@ const imageLoader = new TreeImageLoader();
|
|
|
22
24
|
/**
|
|
23
25
|
* Creates node renderer which renders node with eye checkbox.
|
|
24
26
|
* @alpha
|
|
27
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
25
28
|
*/
|
|
26
29
|
export const createVisibilityTreeNodeRenderer = (iconsEnabled, descriptionEnabled) => {
|
|
27
30
|
return (props) => ( // eslint-disable-line react/display-name
|
|
@@ -30,11 +33,13 @@ export const createVisibilityTreeNodeRenderer = (iconsEnabled, descriptionEnable
|
|
|
30
33
|
/**
|
|
31
34
|
* Checkbox renderer that renders an eye.
|
|
32
35
|
* @alpha
|
|
36
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
33
37
|
*/
|
|
34
38
|
export const visibilityTreeNodeCheckboxRenderer = (props) => (React.createElement(ImageCheckBox, { checked: props.checked, disabled: props.disabled, imageOn: "icon-visibility", imageOff: "icon-visibility-hide-2", onClick: props.onChange, tooltip: props.title }));
|
|
35
39
|
/**
|
|
36
40
|
* Filters data provider used in supplied node loader and invokes onFilterApplied when filtering is completed.
|
|
37
41
|
* @alpha
|
|
42
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
38
43
|
*/
|
|
39
44
|
export const useVisibilityTreeFiltering = (nodeLoader, filterInfo, onFilterApplied) => {
|
|
40
45
|
const { filter, activeMatchIndex } = filterInfo !== null && filterInfo !== void 0 ? filterInfo : { filter: undefined, activeMatchIndex: undefined };
|
|
@@ -48,6 +53,7 @@ export const useVisibilityTreeFiltering = (nodeLoader, filterInfo, onFilterAppli
|
|
|
48
53
|
/**
|
|
49
54
|
* Renders message that no nodes was found for filter.
|
|
50
55
|
* @alpha
|
|
56
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
51
57
|
*/
|
|
52
58
|
export function VisibilityTreeNoFilteredData(props) {
|
|
53
59
|
return (React.createElement("div", { className: "components-tree-errormessage" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityTreeRenderer.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeRenderer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiC,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AACvH,OAAO,EAC+B,eAAe,EAAE,gBAAgB,EAAyB,YAAY,GAC3G,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAA2B,MAAM,mBAAmB,CAAC;AAG3E
|
|
1
|
+
{"version":3,"file":"VisibilityTreeRenderer.js","sourceRoot":"","sources":["../../../../src/appui-react/imodel-components/VisibilityTreeRenderer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiC,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AACvH,OAAO,EAC+B,eAAe,EAAE,gBAAgB,EAAyB,YAAY,GAC3G,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAA2B,MAAM,mBAAmB,CAAC;AAG3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,YAAqB,EAAE,mBAA4B,EAAE,EAAE;IAC/F,uDAAuD;IACvD,M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AU,cAAV,UAAU,GAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC;IACtG,MAAM,EACJ,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,qBAAqB,GACtB,GAAG,sCAAsC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAErF,KAAK,CAAC,SAAS,CACb,GAAG,EAAE;QACH,IAAI,MAAM,IAAI,YAAY,KAAK,SAAS,IAAI,kBAAkB,KAAK,UAAU;YAC3E,eAAe,IAAI,eAAe,CAAC,kBAAkB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACtF,CAAC,EACD,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,CAAC,CACxE,CAAC;IAEF,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;AACpE,CAAC,CAAC;AAYF;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAAwC;IACnF,OAAO,CACL,6BAAK,SAAS,EAAC,8BAA8B;QAC3C,8BAAM,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAC,KAAK,CAAQ;QAC1D,8BAAM,SAAS,EAAC,mBAAmB,IAAE,KAAK,CAAC,OAAO,CAAQ,CACtD,CACP,CAAC;AACJ,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 IModelComponents\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport * as React from \"react\";\r\nimport { IPresentationTreeDataProvider, useControlledPresentationTreeFiltering } from \"@itwin/presentation-components\";\r\nimport {\r\n AbstractTreeNodeLoaderWithProvider, TreeImageLoader, TreeNodeRenderer, TreeNodeRendererProps, TreeRenderer, TreeRendererProps,\r\n} from \"@itwin/components-react\";\r\nimport { ImageCheckBox, NodeCheckboxRenderProps } from \"@itwin/core-react\";\r\nimport { VisibilityTreeFilterInfo } from \"./Common\";\r\n\r\n/**\r\n * Creates Visibility tree renderer which renders nodes with eye checkbox.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport const useVisibilityTreeRenderer = (iconsEnabled: boolean, descriptionsEnabled: boolean) => {\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n const nodeRenderer = React.useCallback(createVisibilityTreeNodeRenderer(iconsEnabled, descriptionsEnabled), [iconsEnabled, descriptionsEnabled]);\r\n return React.useCallback((props: TreeRendererProps) => (\r\n <TreeRenderer\r\n {...props}\r\n nodeRenderer={nodeRenderer}\r\n />\r\n ), [nodeRenderer]);\r\n};\r\n\r\nconst imageLoader = new TreeImageLoader();\r\n/**\r\n * Creates node renderer which renders node with eye checkbox.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport const createVisibilityTreeNodeRenderer = (iconsEnabled: boolean, descriptionEnabled: boolean) => {\r\n return (props: TreeNodeRendererProps) => ( // eslint-disable-line react/display-name\r\n <TreeNodeRenderer\r\n {...props}\r\n checkboxRenderer={visibilityTreeNodeCheckboxRenderer}\r\n descriptionEnabled={descriptionEnabled}\r\n imageLoader={iconsEnabled ? imageLoader : undefined}\r\n className=\"with-checkbox\"\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Checkbox renderer that renders an eye.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport const visibilityTreeNodeCheckboxRenderer = (props: NodeCheckboxRenderProps) => (\r\n <ImageCheckBox\r\n checked={props.checked}\r\n disabled={props.disabled}\r\n imageOn=\"icon-visibility\"\r\n imageOff=\"icon-visibility-hide-2\"\r\n onClick={props.onChange}\r\n tooltip={props.title}\r\n />\r\n);\r\n\r\n/**\r\n * Filters data provider used in supplied node loader and invokes onFilterApplied when filtering is completed.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport const useVisibilityTreeFiltering = (\r\n nodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider>,\r\n filterInfo?: VisibilityTreeFilterInfo,\r\n onFilterApplied?: (filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void,\r\n) => {\r\n const { filter, activeMatchIndex } = filterInfo ?? { filter: undefined, activeMatchIndex: undefined };\r\n const {\r\n filteredNodeLoader,\r\n isFiltering,\r\n matchesCount,\r\n nodeHighlightingProps,\r\n } = useControlledPresentationTreeFiltering({ nodeLoader, filter, activeMatchIndex });\r\n\r\n React.useEffect(\r\n () => {\r\n if (filter && matchesCount !== undefined && filteredNodeLoader !== nodeLoader)\r\n onFilterApplied && onFilterApplied(filteredNodeLoader.dataProvider, matchesCount);\r\n },\r\n [filter, matchesCount, nodeLoader, filteredNodeLoader, onFilterApplied],\r\n );\r\n\r\n return { filteredNodeLoader, isFiltering, nodeHighlightingProps };\r\n};\r\n\r\n/**\r\n * Properties for [[VisibilityTreeNoFilteredData]] component.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface VisibilityTreeNoFilteredDataProps {\r\n title: string;\r\n message: string;\r\n}\r\n\r\n/**\r\n * Renders message that no nodes was found for filter.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport function VisibilityTreeNoFilteredData(props: VisibilityTreeNoFilteredDataProps) {\r\n return (\r\n <div className=\"components-tree-errormessage\">\r\n <span className=\"errormessage-header\">{props.title}</span>\r\n <span className=\"errormessage-body\">{props.message}</span>\r\n </div>\r\n );\r\n}\r\n"]}
|
|
@@ -16,6 +16,7 @@ export declare const RULESET_CATEGORIES: Ruleset;
|
|
|
16
16
|
/**
|
|
17
17
|
* Properties for the [[CategoryTree]] component
|
|
18
18
|
* @public
|
|
19
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
19
20
|
*/
|
|
20
21
|
export interface CategoryTreeProps {
|
|
21
22
|
/** Flag for accommodating all viewports */
|
|
@@ -31,7 +32,7 @@ export interface CategoryTreeProps {
|
|
|
31
32
|
/** Height of the component */
|
|
32
33
|
height: number;
|
|
33
34
|
/**
|
|
34
|
-
* Information for tree filtering.
|
|
35
|
+
* Information for tree filtering.s
|
|
35
36
|
* @alpha
|
|
36
37
|
*/
|
|
37
38
|
filterInfo?: VisibilityTreeFilterInfo;
|
|
@@ -53,16 +54,19 @@ export interface CategoryTreeProps {
|
|
|
53
54
|
/**
|
|
54
55
|
* Tree which displays and manages categories contained in an iModel.
|
|
55
56
|
* @public
|
|
57
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
56
58
|
*/
|
|
57
59
|
export declare function CategoryTree(props: CategoryTreeProps): JSX.Element;
|
|
58
60
|
/**
|
|
59
61
|
* Toggles visibility of categories to show or hide.
|
|
60
62
|
* @alpha
|
|
63
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
61
64
|
*/
|
|
62
65
|
export declare function toggleAllCategories(viewManager: ViewManager, imodel: IModelConnection, display: boolean, viewport?: Viewport, forAllViewports?: boolean, filteredProvider?: IPresentationTreeDataProvider): Promise<void>;
|
|
63
66
|
/**
|
|
64
67
|
* Gets ids of all categories or categories from filtered data provider.
|
|
65
68
|
* @alpha
|
|
69
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
66
70
|
*/
|
|
67
71
|
export declare function getCategories(imodel: IModelConnection, viewport?: Viewport, filteredProvider?: IPresentationTreeDataProvider): Promise<string[]>;
|
|
68
72
|
//# sourceMappingURL=CategoriesTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoriesTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoriesTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"CategoriesTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoriesTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAa,gBAAgB,EAAoB,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAiC,MAAM,gCAAgC,CAAC;AAK9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,OAAO,EAAY,yBAAyB,EAA6C,MAAM,6BAA6B,CAAC;AAI7H;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsC,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IACzB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,oBAAoB,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACtG;;;OAGG;IACH,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eAsDpD;AAoBD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,6BAA6B,iBAS/M;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAE,6BAA6B,qBAQlI"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module IModelComponents
|
|
7
7
|
*/
|
|
8
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
9
|
import "./CategoriesTree.scss";
|
|
9
10
|
import * as React from "react";
|
|
10
11
|
import { IModelApp } from "@itwin/core-frontend";
|
|
@@ -25,6 +26,7 @@ export const RULESET_CATEGORIES = require("./Categories.json"); // eslint-disabl
|
|
|
25
26
|
/**
|
|
26
27
|
* Tree which displays and manages categories contained in an iModel.
|
|
27
28
|
* @public
|
|
29
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
28
30
|
*/
|
|
29
31
|
export function CategoryTree(props) {
|
|
30
32
|
var _a;
|
|
@@ -74,6 +76,7 @@ async function setViewType(activeView) {
|
|
|
74
76
|
/**
|
|
75
77
|
* Toggles visibility of categories to show or hide.
|
|
76
78
|
* @alpha
|
|
79
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
77
80
|
*/
|
|
78
81
|
export async function toggleAllCategories(viewManager, imodel, display, viewport, forAllViewports, filteredProvider) {
|
|
79
82
|
// istanbul ignore next
|
|
@@ -87,6 +90,7 @@ export async function toggleAllCategories(viewManager, imodel, display, viewport
|
|
|
87
90
|
/**
|
|
88
91
|
* Gets ids of all categories or categories from filtered data provider.
|
|
89
92
|
* @alpha
|
|
93
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
90
94
|
*/
|
|
91
95
|
export async function getCategories(imodel, viewport, filteredProvider) {
|
|
92
96
|
if (filteredProvider) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoriesTree.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoriesTree.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAA6D,MAAM,sBAAsB,CAAC;AAE5G,OAAO,EAAiC,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAChI,OAAO,EAAY,yBAAyB,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE7H,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAY,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,yDAAyD;AAwClI;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;;IACnD,MAAM,EAAE,UAAU,EAAE,GAAG,6BAA6B,CAAC;QACnD,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,kBAAkB;QAC3B,UAAU,EAAE,WAAW;KACxB,CAAC,CAAC;IAEH,MAAM,EAAE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AC,CAAC,CAAC,CAAC;KACvH;IAED,MAAM,UAAU,GAAG,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpD,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 IModelComponents\r\n */\r\n\r\nimport \"./CategoriesTree.scss\";\r\nimport * as React from \"react\";\r\nimport { IModelApp, IModelConnection, SpatialViewState, ViewManager, Viewport } from \"@itwin/core-frontend\";\r\nimport { Ruleset } from \"@itwin/presentation-common\";\r\nimport { IPresentationTreeDataProvider, usePresentationTreeNodeLoader } from \"@itwin/presentation-components\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { ControlledTree, SelectionMode, useTreeModel } from \"@itwin/components-react\";\r\nimport { useDisposable } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { VisibilityTreeFilterInfo } from \"../Common\";\r\nimport { VisibilityTreeEventHandler } from \"../VisibilityTreeEventHandler\";\r\nimport { useVisibilityTreeFiltering, useVisibilityTreeRenderer, VisibilityTreeNoFilteredData } from \"../VisibilityTreeRenderer\";\r\nimport { Category, CategoryVisibilityHandler, loadCategoriesFromViewport, useCategories } from \"./CategoryVisibilityHandler\";\r\n\r\nconst PAGING_SIZE = 20;\r\n\r\n/**\r\n * Presentation rules used by ControlledCategoriesTree\r\n * @internal\r\n */\r\nexport const RULESET_CATEGORIES: Ruleset = require(\"./Categories.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\n/**\r\n * Properties for the [[CategoryTree]] component\r\n * @public\r\n */\r\nexport interface CategoryTreeProps {\r\n /** Flag for accommodating all viewports */\r\n allViewports?: boolean;\r\n /** Active viewport */\r\n activeView?: Viewport;\r\n /**\r\n * An IModel to pull data from\r\n */\r\n iModel: IModelConnection;\r\n /** Width of the component */\r\n width: number;\r\n /** Height of the component */\r\n height: number;\r\n /**\r\n * Information for tree filtering.\r\n * @alpha\r\n */\r\n filterInfo?: VisibilityTreeFilterInfo;\r\n /**\r\n * Callback invoked when tree is filtered.\r\n */\r\n onFilterApplied?: (filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void;\r\n /**\r\n * Custom category visibility handler to use for testing\r\n * @internal\r\n */\r\n categoryVisibilityHandler?: CategoryVisibilityHandler;\r\n /**\r\n * Custom view manager to use for testing\r\n * @internal\r\n */\r\n viewManager?: ViewManager;\r\n}\r\n\r\n/**\r\n * Tree which displays and manages categories contained in an iModel.\r\n * @public\r\n */\r\nexport function CategoryTree(props: CategoryTreeProps) {\r\n const { nodeLoader } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: RULESET_CATEGORIES,\r\n pagingSize: PAGING_SIZE,\r\n });\r\n\r\n const { filteredNodeLoader, isFiltering, nodeHighlightingProps } = useVisibilityTreeFiltering(nodeLoader, props.filterInfo, props.onFilterApplied);\r\n // istanbul ignore next\r\n const viewManager = props.viewManager ?? IModelApp.viewManager;\r\n const { activeView, allViewports, categoryVisibilityHandler } = props;\r\n const currentActiveView = activeView ?? viewManager.getFirstOpenView();\r\n const categories = useCategories(viewManager, props.iModel, currentActiveView);\r\n const visibilityHandler = useCategoryVisibilityHandler(viewManager, props.iModel, categories, currentActiveView, allViewports, categoryVisibilityHandler);\r\n\r\n React.useEffect(() => {\r\n setViewType(currentActiveView); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }, [currentActiveView]);\r\n\r\n const eventHandler = useDisposable(React.useCallback(() => new VisibilityTreeEventHandler({\r\n nodeLoader: filteredNodeLoader,\r\n visibilityHandler,\r\n collapsedChildrenDisposalEnabled: true,\r\n }), [filteredNodeLoader, visibilityHandler]));\r\n\r\n const treeModel = useTreeModel(filteredNodeLoader.modelSource);\r\n const treeRenderer = useVisibilityTreeRenderer(false, true);\r\n const overlay = isFiltering ? <div className=\"filteredTreeOverlay\" /> : undefined;\r\n const filterApplied = filteredNodeLoader !== nodeLoader;\r\n\r\n const noFilteredDataRenderer = React.useCallback(() => {\r\n return <VisibilityTreeNoFilteredData\r\n title={UiFramework.localization.getLocalizedString(\"UiFramework:categoriesTree.noCategoryFound\")}\r\n message={UiFramework.localization.getLocalizedString(\"UiFramework:categoriesTree.noMatchingCategoryNames\")}\r\n />;\r\n }, []);\r\n\r\n return (\r\n <div className=\"ui-fw-categories-tree\">\r\n <ControlledTree\r\n nodeLoader={filteredNodeLoader}\r\n model={treeModel}\r\n selectionMode={SelectionMode.None}\r\n eventsHandler={eventHandler}\r\n treeRenderer={treeRenderer}\r\n descriptionsEnabled={true}\r\n nodeHighlightingProps={nodeHighlightingProps}\r\n noDataRenderer={filterApplied ? noFilteredDataRenderer : undefined}\r\n width={props.width}\r\n height={props.height}\r\n />\r\n {overlay}\r\n </div>\r\n );\r\n}\r\n\r\nfunction useCategoryVisibilityHandler(viewManager: ViewManager, imodel: IModelConnection, categories: Category[], activeView?: Viewport, allViewports?: boolean, visibilityHandler?: CategoryVisibilityHandler) {\r\n return useDisposable(React.useCallback(\r\n () =>\r\n // istanbul ignore next\r\n visibilityHandler ?? new CategoryVisibilityHandler({ viewManager, imodel, categories, activeView, allViewports }),\r\n [viewManager, imodel, categories, activeView, allViewports, visibilityHandler]),\r\n );\r\n}\r\n\r\nasync function setViewType(activeView?: Viewport) {\r\n if (!activeView)\r\n return;\r\n\r\n const view = activeView.view as SpatialViewState;\r\n const viewType = view.is3d() ? \"3d\" : \"2d\";\r\n await Presentation.presentation.vars(RULESET_CATEGORIES.id).setString(\"ViewType\", viewType);\r\n}\r\n\r\n/**\r\n * Toggles visibility of categories to show or hide.\r\n * @alpha\r\n */\r\nexport async function toggleAllCategories(viewManager: ViewManager, imodel: IModelConnection, display: boolean, viewport?: Viewport, forAllViewports?: boolean, filteredProvider?: IPresentationTreeDataProvider) {\r\n // istanbul ignore next\r\n const activeView = viewport ?? viewManager.getFirstOpenView();\r\n const ids = await getCategories(imodel, activeView, filteredProvider);\r\n\r\n // istanbul ignore else\r\n if (ids.length > 0) {\r\n CategoryVisibilityHandler.enableCategory(viewManager, imodel, ids, display, forAllViewports ?? false);\r\n }\r\n}\r\n\r\n/**\r\n * Gets ids of all categories or categories from filtered data provider.\r\n * @alpha\r\n */\r\nexport async function getCategories(imodel: IModelConnection, viewport?: Viewport, filteredProvider?: IPresentationTreeDataProvider) {\r\n if (filteredProvider) {\r\n const nodes = await filteredProvider.getNodes();\r\n return nodes.map((node) => CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(filteredProvider.getNodeKey(node)));\r\n }\r\n\r\n const categories = await loadCategoriesFromViewport(imodel, viewport);\r\n return categories.map((category) => category.key);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"CategoriesTree.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoriesTree.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAA6D,MAAM,sBAAsB,CAAC;AAE5G,OAAO,EAAiC,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,E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I,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;QAClB,yBAAyB,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,KAAK,CAAC,CAAC;KACvG;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAwB,EAAE,QAAmB,EAAE,gBAAgD;IACjI,IAAI,gBAAgB,EAAE;QACpB,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACvH;IAED,MAAM,UAAU,GAAG,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpD,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 IModelComponents\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport \"./CategoriesTree.scss\";\r\nimport * as React from \"react\";\r\nimport { IModelApp, IModelConnection, SpatialViewState, ViewManager, Viewport } from \"@itwin/core-frontend\";\r\nimport { Ruleset } from \"@itwin/presentation-common\";\r\nimport { IPresentationTreeDataProvider, usePresentationTreeNodeLoader } from \"@itwin/presentation-components\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { ControlledTree, SelectionMode, useTreeModel } from \"@itwin/components-react\";\r\nimport { useDisposable } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { VisibilityTreeFilterInfo } from \"../Common\";\r\nimport { VisibilityTreeEventHandler } from \"../VisibilityTreeEventHandler\";\r\nimport { useVisibilityTreeFiltering, useVisibilityTreeRenderer, VisibilityTreeNoFilteredData } from \"../VisibilityTreeRenderer\";\r\nimport { Category, CategoryVisibilityHandler, loadCategoriesFromViewport, useCategories } from \"./CategoryVisibilityHandler\";\r\n\r\nconst PAGING_SIZE = 20;\r\n\r\n/**\r\n * Presentation rules used by ControlledCategoriesTree\r\n * @internal\r\n */\r\nexport const RULESET_CATEGORIES: Ruleset = require(\"./Categories.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\n/**\r\n * Properties for the [[CategoryTree]] component\r\n * @public\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface CategoryTreeProps {\r\n /** Flag for accommodating all viewports */\r\n allViewports?: boolean;\r\n /** Active viewport */\r\n activeView?: Viewport;\r\n /**\r\n * An IModel to pull data from\r\n */\r\n iModel: IModelConnection;\r\n /** Width of the component */\r\n width: number;\r\n /** Height of the component */\r\n height: number;\r\n /**\r\n * Information for tree filtering.s\r\n * @alpha\r\n */\r\n filterInfo?: VisibilityTreeFilterInfo;\r\n /**\r\n * Callback invoked when tree is filtered.\r\n */\r\n onFilterApplied?: (filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void;\r\n /**\r\n * Custom category visibility handler to use for testing\r\n * @internal\r\n */\r\n categoryVisibilityHandler?: CategoryVisibilityHandler;\r\n /**\r\n * Custom view manager to use for testing\r\n * @internal\r\n */\r\n viewManager?: ViewManager;\r\n}\r\n\r\n/**\r\n * Tree which displays and manages categories contained in an iModel.\r\n * @public\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport function CategoryTree(props: CategoryTreeProps) {\r\n const { nodeLoader } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: RULESET_CATEGORIES,\r\n pagingSize: PAGING_SIZE,\r\n });\r\n\r\n const { filteredNodeLoader, isFiltering, nodeHighlightingProps } = useVisibilityTreeFiltering(nodeLoader, props.filterInfo, props.onFilterApplied);\r\n // istanbul ignore next\r\n const viewManager = props.viewManager ?? IModelApp.viewManager;\r\n const { activeView, allViewports, categoryVisibilityHandler } = props;\r\n const currentActiveView = activeView ?? viewManager.getFirstOpenView();\r\n const categories = useCategories(viewManager, props.iModel, currentActiveView);\r\n const visibilityHandler = useCategoryVisibilityHandler(viewManager, props.iModel, categories, currentActiveView, allViewports, categoryVisibilityHandler);\r\n\r\n React.useEffect(() => {\r\n setViewType(currentActiveView); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }, [currentActiveView]);\r\n\r\n const eventHandler = useDisposable(React.useCallback(() => new VisibilityTreeEventHandler({\r\n nodeLoader: filteredNodeLoader,\r\n visibilityHandler,\r\n collapsedChildrenDisposalEnabled: true,\r\n }), [filteredNodeLoader, visibilityHandler]));\r\n\r\n const treeModel = useTreeModel(filteredNodeLoader.modelSource);\r\n const treeRenderer = useVisibilityTreeRenderer(false, true);\r\n const overlay = isFiltering ? <div className=\"filteredTreeOverlay\" /> : undefined;\r\n const filterApplied = filteredNodeLoader !== nodeLoader;\r\n\r\n const noFilteredDataRenderer = React.useCallback(() => {\r\n return <VisibilityTreeNoFilteredData\r\n title={UiFramework.localization.getLocalizedString(\"UiFramework:categoriesTree.noCategoryFound\")}\r\n message={UiFramework.localization.getLocalizedString(\"UiFramework:categoriesTree.noMatchingCategoryNames\")}\r\n />;\r\n }, []);\r\n\r\n return (\r\n <div className=\"ui-fw-categories-tree\">\r\n <ControlledTree\r\n nodeLoader={filteredNodeLoader}\r\n model={treeModel}\r\n selectionMode={SelectionMode.None}\r\n eventsHandler={eventHandler}\r\n treeRenderer={treeRenderer}\r\n descriptionsEnabled={true}\r\n nodeHighlightingProps={nodeHighlightingProps}\r\n noDataRenderer={filterApplied ? noFilteredDataRenderer : undefined}\r\n width={props.width}\r\n height={props.height}\r\n />\r\n {overlay}\r\n </div>\r\n );\r\n}\r\n\r\nfunction useCategoryVisibilityHandler(viewManager: ViewManager, imodel: IModelConnection, categories: Category[], activeView?: Viewport, allViewports?: boolean, visibilityHandler?: CategoryVisibilityHandler) {\r\n return useDisposable(React.useCallback(\r\n () =>\r\n // istanbul ignore next\r\n visibilityHandler ?? new CategoryVisibilityHandler({ viewManager, imodel, categories, activeView, allViewports }),\r\n [viewManager, imodel, categories, activeView, allViewports, visibilityHandler]),\r\n );\r\n}\r\n\r\nasync function setViewType(activeView?: Viewport) {\r\n if (!activeView)\r\n return;\r\n\r\n const view = activeView.view as SpatialViewState;\r\n const viewType = view.is3d() ? \"3d\" : \"2d\";\r\n await Presentation.presentation.vars(RULESET_CATEGORIES.id).setString(\"ViewType\", viewType);\r\n}\r\n\r\n/**\r\n * Toggles visibility of categories to show or hide.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport async function toggleAllCategories(viewManager: ViewManager, imodel: IModelConnection, display: boolean, viewport?: Viewport, forAllViewports?: boolean, filteredProvider?: IPresentationTreeDataProvider) {\r\n // istanbul ignore next\r\n const activeView = viewport ?? viewManager.getFirstOpenView();\r\n const ids = await getCategories(imodel, activeView, filteredProvider);\r\n\r\n // istanbul ignore else\r\n if (ids.length > 0) {\r\n CategoryVisibilityHandler.enableCategory(viewManager, imodel, ids, display, forAllViewports ?? false);\r\n }\r\n}\r\n\r\n/**\r\n * Gets ids of all categories or categories from filtered data provider.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport async function getCategories(imodel: IModelConnection, viewport?: Viewport, filteredProvider?: IPresentationTreeDataProvider) {\r\n if (filteredProvider) {\r\n const nodes = await filteredProvider.getNodes();\r\n return nodes.map((node) => CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(filteredProvider.getNodeKey(node)));\r\n }\r\n\r\n const categories = await loadCategoriesFromViewport(imodel, viewport);\r\n return categories.map((category) => category.key);\r\n}\r\n"]}
|
|
@@ -16,12 +16,16 @@ export declare function loadCategoriesFromViewport(iModel?: IModelConnection, vp
|
|
|
16
16
|
/**
|
|
17
17
|
* Data structure that describes category.
|
|
18
18
|
* @alpha
|
|
19
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
19
20
|
*/
|
|
20
21
|
export interface Category {
|
|
21
22
|
key: string;
|
|
22
23
|
children?: string[];
|
|
23
24
|
}
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* @alpha
|
|
27
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
28
|
+
*/
|
|
25
29
|
export interface CategoryVisibilityHandlerParams {
|
|
26
30
|
viewManager: ViewManager;
|
|
27
31
|
imodel: IModelConnection;
|
|
@@ -29,7 +33,10 @@ export interface CategoryVisibilityHandlerParams {
|
|
|
29
33
|
activeView?: Viewport;
|
|
30
34
|
allViewports?: boolean;
|
|
31
35
|
}
|
|
32
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @alpha
|
|
38
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
39
|
+
*/
|
|
33
40
|
export declare class CategoryVisibilityHandler implements IVisibilityHandler {
|
|
34
41
|
private _viewManager;
|
|
35
42
|
private _imodel;
|
package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryVisibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"CategoryVisibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAA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AAO,EAAE,OAAO,GAAG,gBAAgB;IAKrE,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBnG,wBAAwB,CAAC,EAAE,EAAE,MAAM;IASnC,qBAAqB,CAAC,EAAE,EAAE,MAAM;IAMhC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAanD,OAAO,CAAC,qBAAqB,CAE3B;IAGF,OAAO,CAAC,yBAAyB,CAE/B;IAEF,OAAO,CAAC,0BAA0B;WAUpB,4BAA4B,CAAC,OAAO,EAAE,OAAO;IAI3D,+CAA+C;WACjC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,sBAAsB,UAAO;IA0CzK,kDAAkD;WACpC,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,OAAO;CAqBnH"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module IModelComponents
|
|
7
7
|
*/
|
|
8
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { BeEvent } from "@itwin/core-bentley";
|
|
10
11
|
import { QueryRowFormat } from "@itwin/core-common";
|
|
@@ -43,7 +44,10 @@ export async function loadCategoriesFromViewport(iModel, vp) {
|
|
|
43
44
|
}
|
|
44
45
|
return categories;
|
|
45
46
|
}
|
|
46
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @alpha
|
|
49
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
50
|
+
*/
|
|
47
51
|
export class CategoryVisibilityHandler {
|
|
48
52
|
constructor(params) {
|
|
49
53
|
var _a;
|
package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryVisibilityHandler.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAoB,0BAA0B,EAAyB,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAgB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGtE,MAAM,sBAAsB,GAAe,EAAE,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,WAAwB,EAAE,MAAwB,EAAE,IAAe;;IAC/F,MAAM,WAAW,GAAG,IAAI,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC;IAC3D,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,0BAA0B,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAC5H,OAAO,MAAA,aAAa,CAAC,iBAAiB,CAAC,mCAAI,sBAAsB,CAAC;AACpE,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,MAAyB,EAAE,EAAa;IACvF,IAAI,CAAC,EAAE;QACL,OAAO,sBAAsB,CAAC;IAEhC,yCAAyC;IACzC,MAAM,4BAA4B,GAAG,2IAA2I,CAAC;IACjL,MAAM,4BAA4B,GAAG,0JAA0J,CAAC;IAChM,MAA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AAC,CAAC;SAC1C;IACH,CAAC;IAED,kDAAkD;IAC3C,MAAM,CAAC,iBAAiB,CAAC,WAAwB,EAAE,GAAW,EAAE,OAAgB,EAAE,eAAyB;QAChH,IAAI,CAAC,WAAW,CAAC,YAAY;YAC3B,OAAO;QAET,MAAM,cAAc,GAAG,CAAC,EAAY,EAAE,EAAE;YACtC,2GAA2G;YAC3G,oCAAoC;YACpC,IAAI,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;gBACvF,EAAE,CAAC,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;aAC3C;QACH,CAAC,CAAC;QAEF,iGAAiG;QACjG,IAAI,eAAe,EAAE;YACnB,KAAK,MAAM,QAAQ,IAAI,WAAW,EAAE;gBAClC,cAAc,CAAC,QAAQ,CAAC,CAAC;aAC1B;SACF;aAAM;YACL,cAAc,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SAC1C;IACH,CAAC;CACF","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 IModelComponents\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { QueryRowFormat } from \"@itwin/core-common\";\r\nimport { IModelConnection, PerModelCategoryVisibility, ViewManager, Viewport } from \"@itwin/core-frontend\";\r\nimport { NodeKey } from \"@itwin/presentation-common\";\r\nimport { TreeNodeItem, useAsyncValue } from \"@itwin/components-react\";\r\nimport { IVisibilityHandler, VisibilityChangeListener, VisibilityStatus } from \"../VisibilityTreeEventHandler\";\r\n\r\nconst EMPTY_CATEGORIES_ARRAY: Category[] = [];\r\n\r\n/**\r\n * Loads categories from viewport or uses provided list of categories.\r\n * @internal\r\n */\r\nexport function useCategories(viewManager: ViewManager, imodel: IModelConnection, view?: Viewport) {\r\n const currentView = view || viewManager.getFirstOpenView();\r\n const categoriesPromise = React.useMemo(async () => loadCategoriesFromViewport(imodel, currentView), [imodel, currentView]);\r\n return useAsyncValue(categoriesPromise) ?? EMPTY_CATEGORIES_ARRAY;\r\n}\r\n\r\n/** @internal */\r\nexport async function loadCategoriesFromViewport(iModel?: IModelConnection, vp?: Viewport) {\r\n if (!vp)\r\n return EMPTY_CATEGORIES_ARRAY;\r\n\r\n // Query categories and add them to state\r\n const selectUsedSpatialCategoryIds = \"SELECT DISTINCT Category.Id as id from BisCore.GeometricElement3d WHERE Category.Id IN (SELECT ECInstanceId from BisCore.SpatialCategory)\";\r\n const selectUsedDrawingCategoryIds = \"SELECT DISTINCT Category.Id as id from BisCore.GeometricElement2d WHERE Model.Id=? AND Category.Id IN (SELECT ECInstanceId from BisCore.DrawingCategory)\";\r\n const ecsql = vp.view.is3d() ? selectUsedSpatialCategoryIds : selectUsedDrawingCategoryIds;\r\n const ecsql2 = `SELECT ECInstanceId as id, UserLabel as label, CodeValue as code FROM ${vp.view.is3d() ? \"BisCore.SpatialCategory\" : \"BisCore.DrawingCategory\"} WHERE ECInstanceId IN (${ecsql})`;\r\n\r\n const categories: Category[] = [];\r\n\r\n // istanbul ignore else\r\n if (iModel) {\r\n const rowIterator = iModel.query(ecsql2, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames });\r\n // istanbul ignore next\r\n for await (const row of rowIterator) {\r\n const subCategoryIds = iModel.subcategories.getSubCategories(row.id);\r\n categories.push({ key: row.id, children: (subCategoryIds) ? [...subCategoryIds] : undefined });\r\n }\r\n }\r\n\r\n return categories;\r\n}\r\n\r\n/**\r\n * Data structure that describes category.\r\n * @alpha\r\n */\r\nexport interface Category {\r\n key: string;\r\n children?: string[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface CategoryVisibilityHandlerParams {\r\n viewManager: ViewManager;\r\n imodel: IModelConnection;\r\n categories: Category[];\r\n activeView?: Viewport;\r\n allViewports?: boolean;\r\n}\r\n\r\n/** @alpha */\r\nexport class CategoryVisibilityHandler implements IVisibilityHandler {\r\n private _viewManager: ViewManager;\r\n private _imodel: IModelConnection;\r\n private _pendingVisibilityChange: any | undefined;\r\n private _activeView?: Viewport;\r\n private _useAllViewports: boolean;\r\n private _categories: Category[];\r\n\r\n constructor(params: CategoryVisibilityHandlerParams) {\r\n this._viewManager = params.viewManager;\r\n this._imodel = params.imodel;\r\n this._activeView = params.activeView;\r\n // istanbul ignore next\r\n this._useAllViewports = params.allViewports ?? false;\r\n this._categories = params.categories;\r\n if (this._activeView) {\r\n this._activeView.onDisplayStyleChanged.addListener(this.onDisplayStyleChanged);\r\n this._activeView.onViewedCategoriesChanged.addListener(this.onViewedCategoriesChanged);\r\n }\r\n }\r\n\r\n public dispose() {\r\n if (this._activeView) {\r\n this._activeView.onDisplayStyleChanged.removeListener(this.onDisplayStyleChanged);\r\n this._activeView.onViewedCategoriesChanged.removeListener(this.onViewedCategoriesChanged);\r\n }\r\n clearTimeout(this._pendingVisibilityChange);\r\n }\r\n\r\n public onVisibilityChange = new BeEvent<VisibilityChangeListener>();\r\n\r\n public getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus {\r\n const instanceId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n return { state: node.parentId ? this.getSubCategoryVisibility(instanceId) : this.getCategoryVisibility(instanceId) };\r\n }\r\n\r\n public async changeVisibility(node: TreeNodeItem, nodeKey: NodeKey, shouldDisplay: boolean): Promise<void> {\r\n // handle subcategory visibility change\r\n if (node.parentId) {\r\n const childId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n // istanbul ignore next\r\n const parentId = this.getParent(childId)?.key;\r\n\r\n // make sure parent category is enabled\r\n if (shouldDisplay && parentId)\r\n CategoryVisibilityHandler.enableCategory(this._viewManager, this._imodel, [parentId], true, this._useAllViewports, false);\r\n\r\n CategoryVisibilityHandler.enableSubCategory(this._viewManager, childId, shouldDisplay, this._useAllViewports);\r\n return;\r\n }\r\n\r\n const instanceId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n CategoryVisibilityHandler.enableCategory(this._viewManager, this._imodel, [instanceId], shouldDisplay, true);\r\n }\r\n\r\n public getSubCategoryVisibility(id: string) {\r\n const parentItem = this.getParent(id);\r\n if (!parentItem || !this._activeView)\r\n return \"hidden\";\r\n\r\n const isVisible = this._activeView.view.viewsCategory(parentItem.key) && this._activeView.isSubCategoryVisible(id);\r\n return isVisible ? \"visible\" : \"hidden\";\r\n }\r\n\r\n public getCategoryVisibility(id: string) {\r\n if (!this._activeView)\r\n return \"hidden\";\r\n return this._activeView.view.viewsCategory(id) ? \"visible\" : \"hidden\";\r\n }\r\n\r\n public getParent(key: string): Category | undefined {\r\n for (const category of this._categories) {\r\n // istanbul ignore else\r\n if (category.children) {\r\n if (category.children.indexOf(key) !== -1)\r\n return category;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onDisplayStyleChanged = () => {\r\n this.onVisibilityChangeInternal();\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onViewedCategoriesChanged = () => {\r\n this.onVisibilityChangeInternal();\r\n };\r\n\r\n private onVisibilityChangeInternal() {\r\n if (this._pendingVisibilityChange)\r\n return;\r\n\r\n this._pendingVisibilityChange = setTimeout(() => {\r\n this.onVisibilityChange.raiseEvent();\r\n this._pendingVisibilityChange = undefined;\r\n }, 0);\r\n }\r\n\r\n public static getInstanceIdFromTreeNodeKey(nodeKey: NodeKey) {\r\n return (NodeKey.isInstancesNodeKey(nodeKey) && nodeKey.instanceKeys.length > 0) ? nodeKey.instanceKeys[0].id : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n /** Changes category display in the viewport */\r\n public static enableCategory(viewManager: ViewManager, imodel: IModelConnection, ids: string[], enabled: boolean, forAllViewports: boolean, enableAllSubCategories = true) {\r\n if (!viewManager.selectedView)\r\n return;\r\n\r\n const updateViewport = (vp: Viewport) => {\r\n // Only act on viewports that are both 3D or both 2D. Important if we have multiple viewports opened and we\r\n // are using 'allViewports' property\r\n if (viewManager.selectedView && viewManager.selectedView.view.is3d() === vp.view.is3d()) {\r\n vp.changeCategoryDisplay(ids, enabled, enableAllSubCategories);\r\n\r\n // remove category overrides per model\r\n const modelsContainingOverrides: string[] = [];\r\n for (const ovr of vp.perModelCategoryVisibility) {\r\n // istanbul ignore else\r\n if (ids.findIndex((id) => id === ovr.categoryId) !== -1)\r\n modelsContainingOverrides.push(ovr.modelId);\r\n }\r\n vp.perModelCategoryVisibility.setOverride(modelsContainingOverrides, ids, PerModelCategoryVisibility.Override.None);\r\n\r\n // changeCategoryDisplay only enables subcategories, it does not disabled them. So we must do that ourselves.\r\n if (false === enabled) {\r\n ids.forEach((id) => {\r\n const subCategoryIds = imodel.subcategories.getSubCategories(id);\r\n // istanbul ignore else\r\n if (subCategoryIds) {\r\n subCategoryIds.forEach((subCategoryId) => CategoryVisibilityHandler.enableSubCategory(viewManager, subCategoryId, false, forAllViewports));\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n // This property let us act on all viewports or just on the selected one, configurable by the app\r\n if (forAllViewports) {\r\n for (const viewport of viewManager) {\r\n updateViewport(viewport);\r\n }\r\n } else {\r\n updateViewport(viewManager.selectedView);\r\n }\r\n }\r\n\r\n /** Changes subcategory display in the viewport */\r\n public static enableSubCategory(viewManager: ViewManager, key: string, enabled: boolean, forAllViewports?: boolean) {\r\n if (!viewManager.selectedView)\r\n return;\r\n\r\n const updateViewport = (vp: Viewport) => {\r\n // Only act on viewports that are both 3D or both 2D. Important if we have multiple viewports opened and we\r\n // are using 'allViewports' property\r\n if (viewManager.selectedView && viewManager.selectedView.view.is3d() === vp.view.is3d()) {\r\n vp.changeSubCategoryDisplay(key, enabled);\r\n }\r\n };\r\n\r\n // This property let us act on all viewports or just on the selected one, configurable by the app\r\n if (forAllViewports) {\r\n for (const viewport of viewManager) {\r\n updateViewport(viewport);\r\n }\r\n } else {\r\n updateViewport(viewManager.selectedView);\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"CategoryVisibilityHandler.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAoB,0BAA0B,EAAyB,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAgB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGtE,MAAM,sBAAsB,GAAe,EAAE,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,WAAwB,EAAE,MAAwB,EAAE,IAAe;;IAC/F,MAAM,WAAW,GAAG,IAAI,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC;IAC3D,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,0BAA0B,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAC5H,OAAO,MAAA,aAAa,CAAC,iBAAiB,CAAC,mCAAI,sBAAsB,CAAC;AACpE,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,MAAyB,EAAE,EAAa;IACvF,IAAI,CAAC,EAAE;QACL,OAAO,sBAAsB,CAAC;IAEhC,yCAAyC;IACzC,MAAM,4BAA4B,GAA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Q,CAAC,CAAC;aAC1B;SACF;aAAM;YACL,cAAc,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SAC1C;IACH,CAAC;IAED,kDAAkD;IAC3C,MAAM,CAAC,iBAAiB,CAAC,WAAwB,EAAE,GAAW,EAAE,OAAgB,EAAE,eAAyB;QAChH,IAAI,CAAC,WAAW,CAAC,YAAY;YAC3B,OAAO;QAET,MAAM,cAAc,GAAG,CAAC,EAAY,EAAE,EAAE;YACtC,2GAA2G;YAC3G,oCAAoC;YACpC,IAAI,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;gBACvF,EAAE,CAAC,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;aAC3C;QACH,CAAC,CAAC;QAEF,iGAAiG;QACjG,IAAI,eAAe,EAAE;YACnB,KAAK,MAAM,QAAQ,IAAI,WAAW,EAAE;gBAClC,cAAc,CAAC,QAAQ,CAAC,CAAC;aAC1B;SACF;aAAM;YACL,cAAc,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SAC1C;IACH,CAAC;CACF","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 IModelComponents\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport * as React from \"react\";\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { QueryRowFormat } from \"@itwin/core-common\";\r\nimport { IModelConnection, PerModelCategoryVisibility, ViewManager, Viewport } from \"@itwin/core-frontend\";\r\nimport { NodeKey } from \"@itwin/presentation-common\";\r\nimport { TreeNodeItem, useAsyncValue } from \"@itwin/components-react\";\r\nimport { IVisibilityHandler, VisibilityChangeListener, VisibilityStatus } from \"../VisibilityTreeEventHandler\";\r\n\r\nconst EMPTY_CATEGORIES_ARRAY: Category[] = [];\r\n\r\n/**\r\n * Loads categories from viewport or uses provided list of categories.\r\n * @internal\r\n */\r\nexport function useCategories(viewManager: ViewManager, imodel: IModelConnection, view?: Viewport) {\r\n const currentView = view || viewManager.getFirstOpenView();\r\n const categoriesPromise = React.useMemo(async () => loadCategoriesFromViewport(imodel, currentView), [imodel, currentView]);\r\n return useAsyncValue(categoriesPromise) ?? EMPTY_CATEGORIES_ARRAY;\r\n}\r\n\r\n/** @internal */\r\nexport async function loadCategoriesFromViewport(iModel?: IModelConnection, vp?: Viewport) {\r\n if (!vp)\r\n return EMPTY_CATEGORIES_ARRAY;\r\n\r\n // Query categories and add them to state\r\n const selectUsedSpatialCategoryIds = \"SELECT DISTINCT Category.Id as id from BisCore.GeometricElement3d WHERE Category.Id IN (SELECT ECInstanceId from BisCore.SpatialCategory)\";\r\n const selectUsedDrawingCategoryIds = \"SELECT DISTINCT Category.Id as id from BisCore.GeometricElement2d WHERE Model.Id=? AND Category.Id IN (SELECT ECInstanceId from BisCore.DrawingCategory)\";\r\n const ecsql = vp.view.is3d() ? selectUsedSpatialCategoryIds : selectUsedDrawingCategoryIds;\r\n const ecsql2 = `SELECT ECInstanceId as id, UserLabel as label, CodeValue as code FROM ${vp.view.is3d() ? \"BisCore.SpatialCategory\" : \"BisCore.DrawingCategory\"} WHERE ECInstanceId IN (${ecsql})`;\r\n\r\n const categories: Category[] = [];\r\n\r\n // istanbul ignore else\r\n if (iModel) {\r\n const rowIterator = iModel.query(ecsql2, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames });\r\n // istanbul ignore next\r\n for await (const row of rowIterator) {\r\n const subCategoryIds = iModel.subcategories.getSubCategories(row.id);\r\n categories.push({ key: row.id, children: (subCategoryIds) ? [...subCategoryIds] : undefined });\r\n }\r\n }\r\n\r\n return categories;\r\n}\r\n\r\n/**\r\n * Data structure that describes category.\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface Category {\r\n key: string;\r\n children?: string[];\r\n}\r\n\r\n/**\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport interface CategoryVisibilityHandlerParams {\r\n viewManager: ViewManager;\r\n imodel: IModelConnection;\r\n categories: Category[];\r\n activeView?: Viewport;\r\n allViewports?: boolean;\r\n}\r\n\r\n/**\r\n * @alpha\r\n * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.\r\n */\r\nexport class CategoryVisibilityHandler implements IVisibilityHandler {\r\n private _viewManager: ViewManager;\r\n private _imodel: IModelConnection;\r\n private _pendingVisibilityChange: any | undefined;\r\n private _activeView?: Viewport;\r\n private _useAllViewports: boolean;\r\n private _categories: Category[];\r\n\r\n constructor(params: CategoryVisibilityHandlerParams) {\r\n this._viewManager = params.viewManager;\r\n this._imodel = params.imodel;\r\n this._activeView = params.activeView;\r\n // istanbul ignore next\r\n this._useAllViewports = params.allViewports ?? false;\r\n this._categories = params.categories;\r\n if (this._activeView) {\r\n this._activeView.onDisplayStyleChanged.addListener(this.onDisplayStyleChanged);\r\n this._activeView.onViewedCategoriesChanged.addListener(this.onViewedCategoriesChanged);\r\n }\r\n }\r\n\r\n public dispose() {\r\n if (this._activeView) {\r\n this._activeView.onDisplayStyleChanged.removeListener(this.onDisplayStyleChanged);\r\n this._activeView.onViewedCategoriesChanged.removeListener(this.onViewedCategoriesChanged);\r\n }\r\n clearTimeout(this._pendingVisibilityChange);\r\n }\r\n\r\n public onVisibilityChange = new BeEvent<VisibilityChangeListener>();\r\n\r\n public getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus {\r\n const instanceId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n return { state: node.parentId ? this.getSubCategoryVisibility(instanceId) : this.getCategoryVisibility(instanceId) };\r\n }\r\n\r\n public async changeVisibility(node: TreeNodeItem, nodeKey: NodeKey, shouldDisplay: boolean): Promise<void> {\r\n // handle subcategory visibility change\r\n if (node.parentId) {\r\n const childId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n // istanbul ignore next\r\n const parentId = this.getParent(childId)?.key;\r\n\r\n // make sure parent category is enabled\r\n if (shouldDisplay && parentId)\r\n CategoryVisibilityHandler.enableCategory(this._viewManager, this._imodel, [parentId], true, this._useAllViewports, false);\r\n\r\n CategoryVisibilityHandler.enableSubCategory(this._viewManager, childId, shouldDisplay, this._useAllViewports);\r\n return;\r\n }\r\n\r\n const instanceId = CategoryVisibilityHandler.getInstanceIdFromTreeNodeKey(nodeKey);\r\n CategoryVisibilityHandler.enableCategory(this._viewManager, this._imodel, [instanceId], shouldDisplay, true);\r\n }\r\n\r\n public getSubCategoryVisibility(id: string) {\r\n const parentItem = this.getParent(id);\r\n if (!parentItem || !this._activeView)\r\n return \"hidden\";\r\n\r\n const isVisible = this._activeView.view.viewsCategory(parentItem.key) && this._activeView.isSubCategoryVisible(id);\r\n return isVisible ? \"visible\" : \"hidden\";\r\n }\r\n\r\n public getCategoryVisibility(id: string) {\r\n if (!this._activeView)\r\n return \"hidden\";\r\n return this._activeView.view.viewsCategory(id) ? \"visible\" : \"hidden\";\r\n }\r\n\r\n public getParent(key: string): Category | undefined {\r\n for (const category of this._categories) {\r\n // istanbul ignore else\r\n if (category.children) {\r\n if (category.children.indexOf(key) !== -1)\r\n return category;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onDisplayStyleChanged = () => {\r\n this.onVisibilityChangeInternal();\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onViewedCategoriesChanged = () => {\r\n this.onVisibilityChangeInternal();\r\n };\r\n\r\n private onVisibilityChangeInternal() {\r\n if (this._pendingVisibilityChange)\r\n return;\r\n\r\n this._pendingVisibilityChange = setTimeout(() => {\r\n this.onVisibilityChange.raiseEvent();\r\n this._pendingVisibilityChange = undefined;\r\n }, 0);\r\n }\r\n\r\n public static getInstanceIdFromTreeNodeKey(nodeKey: NodeKey) {\r\n return (NodeKey.isInstancesNodeKey(nodeKey) && nodeKey.instanceKeys.length > 0) ? nodeKey.instanceKeys[0].id : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n /** Changes category display in the viewport */\r\n public static enableCategory(viewManager: ViewManager, imodel: IModelConnection, ids: string[], enabled: boolean, forAllViewports: boolean, enableAllSubCategories = true) {\r\n if (!viewManager.selectedView)\r\n return;\r\n\r\n const updateViewport = (vp: Viewport) => {\r\n // Only act on viewports that are both 3D or both 2D. Important if we have multiple viewports opened and we\r\n // are using 'allViewports' property\r\n if (viewManager.selectedView && viewManager.selectedView.view.is3d() === vp.view.is3d()) {\r\n vp.changeCategoryDisplay(ids, enabled, enableAllSubCategories);\r\n\r\n // remove category overrides per model\r\n const modelsContainingOverrides: string[] = [];\r\n for (const ovr of vp.perModelCategoryVisibility) {\r\n // istanbul ignore else\r\n if (ids.findIndex((id) => id === ovr.categoryId) !== -1)\r\n modelsContainingOverrides.push(ovr.modelId);\r\n }\r\n vp.perModelCategoryVisibility.setOverride(modelsContainingOverrides, ids, PerModelCategoryVisibility.Override.None);\r\n\r\n // changeCategoryDisplay only enables subcategories, it does not disabled them. So we must do that ourselves.\r\n if (false === enabled) {\r\n ids.forEach((id) => {\r\n const subCategoryIds = imodel.subcategories.getSubCategories(id);\r\n // istanbul ignore else\r\n if (subCategoryIds) {\r\n subCategoryIds.forEach((subCategoryId) => CategoryVisibilityHandler.enableSubCategory(viewManager, subCategoryId, false, forAllViewports));\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n // This property let us act on all viewports or just on the selected one, configurable by the app\r\n if (forAllViewports) {\r\n for (const viewport of viewManager) {\r\n updateViewport(viewport);\r\n }\r\n } else {\r\n updateViewport(viewManager.selectedView);\r\n }\r\n }\r\n\r\n /** Changes subcategory display in the viewport */\r\n public static enableSubCategory(viewManager: ViewManager, key: string, enabled: boolean, forAllViewports?: boolean) {\r\n if (!viewManager.selectedView)\r\n return;\r\n\r\n const updateViewport = (vp: Viewport) => {\r\n // Only act on viewports that are both 3D or both 2D. Important if we have multiple viewports opened and we\r\n // are using 'allViewports' property\r\n if (viewManager.selectedView && viewManager.selectedView.view.is3d() === vp.view.is3d()) {\r\n vp.changeSubCategoryDisplay(key, enabled);\r\n }\r\n };\r\n\r\n // This property let us act on all viewports or just on the selected one, configurable by the app\r\n if (forAllViewports) {\r\n for (const viewport of viewManager) {\r\n updateViewport(viewport);\r\n }\r\n } else {\r\n updateViewport(viewManager.selectedView);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -16,6 +16,7 @@ export declare const RULESET_MODELS: Ruleset;
|
|
|
16
16
|
export declare const RULESET_MODELS_GROUPED_BY_CLASS: Ruleset;
|
|
17
17
|
/** Props for [[ModelsTree]] component
|
|
18
18
|
* @public
|
|
19
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
19
20
|
*/
|
|
20
21
|
export interface ModelsTreeProps {
|
|
21
22
|
/**
|
|
@@ -78,6 +79,7 @@ export interface ModelsTreeProps {
|
|
|
78
79
|
* hierarchy along with checkboxes that represent and allow changing
|
|
79
80
|
* the display of those instances.
|
|
80
81
|
* @public
|
|
82
|
+
* @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
|
|
81
83
|
*/
|
|
82
84
|
export declare function ModelsTree(props: ModelsTreeProps): JSX.Element;
|
|
83
85
|
//# sourceMappingURL=ModelsTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"ModelsTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAIA;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