@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
|
@@ -19,6 +19,7 @@ const KeyinPaletteTools_1 = require("../tools/KeyinPaletteTools");
|
|
|
19
19
|
const useUiStateStorage_1 = require("../uistate/useUiStateStorage");
|
|
20
20
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
21
21
|
const matchesWords_1 = require("../utils/matchesWords");
|
|
22
|
+
const useTranslation_1 = require("../useTranslation");
|
|
22
23
|
const KEYIN_PALETTE_NAMESPACE = "KeyinPalettePanel";
|
|
23
24
|
const KEYIN_HISTORY_KEY = "historyArray";
|
|
24
25
|
/** @internal */
|
|
@@ -34,8 +35,8 @@ exports.clearKeyinPaletteHistory = clearKeyinPaletteHistory;
|
|
|
34
35
|
* @internal
|
|
35
36
|
*/
|
|
36
37
|
function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHistoryLength = 6, }) {
|
|
38
|
+
const { translate } = (0, useTranslation_1.useTranslation)();
|
|
37
39
|
const [currentKeyin, setCurrentKeyin] = React.useState("");
|
|
38
|
-
const placeholderLabel = React.useRef(UiFramework_1.UiFramework.translate("keyinbrowser.placeholder"));
|
|
39
40
|
const inputRef = React.useRef(null);
|
|
40
41
|
const keyinSeparator = "--#--";
|
|
41
42
|
const [historyKeyins, setHistoryKeyins] = React.useState([]);
|
|
@@ -61,11 +62,10 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
61
62
|
const storeHistoryKeyins = React.useCallback(async (value) => {
|
|
62
63
|
const result = await uiSettingsStorage.saveSetting(KEYIN_PALETTE_NAMESPACE, KEYIN_HISTORY_KEY, value);
|
|
63
64
|
if (result.status !== core_react_1.UiStateStorageStatus.Success) {
|
|
64
|
-
const
|
|
65
|
-
const errorDetails = new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, briefMessage);
|
|
65
|
+
const errorDetails = new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, translate("keyinbrowser.couldNotSaveHistory"));
|
|
66
66
|
core_frontend_1.IModelApp.notifications.outputMessage(errorDetails);
|
|
67
67
|
}
|
|
68
|
-
}, [uiSettingsStorage]);
|
|
68
|
+
}, [translate, uiSettingsStorage]);
|
|
69
69
|
const allKeyins = React.useMemo(() => {
|
|
70
70
|
const availableKeyins = [];
|
|
71
71
|
historyKeyins.forEach((value) => {
|
|
@@ -80,23 +80,23 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
80
80
|
try {
|
|
81
81
|
switch (await core_frontend_1.IModelApp.tools.parseAndRun(value)) {
|
|
82
82
|
case core_frontend_1.ParseAndRunResult.ToolNotFound:
|
|
83
|
-
message = `
|
|
83
|
+
message = `translate("keyinbrowser.couldNotFindTool")} ${value}`;
|
|
84
84
|
break;
|
|
85
85
|
// istanbul ignore next
|
|
86
86
|
case core_frontend_1.ParseAndRunResult.BadArgumentCount:
|
|
87
|
-
message =
|
|
87
|
+
message = translate("keyinbrowser.incorrectArgs");
|
|
88
88
|
break;
|
|
89
89
|
// istanbul ignore next
|
|
90
90
|
case core_frontend_1.ParseAndRunResult.FailedToRun:
|
|
91
|
-
message =
|
|
91
|
+
message = translate("keyinbrowser.failedToRun");
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
catch (ex) {
|
|
96
96
|
// istanbul ignore next
|
|
97
97
|
{
|
|
98
|
-
message =
|
|
99
|
-
detailedMessage = `${
|
|
98
|
+
message = translate("keyinbrowser.exceptionOccurred");
|
|
99
|
+
detailedMessage = `${translate("keyinbrowser.exceptionOccurred")}: ${ex}`;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
// istanbul ignore else
|
|
@@ -123,7 +123,13 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
123
123
|
if (onKeyinExecuted)
|
|
124
124
|
onKeyinExecuted(value);
|
|
125
125
|
}
|
|
126
|
-
}, [
|
|
126
|
+
}, [
|
|
127
|
+
translate,
|
|
128
|
+
onKeyinExecuted,
|
|
129
|
+
storeHistoryKeyins,
|
|
130
|
+
historyKeyins,
|
|
131
|
+
allowedHistoryLength,
|
|
132
|
+
]);
|
|
127
133
|
const selectKeyin = React.useCallback(() => {
|
|
128
134
|
// istanbul ignore else
|
|
129
135
|
if (inputRef.current) {
|
|
@@ -147,6 +153,7 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
147
153
|
return undefined;
|
|
148
154
|
};
|
|
149
155
|
const handleKeypressOnKeyinsList = React.useCallback(async (event) => {
|
|
156
|
+
var _a, _b;
|
|
150
157
|
const key = event.key;
|
|
151
158
|
// built into listbox a "Space" key will trigger the selection of a entry so if an Enter key is pressed
|
|
152
159
|
// assume user wants to execute the entry.
|
|
@@ -154,7 +161,7 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
154
161
|
if (key === ts_key_enum_1.Key.Enter.valueOf()) {
|
|
155
162
|
event.preventDefault();
|
|
156
163
|
// istanbul ignore next
|
|
157
|
-
const keyinToSend = getKeyinFromListboxValue(event.currentTarget
|
|
164
|
+
const keyinToSend = getKeyinFromListboxValue((_b = (_a = event.currentTarget) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.focusvalue);
|
|
158
165
|
// istanbul ignore else
|
|
159
166
|
if (keyinToSend) {
|
|
160
167
|
if (event.ctrlKey)
|
|
@@ -245,7 +252,7 @@ function KeyinPalettePanel({ keyins, onKeyinExecuted, historyLength: allowedHist
|
|
|
245
252
|
}, [filteredKeyins, submitKeyin, currentKeyin, updateKeyin]);
|
|
246
253
|
const lastHistoryIndex = filteredKeyins.findIndex((entry) => true !== entry.isHistory) - 1;
|
|
247
254
|
return (React.createElement("div", { className: "uifw-command-palette-panel" },
|
|
248
|
-
React.createElement(itwinui_react_1.Input, { ref: inputRef, type: "text", onKeyDown: onInputValueKeyDown, className: "uifw-command-palette-input", "data-testid": "command-palette-input", onChange: onInputValueChange, placeholder:
|
|
255
|
+
React.createElement(itwinui_react_1.Input, { ref: inputRef, type: "text", onKeyDown: onInputValueKeyDown, className: "uifw-command-palette-input", "data-testid": "command-palette-input", onChange: onInputValueChange, placeholder: translate("keyinbrowser.placeholder"), value: currentKeyin, size: "small" }),
|
|
249
256
|
filteredKeyins.length > 0 && (React.createElement(core_react_1.Listbox, { id: "uifw-command-sources", className: "map-manager-source-list", onKeyDown: handleKeypressOnKeyinsList, onListboxValueChange: onListboxValueChange }, filteredKeyins.map((entry, index) => {
|
|
250
257
|
const value = `${entry.value}${keyinSeparator}${entry.isHistory ? "history" : "registry"}`;
|
|
251
258
|
const itemClass = `uifw-command-palette-value-entry${index === lastHistoryIndex ? " uifw-history-bottom-border" : ""}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyinPalettePanel.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/KeyinPalettePanel.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,mCAAmC;AAEnC,+BAA+B;AAC/B,6CAAkC;AAClC,oCAAkC;AAClC,kDAK2B;AAC3B,wDAM8B;AAC9B,gDAA6C;AAE7C,kEAA0E;AAC1E,oEAAwE;AAExE,wDAA6C;AAC7C,wDAAqD;AAErD,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AACpD,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,gBAAgB;AAChB,SAAgB,wBAAwB;IACtC,MAAM,iBAAiB,GAAG,yBAAW,CAAC,iBAAiB,EAAE,CAAC;IAC1D,uBAAuB;IACvB,IAAI,iBAAiB,EAAE;QACrB,KAAK,iBAAiB,CAAC,aAAa,CAClC,uBAAuB,EACvB,iBAAiB,CAClB,CAAC;KACH;AACH,CAAC;AATD,4DASC;AAQD;;GAEG;AACH,SAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,eAAe,EACf,aAAa,EAAE,oBAAoB,GAAG,CAAC,GAChB;IACvB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,EAAE,CAAC,CAAC;IACnE,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CACnC,yBAAW,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAClD,CAAC;IACF,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM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AoB,IAEzC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,GAAG,cAAc,GAC3C,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAChC,EAAE,CAAC;YACH,MAAM,SAAS,GAAG,mCAChB,KAAK,KAAK,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAC/D,EAAE,CAAC;YACH,OAAO,CACL,oBAAC,wBAAW,IACV,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,EAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK;gBAEZ,oBAAC,yBAAY,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAChD,CACf,CAAC;QACJ,CAAC,CAAC,CACM,CACX,CACG,CACP,CAAC;AACJ,CAAC;AApUD,8CAoUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Popup\n */\n\n// cSpell:ignore focusvalue uiadmin\n\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport \"./KeyinPalettePanel.scss\";\nimport {\n FilteredText,\n Listbox,\n ListboxItem,\n UiStateStorageStatus,\n} from \"@itwin/core-react\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n ParseAndRunResult,\n} from \"@itwin/core-frontend\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport { ClearKeyinPaletteHistoryTool } from \"../tools/KeyinPaletteTools\";\nimport { useUiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { KeyinEntry } from \"../uiadmin/FrameworkUiAdmin\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { matchesWords } from \"../utils/matchesWords\";\n\nconst KEYIN_PALETTE_NAMESPACE = \"KeyinPalettePanel\";\nconst KEYIN_HISTORY_KEY = \"historyArray\";\n\n/** @internal */\nexport function clearKeyinPaletteHistory() {\n const uiSettingsStorage = UiFramework.getUiStateStorage();\n // istanbul ignore else\n if (uiSettingsStorage) {\n void uiSettingsStorage.deleteSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY\n );\n }\n}\n\ninterface KeyinPalettePanelProps {\n keyins: KeyinEntry[];\n onKeyinExecuted?: OnItemExecutedFunc;\n historyLength?: number;\n}\n\n/**\n * @internal\n */\nexport function KeyinPalettePanel({\n keyins,\n onKeyinExecuted,\n historyLength: allowedHistoryLength = 6,\n}: KeyinPalettePanelProps) {\n const [currentKeyin, setCurrentKeyin] = React.useState<string>(\"\");\n const placeholderLabel = React.useRef(\n UiFramework.translate(\"keyinbrowser.placeholder\")\n );\n const inputRef = React.useRef<HTMLInputElement>(null);\n const keyinSeparator = \"--#--\";\n const [historyKeyins, setHistoryKeyins] = React.useState<string[]>([]);\n const uiSettingsStorage = useUiStateStorageHandler();\n\n React.useEffect(() => {\n async function fetchState() {\n const settingsResult = await uiSettingsStorage.getSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY\n );\n // istanbul ignore else\n if (UiStateStorageStatus.Success === settingsResult.status) {\n const filteredHistory = (settingsResult.setting as string[]).filter(\n (keyin) => {\n const result = IModelApp.tools.parseKeyin(keyin);\n return result.ok;\n }\n );\n setHistoryKeyins(filteredHistory);\n } else {\n setHistoryKeyins([]);\n }\n }\n\n void fetchState();\n }, [uiSettingsStorage]);\n\n // istanbul ignore next\n const storeHistoryKeyins = React.useCallback(\n async (value: string[]) => {\n const result = await uiSettingsStorage.saveSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY,\n value\n );\n if (result.status !== UiStateStorageStatus.Success) {\n const briefMessage = UiFramework.translate(\n \"keyinbrowser.couldNotSaveHistory\"\n );\n const errorDetails = new NotifyMessageDetails(\n OutputMessagePriority.Error,\n briefMessage\n );\n IModelApp.notifications.outputMessage(errorDetails);\n }\n },\n [uiSettingsStorage]\n );\n\n const allKeyins = React.useMemo(() => {\n const availableKeyins = [];\n historyKeyins.forEach((value: string) => {\n availableKeyins.push({ value, isHistory: true });\n });\n availableKeyins.push(\n ...keyins.sort((a, b) =>\n a.value.toLowerCase().localeCompare(b.value.toLowerCase())\n )\n );\n return availableKeyins;\n }, [historyKeyins, keyins]);\n\n const submitKeyin = React.useCallback(\n async (value: string) => {\n let detailedMessage: string | undefined;\n let message: string | undefined;\n try {\n switch (await IModelApp.tools.parseAndRun(value)) {\n case ParseAndRunResult.ToolNotFound:\n message = `UiFramework.translate(\"keyinbrowser.couldNotFindTool\")} ${value}`;\n break;\n // istanbul ignore next\n case ParseAndRunResult.BadArgumentCount:\n message = UiFramework.translate(\"keyinbrowser.incorrectArgs\");\n break;\n // istanbul ignore next\n case ParseAndRunResult.FailedToRun:\n message = UiFramework.translate(\"keyinbrowser.failedToRun\");\n break;\n }\n } catch (ex) {\n // istanbul ignore next\n {\n message = UiFramework.translate(\"keyinbrowser.exceptionOccurred\");\n detailedMessage = `${UiFramework.translate(\n \"keyinbrowser.exceptionOccurred\"\n )}: ${ex}`;\n }\n }\n\n // istanbul ignore else\n if (undefined !== message) {\n const errorDetails = new NotifyMessageDetails(\n OutputMessagePriority.Error,\n message,\n detailedMessage,\n OutputMessageType.Sticky\n );\n IModelApp.notifications.outputMessage(errorDetails);\n } else {\n // istanbul ignore next\n if (\n value.length < 400 &&\n value !== ClearKeyinPaletteHistoryTool.keyin &&\n value !== ClearKeyinPaletteHistoryTool.englishKeyin\n ) {\n const newHistoryEntries: string[] = [value];\n for (const entry of historyKeyins) {\n if (entry !== value) {\n newHistoryEntries.push(entry);\n if (newHistoryEntries.length >= allowedHistoryLength) break;\n }\n }\n await storeHistoryKeyins(newHistoryEntries);\n }\n\n // close the popup by processing the supplied onKeyinExecuted function\n if (onKeyinExecuted) onKeyinExecuted(value);\n }\n },\n [storeHistoryKeyins, onKeyinExecuted, historyKeyins, allowedHistoryLength]\n );\n\n const selectKeyin = React.useCallback(() => {\n // istanbul ignore else\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(\n inputRef.current.value.length,\n inputRef.current.value.length\n );\n }\n }, [inputRef]);\n\n const updateKeyin = React.useCallback(\n (value: string) => {\n setCurrentKeyin(value);\n selectKeyin();\n },\n [selectKeyin]\n );\n\n const getKeyinFromListboxValue = (value: string | undefined) => {\n // istanbul ignore else\n if (value) {\n const indexSeparator = value.search(keyinSeparator);\n // istanbul ignore else\n if (indexSeparator) return value.substring(0, indexSeparator);\n }\n // istanbul ignore next\n return undefined;\n };\n\n const handleKeypressOnKeyinsList = React.useCallback(\n async (event: React.KeyboardEvent<HTMLUListElement>) => {\n const key = event.key;\n // built into listbox a \"Space\" key will trigger the selection of a entry so if an Enter key is pressed\n // assume user wants to execute the entry.\n // istanbul ignore else\n if (key === Key.Enter.valueOf()) {\n event.preventDefault();\n // istanbul ignore next\n const keyinToSend = getKeyinFromListboxValue(\n event.currentTarget?.dataset?.focusvalue\n );\n // istanbul ignore else\n if (keyinToSend) {\n if (event.ctrlKey) updateKeyin(keyinToSend);\n else await submitKeyin(keyinToSend);\n }\n }\n },\n [submitKeyin, updateKeyin]\n );\n\n const onListboxValueChange = React.useCallback(\n async (value: string, isControlOrCommandPressed?: boolean) => {\n const keyin = getKeyinFromListboxValue(value);\n // istanbul ignore else\n if (keyin) {\n if (isControlOrCommandPressed) updateKeyin(keyin);\n else await submitKeyin(keyin);\n }\n },\n [submitKeyin, updateKeyin]\n );\n\n const onInputValueChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setCurrentKeyin(event.target.value);\n },\n []\n );\n\n const filteredKeyins = React.useMemo(() => {\n const filteredHistory: KeyinEntry[] = [];\n if (undefined === currentKeyin || 0 === currentKeyin.length) {\n return allKeyins;\n } else {\n const newKeyinSet: KeyinEntry[] = [];\n allKeyins.forEach((value) => {\n if (value.value.length >= currentKeyin.length) {\n // Force contiguous searches if key-in is over 60 characters long for performance.\n const matches = matchesWords(\n currentKeyin,\n value.value,\n currentKeyin.length > 60\n );\n if (matches && matches.length) {\n // istanbul ignore else\n if (value.isHistory) {\n filteredHistory.push(value);\n newKeyinSet.push({ ...value, matches });\n } else {\n // only add entry if no match in filtered history\n // istanbul ignore else\n if (\n -1 ===\n filteredHistory.findIndex(\n (historyEntry: KeyinEntry) =>\n historyEntry.value === value.value\n )\n )\n newKeyinSet.push({ ...value, matches });\n }\n }\n }\n });\n return newKeyinSet;\n }\n }, [allKeyins, currentKeyin]);\n\n const onInputValueKeyDown = React.useCallback(\n async (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (Key.Enter.valueOf() === event.key) {\n event.preventDefault();\n event.stopPropagation();\n // istanbul ignore else\n if (1 === filteredKeyins.length) {\n if (event.ctrlKey) updateKeyin(filteredKeyins[0].value);\n else await submitKeyin(filteredKeyins[0].value);\n } else {\n if (currentKeyin) await submitKeyin(currentKeyin);\n }\n } else if (\n Key.Tab.valueOf() === event.key &&\n 1 === filteredKeyins.length\n ) {\n event.preventDefault();\n event.stopPropagation();\n updateKeyin(filteredKeyins[0].value);\n } else {\n if (\n event.key === Key.ArrowDown.valueOf() &&\n filteredKeyins.length > 0\n ) {\n event.preventDefault();\n event.stopPropagation();\n // istanbul ignore else\n if (inputRef.current) {\n const nextElement = inputRef.current\n .nextElementSibling as HTMLElement;\n nextElement && nextElement.focus();\n }\n }\n }\n },\n [filteredKeyins, submitKeyin, currentKeyin, updateKeyin]\n );\n\n const lastHistoryIndex =\n filteredKeyins.findIndex((entry) => true !== entry.isHistory) - 1;\n\n return (\n <div className=\"uifw-command-palette-panel\">\n <Input\n ref={inputRef}\n type=\"text\"\n onKeyDown={onInputValueKeyDown}\n className={\"uifw-command-palette-input\"}\n data-testid=\"command-palette-input\"\n onChange={onInputValueChange}\n placeholder={placeholderLabel.current}\n value={currentKeyin}\n size=\"small\"\n />\n {filteredKeyins.length > 0 && (\n <Listbox\n id=\"uifw-command-sources\"\n className=\"map-manager-source-list\"\n onKeyDown={handleKeypressOnKeyinsList}\n onListboxValueChange={onListboxValueChange}\n >\n {filteredKeyins.map((entry, index) => {\n const value = `${entry.value}${keyinSeparator}${\n entry.isHistory ? \"history\" : \"registry\"\n }`;\n const itemClass = `uifw-command-palette-value-entry${\n index === lastHistoryIndex ? \" uifw-history-bottom-border\" : \"\"\n }`;\n return (\n <ListboxItem\n key={`${entry.value}-${index}`}\n className={itemClass}\n value={value}\n >\n <FilteredText value={entry.value} matches={entry.matches} />\n </ListboxItem>\n );\n })}\n </Listbox>\n )}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"KeyinPalettePanel.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/KeyinPalettePanel.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,mCAAmC;AAEnC,+BAA+B;AAC/B,6CAAkC;AAClC,oCAAkC;AAClC,kDAK2B;AAC3B,wDAM8B;AAC9B,gDAA6C;AAE7C,kEAA0E;AAC1E,oEAAwE;AAExE,wDAA6C;AAC7C,wDAAqD;AACrD,sDAAmD;AAEnD,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AACpD,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,gBAAgB;AAChB,SAAgB,wBAAwB;IACtC,MAAM,iBAAiB,GAAG,yBAAW,CAAC,iBAAiB,EAAE,CAAC;IAC1D,uBAAuB;IACvB,IAAI,iBAAiB,EAAE;QACrB,KAAK,iBAAiB,CAAC,aAAa,CAClC,uBAAuB,EACvB,iBAAiB,CAClB,CAAC;KACH;AACH,CAAC;AATD,4DASC;AAQD;;GAEG;AACH,SAAgB,iBA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AAK,EAAE,YAAY,EACnB,IAAI,EAAC,OAAO,GACZ;QACD,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAC5B,oBAAC,oBAAO,IACN,EAAE,EAAC,sBAAsB,EACzB,SAAS,EAAC,yBAAyB,EACnC,SAAS,EAAE,0BAA0B,EACrC,oBAAoB,EAAE,oBAAoB,IAEzC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,GAAG,cAAc,GAC3C,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAChC,EAAE,CAAC;YACH,MAAM,SAAS,GAAG,mCAChB,KAAK,KAAK,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAC/D,EAAE,CAAC;YACH,OAAO,CACL,oBAAC,wBAAW,IACV,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,EAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK;gBAEZ,oBAAC,yBAAY,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAChD,CACf,CAAC;QACJ,CAAC,CAAC,CACM,CACX,CACG,CACP,CAAC;AACJ,CAAC;AAtUD,8CAsUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Popup\n */\n\n// cSpell:ignore focusvalue uiadmin\n\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport \"./KeyinPalettePanel.scss\";\nimport {\n FilteredText,\n Listbox,\n ListboxItem,\n UiStateStorageStatus,\n} from \"@itwin/core-react\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n ParseAndRunResult,\n} from \"@itwin/core-frontend\";\nimport { UiFramework } from \"../UiFramework\";\nimport type { OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport { ClearKeyinPaletteHistoryTool } from \"../tools/KeyinPaletteTools\";\nimport { useUiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { KeyinEntry } from \"../keyins/Keyins\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { matchesWords } from \"../utils/matchesWords\";\nimport { useTranslation } from \"../useTranslation\";\n\nconst KEYIN_PALETTE_NAMESPACE = \"KeyinPalettePanel\";\nconst KEYIN_HISTORY_KEY = \"historyArray\";\n\n/** @internal */\nexport function clearKeyinPaletteHistory() {\n const uiSettingsStorage = UiFramework.getUiStateStorage();\n // istanbul ignore else\n if (uiSettingsStorage) {\n void uiSettingsStorage.deleteSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY\n );\n }\n}\n\ninterface KeyinPalettePanelProps {\n keyins: KeyinEntry[];\n onKeyinExecuted?: OnItemExecutedFunc;\n historyLength?: number;\n}\n\n/**\n * @internal\n */\nexport function KeyinPalettePanel({\n keyins,\n onKeyinExecuted,\n historyLength: allowedHistoryLength = 6,\n}: KeyinPalettePanelProps) {\n const { translate } = useTranslation();\n const [currentKeyin, setCurrentKeyin] = React.useState<string>(\"\");\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n const keyinSeparator = \"--#--\";\n const [historyKeyins, setHistoryKeyins] = React.useState<string[]>([]);\n const uiSettingsStorage = useUiStateStorageHandler();\n\n React.useEffect(() => {\n async function fetchState() {\n const settingsResult = await uiSettingsStorage.getSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY\n );\n // istanbul ignore else\n if (UiStateStorageStatus.Success === settingsResult.status) {\n const filteredHistory = (settingsResult.setting as string[]).filter(\n (keyin) => {\n const result = IModelApp.tools.parseKeyin(keyin);\n return result.ok;\n }\n );\n setHistoryKeyins(filteredHistory);\n } else {\n setHistoryKeyins([]);\n }\n }\n\n void fetchState();\n }, [uiSettingsStorage]);\n\n // istanbul ignore next\n const storeHistoryKeyins = React.useCallback(\n async (value: string[]) => {\n const result = await uiSettingsStorage.saveSetting(\n KEYIN_PALETTE_NAMESPACE,\n KEYIN_HISTORY_KEY,\n value\n );\n if (result.status !== UiStateStorageStatus.Success) {\n const errorDetails = new NotifyMessageDetails(\n OutputMessagePriority.Error,\n translate(\"keyinbrowser.couldNotSaveHistory\")\n );\n IModelApp.notifications.outputMessage(errorDetails);\n }\n },\n [translate, uiSettingsStorage]\n );\n\n const allKeyins = React.useMemo(() => {\n const availableKeyins = [];\n historyKeyins.forEach((value: string) => {\n availableKeyins.push({ value, isHistory: true });\n });\n availableKeyins.push(\n ...keyins.sort((a, b) =>\n a.value.toLowerCase().localeCompare(b.value.toLowerCase())\n )\n );\n return availableKeyins;\n }, [historyKeyins, keyins]);\n\n const submitKeyin = React.useCallback(\n async (value: string) => {\n let detailedMessage: string | undefined;\n let message: string | undefined;\n try {\n switch (await IModelApp.tools.parseAndRun(value)) {\n case ParseAndRunResult.ToolNotFound:\n message = `translate(\"keyinbrowser.couldNotFindTool\")} ${value}`;\n break;\n // istanbul ignore next\n case ParseAndRunResult.BadArgumentCount:\n message = translate(\"keyinbrowser.incorrectArgs\");\n break;\n // istanbul ignore next\n case ParseAndRunResult.FailedToRun:\n message = translate(\"keyinbrowser.failedToRun\");\n break;\n }\n } catch (ex) {\n // istanbul ignore next\n {\n message = translate(\"keyinbrowser.exceptionOccurred\");\n detailedMessage = `${translate(\n \"keyinbrowser.exceptionOccurred\"\n )}: ${ex}`;\n }\n }\n\n // istanbul ignore else\n if (undefined !== message) {\n const errorDetails = new NotifyMessageDetails(\n OutputMessagePriority.Error,\n message,\n detailedMessage,\n OutputMessageType.Sticky\n );\n IModelApp.notifications.outputMessage(errorDetails);\n } else {\n // istanbul ignore next\n if (\n value.length < 400 &&\n value !== ClearKeyinPaletteHistoryTool.keyin &&\n value !== ClearKeyinPaletteHistoryTool.englishKeyin\n ) {\n const newHistoryEntries: string[] = [value];\n for (const entry of historyKeyins) {\n if (entry !== value) {\n newHistoryEntries.push(entry);\n if (newHistoryEntries.length >= allowedHistoryLength) break;\n }\n }\n await storeHistoryKeyins(newHistoryEntries);\n }\n\n // close the popup by processing the supplied onKeyinExecuted function\n if (onKeyinExecuted) onKeyinExecuted(value);\n }\n },\n [\n translate,\n onKeyinExecuted,\n storeHistoryKeyins,\n historyKeyins,\n allowedHistoryLength,\n ]\n );\n\n const selectKeyin = React.useCallback(() => {\n // istanbul ignore else\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(\n inputRef.current.value.length,\n inputRef.current.value.length\n );\n }\n }, [inputRef]);\n\n const updateKeyin = React.useCallback(\n (value: string) => {\n setCurrentKeyin(value);\n selectKeyin();\n },\n [selectKeyin]\n );\n\n const getKeyinFromListboxValue = (value: string | undefined) => {\n // istanbul ignore else\n if (value) {\n const indexSeparator = value.search(keyinSeparator);\n // istanbul ignore else\n if (indexSeparator) return value.substring(0, indexSeparator);\n }\n // istanbul ignore next\n return undefined;\n };\n\n const handleKeypressOnKeyinsList = React.useCallback(\n async (event: React.KeyboardEvent<HTMLUListElement>) => {\n const key = event.key;\n // built into listbox a \"Space\" key will trigger the selection of a entry so if an Enter key is pressed\n // assume user wants to execute the entry.\n // istanbul ignore else\n if (key === Key.Enter.valueOf()) {\n event.preventDefault();\n // istanbul ignore next\n const keyinToSend = getKeyinFromListboxValue(\n event.currentTarget?.dataset?.focusvalue\n );\n // istanbul ignore else\n if (keyinToSend) {\n if (event.ctrlKey) updateKeyin(keyinToSend);\n else await submitKeyin(keyinToSend);\n }\n }\n },\n [submitKeyin, updateKeyin]\n );\n\n const onListboxValueChange = React.useCallback(\n async (value: string, isControlOrCommandPressed?: boolean) => {\n const keyin = getKeyinFromListboxValue(value);\n // istanbul ignore else\n if (keyin) {\n if (isControlOrCommandPressed) updateKeyin(keyin);\n else await submitKeyin(keyin);\n }\n },\n [submitKeyin, updateKeyin]\n );\n\n const onInputValueChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setCurrentKeyin(event.target.value);\n },\n []\n );\n\n const filteredKeyins = React.useMemo(() => {\n const filteredHistory: KeyinEntry[] = [];\n if (undefined === currentKeyin || 0 === currentKeyin.length) {\n return allKeyins;\n } else {\n const newKeyinSet: KeyinEntry[] = [];\n allKeyins.forEach((value) => {\n if (value.value.length >= currentKeyin.length) {\n // Force contiguous searches if key-in is over 60 characters long for performance.\n const matches = matchesWords(\n currentKeyin,\n value.value,\n currentKeyin.length > 60\n );\n if (matches && matches.length) {\n // istanbul ignore else\n if (value.isHistory) {\n filteredHistory.push(value);\n newKeyinSet.push({ ...value, matches });\n } else {\n // only add entry if no match in filtered history\n // istanbul ignore else\n if (\n -1 ===\n filteredHistory.findIndex(\n (historyEntry: KeyinEntry) =>\n historyEntry.value === value.value\n )\n )\n newKeyinSet.push({ ...value, matches });\n }\n }\n }\n });\n return newKeyinSet;\n }\n }, [allKeyins, currentKeyin]);\n\n const onInputValueKeyDown = React.useCallback(\n async (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (Key.Enter.valueOf() === event.key) {\n event.preventDefault();\n event.stopPropagation();\n // istanbul ignore else\n if (1 === filteredKeyins.length) {\n if (event.ctrlKey) updateKeyin(filteredKeyins[0].value);\n else await submitKeyin(filteredKeyins[0].value);\n } else {\n if (currentKeyin) await submitKeyin(currentKeyin);\n }\n } else if (\n Key.Tab.valueOf() === event.key &&\n 1 === filteredKeyins.length\n ) {\n event.preventDefault();\n event.stopPropagation();\n updateKeyin(filteredKeyins[0].value);\n } else {\n if (\n event.key === Key.ArrowDown.valueOf() &&\n filteredKeyins.length > 0\n ) {\n event.preventDefault();\n event.stopPropagation();\n // istanbul ignore else\n if (inputRef.current) {\n const nextElement = inputRef.current\n .nextElementSibling as HTMLElement;\n nextElement && nextElement.focus();\n }\n }\n }\n },\n [filteredKeyins, submitKeyin, currentKeyin, updateKeyin]\n );\n\n const lastHistoryIndex =\n filteredKeyins.findIndex((entry) => true !== entry.isHistory) - 1;\n\n return (\n <div className=\"uifw-command-palette-panel\">\n <Input\n ref={inputRef}\n type=\"text\"\n onKeyDown={onInputValueKeyDown}\n className={\"uifw-command-palette-input\"}\n data-testid=\"command-palette-input\"\n onChange={onInputValueChange}\n placeholder={translate(\"keyinbrowser.placeholder\")}\n value={currentKeyin}\n size=\"small\"\n />\n {filteredKeyins.length > 0 && (\n <Listbox\n id=\"uifw-command-sources\"\n className=\"map-manager-source-list\"\n onKeyDown={handleKeypressOnKeyinsList}\n onListboxValueChange={onListboxValueChange}\n >\n {filteredKeyins.map((entry, index) => {\n const value = `${entry.value}${keyinSeparator}${\n entry.isHistory ? \"history\" : \"registry\"\n }`;\n const itemClass = `uifw-command-palette-value-entry${\n index === lastHistoryIndex ? \" uifw-history-bottom-border\" : \"\"\n }`;\n return (\n <ListboxItem\n key={`${entry.value}-${index}`}\n className={itemClass}\n value={value}\n >\n <FilteredText value={entry.value} matches={entry.matches} />\n </ListboxItem>\n );\n })}\n </Listbox>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import type { OnCancelFunc, OnItemExecutedFunc } from "@itwin/appui-abstract";
|
|
6
|
-
import type { KeyinEntry } from "../
|
|
6
|
+
import type { KeyinEntry } from "../keyins/Keyins";
|
|
7
7
|
/** Props defining KeyinPalettePopup component
|
|
8
8
|
* @public */
|
|
9
9
|
export interface KeyinPalettePopupProps {
|
|
10
10
|
id: string;
|
|
11
|
+
/** @deprecated in 4.11.x. Please use the optional `anchorEl` property moving forward. */
|
|
11
12
|
el: HTMLElement;
|
|
12
13
|
keyins: KeyinEntry[];
|
|
14
|
+
anchorEl?: HTMLElement;
|
|
13
15
|
onCancel?: OnCancelFunc;
|
|
14
16
|
onItemExecuted?: OnItemExecutedFunc;
|
|
15
17
|
}
|
|
16
18
|
/** Keyin Palette Popup Component
|
|
17
19
|
* @public
|
|
18
20
|
*/
|
|
19
|
-
export declare function KeyinPalettePopup({ el, id, keyins, onCancel, onItemExecuted, }: KeyinPalettePopupProps): React.JSX.Element;
|
|
21
|
+
export declare function KeyinPalettePopup({ el, id, keyins, onCancel, onItemExecuted, anchorEl, }: KeyinPalettePopupProps): React.JSX.Element;
|
|
20
22
|
//# sourceMappingURL=KeyinPalettePopup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyinPalettePopup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/KeyinPalettePopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"KeyinPalettePopup.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/KeyinPalettePopup.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;aACa;AACb,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,yFAAyF;IACzF,EAAE,EAAE,WAAW,CAAC;IAChB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAEhC,EAAE,EACF,EAAE,EACF,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,GACT,EAAE,sBAAsB,qBAqDxB"}
|
|
@@ -16,7 +16,13 @@ const KeyinPalettePanel_1 = require("./KeyinPalettePanel");
|
|
|
16
16
|
/** Keyin Palette Popup Component
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
function KeyinPalettePopup({
|
|
19
|
+
function KeyinPalettePopup({
|
|
20
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
21
|
+
el, id, keyins, onCancel, onItemExecuted, anchorEl, }) {
|
|
22
|
+
// due to deprecation policy, the context won't be used as fallback
|
|
23
|
+
// until we replace `el` with the optional `anchorEl` property.
|
|
24
|
+
// const wrapper = React.useContext(WrapperContext);
|
|
25
|
+
const _el = anchorEl !== null && anchorEl !== void 0 ? anchorEl : el;
|
|
20
26
|
const [popupSize, setPopupSize] = React.useState(new core_react_1.Size(-1, -1));
|
|
21
27
|
const onSizeKnown = React.useCallback((newSize) => {
|
|
22
28
|
// istanbul ignore else
|
|
@@ -34,8 +40,8 @@ function KeyinPalettePopup({ el, id, keyins, onCancel, onItemExecuted, }) {
|
|
|
34
40
|
break;
|
|
35
41
|
}
|
|
36
42
|
}, [cancel]);
|
|
37
|
-
const xMid =
|
|
38
|
-
let point = new core_react_1.Point(xMid,
|
|
43
|
+
const xMid = _el.getBoundingClientRect().left + _el.getBoundingClientRect().width / 2;
|
|
44
|
+
let point = new core_react_1.Point(xMid, _el.getBoundingClientRect().top);
|
|
39
45
|
// istanbul ignore next
|
|
40
46
|
if (popupSize.width > 0)
|
|
41
47
|
point = point.offsetX(popupSize.width / -2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyinPalettePopup.js","sourceRoot":"","sources":["../../../../src/appui-react/popup/KeyinPalettePopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAAkC;AAGlC,kDAAgF;AAChF,mDAAgD;AAChD,2D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CAAC;gBACvB,MAAM;SACT;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,IAAI,GACR,GAAG,CAAC,qBAAqB,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IAC3E,IAAI,KAAK,GAAG,IAAI,kBAAK,CAAC,IAAI,EAAE,GAAG,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7D,uBAAuB;IACvB,IAAI,SAAS,CAAC,KAAK,GAAG,CAAC;QAAE,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IAErE,OAAO,CACL,oBAAC,6BAAa,IACZ,GAAG,EAAE,EAAE,EACP,SAAS,EAAC,sCAAsC,EAChD,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW;QAExB,oBAAC,gCAAmB,IAAC,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa;YACrE,oBAAC,sBAAS,IAAC,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI;gBACpD,oBAAC,qCAAiB,IAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,GAAI,CAC5D,CACQ,CACR,CACjB,CAAC;AACJ,CAAC;AA7DD,8CA6DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Popup\n */\n\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { OnCancelFunc, OnItemExecutedFunc } from \"@itwin/appui-abstract\";\nimport type { SizeProps } from \"@itwin/core-react\";\nimport { DivWithOutsideClick, FocusTrap, Point, Size } from \"@itwin/core-react\";\nimport { PositionPopup } from \"./PositionPopup\";\nimport { KeyinPalettePanel } from \"./KeyinPalettePanel\";\nimport type { KeyinEntry } from \"../keyins/Keyins\";\n\n/** Props defining KeyinPalettePopup component\n * @public */\nexport interface KeyinPalettePopupProps {\n id: string;\n /** @deprecated in 4.11.x. Please use the optional `anchorEl` property moving forward. */\n el: HTMLElement;\n keyins: KeyinEntry[];\n anchorEl?: HTMLElement;\n onCancel?: OnCancelFunc;\n onItemExecuted?: OnItemExecutedFunc;\n}\n\n/** Keyin Palette Popup Component\n * @public\n */\nexport function KeyinPalettePopup({\n // eslint-disable-next-line deprecation/deprecation\n el,\n id,\n keyins,\n onCancel,\n onItemExecuted,\n anchorEl,\n}: KeyinPalettePopupProps) {\n // due to deprecation policy, the context won't be used as fallback\n // until we replace `el` with the optional `anchorEl` property.\n // const wrapper = React.useContext(WrapperContext);\n\n const _el = anchorEl ?? el;\n\n const [popupSize, setPopupSize] = React.useState(new Size(-1, -1));\n\n const onSizeKnown = React.useCallback(\n (newSize: SizeProps) => {\n // istanbul ignore else\n if (!popupSize.equals(newSize)) setPopupSize(Size.create(newSize));\n },\n [popupSize]\n );\n\n const cancel = React.useCallback(() => {\n onCancel && onCancel();\n }, [onCancel]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>): void => {\n switch (event.key) {\n case Key.Escape.valueOf():\n cancel();\n event.preventDefault();\n break;\n }\n },\n [cancel]\n );\n\n const xMid =\n _el.getBoundingClientRect().left + _el.getBoundingClientRect().width / 2;\n let point = new Point(xMid, _el.getBoundingClientRect().top);\n // istanbul ignore next\n if (popupSize.width > 0) point = point.offsetX(popupSize.width / -2);\n\n return (\n <PositionPopup\n key={id}\n className=\"uifw-command-palette-popup-container\"\n point={point}\n onSizeKnown={onSizeKnown}\n >\n <DivWithOutsideClick onOutsideClick={onCancel} onKeyDown={handleKeyDown}>\n <FocusTrap active={true} returnFocusOnDeactivate={true}>\n <KeyinPalettePanel keyins={keyins} onKeyinExecuted={onItemExecuted} />\n </FocusTrap>\n </DivWithOutsideClick>\n </PositionPopup>\n );\n}\n"]}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Popup
|
|
3
3
|
*/
|
|
4
|
-
import type { AbstractToolbarProps, DialogLayoutDataProvider,
|
|
4
|
+
import type { AbstractToolbarProps, DialogLayoutDataProvider, OnValueCommitFunc, Primitives, PropertyDescription, RelativePosition } from "@itwin/appui-abstract";
|
|
5
5
|
import { PropertyRecord, UiEvent } from "@itwin/appui-abstract";
|
|
6
6
|
import type { XAndY } from "@itwin/core-geometry";
|
|
7
7
|
import type { Point, SizeProps } from "@itwin/core-react";
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import type {
|
|
9
|
+
import type { ReactElement } from "react";
|
|
10
|
+
import type { KeyinEntry } from "../keyins/Keyins";
|
|
11
|
+
import { WrapperContext } from "../configurableui/ConfigurableUiContent";
|
|
12
|
+
import { type Placement } from "../utils/Placement";
|
|
13
|
+
import type { ToolbarItem } from "../toolbar/ToolbarItem";
|
|
14
|
+
import type { ToolbarProps } from "../toolbar/Toolbar";
|
|
10
15
|
/** Information maintained by PopupManager about a Popup
|
|
11
16
|
* @public
|
|
12
17
|
*/
|
|
@@ -14,7 +19,24 @@ export interface PopupInfo {
|
|
|
14
19
|
id: string;
|
|
15
20
|
pt: XAndY;
|
|
16
21
|
component: React.ReactNode;
|
|
22
|
+
/** @deprecated in 4.x.11. Please use the optional `parent` property moving forward. */
|
|
17
23
|
parentDocument: Document;
|
|
24
|
+
/** will become standard once `parentDocument` is removed. */
|
|
25
|
+
parent?: Document;
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
interface CommonPopupOptions {
|
|
29
|
+
onCancel: () => void;
|
|
30
|
+
location: XAndY;
|
|
31
|
+
offset: XAndY;
|
|
32
|
+
placement: Placement;
|
|
33
|
+
anchor?: HTMLElement;
|
|
34
|
+
id?: string;
|
|
35
|
+
}
|
|
36
|
+
interface DisplayCardPopupOptions extends CommonPopupOptions {
|
|
37
|
+
title: string | PropertyRecord | undefined;
|
|
38
|
+
toolbarProps?: ToolbarProps;
|
|
39
|
+
onItemExecuted: (item: any) => void;
|
|
18
40
|
}
|
|
19
41
|
/** @public */
|
|
20
42
|
export interface PopupsChangedEventArgs {
|
|
@@ -72,17 +94,28 @@ export declare class PopupManager {
|
|
|
72
94
|
static removePopup(id: string): boolean;
|
|
73
95
|
static get defaultOffset(): XAndY;
|
|
74
96
|
static set defaultOffset(offset: XAndY);
|
|
75
|
-
static showInputEditor(el: HTMLElement, pt: XAndY, value: Primitives.Value, propertyDescription: PropertyDescription, onCommit: OnValueCommitFunc, onCancel:
|
|
97
|
+
static showInputEditor(el: HTMLElement, pt: XAndY, value: Primitives.Value, propertyDescription: PropertyDescription, onCommit: OnValueCommitFunc, onCancel: () => void): boolean;
|
|
76
98
|
static hideInputEditor(): boolean;
|
|
77
|
-
static showKeyinPalette(keyins: KeyinEntry[], el: HTMLElement, onItemExecuted?:
|
|
99
|
+
static showKeyinPalette(keyins: KeyinEntry[], el: HTMLElement, onItemExecuted?: (item: any) => void, onCancel?: () => void): boolean;
|
|
78
100
|
static hideKeyinPalette(): boolean;
|
|
79
|
-
static showToolbar(toolbarProps: AbstractToolbarProps, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted:
|
|
101
|
+
static showToolbar(toolbarProps: AbstractToolbarProps, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: (item: any) => void, onCancel: () => void, relativePosition: RelativePosition): boolean;
|
|
102
|
+
static displayToolbar(items: ToolbarItem[], options: CommonPopupOptions & {
|
|
103
|
+
onItemExecuted: (item: any) => void;
|
|
104
|
+
}): boolean;
|
|
80
105
|
static hideToolbar(): boolean;
|
|
81
|
-
static showHTMLElement(displayElement: HTMLElement, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel:
|
|
106
|
+
static showHTMLElement(displayElement: HTMLElement, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: () => void, relativePosition: RelativePosition): boolean;
|
|
82
107
|
static hideHTMLElement(): boolean;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Displays a React component as a popup.
|
|
110
|
+
* @param displayElement The React component to display.
|
|
111
|
+
* @param options for displaying the component.
|
|
112
|
+
*/
|
|
113
|
+
static showComponent(displayElement: ReactElement, options: CommonPopupOptions): boolean;
|
|
114
|
+
static hideComponent(id?: string): boolean;
|
|
115
|
+
static showCard(content: PopupContentType, title: string | PropertyRecord | undefined, toolbarProps: AbstractToolbarProps | undefined, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: (item: any) => void, onCancel: () => void, relativePosition: RelativePosition): boolean;
|
|
116
|
+
static displayCard(content: React.ReactNode, options: DisplayCardPopupOptions): boolean;
|
|
117
|
+
static hideCard(id?: string): boolean;
|
|
118
|
+
static openToolSettings(dataProvider: DialogLayoutDataProvider, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: () => void, relativePosition: RelativePosition): boolean;
|
|
86
119
|
static closeToolSettings(): boolean;
|
|
87
120
|
static getPopupPosition(el: HTMLElement, pt: XAndY, offset: XAndY, size: SizeProps): Point;
|
|
88
121
|
}
|
|
@@ -96,6 +129,9 @@ interface PopupRendererState {
|
|
|
96
129
|
*/
|
|
97
130
|
export declare class PopupRenderer extends React.Component<{}, PopupRendererState> {
|
|
98
131
|
/** @internal */
|
|
132
|
+
static contextType: React.Context<HTMLElement>;
|
|
133
|
+
/** @internal */
|
|
134
|
+
context: React.ContextType<typeof WrapperContext>;
|
|
99
135
|
readonly state: PopupRendererState;
|
|
100
136
|
componentDidMount(): void;
|
|
101
137
|
componentWillUnmount(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/popup/PopupManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3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GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,kBAAkB,CAAC;IACxE,gBAAgB;IAChB,OAAuB,WAAW,6BAAkB;IACpD,gBAAgB;IACD,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;IAEjE,SAAyB,KAAK,EAAE,kBAAkB,CAGhD;IAEc,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAO5C,OAAO,CAAC,aAAa,CAEnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA2BzC,OAAO,CAAC,yBAAyB,CAE/B;CACH"}
|
|
@@ -20,6 +20,10 @@ const InputEditorPopup_1 = require("./InputEditorPopup");
|
|
|
20
20
|
const KeyinPalettePopup_1 = require("./KeyinPalettePopup");
|
|
21
21
|
const ToolbarPopup_1 = require("./ToolbarPopup");
|
|
22
22
|
const ToolSettingsPopup_1 = require("./ToolSettingsPopup");
|
|
23
|
+
const ComponentPopup_1 = require("./ComponentPopup");
|
|
24
|
+
const ConfigurableUiContent_1 = require("../configurableui/ConfigurableUiContent");
|
|
25
|
+
const Placement_1 = require("../utils/Placement");
|
|
26
|
+
const InternalConfigurableUiManager_1 = require("../configurableui/InternalConfigurableUiManager");
|
|
23
27
|
/** Popups Changed Event class.
|
|
24
28
|
* @public
|
|
25
29
|
*/
|
|
@@ -112,6 +116,7 @@ class PopupManager {
|
|
|
112
116
|
pt,
|
|
113
117
|
component,
|
|
114
118
|
parentDocument: el.ownerDocument,
|
|
119
|
+
parent: el.ownerDocument,
|
|
115
120
|
};
|
|
116
121
|
PopupManager.addOrUpdatePopup(popupInfo);
|
|
117
122
|
return true;
|
|
@@ -121,7 +126,8 @@ class PopupManager {
|
|
|
121
126
|
}
|
|
122
127
|
static showKeyinPalette(keyins, el, onItemExecuted, onCancel) {
|
|
123
128
|
const id = PopupManager._keyPalettePopupId;
|
|
124
|
-
const
|
|
129
|
+
const cancelFn = onCancel !== null && onCancel !== void 0 ? onCancel : (() => PopupManager.hideKeyinPalette());
|
|
130
|
+
const component = (React.createElement(KeyinPalettePopup_1.KeyinPalettePopup, { keyins: keyins, id: id, el: el, onItemExecuted: onItemExecuted, onCancel: cancelFn }));
|
|
125
131
|
// since the command palette popup is always at top center of specified HTML element and it does not need to move like
|
|
126
132
|
// cursor popups just set pt to 0,0.
|
|
127
133
|
const pt = { x: 0, y: 0 };
|
|
@@ -129,7 +135,7 @@ class PopupManager {
|
|
|
129
135
|
id,
|
|
130
136
|
pt,
|
|
131
137
|
component,
|
|
132
|
-
parentDocument: el.ownerDocument,
|
|
138
|
+
parentDocument: el === null || el === void 0 ? void 0 : el.ownerDocument,
|
|
133
139
|
};
|
|
134
140
|
PopupManager.addOrUpdatePopup(popupInfo);
|
|
135
141
|
return true;
|
|
@@ -137,14 +143,29 @@ class PopupManager {
|
|
|
137
143
|
static hideKeyinPalette() {
|
|
138
144
|
return PopupManager.removePopup(PopupManager._keyPalettePopupId);
|
|
139
145
|
}
|
|
146
|
+
// @deprecated in 4.11.x. Use {@link PopupManager.displayToolbar} instead.
|
|
140
147
|
static showToolbar(toolbarProps, el, pt, offset, onItemExecuted, onCancel, relativePosition) {
|
|
141
|
-
|
|
142
|
-
|
|
148
|
+
PopupManager.displayToolbar(toolbarProps.items, {
|
|
149
|
+
anchor: el,
|
|
150
|
+
location: pt,
|
|
151
|
+
offset,
|
|
152
|
+
onCancel,
|
|
153
|
+
placement: (0, Placement_1.mapToPlacement)(relativePosition),
|
|
154
|
+
onItemExecuted,
|
|
155
|
+
});
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
static displayToolbar(items, options) {
|
|
159
|
+
var _a, _b;
|
|
160
|
+
const id = (_a = options.id) !== null && _a !== void 0 ? _a : PopupManager._toolbarId;
|
|
161
|
+
const { anchor, location, offset, onCancel, placement, onItemExecuted } = options;
|
|
162
|
+
const component = (React.createElement(ToolbarPopup_1.ToolbarPopup, { id: id, el: anchor, pt: location, offset: offset, items: items, placement: placement, orientation: core_react_1.Orientation.Horizontal, onCancel: onCancel, onItemExecuted: onItemExecuted }));
|
|
143
163
|
const popupInfo = {
|
|
144
164
|
id,
|
|
145
|
-
pt,
|
|
165
|
+
pt: location,
|
|
146
166
|
component,
|
|
147
|
-
parentDocument:
|
|
167
|
+
parentDocument: (_b = anchor === null || anchor === void 0 ? void 0 : anchor.ownerDocument) !== null && _b !== void 0 ? _b : InternalConfigurableUiManager_1.InternalConfigurableUiManager.getWrapperDocument(),
|
|
168
|
+
parent: anchor === null || anchor === void 0 ? void 0 : anchor.ownerDocument,
|
|
148
169
|
};
|
|
149
170
|
PopupManager.addOrUpdatePopup(popupInfo);
|
|
150
171
|
return true;
|
|
@@ -152,9 +173,12 @@ class PopupManager {
|
|
|
152
173
|
static hideToolbar() {
|
|
153
174
|
return PopupManager.removePopup(PopupManager._toolbarId);
|
|
154
175
|
}
|
|
176
|
+
// @deprecated in 4.11.x. Use {@link PopupManager.showComponent} instead.
|
|
155
177
|
static showHTMLElement(displayElement, el, pt, offset, onCancel, relativePosition) {
|
|
156
178
|
const id = PopupManager._htmlElementId;
|
|
157
|
-
const component = (
|
|
179
|
+
const component = (
|
|
180
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
181
|
+
React.createElement(HTMLElementPopup_1.HTMLElementPopup, { id: id, el: el, pt: pt, offset: offset, element: displayElement, relativePosition: relativePosition, orientation: core_react_1.Orientation.Horizontal, onCancel: onCancel }));
|
|
158
182
|
const popupInfo = {
|
|
159
183
|
id,
|
|
160
184
|
pt,
|
|
@@ -164,25 +188,66 @@ class PopupManager {
|
|
|
164
188
|
PopupManager.addOrUpdatePopup(popupInfo);
|
|
165
189
|
return true;
|
|
166
190
|
}
|
|
191
|
+
// @deprecated in 4.11.x. Use {@link PopupManager.hideComponent} instead.
|
|
167
192
|
static hideHTMLElement() {
|
|
168
193
|
return PopupManager.removePopup(PopupManager._htmlElementId);
|
|
169
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Displays a React component as a popup.
|
|
197
|
+
* @param displayElement The React component to display.
|
|
198
|
+
* @param options for displaying the component.
|
|
199
|
+
*/
|
|
200
|
+
static showComponent(displayElement, options) {
|
|
201
|
+
var _a;
|
|
202
|
+
const { onCancel, location, offset, placement, anchor, id } = options;
|
|
203
|
+
const _id = PopupManager._htmlElementId;
|
|
204
|
+
const component = (React.createElement(ComponentPopup_1.ComponentPopup, { id: id !== null && id !== void 0 ? id : _id, anchor: anchor !== null && anchor !== void 0 ? anchor : undefined, pt: location, offset: offset, placement: placement, orientation: core_react_1.Orientation.Horizontal, onCancel: onCancel }, displayElement));
|
|
205
|
+
const popupInfo = {
|
|
206
|
+
id: id !== null && id !== void 0 ? id : _id,
|
|
207
|
+
pt: location,
|
|
208
|
+
component,
|
|
209
|
+
parentDocument: (_a = anchor === null || anchor === void 0 ? void 0 : anchor.ownerDocument) !== null && _a !== void 0 ? _a : InternalConfigurableUiManager_1.InternalConfigurableUiManager.getWrapperDocument(),
|
|
210
|
+
};
|
|
211
|
+
PopupManager.addOrUpdatePopup(popupInfo);
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
static hideComponent(id) {
|
|
215
|
+
return PopupManager.removePopup(id !== null && id !== void 0 ? id : PopupManager._htmlElementId);
|
|
216
|
+
}
|
|
217
|
+
// @deprecated in 4.11.x. Use {@link PopupManager.displayCard} instead.
|
|
170
218
|
static showCard(content, title, toolbarProps, el, pt, offset, onItemExecuted, onCancel, relativePosition) {
|
|
171
219
|
const id = PopupManager._cardId;
|
|
220
|
+
const placement = (0, Placement_1.mapToPlacement)(relativePosition);
|
|
172
221
|
const component = (React.createElement(CardPopup_1.CardPopup, { id: id, el: el, pt: pt, offset: offset, content: content, title: title, items: toolbarProps
|
|
173
222
|
? toolbarProps.items
|
|
174
|
-
: /* istanbul ignore next */ undefined,
|
|
223
|
+
: /* istanbul ignore next */ undefined, placement: placement, orientation: core_react_1.Orientation.Horizontal, onCancel: onCancel, onItemExecuted: onItemExecuted }));
|
|
175
224
|
const popupInfo = {
|
|
176
225
|
id,
|
|
177
226
|
pt,
|
|
178
227
|
component,
|
|
179
228
|
parentDocument: el.ownerDocument,
|
|
229
|
+
parent: el.ownerDocument,
|
|
230
|
+
};
|
|
231
|
+
PopupManager.addOrUpdatePopup(popupInfo);
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
static displayCard(content, options) {
|
|
235
|
+
var _a, _b;
|
|
236
|
+
const id = (_a = options.id) !== null && _a !== void 0 ? _a : PopupManager._cardId;
|
|
237
|
+
const { onCancel, location, placement, offset, anchor, title, toolbarProps, onItemExecuted, } = options;
|
|
238
|
+
const component = (React.createElement(CardPopup_1.CardPopup, { id: id, el: anchor, pt: location, offset: offset, content: { reactNode: content }, title: title, items: toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.items, placement: placement, orientation: core_react_1.Orientation.Horizontal, onCancel: onCancel, onItemExecuted: onItemExecuted }));
|
|
239
|
+
const popupInfo = {
|
|
240
|
+
id,
|
|
241
|
+
pt: location,
|
|
242
|
+
component,
|
|
243
|
+
parentDocument: (_b = anchor === null || anchor === void 0 ? void 0 : anchor.ownerDocument) !== null && _b !== void 0 ? _b : InternalConfigurableUiManager_1.InternalConfigurableUiManager.getWrapperDocument(),
|
|
244
|
+
parent: anchor === null || anchor === void 0 ? void 0 : anchor.ownerDocument,
|
|
180
245
|
};
|
|
181
246
|
PopupManager.addOrUpdatePopup(popupInfo);
|
|
182
247
|
return true;
|
|
183
248
|
}
|
|
184
|
-
static hideCard() {
|
|
185
|
-
const index = PopupManager._popups.findIndex((info) => PopupManager._cardId === info.id);
|
|
249
|
+
static hideCard(id) {
|
|
250
|
+
const index = PopupManager._popups.findIndex((info) => id !== null && id !== void 0 ? id : PopupManager._cardId === info.id);
|
|
186
251
|
if (index >= 0)
|
|
187
252
|
return PopupManager.removePopup(PopupManager._cardId);
|
|
188
253
|
return false;
|
|
@@ -226,13 +291,13 @@ exports.PopupManager = PopupManager;
|
|
|
226
291
|
class PopupRenderer extends React.Component {
|
|
227
292
|
constructor() {
|
|
228
293
|
super(...arguments);
|
|
229
|
-
/** @internal */
|
|
230
294
|
this.state = {
|
|
231
295
|
parentDocument: null,
|
|
232
296
|
popups: PopupManager.popups,
|
|
233
297
|
};
|
|
234
298
|
this._handleRefSet = (popupDiv) => {
|
|
235
|
-
|
|
299
|
+
var _a;
|
|
300
|
+
this.setState({ parentDocument: (_a = popupDiv === null || popupDiv === void 0 ? void 0 : popupDiv.ownerDocument) !== null && _a !== void 0 ? _a : null });
|
|
236
301
|
};
|
|
237
302
|
this._handlePopupsChangedEvent = (args) => {
|
|
238
303
|
this.setState({ popups: args.popups });
|
|
@@ -251,11 +316,18 @@ class PopupRenderer extends React.Component {
|
|
|
251
316
|
return null;
|
|
252
317
|
return (React.createElement("div", { className: "appui-react-popup-render-container", ref: this._handleRefSet }, this.state.parentDocument &&
|
|
253
318
|
this.state.popups
|
|
254
|
-
.filter((info) =>
|
|
319
|
+
.filter((info) => {
|
|
320
|
+
var _a, _b;
|
|
321
|
+
return ((_b = (_a = info.parent) !== null && _a !== void 0 ? _a :
|
|
322
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
323
|
+
info.parentDocument) !== null && _b !== void 0 ? _b : this.context.ownerDocument) === this.state.parentDocument;
|
|
324
|
+
})
|
|
255
325
|
.map((popupInfo) => {
|
|
256
326
|
return (React.createElement(React.Fragment, { key: popupInfo.id }, popupInfo.component));
|
|
257
327
|
})));
|
|
258
328
|
}
|
|
259
329
|
}
|
|
330
|
+
/** @internal */
|
|
331
|
+
PopupRenderer.contextType = ConfigurableUiContent_1.WrapperContext;
|
|
260
332
|
exports.PopupRenderer = PopupRenderer;
|
|
261
333
|
//# sourceMappingURL=PopupManager.js.map
|