@itwin/appui-react 3.0.0-extension.0 → 3.1.0-dev.11
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 +80 -1
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/lib/cjs/appui-react/UiFramework.d.ts +37 -22
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +53 -38
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts +3 -3
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +3 -3
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/Calculator.js +1 -1
- package/lib/cjs/appui-react/accudraw/Calculator.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.d.ts +4 -4
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js +5 -4
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.d.ts +0 -4
- package/lib/cjs/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.js +0 -1
- package/lib/cjs/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts +2 -0
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.js +26 -8
- package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.d.ts +2 -2
- 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/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 +5 -5
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js +3 -3
- package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
- package/lib/cjs/appui-react/backstage/CommandLaunch.d.ts +2 -0
- package/lib/cjs/appui-react/backstage/CommandLaunch.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/CommandLaunch.js +1 -0
- package/lib/cjs/appui-react/backstage/CommandLaunch.js.map +1 -1
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.d.ts +4 -0
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.js +5 -6
- package/lib/cjs/appui-react/backstage/FrontstageLaunch.js.map +1 -1
- package/lib/cjs/appui-react/backstage/Separator.d.ts +1 -0
- package/lib/cjs/appui-react/backstage/Separator.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/Separator.js +3 -2
- package/lib/cjs/appui-react/backstage/Separator.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts +1 -1
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.js +4 -5
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts +10 -3
- package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.js +15 -2
- package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts +7 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.js +13 -3
- package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +10 -2
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +47 -39
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.scss +27 -27
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts +8 -1
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +49 -25
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +73 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/cjs/appui-react/content/IModelViewport.d.ts +13 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +18 -5
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/{SavedViewLayout.d.ts → StageContentLayout.d.ts} +11 -11
- package/lib/cjs/appui-react/content/StageContentLayout.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/{SavedViewLayout.js → StageContentLayout.js} +19 -17
- package/lib/cjs/appui-react/content/StageContentLayout.js.map +1 -0
- package/lib/cjs/appui-react/content/{SavedView.d.ts → ViewStateHelper.d.ts} +7 -7
- package/lib/cjs/appui-react/content/ViewStateHelper.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/{SavedView.js → ViewStateHelper.js} +4 -4
- package/lib/cjs/appui-react/content/ViewStateHelper.js.map +1 -0
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js +24 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/split-pane/Pane.d.ts +21 -0
- package/lib/cjs/appui-react/content/split-pane/Pane.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/Pane.js +43 -0
- package/lib/cjs/appui-react/content/split-pane/Pane.js.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/Resizer.d.ts +23 -0
- package/lib/cjs/appui-react/content/split-pane/Resizer.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/Resizer.js +39 -0
- package/lib/cjs/appui-react/content/split-pane/Resizer.js.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts +70 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js +243 -0
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -0
- package/lib/cjs/appui-react/cursor/CursorInformation.d.ts +1 -2
- package/lib/cjs/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.js +1 -1
- package/lib/cjs/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js +3 -3
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js +72 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js +148 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js +2 -2
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/cjs/appui-react/dialog/StandardMessageBox.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/StandardMessageBox.js +3 -0
- package/lib/cjs/appui-react/dialog/StandardMessageBox.js.map +1 -1
- package/lib/cjs/appui-react/dragdrop/ZoneTargets.d.ts.map +1 -1
- package/lib/cjs/appui-react/dragdrop/ZoneTargets.js +8 -4
- package/lib/cjs/appui-react/dragdrop/ZoneTargets.js.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts +2 -2
- package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.js +4 -2
- package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/Frontstage.d.ts +1 -0
- package/lib/cjs/appui-react/frontstage/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/Frontstage.js +32 -13
- package/lib/cjs/appui-react/frontstage/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.d.ts +3 -0
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.js +15 -1
- package/lib/cjs/appui-react/frontstage/FrontstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +19 -2
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +168 -6
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js +2 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts +6 -0
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useActiveViewport.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.d.ts +12 -9
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.d.ts.map +1 -1
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.js +19 -21
- package/lib/cjs/appui-react/hooks/useFrameworkVersion.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.js +6 -7
- package/lib/cjs/appui-react/imodel-components/VisibilityTreeEventHandler.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts +3 -3
- 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 +1 -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 +0 -5
- 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.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts +1 -1
- 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 +81 -68
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcutMenu.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 +3 -2
- package/lib/cjs/appui-react/keyinbrowser/KeyinBrowser.js.map +1 -1
- package/lib/cjs/appui-react/messages/AppNotificationManager.d.ts +1 -1
- package/lib/cjs/appui-react/messages/AppNotificationManager.js +1 -1
- package/lib/cjs/appui-react/messages/AppNotificationManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.d.ts +1 -2
- package/lib/cjs/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +15 -9
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/Pointer.d.ts +2 -2
- package/lib/cjs/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/cjs/appui-react/messages/Pointer.js +4 -3
- package/lib/cjs/appui-react/messages/Pointer.js.map +1 -1
- package/lib/cjs/appui-react/messages/ToastMessage.js +2 -1
- package/lib/cjs/appui-react/messages/ToastMessage.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js +2 -2
- package/lib/cjs/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js +6 -4
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ListPicker.d.ts +3 -0
- package/lib/cjs/appui-react/pickers/ListPicker.d.ts.map +1 -1
- package/lib/cjs/appui-react/pickers/ListPicker.js +24 -9
- package/lib/cjs/appui-react/pickers/ListPicker.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +9 -9
- package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.d.ts +7 -4
- package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.js +3 -2
- package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.scss +3 -1
- package/lib/cjs/appui-react/popup/InputEditorPopup.d.ts +3 -2
- package/lib/cjs/appui-react/popup/InputEditorPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/InputEditorPopup.js +1 -1
- package/lib/cjs/appui-react/popup/InputEditorPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +6 -6
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.d.ts +3 -2
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.d.ts +10 -10
- package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.js +4 -4
- package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/cjs/appui-react/popup/PositionPopup.d.ts +5 -3
- package/lib/cjs/appui-react/popup/PositionPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/PositionPopup.js +3 -2
- package/lib/cjs/appui-react/popup/PositionPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.d.ts +3 -2
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.js +1 -1
- package/lib/cjs/appui-react/popup/ToolSettingsPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.d.ts +4 -3
- package/lib/cjs/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.js +2 -2
- package/lib/cjs/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/cjs/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/cjs/appui-react/redux/SessionState.d.ts +0 -6
- package/lib/cjs/appui-react/redux/SessionState.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/SessionState.js +0 -8
- package/lib/cjs/appui-react/redux/SessionState.js.map +1 -1
- package/lib/cjs/appui-react/redux/StateManager.d.ts +1 -1
- package/lib/cjs/appui-react/redux/StateManager.js.map +1 -1
- package/lib/cjs/appui-react/selection/HideIsolateEmphasizeManager.js +7 -7
- package/lib/cjs/appui-react/selection/HideIsolateEmphasizeManager.js.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/UnitSystemSelector.d.ts.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/UnitSystemSelector.js +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/UnitSystemSelector.js.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js +28 -19
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/shared/CustomItemDef.js.map +1 -1
- package/lib/cjs/appui-react/shared/CustomItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/GroupItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/ItemDefBase.d.ts +2 -2
- package/lib/cjs/appui-react/shared/ItemDefBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ItemDefBase.js +1 -1
- package/lib/cjs/appui-react/shared/ItemDefBase.js.map +1 -1
- package/lib/cjs/appui-react/shared/ItemProps.d.ts +2 -2
- package/lib/cjs/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/ToolItemDef.d.ts +1 -1
- package/lib/cjs/appui-react/shared/ToolItemDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ToolItemDef.js +2 -2
- package/lib/cjs/appui-react/shared/ToolItemDef.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/FrameworkStagePanel.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/FrameworkStagePanel.js +1 -0
- package/lib/cjs/appui-react/stagepanels/FrameworkStagePanel.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanel.d.ts +2 -2
- package/lib/cjs/appui-react/stagepanels/StagePanel.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanel.js +1 -0
- package/lib/cjs/appui-react/stagepanels/StagePanel.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +26 -2
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +24 -3
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.d.ts +2 -2
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.js +2 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelHeader.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.js +2 -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 +17 -5
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.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/statusfields/Indicator.d.ts +15 -14
- package/lib/cjs/appui-react/statusfields/Indicator.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.js +23 -21
- package/lib/cjs/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.scss +29 -18
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +2 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts +1 -0
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +6 -4
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.scss +13 -3
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +2 -10
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +4 -34
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts +0 -6
- package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js +1 -25
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +7 -7
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +13 -12
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +8 -3
- package/lib/cjs/appui-react/syncui/BooleanListener.d.ts +2 -2
- package/lib/cjs/appui-react/syncui/BooleanListener.d.ts.map +1 -1
- package/lib/cjs/appui-react/syncui/BooleanListener.js +2 -1
- package/lib/cjs/appui-react/syncui/BooleanListener.js.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts +8 -18
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +30 -103
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ActionButtonItem.js +2 -1
- package/lib/cjs/appui-react/toolbar/ActionButtonItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ActionItemButton.js +2 -1
- package/lib/cjs/appui-react/toolbar/ActionItemButton.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.js +24 -20
- package/lib/cjs/appui-react/toolbar/GroupButtonItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/GroupItem.js +33 -29
- package/lib/cjs/appui-react/toolbar/GroupItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolButton.js +3 -2
- package/lib/cjs/appui-react/toolbar/ToolButton.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.js +3 -2
- package/lib/cjs/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +22 -20
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +4 -4
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.d.ts +2 -2
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.js +2 -2
- package/lib/cjs/appui-react/tools/MarkupToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +8 -10
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +17 -36
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +7 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +12 -20
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +7 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +39 -50
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/DefaultDialogGridContainer.scss +4 -4
- package/lib/{esm/appui-react/uisettings → cjs/appui-react/uistate}/AppUiSettings.d.ts +11 -9
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -0
- package/lib/cjs/appui-react/{uisettings → uistate}/AppUiSettings.js +12 -8
- package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -0
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.d.ts +15 -0
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.d.ts.map +1 -0
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.js +59 -0
- package/lib/cjs/appui-react/uistate/UserSettingsStorage.js.map +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts +20 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.d.ts.map +1 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js +38 -0
- package/lib/cjs/appui-react/uistate/useUiStateStorage.js.map +1 -0
- package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts +5 -5
- package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/utils/UiShowHideManager.js +8 -8
- package/lib/cjs/appui-react/utils/UiShowHideManager.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js +1 -4
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +98 -8
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +92 -97
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.d.ts +22 -0
- package/lib/cjs/appui-react/widgets/BackstageAppButton.d.ts.map +1 -0
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js +56 -0
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js.map +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js +3 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts +9 -0
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +10 -0
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidget.js +2 -1
- package/lib/cjs/appui-react/widgets/NavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +1 -0
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.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/ToolSettingsContent.js +2 -1
- package/lib/cjs/appui-react/widgets/ToolSettingsContent.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidget.js +3 -2
- package/lib/cjs/appui-react/widgets/ToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts +0 -12
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js +1 -36
- package/lib/cjs/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.d.ts +1 -0
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.js +5 -2
- package/lib/cjs/appui-react/widgets/ToolbarWidgetBase.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +0 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +2 -3
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +18 -7
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.js +1 -0
- package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetStack.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetStack.js +2 -0
- package/lib/cjs/appui-react/widgets/WidgetStack.js.map +1 -1
- package/lib/cjs/appui-react/zones/FrameworkZone.js.map +1 -1
- package/lib/cjs/appui-react/zones/StatusBarZone.js.map +1 -1
- package/lib/cjs/appui-react/zones/Zone.d.ts +1 -1
- package/lib/cjs/appui-react/zones/Zone.d.ts.map +1 -1
- package/lib/cjs/appui-react/zones/Zone.js +2 -1
- package/lib/cjs/appui-react/zones/Zone.js.map +1 -1
- package/lib/cjs/appui-react/zones/ZoneDef.d.ts +4 -4
- package/lib/cjs/appui-react/zones/ZoneDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/zones/ZoneDef.js +5 -4
- package/lib/cjs/appui-react/zones/ZoneDef.js.map +1 -1
- package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
- package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js +3 -2
- package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
- package/lib/cjs/appui-react/zones/toolsettings/ToolSettingsZone.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +18 -18
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +18 -18
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +37 -22
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +52 -37
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts +3 -3
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +3 -3
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/accudraw/Calculator.js +1 -1
- package/lib/esm/appui-react/accudraw/Calculator.js.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.d.ts +4 -4
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js +6 -5
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.d.ts +0 -4
- package/lib/esm/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.js +0 -1
- package/lib/esm/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts +2 -0
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.js +27 -9
- package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.d.ts +2 -2
- 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/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 +5 -5
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.js +3 -3
- package/lib/esm/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
- package/lib/esm/appui-react/backstage/CommandLaunch.d.ts +2 -0
- package/lib/esm/appui-react/backstage/CommandLaunch.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/CommandLaunch.js +1 -0
- package/lib/esm/appui-react/backstage/CommandLaunch.js.map +1 -1
- package/lib/esm/appui-react/backstage/FrontstageLaunch.d.ts +4 -0
- package/lib/esm/appui-react/backstage/FrontstageLaunch.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/FrontstageLaunch.js +5 -6
- package/lib/esm/appui-react/backstage/FrontstageLaunch.js.map +1 -1
- package/lib/esm/appui-react/backstage/Separator.d.ts +1 -0
- package/lib/esm/appui-react/backstage/Separator.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/Separator.js +3 -2
- package/lib/esm/appui-react/backstage/Separator.js.map +1 -1
- package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts +1 -1
- package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/ChildWindowManager.js +4 -5
- package/lib/esm/appui-react/childwindow/ChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/state.d.ts +10 -3
- package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/state.js +15 -2
- package/lib/esm/appui-react/configurableui/state.js.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts +7 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.js +11 -2
- package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +10 -2
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +44 -37
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.scss +27 -27
- package/lib/esm/appui-react/content/ContentViewManager.d.ts +8 -1
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +47 -23
- package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js +69 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/esm/appui-react/content/IModelViewport.d.ts +13 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +16 -4
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/{SavedViewLayout.d.ts → StageContentLayout.d.ts} +11 -11
- package/lib/esm/appui-react/content/StageContentLayout.d.ts.map +1 -0
- package/lib/esm/appui-react/content/{SavedViewLayout.js → StageContentLayout.js} +17 -15
- package/lib/esm/appui-react/content/StageContentLayout.js.map +1 -0
- package/lib/esm/appui-react/content/{SavedView.d.ts → ViewStateHelper.d.ts} +7 -7
- package/lib/esm/appui-react/content/ViewStateHelper.d.ts.map +1 -0
- package/lib/esm/appui-react/content/{SavedView.js → ViewStateHelper.js} +2 -2
- package/lib/esm/appui-react/content/ViewStateHelper.js.map +1 -0
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js +23 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/split-pane/Pane.d.ts +21 -0
- package/lib/esm/appui-react/content/split-pane/Pane.d.ts.map +1 -0
- package/lib/esm/appui-react/content/split-pane/Pane.js +39 -0
- package/lib/esm/appui-react/content/split-pane/Pane.js.map +1 -0
- package/lib/esm/appui-react/content/split-pane/Resizer.d.ts +23 -0
- package/lib/esm/appui-react/content/split-pane/Resizer.d.ts.map +1 -0
- package/lib/esm/appui-react/content/split-pane/Resizer.js +35 -0
- package/lib/esm/appui-react/content/split-pane/Resizer.js.map +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts +70 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.d.ts.map +1 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.js +239 -0
- package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -0
- package/lib/esm/appui-react/cursor/CursorInformation.d.ts +1 -2
- package/lib/esm/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/CursorInformation.js +2 -2
- package/lib/esm/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +2 -2
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js +2 -2
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js +67 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js +142 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/esm/appui-react/dialog/StandardMessageBox.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/StandardMessageBox.js +3 -0
- package/lib/esm/appui-react/dialog/StandardMessageBox.js.map +1 -1
- package/lib/esm/appui-react/dragdrop/ZoneTargets.d.ts.map +1 -1
- package/lib/esm/appui-react/dragdrop/ZoneTargets.js +8 -4
- package/lib/esm/appui-react/dragdrop/ZoneTargets.js.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.d.ts +2 -2
- package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.js +4 -2
- package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/esm/appui-react/frontstage/Frontstage.d.ts +1 -0
- package/lib/esm/appui-react/frontstage/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/Frontstage.js +32 -13
- package/lib/esm/appui-react/frontstage/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageComposer.d.ts +3 -0
- package/lib/esm/appui-react/frontstage/FrontstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageComposer.js +15 -1
- package/lib/esm/appui-react/frontstage/FrontstageComposer.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +19 -2
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +170 -8
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js +2 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts +6 -0
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useActiveIModelConnection.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useActiveIModelConnection.js.map +1 -1
- package/lib/esm/appui-react/hooks/useActiveViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useActiveViewport.js.map +1 -1
- package/lib/esm/appui-react/hooks/useFrameworkVersion.d.ts +12 -9
- package/lib/esm/appui-react/hooks/useFrameworkVersion.d.ts.map +1 -1
- package/lib/esm/appui-react/hooks/useFrameworkVersion.js +19 -21
- package/lib/esm/appui-react/hooks/useFrameworkVersion.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.js +6 -7
- package/lib/esm/appui-react/imodel-components/VisibilityTreeEventHandler.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts +3 -3
- 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 +1 -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 +0 -5
- 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.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts +1 -1
- 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 +83 -70
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts +2 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.js +2 -2
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcutMenu.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 +3 -2
- package/lib/esm/appui-react/keyinbrowser/KeyinBrowser.js.map +1 -1
- package/lib/esm/appui-react/messages/AppNotificationManager.d.ts +1 -1
- package/lib/esm/appui-react/messages/AppNotificationManager.js +1 -1
- package/lib/esm/appui-react/messages/AppNotificationManager.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.d.ts +1 -2
- package/lib/esm/appui-react/messages/MessageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +9 -3
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/messages/Pointer.d.ts +2 -2
- package/lib/esm/appui-react/messages/Pointer.d.ts.map +1 -1
- package/lib/esm/appui-react/messages/Pointer.js +4 -3
- package/lib/esm/appui-react/messages/Pointer.js.map +1 -1
- package/lib/esm/appui-react/messages/ToastMessage.js +2 -1
- package/lib/esm/appui-react/messages/ToastMessage.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js +1 -1
- package/lib/esm/appui-react/navigationaids/NavigationAidControl.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts +2 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +2 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js +6 -4
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/esm/appui-react/pickers/ListPicker.d.ts +3 -0
- package/lib/esm/appui-react/pickers/ListPicker.d.ts.map +1 -1
- package/lib/esm/appui-react/pickers/ListPicker.js +23 -9
- package/lib/esm/appui-react/pickers/ListPicker.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.d.ts.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +7 -7
- package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.d.ts +7 -4
- package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.js +3 -2
- package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.scss +3 -1
- package/lib/esm/appui-react/popup/InputEditorPopup.d.ts +3 -2
- package/lib/esm/appui-react/popup/InputEditorPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/InputEditorPopup.js +1 -1
- package/lib/esm/appui-react/popup/InputEditorPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js +7 -7
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.d.ts +3 -2
- package/lib/esm/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.d.ts +10 -10
- package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.js +5 -5
- package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/esm/appui-react/popup/PositionPopup.d.ts +5 -3
- package/lib/esm/appui-react/popup/PositionPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/PositionPopup.js +3 -2
- package/lib/esm/appui-react/popup/PositionPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/ToolSettingsPopup.d.ts +3 -2
- package/lib/esm/appui-react/popup/ToolSettingsPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/ToolSettingsPopup.js +1 -1
- package/lib/esm/appui-react/popup/ToolSettingsPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.d.ts +4 -3
- package/lib/esm/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.js +2 -2
- package/lib/esm/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/esm/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/esm/appui-react/redux/SessionState.d.ts +0 -6
- package/lib/esm/appui-react/redux/SessionState.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/SessionState.js +0 -8
- package/lib/esm/appui-react/redux/SessionState.js.map +1 -1
- package/lib/esm/appui-react/redux/StateManager.d.ts +1 -1
- package/lib/esm/appui-react/redux/StateManager.js.map +1 -1
- package/lib/esm/appui-react/selection/HideIsolateEmphasizeManager.js +7 -7
- package/lib/esm/appui-react/selection/HideIsolateEmphasizeManager.js.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/UnitSystemSelector.d.ts.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/UnitSystemSelector.js +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/UnitSystemSelector.js.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js +28 -19
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/shared/CustomItemDef.js.map +1 -1
- package/lib/esm/appui-react/shared/CustomItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/GroupItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/ItemDefBase.d.ts +2 -2
- package/lib/esm/appui-react/shared/ItemDefBase.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ItemDefBase.js +1 -1
- package/lib/esm/appui-react/shared/ItemDefBase.js.map +1 -1
- package/lib/esm/appui-react/shared/ItemProps.d.ts +2 -2
- package/lib/esm/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/ToolItemDef.d.ts +1 -1
- package/lib/esm/appui-react/shared/ToolItemDef.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ToolItemDef.js +2 -2
- package/lib/esm/appui-react/shared/ToolItemDef.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/FrameworkStagePanel.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/FrameworkStagePanel.js +1 -0
- package/lib/esm/appui-react/stagepanels/FrameworkStagePanel.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanel.d.ts +2 -2
- package/lib/esm/appui-react/stagepanels/StagePanel.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanel.js +1 -0
- package/lib/esm/appui-react/stagepanels/StagePanel.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +26 -2
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +24 -3
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.d.ts +2 -2
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.js +2 -1
- package/lib/esm/appui-react/stagepanels/StagePanelHeader.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.js +2 -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 +17 -5
- package/lib/esm/appui-react/statusbar/StatusBarComposer.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/statusfields/Indicator.d.ts +15 -14
- package/lib/esm/appui-react/statusfields/Indicator.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.js +23 -21
- package/lib/esm/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.scss +29 -18
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +2 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts +1 -0
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +6 -4
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.scss +13 -3
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts +2 -10
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +5 -35
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts +0 -6
- package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.js +2 -26
- package/lib/esm/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +7 -7
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +14 -13
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.scss +8 -3
- package/lib/esm/appui-react/syncui/BooleanListener.d.ts +2 -2
- package/lib/esm/appui-react/syncui/BooleanListener.d.ts.map +1 -1
- package/lib/esm/appui-react/syncui/BooleanListener.js +2 -1
- package/lib/esm/appui-react/syncui/BooleanListener.js.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts +8 -18
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +29 -101
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ActionButtonItem.js +2 -1
- package/lib/esm/appui-react/toolbar/ActionButtonItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ActionItemButton.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ActionItemButton.js +2 -1
- package/lib/esm/appui-react/toolbar/ActionItemButton.js.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupButtonItem.js +24 -20
- package/lib/esm/appui-react/toolbar/GroupButtonItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupItem.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/GroupItem.js +33 -29
- package/lib/esm/appui-react/toolbar/GroupItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolButton.js +3 -2
- package/lib/esm/appui-react/toolbar/ToolButton.js.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.js +3 -2
- package/lib/esm/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js +22 -20
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +4 -4
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.d.ts +2 -2
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.js +2 -2
- package/lib/esm/appui-react/tools/MarkupToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +8 -10
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +18 -37
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +7 -9
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +13 -21
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +7 -9
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +40 -51
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/DefaultDialogGridContainer.scss +4 -4
- package/lib/{cjs/appui-react/uisettings → esm/appui-react/uistate}/AppUiSettings.d.ts +11 -9
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -0
- package/lib/esm/appui-react/{uisettings → uistate}/AppUiSettings.js +13 -9
- package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -0
- package/lib/esm/appui-react/uistate/UserSettingsStorage.d.ts +15 -0
- package/lib/esm/appui-react/uistate/UserSettingsStorage.d.ts.map +1 -0
- package/lib/esm/appui-react/uistate/UserSettingsStorage.js +55 -0
- package/lib/esm/appui-react/uistate/UserSettingsStorage.js.map +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts +20 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.d.ts.map +1 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.js +33 -0
- package/lib/esm/appui-react/uistate/useUiStateStorage.js.map +1 -0
- package/lib/esm/appui-react/utils/UiShowHideManager.d.ts +5 -5
- package/lib/esm/appui-react/utils/UiShowHideManager.d.ts.map +1 -1
- package/lib/esm/appui-react/utils/UiShowHideManager.js +9 -9
- package/lib/esm/appui-react/utils/UiShowHideManager.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js +1 -4
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +98 -8
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +92 -96
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.d.ts +22 -0
- package/lib/esm/appui-react/widgets/BackstageAppButton.d.ts.map +1 -0
- package/lib/esm/appui-react/widgets/BackstageAppButton.js +52 -0
- package/lib/esm/appui-react/widgets/BackstageAppButton.js.map +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -0
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js +3 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts +9 -0
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +10 -0
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidget.js +2 -1
- package/lib/esm/appui-react/widgets/NavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +1 -0
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.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/ToolSettingsContent.js +2 -1
- package/lib/esm/appui-react/widgets/ToolSettingsContent.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidget.js +3 -2
- package/lib/esm/appui-react/widgets/ToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts +0 -12
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js +2 -36
- package/lib/esm/appui-react/widgets/ToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.d.ts +1 -0
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.js +5 -2
- package/lib/esm/appui-react/widgets/ToolbarWidgetBase.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +0 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +2 -3
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +18 -7
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.js +1 -0
- package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetStack.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetStack.js +2 -0
- package/lib/esm/appui-react/widgets/WidgetStack.js.map +1 -1
- package/lib/esm/appui-react/zones/FrameworkZone.js.map +1 -1
- package/lib/esm/appui-react/zones/StatusBarZone.js.map +1 -1
- package/lib/esm/appui-react/zones/Zone.d.ts +1 -1
- package/lib/esm/appui-react/zones/Zone.d.ts.map +1 -1
- package/lib/esm/appui-react/zones/Zone.js +2 -1
- package/lib/esm/appui-react/zones/Zone.js.map +1 -1
- package/lib/esm/appui-react/zones/ZoneDef.d.ts +4 -4
- package/lib/esm/appui-react/zones/ZoneDef.d.ts.map +1 -1
- package/lib/esm/appui-react/zones/ZoneDef.js +5 -4
- package/lib/esm/appui-react/zones/ZoneDef.js.map +1 -1
- package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts +1 -2
- package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js +2 -1
- package/lib/esm/appui-react/zones/toolsettings/ToolSettingsManager.js.map +1 -1
- package/lib/esm/appui-react/zones/toolsettings/ToolSettingsZone.js.map +1 -1
- package/lib/esm/appui-react.d.ts +18 -18
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +18 -18
- package/lib/esm/appui-react.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +9 -2
- package/package.json +46 -53
- package/lib/cjs/appui-react/UserInfo.d.ts +0 -58
- package/lib/cjs/appui-react/UserInfo.d.ts.map +0 -1
- package/lib/cjs/appui-react/UserInfo.js +0 -34
- package/lib/cjs/appui-react/UserInfo.js.map +0 -1
- package/lib/cjs/appui-react/content/SavedView.d.ts.map +0 -1
- package/lib/cjs/appui-react/content/SavedView.js.map +0 -1
- package/lib/cjs/appui-react/content/SavedViewLayout.d.ts.map +0 -1
- package/lib/cjs/appui-react/content/SavedViewLayout.js.map +0 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelEnums.d.ts +0 -25
- package/lib/cjs/appui-react/stagepanels/StagePanelEnums.d.ts.map +0 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelEnums.js +0 -34
- package/lib/cjs/appui-react/stagepanels/StagePanelEnums.js.map +0 -1
- package/lib/cjs/appui-react/uisettings/AppUiSettings.d.ts.map +0 -1
- package/lib/cjs/appui-react/uisettings/AppUiSettings.js.map +0 -1
- package/lib/cjs/appui-react/uisettings/UserSettingsStorage.d.ts +0 -23
- package/lib/cjs/appui-react/uisettings/UserSettingsStorage.d.ts.map +0 -1
- package/lib/cjs/appui-react/uisettings/UserSettingsStorage.js +0 -74
- package/lib/cjs/appui-react/uisettings/UserSettingsStorage.js.map +0 -1
- package/lib/cjs/appui-react/uisettings/useUiSettings.d.ts +0 -21
- package/lib/cjs/appui-react/uisettings/useUiSettings.d.ts.map +0 -1
- package/lib/cjs/appui-react/uisettings/useUiSettings.js +0 -28
- package/lib/cjs/appui-react/uisettings/useUiSettings.js.map +0 -1
- package/lib/esm/appui-react/UserInfo.d.ts +0 -58
- package/lib/esm/appui-react/UserInfo.d.ts.map +0 -1
- package/lib/esm/appui-react/UserInfo.js +0 -30
- package/lib/esm/appui-react/UserInfo.js.map +0 -1
- package/lib/esm/appui-react/content/SavedView.d.ts.map +0 -1
- package/lib/esm/appui-react/content/SavedView.js.map +0 -1
- package/lib/esm/appui-react/content/SavedViewLayout.d.ts.map +0 -1
- package/lib/esm/appui-react/content/SavedViewLayout.js.map +0 -1
- package/lib/esm/appui-react/stagepanels/StagePanelEnums.d.ts +0 -25
- package/lib/esm/appui-react/stagepanels/StagePanelEnums.d.ts.map +0 -1
- package/lib/esm/appui-react/stagepanels/StagePanelEnums.js +0 -31
- package/lib/esm/appui-react/stagepanels/StagePanelEnums.js.map +0 -1
- package/lib/esm/appui-react/uisettings/AppUiSettings.d.ts.map +0 -1
- package/lib/esm/appui-react/uisettings/AppUiSettings.js.map +0 -1
- package/lib/esm/appui-react/uisettings/UserSettingsStorage.d.ts +0 -23
- package/lib/esm/appui-react/uisettings/UserSettingsStorage.d.ts.map +0 -1
- package/lib/esm/appui-react/uisettings/UserSettingsStorage.js +0 -68
- package/lib/esm/appui-react/uisettings/UserSettingsStorage.js.map +0 -1
- package/lib/esm/appui-react/uisettings/useUiSettings.d.ts +0 -21
- package/lib/esm/appui-react/uisettings/useUiSettings.d.ts.map +0 -1
- package/lib/esm/appui-react/uisettings/useUiSettings.js +0 -23
- package/lib/esm/appui-react/uisettings/useUiSettings.js.map +0 -1
|
@@ -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;AAG5D,OAAO,EAAE,gCAAgC,EAA0C,MAAM,gCAAgC,CAAC;AAC1H,OAAO,EAC8B,gBAAgB,GAEpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA2CjE;;;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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AAC,CAAC;QAC/C,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAEO,kBAAkB,CAAC,MAAwB;QACjD,OAAO;YACL,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC;YAC7C,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;YACtC,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,MAAM,CAAC,OAAO;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\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 { BeEvent, IDisposable } from \"@itwin/core-bentley\";\r\nimport { NodeKey } from \"@itwin/presentation-common\";\r\nimport { UnifiedSelectionTreeEventHandler, UnifiedSelectionTreeEventHandlerParams } from \"@itwin/presentation-components\";\r\nimport {\r\n CheckBoxInfo, CheckboxStateChange, toRxjsObservable, TreeCheckboxStateChangeEventArgs, TreeModelNode, TreeNodeItem,\r\n TreeSelectionModificationEventArgs, TreeSelectionReplacementEventArgs,\r\n} from \"@itwin/components-react\";\r\nimport { CheckBoxState, isPromiseLike } from \"@itwin/core-react\";\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 for (const nodeId of affectedNodes) {\r\n const node = this.modelSource.getModel().getNode(nodeId);\r\n // istanbul ignore if\r\n if (!node)\r\n continue;\r\n\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,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,IAA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AC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAEpI,IAAI,aAAa,CAAC,MAAM,CAAC;YACvB,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAEO,kBAAkB,CAAC,MAAwB;QACjD,OAAO;YACL,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC;YAC7C,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;YACtC,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,MAAM,CAAC,OAAO;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\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"]}
|
|
@@ -15,13 +15,13 @@ export declare function useCategories(viewManager: ViewManager, imodel: IModelCo
|
|
|
15
15
|
export declare function loadCategoriesFromViewport(iModel?: IModelConnection, vp?: Viewport): Promise<Category[]>;
|
|
16
16
|
/**
|
|
17
17
|
* Data structure that describes category.
|
|
18
|
-
* @
|
|
18
|
+
* @alpha
|
|
19
19
|
*/
|
|
20
20
|
export interface Category {
|
|
21
21
|
key: string;
|
|
22
22
|
children?: string[];
|
|
23
23
|
}
|
|
24
|
-
/** @
|
|
24
|
+
/** @alpha */
|
|
25
25
|
export interface CategoryVisibilityHandlerParams {
|
|
26
26
|
viewManager: ViewManager;
|
|
27
27
|
imodel: IModelConnection;
|
|
@@ -29,7 +29,7 @@ export interface CategoryVisibilityHandlerParams {
|
|
|
29
29
|
activeView?: Viewport;
|
|
30
30
|
allViewports?: boolean;
|
|
31
31
|
}
|
|
32
|
-
/** @
|
|
32
|
+
/** @alpha */
|
|
33
33
|
export declare class CategoryVisibilityHandler implements IVisibilityHandler {
|
|
34
34
|
private _viewManager;
|
|
35
35
|
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;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAA8B,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAI/G;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,QAAQ,cAIhG;AAED,gBAAgB;AAChB,wBAAsB,0BAA0B,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,EAAE,CAAC,EAAE,QAAQ,uBAuBxF;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,
|
|
1
|
+
{"version":3,"file":"CategoryVisibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C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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"}
|
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,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;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":["/*---------------------------------------------------------------------------------------------\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 { 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);\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 * @internal\r\n */\r\nexport interface Category {\r\n key: string;\r\n children?: string[];\r\n}\r\n\r\n/** @internal */\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/** @internal */\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,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,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;I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wBACvB,IAAI,cAAc,EAAE;4BAClB,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;yBAC5I;oBACH,CAAC,CAAC,CAAC;iBACJ;aACF;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;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 { 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);\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"]}
|
|
@@ -35,11 +35,6 @@ export interface ModelsTreeProps {
|
|
|
35
35
|
* @alpha
|
|
36
36
|
*/
|
|
37
37
|
selectionPredicate?: ModelsTreeSelectionPredicate;
|
|
38
|
-
/**
|
|
39
|
-
* Start loading hierarchy as soon as the component is created
|
|
40
|
-
* @deprecated Going to be removed due to too high pressure on the backend
|
|
41
|
-
*/
|
|
42
|
-
enablePreloading?: boolean;
|
|
43
38
|
/**
|
|
44
39
|
* Active view used to determine and control visibility
|
|
45
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAW,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACkC,6BAA6B,EACrE,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAkB,aAAa,EAA8B,MAAM,yBAAyB,CAAC;AAGpG,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAG1E,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIlG,gBAAgB;AAChB,eAAO,MAAM,cAAc,EAAE,OAAqC,CAAC;AACnE,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,OAAoD,CAAC;AAInG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IACzB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAClD
|
|
1
|
+
{"version":3,"file":"ModelsTree.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAW,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACkC,6BAA6B,EACrE,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAkB,aAAa,EAA8B,MAAM,yBAAyB,CAAC;AAGpG,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAG1E,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIlG,gBAAgB;AAChB,eAAO,MAAM,cAAc,EAAE,OAAqC,CAAC;AACnE,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,OAAoD,CAAC;AAInG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IACzB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAClD;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC3C;;;OAGG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,oBAAoB,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACtG;;;OAGG;IACH,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;IAClD;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAqDhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTree.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACiE,6BAA6B,GACpG,MAAM,gCAAgC,CA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E;QAC5E,OAAO,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC;IACpH,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAE5E,MAAM,OAAO,GAAG,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,wBAAwB,CAAC;IAE9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IACnE,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAEpC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,uBAAuB,GAAG,CAAC,SAAiB,EAAE,UAAqB,EAAE,0BAAoC,EAAuC,EAAE;IACtJ,uBAAuB;IACvB,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,uBAAuB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/H,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,YAAmF,EAAyD,EAAE;IAC5K,MAAM,gBAAgB,GAAG,YAAqD,CAAC;IAC/E,OAAO,gBAAgB,CAAC,iBAAiB,KAAK,SAAS,IAAI,gBAAgB,CAAC,cAAc,KAAK,SAAS,IAAI,gBAAgB,CAAC,qBAAqB,KAAK,SAAS,CAAC;AACnK,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,YAAmF,EAAqD,EAAE;IACzK,OAAO,sBAAsB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;AACzE,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 \"./ModelsTree.scss\";\r\nimport * as React from \"react\";\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, Viewport } from \"@itwin/core-frontend\";\r\nimport { NodeKey, Ruleset } from \"@itwin/presentation-common\";\r\nimport {\r\n IFilteredPresentationTreeDataProvider, IPresentationTreeDataProvider, usePresentationTreeNodeLoader,\r\n} from \"@itwin/presentation-components\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { ControlledTree, SelectionMode, TreeNodeItem, useTreeModel } from \"@itwin/components-react\";\r\nimport { useDisposable, useOptionalDisposable } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../../appui-react/UiFramework\";\r\nimport { ClassGroupingOption, VisibilityTreeFilterInfo } from \"../Common\";\r\nimport { VisibilityTreeEventHandler } from \"../VisibilityTreeEventHandler\";\r\nimport { useVisibilityTreeFiltering, useVisibilityTreeRenderer, VisibilityTreeNoFilteredData } from \"../VisibilityTreeRenderer\";\r\nimport { ModelsTreeSelectionPredicate, ModelsVisibilityHandler } from \"./ModelsVisibilityHandler\";\r\n\r\nconst PAGING_SIZE = 20;\r\n\r\n/** @internal */\r\nexport const RULESET_MODELS: Ruleset = require(\"./Hierarchy.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n/** @internal */\r\nexport const RULESET_MODELS_GROUPED_BY_CLASS: Ruleset = require(\"./Hierarchy.GroupedByClass.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\nconst RULESET_MODELS_SEARCH: Ruleset = require(\"./ModelsTreeSearch.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\n/** Props for [[ModelsTree]] component\r\n * @public\r\n */\r\nexport interface ModelsTreeProps {\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 * Selection mode in the tree\r\n */\r\n selectionMode?: SelectionMode;\r\n /**\r\n * Predicate which indicates whether node can be selected or no\r\n * @alpha\r\n */\r\n selectionPredicate?: ModelsTreeSelectionPredicate;\r\n /**\r\n * Start loading hierarchy as soon as the component is created\r\n * @deprecated Going to be removed due to too high pressure on the backend\r\n */\r\n enablePreloading?: boolean;\r\n /**\r\n * Active view used to determine and control visibility\r\n */\r\n activeView?: Viewport;\r\n /**\r\n * Ref to the root HTML element used by this component\r\n */\r\n rootElementRef?: React.Ref<HTMLDivElement>;\r\n /**\r\n * Information for tree filtering.\r\n * @alpha\r\n */\r\n filterInfo?: VisibilityTreeFilterInfo;\r\n /**\r\n * Filter the hierarchy by given element IDs.\r\n * @alpha\r\n */\r\n filteredElementIds?: Id64Array;\r\n /**\r\n * Callback invoked when tree is filtered.\r\n */\r\n onFilterApplied?: (filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void;\r\n /**\r\n * Should the tree group displayed element nodes by class.\r\n * @beta\r\n */\r\n enableElementsClassGrouping?: ClassGroupingOption;\r\n /**\r\n * Auto-update the hierarchy when data in the iModel changes.\r\n * @alpha\r\n */\r\n enableHierarchyAutoUpdate?: boolean;\r\n /**\r\n * Custom visibility handler.\r\n * @alpha\r\n */\r\n modelsVisibilityHandler?: ModelsVisibilityHandler;\r\n}\r\n\r\n/**\r\n * A tree component that shows a subject - model - category - element\r\n * hierarchy along with checkboxes that represent and allow changing\r\n * the display of those instances.\r\n * @public\r\n */\r\nexport function ModelsTree(props: ModelsTreeProps) {\r\n const { nodeLoader, onItemsRendered } = useModelsTreeNodeLoader(props);\r\n const { filteredNodeLoader, isFiltering, nodeHighlightingProps } = useVisibilityTreeFiltering(nodeLoader, props.filterInfo, props.onFilterApplied);\r\n const filterApplied = filteredNodeLoader !== nodeLoader;\r\n\r\n const { activeView, modelsVisibilityHandler, selectionPredicate } = props;\r\n const nodeSelectionPredicate = React.useCallback((key: NodeKey, node: TreeNodeItem) => {\r\n return !selectionPredicate ? true : selectionPredicate(key, ModelsVisibilityHandler.getNodeType(node, nodeLoader.dataProvider));\r\n }, [selectionPredicate, nodeLoader.dataProvider]);\r\n\r\n const visibilityHandler = useVisibilityHandler(\r\n nodeLoader.dataProvider.rulesetId,\r\n activeView,\r\n modelsVisibilityHandler,\r\n getFilteredDataProvider(filteredNodeLoader.dataProvider),\r\n props.enableHierarchyAutoUpdate);\r\n const eventHandler = useDisposable(React.useCallback(() => new VisibilityTreeEventHandler({\r\n nodeLoader: filteredNodeLoader,\r\n visibilityHandler,\r\n collapsedChildrenDisposalEnabled: true,\r\n selectionPredicate: nodeSelectionPredicate,\r\n }), [filteredNodeLoader, visibilityHandler, nodeSelectionPredicate]));\r\n\r\n const treeModel = useTreeModel(filteredNodeLoader.modelSource);\r\n const treeRenderer = useVisibilityTreeRenderer(true, false);\r\n\r\n const overlay = isFiltering ? <div className=\"filteredTreeOverlay\" /> : undefined;\r\n\r\n // istanbul ignore next\r\n const noFilteredDataRenderer = React.useCallback(() => {\r\n return <VisibilityTreeNoFilteredData\r\n title={UiFramework.localization.getLocalizedString(\"UiFramework:modelTree.noModelFound\")}\r\n message={UiFramework.localization.getLocalizedString(\"UiFramework:modelTree.noMatchingModelNames\")}\r\n />;\r\n }, []);\r\n\r\n return (\r\n <div className=\"ui-fw-models-tree\" ref={props.rootElementRef}>\r\n <ControlledTree\r\n nodeLoader={filteredNodeLoader}\r\n model={treeModel}\r\n selectionMode={props.selectionMode || SelectionMode.None}\r\n eventsHandler={eventHandler}\r\n treeRenderer={treeRenderer}\r\n nodeHighlightingProps={nodeHighlightingProps}\r\n noDataRenderer={filterApplied ? noFilteredDataRenderer : undefined}\r\n onItemsRendered={onItemsRendered}\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 useModelsTreeNodeLoader(props: ModelsTreeProps) {\r\n // note: this is a temporary workaround for auto-update not working on ruleset variable changes - instead\r\n // of auto-updating we just re-create the node loader by re-creating the ruleset\r\n const rulesets = React.useMemo(() => {\r\n return {\r\n general: (!props.enableElementsClassGrouping) ? { ...RULESET_MODELS } : /* istanbul ignore next */ { ...RULESET_MODELS_GROUPED_BY_CLASS },\r\n search: { ...RULESET_MODELS_SEARCH },\r\n };\r\n }, [props.filteredElementIds]); // eslint-disable-line react-hooks/exhaustive-deps\r\n // const rulesets = {\r\n // general: (!props.enableElementsClassGrouping) ? RULESET_MODELS : /* istanbul ignore next */ RULESET_MODELS_GROUPED_BY_CLASS,\r\n // search: RULESET_MODELS_SEARCH,\r\n // };\r\n\r\n const { nodeLoader, onItemsRendered } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: rulesets.general,\r\n appendChildrenCountForGroupingNodes: (props.enableElementsClassGrouping === ClassGroupingOption.YesWithCounts),\r\n pagingSize: PAGING_SIZE,\r\n enableHierarchyAutoUpdate: props.enableHierarchyAutoUpdate,\r\n });\r\n const { nodeLoader: searchNodeLoader, onItemsRendered: onSearchItemsRendered } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: rulesets.search,\r\n pagingSize: PAGING_SIZE,\r\n enableHierarchyAutoUpdate: props.enableHierarchyAutoUpdate,\r\n });\r\n\r\n const activeNodeLoader = props.filterInfo?.filter ? searchNodeLoader : nodeLoader;\r\n const activeItemsRenderedCallback = props.filterInfo?.filter ? onSearchItemsRendered : onItemsRendered;\r\n\r\n const vars = Presentation.presentation.vars(activeNodeLoader.dataProvider.rulesetId);\r\n if (props.filteredElementIds) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n vars.setId64s(\"filtered-element-ids\", props.filteredElementIds);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n vars.unset(\"filtered-element-ids\");\r\n }\r\n\r\n return {\r\n nodeLoader: activeNodeLoader,\r\n onItemsRendered: activeItemsRenderedCallback,\r\n };\r\n}\r\n\r\nfunction useVisibilityHandler(\r\n rulesetId: string,\r\n activeView?: Viewport,\r\n visibilityHandler?: ModelsVisibilityHandler,\r\n filteredDataProvider?: IFilteredPresentationTreeDataProvider,\r\n hierarchyAutoUpdateEnabled?: boolean,\r\n) {\r\n const defaultVisibilityHandler = useOptionalDisposable(React.useCallback(() => {\r\n return visibilityHandler ? undefined : createVisibilityHandler(rulesetId, activeView, hierarchyAutoUpdateEnabled);\r\n }, [visibilityHandler, rulesetId, activeView, hierarchyAutoUpdateEnabled]));\r\n\r\n const handler = visibilityHandler ?? defaultVisibilityHandler;\r\n\r\n React.useEffect(() => {\r\n handler && handler.setFilteredDataProvider(filteredDataProvider);\r\n }, [handler, filteredDataProvider]);\r\n\r\n return handler;\r\n}\r\n\r\nconst createVisibilityHandler = (rulesetId: string, activeView?: Viewport, hierarchyAutoUpdateEnabled?: boolean): ModelsVisibilityHandler | undefined => {\r\n // istanbul ignore next\r\n return activeView ? new ModelsVisibilityHandler({ rulesetId, viewport: activeView, hierarchyAutoUpdateEnabled }) : undefined;\r\n};\r\n\r\nconst isFilteredDataProvider = (dataProvider: IPresentationTreeDataProvider | IFilteredPresentationTreeDataProvider): dataProvider is IFilteredPresentationTreeDataProvider => {\r\n const filteredProvider = dataProvider as IFilteredPresentationTreeDataProvider;\r\n return filteredProvider.nodeMatchesFilter !== undefined && filteredProvider.getActiveMatch !== undefined && filteredProvider.countFilteringResults !== undefined;\r\n};\r\n\r\nconst getFilteredDataProvider = (dataProvider: IPresentationTreeDataProvider | IFilteredPresentationTreeDataProvider): IFilteredPresentationTreeDataProvider | undefined => {\r\n return isFilteredDataProvider(dataProvider) ? dataProvider : undefined;\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"ModelsTree.js","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsTree.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAA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AY,CAAC,CAAC,CAAC,SAAS,CAAC;AACzE,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 \"./ModelsTree.scss\";\r\nimport * as React from \"react\";\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, Viewport } from \"@itwin/core-frontend\";\r\nimport { NodeKey, Ruleset } from \"@itwin/presentation-common\";\r\nimport {\r\n IFilteredPresentationTreeDataProvider, IPresentationTreeDataProvider, usePresentationTreeNodeLoader,\r\n} from \"@itwin/presentation-components\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { ControlledTree, SelectionMode, TreeNodeItem, useTreeModel } from \"@itwin/components-react\";\r\nimport { useDisposable, useOptionalDisposable } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../../appui-react/UiFramework\";\r\nimport { ClassGroupingOption, VisibilityTreeFilterInfo } from \"../Common\";\r\nimport { VisibilityTreeEventHandler } from \"../VisibilityTreeEventHandler\";\r\nimport { useVisibilityTreeFiltering, useVisibilityTreeRenderer, VisibilityTreeNoFilteredData } from \"../VisibilityTreeRenderer\";\r\nimport { ModelsTreeSelectionPredicate, ModelsVisibilityHandler } from \"./ModelsVisibilityHandler\";\r\n\r\nconst PAGING_SIZE = 20;\r\n\r\n/** @internal */\r\nexport const RULESET_MODELS: Ruleset = require(\"./Hierarchy.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n/** @internal */\r\nexport const RULESET_MODELS_GROUPED_BY_CLASS: Ruleset = require(\"./Hierarchy.GroupedByClass.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\nconst RULESET_MODELS_SEARCH: Ruleset = require(\"./ModelsTreeSearch.json\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n\r\n/** Props for [[ModelsTree]] component\r\n * @public\r\n */\r\nexport interface ModelsTreeProps {\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 * Selection mode in the tree\r\n */\r\n selectionMode?: SelectionMode;\r\n /**\r\n * Predicate which indicates whether node can be selected or no\r\n * @alpha\r\n */\r\n selectionPredicate?: ModelsTreeSelectionPredicate;\r\n /**\r\n * Active view used to determine and control visibility\r\n */\r\n activeView?: Viewport;\r\n /**\r\n * Ref to the root HTML element used by this component\r\n */\r\n rootElementRef?: React.Ref<HTMLDivElement>;\r\n /**\r\n * Information for tree filtering.\r\n * @alpha\r\n */\r\n filterInfo?: VisibilityTreeFilterInfo;\r\n /**\r\n * Filter the hierarchy by given element IDs.\r\n * @alpha\r\n */\r\n filteredElementIds?: Id64Array;\r\n /**\r\n * Callback invoked when tree is filtered.\r\n */\r\n onFilterApplied?: (filteredDataProvider: IPresentationTreeDataProvider, matchesCount: number) => void;\r\n /**\r\n * Should the tree group displayed element nodes by class.\r\n * @beta\r\n */\r\n enableElementsClassGrouping?: ClassGroupingOption;\r\n /**\r\n * Auto-update the hierarchy when data in the iModel changes.\r\n * @alpha\r\n */\r\n enableHierarchyAutoUpdate?: boolean;\r\n /**\r\n * Custom visibility handler.\r\n * @alpha\r\n */\r\n modelsVisibilityHandler?: ModelsVisibilityHandler;\r\n}\r\n\r\n/**\r\n * A tree component that shows a subject - model - category - element\r\n * hierarchy along with checkboxes that represent and allow changing\r\n * the display of those instances.\r\n * @public\r\n */\r\nexport function ModelsTree(props: ModelsTreeProps) {\r\n const { nodeLoader, onItemsRendered } = useModelsTreeNodeLoader(props);\r\n const { filteredNodeLoader, isFiltering, nodeHighlightingProps } = useVisibilityTreeFiltering(nodeLoader, props.filterInfo, props.onFilterApplied);\r\n const filterApplied = filteredNodeLoader !== nodeLoader;\r\n\r\n const { activeView, modelsVisibilityHandler, selectionPredicate } = props;\r\n const nodeSelectionPredicate = React.useCallback((key: NodeKey, node: TreeNodeItem) => {\r\n return !selectionPredicate ? true : selectionPredicate(key, ModelsVisibilityHandler.getNodeType(node, nodeLoader.dataProvider));\r\n }, [selectionPredicate, nodeLoader.dataProvider]);\r\n\r\n const visibilityHandler = useVisibilityHandler(\r\n nodeLoader.dataProvider.rulesetId,\r\n activeView,\r\n modelsVisibilityHandler,\r\n getFilteredDataProvider(filteredNodeLoader.dataProvider),\r\n props.enableHierarchyAutoUpdate);\r\n const eventHandler = useDisposable(React.useCallback(() => new VisibilityTreeEventHandler({\r\n nodeLoader: filteredNodeLoader,\r\n visibilityHandler,\r\n collapsedChildrenDisposalEnabled: true,\r\n selectionPredicate: nodeSelectionPredicate,\r\n }), [filteredNodeLoader, visibilityHandler, nodeSelectionPredicate]));\r\n\r\n const treeModel = useTreeModel(filteredNodeLoader.modelSource);\r\n const treeRenderer = useVisibilityTreeRenderer(true, false);\r\n\r\n const overlay = isFiltering ? <div className=\"filteredTreeOverlay\" /> : undefined;\r\n\r\n // istanbul ignore next\r\n const noFilteredDataRenderer = React.useCallback(() => {\r\n return <VisibilityTreeNoFilteredData\r\n title={UiFramework.localization.getLocalizedString(\"UiFramework:modelTree.noModelFound\")}\r\n message={UiFramework.localization.getLocalizedString(\"UiFramework:modelTree.noMatchingModelNames\")}\r\n />;\r\n }, []);\r\n\r\n return (\r\n <div className=\"ui-fw-models-tree\" ref={props.rootElementRef}>\r\n <ControlledTree\r\n nodeLoader={filteredNodeLoader}\r\n model={treeModel}\r\n selectionMode={props.selectionMode || SelectionMode.None}\r\n eventsHandler={eventHandler}\r\n treeRenderer={treeRenderer}\r\n nodeHighlightingProps={nodeHighlightingProps}\r\n noDataRenderer={filterApplied ? noFilteredDataRenderer : undefined}\r\n onItemsRendered={onItemsRendered}\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 useModelsTreeNodeLoader(props: ModelsTreeProps) {\r\n // note: this is a temporary workaround for auto-update not working on ruleset variable changes - instead\r\n // of auto-updating we just re-create the node loader by re-creating the ruleset\r\n const rulesets = React.useMemo(() => {\r\n return {\r\n general: (!props.enableElementsClassGrouping) ? { ...RULESET_MODELS } : /* istanbul ignore next */ { ...RULESET_MODELS_GROUPED_BY_CLASS },\r\n search: { ...RULESET_MODELS_SEARCH },\r\n };\r\n }, [props.filteredElementIds]); // eslint-disable-line react-hooks/exhaustive-deps\r\n // const rulesets = {\r\n // general: (!props.enableElementsClassGrouping) ? RULESET_MODELS : /* istanbul ignore next */ RULESET_MODELS_GROUPED_BY_CLASS,\r\n // search: RULESET_MODELS_SEARCH,\r\n // };\r\n\r\n const { nodeLoader, onItemsRendered } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: rulesets.general,\r\n appendChildrenCountForGroupingNodes: (props.enableElementsClassGrouping === ClassGroupingOption.YesWithCounts),\r\n pagingSize: PAGING_SIZE,\r\n enableHierarchyAutoUpdate: props.enableHierarchyAutoUpdate,\r\n });\r\n const { nodeLoader: searchNodeLoader, onItemsRendered: onSearchItemsRendered } = usePresentationTreeNodeLoader({\r\n imodel: props.iModel,\r\n ruleset: rulesets.search,\r\n pagingSize: PAGING_SIZE,\r\n enableHierarchyAutoUpdate: props.enableHierarchyAutoUpdate,\r\n });\r\n\r\n const activeNodeLoader = props.filterInfo?.filter ? searchNodeLoader : nodeLoader;\r\n const activeItemsRenderedCallback = props.filterInfo?.filter ? onSearchItemsRendered : onItemsRendered;\r\n\r\n const vars = Presentation.presentation.vars(activeNodeLoader.dataProvider.rulesetId);\r\n if (props.filteredElementIds) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n vars.setId64s(\"filtered-element-ids\", props.filteredElementIds);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n vars.unset(\"filtered-element-ids\");\r\n }\r\n\r\n return {\r\n nodeLoader: activeNodeLoader,\r\n onItemsRendered: activeItemsRenderedCallback,\r\n };\r\n}\r\n\r\nfunction useVisibilityHandler(\r\n rulesetId: string,\r\n activeView?: Viewport,\r\n visibilityHandler?: ModelsVisibilityHandler,\r\n filteredDataProvider?: IFilteredPresentationTreeDataProvider,\r\n hierarchyAutoUpdateEnabled?: boolean,\r\n) {\r\n const defaultVisibilityHandler = useOptionalDisposable(React.useCallback(() => {\r\n return visibilityHandler ? undefined : createVisibilityHandler(rulesetId, activeView, hierarchyAutoUpdateEnabled);\r\n }, [visibilityHandler, rulesetId, activeView, hierarchyAutoUpdateEnabled]));\r\n\r\n const handler = visibilityHandler ?? defaultVisibilityHandler;\r\n\r\n React.useEffect(() => {\r\n handler && handler.setFilteredDataProvider(filteredDataProvider);\r\n }, [handler, filteredDataProvider]);\r\n\r\n return handler;\r\n}\r\n\r\nconst createVisibilityHandler = (rulesetId: string, activeView?: Viewport, hierarchyAutoUpdateEnabled?: boolean): ModelsVisibilityHandler | undefined => {\r\n // istanbul ignore next\r\n return activeView ? new ModelsVisibilityHandler({ rulesetId, viewport: activeView, hierarchyAutoUpdateEnabled }) : undefined;\r\n};\r\n\r\nconst isFilteredDataProvider = (dataProvider: IPresentationTreeDataProvider | IFilteredPresentationTreeDataProvider): dataProvider is IFilteredPresentationTreeDataProvider => {\r\n const filteredProvider = dataProvider as IFilteredPresentationTreeDataProvider;\r\n return filteredProvider.nodeMatchesFilter !== undefined && filteredProvider.getActiveMatch !== undefined && filteredProvider.countFilteringResults !== undefined;\r\n};\r\n\r\nconst getFilteredDataProvider = (dataProvider: IPresentationTreeDataProvider | IFilteredPresentationTreeDataProvider): IFilteredPresentationTreeDataProvider | undefined => {\r\n return isFilteredDataProvider(dataProvider) ? dataProvider : undefined;\r\n};\r\n"]}
|
|
@@ -72,7 +72,7 @@ export declare class ModelsVisibilityHandler implements IVisibilityHandler {
|
|
|
72
72
|
protected changeCategoryState(categoryId: Id64String, parentModelId: Id64String | undefined, on: boolean): void;
|
|
73
73
|
protected changeElementGroupingNodeState(key: ECClassGroupingNodeKey, on: boolean): Promise<void>;
|
|
74
74
|
protected changeElementState(id: Id64String, modelId: Id64String | undefined, categoryId: Id64String | undefined, on: boolean): Promise<void>;
|
|
75
|
-
protected changeElementsState(modelId: Id64String | undefined, categoryId: Id64String | undefined, elementIds: Id64String
|
|
75
|
+
protected changeElementsState(modelId: Id64String | undefined, categoryId: Id64String | undefined, elementIds: AsyncGenerator<Id64String>, on: boolean): Promise<void>;
|
|
76
76
|
private onVisibilityChangeInternal;
|
|
77
77
|
private onViewChanged;
|
|
78
78
|
private onElementAlwaysDrawnChanged;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsVisibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAgD,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,
|
|
1
|
+
{"version":3,"file":"ModelsVisibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAgD,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAiC,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC5G,OAAO,EAAE,qCAAqC,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAGtH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE/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AAO;IAuB5J,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,aAAa,CAEnB;IAGF,OAAO,CAAC,2BAA2B,CAEjC;IAGF,OAAO,CAAC,0BAA0B,CAEhC;IAEF,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;YAId,kBAAkB;IAMhC,OAAO,CAAC,qBAAqB;YAKf,oBAAoB;CAGnC"}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* @module IModelComponents
|
|
7
7
|
*/
|
|
8
8
|
import { BeEvent } from "@itwin/core-bentley";
|
|
9
|
-
import { QueryBinder } from "@itwin/core-common";
|
|
9
|
+
import { QueryBinder, QueryRowFormat } from "@itwin/core-common";
|
|
10
10
|
import { PerModelCategoryVisibility } from "@itwin/core-frontend";
|
|
11
|
-
import {
|
|
12
|
-
import { ContentDataProvider } from "@itwin/presentation-components";
|
|
11
|
+
import { KeySet, NodeKey } from "@itwin/presentation-common";
|
|
13
12
|
import { Presentation } from "@itwin/presentation-frontend";
|
|
14
13
|
import { UiFramework } from "../../UiFramework";
|
|
15
14
|
/**
|
|
@@ -175,16 +174,30 @@ export class ModelsVisibilityHandler {
|
|
|
175
174
|
const { modelId, categoryId, elementIds } = await this.getGroupedElementIds(key);
|
|
176
175
|
if (!modelId || !this._props.viewport.view.viewsModel(modelId))
|
|
177
176
|
return { isDisabled: true, state: "hidden", tooltip: createTooltip("disabled", "element.modelNotDisplayed") };
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
if (this._props.viewport.alwaysDrawn !== undefined && this._props.viewport.alwaysDrawn.size > 0) {
|
|
178
|
+
let atLeastOneElementForceDisplayed = false;
|
|
179
|
+
for await (const elementId of elementIds.getElementIds()) {
|
|
180
|
+
if (this._props.viewport.alwaysDrawn.has(elementId)) {
|
|
181
|
+
atLeastOneElementForceDisplayed = true;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (atLeastOneElementForceDisplayed)
|
|
186
|
+
return { state: "visible", tooltip: createTooltip("visible", "element.displayedThroughAlwaysDrawnList") };
|
|
187
|
+
}
|
|
182
188
|
if (this._props.viewport.alwaysDrawn !== undefined && this._props.viewport.alwaysDrawn.size !== 0 && this._props.viewport.isAlwaysDrawnExclusive)
|
|
183
189
|
return { state: "hidden", tooltip: createTooltip("hidden", "element.hiddenDueToOtherElementsExclusivelyAlwaysDrawn") };
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
190
|
+
if (this._props.viewport.neverDrawn !== undefined && this._props.viewport.neverDrawn.size > 0) {
|
|
191
|
+
let allElementsForceHidden = true;
|
|
192
|
+
for await (const elementId of elementIds.getElementIds()) {
|
|
193
|
+
if (!this._props.viewport.neverDrawn.has(elementId)) {
|
|
194
|
+
allElementsForceHidden = false;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (allElementsForceHidden)
|
|
199
|
+
return { state: "hidden", tooltip: createTooltip("visible", "element.hiddenThroughNeverDrawnList") };
|
|
200
|
+
}
|
|
188
201
|
if (categoryId && this.getCategoryDisplayStatus(categoryId, modelId).state === "visible")
|
|
189
202
|
return { state: "visible", tooltip: createTooltip("visible", undefined) };
|
|
190
203
|
return { state: "hidden", tooltip: createTooltip("hidden", "element.hiddenThroughCategory") };
|
|
@@ -249,19 +262,25 @@ export class ModelsVisibilityHandler {
|
|
|
249
262
|
}
|
|
250
263
|
async changeElementGroupingNodeState(key, on) {
|
|
251
264
|
const { modelId, categoryId, elementIds } = await this.getGroupedElementIds(key);
|
|
252
|
-
this.changeElementsState(modelId, categoryId, elementIds, on);
|
|
265
|
+
await this.changeElementsState(modelId, categoryId, elementIds.getElementIds(), on);
|
|
253
266
|
}
|
|
254
267
|
async changeElementState(id, modelId, categoryId, on) {
|
|
255
|
-
|
|
268
|
+
const childIdsContainer = this.getAssemblyElementIds(id);
|
|
269
|
+
async function* elementIds() {
|
|
270
|
+
yield id;
|
|
271
|
+
for await (const childId of childIdsContainer.getElementIds())
|
|
272
|
+
yield childId;
|
|
273
|
+
}
|
|
274
|
+
await this.changeElementsState(modelId, categoryId, elementIds(), on);
|
|
256
275
|
}
|
|
257
|
-
changeElementsState(modelId, categoryId, elementIds, on) {
|
|
276
|
+
async changeElementsState(modelId, categoryId, elementIds, on) {
|
|
258
277
|
const isDisplayedByDefault = modelId && this.getModelDisplayStatus(modelId).state === "visible"
|
|
259
278
|
&& categoryId && this.getCategoryDisplayStatus(categoryId, modelId).state === "visible";
|
|
260
279
|
const isHiddenDueToExclusiveAlwaysDrawnElements = this._props.viewport.isAlwaysDrawnExclusive && this._props.viewport.alwaysDrawn && 0 !== this._props.viewport.alwaysDrawn.size;
|
|
261
280
|
const currNeverDrawn = new Set(this._props.viewport.neverDrawn ? this._props.viewport.neverDrawn : []);
|
|
262
281
|
const currAlwaysDrawn = new Set(this._props.viewport.alwaysDrawn ?
|
|
263
282
|
this._props.viewport.alwaysDrawn : /* istanbul ignore next */ []);
|
|
264
|
-
|
|
283
|
+
for await (const elementId of elementIds) {
|
|
265
284
|
if (on) {
|
|
266
285
|
currNeverDrawn.delete(elementId);
|
|
267
286
|
if (!isDisplayedByDefault || isHiddenDueToExclusiveAlwaysDrawnElements)
|
|
@@ -272,7 +291,7 @@ export class ModelsVisibilityHandler {
|
|
|
272
291
|
if (isDisplayedByDefault && !isHiddenDueToExclusiveAlwaysDrawnElements)
|
|
273
292
|
currNeverDrawn.add(elementId);
|
|
274
293
|
}
|
|
275
|
-
}
|
|
294
|
+
}
|
|
276
295
|
this._props.viewport.setNeverDrawn(currNeverDrawn);
|
|
277
296
|
this._props.viewport.setAlwaysDrawn(currAlwaysDrawn, this._props.viewport.isAlwaysDrawnExclusive);
|
|
278
297
|
}
|
|
@@ -298,7 +317,7 @@ export class ModelsVisibilityHandler {
|
|
|
298
317
|
.reduce((allModelIds, curr) => [...allModelIds, ...curr], []);
|
|
299
318
|
}
|
|
300
319
|
// istanbul ignore next
|
|
301
|
-
|
|
320
|
+
getAssemblyElementIds(assemblyId) {
|
|
302
321
|
return this._elementIdsCache.getAssemblyElementIds(assemblyId);
|
|
303
322
|
}
|
|
304
323
|
// istanbul ignore next
|
|
@@ -313,7 +332,7 @@ class SubjectModelIdsCache {
|
|
|
313
332
|
async initSubjectsHierarchy() {
|
|
314
333
|
this._subjectsHierarchy = new Map();
|
|
315
334
|
const ecsql = `SELECT ECInstanceId id, Parent.Id parentId FROM bis.Subject WHERE Parent IS NOT NULL`;
|
|
316
|
-
const result = this._imodel.query(ecsql);
|
|
335
|
+
const result = this._imodel.query(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames });
|
|
317
336
|
for await (const row of result) {
|
|
318
337
|
let list = this._subjectsHierarchy.get(row.parentId);
|
|
319
338
|
if (!list) {
|
|
@@ -331,7 +350,7 @@ class SubjectModelIdsCache {
|
|
|
331
350
|
INNER JOIN bis.GeometricModel3d m ON m.ModeledElement.Id = p.ECInstanceId
|
|
332
351
|
INNER JOIN bis.Subject s ON (s.ECInstanceId = p.Parent.Id OR json_extract(s.JsonProperties, '$.Subject.Model.TargetPartition') = printf('0x%x', p.ECInstanceId))
|
|
333
352
|
WHERE NOT m.IsPrivate`;
|
|
334
|
-
const result = this._imodel.query(ecsql);
|
|
353
|
+
const result = this._imodel.query(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames });
|
|
335
354
|
for await (const row of result) {
|
|
336
355
|
let list = this._subjectModels.get(row.subjectId);
|
|
337
356
|
if (!list) {
|
|
@@ -364,29 +383,6 @@ class SubjectModelIdsCache {
|
|
|
364
383
|
}
|
|
365
384
|
}
|
|
366
385
|
// istanbul ignore next
|
|
367
|
-
class RulesetDrivenIdsProvider extends ContentDataProvider {
|
|
368
|
-
constructor(imodel, rulesetId, displayType, inputKeys) {
|
|
369
|
-
super({ imodel, ruleset: rulesetId, displayType });
|
|
370
|
-
this.keys = new KeySet(inputKeys);
|
|
371
|
-
}
|
|
372
|
-
async getDescriptorOverrides() {
|
|
373
|
-
return {
|
|
374
|
-
displayType: this.displayType,
|
|
375
|
-
contentFlags: ContentFlags.KeysOnly,
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
async getResultIds() {
|
|
379
|
-
const content = await this.getContent();
|
|
380
|
-
if (!content)
|
|
381
|
-
return [];
|
|
382
|
-
const result = [];
|
|
383
|
-
content.contentSet.forEach((item) => {
|
|
384
|
-
result.push(...item.primaryKeys.map((k) => k.id));
|
|
385
|
-
});
|
|
386
|
-
return result;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
// istanbul ignore next
|
|
390
386
|
class ElementIdsCache {
|
|
391
387
|
constructor(_imodel, _rulesetId) {
|
|
392
388
|
this._imodel = _imodel;
|
|
@@ -398,51 +394,68 @@ class ElementIdsCache {
|
|
|
398
394
|
this._assemblyElementIdsCache.clear();
|
|
399
395
|
this._groupedElementIdsCache.clear();
|
|
400
396
|
}
|
|
401
|
-
|
|
397
|
+
getAssemblyElementIds(assemblyId) {
|
|
402
398
|
const ids = this._assemblyElementIdsCache.get(assemblyId);
|
|
403
399
|
if (ids)
|
|
404
400
|
return ids;
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
return newIds;
|
|
401
|
+
const container = createAssemblyElementIdsContainer(this._imodel, this._rulesetId, assemblyId);
|
|
402
|
+
this._assemblyElementIdsCache.set(assemblyId, container);
|
|
403
|
+
return container;
|
|
409
404
|
}
|
|
410
405
|
async getGroupedElementIds(groupingNodeKey) {
|
|
411
406
|
const keyString = JSON.stringify(groupingNodeKey);
|
|
412
407
|
const ids = this._groupedElementIdsCache.get(keyString);
|
|
413
408
|
if (ids)
|
|
414
409
|
return ids;
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
return newIds;
|
|
410
|
+
const info = await createGroupedElementsInfo(this._imodel, this._rulesetId, groupingNodeKey);
|
|
411
|
+
this._groupedElementIdsCache.set(keyString, info);
|
|
412
|
+
return info;
|
|
419
413
|
}
|
|
420
414
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
415
|
+
async function* createInstanceIdsGenerator(imodel, rulesetId, displayType, inputKeys) {
|
|
416
|
+
const res = await Presentation.presentation.getContentInstanceKeys({
|
|
417
|
+
imodel,
|
|
418
|
+
rulesetOrId: rulesetId,
|
|
419
|
+
displayType,
|
|
420
|
+
keys: new KeySet(inputKeys),
|
|
421
|
+
});
|
|
422
|
+
for await (const key of res.items()) {
|
|
423
|
+
yield key.id;
|
|
428
424
|
}
|
|
429
425
|
}
|
|
430
426
|
// istanbul ignore next
|
|
431
|
-
class
|
|
432
|
-
constructor(
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
427
|
+
class CachingElementIdsContainer {
|
|
428
|
+
constructor(generator) {
|
|
429
|
+
this._generator = generator;
|
|
430
|
+
this._ids = new Array();
|
|
431
|
+
}
|
|
432
|
+
async *getElementIds() {
|
|
433
|
+
for (const id of this._ids) {
|
|
434
|
+
yield id;
|
|
435
|
+
}
|
|
436
|
+
for await (const id of this._generator) {
|
|
437
|
+
this._ids.push(id);
|
|
438
|
+
yield id;
|
|
442
439
|
}
|
|
443
|
-
return { modelId, categoryId, elementIds };
|
|
444
440
|
}
|
|
445
441
|
}
|
|
442
|
+
function createAssemblyElementIdsContainer(imodel, rulesetId, assemblyId) {
|
|
443
|
+
return new CachingElementIdsContainer(createInstanceIdsGenerator(imodel, rulesetId, "AssemblyElementsRequest", [{ className: "BisCore:Element", id: assemblyId }]));
|
|
444
|
+
}
|
|
445
|
+
async function createGroupedElementsInfo(imodel, rulesetId, groupingNodeKey) {
|
|
446
|
+
const groupedElementIdsContainer = new CachingElementIdsContainer(createInstanceIdsGenerator(imodel, rulesetId, "AssemblyElementsRequest", [groupingNodeKey]));
|
|
447
|
+
const elementId = await groupedElementIdsContainer.getElementIds().next();
|
|
448
|
+
if (elementId.done)
|
|
449
|
+
throw new Error("Invalid grouping node key");
|
|
450
|
+
let modelId, categoryId;
|
|
451
|
+
const query = `SELECT Model.Id AS modelId, Category.Id AS categoryId FROM bis.GeometricElement3d WHERE ECInstanceId = ? LIMIT 1`;
|
|
452
|
+
for await (const modelAndCategoryIds of imodel.query(query, QueryBinder.from([elementId.value]), { rowFormat: QueryRowFormat.UseJsPropertyNames })) {
|
|
453
|
+
modelId = modelAndCategoryIds.modelId;
|
|
454
|
+
categoryId = modelAndCategoryIds.categoryId;
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
return { modelId, categoryId, elementIds: groupedElementIdsContainer };
|
|
458
|
+
}
|
|
446
459
|
const createTooltip = (status, tooltipStringId) => {
|
|
447
460
|
const statusStringId = `UiFramework:modelTree.status.${status}`;
|
|
448
461
|
const statusString = UiFramework.localization.getLocalizedString(statusStringId);
|