@itwin/appui-react 4.10.0 → 4.11.0
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 +18 -1
- package/lib/cjs/appui-react/UiFramework.d.ts +181 -10
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +301 -21
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js +3 -2
- package/lib/cjs/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js +50 -33
- package/lib/cjs/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js +5 -7
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.d.ts +7 -6
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.js +9 -0
- package/lib/cjs/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js +10 -10
- package/lib/cjs/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +2 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItem.d.ts +2 -2
- package/lib/cjs/appui-react/backstage/BackstageItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageItem.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts +5 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +24 -17
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.scss +12 -10
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts +2 -0
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js +7 -1
- package/lib/cjs/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/TimeTracker.js +2 -1
- package/lib/cjs/appui-react/configurableui/TimeTracker.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +12 -9
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/DefaultViewOverlay.js +4 -3
- package/lib/cjs/appui-react/content/DefaultViewOverlay.js.map +1 -1
- package/lib/cjs/appui-react/content/DefaultViewOverlay.scss +14 -19
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +2 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +8 -9
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js +2 -1
- package/lib/cjs/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +2 -2
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js +12 -10
- package/lib/cjs/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts +2 -2
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js +3 -2
- package/lib/cjs/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts +8 -4
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.js +102 -50
- package/lib/cjs/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialog.js +6 -3
- package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -1
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js +3 -2
- package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkVisibility.d.ts +4 -2
- package/lib/cjs/appui-react/framework/FrameworkVisibility.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkVisibility.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +0 -5
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +20 -77
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +1 -3
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts +0 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js +1 -2
- package/lib/cjs/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js +7 -6
- package/lib/cjs/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +2 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useActiveToolId.d.ts +6 -0
- package/lib/cjs/appui-react/hooks/useActiveToolId.d.ts.map +1 -0
- package/lib/cjs/appui-react/hooks/useActiveToolId.js +24 -0
- package/lib/cjs/appui-react/hooks/useActiveToolId.js.map +1 -0
- package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js +11 -7
- package/lib/cjs/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts +15 -0
- package/lib/cjs/appui-react/hooks/useConditionalValue.d.ts.map +1 -0
- package/lib/cjs/appui-react/hooks/useConditionalValue.js +43 -0
- package/lib/cjs/appui-react/hooks/useConditionalValue.js.map +1 -0
- package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js +11 -7
- package/lib/cjs/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useSolarDataProvider.js +13 -8
- package/lib/cjs/appui-react/hooks/useSolarDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/keyins/Keyins.d.ts +35 -0
- package/lib/cjs/appui-react/keyins/Keyins.d.ts.map +1 -0
- package/lib/cjs/appui-react/keyins/Keyins.js +54 -0
- package/lib/cjs/appui-react/keyins/Keyins.js.map +1 -0
- package/lib/cjs/appui-react/layers.scss +1 -1
- package/lib/cjs/appui-react/layout/StandardLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/StandardLayout.js +10 -10
- package/lib/cjs/appui-react/layout/StandardLayout.js.map +1 -1
- package/lib/cjs/appui-react/layout/_widgetopacity.scss +3 -1
- package/lib/cjs/appui-react/layout/base/DragManager.js +2 -1
- package/lib/cjs/appui-react/layout/base/DragManager.js.map +1 -1
- package/lib/cjs/appui-react/layout/base/NineZone.js +1 -1
- package/lib/cjs/appui-react/layout/base/NineZone.js.map +1 -1
- package/lib/cjs/appui-react/layout/base/usePointerCaptor.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/base/usePointerCaptor.js +3 -0
- package/lib/cjs/appui-react/layout/base/usePointerCaptor.js.map +1 -1
- package/lib/cjs/appui-react/layout/outline/TabOutline.js +1 -1
- package/lib/cjs/appui-react/layout/outline/TabOutline.js.map +1 -1
- package/lib/cjs/appui-react/layout/outline/WidgetOutline.js +1 -1
- package/lib/cjs/appui-react/layout/outline/WidgetOutline.js.map +1 -1
- package/lib/cjs/appui-react/layout/state/NineZoneStateReducer.js +14 -12
- package/lib/cjs/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
- package/lib/cjs/appui-react/layout/state/internal/NineZoneStateHelpers.js +2 -1
- package/lib/cjs/appui-react/layout/state/internal/NineZoneStateHelpers.js.map +1 -1
- package/lib/cjs/appui-react/layout/state/internal/TabStateHelpers.js +3 -2
- package/lib/cjs/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
- package/lib/cjs/appui-react/layout/state/internal/WidgetStateHelpers.js +4 -4
- package/lib/cjs/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
- package/lib/cjs/appui-react/layout/target/TitleBarTarget.js +1 -1
- package/lib/cjs/appui-react/layout/target/TitleBarTarget.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/Content.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/widget/Content.js +5 -5
- package/lib/cjs/appui-react/layout/widget/Content.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/ContentRenderer.js +2 -2
- package/lib/cjs/appui-react/layout/widget/ContentRenderer.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/FloatingTab.js +6 -5
- package/lib/cjs/appui-react/layout/widget/FloatingTab.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/FloatingWidget.js +4 -2
- package/lib/cjs/appui-react/layout/widget/FloatingWidget.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/NavigationArea.scss +4 -1
- package/lib/cjs/appui-react/layout/widget/PanelWidget.js +1 -1
- package/lib/cjs/appui-react/layout/widget/PanelWidget.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/Tab.js +4 -4
- package/lib/cjs/appui-react/layout/widget/Tab.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/ToolsArea.scss +2 -0
- package/lib/cjs/appui-react/layout/widget/Widget.d.ts.map +1 -1
- package/lib/cjs/appui-react/layout/widget/Widget.js +2 -2
- package/lib/cjs/appui-react/layout/widget/Widget.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget/useIsToolSettingsTab.js +1 -1
- package/lib/cjs/appui-react/layout/widget/useIsToolSettingsTab.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget-panels/PanelSections.js +8 -5
- package/lib/cjs/appui-react/layout/widget-panels/PanelSections.js.map +1 -1
- package/lib/cjs/appui-react/layout/widget-panels/useAnimatePanel.d.ts +1 -1
- package/lib/cjs/appui-react/layout/widget-panels/useAnimatePanel.js +2 -1
- package/lib/cjs/appui-react/layout/widget-panels/useAnimatePanel.js.map +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.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +6 -6
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageRenderer.js +16 -10
- package/lib/cjs/appui-react/messages/MessageRenderer.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.js +2 -6
- package/lib/cjs/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js +1 -1
- package/lib/cjs/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.d.ts +0 -1
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js +1 -2
- package/lib/cjs/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/cjs/appui-react/pickers/ViewSelector.js +6 -5
- package/lib/cjs/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.d.ts +21 -9
- package/lib/cjs/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.js +12 -5
- package/lib/cjs/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/ComponentPopup.d.ts +18 -0
- package/lib/cjs/appui-react/popup/ComponentPopup.d.ts.map +1 -0
- package/lib/cjs/appui-react/popup/ComponentPopup.js +35 -0
- package/lib/cjs/appui-react/popup/ComponentPopup.js.map +1 -0
- package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts +4 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js +1 -0
- package/lib/cjs/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/InputEditorPopup.d.ts +4 -4
- package/lib/cjs/appui-react/popup/InputEditorPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/InputEditorPopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.d.ts +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +19 -12
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.d.ts +4 -2
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js +9 -3
- package/lib/cjs/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.d.ts +45 -9
- package/lib/cjs/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/PopupManager.js +85 -13
- package/lib/cjs/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.d.ts +16 -6
- package/lib/cjs/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/ToolbarPopup.js +7 -2
- package/lib/cjs/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts +3 -1
- package/lib/cjs/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
- package/lib/cjs/appui-react/preview/PreviewFeatures.js +2 -2
- package/lib/cjs/appui-react/preview/PreviewFeatures.js.map +1 -1
- package/lib/cjs/appui-react/preview/activate-dropped-tab/activateDroppedTab.d.ts +6 -0
- package/lib/cjs/appui-react/preview/activate-dropped-tab/activateDroppedTab.d.ts.map +1 -0
- package/lib/cjs/appui-react/{layout/state → preview/activate-dropped-tab}/activateDroppedTab.js +5 -4
- package/lib/cjs/appui-react/preview/activate-dropped-tab/activateDroppedTab.js.map +1 -0
- package/lib/cjs/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.d.ts +6 -0
- package/lib/cjs/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.js +18 -0
- package/lib/cjs/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.js.map +1 -0
- package/lib/cjs/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.scss +10 -0
- package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts +7 -7
- package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js +7 -7
- package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js.map +1 -1
- package/lib/cjs/appui-react/preview/enable-maximized-widget/useMaximizedWidget.scss +6 -6
- package/lib/cjs/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js +1 -1
- package/lib/cjs/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -1
- package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js +1 -1
- package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js.map +1 -1
- package/lib/cjs/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.scss +4 -4
- package/lib/cjs/appui-react/preview/new-toolbars/ActionItem.d.ts +12 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ActionItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ActionItem.js +25 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ActionItem.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Badge.d.ts +9 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Badge.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Badge.js +20 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Badge.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Badge.scss +13 -0
- package/lib/cjs/appui-react/preview/new-toolbars/CustomItem.d.ts +12 -0
- package/lib/cjs/appui-react/preview/new-toolbars/CustomItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/CustomItem.js +36 -0
- package/lib/cjs/appui-react/preview/new-toolbars/CustomItem.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ExpandIndicator.d.ts +5 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ExpandIndicator.d.ts.map +1 -0
- package/lib/cjs/appui-react/{statusbar/Popup.js → preview/new-toolbars/ExpandIndicator.js} +8 -13
- package/lib/cjs/appui-react/preview/new-toolbars/ExpandIndicator.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ExpandIndicator.scss +17 -0
- package/lib/cjs/appui-react/preview/new-toolbars/GroupItem.d.ts +22 -0
- package/lib/cjs/appui-react/preview/new-toolbars/GroupItem.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/GroupItem.js +79 -0
- package/lib/cjs/appui-react/preview/new-toolbars/GroupItem.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Item.d.ts +21 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Item.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Item.js +54 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Item.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/OverflowButton.d.ts +17 -0
- package/lib/cjs/appui-react/preview/new-toolbars/OverflowButton.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/OverflowButton.js +37 -0
- package/lib/cjs/appui-react/preview/new-toolbars/OverflowButton.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.d.ts +18 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.js +85 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/ToolGroup.scss +43 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Toolbar.d.ts +23 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Toolbar.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Toolbar.js +40 -0
- package/lib/cjs/appui-react/preview/new-toolbars/Toolbar.js.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/useOverflow.d.ts +9 -0
- package/lib/cjs/appui-react/preview/new-toolbars/useOverflow.d.ts.map +1 -0
- package/lib/cjs/appui-react/preview/new-toolbars/useOverflow.js +93 -0
- package/lib/cjs/appui-react/preview/new-toolbars/useOverflow.js.map +1 -0
- package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.js +2 -1
- package/lib/cjs/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
- package/lib/cjs/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/cjs/appui-react/redux/SessionState.d.ts +15 -3
- package/lib/cjs/appui-react/redux/SessionState.d.ts.map +1 -1
- package/lib/cjs/appui-react/redux/SessionState.js +8 -1
- package/lib/cjs/appui-react/redux/SessionState.js.map +1 -1
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js +2 -2
- package/lib/cjs/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.d.ts.map +1 -1
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.js +6 -8
- package/lib/cjs/appui-react/settings/quantityformatting/QuantityFormat.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 +7 -7
- 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 +40 -46
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts +17 -0
- package/lib/cjs/appui-react/shared/ConditionalValue.d.ts.map +1 -0
- package/lib/cjs/appui-react/shared/ConditionalValue.js +16 -0
- package/lib/cjs/appui-react/shared/ConditionalValue.js.map +1 -0
- 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.map +1 -1
- package/lib/cjs/appui-react/shared/ItemProps.d.ts +13 -2
- package/lib/cjs/appui-react/shared/ItemProps.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/cjs/appui-react/shared/MenuItem.d.ts +21 -2
- package/lib/cjs/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +16 -11
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/Indicator.js +2 -1
- package/lib/cjs/appui-react/statusbar/Indicator.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/Overflow.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/Overflow.js +3 -3
- package/lib/cjs/appui-react/statusbar/Overflow.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.d.ts +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBar.js +6 -4
- package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItem.d.ts +2 -2
- package/lib/cjs/appui-react/statusbar/StatusBarItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarItem.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/{Popup.d.ts → popup/Popup.d.ts} +2 -1
- package/lib/cjs/appui-react/statusbar/popup/Popup.d.ts.map +1 -0
- package/lib/cjs/appui-react/{layout/footer → statusbar/popup}/Popup.js +10 -11
- package/lib/cjs/appui-react/statusbar/popup/Popup.js.map +1 -0
- package/lib/cjs/appui-react/{layout/footer → statusbar/popup}/Popup.scss +1 -7
- package/lib/cjs/appui-react/statusfields/ActivityCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/ActivityCenter.js +4 -4
- package/lib/cjs/appui-react/statusfields/ActivityCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts +0 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +4 -4
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SectionsField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SectionsField.js +7 -10
- package/lib/cjs/appui-react/statusfields/SectionsField.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +4 -4
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +14 -12
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts +0 -2
- package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js +12 -20
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +2 -2
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/theme/ThemeManager.js +3 -2
- package/lib/cjs/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/cjs/appui-react/timeline/SolarTimelineDataProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/timeline/SolarTimelineDataProvider.js +2 -3
- package/lib/cjs/appui-react/timeline/SolarTimelineDataProvider.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.d.ts +4 -3
- package/lib/cjs/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/Toolbar.js +28 -4
- package/lib/cjs/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts +4 -2
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js +15 -12
- package/lib/cjs/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarHelper.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarHelper.js +5 -6
- package/lib/cjs/appui-react/toolbar/ToolbarHelper.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts +2 -2
- package/lib/cjs/appui-react/toolbar/ToolbarItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js +4 -3
- package/lib/cjs/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js +18 -11
- package/lib/cjs/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js +2 -3
- package/lib/cjs/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +22 -20
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +10 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +2 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +14 -8
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.d.ts +47 -38
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.d.ts.map +1 -1
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js +102 -143
- package/lib/cjs/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js +1 -1
- package/lib/cjs/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/cjs/appui-react/useTranslation.d.ts +10 -0
- package/lib/cjs/appui-react/useTranslation.d.ts.map +1 -0
- package/lib/cjs/appui-react/useTranslation.js +20 -0
- package/lib/cjs/appui-react/useTranslation.js.map +1 -0
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js +3 -3
- package/lib/cjs/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/cjs/appui-react/utils/Placement.d.ts +35 -0
- package/lib/cjs/appui-react/utils/Placement.d.ts.map +1 -0
- package/lib/cjs/appui-react/utils/Placement.js +62 -0
- package/lib/cjs/appui-react/utils/Placement.js.map +1 -0
- package/lib/cjs/appui-react/utils/PropsHelper.js +4 -4
- package/lib/cjs/appui-react/utils/PropsHelper.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 +12 -11
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +30 -23
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/StatusBar.js +1 -1
- package/lib/cjs/appui-react/widget-panels/StatusBar.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Tab.d.ts +1 -1
- package/lib/cjs/appui-react/widget-panels/Tab.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Tab.js +3 -4
- package/lib/cjs/appui-react/widget-panels/Tab.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js +55 -68
- package/lib/cjs/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Toolbars.js +3 -2
- package/lib/cjs/appui-react/widget-panels/Toolbars.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Toolbars.scss +3 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js +3 -1
- package/lib/cjs/appui-react/widgets/BackstageAppButton.js.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js +5 -3
- package/lib/cjs/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/Widget.d.ts +2 -2
- package/lib/cjs/appui-react/widgets/Widget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/Widget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +8 -3
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +61 -18
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.js +3 -2
- package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/cjs/appui-react/widgets/useWidget.js +1 -1
- package/lib/cjs/appui-react/widgets/useWidget.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +3 -1
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +3 -3
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +181 -10
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +301 -21
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js +3 -2
- package/lib/esm/appui-react/accudraw/AccuDrawDialog.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js +50 -33
- package/lib/esm/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js +5 -7
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.d.ts +7 -6
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.js +9 -0
- package/lib/esm/appui-react/accudraw/AccuDrawPopupManager.js.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.d.ts.map +1 -1
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js +10 -10
- package/lib/esm/appui-react/accudraw/FrameworkAccuDraw.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js +2 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageItem.d.ts +2 -2
- package/lib/esm/appui-react/backstage/BackstageItem.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageItem.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts +5 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +23 -16
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.scss +12 -10
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts +2 -0
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js +7 -1
- package/lib/esm/appui-react/configurableui/InternalConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/configurableui/TimeTracker.js +2 -1
- package/lib/esm/appui-react/configurableui/TimeTracker.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +12 -9
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/DefaultViewOverlay.js +4 -3
- package/lib/esm/appui-react/content/DefaultViewOverlay.js.map +1 -1
- package/lib/esm/appui-react/content/DefaultViewOverlay.scss +14 -19
- package/lib/esm/appui-react/content/FloatingViewportContent.js +2 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +8 -9
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js +2 -1
- package/lib/esm/appui-react/content/InternalContentLayoutManager.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +2 -2
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/split-pane/SplitPane.js +12 -10
- package/lib/esm/appui-react/content/split-pane/SplitPane.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts +2 -2
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js +3 -2
- package/lib/esm/appui-react/cursor/cursormenu/CursorMenu.js.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts +8 -4
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.js +102 -50
- package/lib/esm/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialog.js +6 -3
- package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -1
- package/lib/esm/appui-react/dialog/DialogManagerBase.js +3 -2
- package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkVisibility.d.ts +4 -2
- package/lib/esm/appui-react/framework/FrameworkVisibility.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkVisibility.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +0 -5
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +21 -78
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +1 -3
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts +0 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js +1 -2
- package/lib/esm/appui-react/frontstage/ModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js +7 -6
- package/lib/esm/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +2 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useActiveToolId.d.ts +6 -0
- package/lib/esm/appui-react/hooks/useActiveToolId.d.ts.map +1 -0
- package/lib/esm/appui-react/hooks/useActiveToolId.js +20 -0
- package/lib/esm/appui-react/hooks/useActiveToolId.js.map +1 -0
- package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js +11 -7
- package/lib/esm/appui-react/hooks/useAnalysisAnimationDataProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useConditionalValue.d.ts +15 -0
- package/lib/esm/appui-react/hooks/useConditionalValue.d.ts.map +1 -0
- package/lib/esm/appui-react/hooks/useConditionalValue.js +39 -0
- package/lib/esm/appui-react/hooks/useConditionalValue.js.map +1 -0
- package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js +11 -7
- package/lib/esm/appui-react/hooks/useScheduleAnimationDataProvider.js.map +1 -1
- package/lib/esm/appui-react/hooks/useSolarDataProvider.js +13 -8
- package/lib/esm/appui-react/hooks/useSolarDataProvider.js.map +1 -1
- package/lib/esm/appui-react/keyins/Keyins.d.ts +35 -0
- package/lib/esm/appui-react/keyins/Keyins.d.ts.map +1 -0
- package/lib/esm/appui-react/keyins/Keyins.js +50 -0
- package/lib/esm/appui-react/keyins/Keyins.js.map +1 -0
- package/lib/esm/appui-react/layers.scss +1 -1
- package/lib/esm/appui-react/layout/StandardLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/StandardLayout.js +10 -10
- package/lib/esm/appui-react/layout/StandardLayout.js.map +1 -1
- package/lib/esm/appui-react/layout/_widgetopacity.scss +3 -1
- package/lib/esm/appui-react/layout/base/DragManager.js +2 -1
- package/lib/esm/appui-react/layout/base/DragManager.js.map +1 -1
- package/lib/esm/appui-react/layout/base/NineZone.js +1 -1
- package/lib/esm/appui-react/layout/base/NineZone.js.map +1 -1
- package/lib/esm/appui-react/layout/base/usePointerCaptor.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/base/usePointerCaptor.js +3 -0
- package/lib/esm/appui-react/layout/base/usePointerCaptor.js.map +1 -1
- package/lib/esm/appui-react/layout/outline/TabOutline.js +1 -1
- package/lib/esm/appui-react/layout/outline/TabOutline.js.map +1 -1
- package/lib/esm/appui-react/layout/outline/WidgetOutline.js +1 -1
- package/lib/esm/appui-react/layout/outline/WidgetOutline.js.map +1 -1
- package/lib/esm/appui-react/layout/state/NineZoneStateReducer.js +14 -12
- package/lib/esm/appui-react/layout/state/NineZoneStateReducer.js.map +1 -1
- package/lib/esm/appui-react/layout/state/internal/NineZoneStateHelpers.js +2 -1
- package/lib/esm/appui-react/layout/state/internal/NineZoneStateHelpers.js.map +1 -1
- package/lib/esm/appui-react/layout/state/internal/TabStateHelpers.js +3 -2
- package/lib/esm/appui-react/layout/state/internal/TabStateHelpers.js.map +1 -1
- package/lib/esm/appui-react/layout/state/internal/WidgetStateHelpers.js +4 -4
- package/lib/esm/appui-react/layout/state/internal/WidgetStateHelpers.js.map +1 -1
- package/lib/esm/appui-react/layout/target/TitleBarTarget.js +1 -1
- package/lib/esm/appui-react/layout/target/TitleBarTarget.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/Content.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/widget/Content.js +5 -5
- package/lib/esm/appui-react/layout/widget/Content.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/ContentRenderer.js +2 -2
- package/lib/esm/appui-react/layout/widget/ContentRenderer.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/FloatingTab.js +6 -5
- package/lib/esm/appui-react/layout/widget/FloatingTab.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/FloatingWidget.js +4 -2
- package/lib/esm/appui-react/layout/widget/FloatingWidget.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/NavigationArea.scss +4 -1
- package/lib/esm/appui-react/layout/widget/PanelWidget.js +1 -1
- package/lib/esm/appui-react/layout/widget/PanelWidget.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/Tab.js +4 -4
- package/lib/esm/appui-react/layout/widget/Tab.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/ToolsArea.scss +2 -0
- package/lib/esm/appui-react/layout/widget/Widget.d.ts.map +1 -1
- package/lib/esm/appui-react/layout/widget/Widget.js +2 -2
- package/lib/esm/appui-react/layout/widget/Widget.js.map +1 -1
- package/lib/esm/appui-react/layout/widget/useIsToolSettingsTab.js +1 -1
- package/lib/esm/appui-react/layout/widget/useIsToolSettingsTab.js.map +1 -1
- package/lib/esm/appui-react/layout/widget-panels/PanelSections.js +8 -5
- package/lib/esm/appui-react/layout/widget-panels/PanelSections.js.map +1 -1
- package/lib/esm/appui-react/layout/widget-panels/useAnimatePanel.d.ts +1 -1
- package/lib/esm/appui-react/layout/widget-panels/useAnimatePanel.js +2 -1
- package/lib/esm/appui-react/layout/widget-panels/useAnimatePanel.js.map +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.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +6 -6
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageRenderer.js +17 -11
- package/lib/esm/appui-react/messages/MessageRenderer.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.js +2 -6
- package/lib/esm/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js +2 -2
- package/lib/esm/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.d.ts +0 -1
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js +1 -2
- package/lib/esm/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
- package/lib/esm/appui-react/pickers/ViewSelector.js +6 -5
- package/lib/esm/appui-react/pickers/ViewSelector.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.d.ts +21 -9
- package/lib/esm/appui-react/popup/CardPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.js +15 -7
- package/lib/esm/appui-react/popup/CardPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/ComponentPopup.d.ts +18 -0
- package/lib/esm/appui-react/popup/ComponentPopup.d.ts.map +1 -0
- package/lib/esm/appui-react/popup/ComponentPopup.js +31 -0
- package/lib/esm/appui-react/popup/ComponentPopup.js.map +1 -0
- package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts +4 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/HTMLElementPopup.js +1 -0
- package/lib/esm/appui-react/popup/HTMLElementPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/InputEditorPopup.d.ts +4 -4
- package/lib/esm/appui-react/popup/InputEditorPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/InputEditorPopup.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.d.ts +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js +19 -12
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.d.ts +4 -2
- package/lib/esm/appui-react/popup/KeyinPalettePopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js +9 -3
- package/lib/esm/appui-react/popup/KeyinPalettePopup.js.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.d.ts +45 -9
- package/lib/esm/appui-react/popup/PopupManager.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/PopupManager.js +87 -14
- package/lib/esm/appui-react/popup/PopupManager.js.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.d.ts +16 -6
- package/lib/esm/appui-react/popup/ToolbarPopup.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/ToolbarPopup.js +9 -3
- package/lib/esm/appui-react/popup/ToolbarPopup.js.map +1 -1
- package/lib/esm/appui-react/preview/PreviewFeatures.d.ts +3 -1
- package/lib/esm/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
- package/lib/esm/appui-react/preview/PreviewFeatures.js +2 -2
- package/lib/esm/appui-react/preview/PreviewFeatures.js.map +1 -1
- package/lib/esm/appui-react/preview/activate-dropped-tab/activateDroppedTab.d.ts +6 -0
- package/lib/esm/appui-react/preview/activate-dropped-tab/activateDroppedTab.d.ts.map +1 -0
- package/lib/esm/appui-react/{layout/state → preview/activate-dropped-tab}/activateDroppedTab.js +5 -4
- package/lib/esm/appui-react/preview/activate-dropped-tab/activateDroppedTab.js.map +1 -0
- package/lib/esm/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.d.ts +6 -0
- package/lib/esm/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.js +14 -0
- package/lib/esm/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.js.map +1 -0
- package/lib/esm/appui-react/preview/content-always-max-size/useContentAlwaysMaxSize.scss +10 -0
- package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts +7 -7
- package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js +7 -7
- package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.js.map +1 -1
- package/lib/esm/appui-react/preview/enable-maximized-widget/useMaximizedWidget.scss +6 -6
- package/lib/esm/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js +1 -1
- package/lib/esm/appui-react/preview/horizontal-panel-alignment/PreviewHorizontalPanelAlign.js.map +1 -1
- package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js +1 -1
- package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js.map +1 -1
- package/lib/esm/appui-react/preview/horizontal-panel-alignment/useHorizontalPanelAlignment.scss +4 -4
- package/lib/esm/appui-react/preview/new-toolbars/ActionItem.d.ts +12 -0
- package/lib/esm/appui-react/preview/new-toolbars/ActionItem.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ActionItem.js +22 -0
- package/lib/esm/appui-react/preview/new-toolbars/ActionItem.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Badge.d.ts +9 -0
- package/lib/esm/appui-react/preview/new-toolbars/Badge.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Badge.js +16 -0
- package/lib/esm/appui-react/preview/new-toolbars/Badge.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Badge.scss +13 -0
- package/lib/esm/appui-react/preview/new-toolbars/CustomItem.d.ts +12 -0
- package/lib/esm/appui-react/preview/new-toolbars/CustomItem.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/CustomItem.js +33 -0
- package/lib/esm/appui-react/preview/new-toolbars/CustomItem.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ExpandIndicator.d.ts +5 -0
- package/lib/esm/appui-react/preview/new-toolbars/ExpandIndicator.d.ts.map +1 -0
- package/lib/esm/appui-react/{statusbar/Popup.js → preview/new-toolbars/ExpandIndicator.js} +5 -10
- package/lib/esm/appui-react/preview/new-toolbars/ExpandIndicator.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ExpandIndicator.scss +17 -0
- package/lib/esm/appui-react/preview/new-toolbars/GroupItem.d.ts +22 -0
- package/lib/esm/appui-react/preview/new-toolbars/GroupItem.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/GroupItem.js +74 -0
- package/lib/esm/appui-react/preview/new-toolbars/GroupItem.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Item.d.ts +21 -0
- package/lib/esm/appui-react/preview/new-toolbars/Item.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Item.js +49 -0
- package/lib/esm/appui-react/preview/new-toolbars/Item.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/OverflowButton.d.ts +17 -0
- package/lib/esm/appui-react/preview/new-toolbars/OverflowButton.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/OverflowButton.js +34 -0
- package/lib/esm/appui-react/preview/new-toolbars/OverflowButton.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.d.ts +18 -0
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.js +81 -0
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/ToolGroup.scss +43 -0
- package/lib/esm/appui-react/preview/new-toolbars/Toolbar.d.ts +23 -0
- package/lib/esm/appui-react/preview/new-toolbars/Toolbar.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/Toolbar.js +36 -0
- package/lib/esm/appui-react/preview/new-toolbars/Toolbar.js.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/useOverflow.d.ts +9 -0
- package/lib/esm/appui-react/preview/new-toolbars/useOverflow.d.ts.map +1 -0
- package/lib/esm/appui-react/preview/new-toolbars/useOverflow.js +89 -0
- package/lib/esm/appui-react/preview/new-toolbars/useOverflow.js.map +1 -0
- package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.js +2 -1
- package/lib/esm/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
- package/lib/esm/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/esm/appui-react/redux/SessionState.d.ts +15 -3
- package/lib/esm/appui-react/redux/SessionState.d.ts.map +1 -1
- package/lib/esm/appui-react/redux/SessionState.js +8 -1
- package/lib/esm/appui-react/redux/SessionState.js.map +1 -1
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js +2 -2
- package/lib/esm/appui-react/selection/SelectionContextItemDef.js.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.d.ts.map +1 -1
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.js +6 -8
- package/lib/esm/appui-react/settings/quantityformatting/QuantityFormat.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 +7 -7
- 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 +40 -46
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts +17 -0
- package/lib/esm/appui-react/shared/ConditionalValue.d.ts.map +1 -0
- package/lib/esm/appui-react/shared/ConditionalValue.js +13 -0
- package/lib/esm/appui-react/shared/ConditionalValue.js.map +1 -0
- 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.map +1 -1
- package/lib/esm/appui-react/shared/ItemProps.d.ts +13 -2
- package/lib/esm/appui-react/shared/ItemProps.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/ItemProps.js.map +1 -1
- package/lib/esm/appui-react/shared/MenuItem.d.ts +21 -2
- package/lib/esm/appui-react/shared/MenuItem.d.ts.map +1 -1
- package/lib/esm/appui-react/shared/MenuItem.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +16 -11
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/statusbar/Indicator.js +2 -1
- package/lib/esm/appui-react/statusbar/Indicator.js.map +1 -1
- package/lib/esm/appui-react/statusbar/Overflow.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/Overflow.js +3 -3
- package/lib/esm/appui-react/statusbar/Overflow.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.d.ts +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBar.js +6 -4
- package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItem.d.ts +2 -2
- package/lib/esm/appui-react/statusbar/StatusBarItem.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarItem.js.map +1 -1
- package/lib/esm/appui-react/statusbar/{Popup.d.ts → popup/Popup.d.ts} +2 -1
- package/lib/esm/appui-react/statusbar/popup/Popup.d.ts.map +1 -0
- package/lib/esm/appui-react/{layout/footer → statusbar/popup}/Popup.js +8 -9
- package/lib/esm/appui-react/statusbar/popup/Popup.js.map +1 -0
- package/lib/esm/appui-react/{layout/footer → statusbar/popup}/Popup.scss +1 -7
- package/lib/esm/appui-react/statusfields/ActivityCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/ActivityCenter.js +4 -4
- package/lib/esm/appui-react/statusfields/ActivityCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts +0 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +4 -4
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SectionsField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SectionsField.js +7 -10
- package/lib/esm/appui-react/statusfields/SectionsField.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +4 -4
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +14 -12
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts +0 -2
- package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.js +12 -20
- package/lib/esm/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +3 -3
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.d.ts.map +1 -1
- package/lib/esm/appui-react/theme/ThemeManager.js +3 -2
- package/lib/esm/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/esm/appui-react/timeline/SolarTimelineDataProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/timeline/SolarTimelineDataProvider.js +2 -3
- package/lib/esm/appui-react/timeline/SolarTimelineDataProvider.js.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.d.ts +4 -3
- package/lib/esm/appui-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/Toolbar.js +29 -5
- package/lib/esm/appui-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts +4 -2
- package/lib/esm/appui-react/toolbar/ToolbarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js +15 -12
- package/lib/esm/appui-react/toolbar/ToolbarComposer.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarHelper.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarHelper.js +5 -6
- package/lib/esm/appui-react/toolbar/ToolbarHelper.js.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts +2 -2
- package/lib/esm/appui-react/toolbar/ToolbarItem.d.ts.map +1 -1
- package/lib/esm/appui-react/toolbar/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js +4 -3
- package/lib/esm/appui-react/toolbar/useUiItemsProviderToolbarItems.js.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js +18 -11
- package/lib/esm/appui-react/tools/CoreToolDefinitions.js.map +1 -1
- package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js +2 -3
- package/lib/esm/appui-react/toolsettings/DefaultToolSettingsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +22 -20
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +10 -9
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +2 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +14 -8
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.d.ts +47 -38
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.d.ts.map +1 -1
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js +100 -141
- package/lib/esm/appui-react/uiadmin/FrameworkUiAdmin.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js +1 -1
- package/lib/esm/appui-react/uiprovider/ComponentGenerator.js.map +1 -1
- package/lib/esm/appui-react/useTranslation.d.ts +10 -0
- package/lib/esm/appui-react/useTranslation.d.ts.map +1 -0
- package/lib/esm/appui-react/useTranslation.js +16 -0
- package/lib/esm/appui-react/useTranslation.js.map +1 -0
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js +3 -3
- package/lib/esm/appui-react/utils/InternalUiShowHideManager.js.map +1 -1
- package/lib/esm/appui-react/utils/Placement.d.ts +35 -0
- package/lib/esm/appui-react/utils/Placement.d.ts.map +1 -0
- package/lib/esm/appui-react/utils/Placement.js +57 -0
- package/lib/esm/appui-react/utils/Placement.js.map +1 -0
- package/lib/esm/appui-react/utils/PropsHelper.js +4 -4
- package/lib/esm/appui-react/utils/PropsHelper.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 +12 -11
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +30 -23
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/StatusBar.js +1 -1
- package/lib/esm/appui-react/widget-panels/StatusBar.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Tab.d.ts +1 -1
- package/lib/esm/appui-react/widget-panels/Tab.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Tab.js +2 -3
- package/lib/esm/appui-react/widget-panels/Tab.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/ToolSettings.js +53 -66
- package/lib/esm/appui-react/widget-panels/ToolSettings.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Toolbars.js +3 -2
- package/lib/esm/appui-react/widget-panels/Toolbars.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Toolbars.scss +3 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.js +3 -1
- package/lib/esm/appui-react/widgets/BackstageAppButton.js.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js +5 -3
- package/lib/esm/appui-react/widgets/NavigationWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/Widget.d.ts +2 -2
- package/lib/esm/appui-react/widgets/Widget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/Widget.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +8 -3
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +59 -17
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.js +3 -2
- package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/esm/appui-react/widgets/useWidget.js +1 -1
- package/lib/esm/appui-react/widgets/useWidget.js.map +1 -1
- package/lib/esm/appui-react.d.ts +3 -1
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +3 -1
- package/lib/esm/appui-react.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +7 -1
- package/package.json +10 -8
- package/lib/cjs/appui-react/layout/footer/Popup.d.ts +0 -12
- package/lib/cjs/appui-react/layout/footer/Popup.d.ts.map +0 -1
- package/lib/cjs/appui-react/layout/footer/Popup.js.map +0 -1
- package/lib/cjs/appui-react/layout/state/activateDroppedTab.d.ts +0 -5
- package/lib/cjs/appui-react/layout/state/activateDroppedTab.d.ts.map +0 -1
- package/lib/cjs/appui-react/layout/state/activateDroppedTab.js.map +0 -1
- package/lib/cjs/appui-react/statusbar/Popup.d.ts.map +0 -1
- package/lib/cjs/appui-react/statusbar/Popup.js.map +0 -1
- package/lib/esm/appui-react/layout/footer/Popup.d.ts +0 -12
- package/lib/esm/appui-react/layout/footer/Popup.d.ts.map +0 -1
- package/lib/esm/appui-react/layout/footer/Popup.js.map +0 -1
- package/lib/esm/appui-react/layout/state/activateDroppedTab.d.ts +0 -5
- package/lib/esm/appui-react/layout/state/activateDroppedTab.d.ts.map +0 -1
- package/lib/esm/appui-react/layout/state/activateDroppedTab.js.map +0 -1
- package/lib/esm/appui-react/statusbar/Popup.d.ts.map +0 -1
- package/lib/esm/appui-react/statusbar/Popup.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowButton.js","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/OverflowButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAA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AAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAClD,QAAQ,CACyB,CACrC,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport * as React from \"react\";\nimport { DropdownMenu, IconButton } from \"@itwin/itwinui-react\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\nimport { useLabelProps } from \"./Item\";\nimport { usePopoverPlacement } from \"./GroupItem\";\nimport { ToolbarContext } from \"./Toolbar\";\n\n/** @internal */\ninterface ToolGroupOverflow {\n onClose?: () => void;\n}\n\n/** @internal */\nexport const ToolGroupOverflowContext = React.createContext<\n ToolGroupOverflow | undefined\n>(undefined);\n\ninterface OverflowButtonProps {\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport const OverflowButton = React.forwardRef<\n HTMLButtonElement,\n OverflowButtonProps\n>(function OverflowButton(props, ref) {\n const placement = usePopoverPlacement();\n const labelProps = useLabelProps();\n const context = React.useContext(ToolbarContext);\n\n return (\n <DropdownMenu\n menuItems={(close) => {\n return [\n <OverflowMenu key={0} onClose={close}>\n {props.children}\n </OverflowMenu>,\n ];\n }}\n placement={placement}\n onVisibleChange={(newVisible) => {\n context?.setPopoverOpen(newVisible);\n }}\n >\n <IconButton\n ref={ref}\n label=\"More\"\n labelProps={labelProps}\n styleType=\"borderless\"\n >\n <SvgMore />\n </IconButton>\n </DropdownMenu>\n );\n});\n\ninterface OverflowMenuProps {\n children?: React.ReactNode;\n onClose?: () => void;\n}\n\nfunction OverflowMenu({ children, onClose }: OverflowMenuProps) {\n return (\n <ToolGroupOverflowContext.Provider value={{ onClose }}>\n {children}\n </ToolGroupOverflowContext.Provider>\n );\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Toolbar
|
|
3
|
+
*/
|
|
4
|
+
import "./ToolGroup.scss";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import type { CommonProps } from "@itwin/core-react";
|
|
7
|
+
interface ToolGroupProps extends CommonProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare function ToolGroup({ children, className, ...props }: ToolGroupProps): React.JSX.Element;
|
|
12
|
+
export declare namespace ToolGroup {
|
|
13
|
+
var ActionItem: React.ForwardRefExoticComponent<import("./ActionItem").ActionItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
var GroupItem: React.ForwardRefExoticComponent<import("./GroupItem").GroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
var CustomItem: React.ForwardRefExoticComponent<import("./CustomItem").CustomItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ToolGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolGroup.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/ToolGroup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUrD,UAAU,cAAe,SAAQ,WAAW;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAID,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,qBA2E1E;yBA3Ee,SAAS"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Toolbar
|
|
7
|
+
*/
|
|
8
|
+
import "./ToolGroup.scss";
|
|
9
|
+
import classnames from "classnames";
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { Surface } from "@itwin/itwinui-react";
|
|
12
|
+
import { ActionItem } from "./ActionItem";
|
|
13
|
+
import { GroupItem } from "./GroupItem";
|
|
14
|
+
import { CustomItem } from "./CustomItem";
|
|
15
|
+
import { OverflowButton } from "./OverflowButton";
|
|
16
|
+
import { useOverflow } from "./useOverflow";
|
|
17
|
+
import { getChildKey } from "../../layout/tool-settings/Docked";
|
|
18
|
+
import { ToolbarContext } from "./Toolbar";
|
|
19
|
+
/** @internal */
|
|
20
|
+
export function ToolGroup({ children, className, ...props }) {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
const context = React.useContext(ToolbarContext);
|
|
23
|
+
const expandsTo = (_a = context === null || context === void 0 ? void 0 : context.expandsTo) !== null && _a !== void 0 ? _a : "bottom";
|
|
24
|
+
const panelAlignment = (_b = context === null || context === void 0 ? void 0 : context.panelAlignment) !== null && _b !== void 0 ? _b : "start";
|
|
25
|
+
const orientation = getOrientation(expandsTo);
|
|
26
|
+
const childrenArray = React.Children.toArray(children);
|
|
27
|
+
const keyToChildMap = childrenArray.reduce((acc, child, index) => {
|
|
28
|
+
const childKey = getChildKey(child, index);
|
|
29
|
+
acc.set(childKey, child);
|
|
30
|
+
return acc;
|
|
31
|
+
}, new Map());
|
|
32
|
+
const childrenKeys = Array.from(keyToChildMap.keys());
|
|
33
|
+
const itemRefs = React.useRef(new Map());
|
|
34
|
+
const overflowRef = React.useRef(null);
|
|
35
|
+
const getItemSize = React.useCallback((item) => {
|
|
36
|
+
const element = itemRefs.current.get(item);
|
|
37
|
+
if (!element)
|
|
38
|
+
return { width: 0, height: 0 };
|
|
39
|
+
return element.getBoundingClientRect();
|
|
40
|
+
}, []);
|
|
41
|
+
const getOverflowSize = React.useCallback(() => {
|
|
42
|
+
const element = overflowRef.current;
|
|
43
|
+
if (!element)
|
|
44
|
+
return { width: 0, height: 0 };
|
|
45
|
+
return element.getBoundingClientRect();
|
|
46
|
+
}, []);
|
|
47
|
+
const [containerRef, componentRef, visibleCount, renderOverflow] = useOverflow(childrenKeys, orientation, getItemSize, getOverflowSize);
|
|
48
|
+
const keyToChildEntries = Array.from(keyToChildMap.entries());
|
|
49
|
+
const visibleChildren = keyToChildEntries.slice(0, visibleCount);
|
|
50
|
+
const overflown = keyToChildEntries.slice(visibleCount);
|
|
51
|
+
return (React.createElement("div", { className: classnames("uifw-toolbar-group-toolGroup_container", `uifw-${orientation}`, `uifw-${panelAlignment}`, className), ref: containerRef },
|
|
52
|
+
React.createElement(Surface, { className: classnames("uifw-toolbar-group-toolGroup", `uifw-${orientation}`), ref: componentRef, ...props },
|
|
53
|
+
visibleChildren.map(([item, child]) => {
|
|
54
|
+
if (!React.isValidElement(child))
|
|
55
|
+
return child;
|
|
56
|
+
return React.cloneElement(child, {
|
|
57
|
+
ref: (el) => {
|
|
58
|
+
if (!el) {
|
|
59
|
+
itemRefs.current.delete(item);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
itemRefs.current.set(item, el);
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}),
|
|
66
|
+
renderOverflow && (React.createElement(OverflowButton, { ref: overflowRef }, overflown.map(([_, child]) => child))))));
|
|
67
|
+
}
|
|
68
|
+
ToolGroup.ActionItem = ActionItem;
|
|
69
|
+
ToolGroup.GroupItem = GroupItem;
|
|
70
|
+
ToolGroup.CustomItem = CustomItem;
|
|
71
|
+
function getOrientation(expandsTo) {
|
|
72
|
+
switch (expandsTo) {
|
|
73
|
+
case "left":
|
|
74
|
+
case "right":
|
|
75
|
+
return "vertical";
|
|
76
|
+
case "top":
|
|
77
|
+
case "bottom":
|
|
78
|
+
return "horizontal";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ToolGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolGroup.js","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/ToolGroup.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQ3C,gBAAgB;AAChB,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAkB;;IACzE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,QAAQ,CAAC;IACjD,MAAM,cAAc,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,OAAO,CAAC;IAC1D,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ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B,CACO,CACN,CACP,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;AAClC,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC;AAChC,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;AAIlC,SAAS,cAAc,CACrB,SAAwD;IAExD,QAAQ,SAAS,EAAE;QACjB,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,UAAU,CAAC;QACpB,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC;KACvB;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport \"./ToolGroup.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Surface } from \"@itwin/itwinui-react\";\nimport { ActionItem } from \"./ActionItem\";\nimport { GroupItem } from \"./GroupItem\";\nimport { CustomItem } from \"./CustomItem\";\nimport { OverflowButton } from \"./OverflowButton\";\nimport { useOverflow } from \"./useOverflow\";\nimport { getChildKey } from \"../../layout/tool-settings/Docked\";\nimport { ToolbarContext } from \"./Toolbar\";\n\ninterface ToolGroupProps extends CommonProps {\n children?: React.ReactNode;\n}\n\ntype Child = ReturnType<typeof React.Children.toArray>[0];\n\n/** @internal */\nexport function ToolGroup({ children, className, ...props }: ToolGroupProps) {\n const context = React.useContext(ToolbarContext);\n const expandsTo = context?.expandsTo ?? \"bottom\";\n const panelAlignment = context?.panelAlignment ?? \"start\";\n const orientation = getOrientation(expandsTo);\n const childrenArray = React.Children.toArray(children);\n\n const keyToChildMap = childrenArray.reduce<Map<string, Child>>(\n (acc, child, index) => {\n const childKey = getChildKey(child, index);\n acc.set(childKey, child);\n return acc;\n },\n new Map()\n );\n const childrenKeys = Array.from(keyToChildMap.keys());\n const itemRefs = React.useRef<Map<string, Element>>(new Map());\n const overflowRef = React.useRef<HTMLButtonElement>(null);\n\n const getItemSize = React.useCallback((item: string) => {\n const element = itemRefs.current.get(item);\n if (!element) return { width: 0, height: 0 };\n return element.getBoundingClientRect();\n }, []);\n const getOverflowSize = React.useCallback(() => {\n const element = overflowRef.current;\n if (!element) return { width: 0, height: 0 };\n return element.getBoundingClientRect();\n }, []);\n\n const [containerRef, componentRef, visibleCount, renderOverflow] =\n useOverflow(childrenKeys, orientation, getItemSize, getOverflowSize);\n\n const keyToChildEntries = Array.from(keyToChildMap.entries());\n const visibleChildren = keyToChildEntries.slice(0, visibleCount);\n const overflown = keyToChildEntries.slice(visibleCount);\n return (\n <div\n className={classnames(\n \"uifw-toolbar-group-toolGroup_container\",\n `uifw-${orientation}`,\n `uifw-${panelAlignment}`,\n className\n )}\n ref={containerRef}\n >\n <Surface\n className={classnames(\n \"uifw-toolbar-group-toolGroup\",\n `uifw-${orientation}`\n )}\n ref={componentRef}\n {...props}\n >\n {visibleChildren.map(([item, child]) => {\n if (!React.isValidElement<{ ref: React.Ref<Element> }>(child))\n return child;\n return React.cloneElement(child, {\n ref: (el: Element | null) => {\n if (!el) {\n itemRefs.current.delete(item);\n return;\n }\n itemRefs.current.set(item, el);\n },\n });\n })}\n {renderOverflow && (\n <OverflowButton ref={overflowRef}>\n {overflown.map(([_, child]) => child)}\n </OverflowButton>\n )}\n </Surface>\n </div>\n );\n}\n\nToolGroup.ActionItem = ActionItem;\nToolGroup.GroupItem = GroupItem;\nToolGroup.CustomItem = CustomItem;\n\ntype ToolbarContextProps = React.ContextType<typeof ToolbarContext>;\n\nfunction getOrientation(\n expandsTo: NonNullable<ToolbarContextProps>[\"expandsTo\"]\n) {\n switch (expandsTo) {\n case \"left\":\n case \"right\":\n return \"vertical\";\n case \"top\":\n case \"bottom\":\n return \"horizontal\";\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
.uifw-toolbar-group-toolGroup_container {
|
|
6
|
+
flex: 1 1 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
|
|
9
|
+
&.uifw-vertical {
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.uifw-end {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.uifw-toolbar-group-toolGroup {
|
|
20
|
+
display: flex;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
height: fit-content;
|
|
23
|
+
border-color: var(--iui-color-border-foreground);
|
|
24
|
+
transition: border-color var(--iui-duration-1) ease;
|
|
25
|
+
@supports (backdrop-filter: blur(5px)) {
|
|
26
|
+
background-color: hsl(
|
|
27
|
+
var(--iui-color-background-hsl) / var(--iui-opacity-2)
|
|
28
|
+
);
|
|
29
|
+
backdrop-filter: blur(5px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// TODO: needed due to opacity on toolbar container (since pointer events are disabled for center content).
|
|
33
|
+
pointer-events: all;
|
|
34
|
+
|
|
35
|
+
&.uifw-vertical {
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:hover,
|
|
40
|
+
&:focus-within {
|
|
41
|
+
border-color: var(--iui-color-border-foreground-hover);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Toolbar
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import type { ToolbarItem } from "../../toolbar/ToolbarItem";
|
|
6
|
+
interface ToolbarProps {
|
|
7
|
+
/** Definitions for items of the toolbar. */
|
|
8
|
+
items: ToolbarItem[];
|
|
9
|
+
/** Describes direction to which the panels are expanded. Orientation of the toolbar is determined based on this prop. Defaults to `bottom`. */
|
|
10
|
+
expandsTo?: "top" | "bottom" | "left" | "right";
|
|
11
|
+
/** Describes how panels are aligned. Defaults to `start`. */
|
|
12
|
+
panelAlignment?: "start" | "end";
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare function Toolbar({ items, expandsTo, panelAlignment, }: ToolbarProps): React.JSX.Element;
|
|
16
|
+
interface ToolbarContextProps extends Pick<Required<ToolbarProps>, "expandsTo" | "panelAlignment"> {
|
|
17
|
+
popoverOpen: boolean;
|
|
18
|
+
setPopoverOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ToolbarContext: React.Context<ToolbarContextProps | undefined>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/Toolbar.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,UAAU,YAAY;IACpB,4CAA4C;IAC5C,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,gJAAgJ;IAChJ,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CAClC;AAED,gBAAgB;AAChB,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAoB,EACpB,cAAwB,GACzB,EAAE,YAAY,qBA2Bd;AAED,UAAU,mBACR,SAAQ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,GAAG,gBAAgB,CAAC;IACpE,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC/D;AAED,gBAAgB;AAChB,eAAO,MAAM,cAAc,gDAEf,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Toolbar
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { isToolbarActionItem, isToolbarCustomItem, isToolbarGroupItem, } from "../../toolbar/ToolbarItem";
|
|
10
|
+
import { ToolGroup } from "./ToolGroup";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export function Toolbar({ items, expandsTo = "bottom", panelAlignment = "start", }) {
|
|
13
|
+
const [popoverOpen, setPopoverOpen] = React.useState(false);
|
|
14
|
+
return (React.createElement(ToolbarContext.Provider, { value: {
|
|
15
|
+
expandsTo,
|
|
16
|
+
panelAlignment,
|
|
17
|
+
popoverOpen,
|
|
18
|
+
setPopoverOpen,
|
|
19
|
+
} },
|
|
20
|
+
React.createElement(ToolGroup, null, items.map((item) => {
|
|
21
|
+
if (isToolbarActionItem(item)) {
|
|
22
|
+
return React.createElement(ToolGroup.ActionItem, { key: item.id, item: item });
|
|
23
|
+
}
|
|
24
|
+
if (isToolbarGroupItem(item)) {
|
|
25
|
+
return React.createElement(ToolGroup.GroupItem, { key: item.id, item: item });
|
|
26
|
+
}
|
|
27
|
+
if (isToolbarCustomItem(item)) {
|
|
28
|
+
return React.createElement(ToolGroup.CustomItem, { key: item.id, item: item });
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}))));
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ToolbarContext = React.createContext(undefined);
|
|
35
|
+
ToolbarContext.displayName = "uifw:ToolbarContext";
|
|
36
|
+
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/Toolbar.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAWxC,gBAAgB;AAChB,MAAM,UAAU,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,GAAG,QAAQ,EACpB,cAAc,GAAG,OAAO,GACX;IACb,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,OAAO,CACL,oBAAC,cAAc,CAAC,QAAQ,IACtB,KAAK,EAAE;YACL,SAAS;YACT,cAAc;YACd,WAAW;YACX,cAAc;SACf;QAED,oBAAC,SAAS,QACP,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAClB,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE;gBAC7B,OAAO,oBAAC,SAAS,CAAC,UAAU,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;aAC3D;YACD,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE;gBAC5B,OAAO,oBAAC,SAAS,CAAC,SAAS,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;aAC1D;YACD,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE;gBAC7B,OAAO,oBAAC,SAAS,CAAC,UAAU,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;aAC3D;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACQ,CACY,CAC3B,CAAC;AACJ,CAAC;AAQD,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAE/C,SAAS,CAAC,CAAC;AACb,cAAc,CAAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport * as React from \"react\";\nimport type { ToolbarItem } from \"../../toolbar/ToolbarItem\";\nimport {\n isToolbarActionItem,\n isToolbarCustomItem,\n isToolbarGroupItem,\n} from \"../../toolbar/ToolbarItem\";\nimport { ToolGroup } from \"./ToolGroup\";\n\ninterface ToolbarProps {\n /** Definitions for items of the toolbar. */\n items: ToolbarItem[];\n /** Describes direction to which the panels are expanded. Orientation of the toolbar is determined based on this prop. Defaults to `bottom`. */\n expandsTo?: \"top\" | \"bottom\" | \"left\" | \"right\";\n /** Describes how panels are aligned. Defaults to `start`. */\n panelAlignment?: \"start\" | \"end\";\n}\n\n/** @internal */\nexport function Toolbar({\n items,\n expandsTo = \"bottom\",\n panelAlignment = \"start\",\n}: ToolbarProps) {\n const [popoverOpen, setPopoverOpen] = React.useState(false);\n return (\n <ToolbarContext.Provider\n value={{\n expandsTo,\n panelAlignment,\n popoverOpen,\n setPopoverOpen,\n }}\n >\n <ToolGroup>\n {items.map((item) => {\n if (isToolbarActionItem(item)) {\n return <ToolGroup.ActionItem key={item.id} item={item} />;\n }\n if (isToolbarGroupItem(item)) {\n return <ToolGroup.GroupItem key={item.id} item={item} />;\n }\n if (isToolbarCustomItem(item)) {\n return <ToolGroup.CustomItem key={item.id} item={item} />;\n }\n return null;\n })}\n </ToolGroup>\n </ToolbarContext.Provider>\n );\n}\n\ninterface ToolbarContextProps\n extends Pick<Required<ToolbarProps>, \"expandsTo\" | \"panelAlignment\"> {\n popoverOpen: boolean;\n setPopoverOpen: React.Dispatch<React.SetStateAction<boolean>>;\n}\n\n/** @internal */\nexport const ToolbarContext = React.createContext<\n ToolbarContextProps | undefined\n>(undefined);\nToolbarContext.displayName = \"uifw:ToolbarContext\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Toolbar
|
|
3
|
+
*/
|
|
4
|
+
import type { SizeProps } from "@itwin/core-react";
|
|
5
|
+
type Orientation = "horizontal" | "vertical";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export declare const useOverflow: <TContainer extends HTMLElement, TComponent extends HTMLElement>(allItems: ReadonlyArray<string>, orientation: Orientation, getItemSize: (item: string) => SizeProps, getOverflowSize: () => SizeProps) => readonly [(instance: Element | null) => void, (instance: Element | null) => void, number, boolean];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useOverflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOverflow.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/preview/new-toolbars/useOverflow.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,WAAW,6EAIZ,cAAc,MAAM,CAAC,eAClB,WAAW,sBACJ,MAAM,KAAK,SAAS,mBACvB,MAAM,SAAS,uGA2FjC,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Toolbar
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { useResizeObserver } from "@itwin/core-react";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const useOverflow = (allItems, orientation, getItemSize, getOverflowSize) => {
|
|
12
|
+
const [visible, setVisible] = React.useState(allItems.length);
|
|
13
|
+
const [calculate, setCalculate] = React.useState(false);
|
|
14
|
+
const containerSizeRef = React.useRef();
|
|
15
|
+
const componentSizeRef = React.useRef();
|
|
16
|
+
const [prevOrientation, setPrevOrientation] = React.useState(orientation);
|
|
17
|
+
if (prevOrientation !== orientation) {
|
|
18
|
+
setPrevOrientation(orientation);
|
|
19
|
+
setCalculate(true);
|
|
20
|
+
}
|
|
21
|
+
React.useLayoutEffect(() => {
|
|
22
|
+
setCalculate(false);
|
|
23
|
+
if (!calculate)
|
|
24
|
+
return;
|
|
25
|
+
const containerSize = containerSizeRef.current
|
|
26
|
+
? getLength(containerSizeRef.current, orientation)
|
|
27
|
+
: undefined;
|
|
28
|
+
if (containerSize === undefined)
|
|
29
|
+
return;
|
|
30
|
+
const componentSize = componentSizeRef.current
|
|
31
|
+
? getLength(componentSizeRef.current, orientation)
|
|
32
|
+
: undefined;
|
|
33
|
+
if (componentSize === undefined)
|
|
34
|
+
return;
|
|
35
|
+
const itemSizes = allItems.map((item) => {
|
|
36
|
+
const size = getItemSize(item);
|
|
37
|
+
return getLength(size, orientation);
|
|
38
|
+
});
|
|
39
|
+
const overflowSize = getLength(getOverflowSize(), orientation);
|
|
40
|
+
const otherSize = itemSizes.reduce((acc, size) => acc + size, 0);
|
|
41
|
+
if (otherSize < containerSize) {
|
|
42
|
+
// No overflow.
|
|
43
|
+
setVisible(itemSizes.length);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
let totalSize = overflowSize;
|
|
47
|
+
if (totalSize >= containerSize) {
|
|
48
|
+
// Render only overflow.
|
|
49
|
+
setVisible(0);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let newVisible = 0;
|
|
53
|
+
for (const size of itemSizes) {
|
|
54
|
+
totalSize += size;
|
|
55
|
+
if (totalSize >= containerSize) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
newVisible++;
|
|
59
|
+
}
|
|
60
|
+
setVisible(newVisible);
|
|
61
|
+
}, [calculate, allItems, getItemSize, getOverflowSize, orientation]);
|
|
62
|
+
const containerRoRef = useResizeObserver(React.useCallback((width, height) => {
|
|
63
|
+
const length = containerSizeRef.current
|
|
64
|
+
? getLength(containerSizeRef.current, orientation)
|
|
65
|
+
: undefined;
|
|
66
|
+
containerSizeRef.current = { width, height };
|
|
67
|
+
const newLength = getLength(containerSizeRef.current, orientation);
|
|
68
|
+
if (newLength === length)
|
|
69
|
+
return;
|
|
70
|
+
setCalculate(true);
|
|
71
|
+
}, [orientation]));
|
|
72
|
+
const componentRoRef = useResizeObserver(React.useCallback((width, height) => {
|
|
73
|
+
const length = componentSizeRef.current
|
|
74
|
+
? getLength(componentSizeRef.current, orientation)
|
|
75
|
+
: undefined;
|
|
76
|
+
componentSizeRef.current = { width, height };
|
|
77
|
+
const newLength = getLength(componentSizeRef.current, orientation);
|
|
78
|
+
if (newLength === length)
|
|
79
|
+
return;
|
|
80
|
+
setCalculate(true);
|
|
81
|
+
}, [orientation]));
|
|
82
|
+
const overflow = calculate || visible < allItems.length;
|
|
83
|
+
const visibleItems = calculate ? allItems.length : visible;
|
|
84
|
+
return [containerRoRef, componentRoRef, visibleItems, overflow];
|
|
85
|
+
};
|
|
86
|
+
function getLength(size, orientation) {
|
|
87
|
+
return orientation === "horizontal" ? size.width : size.height;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=useOverflow.js.map
|
|
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,EACvC,WAAwB;IAExB,OAAO,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;AACjE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Toolbar\n */\n\nimport * as React from \"react\";\nimport type { SizeProps } from \"@itwin/core-react\";\nimport { useResizeObserver } from \"@itwin/core-react\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\n\n/** @internal */\nexport const useOverflow = <\n TContainer extends HTMLElement,\n TComponent extends HTMLElement\n>(\n allItems: ReadonlyArray<string>,\n orientation: Orientation,\n getItemSize: (item: string) => SizeProps,\n getOverflowSize: () => SizeProps\n) => {\n const [visible, setVisible] = React.useState(allItems.length);\n const [calculate, setCalculate] = React.useState(false);\n const containerSizeRef = React.useRef<SizeProps>();\n const componentSizeRef = React.useRef<SizeProps>();\n\n const [prevOrientation, setPrevOrientation] = React.useState(orientation);\n if (prevOrientation !== orientation) {\n setPrevOrientation(orientation);\n setCalculate(true);\n }\n\n React.useLayoutEffect(() => {\n setCalculate(false);\n if (!calculate) return;\n\n const containerSize = containerSizeRef.current\n ? getLength(containerSizeRef.current, orientation)\n : undefined;\n if (containerSize === undefined) return;\n\n const componentSize = componentSizeRef.current\n ? getLength(componentSizeRef.current, orientation)\n : undefined;\n if (componentSize === undefined) return;\n\n const itemSizes = allItems.map((item) => {\n const size = getItemSize(item);\n return getLength(size, orientation);\n });\n const overflowSize = getLength(getOverflowSize(), orientation);\n\n const otherSize = itemSizes.reduce((acc, size) => acc + size, 0);\n if (otherSize < containerSize) {\n // No overflow.\n setVisible(itemSizes.length);\n return;\n }\n\n let totalSize = overflowSize;\n if (totalSize >= containerSize) {\n // Render only overflow.\n setVisible(0);\n return;\n }\n\n let newVisible = 0;\n for (const size of itemSizes) {\n totalSize += size;\n if (totalSize >= containerSize) {\n break;\n }\n newVisible++;\n }\n setVisible(newVisible);\n }, [calculate, allItems, getItemSize, getOverflowSize, orientation]);\n const containerRoRef = useResizeObserver<TContainer>(\n React.useCallback(\n (width, height) => {\n const length = containerSizeRef.current\n ? getLength(containerSizeRef.current, orientation)\n : undefined;\n containerSizeRef.current = { width, height };\n const newLength = getLength(containerSizeRef.current, orientation);\n\n if (newLength === length) return;\n setCalculate(true);\n },\n [orientation]\n )\n );\n const componentRoRef = useResizeObserver<TComponent>(\n React.useCallback(\n (width, height) => {\n const length = componentSizeRef.current\n ? getLength(componentSizeRef.current, orientation)\n : undefined;\n componentSizeRef.current = { width, height };\n const newLength = getLength(componentSizeRef.current, orientation);\n\n if (newLength === length) return;\n setCalculate(true);\n },\n [orientation]\n )\n );\n\n const overflow = calculate || visible < allItems.length;\n const visibleItems = calculate ? allItems.length : visible;\n return [containerRoRef, componentRoRef, visibleItems, overflow] as const;\n};\n\nfunction getLength(\n size: { width: number; height: number },\n orientation: Orientation\n) {\n return orientation === \"horizontal\" ? size.width : size.height;\n}\n"]}
|
|
@@ -52,8 +52,9 @@ const order = [
|
|
|
52
52
|
];
|
|
53
53
|
/** @internal */
|
|
54
54
|
export function useDropdownFeatures(features) {
|
|
55
|
+
var _a;
|
|
55
56
|
const { widgetActionDropdown } = usePreviewFeatures();
|
|
56
|
-
const threshold = widgetActionDropdown
|
|
57
|
+
const threshold = (_a = widgetActionDropdown === null || widgetActionDropdown === void 0 ? void 0 : widgetActionDropdown.threshold) !== null && _a !== void 0 ? _a : Infinity;
|
|
57
58
|
const isDropdown = features.length > threshold;
|
|
58
59
|
if (!isDropdown)
|
|
59
60
|
return [features, false];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../../src/appui-react/preview/widget-action-dropdown/MoreButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;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AC,CAAC;IAEhD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO,KAAK,CAAC;QACxB,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC;IACtC,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,SAAS;YAAE,OAAO,EAAE,CAAC;IAC3B,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,KAAK,GAAoB;IAC7B,KAAK;IACL,UAAU;IACV,QAAQ;IACR,iBAAiB;IACjB,MAAM;IACN,UAAU;CACX,CAAC;AAEF,gBAAgB;AAChB,MAAM,UAAU,mBAAmB,CAAC,QAAyB
|
|
1
|
+
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../../src/appui-react/preview/widget-action-dropdown/MoreButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,gBAAgB;AAChB,MAAM,UAAU,UAAU,CAAC,KAAkC;IAC3D,OAAO,CACL,oBAAC,YAAY,IACX,S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;IACR,iBAAiB;IACjB,MAAM;IACN,UAAU;CACX,CAAC;AAEF,gBAAgB;AAChB,MAAM,UAAU,mBAAmB,CAAC,QAAyB;;IAC3D,MAAM,EAAE,oBAAoB,EAAE,GAAG,kBAAkB,EAAE,CAAC;IACtD,MAAM,SAAS,GAAG,MAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,SAAS,mCAAI,QAAQ,CAAC;IAC9D,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;IAC/C,IAAI,CAAC,UAAU;QAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAU,CAAC;IACnD,MAAM,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,CAC/B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAC9C,CAAC;IACF,OAAO,CAAC,MAAM,EAAE,IAAI,CAAU,CAAC;AACjC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport * as React from \"react\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { SvgMoreVertical } from \"@itwin/itwinui-icons-react\";\nimport { DropdownMenu } from \"@itwin/itwinui-react\";\nimport { TabBarButton } from \"../../layout/widget/Button\";\nimport { usePreviewFeatures } from \"../PreviewFeatures\";\nimport { useLayout } from \"../../layout/base/LayoutStore\";\nimport { PanelSideContext } from \"../../layout/widget-panels/Panel\";\nimport type { WidgetFeature } from \"../../layout/widget/Buttons\";\n\n/** @internal */\nexport function MoreButton(props: React.PropsWithChildren<{}>) {\n return (\n <DropdownMenu\n placement=\"bottom-end\"\n menuItems={(onClose) => [\n <WidgetActionDropdownContext.Provider key={0} value={{ onClose }}>\n <CloseOnPanelCollapse />\n {props.children}\n </WidgetActionDropdownContext.Provider>,\n ]}\n >\n {/* TODO: offset is not available for DropdownMenu */}\n <div style={{ height: \"100%\", display: \"flex\", marginInline: \"0.25em\" }}>\n <TabBarButton label=\"More actions\">\n <SvgMoreVertical />\n </TabBarButton>\n </div>\n </DropdownMenu>\n );\n}\n\n/** @internal */\nexport const WidgetActionDropdownContext = React.createContext<\n | undefined\n | {\n onClose: () => void;\n }\n>(undefined);\n\nfunction CloseOnPanelCollapse() {\n const context = React.useContext(WidgetActionDropdownContext);\n assert(!!context);\n const side = React.useContext(PanelSideContext);\n\n const { onClose } = context;\n const collapsed = useLayout((state) => {\n if (!side) return false;\n return state.panels[side].collapsed;\n });\n React.useEffect(() => {\n if (collapsed) onClose();\n }, [collapsed, onClose]);\n return null;\n}\n\nconst order: WidgetFeature[] = [\n \"pin\",\n \"maximize\",\n \"popout\",\n \"horizontalAlign\",\n \"dock\",\n \"sendBack\",\n];\n\n/** @internal */\nexport function useDropdownFeatures(features: WidgetFeature[]) {\n const { widgetActionDropdown } = usePreviewFeatures();\n const threshold = widgetActionDropdown?.threshold ?? Infinity;\n const isDropdown = features.length > threshold;\n if (!isDropdown) return [features, false] as const;\n const sorted = [...features].sort(\n (a, b) => order.indexOf(a) - order.indexOf(b)\n );\n return [sorted, true] as const;\n}\n"]}
|
|
@@ -18,7 +18,7 @@ export interface FrameworkState {
|
|
|
18
18
|
export declare const FrameworkReducer: (state: import("./redux-ts").CombinedReducerState<{
|
|
19
19
|
configurableUiState: typeof ConfigurableUiReducer;
|
|
20
20
|
sessionState: typeof SessionStateReducer;
|
|
21
|
-
}>, action: import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetSnapMode, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetTheme, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolPrompt, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetWidgetOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetDragInteraction, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetShowWidgetIcon, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AutoCollapseUnpinnedPanels, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetViewOverlayDisplay, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AnimateToolSettings, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.UseToolAsToolSettingsLabel, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolbarOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetActiveIModelId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetAvailableSelectionScopes, import("./redux-ts").DeepReadonlyArray<import("./SessionState").PresentationSelectionScope>>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultIModelViewportControlId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewState, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetNumItemsSelected, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetIModelConnection, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetSelectionScope, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<import("./SessionState").CursorMenuData>>>) => import("./redux-ts").CombinedReducerState<{
|
|
21
|
+
}>, action: import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetSnapMode, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetTheme, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolPrompt, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetWidgetOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetDragInteraction, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetShowWidgetIcon, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AutoCollapseUnpinnedPanels, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetViewOverlayDisplay, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AnimateToolSettings, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.UseToolAsToolSettingsLabel, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolbarOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetActiveIModelId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetAvailableSelectionScopes, import("./redux-ts").DeepReadonlyArray<import("./SessionState").PresentationSelectionScope>>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultIModelViewportControlId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewState, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetNumItemsSelected, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetIModelConnection, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetSelectionScope, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<import("./SessionState").CursorMenuData> | import("./redux-ts").DeepReadonlyObject<import("./SessionState").CursorMenuPayload>>>) => import("./redux-ts").CombinedReducerState<{
|
|
22
22
|
configurableUiState: typeof ConfigurableUiReducer;
|
|
23
23
|
sessionState: typeof SessionStateReducer;
|
|
24
24
|
}>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module State
|
|
3
3
|
*/
|
|
4
4
|
import type { XAndY } from "@itwin/core-geometry";
|
|
5
|
-
import type { MenuItemProps } from "../shared/MenuItem";
|
|
5
|
+
import type { CursorMenuItemProps, MenuItemProps } from "../shared/MenuItem";
|
|
6
6
|
import type { ActionsUnion, DeepReadonly } from "./redux-ts";
|
|
7
7
|
/** PresentationSelectionScope holds the id and the localized label for a selection scope supported for a specific iModel.
|
|
8
8
|
* Added to avoid an api-extract error caused by using SelectionScope.
|
|
@@ -15,11 +15,22 @@ export interface PresentationSelectionScope {
|
|
|
15
15
|
/** Definition of data added to Redux store to define cursor menu. If menuItems are empty the menu control is not displayed.
|
|
16
16
|
* To close the menu clear the menuItems or pass in undefined as the CursorData.
|
|
17
17
|
* @public
|
|
18
|
+
* @deprecated in 4.11.x use {@link CursorMenuPayload} instead.
|
|
18
19
|
*/
|
|
19
20
|
export interface CursorMenuData {
|
|
21
|
+
position: XAndY;
|
|
22
|
+
childWindowId?: string;
|
|
20
23
|
items: MenuItemProps[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Definition of data added to Redux store to define cursor menu. If menuItems are empty the menu control is not displayed.
|
|
27
|
+
* To close the menu clear the menuItems or pass in undefined as the CursorData.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface CursorMenuPayload {
|
|
21
31
|
position: XAndY;
|
|
22
32
|
childWindowId?: string;
|
|
33
|
+
items: CursorMenuItemProps[];
|
|
23
34
|
}
|
|
24
35
|
/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.
|
|
25
36
|
* Since these are also used as sync ids they should be in lowercase.
|
|
@@ -49,6 +60,7 @@ export interface SessionState {
|
|
|
49
60
|
defaultViewState: any;
|
|
50
61
|
iModelConnection: any;
|
|
51
62
|
cursorMenuData: CursorMenuData | undefined;
|
|
63
|
+
cursorMenuPayload: CursorMenuPayload | undefined;
|
|
52
64
|
}
|
|
53
65
|
/** An interface that allows redux connected object to dispatch changes to the SessionState reducer.
|
|
54
66
|
* @beta
|
|
@@ -76,7 +88,7 @@ export declare const SessionStateActions: {
|
|
|
76
88
|
setNumItemsSelected: (numSelected: number) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetNumItemsSelected, number>;
|
|
77
89
|
setIModelConnection: (iModelConnection: any) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetIModelConnection, any>;
|
|
78
90
|
setSelectionScope: (activeSelectionScope: string) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetSelectionScope, string>;
|
|
79
|
-
updateCursorMenu: (cursorMenuData: CursorMenuData) => import("./redux-ts").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<CursorMenuData>>;
|
|
91
|
+
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<CursorMenuData> | import("./redux-ts").DeepReadonlyObject<CursorMenuPayload>>;
|
|
80
92
|
};
|
|
81
93
|
/** Object that contains available actions that modify SessionState. Parent control's props should
|
|
82
94
|
* extend from SessionStateActionsProps before using this in Redux 'connect' function.
|
|
@@ -91,7 +103,7 @@ export declare const sessionStateMapDispatchToProps: {
|
|
|
91
103
|
setNumItemsSelected: (numSelected: number) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetNumItemsSelected, number>;
|
|
92
104
|
setIModelConnection: (iModelConnection: any) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetIModelConnection, any>;
|
|
93
105
|
setSelectionScope: (activeSelectionScope: string) => import("./redux-ts").ActionWithPayload<SessionStateActionId.SetSelectionScope, string>;
|
|
94
|
-
updateCursorMenu: (cursorMenuData: CursorMenuData) => import("./redux-ts").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<CursorMenuData>>;
|
|
106
|
+
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<CursorMenuData> | import("./redux-ts").DeepReadonlyObject<CursorMenuPayload>>;
|
|
95
107
|
};
|
|
96
108
|
/** Union of SessionState Redux actions
|
|
97
109
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionState.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/SessionState.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionState.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/redux/SessionState.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI7D;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,oBAAY,oBAAoB;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,MAAM;4DAIU,0BAA0B,EAAE;iEAKI,MAAM;+BAKxC,MAAM;qCAInB,GAAG;uCAEkB,MAAM;4CAIpB,GAAG;8CAIC,MAAM;uCAQZ,cAAc,GAAG,iBAAiB;CAEtD,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,8BAA8B;kCA7C5B,MAAM;4DAIU,0BAA0B,EAAE;iEAKI,MAAM;+BAKxC,MAAM;qCAInB,GAAG;uCAEkB,MAAM;4CAIpB,GAAG;8CAIC,MAAM;uCAQZ,cAAc,GAAG,iBAAiB;CASiB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhF;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,0BAA6B,EAClC,MAAM,EAAE,wBAAwB,GAC/B,YAAY,CAAC,YAAY,CAAC,CAoD5B"}
|
|
@@ -41,6 +41,7 @@ const initialState = {
|
|
|
41
41
|
defaultViewState: undefined,
|
|
42
42
|
iModelConnection: undefined,
|
|
43
43
|
cursorMenuData: undefined,
|
|
44
|
+
cursorMenuPayload: undefined,
|
|
44
45
|
};
|
|
45
46
|
/** An object with a function that creates each SessionStateReducer that can be handled by our reducer.
|
|
46
47
|
* @public
|
|
@@ -66,6 +67,7 @@ export const SessionStateActions = {
|
|
|
66
67
|
(activeSelectionScope) => createAction(SessionStateActionId.SetSelectionScope, activeSelectionScope),
|
|
67
68
|
updateCursorMenu:
|
|
68
69
|
// istanbul ignore next
|
|
70
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
69
71
|
(cursorMenuData) => createAction(SessionStateActionId.UpdateCursorMenu, cursorMenuData),
|
|
70
72
|
};
|
|
71
73
|
/** Object that contains available actions that modify SessionState. Parent control's props should
|
|
@@ -122,7 +124,12 @@ export function SessionStateReducer(state = initialState, action) {
|
|
|
122
124
|
return { ...state, iModelConnection: action.payload };
|
|
123
125
|
}
|
|
124
126
|
case SessionStateActionId.UpdateCursorMenu: {
|
|
125
|
-
return {
|
|
127
|
+
return {
|
|
128
|
+
...state,
|
|
129
|
+
cursorMenuPayload: action.payload,
|
|
130
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
131
|
+
cursorMenuData: action.payload,
|
|
132
|
+
};
|
|
126
133
|
}
|
|
127
134
|
}
|
|
128
135
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionState.js","sourceRoot":"","sources":["../../../../src/appui-react/redux/SessionState.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAOH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAuB1C;;;GAGG;AACH,MAAM,CAAN,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,mFAA2D,CAAA;IAC3D,mGAA2E,CAAA;IAC3E,8EAAsD,CAAA;IACtD,8EAAsD,CAAA;IACtD,kFAA0D,CAAA;IAC1D,iGAAyE,CAAA;IACzE,4EAAoD,CAAA;IACpD,mFAA2D,CAAA;IAC3D,4EAAoD,CAAA;AACtD,CAAC,EAVW,oBAAoB,KAApB,oBAAoB,QAU/B;AAiBD,MAAM,qBAAqB,GAAG;IAC5B,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,SAAS;CACa,CAAC;AAEhC,gDAAgD;AAChD,MAAM,YAAY,GAAiB;IACjC,yDAAyD;IACzD,gBAAgB,EAAE,CAAC;IACnB,gHAAgH;IAChH,wBAAwB,EAAE,CAAC,qBAAqB,CAAC;IACjD,uHAAuH;IACvH,oBAAoB,EAAE,qBAAqB,CAAC,EAAE;IAC9C,uGAAuG;IACvG,QAAQ,EAAE,EAAE;IACZ,8BAA8B,EAAE,SAAS;IACzC,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,cAAc,EAAE,SAAS;CAC1B,CAAC;AAiBF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC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AAE,EAAE,CAAC;SACxC;QACD,KAAK,oBAAoB,CAAC,iCAAiC,CAAC,CAAC;YAC3D,OAAO,EAAE,GAAG,KAAK,EAAE,8BAA8B,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACrE;QACD,KAAK,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;YAC1C,OAAO,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACpD;QACD,KAAK,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACvD;QACD,KAAK,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACvD;QACD,KAAK,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;YAC1C,OAAO,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACrD;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module State\n */\n\n// The following definitions are causing extract-api issues on linux so for now just using any until we can figure out the issue.\nimport type { XAndY } from \"@itwin/core-geometry\";\n// import { IModelConnection, ViewState } from \"@itwin/core-frontend\";\nimport type { MenuItemProps } from \"../shared/MenuItem\";\nimport type { ActionsUnion, DeepReadonly } from \"./redux-ts\";\nimport { createAction } from \"./redux-ts\";\n\n// cSpell:ignore configurableui snapmode toolprompt sessionstate imodelid viewid viewportid rulesetid\n\n/** PresentationSelectionScope holds the id and the localized label for a selection scope supported for a specific iModel.\n * Added to avoid an api-extract error caused by using SelectionScope.\n * @public\n */\nexport interface PresentationSelectionScope {\n id: string;\n label: string;\n}\n\n/** Definition of data added to Redux store to define cursor menu. If menuItems are empty the menu control is not displayed.\n * To close the menu clear the menuItems or pass in undefined as the CursorData.\n * @public\n */\nexport interface CursorMenuData {\n items: MenuItemProps[];\n position: XAndY;\n childWindowId?: string;\n}\n\n/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.\n * Since these are also used as sync ids they should be in lowercase.\n * @public\n */\nexport enum SessionStateActionId {\n SetNumItemsSelected = \"sessionstate:set-num-items-selected\",\n SetAvailableSelectionScopes = \"sessionstate:set-available-selection-scopes\",\n SetSelectionScope = \"sessionstate:set-selection-scope\",\n SetActiveIModelId = \"sessionstate:set-active-imodelid\",\n SetIModelConnection = \"sessionstate:set-imodel-connection\",\n SetDefaultIModelViewportControlId = \"sessionstate:set-default-viewportid\",\n SetDefaultViewId = \"sessionstate:set-default-viewid\",\n SetDefaultViewState = \"sessionstate:set-default-view-state\",\n UpdateCursorMenu = \"sessionstate:update-cursor-menu\",\n}\n\n/** The portion of state managed by the SessionStateReducer.\n * @public\n */\nexport interface SessionState {\n numItemsSelected: number;\n availableSelectionScopes: PresentationSelectionScope[];\n activeSelectionScope: string;\n iModelId: string;\n defaultIModelViewportControlId: string | undefined;\n defaultViewId: string | undefined;\n defaultViewState: any;\n iModelConnection: any;\n cursorMenuData: CursorMenuData | undefined;\n}\n\nconst defaultSelectionScope = {\n id: \"element\",\n label: \"Element\",\n} as PresentationSelectionScope;\n\n/** used on first call of SessionStateReducer */\nconst initialState: SessionState = {\n /** number of selected items in Presentation Selection */\n numItemsSelected: 0,\n /** initialize to only support \"Element\" scope, this will be overwritten when iModelConnection is established */\n availableSelectionScopes: [defaultSelectionScope],\n /** initialize to active selection scope to \"Element\", this will be overwritten when iModelConnection is established */\n activeSelectionScope: defaultSelectionScope.id,\n /** set to iModelId if an iModel is active else it is an empty string, so initialize to empty string */\n iModelId: \"\",\n defaultIModelViewportControlId: undefined,\n defaultViewId: undefined,\n defaultViewState: undefined,\n iModelConnection: undefined,\n cursorMenuData: undefined,\n};\n\n/** An interface that allows redux connected object to dispatch changes to the SessionState reducer.\n * @beta\n */\nexport interface SessionStateActionsProps {\n setActiveIModelId: typeof SessionStateActions.setActiveIModelId;\n setAvailableSelectionScopes: typeof SessionStateActions.setAvailableSelectionScopes;\n setDefaultIModelViewportControlId: typeof SessionStateActions.setDefaultIModelViewportControlId;\n setDefaultViewId: typeof SessionStateActions.setDefaultViewId;\n setDefaultViewState: typeof SessionStateActions.setDefaultViewState;\n setIModelConnection: typeof SessionStateActions.setIModelConnection;\n setNumItemsSelected: typeof SessionStateActions.setNumItemsSelected;\n setSelectionScope: typeof SessionStateActions.setSelectionScope;\n updateCursorMenu: typeof SessionStateActions.updateCursorMenu;\n}\n\n/** An object with a function that creates each SessionStateReducer that can be handled by our reducer.\n * @public\n */\nexport const SessionStateActions = {\n setActiveIModelId:\n // istanbul ignore next\n (iModelId: string) =>\n createAction(SessionStateActionId.SetActiveIModelId, iModelId),\n setAvailableSelectionScopes:\n // istanbul ignore next\n (availableSelectionScopes: PresentationSelectionScope[]) =>\n createAction(\n SessionStateActionId.SetAvailableSelectionScopes,\n availableSelectionScopes\n ),\n setDefaultIModelViewportControlId: (iModelViewportControlId: string) =>\n createAction(\n SessionStateActionId.SetDefaultIModelViewportControlId,\n iModelViewportControlId\n ),\n setDefaultViewId: (viewId: string) =>\n createAction(SessionStateActionId.SetDefaultViewId, viewId),\n setDefaultViewState:\n // istanbul ignore next\n (viewState: any) =>\n createAction(SessionStateActionId.SetDefaultViewState, viewState),\n setNumItemsSelected: (numSelected: number) =>\n createAction(SessionStateActionId.SetNumItemsSelected, numSelected),\n setIModelConnection:\n // istanbul ignore next\n (iModelConnection: any) =>\n createAction(SessionStateActionId.SetIModelConnection, iModelConnection),\n setSelectionScope:\n // istanbul ignore next\n (activeSelectionScope: string) =>\n createAction(\n SessionStateActionId.SetSelectionScope,\n activeSelectionScope\n ),\n updateCursorMenu:\n // istanbul ignore next\n (cursorMenuData: CursorMenuData) =>\n createAction(SessionStateActionId.UpdateCursorMenu, cursorMenuData),\n};\n\n/** Object that contains available actions that modify SessionState. Parent control's props should\n * extend from SessionStateActionsProps before using this in Redux 'connect' function.\n * @beta\n */\n// ...SessionStateActionsProps\nexport const sessionStateMapDispatchToProps = { ...SessionStateActions };\n\n/** Union of SessionState Redux actions\n * @public\n */\nexport type SessionStateActionsUnion = ActionsUnion<typeof SessionStateActions>;\n\n/** Handles actions to update SessionState.\n * @public\n */\nexport function SessionStateReducer(\n state: SessionState = initialState,\n action: SessionStateActionsUnion\n): DeepReadonly<SessionState> {\n switch (action.type) {\n case SessionStateActionId.SetNumItemsSelected: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, numItemsSelected: action.payload };\n else return { ...state, numItemsSelected: 0 };\n }\n case SessionStateActionId.SetAvailableSelectionScopes: {\n const payloadArray: PresentationSelectionScope[] = [];\n action.payload.forEach((scope) => payloadArray.push(scope));\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, availableSelectionScopes: payloadArray };\n else\n return { ...state, availableSelectionScopes: [defaultSelectionScope] };\n }\n case SessionStateActionId.SetSelectionScope: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, activeSelectionScope: action.payload };\n else return { ...state, activeSelectionScope: defaultSelectionScope.id };\n }\n case SessionStateActionId.SetActiveIModelId: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, iModelId: action.payload };\n else return { ...state, iModelId: \"\" };\n }\n case SessionStateActionId.SetDefaultIModelViewportControlId: {\n return { ...state, defaultIModelViewportControlId: action.payload };\n }\n case SessionStateActionId.SetDefaultViewId: {\n return { ...state, defaultViewId: action.payload };\n }\n case SessionStateActionId.SetDefaultViewState: {\n return { ...state, defaultViewState: action.payload };\n }\n case SessionStateActionId.SetIModelConnection: {\n return { ...state, iModelConnection: action.payload };\n }\n case SessionStateActionId.UpdateCursorMenu: {\n return { ...state, cursorMenuData: action.payload };\n }\n }\n\n return state;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SessionState.js","sourceRoot":"","sources":["../../../../src/appui-react/redux/SessionState.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAOH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAmC1C;;;GAGG;AACH,MAAM,CAAN,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,mFAA2D,CAAA;IAC3D,mGAA2E,CAAA;IAC3E,8EAAsD,CAAA;IACtD,8EAAsD,CAAA;IACtD,kFAA0D,CAAA;IAC1D,iGAAyE,CAAA;IACzE,4EAAoD,CAAA;IACpD,mFAA2D,CAAA;IAC3D,4EAAoD,CAAA;AACtD,CAAC,EAVW,oBAAoB,KAApB,oBAAoB,QAU/B;AAmBD,MAAM,qBAAqB,GAAG;IAC5B,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,SAAS;CACa,CAAC;AAEhC,gDAAgD;AAChD,MAAM,YAAY,GAAiB;IACjC,yDAAyD;IACzD,gBAAgB,EAAE,CAAC;IACnB,gHAAgH;IAChH,wBAAwB,EAAE,CAAC,qBAAqB,CAAC;IACjD,uHAAuH;IACvH,oBAAoB,EAAE,qBAAqB,CAAC,EAAE;IAC9C,uGAAuG;IACvG,QAAQ,EAAE,EAAE;IACZ,8BAA8B,EAAE,SAAS;IACzC,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,cAAc,EAAE,SAAS;IACzB,iBAAiB,EAAE,SAAS;CAC7B,CAAC;AAiBF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iBAAiB;IACf,uBAAuB;IACvB,CAAC,QAAgB,EAAE,EAAE,CACnB,YAAY,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAClE,2BAA2B;IACzB,uBAAuB;IACvB,CAAC,wBAAsD,EAAE,EAAE,C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AAK,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;YAC1C,OAAO,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACpD;QACD,KAAK,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACvD;QACD,KAAK,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACvD;QACD,KAAK,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;YAC1C,OAAO;gBACL,GAAG,KAAK;gBACR,iBAAiB,EAAE,MAAM,CAAC,OAA4B;gBACtD,mDAAmD;gBACnD,cAAc,EAAE,MAAM,CAAC,OAAyB;aACjD,CAAC;SACH;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module State\n */\n\n// The following definitions are causing extract-api issues on linux so for now just using any until we can figure out the issue.\nimport type { XAndY } from \"@itwin/core-geometry\";\n// import { IModelConnection, ViewState } from \"@itwin/core-frontend\";\nimport type { CursorMenuItemProps, MenuItemProps } from \"../shared/MenuItem\";\nimport type { ActionsUnion, DeepReadonly } from \"./redux-ts\";\nimport { createAction } from \"./redux-ts\";\n// cSpell:ignore configurableui snapmode toolprompt sessionstate imodelid viewid viewportid rulesetid\n\n/** PresentationSelectionScope holds the id and the localized label for a selection scope supported for a specific iModel.\n * Added to avoid an api-extract error caused by using SelectionScope.\n * @public\n */\nexport interface PresentationSelectionScope {\n id: string;\n label: string;\n}\n\n/** Definition of data added to Redux store to define cursor menu. If menuItems are empty the menu control is not displayed.\n * To close the menu clear the menuItems or pass in undefined as the CursorData.\n * @public\n * @deprecated in 4.11.x use {@link CursorMenuPayload} instead.\n */\nexport interface CursorMenuData {\n position: XAndY;\n childWindowId?: string;\n // eslint-disable-next-line deprecation/deprecation\n items: MenuItemProps[];\n}\n\n/**\n * Definition of data added to Redux store to define cursor menu. If menuItems are empty the menu control is not displayed.\n * To close the menu clear the menuItems or pass in undefined as the CursorData.\n * @public\n */\nexport interface CursorMenuPayload {\n position: XAndY;\n childWindowId?: string;\n items: CursorMenuItemProps[];\n}\n\n/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.\n * Since these are also used as sync ids they should be in lowercase.\n * @public\n */\nexport enum SessionStateActionId {\n SetNumItemsSelected = \"sessionstate:set-num-items-selected\",\n SetAvailableSelectionScopes = \"sessionstate:set-available-selection-scopes\",\n SetSelectionScope = \"sessionstate:set-selection-scope\",\n SetActiveIModelId = \"sessionstate:set-active-imodelid\",\n SetIModelConnection = \"sessionstate:set-imodel-connection\",\n SetDefaultIModelViewportControlId = \"sessionstate:set-default-viewportid\",\n SetDefaultViewId = \"sessionstate:set-default-viewid\",\n SetDefaultViewState = \"sessionstate:set-default-view-state\",\n UpdateCursorMenu = \"sessionstate:update-cursor-menu\",\n}\n\n/** The portion of state managed by the SessionStateReducer.\n * @public\n */\nexport interface SessionState {\n numItemsSelected: number;\n availableSelectionScopes: PresentationSelectionScope[];\n activeSelectionScope: string;\n iModelId: string;\n defaultIModelViewportControlId: string | undefined;\n defaultViewId: string | undefined;\n defaultViewState: any;\n iModelConnection: any;\n // eslint-disable-next-line deprecation/deprecation\n cursorMenuData: CursorMenuData | undefined; // @deprecated in 4.11.x use {@link CursorMenuPayload} instead\n cursorMenuPayload: CursorMenuPayload | undefined;\n}\n\nconst defaultSelectionScope = {\n id: \"element\",\n label: \"Element\",\n} as PresentationSelectionScope;\n\n/** used on first call of SessionStateReducer */\nconst initialState: SessionState = {\n /** number of selected items in Presentation Selection */\n numItemsSelected: 0,\n /** initialize to only support \"Element\" scope, this will be overwritten when iModelConnection is established */\n availableSelectionScopes: [defaultSelectionScope],\n /** initialize to active selection scope to \"Element\", this will be overwritten when iModelConnection is established */\n activeSelectionScope: defaultSelectionScope.id,\n /** set to iModelId if an iModel is active else it is an empty string, so initialize to empty string */\n iModelId: \"\",\n defaultIModelViewportControlId: undefined,\n defaultViewId: undefined,\n defaultViewState: undefined,\n iModelConnection: undefined,\n cursorMenuData: undefined, // @deprecated in 4.11.x use {@link SessionState.cursorMenuPayload} instead\n cursorMenuPayload: undefined,\n};\n\n/** An interface that allows redux connected object to dispatch changes to the SessionState reducer.\n * @beta\n */\nexport interface SessionStateActionsProps {\n setActiveIModelId: typeof SessionStateActions.setActiveIModelId;\n setAvailableSelectionScopes: typeof SessionStateActions.setAvailableSelectionScopes;\n setDefaultIModelViewportControlId: typeof SessionStateActions.setDefaultIModelViewportControlId;\n setDefaultViewId: typeof SessionStateActions.setDefaultViewId;\n setDefaultViewState: typeof SessionStateActions.setDefaultViewState;\n setIModelConnection: typeof SessionStateActions.setIModelConnection;\n setNumItemsSelected: typeof SessionStateActions.setNumItemsSelected;\n setSelectionScope: typeof SessionStateActions.setSelectionScope;\n updateCursorMenu: typeof SessionStateActions.updateCursorMenu;\n}\n\n/** An object with a function that creates each SessionStateReducer that can be handled by our reducer.\n * @public\n */\nexport const SessionStateActions = {\n setActiveIModelId:\n // istanbul ignore next\n (iModelId: string) =>\n createAction(SessionStateActionId.SetActiveIModelId, iModelId),\n setAvailableSelectionScopes:\n // istanbul ignore next\n (availableSelectionScopes: PresentationSelectionScope[]) =>\n createAction(\n SessionStateActionId.SetAvailableSelectionScopes,\n availableSelectionScopes\n ),\n setDefaultIModelViewportControlId: (iModelViewportControlId: string) =>\n createAction(\n SessionStateActionId.SetDefaultIModelViewportControlId,\n iModelViewportControlId\n ),\n setDefaultViewId: (viewId: string) =>\n createAction(SessionStateActionId.SetDefaultViewId, viewId),\n setDefaultViewState:\n // istanbul ignore next\n (viewState: any) =>\n createAction(SessionStateActionId.SetDefaultViewState, viewState),\n setNumItemsSelected: (numSelected: number) =>\n createAction(SessionStateActionId.SetNumItemsSelected, numSelected),\n setIModelConnection:\n // istanbul ignore next\n (iModelConnection: any) =>\n createAction(SessionStateActionId.SetIModelConnection, iModelConnection),\n setSelectionScope:\n // istanbul ignore next\n (activeSelectionScope: string) =>\n createAction(\n SessionStateActionId.SetSelectionScope,\n activeSelectionScope\n ),\n updateCursorMenu:\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n (cursorMenuData: CursorMenuData | CursorMenuPayload) =>\n createAction(SessionStateActionId.UpdateCursorMenu, cursorMenuData),\n};\n\n/** Object that contains available actions that modify SessionState. Parent control's props should\n * extend from SessionStateActionsProps before using this in Redux 'connect' function.\n * @beta\n */\n// ...SessionStateActionsProps\nexport const sessionStateMapDispatchToProps = { ...SessionStateActions };\n\n/** Union of SessionState Redux actions\n * @public\n */\nexport type SessionStateActionsUnion = ActionsUnion<typeof SessionStateActions>;\n\n/** Handles actions to update SessionState.\n * @public\n */\nexport function SessionStateReducer(\n state: SessionState = initialState,\n action: SessionStateActionsUnion\n): DeepReadonly<SessionState> {\n switch (action.type) {\n case SessionStateActionId.SetNumItemsSelected: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, numItemsSelected: action.payload };\n else return { ...state, numItemsSelected: 0 };\n }\n case SessionStateActionId.SetAvailableSelectionScopes: {\n const payloadArray: PresentationSelectionScope[] = [];\n action.payload.forEach((scope) => payloadArray.push(scope));\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, availableSelectionScopes: payloadArray };\n else\n return { ...state, availableSelectionScopes: [defaultSelectionScope] };\n }\n case SessionStateActionId.SetSelectionScope: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, activeSelectionScope: action.payload };\n else return { ...state, activeSelectionScope: defaultSelectionScope.id };\n }\n case SessionStateActionId.SetActiveIModelId: {\n // istanbul ignore else\n if (undefined !== action.payload)\n return { ...state, iModelId: action.payload };\n else return { ...state, iModelId: \"\" };\n }\n case SessionStateActionId.SetDefaultIModelViewportControlId: {\n return { ...state, defaultIModelViewportControlId: action.payload };\n }\n case SessionStateActionId.SetDefaultViewId: {\n return { ...state, defaultViewId: action.payload };\n }\n case SessionStateActionId.SetDefaultViewState: {\n return { ...state, defaultViewState: action.payload };\n }\n case SessionStateActionId.SetIModelConnection: {\n return { ...state, iModelConnection: action.payload };\n }\n case SessionStateActionId.UpdateCursorMenu: {\n return {\n ...state,\n cursorMenuPayload: action.payload as CursorMenuPayload,\n // eslint-disable-next-line deprecation/deprecation\n cursorMenuData: action.payload as CursorMenuData,\n };\n }\n }\n\n return state;\n}\n"]}
|